Repository navigation
Replies: 1 comment
|
Hi @ThibHlln try this nc = gwf.export('model.nc', fmt='netcdf')
nc.write()I think there's a few things going on here. I'll confirm and then follow up. |
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.
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
I have a MODFLOW6 model that I load with flopy and I am trying to export the data contained in each package in netCDF files.
I am taking inspiration from this tutorial https://flopy.readthedocs.io/en/3.10.0/Notebooks/export_tutorial.html. But as I am dealing with a MODFLOW6 and not a MODFLOW2005 model, I am not using:
ml = flopy.modflow.Modflow.load(...)butsim = flopy.mf6.MFSimulation.load(...)+gwf = sim.get_model(sim.model_names[0])to access the packages.Then I try to use the
.export()methods on the whole model (i.e.gwf.export('model.nc')) or on a specific package (i.e.gwf.dis.export('dis.nc')) but the variables the netCDF file contains seem only initialised and never populated with data (i.e. only containing NaNs) even though my package variables would contain actual data (no NaN).To Reproduce
Steps to reproduce the behavior:
Expected behavior
I would expect actual values in the netCDF files. Is this a bug?
Desktop (please complete the following information):
All reactions