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

Update saturation calculation based on model. #61

Merged
merged 2 commits into from
Jan 8, 2024

Conversation

hu5970
Copy link
Contributor

@hu5970 hu5970 commented Jan 6, 2024

Update the algorithm of the saturation mixing ratio calculation in non-var cloud analysis:

Use functions RSLF and RSIF from fv3 model (module_mp_thompson.F90) to calculate the liquid saturation vapor mixing ratio and the ice saturation vapor mixing ratio.

This is better algorithm to avoid the Qs break down for very high temperatures at very low pressures.

Tested with a single case. The difference between non-var cloud analysis with new and old saturation scheme in T, q, qi, qc are very small.

…analysis:

Use functions RSLF and RSIF from fv3 model (module_mp_thompson.F90) to calculate
the liquid saturation vapor mixing ratio and the ice saturation vapor mixing ratio.

This is better algorithm to avoid the Qs break down for
very high temperatures at very low pressures.
Copy link

@JiliDong-NOAA JiliDong-NOAA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me

@@ -333,3 +342,72 @@ function ruc_saturation(Temp,pressure)
ruc_saturation= (watwgt*qvs1 + (one-watwgt)*qvi1) ! kg/kg
!
end function ruc_saturation

!+---+-----------------------------------------------------------------+
!>\ingroup aathompson

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is now consistent with Thompson microphysics, but the doxygen comments should be modified.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

modified


END FUNCTION RSLF
!+---+-----------------------------------------------------------------+
!>\ingroup aathompson

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Modify doxygen

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

modified.

!

temp4=Temp ! convert to real

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

temp4 is only used as input to 2 functions. Do we need this variable or can the conversion be done in the function call?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed temp4 to temp_real for clarification. more detail below.

!

temp4=Temp ! convert to real
press4=pressure*100.0 ! covert to Pa

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For clarity: pressure_pa = pressure*100.0

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

qvs1 = 0.62198_r_kind*evs/(pressure-evs) ! qvs1 is mixing ratio kg/kg
!ruc evs = svp1*exp(SVP2*(Temp-273.15_r_kind)/(Temp-SVP3))
!ruc qvs1 = 0.62198_r_kind*evs/(pressure-evs) ! qvs1 is mixing ratio kg/kg
qvs1 = RSLF(press4,temp4)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe something similar to this: qvs1 = RSLF(pressure_pa, real(Temp, kind=r_kind))

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried "real(Temp, kind=r_kind)"; "real(Temp, kind=4)" and "real(Temp)". They all hang the cloud analysis.
So, go back to use:
temp_real=Temp

qvi1 = 0.62198_r_kind*eis/(pressure-eis) ! qvi1 is mixing ratio kg/kg,
!ruc eis = svp1 *exp(22.514_r_kind - 6.15e3_r_kind/Temp)
!ruc qvi1 = 0.62198_r_kind*eis/(pressure-eis) ! qvi1 is mixing ratio kg/kg,
qvi1 = RSIF(press4,temp4)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comment for function call above

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed

@hu5970 hu5970 merged commit 74edce4 into NOAA-GSL:develop Jan 8, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants