Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GEOS abuses MAPL_TICE: Worth fixing? #271

Open
mathomp4 opened this issue Mar 22, 2021 · 2 comments
Open

GEOS abuses MAPL_TICE: Worth fixing? #271

mathomp4 opened this issue Mar 22, 2021 · 2 comments
Labels
bug Something isn't working question Further information is requested

Comments

@mathomp4
Copy link
Member

In talking with @sanAkel today, we noticed that we "abuse" MAPL_TICE in GEOS. Namely, in MAPL_Constants.F90:

real, parameter, public :: MAPL_TICE   = 273.16                 ! K

This is the triple point of water, and is correct. But in GEOS we also use it to convert to/from Kelvin, like in Catch GC:

6039:  tc(:,FSNW) = tc(:,FSNW) + MAPL_TICE ! Convert to K

This is not correct. The triple point of water is 273.16 K or 0.01 ºC. But 0 ºC is 273.15 K. So, we should probably have a:

real, parameter, public :: MAPL_KELVIN   = 273.15                 ! K

that is used when we want to convert Celsius to Kelvin and vice versa.

The problem is that we'd need to do a serious look at all uses of MAPL_TICE in GEOS. This would be non-zero-diff and we'd probably need the approvals of @wmputman for the GCM and @gmao-rreichle for the LDAS... (not sure if the ADAS directly cares, or if all the TICE-Kelvin conversion is from the GCM). Note this would also mean fixing up KELVIN in the FMS constants as well (which reflects the GEOS MAPL_TICE).

The real question for the scientists is: Should this be done? It's an instant non-zero-diff for sure, but it seems more "correct" to me?

@mathomp4 mathomp4 added bug Something isn't working question Further information is requested labels Mar 22, 2021
@sanAkel
Copy link
Collaborator

sanAkel commented Mar 22, 2021

From what I can say for:

(not sure if the ADAS directly cares, or if all the TICE-Kelvin conversion is from the GCM).

it does not have a "global" constant, every instance is declared and used as a "new variable" see for e.g.,
https://github.com/GEOS-ESM/GEOSana_GridComp/blob/cb564bf830b4beb4ff80e9c5363f1ee596b690ce/GEOSaana_GridComp/GSI_GridComp/clw_mod.f90#L1291

https://github.com/GEOS-ESM/GEOSana_GridComp/blob/cb564bf830b4beb4ff80e9c5363f1ee596b690ce/GEOSaana_GridComp/GSI_GridComp/gsdcloudanalysis.F90#L948

@rtodling may want to say something.

@gmao-rreichle
Copy link

Yes, there's a distinction between 0 deg C and the triple point of water. But the difference is negligible compared to the uncertainties in the land model's representation of physical processes. Soil water doesn't freeze at exactly 0 deg C. Rather, it's somewhere around -2 deg C, if memory serves me right, and the freezing point of soil water probably varies by much more than the 0.01 deg C difference between 0 deg C and MAPL_TICE. So from the hydrologist's perspective, the latter difference is a bit academic. But in my previous life, I studied physics and have no objections to correcting the issue.
The land model and GEOSldas should be reasonably well coded and exclusively use MAPL_TICE, so it'd probably be a simple change.
cc: @rdkoster

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants