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

$ poetry run stitchee --help
usage: stitchee [-h] -o OUTPUT_PATH [--no_input_file_copies] [--keep_tmp_files] [--concat_method {xarray-concat,xarray-combine}] [--concat_dim CONCAT_DIM]
                [--xarray_arg_compat XARRAY_ARG_COMPAT] [--xarray_arg_combine_attrs XARRAY_ARG_COMBINE_ATTRS] [--xarray_arg_join XARRAY_ARG_JOIN] [-O]
                [-v]
                path/directory or path list [path/directory or path list ...]

Run the along-existing-dimension concatenator.

options:
  -h, --help            show this help message and exit
  --no_input_file_copies
                        By default, input files are copied into a temporary directory to avoid modification of input files. This is useful for testing,
                        but uses more disk space. By specifying this argument, no copying is performed.
  --keep_tmp_files      Prevents removal, after successful execution, of (1) the flattened concatenated file and (2) the input directory copy if created
                        by '--make_dir_copy'.
  --concat_method {xarray-concat,xarray-combine}
                        Whether to use the xarray concat method or the combine-by-coords method.
  --concat_dim CONCAT_DIM
                        Dimension to concatenate along, if possible. This is required if using the 'xarray-concat' method
  --sorting_variable SORTING_VARIABLE
                        Name of a variable to use for sorting datasets before concatenation by xarray. E.g., 'time'.
  --xarray_arg_compat XARRAY_ARG_COMPAT
                        'compat' argument passed to xarray.concat() or xarray.combine_by_coords().
  --xarray_arg_combine_attrs XARRAY_ARG_COMBINE_ATTRS
                        'combine_attrs' argument passed to xarray.concat() or xarray.combine_by_coords().
  --xarray_arg_join XARRAY_ARG_JOIN
                        'join' argument passed to xarray.concat() or xarray.combine_by_coords().
  --group_delim GROUP_DELIM
                        Character or string to use as group delimiter
  -O, --overwrite       Overwrite output file if it already exists.
  -v, --verbose         Enable verbose output to stdout; useful for debugging

Required:
  path/directory or path list
                        Files to be concatenated, specified via (1) multiple paths of the files to be concatenated, (2) single path to text
                        file containing linebreak-separated paths of files to be concatenated, (3) single path to netCDF file to be copied to
                        output path, or a (4) single directory containing the files to be concatenated.
  -o OUTPUT_PATH, --output_path OUTPUT_PATH
                        The output filename for the merged output.

For example:

poetry run stitchee /path/to/netcdf/directory/ -o /path/to/output.nc

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.6.0.tar.gz (26.5 kB view details)

Uploaded Source

Built Distribution

stitchee-1.6.0-py3-none-any.whl (29.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: stitchee-1.6.0.tar.gz
  • Upload date:
  • Size: 26.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.10.15 Linux/6.5.0-1025-azure

File hashes

Hashes for stitchee-1.6.0.tar.gz
Algorithm Hash digest
SHA256 17832a2764f6eab00710325d7ddc195afea3b412951e2cd04879b9145bc7462a
MD5 bcaddc69c97826efae78963c41908d97
BLAKE2b-256 001b4daa1737642c6e2be626876fa8300102ad458a636aa744e11e73b6ed3203

See more details on using hashes here.

File details

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

File metadata

  • Download URL: stitchee-1.6.0-py3-none-any.whl
  • Upload date:
  • Size: 29.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.10.15 Linux/6.5.0-1025-azure

File hashes

Hashes for stitchee-1.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 52ac7411484f5d7c901ea4ca9fcad30c8be3a966ce6bc38e7d6768bb92ffbf35
MD5 f167bef6cd3ca6ca42c8f0ba8c333440
BLAKE2b-256 a49f1830dcef382e1bae909b74278e4ac603484a6dd7f0d903a39420fe906c92

See more details on using hashes here.

Supported by

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