Commit 20161c70 authored by Renzo Marini's avatar Renzo Marini

fix bug filtro_Uruguay

parent c70eee5b
......@@ -10,7 +10,7 @@ import metadata
def download_shn(tmp_path, date):
destination_dir = tmp_path + "/" + datetime.strftime(date, '%Y%m%d') + "/"
destination_dir = tmp_path + "/" + datetime.strftime(date, '%Y%m%d')
if destination_dir and not os.path.exists(destination_dir):
os.makedirs(destination_dir)
......
......@@ -138,7 +138,7 @@ function []=filtro_Uruguay(output_path, date)
%%
% %Descargados de la web ANP. {'Fecha' 'Hora' 'Nivel de Bater�a (Med)V' 'Nivel de Bater�a (Max)V' 'Nivel de Bater�a (Min)V' 'Nivel de Bater�a (Alarma)V' 'Nivel de Agua (Med)m' 'Nivel de Agua (Max)m' 'Nivel de Agua (Min)m' 'Nivel de Agua (Alarma)m'}
S=dir('Isla*.csv');
FILES=dir('La*.csv');
file_name=FILES.name;
fileID = fopen(file_name)
......@@ -392,4 +392,4 @@ S=dir('Isla*.csv');
save(strcat(output_path, "/", date,'MVD.mat'),'MVD','fecha')
end
\ No newline at end of file
end
......@@ -13,10 +13,12 @@ def download_all(args):
min_date = min(dates)
max_date = datetime.today()
cur_date = min_date
while (cur_date != max_date):
while (cur_date <= max_date):
if (cur_date not in dates):
print(cur_date)
args["date"] = cur_date
if (args["source"] == "shn" and args["only_download"]):
print(args["source"] + str(args["only_download"]))
for day in range(0, 6):
args["date"] = cur_date - timedelta(days=day)
download_and_process(args)
......@@ -26,4 +28,4 @@ def download_all(args):
if __name__ == "__main__":
args = parse_arguments()
download_all(args)
\ No newline at end of file
download_all(args)
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