Facilitates read-in and extraction for ocean model output.
Project description
extract_model
Facilitates read-in and extraction for ocean model output. Most functions work on both structured and unstructured model output. Unstructured functionality has been tested with FVCOM and SELFE output.
In particular this package can:
- interpolate a model time series to a longitude, latitude location on a 2D grid, while bringing along the calculated z coordinates, with
select()
- saves the weights of the interpolation to save time in the accessor if used, or allows user to input
- uses
xESMF
for fast interpolation that respects longitude/latitude grids - find the nearest grid point to a longitude, latitude location on a horizontal grid (structured or unstructured) in
sel2d()
usingxoak
xoak
saves the calculated index so that subsequent searches are faster- select a sub-region of a structured or unstructured grid in two ways with
sub_bbox()
andsub_grid()
- has an
xarray
accessor for convenient access to methods - uses
cf-xarray
to understandxarray
Dataset metadata and allow for generic axis and coordinate names as well as calculate vertical coordinates - can preprocess a variety of model output types (including ROMS, HYCOM, POM, and FVCOM) to improve metadata and ease of use
:warning: If you are using Windows: Horizontal interpolation currently will not work in
extract_model
untilxESMF
is installable on Windows. Other functions will work.
Project based on the cookiecutter science project template.
Installation
From conda-forge
This will install for all operating systems:
conda install -c conda-forge extract_model
but it includes only minimal requirements. If you want to install packages to run the example docs notebooks and to make unstructured grid subsetting faster, you can additionally install for Windows:
$ conda install --file conda-requirements-opt-win.txt
For running the example docs notebooks, horizontal interpolation (with xESMF
), and to make horizontal subsetting faster, install additional packages for Mac and Linux:
$ conda install --file conda-requirements-opt.txt
From PyPI
pip install extract_model
With environment
Clone the repo:
$ git clone https://github.com/axiom-data-science/extract_model.git
In the extract_model
directory, install conda environment (for Mac or Linux):
$ conda env create -f environment.yml
or for Windows:
$ conda env create -f environment-win.yml
Local
For local package install, after cloning the repository, in the extract_model
directory:
$ pip install -e .
Development
To also develop this package, install additional packages with:
$ conda install --file requirements-dev.txt
To then check code before committing and pushing it to github, locally run
$ pre-commit run --all-files
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file extract_model-1.4.0.tar.gz
.
File metadata
- Download URL: extract_model-1.4.0.tar.gz
- Upload date:
- Size: 5.5 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bec1c07c21984a67d640b550c9b2f0bc474dbb7daf9b6dbc030537b3e32d0a57 |
|
MD5 | 9bee9cdd98fd02f4c072272e7c62fe52 |
|
BLAKE2b-256 | 6161434a7fee0c483dee0c100be2fad779cd501bc7d9f3c42a75057e3aa7fefb |
Provenance
File details
Details for the file extract_model-1.4.0-py3-none-any.whl
.
File metadata
- Download URL: extract_model-1.4.0-py3-none-any.whl
- Upload date:
- Size: 51.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c90d36cabc52cb32b220808a6256ceb35ab73e5427d4b8cca9e3dfa220c6fc26 |
|
MD5 | 4b1623267f23bdf9dae7d90b4d9bf283 |
|
BLAKE2b-256 | dfa72b240b11ea2dc5903ef8f0bf5922e40fc13e4018a48a54bd41abe37ff5a2 |