-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PstFrom.add_parameters() par_style = direct #533
Comments
For direct parameters, we want to read the existing input file and use those values for |
So the error that I'm experiencing is related to the presence of NaN values in the model input file. Which, in retrospect, does seem like an obvious place to look for the error ... But for a little more context and perhaps of interest to others who find this:
There is, however, a curious little postscript. Here's my minimum reproducible example:
So that works. I did actually consider the potential effect of NaNs in the model input so I put a stripe of NaNs across the top of the model input file like this:
That still works! That is, parval1 gets written correctly into the pst.parameter_data. However, if I move the stripe of NaNs to the BOTTOM of the model input array ...
parval1 does not get written correctly into the pst.parameter_data. |
Yeah nans are trouble. If you want to have inactive areas for the parameterization, best to use a zone array... |
I'm trying to understand and implement a few features of the 'direct' parameter style using PstFrom.add_parameters().
For this sequence
Those NaNs are the
parval1
column that I thought I was specifying with theinitial_value
argument that I passed topf.add_parameters
.I think the problem is here (and my code runs as expected if I remove this conditional and set parval1) :
pyemu/pyemu/utils/pst_from.py
Lines 2774 to 2775 in b301698
Is there a reason that
parval1
should not be set here for direct parameters? Should I be doing something differently to specify initial values for direct parameters?Thx
The text was updated successfully, but these errors were encountered: