Skip to content
Discussion options

You must be logged in to vote

That's right: in 3.11.0, get_gridprops_disv() has no option to return local coordinates or the transform, and there's no dedicated helper for it. The base grid you passed to Gridgen already has the inverse transform, though, so the workaround is short:

import numpy as np
import flopy

mg = g.modelgrid  # the structured base grid passed to Gridgen
props = g.get_gridprops_disv()

vx, vy = mg.get_local_coords(
    np.array([v[1] for v in props["vertices"]]),
    np.array([v[2] for v in props["vertices"]]),
)
props["vertices"] = [[v[0], x, y] for v, x, y in zip(props["vertices"], vx, vy)]

cx, cy = mg.get_local_coords(
    np.array([c[1] for c in props["cell2d"]]),
    np.array([c[2] for c in p…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by javgs-bd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants