From cfcc8477c55e454fed1e2d9f8fc3a6322450fb5a Mon Sep 17 00:00:00 2001 From: teopb Date: Fri, 21 Jul 2023 15:18:31 -0600 Subject: [PATCH] post bug fix, ready for job submission --- MPAS_true_failure_testing/pre_run_script.py | 16 ++++------------ MPAS_true_failure_testing/test_params.json | 18 +++++++++++++++--- 2 files changed, 19 insertions(+), 15 deletions(-) diff --git a/MPAS_true_failure_testing/pre_run_script.py b/MPAS_true_failure_testing/pre_run_script.py index 226a9a4..f38d21d 100644 --- a/MPAS_true_failure_testing/pre_run_script.py +++ b/MPAS_true_failure_testing/pre_run_script.py @@ -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) @@ -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) @@ -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) \ No newline at end of file diff --git a/MPAS_true_failure_testing/test_params.json b/MPAS_true_failure_testing/test_params.json index 9774af1..5ab8485 100644 --- a/MPAS_true_failure_testing/test_params.json +++ b/MPAS_true_failure_testing/test_params.json @@ -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" : { @@ -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 } \ No newline at end of file