stactools-noaa-cdr


Namestactools-noaa-cdr JSON
Version 0.2.1 PyPI version JSON
download
home_pagehttps://github.com/stactools-packages/noaa-cdr
SummaryNOAA Climate Data Records (CDR) stactools package
upload_time2023-03-31 13:37:18
maintainer
docs_urlNone
authorPete Gadomski
requires_python
license
keywords stactools pystac catalog stac noaa
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # stactools-noaa-cdr

[![PyPI](https://img.shields.io/pypi/v/stactools-noaa-cdr)](https://pypi.org/project/stactools-noaa-cdr/)

- Name: noaa-cdr
- Package: `stactools.noaa_cdr`
- [stactools-noaa-cdr on PyPI](https://pypi.org/project/stactools-noaa-cdr/)
- Owner: [@gadomski](https://github.com/gadomski)
- [Dataset homepage](https://www.ncei.noaa.gov/products/climate-data-records/)
- STAC extensions used:
  - [item assets](https://github.com/stac-extensions/item-assets)
  - [proj](https://github.com/stac-extensions/projection)
  - [raster](https://github.com/stac-extensions/raster)
  - [scientific](https://github.com/stac-extensions/scientific)
  - [classification](https://github.com/stac-extensions/classification)
- Extra fields:
  - `noaa_cdr:interval`: The time resolution (derived from the
    `time_coverage_resolution` field) 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 for
    `ocean-heat-content`.
- [Browse the example in human-readable form](https://radiantearth.github.io/stac-browser/#/external/raw.githubusercontent.com/stactools-packages/noaa-cdr/main/examples/catalog.json)

## STAC Examples

- Collections
  - [Ocean heat content](examples/noaa-cdr-ocean-heat-content/collection.json)
  - [Sea ice concentration](examples/noaa-cdr-sea-ice-concentration/collection.json)
  - [Sea surface temperature - optimum interpolation](examples/noaa-cdr-sea-surface-temperature-optimum-interpolation/collection.json)
  - [Sea surface temperature - WHOI](examples/noaa-cdr-sea-surface-temperature-whoi/collection.json)
- Items
  - [Ocean heat content, yearly for 2021, 2000m depth](examples/noaa-cdr-ocean-heat-content/ocean-heat-content-2021-2000m/ocean-heat-content-2021-2000m.json)
  - [Sea ice concentration, daily, northern hemisphere](examples/noaa-cdr-sea-ice-concentration/seaice_conc_daily_nh_20211231_f17_v04r00/seaice_conc_daily_nh_20211231_f17_v04r00.json)
  - [Sea surface temperature - optimum interpolation](examples/noaa-cdr-sea-surface-temperature-optimum-interpolation/oisst-avhrr-v02r01.20220913/oisst-avhrr-v02r01.20220913.json)
  - [Sea surface temperature - WHOI](examples/noaa-cdr-sea-surface-temperature-whoi/SEAFLUX-OSB-CDR_V02R00_SST_D20210831_C20211223-0/SEAFLUX-OSB-CDR_V02R00_SST_D20210831_C20211223-0.json)

### 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.

```mermaid
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

```shell
pip install stactools-noaa-cdr
```

## Command-line Usage

To create a collection, e.g. for the [Ocean heat content CDR](https://www.ncei.noaa.gov/products/climate-data-records/global-ocean-heat-content):

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

To create COGs and items:

```sh
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):

```sh
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](https://pre-commit.com/) to check any changes.
To set up your development environment:

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

To check all files:

```shell
pre-commit run --all-files
```

To run the tests:

```shell
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.

```sh
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:

```sh
scripts/create_examples.py
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/stactools-packages/noaa-cdr",
    "name": "stactools-noaa-cdr",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "stactools,pystac,catalog,STAC,NOAA",
    "author": "Pete Gadomski",
    "author_email": "pete.gadomski@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/5a/60/d4ac968f42704fa9e2fad3be308639bd6fb9fd7cfa340654c09e89f83e63/stactools-noaa-cdr-0.2.1.tar.gz",
    "platform": null,
    "description": "# stactools-noaa-cdr\n\n[![PyPI](https://img.shields.io/pypi/v/stactools-noaa-cdr)](https://pypi.org/project/stactools-noaa-cdr/)\n\n- Name: noaa-cdr\n- Package: `stactools.noaa_cdr`\n- [stactools-noaa-cdr on PyPI](https://pypi.org/project/stactools-noaa-cdr/)\n- Owner: [@gadomski](https://github.com/gadomski)\n- [Dataset homepage](https://www.ncei.noaa.gov/products/climate-data-records/)\n- STAC extensions used:\n  - [item assets](https://github.com/stac-extensions/item-assets)\n  - [proj](https://github.com/stac-extensions/projection)\n  - [raster](https://github.com/stac-extensions/raster)\n  - [scientific](https://github.com/stac-extensions/scientific)\n  - [classification](https://github.com/stac-extensions/classification)\n- Extra fields:\n  - `noaa_cdr:interval`: The time resolution (derived from the\n    `time_coverage_resolution` field) of the dataset. Useful for filtering\n    multi-temporal-resolution CDRs, such as ocean heat content.\n  - `noaa_cdr:max_depth`: The maximum depth of the measurements. Only used for\n    `ocean-heat-content`.\n- [Browse the example in human-readable form](https://radiantearth.github.io/stac-browser/#/external/raw.githubusercontent.com/stactools-packages/noaa-cdr/main/examples/catalog.json)\n\n## STAC Examples\n\n- Collections\n  - [Ocean heat content](examples/noaa-cdr-ocean-heat-content/collection.json)\n  - [Sea ice concentration](examples/noaa-cdr-sea-ice-concentration/collection.json)\n  - [Sea surface temperature - optimum interpolation](examples/noaa-cdr-sea-surface-temperature-optimum-interpolation/collection.json)\n  - [Sea surface temperature - WHOI](examples/noaa-cdr-sea-surface-temperature-whoi/collection.json)\n- Items\n  - [Ocean heat content, yearly for 2021, 2000m depth](examples/noaa-cdr-ocean-heat-content/ocean-heat-content-2021-2000m/ocean-heat-content-2021-2000m.json)\n  - [Sea ice concentration, daily, northern hemisphere](examples/noaa-cdr-sea-ice-concentration/seaice_conc_daily_nh_20211231_f17_v04r00/seaice_conc_daily_nh_20211231_f17_v04r00.json)\n  - [Sea surface temperature - optimum interpolation](examples/noaa-cdr-sea-surface-temperature-optimum-interpolation/oisst-avhrr-v02r01.20220913/oisst-avhrr-v02r01.20220913.json)\n  - [Sea surface temperature - WHOI](examples/noaa-cdr-sea-surface-temperature-whoi/SEAFLUX-OSB-CDR_V02R00_SST_D20210831_C20211223-0/SEAFLUX-OSB-CDR_V02R00_SST_D20210831_C20211223-0.json)\n\n### Layout\n\nEach Climate Data Record can have multiple subdatasets, which themselves can be\norganized by time intervals and other attributes. We have chosen to create one\nSTAC collection for each CDR, and to organize items in that collection by time\ninterval and time window. Subdatasets are included as COG assets.\n\nBecause each CDR has a different data layout in its NetCDFs, the mapping from\nNetCDF(s) to STAC Collections and Items varies from CDR to CDR.\nThe diagram below is an abstract representation of those layouts.  Note that the\nclass names do not directly correspond to code entities; this is strictly a\nconceptual diagram.  Note too the 8-1 relationship between\n`SeaSurfaceTemperatureWHOIItem` and `SeaSurfaceTemperatureWHOINetCDF`; each\nSST-WHOI NetCDF contains eight timesteps, and so breaks apart into eight STAC\nitems per NetCDF.\n\n```mermaid\nclassDiagram\n  direction LR\n\n  class OceanHeatContent\n  <<Collection>> OceanHeatContent\n\n  class SeaIceConcentration\n  <<Collection>> SeaIceConcentration\n\n  class SeaSurfaceTemperatureOptimumInterpolation\n  <<Collection>> SeaSurfaceTemperatureOptimumInterpolation\n\n  class SeaSurfaceTemperatureWHOI\n  <<Collection>> SeaSurfaceTemperatureWHOI\n\n\n  OceanHeatContent \"1\" --> \"n\" OceanHeatContentNetCDF\n  OceanHeatContent \"1\" --> \"0..n\" OceanHeatContentItem\n\n  SeaIceConcentration \"1\" --> \"0..n\" SeaIceConcentrationItem\n  SeaIceConcentrationItem \"1\" --> \"1\" SeaIceConcentrationNetCDF\n\n  SeaSurfaceTemperatureOptimumInterpolation \"1\" --> \"0..n\" SeaSurfaceTemperatureOptimumInterpolationItem\n  SeaSurfaceTemperatureOptimumInterpolationItem \"1\" --> \"1\" SeaSurfaceTemperatureOptimumInterpolationNetCDF\n\n  SeaSurfaceTemperatureWHOI \"1\" --> \"0..n\" SeaSurfaceTemperatureWHOIItem\n  SeaSurfaceTemperatureWHOIItem \"8\" --> \"1\" SeaSurfaceTemperatureWHOINetCDF\n\n```\n\n## Installation\n\n```shell\npip install stactools-noaa-cdr\n```\n\n## Command-line Usage\n\nTo create a collection, e.g. for the [Ocean heat content CDR](https://www.ncei.noaa.gov/products/climate-data-records/global-ocean-heat-content):\n\n```sh\nstac noaa-cdr ocean-heat-content create-collection examples/ocean-heat-content/collection.json\n```\n\nTo create COGs and items:\n\n```sh\nstac noaa-cdr ocean-heat-content create-collection --create-items \\\n  examples/ocean-heat-content/collection.json\n```\n\nTo only create COGs and items for the latest data (e.g. to create a small\nexample collection):\n\n```sh\nstac noaa-cdr ocean-heat-content create-collection --create-items --latest-only \\\n  examples/ocean-heat-content/collection.json\n```\n\nEach CDR has its own flavor of command line interface; use `stac noaa-cdr\n--help` to see a list of supported CDRs.\n\n## Contributing\n\nWe use [pre-commit](https://pre-commit.com/) to check any changes.\nTo set up your development environment:\n\n```shell\npip install -e .\npip install -r requirements-dev.txt\npre-commit install\n```\n\nTo check all files:\n\n```shell\npre-commit run --all-files\n```\n\nTo run the tests:\n\n```shell\npytest\n```\n\n### Updating static resources\n\nThere are several .json files in the source tree that are used to populate\nmetadata when creating collections and items.\nThere are two helper scripts in the `scripts/` directory that update these files.\n\n```sh\nscripts/create_item_assets.py\nscripts/extract_netcdf_asset_metadata.py > src/stactools/noaa_cdr/ocean-heat-content/asset-metadata.json\n```\n\nAdditionally, there is a script to create the `examples/` directory:\n\n```sh\nscripts/create_examples.py\n```\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "NOAA Climate Data Records (CDR) stactools package",
    "version": "0.2.1",
    "split_keywords": [
        "stactools",
        "pystac",
        "catalog",
        "stac",
        "noaa"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7c18a7303d414abc4995c2849a63a965e8027002a53b99bc53a02fd1d428a6e8",
                "md5": "62a418b432f0b5ad2fa1ababe04d9ce6",
                "sha256": "640191228eb567e0acde35a1b23d87f8cca28487ece4139974ced842ca37d048"
            },
            "downloads": -1,
            "filename": "stactools_noaa_cdr-0.2.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "62a418b432f0b5ad2fa1ababe04d9ce6",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 36226,
            "upload_time": "2023-03-31T13:37:16",
            "upload_time_iso_8601": "2023-03-31T13:37:16.738637Z",
            "url": "https://files.pythonhosted.org/packages/7c/18/a7303d414abc4995c2849a63a965e8027002a53b99bc53a02fd1d428a6e8/stactools_noaa_cdr-0.2.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5a60d4ac968f42704fa9e2fad3be308639bd6fb9fd7cfa340654c09e89f83e63",
                "md5": "25e3f3e3930b15fbcec0ffb8f4357bd2",
                "sha256": "cfae365776271e258cdb4a79bd8ab7358628cb2188e69f6be44deadd37fdf44b"
            },
            "downloads": -1,
            "filename": "stactools-noaa-cdr-0.2.1.tar.gz",
            "has_sig": false,
            "md5_digest": "25e3f3e3930b15fbcec0ffb8f4357bd2",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 27823,
            "upload_time": "2023-03-31T13:37:18",
            "upload_time_iso_8601": "2023-03-31T13:37:18.514077Z",
            "url": "https://files.pythonhosted.org/packages/5a/60/d4ac968f42704fa9e2fad3be308639bd6fb9fd7cfa340654c09e89f83e63/stactools-noaa-cdr-0.2.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-03-31 13:37:18",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "stactools-packages",
    "github_project": "noaa-cdr",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "stactools-noaa-cdr"
}
        
Elapsed time: 0.04902s