Conversation
|
Hey @akeeste I added the updates for the updated variable names in the Delft3D 2025 version. I was thinking about updating the code to also accept xarry in addition to netCDF. |
|
Hey @akeeste pending all the checks pass, this is ready for review. |
|
Thanks @browniea I'll look for some time to review next week |
mhkit/river/io/d3d.py
Outdated
| if not isinstance(data, netCDF4.Dataset): | ||
| raise TypeError("data must be a NetCDF4 object") | ||
| if not isinstance(data, (netCDF4.Dataset, xr.Dataset)): | ||
| raise TypeError("data must be a NetCDF4 object or xarray Dataset") |
There was a problem hiding this comment.
Add a test for xarray input
|
@akeeste The xarry input is a little more complicate than I initially thought. It might be worth adding an example. I'll plan to have a few functions converted for you to look at our next meeting. The rest of the changes are done. |
|
@browniea I checked your recent changes and pulled in dev. This looks good so far. The last remaining item is to add a test for d3d.py that uses xarray input. I don't think we need a full example--perhaps just duplicating an existing test that uses netcdf and inputting an xarray Dataset instead |
|
I also pulled develop into this branch. Might have to do so again when #435 is merged |
|
Making a note here that currently there is some redundancy processing both xarray and netCDF file formats. For now, I'm leaving the redundancy but, in the future, we could convert the input format instead of processing both. D3D outputs netCDF files although xarray has some advantages tabulating the data. |
Updates to
io/d3d.pycodecalculate_grid_convergence_indexfunction to calculate the grid convergence index between two grid's results basted on the equation GCI