modflowpy / flopy

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

documentation crch in the mtssm module #143

Closed JoerivanEngelen closed 6 years ago

JoerivanEngelen commented 8 years ago

I am not sure if this is the area to nitpick at the documentation, so feel free to redirect/delete this post if it is not.

In the documentation of the mtssm module, it states that the accepted datatype of crch is an 'array of floats'. When using multiple stress periods for crch however, you apparently need to use a dictionary; analogue to the input of stress_period_data. I found that confusing.

Furthermore, I cannot find how to specify multiple concentrations for crch when there is a multispecies simulation. Perhaps it is an idea to also include that in this notebook?: https://github.com/modflowpy/flopy/blob/develop/examples/Notebooks/flopy3_multi-component_SSM.ipynb

langevin-usgs commented 8 years ago

You're right. This is not described very well, and reporting it as an issue is the appropriate way to let us know. Thanks. We need to improve all of the documentation for multi-species. I changed the documentation for crch to be:

crch : Transient2d, scalar, array of floats, or dictionary
    CRCH is the concentration of recharge for species 1.
    If the recharge flux is positive, it acts as a source whose
    concentration can be specified as desired. If the recharge flux is
    negative, it acts as a sink (discharge) whose concentration is always
    set equal to the concentration of groundwater at the cell where
    discharge occurs. Note that the location and flow rate of
    recharge/discharge are obtained from the flow model directly through
    the unformatted flow-transport link file.  crch can be specified as
    an array, if the array is constant for the entire simulation.  If
    crch changes by stress period, then the user must provide a
    dictionary, where the key is the stress period number (zero based) and
    the value is the recharge array.  The recharge concentration
    can be specified for additional species by passing additional
    arguments to the Mt3dSsm constructor.  For example, to specify the
    recharge concentration for species two one could use
    crch2={0: 0., 1: 10*np.ones((nlay, nrow, ncol), dtype=np.float)} as
    and additional keyword argument that is passed to Mt3dSsm when making
    the ssm object.

Hopefully this will help get you started for now. In the meantime, we'll leave this issue open as a reminder that we need a better description of how to handle multi-species simulations with flopy.

JoerivanEngelen commented 8 years ago

Thanks, FloPy luckily already sent me warning messages from which I could infer that crch2 had to be used as an argument.

ghost commented 8 years ago

Sweet. I just ran into the same problem with changing recharge concentrations in stress periods. Thanks for heads up. Tariq

ds138 commented 6 years ago

FloPy somehow doesn't allow me to specifiy concentrations by layer for crch as stated in the example in the flopy documentation: crch2={0: 0., 1: 10*np.ones((nlay, nrow, ncol), dtype=np.float)}

The following error occurs even though my model consists of 160 Layers and I am using the examples code: Exception: Transient2d error building Util2d instance from value at kper: 1 Util2d:self.shape: (41, 155) does not match value.shape: (160L, 41L, 155L)

Any suggestions what the issue might be?

langevin-usgs commented 6 years ago

I think crch should be 2D, not 3D. Can you try this?

crch2={0: 0., 1: 10*np.ones((nrow, ncol), dtype=np.float)}

ds138 commented 6 years ago

Thanks! This actually seems to work just fine. I guess I was too focused on the documentation example to see my mistake.

langevin-usgs commented 6 years ago

I updated that docstring. Thanks for bringing this to our attention.