Skip to content

urban updates: urb solar panel, green roof, building drag coeff; local climate zone#1385

Closed
andreazonato wants to merge 4 commits intowrf-model:developfrom
universita-di-trento:WRF_GREENROOF_LCZ
Closed

urban updates: urb solar panel, green roof, building drag coeff; local climate zone#1385
andreazonato wants to merge 4 commits intowrf-model:developfrom
universita-di-trento:WRF_GREENROOF_LCZ

Conversation

@andreazonato
Copy link
Contributor

@andreazonato andreazonato commented Jan 26, 2021

TYPE: new feature

KEYWORDS: urban, green roof, solar panel, local climate zone, new building drag coefficient

SOURCE: Developer: Andrea Zonato (University of Trento, Italy, andrea.zonato@unitn.it)

DESCRIPTION OF CHANGES:
This update includes new capabilities to account for urban solar panel, green roof, new building drag coefficient, and local climate zone (LCZ). The first three new capabilities are for BEP+BEM. The new building drag coefficient is based on Santiago and Martilli (2010) and Guti ́errez et al. (2015). The newly added LCZs are all related to urban and all urban updates are still controlled by sf_urban_physics options. More details are available in the WRF User's Guide.

Briefly, a new urban parameter table (URBPARAM_LCZ.TBL) has been added for using the new LCZ urban category. The new LCZ definition has LU_INDEX=LCZ+30. If a user still wants to keep using the traditional 33 classes (31st-33rd for urban), please specify the namelist option "use_wudapt_lcz = 0". If a user wants to use the new LCZ, please specify the namelist option "use_wudapt_lcz = 1". If the number of urban category in the input files is inconsistent with the namelist option, error messages will occur. Only the LCZ modeling capability is provided here, not the dataset which is the responsibility of users. The method to create the LCZ data is described in the World Urban Database website: http://www.wudapt.org/

LIST OF MODIFIED FILES:
M Registry/Registry.EM_COMMON
M Registry/Registry.NMM
M Registry/registry.dimspec
M dyn_em/module_first_rk_step_part1.F
M dyn_em/module_initialize_real.F
M dyn_em/start_em.F
M dyn_nmm/module_PHYSICS_CALLS.F
M dyn_nmm/start_domain_nmm.F
M phys/module_physics_init.F
M phys/module_sf_bem.F
M phys/module_sf_bep.F
M phys/module_sf_bep_bem.F
M phys/module_sf_clm.F
M phys/module_sf_noahdrv.F
M phys/module_sf_noahlsm.F
M phys/module_sf_noahmpdrv.F
M phys/module_sf_noahmplsm.F
M phys/module_sf_urban.F
M phys/module_surface_driver.F
M run/LANDUSE.TBL
M run/MPTABLE.TBL
M run/URBPARM.TBL
A run/URBPARM_LCZ.TBL
M run/VEGPARM.TBL
M share/module_check_a_mundo.F

TESTS CONDUCTED:

  1. The model compilation has been tested successfully (tested in Cheyenne by both the developer and Cenlin He, NCAR)
  2. The model simulation has been tested successfully (tested in Cheyenne by the developer)
  3. The model simulation has been tested successfully (tested in WRF Docker by Cenlin He, NCAR)

RELEASE NOTE: WRF-urban updates for green roof, solar panel, and new building drag coefficient for BEP+BEM, and local climate zone for all urban schemes. The paper describing the roof and LCZ update is under development. The new building drag coefficient is based on Santiago and Martilli (2010) and Guti ́errez et al. (2015).
Santiago, J. L. and Martilli, A. (2010). A Dynamic Urban Canopy Parameterization for Mesoscale Models Based on Computational Fluid Dynamics Reynolds-Averaged Navier-Stokes Microscale Simulations. Boundary- Layer Meteorology, 137(3):417–439.
Guti ́errez, E., Martilli, A., Santiago, J. L., and Gonz ́alez, J. E. (2015). A Mechanical Drag Coefficient Formulation and Urban Canopy Parameter Assimilation Technique for Complex Urban Environments. Boundary-Layer Meteorology, 157(2):333–341.

…drag coefficient, diffuse and direct radiation and building materials permeability in BEP+BEM /sf_urban_physics=3)
@andreazonato andreazonato requested review from a team as code owners January 26, 2021 10:28
@davegill davegill changed the base branch from master to develop January 26, 2021 15:48
@davegill
Copy link
Contributor

@andreazonato
Andrea,
We are seeing these errors in the regression tests that use urban options:

-------------- FATAL CALLED ---------------
USING 10 WUDAPT LCZ WITHOUT URBPARM_LCZ.TBL. SET USE_WUDAPT_LCZ=1
-------------------------------------------

Does this mean that we need to set a flag in the namelist, or does this mean that we should be linking in another file from the run directory? For example, it looks like run/URBPARM_LCZ.TBL needs to be in the list. We can handle adding the file to the list of linked files. However, we need to know what this error message means for us.

These are the only failures that I see so far.

@davegill
Copy link
Contributor

@andreazonato
Andrea,
Also, would you define the WUDAPT and PVP acronyms in the PR commit text message.

@andreazonato
Copy link
Contributor Author

@davegill
You should add the flag use_wudapt_lcz=1 in the &physics paragraph in the namelist.

@davegill
Copy link
Contributor

@andreazonato @dudhia @weiwangncar

You should add the flag use_wudapt_lcz=1 in the &physics paragraph in the namelist.

What if a user just wants to use their existing namelist options? For example, the regression test failures all have urban activated (option 1, 2, 3). We are not requiring users to adopt wudapt, are we?

@andreazonato
Copy link
Contributor Author

andreazonato commented Jan 27, 2021 via email

@davegill
Copy link
Contributor

@andreazonato @dudhia @weiwangncar
Andrea,
I have an existing metgrid output file that I use to run the automated WRF regression tests. It uses USGS categories. With your mods, the USGS now has 41 categories. When any of the urban options (that used to work in WRF) are used with this older USGS metgrid data, I get this error from WRF:

USING 10 WUDAPT LCZ WITHOUT URBPARM_LCZ.TBL. SET USE_WUDAPT_LCZ=1
-------------------------------------------

The output from the original WRF had this line:

INPUT LandUse = "USGS"
 LANDUSE TYPE = "USGS" FOUND          33  CATEGORIES           2  SEASONS WATER CATEGORY =           16  SNOW CATEGORY =           24
 initialize goddard radiation single scattering tables
 initialize goddard radiation single scattering tables
INITIALIZE THREE Noah LSM RELATED TABLES
 LANDUSE TYPE = USGS FOUND          27  CATEGORIES

The output after your mods has this:

INPUT LandUse = "USGS"
 LANDUSE TYPE = "USGS" FOUND          41  CATEGORIES           2  SEASONS WATER CATEGORY =           16  SNOW CATEGORY =           24
 initialize goddard radiation single scattering tables
 initialize goddard radiation single scattering tables
INITIALIZE THREE Noah LSM RELATED TABLES
 LANDUSE TYPE = USGS FOUND          27  CATEGORIES

How do we use the original urban options?

@davegill
Copy link
Contributor

@andreazonato

If a user still wants to keep using the traditional 33 classes (31st-33rd for urban), please specify the namelist option "use_wudapt_lcz = 0".

The default value for this variable is defined in the Registry (set to zero), and still unable to use the traditional urban options.

@andreazonato
Copy link
Contributor Author

Despite it gives 41 landuse classes, it should take just the first three urban classes since it switches to URBPARM.TBL instead of URBPARM_LCZ.TBL. Could you please send me the wrfinput_d0* so I can check the error and correct the mistake?

@andreazonato
Copy link
Contributor Author

Ok Dave, i solved the bug. I added a switch depending on use_wudapt_lcz for the utype_urb2d. Now it works even for LANDUSE<33

@davegill
Copy link
Contributor

@andreazonato @dudhia @weiwangncar
Andrea,
I am confirming that your last commit fixed the regression testing troubles.
Thanks!

Please find result of the WRF regression test cases in the attachment. This build is for Commit ID: dc4a843edb9aab8ce00fa936daa4af15c1a094ec, requested by: andreazonato for PR: https://github.com/wrf-model/WRF/pull/1385. For any query please send e-mail to David Gill.

    Test Type              | Expected  | Received |  Failed
    = = = = = = = = = = = = = = = = = = = = = = = =  = = = =
    Number of Tests        : 19           18
    Number of Builds       : 48           46
    Number of Simulations  : 163           161        0
    Number of Comparisons  : 103           102        0

    Failed Simulations are: 
    None
    Which comparisons are not bit-for-bit: 
    None

@davegill davegill changed the title New urban updates urban updates: urb solar panel, green roof, building drag coeff; local climate zone Jan 29, 2021
@dudhia
Copy link
Collaborator

dudhia commented Feb 2, 2021

This is one where we may want to separate the LCZ from urban changes into different PRs

@davegill
Copy link
Contributor

davegill commented Feb 9, 2021

@dudhia @weiwangncar @andreazonato

This is one where we may want to separate the LCZ from urban changes into different PRs

What is the ruling on this: do we require a split PR, or accept as-is?

@dudhia
Copy link
Collaborator

dudhia commented Feb 9, 2021 via email

@andreazonato
Copy link
Contributor Author

Sorry, I didn't see the updates of this chat.
Should I separate it into the WUDAPT and GREENROOF pull requests?

Andrea

@dudhia
Copy link
Collaborator

dudhia commented Feb 9, 2021 via email

@dudhia
Copy link
Collaborator

dudhia commented Feb 16, 2021

Reminder - we are still waiting for this PR to separate the LCZ part into a separate PR

@andreazonato
Copy link
Contributor Author

andreazonato commented Feb 17, 2021 via email

@dudhia
Copy link
Collaborator

dudhia commented Feb 17, 2021 via email

@andreazonato
Copy link
Contributor Author

andreazonato commented Feb 17, 2021 via email

@davegill
Copy link
Contributor

@andreazonato @dudhia

git remote add LCZ https://github.com/universita-di-trento/WRF
git push -u LCZ WRF_GREENROOF_LCZ

@dudhia
Copy link
Collaborator

dudhia commented Feb 17, 2021 via email

@andreazonato
Copy link
Contributor Author

andreazonato commented Feb 18, 2021 via email

@andreazonato
Copy link
Contributor Author

andreazonato commented Feb 18, 2021 via email

@dudhia
Copy link
Collaborator

dudhia commented Feb 18, 2021

I am still only seeing the PR from WRF_GREENROOF_LCZ which contains everything together.

@andreazonato
Copy link
Contributor Author

andreazonato commented Feb 18, 2021 via email

@cenlinhe
Copy link
Contributor

Hi folks, I am doing another independent test using this new urban code and found a few issues in module_sf_bep_bem.F for sf_urban_physics = 3. I am debugging with the help from Andrea and Jimy. There will probably be a few more changes in the code for several default parameter values (nurbm, nz_um, nbui_max) in module_sf_bep_bem.F after testing. I will follow up with more updates very soon today.

@cenlinhe
Copy link
Contributor

cenlinhe commented Feb 24, 2021

@andreazonato @dudhia
I tested the code using sf_urban_physics = 1, 2, 3 for single-domain 1-km run (with LCZ turned off, i.e., default setting). It ran successfully and the results look reasonable for sf_urban_physics = 1, 2. However, for sf_urban_physics = 3 (BEP_BEM), the model crashed based on default parameter settings. So I suggest doing the following updates in the module_sf_bep_bem.F:
(1) change the default nz_um value from 15 to 18.
(2) change the default nbui_max value from 7 to 15
After these changes, the model ran successfully in my test and the results look reasonable. It seems that there is no need to add a switch for the nurbm value (current value =11 is fine for simulations with LCZ turned off in my test).
Andrea, can you update the code for this pull request?

The downward solar radiation issue I mentioned in the WRF committee meeting today is a false alarm. The solar radiation output variables look good. The reason for this is that when I opened wrfout* files for several days together using ncview, somehow it reported all zeros for solar radiation variables, but when I opened these files for each day, the solar radiation variables look reasonable. This is probably related to ncview (I ran into similar issues before too). So everything's good.

@cenlinhe
Copy link
Contributor

cenlinhe commented Feb 24, 2021

Andrea, just repeat my question of PR #1411 here, if you make changes to URBPARM_LCZ.TBL in that PR code, you also need to make the same changes to URBPARM_LCZ.TBL in this PR code. Otherwise, the changes will be gone when merging this one after that one (#1411).
"I saw that in the URBPARM_LCZ.TBL, there are no GR_FLAG, GR_TYPE, GR_FRAC_ROOF, IRHO, PV_FRAC_ROOF. Will this cause any problems when users want to run PVP and/or Greenroof together with LCZ turned on? It seems that the model the above GR/PVP -related variables are also needed for URBPARM_LCZ.TBL to allow users activate greenroof and/or solar panel when turning on the LCZ mode."

@dudhia
Copy link
Collaborator

dudhia commented Feb 24, 2021 via email

@davegill
Copy link
Contributor

@andreazonato @cenlinhe @dudhia
Resolving conflicts for WRF is OK because we squash-and-merge. There is not history of conflicts in the code.

@andreazonato
Copy link
Contributor Author

@cenlinhe, I noticed that in this PR, GR_FLAG, GR_TYPE, GR_FRAC_ROOF, IRHO, PV_FRAC_ROOF are present inside URBPARM_LCZ.TBL. Do you agree with me?

@cenlinhe
Copy link
Contributor

@andreazonato Yes, you are right. The parameters are there in the URBPARM_LCZ.TBL of this PR code, so it should be fine as long as the PR #1411 is merged first and then this one. No need to update the URBPARM_LCZ.TBL in the PR #1411.

@cenlinhe
Copy link
Contributor

I looked through the code changes again and did not spot any other outstanding issues. The current version of this PR after Andrea's update of the two parameters (nz_um & nbui_max) should be fine.

@cenlinhe
Copy link
Contributor

After my discussion with Dave, regarding the slow-down issue (caused by nurbm) in PR #1411 , Dave will fix the bug and then submit a new PR based on Andrea's urban code to facilitate the PR process (since there is a significant time lag between Italy and US). Do we need to update the LCZ code here accordingly as well? If not, then there may be conflicts when merging that new PR and this one here, and we need to be careful about not replacing the new update (fixing the LCZ nurbm issue) with this one.

@cenlinhe
Copy link
Contributor

cenlinhe commented Mar 2, 2021

This PR code has also been tested by another outside researcher (Jie Wang, China) by applying to a Chinese urban area. The test results are here: /glade/scratch/jiewang/ExtremeRainfall/WUDAPT/WRF_urban_test/
All urban physics with nested domains seem to run successfully and work fine.

@dudhia
Copy link
Collaborator

dudhia commented Mar 2, 2021 via email

@davegill
Copy link
Contributor

davegill commented Mar 4, 2021

Hopefully, this PR is replaced by PR #1427 "urban updates: solar panel, green roof, building drag coefficient"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants