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

Compute and export total PM2.5 and PM10 for UFS #40

Merged
merged 6 commits into from
Mar 23, 2021
Merged

Conversation

rmontuoro
Copy link
Contributor

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.

@rmontuoro rmontuoro added 0 diff The changes in this pull request have verified to be zero-diff with the target branch. enhancement New feature or request labels Mar 22, 2021
@rmontuoro rmontuoro self-assigned this Mar 22, 2021
@mathomp4
Copy link
Member

Whoops! Looks like I need to make some surgery on the CI. Give me a moment or two...

@mathomp4
Copy link
Member

@rmontuoro I'm throwing a blocker label on this until I get the CI fixed. That'll need a pull from main due to #41. Note: this will also add the Changelog enforcer (like you've seen in MAPL). I've been lax in adding that.

@mathomp4 mathomp4 added the Contingent - DNA Do Not Approve (DNA). These changes are contingent on other PRs label Mar 22, 2021
Comment on lines +43 to +69
! 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
Copy link
Contributor

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?

Copy link
Contributor

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.

Copy link
Contributor Author

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?

tclune
tclune previously approved these changes Mar 22, 2021
gmao-esherman
gmao-esherman previously approved these changes Mar 22, 2021
Comment on lines +790 to +795
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)

Choose a reason for hiding this comment

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

  1. @gmao-esherman Would this work if one or more aerosol types are disabled, dust for example?
  2. @gmao-esherman I would expect that the PM diagnostics is calculated using only the active aerosols, is this the case?

Copy link
Contributor

@gmao-esherman gmao-esherman Mar 22, 2021

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.

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?

Copy link
Contributor

Choose a reason for hiding this comment

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

Good question. I am not 100% sure why. I think any changes made to the @gocart repository have to get reviewed by someone. Maybe @tclune has some more insight.

Copy link
Contributor Author

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.

Comment on lines +739 to +746
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

Choose a reason for hiding this comment

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

Is r8 really necessary?

Copy link
Contributor Author

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.

@tclune
Copy link
Contributor

tclune commented Mar 22, 2021

@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.

@mathomp4
Copy link
Member

@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:

/ESMF/UFS/              @tclune @weiyuan-jiang

Maybe I got this wrong...

@tclune
Copy link
Contributor

tclune commented Mar 22, 2021

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.

@tclune
Copy link
Contributor

tclune commented Mar 22, 2021

Certainly they are supported by all compilers that support current MAPL.

@rmontuoro rmontuoro dismissed stale reviews from gmao-esherman and tclune via 146b666 March 22, 2021 23:42
@rmontuoro rmontuoro requested a review from a team as a code owner March 22, 2021 23:42
@tclune tclune merged commit 62059f8 into develop Mar 23, 2021
@mathomp4 mathomp4 deleted the feature/pm branch August 11, 2021 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 diff The changes in this pull request have verified to be zero-diff with the target branch. Contingent - DNA Do Not Approve (DNA). These changes are contingent on other PRs enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants