-
Notifications
You must be signed in to change notification settings - Fork 102
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
Easy way to update priors? #384
Comments
@weskitlasten sorry for the delay - just saw this. I wonder if "d"irect par_style might be better for this case? Otherwise, I think its sort of "up to you" to load those org CSV files and manipulate them and write them back into org... @briochh anything better? |
Doesn't "direct" par_style still make a csv version of the input data in the "org" dir? I find I have a primal desire to tweak native MF files (via flopy, whatever), or use external tools (e.g. SWN, GridIt) to populate existing model files, and run the single forward models during exploration. Obviously I can just write a version of the files to an existing pst_from created "org" dir by copying the format. Just thought it might be convenient/efficient, esp if there are any changes to how those files are handled down the road (e.g., supporting MF binary input files, etc). |
Hi @wkitlasten, yup "direct" setup still dumps into "org" dir. As you noted, to make things a little easier at runtime these are not exact replicas of your model files (everything gets saved with comma delim). As @jtwhite79 suggests, I think the safest way would be to load your updated model files and dump them into It is slightly dangerous ground though. I could see a number of ways in which your original parameter ensemble could silently diverge. |
"It is slightly dangerous ground though. I could see a number of ways in which your original parameter ensemble could silently diverge." yep, but less of an issue if only you only use mult or add pars (right?). Isn't IES pretty sensitive to the shape and center of the prior dist? For example, if there was a clever way of improving your prior parameter fields (shifting the center around), you just dump them in the org and keep everything else the same (same mult and add par bounds, so same shape of the dist). |
@wkitlasten and @jtwhite79, I think we could add a function that support this. Would use the mult info file to loop over updated model files and write (in try csv format to org directory?). Would need to check that we have everything we need in that info file. I am happy to add it to the list -- anyone else want to take it on? |
As per your suggestion, I found a work around involving:
`pyemu.helpers.apply_list_and_array_pars(arr_par_file='mult2model_info.csv')`
Then I just rebuilding all the pest files. Takes a little time, but not a big deal now that I have it working. Besides, now I do a few tweaks with each new pest build so I need more than just updated priors in org. So maybe not as useful as I once thought?
HOWEVER, I believe `apply_list_and_array_pars` requires you to be in the specific directory. It would be nice if `apply_list_and_array_pars` had a `cwd` type kwarg (default being ‘.’ to avoid any backward compatibility issues?). I should probably do that… but with my track record I’m likely to inadvertently break something git-y 😊.
|
I appreciate the reduction in cognitive load from pst_from. All my pars are multipliers or additioners, which is really convenient. But it does come with some complexity, which I am trying to figure out how to navigate efficiently. Example:
MODFLOW (and other) use space delim, but pst_from adds commas to files written in the "org" dir (for reasons I fully appreciate). So updating the (e.g.) sfr reach data file with a new space delim file requires mimicking what pst_from does to make the "org" dir (xN new files). Not a huge issue, but kind of handy if you are just tweaking priors in those original files.
So is there a method that transforms model input files in original format into the "org" dir, without rerunning all of pst_from? Could that be turned into a stand alone method? For example, pass a list of file names from the model directory and have pyemu reformat/save them to "org?"
The text was updated successfully, but these errors were encountered: