Skip to content
Snippets Groups Projects
Commit c08aa148 authored by Marco Matthies's avatar Marco Matthies
Browse files

Initialise AquaCrop cropstate in a different way

parent f4c80402
No related branches found
No related tags found
No related merge requests found
......@@ -15,11 +15,13 @@ mutable struct AquaCropState
cropstate::AquaCrop.AquaCropField
function AquaCropState(croptype::AquaCropType, height::Length{Float64}=0.0cm)
ac_parentdir = "./tmp-aquacrop-param" # TODO
# TODO: runtype can be :Fortran, :Julia or :Persefone in the
# future, so then use :Persefone
ac_parentdir = AquaCrop.test_toml_dir # TODO: hardcoded croptype
ac_runtype = :Julia
cropstate = AquaCrop.AquaCropField(ac_parentdir, ac_runtype)
# cropstate = AquaCrop.AquaCropField(ac_parentdir, ac_runtype)
cropstate, allok = AquaCrop.initialize_cropfield(ac_parentdir, ac_runtype)
if ! allok.logi
error("AquaCrop.initialize_cropfield() failed, status = $allok")
end
return new(croptype, height, cropstate)
end
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment