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
The get_ahn function calls the nlmod.dims.resample.structured_da_to_ds function. In this function the da.rio.reproject_match(ds, resampling, nodata=nodata) function is called which will add 3 attributes to x and y dataarrays:
long_name : x coordinate of projection
standard_name : projection_x_coordinate
units : metre
For the cache we check if the cached dataset (ahn_ds) has the same coordinates and attributes as the given dataset (ds). This check fails because of the new attributes. We decided to check coordinate attributes because some attributes of the time dimension are essential model parameters so should be checked.
The structured_da_to_ds already has some logic to remove coordinates added by the rio.reproject_match function. I will add some code to remove these attributes of the coordinates as well.
It turned out to be a lot more complex with coordinates that are added and modified by different functions. With the help of @dbrakenhoff we fixed it but then I referenced the wrong issue number (#150 instead of #149) and everything became even more complex. However I think this issue can be closed.
A repeated run of the following function gives me the log message below:
Log:
I should be seeing a message that AHN is loaded from cache.
The text was updated successfully, but these errors were encountered: