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

Rename Fortran variables and CCPP standard names / long names of surface composites from ocean to water #609

Merged
merged 11 commits into from
Apr 15, 2021
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
12 changes: 6 additions & 6 deletions physics/GFS_PBL_generic.meta
Original file line number Diff line number Diff line change
Expand Up @@ -1272,26 +1272,26 @@
intent = in
optional = F
[stress_wat]
standard_name = surface_wind_stress_over_ocean
long_name = surface wind stress over ocean
standard_name = surface_wind_stress_over_water
long_name = surface wind stress over water
units = m2 s-2
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
intent = in
optional = F
[hflx_wat]
standard_name = kinematic_surface_upward_sensible_heat_flux_over_ocean
long_name = kinematic surface upward sensible heat flux over ocean
standard_name = kinematic_surface_upward_sensible_heat_flux_over_water
long_name = kinematic surface upward sensible heat flux over water
units = K m s-1
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
intent = in
optional = F
[evap_wat]
standard_name = kinematic_surface_upward_latent_heat_flux_over_ocean
long_name = kinematic surface upward latent heat flux over ocean
standard_name = kinematic_surface_upward_latent_heat_flux_over_water
long_name = kinematic surface upward latent heat flux over water
units = kg kg-1 m s-1
dimensions = (horizontal_loop_extent)
type = real
Expand Down
2 changes: 1 addition & 1 deletion physics/GFS_cloud_diagnostics.meta
Original file line number Diff line number Diff line change
Expand Up @@ -160,4 +160,4 @@
dimensions = ()
type = integer
intent = out
optional = F
optional = F
70 changes: 40 additions & 30 deletions physics/GFS_debug.F90

Large diffs are not rendered by default.

