You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a problem at this line when using the sizing from oceanmesh:
Traceback (most recent call last):
File "/home/tomsail/work/python/pyPoseidon/Tutorial/mesh_model_test.py", line 40, in <module>
b.create()
File "/home/tomsail/work/python/pyPoseidon/pyposeidon/schism.py", line 455, in create
self.mesh = pmesh.set(type="tri2d", **kwargs)
File "/home/tomsail/work/python/pyPoseidon/pyposeidon/mesh.py", line 36, in set
return tri2d(**kwargs)
File "/home/tomsail/work/python/pyPoseidon/pyposeidon/mesh.py", line 226, in __init__
g, bg = moceanmesh.get(self.boundary.contours, **kwargs) # create mesh with OCEANMESH
File "/home/tomsail/work/python/pyPoseidon/pyposeidon/moceanmesh.py", line 136, in get
gr = make_oceanmesh(contours, **kwargs)
File "/home/tomsail/work/python/pyPoseidon/pyposeidon/moceanmesh.py", line 411, in make_oceanmesh
dem = om.DEM(dem_source, crs=crs, bbox=extent)
File "/home/tomsail/work/python/pyPoseidon/Tutorial/.venv/lib/python3.10/site-packages/oceanmesh/geodata.py", line 777, in __init__
if dem.exists():
File "/home/tomsail/work/python/pyPoseidon/Tutorial/.venv/lib/python3.10/site-packages/xarray/core/common.py", line 278, in __getattr__
raise AttributeError(
AttributeError: 'Dataset' object has no attribute 'exists'
I think the problem is with the test if dem.exists().
dem should be an instance with dem.Dataset as the xarray object. On the other hand the dem_source is an attribute of the model class indicating the source for the dem.
If you want to check if the Dataset exists in the instance then maybe:
I have a problem at this line when using the sizing from oceanmesh:
This is cause by the update of this line :
is that line really needed ? since we already have the variable self.dem attributed?
Problem mentioned in #114 but I am opening a new issue here.
FIY I removed that line in the telemac.py (coming soon on my fork)
The text was updated successfully, but these errors were encountered: