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
7 changes: 7 additions & 0 deletions Registry/Registry.EM_COMMON
Original file line number Diff line number Diff line change
Expand Up @@ -834,6 +834,9 @@ state real LF_URB2D_S ij misc 1 - i01r "LF_UR
# AHE with month and hour dimension flattened to one dimension, Jan = (0:23), Feb = (24:47)
state real AHE i{m_hr}j misc 1 - i01r "AHE" "Anthropogenic heat emission" "W m-2"

# Custom input for UrbanM4
state real HITCHHIKER ij misc 1 - irh "HITCHHIKER" "Custom variable inserted for testing" "dimensionless"

# lsm State Variables

state real SMOIS ilj - 1 Z i02rhd=(interp_mask_field:lu_index,iswater)u=(copy_fcnm) "SMOIS" "SOIL MOISTURE" "m3 m-3"
Expand Down Expand Up @@ -2547,6 +2550,10 @@ rconfig integer ishallow namelist,physics 1 0
rconfig real convtrans_avglen_m namelist,physics 1 30 rh "convtrans_avglen_m" "averaging time for convective transport output variables (minutes)" ""
rconfig integer num_land_cat namelist,physics 1 21 - "num_land_cat" "" ""
rconfig integer use_wudapt_lcz namelist,physics 1 0 - "use_wudapt_lcz" "" ""

# Custom namelist option for UrbanM4
rconfig integer use_hitchhiker namelist,physics 1 0 - "use_hitchhiker" "for testing addition of custom parameter" ""

rconfig logical slucm_distributed_drag namelist,physics 1 .false. rh "slucm_distributed_drag" "" ""
rconfig integer distributed_ahe_opt namelist,physics 1 0 rh "distributed_ahe_opt" "AHE handling: 0= no AHE, 1=add to first level temperature tendency, 2=add to surface sensible heat flux" ""
rconfig integer num_soil_cat namelist,physics 1 16 - "num_soil_cat" "" ""
Expand Down
1 change: 1 addition & 0 deletions dyn_em/module_first_rk_step_part1.F
Original file line number Diff line number Diff line change
Expand Up @@ -1087,6 +1087,7 @@ SUBROUTINE first_rk_step_part1 ( grid , config_flags &
& ,pert_noah_t=config_flags%pert_noah_t &
& ,pert_noah_smois=config_flags%pert_noah_smois &
& ,pert_noah_tslb=config_flags%pert_noah_tslb &
& ,HITCHHIKER=grid%hitchhiker & !UrbanM4
& )

#ifdef WRF_HYDRO
Expand Down
1 change: 1 addition & 0 deletions dyn_em/start_em.F
Original file line number Diff line number Diff line change
Expand Up @@ -1271,6 +1271,7 @@ SUBROUTINE start_domain_em ( grid, allowed_to_read &
,grid%NC_CU, grid%NI_CU, grid%NR_CU, grid%NS_CU,grid%CCN_CU &
,grid%alevsiz_cu,grid%num_months,grid%no_src_types_cu,grid%aeromcu &
,grid%aeropcu,grid%EFCG,grid%EFCS,grid%EFIG,grid%EFIS,grid%EFSG,grid%EFSS &
,grid%HITCHHIKER & ! UrbanM4
)
ENDDO ! loop of tiles for phy_init

Expand Down
9 changes: 8 additions & 1 deletion phys/module_physics_init.F
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,8 @@ SUBROUTINE phy_init ( id, config_flags, DT, restart, zfull, zhalf, &
,alevsiz_cu,num_months,no_src_types_cu,aeromcu,aeropcu & ! PSH/TWG 06/10/16
,EFCG,EFCS,EFIG,EFIS,EFSG,EFSS & ! TWG
#endif
)
,HITCHHIKER & !UrbanM4
)

