forked from SciTools/iris
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* main: (23 commits) Suggest type hinting (SciTools#4390) area weight regrid test fixes (SciTools#4432) Update latest.rst (SciTools#4425) Added @wjbenfold to the core dev list (SciTools#4423) Removed addition of period from wrap_lons. (SciTools#4421) Add release docs sections describing the role of a Release Manager (SciTools#4413) Subset should always return None if no value matches are found (SciTools#4417) What's new for SciTools#4400 (SciTools#4422) `iris.analysis.AreaWeighted` regrid speedup (SciTools#4400) [pre-commit.ci] pre-commit autoupdate (SciTools#4419) Remove newline to satisfy setuptools (SciTools#4418) Updated environment lockfiles (SciTools#4416) NAME loader fixes (SciTools#4411) Updated whatsnew for PR 4402 (SciTools#4410) Support test data in benchmark workflows (SciTools#4402) What's new for pr 4387 (SciTools#4405) Make concat mismatch warning for scalar coords more accurate (SciTools#4387) Added line to latest release notes for updates to pp_save_rules.py (SciTools#4404) Update pp_save_rules.py (SciTools#4391) [pre-commit.ci] pre-commit autoupdate (SciTools#4403) ...
- Loading branch information
Showing
36 changed files
with
1,044 additions
and
349 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Copyright Iris contributors | ||
# | ||
# This file is part of Iris and is released under the LGPL license. | ||
# See COPYING and COPYING.LESSER in the root of the repository for full | ||
# licensing details. | ||
""" | ||
Regridding benchmark test | ||
""" | ||
|
||
# import iris tests first so that some things can be initialised before | ||
# importing anything else | ||
from iris import tests # isort:skip | ||
|
||
import iris | ||
from iris.analysis import AreaWeighted | ||
|
||
|
||
class HorizontalChunkedRegridding: | ||
def setup(self) -> None: | ||
# Prepare a cube and a template | ||
|
||
cube_file_path = tests.get_data_path( | ||
["NetCDF", "regrid", "regrid_xyt.nc"] | ||
) | ||
self.cube = iris.load_cube(cube_file_path) | ||
|
||
template_file_path = tests.get_data_path( | ||
["NetCDF", "regrid", "regrid_template_global_latlon.nc"] | ||
) | ||
self.template_cube = iris.load_cube(template_file_path) | ||
|
||
# Chunked data makes the regridder run repeatedly | ||
self.cube.data = self.cube.lazy_data().rechunk((1, -1, -1)) | ||
|
||
def time_regrid_area_w(self) -> None: | ||
# Regrid the cube onto the template. | ||
out = self.cube.regrid(self.template_cube, AreaWeighted()) | ||
# Realise the data | ||
out.data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.