Replies: 1 comment
-
Thanks @andyrich! Yeah, xarray is great. We are designing flopy 4.x around it, not only for utils but as the core data model. Maybe in the meantime we can add some dataset-returning utilities to 3.x like the one you provided. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
"Xarray makes working with labelled multi-dimensional arrays in Python simple, efficient, and fun!" website
Xarray is very well suited for spatial, timeseries, data import/export and other analyses used in the flopy framework. The package seems to be well supported.
I imagine the get_xarray could be part of the utils in flopy but it could also be part of the BinaryHeadFile class to access it directly from that object.
Here's some examples:
create a Dataset from your model and headfileobject:
plotting is easy and (somewhat) intuitive
plot heads for layer a date
plot average heads for a period and layer
plot a timeseries of average head values of layer 1
plot a grid of layer heads
g_simple = heads.isel(time = 10)['head'].plot(x="x", y="y", col="layer", col_wrap=3,vmin = -100,vmax = 1000)
Beta Was this translation helpful? Give feedback.
All reactions