-
Notifications
You must be signed in to change notification settings - Fork 818
[Resubmit for PR #1881] New option for SLUCM to use global distributed urban aerodynamic parameters #1986
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
[Resubmit for PR #1881] New option for SLUCM to use global distributed urban aerodynamic parameters #1986
Changes from all commits
45d1380
c8d86d3
3d62e5e
08e71b9
4bc9b99
26e33d9
63902b4
bcf4941
2ab4941
6cfb6e8
cfad9e0
4154469
5732c24
6ff203f
7cacbfd
05d23af
8541190
b2dfab8
3c1b440
95c78b4
9141bf5
448067e
c27eece
56ca486
8aae62b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -767,6 +767,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" "" | ||
|
|
@@ -820,13 +821,18 @@ 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" | ||
| 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)" "" | ||
| # 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 | ||
|
|
||
|
|
@@ -2541,6 +2547,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 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" "" "" | ||
| 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" | ||
|
|
@@ -3127,7 +3135,7 @@ package temfsfcscheme sf_sfclay_physics==10 - state:wm_ | |
| package idealscmsfcscheme sf_sfclay_physics==89 - - | ||
| package sfclayscheme sf_sfclay_physics==91 - - | ||
|
|
||
| package noahucmscheme sf_urban_physics==1 - state:trb_urb4d,tw1_urb4d,tw2_urb4d,tgb_urb4d,sfw1_urb3d,sfw2_urb3d,sfr_urb3d,sfg_urb3d,a_u_bep,a_v_bep,a_t_bep,a_q_bep,a_e_bep,b_u_bep,b_v_bep,b_t_bep,b_q_bep,b_e_bep,dlg_bep,dl_u_bep,sf_bep,vl_bep,mh_urb2d,stdh_urb2d,lf_urb2d,lp_urb2d,hgt_urb2d,lb_urb2d,tgr_urb2d,cmcr_urb2d,drelr_urb2d,drelb_urb2d,drelg_urb2d,flxhumr_urb2d,flxhumb_urb2d,flxhumg_urb2d,tgrl_urb3d,smr_urb3d,cmgr_sfcdif,chgr_sfcdif,trl_urb3d,tgl_urb3d,tbl_urb3d | ||
| package noahucmscheme sf_urban_physics==1 - state:trb_urb4d,tw1_urb4d,tw2_urb4d,tgb_urb4d,sfw1_urb3d,sfw2_urb3d,sfr_urb3d,sfg_urb3d,a_u_bep,a_v_bep,a_t_bep,a_q_bep,a_e_bep,b_u_bep,b_v_bep,b_t_bep,b_q_bep,b_e_bep,dlg_bep,dl_u_bep,sf_bep,vl_bep,mh_urb2d,stdh_urb2d,lf_urb2d,lp_urb2d,hgt_urb2d,lb_urb2d,tgr_urb2d,cmcr_urb2d,drelr_urb2d,drelb_urb2d,drelg_urb2d,flxhumr_urb2d,flxhumb_urb2d,flxhumg_urb2d,tgrl_urb3d,smr_urb3d,cmgr_sfcdif,chgr_sfcdif,trl_urb3d,tgl_urb3d,tbl_urb3d,ahe,lf_urb2d_s,z0_urb2d,zd_urb2d | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @cenlinhe I don't understand so that those who don't use AH won't need to allocate a big array?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it is fine for now to package it to SLUCM scheme. Later, we can create a new package if needed. Currently, there is limited time to finalize the code for the upcoming WRF release, so I do not suggest any major changes unless it is necessary.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @cenlinhe Thank you. I understand. |
||
| package bepscheme sf_urban_physics==2 - state:a_u_bep,a_v_bep,a_t_bep,a_q_bep,a_e_bep,b_u_bep,b_v_bep,b_t_bep,b_q_bep,b_e_bep,dlg_bep,dl_u_bep,sf_bep,vl_bep,trb_urb4d,tw1_urb4d,tw2_urb4d,tgb_urb4d,sfw1_urb3d,sfw2_urb3d,sfr_urb3d,sfg_urb3d,hi_urb2d,lp_urb2d,hgt_urb2d,lb_urb2d,trl_urb3d,tgl_urb3d,tbl_urb3d,tsk_rural | ||
| package bep_bemscheme sf_urban_physics==3 - state:a_u_bep,a_v_bep,a_t_bep,a_q_bep,a_e_bep,b_u_bep,b_v_bep,b_t_bep,b_q_bep,b_e_bep,dlg_bep,dl_u_bep,sf_bep,vl_bep,trb_urb4d,tw1_urb4d,tw2_urb4d,tgb_urb4d,tlev_urb3d,qlev_urb3d,tw1lev_urb3d,tw2lev_urb3d,tglev_urb3d,tflev_urb3d,sf_ac_urb3d,lf_ac_urb3d,cm_ac_urb3d,sfvent_urb3d,lfvent_urb3d,sfwin1_urb3d,sfwin2_urb3d,sfw1_urb3d,sfw2_urb3d,sfr_urb3d,sfg_urb3d,hi_urb2d,lp_urb2d,hgt_urb2d,lb_urb2d,trl_urb3d,tgl_urb3d,tbl_urb3d,tsk_rural,ep_pv_urb3d,t_pv_urb3d,trv_urb4d,qr_urb4d,qgr_urb3d,tgr_urb3d,drain_urb4d,draingr_urb3d,sfrv_urb3d,lfrv_urb3d,dgr_urb3d,dg_urb3d,lfr_urb3d,lfg_urb3d | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -617,6 +617,15 @@ SUBROUTINE init_domain_rk ( grid & | |
| END IF | ||
| END IF | ||
|
|
||
| IF (config_flags%slucm_distributed_drag) 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. | ||
|
|
||
|
|
@@ -1340,6 +1349,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) | ||
|
|
@@ -1348,7 +1362,8 @@ 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. | ||
| END DO | ||
| grid%shdavg(i,j) = grid%shdavg(i,j) * 100. | ||
| END DO | ||
| END DO | ||
|
|
||
| ! The model expects the albedo fields as a fraction, not a percent. Set the | ||
|
|
@@ -3119,7 +3134,17 @@ SUBROUTINE init_domain_rk ( grid & | |
|
|
||
| ! Split NUDAPT Urban Parameters | ||
|
|
||
| IF ( ( config_flags%sf_urban_physics == 1 ) .OR. ( config_flags%sf_urban_physics == 2 ) .OR. ( config_flags%sf_urban_physics == 3 ) ) THEN | ||
| distributed_aerodynamics_if: IF (config_flags%sf_urban_physics == 1 .AND. config_flags%slucm_distributed_drag) 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 | ||
| grid%frc_urb2d(i, j) = MAX(0.1, MIN(0.9, 1 - grid%shdavg(i, j) / 100.)) | ||
| END IF | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. urban fraction set to annual mean vegetation fraction?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I asked the same question to the developer and he said this treatment seems most reasonable for their new scheme.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would be concerned about urban areas in dry/desert regions. Why not trust frc_urb2d more?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
@cenlinhe If time is limited, can we let it be a TODO for the next minor WRF release?
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we can think of it later |
||
| 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) | ||
| IF ( MMINLU == 'NLCD40' .OR. MMINLU == 'MODIFIED_IGBP_MODIS_NOAH') THEN | ||
|
|
@@ -3141,7 +3166,7 @@ SUBROUTINE init_domain_rk ( grid & | |
| grid%HGT_URB2D(i,j) = grid%URB_PARAM(i,94,j) | ||
| END DO | ||
| END DO | ||
| ENDIF | ||
| ENDIF | ||
|
|
||
| IF ( ( config_flags%sf_urban_physics == 2 ) .OR. ( config_flags%sf_urban_physics == 3 ) ) THEN | ||
| DO j = jts , MIN(jde-1,jte) | ||
|
|
@@ -3175,6 +3200,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 | ||
|
|
@@ -7954,6 +7981,27 @@ 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 , & | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -104,6 +104,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 & | ||
|
|
@@ -203,6 +206,7 @@ SUBROUTINE pbl_driver( & | |
| USE module_wind_fitch | ||
| USE module_wind_mav ! Yulong add for WLM | ||
| #endif | ||
| use module_ra_gfdleta, only: cal_mon_day | ||
|
|
||
| ! This driver calls subroutines for the PBL parameterizations. | ||
| ! | ||
|
|
@@ -617,6 +621,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 | ||
| ! | ||
|
|
@@ -827,8 +836,8 @@ SUBROUTINE pbl_driver( & | |
| integer iu_bep,iurb,idiff | ||
| real seamask,thsk,zzz,unew,vnew,tnew,qnew,umom,vmom | ||
| REAL :: z0,z1,z2,w1,w2 | ||
|
|
||
| REAL, DIMENSION( ims:ime, kms:kme, jms:jme ) :: TKE_windfarm ! Yulong add for WLM | ||
| INTEGER :: ihour, jmonth, jday | ||
| ! | ||
| ! FASDAS | ||
| ! | ||
|
|
@@ -2260,6 +2269,25 @@ SUBROUTINE pbl_driver( & | |
| ,ITS=its,ITE=ite,JTS=jts,JTE=jte,KTS=kts,KTE=kte) | ||
| ENDIF | ||
|
|
||
| IF (distributed_ahe_opt > 0) THEN | ||
| 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 | ||
|
|
||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is for anthropogenic heat flux (i.e., sensible heat flux) released from surface human activities to the atmosphere.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @cenlinhe After the PBL call, how do you expect the flux to be affecting the atmosphere?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think @epn09 originally wants to let this flux affect atmosphere for the next time step. Another technical consideration is that @epn09 wants to add this flux to the temperature tendency (distributed_ahe_opt=1) which is an output of PBL scheme (if I understand it correctly), so this part needs to be added at the end of PBL call. This is my understanding.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @epn09 It could explain why your added HFX doesn't have much effect to the model. The flux will be re-computed in the model's next step in the land model, which is called second after the radiation and before PBL.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @weiwangncar I see. So where would be the right place to add AH to HFX?
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @epn09 Perhaps you could do this in module_pbl_driver.F, but before any PBL physics is called.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Some PBL schemes may set RTHBLTEN to zero before adding to it. It needs to be checked. |
||
| ENDDO | ||
| !$OMP END PARALLEL DO | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.