Skip to content

Commit

Permalink
Fix top required in cache2d scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
bdestombe committed Dec 27, 2024
1 parent 9c85653 commit d784cb5
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,6 @@ dmypy.json
# Pyre type checker
.pyre/


bin/
*.code-workspace
**/model_ws
22 changes: 11 additions & 11 deletions src/nhflotools/pwnlayers/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def read_pwn_data2(
ds_mask_transition : xarray Dataset
mask dataset. True in transition zone.
"""
modelgrid = nlmod.dims.grid.modelgrid_from_ds(ds)
modelgrid = nlmod.dims.grid.modelgrid_from_ds(ds, rotated=False)
ix = GridIntersect(modelgrid, method="vertex")

ds_out = xr.Dataset(
Expand Down Expand Up @@ -163,7 +163,7 @@ def read_pwn_data2(
return ds_out


@cache.cache_netcdf(coords_2d=True)
@cache.cache_netcdf(datavars=["top"], coords_2d=True)
def _read_bergen_basis_aquitards(
ds,
pathname=None,
Expand Down Expand Up @@ -271,7 +271,7 @@ def _read_bergen_basis_aquitards(
return ds_out


@cache.cache_netcdf(coords_2d=True)
@cache.cache_netcdf(datavars=["top"], coords_2d=True)
def _read_bergen_c_aquitards(ds, pathname, length_transition=100.0, ix=None):
"""Read vertical resistance of layers.
Expand Down Expand Up @@ -313,7 +313,7 @@ def _read_bergen_c_aquitards(ds, pathname, length_transition=100.0, ix=None):
return ds_out


@cache.cache_netcdf(coords_2d=True)
@cache.cache_netcdf(datavars=["top"], coords_2d=True)
def _read_bergen_thickness_aquitards(
ds,
pathname=None,
Expand Down Expand Up @@ -419,7 +419,7 @@ def _read_bergen_thickness_aquitards(
return ds_out


@cache.cache_netcdf(coords_2d=True)
@cache.cache_netcdf(datavars=["top"], coords_2d=True)
def _read_top_of_aquitards(ds, pathname, length_transition=100.0, ix=None):
"""Read top of aquitards.
Expand Down Expand Up @@ -461,7 +461,7 @@ def _read_top_of_aquitards(ds, pathname, length_transition=100.0, ix=None):
return ds_out


@cache.cache_netcdf(coords_2d=True)
@cache.cache_netcdf(datavars=["top"], coords_2d=True)
def _read_thickness_of_aquitards(ds, pathname, length_transition=100.0, ix=None):
"""Read thickness of aquitards.
Expand Down Expand Up @@ -505,7 +505,7 @@ def _read_thickness_of_aquitards(ds, pathname, length_transition=100.0, ix=None)
return ds_out


@cache.cache_netcdf(coords_2d=True)
@cache.cache_netcdf(datavars=["top"], coords_2d=True)
def _read_kd_of_aquitards(ds, pathname, length_transition=100.0, ix=None):
"""Read kd of aquitards.
Expand Down Expand Up @@ -546,7 +546,7 @@ def _read_kd_of_aquitards(ds, pathname, length_transition=100.0, ix=None):
return ds_out


@cache.cache_netcdf(coords_2d=True)
@cache.cache_netcdf(datavars=["top"], coords_2d=True)
def _read_mask_of_aquifers(ds, pathname, length_transition=100.0, ix=None):
"""Read mask of aquifers.
Expand Down Expand Up @@ -593,7 +593,7 @@ def _read_mask_of_aquifers(ds, pathname, length_transition=100.0, ix=None):
return ds_out


@cache.cache_netcdf(coords_2d=True)
@cache.cache_netcdf(datavars=["top"], coords_2d=True)
def _read_layer_kh(ds, pathname, length_transition=100.0, ix=None):
"""Read hydraulic conductivity of layers.
Expand Down Expand Up @@ -636,7 +636,7 @@ def _read_layer_kh(ds, pathname, length_transition=100.0, ix=None):
return ds_out


@cache.cache_netcdf(coords_2d=True)
@cache.cache_netcdf(datavars=["top"], coords_2d=True)
def _read_kv_area(ds, pathname, length_transition=100.0, ix=None): # noqa: ARG001
"""Read vertical resistance of layers.
Expand Down Expand Up @@ -711,7 +711,7 @@ def _read_kv_area(ds, pathname, length_transition=100.0, ix=None): # noqa: ARG0
return ds_out


@cache.cache_netcdf(coords_2d=True)
@cache.cache_netcdf(datavars=["top"], coords_2d=True)
def _read_topsysteem(ds, pathname):
"""Read topsysteem.
Expand Down

0 comments on commit d784cb5

Please sign in to comment.