Skip to content

Commit

Permalink
remove target store
Browse files Browse the repository at this point in the history
  • Loading branch information
norlandrhagen committed Jul 16, 2024
1 parent 92be6b0 commit eadeae2
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions feedstock/pyramid.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
import apache_beam as beam
import xarray as xr
import fsspec
from dataclasses import dataclass

from pangeo_forge_ndpyramid.transforms import StoreToPyramid
from pangeo_forge_recipes.transforms import OpenWithXarray, ConsolidateMetadata
from pangeo_forge_recipes.patterns import FileType, pattern_from_file_sequence
from pangeo_forge_recipes.storage import FSSpecTarget

from leap_data_management_utils.data_management_transforms import (
Copy,
Expand All @@ -25,6 +23,8 @@
# > 2
levels = 2



pattern = pattern_from_file_sequence(
[
"gs://leap-persistent/data-library/feedstocks/eNATL_feedstock/eNATL60-BLBT02.zarr"
Expand All @@ -47,16 +47,11 @@ def expand(self, pcoll):
return pcoll | "subset" >> beam.MapTuple(lambda k, v: (k, self._subset(v)))


fs = fsspec.get_filesystem_class("file")()
target_root = FSSpecTarget(fs, "pyramid_outputs/resample/")


pyramid = (
beam.Create(pattern.items())
| OpenWithXarray(file_type=FileType("zarr"), xarray_open_kwargs={"chunks": {}})
| Subset()
| StoreToPyramid(
target_root=target_root,
store_name="eNATL60_BLBT02_pyramid.zarr",
epsg_code="4326",
pyramid_method="resample",
Expand Down

0 comments on commit eadeae2

Please sign in to comment.