Skip to content

Commit

Permalink
Merge pull request #189 from auraoupa/master
Browse files Browse the repository at this point in the history
  • Loading branch information
andersy005 authored Oct 20, 2022
2 parents 347b19a + d69ab37 commit 7ece666
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
27 changes: 27 additions & 0 deletions recipes/eNATL60/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
title: 'eNATL60 with tides daily data'
description: 'extractions of temperature, salinity and vertical velocity at some chosen depths from eNATL60 NEMO simulation with tides'
pangeo_forge_version: '0.8.3'
recipes:
- id: eNATL60_wtides_1d_mld
object: 'recipe:eNATL60_wtides_1d_mld'
- id: eNATL60_wtides_1d_tsw60m
object: 'recipe:eNATL60_wtides_1d_tsw60m'
- id: eNATL60_wtides_1d_tsw600m
object: 'recipe:eNATL60_wtides_1d_tsw600m'
provenance:
providers:
- name: 'MEOM IGE'
description: "Multiscale Ocean Modelling Group, Institut des Geosciences de l'Environnement, Grenoble, France"
roles:
- producer
- licensor
url: http://meom-group.github.io/
# This is a required field for provider. Follow STAC spec
# https://github.com/radiantearth/stac-spec/blob/master/collection-spec/collection-spec.md#license
license: 'CC-BY-4.0'
maintainers:
- name: 'Aurélie Albert'
orcid: '0000-0001-7783-5629'
github: auraoupa
bakery:
id: 'pangeo-ldeo-nsf-earthcube'
26 changes: 26 additions & 0 deletions recipes/eNATL60/recipe.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import pandas as pd

from pangeo_forge_recipes.patterns import pattern_from_file_sequence
from pangeo_forge_recipes.recipes import XarrayZarrRecipe

dates = pd.date_range('2009-07-01', '2010-06-30', freq='D')

url_base = (
'https://ige-meom-opendap.univ-grenoble-alpes.fr'
'/thredds/fileServer/meomopendap/extract/eNATL60/eNATL60-BLBT02/1d'
)


def make_recipe(var, dep):
input_url_pattern = (
url_base + '/eNATL60-BLBT02_y{time:%Y}m{time:%m}d{time:%d}.1d_' + var + dep + '.nc'
)
input_urls = [input_url_pattern.format(time=time) for time in dates]
pattern = pattern_from_file_sequence(input_urls, 'time_counter')
recipe = XarrayZarrRecipe(pattern, target_chunks={'time_counter': 1})
return recipe


eNATL60_wtides_1d_mld = make_recipe('somxl010', '')
eNATL60_wtides_1d_tsw60m = make_recipe('TSW', '_60m')
eNATL60_wtides_1d_tsw600m = make_recipe('TSW', '_600m')

0 comments on commit 7ece666

Please sign in to comment.