It is recommended but not necessary to set up a virtual environment to run the code. Use the following command to set up the environment.
conda env create -f requirement.yml
There are two ways to run the code.
- Option 1: Specify the code parameters in a configuration file.
python generate_input_files.py @generate_input_files.cfg
- Option 2: Specify the code parameters in the command line.
python generate_input_files.py --input_template /path/to/template.tpl --variable_mapping /path/to/variable_maps.yml --num_simulations 16 --output_dir /path/to/output_dir
A combination of the two can be used as well where some parameters are specified in the configuration file and others are specified in the command line.
-
generate_input_files.cfg
Configuration parameters for running the code.
-
farea_3d_tritium.tpl
Template file
-
sim_param_mapping.yml
Mapping of the variables with their corresponding value ranges
Variable map YAML files are accepted in either of the following formats:
Format 1 Format 2 Format 3 Range values for the variable Single values for the variable Multiple values for the variable Example file: "@Perm@": low: 5e-12*0.8 high: 5e-12*1.2 "@Por@": low: 0.39*0.8 high: 0.39*1.2
Example file: "@Perm@": - 5e-12*0.8 "@Por@": - 0.39*0.8
Example file: "@Perm@": - 5e-12*0.8 - 5e-12*1.2 "@Por@": - 0.39*0.8 - 0.39*1.2
A combination of the three can also be used to define values for the variables. When multiple values are provided for one or more variables, all permutations are considered for the simulations.
-
requirements.yml
File used to create the virtual environment.
run_ensembles.sh
script is used to initiate the ensemble simulation.
This script requires two commandline inputs:
- Output Directory (
-o
)This directory contains all the individual simulation directories. The output of each simulation is stored in the respective directories.
- Number of simulations (
-n
)This is the number of simulation runs. This number should match the count of simulation directories.
This script requires a shared_files
directory within the Output Directory.
This shared_files
directory must contain the following files:
run_amanzi.sh
This file is replicated for each simulation and the replicated version is stored in the simulation directory. The
sbatch
configurations are specified in this file. Number of processors is also specified in this file.farea_3D_barriers.exo
farea_tritium.bdg