Skip to content

Conversation

@chenghaow
Copy link

@chenghaow chenghaow commented Jan 14, 2026

Development of the WRF-urban-NbS module within the single-layer urban canopy model

TYPE: new feature

KEYWORDS: urban canopy models, urban trees, nature-based solutions, urban grass, urban hydrology, radiative view factors

SOURCE: Yuqi Huang (University of Oklahoma), Chenghao Wang (University of Oklahoma), Cenlin He (NCAR)

DESCRIPTION OF CHANGES:
Problem: The current WRF-urban modeling system employs a single-layer urban canopy model (SLUCM) that assumes a dry street canyon. While a green roof module exists, ground vegetation and street trees are not represented. As a result, key nature-based solution (NbS) processes such as evapotranspiration, radiative shading, and soil–vegetation–atmosphere interactions are not captured. In addition, radiative exchanges involving trees are not explicitly resolved. A version of the urban tree module within SLUCM was developed and tested for the contiguous U.S. but only accounted for shading in a simplified way:

  • Wang, C., Wang, Z. H., & Yang, J. (2018). Cooling effect of urban trees on the built environment of contiguous United States. Earth's Future, 6(8), 1066–1081. https://doi.org/10.1029/2018EF000891

Solution:
This PR introduces urban ground vegetation and street trees into the single-layer urban canopy model. Round-shaped urban trees are explicitly represented, resolving evapotranspiration, shading, and root water uptake. Radiative exchanges between trees and surrounding urban elements are solved using newly implemented analytical view factors.
The development is largely based on the Arizona State University Single-Layer Urban Canopy Model (ASLUM v3.1) and its hydrologically enhanced version, ASLUM-Hydro, and extends their capabilities within the WRF-Urban framework. See the following two papers for ASLUM v3.1 and ASLUM-Hydro:

ISSUE: NA

LIST OF MODIFIED FILES:
The following files were modified (generated using git diff --name-only master urban_nbs):

  • Registry/Registry.EM_COMMON
  • dyn_em/module_first_rk_step_part1.F
  • dyn_em/start_em.F
  • phys/module_physics_init.F
  • phys/module_sf_clm.F
  • phys/module_sf_noahdrv.F
  • phys/module_sf_urban.F
  • phys/module_surface_driver.F
  • run/URBPARM.TBL
  • run/URBPARM_LCZ.TBL
  • run/URBPARM_UZE.TBL
  • wrftladj/module_physics_init_ad.F
  • wrftladj/module_physics_init_tl.F
  • wrftladj/start_em_ad.F
  • wrftladj/start_em_tl.F

TESTS CONDUCTED:

  • Successfully tested in offline mode coupled with the HRLDAS system
  • Demonstrated systematic performance improvements across 20 global urban sites when evaluated against flux-tower observations from the Urban-PLUMBER project
  • Successfully compiled on the NCAR Derecho system
  • Short-term online WRF simulations are currently ongoing

Note:
Successful compilation requires Noah-MP-related source files that are not included in WRF v3.7.1, including a modified version of module_sf_noahmpdrv.F. These changes will be addressed in a separate PR dedicated to Noah-MP.

RELEASE NOTE:
Manuscripts in development:

  • Huang, Y., Wang, C., & He, C. Integrating nature-based solutions into the WRF-urban modeling system. Manuscript in prepration.
  • Wang, C., Huang, Y., Miller, D. L., Katz, D., & Ghosh, A. K. Analytical view factors for urban canopy models with trees: model development and case study in New York City. Manuscript in preparation.

Update dyn_em files with new WRF-urban-nbs related variables
Largely enhanced module_sf_urban.F to incorporate nature-based solutions (including urban trees)
Update phys files with new WRF-urban-nbs related variables
Update TBL files with new WRF-urban-nbs related variables
Update wrftladj files with new WRF-urban-nbs related variables
@chenghaow chenghaow requested review from a team as code owners January 14, 2026 20:11
@cenlinhe
Copy link
Contributor

This PR will fail the regression test because the NoahMP link has not been updated yet. The developers are working to update the noahmp github for this changes and will update the commit soon once the noahmp link is updated.

@weiwangncar
Copy link
Collaborator

weiwangncar commented Jan 15, 2026

@chenghaow This PR fails for multiple tests when real*8 is used. To try real*8 compilation, do configure -r8. A sample compilation output is attached here.
output_10.txt

- Removed double-precision-related code based on HRLDAS offline model
- Uncommented distributed aerodynamic roughness length related code to be consistent with WRF v4.7.1
@chenghaow
Copy link
Author

