Commit aafe9dff authored by Renzo Marini's avatar Renzo Marini

Merge branch 'master' of gitlab.fing.edu.uy:renzo.marini/automatizacion-de-bajadas

parents a9cba39e 51b4f609
......@@ -2,7 +2,6 @@ import subprocess
import datetime
import os
import metadata
......@@ -10,9 +9,8 @@ def run_model(source):
if source == "hycom":
os.chdir(metadata.telemac_dir)
for filename in os.listdir(metadata.hycom["output_path"]):
date = filename[:8]
try:
datetime.strptime(date, '%Y%m%d')
date = filename[:8]
if not [dir for dir in os.listdir(metadata.telemac_dir + "/RESULTS") if dir[7:15] == date and "HYCOM_" in dir]:
log_dir = metadata.logs_path + "/" + date + "/models"
if not os.path.exists(log_dir):
......@@ -24,4 +22,4 @@ def run_model(source):
pass # file is not valid
if __name__ == "__main__":
run_model("hycom")
\ No newline at end of file
run_model("hycom")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment