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

Added coupling of GOCART aerosols with the RRTMG scheme and the Thompson scheme #910

Merged
merged 15 commits into from
Jul 5, 2022

Conversation

ChunxiZhang-NOAA
Copy link
Collaborator

@ChunxiZhang-NOAA ChunxiZhang-NOAA commented Apr 26, 2022

This PR includes two parts:
(1) The coupling of GOCART aerosols with the RRTMG radiation scheme was implemented by Anning Cheng at EMC. The issue is described Issue#899.

(2) The large scale wet deposition was implemented into the Thompson scheme. When coupling with GOCART aerosols, the wet deposition is included in the Thompson scheme. The testing results can be file here. This work is related to NCAR/ccpp-physics issue#912 and ufs-weather-model issue#1191.

@AnningCheng-NOAA
Copy link
Collaborator

two more files needed to modified are GFS_typedefs.F90 and GFS_typedefs.meta at ccpp/data. Please also noted that the files needed to added and changed for regression tests for rad_grt_atm_aerosols.

@ChunxiZhang-NOAA
Copy link
Collaborator Author

two more files needed to modified are GFS_typedefs.F90 and GFS_typedefs.meta at ccpp/data. Please also noted that the files needed to added and changed for regression tests for rad_grt_atm_aerosols.

@AnningCheng-NOAA Please check here for GF_typedefs.* files. And check here for regression tests related changes.

@AnningCheng-NOAA
Copy link
Collaborator

looks good to me. Approved

@AnningCheng-NOAA
Copy link
Collaborator

reopened

@AnningCheng-NOAA
Copy link
Collaborator

I have put the passing aerosol mixing ratio before calling "aetaer" in GFS_rrtmg_pre.F90. The idea is to obtain the value the earliest in the physical processes, so the same value for all processes.

@ChunxiZhang-NOAA
Copy link
Collaborator Author

I have put the passing aerosol mixing ratio before calling "aetaer" in GFS_rrtmg_pre.F90. The idea is to obtain the value the earliest in the physical processes, so the same value for all processes.

Sounds good. Please let me know when your code is ready.

@AnningCheng-NOAA
Copy link
Collaborator

AnningCheng-NOAA commented Apr 26, 2022 via email

@AnningCheng-NOAA
Copy link
Collaborator

AnningCheng-NOAA commented Apr 27, 2022 via email

@AnningCheng-NOAA
Copy link
Collaborator

Looks good by passing the aerosol mixing ratios to radiation before "setaer". Approved again. I am happy to take any suggestions improving the code.

@ligiabernardet ligiabernardet added this to In progress in CCPP v6 public release Apr 27, 2022
@ligiabernardet ligiabernardet removed this from In progress - a PR has been submitted in CCPP v6 public release May 4, 2022
@@ -96,7 +98,7 @@ subroutine GFS_phys_time_vary_init (
real(kind_phys), intent(in) :: ozpl(:,:,:), h2opl(:,:,:)
integer, intent(inout) :: jindx1_aer(:), jindx2_aer(:), iindx1_aer(:), iindx2_aer(:)
real(kind_phys), intent(inout) :: ddy_aer(:), ddx_aer(:)
real(kind_phys), intent(in) :: aer_nm(:,:,:)
real(kind_phys), intent(out) :: aer_nm(:,:,:)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is aer_nm initialized in this subroutine unconditionally? If not, the intent should be inout.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@ChunxiZhang-NOAA Since this is on your fork, could you please change this intent to inout here and in the metadata if you agree with Anning and I?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Changed intent of aer_nm to out. Only initialized this variable with 1.e-20 conditionally in this subroutine.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The best practice is inout. For now, out seems work too.

dimensions = (horizontal_dimension,vertical_layer_dimension,number_of_aerosol_tracers_MG)
type = real
kind = kind_phys
intent = in
intent = out
Copy link
Collaborator

Choose a reason for hiding this comment

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

Reminder to change intent to inout if this variable is not unconditionally initialized in the subroutine.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Changed it to out.

@grantfirl
Copy link
Collaborator

Looks good to me. I'm waiting to approve once my minor question is answered/addressed.

@AnningCheng-NOAA
Copy link
Collaborator

AnningCheng-NOAA commented May 5, 2022 via email

endif
ntrcaer = ntrcaerm
call read_aerdata (me,master,iflip,idate,errmsg,errflg)
else if(iaermdl ==2 ) then
Copy link
Collaborator

Choose a reason for hiding this comment

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

The default iaermdl hardwired in physparam is 0, i.e.,seasonal global OPAC aerosol, climatology. Did you consider using iaermdl as a namelist control variable?

Copy link
Collaborator

Choose a reason for hiding this comment

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

It looks like coupled gocart is not initialized since iaerclm=.false. and iaermdl =0 by current config.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

iaermdl is controlled by namelist option iaer.

@grantfirl
Copy link
Collaborator

Does anyone know whether it has been decided if this needs to go in the upcoming release or not?

@ChunxiZhang-NOAA
Copy link
Collaborator Author

Not for P8C. It is for P8.1.

Copy link
Contributor

@rmontuoro rmontuoro left a comment

Choose a reason for hiding this comment

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

Computation of Thompson's 3D liquid water and ice fluxes need to be revised.

physics/module_mp_thompson.F90 Outdated Show resolved Hide resolved
@@ -589,6 +594,10 @@ subroutine mp_thompson_run(ncol, nlev, con_g, con_rd, &
kde = nlev
kme = nlev
kte = nlev
if (reset_diag3d) then
Copy link
Contributor

Choose a reason for hiding this comment

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

GOCART requires instantaneous three-dimensional liquid water (pfl_lsan) and ice fluxes (pfi_lsan). These quantities must be reset to zero at each physics time step. They should not be reset at the same time as Thompson's extended diagnostic quantities.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@rmontuoro Has this problem been fixed? The PR is ready for merge, but I haven't seen any confirmation from you yet.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This problem was solved. We removed reset_diag3d. pfl_lsan and pfi_lsan are instantaneous variables.

@AnningCheng-NOAA
Copy link
Collaborator

AnningCheng-NOAA commented Jun 3, 2022 via email

@yangfanglin
Copy link
Collaborator

@AnningCheng-NOAA please add link here to the ppt that describes the 7 different approaches. I think what Raffaele pointed out does make sense. Tendencies cannot be accumulated. We need to use either 1) instantaneous tendencies or 2) accumulated increments and then converted them to tendencies.

