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

release/public-v2: b4b reproducibility for restart runs #246

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ccpp/physics
Submodule physics updated 56 files
+1 −1 physics/GFS_GWD_generic.F90
+2 −2 physics/GFS_MP_generic.F90
+4 −5 physics/GFS_rad_time_vary.fv3.F90
+2 −3 physics/GFS_rrtmg_post.F90
+3 −4 physics/GFS_rrtmg_pre.F90
+3 −4 physics/GFS_rrtmg_setup.F90
+2 −4 physics/GFS_stochastics.F90
+1 −0 physics/GFS_surface_generic.F90
+2 −1 physics/GFS_time_vary_pre.fv3.F90
+1 −3 physics/cires_ugwp.F90
+2 −3 physics/cires_ugwp_post.F90
+0 −339 physics/docs/ccpp_dox
+2 −16 physics/docs/ccpp_dox_layout.xml
+0 −463 physics/docs/ccpp_doxyfile
+0 −439 physics/docs/ccppv3_doxyfile
+0 −441 physics/docs/ccppv3_fv3_doxyfile
+40 −31 physics/docs/ccppv5_doxyfile
+ physics/docs/img/MYNN-SFCLAY_call_order.png
+ physics/docs/img/mesocam.png
+379 −252 physics/docs/library.bib
+1 −2 physics/docs/pdftxt/CPT_adv_suite.txt
+2 −2 physics/docs/pdftxt/CU_GF_deep.txt
+0 −14 physics/docs/pdftxt/GFS_NOAHMP.txt
+0 −9 physics/docs/pdftxt/GFS_SAMF.txt
+1 −1 physics/docs/pdftxt/GFS_UGWPv0.txt
+259 −103 physics/docs/pdftxt/GFSv15p2_suite.txt
+238 −139 physics/docs/pdftxt/GFSv16beta_suite.txt
+5 −6 physics/docs/pdftxt/GSD_adv_suite.txt
+10 −10 physics/docs/pdftxt/MYNN_EDMF.txt
+52 −0 physics/docs/pdftxt/MYNN_SFCLAYER.txt
+23 −0 physics/docs/pdftxt/RRFS_SGSCLOUD.txt
+210 −0 physics/docs/pdftxt/RRFS_v1alpha_suite.txt
+3 −3 physics/docs/pdftxt/RUCLSM.txt
+3 −3 physics/docs/pdftxt/THOMPSON.txt
+102 −89 physics/docs/pdftxt/all_shemes_list.txt
+20 −13 physics/docs/pdftxt/mainpage.txt
+5 −3 physics/docs/pdftxt/suite_FV3_GFS_v15p2.xml.txt
+1 −1 physics/docs/pdftxt/suite_FV3_GFS_v15p2_no_nsst.xml.txt
+1 −1 physics/docs/pdftxt/suite_FV3_GFS_v16beta.xml.txt
+1 −1 physics/docs/pdftxt/suite_FV3_GFS_v16beta_no_nsst.xml.txt
+91 −0 physics/docs/pdftxt/suite_FV3_RRFS_v1beta.xml.txt
+411 −312 physics/docs/pdftxt/suite_input.nml.txt
+1 −1 physics/module_MYNNSFC_wrapper.F90
+2 −3 physics/module_SGSCloud_RadPre.F90
+1 −1 physics/module_gfdl_cloud_microphys.F90
+53 −37 physics/module_sf_mynn.F90
+88 −75 physics/module_sf_noahmplsm.f90
+0 −5 physics/radiation_aerosols.f
+2 −2 physics/radiation_clouds.f
+3 −4 physics/rrtmg_lw_post.F90
+3 −3 physics/rrtmg_lw_pre.F90
+4 −4 physics/rrtmg_sw_post.F90
+2 −3 physics/rrtmg_sw_pre.F90
+5 −5 physics/satmedmfvdifq.F
+5 −16 physics/sfc_noahmp_drv.f
+0 −17 physics/sfcsub.F
61 changes: 59 additions & 2 deletions gfsphysics/GFS_layer/GFS_restart.F90
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,11 @@ subroutine GFS_restart_populate (Restart, Model, Statein, Stateout, Sfcprop, &
if (Model%imfdeepcnv == 3) then
Restart%num2d = Restart%num2d + 1
endif
! RUC
! NoahMP
if (Model%lsm == Model%lsm_noahmp) then
Restart%num2d = Restart%num2d + 10
endif
! RUC
if (Model%lsm == Model%lsm_ruc) then
Restart%num2d = Restart%num2d + 5
endif
Expand Down Expand Up @@ -195,7 +199,60 @@ subroutine GFS_restart_populate (Restart, Model, Statein, Stateout, Sfcprop, &
Restart%data(nb,num)%var2p => Sfcprop(nb)%conv_act(:)
enddo
endif
! RUC
! NoahMP
if (Model%lsm == Model%lsm_noahmp) then
num = num + 1
Restart%name2d(num) = 'noahmp_2d_raincprv'
do nb = 1,nblks
Restart%data(nb,num)%var2p => Sfcprop(nb)%raincprv(:)
enddo
num = num + 1
Restart%name2d(num) = 'noahmp_2d_rainncprv'
do nb = 1,nblks
Restart%data(nb,num)%var2p => Sfcprop(nb)%rainncprv(:)
enddo
num = num + 1
Restart%name2d(num) = 'noahmp_2d_iceprv'
do nb = 1,nblks
Restart%data(nb,num)%var2p => Sfcprop(nb)%iceprv(:)
enddo
num = num + 1
Restart%name2d(num) = 'noahmp_2d_snowprv'
do nb = 1,nblks
Restart%data(nb,num)%var2p => Sfcprop(nb)%snowprv(:)
enddo
num = num + 1
Restart%name2d(num) = 'noahmp_2d_graupelprv'
do nb = 1,nblks
Restart%data(nb,num)%var2p => Sfcprop(nb)%graupelprv(:)
enddo
num = num + 1
Restart%name2d(num) = 'noahmp_2d_draincprv'
do nb = 1,nblks
Restart%data(nb,num)%var2p => Sfcprop(nb)%draincprv(:)
enddo
num = num + 1
Restart%name2d(num) = 'noahmp_2d_drainncprv'
do nb = 1,nblks
Restart%data(nb,num)%var2p => Sfcprop(nb)%drainncprv(:)
enddo
num = num + 1
Restart%name2d(num) = 'noahmp_2d_diceprv'
do nb = 1,nblks
Restart%data(nb,num)%var2p => Sfcprop(nb)%diceprv(:)
enddo
num = num + 1
Restart%name2d(num) = 'noahmp_2d_dsnowprv'
do nb = 1,nblks
Restart%data(nb,num)%var2p => Sfcprop(nb)%dsnowprv(:)
enddo
num = num + 1
Restart%name2d(num) = 'noahmp_2d_dgraupelprv'
do nb = 1,nblks
Restart%data(nb,num)%var2p => Sfcprop(nb)%dgraupelprv(:)
enddo
endif
! RUC
if (Model%lsm == Model%lsm_ruc) then
num = num + 1
Restart%name2d(num) = 'ruc_2d_raincprv'
Expand Down
81 changes: 50 additions & 31 deletions io/FV3GFS_io.F90
Original file line number Diff line number Diff line change
Expand Up @@ -955,11 +955,11 @@ subroutine sfc_prop_restart_read (Sfcprop, Atm_block, Model, fv_domain)
endif
#endif
!--- register the 3D fields
if (Model%frac_grid) then
! if (Model%frac_grid) then
sfc_name3(0) = 'tiice'
var3_p => sfc_var3ice(:,:,:)
id_restart = register_restart_field(Sfc_restart, fn_srf, sfc_name3(0), var3_p, domain=fv_domain, mandatory=.false.)
end if
! end if

do num = 1,nvar_s3
var3_p => sfc_var3(:,:,:,num)
Expand Down Expand Up @@ -1077,16 +1077,16 @@ subroutine sfc_prop_restart_read (Sfcprop, Atm_block, Model, fv_domain)

if (Sfcprop(nb)%lakefrac(ix) > zero) then
Sfcprop(nb)%oceanfrac(ix) = zero ! lake & ocean don't coexist in a cell
if (Sfcprop(nb)%fice(ix) < Model%min_lakeice) then
Sfcprop(nb)%fice(ix) = zero
if (Sfcprop(nb)%slmsk(ix) == 2) Sfcprop(nb)%slmsk(ix) = 0
endif
! if (Sfcprop(nb)%fice(ix) < Model%min_lakeice) then
Copy link
Collaborator

Choose a reason for hiding this comment

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

May I ask if these statements commented out are required for b4 restart reproducibility? I am curious why this change is required as it might indicate the fice could be <min_lakeice in restart run.

Copy link
Contributor

Choose a reason for hiding this comment

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

I guess this question is for Dom.
(this code in my branch is slightly different; it never made it to the dev version).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I copied over the exact changes that were made in PRs #178 and #212 for develop. I don't think we should try to do something different here than what was done for develop (and what took us - well, actually Moorthi - months to figure out when we finalized the GFS v16 prod equivalent in develop). Please see these two PRs.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I guess this question is for Dom.
(this code in my branch is slightly different; it never made it to the dev version).

Forgot to say, the code changes in this PR are from you originally - as you said, your slightly different version never made it to develop at that time, I remember those back and forth conversations quite well.

! Sfcprop(nb)%fice(ix) = zero
! if (Sfcprop(nb)%slmsk(ix) == 2) Sfcprop(nb)%slmsk(ix) = 0
! endif
else
Sfcprop(nb)%oceanfrac(ix) = one - Sfcprop(nb)%landfrac(ix)
if (Sfcprop(nb)%fice(ix) < Model%min_seaice) then
Sfcprop(nb)%fice(ix) = zero
if (Sfcprop(nb)%slmsk(ix) == 2) Sfcprop(nb)%slmsk(ix) = 0
endif
! if (Sfcprop(nb)%fice(ix) < Model%min_seaice) then
! Sfcprop(nb)%fice(ix) = zero
! if (Sfcprop(nb)%slmsk(ix) == 2) Sfcprop(nb)%slmsk(ix) = 0
! endif
endif
!
!--- NSSTM variables
Expand Down Expand Up @@ -1357,28 +1357,47 @@ subroutine sfc_prop_restart_read (Sfcprop, Atm_block, Model, fv_domain)
enddo
enddo
else
if( Model%phour < 1.e-7) then
!$omp parallel do default(shared) private(nb, ix, tem)
do nb = 1, Atm_block%nblks
do ix = 1, Atm_block%blksz(nb)
do nb = 1, Atm_block%nblks
do ix = 1, Atm_block%blksz(nb)
!--- specify tsfcl/zorll/zorli from existing variable tsfco/zorlo
! Sfcprop(nb)%tsfcl(ix) = Sfcprop(nb)%tsfco(ix)
! Sfcprop(nb)%zorll(ix) = Sfcprop(nb)%zorlo(ix)
! Sfcprop(nb)%zorli(ix) = Sfcprop(nb)%zorlo(ix)
! Sfcprop(nb)%zorl(ix) = Sfcprop(nb)%zorlo(ix)
if (Sfcprop(nb)%slmsk(ix) == 1) then
Sfcprop(nb)%zorl(ix) = Sfcprop(nb)%zorll(ix)
Sfcprop(nb)%tsfc(ix) = Sfcprop(nb)%tsfcl(ix)
else
tem = one - Sfcprop(nb)%fice(ix)
Sfcprop(nb)%zorl(ix) = Sfcprop(nb)%zorli(ix) * Sfcprop(nb)%fice(ix) &
+ Sfcprop(nb)%zorlo(ix) * tem
Sfcprop(nb)%tsfc(ix) = Sfcprop(nb)%tisfc(ix) * Sfcprop(nb)%fice(ix) &
+ Sfcprop(nb)%tsfco(ix) * tem
endif
enddo
enddo
else
!$omp parallel do default(shared) private(nb, ix, tem)
do nb = 1, Atm_block%nblks
do ix = 1, Atm_block%blksz(nb)
!--- specify tsfcl/zorll/zorli from existing variable tsfco/zorlo
! Sfcprop(nb)%tsfcl(ix) = Sfcprop(nb)%tsfco(ix)
! Sfcprop(nb)%zorll(ix) = Sfcprop(nb)%zorlo(ix)
! Sfcprop(nb)%zorli(ix) = Sfcprop(nb)%zorlo(ix)
! Sfcprop(nb)%zorl(ix) = Sfcprop(nb)%zorlo(ix)
! Sfcprop(nb)%tsfc(ix) = Sfcprop(nb)%tsfco(ix)
if (Sfcprop(nb)%slmsk(ix) == 1) then
Sfcprop(nb)%zorl(ix) = Sfcprop(nb)%zorll(ix)
Sfcprop(nb)%tsfc(ix) = Sfcprop(nb)%tsfcl(ix)
else
tem = one - Sfcprop(nb)%fice(ix)
Sfcprop(nb)%zorl(ix) = Sfcprop(nb)%zorli(ix) * Sfcprop(nb)%fice(ix) &
+ Sfcprop(nb)%zorlo(ix) * tem

Sfcprop(nb)%tsfc(ix) = Sfcprop(nb)%tisfc(ix) * Sfcprop(nb)%fice(ix) &
+ Sfcprop(nb)%tsfco(ix) * tem
endif
Sfcprop(nb)%tsfc(ix) = Sfcprop(nb)%tsfco(ix)
if (Sfcprop(nb)%slmsk(ix) == 1) then
Sfcprop(nb)%zorl(ix) = Sfcprop(nb)%zorll(ix)
Sfcprop(nb)%tsfc(ix) = Sfcprop(nb)%tsfcl(ix)
else
tem = one - Sfcprop(nb)%fice(ix)
Sfcprop(nb)%zorl(ix) = Sfcprop(nb)%zorli(ix) * Sfcprop(nb)%fice(ix) &
+ Sfcprop(nb)%zorlo(ix) * tem
if (Sfcprop(nb)%fice(ix) > min(Model%min_seaice,Model%min_lakeice)) then
climbfuji marked this conversation as resolved.
Show resolved Hide resolved
Sfcprop(nb)%tsfc(ix) = Sfcprop(nb)%tsfcl(ix)
endif
endif
enddo
enddo
enddo
endif
endif ! if (Model%frac_grid)

!#ifdef CCPP
Expand Down Expand Up @@ -1959,11 +1978,11 @@ subroutine sfc_prop_restart_write (Sfcprop, Atm_block, Model, fv_domain, timesta
#endif

!--- register the 3D fields
if (Model%frac_grid) then
! if (Model%frac_grid) then
sfc_name3(0) = 'tiice'
var3_p => sfc_var3ice(:,:,:)
id_restart = register_restart_field(Sfc_restart, fn_srf, sfc_name3(0), var3_p, domain=fv_domain)
endif
! endif

do num = 1,nvar3
var3_p => sfc_var3(:,:,:,num)
Expand Down