!-----------------------------------------------------------------
USE module_domain
Expand Down Expand Up @@ -711,6 +712,7 @@ SUBROUTINE phy_init ( id, config_flags, DT, restart, zfull, zhalf, &
REAL, OPTIONAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT) :: MH_URB2D !SLUCM
REAL, OPTIONAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT) :: STDH_URB2D !SLUCM
REAL, OPTIONAL, DIMENSION( ims:ime, 4, jms:jme ), INTENT(INOUT) :: LF_URB2D !SLUCM
REAL, OPTIONAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT) :: HITCHHIKER !UrbanM4
REAL, OPTIONAL, DIMENSION(ims:ime, kms:kme, jms:jme), INTENT(INOUT) :: A_U_BEP
REAL, OPTIONAL, DIMENSION(ims:ime, kms:kme, jms:jme), INTENT(INOUT) :: A_V_BEP
REAL, OPTIONAL, DIMENSION(ims:ime, kms:kme, jms:jme), INTENT(INOUT) :: A_T_BEP
Expand Down Expand Up @@ -1524,6 +1526,7 @@ SUBROUTINE phy_init ( id, config_flags, DT, restart, zfull, zhalf, &
A_E_BEP,B_U_BEP,B_V_BEP, & !Optional multi-layer urban
B_T_BEP,B_Q_BEP,B_E_BEP,DLG_BEP, & !Optional multi-layer urban
DL_U_BEP,SF_BEP,VL_BEP, & !Optional multi-layer urban
HITCHHIKER , & !Optional UrbanM4
ids, ide, jds, jde, kds, kde, &
ims, ime, jms, jme, kms, kme, &
its, ite, jts, jte, kts, kte, &
Expand Down Expand Up @@ -2557,6 +2560,7 @@ SUBROUTINE bl_init(STEPBL,BLDT,DT,RUBLTEN,RVBLTEN,RTHBLTEN, &
A_E_BEP,B_U_BEP,B_V_BEP, & !Optional multi-layer urban
B_T_BEP,B_Q_BEP,B_E_BEP,DLG_BEP, & !Optional multi-layer urban
DL_U_BEP,SF_BEP,VL_BEP, & !Optional multi-layer urban
HITCHHIKER, & !Optional UrbanM4
ids, ide, jds, jde, kds, kde, &
ims, ime, jms, jme, kms, kme, &
its, ite, jts, jte, kts, kte, &
Expand Down Expand Up @@ -2943,6 +2947,7 @@ SUBROUTINE bl_init(STEPBL,BLDT,DT,RUBLTEN,RVBLTEN,RTHBLTEN, &
REAL, OPTIONAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT) :: MH_URB2D !SLUCM
REAL, OPTIONAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT) :: STDH_URB2D !SLUCM
REAL, OPTIONAL, DIMENSION( ims:ime, 4, jms:jme ), INTENT(INOUT) :: LF_URB2D !SLUCM
REAL, OPTIONAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT) :: HITCHHIKER !UrbanM4
REAL, OPTIONAL, DIMENSION(ims:ime, kms:kme, jms:jme), INTENT(INOUT) :: A_U_BEP
REAL, OPTIONAL, DIMENSION(ims:ime, kms:kme, jms:jme), INTENT(INOUT) :: A_V_BEP
REAL, OPTIONAL, DIMENSION(ims:ime, kms:kme, jms:jme), INTENT(INOUT) :: A_T_BEP
Expand Down Expand Up @@ -3337,6 +3342,7 @@ SUBROUTINE bl_init(STEPBL,BLDT,DT,RUBLTEN,RVBLTEN,RTHBLTEN, &
A_E_BEP,B_U_BEP,B_V_BEP, & !multi-layer urban
B_T_BEP,B_Q_BEP,B_E_BEP,DLG_BEP, & !multi-layer urban
DL_U_BEP,SF_BEP,VL_BEP, & !multi-layer urban
HITCHHIKER, & !UrbanM4
FRC_URB2D, UTYPE_URB2D,config_flags%use_wudapt_lcz) !urban


