Skip to content

Commit

Permalink
Merge pull request #1 from grantfirl/winterwx_gjf
Browse files Browse the repository at this point in the history
Updates for ufs/dev PR#30
  • Loading branch information
ericaligo-NOAA authored Jan 20, 2023
2 parents db11313 + cb0afb8 commit 9691f35
Show file tree
Hide file tree
Showing 10 changed files with 81 additions and 61 deletions.
19 changes: 9 additions & 10 deletions physics/GFS_MP_generic_post.F90
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ module GFS_MP_generic_post
!> @{
subroutine GFS_MP_generic_post_run( &
im, levs, kdt, nrcm, nncl, ntcw, ntrac, imp_physics, imp_physics_gfdl, imp_physics_thompson, imp_physics_nssl, &
imp_physics_mg, imp_physics_fer_hires, cal_pre, cplflx, cplchm, cpllnd, progsigma, con_g, rainmin, dtf, frain, rainc, &
rain1, rann, xlat, xlon, gt0, gq0, prsl, prsi, phii, tsfc, ice, snow, graupel, save_t, save_q, rain0, ice0, snow0,&
graupel0, del, rain, domr_diag, domzr_diag, domip_diag, doms_diag, tprcp, srflag, sr, cnvprcp, totprcp, totice, &
totsnw, totgrp, cnvprcpb, totprcpb, toticeb, totsnwb, totgrpb, rain_cpl, rainc_cpl, snow_cpl, pwat, &
frzr, frzrb, frozr, frozrb, tsnowp, tsnowpb, rhonewsn1, vrbliceden_noah, iopt_snf, &
imp_physics_mg, imp_physics_fer_hires, cal_pre, cplflx, cplchm, cpllnd, progsigma, con_g, rhowater, rainmin, dtf, &
frain, rainc, rain1, rann, xlat, xlon, gt0, gq0, prsl, prsi, phii, tsfc, ice, snow, graupel, save_t, save_q, &
rain0, ice0, snow0, graupel0, del, rain, domr_diag, domzr_diag, domip_diag, doms_diag, tprcp, srflag, sr, cnvprcp,&
totprcp, totice, totsnw, totgrp, cnvprcpb, totprcpb, toticeb, totsnwb, totgrpb, rain_cpl, rainc_cpl, snow_cpl, &
pwat, frzr, frzrb, frozr, frozrb, tsnowp, tsnowpb, rhonewsn1, exticeden, &
drain_cpl, dsnow_cpl, lsm, lsm_ruc, lsm_noahmp, raincprv, rainncprv, iceprv, snowprv, &
graupelprv, draincprv, drainncprv, diceprv, dsnowprv, dgraupelprv, dtp, dfi_radar_max_intervals, &
dtend, dtidx, index_of_temperature, index_of_process_mp,ldiag3d, qdiag3d,dqdt_qmicro, lssav, num_dfi_radar, &
Expand All @@ -38,7 +38,7 @@ subroutine GFS_MP_generic_post_run(
integer, intent(in) :: im, levs, kdt, nrcm, nncl, ntcw, ntrac, num_dfi_radar, index_of_process_dfi_radar
integer, intent(in) :: imp_physics, imp_physics_gfdl, imp_physics_thompson, imp_physics_mg, imp_physics_fer_hires
integer, intent(in) :: imp_physics_nssl
logical, intent(in) :: cal_pre, lssav, ldiag3d, qdiag3d, cplflx, cplchm, cpllnd, progsigma, vrbliceden_noah
logical, intent(in) :: cal_pre, lssav, ldiag3d, qdiag3d, cplflx, cplchm, cpllnd, progsigma, exticeden
integer, intent(in) :: index_of_temperature,index_of_process_mp

integer :: dfi_radar_max_intervals
Expand All @@ -47,7 +47,7 @@ subroutine GFS_MP_generic_post_run(
integer :: ix_dfi_radar(:)
real(kind=kind_phys), dimension(:,:), intent(inout) :: gt0

real(kind=kind_phys), intent(in) :: dtf, frain, con_g, rainmin
real(kind=kind_phys), intent(in) :: dtf, frain, con_g, rainmin, rhowater
real(kind=kind_phys), dimension(:), intent(in) :: rain1, xlat, xlon, tsfc
real(kind=kind_phys), dimension(:), intent(inout) :: ice, snow, graupel, rainc
real(kind=kind_phys), dimension(:), intent(in) :: rain0, ice0, snow0, graupel0
Expand All @@ -71,7 +71,7 @@ subroutine GFS_MP_generic_post_run(
real(kind=kind_phys), dimension(:), intent(inout) :: drain_cpl, dsnow_cpl

! Rainfall variables previous time step
integer, intent(in) :: lsm, lsm_ruc, lsm_noahmp, iopt_snf
integer, intent(in) :: lsm, lsm_ruc, lsm_noahmp
real(kind=kind_phys), dimension(:), intent(inout) :: raincprv
real(kind=kind_phys), dimension(:), intent(inout) :: rainncprv
real(kind=kind_phys), dimension(:), intent(inout) :: iceprv
Expand Down Expand Up @@ -111,7 +111,6 @@ subroutine GFS_MP_generic_post_run(

real :: snowrat,grauprat,icerat,curat,prcpncfr,prcpcufr
real :: rhonewsnow,rhoprcpice,rhonewgr,rhonewice
real(kind=kind_phys), parameter :: rhowater = 1000.0_kind_phys

! Initialize CCPP error handling variables
errmsg = ''
Expand All @@ -136,7 +135,7 @@ subroutine GFS_MP_generic_post_run(
frozrb(i) = frozrb(i) + graupel0(i)
enddo
!Compute the variable precip ice density for specific LSM schemes and options
if ( lsm == lsm_ruc .or. lsm == lsm_noahmp .and. iopt_snf == 5 .or. vrbliceden_noah == .true.) then
if (exticeden) then
snowrat = 0.
grauprat = 0.
icerat = 0.
Expand Down
35 changes: 18 additions & 17 deletions physics/GFS_MP_generic_post.meta
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,14 @@
type = real
kind = kind_phys
intent = in
[rhowater]
standard_name = fresh_liquid_water_density_at_0c
long_name = density of liquid water
units = kg m-3
dimensions = ()
type = real
kind = kind_phys
intent = in
[dtf]
standard_name = timestep_for_dynamics
long_name = dynamics timestep
Expand Down Expand Up @@ -279,75 +287,68 @@
kind = kind_phys
intent = inout
[frzr]
standard_name = lwe_thickness_of_sfc_freezing_rain_amount
standard_name = cumulative_lwe_thickness_of_surface_freezing_rain_amount
long_name = accumulated surface freezing rain
units = m
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
intent = inout
[frzrb]
standard_name = lwe_thickness_of_sfc_freezing_rain_amount_in_bucket
standard_name = cumulative_lwe_thickness_of_surface_freezing_rain_amount_in_bucket
long_name = accumulated surface freezing rain in bucket
units = m
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
intent = inout
[frozr]
standard_name = lwe_thickness_of_sfc_graupel_amount
standard_name = cumulative_lwe_thickness_of_surface_graupel_amount
long_name = accumulated surface graupel
units = m
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
intent = inout
[frozrb]
standard_name = lwe_thickness_of_sfc_graupel_amount_in_bucket
standard_name = cumulative_lwe_thickness_of_surface_graupel_amount_in_bucket
long_name = accumulated surface graupel in bucket
units = m
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
intent = inout
[tsnowp]
standard_name = lwe_thickness_of_sfc_snow_amount
standard_name = cumulative_lwe_thickness_of_surface_snow_amount
long_name = accumulated surface snow
units = m
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
intent = inout
[tsnowpb]
standard_name = lwe_thickness_of_sfc_snow_amount_in_bucket
standard_name = cumulative_lwe_thickness_of_surface_snow_amount_in_bucket
long_name = accumulated surface snow in bucket
units = m
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
intent = inout
[rhonewsn1]
standard_name = lwe_density_of_precip_ice
standard_name = surface_frozen_precipitation_density
long_name = density of precipitation ice
units = kg m-3
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
intent = inout
[vrbliceden_noah]
standard_name = flag_for_vrbl_prcp_ice_den
long_name = flag for variable precip ice density
[exticeden]
standard_name = do_external_surface_frozen_precipitation_density
long_name = flag for calculating frozen precip ice density outside of the LSM
units = flag
dimensions = ()
type = logical
intent = in
[iopt_snf]
standard_name = control_for_land_surface_scheme_precipitation_type_partition
long_name = choice for precipitation partition option (see noahmp module for definition)
units = index
dimensions = ()
type = integer
intent = in
[save_t]
standard_name = air_temperature_save
long_name = air temperature before entering a physics scheme
Expand Down
6 changes: 3 additions & 3 deletions physics/lsm_noah.f
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ subroutine lsm_noah_run &
& bexppert, xlaipert, vegfpert,pertvegf, & ! sfc perts, mgehne
& albdvis_lnd, albdnir_lnd, albivis_lnd, albinir_lnd, &
& adjvisbmd, adjnirbmd, adjvisdfd, adjnirdfd, rhonewsn1, &
& vrbliceden_noah, &
& exticeden, &
! --- in/outs:
& weasd, snwdph, tskin, tprcp, srflag, smc, stc, slc, &
& canopy, trans, tsurf, zorl, &
Expand Down Expand Up @@ -272,7 +272,7 @@ subroutine lsm_noah_run &

logical, dimension(:), intent(in) :: flag_iter, flag_guess, land

logical, intent(in) :: lheatstrg, vrbliceden_noah
logical, intent(in) :: lheatstrg, exticeden

! --- in/out:
real (kind=kind_phys), dimension(:), intent(inout) :: weasd, &
Expand Down Expand Up @@ -531,7 +531,7 @@ subroutine lsm_noah_run &
& swdn, solnet, lwdn, sfcems, sfcprs, sfctmp, &
& sfcspd, prcp, q2, q2sat, dqsdt2, th2, ivegsrc, &
& vtype, stype, slope, shdmin1d, alb, snoalb1d, &
& rhonewsn, vrbliceden_noah, &
& rhonewsn, exticeden, &
& bexpp, xlaip, & ! sfc-perts, mgehne
& lheatstrg, &
! --- input/outputs:
Expand Down
8 changes: 4 additions & 4 deletions physics/lsm_noah.meta
Original file line number Diff line number Diff line change
Expand Up @@ -487,16 +487,16 @@
kind = kind_phys
intent = in
[rhonewsn1]
standard_name = lwe_density_of_precip_ice
standard_name = surface_frozen_precipitation_density
long_name = density of precipitation ice
units = kg m-3
dimensions = (horizontal_loop_extent)
type = real
kind = kind_phys
intent = in
[vrbliceden_noah]
standard_name = flag_for_vrbl_prcp_ice_den
long_name = flag for variable precip ice density
[exticeden]
standard_name = do_external_surface_frozen_precipitation_density
long_name = flag for calculating frozen precip ice density outside of the LSM
units = flag
dimensions = ()
type = logical
Expand Down
11 changes: 6 additions & 5 deletions physics/lsm_ruc.F90
Original file line number Diff line number Diff line change
Expand Up @@ -323,8 +323,8 @@ end subroutine lsm_ruc_finalize
subroutine lsm_ruc_run & ! inputs
& ( iter, me, master, delt, kdt, im, nlev, lsm_ruc, lsm, &
& imp_physics, imp_physics_gfdl, imp_physics_thompson, &
& imp_physics_nssl, &
& do_mynnsfclay, lsoil_ruc, lsoil, rdlai, xlat_d, xlon_d, zs,&
& imp_physics_nssl, do_mynnsfclay, exticeden, &
& lsoil_ruc, lsoil, rdlai, xlat_d, xlon_d, zs, &
& t1, q1, qc, stype, vtype, sigmaf, laixy, &
& dlwflx, dswsfc, tg3, coszen, land, icy, use_lake, &
& rainnc, rainc, ice, snow, graupel, &
Expand Down Expand Up @@ -397,6 +397,7 @@ subroutine lsm_ruc_run & ! inputs
logical, dimension(:), intent(in) :: flag_cice
logical, intent(in) :: frac_grid
logical, intent(in) :: do_mynnsfclay
logical, intent(in) :: exticeden

logical, intent(in) :: rdlai

Expand Down Expand Up @@ -747,7 +748,7 @@ subroutine lsm_ruc_run & ! inputs
acrunoff(i,j) = 0.0
snfallac_lnd(i,j) = 0.0
snfallac_ice(i,j) = 0.0
rhosnfr(i,j) = 0.0
rhosnfr(i,j) = -1.e3
precipfr(i,j) = 0.0

endif
Expand Down Expand Up @@ -1122,7 +1123,7 @@ subroutine lsm_ruc_run & ! inputs
& zs, prcp(i,j), sneqv_lnd(i,j), snowh_lnd(i,j), &
& sncovr_lnd(i,j), &
& ffrozp(i,j), frpcpn, &
& rhosnfr(i,j), precipfr(i,j), &
& rhosnfr(i,j), precipfr(i,j), exticeden, &
! --- inputs:
& conflx2(i,1,j), sfcprs(i,1,j), sfctmp(i,1,j), q2(i,1,j), &
& qcatm(i,1,j), rho2(i,1,j), semis_bck(i,j), lwdn(i,j), &
Expand Down Expand Up @@ -1396,7 +1397,7 @@ subroutine lsm_ruc_run & ! inputs
& zs, prcp(i,j), sneqv_ice(i,j), snowh_ice(i,j), &
& sncovr_ice(i,j), &
& ffrozp(i,j), frpcpn, &
& rhosnfr(i,j), precipfr(i,j), &
& rhosnfr(i,j), precipfr(i,j), exticeden, &
! --- inputs:
& conflx2(i,1,j), sfcprs(i,1,j), sfctmp(i,1,j), q2(i,1,j), &
& qcatm(i,1,j), rho2(i,1,j), semis_bck(i,j), lwdn(i,j), &
Expand Down
11 changes: 9 additions & 2 deletions physics/lsm_ruc.meta
Original file line number Diff line number Diff line change
Expand Up @@ -634,6 +634,13 @@
dimensions = ()
type = logical
intent = in
[exticeden]
standard_name = do_external_surface_frozen_precipitation_density
long_name = flag for calculating frozen precip ice density outside of the LSM
units = flag
dimensions = ()
type = logical
intent = in
[lsoil_ruc]
standard_name = vertical_dimension_of_soil_internal_to_land_surface_scheme
long_name = number of soil layers internal to land surface model
Expand Down Expand Up @@ -953,7 +960,7 @@
kind = kind_phys
intent = in
[rhonewsn1]
standard_name = lwe_density_of_precip_ice
standard_name = surface_frozen_precipitation_density
long_name = density of precipitation ice
units = kg m-3
dimensions = (horizontal_loop_extent)
Expand Down Expand Up @@ -1513,7 +1520,7 @@
kind = kind_phys
intent = out
[rhosnf]
standard_name = frozen_precipitation_density
standard_name = lsm_internal_surface_frozen_precipitation_density
long_name = density of frozen precipitation
units = kg m-3
dimensions = (horizontal_loop_extent)
Expand Down
Loading

0 comments on commit 9691f35

Please sign in to comment.