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

Implementation of WUDAPT (31-41) landuse classes along with standard urban classes (31-33) #1419

Merged
merged 7 commits into from
Mar 3, 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
1 change: 1 addition & 0 deletions Registry/Registry.EM_COMMON
Original file line number Diff line number Diff line change
Expand Up @@ -2358,6 +2358,7 @@ rconfig integer imomentum namelist,physics 1 0
rconfig integer ishallow namelist,physics 1 0 rh "ishallow" "shallow convection in G3 scheme" ""
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 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
1 change: 1 addition & 0 deletions Registry/Registry.NMM
Original file line number Diff line number Diff line change
Expand Up @@ -1507,6 +1507,7 @@ rconfig integer maxens3 namelist,physics 1 16
rconfig integer ensdim namelist,physics 1 144 irh "ensdim" "" ""
rconfig integer chem_opt namelist,physics max_domains 0 rh "chem_opt" "" ""
rconfig integer num_land_cat namelist,physics 1 24 - "num_land_cat" "" ""
rconfig integer use_wudapt_lcz namelist,physics 1 0 - "use_wudapt_lcz" "" ""
rconfig integer num_soil_cat namelist,physics 1 16 - "num_soil_cat" "" ""
rconfig integer topo_wind namelist,physics max_domains 0 - "topo_wind" "2: Use Mass sfc drag scheme, 1: improve effects topography over surface wind, 0:not" ""
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"
Expand Down
2 changes: 1 addition & 1 deletion dyn_em/module_initialize_real.F
Original file line number Diff line number Diff line change
Expand Up @@ -2994,7 +2994,7 @@ SUBROUTINE init_domain_rk ( grid &
DO i = its , MIN(ide-1,ite)
IF ( MMINLU == 'NLCD40' .OR. MMINLU == 'MODIFIED_IGBP_MODIS_NOAH') THEN
IF ( grid%FRC_URB2D(i,j) .GE. 0.5 .AND. &
(grid%ivgtyp(i,j).NE.13 .AND. grid%ivgtyp(i,j).NE.24 .AND. grid%ivgtyp(i,j).NE.25 .AND. grid%ivgtyp(i,j).NE.26)) grid%ivgtyp(i,j)=13
(grid%ivgtyp(i,j).NE.13 .AND. grid%ivgtyp(i,j).NE.24 .AND. grid%ivgtyp(i,j).NE.25 .AND. grid%ivgtyp(i,j).NE.26 .AND. grid%ivgtyp(i,j).LT.30)) grid%ivgtyp(i,j)=13
ELSE IF ( MMINLU == "USGS" ) THEN
IF ( grid%FRC_URB2D(i,j) .GE. 0.5 .AND. &
grid%ivgtyp(i,j).NE.1 ) grid%ivgtyp(i,j)=1
Expand Down
7 changes: 4 additions & 3 deletions main/depend.common
Original file line number Diff line number Diff line change
Expand Up @@ -475,9 +475,9 @@ module_sf_noahmplsm.o: ../share/module_model_constants.o \

module_sf_noahmp_groundwater.o: module_sf_noahmplsm.o

module_sf_bep.o: ../share/module_model_constants.o module_sf_urban.o
module_sf_bep.o: ../share/module_model_constants.o module_sf_urban.o module_bep_bem_helper.o

module_sf_bep_bem.o: ../share/module_model_constants.o module_sf_bem.o module_sf_urban.o
module_sf_bep_bem.o: ../share/module_model_constants.o module_sf_bem.o module_sf_urban.o module_bep_bem_helper.o

module_sf_bem.o: ../share/module_model_constants.o

Expand Down Expand Up @@ -1028,7 +1028,8 @@ module_soil_pre.o: module_date_time.o ../frame/module_state_description.o

module_check_a_mundo.o: ../frame/module_configure.o ../frame/module_wrf_error.o \
../frame/module_state_description.o \
../share/module_model_constants.o
../share/module_model_constants.o \
../phys/module_bep_bem_helper.o

dfi.o : ../frame/module_wrf_error.o ../frame/module_configure.o \
../frame/module_state_description.o \
Expand Down
1 change: 1 addition & 0 deletions phys/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ RM = rm -f


MODULES = \
module_bep_bem_helper.o \
module_cam_shr_kind_mod.o \
module_cam_support.o \
module_cam_shr_const_mod.o \
Expand Down
4 changes: 4 additions & 0 deletions phys/module_bep_bem_helper.F
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
MODULE module_bep_bem_helper
integer, save :: nurbm ! Maximum number of urban classes
CONTAINS
END MODULE module_bep_bem_helper
61 changes: 46 additions & 15 deletions phys/module_physics_init.F
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ MODULE module_physics_init
USE module_state_description
USE module_model_constants
USE module_configure, ONLY : grid_config_rec_type
#if ( defined( DM_PARALLEL ) && ( ! defined( STUBMPI ) ) )
USE module_dm, ONLY : wrf_dm_max_real
#endif

