Skip to content

Commit

Permalink
Merge pull request #201 from bertinia/master
Browse files Browse the repository at this point in the history
add check for trailing "/" in XML variables
  • Loading branch information
bertinia authored Apr 25, 2019
2 parents d1d9aae + 239d446 commit 25009bf
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
5 changes: 3 additions & 2 deletions diag_utils/diag_utils/diagUtilsLib.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,11 +200,12 @@ def checkHistoryFiles(tseries, dout_s_root, case, rstart_year, rstop_year, comp,
"""
if tseries.upper() in ['T','TRUE'] :
htype = 'series'
## in_dir = '{0}/{1}/proc/tseries/month_1'.format(dout_s_root, comp)
else :
htype = 'slice'
## in_dir = '{0}/{1}/hist'.format(dout_s_root, comp)

# make sure subdir does not include a trailing "/"
if subdir.endswith('/'):
subdir = subdir[:-1]
in_dir = '{0}/{1}/{2}'.format(dout_s_root, comp, subdir)

# check the in_dir directory exists
Expand Down
6 changes: 6 additions & 0 deletions diagnostics/diagnostics/atm/atm_avg_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,12 @@ def initialize_envDict(envDict, caseroot, debugMsg, standalone):
if envDict['plot_SON_climo']:
envDict['seas'].append('SON')

if envDict['test_path_history_subdir'].endswith('/'):
envDict['test_path_history_subdir'] = envDict['test_path_history_subdir'][:-1]

if envDict['cntl_path_history_subdir'].endswith('/'):
envDict['cntl_path_history_subdir'] = envDict['cntl_path_history_subdir'][:-1]

return envDict

#======
Expand Down
2 changes: 1 addition & 1 deletion diagnostics/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
jinja2==2.7.3
jinja2>=2.10
numpy>=1.8.1
ilamb>=2.1

0 comments on commit 25009bf

Please sign in to comment.