Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
thenaomig committed Jan 13, 2023
1 parent b8ddfaf commit 9b5d6ba
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions recipes/cmip6-wrf-wus/recipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,19 @@
import xarray as xr
import fsspec

URL_FORMAT = ('s3://wrf-cmip6-noversioning/downscaled_products/gcm/cesm2_r11i1p1f1_ssp370/hourly/{Time:%Y}/d02/auxhist_d01_{Time:%Y-%m-%d_%X}')
URL_FORMAT = 's3://wrf-cmip6-noversioning/downscaled_products/gcm/cesm2_r11i1p1f1_ssp370/hourly/{Time:%Y}/d02/auxhist_d01_{Time:%Y-%m-%d_%X}'

times = pd.date_range('2014-09-01', '2100-08-31 23:00', freq='H')

time_concat_dim = ConcatDim('Time', times)


def make_url(Time):
return URL_FORMAT.format(Time=Time)


pattern = FilePattern(make_url, time_concat_dim)

recipe = HDFReferenceRecipe(pattern,
concat_dims=['Time'], coo_map={'Time': [str(time) for time in times]},
preprocess=None)
recipe = HDFReferenceRecipe(
pattern, concat_dims=['Time'], coo_map={'Time': [str(time) for time in times]}, preprocess=None
)

0 comments on commit 9b5d6ba

Please sign in to comment.