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

Uploaded Source

Built Distribution

stitchee-1.5.0-py3-none-any.whl (29.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: stitchee-1.5.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.5.0.tar.gz
Algorithm Hash digest
SHA256 1f13360d4b759d73afed092dd2e639aef3b8dace268b3ae2f0322a91434af8ca
MD5 4663553d0957cc2e20969a3421dc597a
BLAKE2b-256 f213587599849c39f1fef996afe6df3b7ea137d67357c3a5fa7c2e4643f7e9c4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: stitchee-1.5.0-py3-none-any.whl
  • Upload date:
  • Size: 29.2 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.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a2a8c348df33d253c651dcb297d55d8a363c371e3e37e6114ef03fca3202dd15
MD5 296b84970485c27d57145c79148ec8bd
BLAKE2b-256 b47a7378b36bd6d252c0d2bb7c0610e73a3d1fc34e50666ec84917433a5fc945

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