Skip to content

Commit

Permalink
Merge pull request #13 from tkach940/filename_bug_fix
Browse files Browse the repository at this point in the history
Filename Bug Fix
  • Loading branch information
Heather Cronk authored Jun 9, 2021
2 parents 0481ff9 + d5079db commit 757ed99
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions oco2_modis_vistool.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,8 @@ def _process_overlay_dict(input_dict):
print("Exiting")
sys.exit()

ovr_d['version_number'] = re.sub(
"[A-Za-z_]", "", re.search("_B[0-9a-z]{0,6}_",os.path.basename(ovr_d['var_file'])).group())
ovr_d['version_number'] = re.sub("[A-Za-z_]", "",
re.search("_B[0-9A-Za-z]{0,8}_", os.path.basename(ovr_d['var_file'])).group())

if int(ovr_d['version_number']) < 9000:
try:
Expand Down Expand Up @@ -380,7 +380,7 @@ def _process_overlay_dict(input_dict):
#sys.exit()

ovr_d['version_file_tag'] = re.search(
"_B[0-9a-z]{0,6}_", os.path.basename(ovr_d['var_file'])).group()[:-1]
"_B[0-9A-Za-z]{0,8}_", os.path.basename(ovr_d['var_file'])).group()[:-1]

if ovr_d['sif_or_co2'] == "CO2":
if ovr_d['warn']:
Expand Down
2 changes: 1 addition & 1 deletion oco2_modis_vistool_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@
"out_plot_name": "",
"out_data_dir": "",
"out_data_name": ""
}
}

0 comments on commit 757ed99

Please sign in to comment.