45 changes: 45 additions & 0 deletions physics/GFS_debug.meta
Original file line number Diff line number Diff line change
Expand Up @@ -646,6 +646,51 @@
type = integer
intent = in
optional = F
[zorl]
standard_name = surface_roughness_length
long_name = surface roughness length
units = cm
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
intent = in
optional = F
[zorlw]
standard_name = surface_roughness_length_over_water
long_name = surface roughness length over water
units = cm
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
intent = in
optional = F
[zorll]
standard_name = surface_roughness_length_over_land
long_name = surface roughness length over land
units = cm
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
intent = in
optional = F
[zorli]
standard_name = surface_roughness_length_over_ice
long_name = surface roughness length over ice
units = cm
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
intent = in
optional = F
[fice]
standard_name = sea_ice_concentration
long_name = ice fraction over open water
units = frac
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
intent = in
optional = F
[errmsg]
standard_name = ccpp_error_message
long_name = error message for error handling in CCPP
Expand Down
4 changes: 2 additions & 2 deletions physics/GFS_phys_time_vary.fv3.meta
Original file line number Diff line number Diff line change
Expand Up @@ -1793,8 +1793,8 @@
intent = inout
optional = F
[zorlo]
standard_name = surface_roughness_length_over_ocean
long_name = surface roughness length over ocean
standard_name = surface_roughness_length_over_water
long_name = surface roughness length over water
units = cm
dimensions = (horizontal_dimension)
type = real
Expand Down
2 changes: 1 addition & 1 deletion physics/GFS_rrtmgp_thompsonmp_pre.meta
Original file line number Diff line number Diff line change
Expand Up @@ -448,4 +448,4 @@
dimensions = ()
type = integer
intent = out
optional = F
optional = F
4 changes: 2 additions & 2 deletions physics/GFS_suite_interstitial.F90
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ end subroutine GFS_suite_interstitial_2_finalize
!> \section arg_table_GFS_suite_interstitial_2_run Argument Table
!! \htmlinclude GFS_suite_interstitial_2_run.html
!!
subroutine GFS_suite_interstitial_2_run (im, levs, lssav, ldiag3d, lsidea, cplflx, flag_cice, shal_cnv, old_monin, mstrat, &
subroutine GFS_suite_interstitial_2_run (im, levs, lssav, ldiag3d, lsidea, flag_cice, shal_cnv, old_monin, mstrat, &
do_shoc, frac_grid, imfshalcnv, dtf, xcosz, adjsfcdsw, adjsfcdlw, cice, pgr, ulwsfc_cice, lwhd, htrsw, htrlw, xmu, ctei_rm, &
work1, work2, prsi, tgrs, prsl, qgrs_water_vapor, qgrs_cloud_water, cp, hvap, prslk, suntim, adjsfculw, adjsfculw_lnd, &
adjsfculw_ice, adjsfculw_wat, dlwsfc, ulwsfc, psmean, dt3dt_lw, dt3dt_sw, dt3dt_pbl, dt3dt_dcnv, dt3dt_scnv, dt3dt_mp, &
Expand All @@ -169,7 +169,7 @@ subroutine GFS_suite_interstitial_2_run (im, levs, lssav, ldiag3d, lsidea, cplfl

! interface variables
integer, intent(in ) :: im, levs, imfshalcnv
logical, intent(in ) :: lssav, ldiag3d, lsidea, cplflx, shal_cnv
logical, intent(in ) :: lssav, ldiag3d, lsidea, shal_cnv
logical, intent(in ) :: old_monin, mstrat, do_shoc, frac_grid, use_LW_jacobian
real(kind=kind_phys), intent(in ) :: dtf, cp, hvap

Expand Down
12 changes: 2 additions & 10 deletions physics/GFS_suite_interstitial.meta
Original file line number Diff line number Diff line change
Expand Up @@ -321,14 +321,6 @@
type = logical
intent = in
optional = F
[cplflx]
standard_name = flag_for_flux_coupling
long_name = flag controlling cplflx collection (default off)
units = flag
dimensions = ()
type = logical
intent = in
optional = F
[flag_cice]
standard_name = flag_for_cice
long_name = flag for cice
Expand Down Expand Up @@ -628,8 +620,8 @@
intent = in
optional = F
[adjsfculw_wat]
standard_name = surface_upwelling_longwave_flux_over_ocean_interstitial
long_name = surface upwelling longwave flux at current time over ocean (temporary use as interstitial)
standard_name = surface_upwelling_longwave_flux_over_water_interstitial
long_name = surface upwelling longwave flux at current time over water (temporary use as interstitial)
units = W m-2
dimensions = (horizontal_loop_extent)
type = real
Expand Down
81 changes: 36 additions & 45 deletions physics/GFS_surface_composites.F90
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ module GFS_surface_composites_pre

real(kind=kind_phys), parameter :: zero = 0.0_kind_phys, one = 1.0_kind_phys, epsln = 1.0e-10_kind_phys

real(kind=kind_phys), parameter :: huge = 9.9692099683868690E36 ! NetCDF float FillValue

contains

subroutine GFS_surface_composites_pre_init ()
Expand All @@ -25,15 +27,16 @@ end subroutine GFS_surface_composites_pre_finalize
!! \htmlinclude GFS_surface_composites_pre_run.html
!!
subroutine GFS_surface_composites_pre_run (im, lkm, frac_grid, flag_cice, cplflx, cplwav2atm, &
landfrac, lakefrac, lakedepth, oceanfrac, frland, &
dry, icy, lake, ocean, wet, hice, cice, zorl, zorlo, zorll, zorli, zorl_wat, &
zorl_lnd, zorl_ice, snowd, snowd_wat, snowd_lnd, snowd_ice, tprcp, tprcp_wat, &
landfrac, lakefrac, lakedepth, oceanfrac, frland, dry, icy, lake, ocean, wet, &
hice, cice, snowd, snowd_wat, snowd_lnd, snowd_ice, tprcp, tprcp_wat, &
tprcp_lnd, tprcp_ice, uustar, uustar_wat, uustar_lnd, uustar_ice, &
weasd, weasd_wat, weasd_lnd, weasd_ice, ep1d_ice, tsfc, tsfco, tsfcl, tsfc_wat, &
tsfc_lnd, tsfc_ice, tisfc, tice, tsurf, tsurf_wat, tsurf_lnd, tsurf_ice, &
gflx_ice, tgice, islmsk, islmsk_cice, slmsk, semis_rad, semis_wat, semis_lnd, semis_ice, &
qss, qss_wat, qss_lnd, qss_ice, hflx, hflx_wat, hflx_lnd, hflx_ice, &
min_lakeice, min_seaice, errmsg, errflg)
min_lakeice, min_seaice, &
zorlo, zorll, zorli, &
errmsg, errflg)

implicit none

Expand All @@ -45,20 +48,22 @@ subroutine GFS_surface_composites_pre_run (im, lkm, frac_grid, flag_cice, cplflx
real(kind=kind_phys), dimension(im), intent(in ) :: landfrac, lakefrac, lakedepth, oceanfrac
real(kind=kind_phys), dimension(im), intent(inout) :: cice, hice
real(kind=kind_phys), dimension(im), intent( out) :: frland
real(kind=kind_phys), dimension(im), intent(in ) :: zorl, snowd, tprcp, uustar, weasd, qss, hflx
real(kind=kind_phys), dimension(im), intent(in ) :: snowd, tprcp, uustar, weasd, qss, hflx

real(kind=kind_phys), dimension(im), intent(inout) :: zorlo, zorll, zorli, tsfc, tsfco, tsfcl, tisfc, tsurf
real(kind=kind_phys), dimension(im), intent(inout) :: tsfc, tsfco, tsfcl, tisfc, tsurf
real(kind=kind_phys), dimension(im), intent(inout) :: snowd_wat, snowd_lnd, snowd_ice, tprcp_wat, &
tprcp_lnd, tprcp_ice, zorl_wat, zorl_lnd, zorl_ice, tsfc_wat, tsfc_lnd, tsfc_ice, tsurf_wat, &
tsurf_lnd, tsurf_ice, uustar_wat, uustar_lnd, uustar_ice, weasd_wat, weasd_lnd, weasd_ice, &
tprcp_lnd, tprcp_ice, tsfc_wat, tsfc_lnd, tsfc_ice, tsurf_wat,tsurf_lnd, tsurf_ice, &
uustar_wat, uustar_lnd, uustar_ice, weasd_wat, weasd_lnd, weasd_ice, &
qss_wat, qss_lnd, qss_ice, hflx_wat, hflx_lnd, hflx_ice, ep1d_ice, gflx_ice
real(kind=kind_phys), dimension(im), intent( out) :: tice
real(kind=kind_phys), intent(in ) :: tgice
integer, dimension(im), intent(inout) :: islmsk, islmsk_cice
real(kind=kind_phys), dimension(im), intent(in ) :: semis_rad
real(kind=kind_phys), dimension(im), intent(inout) :: semis_wat, semis_lnd, semis_ice, slmsk
real(kind=kind_phys), intent(in ) :: min_lakeice, min_seaice

!
real(kind=kind_phys), dimension(im), intent(inout) :: zorlo, zorll, zorli
!
real(kind=kind_phys), parameter :: timin = 173.0_kind_phys ! minimum temperature allowed for snow/ice

! CCPP error handling
Expand Down Expand Up @@ -169,26 +174,12 @@ subroutine GFS_surface_composites_pre_run (im, lkm, frac_grid, flag_cice, cplflx
enddo
endif

! if (.not. cplflx .or. .not. frac_grid) then
! if (cplwav2atm) then
! do i=1,im
! zorll(i) = zorl(i)
! enddo
! else
! do i=1,im
! zorll(i) = zorl(i)
! zorlo(i) = zorl(i)
! enddo
! endif
! endif

do i=1,im
tprcp_wat(i) = tprcp(i)
tprcp_lnd(i) = tprcp(i)
tprcp_ice(i) = tprcp(i)
if (wet(i)) then ! Water
uustar_wat(i) = uustar(i)
zorl_wat(i) = zorlo(i)
tsfc_wat(i) = tsfco(i)
tsurf_wat(i) = tsfco(i)
! weasd_wat(i) = weasd(i)
Expand All @@ -198,22 +189,28 @@ subroutine GFS_surface_composites_pre_run (im, lkm, frac_grid, flag_cice, cplflx
semis_wat(i) = 0.984_kind_phys
qss_wat(i) = qss(i)
hflx_wat(i) = hflx(i)
! DH*
else
zorlo(i) = huge
! *DH
endif
if (dry(i)) then ! Land
uustar_lnd(i) = uustar(i)
weasd_lnd(i) = weasd(i)
zorl_lnd(i) = zorll(i)
tsfc_lnd(i) = tsfcl(i)
tsurf_lnd(i) = tsfcl(i)
snowd_lnd(i) = snowd(i)
semis_lnd(i) = semis_rad(i)
qss_lnd(i) = qss(i)
hflx_lnd(i) = hflx(i)
! DH*
else
zorll(i) = huge
! *DH
end if
if (icy(i)) then ! Ice
uustar_ice(i) = uustar(i)
weasd_ice(i) = weasd(i)
zorl_ice(i) = zorli(i)
tsfc_ice(i) = tisfc(i)
tsurf_ice(i) = tisfc(i)
snowd_ice(i) = snowd(i)
Expand All @@ -222,7 +219,11 @@ subroutine GFS_surface_composites_pre_run (im, lkm, frac_grid, flag_cice, cplflx
semis_ice(i) = 0.95_kind_phys
qss_ice(i) = qss(i)
hflx_ice(i) = hflx(i)
endif
! DH*
else
zorli(i) = huge
! *DH
end if
if (nint(slmsk(i)) /= 1) slmsk(i) = islmsk(i)
enddo

Expand Down Expand Up @@ -345,14 +346,12 @@ end subroutine GFS_surface_composites_post_init
subroutine GFS_surface_composites_post_finalize()
end subroutine GFS_surface_composites_post_finalize

#if 0
!> \section arg_table_GFS_surface_composites_post_run Argument Table
!! \htmlinclude GFS_surface_composites_post_run.html
!!
#endif
subroutine GFS_surface_composites_post_run ( &
im, kice, km, cplflx, cplwav2atm, frac_grid, flag_cice, islmsk, dry, wet, icy, landfrac, lakefrac, oceanfrac, &
zorl, zorlo, zorll, zorli, zorl_wat, zorl_lnd, zorl_ice, &
zorl, zorlo, zorll, zorli, &
cd, cd_wat, cd_lnd, cd_ice, cdq, cdq_wat, cdq_lnd, cdq_ice, rb, rb_wat, rb_lnd, rb_ice, stress, stress_wat, stress_lnd, &
stress_ice, ffmm, ffmm_wat, ffmm_lnd, ffmm_ice, ffhh, ffhh_wat, ffhh_lnd, ffhh_ice, uustar, uustar_wat, uustar_lnd, &
uustar_ice, fm10, fm10_wat, fm10_lnd, fm10_ice, fh2, fh2_wat, fh2_lnd, fh2_ice, tsurf, tsurf_wat, tsurf_lnd, tsurf_ice, &
Expand All @@ -368,7 +367,7 @@ subroutine GFS_surface_composites_post_run (
logical, dimension(im), intent(in) :: flag_cice, dry, wet, icy
integer, dimension(im), intent(in) :: islmsk
real(kind=kind_phys), dimension(im), intent(in) :: landfrac, lakefrac, oceanfrac, &
zorl_wat, zorl_lnd, zorl_ice, cd_wat, cd_lnd, cd_ice, cdq_wat, cdq_lnd, cdq_ice, rb_wat, rb_lnd, rb_ice, stress_wat, &
cd_wat, cd_lnd, cd_ice, cdq_wat, cdq_lnd, cdq_ice, rb_wat, rb_lnd, rb_ice, stress_wat, &
stress_lnd, stress_ice, ffmm_wat, ffmm_lnd, ffmm_ice, ffhh_wat, ffhh_lnd, ffhh_ice, uustar_wat, uustar_lnd, uustar_ice, &
fm10_wat, fm10_lnd, fm10_ice, fh2_wat, fh2_lnd, fh2_ice, tsurf_wat, tsurf_lnd, tsurf_ice, cmm_wat, cmm_lnd, cmm_ice, &
chh_wat, chh_lnd, chh_ice, gflx_wat, gflx_lnd, gflx_ice, ep1d_wat, ep1d_lnd, ep1d_ice, weasd_wat, weasd_lnd, weasd_ice, &
Expand Down Expand Up @@ -408,7 +407,7 @@ subroutine GFS_surface_composites_post_run (
txi = cice(i) * wfrac ! txi = ice fraction wrt whole cell
txo = max(zero, wfrac-txi) ! txo = open water fraction

zorl(i) = txl*zorl_lnd(i) + txi*zorl_ice(i) + txo*zorl_wat(i)
zorl(i) = txl*zorll(i) + txi*zorli(i) + txo*zorlo(i)
cd(i) = txl*cd_lnd(i) + txi*cd_ice(i) + txo*cd_wat(i)
cdq(i) = txl*cdq_lnd(i) + txi*cdq_ice(i) + txo*cdq_wat(i)
rb(i) = txl*rb_lnd(i) + txi*rb_ice(i) + txo*rb_wat(i)
Expand Down Expand Up @@ -443,10 +442,6 @@ subroutine GFS_surface_composites_post_run (
endif
tsfc(i) = txl*tsfc_lnd(i) + txi*tice(i) + txo*tsfc_wat(i)

zorll(i) = zorl_lnd(i)
zorli(i) = zorl_ice(i)
zorlo(i) = zorl_wat(i)

if (dry(i)) then
tsfcl(i) = tsfc_lnd(i) ! over land
elseif (wet(i)) then
Expand Down Expand Up @@ -496,7 +491,7 @@ subroutine GFS_surface_composites_post_run (

do i=1,im
if (islmsk(i) == 1) then
zorl(i) = zorl_lnd(i)
zorl(i) = zorll(i)
cd(i) = cd_lnd(i)
cdq(i) = cdq_lnd(i)
rb(i) = rb_lnd(i)
Expand Down Expand Up @@ -524,7 +519,7 @@ subroutine GFS_surface_composites_post_run (
hice(i) = zero
cice(i) = zero
elseif (islmsk(i) == 0) then
zorl(i) = zorl_wat(i)
zorl(i) = zorlo(i)
cd(i) = cd_wat(i)
cdq(i) = cdq_wat(i)
rb(i) = rb_wat(i)
Expand Down Expand Up @@ -552,7 +547,7 @@ subroutine GFS_surface_composites_post_run (
hice(i) = zero
cice(i) = zero
else ! islmsk(i) == 2
zorl(i) = zorl_ice(i)
zorl(i) = zorli(i)
cd(i) = cd_ice(i)
cdq(i) = cdq_ice(i)
rb(i) = rb_ice(i)
Expand All @@ -578,7 +573,7 @@ subroutine GFS_surface_composites_post_run (
tisfc(i) = tice(i)
if (.not. flag_cice(i)) then
! tisfc(i) = tice(i) ! over lake ice (and sea ice when uncoupled)
zorl(i) = cice(i) * zorl_ice(i) + (one - cice(i)) * zorl_wat(i)
zorl(i) = cice(i) * zorli(i) + (one - cice(i)) * zorlo(i)
tsfc(i) = tsfc_ice(i) ! over lake (and ocean when uncoupled)
elseif (wet(i)) then
if (cice(i) >= min_seaice) then ! this was already done for lake ice in sfc_sice
Expand All @@ -590,15 +585,15 @@ subroutine GFS_surface_composites_post_run (
stress(i) = txi * stress_ice(i) + txo * stress_wat(i)
qss(i) = txi * qss_ice(i) + txo * qss_wat(i)
ep1d(i) = txi * ep1d_ice(i) + txo * ep1d_wat(i)
zorl(i) = txi * zorl_ice(i) + txo * zorl_wat(i)
zorl(i) = txi * zorli(i) + txo * zorlo(i)
else
evap(i) = evap_wat(i)
hflx(i) = hflx_wat(i)
tsfc(i) = tsfc_wat(i)
stress(i) = stress_wat(i)
qss(i) = qss_wat(i)
ep1d(i) = ep1d_wat(i)
zorl(i) = zorl_wat(i)
zorl(i) = zorlo(i)
endif
endif
if (wet(i)) then
Expand All @@ -612,10 +607,6 @@ subroutine GFS_surface_composites_post_run (
end do
endif

zorll(i) = zorl_lnd(i)
zorlo(i) = zorl_wat(i)
zorli(i) = zorl_ice(i)

enddo

endif ! if (frac_grid)
Expand Down
Loading