import logging import numpy as np if __name__ == "__main__": print("Transform tide data to SIROCCO format") logging.basicConfig(format='[%(levelname)s] %(message)s',level=logging.INFO) outDir="/tmp/" ## AJACCIO_ASPRETTO Données REFMAR reader = RefmarReader('/home/retf/work/fieldsites/med-cruesim/observations/sea-level/raw-data/REFMAR/Ajaccio_aspretto.txt') serie = TimeSerie(reader,'H','2010-01-01','2016-01-01'); serie.name_station = "AJACCIO_ASPRETTO" serie.data_source = "SHOM / OCA / Marine nationale" serie.vertical_datum = "zero_hydrographique" serie.x_coord="8.76284981" serie.y_coord="41.92279816" logging.info(str(serie.name_station)) writer = SiroccoWriter(outDir+str(serie.name_station)+'_tide_'+str(serie.time_range[0].strftime("%Y"))+'_to_'+str(serie.time_range[serie.time_range.size-1].strftime("%Y"))+'.dat'); writer.write_tide(serie) print 'End of programm'
print ("Transform waves data to SIROCCO format") logging.basicConfig(format="[%(levelname)s] %(message)s", level=logging.INFO) outDir = "/tmp/" # # Data from Puertos # sourceDirPuertos = "/home/retf/work/fieldsites/med-cruesim/observations/waves/raw-data/PUERTOS/" ## CaboBegur reader = PuertosOceanReader(sourceDirPuertos + "REDEXT_T_HIS_CaboBegur.dat") serie = TimeSerie(reader, "H", "2010-01-01", "2016-01-01") serie.name_station = "CABO-BEGUR" serie.data_source = "Puertos del Estado" serie.meta_data = "Burst = 26 min" serie.x_coord = "3.65" serie.y_coord = "41.92" logging.info(str(serie.name_station)) writer = SiroccoWriter( outDir + str(serie.name_station) + "_wave_" + str(serie.time_range[0].strftime("%Y")) + "_to_" + str(serie.time_range[serie.time_range.size - 1].strftime("%Y")) + ".dat" ) writer.write_waves(serie)