Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding liveocean recipe #154

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions recipes/liveocean/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
title: "NANOOS LiveOcean ROMS Model"
description: >
Hourly ocean forecast fields of the NE Pacific, produced by a Regional Ocean Modeling System (ROMS) computer model,
updated daily. This is an experimental product intended for research use only. For more information please
visit the LiveOcean webpage: https://faculty.washington.edu/pmacc/LO/LiveOcean.html
pangeo_forge_version: "0.9.0"
cisaacstern marked this conversation as resolved.
Show resolved Hide resolved
pangeo_notebook_version: "2022.07.13"
recipes:
- id: liveocean
object: "recipe:recipe"
provenance:
providers:
- name: "Parker MacCready"
description: "Parker MacCready, Professor, University of Washington"
orcid: "0000-0002-8070-8062"
github: parkermac
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"
18 changes: 18 additions & 0 deletions recipes/liveocean/recipe.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
from pangeo_forge_recipes.patterns import pattern_from_file_sequence

import fsspec

fs = fsspec.filesystem('s3', anon=True, client_kwargs={'endpoint_url': 'https://mghp.osn.xsede.org'})

all_paths = sorted(fs.glob('s3://rsignellbucket1/LiveOcean/*.nc'))

pattern = pattern_from_file_sequence(['s3://' + path for path in all_paths], 'ocean_time')

from pangeo_forge_recipes.recipes.reference_hdf_zarr import HDFReferenceRecipe

recipe = HDFReferenceRecipe(
pattern,
netcdf_storage_options={"anon": True, 'client_kwargs':{'endpoint_url': 'https://mghp.osn.xsede.org'}},
identical_dims=['lat_psi','lat_rho','lat_u','lat_v','lon_psi','lon_rho','lon_u','lon_v'],
)