calibration.rst 9.64 KB
Newer Older
Marion Bandet's avatar
Marion Bandet committed
1 2 3 4 5 6 7 8 9 10 11 12
**************
Calibrations
**************

######
CODAR
######


**POINTE-AU-PERE:** 
***********************

Marion Bandet's avatar
Marion Bandet committed
13
Please see notes from field work on `2013-02-01`_.
Marion Bandet's avatar
Marion Bandet committed
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62

.. _2013-02-01: http://demeter.uqar.ca/submesoscale/index.php/Pap

Starting 2013-02-01: **Change of frequency** due to a misreading in the frequency permits... 

      
   * Up to 2013-02-01 19:50 UTC use the "old" antenna diagram to do the calibration
   * From 2013-02-01 19:50 UTC use the "new" antenna diagram 


We reprocessed all data from CODAR PAP **starting 2012-12-13** date at which the site was operational.
   

.. topic:: from 2012-12-13 to 2013-02-01 19:50 UTC
   
        RadialConfigs_PAP1_20121213_WAPM_MUSIC402002_5Dsmooth
        

Steps to generate new RadialConfigs files:

   * Copy all content of the directory in **RadialConfigs**
   * run SeaSondeRadialSetUp
   * change output: metrics, processing check MUSIC 40 20 02, no smoothing, filtered


To generate the new Antenna diagram:

   * cd Data/Loops/PATT_PAP1_2012_12_15...xlp
        ==> open .patt
        -  Walk APM up to 2013-02-01
        -  Boat APM until now


.. topic:: from 2013-02-01 19:50 UTC to now

        RadialConfigs_PAP1_20130201_BAPM_MUSIC402002_nosmooth
  


**SAINTE-FLAVIE**
*****************

.. topic:: from 2012-12-20 to 2013-02-06 12:00 UTC
      
          RadialConfigs_STF2_20121220_BAPM_MUSIC402002_nosmooth
       

.. topic:: from 2013-02-01 19:50 UTC to now
      
63
          RadialConfigs_STF2_20130206_BAPM_MUSIC402002_nosmooth
Marion Bandet's avatar
Marion Bandet committed
64 65 66 67 68 69
      

#####
WERA
#####

Marion Bandet's avatar
Marion Bandet committed
70 71 72 73 74 75 76 77 78 79 80 81
Go to the **"Submesoscale"** `wiki`_ and click on "useful links" under **Outils**, then "WERA HF Radar Software - Fortran Programs Documentation". Here we find which Fortran program we need to use to do what we want.

.. _wiki: http://demeter.uqar.ca/submesoscale/index.php/Accueil


.. topic:: Objectives

        We need to "remove wrong calibration data and apply new ones", so we need to use Modify_WERA_SORT.




82 83
1. Steps to generate new calibration phases
*********************************************
Marion Bandet's avatar
Marion Bandet committed
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100

  #. loggin to the wera server wera@132.215.11.14
  #. cd etc/

In this folder, we find the original calibration files: 
     - calibration_pab.wera
     - calibration_pao.wera

If we look at what the content of the calibration file:
     - cat calibration_pab.wera

the phase is given in the 3rd column.


On 2014-10-29 (PAO) and 2014_10-30 (PAB), calibrations were undertaken in the field.

Calibration data are stored in:
101 102 103
     - /run/media/bandma01/SeagateWireless/MEOPAR/DATA/HFRs/WERAs/PAB/2014303 every minute from 30-Oct-2014 16:53:20 to 30-Oct-2014 18:11:20
     - /run/media/bandma01/SeagateWireless/MEOPAR/DATA/HFRs/WERAs/PAO/2014302 every minute from 29-Oct-2014 17:48:54 to 29-Oct-2014 18:25:54

Marion Bandet's avatar
Marion Bandet committed
104 105 106 107
 
While the calibrations were running, tracks were recorded with an instrument belonging to Helzel (PAO and PAB) as well as with an instrument belonging to Flament (PAB). So for PAB we are going to be able to compare the two. 

The tracks can be found in :
108 109 110
     - /run/media/bandma01/SeagateWireless/MEOPAR/DATA/HFRs/WERAs/PAO/HelzelPAO_Track_29-OCT-14 183138.gpx
     - /run/media/bandma01/SeagateWireless/MEOPAR/DATA/HFRs/WERAs/PAB/HelzelPAB_Track_30-OCT-14 175446.gpx 
     - /run/media/bandma01/SeagateWireless/MEOPAR/DATA/HFRs/WERAs/PAB/FlamentPAB_Track_30-OCT-14 182008.gpx 
Marion Bandet's avatar
Marion Bandet committed
111 112

We use the routine **GPS_gpx2mat.m** to convert .gpx files into .mat files.
113

Marion Bandet's avatar
Marion Bandet committed
114
We use the routine **WERA_AntennaCoord_txt2mat.m** to transform the .txt files with antennas'coordinates to .mat files.
115

Marion Bandet's avatar
Marion Bandet committed
116 117 118 119 120 121
We use the routine **WERAphase_txt2mat.m** to convert the .txt files containing phases into .mat files.

The routine **WERAcalibration.m** is available at this `page`_.

.. _page: WERAcalibration.html

122 123 124 125 126 127 128 129
All the Matlab routines used for the data processing are located in **~/hfr-data-processing/calibrations/**.


Outputs of **WERAcalibration.m** for PAO site are available here: `calibrationPAO`_

.. _calibrationPAO: calibPAO.html

+---------------------------------------------+
130
|  PAO - Helzel- Phases in degrees            |
131 132 133 134 135
+-------------+-----------------+-------------+
| Antenna nb  | original phase  |  new phase  |
+=============+=================+=============+
|  1          |      0          |     0       |
+-------------+-----------------+-------------+
Marion Bandet's avatar
Marion Bandet committed
136
|  2          |     -0.6181     |    2.2270   |
137
+-------------+-----------------+-------------+
Marion Bandet's avatar
Marion Bandet committed
138
|  3          |     -19.9027    |   -20.8291  |
139
+-------------+-----------------+-------------+
Marion Bandet's avatar
Marion Bandet committed
140
|  4          |       1.2299    |     1.2548  |
141
+-------------+-----------------+-------------+
Marion Bandet's avatar
Marion Bandet committed
142
|  5          |     -21.2304    |   -15.9611  |
143
+-------------+-----------------+-------------+
Marion Bandet's avatar
Marion Bandet committed
144
|  6          |      10.7207    |    12.7500  |
145
+-------------+-----------------+-------------+
Marion Bandet's avatar
Marion Bandet committed
146
|  7          |      -5.2161    |     6.0602  |
147
+-------------+-----------------+-------------+
Marion Bandet's avatar
Marion Bandet committed
148
|  8          |      -14.8695   |   -14.5626  |
149
+-------------+-----------------+-------------+
Marion Bandet's avatar
Marion Bandet committed
150
|  9          |      -2.5658    |     1.1416  |
151
+-------------+-----------------+-------------+
Marion Bandet's avatar
Marion Bandet committed
152
|  10         |      -16.1023   |   -14.8303  |
153
+-------------+-----------------+-------------+
Marion Bandet's avatar
Marion Bandet committed
154
|  11         |      -6.7589    |   -10.0689  |
155
+-------------+-----------------+-------------+
Marion Bandet's avatar
Marion Bandet committed
156
|  12         |      -9.7778    |   -13.8845  |
157 158
+-------------+-----------------+-------------+

159
The new phase values were saved under **calibration_pao_29OCT2014.wera**.
160

161
 
162 163 164 165 166 167
Outputs of WERAcalibration.m for PAB site are available here: `calibrationPAB`_

.. _calibrationPAB: calibPAB.html


+---------------------------------------------+
168
|  PAB - Helzel - Phases in degrees           |
169 170 171 172 173
+-------------+-----------------+-------------+
| Antenna nb  | original phase  |  new phase  |
+=============+=================+=============+
|  1          |      0          |     0       |
+-------------+-----------------+-------------+
Marion Bandet's avatar
Marion Bandet committed
174
|  2          |     1.0514      |   -19.6031  |
175
+-------------+-----------------+-------------+
Marion Bandet's avatar
Marion Bandet committed
176
|  3          |     8.3719      |    77.3093  |
177
+-------------+-----------------+-------------+
Marion Bandet's avatar
Marion Bandet committed
178
|  4          |       2.0496    |    -2.8669  |
179
+-------------+-----------------+-------------+
Marion Bandet's avatar
Marion Bandet committed
180
|  5          |      13.5527    |    29.2102  |
181
+-------------+-----------------+-------------+
Marion Bandet's avatar
Marion Bandet committed
182
|  6          |      -3.0394    |    -1.9353  |
183
+-------------+-----------------+-------------+
Marion Bandet's avatar
Marion Bandet committed
184
|  7          |       0.9866    |   -30.6625  |
185
+-------------+-----------------+-------------+
Marion Bandet's avatar
Marion Bandet committed
186
|  8          |      -2.9561    |    -7.2423  |
187
+-------------+-----------------+-------------+
Marion Bandet's avatar
Marion Bandet committed
188
|  9          |      -1.5691    |   -28.9055  |
189
+-------------+-----------------+-------------+
Marion Bandet's avatar
Marion Bandet committed
190
|  10         |       -2.4549   |   -24.0200  |
191
+-------------+-----------------+-------------+
Marion Bandet's avatar
Marion Bandet committed
192
|  11         |       1.4106    |   -12.9370  |
193
+-------------+-----------------+-------------+
Marion Bandet's avatar
Marion Bandet committed
194
|  12         |      -2.7529    |    -7.4966  |
195 196
+-------------+-----------------+-------------+

197
The new phase values were saved under **calibration_pab_30OCT2014.wera**.
Marion Bandet's avatar
Marion Bandet committed
198 199 200 201




202
2. Re-processing of radial currents with new phases
Marion Bandet's avatar
Marion Bandet committed
203 204
***************************************************

205
For the all month of September 2013, we are going to generate new radial currents using the new calibration phases. 
Marion Bandet's avatar
Marion Bandet committed
206

207
Common steps for the post-processing of WERA radial currents is documented `here`_.
Marion Bandet's avatar
Marion Bandet committed
208 209 210 211

.. _here: WERAprocessing.html


212 213 214 215 216 217 218 219 220 221
For example, let us see what we have to do to generate new radial currents at PAO using the new calibration phases for september 1st, 2013 (Julian day 244):

   - loggin to the wera server

   - go to the folder containing the data:

        . cd  ~/data1/PAO/2013244/
        . the raw currents are located in **2013244/raw/** 
        . the analysis takes the raw currents, apply the calibration phases and save the resulting radial currents in **/2013244/results/** under .SORT and .RFI files using the **do_process_SORT_pol** shell script. This is done using the original calibration phases.
        . the new radial currents using the updated calibration phases will be saved under **/2013244/results/new**.
