Skip to main content

extract_model

Build Status Code Coverage License:MIT Documentation Status Code Style Status Conda Version Python Package Index

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() using xoak
  • 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() and sub_grid()
  • has an xarray accessor for convenient access to methods
  • uses cf-xarray to understand xarray 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

⚠️ If you are using Windows: Horizontal interpolation currently will not work in extract_model until xESMF 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

Metadata

Release files for extract-model 1.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for extract-model 1.1.3
File Size Uploaded Provenance Actions
extract_model-1.1.3.tar.gz 1.6 MB Without provenance Details for extract_model-1.1.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for extract-model 1.1.3
File Interpreter ABI Platform Actions
extract_model-1.1.3-py3-none-any.whl Python 3 none any Details for extract_model-1.1.3-py3-none-any.whl

Total release size: 1.6 MB

Release files / extract_model-1.1.3.tar.gz

Download URL extract_model-1.1.3.tar.gz
Size 1.6 MB
Tags Source
SHA-256 checksum
How to use checksums
5198f7699a6a0eec4d00e3517b3a3aadb40413cc22bd929c3f6461f234275319
BLAKE2b-256 checksum
How to use checksums
243b0dd76f640d1050abe6b53791610af9fc21cff39a02ad173064a8bd998de2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.16

Release files / extract_model-1.1.3-py3-none-any.whl

Download URL extract_model-1.1.3-py3-none-any.whl
Size 40.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
782ed1fc0f81ff44e5be3be0c19f64991555572ff9976a9344ac450baf938d5e
BLAKE2b-256 checksum
How to use checksums
a2474fab8661ebcd98ea72fbf140c49b1af983dce064ab962ba04a9d6e830ec9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.16

Security for extract-model 1.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page