NCAR / ccpp-framework

Common Community Physics Package (CCPP)
http://www.dtcenter.org/community-code/common-community-physics-package-ccpp/
Other
26 stars 64 forks source link

Constituents object using wrong standard name #587

Open nusbaume opened 2 months ago

nusbaume commented 2 months ago

Description

Currently when the CCPP constituents object is determining what the mixing ratio water type should be (e.g. dry, moist, or wet) it looks for certain strings in the constituent's standard name.

However, for the wet setting it is looking for wrt_total_mass, which according to the CCPP Standard Names dictionary has been replaced with wrt_moist_air_and_condensed_water. This is resulting in constituent variables being given the wrong properties in the constituents object even when using the correct standard name.

Steps to Reproduce

Create a constituent variable with the standard name suffix wrt_moist_air_and_condensed_water. Then check that constituent's is_wet property, which should be .true. but will instead be .false..

One can also look at the constituent object logic being applied in the code block here:

https://github.com/NCAR/ccpp-framework/blob/main/src/ccpp_constituent_prop_mod.F90#L425

Additional Context

Not a critical priority, at least for SIMA, but it could certainly result in a host model generating incorrect results in a way that could be quite difficult to track down.