! USE module_ssib_veg , ONLY : init_module_ssib_veg !fds (SSiB constants)
!Local data for CAM's MG MP scheme
integer :: ixcldliq, ixcldice, ixnumliq, ixnumice
Expand Down Expand Up @@ -2525,9 +2529,9 @@ SUBROUTINE bl_init(STEPBL,BLDT,DT,RUBLTEN,RVBLTEN,RTHBLTEN, &
USE module_sf_myjsfc
USE module_sf_qnsesfc
USE module_sf_noahdrv
USE module_sf_noahlsm, only : LOW_DENSITY_RESIDENTIAL, HIGH_DENSITY_RESIDENTIAL, HIGH_INTENSITY_INDUSTRIAL
USE module_sf_noahlsm, only : LCZ_1,LCZ_2,LCZ_3,LCZ_4,LCZ_5,LCZ_6,LCZ_7,LCZ_8,LCZ_9,LCZ_10,LCZ_11
USE module_sf_noahmpdrv
USE noahmp_tables, ONLY: LOW_DENSITY_RESIDENTIAL_TABLE, HIGH_DENSITY_RESIDENTIAL_TABLE, HIGH_INTENSITY_INDUSTRIAL_TABLE
USE noahmp_tables, ONLY: LCZ_1_TABLE,LCZ_2_TABLE,LCZ_3_TABLE,LCZ_4_TABLE,LCZ_5_TABLE,LCZ_6_TABLE,LCZ_7_TABLE,LCZ_8_TABLE,LCZ_9_TABLE,LCZ_10_TABLE,LCZ_11_TABLE
#ifdef WRF_USE_CLM
USE module_sf_clm, only : clminit
#endif
Expand Down Expand Up @@ -2940,7 +2944,9 @@ SUBROUTINE bl_init(STEPBL,BLDT,DT,RUBLTEN,RVBLTEN,RTHBLTEN, &

! IRRIGATION
INTEGER,OPTIONAL,INTENT(OUT), DIMENSION( ims:ime,jms:jme):: irr_rand_field
INTEGER,OPTIONAL :: irr_ph,irr_freq
INTEGER,OPTIONAL :: irr_ph,irr_freq
REAL :: max_utype_urb2d

#if ( EM_CORE == 1 )
!local mynn
INTEGER :: mynn_closure_level
Expand Down Expand Up @@ -3132,16 +3138,14 @@ 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)
sf_urban_physics,config_flags%use_wudapt_lcz) !urban)
! num_roof_layers,num_wall_layers,road_soil_layers) !urban


CALL urban_var_init(ISURBAN,TSK,TSLB,TMN,IVGTYP, & !urban
ims,ime,jms,jme,kms,kme,num_soil_layers, & !urban
! num_roof_layers,num_wall_layers,num_road_layers, & !urban
LOW_DENSITY_RESIDENTIAL, &
HIGH_DENSITY_RESIDENTIAL, &
HIGH_INTENSITY_INDUSTRIAL, &
LCZ_1,LCZ_2,LCZ_3,LCZ_4,LCZ_5, &
LCZ_6,LCZ_7,LCZ_8,LCZ_9,LCZ_10,LCZ_11, &
restart,sf_urban_physics, & !urban
XXXR_URB2D,XXXB_URB2D,XXXG_URB2D,XXXC_URB2D, & !urban
TR_URB2D,TB_URB2D,TG_URB2D,TC_URB2D,QC_URB2D, & !urban
Expand Down Expand Up @@ -3176,12 +3180,27 @@ 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
FRC_URB2D, UTYPE_URB2D) !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)
#endif
IF (config_flags%use_wudapt_lcz.eq.0 .and. max_utype_urb2d.gt.3.0) THEN !new LCZ
CALL wrf_error_fatal &
('USING 10 WUDAPT LCZ WITHOUT URBPARM_LCZ.TBL. SET USE_WUDAPT_LCZ=1')
ENDIF
IF (config_flags%use_wudapt_lcz.eq.1 .and. max_utype_urb2d.le.3.0) THEN ! new LCZ
CALL wrf_error_fatal &
('USING URBPARM_LCZ.TBL WITH OLD 3 URBAN CLASSES. SET USE_WUDAPT_LCZ=0')
ENDIF

