Skip to content
Closed
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
6 changes: 4 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@
branch = main
[submodule "ccpp/physics"]
path = ccpp/physics
url = https://github.com/ufs-community/ccpp-physics
branch = ufs/dev
#url = https://github.com/ufs-community/ccpp-physics
#branch = ufs/dev
url = https://github.com/climbfuji/ccpp-physics
branch = feature/remove_gfs_int_radphys_reset
[submodule "upp"]
path = upp
url = https://github.com/NOAA-EMC/UPP
Expand Down
2 changes: 0 additions & 2 deletions ccpp/config/ccpp_prebuild_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,6 @@
'physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_cloud_overlap.F90',
'physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_rrtmgp_post.F90',
'physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_stochastics.F90',
'physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_suite_interstitial_rad_reset.F90',
'physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_suite_interstitial_phys_reset.F90',
'physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_suite_interstitial_1.F90',
'physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_suite_interstitial_2.F90',
'physics/physics/Interstitials/UFS_SCM_NEPTUNE/GFS_suite_stateout_reset.F90',
Expand Down
80 changes: 62 additions & 18 deletions ccpp/driver/CCPP_driver.F90
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ module CCPP_driver
cdata_block, &
ccpp_suite, &
GFS_control, &
GFS_Intdiag
GFS_Intdiag, &
GFS_Interstitial

implicit none

Expand Down Expand Up @@ -132,14 +133,22 @@ subroutine CCPP_step (step, nblks, ierr)
return
end if

! call timestep_init for "physics"---required for Land IAU
call ccpp_physics_timestep_init(cdata_domain, suite_name=trim(ccpp_suite),group_name="physics", ierr=ierr)
! call timestep_init for "phys_ps"---required for Land IAU
call ccpp_physics_timestep_init(cdata_domain, suite_name=trim(ccpp_suite),group_name="phys_ps", ierr=ierr)
if (ierr/=0) then
write(0,'(a)') "An error occurred in ccpp_physics_timestep_init for group physics"
write(0,'(a)') "An error occurred in ccpp_physics_timestep_init for group phys_ps"
write(0,'(a)') trim(cdata_domain%errmsg)
return
end if

end if

! call timestep_init for "phys_ts"---required for Land IAU
call ccpp_physics_timestep_init(cdata_domain, suite_name=trim(ccpp_suite),group_name="phys_ts", ierr=ierr)
if (ierr/=0) then
write(0,'(a)') "An error occurred in ccpp_physics_timestep_init for group phys_ts"
write(0,'(a)') trim(cdata_domain%errmsg)
return
end if

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! DH* 20210104 - this block of code will be removed once the CCPP framework !
! fully supports handling diagnostics through its metadata, work in progress !
Expand Down Expand Up @@ -176,8 +185,9 @@ subroutine CCPP_step (step, nblks, ierr)
!$OMP parallel num_threads (nthrds) &
!$OMP default (none) &
!$OMP shared (nblks, nthrdsX, non_uniform_blocks, &
!$OMP cdata_block,ccpp_suite, step) &
!$OMP private (nb,nt,ntX,ierr2) &
!$OMP cdata_block, ccpp_suite, step, &
!$OMP GFS_Control, GFS_Interstitial) &
!$OMP private (nb, nt, ntX, ierr2) &
!$OMP reduction (+:ierr)
#ifdef _OPENMP
nt = omp_get_thread_num()+1
Expand All @@ -194,12 +204,38 @@ subroutine CCPP_step (step, nblks, ierr)
ntX = nt
end if
!--- Call CCPP radiation/physics/stochastics group
call ccpp_physics_run(cdata_block(nb,ntX), suite_name=trim(ccpp_suite), group_name=trim(step), ierr=ierr2)
if (ierr2/=0) then
write(0,'(2a,3(a,i4),a)') "An error occurred in ccpp_physics_run for group ", trim(step), &
", block/chunk ", nb, " and thread ", nt, " (ntX=", ntX, "):"
write(0,'(a)') trim(cdata_block(nb,ntX)%errmsg)
ierr = ierr + ierr2
if (trim(step)=="physics") then
! Reset GFS_Interstitial DDT physics fields for this thread
call GFS_Interstitial(ntX)%phys_reset(GFS_control)
! Process-split physics
call ccpp_physics_run(cdata_block(nb,ntX), suite_name=trim(ccpp_suite), group_name="phys_ps", ierr=ierr2)
if (ierr2/=0) then
write(0,'(2a,3(a,i4),a)') "An error occurred in ccpp_physics_run for group ", "phys_ps", &
", block/chunk ", nb, " and thread ", nt, " (ntX=", ntX, "):"
write(0,'(a)') trim(cdata_block(nb,ntX)%errmsg)
ierr = ierr + ierr2
endif
! Time-split physics
call ccpp_physics_run(cdata_block(nb,ntX), suite_name=trim(ccpp_suite), group_name="phys_ts", ierr=ierr2)
if (ierr2/=0) then
write(0,'(2a,3(a,i4),a)') "An error occurred in ccpp_physics_run for group ", "phys_ts", &
", block/chunk ", nb, " and thread ", nt, " (ntX=", ntX, "):"
write(0,'(a)') trim(cdata_block(nb,ntX)%errmsg)
ierr = ierr + ierr2
endif
else
if (trim(step)=="radiation") then
! Reset GFS_Interstitial DDT radiation fields for this thread
call GFS_Interstitial(ntX)%rad_reset(GFS_control)
end if
! Radiation
call ccpp_physics_run(cdata_block(nb,ntX), suite_name=trim(ccpp_suite), group_name=trim(step), ierr=ierr2)
if (ierr2/=0) then
write(0,'(2a,3(a,i4),a)') "An error occurred in ccpp_physics_run for group ", trim(step), &
", block/chunk ", nb, " and thread ", nt, " (ntX=", ntX, "):"
write(0,'(a)') trim(cdata_block(nb,ntX)%errmsg)
ierr = ierr + ierr2
endif
end if
end do
!$OMP end do
Expand All @@ -222,13 +258,21 @@ subroutine CCPP_step (step, nblks, ierr)
return
end if

