pypest / pyemu

python modules for model-independent uncertainty analyses, data-worth analyses, and interfacing with PEST(++)
BSD 3-Clause "New" or "Revised" License
174 stars 95 forks source link

pyemu.Pst.from_io_files changed some observation values #441

Closed hjia1005 closed 1 year ago

hjia1005 commented 1 year ago

I like to use the from_io_files function to create my pst file.

pst = pyemu.Pst.from_io_files(tpl_files, in_files, ins_files, out_files) It has been reliable until I add a new group of observations to my model.

I have head observations, time difference observations, and vertical difference observations. I decided to add some dry bore observations to make sure the modeled head in some bores is below a certain level.

This is my observation file for the dry bore. 1 means dry, if it's not dry then it's 0. image

However, in the created pst file, the observation data for these look like this. image

The value "1" has been converted to 1E+10. But my head, time difference and vertical difference are normal. I only noticed this issue after running 3 iterations of pestpp-ies... Have to stop and manually correct it in the pest file. Is there a reason for this?

jtwhite79 commented 1 year ago

I think 1e+10 obsval means that when pyemu was creating the control file, it failed to process the output file that corresponds with the dry bore instruction file, so it fills the obsval with that "generic" value. There should have been a warning about this generic filling?

hjia1005 commented 1 year ago

Thank you for the feedback.

I think there is a datatype mismatch. The smp2smp generated a float as 1.00000000, and my instruction file was created based on the float. But the observed file is using an integer as 1, I guess that's where the issue started. Yes now I see there is a warning about that and I didn't notice.