oceanmodeling / xarray-selafin

An xarray engine for opening Selafin files (TELEMAC)
https://pypi.org/project/xarray-selafin/
The Unlicense
4 stars 2 forks source link

implemented Selafin class from selafin.py #3

Closed tomsail closed 9 months ago

tomsail commented 9 months ago

works for 2D and 3D tests are working Lazy index yet to be implemented correctly with (or without) dask

pmav99 commented 9 months ago

After the latest commits all the tests are broken.

FAILED tests/io_test.py::test_open_dataset[3D] - NotImplementedError: Lazy array not yet implemented
FAILED tests/io_test.py::test_open_dataset[2D] - NotImplementedError: Lazy array not yet implemented
FAILED tests/io_test.py::test_to_netcdf[3D] - NotImplementedError: Lazy array not yet implemented
FAILED tests/io_test.py::test_to_netcdf[2D] - NotImplementedError: Lazy array not yet implemented
FAILED tests/io_test.py::test_to_selafin[3D] - NotImplementedError: Lazy array not yet implemented
FAILED tests/io_test.py::test_to_selafin[2D] - NotImplementedError: Lazy array not yet implemented

Did you forget to commit something?

tomsail commented 9 months ago

great.. well dask shouldn't be implemented (it is now optional). So I might have forgotten to update pyproject.toml

I'll fix this and add LazyIndex support (I almost got it working now)

tomsail commented 9 months ago

not dask + lazy index works but the precision from writing respectively in slf/ netcdf induces changes thus Assertion Error

see the function I implemented in io_test.py

Values for variable 'VELOCITY U' differ.
Values for variable 'VELOCITY V' differ.
Values for variable 'WATER DEPTH' differ.
Values for variable 'FREE SURFACE' differ.
Values for variable 'BOTTOM' differ.
tomsail commented 9 months ago

Will add another PR with _hermes support