! call timestep_finalize for "physics"---required for Land IAU
call ccpp_physics_timestep_finalize(cdata_domain, suite_name=trim(ccpp_suite), group_name="physics", ierr=ierr)
! call timestep_finalize for "phys_ps"---required for Land IAU
call ccpp_physics_timestep_finalize(cdata_domain, suite_name=trim(ccpp_suite), group_name="phys_ps", ierr=ierr)
if (ierr/=0) then
write(0,'(a)') "An error occurred in ccpp_physics_timestep_finalize for group physics"
write(0,'(a)') "An error occurred in ccpp_physics_timestep_finalize for group phys_ps"
write(0,'(a)') trim(cdata_domain%errmsg)
return
end if
end if

! call timestep_finalize for "phys_ts"---required for Land IAU
call ccpp_physics_timestep_finalize(cdata_domain, suite_name=trim(ccpp_suite), group_name="phys_ts", ierr=ierr)
if (ierr/=0) then
write(0,'(a)') "An error occurred in ccpp_physics_timestep_finalize for group phys_ts"
write(0,'(a)') trim(cdata_domain%errmsg)
return
end if

! Physics finalize
else if (trim(step)=="physics_finalize") then
Expand Down
8 changes: 5 additions & 3 deletions ccpp/suites/suite_FV3_GFS_v15_thompson_mynn_lam3km.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
</group>
<group name="radiation">
<subcycle loop="1">
<scheme>GFS_suite_interstitial_rad_reset</scheme>
<scheme>sgscloud_radpre</scheme>
<scheme>GFS_rrtmg_pre</scheme>
<scheme>GFS_radiation_surface</scheme>
Expand All @@ -25,9 +24,8 @@
<scheme>GFS_rrtmg_post</scheme>
</subcycle>
</group>
<group name="physics">
<group name="phys_ps">
<subcycle loop="1">
<scheme>GFS_suite_interstitial_phys_reset</scheme>
<scheme>GFS_suite_stateout_reset</scheme>
<scheme>get_prs_fv3</scheme>
<scheme>GFS_suite_interstitial_1</scheme>
Expand Down Expand Up @@ -59,6 +57,10 @@
<scheme>cires_ugwp_post</scheme>
<scheme>GFS_GWD_generic_post</scheme>
<scheme>GFS_suite_stateout_update</scheme>
</subcycle>
</group>
<group name="phys_ts">
<subcycle loop="1">
<scheme>GFS_photochemistry</scheme>
<scheme>get_phi_fv3</scheme>
<scheme>GFS_suite_interstitial_3</scheme>
Expand Down
8 changes: 5 additions & 3 deletions ccpp/suites/suite_FV3_GFS_v15p2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
</group>
<group name="radiation">
<subcycle loop="1">
<scheme>GFS_suite_interstitial_rad_reset</scheme>
<scheme>GFS_rrtmg_pre</scheme>
<scheme>GFS_radiation_surface</scheme>
<scheme>rad_sw_pre</scheme>
Expand All @@ -28,9 +27,8 @@
<scheme>GFS_rrtmg_post</scheme>
</subcycle>
</group>
<group name="physics">
<group name="phys_ps">
<subcycle loop="1">
<scheme>GFS_suite_interstitial_phys_reset</scheme>
<scheme>GFS_suite_stateout_reset</scheme>
<scheme>get_prs_fv3</scheme>
<scheme>GFS_suite_interstitial_1</scheme>
Expand Down Expand Up @@ -65,6 +63,10 @@
<scheme>cires_ugwp_post</scheme>
<scheme>GFS_GWD_generic_post</scheme>
<scheme>GFS_suite_stateout_update</scheme>
</subcycle>
</group>
<group name="phys_ts">
<subcycle loop="1">
<scheme>GFS_photochemistry</scheme>
<scheme>get_phi_fv3</scheme>
<scheme>GFS_suite_interstitial_3</scheme>
Expand Down
8 changes: 5 additions & 3 deletions ccpp/suites/suite_FV3_GFS_v16.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
</group>
<group name="radiation">
<subcycle loop="1">
<scheme>GFS_suite_interstitial_rad_reset</scheme>
<scheme>GFS_rrtmg_pre</scheme>
<scheme>GFS_radiation_surface</scheme>
<scheme>rad_sw_pre</scheme>
Expand All @@ -28,9 +27,8 @@
<scheme>GFS_rrtmg_post</scheme>
</subcycle>
</group>
<group name="physics">
<group name="phys_ps">
<subcycle loop="1">
<scheme>GFS_suite_interstitial_phys_reset</scheme>
<scheme>GFS_suite_stateout_reset</scheme>
<scheme>get_prs_fv3</scheme>
<scheme>GFS_suite_interstitial_1</scheme>
Expand Down Expand Up @@ -65,6 +63,10 @@
<scheme>cires_ugwp_post</scheme>
<scheme>GFS_GWD_generic_post</scheme>
<scheme>GFS_suite_stateout_update</scheme>
</subcycle>
</group>
<group name="phys_ts">
<subcycle loop="1">
<scheme>GFS_photochemistry</scheme>
<scheme>get_phi_fv3</scheme>
<scheme>GFS_suite_interstitial_3</scheme>
Expand Down
8 changes: 5 additions & 3 deletions ccpp/suites/suite_FV3_GFS_v16_csawmg.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
</group>
<group name="radiation">
<subcycle loop="1">
<scheme>GFS_suite_interstitial_rad_reset</scheme>
<scheme>GFS_rrtmg_pre</scheme>
<scheme>GFS_radiation_surface</scheme>
<scheme>rad_sw_pre</scheme>
Expand All @@ -23,9 +22,8 @@
<scheme>GFS_rrtmg_post</scheme>
</subcycle>
</group>
<group name="physics">
<group name="phys_ps">
<subcycle loop="1">
<scheme>GFS_suite_interstitial_phys_reset</scheme>
<scheme>GFS_suite_stateout_reset</scheme>
<scheme>get_prs_fv3</scheme>
<scheme>GFS_suite_interstitial_1</scheme>
Expand Down Expand Up @@ -60,6 +58,10 @@
<scheme>cires_ugwp_post</scheme>
<scheme>GFS_GWD_generic_post</scheme>
<scheme>GFS_suite_stateout_update</scheme>
</subcycle>
</group>
<group name="phys_ts">
<subcycle loop="1">
<scheme>GFS_photochemistry</scheme>
<scheme>get_phi_fv3</scheme>
<scheme>GFS_suite_interstitial_3</scheme>
Expand Down
8 changes: 5 additions & 3 deletions ccpp/suites/suite_FV3_GFS_v16_flake.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
</group>
<group name="radiation">
<subcycle loop="1">
<scheme>GFS_suite_interstitial_rad_reset</scheme>
<scheme>GFS_rrtmg_pre</scheme>
<scheme>GFS_radiation_surface</scheme>
<scheme>rad_sw_pre</scheme>
Expand All @@ -28,9 +27,8 @@
<scheme>GFS_rrtmg_post</scheme>
</subcycle>
</group>
<group name="physics">
<group name="phys_ps">
<subcycle loop="1">
<scheme>GFS_suite_interstitial_phys_reset</scheme>
<scheme>GFS_suite_stateout_reset</scheme>
<scheme>get_prs_fv3</scheme>
<scheme>GFS_suite_interstitial_1</scheme>
Expand Down Expand Up @@ -66,6 +64,10 @@
<scheme>cires_ugwp_post</scheme>
<scheme>GFS_GWD_generic_post</scheme>
<scheme>GFS_suite_stateout_update</scheme>
</subcycle>
</group>
<group name="phys_ts">
<subcycle loop="1">
<scheme>GFS_photochemistry</scheme>
<scheme>get_phi_fv3</scheme>
<scheme>GFS_suite_interstitial_3</scheme>
Expand Down
8 changes: 5 additions & 3 deletions ccpp/suites/suite_FV3_GFS_v16_fv3wam.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
</group>
<group name="radiation">
<subcycle loop="1">
<scheme>GFS_suite_interstitial_rad_reset</scheme>
<scheme>GFS_rrtmg_pre</scheme>
<scheme>GFS_radiation_surface</scheme>
<scheme>rad_sw_pre</scheme>
Expand All @@ -23,9 +22,8 @@
<scheme>GFS_rrtmg_post</scheme>
</subcycle>
</group>
<group name="physics">
<group name="phys_ps">
<subcycle loop="1">
<scheme>GFS_suite_interstitial_phys_reset</scheme>
<scheme>GFS_suite_stateout_reset</scheme>
<scheme>get_prs_fv3</scheme>
<scheme>GFS_suite_interstitial_1</scheme>
Expand Down Expand Up @@ -58,6 +56,10 @@
<scheme>cires_ugwp_post</scheme>
<scheme>GFS_GWD_generic_post</scheme>
<scheme>GFS_suite_stateout_update</scheme>
</subcycle>
</group>
<group name="phys_ts">
<subcycle loop="1">
<scheme>GFS_photochemistry</scheme>
<scheme>get_phi_fv3</scheme>
<scheme>GFS_suite_interstitial_3</scheme>
Expand Down
8 changes: 5 additions & 3 deletions ccpp/suites/suite_FV3_GFS_v16_ras.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
</group>
<group name="radiation">
<subcycle loop="1">
<scheme>GFS_suite_interstitial_rad_reset</scheme>
<scheme>GFS_rrtmg_pre</scheme>
<scheme>GFS_radiation_surface</scheme>
<scheme>rad_sw_pre</scheme>
Expand All @@ -28,9 +27,8 @@
<scheme>GFS_rrtmg_post</scheme>
</subcycle>
</group>
<group name="physics">
<group name="phys_ps">
<subcycle loop="1">
<scheme>GFS_suite_interstitial_phys_reset</scheme>
<scheme>GFS_suite_stateout_reset</scheme>
<scheme>get_prs_fv3</scheme>
<scheme>GFS_suite_interstitial_1</scheme>
Expand Down Expand Up @@ -65,6 +63,10 @@
<scheme>cires_ugwp_post</scheme>
<scheme>GFS_GWD_generic_post</scheme>
<scheme>GFS_suite_stateout_update</scheme>
</subcycle>
</group>
<group name="phys_ts">
<subcycle loop="1">
<scheme>GFS_photochemistry</scheme>
<scheme>get_phi_fv3</scheme>
<scheme>GFS_suite_interstitial_3</scheme>
Expand Down
8 changes: 5 additions & 3 deletions ccpp/suites/suite_FV3_GFS_v17_coupled_p8.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
</group>
<group name="radiation">
<subcycle loop="1">
<scheme>GFS_suite_interstitial_rad_reset</scheme>
<scheme>GFS_rrtmg_pre</scheme>
<scheme>GFS_radiation_surface</scheme>
<scheme>rad_sw_pre</scheme>
Expand All @@ -23,9 +22,8 @@
<scheme>GFS_rrtmg_post</scheme>
</subcycle>
</group>
<group name="physics">
<group name="phys_ps">
<subcycle loop="1">
<scheme>GFS_suite_interstitial_phys_reset</scheme>
<scheme>GFS_suite_stateout_reset</scheme>
<scheme>get_prs_fv3</scheme>
<scheme>GFS_suite_interstitial_1</scheme>
Expand Down Expand Up @@ -62,6 +60,10 @@
<scheme>unified_ugwp_post</scheme>
<scheme>GFS_GWD_generic_post</scheme>
<scheme>GFS_suite_stateout_update</scheme>
</subcycle>
</group>
<group name="phys_ts">
<subcycle loop="1">
<scheme>GFS_photochemistry</scheme>
<scheme>get_phi_fv3</scheme>
<scheme>GFS_suite_interstitial_3</scheme>
Expand Down
Loading