Skip to content

Commit

Permalink
ok that might fix it
Browse files Browse the repository at this point in the history
  • Loading branch information
doutriaux1 committed May 9, 2018
1 parent a916a27 commit 8cf2918
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
6 changes: 3 additions & 3 deletions run_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
root = os.getcwd()
cpus = multiprocessing.cpu_count()

parser = argparse.ArgumentParser(description="Run VCS tests",
parser = argparse.ArgumentParser(description="Run PMP tests",
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
parser.add_argument("-H", "--html", action="store_true",
help="create and show html result page")
Expand Down Expand Up @@ -233,7 +233,7 @@ def run_nose(test_name):

fi = open("index.html", "w")
print("<!DOCTYPE html>", file=fi)
print("""<html><head><title>VCS Test Results %s</title>
print("""<html><head><title>PMP Test Results %s</title>
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.13/css/jquery.dataTables.css">
<script type="text/javascript" src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script type="text/javascript" charset="utf8"
Expand All @@ -247,7 +247,7 @@ def run_nose(test_name):
} );
</script>
</head>""" % time.asctime(), file=fi)
print("<body><h1>VCS Test results: %s</h1>" % time.asctime(), file=fi)
print("<body><h1>PMP Test results: %s</h1>" % time.asctime(), file=fi)
print("<table id='table_id' class='display'>", file=fi)
print("<thead><tr><th>Test</th><th>Result</th><th>Start Time</th><th>End Time</th><th>Time</th></tr></thead>", file=fi)
print("<tfoot><tr><th>Test</th><th>Result</th><th>Start Time</th><th>End Time</th><th>Time</th></tr></tfoot>", file=fi)
Expand Down
1 change: 1 addition & 0 deletions src/python/pcmdi/scripts/driver/outputmetrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def __init__(self, parameter, var_name_long, obs_dict, sftlf):
self.metrics_def_dictionary = {}
self.metrics_dictionary = {}

print("ok:",self.parameter.output_json_template)
self.out_file = Base(self.parameter.metrics_output_path, self.parameter.output_json_template)

self.regrid_method = ''
Expand Down
2 changes: 2 additions & 0 deletions src/python/pcmdi/scripts/driver/pmp_parameter.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ def __init__(self):
self.metrics_output_path = ''
self.filename_output_template = ''
self.dry_run = False
self.user_notes = None
self.output_json_template = "%(variable)%(level)_%(target_grid_name)_%(regrid_tool)_%(regrid_method)_metrics"

def check_str(self, str_var, str_var_name):
if type(str_var) is not str:
Expand Down
7 changes: 1 addition & 6 deletions src/python/pcmdi/scripts/pcmdi_metrics_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,6 @@ def determine_obs_or_model(self, is_obs, ref_or_test, data_path):
'--regions',
type=ast.literal_eval,
dest='regions',
default={},
help='Regions on which to run the metrics',
required=False)

Expand All @@ -235,7 +234,6 @@ def determine_obs_or_model(self, is_obs, ref_or_test, data_path):
type=ast.literal_eval,
dest='regions_values',
help='Users can customize regions values names',
default={},
required=False)

parser.add_argument(
Expand Down Expand Up @@ -379,23 +377,20 @@ def determine_obs_or_model(self, is_obs, ref_or_test, data_path):
dest='test_clims_interpolated_output',
help='Directory of where to put the interpolated ' +
'test climatologies',
default="",
required=False)

parser.add_argument(
'--output_json_template',
default="%(variable)%(level)_%(target_grid_name)_%(regrid_tool)_%(regrid_method)_metrics",
help='Filename template for results json files',
required=False)

parser.add_argument(
'--user_notes',
dest='user_notes',
default=None,
help='Provide a short description to help identify this run of the PMP mean climate.',
required=False)

parameter = parser.get_parameter() # cmd_default_vars=False)
parameter = parser.get_parameter(cmd_default_vars=False)

driver = PMPDriver(parameter)
driver.run_diags()

0 comments on commit 8cf2918

Please sign in to comment.