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

rad-if experiments #183

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
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
3 changes: 2 additions & 1 deletion feedstock/iids_pr.yaml
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
- "CMIP6.*.*.[CNRM-CM6-1,CanESM5].historical.r1i1p1f1.Omon.[tos, so].*.*"
# - "CMIP6.*.*.[CNRM-CM6-1,CanESM5].historical.r1i1p1f1.Omon.[tos, so].*.*"
- 'CMIP6.RFMIP.*.*.rad-irf.*.Efx.*.*.*'
13 changes: 11 additions & 2 deletions feedstock/recipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,15 @@ async def get_recipe_inputs():
for iid, data in recipe_data.items():
urls = get_sorted_http_urls_from_iid_dict(data)
pattern = pattern_from_file_sequence(urls, concat_dim="time")

# to accomodate single file we cannot parse target chunks (https://github.com/pangeo-forge/pangeo-forge-recipes/issues/275)
if len(urls) > 1:
chunk_fn = dynamic_chunking_func
combine_dims = pattern.combine_dim_keys
else:
chunk_fn = None
combine_dims = []

recipes[iid] = (
f"Creating {iid}" >> beam.Create(pattern.items())
# | CheckpointFileTransfer(
Expand All @@ -176,8 +185,8 @@ async def get_recipe_inputs():
| Preprocessor()
| StoreToZarr(
store_name=f"{iid}.zarr",
combine_dims=pattern.combine_dim_keys,
dynamic_chunking_fn=dynamic_chunking_func,
combine_dims=combine_dims,
dynamic_chunking_fn=chunk_fn,
)
| InjectAttrs({"pangeo_forge_api_responses": data})
| ConsolidateDimensionCoordinates()
Expand Down
11 changes: 3 additions & 8 deletions feedstock/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
leap-data-management-utils==0.0.12
git+https://github.com/leap-stc/leap-data-management-utils.git@allow-no-time-in-tests
#leap-data-management-utils==0.0.12
git+https://github.com/jbusecke/pangeo-forge-esgf.git@new-request-scheme
dynamic-chunks==0.0.3
#git+https://github.com/pangeo-forge/pangeo-forge-recipes@feature/concurrency-control
git+https://github.com/ranchodeluxe/xarray@ranchodeluxe-patch-1#egg=xarray
git+https://github.com/ranchodeluxe/rioxarray
git+https://github.com/ranchodeluxe/datatree@main#egg=xarray-datatree
git+https://github.com/pangeo-forge/pangeo-forge-recipes@jb/xarray-hack #see @gc/cached_disabled but with cache
#git+https://github.com/moradology/httpfs-sync.git@feature/pool-reuse
#httpfs-sync>=0.0.2
pangeo-forge-recipes==0.10.8
zarr==2.16.1
gcsfs
apache-beam[gcp]