-
Notifications
You must be signed in to change notification settings - Fork 13
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
staticmaps.nc to gtiff and back #37
Comments
Other, but potentially related issue: Running |
From Huite: The problem here is being caused by having a dataset with e.g. 500 m resolution versus one with 100 m resolution. In this case, xarray will select the coordinates that are available in both and compute a result with just that. So my guess is, if you know which dataset has a different cellsize and is being used in this workflow, you can fix the issue by changing that dataset to the appropriate cellsize (at the start) |
The problem indeed comes from calling the set_staticmaps line 'too soon' (without any further processing of the mapstack). In #42 I renamed the notebook to convert_staticmaps_to_mapstack and recommend to use the built-in read_staticmaps_pcr and write_staticmaps_pcr in order to be able to use hydromt to manually update wflow staticmaps. @DirkEilander : shall we add some extra lines in set_staticmaps in order to check that the new data has the same grid/dimensions and if not throw an error? |
@hboisgon good suggestion! I think we can simply added |
Closed as fixed in setup_grid in hydromt core |
Converting staticmaps.nc to gtiff and back to staticmaps.nc as described here:
https://deltares.github.io/hydromt_wflow/latest/examples/examples/convert_staticmaps_to_gtiff.html
Results in bad maps (striped patterns in the maps) even without editing any of the gtiff rasters.
ds_updated = hydromt.open_mfraster(join(root, 'staticmaps', '*.tif'))
does create good maps (when exporting ds_updated to .nc file), but writing it back to a model (i.e.mod.set_staticmaps(ds_updated)
&mod.write()
seems to create the issue somehow.The text was updated successfully, but these errors were encountered: