Skip to content

Releases: modflowpy/flopy

FloPy version 3.3.2

27 Oct 13:09
09afe60
Compare
Choose a tag to compare
  • New features:

  • Bug fixes:

    • fix(gridintersect): Use linestrings and structured grid (#996). Committed by Tom van Steijn on 2020-09-25.
    • fix(): fix(extraneous blocks and zero length data in a list) (#990). Committed by spaulins-usgs on 2020-09-03.
    • fix(internal): Flopy fixed to correctly reads in internal keyword when no multiplier supplied. also, header line added to package files. (#962). Committed by spaulins-usgs on 2020-08-13.
    • fix(mfsfr2.py: Find_path): wrap find_path() so that the routing dictionary (graph) can still be copied, but won't be copied with every call of find_path() as it recursively finds the routing connections along a path in the sfr network. this was severely impacting performance for large sfr networks. (#955). Committed by aleaf on 2020-08-11.
    • fix(#958): Fix gridintersect._vtx_grid_to_shape_generator rtree for cells with more than 3 vertices (#959). Committed by mkennard-aquaveo on 2020-08-07.
    • fix(GridIntersect): Fix crash intersecting 3d points that are outside… (#957). Committed by mkennard-aquaveo on 2020-08-05.
    • fix(mvr): Added documentation explaining the difference between the two flopy mvr classes (#950). Committed by spaulins-usgs on 2020-07-31.
    • fix(check): Get_active() error for confining bed layers (#937). Committed by Michael Ou on 2020-07-29.
    • fix(rcha and evta): Irch and ievt arrays now zero based. fix for issue #941. also changed createpackages.py to always produce python scripts with unix-style line endings. (#949). Committed by spaulins-usgs on 2020-07-29.
    • fix(lgrutil): Corrected bug in child to parent vertical exchanges (#948). Committed by langevin-usgs on 2020-07-27.
    • fix(time series slowness): Speeds up performance when a large number of time series are used by a single stress package (#943). Committed by spaulins-usgs on 2020-07-17.
    • fix: Restore python 3.5 compatibility (modulenotfounderror -> importerror) (#933). Committed by Mike Taves on 2020-07-09.
    • fix(read binary file): Fix for reading binary files with array data (#931). Committed by spaulins-usgs on 2020-06-30.
    • fix(idomain): Data checks now treat all positive idomain values as active (#929). Committed by spaulins-usgs on 2020-06-29.
    • fix(Modpath7Sim): Fix timepointinterval calculation for timepointoption 3 (#927). Committed by jdhughes-usgs on 2020-06-26.

FloPy version 3.3.1

26 Jun 18:57
efb8d0a
Compare
Choose a tag to compare
  • New features:

    • feat(ModflowAg): Add the modflowag package for nwt (pull request #922). Committed by Joshua Larsen on 2020-06-25.
    • feat(GridIntersect): #902 (#903). Committed by Davíd Brakenhoff on 2020-06-10.
    • feat(mbase): Suppress duplicate package warning if verbose is false (#908). Committed by Hughes, J.D on 2020-06-09.
    • feat(ModflowSms): Add support for simple, moderate, complex (#906). Committed by langevin-usgs on 2020-06-09.
    • feat(str): Add irdflg and iptflg control to str (#905). Committed by Hughes, J.D on 2020-06-09.
    • feat(Mf6ListBudget): Add support for mf6 budgets with multiple packages with same name (#900). Committed by langevin-usgs on 2020-06-02.
    • feat(mfchd.py): Prevent write chk-file always (#869). Committed by Ralf Junghanns on 2020-05-08.
    • feat(set all data external): Set all data external for simulation (#846). Committed by spaulins-usgs on 2020-04-08.
    • feat(vtk): Improve export at vertices (#844). Committed by Etienne Bresciani on 2020-04-06.
    • feat(netcdf): Use modern features from pyproj>=2.2.0 (#840). Committed by Mike Taves on 2020-03-31.
    • feat(vtk): Export vectors to vtk. Committed by Etienne Bresciani on 2020-03-31.
    • feat(vtk): Export in .vti and .vtr when possible. Committed by Etienne Bresciani on 2020-03-28.
    • feat(vectors): Vector plots when stresses applied along boundaries (#817). Committed by langevin-usgs on 2020-03-05.
    • feat(plot_bc): Updated plot_bc for maw, uzf, sfr, and multiple bc packages (#808). Committed by Joshua Larsen on 2020-02-11.
    • feat(disl grids): Support for 1d vertex grids. fix for writing gridlines to shapefile (#799). Committed by spaulins-usgs on 2020-02-04.
    • feat(zb netcdf): Zonebudget netcdf export support added (#781). Committed by Joshua Larsen on 2020-01-17.
    • feat(mf6 checker): Input data check for mf6 (#779). Committed by spaulins-usgs on 2020-01-16.
  • Bug fixes:

    • fix(#280, #835): Set_all_data_external now includes constants, cellids in list data are checked (#920). Committed by spaulins-usgs on 2020-06-23.
    • fix(mfsfr2.check): Negative segments for lakes no longer included in segment numbering order check (#915). Committed by aleaf on 2020-06-23.
    • fix(GridIntersect): Fixes #916 and #917 (#918). Committed by Davíd Brakenhoff on 2020-06-22.
    • fix(ZoneBudget): Fix faulty logic in ZoneBudget (#911). Committed by Jason Bellino on 2020-06-22.
    • fix(SwtListBudget): Totim was not being read correctly for seawat list file (#910). Committed by langevin-usgs on 2020-06-10.
    • fix(Seawat.modelgrid): Pass lenuni from dis file into modelgrid instance (#901). Committed by Joshua Larsen on 2020-06-02.
    • fix(mfsimulation): Repair change for case insensitive model names (#897). Committed by langevin-usgs on 2020-06-01.
    • fix(_plot_util3d_helper, export_array): (#895). Committed by Joshua Larsen on 2020-06-01.
    • fix(): fix building in clean env (#894). Committed by Ritchie Vink on 2020-05-28.
    • fix(setup.py): Read package name, version, etc. from version.py (#893). Committed by Hughes, J.D on 2020-05-26.
    • fix(MFSimulation): Remove case sensitivity from register_ims_package() (#890). Committed by Joshua Larsen on 2020-05-25.
    • fix(modelgrid): Fix offset for xul and yul in read_usgs_model_reference_file and attribs_from_namfile_header (#889). Committed by Joshua Larsen on 2020-05-19.
    • fix(#886): Mfarray aux variable now always returned as an numpy.ndarray. fixed problem with pylistutil not fully supporting numpy.ndarray type. (#887). Committed by spaulins-usgs on 2020-05-19.
    • fix(CellBudgetFile): Update for auto precision with imeth = 5 or 6 (#876). Committed by Joshua Larsen on 2020-05-14.
    • fix(#870): Update ims name file record after removing ims package (#880). Committed by Joshua Larsen on 2020-05-14.
    • fix: #868, #874, #879 (#881). Committed by spaulins-usgs on 2020-05-14.
    • fix(#867): Fixed minimum record entry count for lists to never include keywords in the count (#875). Committed by spaulins-usgs on 2020-05-11.
    • fix(SfrFile): Update sfrfile for streambed elevation when present (#866). Committed by Joshua Larsen on 2020-05-04.
    • fix(#831,#858): Data length check and case-insensitive lookup (#864). Committed by spaulins-usgs on 2020-05-01.
    • 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). Committed by spaulins-usgs on 2020-04-22.
    • fix(plot_array): Update plot_array method to mask using np.ma.masked_values (#851). Committed by Joshua Larsen on 2020-04-15.
    • fix(ModflowDis): Zero based get_node() and get_lrc()… (#847). Committed by Joshua Larsen on 2020-04-10.
    • fix(binaryfile_utils, CellbudgetFile): Update for imeth == 6 (#823). Committed by Joshua Larsen on 2020-04-10.
    • fix(utils.gridintersect): Bug in gridintersect for vertex grids (#845). Committed by Davíd Brakenhoff on 2020-04-06.
    • fix(mflmt.py): Clean up docstring for package_flows argument in lmt. Committed by emorway-usgs on 2020-03-31.
    • fix(str): Add consistent fixed and free format approach (#838). Committed by Hughes, J.D on 2020-03-31.
    • fix(vtk): Issues related to nan and type cast. Committed by Etienne Bresciani on 2020-03-31.
    • fix(pyproj): Pyproj.proj's errcheck keyword option not reliable (#837). Committed by Mike Taves on 2020-03-29.
    • fix: (#830): handling 'none' cellids in sfr package (#834). Committed by spaulins-usgs on 2020-03-25.
    • fix(): Fix quasi3d plotting (#819). Committed by Ruben Caljé on 2020-03-02.
    • fix(ModflowSfr2.export): Update modflowsfr2.export() to use grid instead of spatialreference (#820). Committed by Joshua Larsen on 2020-02-28.
      ...
Read more

FloPy version 3.3.0

14 Dec 16:28
184e716
Compare
Choose a tag to compare
  • Dropped support for python 2.7

  • Switched from pangeo binder binder to mybinder.org binder

  • Added support for MODFLOW 6 Skeletal Compaction and Subsidence (CSUB) package

  • Bug fixes:

    • Fix issue in MNW2 when the input file had spaced between lines in Dataset 2. #736
    • Fix issue in MNW2 when the input file uses wellids with inconsistent cases in Dataset 2 and 4. Internally the MNW2 will convert all wellids to lower case strings. #736
    • Fix issue with VertexGrid plotting errors, squeeze proper dimension for head output, in PlotMapView and PlotCrossSection
    • Fix issue in PlotUtilities._plot_array_helper mask MODFLOW-6 no flow and dry cells before plotting
    • Removed assumption that transient SSM data appears in the first stress period #754 #756. Fix includes a new autotest (t068_test_ssm.py) that adds transient concentration data after the first stress period.
    • Fix issues with add_record method for MfList #758

FloPy version 3.2.13

18 Nov 12:36
2a92634
Compare
Choose a tag to compare

Support for Python versions < 3.5 will be dropped in the next version of FloPy (version 3.3.0)

  • ModflowFlwob: Variable irefsp is now a zero-based integer (#596)

  • ModflowFlwob: Added a load method and increased precision of toffset when writing to file (#598)

  • New feature GridIntersect (#610): The GridIntersect object allows the user to intersect shapes (Points, LineStrings and Polygons) with a MODFLOW grid. These intersections return a numpy.recarray containing the intersection information, i.e. cell IDs, lengths or areas, and a shapely representation of the intersection results. Grids can be structured or vertex grids. Two intersections methods are implemented: "structured" and "strtree": the former accelerates intersections with structured grids. The latter is more flexible and also works for vertex grids. The GridIntersect class is available through flopy.utils.gridintersect. The functionality requires the Shapely module. See the example notebook for an overview of this new feature.

  • New feature Raster (#634): The Raster object allows the user to load raster files (Geotiff, arc ascii, .img) and sample points, sample polygons, create cross sections, crop, and resample raster data to a Grid. Cropping has been implemented using a modified version of the ray casting algorithm for speed purposes. Resampling a raster can be performed with structured, vertex, and unstructured Grids. Rasters will return a numpy array of resampled data in the same shape as the Grid. The Raster class is available by calling flopy.utils.Raster. The functionality requires rasterio, affine, and scipy. See the (example notebook) for an overview of this feature.

  • Modify NAM and MFList output files to remove excessive whitespace (#622, #722)

  • Deprecate crs class from flopy.utils.reference in favor of CRS class from flopy.export.shapefile_utils (#608)

  • New feature in PlotCrossSection (#660). Added a geographic_coords parameter flag to PlotCrossSection which allows the user to plot cross sections with geographic coordinates on the x-axis. The default behavior is to plot distance along cross sectional line on the x-axis. See the (example notebook) for an overview of this feature.

  • New feature with binaryfile readers, including HeadFile and CellBudgetFile (#669): with statement is supported to open files for reading in a context manager, which automatically close when done or if an exception is raised.

  • Improved the flopy list reader for MODFLOW stress packages (for mf2005, mfnwt, etc.), which may use SFAC to scale certain columns depending on the package. The list reading now supports reading from external files, in addition to open/close. The (binary) option is also supported for both open/close and external. This new list reader is used for reading standard stress package lists and also lists used to create parameters. The new list reader should be consistent with MODFLOW behavior.

  • SfrFile detects additional columns (#708)

  • Add a default_float_format property to mfsfr2, which is string formatted by NumPy versions > 1.14.0, or {:.8g} for older NumPy versions (#710)

  • Support for pyshp 1.2.1 dropped, pyshp 2.1.0 support maintained

  • Improved VTK export capabilities. Added export for VTK at array level, package level, and model level. Added binary head file export and cell by cell file export. Added the ability to export point scalars in addition to cell scalars, and added smooth surface generation. VTK export now supports writing transient data as well as exporting to binary .vtu files.

  • Support for copying model and package instances with copy.deepcopy()

  • Added link to Binder on README and notebooks_examples markdown documents. Binder provides an environment that runs and interactively serves the FloPy Jupyter notebooks.

  • Bug fixes:

    • When using the default iuzfbnd=None in the __init__ routine of mtuzt.py, instantiation of IUZBND was generating a 3D array instead of a 2D array. Now generates a 2D array
    • ModflowSfr2 __init__ was being slowed considerably by the ModflowSfr2.all_segments property method. Modified the ModflowSfr2.graph property method that describes routing connections between segments to handle cases where segments aren't listed in stress period 0.
    • Ensure disordered fields in reach_data (Dataset 2) can be supported in ModflowSfr2 and written to MODFLOW SFR input files.
    • When loading a MF model with UZF active, item 8 ("[IUZROW] [IUZCOL] IFTUNIT [IUZOPT]") wasn't processed correctly when a user comment appeared at the end of the line
    • MODFLOW-6 DISU JA arrays are now treated as zero-based cell IDs. JA, IHC, CL12 are outputted as jagged arrays.
    • Models with multiple MODFLOW-6 WEL packages now load and save correctly.
    • Exporting individual array and list data to a shapefile was producing an invalid attribute error. Attribute reference has been fixed.
    • Fix UnboundLocalError and typo with flopy.export.shapefile_utils.CRS class (#608)
    • Fix Python 2.7 issue with flopy.export.utils.export_contourf (#625)
    • When loading a MT3D-USGS model, keyword options (if used) were ignored (#649)
    • When loading a modflow model, spatial reference information was not being passed to the SpatialReference class (#659)
    • Fix specifysurfk option in UZF, ModflowUZF1 read and write surfk variable
    • Fix minor errors in flopy gridgen wrapper
    • Close opened files after loading, to reduce ResourceWarning messages (#673)
    • Fix bugs related to flake8's F821 "undefined name 'name'", which includes issues related to Mt3dPhc, ModflowSfr2, ModflowDe4, ListBudget, and ModflowSms (#686)
    • Fix bugs related to flake8's F811 "redefinition of unused 'name'" (#688)
    • Fix bugs related to flake8's W605 "invalid escape sequence '\s'" (or similar) (#700)
    • Fix EpsgReference class behavior with JSON user files (#702)
    • Fix ModflowSfr2 read write logic for all combinations of isfropt and icalc
    • IRCH array of the Recharge Package is now a zero-based variable, which means an IRCH value of 0 corresponds to the top model layer (#715)
    • MODFLOW lists were not always read correctly if they used the SFAC or binary options or were used to define parameters (#683)
    • Changed VDF Package density limiter defaults to zero (#646)

FloPy version 3.2.12

01 Jun 03:25
Compare
Choose a tag to compare
  • Added a check method for OC package (#558)

  • Change default map projection from EPSG:4326 to None (#535)

  • Refactor warning message visibility and categories (#554, #575)

  • Support for MODFLOW 6 external binary files added. Flopy can read/write binary files containing list and array data (#470, #553).

  • Added silent option for MODFLOW 6 write_simulation (#552)

  • Refactored MODFLOW-6 data classes. File writing operations moved from mfdata*.py to new classes created in mffileaccess.py. Data storage classes moved from mfdata.py to mfdatastorage.py. MFArray, MFList, and MFScalar interface classes simplified with most of the data processing code moved to mfdatastorage.py and mffileaccess.py.

  • Added MODFLOW 6 quickstart example to front page.

  • Added lgrutil test as autotest/t063_test_lgrutil.py and implemented a get_replicated_parent_array() method to the Lgr class so that the user can pass in a parent array and get back an array that is the size of the child model.

  • Refactored much of the flopy code style to conform with Python conventions and those checked by Codacy. Added an automated Codacy check as part of the pull request and commit checks.

  • Bug fixes:

    • Fixed bug in Mt3dms.load to show correct error message when loading non-existent NAM file (#545)
    • Removed errant SFT parameter contained in Mt3dUzt.init routine (#572)
    • Fixed DISV shapefile export bug that applied layer 1 parameter values to all model layers during export (#508)
    • Updated ModflowSfr2.load to store channel_geometry and channel_flow_data (6d, 6e) by nseg instead of itmp position (#546)
    • Fixed bug in ModflowMnw2.make_node_data to be able to set multiple wells with different numbers of nodes (#556)
    • Fixed bug reading MODFLOW 6 comma separated files (#509)
    • Fixed bug constructing a grid class with MODFLOW-USG (#513)
    • Optimized performance of grid class by minimizing redundant operations through use of data result caching (#520)
    • Fixed bug passing multiple auxiliary variables for MODFLOW 6 array data (#533)
    • Fixed bug in Mt3dUzt.init; the variable ioutobs doesn't exist in the UZT package and was removed.
    • Fixed MODFLOW-LGR bug in which ascii files were not able to be created for some output. Added better testing of the MODFLOW-LGR capabilities to t035_test.py.
    • Fixed multiple issues in mfdis that resulted in incorrect row column determination when using the method get_rc_from_node_coordinates (#560). Added better testing of this to t007_test.py.
    • Fixed the export_array_contours function as contours would not export in some cases (#577). Added tests of export_array_contours and export_array to t007_test.py as these methods were not tested at all.

FloPy version 3.2.11

23 Mar 00:43
Compare
Choose a tag to compare
  • Added support for the drain return package.

  • Added support for pyshp version 2.x, which contains a different call signature for the writer than earlier versions.

  • Added a new flopy3_MT3DMS_examples notebook, which uses Flopy to reproduce the example problems described in the MT3DMS documentation report by Zheng and Wang (1999).

  • Pylint is now used on Travis for the Python 3.5 distribution to check for coding errors.

  • Added testing with Python 3.7 on Travis, dropped testing Python 3.4.

  • Added a new htop argument to the vtk writer, which allows cell tops to be defined by the simulated head.

  • Generalized exporting and plotting to also work with MODFLOW 6. Added a new grid class and deprecated SpatialReference class. Added new plotting interfaces, PlotMapView and PlotCrossSection. Began deprecation of ModelMap and ModelCrossSection classes.

  • Spatial reference system cache moved to epsgref.json in the user's data directory.

  • Attempts to read empty files from flopy.utils raise a IOError exception.

  • Changed interface for creating and accessing MODFLOW 6 observation, time series, and time array series packages. These packages can now be created and accessed directly from the package that references them. These changes are not backward compatible, and will require existing scripts to be modified. See the flopy3_mf6_obs_ts_tas.ipynb notebook for instructions.

  • Changed the MODFLOW 6 fname argument to be filename. This change is not backward compatible, and will require existing scripts to be modified if the fname argument was used in the package constructor.

  • Added modflow-nwt options support for ModflowWel, ModflowSfr2, and ModflowUzf1 via the OptionBlock class.

  • Bug fixes:

    • Removed variable MXUZCON from mtuzt.py that was present during the development of MT3D-USGS, but was not included in the release version of MT3D-USGS.
    • Now account for UZT -> UZT2 changes with the release of MT3D-USGS 1.0.1. Use of UZT is no longer supported.
    • Fixed bug in mfuzf1.py when reading and writing surfk when specifysurfk = True.
    • Fixed bug in ModflowStr.load(), utility would fail to load when comments were present.
    • Fixed bug in MNW2 in which nodes were not sorted correctly.
    • Ensure that external 1-D free arrays are written on one line.
    • Typos corrected for various functions, keyword arguments, property names, input file options, and documentation.

FloPy version 3.2.10

19 Oct 23:13
Compare
Choose a tag to compare
  • Added parameter_load variable to mbase that is set to true if parameter data are applied in the model (only used in models that support parameters). If this is set to True free_format_input is set to True (if currently False) when the write_input() method is called. This change preserves the precision of parameter data (which is free format data).

  • MODFLOW 6 model and simulation packages can not be retrieved as a MFSimulation attribute

  • Added support for multicomponent load in mfsft.py

  • Added functionality to read esri-style epsg codes from spatialreference.org.

  • Added functionality to MODFLOW 6 that will automatically replace the existing package with the one being added if it has the same name as the existing package.

  • Added separate MODFLOW 6 model classes for each model type. Model classes contain name file options.

  • Added standard run_model() method arguments to mf6 run_simulation() method.

  • some performance improvements to checking

  • SpatialReference.export_array() now writes 3-D numpy arrays to multiband GeoTiffs

  • Add load support to for MNW1; ModflowMnw1 now uses a stress_period_data Mflist to store MNW information, similar to other BC packages.

  • Added a Triangle class that is a light wrapper for the Triangle program for generating triangular meshes. Added a notebook called flopy3_triangle.ipynb that demonstrates how to use it and build a MODFLOW 6 model with a triangular mesh. The current version of this Triangle class should be considered beta functionality as it is likely to change.

  • Added support for MODPATH 7 (beta).

  • Added support for MODPATH 3 and 5 pathline and endpoint output files.

  • Added support for MODPATH timeseries output files (flopy.utils.TimeseriesFile()).

  • Added support for plotting MODPATH timeseries output data (plot_timeseries()) with ModelMap.

  • Bug fixes:

    • Fixed issue in HOB when the same layer is specified in the MLAY data (dataset 4). If the layer exists the previous fraction value is added to the current value.
    • Fixed bug in segment renumbering
    • Changed default value for ioutobs **kwargs in mtsft.py from None to 0 to prevent failure.
    • Fixed bug when passing extra components info from load to constructor in mtsft.py and mtrct.py.
    • Fixed bug in mt3ddsp load - if multidiffusion is not found, should only read one 3d array.
    • Fixed bug in zonbud utility that wasn't accumulating flow from constant heads.
    • Fixed minor bug that precluded the passing of mass-balance record names (TOTAL_IN, IN-OUT, etc.).
    • Fixed bug when writing shapefile projection (.prj) files using relative paths.
    • Fixed bugs in sfr.load() -- weight and flwtol should be cast as floats, not integers.
    • Fixed bug when SpatialReference supplied with geographic CRS.
    • Fixed bug in mfsfr.py when writing kinematic data (irtflg >0).
    • Fixed issue from change in MODFLOW 6 inspect.getargspec() method (for getting method arguments).
    • Fixed MODFLOW 6 BINARY keyword for reading binary data from a file using OPEN/CLOSE (needs parentheses around it).
    • Fixed bug in mtlkt.py when instatiating, loading, and/or writing lkt input file related to multi-species problems.

FloPy version 3.2.9

19 Feb 17:02
Compare
Choose a tag to compare
  • Modified MODFLOW 5 OC stress_period_data=None default behaviour. If MODFLOW 5 OC stress_period_data is not provided then binary head output is saved for the last time step of each stress period.

  • added multiple component support to mt3dusgs SFT module

  • Optimized loading and saving of MODFLOW 6 files

  • MODFLOW 6 identifiers are now zero based

  • Added remove_package method in MFSimulation and MFModel that removes MODFLOW 6 packages from the existing simulation/model

  • Changed some of the input argument names for MODFLOW 6 classes. Note that this will break some existing user scripts. For example, the stress period information was passed to the boundary package classes using the periodrecarray argument. The argument is now called stress_period_data in order to be consistent with other Flopy functionality.

  • Flopy code for MODFLOW 6 generalized to support different model types

  • Flopy code for some MODFLOW 6 arguments now have default values in order to be consistent with other Flopy functionality

  • Added ModflowSfr2.export_transient_variable method to export shapefiles of segment data variables, with stress period data as attributes

  • Added support for UZF package gages

  • Bug fixes:

    • Fixed issue with default settings for MODFLOW 5 SUB package dp dataset.
    • Fixed issue if an external BC list file has only one entry
    • Some patching for recarray issues with latest numpy release (there are more of these lurking...)
    • Fixed setting model relative path for MODFLOW 6 simulations
    • Python 2.7 compatibility issues fixed for MODFLOW 6 simulations
    • IMS file name conflicts now automatically resolved
    • Fixed issue with passing in numpy ndarrays arrays as layered data
    • Doc string formatting for MODFLOW 6 packages fixed to make doc strings easier to read
    • UZF package: fixed issues with handling of finf, pet, extdp and extwc arrays.
    • SFR package: fixed issue with reading stress period data where not all segments are listed for periods > 0.
    • SpatialReference.write_gridSpec was not converting the model origin coordinates to model length units.
    • shorted integer field lengths written to shapefiles to 18 characters; some readers may misinterpret longer field lengths as float dtypes.

FloPy version 3.2.8

18 Dec 20:05
Compare
Choose a tag to compare
  • Added has_package(name) method to see if a package exists. This feature goes nicely with get_package(name) method.
  • Added set_model_units() method to change model units for all files created by a model. This method can be useful when creating MODFLOW-LGR models from scratch.
  • Bug fixes:
    • Installation: Added dfn files required by MODFLOW 6 functionality to MANIFEST.in so that they are included in the distribution.
    • SFR2 package: Fixed issue reading transient data when ISFOPT is 4 or 5 for the first stress period.

FloPy version 3.2.7

01 Dec 18:59
Compare
Choose a tag to compare
  • Added beta support for MODFLOW 6 See here for more information.
  • Added support for retrieving time series from binary cell-by-cell files. Cell-by-cell time series are accessed in the same way they are accessed for heads and concentrations but a text string is required.
  • Added support for FORTRAN free format array data using n*value where n is the number of times value is repeated.
  • Added support for comma separators in 1D data in LPF and UPF files
  • Added support for comma separators on non array data lines in DIS, BCF, LPF, UPW, HFB, and RCH Packages.
  • Added .reset_budgetunit() method to OC package to faciltate saving cell-by-cell binary output to a single file for all packages that can save cell-by-cell output.
  • Added a .get_residual() method to the CellBudgetFile class.
  • Added support for binary stress period files (OPEN/CLOSE filename (BINARY)) in wel stress packages on load and instantiation. Will extend to other list-based MODFLOW stress packages.
  • Added a new flopy.utils.HeadUFile Class (located in binaryfile.py) for reading unstructured head files from MODFLOW-USG. The .get_data() method for this class returns a list of one-dimensional head arrays for each layer.
  • Added metadata.acdd class to fetch model metadata from ScienceBase.gov and manage CF/ACDD-complient metadata for NetCDF export
  • Added sparse export option for boundary condition stress period data, where only cells for that B.C. are exported (for example, package.stress_period_data.export('stuff.shp', sparse=True))
  • Added additional SFR2 package functionality:
    • .export_linkages() and .export_outlets() methods to export routing linkages and outlets
    • sparse shapefile export, where only cells with SFR reaches are included
    • .plot_path() method to plot streambed elevation profile along sequence of segments
    • .assign_layers() method
    • additional error checks and bug fixes
  • Added SpatialReference / GIS export functionality:
    • GeoTiff export option to SpatialReference.export_array
    • SpatialReference.export_array_contours: contours an array and then exports contours to shapefile
    • inverse option added to SpatialReference.transform
    • automatic reading of spatial reference info from .nam or usgs.model.reference files
  • Modified node numbers in SFR package and ModflowDis.get_node() from one- to zero-based.
  • Modified HYDMOD package klay variable from one- to zero-based.
  • Added .get_layer() method to DIS package.
  • Added .get_saturated_thickness() and .get_gradients() methods
  • Bug fixes:
    • OC package: Fixed bug when printing and saving data for select stress periods and timesteps. In previous versions, OC data was repeated until respecified.
    • SUB package: Fixed bug if data set 15 is passed to preserved unit numbers (i.e., use unit numbers passed on load).
    • SUB and SUB-WT packages: Fixed bugs .load() to pop original unit number.
    • BTN package: Fixed bug in obs.
    • LPF package: Fixed bug regarding when HANI is read and written.
    • UZF package: added support for MODFLOW NWT options block; fixed issue with loading files with thti/thtr options
    • SFR package: fixed bug with segment renumbering, issues with reading transient text file output,
    • Fixed issues with dynamic setting of SpatialReference parameters
    • NWT package: forgive missing value for MXITERXMD
    • MNW2 package: fix bug where ztop and zbotm were written incorrectly in get_allnode_data(). This was not affecting writing of these variables, only their values in this summary array.
    • PCGN package: fixed bug writing package.
    • Fixed issue in Util2d when non-integer cnstnt passed.