From af66694a270e846a368cf1ca67dcb740f409144c Mon Sep 17 00:00:00 2001 From: Ryan Abernathey Date: Fri, 23 Sep 2022 07:31:25 -0400 Subject: [PATCH 1/3] first draft --- recipes/gdp-drifters/meta.yaml | 28 ++++++++++++++++++++++++++++ recipes/gdp-drifters/recipe.py | 13 +++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 recipes/gdp-drifters/meta.yaml create mode 100644 recipes/gdp-drifters/recipe.py diff --git a/recipes/gdp-drifters/meta.yaml b/recipes/gdp-drifters/meta.yaml new file mode 100644 index 0000000000..919335e762 --- /dev/null +++ b/recipes/gdp-drifters/meta.yaml @@ -0,0 +1,28 @@ +title: "Global Drifter Program" +description: > + This dataset includes hourly sea surface temperature and current data collected by satellite-tracked + surface drifting buoys ("drifters") of the NOAA Global Drifter Program. The Drifter Data Assembly Center (DAC) + at NOAA’s Atlantic Oceanographic and Meteorological Laboratory (AOML) has applied quality control procedures + and processing to edit these observational data and obtain estimates at regular hourly intervals. + The data include positions (latitude and longitude), sea surface temperatures (total, diurnal, and non-diurnal components) + and velocities (eastward, northward) with accompanying uncertainty estimates. Metadata include identification numbers, + experiment number, start location and time, end location and time, drogue loss date, death code, manufacturer, and drifter type. +pangeo_forge_version: "0.9" +recipes: + - id: gdp-hourly + object: "recipe:recipe" +provenance: + providers: + - name: "NOAA AOML" + description: "National Oceanographic & Atmospheric Administration Atlantic Oceanographic and Meteorological Laboratory" + roles: + - producer + - licensor + url: https://www.aoml.noaa.gov/phod/gdp/hourly_data.php + license: "Proprietary" +maintainers: + - name: "Ryan Abernathey" + orcid: "0000-0001-5999-4917" + github: rabernat +bakery: + id: "pangeo-ldeo-nsf-earthcube" \ No newline at end of file diff --git a/recipes/gdp-drifters/recipe.py b/recipes/gdp-drifters/recipe.py new file mode 100644 index 0000000000..661a0bdf3c --- /dev/null +++ b/recipes/gdp-drifters/recipe.py @@ -0,0 +1,13 @@ + +from pangeo_forge_recipes.patterns import pattern_from_file_sequence, FileType +from pangeo_forge_recipes.recipes import XarrayZarrRecipe + +url = "https://www.nodc.noaa.gov/archive/arc0199/0248584/1.1/data/0-data/gdp_v2.00.nc" + +pattern = pattern_from_file_sequence([url], "time") + +recipe = XarrayZarrRecipe( + pattern, + subset_inputs={"time": 100}, + xarray_open_kwargs={"decode_coords": "all"} +) \ No newline at end of file From a921b3dd8f0973c2583e11c7c515759bac258b37 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 28 Sep 2022 19:27:36 +0000 Subject: [PATCH 2/3] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- recipes/gdp-drifters/meta.yaml | 18 +++++++++--------- recipes/gdp-drifters/recipe.py | 13 +++++-------- 2 files changed, 14 insertions(+), 17 deletions(-) diff --git a/recipes/gdp-drifters/meta.yaml b/recipes/gdp-drifters/meta.yaml index 919335e762..04ba2dfc0a 100644 --- a/recipes/gdp-drifters/meta.yaml +++ b/recipes/gdp-drifters/meta.yaml @@ -1,4 +1,4 @@ -title: "Global Drifter Program" +title: 'Global Drifter Program' description: > This dataset includes hourly sea surface temperature and current data collected by satellite-tracked surface drifting buoys ("drifters") of the NOAA Global Drifter Program. The Drifter Data Assembly Center (DAC) @@ -7,22 +7,22 @@ description: > The data include positions (latitude and longitude), sea surface temperatures (total, diurnal, and non-diurnal components) and velocities (eastward, northward) with accompanying uncertainty estimates. Metadata include identification numbers, experiment number, start location and time, end location and time, drogue loss date, death code, manufacturer, and drifter type. -pangeo_forge_version: "0.9" +pangeo_forge_version: '0.9' recipes: - id: gdp-hourly - object: "recipe:recipe" + object: 'recipe:recipe' provenance: providers: - - name: "NOAA AOML" - description: "National Oceanographic & Atmospheric Administration Atlantic Oceanographic and Meteorological Laboratory" + - name: 'NOAA AOML' + description: 'National Oceanographic & Atmospheric Administration Atlantic Oceanographic and Meteorological Laboratory' roles: - producer - licensor url: https://www.aoml.noaa.gov/phod/gdp/hourly_data.php - license: "Proprietary" + license: 'Proprietary' maintainers: - - name: "Ryan Abernathey" - orcid: "0000-0001-5999-4917" + - name: 'Ryan Abernathey' + orcid: '0000-0001-5999-4917' github: rabernat bakery: - id: "pangeo-ldeo-nsf-earthcube" \ No newline at end of file + id: 'pangeo-ldeo-nsf-earthcube' diff --git a/recipes/gdp-drifters/recipe.py b/recipes/gdp-drifters/recipe.py index 661a0bdf3c..f3aa71e065 100644 --- a/recipes/gdp-drifters/recipe.py +++ b/recipes/gdp-drifters/recipe.py @@ -1,13 +1,10 @@ - -from pangeo_forge_recipes.patterns import pattern_from_file_sequence, FileType +from pangeo_forge_recipes.patterns import FileType, pattern_from_file_sequence from pangeo_forge_recipes.recipes import XarrayZarrRecipe -url = "https://www.nodc.noaa.gov/archive/arc0199/0248584/1.1/data/0-data/gdp_v2.00.nc" +url = 'https://www.nodc.noaa.gov/archive/arc0199/0248584/1.1/data/0-data/gdp_v2.00.nc' -pattern = pattern_from_file_sequence([url], "time") +pattern = pattern_from_file_sequence([url], 'time') recipe = XarrayZarrRecipe( - pattern, - subset_inputs={"time": 100}, - xarray_open_kwargs={"decode_coords": "all"} -) \ No newline at end of file + pattern, subset_inputs={'time': 100}, xarray_open_kwargs={'decode_coords': 'all'} +) From 867863cebc067a3eb428551685ce7cdc3e75342e Mon Sep 17 00:00:00 2001 From: Anderson Banihirwe Date: Thu, 20 Oct 2022 19:35:15 -0600 Subject: [PATCH 3/3] remove unused import --- recipes/gdp-drifters/recipe.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/gdp-drifters/recipe.py b/recipes/gdp-drifters/recipe.py index f3aa71e065..cdae9e863e 100644 --- a/recipes/gdp-drifters/recipe.py +++ b/recipes/gdp-drifters/recipe.py @@ -1,4 +1,4 @@ -from pangeo_forge_recipes.patterns import FileType, pattern_from_file_sequence +from pangeo_forge_recipes.patterns import pattern_from_file_sequence from pangeo_forge_recipes.recipes import XarrayZarrRecipe url = 'https://www.nodc.noaa.gov/archive/arc0199/0248584/1.1/data/0-data/gdp_v2.00.nc'