Skip to content

Commit

Permalink
Rnr quickfix (#474)
Browse files Browse the repository at this point in the history
I found and fixed two additional issues preventing RnR from completing successfully. These, just like the last fixes I created a PR for a few days ago (#473), must have been hard-coded in place on TI resources when developing and were never added back to the committed code-base.

-----------------

* Fixes regex matching bug

* Fixes a few more issues preventing rnr's success
  • Loading branch information
shawncrawley authored Jun 16, 2023
1 parent c85559f commit 533b816
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def setup_huc_inundation(event):
# and invoke a retry
viz_db.check_required_tables_updated(sql_path, sql_replace, reference_time, raise_if_false=True)

sql = open(sql_path, 'r').read().lower()
sql = open(sql_path, 'r').read()

setup_db_table(target_table, reference_time, viz_db, process_db, sql_replace)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,7 @@ def from_s3_file(cls, s3_file):
configuration_name = 'replace_route'
date = matches[1]
hour = matches[2]
reference_time = datetime.datetime.strptime(f"{date[:4]}-{date[-4:][:2]}-{date[-2:]} {hour[-2:]}:00:00", '%Y-%m-%d %H:%M:%S')
else:
if 'analysis_assim' in filename:
matches = re.findall(r"(.*)/nwm.(\d{8})/(.*)/nwm.t(\d{2})z\.(.*)\..*\.tm(.*)\.(.*)\.nc", filename)[0]
Expand Down

0 comments on commit 533b816

Please sign in to comment.