@weiwangncar Thanks for sharing the compilation log. We found that the issue is caused by an inconsistency in module_sf_urban.F between WRF v4.7.1 and HRLDAS (specifically the DLOG function). To address this, we (1) commented out the double-precision-related code inherited from the HRLDAS urban module, and (2) restored the distributed aerodynamic roughness length code that had been removed from the HRLDAS urban module. We are now testing the compilation on our end on Derecho.

@cenlinhe I'll open a separate issue in the HRLDAS repo on this.

@cenlinhe
Copy link
Contributor

yes, Noah-MP uses a different double precision flag (DOUBLE_PREC) than WRF (DOUBLE_PRECISION). My NoahMPv5 coupling will resolve this issue, but it's good that you reverted back to the original WRF-Urban treatment. Please make sure that you did not remove any other default urban code in the WRF version (do not use HRLDAS version).

@chenghaow
Copy link
Author

yes, Noah-MP uses a different double precision flag (DOUBLE_PREC) than WRF (DOUBLE_PRECISION). My NoahMPv5 coupling will resolve this issue, but it's good that you reverted back to the original WRF-Urban treatment. Please make sure that you did not remove any other default urban code in the WRF version (do not use HRLDAS version).

Sure. We will keep the double precision flag in the offline version though.

@cenlinhe
Copy link
Contributor

HRLDAS version of the urban code may lag a few recent WRF-Urban updates.

Duplicate declarations removed
@chenghaow
Copy link
Author

The current version successfully compiled on Derecho with ./configure -r8

@weiwangncar
Copy link
Collaborator

@chenghaow The last regression tests failed on three cases. Attached is the output file from this group of tests (search for kiaps2):
output_19.txt

Also removed temporary fix for singularity matrix in tree energy budget
@cenlinhe
Copy link
Contributor

This PR needs to be merged first before the refactored NoahMP coupling PR (#2268) because this PR modifies the non-refactored NoahMP urban driver. Once this urban PR is merged, I will need to update the Noah-MP urban driver in the refactored code and hence the refactored NoahMP coupling PR above to avoid any merge conflicts.

@chenghaow
Copy link
Author

@weiwangncar Looks like our recent fix failed the regression tests. Would you please share the output file? Thanks!

@weiwangncar
Copy link
Collaborator

@chenghaow See attached file here (tests for kiaps2 namelists):
output_19.txt

Singular matrix in Urban Tree Energy Budget
@chenghaow chenghaow requested a review from a team as a code owner January 19, 2026 18:38
Stabilize urban tree energy budget solve with damped diagonal fallback
@weiwangncar
Copy link
Collaborator

@chenghaow The last commit caused failed compilation with errors like these:

module_sf_urban.f90:2066:45:

 2066 |          DTB = SIGN(MIN(ABS(DTB), max_step), DTB) 
      |                                             1
Error: 'b' argument of 'sign' intrinsic at (1) must be the same type and kind as 'a'
module_sf_urban.f90:2067:45:

 2067 |          DTG = SIGN(MIN(ABS(DTG), max_step), DTG) 
      |                                             1
Error: 'b' argument of 'sign' intrinsic at (1) must be the same type and kind as 'a'
module_sf_urban.f90:2068:47:    

 2068 |          DTVG = SIGN(MIN(ABS(DTVG), max_step), DTVG)
      |                                               1 
Error: 'b' argument of 'sign' intrinsic at (1) must be the same type and kind as 'a'

@chenghaow chenghaow changed the title WRF-urban-NBS development WRF-urban-NbS development Jan 20, 2026
@chenghaow
Copy link
Author

chenghaow commented Jan 20, 2026

Hi @weiwangncar We just fixed some unit-related bugs, but this updated version failed the regression tests. Our compilation succeeded on Derecho, though. Would you please share the output file when you have a moment? Thanks.

@weiwangncar
Copy link
Collaborator

@chenghaow The latest commit failed the same tests. Here is the output:
output_19.txt
Here is the namelist.input file for this test. You can run it locally to see if it could. Use gfortran if you can when compile.
namelist.input.kiaps2.txt

@weiwangncar
Copy link
Collaborator

@chenghaow To compile KIAPS radiation option, edit configure.wrf, and search for -DBUILD_RRTMK=0, and changes the value to 1.

@weiwangncar
Copy link
Collaborator

@chenghaow On Derecho, you can find the data used by regression test in /glade/derecho/scratch/weiwang/Data/em_real/.

@weiwangncar
Copy link
Collaborator

@chenghaow The last commit resulted in only one run failure: the MPI run using namelist.input.kiaps2. The serial and OpenMP runs have completed.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants