E3SM-Project / E3SM

Energy Exascale Earth System Model source code. NOTE: use "maint" branches for your work. Head of master is not validated.
https://docs.e3sm.org/E3SM
Other
346 stars 353 forks source link

clubb/shoc thlm variable is not computed correctly #4600

Open oksanaguba opened 2 years ago

oksanaguba commented 2 years ago

Consider clubb interface file:

       thlm(i,k)    = state1%t(i,k)*exner_clubb(i,k)-(latvap/cpair)*state1%q(i,k,ixcldliq)

(here exner_clubb is actually 1/Exner). Is it correct that Exner factor is not in the q part?

I was looking in a paper draft where clubb theta_l variable is described, and there Exner is for the second term as well (and it physically makes more sense, it becomes related to the moist enthalpy with assumptions). The draft has citations which I could not follow.

Also. note that in CAM it is corrected:

       thlm(i,k) = ( state1%t(i,k) &
                     - (latvap/cpairv(i,k,lchnk))*state1%q(i,k,ixcldliq) ) &
                   * inv_exner_clubb(i,k)
oksanaguba commented 2 years ago

Related is also this line

 enthalpy = cpair*((thlm(i,k)+(latvap/cpair)*rcm(i,k))/exner_clubb(i,k))
oksanaguba commented 2 years ago

@bogensch pointed to this link:

https://glossary.ametsoc.org/wiki/Liquid_water_potential_temperature

where the 1st expression is with Exner in qliq and the 2nd expression is as in the code.

oksanaguba commented 2 years ago

Following scream PR to switch to the new (1st in the link above) definition of thetal, made a change in this branch, oksanaguba/clubb-shflx (#ifdef NEWTHETAL, 2 changes in clubb_intr.F90). Details about the run are https://acme-climate.atlassian.net/wiki/spaces/COM/pages/3214606402/CLUBB+SHFLX+fix , including clubb fixer and climo.

Is it correct that we need only 2 modifications in clubb_intr? My understanding is that switching to the new definition of thetal does not affect how surface heat flux is applied in clubb (primitively, because theta, which absorbs temperature tendency from SHFLX, in thetal did not change from the old definition to the new). So i kept the new change (exner multiplier) that reduces clubb fixer. But, could it be that the new definition requires changes in vapor flux or when phase change occurs in clubb, because the new thetal definition has a new multiplier in ql term?

Besides that in file T_in_K_module.F90 the new definitions were already in use, not sure it is related to anything:

T_in_K = thlm * exner + Lv * rcm / Cp
thlm = ( T_in_K - Lv/Cp * rcm ) / exner