Skip to content

Commit

Permalink
Merge pull request NCAR#150 from grantfirl/fix_noahmp_precip_rates
Browse files Browse the repository at this point in the history
Fix noahmp precip rates
  • Loading branch information
grantfirl authored Dec 9, 2019
2 parents c411e84 + 34addd3 commit 07a98f3
Show file tree
Hide file tree
Showing 4 changed files with 110 additions and 114 deletions.
1 change: 0 additions & 1 deletion ccpp/config/ccpp_prebuild_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,6 @@
'ccpp/physics/physics/sfc_cice.f' : ['physics'],
'ccpp/physics/physics/sfc_diff.f' : ['physics'],
'ccpp/physics/physics/sfc_drv.f' : ['physics'],
'ccpp/physics/physics/sfc_noahmp_pre.F90' : ['physics'],
'ccpp/physics/physics/sfc_noahmp_drv.f' : ['physics'],
'ccpp/physics/physics/sfc_nst.f' : ['physics'],
'ccpp/physics/physics/sfc_ocean.F' : ['physics'],
Expand Down
1 change: 0 additions & 1 deletion ccpp/suites/suite_SCM_GFS_v15_noahmp.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
<scheme>sfc_nst_pre</scheme>
<scheme>sfc_nst</scheme>
<scheme>sfc_nst_post</scheme>
<scheme>sfc_noahmp_pre</scheme>
<scheme>noahmpdrv</scheme>
<scheme>sfc_sice</scheme>
<scheme>GFS_surface_loop_control_part2</scheme>
Expand Down
82 changes: 40 additions & 42 deletions scm/src/GFS_typedefs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,21 @@ module GFS_typedefs
real (kind=kind_phys), pointer :: chs2(:) => null() !exch coeff for heat at 2m
real (kind=kind_phys), pointer :: cqs2(:) => null() !exch coeff for moisture at 2m
real (kind=kind_phys), pointer :: lh(:) => null() !latent heating at the surface

!---- precipitation amounts from previous time step for RUC LSM
real (kind=kind_phys), pointer :: raincprv (:) => null() !< explicit rainfall from previous timestep
real (kind=kind_phys), pointer :: rainncprv (:) => null() !< convective_precipitation_amount from previous timestep
real (kind=kind_phys), pointer :: iceprv (:) => null() !< ice amount from previous timestep
real (kind=kind_phys), pointer :: snowprv (:) => null() !< snow amount from previous timestep
real (kind=kind_phys), pointer :: graupelprv(:) => null() !< graupel amount from previous timestep

!---- precipitation rates from previous time step for NoahMP LSM
real (kind=kind_phys), pointer :: draincprv (:) => null() !< convective precipitation rate from previous timestep
real (kind=kind_phys), pointer :: drainncprv (:) => null() !< explicit rainfall rate from previous timestep
real (kind=kind_phys), pointer :: diceprv (:) => null() !< ice precipitation rate from previous timestep
real (kind=kind_phys), pointer :: dsnowprv (:) => null() !< snow precipitation rate from previous timestep
real (kind=kind_phys), pointer :: dgraupelprv(:) => null() !< graupel precipitation rate from previous timestep

contains
procedure :: create => sfcprop_create !< allocate array data
end type GFS_sfcprop_type
Expand Down Expand Up @@ -1121,20 +1135,6 @@ module GFS_typedefs
real (kind=kind_phys), pointer :: prevst (:,:) => null() !<
real (kind=kind_phys), pointer :: prevsq (:,:) => null() !<
integer, pointer :: cactiv (:) => null() !< convective activity memory contour

!---- precipitation amounts from previous time step for RUC LSM
real (kind=kind_phys), pointer :: raincprv (:) => null() !< explicit rainfall from previous timestep
real (kind=kind_phys), pointer :: rainncprv (:) => null() !< convective_precipitation_amount from previous timestep
real (kind=kind_phys), pointer :: iceprv (:) => null() !< ice amount from previous timestep
real (kind=kind_phys), pointer :: snowprv (:) => null() !< snow amount from previous timestep
real (kind=kind_phys), pointer :: graupelprv(:) => null() !< graupel amount from previous timestep

!---- precipitation rates from previous time step for NoahMP LSM
real (kind=kind_phys), pointer :: draincprv (:) => null() !< convective precipitation rate from previous timestep
real (kind=kind_phys), pointer :: drainncprv (:) => null() !< explicit rainfall rate from previous timestep
real (kind=kind_phys), pointer :: diceprv (:) => null() !< ice precipitation rate from previous timestep
real (kind=kind_phys), pointer :: dsnowprv (:) => null() !< snow precipitation rate from previous timestep
real (kind=kind_phys), pointer :: dgraupelprv(:) => null() !< graupel precipitation rate from previous timestep

!--- MYNN prognostic variables that can't be in the Intdiag or Interstitial DDTs
real (kind=kind_phys), pointer :: CLDFRA_BL (:,:) => null() !
Expand Down Expand Up @@ -2108,7 +2108,19 @@ subroutine sfcprop_create (Sfcprop, IM, Model)
Sfcprop%dt_cool = zero
Sfcprop%qrain = zero
endif


if (Model%lsm == Model%lsm_ruc .or. Model%lsm == Model%lsm_noahmp) then
allocate(Sfcprop%raincprv (IM))
allocate(Sfcprop%rainncprv (IM))
allocate(Sfcprop%iceprv (IM))
allocate(Sfcprop%snowprv (IM))
allocate(Sfcprop%graupelprv(IM))
Sfcprop%raincprv = clear_val
Sfcprop%rainncprv = clear_val
Sfcprop%iceprv = clear_val
Sfcprop%snowprv = clear_val
Sfcprop%graupelprv = clear_val
end if
! Noah MP allocate and init when used
!
if (Model%lsm == Model%lsm_noahmp ) then
Expand Down Expand Up @@ -2183,7 +2195,19 @@ subroutine sfcprop_create (Sfcprop, IM, Model)
Sfcprop%tsnoxy = clear_val
Sfcprop%smoiseq = clear_val
Sfcprop%zsnsoxy = clear_val


allocate(Sfcprop%draincprv (IM))
allocate(Sfcprop%drainncprv (IM))
allocate(Sfcprop%diceprv (IM))
allocate(Sfcprop%dsnowprv (IM))
allocate(Sfcprop%dgraupelprv(IM))

Sfcprop%draincprv = clear_val
Sfcprop%drainncprv = clear_val
Sfcprop%diceprv = clear_val
Sfcprop%dsnowprv = clear_val
Sfcprop%dgraupelprv = clear_val

endif

if (Model%lsm == Model%lsm_ruc) then
Expand Down Expand Up @@ -4558,32 +4582,6 @@ subroutine tbd_create (Tbd, IM, Model)
Tbd%cactiv = zero
end if

if (Model%lsm == Model%lsm_ruc) then
allocate(Tbd%raincprv (IM))
allocate(Tbd%rainncprv (IM))
allocate(Tbd%iceprv (IM))
allocate(Tbd%snowprv (IM))
allocate(Tbd%graupelprv(IM))
Tbd%raincprv = clear_val
Tbd%rainncprv = clear_val
Tbd%iceprv = clear_val
Tbd%snowprv = clear_val
Tbd%graupelprv = clear_val
end if

if (Model%lsm == Model%lsm_noahmp) then
allocate(Tbd%draincprv (IM))
allocate(Tbd%drainncprv (IM))
allocate(Tbd%diceprv (IM))
allocate(Tbd%dsnowprv (IM))
allocate(Tbd%dgraupelprv(IM))
Tbd%draincprv = clear_val
Tbd%drainncprv = clear_val
Tbd%diceprv = clear_val
Tbd%dsnowprv = clear_val
Tbd%dgraupelprv = clear_val
end if

