stactools-noaa-cdr
- Name: noaa-cdr
- Package:
stactools.noaa_cdr - stactools-noaa-cdr on PyPI
- Owner: @gadomski
- Dataset homepage
- STAC extensions used:
- Extra fields:
noaa_cdr:interval: The time resolution (derived from thetime_coverage_resolutionfield) of the dataset. Useful for filtering multi-temporal-resolution CDRs, such as ocean heat content.noaa_cdr:max_depth: The maximum depth of the measurements. Only used forocean-heat-content.
- Browse the example in human-readable form
STAC Examples
- Collections
- Items
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 > src/stactools/noaa_cdr/ocean-heat-content/asset-metadata.json
Additionally, there is a script to create the examples/ directory:
scripts/create_examples.py
Metadata
Release files for stactools-noaa-cdr 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| stactools-noaa-cdr-0.2.1.tar.gz | 27.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| stactools_noaa_cdr-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 64.0 kB
Release files / stactools-noaa-cdr-0.2.1.tar.gz
| Download URL | stactools-noaa-cdr-0.2.1.tar.gz |
|---|---|
| Size | 27.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cfae365776271e258cdb4a79bd8ab7358628cb2188e69f6be44deadd37fdf44b
|
|
BLAKE2b-256 checksum How to use checksums |
5a60d4ac968f42704fa9e2fad3be308639bd6fb9fd7cfa340654c09e89f83e63
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.2
|
Release files / stactools_noaa_cdr-0.2.1-py3-none-any.whl
| Download URL | stactools_noaa_cdr-0.2.1-py3-none-any.whl |
|---|---|
| Size | 36.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
640191228eb567e0acde35a1b23d87f8cca28487ece4139974ced842ca37d048
|
|
BLAKE2b-256 checksum How to use checksums |
7c18a7303d414abc4995c2849a63a965e8027002a53b99bc53a02fd1d428a6e8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.2
|