How can I change output file names or save them in a specific directory with mf6 simulation ? #1589
-
Hey, I'm struggling with finding a way to work in a parallel manner with one input directory containing all the model files and then saving the outputs of each test in a new specific folder as the simulation are running in parallel. I have one large mf6 model and all the files are stored in a working directory (model_load). I would like to try different permeability fields for this model and compare the outputs. The code runs on a cluster and I would like to use the same input folder for all of my workers/tests and change only the name or directory where the model is stored while running. I having a hard time finding a way to redirect these specific files that are created when my model start to run : mfsim.lst, my_model.cbc, my_model.lst, my_model.dis.grb, my_model.hds. I tried different methods to change the relative path of my simulation but nothing seems to work this far. I tried to :
and then change the model path :
or change the simu path or simu name :
But the output are still the same and still stored in my original directory, the model_load one. With their name unchanged. I also tried to give a specific name to each simulation when loaded but it does not affect the output. I do not have the opportunity to copy the whole input directory as this one is too large compared to the number of models I would like to run. I found a discussion where the path are changed using this approach :
But the method does not seem to be there in mf6 model or simulation object. If anybody can explain to me where I did something wrong or what is the proper method for that, it will be really appreciated! Cheers, Valentin |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The easiest way to change the simulation path is by using: sim = fp.mf6.MFSimulation.load(sim_name='daily', exe_name=exe_name, sim_ws=model_load)
sim.set_sim_path("my/new/path")
sim.write_simulation() Or you can change the name of the model by using sim = fp.mf6.MFSimulation.load(sim_name='daily', exe_name=exe_name, sim_ws=model_load)
sim.rename_all_packages("my_new_name")
sim.write_simulation() |
Beta Was this translation helpful? Give feedback.
The easiest way to change the simulation path is by using:
Or you can change the name of the model by using