modflowpy / flopy

A Python package to create, run, and post-process MODFLOW-based models.
https://flopy.readthedocs.io
Other
506 stars 306 forks source link

bug: Extraneous kwargs provided to the energy storage package #2250

Closed brixel-1984 closed 2 months ago

brixel-1984 commented 2 months ago

I saw that a series of notebooks have been published to illustrate the capacities of the new Groundwater Energy (GWE) model of modflow 6.

When trying to run these notebooks, I get the following error (using either flopy versions 3.7.0 of 3.8.0dev): FlopyException: Extraneous kwargs "heat_capacity_water, density_water" provided to MFPackage. ()

The issue seems to be with the two arguments ('heat_capacity_water' and 'density_water') provided to the energy storage package, as they do not show up in the docstring.

flopy.mf6.ModflowGweest(
    model,
    loading_package=False,
    save_flows=None,
    zero_order_decay=None,
    latent_heat_vaporization=None,
    porosity=None,
    decay=None,
    cps=None,
    rhos=None,
    packagedata=None,
    filename=None,
    pname=None,
    **kwargs,
)
Docstring:     
ModflowGweest defines a est package within a gwe6 model.

And taking them out creates then a problem with the .nam file...

Any clue?

langevin-usgs commented 2 months ago

Hi @brixel-1984, sorry for this inconvenience. We changed the input slightly for the GWE-EST Package in the both the "develop" version of MODFLOW 6 and the develop version of FloPy. So for these notebooks to work, you will need the last release of both MODFLOW and FloPy or the develop versions of both MODFLOW 6 and FloPy.

You can get develop versions of MODFLOW 6 here.

wpbonelli commented 2 months ago

@langevin-usgs please correct me if I'm wrong but @brixel-1984 if you opt for the develop versions, I believe you will also need to regenerate FloPy MF6 package classes, as the updated inputs have not yet been checked into the FloPy repository (typically we do this just before release time).

langevin-usgs commented 2 months ago

Yes, good point, @wpbonelli.