ESCOMP / CCPPStandardNames

Repository for community-accepted CCPP Standard Names and search tools
Other
3 stars 16 forks source link

Dealing with unusual units #63

Open mkavulich opened 3 months ago

mkavulich commented 3 months ago

There are several standard names, currently listed as having units of "1", which are technically misclassified, but their proper units (ln(Pa)) do not fit into the current list of supported units:

If you attempt to use ln(Pa) in the CCPP framework, you are met with the error Invalid 'units' property value, 'ln(Pa)'

There are also several date/time variables which are listed as unit = "1", which seems incorrect as they should have units of time in some way, but it's not clear which:

There may be others I am missing, but this seems like a good start. The ultimate question is, are we okay treating "1" as a grab-bag for units that don't fit nicely into the framework, or should we treat these properly and make sure the CCPP Framework can handle them?

mkavulich commented 2 months ago

After putting far too much thought into this, my proposal is this: add a new category "other" for units, which will allow for edge cases like those with log units mentioned above. These will be treated by the framework with the understanding that they should never be converted (to avoid any problems with future unit conversions). Essentially they will be treated the same as units of "none", but avoiding being technically incorrect.

mkavulich commented 2 months ago

@nusbaume @peverwhee @cacraigucar It seems like the more threads I pull on for this subject the more things unravel; when consulting the CF conventions for reference for the new rules I came upon this appendix section which covers the use of parametric log pressure coordinates. It is unclear to me if this is the same as the ln_air_pressure_at_interface used in CESM (i.e. dimensionless pressure factor), or if it truly is in ln(pressure) units; if it's the former, then this issue may be moot since we can use the CF convention guidance, but if it's the latter, then I'll continue with a PR to resolve this. Would one of you be able to help figure his out?