things working a little
MODIFY
pangeo_forge/recipe.py
pangeo_forge/recipe.py
@@ -179,7 +179,9 @@ class NetCDFtoZarrRecipe(BaseRecipe):
).chunk() # make sure data are not in memory
init_dsets.append(chunk_ds)
# TODO: create csutomizable option for this step
- ds = xr.merge(init_dsets, compat="identical", join="exact")
+ ds = xr.merge(
+ init_dsets, compat="identical", join="exact", combine_attrs="override"
+ )
# make sure the concat dim has a valid fill_value to avoid
# overruns when writing chunk
@@ -359,7 +361,7 @@ class NetCDFtoZarrSequentialRecipe(NetCDFtoZarrRecipe):
@dataclass
class test_NetCDFtoZarrMultiVarSequentialRecipe(NetCDFtoZarrRecipe):
- input_pattern: VariableSequencePattern
+ input_pattern: VariableSequencePattern = field(default_factory=VariableSequencePattern)
sequence_dim: str = ""
def __post_init__(self):

MODIFY
setup.cfg
setup.cfg
@@ -3,7 +3,7 @@ max-line-length = 100
[isort]
known_first_party=pangeo_forge
-known_third_party=aiohttp,fsspec,numpy,pandas,pange_forge,pkg_resources,prefect,pytest,rechunker,setuptools,sphinx_book_theme,xarray,zarr
+known_third_party=aiohttp,fsspec,numpy,pandas,pkg_resources,prefect,pytest,rechunker,setuptools,sphinx_book_theme,xarray,zarr
multi_line_output=3
include_trailing_comma=True
force_grid_wrap=0

MODIFY
tests/test_recipe.py
tests/test_recipe.py
import aiohttp
import pytest
import xarray as xr
-from pange_forge.patterns import VariableSequencePattern
from pangeo_forge import recipe
+from pangeo_forge.patterns import VariableSequencePattern
from pangeo_forge.storage import UninitializedTargetError
dummy_fnames = ["a.nc", "b.nc", "c.nc"]
@@ -93,6 +93,9 @@ def test_NetCDFtoZarrSequentialRecipe(
# apply these changes to the expected dataset
ds_expected = process_chunk(ds_expected)
+ print(ds_target)
+ print(ds_expected)
+
assert ds_target.identical(ds_expected)

things working a little