Scheduled Downtime
On Friday 21 April 2023 @ 5pm MT, this website will be down for maintenance and expected to return online the morning of 24 April 2023 at the latest

Why is the result of sf_urban_physics=1 and sf_urban_physics=0 the same?

This post was from a previous version of the WRF&MPAS-A Support Forum. New replies have been disabled and if you have follow up questions related to this post, then please start a new thread from the forum home page.


According to the User Guide, Noah-MP can also use the urban model (after V3.9, my WRF version is 4.2.1). My simulation is single domain, and spectral nudging is turned on.

At the beginning, my settings were:
sf_surface_physics = 4, 2, -1,
(There is only one layer of domain, so the latter two can be ignored)

After running successfully, I added sf_urban_physics=1 to become:
sf_surface_physics = 4, 2, -1,
sf_urban_physics = 1, 1, 1,

Also successfully ran the result.

However, the results of these two times are exactly the same numerically, there is no difference...Is there any other switch I haven't turned on?
Besides...I used MODIS data I download from website as the LANDUSE data.

The urban's type code is 13 in the MODIS...Need I change all '13' to '32' or '31' to make the urban model run successfully?
For your first question, can you look at your wrfinput and determine whether there exists any urban point?
If so, can you run ./external/io_netcdf/diffwrf to check whether the results with and without urban physics are bit-wise identical?

To answer your second question, No, I don't think you need to change landuse type from 13 to 30, 31 or 32 for urban module to work.
Dear Ming Chen,

sorry for my late reply.

①I've checked the wrfinput file, it exists many urban points. But my domain is big, and the resolution is 4km (single domain simulation).

②I know little about fortran, but I've tested the difference by cdo. I extract T2 variable from 2 files (wrfout file). And I subtract one from the other. The result is zero all over the domain.

Is it because my analog resolution is too coarse for urban model to run?

And, I use modis land use data (the type number of the urban is 13), it corresponds to a high-density residential area (32), right?

diffwrf is automatically generated once WRF is compiled. You can find it in your WRF directory (e.g. /WRF/external/io_netcdf/diffwrf
suppose you have two wrfout files for the cases with and without urban canopy model, you can issue the command :

/WRF/external/io_netcdf/diffwrf wrfout1 wrfout2

This command is to check whether the result are bit-wise, no matter how small the difference could be.

Please save the output for me to take a look.
Dear Ming Chen, I try what you said, and result shows as attached.
The only difference of each couple is whether i've turned on the urban module.


  • 1641469785(1).png
    14.6 KB · Views: 436
Thanks for the update. This result indicates that the two cases give you bit-identical results. I am perplexing how the two cases with and without urban_physics could yield bit-identical results.
I will run a test and get back to you.
I run a small case with and without urban physics. ./diffwrf gives me the results:

 Just plot  F
Diffing wrfout_d01_2017-02-23_00:15:00.urb0 wrfout_d01_2017-02-23_00:15:00
 Next Time 2017-02-23_00:15:00
     Field   Ndifs    Dims       RMS (1)            RMS (2)     DIGITS    RMSE     pntwise max
         U    157287    3   0.2787815045E+02   0.2787815274E+02   7   0.1285E-02   0.2174E-02
         V    158617    3   0.4775870379E+01   0.4775927854E+01   4   0.4918E-02   0.3295E-01
         W    170392    3   0.8109909813E-01   0.8109908352E-01   6   0.1417E-03   0.1705E-02
        PH    155385    3   0.3285917106E+04   0.3285912792E+04   5   0.5663E-01   0.2255E-03
         T    127727    3   0.7626441844E+02   0.7626442735E+02   6   0.7823E-02   0.3230E-02
       THM    127269    3   0.7632623438E+02   0.7632623594E+02   7   0.8133E-02   0.3325E-02
        MU      3996    2   0.6281869017E+03   0.6281915299E+03   5   0.1103E+00   0.1429E-02
         P    143646    3   0.3380317366E+03   0.3380337081E+03   5   0.2130E+00   0.3567E-02
     P_HYD     54762    3   0.5314442364E+05   0.5314442613E+05   7   0.5159E-01   0.1594E-04
        Q2      3862    2   0.6489290335E-02   0.6482626116E-02   2   0.6937E-04   0.1660E+00
        T2      3638    2   0.2921906828E+03   0.2921615983E+03   4   0.3171E+00   0.2134E-01

This indicates that the results are different. Please double check your cases.
Dear Ming Chen

Thanks so much for your detailed reply and helps!

I checked my case again and again, and I finally found that there is a problem with my namelist...I set sf_urban_physics=1, but in somewhere below that option, I set it again and it was changed to 0 (which means that I set this option twice)...

The results are different and using modis data with urban physics is OK!
Thanks for the update. I guess we have to be very cautious when specifying the namelist options for comparison study, since a slight difference may lead to quite different results.