Replies: 1 comment 1 reply
-
Idk if this is the best way to do it, but the way I've done this is to make a function that uses pyemu.os_utils.run() with the cwd args as needed. Then add that function via add_py_function() with is_pre_cmd = None and make that function the forward run command...clear as mud? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
So there might already be a solution for this that I haven't been able to discover.
Up until recently I've always used PyEMU with a single model in a flat directory structure (model files and pest files all bunched together).
Experimenting with different MF6 capabilities in a current project I've got the following structure:
master_dir/
│
├── gwf/
├── gwt/
├── prt1/
└── prt2/
I've got a single instance of the mf6 binary and all pest-related stuff in the master_dir and use the cwd="" command to call mf6 in the different subdirs according to the order above.
Now the issue is that PstFrom doesn't allow me to pass the arguments cwd="./gwf", cwd="./gwt", e.t.c., which instead requires manual editing of the forward_run script. This isn't a big deal - just more of a convenience issue (forgetful as I can be).
Is there a way to pass arguments to commands run with os.system that I've missed or another convenient way to write lines to the forward_run script at the location of mod_sys_cmds?
Beta Was this translation helpful? Give feedback.
All reactions