Skip to content

Commit

Permalink
adding logging
Browse files Browse the repository at this point in the history
  • Loading branch information
norlandrhagen committed Mar 13, 2024
1 parent bbbeb1a commit 967e6eb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pangeo_forge_recipes/transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,7 @@ def expand(
| beam.Map(self.dynamic_chunking_fn, **self.dynamic_chunking_fn_kwargs)
)
)
logger.info(f"Storing Zarr with {target_chunks =} to {self.get_full_target()}")
logger.warning(f"Storing Zarr with {target_chunks =} to {self.get_full_target()}")

rechunked_datasets = indexed_datasets | Rechunk(target_chunks=target_chunks, schema=schema)

Expand Down
3 changes: 3 additions & 0 deletions pangeo_forge_recipes/writers.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,8 @@ def get_full_target(self: ZarrWriterProtocol) -> FSSpecTarget:
target_root = self.target_root
return target_root / self.store_name

import logging
logger = logging.getLogger(__name__)

def create_pyramid(
item: Tuple[Index, xr.Dataset],
Expand All @@ -231,6 +233,7 @@ def create_pyramid(
# For now, we can use ds.rename
if rename_spatial_dims:
ds = ds.rename(rename_spatial_dims)
logger.warning("reprojecting")

level_ds = level_reproject(ds, level=level, **pyramid_kwargs)

Expand Down

0 comments on commit 967e6eb

Please sign in to comment.