ELSE
CALL wrf_error_fatal ( 'arguments not present for calling urban model' )
ENDIF
ENDIF

!danli mosaic

IF (SF_surface_mosaic.eq.1) THEN
Expand Down Expand Up @@ -3256,12 +3275,12 @@ 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)
sf_urban_physics,config_flags%use_wudapt_lcz)
CALL urban_var_init(ISURBAN,TSK,TSLB,TMN,IVGTYP, & !urban
ims,ime,jms,jme,kms,kme,num_soil_layers, & !urban
LOW_DENSITY_RESIDENTIAL_TABLE, &
HIGH_DENSITY_RESIDENTIAL_TABLE, &
HIGH_INTENSITY_INDUSTRIAL_TABLE, &
LCZ_1_TABLE,LCZ_2_TABLE,LCZ_3_TABLE,LCZ_4_TABLE, &
LCZ_5_TABLE,LCZ_6_TABLE,LCZ_7_TABLE,LCZ_8_TABLE, &
LCZ_9_TABLE,LCZ_10_TABLE,LCZ_11_TABLE, &
restart,sf_urban_physics, & !urban
XXXR_URB2D,XXXB_URB2D,XXXG_URB2D,XXXC_URB2D, & !urban
TR_URB2D,TB_URB2D,TG_URB2D,TC_URB2D,QC_URB2D, & !urban
Expand Down Expand Up @@ -3296,7 +3315,19 @@ 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
FRC_URB2D, UTYPE_URB2D) !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)
#endif
IF (config_flags%use_wudapt_lcz.eq.0 .and. max_utype_urb2d.gt.3.0) THEN !new LCZ
CALL wrf_error_fatal &
('USING 10 WUDAPT LCZ WITHOUT URBPARM_LCZ.TBL. SET USE_WUDAPT_LCZ=1')
ENDIF
IF (config_flags%use_wudapt_lcz.eq.1 .and. max_utype_urb2d.le.3.0) THEN ! new LCZ
CALL wrf_error_fatal &
('USING URBPARM_LCZ.TBL WITH OLD 3 URBAN CLASSES. SET USE_WUDAPT_LCZ=0')
ENDIF
ELSE
CALL wrf_error_fatal ( 'arguments not present for calling urban model' )
ENDIF
Expand Down
76 changes: 38 additions & 38 deletions phys/module_sf_bep.F
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ MODULE module_sf_bep
!USE module_model_constants
#endif
USE module_sf_urban
USE module_bep_bem_helper, ONLY: nurbm

! SGClarke 09/11/2008
! Access urban_param.tbl values through calling urban_param_init in module_physics_init
Expand All @@ -16,9 +17,8 @@ MODULE module_sf_bep
! -----------------------------------------------------------------------
! Dimension for the array used in the BEP module
! -----------------------------------------------------------------------

integer nurbm ! Maximum number of urban classes
parameter (nurbm=3)
integer nurbmax ! Maximum number of urban classes
parameter (nurbmax=11)

