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
13 changes: 11 additions & 2 deletions Registry/Registry.EM_COMMON
Original file line number Diff line number Diff line change
Expand Up @@ -754,6 +754,7 @@ state real slope ij misc 1 - rdu "SLOP
state real slp_azi ij misc 1 - rdu "SLP_AZI" "ELEVATION SLOPE AZIMUTH" "rad"
state real shdmax ij misc 1 - i012rhd=(interp_mask_field:lu_index,iswater)u=(copy_fcnm) "SHDMAX" "ANNUAL MAX VEG FRACTION" ""
state real shdmin ij misc 1 - i012rhd=(interp_mask_field:lu_index,iswater)u=(copy_fcnm) "SHDMIN" "ANNUAL MIN VEG FRACTION" ""
state real shdavg ij misc 1 - i012rhd=(interp_mask_field:lu_index,iswater)u=(copy_fcnm) "SHDAVG" "ANNUAL AVG VEG FRACTION" ""
state real snoalb ij misc 1 - i012rhd "SNOALB" "ANNUAL MAX SNOW ALBEDO IN FRACTION" ""
state real toposoil ij misc 1 - i12 "SOILHGT" "ELEVATION OF LSM DATA" "m"
state real landusef iuj misc 1 Z i012rdu "LANDUSEF" "LANDUSE FRACTION BY CATEGORY" ""
Expand Down Expand Up @@ -807,14 +808,20 @@ state real DZR l em - Z r "DZR"
state real DZB l em - Z r "DZB" "THICKNESSES OF WALL LAYERS" "m"
state real DZG l em - Z r "DZG" "THICKNESSES OF ROAD LAYERS" "m"
state real URB_PARAM i{urb}j misc 1 - i1 "URB_PARAM" "NUDAPT_NBSD Urban Parameters" "parameter"
state real LP_URB2D ij misc 1 - ir "BUILD_AREA_FRACTION" "BUILDING PLAN AREA DENSITY" "dimensionless"
state real LP_URB2D ij misc 1 - i01r "BUILD_AREA_FRACTION" "BUILDING PLAN AREA DENSITY" "dimensionless"
state real HI_URB2D i{uhi}j misc 1 Z ir "HEIGHT_HISTOGRAMS" "DISTRIBUTION OF BUILDING HEIGHTS" "dimensionless"
state real LB_URB2D ij misc 1 - ir "BUILD_SURF_RATIO" "BUILDING SURFACE AREA TO PLAN AREA RATIO" "dimensionless"
state real HGT_URB2D ij misc 1 - ir "BUILD_HEIGHT" "AVERAGE BUILDING HEIGHT WEIGHTED BY BUILDING PLAN AREA" "m"
state real MH_URB2D ij misc 1 - ir "MH_URB2D" "Mean Building Height" "m"
state real MH_URB2D ij misc 1 - i01r "MH_URB2D" "Mean Building Height" "m"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dudhia What is the difference between "i" and "i01"?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cenlinhe Here letter i represents input data. The number 0 means it is part of wrfinput, output from real, and input to the model, and 1 is the input to real program or the met_em output data.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@weiwangncar If we do not specify "0" and/or "1" after "i", does it mean it can be in any input files or by default assume it is from wrfinput? For example, for variables like HGT_URB2D, they are only specified as "i" instead of "i01".

Copy link
Contributor

@cenlinhe cenlinhe Jan 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@weiwangncar @dudhia Since these variables are optional (i.e., users may not provide these in their geo_em input file), I think it should be set to "i" instead of "i01". Otherwise, WRF will look for these variables in wrfinput or met_em files, and report errors? Is this correct?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cenlinhe Sorry I missed these comments. If you just have an 'i', that variable is only appearing in wrfinput - whether it has value will depend on what real does. If there is no input to real, the array may be all zero. If the data comes from geogrid and metgrid, it should be set to i01.

state real STDH_URB2D ij misc 1 - ir "STDH_URB2D" "Standard Deviation of Building Height" "m2"
state real LF_URB2D i{udr}j misc 1 Z ir "LF_URB2D" "Frontal Area Index" "dimensionless"

state real ZD_URB2D ij misc 1 - i1 "ZD_URB2D" "Zero-plane Displacement" "m"
state real Z0_URB2D ij misc 1 - i01r "Z0_URB2D" "Roughness length for momentum" "m"
state real LF_URB2D_S ij misc 1 - i01r "LF_URB2D_S" "Frontal area index (no wind directional dependency)" ""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@epn09 what is the difference between LF_URB2D_S and LF_URB2D? Why do you need to create this new variable instead of using the existing LF_URB2D?

Copy link
Contributor Author

@epn09 epn09 Jan 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cenlinhe S in LF_URB2D_S means "single". If my understanding is right, LF_URB2D has 4 values for 4 wind direction, but our dataset only have one value for all wind direction. So, I created this new variable.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I see. This makes sense.

# 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"

# 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 @@ -2515,6 +2522,8 @@ 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" "" ""
rconfig logical use_distributed_aerodynamics namelist,physics 1 .false. rh "use_distributed_aerodynamics" "" ""
rconfig integer distributed_ahe_opt namelist,physics 1 1 rh "distributed_ahe_opt" "AHE handling: 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" "" ""
rconfig integer mp_zero_out namelist,physics 1 0 - "mp_zero_out" "microphysics fields set to zero 0=no action taken, 1=all fields but Qv, 2=all fields including Qv" "flag"
rconfig real mp_zero_out_thresh namelist,physics 1 1.e-8 - "mp_zero_out_thresh" "minimum threshold for non-Qv moist fields, below are set to zero" "kg/kg"
Expand Down
2 changes: 2 additions & 0 deletions Registry/registry.dimspec
Original file line number Diff line number Diff line change
Expand Up @@ -140,3 +140,5 @@ endif
# Dimensions for PSU-DENG SCP
dimspec nsh 2 constant=100 z nsh

# Dimensions for AHE
dimspec m_hr 2 constant=(0:287) z month_hour
5 changes: 5 additions & 0 deletions dyn_em/module_first_rk_step_part1.F
Original file line number Diff line number Diff line change
Expand Up @@ -644,6 +644,7 @@ SUBROUTINE first_rk_step_part1 ( grid , config_flags &
& ,BL_PBL_PHYSICS=config_flags%bl_pbl_physics &
& ,SF_SURFACE_PHYSICS=config_flags%sf_surface_physics ,SH2O=grid%sh2o &
& ,SHDMAX=grid%shdmax ,SHDMIN=grid%shdmin ,SMOIS=grid%smois &
& ,SHDAVG=grid%shdavg &
& ,SMSTAV=grid%smstav ,SMSTOT=grid%smstot ,SNOALB=grid%snoalb &
& ,SNOW=grid%snow ,SNOWC=grid%snowc ,SNOWH=grid%snowh &
& ,SMCREL=grid%smcrel &
Expand Down Expand Up @@ -810,6 +811,7 @@ SUBROUTINE first_rk_step_part1 ( grid , config_flags &
& ,urban_map_zgrd = config_flags%urban_map_zgrd & !multi-layer urban
& ,NUM_URBAN_HI=config_flags%num_urban_hi & !multi-layer urban
& ,use_wudapt_lcz=config_flags%use_wudapt_lcz & !wudapt
& ,use_distributed_aerodynamics=config_flags%use_distributed_aerodynamics & !SLUCM
& ,TSK_RURAL=grid%tsk_rural & !multi-layer urban
& ,TRB_URB4D=grid%trb_urb4d,TW1_URB4D=grid%tw1_urb4d & !multi-layer urban
& ,TW2_URB4D=grid%tw2_urb4d,TGB_URB4D=grid%tgb_urb4d & !multi-layer urban
Expand Down Expand Up @@ -846,6 +848,7 @@ SUBROUTINE first_rk_step_part1 ( grid , config_flags &
& ,LB_URB2D=grid%lb_urb2d,HGT_URB2D=grid%hgt_urb2d & !multi-layer urban
& ,MH_URB2D=grid%mh_urb2d,STDH_URB2D=grid%stdh_urb2d & !SLUCM
& ,LF_URB2D=grid%lf_urb2d &
& ,lf_urb2d_s=grid%lf_urb2d_s, z0_urb2d=grid%z0_urb2d &
& ,GMT=grid%gmt,XLAT=grid%xlat,XLONG=grid%xlong,JULDAY=grid%julday &
& ,A_U_BEP=grid%a_u_bep,A_V_BEP=grid%a_v_bep,A_T_BEP=grid%a_t_bep &
& ,A_Q_BEP=grid%a_q_bep &
Expand Down Expand Up @@ -1155,6 +1158,8 @@ SUBROUTINE first_rk_step_part1 ( grid , config_flags &
! Bep changes end
! add tke_pbl, and turbulent fluxes
& ,TKE_PBL=grid%tke_pbl,EL_PBL=grid%el_pbl,WU_TUR=grid%wu_tur &
& , gmt=grid%gmt, xtime=grid%xtime, julday=grid%julday, julyr=grid%julyr
& , ahe=grid%ahe, distributed_ahe_opt=grid%distributed_ahe_opt
& ,WV_tur=grid%wv_tur,WT_tur=grid%wt_tur,WQ_tur=grid%wq_tur &
& ,DISS_PBL=grid%diss_pbl,TPE_PBL=grid%tpe_pbl &
& ,TKE_ADV=scalar(ims,kms,jms,P_tke_adv) &
Expand Down
55 changes: 55 additions & 0 deletions dyn_em/module_initialize_real.F
Original file line number Diff line number Diff line change
Expand Up @@ -617,6 +617,15 @@ SUBROUTINE init_domain_rk ( grid &
END IF
END IF

IF (config_flags%use_distributed_aerodynamics) THEN
CALL wrf_message('Adding zero-plane displacement height to topography')
DO j = jts, MIN(jde - 1, jte)
DO i = its, MIN(ide - 1, ite)
IF (grid%zd_urb2d(i, j) > 0) grid%ht_gc(i, j) = grid%ht_gc(i, j) + grid%zd_urb2d(i, j)
END DO
END DO
END IF

! Is there any vertical interpolation to do? The "old" data comes in on the correct
! vertical locations already.

Expand Down Expand Up @@ -1330,6 +1339,11 @@ SUBROUTINE init_domain_rk ( grid &
ims , ime , jms , jme , kms , kme , &
its , ite , jts , jte , kts , kte )

CALL monthly_avg ( grid%greenfrac , grid%shdavg , &
ids , ide , jds , jde , kds , kde , &
ims , ime , jms , jme , kms , kme , &
its , ite , jts , jte , kts , kte )

! The model expects the green-ness and vegetation fraction values to be in percent, not fraction.

DO j = jts, MIN(jte,jde-1)
Expand All @@ -1338,6 +1352,7 @@ SUBROUTINE init_domain_rk ( grid &
grid%vegfra(i,j) = grid%vegfra(i,j) * 100.
grid%shdmax(i,j) = grid%shdmax(i,j) * 100.
grid%shdmin(i,j) = grid%shdmin(i,j) * 100.
grid%shdavg(i,j) = grid%shdavg(i,j) * 100.
END DO
END DO

Expand Down Expand Up @@ -3089,6 +3104,16 @@ SUBROUTINE init_domain_rk ( grid &

! Split NUDAPT Urban Parameters

distributed_aerodynamics_if: IF (config_flags%sf_urban_physics == 1 .AND. config_flags%use_distributed_aerodynamics) THEN
DO j = jts , MIN(jde-1,jte)
DO i = its , MIN(ide-1,ite)
IF (grid%ivgtyp(i, j) == model_config_rec%isurban(grid%id)) THEN
Copy link
Contributor

@cenlinhe cenlinhe Jan 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to also include a treatment for urban LCZ type so that the model will not produce weird values for LCZ pixels. If this scheme does not work with LCZ, then add a if-statement here to show error message for this incompatibility.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cenlinhe This is fixed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cenlinhe I added if-statement and error messages to share/module_check_a_mundo.F.

grid%frc_urb2d(i, j) = MAX(0.1, MIN(0.9, 1 - grid%shdavg(i, j) / 100.))
Copy link
Contributor

@cenlinhe cenlinhe Jan 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@epn09 not sure if this is a good way to estimate urban fraction (=1-vegfrac), why not using the LAND_USE_F variable to read in the urban fraction? Also, I think the shdmax should be used instead of shdavg.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cenlinhe Please correct me if I'm wrong but LANDUSEF is not so good because it's derived from land use map (for example, MODIS). If a WRF grid will all MODIS grids classified as urban, the WRF grid will have LANDUSEF(urban) = 100. But from our experience and from reality, 100% urban cover is really rare. So we assume that urban fraction + vegetation fraction = 1, because even in 100% urban cover grid there is still some vegetation fraction in the input data.

As for the shdmax, I think if we do that urban fraction might be a little bit small because trees in its growth season can cover very high fraction of the ground. On the other hand, shdmin may make urban fraction too big. Hence, I use the value in the middle shdavg.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, this makes sense, at least for now. more tests with the impact of shdavg vs shdmax are needed in the future.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tslin2 @epn09 OK, let me comment here since this is probably the first place where it showed up. I think I understood what Khanh is trying to do here. If there is no other data source for FRC_URB2D, one can come up with a few ways to assign FRC_URB2D values. It used to be that FRC_URB2D is prescribed in the URBPARM.TBL (e.g., 0.5 for low intensity residential urban etc). With NLCD data, FRC_URB2D is actually estimated from NLCD and is no longer using prescribed values from URBPARM.TBL. Now this part of code is trying to assign FRC_URB2D based on vegetation fraction, which is not a terrible idea. But this will limit the compatibility of this code with potentially new land use/land cover data that can provide FRC_URB2D.

Khanh (first of all, congratulations on becoming a doctor, way to go), regarding If a WRF grid will all MODIS grids classified as urban, the WRF grid will have LANDUSEF(urban) = 100, this is not true actually. LANDUSEF is always computed based on land use land cover data in WPS, and stored and passed to WRF. But it is not used when the mosaic approach is not enacted. In a somewhat similar way, FRC_URB2D can be also computed using land use land cover data (especially with high resolution data like NLCD) and it is actually used by WRF (at least before LCZ was introduced, I don't know the details after LCZ is introduced).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DanLi-BU Thanks for your note about NLCD. Well-noted.

END IF
END DO
END DO
ELSE

IF ( ( config_flags%sf_urban_physics == 1 ) .OR. ( config_flags%sf_urban_physics == 2 ) .OR. ( config_flags%sf_urban_physics == 3 ) ) THEN
DO j = jts , MIN(jde-1,jte)
DO i = its , MIN(ide-1,ite)
Expand Down Expand Up @@ -3145,6 +3170,8 @@ SUBROUTINE init_domain_rk ( grid &
END DO
END DO

END IF distributed_aerodynamics_if

END IF

! Adjustments for the seaice field PRIOR to the grid%tslb computations. This is
Expand Down Expand Up @@ -7922,6 +7949,34 @@ SUBROUTINE monthly_min_max ( field_in , field_min , field_max , &

END SUBROUTINE monthly_min_max

!---------------------------------------------------------------------

SUBROUTINE monthly_avg ( field_in , field_avg , &
ids , ide , jds , jde , kds , kde , &
ims , ime , jms , jme , kms , kme , &
its , ite , jts , jte , kts , kte )

IMPLICIT NONE

INTEGER , INTENT(IN) :: ids , ide , jds , jde , kds , kde , &
ims , ime , jms , jme , kms , kme , &
its , ite , jts , jte , kts , kte

REAL , DIMENSION(ims:ime,12,jms:jme) , INTENT(IN) :: field_in
REAL , DIMENSION(ims:ime, jms:jme) , INTENT(OUT) :: field_avg

! Local vars

INTEGER :: i , j

DO j = jts , MIN(jde-1,jte)
DO i = its , MIN(ide-1,ite)
field_avg(i, j) = SUM(field_in(i, :, j)) / 12
END DO
END DO

END SUBROUTINE monthly_avg

!---------------------------------------------------------------------

SUBROUTINE monthly_interp_to_date ( field_in , date_str , field_out , &
Expand Down
30 changes: 30 additions & 0 deletions phys/module_pbl_driver.F
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ SUBROUTINE pbl_driver( &
,tke_adv,diss_adv,tpe_adv &
,pr_pbl,el_pbl &
,wu_tur,wv_tur,wt_tur,wq_tur &
! variables added for AHE
, gmt, xtime, julday, julyr, ahe &
, distributed_ahe_opt &
! variables for GBM PBL
,exch_tke, rthraten &
,a_e_bep,b_e_bep,dlg_bep,dl_u_bep &
Expand Down Expand Up @@ -199,6 +202,7 @@ SUBROUTINE pbl_driver( &
USE module_bl_fogdes
USE module_wind_fitch
#endif
use module_ra_gfdleta, only: cal_mon_day

! This driver calls subroutines for the PBL parameterizations.
!
Expand Down Expand Up @@ -610,6 +614,11 @@ SUBROUTINE pbl_driver( &
REAL, DIMENSION( ims:ime, kms:kme, jms:jme ), &
INTENT(OUT) :: EL_PBL

REAL, INTENT(IN) :: gmt, xtime
INTEGER, INTENT(IN) :: julday, julyr
REAL, OPTIONAL, DIMENSION( ims:ime, 0:287, jms:jme ), INTENT(IN) :: ahe
INTEGER, INTENT(IN) :: distributed_ahe_opt

REAL , INTENT(IN ) :: u_frame, &
v_frame
!
Expand Down Expand Up @@ -820,6 +829,7 @@ SUBROUTINE pbl_driver( &
integer iu_bep,iurb,idiff
real seamask,thsk,zzz,unew,vnew,tnew,qnew,umom,vmom
REAL :: z0,z1,z2,w1,w2
INTEGER :: ihour, jmonth, jday
!
! FASDAS
!
Expand Down Expand Up @@ -2203,6 +2213,26 @@ SUBROUTINE pbl_driver( &
,ITS=its,ITE=ite,JTS=jts,JTE=jte,KTS=kts,KTE=kte)
ENDIF


IF (PRESENT(ahe)) THEN
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@epn09 This may not be the best place to add this anthropogenic heating flux. First, if putting it in this pbl driver module, should it be added to a place after land surface model and urban scheme is called? Second, it may be better to include this to the SLUCM code module instead of pbl driver to avoid messing up with other physics.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cenlinhe The reason we didn't add AH flux to the urban scheme is because the construction of the AH dataset did not assume that AH comes from only urban.

  • Energy loss are distributed equally for all grids within a country.
  • There are strong point sources of AH (power station, steel mills) that do not necessarily belong to urban grids.

What's your opinion on this?

The full paper is available here (https://www.nature.com/articles/s41597-021-00850-w).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I see. This makes sense to me, as the AH is not only for urban AH. power station may also belong to urban?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cenlinhe Power station may be in either rural or urban. When constructing the AH dataset we did not make that distinction.

call cal_mon_day(julday, julyr, jmonth, jday)
ihour = (jmonth - 1) * 24 + MOD(INT(gmt + xtime / 60.0), 24)
IF (distributed_ahe_opt == 1) THEN
DO j = jts, jte
DO i = its, ite
! Volumetric heat capacity of air = 1200 J/(K m3)
RTHBLTEN(i, 1, j) = RTHBLTEN(i, 1, j) + ahe(i, ihour, j) / 1200 / DZ8W(i, 1, j)
END DO
END DO
ELSE IF (distributed_ahe_opt == 2) THEN
DO j = jts, jte
DO i = its, ite
HFX(i, j) = HFX(i, j) + ahe(i, ihour, j)
END DO
END DO
END IF
END IF

ENDDO
!$OMP END PARALLEL DO

Expand Down
7 changes: 4 additions & 3 deletions phys/module_physics_init.F
Original file line number Diff line number Diff line change
Expand Up @@ -3302,7 +3302,8 @@ SUBROUTINE bl_init(STEPBL,BLDT,DT,RUBLTEN,RVBLTEN,RTHBLTEN, &

IF ( PRESENT( FRC_URB2D ) .AND. PRESENT( UTYPE_URB2D )) THEN
CALL urban_param_init(DZR,DZB,DZG,num_soil_layers, & !urban
sf_urban_physics,config_flags%use_wudapt_lcz) !urban
sf_urban_physics,config_flags%use_wudapt_lcz, &
config_flags%use_distributed_aerodynamics)


CALL urban_var_init(ISURBAN,TSK,TSLB,TMN,IVGTYP, & !urban
Expand Down Expand Up @@ -3351,7 +3352,6 @@ SUBROUTINE bl_init(STEPBL,BLDT,DT,RUBLTEN,RVBLTEN,RTHBLTEN, &
DL_U_BEP,SF_BEP,VL_BEP, & !multi-layer urban
FRC_URB2D, UTYPE_URB2D,config_flags%use_wudapt_lcz) !urban


max_utype_urb2d = maxval(UTYPE_URB2D)*1.0
#if ( defined( DM_PARALLEL ) && ( ! defined( STUBMPI ) ) )
max_utype_urb2d = wrf_dm_max_real(max_utype_urb2d)
Expand Down Expand Up @@ -3445,7 +3445,8 @@ SUBROUTINE bl_init(STEPBL,BLDT,DT,RUBLTEN,RVBLTEN,RTHBLTEN, &
IF ((SF_URBAN_PHYSICS.eq.1).OR.(SF_URBAN_PHYSICS.EQ.2).OR.(SF_URBAN_PHYSICS.EQ.3)) THEN
IF ( PRESENT( FRC_URB2D ) .AND. PRESENT( UTYPE_URB2D )) THEN
CALL urban_param_init(DZR,DZB,DZG,num_soil_layers, & !urban
sf_urban_physics,config_flags%use_wudapt_lcz)
sf_urban_physics,config_flags%use_wudapt_lcz, &
config_flags%use_distributed_aerodynamics)
CALL urban_var_init(ISURBAN,TSK,TSLB,TMN,IVGTYP, & !urban
ims,ime,jms,jme,kms,kme,num_soil_layers, & !urban
LCZ_1_TABLE,LCZ_2_TABLE,LCZ_3_TABLE,LCZ_4_TABLE, & !urban
Expand Down
12 changes: 11 additions & 1 deletion phys/module_sf_clm.F
Original file line number Diff line number Diff line change
Expand Up @@ -59346,6 +59346,11 @@ subroutine clmdrv(zgcmxy ,forc_qxy ,ps ,forc_txy ,tsxy &
real :: mh_urb,stdh_urb,lp_urb,hgt_urb,frc_urb,lb_urb,check
real, dimension(4) :: lf_urb

! Distributed aerodynamics parameters
real :: lf_urb_s
real :: z0_urb
real :: vegfrac

logical, external :: wrf_dm_on_monitor

! ----------------------------------------------------------------------
Expand Down Expand Up @@ -60318,6 +60323,10 @@ subroutine clmdrv(zgcmxy ,forc_qxy ,ps ,forc_txy ,tsxy &
enddo
frc_urb = FRC_URB2D(I,J)
check = 0.
! Distributed aerodynamics
lf_urb_s = 0
z0_urb = 0
vegfrac = 0
!

! Call urban
Expand Down Expand Up @@ -60346,7 +60355,8 @@ subroutine clmdrv(zgcmxy ,forc_qxy ,ps ,forc_txy ,tsxy &
hgt_urb,frc_urb,lb_urb, check,CMCR_URB,TGR_URB, & ! H
TGRL_URB,SMR_URB,CMGR_URB, CHGR_URB, jmonth, & ! H
DRELR_URB,DRELB_URB, & ! H
DRELG_URB,FLXHUMR_URB,FLXHUMB_URB,FLXHUMG_URB)
DRELG_URB,FLXHUMR_URB,FLXHUMB_URB,FLXHUMG_URB, &
lf_urb_s, z0_urb, vegfrac)
!sw--

TS_URB2D(I,J) = TS_URB
Expand Down
Loading