Notebook now plots head cells in the correct orientation. Lists now check that cellids are in active cells within the model grid. Set_all_data_external now converts expands constant data and saves it to an external file.
Closes#280 and #835
* refactor(make-release): Software citation developed from version.py
Closes#727
* release: update mf6 v6.1.1 dfn and flopy mf6 classes (#1)
* docs(misc): clean up docstrings
* refactor(GridIntersect): fix error message
for unsupported methods
* bug(GridIntersect): fix#10
ensure one entry per grid cell in polygon intersection result
add test for this case
* bug(gridintersect): fixes#917
bug in structured mode where linestrings were not handled
correctly if they pass in and out of grid cell
Co-authored-by: jdhughes-usgs <jdhughes@usgs.gov>
Co-authored-by: Christian Langevin <langevin@usgs.gov>
Update logic that incorrectly handles fluxes from/to active cells in zone 0.
Remove logic precluding flow to/from zone 0 in CHTOCH flow-face
computations. Add test for case where zone 0 contains active cells.
Remove format-string syntax to preserve compatibility with python < 3.6.
Resolves#882
Add gridintersect to flopy utils along with gridintersect tests.
Add keepzerolengths option to strtree method
Add gridintersection demo notebook
Update travis to install shapely
New method for parsing shapely intersection results
fixes failing test caused by change in behavior in GEOS and shapely
clean up and improve code/docstrings
Ad triangle grid for vertex grid tests
Update notebook with triangle grid
Fix conversion of cell2d to list of shapely shapes
using ncvert to determine no. of points
Add option to perform intersections without building STRtree
Add filter to STRtree query results to avoid unnecessary intersection calls
closes#902
Fix transform of MultiPolygon coords
Add support for transforming MultiPolygon coordinates into
real-world coordinates in structured mode.
* fix(mfsimulation): repair change for case insensitive model names
A recent change was made to allow case insensitive model names to be added to IMS solutions. This change broke some previous functionality. This PR simply checks to make sure that .lower() is not applied to None.
* feat(Mf6ListBudget): add support for mf6 budgets with multiple packages of same name
* closes#899
A recent change was made to allow case insensitive model names to be added to IMS solutions. This change broke some previous functionality. This PR simply checks to make sure that .lower() is not applied to None.
* fix naming convention for mf6 plotting in _plot_util3d_helper
* update Affine translation to use xul and yul in export_array
* code and docstring cleanups in utils.py
Import of `__version__`, `__name__`, and `__author__` from `flopy` caused
failure of `setup.py` because of dependency of `flopy` on `numpy` with
python installations that did not already have `numpy` installed. Moved
all information needed by `setup.py` to `version.py` and update
`make-release.py` to retain `__name__`, `__author__`, and `__author_email__`
information in file after updating version numbers. Removed unintended
unmanaged dependency on `matplotlib` in `gridintersect.py` by wrapping
import in a try and except. In the case that `matplotlib` is not installed
and methods that depend on `matplotlib` are called then a
`ModuleNotFoundError` exception is issued.
Closes#892
* fix(setup.py): read package name, version, etc. from version.py
Import of __version__, __name__, and __author__ from flopy caused
failure of setup.py because of dependency of flopy on numpy with
python installations that did not already have numpy installed. Moved
all information needed by setup.py to version.py and update
make-release.py to retain __name__, __author__, and __author_email__
information in file after updating version numbers. Removed unintended
unmanaged dependency on matplotlib in gridintersect.py by wrapping
import in a try and except. In the case that matplotlib is not installed
and methods that depend on matplotlib are called then a
ModuleNotFoundError exception is issued.
Closes#892
* Fix(CellBudgetFile): update for auto precision with CellBudgetFile imeth = 5 or 6 as first record
modflowpy#872
* update t504_test.py
* Update(CellBudgetFile): remove naux comparison, add additional ascii comparison
Co-authored-by: langevin-usgs <langevin@usgs.gov>
* Fix(#870): Update ims name file record after removing ims package
* remove cbc test case
* update t504_test.py
* codacy update
* Update test_replace_ims_package for travis
* fix(#868): bug fixed that occurred when loading packages with external file references and then changing that reference. behavior of setting all files to external changed, existing external files are no longer automatically overridden with the default file name.
* fix(external files): test updated, added reloading and saving of simulation after all data is set to external
* fix(#874): fixed data shape for one line obs files
* fix(#879): external files that start with a comment on the first line now load correctly
* fix: Added test for external file starting with comment
* fix: debug code removed
* fix: code cleanup
Loading a mf-model, the CHD.chk file was always written, also wich the check-variable set to false.
For this reason the check-parameter is now added to the mfchd.load method and passed to the Package.load method.
* fix(#831,#858): Flopy now verifies data line length meets minimum length criteria. Flopy now retrieves models by case-insensitive name when case-sensitive lookup fails.
* feat(#862): Include message about zero based index variables in the docs.
* fix(postprocessing): fix a few postprocessing issues
* In postprocessing.get_saturated_thickness(): always use total thickness when calculating the saturated thickness of confined cells
* In Vtk.add_vector(): rotate vector to match the rotation of the grid
* In StructuredGrid.array_at_verts(): always use local coordinates (as it should)
* feat(vtk): select stress periods to export
* Develop a new option ('kpers') for only exporting selected stress periods when exporting a transient array or package or model
* feat(vtk): export as true 2d data
* Develop a new option ('true2d') for exporting data as true 2d data when the model has either 1 layer or 1 row or 1 column
* Change interpolation strategy when the grid is not rectilinear: use RegularGridInterpolator anyway (it is better than LinearNDInterpolator)
* feat(vtk): file opening options in export_heads() and export_cbc()
* In export_heads(): implement optional arguments to control file opening (consistently with HeadFile class).
* In export_heads(): use 'text' argument in the file name and as array name in the vtk file.
* In export_cbc(): implement optional arguments to control file opening (consistently with CellBudgetFile class).
* Simplify code for processing 'kstpkper' argument in export_cbc() and export_heads().
* append multiple timeseries
With these changes you can add more than 2 timeseries to the `_filerecord` of a package (such as rch, ghb, etc.) using the `ts.append_package` method of the package. Without these changes the `ts.append_package` overwrites the `_filerecord` of the previously appended package.
* add 3 timeseries to a package
* revert changes to notebook
* Fix(plot_array): update plot_array method to mask using np.ma.masked_values
* Update(plotting): change np.equal to np.isclose for large floating points
* Update(plot_bc): updated plot_bc for MAW, UZF, SFR, and multiple bc packages
* fixed bug with mf2k loading modflowpy#802
* added shapefile support for output_helper modflowpy#807
* updated test cases
* Fix(ModflowSfr2.export): Update ModflowSfr2.export() to use modelgrid instead of SpatialReference
* Fix(MFOutputRequester): full3D=False when imeth == 6
* Update(CellBudgetFile): added methods to determine CellBudgetFile precision automatically
* Fix(CellBudgetFile.get_ts()): update get_ts() for IMETH==6.
* Codacy update
* feat(store all data external): feature to store all list and array data in external files
* feat(store all external): test cases modified to test this new feature
* feat(set all data external): set all data external for simulation
* Use bilinear interpolation to calculate the z of cell vertices (this is more appropriate than simple averaging when the grid is not regular)
* Ignore inactive cells when calculating the z of cell vertices (until now, they were not ignored, potentially yielding wrong values at the boundary of inactive cells)
* Use trilinear interpolation to calculate array values at cell vertices (this is more appropriate than simple averaging when the grid is not regular; furthermore, until now, everything was shifted downward with an awkward repetition of values at the top and bottom of the first layer)
* Improve performance by using scipy functions and avoiding loops (until now, interpolation was done by looping through all the cells in Python)
* Allow for directly passing array values at vertices to functions add_array() and add_vector() of the Vtk class
* New option "position" in the function postprocessing.get_specific_discharge() for calculating the values at "centers" (default), "faces" or "vertices"
* Cast delc, delr, top and botm of the grid to float64 (float32 was yielding significant round-off errors when rotating grid coordinates)