ESCOMP / CTSM

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

Variables have different names in history vs. restart #1826

Open slevis-lmwg opened 2 years ago

slevis-lmwg commented 2 years ago

Reduce potential confusion by naming variables the same in history and restart.

How to minimize backwards compatibility issues?

This issue was raised while @klindsay28 and I were working on the Newton-Krylov spin-up tool for the ctsm. Keith is adapting the tool to handle differing variable names between history and restarts, so we do not consider this issue a blocker.

@wwieder pls add anything I may have missed...

slevis-lmwg commented 2 years ago

A possible reason to keep different names for the following list of variables (and similar ones) is to have easier identification of variables in history, while having more flexible movement between compsets in restart: in restart litr[1,2,...]n_vr in history MET_LITN_vr, CEL_LITN_vr, LIG_LITN_vr in restart litr[1,2,...]c_vr in history MET_LITC_vr, CEL_LITC_vr, LIG_LITC_vr

billsacks commented 2 years ago

For restart variables, we do have a mechanism in place for backwards compatibility: you can give a variable a name like "newname:oldname" (colon-delimited). This means: when writing a restart file, use "newname"; when reading, look for "newname" first, but if not found, look for "oldname"; this works in init_interp as well as when directly reading a restart file.