Skip to content

Commit

Permalink
enatl
Browse files Browse the repository at this point in the history
  • Loading branch information
norlandrhagen committed Oct 16, 2024
1 parent fee1b62 commit 0447946
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions feedstock/eNATL600.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,14 @@
import pooch
from pangeo_forge_recipes.patterns import ConcatDim, FilePattern
from pangeo_forge_recipes.transforms import (
ConsolidateMetadata,
ConsolidateDimensionCoordinates,
OpenWithXarray,
StoreToZarr,
)

from leap_data_management_utils.data_management_transforms import (
Copy,
get_catalog_store_urls,
)

Expand All @@ -24,7 +28,6 @@ def make_full_path(time):

time_concat_dim = ConcatDim("time", dates)
pattern = FilePattern(make_full_path, time_concat_dim)
pattern = pattern.prune(2)


class OpenWithPooch(beam.PTransform):
Expand Down Expand Up @@ -59,13 +62,12 @@ def expand(self, pcoll: beam.PCollection) -> beam.PCollection:
| OpenWithPooch()
| OpenWithXarray()
| Preprocess()
| beam.Map(print)
# | StoreToZarr(
# store_name="eNATL600m-BLBT02.zarr",
# combine_dims=pattern.combine_dim_keys,
# target_chunks={"time": 100, "y": 400, "x": 800},
# )
# | ConsolidateDimensionCoordinates()
# | ConsolidateMetadata()
| StoreToZarr(
store_name="eNATL600m-BLBT02.zarr",
combine_dims=pattern.combine_dim_keys,
target_chunks={"time": 100, "y": 400, "x": 800},
)
| ConsolidateDimensionCoordinates()
| ConsolidateMetadata()
# | Copy(target=catalog_store_urls["enatl600m-blbt02"])
)

0 comments on commit 0447946

Please sign in to comment.