Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion uxarray/core/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,8 @@ def open_dataset(grid_filename_or_obj: str,
vertices=vertices,
islatlon=islatlon,
isconcave=isconcave,
use_dual=use_dual)
use_dual=use_dual,
**kwargs)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @kthyng

This is a great catch! I would be careful passing through these kwargs into open_grid, since these kwargs would be "double dipping" when they open up the data file and grid file. In your case this doesn't cause an issue because you are using the same file for both the data and grid, however if our mesh and data were stored as separate files, this would break.

grid_ds = xr.open_dataset(grid_filename_or_obj,
decode_times=False,
**kwargs) # type: ignore

uxarray/uxarray/core/api.py

Lines 172 to 174 in af232ea

## UxDataset
ds = xr.open_dataset(filename_or_obj, decode_times=False,
**kwargs) # type: ignore

We could add another parameter to open_dataset, **grid_kwargs or similar which would be separate from the dataset's **kwargs

I can take a look into this today

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, makes sense.


## UxDataset
ds = xr.open_dataset(filename_or_obj, decode_times=False,
Expand Down