If I am running CESM+MOM6, I can use user_nl_marbl to change variable values in marbl_in. Since MOM6 is in mks, I want to use mks values in user_nl_marbl, but the python script that generates marbl_in will assume user_nl_marbl will provide values in the units defined in the settings YAML file (which is cgs for the most part).
Here's a concrete example -- parm_POC_diss is defined in the YAML as
parm_POC_diss :
defined_if : base_bio_on
longname : Base POC dissolution length scale
subcategory : 5. general parameters (dissolution)
units : cm
datatype : real
default_value : 100e2
In MOM6, this default value is correctly appears in marbl_in as parm_POC_diss = 1.0000000000000000e+02 because we convert the default value to mks. However, if I set
parm_POC_diss = 150
in user_nl_marbl, then marbl_in contains parm_POC_diss = 1.5000000000000000e+00 rather than the desired parm_POC_diss = 1.5000000000000000e+02. The fix is to return a scale factor of 1. to _translate_JSON_value() if the variable came from an input file.
If I am running CESM+MOM6, I can use
user_nl_marbl
to change variable values inmarbl_in
. Since MOM6 is inmks
, I want to usemks
values inuser_nl_marbl
, but the python script that generatesmarbl_in
will assumeuser_nl_marbl
will provide values in the units defined in the settings YAML file (which is cgs for the most part).Here's a concrete example --
parm_POC_diss
is defined in the YAML asIn MOM6, this default value is correctly appears in
marbl_in
asparm_POC_diss = 1.0000000000000000e+02
because we convert the default value to mks. However, if I setin
user_nl_marbl
, thenmarbl_in
containsparm_POC_diss = 1.5000000000000000e+00
rather than the desiredparm_POC_diss = 1.5000000000000000e+02
. The fix is to return a scale factor of 1. to_translate_JSON_value()
if the variable came from an input file.