esmf-regrid-0.6.0
توضیحات
Iris regridding scheme using ESMF
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | esmf-regrid-0.6.0 |
| نام | esmf-regrid |
| نسخه کتابخانه | 0.6.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | SciTools |
| ایمیل نویسنده | scitools-iris-dev@googlegroups.com |
| آدرس صفحه اصلی | https://github.com/SciTools-incubator/iris-esmf-regrid |
| آدرس اینترنتی | https://pypi.org/project/esmf-regrid/ |
| مجوز | BSD 3-Clause License |
# iris-esmf-regrid
[](https://cirrus-ci.com/github/SciTools-incubator/iris-esmf-regrid)
[](https://results.pre-commit.ci/latest/github/SciTools-incubator/iris-esmf-regrid/master)
[](https://codecov.io/gh/SciTools-incubator/iris-esmf-regrid)
[](https://github.com/psf/black)
[](https://github.com/SciTools-incubator/iris-esmf-regrid/blob/main/LICENSE)
[](https://github.com/SciTools-incubator/iris-esmf-regrid/graphs/contributors)

---
[Click here for the API documentation](https://iris-esmf-regrid.readthedocs.io/en/latest)
## Overview
This project aims to provide a bridge between [Iris](https://github.com/SciTools/iris)
and [ESMF](https://github.com/esmf-org/esmf). This takes the form of regridder classes
which take Iris cubes as their arguments and use ESMF to perform regridding
calculations. These classes are designed to perform well on cubes which have multiple
non-horizontal dimensions and lazy ([Dask](https://github.com/dask/dask)) data.
Both rectilinear and curvilinear grids as well as UGRID meshes have been supported.
## Regridding Example
There are a range of regridder classes (e.g `MeshToGridESMFRegridder` and
`GridToMeshESMFRegridder`). For an example of the regridding process, the
`MeshToGridESMFRegridder` class works as follows:
```python
import iris
from iris.experimental.ugrid import PARSE_UGRID_ON_LOAD
from esmf_regrid.experimental.unstructured_scheme import MeshToGridESMFRegridder
# An example such a file can be found at:
# https://github.com/SciTools/iris-test-data/blob/master/test_data/NetCDF/unstructured_grid/data_C4.nc
with PARSE_UGRID_ON_LOAD.context():
source_mesh_cube = iris.load_cube("mesh_cube.nc")
# An example of such a file can be found at:
# https://github.com/SciTools/iris-test-data/blob/master/test_data/NetCDF/global/xyt/SMALL_hires_wind_u_for_ipcc4.nc
target_grid_cube = iris.load_cube("grid_cube.nc")
# Initialise the regridder with a source mesh and target grid.
regridder = MeshToGridESMFRegridder(source_mesh_cube, target_grid_cube)
# use the initialised regridder to regrid the data from the source cube
# onto a cube with the same grid as `target_grid_cube`.
result = regridder(source_mesh_cube)
```
Note that this pattern allows the reuse of an initialised regridder, saving
significant amounts of time when regridding. To make use of this efficiency across
sessions, we support the saving of certain regridders. We can do this as follows:
```python
from esmf_regrid.experimental.io import load_regridder, save_regridder
# Save the regridder.
save_regridder(regridder, "saved_regridder.nc")
# Load saved regridder.
loaded_regridder = load_regridder("saved_regridder.nc")
# Use loaded regridder.
result = loaded_regridder(source_mesh_cube)
```
نیازمندی
| مقدار | نام |
|---|---|
| - | pydata-sphinx-theme |
| - | sphinx |
| - | sphinx-copybutton |
| - | sphinxcontrib-apidoc |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.8 | Python |
نحوه نصب
نصب پکیج whl esmf-regrid-0.6.0:
pip install esmf-regrid-0.6.0.whl
نصب پکیج tar.gz esmf-regrid-0.6.0:
pip install esmf-regrid-0.6.0.tar.gz