<h1>Comparison WERA and ADCP radial velocities September 2013<aclass="headerlink"href="#comparison-wera-and-adcp-radial-velocities-september-2013"title="Permalink to this headline">¶</a></h1>
<p>Matlab script used to do the analysis is <strong>RadialVeloCompa_Sept2013_HFR_ADCP_WERA_ADCPcorrected_v2.m</strong></p>
<p>Steps of the algorithm:</p>
<p>1- we choose a site to analyze, either PAO (site 1) or PAB (site 2)</p>
<p>2- we load the bathymetry and the HFR sites’coordinates</p>
<p>3- we specify if we use the “old” or “new” calibrations. Usually “New”.</p>
<p>4- we load IML-4 ADCP data (2013) and gps data</p>
<p>5- we make a list of all the HFR files available for the site of interest.</p>
<p>6- we analyze the ADCP data (bin 2 only to get near-surface data):</p>
<blockquote>
<div><p>We look for the indices of the ADCP time vector corresponding to the time period of interest (here 01 to 30 September 2013).</p>
<p>For each index, we look for the ADCP position (xadcp,yadcp)(via the gps coordinates).</p>
<p>We then look for the positions 15min before and 15min after.</p>
<p>We estimate the mean drift of the ADCP within these 30 minutes (Umean_adcp_u, Umean_adcp_v and U_mean_adcp (total)).</p>
<p>We find the radial orientation at the ADCP position given by xadcp,yadcp: azimuth in degrees from HFR site to adcp position</p>
<p>We project U_mean_adcp onto the radial direction to get the radial current components (ur_adcp_proj, vr_adcp_proj).</p>
<p>We store all the meaningful parameters into a structure named adcp.</p>
</div></blockquote>
<p>7- We analyze the HFR data:</p>
<blockquote>
<div><p>We look for the indices of the HFR time vector corresponding to the time period of interest (here 01 to 30 September 2013)</p>
<p>For each index, we load the corresponding HFR file (i.e. 20132440000_pao.mat). Each file contains a grid (X,Y) with radial currents at each grid point (Ur), a corresponding time vector (t) and the angle and distance from the site (theta,r).</p>
<pclass="caption">Hourly radial currents from ADCP bin 2 and HFR WERA at PAO - September 2013</p>
<divclass="legend">
Superimposed are the 48-h averages</div>
</div>
<p>[[Fichier:gridwithnan_adcp.png]]</p>
<blockquote>
<div><p>We find the HFR Radial velocity at this position and project it onto zonal and meridional components.</p>
<p>We store all the meaningful parameters into a structure named radar.</p>
</div></blockquote>
<p>This analysis allows us to compare radial velocity components from each HFR site with the ADCP components.</p>
</div>
<divclass="section"id="hfr-direction">
<h1>HFR direction<aclass="headerlink"href="#hfr-direction"title="Permalink to this headline">¶</a></h1>
<p>To verify that the HFR looks in the right direction:</p>
<p>For each time step of the time period of interest, we compute the distance from the HFR site to each grid point. We select the grid points that are at the same range from the HFR site than the grid point closest to the ADCP.</p>
<p>[[Fichier:rangeADCP.png]]</p>
<p>For each of these grid point (in cyan in the figure), we compute the azimuth the the site coordinates and we extract the radial velocity (total) and its components (zonal and meridional).</p>
<p>We store all the meaningful parameters into a structure named range.</p>
<p>Results from the whole analysis are stored, for example, under:
<p>[[Fichier:CompsNewCalib_RadialVelo_ADCP_PAO_Sept2013.png|200px|thumb|left|Comparison of radial velocities from ADCP bin 2 and HFR WERA at PAO site September 2013]]</p>
<p>[[Fichier:orientationPAOSept2013.png|200px|thumb|left|RMS diff and correlation from radial velocities compared betwen ADCP bin 2 and HFR WERA at PAO site September 2013]]</p>
<p>[[Fichier:ADCPbin2vsPAOSept2013.png|200px|thumb|left|radial velocities from ADCP bin 2 vs HFR WERA at PAO site September 2013 - in red: 48h averages]]]]</p>
</div>
</div>
</div>
</div>
<divclass="sphinxsidebar">
<divclass="sphinxsidebarwrapper">
<h3><ahref="index.html">Table Of Contents</a></h3>
<ul>
<li><aclass="reference internal"href="#">Comparison WERA and ADCP radial velocities September 2013</a></li>
<h1>Current combination and OGSL data feed<aclass="headerlink"href="#current-combination-and-ogsl-data-feed"title="Permalink to this headline">¶</a></h1>
<p>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 <aclass="reference external"href="mailto:wera%40132.215.11.14">wera<span>@</span>132<span>.</span>215<span>.</span>11<span>.</span>14</a>) and the resulting hourly currents are exported to .csv files to be displayed on he OGSL website (<aclass="reference external"href="http://ogsl.ca/observations/">http://ogsl.ca/observations/</a>).</p>
<p>All the matlab scripts are located in ~/projets/hfr_data_processing/hfr_processing.</p>
<p>A crontab runs the analysis (crontab).</p>
<p>The processing runs as follows:</p>
<p>‘’‘1- download the last available data at WERA sites’‘’ (radial currents - ascii format)</p>
<p>For PAO, data is available at HH+00 and HH+30</p>
<p>For PAB, data is available at HH+15 et HH+45</p>
<p>1- Download the last available data at each WERA sites (radial currents - ascii format)</p>
<blockquote>
<div><p>For PAO, data is available at HH+00 and HH+30.</p>
<p>For PAB, data is available at HH+15 et HH+45.</p>
<p>Every 10 min the crontab tries to download data via a shell script:</p>
<p>The data is located in: /home/wera/codar_wera_ogsl/archives/data</p>
<p>‘’‘3-‘’’ at H+55min the crontab runs to ‘’‘combine currents for the last hour’‘’ via a shell script:</p>
<blockquote>
<div>The data is located in: /home/wera/codar_wera_ogsl/archives/data</div></blockquote>
<p>3- at H+55min the crontab runs to combine currents for the last hour via a shell script:</p>
<p>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</p>
<p>2- unzip .gz files</p>
<p>3- convert .ruv to .mat format (ruv2mat)</p>
<p>4- convert ascii to .mat format (ascii2mat)</p>
<p>5- generate (combine) total currents (rad2tot)</p>
<blockquote>
<div><olclass="loweralpha simple">
<li>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</li>
<li>unzip .gz files</li>
<li>convert .ruv to .mat format (<strong>ruv2mat.m</strong>)</li>
<li>convert ascii to .mat format (<strong>ascii2mat.m</strong>)</li>
<li>generate (combine) total currents (<strong>rad2tot.m</strong>)</li>
</ol>
</div></blockquote>
<p>At this stage a .mat file is generated (i.e. HFR_LSLE_20150817T170000Z.mat) for each hour.</p>
<p>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.</p>
<p>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)</p>
<blockquote>
<div><olclass="loweralpha simple"start="6">
<li>the routine <strong>currentsHfrWithAverageExport.m</strong> computes the 25-hour current average and exports the hourly currents into a .csv file to be displayed on the OGSL website.</li>
<li>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)</li>
</ol>
</div></blockquote>
</div>
...
...
@@ -87,11 +101,11 @@ The processing is conducted on the WERA server (ssh <a class="reference external
Matlab script used to do the analysis is **RadialVeloCompa_Sept2013_HFR_ADCP_WERA_ADCPcorrected_v2.m**
Steps of the algorithm:
1- we choose a site to analyze, either PAO (site 1) or PAB (site 2)
2- we load the bathymetry and the HFR sites'coordinates
3- we specify if we use the "old" or "new" calibrations. Usually "New".
4- we load IML-4 ADCP data (2013) and gps data
5- we make a list of all the HFR files available for the site of interest.
6- we analyze the ADCP data (bin 2 only to get near-surface data):
We look for the indices of the ADCP time vector corresponding to the time period of interest (here 01 to 30 September 2013).
For each index, we look for the ADCP position (xadcp,yadcp)(via the gps coordinates).
We then look for the positions 15min before and 15min after.
We estimate the mean drift of the ADCP within these 30 minutes (Umean_adcp_u, Umean_adcp_v and U_mean_adcp (total)).
We find the radial orientation at the ADCP position given by xadcp,yadcp: azimuth in degrees from HFR site to adcp position
We project U_mean_adcp onto the radial direction to get the radial current components (ur_adcp_proj, vr_adcp_proj).
We store all the meaningful parameters into a structure named adcp.
7- We analyze the HFR data:
We look for the indices of the HFR time vector corresponding to the time period of interest (here 01 to 30 September 2013)
For each index, we load the corresponding HFR file (i.e. 20132440000_pao.mat). Each file contains a grid (X,Y) with radial currents at each grid point (Ur), a corresponding time vector (t) and the angle and distance from the site (theta,r).
We then look for the HFR grid point nearest the ADCP position at the time of interest.
[[Fichier:gridwithnan_adcp.png]]
We find the HFR Radial velocity at this position and project it onto zonal and meridional components.
We store all the meaningful parameters into a structure named radar.
This analysis allows us to compare radial velocity components from each HFR site with the ADCP components.
HFR direction
===============
To verify that the HFR looks in the right direction:
For each time step of the time period of interest, we compute the distance from the HFR site to each grid point. We select the grid points that are at the same range from the HFR site than the grid point closest to the ADCP.
[[Fichier:rangeADCP.png]]
For each of these grid point (in cyan in the figure), we compute the azimuth the the site coordinates and we extract the radial velocity (total) and its components (zonal and meridional).
We store all the meaningful parameters into a structure named range.
Results from the whole analysis are stored, for example, under:
[[Fichier:CompsNewCalib_RadialVelo_ADCP_PAO_Sept2013.png|200px|thumb|left|Comparison of radial velocities from ADCP bin 2 and HFR WERA at PAO site September 2013]]
[[Fichier:orientationPAOSept2013.png|200px|thumb|left|RMS diff and correlation from radial velocities compared betwen ADCP bin 2 and HFR WERA at PAO site September 2013]]
[[Fichier:ADCPbin2vsPAOSept2013.png|200px|thumb|left|radial velocities from ADCP bin 2 vs HFR WERA at PAO site September 2013 - in red: 48h averages]]]]
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)
<liclass="toctree-l1"><aclass="reference internal"href="Comparison_WERA-ADCP_Sept2013.html">Comparison WERA and ADCP radial velocities September 2013</a></li>
Search.setIndex({envversion:42,terms:{all:[10,2],identifi:5,spectratoprocess:10,move:[10,2],lst:5,do_process_sort_pol:5,marion:[],estuari:6,follow:[10,2],disk:10,find:[0,5],paramet:10,cell:[],onli:10,postprocess:[],locat:2,hfr_lsle_20150817t170000z:2,radial2uv:10,css_:10,pab:2,dispers:0,instrument:6,theme:[],matlab:2,radialconfig:10,everi:[5,2],lsle:[8,5,6],main:0,local:10,approxim:2,lawrenc:6,patt_pap1_2014_01_14_1154_nosmooth:10,unzip:2,march:10,variou:6,get:10,than:5,conduct:[0,8,2],"export":2,dai:[10,5],projet:2,volum:10,ssh:[5,2],adcp:0,radiallst2uv:5,tri:2,measur:10,csv:2,ascii2mat:2,hour:[5,2],organ:0,hfrdata:2,hfrmat:2,should:5,spectraprocess:10,server:[10,2],measpattern:10,diagram:10,yyyyjjj:5,each:[5,2,6],output:[0,5],reprocess_ogsl_hfr_treat:2,page:0,xlp:10,www:2,transform:10,codarprocess:[],ftp_transfer:5,direct:10,crontab:2,past:10,sure:10,sampl:6,result:[5,2],year:5,download:[5,2],home:[5,2],"55min":2,webserv:2,index:[],what:[10,2],total:2,miss:10,section:0,per:5,research:[],categori:[],hourli:2,between:0,content:10,element:[],run:[10,2],codar2:10,codar1:10,advanc:10,spot:6,gener:[5,2],radial:2,htdoc:2,water:6,step:0,extent:5,found:5,org:5,come:10,rfi:5,care:10,comparison:0,convert:[5,2],last:2,ogsl_hfr_treat:2,row:[],codar_wera_ogsl:2,forecast:0,grid:2,idealpattern:10,filter:10,april:5,srv:2,span:[],improv:0,chang:10,origin:10,routin:2,via:2,pap1_css_:10,onc:10,modul:[],automat:10,system:[5,2],header:10,weather:[],drogu:6,txt:10,open:10,stf:[10,2],simpler:5,avail:2,from:[5,2,10],log:2,coupl:0,script:[5,2],transfer:10,loggin:10,currentshfrwithaverageexport:2,add:10,been:10,websit:2,start:10,much:5,music:10,interest:10,julian:5,spectraseri:10,stage:2,rad2tot:2,store:10,more:0,sort:5,download_wera_rt:2,setup:10,shell:[5,2],travail:2,saint:6,delet:10,copi:[10,2],search:[],back:10,flag:10,part:0,modifi:[],togeth:2,line:10,folder:[10,5],had:6,info:0,codardata:10,save:10,retriev:10,sometim:10,currentscombin:[],provid:2,remov:10,work:[0,2],smooth:10,displai:2,project:0,column:6,below:0,can:10,were:6,crad_pol_lst:5,about:0,minut:2,radialconfigs_pap1_20130201_bapm_music402002_nosmooth:10,observ:2,loop:10,deg:10,hfr:[0,2],comput:2,file:[5,2,10],creat:10,desktop:10,hfr_data_process:2,site:[0,5,2,10],subfold:5,heur:5,ruv2mat:2,archiv:[10,2],"20d":10,have:10,field:0,need:10,ismer:0,doe:[10,2],pap1:10,check:[],download_codar_rt:2,fill:10,uncheck:10,"_ascii":5,date:5,thei:5,antenna:10,min:2,check_up:[],ascii:2,make:10,format:2,dyndn:5,also:10,ideal:10,other:0,option:[],uqar:[0,10],verifi:5,you:[0,10],trash:10,config:10,pao:[5,2],pap:[10,2],ruv:[10,2],relat:0,http:2,mat:[5,2,10],after:10,drift:0,rsync:5,seasond:10,marin:0,befor:10,meopar:0,attent:10,deploi:6,phase:10,radialconfigs_pap1_20130201_bapm_music402002_20dsmooth:10,contain:[],data:[],model:0,averag:2,lower:6,appropri:10,kept:2,hfr_process:2,directori:2,spectra:10,season:[],buoi:[0,6],depth:6,exampl:[10,5],matfil:2,thi:[0,2,6],cs4:10,everyth:10,bodi:[],bandet:[],order:6,weraprocess:[]},objtypes:{},objnames:{},filenames:["index","20130826","CurrentsCombination","20130830","20130515","WERAprocessing","20140506","OGSL","experiments","postprocessing","CODARprocessing"],titles:["Welcome to the documentation of High Frequency Radars (CODAR and WERA)","Experiment on August 26, 2013","Current combination","Experiment on August 20, 2013","Experiment on May 15, 2013","WERA POST=PROCESSING","Experiment on May 06, 2014","OGSL quasi-realtime data feed","<no title>","CODAR processing","CODAR radial currents processing"],objects:{},titleterms:{feed:[9,7],process:[10,5,9],indic:[],high:0,radar:0,tabl:[],check:10,mai:[4,6],welcom:0,current:[10,2],quasi:7,postprocess:0,document:0,codar:[0,9,10],analysi:[],august:[1,3],radial:10,ogsl:[9,7],documentation_hfr_analysi:[],post:5,data:[9,7],experi:[0,1,4,6,3],realtim:7,list:[],wera:[0,5,9],combin:2,frequenc:0}})