FloPy 3.5.0
Version 3.5.0
⚠️ Breaking changes
rno
,iuzno
,lakeno
,wellno
attributes were standardized toifno
(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
onMFSimulation.load()
or at init time. - Support
DataFrame
forflopy.modflow.*
package input data, e.g.node_data
andstress_period_data
Deprecations
Several deprecated features are removed or turned into errors:
sr
property fromMt3dms
flopy.export.vtk
functionsexport_model()
,export_package()
,export_transient()
,export_heads()
,export_array()
,export_cbc()
flopy.plot.plotutil
functionscentered_specific_discharge()
,cvfd_to_patch_collection()
,plot_cvfd()
layer
kwarg inMFTransientArray
'sget_data()
methodMFSimulation
functionsget_mvr_file()
,get_mvt_file()
,get_gnc_file()
,get_ims_package()
nwt_11_fmt
parameter fromModflowUzf1
initializerGrid.thick
and.saturated_thick
properties
Other changes
rno
,iuzno
,lakeno
,wellno
standardized toifno
(for "feature number")
Several features are newly deprecated:
ra_slice()
fromflopy.utils.recarray_utils
, suggestnumpy.lib.recfunctions.repack_fields()
recarray()
fromflopy.utils.recarray_utils
, suggestnumpy.core.records.fromrecords()
epsg
,proj4
, andproj4_str
are replaced with a singlecrs
parameter on MF6Grid
andModflowDis
classes and various utilitiesbranch
option forflopy.mf6.utils.generate_classes
utility replaced withref
See specific commits below for more info on suggested replacements.
New features
- feat(simulation+model options): Dynamically generate simulation options from simulation namefile dfn (#1842). Committed by spaulins-usgs on 2023-07-10.
- feat(binaryfile): Add reverse() method to HeadFile, CellBudgetFile (#1829). Committed by w-bonelli on 2023-07-29.
- feat(get-modflow): Allow specifying repo owner (#1910). Committed by w-bonelli on 2023-08-08.
- feat(generate_classes): Create a command-line interface (#1912). Committed by Mike Taves on 2023-08-16.
- feat(gridutil): Add function to help create DISV grid (#1952). Committed by langevin-usgs on 2023-09-18.
- feat(pandas list): Fix for handling special case where boundname set but not used (#1982). Committed by scottrp on 2023-10-06.
- feat(MfSimulationList): Add functionality to parse the mfsim.lst file (#2005). Committed by jdhughes-usgs on 2023-11-14.
- feat(modflow): Support dataframe for pkg data (#2010). Committed by wpbonelli on 2023-11-22.
- feat(mfsimlist): Add functionality to parse memory_print_options (#2009). Committed by jdhughes-usgs on 2023-11-22.
Bug fixes
- fix(exchange and gnc package cellids): #1866 (#1871). Committed by spaulins-usgs on 2023-07-11.
- fix(modelgrid): Retain crs data from classic nam files (#1904). Committed by Mike Taves on 2023-08-10.
- fix(generate_classes): Use branch arg if provided (#1938). Committed by w-bonelli on 2023-08-31.
- fix(remove_model): Remove_model method fix and tests (#1945). Committed by scottrp on 2023-09-14.
- fix(model_splitter.py): Standardizing naming of iuzno, rno, lakeno, & wellno to ifno (#1963). Committed by Eric Morway on 2023-09-25.
- fix(pandas list): Deal with cellids with inconsistent types (#1980). Committed by scottrp on 2023-10-06.
- fix(model_splitter): Check keys in mftransient array (#1998). Committed by jdhughes-usgs on 2023-11-13.
- fix(benchmarks): Fix benchmark post-processing (#2004). Committed by wpbonelli on 2023-11-14.
- fix(MfSimulationList): Add missing seek to get_runtime method (#2006). Committed by mjr-deltares on 2023-11-15.
- fix(get_disu_kwargs): Incorrect indexing of delr and delc (#2011). Committed by langevin-usgs on 2023-11-21.
- fix(PlotCrossSection): Boundary conditions not plotting for DISU (#2012). Committed by langevin-usgs on 2023-11-21.
- fix(release.yml): Don't regenerate pkgs from mf6 main on release (#2014). Committed by wpbonelli on 2023-11-24.
- fix(release.yml): Fix update changelog step (#2015). Committed by wpbonelli on 2023-11-25.
Refactoring
- refactor(_set_neighbors): Check for closed iverts and remove closing ivert (#1876). Committed by Joshua Larsen on 2023-07-14.
- refactor(crs): Provide support without pyproj, other deprecations (#1850). Committed by Mike Taves on 2023-07-19.
- refactor(Notebooks): Apply pyformat and black QA tools (#1879). Committed by Mike Taves on 2023-07-24.
- refactor: Require pandas>=2.0.0 as core dependency (#1887). Committed by w-bonelli on 2023-08-01.
- refactor(expired deprecation): Raise AttributeError with Grid.thick and Grid.saturated_thick (#1884). Committed by Mike Taves on 2023-08-01.
- refactor(pathline/endpoint plots): Support recarray or dataframe (#1888). Committed by w-bonelli on 2023-08-01.
- refactor(expired deprecation): Remove warning for third parameter of Grid.intersect (#1883). Committed by Mike Taves on 2023-08-01.
- refactor(dependencies): Constrain sphinx >=4 (#1898). Committed by w-bonelli on 2023-08-02.
- refactor(dependencies): Constrain sphinx-rtd-theme >=1 (#1900). Committed by w-bonelli on 2023-08-03.
- refactor(mf6): Remove deprecated features (#1894). Committed by w-bonelli on 2023-08-03.
- refactor(plotutil): Remove deprecated utilities (#1891). Committed by w-bonelli on 2023-08-03.
- refactor(shapefile_utils): Remove deprecated SpatialReference usages (#1892). Committed by w-bonelli on 2023-08-03.
- refactor(vtk): Remove deprecated export_* functions (#1890). Committed by w-bonelli on 2023-08-03.
- refactor(generate_classes): Deprecate branch for ref, introduce repo, test commit hashes (#1907). Committed by w-bonelli on 2023-08-09.
- refactor(expired deprecation): Remaining references to SpatialReference (#1914). Committed by Mike Taves on 2023-08-11.
- refactor(Mf6Splitter): Control record and additional splitting checks (#1919). Committed by Joshua Larsen on 2023-08-21.
- refactor(triangle): Raise if output files not found (#1954). Committed by wpbonelli on 2023-09-22.
- refactor(recarray_utils): Deprecate functions, use numpy builtins (#1960). Committed by wpbonelli on 2023-09-27.
- refactor(contour_array): Add layer param, update docstrings, expand tests (#1975). Committed by wpbonelli on 2023-10-18.
- refactor(model_splitter.py): (#1994). Committed by Joshua Larsen on 2023-11-01.
- refactor(modflow): Remove deprecated features (#1893). Committed by wpbonelli on 2023-11-03.
- refactor: Support python3.12, simplify tests and dependencies (#1999). Committed by wpbonelli on 2023-11-13.
- refactor(msfsr2): Write sfr_botm_conflicts.chk to model workspace (#2002). Committed by wpbonelli on 2023-11-14.
- refactor(shapefile_utils): Warn if fieldname truncated per 10 char limit (#2003). Committed by wpbonelli on 2023-11-14.
- refactor(pakbase): Standardize ipakcb docstrings/defaults (#2001). Committed by wpbonelli on 2023-11-22.
- refactor(.gitattributes): Exclude examples/data from linguist (#2017). Committed by wpbonelli on 2023-11-25.