wrf-model / WRF

The official repository for the Weather Research and Forecasting (WRF) model
Other
1.18k stars 658 forks source link

[Resubmit for PR #1881] New option for SLUCM to use global distributed urban aerodynamic parameters #1986

Closed cenlinhe closed 5 months ago

cenlinhe commented 5 months ago

[This PR needs to be merged after PR #1990 or #1971] This is a re-submitted PR for https://github.com/wrf-model/WRF/pull/1881 to connect with latest WRF develop branch and the latest Noah-MP GitHub commit and branch for v4.6 release. (Below is copied from https://github.com/wrf-model/WRF/pull/1881). For all review comments, please refer back to the original PR: https://github.com/wrf-model/WRF/pull/1881

New option for SLUCM to consider global distributed urban parameters

TYPE: new feature

KEYWORDS: SLUCM, urban parameters, anthropogenic heat

SOURCE: Do Ngoc Khanh (Tokyo Institute of Technology)

DESCRIPTION OF CHANGES: This PR adds a new feature to WRF SLUCM by allowing consideration of spatially varying global distributed urban parameters and spatially hourly monthly varying anthropogenic heat.

LIST OF MODIFIED FILES: M Registry/Registry.EM_COMMON M Registry/registry.dimspec M dyn_em/module_first_rk_step_part1.F M dyn_em/module_initialize_real.F M phys/module_pbl_driver.F M phys/module_physics_init.F M phys/module_sf_clm.F M phys/module_sf_noahdrv.F M phys/module_sf_urban.F M phys/module_surface_driver.F M phys/noahmp M share/output_wrf.F

TESTS CONDUCTED:

RELEASE NOTE: This modification adds two options (use_distributed_aerodynamics and distributed_ahe_opt) to WRF SLUCM (sf_urban_physics = 1) so that spatially varying urban morphological parameters (building height, plan area index, frontal area index, roughness length for momentum, and displacement height) can be considered.

cenlinhe commented 5 months ago

For all review comments, please refer back to the original PR: https://github.com/wrf-model/WRF/pull/1881

weiwangncar commented 5 months ago

@cenlinhe The compilation for the model has failed. I'm sending you one of the output files.

cenlinhe commented 5 months ago

There was a minor bug and I have fixed it. I just tested it on Derecho and it was successfully compiled.

cenlinhe commented 5 months ago

@epn09 I resubmitted your PR with updates from Noah-MP GitHub. Please take a look to see if I missed anything.

weiwangncar commented 5 months ago

The regression test results:

Test Type              | Expected  | Received |  Failed
= = = = = = = = = = = = = = = = = = = = = = = =  = = = =
Number of Tests        : 23           24
Number of Builds       : 60           57
Number of Simulations  : 158           150        0
Number of Comparisons  : 95           86        0

Failed Simulations are: 
None
Which comparisons are not bit-for-bit: 
None
epn09 commented 5 months ago

@cenlinhe Thank you very much. I think the change was correctly reflected in this resubmitted PR.

cenlinhe commented 5 months ago

This PR needs to be merged after PR #1990 or #1971 because of the update from Noah-MP submodule

cenlinhe commented 5 months ago

Not sure why it is called distributed aerodynamics. Add the info to the README.namelist.

I will add info to the README.namelist today.

weiwangncar commented 5 months ago

@epn09 Can you provide input file (wrfinput and wrfbdy), for one domain for us to try? Can you also describe the data you use to generate the input. Did you create a binary data for input to geogrid program? Is the data global? If this is the case, you should have a modified GEOGRID.TBL file, and you can make a PR to update that file, and provide the binary data directly to us.

epn09 commented 5 months ago

Not sure why it is called distributed aerodynamics. Add the info to the README.namelist.

@dudhia We also can't trace back the origin of this name. If you have suggestions on naming. Please tell us.

epn09 commented 5 months ago

@weiwangncar Please download a test run for Tokyo from our lab server here: https://urbanclimate.tse.ens.titech.ac.jp/database/for_wrf_pr/

The binary files for WPS are uploaded here: https://urbanclimate.tse.ens.titech.ac.jp/database/AHE/AH4GUC/geogrid/ I will make a PR to WPS with modified GEOGRID.TBL soon.

weiwangncar commented 5 months ago

@epn09 Is this a global dataset? What is its resolution?

epn09 commented 5 months ago

Is this a global dataset? What is its resolution?

@weiwangncar The datasets are global at 30-arcsecond spatial resolution.

weiwangncar commented 5 months ago

Is this a global dataset? What is its resolution?

@weiwangncar The datasets are global at 30-arcsecond spatial resolution.

Thank you for the information.

epn09 commented 5 months ago
smileMchen commented 5 months ago

A few issues here: (1) Both WPS-SLUCM and WRF-SLUCM can be successfully compiled in derecho. (2) All the data for SLUCM have been tested and saved in derecho (/glade/derecho/chenming/SLUCMDATA/). We will put these data to wrfhelp/WPS_GEOG soon. (3) The following new options have been tested and they all work fine use_distributed_aerodynamics = true distributed_ahe_opt =0 distributed_ahe_opt =1 distributed_ahe_opt =2 (4) Note that this PR-related Modis data doesn't include 'lake', and hence the num_land_cat should be 20. I would suggest we use our original MODIS data (21 categories) instead of this new Modis data unless this new data has certain advantages.

epn09 commented 5 months ago

@smileMchen

(4) Note that this PR-related Modis data doesn't include 'lake', and hence the num_land_cat should be 20. I would suggest we use our original MODIS data (21 categories) instead of this new Modis data unless this new data has certain advantages.

As written in the PR in WPS (https://github.com/wrf-model/WPS/pull/244), the modis data in our simulation was the modis_landuse_20class_15s (without lakes) where all grids with population density > 1000/km^2 set to urban. The reason is because we found that urban areas in modis_landuse_20class_15s were too small.

I'm not sure if this can be considered an advantage. Maybe it's more like a quick fix. Of course if with-lakes data is preferable, we can do the same adjustment to modis_landuse_20class_15s_with_lakes

dudhia commented 5 months ago

Not sure why it is called distributed aerodynamics. Add the info to the README.namelist.

@dudhia We also can't trace back the origin of this name. If you have suggestions on naming. Please tell us.

I would suggest a name like ucm_distributed_drag

smileMchen commented 5 months ago

@smileMchen

(4) Note that this PR-related Modis data doesn't include 'lake', and hence the num_land_cat should be 20. I would suggest we use our original MODIS data (21 categories) instead of this new Modis data unless this new data has certain advantages.

_> As written in the PR in WPS (wrf-model/WPS#244), the modis data in our simulation was the modis_landuse_20class_15s (without lakes) where all grids with population density > 1000/km^2 set to urban. The reason is because we found that urban areas in modis_landuse_20class_15s were too small.

I'm not sure if this can be considered an advantage. Maybe it's more like a quick fix. Of course if with-lakes data is preferable, we can do the same adjustment to modis_landuse_20class_15s_withlakes

@epn09 I did see larger areas of urban landuse type using your Modis data. Since this PR is focused on urban physics, I suppose users will see more obvious impacts using the new Modis data. For this reason, I would prefer to keep this data. Let's see what others think. We can make a decision later.

cenlinhe commented 5 months ago

@smileMchen

(4) Note that this PR-related Modis data doesn't include 'lake', and hence the num_land_cat should be 20. I would suggest we use our original MODIS data (21 categories) instead of this new Modis data unless this new data has certain advantages.

_> As written in the PR in WPS (wrf-model/WPS#244), the modis data in our simulation was the modis_landuse_20class_15s (without lakes) where all grids with population density > 1000/km^2 set to urban. The reason is because we found that urban areas in modis_landuse_20class_15s were too small.

I'm not sure if this can be considered an advantage. Maybe it's more like a quick fix. Of course if with-lakes data is preferable, we can do the same adjustment to modis_landuse_20class_15s_withlakes

@epn09 I did see larger areas of urban landuse type using your Modis data. Since this PR is focused on urban physics, I suppose users will see more obvious impacts using the new Modis data. For this reason, I would prefer to keep this data. Let's see what others think. We can make a decision later.

I am fine with keeping this data but needs to have a clear notes in WPS and/or WRF readme files and user guide to remind users to only use this new dataset when they activate the new urban capabilities implemented in this WRF PR.

dudhia commented 5 months ago

For those of us not following this closely, is the new urban dataset required for this option to work because it has extra necessary inputs?

cenlinhe commented 5 months ago

For those of us not following this closely, is the new urban dataset required for this option to work because it has extra necessary inputs?

Yes, it requires the new urban dataset because it has extra necessary inputs.

weiwangncar commented 5 months ago

For those of us not following this closely, is the new urban dataset required for this option to work because it has extra necessary inputs?

Yes. One of the input it creates is AHE with the third dimension of 287!

smileMchen commented 5 months ago

@smileMchen

(4) Note that this PR-related Modis data doesn't include 'lake', and hence the num_land_cat should be 20. I would suggest we use our original MODIS data (21 categories) instead of this new Modis data unless this new data has certain advantages.

_> As written in the PR in WPS (wrf-model/WPS#244), the modis data in our simulation was the modis_landuse_20class_15s (without lakes) where all grids with population density > 1000/km^2 set to urban. The reason is because we found that urban areas in modis_landuse_20class_15s were too small.

I'm not sure if this can be considered an advantage. Maybe it's more like a quick fix. Of course if with-lakes data is preferable, we can do the same adjustment to modis_landuse_20class_15s_withlakes

@epn09 I did see larger areas of urban landuse type using your Modis data. Since this PR is focused on urban physics, I suppose users will see more obvious impacts using the new Modis data. For this reason, I would prefer to keep this data. Let's see what others think. We can make a decision later.

I am fine with keeping this data but needs to have a clear notes in WPS and/or WRF readme files and user guide to remind users to only use this new dataset when they activate the new urban capabilities implemented in this WRF PR.

@cenlinhe I agree.

cenlinhe commented 5 months ago

In my latest commit, as suggested by Wei and Jimy, I have:

  1. packaged the new variables in registry
  2. renamed the namelist option from urban_distributed_aerodynamics to slucm_distributed_drag
  3. replaced the "if present(ahe)" by "if (distributed_ahe_opt > 0)".
weiwangncar commented 5 months ago

@cenlinhe Thanks for renaming the namelist and package the arrays. Now the PR has some conflict with two files: phys/module_pbl_driver.F and phys/noahmp/. Can you help resolve the conflicts?

cenlinhe commented 5 months ago

@cenlinhe Thanks for renaming the namelist and package the arrays. Now the PR has some conflict with two files: phys/module_pbl_driver.F and phys/noahmp/. Can you help resolve the conflicts?

I cannot see the conflicting parts. Also for noahmp, I am not sure why but the commit in Noah-MP side should be good which should not lead to any conflicts. The pbl driver part probably includes some newly merged update in other parts inside this fortran file. I will see what I can do.

cenlinhe commented 5 months ago

@weiwangncar I merged the latest WRF develop branch back into my PR branch and it seems now the conflicts have been resolved.

weiwangncar commented 5 months ago

@cenlinhe Thanks for resolving the conflicts. The last change passed regression tests. We should be able to approve this PR now. @dudhia Can you review this PR?