Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Sep 28, 2022
1 parent 1a63b8b commit d69ab37
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 22 deletions.
22 changes: 11 additions & 11 deletions recipes/eNATL60/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,27 +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"
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"
object: 'recipe:eNATL60_wtides_1d_mld'
- id: eNATL60_wtides_1d_tsw60m
object: "recipe:eNATL60_wtides_1d_tsw60m"
object: 'recipe:eNATL60_wtides_1d_tsw60m'
- id: eNATL60_wtides_1d_tsw600m
object: "recipe:eNATL60_wtides_1d_tsw600m"
object: 'recipe:eNATL60_wtides_1d_tsw600m'
provenance:
providers:
- name: "MEOM IGE"
- 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"
license: 'CC-BY-4.0'
maintainers:
- name: "Aurélie Albert"
orcid: "0000-0001-7783-5629"
- name: 'Aurélie Albert'
orcid: '0000-0001-7783-5629'
github: auraoupa
bakery:
id: "pangeo-ldeo-nsf-earthcube"
id: 'pangeo-ldeo-nsf-earthcube'
24 changes: 13 additions & 11 deletions recipes/eNATL60/recipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,21 @@
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"
'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')
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 d69ab37

Please sign in to comment.