Expand Down Expand Up @@ -3480,6 +3486,7 @@ SUBROUTINE bl_init(STEPBL,BLDT,DT,RUBLTEN,RVBLTEN,RTHBLTEN, &
A_E_BEP,B_U_BEP,B_V_BEP, & !multi-layer urban
B_T_BEP,B_Q_BEP,B_E_BEP,DLG_BEP, & !multi-layer urban
DL_U_BEP,SF_BEP,VL_BEP, & !multi-layer urban
HITCHHIKER, & !UrbanM4
FRC_URB2D, UTYPE_URB2D,config_flags%use_wudapt_lcz)!urban

max_utype_urb2d = maxval(UTYPE_URB2D)*1.0
Expand Down
10 changes: 10 additions & 0 deletions phys/module_sf_clm.F
Original file line number Diff line number Diff line change
Expand Up @@ -58870,6 +58870,7 @@ subroutine clmdrv(zgcmxy ,forc_qxy ,ps ,forc_txy ,tsxy &
, dwt_livecrootn_to_cwdn,dwt_deadcrootn_to_cwdn,retransn &
#endif
,nlcat,landusef,num_pft_input,pct_pft_input,input_pft_flag &
,HITCHHIKER &
)


Expand Down Expand Up @@ -59299,6 +59300,11 @@ subroutine clmdrv(zgcmxy ,forc_qxy ,ps ,forc_txy ,tsxy &
INTEGER, DIMENSION( ims:ime, jms:jme ), INTENT(IN) :: UTYPE_URB2D


! UrbanM4
REAL, OPTIONAL, DIMENSION( ims:ime, jms:jme ), INTENT(IN) :: HITCHHIKER
REAL :: HITCH ! SCALAR VALUE OF HITCHHIKER FIELD AT THIS POINT [-]


! output variables urban --> lsm
REAL :: TS_URB ! surface radiative temperature [K]
REAL :: QS_URB ! surface humidity [-]
Expand Down Expand Up @@ -60327,6 +60333,9 @@ subroutine clmdrv(zgcmxy ,forc_qxy ,ps ,forc_txy ,tsxy &
z0_urb = 0
vegfrac = 0
!
! UrbanM4
HITCH = 0.
!

! Call urban
!sw++
Expand Down Expand Up @@ -60355,6 +60364,7 @@ subroutine clmdrv(zgcmxy ,forc_qxy ,ps ,forc_txy ,tsxy &
TGRL_URB,SMR_URB,CMGR_URB, CHGR_URB, jmonth, & ! H
DRELR_URB,DRELB_URB, & ! H
DRELG_URB,FLXHUMR_URB,FLXHUMB_URB,FLXHUMG_URB, &
HITCH, & ! UrbanM4
lf_urb_s, z0_urb, vegfrac)
!sw--

Expand Down
26 changes: 22 additions & 4 deletions phys/module_sf_noahdrv.F
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ SUBROUTINE lsm(DZ8W,QV3D,P8W3D,T3D,TSK, &
,SDA_HFX, SDA_QFX, HFX_BOTH, QFX_BOTH, QNORM, fasdas & !fasdas
,RC2,XLAI2 &
,IRR_CHAN &
)
,HITCHHIKER) ! UrbanM4

!----------------------------------------------------------------
IMPLICIT NONE
Expand Down Expand Up @@ -466,6 +466,7 @@ SUBROUTINE lsm(DZ8W,QV3D,P8W3D,T3D,TSK, &
REAL, OPTIONAL, DIMENSION( ims:ime, kms:kme, jms:jme ), INTENT(IN) :: P_PHY
REAL, OPTIONAL, DIMENSION( ims:ime, kms:kme, jms:jme ), INTENT(IN) :: RHO
REAL, OPTIONAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT) :: UST
REAL, OPTIONAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT) :: HITCHHIKER

LOGICAL, intent(in) :: rdlai2d
LOGICAL, intent(in) :: USEMONALB
Expand Down Expand Up @@ -596,6 +597,7 @@ SUBROUTINE lsm(DZ8W,QV3D,P8W3D,T3D,TSK, &
REAL :: lp_urb
REAL :: hgt_urb
REAL, DIMENSION(4) :: lf_urb
REAL :: HITCH ! UrbanM4 test variable [-]
! Distributed aerodynamics parameters
REAL :: lf_urb_s
REAL :: z0_urb
Expand Down Expand Up @@ -1427,6 +1429,9 @@ SUBROUTINE lsm(DZ8W,QV3D,P8W3D,T3D,TSK, &
lf_urb_s = lf_urb2d_s(I, J)
z0_urb = z0_urb2d(I, J)
vegfrac = vegfra(I, J) / 100

! UrbanM4
HITCH = HITCHHIKER(I, J)
!
! Call urban
CALL cal_mon_day(julian,julyr,jmonth,jday)
Expand All @@ -1451,7 +1456,9 @@ SUBROUTINE lsm(DZ8W,QV3D,P8W3D,T3D,TSK, &
TGRL_URB,SMR_URB,CMGR_URB,CHGR_URB,jmonth, & ! H
DRELR_URB,DRELB_URB, & ! H
DRELG_URB,FLXHUMR_URB,FLXHUMB_URB,FLXHUMG_URB, &
lf_urb_s, z0_urb, vegfrac)
lf_urb_s, z0_urb, vegfrac, &
HITCH & ! UrbanM4
)

#if 0
IF(IPRINT) THEN
Expand Down Expand Up @@ -2456,6 +2463,7 @@ SUBROUTINE lsm_mosaic(DZ8W,QV3D,P8W3D,T3D,TSK, &
,SDA_HFX, SDA_QFX, HFX_BOTH, QFX_BOTH, QNORM, fasdas & !fasdas
,RC2,XLAI2 & !O
,IRR_CHAN &
,HITCHHIKER & !UrbanM4
)

!----------------------------------------------------------------
Expand Down Expand Up @@ -2798,6 +2806,7 @@ SUBROUTINE lsm_mosaic(DZ8W,QV3D,P8W3D,T3D,TSK, &
REAL, OPTIONAL, DIMENSION( ims:ime, kms:kme, jms:jme ), INTENT(IN) :: P_PHY
REAL, OPTIONAL, DIMENSION( ims:ime, kms:kme, jms:jme ), INTENT(IN) :: RHO
REAL, OPTIONAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT) :: UST
REAL, OPTIONAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT) :: HITCHHIKER

