Skip to main content

NOAA Climate Data Records (CDR) stactools package

Project description

stactools-noaa-cdr

PyPI

STAC Examples

Layout

Each Climate Data Record can have multiple subdatasets, which themselves can be organized by time intervals and other attributes. We have chosen to create one STAC collection for each CDR, and to organize items in that collection by time interval and time window. Subdatasets are included as COG assets.

Because each CDR has a different data layout in its NetCDFs, the mapping from NetCDF(s) to STAC Collections and Items varies from CDR to CDR. The diagram below is an abstract representation of those layouts. Note that the class names do not directly correspond to code entities; this is strictly a conceptual diagram. Note too the 8-1 relationship between SeaSurfaceTemperatureWHOIItem and SeaSurfaceTemperatureWHOINetCDF; each SST-WHOI NetCDF contains eight timesteps, and so breaks apart into eight STAC items per NetCDF.

classDiagram
  direction LR

  class OceanHeatContent
  <<Collection>> OceanHeatContent

  class SeaIceConcentration
  <<Collection>> SeaIceConcentration

  class SeaSurfaceTemperatureOptimumInterpolation
  <<Collection>> SeaSurfaceTemperatureOptimumInterpolation

  class SeaSurfaceTemperatureWHOI
  <<Collection>> SeaSurfaceTemperatureWHOI


  OceanHeatContent "1" --> "n" OceanHeatContentNetCDF
  OceanHeatContent "1" --> "0..n" OceanHeatContentItem

  SeaIceConcentration "1" --> "0..n" SeaIceConcentrationItem
  SeaIceConcentrationItem "1" --> "1" SeaIceConcentrationNetCDF

  SeaSurfaceTemperatureOptimumInterpolation "1" --> "0..n" SeaSurfaceTemperatureOptimumInterpolationItem
  SeaSurfaceTemperatureOptimumInterpolationItem "1" --> "1" SeaSurfaceTemperatureOptimumInterpolationNetCDF

  SeaSurfaceTemperatureWHOI "1" --> "0..n" SeaSurfaceTemperatureWHOIItem
  SeaSurfaceTemperatureWHOIItem "8" --> "1" SeaSurfaceTemperatureWHOINetCDF

Installation

pip install stactools-noaa-cdr

Command-line Usage

To create a collection, e.g. for the Ocean heat content CDR:

stac noaa-cdr ocean-heat-content create-collection examples/ocean-heat-content/collection.json

To create COGs and items:

stac noaa-cdr ocean-heat-content create-collection --create-items \
  examples/ocean-heat-content/collection.json

To only create COGs and items for the latest data (e.g. to create a small example collection):

stac noaa-cdr ocean-heat-content create-collection --create-items --latest-only \
  examples/ocean-heat-content/collection.json

Each CDR has its own flavor of command line interface; use stac noaa-cdr --help to see a list of supported CDRs.

Contributing

We use pre-commit to check any changes. To set up your development environment:

pip install -e .
pip install -r requirements-dev.txt
pre-commit install

To check all files:

pre-commit run --all-files

To run the tests:

pytest

Updating static resources

There are several .json files in the source tree that are used to populate metadata when creating collections and items. There are two helper scripts in the scripts/ directory that update these files.

scripts/create_item_assets.py
scripts/extract_netcdf_asset_metadata.py

Additionally, there is a script to create the examples/ directory:

scripts/create_examples.py

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

stactools-noaa-cdr-0.1.0.tar.gz (25.4 kB view details)

Uploaded Source

Built Distribution

stactools_noaa_cdr-0.1.0-py3-none-any.whl (34.8 kB view details)

Uploaded Python 3

File details

Details for the file stactools-noaa-cdr-0.1.0.tar.gz.

File metadata

  • Download URL: stactools-noaa-cdr-0.1.0.tar.gz
  • Upload date:
  • Size: 25.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.7

File hashes

Hashes for stactools-noaa-cdr-0.1.0.tar.gz
Algorithm Hash digest
SHA256 55d82d4ab155c9a5e31388236b5a1837ceb69ae02037ccefed3d0419ae1a9be0
MD5 e6ff5282b5de61675b9043bb8c109e7d
BLAKE2b-256 26c2e59c298c810d04341c389406225a86ffa0ad538d211d91a739e4d3f55b80

See more details on using hashes here.

File details

Details for the file stactools_noaa_cdr-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for stactools_noaa_cdr-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6d6dba8ce843a2602c8c127d81f88c57ba71fc5843b9c575e5cf0e1efdb26c51
MD5 72188e502e543e93c84364cc35bcba8b
BLAKE2b-256 71aa5077c6c15a32761f96f72252ffc1c0b2bea598c7031f3416b5b9947b638d

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