Skip to main content

Facilitates read-in and extraction for ocean model output.

Project description

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

:warning: 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

extract_model-1.4.4.tar.gz (5.5 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

extract_model-1.4.4-py3-none-any.whl (52.1 kB view details)

Uploaded Python 3

File details

Details for the file extract_model-1.4.4.tar.gz.

File metadata

  • Download URL: extract_model-1.4.4.tar.gz
  • Upload date:
  • Size: 5.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for extract_model-1.4.4.tar.gz
Algorithm Hash digest
SHA256 9f4abd0ad7c13cecf8a8bb4790401c191f30ffdc34bf50034dad7dfc5f1b1e1d
MD5 ec64f1fc039f74eb0ebfe133f8e35323
BLAKE2b-256 1020b84b540470b4821dc786c2be60bed3a1d8cf5e2a86a69ffe4226f1356788

See more details on using hashes here.

Provenance

The following attestation bundles were made for extract_model-1.4.4.tar.gz:

Publisher: release.yaml on axiom-data-science/extract_model

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file extract_model-1.4.4-py3-none-any.whl.

File metadata

  • Download URL: extract_model-1.4.4-py3-none-any.whl
  • Upload date:
  • Size: 52.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for extract_model-1.4.4-py3-none-any.whl
Algorithm Hash digest
SHA256 d365cb03f8dbca7b91dbdd2a5bc6a74941110b54118d755375c241b9649860ba
MD5 f870e8341b43019646c4109606083232
BLAKE2b-256 a4015b0a68dbe6af0357fc160da2a4fc00f9bb29903ad74ca8bbba6ef97c86bc

See more details on using hashes here.

Provenance

The following attestation bundles were made for extract_model-1.4.4-py3-none-any.whl:

Publisher: release.yaml on axiom-data-science/extract_model

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page