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

Bilinear/nearest-neighbour regridding with land-sea mask #1438

Merged
merged 28 commits into from
May 14, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
29f47f3
new regridder
zfan001 Mar 1, 2021
9bc3b70
add contributor
zfan001 Mar 2, 2021
d94d980
Update standardise.py
zfan001 Mar 17, 2021
7db39ab
Cleanup, refactor and comment new regridding code
tjtg Mar 18, 2021
5abb53e
fix new bugs
zfan001 Mar 26, 2021
9cfc778
fix refactor bugs, add unit test
zfan001 Mar 29, 2021
c322dc2
fix sorting using isort
zfan001 Mar 29, 2021
fb31e07
fix codevec low-hit
zfan001 Mar 31, 2021
8515f64
add acceptance test
zfan001 Apr 13, 2021
3986b5a
modifications based on reviewers comments
zfan001 Apr 23, 2021
9850465
update SHA256SUMS
zfan001 Apr 23, 2021
aec52cf
update SHA256SUMS
zfan001 Apr 23, 2021
e7fc0b6
Merge branch 'master' into newregrid3
zfan001 Apr 23, 2021
f85c06a
rebase to latest
zfan001 May 3, 2021
2306ad1
consider identical source and target domain
zfan001 May 3, 2021
4d04e8f
update SHA256SUMS for acceptance test
zfan001 May 4, 2021
d0fafb5
update SHA256SUMS
zfan001 May 4, 2021
c735614
add unit test for better codecov
zfan001 May 4, 2021
2f891d4
update to improver_py37_iris24 env
zfan001 May 5, 2021
79bf589
existing functions replaces new functions
zfan001 May 6, 2021
57e68f4
edit docstring
zfan001 May 9, 2021
b66363f
minor change of docstring
zfan001 May 10, 2021
748c026
improve calculate_grid_spacing function
zfan001 May 10, 2021
2ff2824
minor fixing plus grid spacing test
zfan001 May 12, 2021
21dbef8
add test_grid.py
zfan001 May 12, 2021
76f0339
add more unit test plus minor fixings
zfan001 May 13, 2021
97a76ff
refactor grid.py and unit test code
zfan001 May 14, 2021
34849eb
update gap_spacing change
zfan001 May 14, 2021
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
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ below:
* James Canvin (Bureau of Meteorology, Australia)
* Neil Crosswaite (Met Office, UK)
* Gavin Evans (Met Office, UK)
* Zhiliang Fan (Bureau of Meteorology, Australia)
* Ben Fitzpatrick (Met Office, UK)
* Martina Friedrich (Met Office, UK, pre-GitHub)
* Tom Gale (Bureau of Meteorology, Australia)
Expand Down
10 changes: 8 additions & 2 deletions improver/cli/regrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ def process(
Selects which regridding techniques to use. Default uses
iris.analysis.Linear(); "nearest" uses iris.analysis.Nearest();
"nearest-with-mask" uses Nearest() with land-sea awareness.
"nearest-2": new/fast version without using Iris
"nearest-with-mask-2": new super-fast version without using Iris
"bilinear-with-mask": bilinear option with land-sea mask considered
extrapolation_mode (str):
Mode to use for extrapolating data into regions beyond the limits
of the input cube domain. Refer to online documentation for
Expand Down Expand Up @@ -96,9 +99,12 @@ def process(
If regrid_mode is "nearest-with-mask" but no source land_sea_mask
is provided (from plugin).
"""
from improver.standardise import RegridLandSea
from improver.regrid.landsea import RegridLandSea

if land_sea_mask and "nearest-with-mask" not in regrid_mode:
if land_sea_mask and (
regrid_mode
not in ("nearest-with-mask", "nearest-with-mask-2", "bilinear-with-mask-2")
):
msg = (
"Land-mask file supplied without appropriate regrid-mode. "
"Use --regrid-mode nearest-with-mask."
Expand Down
Empty file added improver/regrid/__init__.py
Empty file.
Loading