Skip to content
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

Improved efficiency wrf_remove_urban #71

Merged
merged 29 commits into from
Jul 14, 2022
Merged
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
4306a8c
Improved efficiency wrf_remove_urban
dargueso Jul 6, 2022
e612a25
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 6, 2022
16fef56
Update w2w.py
dargueso Jul 8, 2022
46c9a29
Merge branch 'optmize_remove_urb' of https://github.com/matthiasdemuz…
dargueso Jul 8, 2022
9c83799
Remove time prints
dargueso Jul 8, 2022
3209545
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 8, 2022
9d8f1f8
fix some typos causing errors
matthiasdemuzere Jul 8, 2022
19ecb79
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 8, 2022
aa92e73
add tqdm for progress bar monitoring?
matthiasdemuzere Jul 8, 2022
2a64791
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 8, 2022
ae16501
add tqdm description
matthiasdemuzere Jul 8, 2022
65fe470
Optimize wrf remove urban
dargueso Jul 11, 2022
9c7c4ee
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 11, 2022
b53aa6a
Removed unnecessary function and added annotation
dargueso Jul 12, 2022
058f5e0
Merge branch 'optmize_remove_urb' of https://github.com/matthiasdemuz…
dargueso Jul 12, 2022
673e0e4
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 12, 2022
5a01850
add type annotation
jkittner Jul 12, 2022
2faec70
Update w2w.py
dargueso Jul 12, 2022
2350b70
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 12, 2022
f869207
Update README.md
dargueso Jul 12, 2022
41df46c
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 12, 2022
5a19596
Update README.md
Jul 13, 2022
a3b4c56
fix typo, simplify kd tree variable unpacking
jkittner Jul 13, 2022
7dbb6a0
update JOSS with readme info
matthiasdemuzere Jul 13, 2022
5e2af74
fix typo
matthiasdemuzere Jul 13, 2022
29ec09d
update JOSS pdf
matthiasdemuzere Jul 13, 2022
ebe9188
Update JOSS/paper.md
matthiasdemuzere Jul 14, 2022
34a60d5
Update README.md
matthiasdemuzere Jul 14, 2022
561841a
update JOSS pdf
matthiasdemuzere Jul 14, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ Important notes
* At the end of running `W2W`, a note is displayed that indicates the `nbui_max` value, e.g. for the sample data: `Set nbui_max to 5 during compilation, in order to optimize memory storage`. This is especially relevant for users that work with the BEP or BEP+BEM urban parameterization schemes (`sf_urban_physics = 2 or 3`, respectively). See also `num_urban_nbui` in [WRF's README.namelist](https://github.com/wrf-model/WRF/blob/master/run/README.namelist) for more info.
* Make sure to set `use_wudapt_lcz=1` (default is 0) and `num_land_cat=41` (default is 21) in WRF's `namelist.input` when using the LCZ-based urban canopy parameters.
* The outputs of this tool have only been tested with the most recent [WRF version 4.3.x](https://github.com/wrf-model/WRF/releases/tag/v4.3). So we advise you to work with this version as well, which is now able to ingest the urban LCZ classes by default.
* It is possible to specify the number of nearest pixels (NPIX_NLC) to determine the dominant natural landuse in the surroundings of each urban pixel. The most frequent landuse among those pixels is used to replace the urban pixels. The distance used to find the nearest pixels is based on the great circle arc length, specifically the chord length formula (https://en.wikipedia.org/wiki/Great-circle_distance). For perfomance reasons, the nearest pixels are searched for using a k-d tree algorithm, instead of brute force over all possible pixels. Because only land natural pixels are considered to calculate the most frequent land use, we need to filter out water and other urban pixels. Thus, we need to specify the initial number of pixels that the k-d tree algorithm will select, which will be larger than NPIX_NLC. By default, NPIX_NLC**2 pixels will be selected and the nearest pixels that are not water or urban will be drawn from that initial selection. Because it is actually an area around the urban pixel, it is referred to as NPIX_AREA.
dargueso marked this conversation as resolved.
Show resolved Hide resolved


Arguments
Expand All @@ -67,6 +68,7 @@ Arguments
-l --lcz-band = Band to use from LCZ file (DEFAULT: 0). For maps produced with LCZ Generator, use 1
-f --frc-threshold = FRC_URB2D treshold value to assign pixel as urban (DEFAULT: 0.2)
-n --npix-nlc = Number of pixels to use for sampling neighbouring natural land cover (DEFAULT: 45)
-a --npix_area = Area in number of pixels to look for the NPIX_NLC nearest number of pixels for sampling neighbouring natural land cover (DEFAULT: NPIX_NLC**2)
--lcz-ucp = Specify a custom lookup table for the LCZ-based Urban Canopy Parameters
```

Expand Down