integer ndm ! Maximum number of street directions
parameter (ndm=2)
Expand Down Expand Up @@ -176,19 +176,19 @@ subroutine BEP(FRC_URB2D,UTYPE_URB2D,itimestep,dz8w,dt,u_phy,v_phy, &
real hb_u(nz_um) ! Bulding's heights
real ss_urb(nz_um) ! Probability that a building has an height equal to z
real pb_urb(nz_um) ! Probability that a building has an height greater or equal to z
integer nz_urb(nurbm) ! Number of layer in the urban grid
integer nzurban(nurbm)
integer nz_urb(nurbmax) ! Number of layer in the urban grid
integer nzurban(nurbmax)

! Building parameters
real alag_u(nurbm) ! Ground thermal diffusivity [m^2 s^-1]
real alaw_u(nurbm) ! Wall thermal diffusivity [m^2 s^-1]
real alar_u(nurbm) ! Roof thermal diffusivity [m^2 s^-1]
real csg_u(nurbm) ! Specific heat of the ground material [J m^3 K^-1]
real csw_u(nurbm) ! Specific heat of the wall material [J m^3 K^-1]
real csr_u(nurbm) ! Specific heat of the roof material [J m^3 K^-1]
real twini_u(nurbm) ! Initial temperature inside the building's wall [K]
real trini_u(nurbm) ! Initial temperature inside the building's roof [K]
real tgini_u(nurbm) ! Initial road temperature
real alag_u(nurbmax) ! Ground thermal diffusivity [m^2 s^-1]
real alaw_u(nurbmax) ! Wall thermal diffusivity [m^2 s^-1]
real alar_u(nurbmax) ! Roof thermal diffusivity [m^2 s^-1]
real csg_u(nurbmax) ! Specific heat of the ground material [J m^3 K^-1]
real csw_u(nurbmax) ! Specific heat of the wall material [J m^3 K^-1]
real csr_u(nurbmax) ! Specific heat of the roof material [J m^3 K^-1]
real twini_u(nurbmax) ! Initial temperature inside the building's wall [K]
real trini_u(nurbmax) ! Initial temperature inside the building's roof [K]
real tgini_u(nurbmax) ! Initial road temperature
!
! Building materials
!
Expand All @@ -202,39 +202,39 @@ subroutine BEP(FRC_URB2D,UTYPE_URB2D,itimestep,dz8w,dt,u_phy,v_phy, &
! for twini_u, and trini_u the initial value at the deepest level is kept constant during the simulation
!
! Radiation parameters
real albg_u(nurbm) ! Albedo of the ground
real albw_u(nurbm) ! Albedo of the wall
real albr_u(nurbm) ! Albedo of the roof
real emg_u(nurbm) ! Emissivity of ground
real emw_u(nurbm) ! Emissivity of wall
real emr_u(nurbm) ! Emissivity of roof
real albg_u(nurbmax) ! Albedo of the ground
real albw_u(nurbmax) ! Albedo of the wall
real albr_u(nurbmax) ! Albedo of the roof
real emg_u(nurbmax) ! Emissivity of ground
real emw_u(nurbmax) ! Emissivity of wall
real emr_u(nurbmax) ! Emissivity of roof

! fww_u,fwg_u,fgw_u,fsw_u,fsg_u are the view factors used to compute the long wave
! and the short wave radation.
real fww_u(nz_um,nz_um,ndm,nurbm) ! from wall to wall
real fwg_u(nz_um,ndm,nurbm) ! from wall to ground
real fgw_u(nz_um,ndm,nurbm) ! from ground to wall
real fsw_u(nz_um,ndm,nurbm) ! from sky to wall
real fws_u(nz_um,ndm,nurbm) ! from sky to wall
real fsg_u(ndm,nurbm) ! from sky to ground
real fww_u(nz_um,nz_um,ndm,nurbmax) ! from wall to wall
real fwg_u(nz_um,ndm,nurbmax) ! from wall to ground
real fgw_u(nz_um,ndm,nurbmax) ! from ground to wall
real fsw_u(nz_um,ndm,nurbmax) ! from sky to wall
real fws_u(nz_um,ndm,nurbmax) ! from sky to wall
real fsg_u(ndm,nurbmax) ! from sky to ground

! Roughness parameters
real z0g_u(nurbm) ! The ground's roughness length
real z0r_u(nurbm) ! The roof's roughness length
real z0g_u(nurbmax) ! The ground's roughness length
real z0r_u(nurbmax) ! The roof's roughness length

! Roughness parameters
real z0(ndm,nz_um) ! Roughness lengths "profiles"

! Street parameters
integer nd_u(nurbm) ! Number of street direction for each urban class
real strd_u(ndm,nurbm) ! Street length (fix to greater value to the horizontal length of the cells)
real drst_u(ndm,nurbm) ! Street direction
real ws_u(ndm,nurbm) ! Street width
real bs_u(ndm,nurbm) ! Building width
real h_b(nz_um,nurbm) ! Bulding's heights
real d_b(nz_um,nurbm) ! Probability that a building has an height h_b
real ss_u(nz_um,nurbm) ! Probability that a building has an height equal to z
real pb_u(nz_um,nurbm) ! Probability that a building has an height greater or equal to z
integer nd_u(nurbmax) ! Number of street direction for each urban class
real strd_u(ndm,nurbmax) ! Street length (fix to greater value to the horizontal length of the cells)
real drst_u(ndm,nurbmax) ! Street direction
real ws_u(ndm,nurbmax) ! Street width
real bs_u(ndm,nurbmax) ! Building width
real h_b(nz_um,nurbmax) ! Bulding's heights
real d_b(nz_um,nurbmax) ! Probability that a building has an height h_b
real ss_u(nz_um,nurbmax) ! Probability that a building has an height equal to z
real pb_u(nz_um,nurbmax) ! Probability that a building has an height greater or equal to z
!
! Street parameters
!
Expand All @@ -247,7 +247,7 @@ subroutine BEP(FRC_URB2D,UTYPE_URB2D,itimestep,dz8w,dt,u_phy,v_phy, &

! Grid parameters

integer nz_u(nurbm) ! Number of layer in the urban grid
integer nz_u(nurbmax) ! Number of layer in the urban grid

real z_u(nz_um) ! Height of the urban grid levels

Expand Down
Loading