Skip to content
This repository has been archived by the owner on Jan 10, 2025. It is now read-only.

Commit

Permalink
opendap
Browse files Browse the repository at this point in the history
  • Loading branch information
b8raoult committed Feb 15, 2024
1 parent ac34d8c commit bf985b9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 2 additions & 2 deletions ecml_tools/create/functions/actions/opendap.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def opendap(context, dates, url_pattern, *args, **kwargs):
)

ds = load_source("empty")
levels = kwargs.get("level", None)
levels = kwargs.get("level", kwargs.get("levelist"))

for url in all_urls:

Expand All @@ -28,7 +28,7 @@ def opendap(context, dates, url_pattern, *args, **kwargs):
s = s.sel(
valid_datetime=[d.isoformat() for d in dates],
param=kwargs["param"],
step=kwargs["step"],
step=kwargs.get("step", 0),
)
if levels:
s = s.sel(levelist=levels)
Expand Down
4 changes: 1 addition & 3 deletions ecml_tools/create/writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,7 @@ def load_datacube(self, cube, array):
data = cubelet.to_numpy()
cubelet_coords = cubelet.coords

bar.set_description(
f"Loading {i}/{total} {str(cubelet)} ({data.shape}) {cube=}"
)
bar.set_description(f"Loading {i}/{total} {str(cubelet)} ({data.shape})")
load += time.time() - now

j = cubelet_coords[1]
Expand Down

0 comments on commit bf985b9

Please sign in to comment.