Current combination and OGSL data feedΒΆ

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/).

All the matlab scripts are located in ~/projets/hfr_data_processing/hfr_processing.

A crontab runs the analysis (crontab).

The processing runs as follows:

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 PAB, data is available at HH+15 et HH+45.

Every 10 min the crontab tries to download data via a shell script:

5,15,25,35,45,50 * * * * /home/wera/projets/hfr-data-processing/hfr_process/download_wera_rt.sh

The data is located in: /home/wera/codar_wera_ogsl/archives/data

2- Download the last available data at each CODAR sites (.ruv)

For PAP and STF, data is available at HH+00

Every 5 minutes, the crontab tries to download data via a shell script:

0,5,10,15,20,25,30,35,40,45,50,55 * * * * /home/wera/projets/hfr-data-processing/hfr_process/download_codar_rt.sh

The data is located in: /home/wera/codar_wera_ogsl/archives/data

3- at H+55min the crontab runs to combine currents for the last hour via a shell script:

55 * * * * /home/wera/projets/hfr-data-processing/hfr_process/ogsl_hfr_treatment.sh

What does the shell do?

  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
  2. unzip .gz files
  3. convert .ruv to .mat format (ruv2mat.m)
  4. convert ascii to .mat format (ascii2mat.m)
  5. generate (combine) total currents (rad2tot.m)

At this stage a .mat file is generated (i.e. HFR_LSLE_20150817T170000Z.mat) for each hour.

  1. 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.
  2. 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)

Previous topic

Comparison WERA and ADCP radial velocities September 2013

Next topic

Experiment on May 15, 2013

This Page