Marion Bandet's avatar
Marion Bandet committed
222 223 224

 

225
    - First we need to change the original .SORT and .RFI files and save them to .SORT0 and .RFI0 to save them for future reference. This is done with the shell script **changeName.sh** located in **/hfr-data-processing/postprocessing/wera/**.
Marion Bandet's avatar
Marion Bandet committed
226

227
    - then we need to create a symbolic link to specify with files to use in terms of calibration phases. This file is different for each site. 
Marion Bandet's avatar
Marion Bandet committed
228

229
     For the example taken here (site = PAO): calibration.wera.apply ---> calibration_pao_29OCT2014.wera  and calibration.wera.remove -----> calibration_pao.wera
Marion Bandet's avatar
Marion Bandet committed
230 231


232
    - then we need to run **MODIFY_WERA_SORT** to generate new .SORT and .RFI files using the new calibration phases.
Marion Bandet's avatar
Marion Bandet committed
233

234 235
All these steps are done in a shell script **do_postprocess_SORT_newCalib.sh** that calls **wera_new_calibration.sh**.
  
Marion Bandet's avatar
Marion Bandet committed
236

237 238 239
Large data files transfer has been automatized in **do_filetransferssh.sh** that calls **fileTransferSSH.sh**.     
      
All the shell scripts are located on the WERA server under **/home/wera/bin/**. 
Marion Bandet's avatar
Marion Bandet committed
240 241 242 243




Marion Bandet's avatar
Marion Bandet committed
244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268

COMPARISON OLD/NEW WERA CALIBRATIONS
**************************************

In March 2015, we used data collected in September 2013 to compare old and new calibrations in order to know which ones we should use for the on-going analysis of currents data.

.. figure:: figures/CompaNewcalib_ADCP_WERA_Sept2013_PAO.png
    :width: 500px
    :align: center
    :height: 250px
    
    Hourly radial currents from ADCP bin 2 and HFR WERA at PAO - September 2013

    Superimposed are the 48-h averages

.. figure:: figures/Compa_old-newcalib_ADCP_WERA_Sept2013_PAO.png
    :width: 500px
    :align: center
    :height: 250px

.. figure:: figures/Compa_old-newcalib_ADCP_WERA_Sept2013_PAO_corrcoef.png 
    :width: 500px
    :align: center
    :height: 250px

Marion Bandet's avatar
Marion Bandet committed
269 270 271

:ref:`rst_checkWERAposition`