Skip to content

Releases: modflowpy/flopy

FloPy 3.8.1

05 Sep 18:00
1eaab1c
Compare
Choose a tag to compare

Version 3.8.1

This release includes various bugfixes as well as model splitter improvements. It also adds some capabilities for the soon forthcoming MF6 surface water model. Since the latter is still under development and not yet officially available, we do not consider these to be full-fledged features yet, and so this is a patch rather than a minor FloPy release.

New features

  • feat(cell1d): Add support for 1D vertex grids (#2296). Committed by langevin-usgs on 2024-08-23.

Bug fixes

Refactoring

FloPy 3.8.0

08 Aug 17:04
49889ec
Compare
Choose a tag to compare

Version 3.8.0

This release includes a number of bugfixes, a few new features, and support for NumPy 2.

New features

  • feat(datafile): Add .headers property with data frame (#2221). Committed by Mike Taves on 2024-06-11.
  • feat(lgr-disv): Add to_disv_gridprops() method to lgr object (#2271). Committed by langevin-usgs on 2024-07-26.

Bug fixes

  • fix(docs): Section underline matches section title (#2208). Committed by Mike Taves on 2024-06-06.
  • fix(vtk): Fix __transient_vector access (#2209). Committed by mickey-tsai on 2024-06-06.
  • fix(swt): Pass load_only down to Mt3dms.load() (#2222). Committed by wpbonelli on 2024-06-11.
  • fix(ParticleTrackFile): Fix particle filtering in get_alldata (#2223). Committed by martclanor on 2024-06-11.
  • fix(regression): Corrections to test_create_tests_transport (#2228). Committed by Mike Taves on 2024-06-13.
  • fix(binaryread): Raise/handle EOFError, deprecate vartype=str (#2226). Committed by Mike Taves on 2024-06-13.
  • fix(pandas warnings): Catch pandas warnings and display them in a more useful way (#2229). Committed by scottrp on 2024-06-14.
  • fix: Test_uzf_negative_iuzfopt (#2236). Committed by Mike Taves on 2024-06-17.
  • fix(PlotMapView): Default to all layers in plot_pathline() (#2242). Committed by wpbonelli on 2024-06-19.
  • fix(Raster): Reclassify np.float64 correctly (#2235). Committed by martclanor on 2024-06-24.
  • fix(HeadFile): Fix dis reversal, expand tests (#2247). Committed by wpbonelli on 2024-06-25.
  • fix(mfmodel): Fix get_ims_package (#2272). Committed by martclanor on 2024-08-06.
  • fix(modelgrid): Fix missing coord info if disv (#2284). Committed by martclanor on 2024-08-07.
  • fix(examples): Restore example notebooks skipped after #2264 (#2286). Committed by wpbonelli on 2024-08-08.

Refactoring

FloPy 3.7.0

04 Jul 17:10
6163383
Compare
Choose a tag to compare

Version 3.7.0

Support for MODFLOW 6.5.0 as well as fixes and enhancements.


New features

  • feat(get-modflow): Support ARM mac nightly build (#2115). Committed by wpbonelli on 2024-02-23.
  • feat(binaryfile): Get budget by second package name paknam2 (#2050). Committed by Michael Ou@SSPA on 2024-03-14.
  • feat(get-modflow): Support windows parallel nightly build (#2128). Committed by wpbonelli on 2024-03-22.
  • feat: Add optional custom print callable (#2121). Committed by Mike Müller on 2024-03-25.
  • feat(dis2d): Introduce limited support for a 2D structured grid (for overland flow) (#2131). Committed by langevin-usgs on 2024-04-01.
  • feat(vtk): Improve vtk particle track export (#2132). Committed by wpbonelli on 2024-04-02.
  • feat(disv2d): Introduce support for a 2D vertex grid (for overland flow) (#2151). Committed by langevin-usgs on 2024-04-15.
  • feat(vtk): Include all arrays on pathline input (#2161). Committed by wpbonelli on 2024-04-19.
  • feat(mp7particledata): Add localz option for PRT PRP conversions (#2166). Committed by wpbonelli on 2024-04-24.
  • feat(sim options block packages): Support for packages declared in simulation name file's options block (#2164, #2174). Committed by spaulins-usgs on 2024-05-01.
  • feat(MfList): Support kper field in stress period data (#2179). Committed by wpbonelli on 2024-05-04.

Bug fixes

Refactoring

FloPy 3.6.0

08 Feb 04:29
3ad1f7d
Compare
Choose a tag to compare

Version 3.6.0

Support for MODFLOW 6.4.3 as well as fixes and enhancements. A highlight is geopandas integration for some APIs.


New features

Bug fixes

  • fix(gridgen): Fix add_refinement_feature() shapefile support (#2022). Committed by wpbonelli on 2023-11-30.
  • fix(gridgen): Support arbitrary path-like for shapefiles (#2026). Committed by wpbonelli on 2023-12-04.
  • fix(subpackages): Fixed detection issue of subpackages in some filein records (#2025). Committed by scottrp on 2023-12-04.
  • fix(recarrays with cellid): Fixes bug when setting data as recarrays with cellids (#2029). Committed by scottrp on 2023-12-05.
  • fix(Mf6Splitter): Preserve MFSimulation version & exe_name (#2033). Committed by wpbonelli on 2023-12-07.
  • fix(data storage): Added numpy type check for consistent integer and float sizes (32-bit vs 64-bit) (#2062). Committed by scottrp on 2024-01-17.
  • fix(obs package loading): Fixed problem with loading multiple continuous blocks (#2058) (#2064). Committed by scottrp on 2024-01-22.
  • fix(particledata): Support 1D numpy array for partlocs (#2074). Committed by wpbonelli on 2024-01-25.
  • fix(tri2vor): Remove invalid geometries from voronoi nodes (#2076). Committed by Joshua Larsen on 2024-01-26.
  • fix(MFSimulationList): Fix comma spacing in error message (#2090). Committed by wpbonelli on 2024-02-04.
  • fix(numpy 2.0 deprecation): Replace np.alltrue with np.all (#2088). Committed by mnfienen on 2024-02-04.
  • fix(usgcln): add explicit second dimension to util2d.load calls (#2097). Committed by cnicol-gwlogic on 2024-02-07.

Refactoring

FloPy 3.5.0

26 Nov 00:23
879c153
Compare
Choose a tag to compare

Version 3.5.0


⚠️ Breaking changes

  • rno, iuzno, lakeno, wellno attributes were standardized to ifno (for "feature number") — a 3.5.x patch may provide backwards-compatibility as this was released somewhat prematurely

Highlights

Python 3.12 support

While previous releases may be compatible with Python 3.12, this release adds official support. Note: the wheel for pyzmq, a core dependency of IPython/jupyter, may fail to build when installing optional dependencies via e.g. pip install "flopy[test]" or pip install "flopy[optional]". To work with notebooks in the meantime Conda is recommended.

Pandas integration
  • Promote Pandas from optional to core dependency (note pandas >= 2 is required)
  • Reimplement MF6 internal data storage with Pandas — may provide significant speedups reading/writing MF6 input files. To fall back to the old implementation, set use_pandas=False on MFSimulation.load() or at init time.
  • Support DataFrame for flopy.modflow.* package input data, e.g. node_data and stress_period_data
Deprecations

Several deprecated features are removed or turned into errors:

  • sr property from Mt3dms
  • flopy.export.vtk functions export_model(), export_package(), export_transient(), export_heads(), export_array(), export_cbc()
  • flopy.plot.plotutil functions centered_specific_discharge(), cvfd_to_patch_collection(), plot_cvfd()
  • layer kwarg in MFTransientArray's get_data() method
  • MFSimulation functions get_mvr_file(), get_mvt_file(), get_gnc_file(), get_ims_package()
  • nwt_11_fmt parameter from ModflowUzf1 initializer
  • Grid.thick and .saturated_thick properties
Other changes
  • rno, iuzno, lakeno, wellno standardized to ifno (for "feature number")

Several features are newly deprecated:

  • ra_slice() from flopy.utils.recarray_utils, suggest numpy.lib.recfunctions.repack_fields()
  • recarray() from flopy.utils.recarray_utils, suggest numpy.core.records.fromrecords()
  • epsg, proj4, and proj4_str are replaced with a single crs parameter on MF6 Grid and ModflowDis classes and various utilities
  • branch option for flopy.mf6.utils.generate_classes utility replaced with ref

See specific commits below for more info on suggested replacements.


New features

Bug fixes

Refactoring

Read more

FloPy 3.4.3

30 Sep 20:36
45cb0fa
Compare
Choose a tag to compare

Version 3.4.3

Provide interim support for Matplotlib 3.8+, which changed the way contours are represented and broke export_contours() and export_contourf().

Note: with MPL 3.8+, FloPy can no longer export interior polygons (i.e. holes) for filled contours. This is a backwards-incompatible change, and could be considered worthy of a major release — with some compunction, FloPy follows MPL's example here, and this remains a patch release. A future version may reimplement contour export and restore support for interior polygons. In the meantime, users requiring interior polygons should pin MPL below 3.8.

Bug fixes

FloPy 3.4.2

25 Aug 23:24
1f06875
Compare
Choose a tag to compare

Version 3.4.2

Bug fixes

  • fix(binaryfile/gridutil): Avoid numpy deprecation warnings (#1868). Committed by w-bonelli on 2023-07-12.
  • fix(binary): Fix binary header information (#1877). Committed by jdhughes-usgs on 2023-07-16.
  • fix(time series): Fix for multiple time series attached to single package (#1867) (#1873). Committed by spaulins-usgs on 2023-07-20.
  • fix(check): Check now works properly with confined conditions (#1880) (#1882). Committed by spaulins-usgs on 2023-07-27.
  • fix(mtlistfile): Fix reading MT3D budget (#1899). Committed by Ralf Junghanns on 2023-08-03.
  • fix(check): Updated flopy's check to work with cellid -1 values (#1885). Committed by spaulins-usgs on 2023-08-06.
  • fix(BaseModel): Don't suppress error if exe not found (#1901). Committed by w-bonelli on 2023-08-07.
  • fix(keyword data): Optional keywords (#1920). Committed by spaulins-usgs on 2023-08-16.
  • fix(GridIntersect): Combine list of geometries using unary_union (#1923). Committed by Mike Taves on 2023-08-21.
  • fix(gridintersect): Add multilinestring tests (#1924). Committed by Davíd Brakenhoff on 2023-08-21.
  • fix(binary file): Was writing binary file information twice to external files (#1925) (#1928). Committed by scottrp on 2023-08-25.
  • fix(ParticleData): Fix docstring, structured default is False (#1935). Committed by w-bonelli on 2023-08-25.

Refactoring

FloPy 3.4.1

29 Jun 14:49
fd40456
Compare
Choose a tag to compare

Version 3.4.1

Patch a regression in the get-modflow utility caused by changes to MODFLOW 6 release asset names (addition of "_win64" to the Windows distribution).

Bug fixes

  • fix(get-modflow): Accommodate mf6 release asset name change (#1855). Committed by w-bonelli on 2023-06-29.

FloPy 3.4.0

29 Jun 04:29
5190394
Compare
Choose a tag to compare

Version 3.4.0

Begin semantic versioning such that releases are

  • major if any backwards-incompatible changes are introduced
  • minor if changes are backwards-compatible and contain new features
  • patch if changes are b.c. and only contain bug fixes

New features

Bug fixes

  • fix(MFPackage kwargs check): Now verifying that only valid kwargs are passed to MFPackage (#1667). Committed by spaulins-usgs on 2022-12-22.
  • fix(factor): Fixed factor bug where converting data from internal to external can cause the factor to be applied to the data (#1673). Committed by scottrp on 2023-01-09.
  • fix(package dictionary): Removed package_key_dict since it is redundant and can cause errors (#1690). Committed by spaulins-usgs on 2023-01-26.
  • fix(intersect): Multiple (#1696). Committed by w-bonelli on 2023-01-31.
  • fix(datautil): Fix SFR connection file parsing (#1694). Committed by Wes Kitlasten on 2023-02-03.
  • fix(CellBudgetFile): Strip auxname for imeth 5 (#1716). Committed by Mike Taves on 2023-02-13.
  • fix(mfdatastorage): Use appropriate fill_value for data type (#1689). Committed by Mike Taves on 2023-02-13.
  • fix(test_sfr): Update test to be more robust with Matplotlib versions (#1717). Committed by Mike Taves on 2023-02-14.
  • fix(flopy performance): FloPy performance modifications + best practices documented (#1674). Committed by spaulins-usgs on 2023-02-15.
  • fix(exe path): FloPy now correctly resolves relative paths to mf6 executable (#1633) (#1727). Committed by spaulins-usgs on 2023-03-02.
  • fix(ParticleData): Support partlocs as ndarray or list of lists (#1752). Committed by w-bonelli on 2023-03-23.
  • fix(mp6sim): Use keyword args for pandas DataFrame.drop (#1757). Committed by w-bonelli on 2023-04-06.
  • fix(MFFileMgmt): Remove string_to_file_path (#1759). Committed by w-bonelli on 2023-04-06.
  • fix(contours): Use nan for mpl contour masks on structured grids (#1766). Committed by w-bonelli on 2023-04-14.
  • fix(MFFileMgmt): Avoid IndexError in strip_model_relative_path (#1748). Committed by w-bonelli on 2023-04-27.
  • fix(mtdsp): Add support for keyword 'nocross' in MT3D dsp package (#1778). Committed by Eric Morway on 2023-05-09.
  • fix(shapefile_utils): Tolerate missing arrays in model_attributes_to_shapefile (#1785). Committed by w-bonelli on 2023-05-17.
  • fix(Modpath6Sim): Move import_optional_dependency("pandas") to method (#1783). Committed by Mike Taves on 2023-05-17.
  • fix(float32, empty stress period): #1779 and #1793 (#1806). Committed by spaulins-usgs on 2023-06-02.
  • fix(load_node_mapping): Add sim parameter to populate Mf6Splitter._model_dict (#1828). Committed by Joshua Larsen on 2023-06-13.
  • fix(keystring): Flopy now does not rely on keystring name being a substring of the keystring record name (#1616) (#1830). Committed by spaulins-usgs on 2023-06-15.
  • fix(get-modflow): Manage internal "bin" dir structures (#1837). Committed by Mike Taves on 2023-06-23.
  • fix(GridIntersect): Fix indexing error for empty intersection comparison (#1838). Committed by Joshua Larsen on 2023-06-23.
  • fix(mf6): Fix external binary files for vertex grids (#1839). Committed by jdhughes-usgs on 2023-06-26.
  • fix(binary): Revert a few changes in PR #1839 (#1846). Committed by jdhughes-usgs on 2023-06-28.

Performance

  • perf(Gridintersect): Optimize intersection methods for shapely 2.0 (#1666). Committed by Davíd Brakenhoff on 2022-12-23.

FloPy 3.3.6

15 Dec 16:31
793d8dc
Compare
Choose a tag to compare

New features

  • feat(time step length): Added feature that returns time step lengths from listing file (#1435) (#1437). Committed by scottrp on 2022-06-30.
  • feat: Get modflow utility (#1465). Committed by Mike Taves on 2022-07-27.
  • feat(Gridintersect): New grid intersection options (#1468). Committed by Davíd Brakenhoff on 2022-07-27.
  • feat: Unstructured grid from specification file (#1524). Committed by w-bonelli on 2022-09-08.
  • feat(aux variable checking): Check now performs aux variable checking (#1399) (#1536). Committed by spaulins-usgs on 2022-09-12.
  • feat(get/set data record): Updated get_data/set_data functionality and new get_record/set_record methods (#1568). Committed by spaulins-usgs on 2022-10-06.
  • feat(get_modflow): Support modflow6 repo releases (#1573). Committed by w-bonelli on 2022-10-11.
  • feat(contours): Use standard matplotlib contours for StructuredGrid map view plots (#1615). Committed by w-bonelli on 2022-11-10.

Bug fixes

  • fix(geometry): Is_clockwise() now works as expected for a disv problem (#1374). Committed by Eric Morway on 2022-03-16.
  • fix(packaging): Include pyproject.toml to sdist, check package for PyPI (#1373). Committed by Mike Taves on 2022-03-21.
  • fix(url): Use modern DOI and USGS prefixes; upgrade other HTTP->HTTPS (#1381). Committed by Mike Taves on 2022-03-23.
  • fix(packaging): Add docs/*.md to MANIFEST.in for sdist (#1391). Committed by Mike Taves on 2022-04-01.
  • fix(_plot_transient2d_helper): Fix filename construction for saving plots (#1388). Committed by Joshua Larsen on 2022-04-01.
  • fix(simulation packages): *** Breaks interface *** (#1394). Committed by spaulins-usgs on 2022-04-19.
  • fix(plot_pathline): Split recarray into particle list when it contains multiple particle ids (#1400). Committed by Joshua Larsen on 2022-04-30.
  • fix(lgrutil): Child delr/delc not correct if parent has variable row/col spacings (#1403). Committed by langevin-usgs on 2022-05-03.
  • fix(ModflowUzf1): Fix for loading negative iuzfopt (#1408). Committed by Joshua Larsen on 2022-05-06.
  • fix(features_to_shapefile): Fix missing bracket around linestring for shapefile (#1410). Committed by Joshua Larsen on 2022-05-06.
  • fix(mp7): Ensure shape in variables 'zones' and 'retardation' is 3d (#1415). Committed by Ruben Caljé on 2022-05-11.
  • fix(ModflowUzf1): Update load for iuzfopt = -1 (#1416). Committed by Joshua Larsen on 2022-05-17.
  • fix(recursion): Infinite recursion fix for getattr. Spelling error fix in notebook. (#1414). Committed by scottrp on 2022-05-19.
  • fix(get_structured_faceflows): Fix index issue in lower right cell (#1417). Committed by jdhughes-usgs on 2022-05-19.
  • fix(package paths): Fixed auto-generated package paths to make them unique (#1401) (#1425). Committed by spaulins-usgs on 2022-05-31.
  • fix(get-modflow/ci): Use GITHUB_TOKEN to side-step ratelimit (#1473). Committed by Mike Taves on 2022-07-29.
  • fix(get-modflow/ci): Handle 404 error to retry request from GitHub (#1480). Committed by Mike Taves on 2022-08-04.
  • fix(intersect): Update to raise error only when interface is called improperly (#1489). Committed by Joshua Larsen on 2022-08-11.
  • fix(GridIntersect): Fix DeprecationWarnings for Shapely2.0 (#1504). Committed by Davíd Brakenhoff on 2022-08-19.
  • fix: CI, tests & modpathfile (#1495). Committed by w-bonelli on 2022-08-22.
  • fix(HeadUFile): Fix #1503 (#1510). Committed by w-bonelli on 2022-08-26.
  • fix(setuptools): Only include flopy and flopy.* packages (not autotest) (#1529). Committed by Mike Taves on 2022-09-01.
  • fix(mfpackage): Modify maxbound evaluation (#1530). Committed by jdhughes-usgs on 2022-09-02.
  • fix(PlotCrossSection): Update number of points check (#1533). Committed by Joshua Larsen on 2022-09-08.
  • fix(parsenamefile): Only do lowercase comparison when parent dir exists (#1554). Committed by Mike Taves on 2022-09-22.
  • fix(obs): Modify observations to load single time step files (#1559). Committed by jdhughes-usgs on 2022-09-29.
  • fix(PlotMapView notebook): Remove exact contour count assertion (#1564). Committed by w-bonelli on 2022-10-03.
  • fix(test markers): Add missing markers for exes required (#1577). Committed by w-bonelli on 2022-10-07.
  • fix(csvfile): Default csvfile to retain all characters in column names (#1587). Committed by langevin-usgs on 2022-10-14.
  • fix(csvfile): Correction to read_csv args, close file handle (#1590). Committed by Mike Taves on 2022-10-16.
  • fix(data shape): Fixed incorrect data shape for sfacrecord (#1584). Fixed a case where time array series data did not load correctly from a file when the data shape could not be determined (#1594). (#1598). Committed by spaulins-usgs on 2022-10-21.
  • fix(write_shapefile): Fix transform call for exporting (#1608). Committed by Joshua Larsen on 2022-10-27.
  • fix(multiple): Miscellanous fixes/enhancements (#1614). Committed by w-bonelli on 2022-11-03.
  • fix: Not reading comma separated data correctly (#1634). Committed by Michael Ou on 2022-11-23.
  • fix(get-modflow): Fix code.json handling (#1641). Committed by w-bonelli on 2022-12-08.
  • fix(quotes+exe_path+nam_file): Fixes for quoted strings, exe path, and nam file (#1645). Committed by spaulins-usgs on 2022-12-08.

Refactoring

Read more