-
Notifications
You must be signed in to change notification settings - Fork 15
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
Compute and export total PM2.5 and PM10 for UFS #40
Conversation
Whoops! Looks like I need to make some surgery on the CI. Give me a moment or two... |
@rmontuoro I'm throwing a blocker label on this until I get the CI fixed. That'll need a pull from |
! tracer map | ||
! - prognostic section (advected) | ||
integer, parameter :: p_o3 = 7 | ||
integer, parameter :: p_so2 = p_o3 + 1 | ||
integer, parameter :: p_sulf = p_o3 + 2 | ||
integer, parameter :: p_dms = p_o3 + 3 | ||
integer, parameter :: p_msa = p_o3 + 4 | ||
integer, parameter :: p_bc_1 = p_o3 + 5 | ||
integer, parameter :: p_bc_2 = p_o3 + 6 | ||
integer, parameter :: p_oc_1 = p_o3 + 7 | ||
integer, parameter :: p_oc_2 = p_o3 + 8 | ||
integer, parameter :: p_dust_1 = p_o3 + 9 | ||
integer, parameter :: p_dust_2 = p_o3 + 10 | ||
integer, parameter :: p_dust_3 = p_o3 + 11 | ||
integer, parameter :: p_dust_4 = p_o3 + 12 | ||
integer, parameter :: p_seas_1 = p_o3 + 14 | ||
integer, parameter :: p_seas_2 = p_o3 + 15 | ||
integer, parameter :: p_seas_3 = p_o3 + 16 | ||
integer, parameter :: p_seas_4 = p_o3 + 17 | ||
integer, parameter :: p_nh3 = p_o3 + 19 | ||
integer, parameter :: p_nh4a = p_o3 + 20 | ||
integer, parameter :: p_no3an1 = p_o3 + 21 | ||
integer, parameter :: p_no3an2 = p_o3 + 22 | ||
integer, parameter :: p_no3an3 = p_o3 + 23 | ||
! - diagnostic section (not advected) | ||
integer, parameter :: p_pm25 = p_o3 + 24 | ||
integer, parameter :: p_pm10 = p_o3 + 25 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perhaps consider using a Fortran enumerator instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah - I now see this was just a move. But probably still worth considering.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tclune - agreed. This should not be hardcoded and will hopefully be overhauled soon, perhaps using GFTL maps.
Are enumerators fully supported across Fortran compilers?
pm25 = q(i,j,k,p_bc_1) + q(i,j,k,p_bc_2) & | ||
+ q(i,j,k,p_oc_1) + q(i,j,k,p_oc_2) & | ||
+ q(i,j,k,p_dust_1) & | ||
+ q(i,j,k,p_seas_1) + q(i,j,k,p_seas_2) & | ||
+ w_so4 * q(i,j,k,p_sulf) & | ||
+ w_no3 * q(i,j,k,p_no3an1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- @gmao-esherman Would this work if one or more aerosol types are disabled, dust for example?
- @gmao-esherman I would expect that the PM diagnostics is calculated using only the active aerosols, is this the case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is all under ESMF/UFS (NOAA stuff). Nothing under ESMF/UFS gets exercised by legacy GOCART or GOCART2G when we (NASA/GMAO) build or run GEOS.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gmao-esherman Why are we asked to review it then, just a formality?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@adarmenov, @gmao-esherman - Good point. As long as all required aerosol tracers are included in the atmospheric model, the PM computation will not be affected by one or more aerosol types being disabled. More flexibility might be added in the future.
real(ESMF_KIND_R8), parameter :: w_du2 = log(1.250_ESMF_KIND_R8) / log(1.8_ESMF_KIND_R8) | ||
real(ESMF_KIND_R8), parameter :: w_du4 = log(1.667_ESMF_KIND_R8) / log(2.0_ESMF_KIND_R8) | ||
real(ESMF_KIND_R8), parameter :: w_ss3 = log(2.50_ESMF_KIND_R8) / log(3._ESMF_KIND_R8) | ||
real(ESMF_KIND_R8), parameter :: w_so4 = 132.14_ESMF_KIND_R8 / 96.06_ESMF_KIND_R8 | ||
real(ESMF_KIND_R8), parameter :: w_no3 = 80.043_ESMF_KIND_R8 / 62.0_ESMF_KIND_R8 | ||
real(ESMF_KIND_R8), parameter :: w25_no3an2 = 0.138_ESMF_KIND_R8 * w_no3 | ||
real(ESMF_KIND_R8), parameter :: w10_no3an2 = 0.808_ESMF_KIND_R8 * w_no3 | ||
real(ESMF_KIND_R8), parameter :: w10_no3an3 = 0.164_ESMF_KIND_R8 * w_no3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is r8 really necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@adarmenov - no. However, PM2.5 and PM10 are computed using tracer mixing ratios stored in an ESMF_TYPEKIND_R8
coupling field, so ESMF_KIND_R8
is being used for consistency.
@adarmenov I'm trying to fix it so you won't have to review. Currently the CODEOWNERS file has you and Elliot reviewing changes anywhere under GOCART. This one file should be managed separately. Hopefully soon, but you just know it will happen after the last change needed by NOAA. |
Huh. How did @adarmenov get tagged on this. The CODEOWNER says:
Maybe I got this wrong... |
I don't use enumerators much, but the C-interoperability stuff is "easy" and I've not heard of any bug reports in that direction. F202x will hopefully have a much more useful type of enumerator, as these are rather limited. |
Certainly they are supported by all compilers that support current MAPL. |
This PR introduces changes to the UFS/NUOPC cap to compute and export total diagnostic PM2.5 and PM10 for the UFS weather model. These quantities are computed according to formulas provided by @amdasilva.
The changes have been tested within UFS-GOCART on NOAA's Hera platform.