Commit Graph

3312 Commits (master)

Author SHA1 Message Date
spaulins-usgs f437e8bcd1
fix(read binary file): fix for reading binary files with array data (#931) 2020-06-30 11:48:58 -05:00
spaulins-usgs 27e4191875
fix(idomain): data checks now treat all positive idomain values as active (#929) 2020-06-29 16:53:54 -05:00
jdhughes-usgs 71734e7e2d
release: update make-release and documentation to https (#928) 2020-06-26 18:00:41 -04:00
Mike Taves a2049e1da1
refactor(import flopy): remove message "flopy is installed in ..." (#925) 2020-06-26 17:51:32 -04:00
jdhughes-usgs b27fccdee5
fix(Modpath7Sim): fix TimePointInterval calculation for TimePointOption 3 (#927)
Closes #730
2020-06-26 17:05:44 -04:00
jdhughes-usgs a0baca87a4 Merge remote-tracking branch 'origin/master' into develop 2020-06-26 14:42:55 -04:00
jdhughes-usgs efb8d0a3da
v 3.3.1 release PR (#926) 2020-06-26 12:21:05 -04:00
Joshua Larsen c89b2d83a8
feat(ModflowAg): add the ModflowAg package for NWT (pull request #922)
Update UZF package options and blocks for NWT release 1.2.0. Add t071_test_nwt_ag.py autotest.
2020-06-25 15:56:58 -04:00
jdhughes-usgs 00af3c0b44
readme: update readme for v3.3.1 release (#924) 2020-06-24 17:01:52 -04:00
jdhughes-usgs 0ea97bd14d
release: add update-version_changes to generate version changes from log (#921) 2020-06-24 14:26:33 -04:00
spaulins-usgs 6dae1b0ed5
fix(#280, #835): set_all_data_external now includes constants, cellids in list data are checked (#920)
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
2020-06-23 14:49:45 -04:00
aleaf 796b7b1538
fix(mfsfr2.check): negative segments for lakes no longer included in segment numbering order check (#915)
fixes #269
2020-06-23 14:04:39 -04:00
Davíd Brakenhoff d5672f585f
bug(GridIntersect): fixes #916 and #917 (#918)
* 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>
2020-06-22 20:53:08 -04:00
Hughes, J.D e962e16d89
ci(get_exe): update get_exes repo for restored repo (#919) 2020-06-22 20:51:31 -04:00
jdhughes-usgs 686fa051dc release: update mf6 v6.1.1 dfn and flopy mf6 classes 2020-06-22 18:13:59 -04:00
Hughes, J.D bd335caf61
refactor(make-release): Software citation developed from version.py (#914)
Closes #727
2020-06-22 16:16:44 -04:00
Jason Bellino 0207372769
Fix faulty logic in ZoneBudget (#911)
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
2020-06-22 16:06:46 -04:00
Hughes, J.D de38a5bb95
Introduce end-of-line normalization (#913) 2020-06-11 11:12:28 -04:00
Hughes, J.D 0652e4f32c
doc(swi2): fix docstring typos (#912)
Closes #595
2020-06-10 17:40:36 -04:00
Davíd Brakenhoff 176c9b45eb
feat(GridIntersect): #902 (#903)
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.
2020-06-10 11:33:31 -04:00
langevin-usgs eed5afdd03
fix(SwtListBudget): totim was not being read correctly for SEAWAT list file (#910)
Closes #681
2020-06-10 10:20:20 -05:00
Hughes, J.D 4fc61d573c
feat(mbase): suppress duplicate package warning if verbose is False (#908)
Add similar suppression for other informative messages in mbase, mf,
and mt.

Closes #345
2020-06-09 16:52:10 -04:00
langevin-usgs f539d072e2
feat(ModflowSms): add support for simple, moderate, complex (#906)
* Close #774
2020-06-09 11:49:29 -05:00
Hughes, J.D 3182f57479
feat(str): add IRDFLG and IPTFLG control to STR (#905)
Closes #788
2020-06-09 12:23:19 -04:00
langevin-usgs 04b74bd8fb
feat(Mf6ListBudget): add support for mf6 budgets with multiple packages with same name (#900)
* 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
2020-06-02 16:18:34 -05:00
Joshua Larsen 7a31a1d7a2
fix(Seawat.modelgrid): pass lenuni from dis file into modelgrid instance (#901)
modflowpy#898
2020-06-02 15:57:25 -05:00
langevin-usgs 0958b28add
fix(mfsimulation): repair change for case insensitive model names (#897)
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.
2020-06-01 11:38:08 -05:00
Joshua Larsen 617b98dd0f
fix(_plot_util3d_helper, export_array): (#895)
* 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
2020-06-01 10:46:20 -05:00
Ritchie Vink 8e70c92844
fix building in clean env (#894) 2020-05-28 09:03:46 -04:00
Hughes, J.D b80a89c188
fix(setup.py): read package name, version, etc. from version.py (#893)
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
2020-05-26 17:54:27 -04:00
Joshua Larsen 3cec7929f3
Fix(MFSimulation): remove case sensitivity from register_ims_package() (#890) 2020-05-25 07:34:33 -05:00
Joshua Larsen bb861ac2f0
fix(modelgrid): fix offset for xul and yul in read_usgs_model_reference_file and attribs_from_namfile_header (#889) 2020-05-19 21:22:02 -05:00
spaulins-usgs f4e5ed39c5
fix(#886): MFArray aux variable now always returned as an numpy.ndarray. Fixed problem with PyListUtil not fully supporting numpy.ndarray type. (#887) 2020-05-19 14:57:40 -05:00
Joshua Larsen 29d7f849f8
Fix(CellBudgetFile): update for auto precision with imeth = 5 or 6 (#876)
* 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>
2020-05-14 08:54:03 -05:00
Joshua Larsen cbf1f65a8f
Fix(#870): Update ims name file record after removing ims package (#880)
* 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
2020-05-14 08:50:43 -05:00
spaulins-usgs e3a6c26fe8
fix: #868, #874, #879 (#881)
* 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
2020-05-14 08:49:14 -05:00
spaulins-usgs 265fc7c649
fix(#867): fixed minimum record entry count for lists to never include keywords in the count (#875) 2020-05-11 14:14:15 -07:00
Ralf Junghanns 88fbd4ccdf
feat(mfchd.py): prevent write chk-file always (#869)
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.
2020-05-08 08:41:17 -05:00
Joshua Larsen 4100de2b80
Fix(SfrFile): Update SfrFile for streambed elevation when present (#866)
* Fix(SfrFile): Update SfrFile to include dataframe column for streambed elevation when present

* fix test_SfrFile for travis runs
2020-05-04 06:33:36 -05:00
spaulins-usgs a177d59c69
fix(#831,#858): Data length check and case-insensitive lookup (#864)
* 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.
2020-05-01 11:13:10 -05:00
Hughes, J.D f7554dd7ca
ci(get_exes): update build_exes to get_exes to simplify initialization (#865) 2020-04-30 16:49:14 -04:00
spaulins-usgs c45a5e5f1f
fix(#856): Specifying period data with value None now only removes data from that period. Also, fixed an unrelated problem by updating the multi-package list. (#857) 2020-04-22 09:44:27 -05:00
Etienne Bresciani 0266728c18
New vtk export functionalities (#853)
* 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().
2020-04-20 10:39:38 -05:00
OnnoEbbens d96852f2fb
adding multiple timeseries using ts.append_package() (#854)
* 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
2020-04-17 15:29:27 -05:00
Joshua Larsen f6545ff280
Fix(plot_array): update plot_array method to mask using np.ma.masked_values (#851)
* 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
2020-04-15 13:55:08 -05:00
Joshua Larsen 52ecd98a11
Fix(ModflowDis): zero based get_node() and get_lrc()… (#847)
* Fix(ModflowDis): zero based get_node() and get_lrc() for input parameters and output

* added test_get_lrc_get_node()
2020-04-10 16:13:08 -05:00
Joshua Larsen f514a22a38
fix(binaryfile_utils, CellbudgetFile): update for IMETH == 6 (#823)
* 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
2020-04-10 11:58:05 -05:00
spaulins-usgs 0336b5c4f6
feat(set all data external): set all data external for simulation (#846)
* 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
2020-04-08 13:39:04 -05:00
Etienne Bresciani e43dccc29d
feat(vtk): improve export at vertices (#844)
* 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)
2020-04-06 15:35:14 -05:00
Davíd Brakenhoff 14040ff605
fix(utils.gridintersect): bug in GridIntersect for vertex grids (#845) 2020-04-06 12:04:48 -05:00