ESCOMP / CTSM

Community Terrestrial Systems Model (includes the Community Land Model of CESM)
http://www.cesm.ucar.edu/models/cesm2.0/land/
Other
305 stars 308 forks source link

Allow namelist defaults to apply for phys versions greater than or less than a given version #454

Open billsacks opened 6 years ago

billsacks commented 6 years ago

As we support more and more versions, I feel like we'll (at least eventually) want the ability for the namelist defaults xml file to allow us to say things like: "For CLM versions <= clm5.0, use foo = 3; for CLM versions > clm5.0, use foo = 7". Currently, we need to explicitly list the defaults for every phys version, which is going to be hard to maintain and error-prone long-term.

I feel like it will be useful for this purpose to separate the phys version into two pieces: a name and a version number. The name will be something like "clm" or "nwp" (the former for the "climate" version of CTSM, the later for the numerical weather prediction version). The version will be numeric.

I'm then imagining we could have a namelist default entry that looks like:

<foo phys="clm" version="<= 5.0">3</foo>
<foo phys="clm" version="> 5.0">7</foo>

or

<foo phys="clm" version_le="5.0">3</foo>
<foo phys="clm" version_gt="5.0">7</foo>
billsacks commented 4 years ago

Blocked by #585

ekluzek commented 5 months ago

Another thing that ParamGen could solve.