emsarray-0.4.2
توضیحات
xarray extension that supports multiple geometry conventions
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | emsarray-0.4.2 |
| نام | emsarray |
| نسخه کتابخانه | 0.4.2 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | "Coastal Environmental Modelling team, Oceans and Atmosphere, CSIRO" |
| ایمیل نویسنده | "coasts@csiro.au" |
| آدرس صفحه اصلی | - |
| آدرس اینترنتی | https://pypi.org/project/emsarray/ |
| مجوز | "BSD-3-Clause" |
# emsarray
[][emsarray-binder]
[](https://emsarray.readthedocs.io/en/latest/?badge=latest)
[](https://anaconda.org/conda-forge/emsarray)
The `emsarray` package provides a common interface
for working with the many model geometry conventions used at CSIRO.
It enhances [`xarray`][xarray] Datasets
and provides a set of common operations for manipulating datasets.
To use, open the dataset using the `emsarray.open_dataset()` function
and use the `dataset.ems` attribute:
```python
import emsarray
from shapely.geometry import Point
dataset = emsarray.tutorial.open_dataset('gbr4')
capricorn_group = Point(151.869, -23.386)
point_data = dataset.ems.select_point(capricorn_group)
```
Some methods take a DataArray as a parameter:
```python
# Plot the sea surface temperature for time = 0
temp = dataset['temp'].isel(time=0, k=-1)
dataset.ems.plot(temp)
```

A number of operations provide further functionality to manipulate datasets,
export geometry, and select subsets of data:
```python
from emsarray.operations import geometry
geometry.write_geojson(dataset, './gbr4.geojson')
geometry.write_shapefile(dataset, './gbr4.shp')
```
## Links
* [Source code on Github][emsarray-source-code]
* [Documentation on Read The Docs][emsarray-documentation]
* [emsarray on PyPI][emsarray-pypi]
* [emsarray on conda-forge][emsarray-conda-forge]
## Examples
Examples of using `emsarray` are available in the [emsarray-notebooks][emsarray-notebooks] repository.
You can [explore these notebooks online][emsarray-binder] with Binder.
## Developing
To get set up for development, make a virtual environment and install the dependencies:
```shell
$ python3 -m venv
$ source venv/bin/activate
$ pip install --upgrade pip>=21.3
$ pip install -e . -r continuous-integration/requirements.txt
```
## Tests
To run the tests, install and run `tox`:
```shell
$ python3 -m venv
$ source venv/bin/activate
$ pip install --upgrade pip>=21.3 tox
$ tox
```
## Documentation
[The documentation for the current stable version of emsarray is available on Read The Docs][emsarray-documentation].
To build the documentation, install the development requirements as above and invoke Sphinx:
```shell
$ make -C docs/ html
```
While updating or adding to the documentation,
run the `live` target to automatically rebuild the docs whenever anything changes.
This will serve the documentation via a [`livereload`][livereload] server.
```shell
$ make -C docs/ live
```
You can the view the docs at <http://localhost:5500>
[emsarray-binder]: https://mybinder.org/v2/gh/csiro-coasts/emsarray-notebooks/HEAD
[emsarray-conda-forge]: https://anaconda.org/conda-forge/emsarray/
[emsarray-documentation]: https://emsarray.readthedocs.io
[emsarray-notebooks]: https://github.com/csiro-coasts/emsarray-notebooks
[emsarray-pypi]: https://pypi.org/project/emsarray/
[emsarray-source-code]: https://github.com/csiro-coasts/emsarray
[livereload]: https://livereload.readthedocs.io/en/latest/
[xarray]: https://xarray.pydata.org/
نیازمندی
| مقدار | نام |
|---|---|
| >=1.3 | bottleneck |
| >=2.5.0 | geojson |
| >=4.0.0 | importlib-metadata |
| >=1.5.3 | netcdf4 |
| >=1.18.0 | numpy |
| >=21.3 | packaging |
| >=2.0.0 | shapely |
| >=2.3.0 | pyshp |
| >=0.18.2 | xarray[parallel] |
| >=0.21.1 | cartopy |
| >=3.4.3 | matplotlib |
| >=1.2.2 | pykdtree |
| >=1.3.0 | pooch |
| ~=4.3.1 | sphinx |
| ~=0.3.2 | sphinx-book-theme |
| ~=2.6.3 | livereload |
| >=0.21.1 | cartopy |
| >=3.4.3 | matplotlib |
| >=1.2.2 | pykdtree |
| >=0.21.1 | cartopy |
| >=3.4.3 | matplotlib |
| >=1.2.2 | pykdtree |
| >=1.3.0 | pooch |
| ~=4.3.1 | sphinx |
| ~=0.3.2 | sphinx-book-theme |
| ~=2.6.3 | livereload |
| - | pytest |
| - | pytest-cov |
| - | mypy |
| - | pandas-stubs |
| - | types-pytz |
| - | flake8 |
| - | isort |
| - | tox |
| >=1.3.0 | pooch |
نحوه نصب
نصب پکیج whl emsarray-0.4.2:
pip install emsarray-0.4.2.whl
نصب پکیج tar.gz emsarray-0.4.2:
pip install emsarray-0.4.2.tar.gz