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

Remove zorl interstitial variables, remove/replace references to IPD in comments in atmos_model.F90, rename Sfcprop%zorlw to Sfcprop%zorlwav #261

Closed
Closed
6 changes: 4 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,7 @@
branch = master
[submodule "ccpp/physics"]
path = ccpp/physics
url = https://github.com/NCAR/ccpp-physics
branch = master
#url = https://github.com/NCAR/ccpp-physics
#branch = master
url = https://github.com/climbfuji/ccpp-physics
branch = remove_zorl_interstitial
24 changes: 12 additions & 12 deletions atmos_model.F90
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ subroutine update_atmos_radiation_physics (Atmos)
jdat(5), jdat(6), jdat(7))
GFS_control%jdat(:) = jdat(:)

!--- execute the IPD atmospheric setup step
!--- execute the atmospheric setup step
call mpp_clock_begin(setupClock)
call CCPP_step (step="timestep_init", nblks=Atm_block%nblks, ierr=ierr)
if (ierr/=0) call mpp_error(FATAL, 'Call to CCPP timestep_init step failed')
Expand All @@ -279,8 +279,8 @@ subroutine update_atmos_radiation_physics (Atmos)

endif

! Calculate total non-physics tendencies by substracting old IPD Stateout
! variables from new/updated IPD Statein variables (gives the tendencies
! Calculate total non-physics tendencies by substracting old GFS Stateout
! variables from new/updated GFS Statein variables (gives the tendencies
! due to anything else than physics)
if (GFS_control%ldiag3d) then
do nb = 1,Atm_block%nblks
Expand All @@ -305,7 +305,7 @@ subroutine update_atmos_radiation_physics (Atmos)

if (mpp_pe() == mpp_root_pe() .and. debug) write(6,*) "radiation driver"

!--- execute the IPD atmospheric radiation subcomponent (RRTM)
!--- execute the atmospheric radiation subcomponent (RRTM)

call mpp_clock_begin(radClock)
! Performance improvement. Only enter if it is time to call the radiation physics.
Expand All @@ -322,7 +322,7 @@ subroutine update_atmos_radiation_physics (Atmos)

if (mpp_pe() == mpp_root_pe() .and. debug) write(6,*) "physics driver"

!--- execute the IPD atmospheric physics step1 subcomponent (main physics driver)
!--- execute the atmospheric physics step1 subcomponent (main physics driver)

call mpp_clock_begin(physClock)
call CCPP_step (step="physics", nblks=Atm_block%nblks, ierr=ierr)
Expand All @@ -336,7 +336,7 @@ subroutine update_atmos_radiation_physics (Atmos)

if (mpp_pe() == mpp_root_pe() .and. debug) write(6,*) "stochastic physics driver"

!--- execute the IPD atmospheric physics step2 subcomponent (stochastic physics driver)
!--- execute the atmospheric physics step2 subcomponent (stochastic physics driver)

call mpp_clock_begin(physClock)
call CCPP_step (step="stochastics", nblks=Atm_block%nblks, ierr=ierr)
Expand All @@ -350,7 +350,7 @@ subroutine update_atmos_radiation_physics (Atmos)
call getiauforcing(GFS_control,IAU_data)
if (mpp_pe() == mpp_root_pe() .and. debug) write(6,*) "end of radiation and physics step"

!--- execute the IPD atmospheric timestep finalize step
!--- execute the atmospheric timestep finalize step
call mpp_clock_begin(setupClock)
call CCPP_step (step="timestep_finalize", nblks=Atm_block%nblks, ierr=ierr)
if (ierr/=0) call mpp_error(FATAL, 'Call to CCPP timestep_finalize step failed')
Expand Down Expand Up @@ -501,7 +501,7 @@ subroutine atmos_model_init (Atmos, Time_init, Time, Time_step)
do i = 1, ntracers
call get_tracer_names(MODEL_ATMOS, i, tracer_names(i))
enddo
!--- setup IPD Init_parm
!--- setup Init_parm
Init_parm%me = mpp_pe()
Init_parm%master = mpp_root_pe()
Init_parm%tile_num = tile_num
Expand Down Expand Up @@ -668,7 +668,7 @@ subroutine atmos_model_init (Atmos, Time_init, Time, Time_step)

!if in coupled mode, set up coupled fields
if (GFS_control%cplflx .or. GFS_control%cplwav) then
if (mpp_pe() == mpp_root_pe()) print *,'COUPLING: IPD layer'
if (mpp_pe() == mpp_root_pe()) print *,'COUPLING: CCPP layer'
call setup_exportdata(ierr)
endif

Expand Down Expand Up @@ -887,7 +887,7 @@ subroutine atmos_model_end (Atmos)
call stochastic_physics_wrapper_end(GFS_control)

! Fast physics (from dynamics) are finalized in atmosphere_end above;
! standard/slow physics (from IPD) are finalized in CCPP_step 'finalize'.
! standard/slow physics (from CCPP) are finalized in CCPP_step 'finalize'.
! The CCPP framework for all cdata structures is finalized in CCPP_step 'finalize'.
call CCPP_step (step="finalize", nblks=Atm_block%nblks, ierr=ierr)
if (ierr/=0) call mpp_error(FATAL, 'Call to CCPP finalize step failed')
Expand Down Expand Up @@ -1614,9 +1614,9 @@ subroutine assign_importdata(rc)
tem = 100.0_GFS_kind_phys * min(0.1_GFS_kind_phys, datar8(i,j))
! GFS_data(nb)%Coupling%zorlwav_cpl(ix) = tem
GFS_data(nb)%Sfcprop%zorlo(ix) = tem
GFS_data(nb)%Sfcprop%zorlw(ix) = tem
GFS_data(nb)%Sfcprop%zorlwav(ix) = tem
else
GFS_data(nb)%Sfcprop%zorlw(ix) = -999.0_GFS_kind_phys
GFS_data(nb)%Sfcprop%zorlwav(ix) = -999.0_GFS_kind_phys

endif
enddo
Expand Down
18 changes: 3 additions & 15 deletions ccpp/data/GFS_typedefs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ module GFS_typedefs
real (kind=kind_phys), pointer :: zorlo (:) => null() !< ocean surface roughness in cm
real (kind=kind_phys), pointer :: zorll (:) => null() !< land surface roughness in cm
real (kind=kind_phys), pointer :: zorli (:) => null() !< ice surface roughness in cm
real (kind=kind_phys), pointer :: zorlw (:) => null() !< wave surface roughness in cm
real (kind=kind_phys), pointer :: zorlwav(:) => null() !< wave surface roughness in cm
real (kind=kind_phys), pointer :: fice (:) => null() !< ice fraction over open water grid
! real (kind=kind_phys), pointer :: hprim (:) => null() !< topographic standard deviation in m
real (kind=kind_phys), pointer :: hprime (:,:) => null() !< orographic metrics
Expand Down Expand Up @@ -2009,9 +2009,6 @@ module GFS_typedefs
real (kind=kind_phys), pointer :: xlai1d(:) => null() !<
real (kind=kind_phys), pointer :: xmu(:) => null() !<
real (kind=kind_phys), pointer :: z01d(:) => null() !<
real (kind=kind_phys), pointer :: zorl_ice(:) => null() !<
real (kind=kind_phys), pointer :: zorl_land(:) => null() !<
real (kind=kind_phys), pointer :: zorl_ocean(:) => null() !<
real (kind=kind_phys), pointer :: zt1d(:) => null() !<
!==================================================================================================
! UGWP - five mechnanisms of momentum deposition due to various types of GWs
Expand Down Expand Up @@ -2279,7 +2276,7 @@ subroutine sfcprop_create (Sfcprop, IM, Model)
allocate (Sfcprop%zorlo (IM))
allocate (Sfcprop%zorll (IM))
allocate (Sfcprop%zorli (IM))
allocate (Sfcprop%zorlw (IM))
allocate (Sfcprop%zorlwav (IM))
allocate (Sfcprop%fice (IM))
! allocate (Sfcprop%hprim (IM))
allocate (Sfcprop%hprime (IM,Model%nmtvr))
Expand All @@ -2299,7 +2296,7 @@ subroutine sfcprop_create (Sfcprop, IM, Model)
Sfcprop%zorlo = clear_val
Sfcprop%zorll = clear_val
Sfcprop%zorli = clear_val
Sfcprop%zorlw = clear_val
Sfcprop%zorlwav = clear_val
Sfcprop%fice = clear_val
! Sfcprop%hprim = clear_val
Sfcprop%hprime = clear_val
Expand Down Expand Up @@ -6458,9 +6455,6 @@ subroutine interstitial_create (Interstitial, IM, Model)
allocate (Interstitial%xlai1d (IM))
allocate (Interstitial%xmu (IM))
allocate (Interstitial%z01d (IM))
allocate (Interstitial%zorl_ice (IM))
allocate (Interstitial%zorl_land (IM))
allocate (Interstitial%zorl_ocean (IM))
allocate (Interstitial%zt1d (IM))

! RRTMGP
Expand Down Expand Up @@ -7131,9 +7125,6 @@ subroutine interstitial_phys_reset (Interstitial, Model)
Interstitial%xlai1d = clear_val
Interstitial%xmu = clear_val
Interstitial%z01d = clear_val
Interstitial%zorl_ice = huge
Interstitial%zorl_land = huge
Interstitial%zorl_ocean = huge
Interstitial%zt1d = clear_val

! UGWP common
Expand Down Expand Up @@ -7517,9 +7508,6 @@ subroutine interstitial_print(Interstitial, Model, mpirank, omprank, blkno)
write (0,*) 'sum(Interstitial%xlai1d ) = ', sum(Interstitial%xlai1d )
write (0,*) 'sum(Interstitial%xmu ) = ', sum(Interstitial%xmu )
write (0,*) 'sum(Interstitial%z01d ) = ', sum(Interstitial%z01d )
write (0,*) 'sum(Interstitial%zorl_ice ) = ', sum(Interstitial%zorl_ice )
write (0,*) 'sum(Interstitial%zorl_land ) = ', sum(Interstitial%zorl_land )
write (0,*) 'sum(Interstitial%zorl_ocean ) = ', sum(Interstitial%zorl_ocean )
write (0,*) 'sum(Interstitial%zt1d ) = ', sum(Interstitial%zt1d )

! UGWP common
Expand Down
23 changes: 1 addition & 22 deletions ccpp/data/GFS_typedefs.meta
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
[zorlw]
[zorlwav]
standard_name = surface_roughness_length_from_wave_model
long_name = surface roughness length from wave model
units = cm
Expand Down Expand Up @@ -9995,27 +9995,6 @@
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
[zorl_ocean]
standard_name = surface_roughness_length_over_ocean_interstitial
long_name = surface roughness length over ocean (temporary use as interstitial)
units = cm
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
[zorl_land]
standard_name = surface_roughness_length_over_land_interstitial
long_name = surface roughness length over land (temporary use as interstitial)
units = cm
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
[zorl_ice]
standard_name = surface_roughness_length_over_ice_interstitial
long_name = surface roughness length over ice (temporary use as interstitial)
units = cm
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
[zt1d]
standard_name = perturbation_of_heat_to_momentum_roughness_length_ratio
long_name = perturbation of heat to momentum roughness length ratio
Expand Down
18 changes: 9 additions & 9 deletions io/FV3GFS_io.F90
Original file line number Diff line number Diff line change
Expand Up @@ -754,7 +754,7 @@ subroutine sfc_prop_restart_read (Sfcprop, Atm_block, Model, fv_domain, warm_sta
sfc_name2(35) = 'zorli' !zorl on land portion of a cell
! endif
if(Model%cplwav) then
sfc_name2(nvar_s2m) = 'zorlw' !zorl on land portion of a cell
sfc_name2(nvar_s2m) = 'zorlwav' !zorl on land portion of a cell
endif

!--- NSSTM inputs only needed when (nstf_name(1) > 0) .and. (nstf_name(2)) == 0)
Expand Down Expand Up @@ -836,7 +836,7 @@ subroutine sfc_prop_restart_read (Sfcprop, Atm_block, Model, fv_domain, warm_sta
do num = 1,nvar_s2m
var2_p => sfc_var2(:,:,num)
if (trim(sfc_name2(num)) == 'sncovr'.or. trim(sfc_name2(num)) == 'tsfcl' .or. trim(sfc_name2(num)) == 'zorll' &
.or. trim(sfc_name2(num)) == 'zorli' .or. trim(sfc_name2(num)) == 'zorlw') then
.or. trim(sfc_name2(num)) == 'zorli' .or. trim(sfc_name2(num)) == 'zorlwav') then
id_restart = register_restart_field(Sfc_restart, fn_srf, sfc_name2(num), var2_p, domain=fv_domain, mandatory=.false.)
else
id_restart = register_restart_field(Sfc_restart, fn_srf, sfc_name2(num), var2_p, domain=fv_domain)
Expand Down Expand Up @@ -993,9 +993,9 @@ subroutine sfc_prop_restart_read (Sfcprop, Atm_block, Model, fv_domain, warm_sta
! Sfcprop(nb)%zorli(ix) = Sfcprop(nb)%zorlo(ix)
! endif
if(Model%cplwav) then
Sfcprop(nb)%zorlw(ix) = sfc_var2(i,j,nvar_s2m) !--- (zorw from wave model)
Sfcprop(nb)%zorlwav(ix) = sfc_var2(i,j,nvar_s2m) !--- (zorw from wave model)
else
Sfcprop(nb)%zorlw(ix) = Sfcprop(nb)%zorlo(ix)
Sfcprop(nb)%zorlwav(ix) = Sfcprop(nb)%zorlo(ix)
endif

if(Model%frac_grid) then ! obtain slmsk from landfrac
Expand Down Expand Up @@ -1232,11 +1232,11 @@ subroutine sfc_prop_restart_read (Sfcprop, Atm_block, Model, fv_domain, warm_sta
endif

if (sfc_var2(i,j,nvar_s2m) < -9990.0_r8) then
if (Model%me == Model%master ) call mpp_error(NOTE, 'gfs_driver::surface_props_input - computing zorlw')
if (Model%me == Model%master ) call mpp_error(NOTE, 'gfs_driver::surface_props_input - computing zorlwav')
!$omp parallel do default(shared) private(nb, ix)
do nb = 1, Atm_block%nblks
do ix = 1, Atm_block%blksz(nb)
Sfcprop(nb)%zorlw(ix) = Sfcprop(nb)%zorlo(ix) !--- compute zorlw from existing variables
Sfcprop(nb)%zorlwav(ix) = Sfcprop(nb)%zorlo(ix) !--- compute zorlwav from existing variables
enddo
enddo
endif
Expand Down Expand Up @@ -1457,7 +1457,7 @@ subroutine sfc_prop_restart_write (Sfcprop, Atm_block, Model, fv_domain, timesta
sfc_name2(35) = 'zorli' !zorl on land portion of a cell
! endif
if (Model%cplwav) then
sfc_name2(nvar2m) = 'zorlw' !zorl on land portion of a cell
sfc_name2(nvar2m) = 'zorlwav' !zorl on land portion of a cell
endif
!--- NSSTM inputs only needed when (nstf_name(1) > 0) .and. (nstf_name(2)) == 0)
sfc_name2(nvar2m+1) = 'tref'
Expand Down Expand Up @@ -1529,7 +1529,7 @@ subroutine sfc_prop_restart_write (Sfcprop, Atm_block, Model, fv_domain, timesta
do num = 1,nvar2m
var2_p => sfc_var2(:,:,num)
if (trim(sfc_name2(num)) == 'sncovr'.or.trim(sfc_name2(num)) == 'tsfcl'.or.trim(sfc_name2(num)) == 'zorll' &
.or.trim(sfc_name2(num)) == 'zorli' .or.trim(sfc_name2(num)) == 'zorlw') then
.or.trim(sfc_name2(num)) == 'zorli' .or.trim(sfc_name2(num)) == 'zorlwav') then
id_restart = register_restart_field(Sfc_restart, fn_srf, sfc_name2(num), var2_p, domain=fv_domain, mandatory=.false.)
else
id_restart = register_restart_field(Sfc_restart, fn_srf, sfc_name2(num), var2_p, domain=fv_domain)
Expand Down Expand Up @@ -1662,7 +1662,7 @@ subroutine sfc_prop_restart_write (Sfcprop, Atm_block, Model, fv_domain, timesta
sfc_var2(i,j,35) = Sfcprop(nb)%zorli(ix) !--- zorli (zorl on ice)
! endif
if (Model%cplwav) then
sfc_var2(i,j,nvar2m) = Sfcprop(nb)%zorlw(ix) !--- zorlw (zorl from wav)
sfc_var2(i,j,nvar2m) = Sfcprop(nb)%zorlwav(ix) !--- zorlwav (zorl from wav)
endif
!--- NSSTM variables
if (Model%nstf_name(1) > 0) then
Expand Down