-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Quadtree read/write, no build #226
base: main
Are you sure you want to change the base?
Conversation
…reased readability)
Done
Not working/testes:
|
…ult but using another cartopy projection
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work Roel!
Looks good and as discussed
* bugfix so that the .nc file is closed automatically when erroring or when leaving the context manager (with block). see pydata/xarray#1629 (comment) * fixed all occurences of xr.opendataset with the safe open&close pattern * review comments by Roel * fix linting --------- Co-authored-by: roeldegoede <[email protected]>
hydromt_sfincs/sfincs.py
Outdated
@@ -3126,7 +3196,7 @@ def read_forcing(self, data_vars: List = None): | |||
elif name in ["netbndbzsbzi", "netsrcdis"]: | |||
ds = GeoDataset.from_netcdf(fn, crs=self.crs, chunks="auto") | |||
else: | |||
ds = xr.open_dataset(fn, chunks="auto") | |||
ds = xr.load_dataset(fn, chunks="auto") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@LuukBlom zou dit niet ook zo'n indented statement geweest moeten zijn?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nee, hier wordt in 1x de hele ds geladen, dus load_dataset is prima hier vgm.
docs xarray zeggen dit:
Open, load into memory, and close a Dataset from a file or file-like object.
This is a thin wrapper around open_dataset(). It differs from open_dataset in that it loads the Dataset into memory, closes the file, and returns the Dataset. In contrast, open_dataset keeps the file handle open and lazy loads its contents. All parameters are passed directly to open_dataset. See that documentation for further details.
* added xu_open_dataset wrapper. * load_dataset -> open_dataset * linting --------- Co-authored-by: roeldegoede <[email protected]>
Issue addressed
Fixes #
Explanation
Explain how you addressed the bug/feature request, what choices you made and why.
Checklist
main
Additional Notes (optional)
Add any additional notes or information that may be helpful.