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

Request for support of rotated rectangular DISV grids #16

Open
aprovost-usgs opened this issue Oct 16, 2018 · 10 comments
Open

Request for support of rotated rectangular DISV grids #16

aprovost-usgs opened this issue Oct 16, 2018 · 10 comments

Comments

@aprovost-usgs
Copy link
Collaborator

aprovost-usgs commented Oct 16, 2018

DG (initial email to Chris 6/11/2018) and RW (initial email to Alden 10/11/2018) noted that MODPATH doesn't support rotated rectangular/quadtree DISV grids. Examination of the code shows that MP7 explicitly checks (in subroutine CheckRectangular) to make sure every cell in a MF6 DISV grid is a rectangle that's aligned with the x and y coordinate directions. If not, MODPATH throws an error.

RW asked whether we would consider adding support for rotated rectangular grids. Seems like this could be done by "unrotating" the grid, doing the particle tracking, and then "rerotating" the results. (Could probably do the same for quadtree.)

@Julien-K
Copy link

Julien-K commented May 14, 2021

Hi, is there any update on this subject? Do you have a roadmap on the necessary modifications to the code, whether you'd prefer including rotation inside the Fortran code or doing some pre/post processing outside Modpath? I'm thinking of doing pre/post processing in Perl for my own purpose but it may be more useful to modify the Fortran code.

@aprovost-usgs
Copy link
Collaborator Author

Hi @Julien-K, Without ruling out the possibility, I wouldn't list this as a priority for the near future, and I haven't mapped out the specific code changes that would be needed. Developing your own Perl script would probably not be a bad investment if you plan to work with rotated grids regularly. Btw, you may be interested to know that we're working on incorporating a particle-tracking capability into MODFLOW 6 (eyeing a first release in the fall of this year). It will be able to handle more general unstructured grids than MODPATH 7 does, as well as rotated grids.

@Julien-K
Copy link

Hi @aprovost-usgs, thank you for your reply, that would be a great feature for MF6!
Meanwhile actually nearly everything's in place in Modpath to support DISV rotated grids with very minimal modifications to RectangularGridDisvMf6.f90. I've managed to get it working, I'll submit a pull request once the testing phase is completed because I think setting RotationAngle in path/endpoint/timeseries output files' headers raised a bug in ModelMuse.

@aprovost-usgs
Copy link
Collaborator Author

@Julien-K, thanks very much for looking into that further. I look forward to seeing how you've handled it and the results of your testing.

@rhugman
Copy link

rhugman commented Nov 10, 2023

G'day - did this issue ever get resolved? I see there is an open PR from a while ago.

@aprovost-usgs
Copy link
Collaborator Author

@rhugman Although we're grateful to the author of the PR for coding up a prototype and doing some initial testing, the tests were inconclusive in demonstrating that the implementation was working correctly. The possibility hasn't been ruled out, but incorporating grid rotation into MODPATH 7 remains a low priority for the reasons cited earlier. You might be interested to know that the particle-tracking capability being developed for MODFLOW 6 -- the PRT Model, which handles rotated grids -- should soon be merged into the develop branch of the MODFLOW 6 repo. That might be a good time to give it a try if you're so inclined.

@Julien-K
Copy link

Julien-K commented Nov 13, 2023 via email

@aprovost-usgs
Copy link
Collaborator Author

Thank you, @Julien-K, we appreciate your efforts.

@javgs-bd
Copy link

Hello. It seems that the transition to PRT is ongoing for MF6:
modflowpy/flopy#2127
modflowpy/flopy#1940

... but it might not be too well known yet. Although is always on the user to read the complete docs before MP7 usage, it might still be worthwhile to suggests that this MP7 limitation be declared early in the user guide. We have found no mention to that in it.

We have only found this limitation explicitly declared in the input/output manual (see images below). There are also other notes in the docs that might lead to think that rotated DIV grids are possible in MP7, which open more chances to be unaware until the search for the issue becomes more specific.

The error message in our case was also not too informative. It said something along the lines of "the binary grid contains data that is inconsistent with a rectangular DISV grid". Our first thought was we did something wrong when building the grid, or that our Gridgen setup was at fault.

With the abilities of flopy and other GUIs today, rotated grids in real world models are commonplace. So I hope this issue, the suggestion and the images helps other earlier when trying out rotated unstructured grids with MP7, prevent them from, or alert them on the extra processing that will be needed. Maybe this can also be mentioned in the flopy MP7 examples.

Regards
Javier

Input/Output
image
image

Release Notes
image

Error message
image

@aprovost-usgs
Copy link
Collaborator Author

@javgs-bd Thank you for your suggestion and for the helpful supporting information. We'll consider how best to document this limitation of MODPATH 7 so it's clearer to users. Btw, the Particle Tracking (PRT) Model was released in MODFLOW 6.5.0 this past summer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants