Closed thwllms closed 4 months ago
Just one comment on the mentioned topic of saving DataArrays to disc. I recently ran into this issue dealing with large raster datasets and was able to get by using rioxarray: https://corteva.github.io/rioxarray/html/rioxarray.html#rioxarray.raster_dataset.RasterDataset.to_raster.
Using the windowed parameter of the .to_raster() method writes the xarray DataArray to disc in the same size as it was chunked when first being read.
Just one comment on the mentioned topic of saving DataArrays to disc. I recently ran into this issue dealing with large raster datasets and was able to get by using rioxarray: https://corteva.github.io/rioxarray/html/rioxarray.html#rioxarray.raster_dataset.RasterDataset.to_raster.
Using the windowed parameter of the .to_raster() method writes the xarray DataArray to disc in the same size as it was chunked when first being read.
Gotcha. I've used rioxarray as well. Since this isn't raster data I think we have to write out to Zarr or another format. I hope that Xvec continues to be developed since their data model seems like it would be ideal for our use case (i.e., vector GIS data with multidimensional values)
Attention: Patch coverage is 97.82609%
with 2 lines
in your changes missing coverage. Please review.
Files | Coverage Δ | |
---|---|---|
src/rashdf/utils.py | 90.62% <100.00%> (+0.51%) |
:arrow_up: |
src/rashdf/plan.py | 98.85% <97.70%> (-0.59%) |
:arrow_down: |
44
45
Notes
plan_hdf.mesh_timeseries_output("MeshName", "Water Surface")
plan_hdf.mesh_timeseries_output_cells("MeshName")
,plan_hdf.mesh_timeseries_output_faces("MeshName")
dask
is installed, DataArray/Dataset objects are based on Dask arrays. If not, default to numpy arrays.rashdf
will set the dask array chunk size to match the HDF chunk size. I don't know if it's optimal to let the user set the dask array chunk size upfront.Examples
Read cell water surface output as DataArray
Read all available cell-based timeseries output as DataArray
Read all available mesh face timeseries outputs as Dataset