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

identicalness for hydromt_delft3dfm #219

Open
veenstrajelmer opened this issue Mar 15, 2024 · 2 comments
Open

identicalness for hydromt_delft3dfm #219

veenstrajelmer opened this issue Mar 15, 2024 · 2 comments

Comments

@veenstrajelmer
Copy link
Collaborator

veenstrajelmer commented Mar 15, 2024

Related to Deltares/hydromt_delft3dfm#128

xugrid/ugrid/ugridbase.py >> equals has changed from 0.8.1 to 0.9.0
causes errors when adding ugriddatararray to existing ugriddataset if not equal

xugrid/ugrid/ugridbase.py

0.8.1:

    def equals(self, other):
        if not isinstance(other, type(self)):
            return False
        # TODO: check values, etc.
        return True

0.9.0:

    def equals(self, other) -> bool:
        if other is self:
            return True
        elif isinstance(other, type(self)):
            xr_self = self.to_dataset()
            xr_other = other.to_dataset()
            return xr_self.identical(xr_other)
        return False
@veenstrajelmer veenstrajelmer linked a pull request Mar 15, 2024 that will close this issue
@veenstrajelmer veenstrajelmer changed the title identicalness identicalness for hydromt_delft3dfm Mar 15, 2024
@Huite
Copy link
Collaborator

Huite commented Mar 18, 2024

We needed to compare grids in imod-python, what exactly is going wrong?

There's a not a lot of info in the linked issue.

@veenstrajelmer
Copy link
Collaborator Author

veenstrajelmer commented Mar 18, 2024

@xldeltares and I created this grid on a Friday afternoon before a holiday. The description is a bit meager I agree, but will be updated once we know more. Something happened in hydromt_delft3dfm when adding a UgridArray (variable) to an existing UgridDataset. The UgridArray did not have all dimensions that the UgridDataset has, so we created a xugrid branch/PR with the old compare function to test if it worked. This was the case, but three xugrid testcases failed and further investigation is necessary on our side. This is the related issue, but it also lacks description for now: Deltares/hydromt_delft3dfm#128. An update will follow in a few weeks.

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 a pull request may close this issue.

2 participants