marbl-ecosys / MARBL

Marine Biogeochemistry Library
https://marbl-ecosys.github.io
Other
14 stars 25 forks source link

Wrong units for z_grz in documentation #378

Open mnlevy1981 opened 3 years ago

mnlevy1981 commented 3 years ago

The units for z_grz in grazing_relationship_settings are defined as (mmol/m^3)^2 in two separate spots in the Fortran: (1) the comments when defining the datatype, and (2) when registering the parameter, as well as in the YAML dictionary. It's clear from the two places in the code that use the variable (1, 2) that it needs to have the same units as Pprime and Zprime; both are mmol/m^3.

klindsay28 commented 3 years ago

Good catch @mnlevy1981. This appears to have been introduced pre-MARBL, going from https://svn-ccsm-models.cgd.ucar.edu/pop2/trunk_tags/cesm_pop_2_1_20140905/ https://svn-ccsm-models.cgd.ucar.edu/pop2/trunk_tags/cesm_pop_2_1_20140922/ At the time z_grz was a component of the derived type autotroph_type. The definition of this type moved from ecosys_parms.F90 to ecosys_share.F90 in this tag, and the units of z_grz in a comment of the type changed from (mmol C/m^3) to (mmol C/m^3)^2. I've verified that no other units mentioned in the type's comments changed in that tag. So the erroneous change in units appears to be limited to z_grz.

mnlevy1981 commented 3 years ago

Good catch @mnlevy1981.

Credit goes to @kristenkrumhardt, who noticed it when compiling a list of parameters to list in one of the tables in the CESM2 paper :)

This appears to have been introduced pre-MARBL, going from https://svn-ccsm-models.cgd.ucar.edu/pop2/trunk_tags/cesm_pop_2_1_20140905/ https://svn-ccsm-models.cgd.ucar.edu/pop2/trunk_tags/cesm_pop_2_1_20140922/ At the time z_grz was a component of the derived type autotroph_type. The definition of this type moved from ecosys_parms.F90 to ecosys_share.F90 in this tag, and the units of z_grz in a comment of the type changed from (mmol C/m^3) to (mmol C/m^3)^2. I've verified that no other units mentioned in the type's comments changed in that tag. So the erroneous change in units appears to be limited to z_grz.

Nice detective work! Glad that it's limited to the one variable, it should be an easy fix in the two spots in the Fortran and then all the YAML files in defaults/ (plus their corresponding JSON versions).