Skip to content
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

Open
wkitlasten opened this issue Nov 26, 2022 · 6 comments
Open

Easy way to update priors? #384

wkitlasten opened this issue Nov 26, 2022 · 6 comments
Assignees

Comments

@wkitlasten
Copy link
Collaborator

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?"

@jtwhite79
Copy link
Collaborator

@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?

@wkitlasten
Copy link
Collaborator Author

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).

@briochh
Copy link
Collaborator

briochh commented Jan 19, 2023

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 org as appropriately comma delimited files the "mult2model_info.csv" might help make the connections between model files and files in org.

It is slightly dangerous ground though. I could see a number of ways in which your original parameter ensemble could silently diverge.

@wkitlasten
Copy link
Collaborator Author

"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).

@briochh
Copy link
Collaborator

briochh commented Aug 15, 2023

@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?

@briochh briochh self-assigned this Aug 15, 2023
@weskitlasten
Copy link
Contributor

weskitlasten commented Aug 15, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants