-
Notifications
You must be signed in to change notification settings - Fork 15
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
Issue with DEM() #58
Comments
The main issue when you pass in an array of only z values is that you'd lose all the information about location. So the I haven't looked at the |
Hi there. Thank you for flagging this! I think I was the one who initially implemented the input of an array/callable function for |
From memory, DEM class takes a tif or netcdf file and reads it in as you show. I would avoid passing arrays with no meta data. Sometimes the NetCdf/tif file is packed using a different convention than is expected by the software. What I recall is that the origin is either at the top left or bottom left of the DEM. In any case, this aspect of the software should be improved and standardized. |
Hi @filippogiaroli I have finally found some time to improve this issue. I will merge the branch referenced above shortly but if you want you can use that branch now. Please let me know if you run into any issues with reading or processing your DEM with that branch if you try it. Thanks. |
Hi!
I am trying to figure out the different uses of DEM() since I have a netcdf that is not working. So I tried both the string and array options with an example that I know it works.
I have a netcdf, that if I load and plot with xarray:
If I then use DEM() it all works correctly:
I wanted to get the same result giving an array as input.
1st ISSUE: you need to explicitly give bbox to DEM() since it fails to create it inside the function if not given (bbox=None) and then it crashes in lines 677-679 of geodata.py
I get a wrong dem:
After playing with the array I figured out that you need to give it as:
dem_etopo_fine = om.DEM(ds.z.values[::-1, :], bbox=(8, 10, 44, 45))
But cannot figure out why I need to invert the lon?
Any thoughts or ideas?
Thanks a lot!!
The text was updated successfully, but these errors were encountered: