Skip to content

Conversation

@huard
Copy link
Collaborator

@huard huard commented Aug 28, 2025

Pull Request Checklist:

  • This PR addresses an already opened issue (for bug fixes / features)
    • This PR fixes #xyz
  • (If applicable) Documentation has been added / updated (for bug fixes / features).
  • (If applicable) Tests have been added.
  • CHANGELOG.rst has been updated (with summary of main changes).
    • Link to issue (:issue:number) and pull request (:pull:number) has been added.

What kind of change does this PR introduce?

  • ...

Does this PR introduce a breaking change?

Other information:

@huard huard requested a review from RondeauG August 28, 2025 21:49
Copy link
Collaborator

@RondeauG RondeauG left a comment

Choose a reason for hiding this comment

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

LGTM!

So if I get this correctly, this will only help the generation of the rvt file so that the dimensions are in the expected order, right?

From my tests, Raven is also quite sensitive about the order of the dimensions within the dataset itself (t, y, x). Do you think that it is within the scope of RavenPy to warn the user if their data isn't ordered correctly?

@huard
Copy link
Collaborator Author

huard commented Aug 29, 2025

Correct.

Huh. I'm surprised by this. I thought Raven covered all possible combinations. I would recommend documenting such issues and opening a ticket on the Raven repo.

@RondeauG
Copy link
Collaborator

RondeauG commented Aug 29, 2025

Actually, while I was talking about this with @richardarsenault, I realized that it might be a partial issue. With data in the X,Y,T order, I had this issue with missing meteorological data that proves that Raven still understood the NetCDF file correctly:
image

However, this was with fake elevation data that covered the entire grid. When I moved on to real elevation data (and after fixing the issue of missing grid cells), I had errors that make me think that elevation specifically is still hard-coded Y,X.

@huard
Copy link
Collaborator Author

huard commented Aug 29, 2025

I see explicit logic around the dimension order of lat, lon and elev.
https://github.com/CSHS-CWRA/RavenHydroFramework/blob/f9c77a2491ce271493ea9629859d45f84ed181cd/src/ForcingGrid.cpp#L1016

@RondeauG
Copy link
Collaborator

True, but I have errors when data isn't in the right order... This might be an xHydro issue? This is fine here, then.

@huard huard merged commit a15e80c into main Sep 16, 2025
8 of 10 checks passed
@huard huard deleted the reorder_dims branch September 16, 2025 19:40
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.

3 participants