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:
select()
xESMF
for fast interpolation that respects longitude/latitude gridssel2d()
using xoak
xoak
saves the calculated index so that subsequent searches are fastersub_bbox()
and sub_grid()
xarray
accessor for convenient access to methodscf-xarray
to understand xarray
Dataset metadata and allow for generic axis and coordinate names as well as calculate vertical coordinates: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.
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
pip install extract_model
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
For local package install, after cloning the repository, in the extract_model
directory:
$ pip install -e .
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