LOGICAL, intent(in) :: rdlai2d
LOGICAL, intent(in) :: USEMONALB
Expand Down Expand Up @@ -2926,6 +2935,7 @@ SUBROUTINE lsm_mosaic(DZ8W,QV3D,P8W3D,T3D,TSK, &
REAL :: lp_urb
REAL :: hgt_urb
REAL, DIMENSION(4) :: lf_urb
REAL :: HITCH ! UrbanM4 test variable [-]
! Distributed aerodynamics parameters
REAL :: lf_urb_s
REAL :: z0_urb
Expand Down Expand Up @@ -3883,6 +3893,8 @@ SUBROUTINE lsm_mosaic(DZ8W,QV3D,P8W3D,T3D,TSK, &
lf_urb_s = lf_urb2d_s(I, J)
z0_urb = z0_urb2d(I, J)
vegfrac = vegfra(I, J) / 100.
! UrbanM4
HITCH = HITCHHIKER(I, J)
!
! Call urban
CALL cal_mon_day(julian,julyr,jmonth,jday)
Expand All @@ -3907,7 +3919,9 @@ SUBROUTINE lsm_mosaic(DZ8W,QV3D,P8W3D,T3D,TSK, &
TGRL_URB,SMR_URB,CMGR_URB,CHGR_URB,jmonth, & ! H
DRELR_URB,DRELB_URB, & ! H
DRELG_URB,FLXHUMR_URB,FLXHUMB_URB,FLXHUMG_URB, &
lf_urb_s, z0_urb, vegfrac)
lf_urb_s, z0_urb, vegfrac, &
HITCH & ! UrbanM4
)

#if 0
IF(IPRINT) THEN
Expand Down Expand Up @@ -4763,6 +4777,8 @@ SUBROUTINE lsm_mosaic(DZ8W,QV3D,P8W3D,T3D,TSK, &
z0_urb = z0_urb2d(I, J)
vegfrac = vegfra(I, J) / 100.0

! UrbanM4
HITCH = HITCHHIKER(I, J)
!
! Call urban
CALL cal_mon_day(julian,julyr,jmonth,jday)
Expand All @@ -4787,7 +4803,9 @@ SUBROUTINE lsm_mosaic(DZ8W,QV3D,P8W3D,T3D,TSK, &
TGRL_URB,SMR_URB,CMGR_URB,CHGR_URB,jmonth, & ! H
DRELR_URB,DRELB_URB, & ! H
DRELG_URB,FLXHUMR_URB,FLXHUMB_URB,FLXHUMG_URB, &
lf_urb_s, z0_urb, vegfrac)
lf_urb_s, z0_urb, vegfrac, &
HITCH & ! UrbanM4
)

#if 0
IF(IPRINT) THEN
Expand Down
9 changes: 9 additions & 0 deletions phys/module_sf_urban.F
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,7 @@ SUBROUTINE urban(LSOLAR, & ! L
lp_urb,hgt_urb,frc_urb,lb_urb,zo_check, & ! O
CMCR,TGR,TGRL,SMR,CMGR_URB,CHGR_URB,jmonth, & ! H
DRELR,DRELB,DRELG,FLXHUMR,FLXHUMB,FLXHUMG, &
HITCH, & ! I
lf_urb_s, z0_urb, vegfrac_in)

IMPLICIT NONE
Expand Down Expand Up @@ -402,6 +403,10 @@ SUBROUTINE urban(LSOLAR, & ! L
REAL, INTENT(INOUT) :: zo_check ! check for printing ZOC

!-------------------------------------------------------------------------------
! I: Urban-M4 spatially explicit parameters for SLUCM
!-------------------------------------------------------------------------------
REAL, INTENT(IN) :: HITCH ! test added state variable [-]
!-------------------------------------------------------------------------------
! I: Distributed aerodynamics parameters
!-------------------------------------------------------------------------------
REAL, INTENT(IN) :: lf_urb_s ! frontal area index [-]
Expand Down Expand Up @@ -2598,9 +2603,13 @@ SUBROUTINE urban_var_init(ISURBAN, TSURFACE0_URB,TLAYER0_URB,TDEEP0_URB,IVGTYP,
A_E_BEP,B_U_BEP,B_V_BEP, & ! inout multi-layer urban
B_T_BEP,B_Q_BEP,B_E_BEP,DLG_BEP, & ! inout multi-layer urban
DL_U_BEP,SF_BEP,VL_BEP, & ! inout multi-layer urban
HITCHHIKER, & ! UrbanM4
FRC_URB2D, UTYPE_URB2D,USE_WUDAPT_LCZ) ! inout
IMPLICIT NONE

! UrbanM4
REAL, DIMENSION( ims:ime, jms:jme ), INTENT(INOUT) :: HITCHHIKER

INTEGER, INTENT(IN) :: ISURBAN, sf_urban_physics,use_wudapt_lcz
INTEGER, INTENT(IN) :: LCZ_1,LCZ_2,LCZ_3,LCZ_4,LCZ_5,LCZ_6,LCZ_7,LCZ_8,LCZ_9,LCZ_10,LCZ_11
INTEGER, INTENT(IN) :: ims,ime,jms,jme,kms,kme,num_soil_layers
Expand Down
Loading