Best way to work with rotated model grids (MF6) in Flopy?

124 views
Skip to first unread message

nikobenho

unread,
Apr 23, 2021, 6:54:41 AM4/23/21
to MODFLOW Users Group
I originally posted this question with #Flopy on stackoverflow: https://stackoverflow.com/questions/67202339/best-way-to-work-with-rotated-model-grids-mf6-in-flopy but since this group is more active I thought I should give it a go here, too:

I want to model a system that consist of glacifluvial sediment deposited in a NE, SW orientation (this is also the direction of GW-flow), using MF6 disv-grid through Flopy. In order to reduce risk of numerical instability, I want to rotate the model grid 45 degrees counter clockwise. However, rotating the model grid causes the grid to be displaced in relation to model pertinent information, such as digital elevation maps, boundary conditions, and observation data.

What is the recommended approach for working with rotated model grids? Is it possible to rotate the grid, refine the grid, and then rotate it back to its original position before appending boundary conditions and elevations? Or is the modeller expected to rotate all other data as well (i.e. boundary conditions, observation data, e.t.c.)? If the latter is true, then that would mean a lot of extra work for a complex model.

Ultimately, I want to perform parameter estimation / history matching using PEST/PEST++. What could be the consequence of having a rotated model grid when performing model calibration?

Very curious to hear your opinions and recommendations.

Cheers,

Nikolas

Garth Cooper

unread,
Apr 24, 2021, 5:44:42 AM4/24/21
to MODFLOW Users Group
Hi,

I believe in Flopy you are able to define the rotation in the model below:


The code below is taken from the site above:

import flopy 
m = flopy.modflow.Modflow() 
dis = flopy.modflow.ModflowDis(m) 
xoff = 963091.522224 
yoff = 9280278.473164 
angrot = 35 
m.modelgrid.set_coord_info(xoff=xoff, yoff=yoff, angrot=angrot) 
m.modelgrid.plot()

Then you should be able to use this to bring in other files normally without rotating them. 

Anything trick or complex I suggest using a GUI - there is always a trade off between time spend on figuring out Python code or using a GUI like Model Muse or Vistas which makes your life that much easier. However figure out things in Python is more rewarding.

nikobenho

unread,
Apr 24, 2021, 11:54:34 PM4/24/21
to MODFLOW Users Group
That worked, thanks! :)
Reply all
Reply to author
Forward
0 new messages