From b617aaf619f50aa015f8e66b72221e2b46da96d4 Mon Sep 17 00:00:00 2001 From: Rich Signell Date: Thu, 1 Dec 2022 16:37:37 -0500 Subject: [PATCH 1/7] Create meta.yaml --- recipes/NWM-1km/meta.yaml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 recipes/NWM-1km/meta.yaml diff --git a/recipes/NWM-1km/meta.yaml b/recipes/NWM-1km/meta.yaml new file mode 100644 index 0000000000..11f22d5252 --- /dev/null +++ b/recipes/NWM-1km/meta.yaml @@ -0,0 +1,25 @@ +title: 'NWM-2.1-grid1km-LDAS' +description: > + Three-hourly output from 40 years. +pangeo_forge_version: '0.9.0' +pangeo_notebook_version: '2022.07.13' +recipes: + - id: NWM-2.1-grid1km-LDAS + object: 'recipe:recipe' +provenance: + providers: + - name: 'NOAA National Water Center' + description: 'Parker MacCready, Professor, University of Washington' + orcid: '0000-0002-8070-8062' + github: rsignell-usgs + roles: + - provider + - licensor + url: https://faculty.washington.edu/pmacc/LO/LiveOcean.html + license: 'CC0' +maintainers: + - name: 'Rich Signell' + orcid: '0000-0003-0682-9613' + github: rsignell +bakery: + id: 'pangeo-ldeo-nsf-earthcube' From b9bf0ec8bac8a8a0ca6cbaa86e5c1fbe846d47b9 Mon Sep 17 00:00:00 2001 From: Rich Signell Date: Thu, 1 Dec 2022 16:41:09 -0500 Subject: [PATCH 2/7] Create recipe.py --- recipes/NWM-1km/recipe.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 recipes/NWM-1km/recipe.py diff --git a/recipes/NWM-1km/recipe.py b/recipes/NWM-1km/recipe.py new file mode 100644 index 0000000000..1d2adf94a6 --- /dev/null +++ b/recipes/NWM-1km/recipe.py @@ -0,0 +1,22 @@ +import fsspec +import kerchunk + +from pangeo_forge_recipes.patterns import pattern_from_file_sequence +from pangeo_forge_recipes.recipes.reference_hdf_zarr import HDFReferenceRecipe + +fs = fsspec.filesystem( + 's3', anon=True +) + +all_paths = sorted(fs.glob('noaa-nwm-retrospective-2-1-pds/model_output/2017/*LDAS*'')) + +pattern = pattern_from_file_sequence(['s3://' + path for path in all_paths], 'time') + + +recipe = HDFReferenceRecipe( + pattern, + netcdf_storage_options={ + 'anon': True + }, + identical_dims=['x','y'], preprocess=kerchunk.combine.drop('reference_time') +) From 7aafd1903c1dd577f547a714f35dfa57be60f20b Mon Sep 17 00:00:00 2001 From: Rich Signell Date: Thu, 1 Dec 2022 16:48:34 -0500 Subject: [PATCH 3/7] Update recipe.py --- recipes/NWM-1km/recipe.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/NWM-1km/recipe.py b/recipes/NWM-1km/recipe.py index 1d2adf94a6..017df118e3 100644 --- a/recipes/NWM-1km/recipe.py +++ b/recipes/NWM-1km/recipe.py @@ -8,7 +8,7 @@ 's3', anon=True ) -all_paths = sorted(fs.glob('noaa-nwm-retrospective-2-1-pds/model_output/2017/*LDAS*'')) +all_paths = sorted(fs.glob('noaa-nwm-retrospective-2-1-pds/model_output/2017/*LDAS*')) pattern = pattern_from_file_sequence(['s3://' + path for path in all_paths], 'time') From b4471e1b7d5494efbb70f261572adb4fd489f9a4 Mon Sep 17 00:00:00 2001 From: Rich Signell Date: Fri, 2 Dec 2022 17:20:34 -0500 Subject: [PATCH 4/7] Do all 40 years, not just 2017 --- recipes/NWM-1km/recipe.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/NWM-1km/recipe.py b/recipes/NWM-1km/recipe.py index 017df118e3..b8fb236acf 100644 --- a/recipes/NWM-1km/recipe.py +++ b/recipes/NWM-1km/recipe.py @@ -8,7 +8,7 @@ 's3', anon=True ) -all_paths = sorted(fs.glob('noaa-nwm-retrospective-2-1-pds/model_output/2017/*LDAS*')) +all_paths = sorted(fs.glob('noaa-nwm-retrospective-2-1-pds/model_output/*/*LDAS*')) pattern = pattern_from_file_sequence(['s3://' + path for path in all_paths], 'time') From fb093d0f6c3011ab81eaed59889addb0e685d180 Mon Sep 17 00:00:00 2001 From: Rich Signell Date: Sat, 3 Dec 2022 10:58:55 -0500 Subject: [PATCH 5/7] Correct metadata --- recipes/NWM-1km/meta.yaml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/recipes/NWM-1km/meta.yaml b/recipes/NWM-1km/meta.yaml index 11f22d5252..a625c48090 100644 --- a/recipes/NWM-1km/meta.yaml +++ b/recipes/NWM-1km/meta.yaml @@ -1,6 +1,6 @@ title: 'NWM-2.1-grid1km-LDAS' -description: > - Three-hourly output from 40 years. +description: + LDAS variables at 3-hourly intervals from the US National Water Model Retrospective (1980-). There are 21 LDAS variables including soil moisture, rain, snow, evapotranspiration pangeo_forge_version: '0.9.0' pangeo_notebook_version: '2022.07.13' recipes: @@ -8,14 +8,12 @@ recipes: object: 'recipe:recipe' provenance: providers: - - name: 'NOAA National Water Center' - description: 'Parker MacCready, Professor, University of Washington' - orcid: '0000-0002-8070-8062' - github: rsignell-usgs + - name: 'NOAA Office of Water Prediction' + description: 'US NOAA OWP' roles: - provider - licensor - url: https://faculty.washington.edu/pmacc/LO/LiveOcean.html + url: https://water.noaa.gov/about/nwm license: 'CC0' maintainers: - name: 'Rich Signell' From 92d0d6ebfb267dbf3311d5e0274e57b985c421f7 Mon Sep 17 00:00:00 2001 From: Rich Signell Date: Sat, 3 Dec 2022 10:59:33 -0500 Subject: [PATCH 6/7] Update meta.yaml --- recipes/NWM-1km/meta.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/NWM-1km/meta.yaml b/recipes/NWM-1km/meta.yaml index a625c48090..376733afe9 100644 --- a/recipes/NWM-1km/meta.yaml +++ b/recipes/NWM-1km/meta.yaml @@ -1,6 +1,6 @@ title: 'NWM-2.1-grid1km-LDAS' description: - LDAS variables at 3-hourly intervals from the US National Water Model Retrospective (1980-). There are 21 LDAS variables including soil moisture, rain, snow, evapotranspiration + LDAS variables at 3-hourly intervals from the US National Water Model Version 2.1 Retrospective (1980-). There are 21 LDAS variables including soil moisture, rain, snow, evapotranspiration pangeo_forge_version: '0.9.0' pangeo_notebook_version: '2022.07.13' recipes: From de4965b992f23bdcc7588f93512d1dba5b4b2876 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 23 Dec 2022 16:29:20 +0000 Subject: [PATCH 7/7] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- recipes/NWM-1km/meta.yaml | 3 +-- recipes/NWM-1km/recipe.py | 11 ++++------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/recipes/NWM-1km/meta.yaml b/recipes/NWM-1km/meta.yaml index 376733afe9..9993ed2b02 100644 --- a/recipes/NWM-1km/meta.yaml +++ b/recipes/NWM-1km/meta.yaml @@ -1,6 +1,5 @@ title: 'NWM-2.1-grid1km-LDAS' -description: - LDAS variables at 3-hourly intervals from the US National Water Model Version 2.1 Retrospective (1980-). There are 21 LDAS variables including soil moisture, rain, snow, evapotranspiration +description: LDAS variables at 3-hourly intervals from the US National Water Model Version 2.1 Retrospective (1980-). There are 21 LDAS variables including soil moisture, rain, snow, evapotranspiration pangeo_forge_version: '0.9.0' pangeo_notebook_version: '2022.07.13' recipes: diff --git a/recipes/NWM-1km/recipe.py b/recipes/NWM-1km/recipe.py index b8fb236acf..0511ad732f 100644 --- a/recipes/NWM-1km/recipe.py +++ b/recipes/NWM-1km/recipe.py @@ -4,9 +4,7 @@ from pangeo_forge_recipes.patterns import pattern_from_file_sequence from pangeo_forge_recipes.recipes.reference_hdf_zarr import HDFReferenceRecipe -fs = fsspec.filesystem( - 's3', anon=True -) +fs = fsspec.filesystem('s3', anon=True) all_paths = sorted(fs.glob('noaa-nwm-retrospective-2-1-pds/model_output/*/*LDAS*')) @@ -15,8 +13,7 @@ recipe = HDFReferenceRecipe( pattern, - netcdf_storage_options={ - 'anon': True - }, - identical_dims=['x','y'], preprocess=kerchunk.combine.drop('reference_time') + netcdf_storage_options={'anon': True}, + identical_dims=['x', 'y'], + preprocess=kerchunk.combine.drop('reference_time'), )