@AnningCheng-NOAA
Copy link
Collaborator

AnningCheng-NOAA commented Jun 3, 2022 via email

@zhanglikate
Copy link

zhanglikate commented Jun 3, 2022

@AnningCheng-NOAA @yangfanglin @rmontuoro @bbakernoaa this is the link for v6 (v5 is the same as v6), v7: https://docs.google.com/presentation/d/1MfBouZh9kdYCJt1jquCCK_pBhLwDLgOd/edit#slide=id.g12cc3692d5c_0_0 ,

It looks like there is no large scale wet deposition. I don't think this looks reasonable, too.

Kate

@zhanglikate
Copy link

zhanglikate commented Jun 3, 2022

@AnningCheng-NOAA please add link here to the ppt that describes the 7 different approaches. I think what Raffaele pointed out does make sense. Tendencies cannot be accumulated. We need to use either 1) instantaneous tendencies or 2) accumulated increments and then converted them to tendencies.

@yangfanglin @rmontuoro @bbakernoaa @AnningCheng-NOAA

I am trying a test only using the instantaneous tendencies, let's see how the results would be.

Here I am using:
pfi_lsan(i,k) = pfil1(k)*rho(k)*dz1d(k)
pfl_lsan(i,k) = pfll1(k)*rho(k)*dz1d(k)

I also deleted "if (reset_diag3d) then", to get the pfi_lsan initialized every time step.

@ChunxiZhang-NOAA
Copy link
Collaborator Author

@AnningCheng-NOAA @zhanglikate @yangfanglin @bbakernoaa @rmontuoro Since the Thompson scheme has inner loop, the best practice is probably using (tendency1 * dt1 + tendency2 * dt2...)/(dt1+dt2...); dt_atmos = dt1+dt2+... to get the instantaneous tendencies at the dt_atmos time step. Please see the code in my directory:/scratch1/NCEPDEV/hwrf/save/Chunxi.Zhang/tmp/chunxi/ufs-weather-model.test

@AnningCheng-NOAA
Copy link
Collaborator

AnningCheng-NOAA commented Jun 7, 2022 via email

@ligiabernardet ligiabernardet removed the CCPP v6 Needed for CCPP v6 public release label Jun 7, 2022
@ligiabernardet ligiabernardet removed this from In progress - a PR has been submitted in CCPP v6 public release Jun 9, 2022
Copy link
Collaborator

@SamuelTrahanNOAA SamuelTrahanNOAA left a comment

Choose a reason for hiding this comment

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

This crashes due to an error on line 601 of mp_thompson.F90 where the code assigns to an unallocated array.

physics/mp_thompson.F90 Outdated Show resolved Hide resolved
@SamuelTrahanNOAA
Copy link
Collaborator

@ChunxiZhang-NOAA Please respond to comments in this PR before it is merged.

@AnningCheng-NOAA
Copy link
Collaborator

AnningCheng-NOAA commented Oct 11, 2022 via email

@AnningCheng-NOAA
Copy link
Collaborator

AnningCheng-NOAA commented Oct 11, 2022 via email

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.

None yet