!--- MYNN variables:
if (Model%do_mynnedmf) then
!print*,"Allocating all MYNN-EDMF variables:"
Expand Down
140 changes: 70 additions & 70 deletions scm/src/GFS_typedefs.meta
Original file line number Diff line number Diff line change
Expand Up @@ -1283,6 +1283,76 @@
dimensions = (horizontal_dimension)
type = real
kind = kind_phys
[raincprv]
standard_name = lwe_thickness_of_convective_precipitation_amount_from_previous_timestep
long_name = convective_precipitation_amount from previous timestep
units = m
dimensions = (horizontal_dimension)
type = real
kind = kind_phys
[rainncprv]
standard_name = lwe_thickness_of_explicit_rainfall_amount_from_previous_timestep
long_name = explicit rainfall from previous timestep
units = m
dimensions = (horizontal_dimension)
type = real
kind = kind_phys
[iceprv]
standard_name = lwe_thickness_of_ice_amount_from_previous_timestep
long_name = ice amount from previous timestep
units = m
dimensions = (horizontal_dimension)
type = real
kind = kind_phys
[snowprv]
standard_name = lwe_thickness_of_snow_amount_from_previous_timestep
long_name = snow amount from previous timestep
units = m
dimensions = (horizontal_dimension)
type = real
kind = kind_phys
[graupelprv]
standard_name = lwe_thickness_of_graupel_amount_from_previous_timestep
long_name = graupel amount from previous timestep
units = m
dimensions = (horizontal_dimension)
type = real
kind = kind_phys
[draincprv]
standard_name = convective_precipitation_rate_from_previous_timestep
long_name = convective precipitation rate from previous timestep
units = mm s-1
dimensions = (horizontal_dimension)
type = real
kind = kind_phys
[drainncprv]
standard_name = explicit_rainfall_rate_from_previous_timestep
long_name = explicit rainfall rate previous timestep
units = mm s-1
dimensions = (horizontal_dimension)
type = real
kind = kind_phys
[diceprv]
standard_name = ice_precipitation_rate_from_previous_timestep
long_name = ice precipitation rate from previous timestep
units = mm s-1
dimensions = (horizontal_dimension)
type = real
kind = kind_phys
[dsnowprv]
standard_name = snow_precipitation_rate_from_previous_timestep
long_name = snow precipitation rate from previous timestep
units = mm s-1
dimensions = (horizontal_dimension)
type = real
kind = kind_phys
[dgraupelprv]
standard_name = graupel_precipitation_rate_from_previous_timestep
long_name = graupel precipitation rate from previous timestep
units = mm s-1
dimensions = (horizontal_dimension)
type = real
kind = kind_phys

########################################################################
[ccpp-arg-table]
Expand Down Expand Up @@ -4300,76 +4370,6 @@
units = none
dimensions = (horizontal_dimension)
type = integer
[raincprv]
standard_name = lwe_thickness_of_convective_precipitation_amount_from_previous_timestep
long_name = convective_precipitation_amount from previous timestep
units = m
dimensions = (horizontal_dimension)
type = real
kind = kind_phys
[rainncprv]
standard_name = lwe_thickness_of_explicit_rainfall_amount_from_previous_timestep
long_name = explicit rainfall from previous timestep
units = m
dimensions = (horizontal_dimension)
type = real
kind = kind_phys
[iceprv]
standard_name = lwe_thickness_of_ice_amount_from_previous_timestep
long_name = ice amount from previous timestep
units = m
dimensions = (horizontal_dimension)
type = real
kind = kind_phys
[snowprv]
standard_name = lwe_thickness_of_snow_amount_from_previous_timestep
long_name = snow amount from previous timestep
units = m
dimensions = (horizontal_dimension)
type = real
kind = kind_phys
[graupelprv]
standard_name = lwe_thickness_of_graupel_amount_from_previous_timestep
long_name = graupel amount from previous timestep
units = m
dimensions = (horizontal_dimension)
type = real
kind = kind_phys
[draincprv]
standard_name = convective_precipitation_rate_from_previous_timestep
long_name = convective precipitation rate from previous timestep
units = mm s-1
dimensions = (horizontal_dimension)
type = real
kind = kind_phys
[drainncprv]
standard_name = explicit_rainfall_rate_from_previous_timestep
long_name = explicit rainfall rate previous timestep
units = mm s-1
dimensions = (horizontal_dimension)
type = real
kind = kind_phys
[diceprv]
standard_name = ice_precipitation_rate_from_previous_timestep
long_name = ice precipitation rate from previous timestep
units = mm s-1
dimensions = (horizontal_dimension)
type = real
kind = kind_phys
[dsnowprv]
standard_name = snow_precipitation_rate_from_previous_timestep
long_name = snow precipitation rate from previous timestep
units = mm s-1
dimensions = (horizontal_dimension)
type = real
kind = kind_phys
[dgraupelprv]
standard_name = graupel_precipitation_rate_from_previous_timestep
long_name = graupel precipitation rate from previous timestep
units = mm s-1
dimensions = (horizontal_dimension)
type = real
kind = kind_phys
[CLDFRA_BL]
standard_name = subgrid_cloud_fraction_pbl
long_name = subgrid cloud fraction from PBL scheme
Expand Down

0 comments on commit 07a98f3

Please sign in to comment.