Radial currents from WERA and CODAR systems are combined together on a grid to provide total currents approximately every hour.
The processing is conducted on the WERA server (ssh wera@132.215.11.14) and the resulting hourly currents are exported to .csv files to be displayed on he OGSL website (http://ogsl.ca/observations/).
...
...
@@ -10,49 +10,50 @@ A crontab runs the analysis (crontab).
The processing runs as follows:
'''1- download the last available data at WERA sites''' (radial currents - ascii format)
1- Download the last available data at each WERA sites (radial currents - ascii format)
For PAO, data is available at HH+00 and HH+30
For PAO, data is available at HH+00 and HH+30.
For PAB, data is available at HH+15 et HH+45
For PAB, data is available at HH+15 et HH+45.
Every 10 min the crontab tries to download data via a shell script:
Every 10 min the crontab tries to download data via a shell script:
1- copy the .ruv and ascii files located in /home/wera/codar_wera_ogsl/archives/data in the working directory /home/wera/codar_wera_ogsl/travail
a) copy the .ruv and ascii files located in /home/wera/codar_wera_ogsl/archives/data in the working directory /home/wera/codar_wera_ogsl/travail
2- unzip .gz files
b) unzip .gz files
3- convert .ruv to .mat format (ruv2mat)
c) convert .ruv to .mat format (**ruv2mat.m**)
4- convert ascii to .mat format (ascii2mat)
d) convert ascii to .mat format (**ascii2mat.m**)
5- generate (combine) total currents (rad2tot)
e) generate (combine) total currents (**rad2tot.m**)
At this stage a .mat file is generated (i.e. HFR_LSLE_20150817T170000Z.mat) for each hour.
6- the routine currentsHfrWithAverageExport.m computes the 25-hour current average and exports the hourly currents into a .csv file to be displayed on the OGSL website.
f) the routine **currentsHfrWithAverageExport.m** computes the 25-hour current average and exports the hourly currents into a .csv file to be displayed on the OGSL website.
7- the .csv files are moved to the webserver (/srv/www/htdocs/wera/hfrdata) and the .mat are moved in archives (/home/wera/codar_wera_ogsl/archives/matfiles and /srv/www/htdocs/wera/hfrmat) and logs are kept in /home/wera/codar_wera_ogsl/logs (download_codar_rt.log, download_wera_rt.log, ogsl_hfr_treatment.log, reprocess_ogsl_hfr_treatment.log)
g) the .csv files are moved to the webserver (/srv/www/htdocs/wera/hfrdata) and the .mat are moved in archives (/home/wera/codar_wera_ogsl/archives/matfiles and /srv/www/htdocs/wera/hfrmat) and logs are kept in /home/wera/codar_wera_ogsl/logs (download_codar_rt.log, download_wera_rt.log, ogsl_hfr_treatment.log, reprocess_ogsl_hfr_treatment.log)