-
Notifications
You must be signed in to change notification settings - Fork 155
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
Conversation
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. |
looks good to me. Approved |
reopened |
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. |
Chunxi,
the code is ready now
at /scratch2/NCEPDEV/climate/Anning.Cheng/ufs-weather-model/FV3/ccpp/physics/physics
GFGFS_rrtmg_pre.meta
GFS_rrtmg_pre.meta
There is no changes needed in *PBL* files.
Anning
…On Tue, Apr 26, 2022 at 5:08 PM ChunxiZhang-NOAA ***@***.***> wrote:
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.
—
Reply to this email directly, view it on GitHub
<#910 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALQPMILWGFAFDXH5P5EH5LLVHBLMLANCNFSM5UL22TUQ>
.
You are receiving this because you modified the open/close state.Message
ID: ***@***.***>
|
There is a typo in the last Email. GFS_rrtmg_pre.F90 instead of
GFGFS_rrtmg_pre.meta.
On Tue, Apr 26, 2022 at 5:14 PM Anning Cheng - NOAA Affiliate <
***@***.***> wrote:
… Chunxi,
the code is ready now
at /scratch2/NCEPDEV/climate/Anning.Cheng/ufs-weather-model/FV3/ccpp/physics/physics
GFGFS_rrtmg_pre.meta
GFS_rrtmg_pre.meta
There is no changes needed in *PBL* files.
Anning
On Tue, Apr 26, 2022 at 5:08 PM ChunxiZhang-NOAA ***@***.***>
wrote:
> 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.
>
> —
> Reply to this email directly, view it on GitHub
> <#910 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ALQPMILWGFAFDXH5P5EH5LLVHBLMLANCNFSM5UL22TUQ>
> .
> You are receiving this because you modified the open/close state.Message
> ID: ***@***.***>
>
|
Looks good by passing the aerosol mixing ratios to radiation before "setaer". Approved again. I am happy to take any suggestions improving the code. |
@@ -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(:,:,:) |
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 aer_nm initialized in this subroutine unconditionally? If not, the intent should be inout.
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.
@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?
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.
Changed intent of aer_nm to out. Only initialized this variable with 1.e-20 conditionally in this subroutine.
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.
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 |
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.
Reminder to change intent to inout if this variable is not unconditionally initialized in the subroutine.
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.
Changed it to out.
Looks good to me. I'm waiting to approve once my minor question is answered/addressed. |
Grant, please change it to input.
…On Thu, May 5, 2022 at 10:37 AM Grant Firl ***@***.***> wrote:
Looks good to me. I'm waiting to approve once my minor question is
answered/addressed.
—
Reply to this email directly, view it on GitHub
<#910 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALQPMIO6PYJHDDMEFBPWHK3VIPMJNANCNFSM5UL22TUQ>
.
You are receiving this because you modified the open/close state.Message
ID: ***@***.***>
|
endif | ||
ntrcaer = ntrcaerm | ||
call read_aerdata (me,master,iflip,idate,errmsg,errflg) | ||
else if(iaermdl ==2 ) then |
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.
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?
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.
It looks like coupled gocart is not initialized since iaerclm=.false. and iaermdl =0 by current config.
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.
iaermdl is controlled by namelist option iaer.
No. It controlled by iaer.
…On Thu, May 5, 2022 at 11:02 AM mzhangw ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In physics/GFS_phys_time_vary.fv3.F90
<#910 (comment)>:
> - if (size(aer_nm, dim=3).ne.ntrcaerm) then
- write(errmsg,'(2a,i0,a,i0)') "Value error in GFS_phys_time_vary_init: ", &
- "ntrcaerm from aerclm_def does not match value in GFS_typedefs.F90: ", &
- ntrcaerm, " /= ", size(aer_nm, dim=3)
- errflg = 1
- else
- ! Update the value of ntrcaer in aerclm_def with the value defined
- ! in GFS_typedefs.F90 that is used to allocate the Tbd DDT.
- ! If iaerclm is .true., then ntrcaer == ntrcaerm
- ntrcaer = size(aer_nm, dim=3)
- ! Read aerosol climatology
- call read_aerdata (me,master,iflip,idate,errmsg,errflg)
- endif
+ ntrcaer = ntrcaerm
+ call read_aerdata (me,master,iflip,idate,errmsg,errflg)
+ else if(iaermdl ==2 ) then
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?
—
Reply to this email directly, view it on GitHub
<#910 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALQPMIMJBHKVBBKRSOJBNWTVIPPIVANCNFSM5UL22TUQ>
.
You are receiving this because you modified the open/close state.Message
ID: ***@***.***>
|
@@ -599,6 +605,29 @@ subroutine GFS_rrtmg_pre_run (im, levs, lm, lmk, lmp, n_var_lndp, & | |||
|
|||
!check print *,' in grrad : calling setaer ' | |||
|
|||
if (ntchm>0 .and. iaermdl==2) then |
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 change needs to be added to RRTMGP.
https://github.com/NCAR/ccpp-physics/blob/main/physics/rrtmgp_aerosol_optics.F90#L83
Does anyone know whether it has been decided if this needs to go in the upcoming release or not? |
Not for P8C. It is for P8.1. |
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.
Computation of Thompson's 3D liquid water and ice fluxes need to be revised.
physics/mp_thompson.F90
Outdated
@@ -589,6 +594,10 @@ subroutine mp_thompson_run(ncol, nlev, con_g, con_rd, & | |||
kde = nlev | |||
kme = nlev | |||
kte = nlev | |||
if (reset_diag3d) then |
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.
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.
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.
@rmontuoro Has this problem been fixed? The PR is ready for merge, but I haven't seen any confirmation from you yet.
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 problem was solved. We removed reset_diag3d. pfl_lsan and pfi_lsan are instantaneous variables.
@rmontuoro
If using instantaneous values, the results are totally different from
GFDL, which can be seen from Kate's experiments from version 4 and
version 5. This is why I said this approach is unphysical (Version 6/7
does the exact thing as setting ext_diag to true ). I have added Kate to
this loop. I would like Kate to confirm.
…On Fri, Jun 3, 2022 at 11:40 AM Raffaele Montuoro ***@***.***> wrote:
***@***.**** requested changes on this pull request.
Computation of Thompson's 3D liquid water and ice fluxes need to be
revised.
------------------------------
In physics/module_mp_thompson.F90
<#910 (comment)>:
> @@ -1482,6 +1485,8 @@ SUBROUTINE mp_gt_driver(qv, qc, qr, qi, qs, qg, ni, nr, nc, &
qg(i,k,j) = qg1d(k)
ni(i,k,j) = ni1d(k)
nr(i,k,j) = nr1d(k)
+ pfi_lsan(i,k) = pfi_lsan(i,k) + pfil1(k)*rho(k)*dz1d(k)
Liquid water and ice fluxes are time derivatives and cannot be
accumulated. If average values of pfi_lsan and pfl_lsan are required,
accumulation must be performed using increments, not derivatives (*e.g.*,
pfill1(k)*rho(k)*dz1d(k)*dt), then output fluxes computed dividing by the
total time interval (dt1+dt2+...).
------------------------------
In physics/mp_thompson.F90
<#910 (comment)>:
> @@ -589,6 +594,10 @@ subroutine mp_thompson_run(ncol, nlev, con_g, con_rd, &
kde = nlev
kme = nlev
kte = nlev
+ if (reset_diag3d) then
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.
------------------------------
In physics/mp_thompson.F90
<#910 (comment)>:
> @@ -589,6 +594,10 @@ subroutine mp_thompson_run(ncol, nlev, con_g, con_rd, &
kde = nlev
kme = nlev
kte = nlev
+ if (reset_diag3d) then
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.
—
Reply to this email directly, view it on GitHub
<#910 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALQPMIKRJVMM5IEZU74W3SDVNIROLANCNFSM5UL22TUQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@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. |
Kate and Barry, Could you link the slides for the results of the seven
versions of code? I do not have them. version 4 and 5 uses the
instantaneous values.
I have attached the ppt file for seven experiment designs here.
…On Fri, Jun 3, 2022 at 12:21 PM Fanglin Yang ***@***.***> wrote:
@AnningCheng-NOAA <https://github.com/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.
—
Reply to this email directly, view it on GitHub
<#910 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALQPMIITUVU5GB6OQBNJU3LVNIWG5ANCNFSM5UL22TUQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@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 |
@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: I also deleted "if (reset_diag3d) then", to get the pfi_lsan initialized every time step. |
@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 |
Cunxi, It is great that you mentioned the inner loop! All my versions do
include the effects of inner loops and subcycles. Notice that here
dt1=dt2=dt3=... So the code can be simplified.
…On Tue, Jun 7, 2022 at 12:58 AM ChunxiZhang-NOAA ***@***.***> wrote:
@AnningCheng-NOAA <https://github.com/AnningCheng-NOAA> @zhanglikate
<https://github.com/zhanglikate> @yangfanglin
<https://github.com/yangfanglin> @bbakernoaa
<https://github.com/bbakernoaa> @rmontuoro <https://github.com/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
—
Reply to this email directly, view it on GitHub
<#910 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALQPMIKV526DUTEKTEYV5JTVN3JHXANCNFSM5UL22TUQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
… scheme based on test v17 for GOCART coupling
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 crashes due to an error on line 601 of mp_thompson.F90 where the code assigns to an unallocated array.
@ChunxiZhang-NOAA Please respond to comments in this PR before it is merged. |
I mean inout
On Thu, May 5, 2022 at 10:46 AM Anning Cheng - NOAA Affiliate <
***@***.***> wrote:
… Grant, please change it to input.
On Thu, May 5, 2022 at 10:37 AM Grant Firl ***@***.***>
wrote:
> Looks good to me. I'm waiting to approve once my minor question is
> answered/addressed.
>
> —
> Reply to this email directly, view it on GitHub
> <#910 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ALQPMIO6PYJHDDMEFBPWHK3VIPMJNANCNFSM5UL22TUQ>
> .
> You are receiving this because you modified the open/close state.Message
> ID: ***@***.***>
>
|
Please see my comments on PR 926:
#926
…On Fri, Jun 3, 2022 at 1:09 PM Kate.Zhang-NOAA ***@***.***> wrote:
@AnningCheng-NOAA <https://github.com/AnningCheng-NOAA> @yangfanglin
<https://github.com/yangfanglin> @rmontuoro <https://github.com/rmontuoro>
@bbakernoaa <https://github.com/bbakernoaa> this is the link for v5 and
v6:
https://docs.google.com/presentation/d/1waJIrqjBq6MW3HJlg6OSdq3zyUBJElvw/edit#slide=id.p1
,
It looks like there is no large scale wet deposition. I don't think this
looks reasonable, too.
Kate
—
Reply to this email directly, view it on GitHub
<#910 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALQPMIIP3ZAVGOR35GJMR6LVNI355ANCNFSM5UL22TUQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
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.