flopy icon indicating copy to clipboard operation
flopy copied to clipboard

Suggestion for better errors messages with mixed data values in input packages (modflow6)

Open haugwitz opened this issue 3 years ago • 1 comments

Hi All

This is not so much an issue as it is a suggestion.

I was trying to add transport to a model recently.

After adding auxillary concentration values to my constant head package values, I started getting strange runtime errors.

I realised after a lot of experimentation, that I added values to constant head earlier in the code that still had names in the auxillary column.

It would be useful with an error message when initialising the package, if there are non-numeric auxillary concentration values, so modflow6 doesnt crash at runtime..

haugwitz avatar Apr 23 '22 06:04 haugwitz

@spaulins-usgs is there anyway to validate aux variables?

jdhughes-dev avatar Jul 19 '22 18:07 jdhughes-dev

@jdhughes-usgs, yes I will have flopy validate aux variables. My understanding of aux variables is that they should always be numeric value or the name of a time series. I will have flopy verify that they are one or the other. Normally I would do validation checks at the time the stress package is constructed or updated, but in this case I might need to defer validation until flopy is writing the simulation since at the time of stress package construction the time series file may not have been constructed yet.

spaulins-usgs avatar Aug 29 '22 20:08 spaulins-usgs

The check method now performs error checking on aux variables.

spaulins-usgs avatar Sep 12 '22 20:09 spaulins-usgs