Skip to content

Commit

Permalink
post bug fix, ready for job submission
Browse files Browse the repository at this point in the history
  • Loading branch information
teopb committed Jul 21, 2023
1 parent a8da46d commit cfcc847
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 15 deletions.
16 changes: 4 additions & 12 deletions MPAS_true_failure_testing/pre_run_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,11 @@
mod_nml = copy.deepcopy(orig_namelist)

for order in neg_test_orders:
# create initial conditions copy directories using symlinks
# create initial conditions copy directories (helpful if initial directory restart files are absolute symlinks for size)
init_copy_folder = f"{init_copy_dir}/{var_name}_perturb_neg{order}"
command = f"cp -a {init_dir}/ {init_copy_folder}"
os.system(command)

# # remove old linked namelist
# os.remove(f"{init_copy_folder}/{namelist_name}")

# create empty directories for outputs
output_folder = test_output_dir + f"/{var_name}_perturb_neg{order}"
os.mkdir(output_folder)
Expand All @@ -66,20 +63,16 @@
print(f"{var_name} changed from default value of {default_var_value} to {mod_nml[namelist_preface][var_name]}", file=f)

# submit jobs
# run_cmd = f"python {mpas_src}/ensemble.py -rd {output_folder} -c {init_copy_folder} --verify_size {verify_runs} -s --verify"
run_cmd = f"python {mpas_src}/ensemble.py -rd {output_folder} -c {init_copy_folder} --verify_size {verify_runs} --verify"
run_cmd = f"python {mpas_src}/ensemble.py -rd {output_folder} -c {init_copy_folder} --verify_size {verify_runs} -s --verify"

os.system(run_cmd)

for order in pos_test_orders:
# create initial conditions copy directories using symlinks
# create initial conditions copy directories (helpful if initial directory restart files are absolute symlinks for size)
init_copy_folder = f"{init_copy_dir}/{var_name}_perturb_{order}"
command = f"cp -a {init_dir}/ {init_copy_folder}"
os.system(command)

# # remove old linked namelist
# os.remove(f"{init_copy_folder}/{namelist_name}")

# create empty directories for outputs
output_folder = test_output_dir + f"/{var_name}_perturb_{order}"
os.mkdir(output_folder)
Expand All @@ -95,6 +88,5 @@
print(f"{var_name} changed from default value of {default_var_value} to {mod_nml[namelist_preface][var_name]}", file=f)

# submit jobs
# run_cmd = f"python {mpas_src}/ensemble.py -rd {output_folder} -c {init_copy_folder} --verify_size {verify_runs} -s --verify"
run_cmd = f"python {mpas_src}/ensemble.py -rd {output_folder} -c {init_copy_folder} --verify_size {verify_runs} --verify"
run_cmd = f"python {mpas_src}/ensemble.py -rd {output_folder} -c {init_copy_folder} --verify_size {verify_runs} -s --verify"
os.system(run_cmd)
18 changes: 15 additions & 3 deletions MPAS_true_failure_testing/test_params.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,20 @@
{
"var_name" : "config_coef_3rd_order",
"namelist_preface": "nhyd_model",
"neg_test_orders" : [-3],
"pos_test_orders" : [-3]
"neg_test_orders" : [0, -1, -2, -3],
"pos_test_orders" : [0.477, 0, -1, -2, -3]
},
{
"var_name" : "config_epssm",
"namelist_preface": "nhyd_model",
"neg_test_orders" : [0, -1, -2, -3],
"pos_test_orders" : [0.477, 0, -1, -2, -3]
},
{
"var_name" : "config_zd",
"namelist_preface": "damping",
"neg_test_orders" : [0, -1, -2, -3],
"pos_test_orders" : [0, -1, -2, -3]
}
],
"file_paths" : {
Expand All @@ -14,5 +26,5 @@
"init_copy_dir": "/glade/scratch/teopb/mpas_test_mod_dirs",
"test_output_dir": "/glade/scratch/teopb/mpas_test_run_dirs"
},
"verify_runs": 3
"verify_runs": 30
}

0 comments on commit cfcc847

Please sign in to comment.