Skip to main content

NetCDF4 Along-existing-dimension Concatenation Service

Project description

stitchee, a python package for concatenating netCDF data along an existing dimension

Project Status: Active – The project has reached a stable, usable state and is being actively developed Documentation Status Mypy checked Python Versions Package version Code coverage

Overview


STITCHEE (STITCH by Extending a dimEnsion) is used for concatenating netCDF data along an existing dimension, and it is designed as both a standalone utility and for use as a service in Harmony.

Getting started, with poetry

  1. Follow the instructions for installing poetry here.
  2. Install stitchee, with its dependencies, by running the following from the repository directory:
poetry install

How to test stitchee locally

poetry run pytest tests/

Usage

For example:

poetry run stitchee /path/to/files/directory -o output.nc --concat_method xarray-combine

Command line options:

$ poetry run stitchee --help
usage: stitchee [-h] -o PATH [--concat_method {xarray-concat,xarray-combine}] [--concat_dim DIM] [--sorting_variable VAR] [--xarray_arg_compat COMPAT]
                [--xarray_arg_combine_attrs ATTRS] [--xarray_arg_join JOIN] [-O] [-v]
                INPUT [INPUT ...]

Concatenate netCDF files along existing dimensions.

options:
  -h, --help            show this help message and exit
  -O, --overwrite       Overwrite output file if it exists
  -v, --verbose         Enable verbose output to stdout; useful for debugging

Required Arguments:
  INPUT                 Input specification: multiple file paths, directory path, text file with file list, or single file to copy
  -o PATH, --output_path PATH
                        Output file path for concatenated result

Concatenation Options:
  --concat_method {xarray-concat,xarray-combine}
                        Concatenation method (default: xarray-concat)
  --concat_dim DIM      Dimension to concatenate along (required for xarray-concat)
  --sorting_variable VAR
                        Name of a variable to use for sorting datasets before concatenation (e.g., 'time')

xarray Arguments:
  --xarray_arg_compat COMPAT
                        'compat' argument passed to xarray concatenation function
  --xarray_arg_combine_attrs ATTRS
                        'combine_attrs' argument passed to xarray concatenation function
  --xarray_arg_join JOIN
                        'join' argument passed to xarray concatenation function

Examples:
  stitchee file1.nc file2.nc -o output.nc --concat_dim time
  stitchee /path/to/files/directory -o output.nc --concat_method xarray-combine
  stitchee filelist.txt -o output.nc --concat_dim time --sorting_variable time

This package is NASA Software Release Authorization (SRA) # LAR-20433-1

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

stitchee-1.7.0.tar.gz (19.4 kB view details)

Uploaded Source

Built Distribution

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

stitchee-1.7.0-py3-none-any.whl (22.1 kB view details)

Uploaded Python 3

File details

Details for the file stitchee-1.7.0.tar.gz.

File metadata

  • Download URL: stitchee-1.7.0.tar.gz
  • Upload date:
  • Size: 19.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.12.3 Linux/6.11.0-1015-azure

File hashes

Hashes for stitchee-1.7.0.tar.gz
Algorithm Hash digest
SHA256 4c2ff0043d86b05fe9173e9e14ef305589b10c40ad6a3ba2a890fbfebcaade5b
MD5 e1df87f28a4b25cf3b609d015584b0e6
BLAKE2b-256 cd494528515564f85ae90c0d339c0dd7663c2592320d1dcc90b1deb7c3e69dc8

See more details on using hashes here.

File details

Details for the file stitchee-1.7.0-py3-none-any.whl.

File metadata

  • Download URL: stitchee-1.7.0-py3-none-any.whl
  • Upload date:
  • Size: 22.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.12.3 Linux/6.11.0-1015-azure

File hashes

Hashes for stitchee-1.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9dc6d9520f4c4c8ed355c3383b40dfe7ff1e411220cd9b2ec05b28279f9b1a26
MD5 f8fcad96bdb1c1d31d5d3fb06bdf1c18
BLAKE2b-256 8f504adb7c85612508452b7243698171e24fdbc5b995caa777c31b80814c45a9

See more details on using hashes here.

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