I am setting up my model spatial reference as follows:
m = flopy.modflow.Modflow.load(nam, verbose=True,load_only=['dis'])
x_offset = 963091.522224#x lower limit (SW corner)
y_offset = 9280278.473164#y lower limit (SW corner)
rot = 35.0# CCW
m.sr.xll = x_offset#x lower limit (SW corner)
m.sr.yll = y_offset#y lower limit (SW corner)
m.sr.rotation = rot
I believe the properties are being set correctly as geotiff rasters I export are rotated correctly. However, my results for get_rc() are not coming out right. The x,y pairs I am passing are at cell centers, the results have been perfect with unrotated grids.
The method call I am using (Psuedo code) is:
(r,c) = m.sr.get_rc(X,Y)
where X and Y are numpy arrays.