Skip to content
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

Bug #109 forcing with DatetimeNoLeap #110

Merged
merged 5 commits into from Oct 11, 2022
Merged

Bug #109 forcing with DatetimeNoLeap #110

merged 5 commits into from Oct 11, 2022

Conversation

hboisgon
Copy link
Contributor

@hboisgon hboisgon commented Oct 5, 2022

See #109 : solution is to use xr.to_datetimeindex instead of pd.to_datetime to convert times in forcing DataArrays

@hboisgon hboisgon self-assigned this Oct 5, 2022
@hboisgon
Copy link
Contributor Author

hboisgon commented Oct 5, 2022

@DirkEilander : could you review this small bugfix? You reviewed this new change from #97 so you should already know more or less what it's about :) Many thanks!

@hboisgon hboisgon linked an issue Oct 5, 2022 that may be closed by this pull request
@hboisgon
Copy link
Contributor Author

Tests should be fixed when merging Deltares/hydromt#211 in hydromt

hydromt_wflow/wflow.py Outdated Show resolved Hide resolved
@DirkEilander
Copy link
Contributor

Tests should be fixed when merging Deltares/hydromt#211 in hydromt

The test fails on another issue it seems, see #113

This was linked to issues Oct 11, 2022
Copy link
Contributor

@DirkEilander DirkEilander left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for these fixes @hboisgon.
I think it's basically good to go. But strongly suggest to remove the lines that assume self.crs still has the rasterio CRS dtype as these will never be hit (see comment)

Comment on lines 766 to 768
elif hasattr(self.crs, "is_epsg_code"):
if self.crs.is_epsg_code:
code = int(self.crs["init"].lstrip("epsg:"))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is true for hydromt >= 0.5.0 but not for older version I think. I don't mind removing I think we put pins everywhere already in the different env files.

@hboisgon hboisgon merged commit 0649bec into main Oct 11, 2022
@hboisgon hboisgon deleted the bug/109_datetime branch October 11, 2022 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

unbound local error in rivers method Bug: pd.to_datetime on DatetimeNoLeap calendar Bug: crs epsg code
2 participants