Ignore:
Timestamp:
01/12/07 12:42:03 (17 years ago)
Author:
smasson
Message:

update documentation

Location:
trunk/SRC/Documentation/idldoc_html_output
Files:
1 added
21 edited

Legend:

Unmodified
Added
Removed
  • trunk/SRC/Documentation/idldoc_html_output/Grid/computegrid.html

    r200 r203  
    654654          <h3>Version history</h3> 
    655655           
    656           <h4>Version</h4><div class="preformat"> $Id: computegrid.pro 192 2006-09-22 09:37:08Z smasson $ 
     656          <h4>Version</h4><div class="preformat"> $Id: computegrid.pro 202 2007-01-12 11:00:06Z smasson $ 
    657657</div> 
    658658          <h4>History</h4><div class="preformat"> Sebastien Masson (smasson@lodyc.jussieu.fr) 
     
    689689          <h3>Statistics</h3> 
    690690          <table class="statistics"> 
    691             <tr><td>McCabe cyclic</td><td>         214</td></tr> 
     691            <tr><td>McCabe cyclic</td><td>         215</td></tr> 
    692692            <tr><td>McCabe essential</td><td>           1</td></tr> 
    693693            <tr><td>McCabe modular design</td><td>           1</td></tr> 
  • trunk/SRC/Documentation/idldoc_html_output/Interpolation/angle.html

    r200 r203  
    7272<div id="secondary_navbar"> 
    7373 
    74 &lt;&lt; prev file | <a href="clickincell.html">next file &gt;&gt;</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="angle.html" target="_TOP">view single page</a> | <a href="./../index.html" target="_TOP">view frames</a>&nbsp;&nbsp;&nbsp;&nbsp;summary: fields | <a href="#routine_summary">routine</a>&nbsp;&nbsp;&nbsp;&nbsp;details: <a href="#routine_details">routine</a> 
     74&lt;&lt; prev file | <a href="clickincell.html">next file &gt;&gt;</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="angle.html" target="_TOP">view single page</a> | <a href="./../index.html" target="_TOP">view frames</a>&nbsp;&nbsp;&nbsp;&nbsp;summary: fields | routine&nbsp;&nbsp;&nbsp;&nbsp;details: <a href="#routine_details">routine</a> 
    7575 
    7676</div> 
     
    9090 north stereographic polar projection 
    9191 
    92  Compute angles between grid lines and direction of the North 
     92 Compute angles between grid lines and direction of the North pole 
    9393(fom angle.F,v 2.2 in OPA8.2) 
    9494</div> 
     
    101101 
    102102       
    103       <div id="routine_summary">                 
    104         <h2>Routine summary</h2> 
    105          
    106         <dl> 
    107            
    108           <dt><p><a href="#_fsnspp"><span class="result">result = </span>fsnspp(<span class="result">plam, pphi</span>, DOUBLE=<span class="result">DOUBLE</span>)</a></p><dt> 
    109           <dd></dd>      
    110            
    111           <dt><p><a href="#_angle">angle<span class="result">, fileocemesh, gcosu, gsinu, gcosv, gsinv, gcost, gsint</span>, IODIRECTORY=<span class="result">IODIRECTORY</span>, DOUBLE=<span class="result">DOUBLE</span></a></p><dt> 
    112           <dd></dd>      
    113                  
    114         </dl> 
    115       </div> 
    116        
    117103 
    118104      <div id="routine_details"> 
    119105         
    120106 
    121         <div class="routine_details" id="_fsnspp"> 
    122  
    123           <h2><a class="top" href="#container">top</a>fsnspp <span class="categories">  
     107        <div class="routine_details" id="_angle"> 
     108 
     109          <h2><a class="top" href="#container">top</a>angle <span class="categories">  
    124110 Interpolation 
    125111</span></h2> 
    126112         
    127113          <p class="header"> 
    128             <span class="result">result = </span>fsnspp(<span class="result"><a href="#_fsnspp_param_plam">plam</a>, <a href="#_fsnspp_param_pphi">pphi</a></span>, <a href="#_fsnspp_keyword_DOUBLE">DOUBLE</a>=<span class="result">DOUBLE</span>)</p> 
     114            angle<span class="result">, <a href="#_angle_param_fileocemesh">fileocemesh</a>, <a href="#_angle_param_gcosu">gcosu</a>, <a href="#_angle_param_gsinu">gsinu</a>, <a href="#_angle_param_gcosv">gcosv</a>, <a href="#_angle_param_gsinv">gsinv</a>, <a href="#_angle_param_gcost">gcost</a>, <a href="#_angle_param_gsint">gsint</a></span>, <a href="#_angle_keyword_IODIRECTORY">IODIRECTORY</a>=<span class="result">scalar string</span>, <a href="#_angle_keyword_DOUBLE">DOUBLE</a>=<span class="result">1 ou 2</span></p> 
    129115         
    130116          <div class="comments"></div> 
    131117 
    132           <h3>Return value</h3><div class="preformat"> 
    133        gsinu,gcosu : sinus and cosinus of the angle 
    134        gsinv,gcosv   between north-south direction 
    135        gsint,gcost   and the j-direction of the mesh 
    136 </div> 
     118           
    137119 
    138120           
     
    140122         
    141123             
    142             <h4 id="_fsnspp_param_plam">plam&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
     124            <h4 id="_angle_param_fileocemesh">fileocemesh&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
    143125              <span class="attr">in</span> 
    144126               
     
    146128              <span class="attr">required</span> 
    147129               
    148                
    149                
    150                
    151             </h4> 
    152          
    153           <div class="comments"> 
    154 </div> 
    155              
    156             <h4 id="_fsnspp_param_pphi">pphi&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
    157               <span class="attr">in</span> 
    158                
    159                
    160               <span class="attr">required</span> 
    161                
    162                
    163                
    164                
    165             </h4> 
    166          
    167           <div class="comments"> 
     130              <span class="attr">type:</span> <span class="value">scalar string</span> 
     131               
     132               
     133            </h4> 
     134         
     135          <div class="comments"> 
     136 a netcdf file that contains (at least) the following variables: 
     137        glamu, gphiu: longitudes and latitudes at U-points 
     138        glamv, gphiv: longitudes and latitudes at V-points 
     139        glamf, gphif: longitudes and latitudes at F-points 
     140</div> 
     141             
     142            <h4 id="_angle_param_gcosu">gcosu&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
     143               
     144              <span class="attr">out</span> 
     145               
     146               
     147               
     148              <span class="attr">type:</span> <span class="value">2d array</span> 
     149               
     150               
     151            </h4> 
     152         
     153          <div class="comments"> 
     154 cosinus of the angle between grid lines at U points and direction of the North pole 
     155</div> 
     156             
     157            <h4 id="_angle_param_gsinu">gsinu&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
     158               
     159              <span class="attr">out</span> 
     160               
     161               
     162               
     163              <span class="attr">type:</span> <span class="value">2d array</span> 
     164               
     165               
     166            </h4> 
     167         
     168          <div class="comments"> 
     169 sinus of the angle between grid lines at U points and direction of the North pole 
     170</div> 
     171             
     172            <h4 id="_angle_param_gcosv">gcosv&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
     173               
     174              <span class="attr">out</span> 
     175               
     176               
     177               
     178              <span class="attr">type:</span> <span class="value">2d array</span> 
     179               
     180               
     181            </h4> 
     182         
     183          <div class="comments"> 
     184 cosinus of the angle between grid lines at V points and direction of the North pole 
     185</div> 
     186             
     187            <h4 id="_angle_param_gsinv">gsinv&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
     188               
     189              <span class="attr">out</span> 
     190               
     191               
     192               
     193              <span class="attr">type:</span> <span class="value">2d array</span> 
     194               
     195               
     196            </h4> 
     197         
     198          <div class="comments"> 
     199 sinus of the angle between grid lines at V points and direction of the North pole 
     200</div> 
     201             
     202            <h4 id="_angle_param_gcost">gcost&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
     203               
     204              <span class="attr">out</span> 
     205               
     206               
     207               
     208              <span class="attr">type:</span> <span class="value">2d array</span> 
     209               
     210               
     211            </h4> 
     212         
     213          <div class="comments"> 
     214 cosinus of the angle between grid lines at T points and direction of the North pole 
     215</div> 
     216             
     217            <h4 id="_angle_param_gsint">gsint&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
     218               
     219              <span class="attr">out</span> 
     220               
     221               
     222               
     223              <span class="attr">type:</span> <span class="value">2d array</span> 
     224               
     225               
     226            </h4> 
     227         
     228          <div class="comments"> 
     229 sinus of the angle between grid lines at T points and direction of the North pole 
    168230</div> 
    169231             
     
    175237            <h3>Keywords</h3> 
    176238             
    177             <h4 id="_fsnspp_keyword_DOUBLE">DOUBLE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
     239            <h4 id="_angle_keyword_IODIRECTORY">IODIRECTORY&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
    178240               
    179241               
     
    181243               
    182244               
    183                
     245              <span class="attr">type:</span> <span class="value">scalar string</span> 
     246              <span class="attr">default:</span> <span class="value">''</span> 
     247               
     248            </h4> 
     249         
     250            <div class="comments"> 
     251 the directory path where is located fileocemesh 
     252</div> 
     253             
     254            <h4 id="_angle_keyword_DOUBLE">DOUBLE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
     255               
     256               
     257               
     258               
     259               
     260              <span class="attr">type:</span> <span class="value">1 ou 2</span> 
    184261              <span class="attr">default:</span> <span class="value">0</span> 
    185262               
     
    187264         
    188265            <div class="comments"> 
    189  use double precision (default is float) 
     266 put 1 to use double precision (default is float) 
    190267</div> 
    191268             
     
    195272          <h3>Version history</h3> 
    196273           
    197           <h4>Version</h4><div class="preformat"> $Id: angle.pro 157 2006-08-21 09:01:50Z navarro $ 
    198 </div> 
     274          <h4>Version</h4><div class="preformat"> $Id: angle.pro 202 2007-01-12 11:00:06Z smasson $</div> 
    199275          <h4>History</h4><div class="preformat"> 
    200276       Original :  96-07 (O. Marti) 
     
    217293       =>    gcosv[0, *] = gcosv[jpj-2, *] 
    218294       =>    gsinv[0, *] = gsinv[jpj-2, *] 
    219  
    220 </div> 
    221          
    222            
    223            
    224            
    225            
    226            
    227            
    228            
    229          
    230           <h3>Statistics</h3> 
    231           <table class="statistics"> 
    232             <tr><td>McCabe cyclic</td><td>           2</td></tr> 
    233             <tr><td>McCabe essential</td><td>           1</td></tr> 
    234             <tr><td>McCabe modular design</td><td>           1</td></tr> 
    235           </table> 
    236            
    237          
    238         </div> 
    239          
    240  
    241         <div class="routine_details" id="_angle"> 
    242  
    243           <h2><a class="top" href="#container">top</a>angle </h2> 
    244          
    245           <p class="header"> 
    246             angle<span class="result">, <a href="#_angle_param_fileocemesh">fileocemesh</a>, <a href="#_angle_param_gcosu">gcosu</a>, <a href="#_angle_param_gsinu">gsinu</a>, <a href="#_angle_param_gcosv">gcosv</a>, <a href="#_angle_param_gsinv">gsinv</a>, <a href="#_angle_param_gcost">gcost</a>, <a href="#_angle_param_gsint">gsint</a></span>, <a href="#_angle_keyword_IODIRECTORY">IODIRECTORY</a>=<span class="result">IODIRECTORY</span>, <a href="#_angle_keyword_DOUBLE">DOUBLE</a>=<span class="result">DOUBLE</span></p> 
    247          
    248           <div class="comments"></div> 
    249  
    250            
    251  
    252            
    253             <h3>Parameters</h3> 
    254          
    255              
    256             <h4 id="_angle_param_fileocemesh">fileocemesh&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
    257               <span class="attr">in</span> 
    258                
    259                
    260               <span class="attr">required</span> 
    261                
    262                
    263                
    264                
    265             </h4> 
    266          
    267           <div class="comments"> a netcdf file that contains (at least): 
    268         glamu, gphiu: longitudes and latitudes at U-points 
    269         glamv, gphiv: longitudes and latitudes at V-points 
    270         glamf, gphif: longitudes and latitudes at F-points 
    271 </div> 
    272              
    273             <h4 id="_angle_param_gcosu">gcosu&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
    274               <span class="attr">in</span> 
    275                
    276                
    277               <span class="attr">required</span> 
    278                
    279                
    280                
    281                
    282             </h4> 
    283          
    284           <div class="comments"></div> 
    285              
    286             <h4 id="_angle_param_gsinu">gsinu&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
    287               <span class="attr">in</span> 
    288                
    289                
    290               <span class="attr">required</span> 
    291                
    292                
    293                
    294                
    295             </h4> 
    296          
    297           <div class="comments"></div> 
    298              
    299             <h4 id="_angle_param_gcosv">gcosv&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
    300               <span class="attr">in</span> 
    301                
    302                
    303               <span class="attr">required</span> 
    304                
    305                
    306                
    307                
    308             </h4> 
    309          
    310           <div class="comments"></div> 
    311              
    312             <h4 id="_angle_param_gsinv">gsinv&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
    313               <span class="attr">in</span> 
    314                
    315                
    316               <span class="attr">required</span> 
    317                
    318                
    319                
    320                
    321             </h4> 
    322          
    323           <div class="comments"></div> 
    324              
    325             <h4 id="_angle_param_gcost">gcost&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
    326               <span class="attr">in</span> 
    327                
    328                
    329               <span class="attr">required</span> 
    330                
    331                
    332                
    333                
    334             </h4> 
    335          
    336           <div class="comments"></div> 
    337              
    338             <h4 id="_angle_param_gsint">gsint&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
    339               <span class="attr">in</span> 
    340                
    341                
    342               <span class="attr">required</span> 
    343                
    344                
    345                
    346                
    347             </h4> 
    348          
    349           <div class="comments"></div> 
    350              
    351  
    352            
    353  
    354            
    355  
    356             <h3>Keywords</h3> 
    357              
    358             <h4 id="_angle_keyword_IODIRECTORY">IODIRECTORY&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
    359                
    360                
    361                
    362                
    363                
    364                
    365                
    366                
    367             </h4> 
    368          
    369             <div class="comments"> the directory path where is located fileocemesh</div> 
    370              
    371             <h4 id="_angle_keyword_DOUBLE">DOUBLE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
    372                
    373                
    374                
    375                
    376                
    377                
    378               <span class="attr">default:</span> <span class="value">0</span> 
    379                
    380             </h4> 
    381          
    382             <div class="comments"> use double precision (default is float)</div> 
    383              
    384            
    385  
    386            
    387            
    388            
    389            
    390            
    391            
    392            
    393            
    394            
    395            
    396            
    397            
     295</div> 
    398296         
    399297           
  • trunk/SRC/Documentation/idldoc_html_output/Interpolation/compute_fromirr_bilinear_weigaddr.html

    r200 r203  
    127127              <span class="attr">required</span> 
    128128               
    129                
     129              <span class="attr">type:</span> <span class="value">2d array</span> 
    130130               
    131131               
     
    142142              <span class="attr">required</span> 
    143143               
    144                
     144              <span class="attr">type:</span> <span class="value">2d array</span> 
    145145               
    146146               
     
    157157              <span class="attr">required</span> 
    158158               
    159                
     159              <span class="attr">type:</span> <span class="value">2d array or -1</span> 
    160160               
    161161               
     
    164164          <div class="comments"> 
    165165 land/sea mask of the input data 
     166 put -1 if input data are not masked 
    166167</div> 
    167168             
     
    172173              <span class="attr">required</span> 
    173174               
    174                
     175              <span class="attr">type:</span> <span class="value">2d array</span> 
    175176               
    176177               
     
    187188              <span class="attr">required</span> 
    188189               
    189                
     190              <span class="attr">type:</span> <span class="value">2d array</span> 
    190191               
    191192               
     
    202203              <span class="attr">required</span> 
    203204               
    204                
     205              <span class="attr">type:</span> <span class="value">2d array or -1</span> 
    205206               
    206207               
     
    209210          <div class="comments"> 
    210211 land/sea mask of the output data 
     212 put -1 if output data are not masked 
    211213</div> 
    212214             
     
    217219               
    218220               
    219                
    220                
    221                
    222             </h4> 
    223          
    224           <div class="comments"></div> 
     221              <span class="attr">type:</span> <span class="value">2d array</span> 
     222               
     223               
     224            </h4> 
     225         
     226          <div class="comments"> 
     227 (see ADDR) 
     228</div> 
    225229             
    226230            <h4 id="_compute_fromirr_bilinear_weigaddr_param_addr">addr&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
     
    230234               
    231235               
    232                
     236              <span class="attr">type:</span> <span class="value">2d array</span> 
    233237               
    234238               
     
    250254          <h3>Version history</h3> 
    251255           
    252           <h4>Version</h4><div class="preformat"> $Id: compute_fromirr_bilinear_weigaddr.pro 157 2006-08-21 09:01:50Z navarro $ 
     256          <h4>Version</h4><div class="preformat"> $Id: compute_fromirr_bilinear_weigaddr.pro 202 2007-01-12 11:00:06Z smasson $ 
    253257</div> 
    254258          <h4>History</h4><div class="preformat"> 
     
    272276  and the weight is redistributed on the remaining "water" corners 
    273277  -  points located out of the southern and northern boundaries or in cells 
    274   containing only land points are set the the same value as their closest neighbor l 
     278  containing only land points are set the the same value as their closest neighbor 
    275279</div> 
    276280         
     
    285289          <h3>Statistics</h3> 
    286290          <table class="statistics"> 
    287             <tr><td>McCabe cyclic</td><td>          22</td></tr> 
     291            <tr><td>McCabe cyclic</td><td>          37</td></tr> 
    288292            <tr><td>McCabe essential</td><td>           1</td></tr> 
    289293            <tr><td>McCabe modular design</td><td>           1</td></tr> 
  • trunk/SRC/Documentation/idldoc_html_output/Interpolation/compute_fromreg_bilinear_weigaddr.html

    r200 r203  
    110110         
    111111          <p class="header"> 
    112             compute_fromreg_bilinear_weigaddr<span class="result">, <a href="#_compute_fromreg_bilinear_weigaddr_param_alonin">alonin</a>, <a href="#_compute_fromreg_bilinear_weigaddr_param_alatin">alatin</a>, <a href="#_compute_fromreg_bilinear_weigaddr_param_olonin">olonin</a>, <a href="#_compute_fromreg_bilinear_weigaddr_param_olat">olat</a>, <a href="#_compute_fromreg_bilinear_weigaddr_param_weig">weig</a>, <a href="#_compute_fromreg_bilinear_weigaddr_param_addr">addr</a></span>, <a href="#_compute_fromreg_bilinear_weigaddr_keyword_NONORTHERNLINE">NONORTHERNLINE</a>=<span class="result">NONORTHERNLINE</span>, <a href="#_compute_fromreg_bilinear_weigaddr_keyword_NOSOUTHERNLINE">NOSOUTHERNLINE</a>=<span class="result">NOSOUTHERNLINE</span></p> 
     112            compute_fromreg_bilinear_weigaddr<span class="result">, <a href="#_compute_fromreg_bilinear_weigaddr_param_alonin">alonin</a>, <a href="#_compute_fromreg_bilinear_weigaddr_param_alatin">alatin</a>, <a href="#_compute_fromreg_bilinear_weigaddr_param_olonin">olonin</a>, <a href="#_compute_fromreg_bilinear_weigaddr_param_olat">olat</a>, <a href="#_compute_fromreg_bilinear_weigaddr_param_weig">weig</a>, <a href="#_compute_fromreg_bilinear_weigaddr_param_addr">addr</a></span>, <a href="#_compute_fromreg_bilinear_weigaddr_keyword_NONORTHERNLINE">NONORTHERNLINE</a>=<span class="result">scalar 0 or 1</span>, <a href="#_compute_fromreg_bilinear_weigaddr_keyword_NOSOUTHERNLINE">NOSOUTHERNLINE</a>=<span class="result">scalar 0 or 1</span></p> 
    113113         
    114114          <div class="comments"></div> 
     
    126126              <span class="attr">required</span> 
    127127               
    128                
     128              <span class="attr">type:</span> <span class="value">2d array</span> 
    129129               
    130130               
     
    141141              <span class="attr">required</span> 
    142142               
    143                
     143              <span class="attr">type:</span> <span class="value">2d array</span> 
    144144               
    145145               
     
    156156              <span class="attr">required</span> 
    157157               
    158                
     158              <span class="attr">type:</span> <span class="value">2d array</span> 
    159159               
    160160               
     
    171171              <span class="attr">required</span> 
    172172               
    173                
     173              <span class="attr">type:</span> <span class="value">2d array</span> 
    174174               
    175175               
     
    186186               
    187187               
    188                
    189                
    190                
    191             </h4> 
    192          
    193           <div class="comments"></div> 
     188              <span class="attr">type:</span> <span class="value">2d array</span> 
     189               
     190               
     191            </h4> 
     192         
     193          <div class="comments"> 
     194 (see ADDR) 
     195</div> 
    194196             
    195197            <h4 id="_compute_fromreg_bilinear_weigaddr_param_addr">addr&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
     
    199201               
    200202               
    201                
     203              <span class="attr">type:</span> <span class="value">2d array</span> 
    202204               
    203205               
     
    224226               
    225227               
    226                
    227                
     228              <span class="attr">type:</span> <span class="value">scalar 0 or 1</span> 
     229              <span class="attr">default:</span> <span class="value">0</span> 
    228230               
    229231            </h4> 
    230232         
    231233            <div class="comments"> 
    232  activate if you don't want to take into 
     234 put 1 if you don't want to take into 
    233235 account the northen line of the input data when performing the interpolation. 
    234236</div> 
     
    240242               
    241243               
    242                
    243                
     244              <span class="attr">type:</span> <span class="value">scalar 0 or 1</span> 
     245              <span class="attr">default:</span> <span class="value">0</span> 
    244246               
    245247            </h4> 
    246248         
    247249            <div class="comments"> 
    248  activate if you don't want to take into 
     250 put 1 if you don't want to take into 
    249251 account the southern line of the input data when performing the interpolation. 
    250252</div> 
     
    255257          <h3>Version history</h3> 
    256258           
    257           <h4>Version</h4><div class="preformat"> $Id: compute_fromreg_bilinear_weigaddr.pro 163 2006-08-29 12:59:46Z navarro $ 
     259          <h4>Version</h4><div class="preformat"> $Id: compute_fromreg_bilinear_weigaddr.pro 202 2007-01-12 11:00:06Z smasson $ 
    258260</div> 
    259261          <h4>History</h4><div class="preformat"> 
  • trunk/SRC/Documentation/idldoc_html_output/Interpolation/compute_fromreg_imoms3_weigaddr.html

    r200 r203  
    110110         
    111111          <p class="header"> 
    112             compute_fromreg_imoms3_weigaddr<span class="result">, <a href="#_compute_fromreg_imoms3_weigaddr_param_alonin">alonin</a>, <a href="#_compute_fromreg_imoms3_weigaddr_param_alatin">alatin</a>, <a href="#_compute_fromreg_imoms3_weigaddr_param_olonin">olonin</a>, <a href="#_compute_fromreg_imoms3_weigaddr_param_olat">olat</a>, <a href="#_compute_fromreg_imoms3_weigaddr_param_weig">weig</a>, <a href="#_compute_fromreg_imoms3_weigaddr_param_addr">addr</a></span>, <a href="#_compute_fromreg_imoms3_weigaddr_keyword_NONORTHERNLINE">NONORTHERNLINE</a>=<span class="result">NONORTHERNLINE</span>, <a href="#_compute_fromreg_imoms3_weigaddr_keyword_NOSOUTHERNLINE">NOSOUTHERNLINE</a>=<span class="result">NOSOUTHERNLINE</span></p> 
     112            compute_fromreg_imoms3_weigaddr<span class="result">, <a href="#_compute_fromreg_imoms3_weigaddr_param_alonin">alonin</a>, <a href="#_compute_fromreg_imoms3_weigaddr_param_alatin">alatin</a>, <a href="#_compute_fromreg_imoms3_weigaddr_param_olonin">olonin</a>, <a href="#_compute_fromreg_imoms3_weigaddr_param_olat">olat</a>, <a href="#_compute_fromreg_imoms3_weigaddr_param_weig">weig</a>, <a href="#_compute_fromreg_imoms3_weigaddr_param_addr">addr</a></span>, <a href="#_compute_fromreg_imoms3_weigaddr_keyword_NONORTHERNLINE">NONORTHERNLINE</a>=<span class="result">scalar 0 or 1</span>, <a href="#_compute_fromreg_imoms3_weigaddr_keyword_NOSOUTHERNLINE">NOSOUTHERNLINE</a>=<span class="result">scalar 0 or 1</span></p> 
    113113         
    114114          <div class="comments"> 
     
    127127              <span class="attr">required</span> 
    128128               
    129                
     129              <span class="attr">type:</span> <span class="value">2d array</span> 
    130130               
    131131               
     
    142142              <span class="attr">required</span> 
    143143               
    144                
     144              <span class="attr">type:</span> <span class="value">2d array</span> 
    145145               
    146146               
     
    157157              <span class="attr">required</span> 
    158158               
    159                
    160                
    161                
    162             </h4> 
    163          
    164           <div class="comments"> 
    165  longitude of the output data</div> 
     159              <span class="attr">type:</span> <span class="value">2d array</span> 
     160               
     161               
     162            </h4> 
     163         
     164          <div class="comments"> 
     165 longitude of the output data 
     166</div> 
    166167             
    167168            <h4 id="_compute_fromreg_imoms3_weigaddr_param_olat">olat&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
     
    171172              <span class="attr">required</span> 
    172173               
    173                
     174              <span class="attr">type:</span> <span class="value">2d array</span> 
    174175               
    175176               
     
    186187               
    187188               
    188                
    189                
    190                
    191             </h4> 
    192          
    193           <div class="comments"></div> 
     189              <span class="attr">type:</span> <span class="value">2d array</span> 
     190               
     191               
     192            </h4> 
     193         
     194          <div class="comments"> 
     195 (see ADDR) 
     196</div> 
    194197             
    195198            <h4 id="_compute_fromreg_imoms3_weigaddr_param_addr">addr&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
     
    199202               
    200203               
    201                
     204              <span class="attr">type:</span> <span class="value">2d array</span> 
    202205               
    203206               
     
    224227               
    225228               
    226                
    227                
    228                
    229             </h4> 
    230          
    231             <div class="comments"></div> 
     229              <span class="attr">type:</span> <span class="value">scalar 0 or 1</span> 
     230              <span class="attr">default:</span> <span class="value">0</span> 
     231               
     232            </h4> 
     233         
     234            <div class="comments"> 
     235 put 1 if you don't want to take into 
     236 account the northen line of the input data when performing the interpolation. 
     237</div> 
    232238             
    233239            <h4 id="_compute_fromreg_imoms3_weigaddr_keyword_NOSOUTHERNLINE">NOSOUTHERNLINE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
     
    237243               
    238244               
    239                
    240                
     245              <span class="attr">type:</span> <span class="value">scalar 0 or 1</span> 
     246              <span class="attr">default:</span> <span class="value">0</span> 
    241247               
    242248            </h4> 
    243249         
    244250            <div class="comments"> 
    245  activate if you don't want to take into account the northen/southern line 
    246  of the input data when performing the interpolation. 
     251 put 1 if you don't want to take into 
     252 account the southern line of the input data when performing the interpolation. 
    247253</div> 
    248254             
     
    252258          <h3>Version history</h3> 
    253259           
    254           <h4>Version</h4><div class="preformat"> $Id: compute_fromreg_imoms3_weigaddr.pro 163 2006-08-29 12:59:46Z navarro $ 
     260          <h4>Version</h4><div class="preformat"> $Id: compute_fromreg_imoms3_weigaddr.pro 202 2007-01-12 11:00:06Z smasson $ 
    255261</div> 
    256262          <h4>History</h4><div class="preformat"> 
  • trunk/SRC/Documentation/idldoc_html_output/Interpolation/dir-files.html

    r200 r203  
    2929        <li><a href="cutsegment.html" target="file_frame">cutsegment.pro</a></li> 
    3030        <li><a href="extrapolate.html" target="file_frame">extrapolate.pro</a></li> 
     31        <li><a href="extrapsmooth.html" target="file_frame">extrapsmooth.pro</a></li> 
    3132        <li><a href="fromirr.html" target="file_frame">fromirr.pro</a></li> 
    3233        <li><a href="fromreg.html" target="file_frame">fromreg.pro</a></li> 
     
    4546      </ul> 
    4647 
    47       <div id="tagline">22 files</div> 
     48      <div id="tagline">23 files</div> 
    4849       
    4950 
  • trunk/SRC/Documentation/idldoc_html_output/Interpolation/directory-overview.html

    r200 r203  
    9090       
    9191        <dt><a href="angle.html">angle.pro</a></dt> 
    92         <dd>  north stereographic polar projection   Compute angles between grid lines and direction of the North (fom angle.</dd> 
     92        <dd>  north stereographic polar projection   Compute angles between grid lines and direction of the North pole (fom angle.</dd> 
    9393       
    9494        <dt><a href="clickincell.html">clickincell.pro</a></dt> 
     
    111111       
    112112        <dt><a href="extrapolate.html">extrapolate.pro</a></dt> 
    113         <dd>  extrapolate data (zinput) where maskinput eq 0 by filling  step by step the coastline points with the mean value of the 8 neighbourgs.</dd> 
     113        <dd>  extrapolate data (zinput) where maskinput eq 0 by filling step by   step the coastline points with the mean value of the 8 neighbourgs  (weighted by their mask value).</dd> 
     114       
     115        <dt><a href="extrapsmooth.html">extrapsmooth.pro</a></dt> 
     116        <dd>  similar to extrapolate but could to the job in a better way because the  extrapolated values are smoothed.</dd> 
    114117       
    115118        <dt><a href="fromirr.html">fromirr.pro</a></dt> 
  • trunk/SRC/Documentation/idldoc_html_output/Interpolation/extrapolate.html

    r200 r203  
    7272<div id="secondary_navbar"> 
    7373 
    74 <a href="cutsegment.html">&lt;&lt;prev file</a> | <a href="fromirr.html">next file &gt;&gt;</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="extrapolate.html" target="_TOP">view single page</a> | <a href="./../index.html" target="_TOP">view frames</a>&nbsp;&nbsp;&nbsp;&nbsp;summary: fields | routine&nbsp;&nbsp;&nbsp;&nbsp;details: <a href="#routine_details">routine</a> 
     74<a href="cutsegment.html">&lt;&lt;prev file</a> | <a href="extrapsmooth.html">next file &gt;&gt;</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="extrapolate.html" target="_TOP">view single page</a> | <a href="./../index.html" target="_TOP">view frames</a>&nbsp;&nbsp;&nbsp;&nbsp;summary: fields | routine&nbsp;&nbsp;&nbsp;&nbsp;details: <a href="#routine_details">routine</a> 
    7575 
    7676</div> 
     
    8888 
    8989      <div id="file_comments"> 
    90  extrapolate data (zinput) where maskinput eq 0 by filling 
    91  step by step the coastline points with the mean value of the 8 neighbourgs. 
     90 extrapolate data (zinput) where maskinput eq 0 by filling step by  
     91 step the coastline points with the mean value of the 8 neighbourgs 
     92 (weighted by their mask value). 
    9293</div> 
    9394 
     
    110111         
    111112          <p class="header"> 
    112             <span class="result">result = </span>extrapolate(<span class="result"><a href="#_extrapolate_param_zinput">zinput</a>, <a href="#_extrapolate_param_maskinput">maskinput</a>[, <a href="#_extrapolate_param_nb_iteration">nb_iteration</a>]</span>, <a href="#_extrapolate_keyword_x_periodic">x_periodic</a>=<span class="result">x_periodic</span>, <a href="#_extrapolate_keyword_MINVAL">MINVAL</a>=<span class="result">MINVAL</span>, <a href="#_extrapolate_keyword_MAXVAL">MAXVAL</a>=<span class="result">MAXVAL</span>, <a href="#_extrapolate_keyword_GE0">GE0</a>=<span class="result">GE0</span>)</p> 
     113            <span class="result">result = </span>extrapolate(<span class="result"><a href="#_extrapolate_param_zinput">zinput</a>, <a href="#_extrapolate_param_maskinput">maskinput</a>[, <a href="#_extrapolate_param_nb_iteration">nb_iteration</a>]</span>, <a href="#_extrapolate_keyword_x_periodic">x_periodic</a>=<span class="result">scalar, 0 or 1</span>, <a href="#_extrapolate_keyword_MINVAL">MINVAL</a>=<span class="result">scalar</span>, <a href="#_extrapolate_keyword_MAXVAL">MAXVAL</a>=<span class="result">scalar</span>, <a href="#_extrapolate_keyword_GE0">GE0</a>=<span class="result">scalar 0 or 1</span>)</p> 
    113114         
    114115          <div class="comments"></div> 
    115116 
    116            
     117          <h3>Return value</h3><div class="preformat"> {type=2d array} 
     118 the extrapolated array 
     119</div> 
    117120 
    118121           
     
    126129              <span class="attr">required</span> 
    127130               
    128                
     131              <span class="attr">type:</span> <span class="value">2d array</span> 
    129132               
    130133               
     
    141144              <span class="attr">required</span> 
    142145               
    143                
     146              <span class="attr">type:</span> <span class="value">2d array or -1</span> 
    144147               
    145148               
     
    147150         
    148151          <div class="comments"> 
     152 a 2D array, the land-sea mask of the output data (1 on ocean, 0 on land) 
     153 put -1 if input data are not masked 
    149154</div> 
    150155             
     
    155160               
    156161               
    157                
    158                
     162              <span class="attr">type:</span> <span class="value">integer scalar</span> 
     163              <span class="attr">default:</span> <span class="value">10.E20</span> 
    159164               
    160165            </h4> 
    161166         
    162167          <div class="comments"> 
    163  number of iteration 
     168 Maximum number if iterations done in the extrapolation process. If there 
     169 is no more masked values we exit extrapolate before reaching nb_iteration 
     170 (to be sure to fill everything, you can use a very large value) 
    164171</div> 
    165172             
     
    177184               
    178185               
    179                
    180                
    181                
    182             </h4> 
    183          
    184             <div class="comments"></div> 
     186              <span class="attr">type:</span> <span class="value">scalar, 0 or 1</span> 
     187              <span class="attr">default:</span> <span class="value">0</span> 
     188               
     189            </h4> 
     190         
     191            <div class="comments"> 
     192 put 1 to specify that the data are periodic along x axis 
     193</div> 
    185194             
    186195            <h4 id="_extrapolate_keyword_MINVAL">MINVAL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
     
    190199               
    191200               
    192                
    193                
    194                
    195             </h4> 
    196          
    197             <div class="comments"></div> 
     201              <span class="attr">type:</span> <span class="value">scalar</span> 
     202              <span class="attr">default:</span> <span class="value">not used</span> 
     203               
     204            </h4> 
     205         
     206            <div class="comments"> 
     207 to specify a minimum value to the extrapolated values 
     208</div> 
    198209             
    199210            <h4 id="_extrapolate_keyword_MAXVAL">MAXVAL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
     
    203214               
    204215               
    205                
    206                
    207                
    208             </h4> 
    209          
    210             <div class="comments"></div> 
     216              <span class="attr">type:</span> <span class="value">scalar</span> 
     217              <span class="attr">default:</span> <span class="value">not used</span> 
     218               
     219            </h4> 
     220         
     221            <div class="comments"> 
     222 to specify a maximum value to the extrapolated values 
     223</div> 
    211224             
    212225            <h4 id="_extrapolate_keyword_GE0">GE0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
     
    216229               
    217230               
    218                
    219                
    220                
    221             </h4> 
    222          
    223             <div class="comments"> 
    224 </div> 
    225              
    226            
    227  
    228            
     231              <span class="attr">type:</span> <span class="value">scalar 0 or 1</span> 
     232              <span class="attr">default:</span> <span class="value">0</span> 
     233               
     234            </h4> 
     235         
     236            <div class="comments"> 
     237 put 1 to force the extrapolated values to be larger than 0, same as using minval=0. 
     238</div> 
     239             
     240           
     241 
     242          <h3>Examples</h3><div class="preformat"> 
     243 IDL> a=extrapolate(dist(jpi,jpj),tmask[*,*,0],/x_periodic) 
     244 IDL> tvplus, a 
     245 IDL> tvplus, a*(1-tmask[*,*,0]) 
     246 get the coastline: 
     247 IDL> a=extrapolate(tmask[*,*,0],tmask[*,*,0],1,/x_periodic) 
     248 IDL> tvplus, a-tmask[*,*,0] 
     249</div> 
    229250          <h3>Version history</h3> 
    230251           
    231           <h4>Version</h4><div class="preformat"> $Id: extrapolate.pro 199 2006-12-13 07:47:14Z smasson $ 
    232 </div> 
    233            
     252          <h4>Version</h4><div class="preformat"> $Id: extrapolate.pro 202 2007-01-12 11:00:06Z smasson $ 
     253</div> 
     254          <h4>History</h4><div class="preformat"> 
     255  Originaly written by G. Roulet 
     256  Sebastien Masson (smasson@lodyc.jussieu.fr) 
     257</div> 
    234258           
    235259           
     
    250274          <h3>Statistics</h3> 
    251275          <table class="statistics"> 
    252             <tr><td>McCabe cyclic</td><td>          11</td></tr> 
     276            <tr><td>McCabe cyclic</td><td>          13</td></tr> 
    253277            <tr><td>McCabe essential</td><td>           1</td></tr> 
    254278            <tr><td>McCabe modular design</td><td>           1</td></tr> 
  • trunk/SRC/Documentation/idldoc_html_output/Interpolation/fromirr.html

    r200 r203  
    7272<div id="secondary_navbar"> 
    7373 
    74 <a href="extrapolate.html">&lt;&lt;prev file</a> | <a href="fromreg.html">next file &gt;&gt;</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="fromirr.html" target="_TOP">view single page</a> | <a href="./../index.html" target="_TOP">view frames</a>&nbsp;&nbsp;&nbsp;&nbsp;summary: fields | routine&nbsp;&nbsp;&nbsp;&nbsp;details: <a href="#routine_details">routine</a> 
     74<a href="extrapsmooth.html">&lt;&lt;prev file</a> | <a href="fromreg.html">next file &gt;&gt;</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="fromirr.html" target="_TOP">view single page</a> | <a href="./../index.html" target="_TOP">view frames</a>&nbsp;&nbsp;&nbsp;&nbsp;summary: fields | routine&nbsp;&nbsp;&nbsp;&nbsp;details: <a href="#routine_details">routine</a> 
    7575 
    7676</div> 
     
    189189               
    190190               
    191               <span class="attr">type:</span> <span class="value">2d array</span> 
     191              <span class="attr">type:</span> <span class="value">2d array or -1</span> 
    192192               
    193193               
     
    196196          <div class="comments"> 
    197197 a 2D array, the land-sea mask of the input data (1 on ocean, 0 on land) 
     198 put -1 if input data are not masked 
    198199</div> 
    199200             
     
    234235              <span class="attr">required</span> 
    235236               
    236               <span class="attr">type:</span> <span class="value">2d array</span> 
     237              <span class="attr">type:</span> <span class="value">2d array or -1</span> 
    237238               
    238239               
     
    241242          <div class="comments"> 
    242243 a 2D array, the land-sea mask of the output data (1 on ocean, 0 on land) 
     244 put -1 if output data are not masked 
    243245</div> 
    244246             
     
    302304          <h3>Version history</h3> 
    303305           
    304           <h4>Version</h4><div class="preformat"> $Id: fromirr.pro 163 2006-08-29 12:59:46Z navarro $ 
     306          <h4>Version</h4><div class="preformat"> $Id: fromirr.pro 202 2007-01-12 11:00:06Z smasson $ 
    305307</div> 
    306308          <h4>History</h4><div class="preformat"> 
  • trunk/SRC/Documentation/idldoc_html_output/ToBeReviewed/WIDGET/AUTOUR_de_XXX/selectfile.html

    r200 r203  
    164164           
    165165          <h4>Version</h4><div class="preformat">  
    166  $Id: selectfile.pro 181 2006-09-15 08:24:36Z smasson $ 
     166 $Id: selectfile.pro 202 2007-01-12 11:00:06Z smasson $ 
    167167 </div> 
    168168          <h4>History</h4><div class="preformat"> 
     
    295295           
    296296          <h4>Version</h4><div class="preformat">  
    297  $Id: selectfile.pro 181 2006-09-15 08:24:36Z smasson $ 
     297 $Id: selectfile.pro 202 2007-01-12 11:00:06Z smasson $ 
    298298 </div> 
    299299          <h4>History</h4><div class="preformat"> 
  • trunk/SRC/Documentation/idldoc_html_output/all-files.html

    r200 r203  
    134134        <li><a href="./Obsolete/extrait.html" target="file_frame">extrait.pro</a></li> 
    135135        <li><a href="./Interpolation/extrapolate.html" target="file_frame">extrapolate.pro</a></li> 
     136        <li><a href="./Interpolation/extrapsmooth.html" target="file_frame">extrapsmooth.pro</a></li> 
    136137        <li><a href="./ToBeReviewed/GRILLE/f2v.html" target="file_frame">f2v.pro</a></li> 
    137138        <li><a href="./Obsolete/ficdate.html" target="file_frame">ficdate.pro</a></li> 
     
    429430      </ul> 
    430431 
    431       <div id="tagline">398 files</div> 
     432      <div id="tagline">399 files</div> 
    432433       
    433434 
  • trunk/SRC/Documentation/idldoc_html_output/idldoc-categories.html

    r200 r203  
    582582             
    583583          </ul> 
    584         </li>        <li id="idldoc-Interpolation">Interpolation <span class="result">(8 routines)</span> 
    585           <ul> 
     584        </li>        <li id="idldoc-Interpolation">Interpolation <span class="result">(10 routines)</span> 
     585          <ul> 
     586             
     587            <li><a href="./Interpolation/angle.html#_angle">angle</a></li> 
    586588             
    587589            <li><a href="./Interpolation/compute_fromirr_bilinear_weigaddr.html#_compute_fromirr_bilinear_weigaddr">compute_fromirr_bilinear_weigaddr</a></li> 
     
    592594             
    593595            <li><a href="./Interpolation/extrapolate.html#_extrapolate">extrapolate</a></li> 
     596             
     597            <li><a href="./Interpolation/extrapsmooth.html#_extrapsmooth">extrapsmooth</a></li> 
    594598             
    595599            <li><a href="./Interpolation/fromirr.html#_fromirr">fromirr</a></li> 
  • trunk/SRC/Documentation/idldoc_html_output/idldoc-index-E.html

    r200 r203  
    178178        <dd>a keyword from the routine lec</dd> 
    179179         
     180        <dt><a href="./ToBeReviewed/PLOTS/DESSINE/plt1d.html#_plt1d">ENDPOINTS</a></dt> 
     181        <dd>a keyword from the routine plt1d</dd> 
     182         
     183        <dt><a href="./Interpolation/cutsegment.html#_cutsegment">ENDPOINTS</a></dt> 
     184        <dd>a keyword from the routine cutsegment</dd> 
     185         
    180186        <dt><a href="./ToBeReviewed/PLOTS/DESSINE/pltt.html#_pltt">ENDPOINTS</a></dt> 
    181187        <dd>a keyword from the routine pltt</dd> 
    182188         
     189        <dt><a href="./Interpolation/cutpar.html#_cutpar">ENDPOINTS</a></dt> 
     190        <dd>a keyword from the routine cutpar</dd> 
     191         
    183192        <dt><a href="./ToBeReviewed/PLOTS/DESSINE/pltz.html#_pltz">ENDPOINTS</a></dt> 
    184193        <dd>a keyword from the routine pltz</dd> 
    185194         
    186         <dt><a href="./Interpolation/cutpar.html#_cutpar">ENDPOINTS</a></dt> 
    187         <dd>a keyword from the routine cutpar</dd> 
    188          
    189         <dt><a href="./ToBeReviewed/PLOTS/DESSINE/plt1d.html#_plt1d">ENDPOINTS</a></dt> 
    190         <dd>a keyword from the routine plt1d</dd> 
     195        <dt><a href="./ToBeReviewed/GRILLE/domdef.html#_domdef">ENDPOINTS</a></dt> 
     196        <dd>a keyword from the routine domdef</dd> 
    191197         
    192198        <dt><a href="./ToBeReviewed/PLOTS/legende.html#_legende">ENDPOINTS</a></dt> 
    193199        <dd>a keyword from the routine legende</dd> 
    194200         
    195         <dt><a href="./Interpolation/cutsegment.html#_cutsegment">ENDPOINTS</a></dt> 
    196         <dd>a keyword from the routine cutsegment</dd> 
     201        <dt><a href="./ToBeReviewed/PLOTS/DIVERS/checktypeminmax.html#_checktypeminmax">ENDPOINTS</a></dt> 
     202        <dd>a keyword from the routine checktypeminmax</dd> 
     203         
     204        <dt><a href="./ToBeReviewed/PLOTS/DIVERS/placedessin.html#_placedessin">ENDPOINTS</a></dt> 
     205        <dd>a keyword from the routine placedessin</dd> 
    197206         
    198207        <dt><a href="./ToBeReviewed/TRIANGULATION/section.html#_section">ENDPOINTS</a></dt> 
    199208        <dd>a keyword from the routine section</dd> 
    200209         
    201         <dt><a href="./ToBeReviewed/GRILLE/domdef.html#_domdef">ENDPOINTS</a></dt> 
    202         <dd>a keyword from the routine domdef</dd> 
    203          
    204         <dt><a href="./ToBeReviewed/PLOTS/DIVERS/checktypeminmax.html#_checktypeminmax">ENDPOINTS</a></dt> 
    205         <dd>a keyword from the routine checktypeminmax</dd> 
    206          
    207         <dt><a href="./ToBeReviewed/PLOTS/DIVERS/placedessin.html#_placedessin">ENDPOINTS</a></dt> 
    208         <dd>a keyword from the routine placedessin</dd> 
    209          
    210210        <dt><a href="./Picture/imdisp.html#_imdisp">ERASE</a></dt> 
    211211        <dd>a keyword from the routine imdisp</dd> 
     
    235235        <dd>a keyword from the routine litchamp</dd> 
    236236         
     237        <dt><a href="./Obsolete/lect.html#_lect">EXPANOM</a></dt> 
     238        <dd>a keyword from the routine lect</dd> 
     239         
    237240        <dt><a href="./Obsolete/lec.html#_lec">EXPANOM</a></dt> 
    238241        <dd>a keyword from the routine lec</dd> 
    239242         
    240         <dt><a href="./Obsolete/lect.html#_lect">EXPANOM</a></dt> 
    241         <dd>a keyword from the routine lect</dd> 
    242          
    243243        <dt><a href="./ToBeReviewed/GRILLE/grille.html#_grille">e1</a></dt> 
    244244        <dd>a parameter from the routine ./ToBeReviewed/GRILLE/grille</dd> 
     
    259259        <dd>a keyword from the routine readoldoparestart</dd> 
    260260         
     261        <dt><a href="./ToBeReviewed/LECTURE/read_ncdf.html#_read_ncdf">ending</a></dt> 
     262        <dd>a parameter from the routine ./ToBeReviewed/LECTURE/read_ncdf</dd> 
     263         
    261264        <dt><a href="./ToBeReviewed/WIDGET/AUTOUR_de_XXX/cutcmd.html#_cutcmd">ending</a></dt> 
    262265        <dd>a parameter from the routine ./ToBeReviewed/WIDGET/AUTOUR_de_XXX/cutcmd</dd> 
    263266         
    264         <dt><a href="./ToBeReviewed/LECTURE/read_ncdf.html#_read_ncdf">ending</a></dt> 
    265         <dd>a parameter from the routine ./ToBeReviewed/LECTURE/read_ncdf</dd> 
    266          
    267267        <dt><a href="./ToBeReviewed/PLOTS/DIVERS/addaxe.html#_addaxe">endpoints</a></dt> 
    268268        <dd>a parameter from the routine ./ToBeReviewed/PLOTS/DIVERS/addaxe</dd> 
     
    352352        <dd>a parameter from the routine ./ToBeReviewed/LECTURE/xncdf_lec</dd> 
    353353         
     354        <dt><a href="./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_calendar.html#_set_cal_combobox">event</a></dt> 
     355        <dd>a parameter from the routine ./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_calendar</dd> 
     356         
     357        <dt><a href="./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_calendar.html#_move">event</a></dt> 
     358        <dd>a parameter from the routine ./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_calendar</dd> 
     359         
    354360        <dt><a href="./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_calendar.html#_cw_calendar_event">event</a></dt> 
    355361        <dd>a parameter from the routine ./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_calendar</dd> 
     
    412418        <dd>a parameter from the routine ./ToBeReviewed/WIDGET/AUTOUR_de_XXX/xxxmenubar_event</dd> 
    413419         
    414         <dt><a href="./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_calendar.html#_set_cal_combobox">event</a></dt> 
    415         <dd>a parameter from the routine ./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_calendar</dd> 
    416          
    417         <dt><a href="./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_calendar.html#_move">event</a></dt> 
    418         <dd>a parameter from the routine ./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_calendar</dd> 
    419          
    420420        <dt><a href="./ToBeReviewed/STRING/strsed.html#_strsed">exp1</a></dt> 
    421421        <dd>a parameter from the routine ./ToBeReviewed/STRING/strsed</dd> 
     
    457457        <dd>a file from the directory ./Interpolation</dd> 
    458458         
     459        <dt><a href="./Interpolation/extrapsmooth.html#_extrapsmooth">extrapsmooth</a></dt> 
     460        <dd>a function from the file extrapsmooth.pro</dd> 
     461         
     462        <dt><a href="Interpolation/extrapsmooth.html">extrapsmooth.pro</a></dt> 
     463        <dd>a file from the directory ./Interpolation</dd> 
     464         
    459465      </dl> 
    460466       
  • trunk/SRC/Documentation/idldoc_html_output/idldoc-index-G.html

    r200 r203  
    175175        <dd>a keyword from the routine extrapolate</dd> 
    176176         
     177        <dt><a href="./Interpolation/extrapsmooth.html#_extrapsmooth">GE0</a></dt> 
     178        <dd>a keyword from the routine extrapsmooth</dd> 
     179         
    177180        <dt><a href="./Interpolation/spl_keep_mean.html#_spl_keep_mean">GE0</a></dt> 
    178181        <dd>a keyword from the routine spl_keep_mean</dd> 
    179182         
     183        <dt><a href="./Grid/ncdf_meshread.html#_ncdf_meshread">GETDIMENSIONS</a></dt> 
     184        <dd>a keyword from the routine ncdf_meshread</dd> 
     185         
     186        <dt><a href="./Obsolete/meshlec.html#_meshlec">GETDIMENSIONS</a></dt> 
     187        <dd>a keyword from the routine meshlec</dd> 
     188         
    180189        <dt><a href="./Grid/ncdf_meshroms.html#_ncdf_meshroms">GETDIMENSIONS</a></dt> 
    181190        <dd>a keyword from the routine ncdf_meshroms</dd> 
    182191         
    183         <dt><a href="./Grid/ncdf_meshread.html#_ncdf_meshread">GETDIMENSIONS</a></dt> 
    184         <dd>a keyword from the routine ncdf_meshread</dd> 
    185          
    186         <dt><a href="./Obsolete/meshlec.html#_meshlec">GETDIMENSIONS</a></dt> 
    187         <dd>a keyword from the routine meshlec</dd> 
    188          
    189192        <dt><a href="./Colors/lct.html#_lct">GET_NAME</a></dt> 
    190193        <dd>a keyword from the routine lct</dd> 
     
    193196        <dd>a keyword from the routine hdyn</dd> 
    194197         
     198        <dt><a href="./Grid/computegrid.html#_computegrid">GLAMBOUNDARY</a></dt> 
     199        <dd>a keyword from the routine computegrid</dd> 
     200         
     201        <dt><a href="./Grid/ncdf_meshread.html#_ncdf_meshread">GLAMBOUNDARY</a></dt> 
     202        <dd>a keyword from the routine ncdf_meshread</dd> 
     203         
    195204        <dt><a href="./Grid/ncdf_meshroms.html#_ncdf_meshroms">GLAMBOUNDARY</a></dt> 
    196205        <dd>a keyword from the routine ncdf_meshroms</dd> 
    197206         
    198         <dt><a href="./Grid/computegrid.html#_computegrid">GLAMBOUNDARY</a></dt> 
    199         <dd>a keyword from the routine computegrid</dd> 
    200          
    201         <dt><a href="./Grid/ncdf_meshread.html#_ncdf_meshread">GLAMBOUNDARY</a></dt> 
    202         <dd>a keyword from the routine ncdf_meshread</dd> 
    203          
    204207        <dt><a href="./Obsolete/meshlec.html#_meshlec">GLAMBOUNDARY</a></dt> 
    205208        <dd>a keyword from the routine meshlec</dd> 
     
    211214        <dd>a keyword from the routine vraidate</dd> 
    212215         
     216        <dt><a href="./Obsolete/lec.html#_lec">GRID</a></dt> 
     217        <dd>a keyword from the routine lec</dd> 
     218         
     219        <dt><a href="./ToBeReviewed/LECTURE/read_ncdf.html#_read_ncdf">GRID</a></dt> 
     220        <dd>a keyword from the routine read_ncdf</dd> 
     221         
     222        <dt><a href="./ToBeReviewed/WIDGET/AUTOUR_de_XXX/scanfile.html#_scanfile">GRID</a></dt> 
     223        <dd>a keyword from the routine scanfile</dd> 
     224         
    213225        <dt><a href="./ToBeReviewed/LECTURE/litchamp.html#_litchamp">GRID</a></dt> 
    214226        <dd>a keyword from the routine litchamp</dd> 
    215227         
    216         <dt><a href="./ToBeReviewed/WIDGET/AUTOUR_de_XXX/scanfile.html#_scanfile">GRID</a></dt> 
    217         <dd>a keyword from the routine scanfile</dd> 
    218          
    219         <dt><a href="./Obsolete/lec.html#_lec">GRID</a></dt> 
    220         <dd>a keyword from the routine lec</dd> 
    221          
    222         <dt><a href="./ToBeReviewed/LECTURE/read_ncdf.html#_read_ncdf">GRID</a></dt> 
    223         <dd>a keyword from the routine read_ncdf</dd> 
    224          
    225228        <dt><a href="./ToBeReviewed/PLOTS/DESSINE/plt.html#_plt">GRIDTYPE</a></dt> 
    226229        <dd>a keyword from the routine plt</dd> 
     
    241244        <dd>a keyword from the routine nlecmois</dd> 
    242245         
     246        <dt><a href="./Obsolete/nlecserie.html#_nlecserie">GRILLE</a></dt> 
     247        <dd>a keyword from the routine nlecserie</dd> 
     248         
    243249        <dt><a href="./Obsolete/nlecsaison.html#_nlecsaison">GRILLE</a></dt> 
    244250        <dd>a keyword from the routine nlecsaison</dd> 
    245251         
    246         <dt><a href="./Obsolete/nlecserie.html#_nlecserie">GRILLE</a></dt> 
    247         <dd>a keyword from the routine nlecserie</dd> 
     252        <dt><a href="./Colors/xlct.html#_xlct">GROUP</a></dt> 
     253        <dd>a keyword from the routine xlct</dd> 
    248254         
    249255        <dt><a href="./ToBeReviewed/LECTURE/xncdf_lec.html#_xncdf_lec">GROUP</a></dt> 
     
    253259        <dd>a keyword from the routine xpal</dd> 
    254260         
    255         <dt><a href="./Colors/xlct.html#_xlct">GROUP</a></dt> 
    256         <dd>a keyword from the routine xlct</dd> 
    257          
    258261        <dt><a href="./ReadWrite/idl-NetCDF/ncdf_read.html#_ncdf_read">gatts</a></dt> 
    259262        <dd>a parameter from the routine ./ReadWrite/idl-NetCDF/ncdf_read</dd> 
  • trunk/SRC/Documentation/idldoc_html_output/idldoc-index-GH.html

    r200 r203  
    388388table.variables td.image { width: 64px; } 
    389389 
    390 div#file_comments { white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre;  
     390div#file_comments { white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre; white-space: pre;  
    391391  margin: 2em; 
    392392  font-size: 80%; 
  • trunk/SRC/Documentation/idldoc_html_output/idldoc-index-I.html

    r200 r203  
    202202        <dd>a keyword from the routine clickincell</dd> 
    203203         
     204        <dt><a href="./Tests/TestsOld/tst_pltz_old.html#_tst_pltz_old">IMAGE</a></dt> 
     205        <dd>a keyword from the routine tst_pltz_old</dd> 
     206         
    204207        <dt><a href="./Picture/imdisp.html#_imdisp">IMAGE</a></dt> 
    205208        <dd>a parameter from the routine ./Picture/imdisp</dd> 
    206209         
     210        <dt><a href="./Tests/tst_plt.html#_tst_plt">IMAGE</a></dt> 
     211        <dd>a keyword from the routine tst_plt</dd> 
     212         
     213        <dt><a href="./Tests/TestsOld/tst_plt_old.html#_tst_plt_old">IMAGE</a></dt> 
     214        <dd>a keyword from the routine tst_plt_old</dd> 
     215         
     216        <dt><a href="./Tests/TestsOld/tst_pltt_old.html#_tst_pltt_old">IMAGE</a></dt> 
     217        <dd>a keyword from the routine tst_pltt_old</dd> 
     218         
    207219        <dt><a href="./Picture/imdisp.html#_imdisp_imsize">IMAGE</a></dt> 
    208220        <dd>a parameter from the routine ./Picture/imdisp</dd> 
     
    211223        <dd>a keyword from the routine tst_pltt</dd> 
    212224         
    213         <dt><a href="./Tests/tst_plt.html#_tst_plt">IMAGE</a></dt> 
    214         <dd>a keyword from the routine tst_plt</dd> 
    215          
    216         <dt><a href="./Tests/TestsOld/tst_pltz_old.html#_tst_pltz_old">IMAGE</a></dt> 
    217         <dd>a keyword from the routine tst_pltz_old</dd> 
    218          
    219         <dt><a href="./Tests/TestsOld/tst_pltt_old.html#_tst_pltt_old">IMAGE</a></dt> 
    220         <dd>a keyword from the routine tst_pltt_old</dd> 
    221          
    222         <dt><a href="./Tests/TestsOld/tst_plt_old.html#_tst_plt_old">IMAGE</a></dt> 
    223         <dd>a keyword from the routine tst_plt_old</dd> 
     225        <dt><a href="./Tests/tst_pltz.html#_tst_pltz">IMAGE</a></dt> 
     226        <dd>a keyword from the routine tst_pltz</dd> 
    224227         
    225228        <dt><a href="./Picture/imdisp.html#_imdisp_imscale">IMAGE</a></dt> 
    226229        <dd>a parameter from the routine ./Picture/imdisp</dd> 
    227230         
    228         <dt><a href="./Tests/tst_pltz.html#_tst_pltz">IMAGE</a></dt> 
    229         <dd>a keyword from the routine tst_pltz</dd> 
    230          
    231231        <dt><a href="./ToBeReviewed/GRILLE/domdef.html#_domdef">INDEX</a></dt> 
    232232        <dd>a keyword from the routine domdef</dd> 
     
    235235        <dd>a keyword from the routine completecointerre</dd> 
    236236         
     237        <dt><a href="./ToBeReviewed/GRILLE/decoupeterre.html#_decoupeterre">INDICEZOOM</a></dt> 
     238        <dd>a keyword from the routine decoupeterre</dd> 
     239         
    237240        <dt><a href="./ToBeReviewed/TRIANGULATION/fillcornermask.html#_fillcornermask">INDICEZOOM</a></dt> 
    238241        <dd>a keyword from the routine fillcornermask</dd> 
    239242         
    240         <dt><a href="./ToBeReviewed/GRILLE/decoupeterre.html#_decoupeterre">INDICEZOOM</a></dt> 
    241         <dd>a keyword from the routine decoupeterre</dd> 
    242          
    243243        <dt><a href="./ToBeReviewed/PLOTS/DESSINE/pltbase.html#_pltbase">INDICEZOOMMASK</a></dt> 
    244244        <dd>a keyword from the routine pltbase</dd> 
     
    265265        <dd>a keyword from the routine cw_field2</dd> 
    266266         
     267        <dt><a href="./ToBeReviewed/CALCULS/moyenne.html#_moyenne">INTEGRATION</a></dt> 
     268        <dd>a keyword from the routine moyenne</dd> 
     269         
    267270        <dt><a href="./ToBeReviewed/CALCULS/grossemoyenne.html#_grossemoyenne">INTEGRATION</a></dt> 
    268271        <dd>a keyword from the routine grossemoyenne</dd> 
    269272         
    270         <dt><a href="./ToBeReviewed/CALCULS/moyenne.html#_moyenne">INTEGRATION</a></dt> 
    271         <dd>a keyword from the routine moyenne</dd> 
    272          
    273273        <dt><a href="./Picture/imdisp.html#_imdisp_imregrid">INTERP</a></dt> 
    274274        <dd>a keyword from the routine imdisp_imregrid</dd> 
     
    277277        <dd>a keyword from the routine imdisp</dd> 
    278278         
     279        <dt><a href="./ToBeReviewed/PLOTS/LABEL/label.html#_label">INTERVALLE</a></dt> 
     280        <dd>a keyword from the routine label</dd> 
     281         
    279282        <dt><a href="./ToBeReviewed/PLOTS/DIVERS/determineminmax.html#_determineminmax">INTERVALLE</a></dt> 
    280283        <dd>a keyword from the routine determineminmax</dd> 
    281284         
     285        <dt><a href="./ToBeReviewed/PLOTS/DESSINE/pltz.html#_pltz">INTERVALLE</a></dt> 
     286        <dd>a keyword from the routine pltz</dd> 
     287         
    282288        <dt><a href="./ToBeReviewed/PLOTS/legende.html#_legende">INTERVALLE</a></dt> 
    283289        <dd>a keyword from the routine legende</dd> 
    284290         
    285         <dt><a href="./ToBeReviewed/PLOTS/LABEL/label.html#_label">INTERVALLE</a></dt> 
    286         <dd>a keyword from the routine label</dd> 
    287          
    288         <dt><a href="./ToBeReviewed/PLOTS/DESSINE/pltz.html#_pltz">INTERVALLE</a></dt> 
    289         <dd>a keyword from the routine pltz</dd> 
     291        <dt><a href="./ToBeReviewed/PLOTS/DESSINE/plt.html#_plt">INTERVALLE</a></dt> 
     292        <dd>a keyword from the routine plt</dd> 
    290293         
    291294        <dt><a href="./ToBeReviewed/PLOTS/DESSINE/pltt.html#_pltt">INTERVALLE</a></dt> 
    292295        <dd>a keyword from the routine pltt</dd> 
    293296         
    294         <dt><a href="./ToBeReviewed/PLOTS/DESSINE/plt.html#_plt">INTERVALLE</a></dt> 
     297        <dt><a href="./ToBeReviewed/PLOTS/DESSINE/pltt.html#_pltt">INV</a></dt> 
     298        <dd>a keyword from the routine pltt</dd> 
     299         
     300        <dt><a href="./ToBeReviewed/PLOTS/DESSINE/plt.html#_plt">INV</a></dt> 
    295301        <dd>a keyword from the routine plt</dd> 
    296302         
     
    298304        <dd>a keyword from the routine pltz</dd> 
    299305         
    300         <dt><a href="./ToBeReviewed/PLOTS/DESSINE/pltt.html#_pltt">INV</a></dt> 
    301         <dd>a keyword from the routine pltt</dd> 
    302          
    303         <dt><a href="./ToBeReviewed/PLOTS/DESSINE/plt.html#_plt">INV</a></dt> 
    304         <dd>a keyword from the routine plt</dd> 
    305          
    306306        <dt><a href="./ToBeReviewed/INIT/initncdf.html#_initncdf">INVMASK</a></dt> 
    307307        <dd>a keyword from the routine initncdf</dd> 
    308308         
     309        <dt><a href="./ToBeReviewed/LECTURE/ncdf_lec.html#_ncdf_lec">IODIR</a></dt> 
     310        <dd>a keyword from the routine ncdf_lec</dd> 
     311         
     312        <dt><a href="./Grid/smallmeshmask.html#_smallmeshmask">IODIR</a></dt> 
     313        <dd>a keyword from the routine smallmeshmask</dd> 
     314         
    309315        <dt><a href="./Grid/micromeshmask.html#_micromeshmask">IODIR</a></dt> 
    310316        <dd>a keyword from the routine micromeshmask</dd> 
    311317         
    312         <dt><a href="./ToBeReviewed/LECTURE/ncdf_lec.html#_ncdf_lec">IODIR</a></dt> 
    313         <dd>a keyword from the routine ncdf_lec</dd> 
    314          
    315318        <dt><a href="./ToBeReviewed/LECTURE/xncdf_lec.html#_xncdf_lec">IODIR</a></dt> 
    316319        <dd>a keyword from the routine xncdf_lec</dd> 
    317320         
    318         <dt><a href="./Grid/smallmeshmask.html#_smallmeshmask">IODIR</a></dt> 
    319         <dd>a keyword from the routine smallmeshmask</dd> 
    320          
    321321        <dt><a href="./Utilities/isadirectory.html#_isadirectory">IODIRECTORY</a></dt> 
    322322        <dd>a keyword from the routine isadirectory</dd> 
    323323         
     324        <dt><a href="./Utilities/isafile.html#_isafile">IODIRECTORY</a></dt> 
     325        <dd>a keyword from the routine isafile</dd> 
     326         
     327        <dt><a href="./Interpolation/angle.html#_angle">IODIRECTORY</a></dt> 
     328        <dd>a keyword from the routine angle</dd> 
     329         
    324330        <dt><a href="./Utilities/find.html#_find">IODIRECTORY</a></dt> 
    325331        <dd>a keyword from the routine find</dd> 
    326332         
    327         <dt><a href="./Utilities/isafile.html#_isafile">IODIRECTORY</a></dt> 
    328         <dd>a keyword from the routine isafile</dd> 
    329          
    330         <dt><a href="./Interpolation/angle.html#_angle">IODIRECTORY</a></dt> 
    331         <dd>a keyword from the routine angle</dd> 
    332          
    333333        <dt><a href="./ToBeReviewed/STRUCTURE/where_tag.html#_where_tag">ISELECT</a></dt> 
    334334        <dd>a keyword from the routine where_tag</dd> 
     
    352352        <dd>a parameter from the routine ./Colors/xlct</dd> 
    353353         
     354        <dt><a href="./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_calendar.html#_cw_calendar_get_value">id</a></dt> 
     355        <dd>a parameter from the routine ./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_calendar</dd> 
     356         
     357        <dt><a href="./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_specifie.html#_cw_specifie_get_value">id</a></dt> 
     358        <dd>a parameter from the routine ./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_specifie</dd> 
     359         
     360        <dt><a href="./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_specifie.html#_cw_specifie_set_value">id</a></dt> 
     361        <dd>a parameter from the routine ./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_specifie</dd> 
     362         
     363        <dt><a href="./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_slider_pm.html#_cw_slider_pm_get_value">id</a></dt> 
     364        <dd>a parameter from the routine ./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_slider_pm</dd> 
     365         
     366        <dt><a href="./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_slider_pm.html#_cw_slider_pm_set_value">id</a></dt> 
     367        <dd>a parameter from the routine ./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_slider_pm</dd> 
     368         
     369        <dt><a href="./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_slide_slice.html#_cw_slide_slice_set_value">id</a></dt> 
     370        <dd>a parameter from the routine ./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_slide_slice</dd> 
     371         
     372        <dt><a href="./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_droplist_pm.html#_cw_droplist_pm_get_value">id</a></dt> 
     373        <dd>a parameter from the routine ./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_droplist_pm</dd> 
     374         
     375        <dt><a href="./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_droplist_pm.html#_cw_droplist_pm_set_value">id</a></dt> 
     376        <dd>a parameter from the routine ./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_droplist_pm</dd> 
     377         
     378        <dt><a href="./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_domain.html#_cw_domain_get_value">id</a></dt> 
     379        <dd>a parameter from the routine ./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_domain</dd> 
     380         
     381        <dt><a href="./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_domain.html#_cw_domain_set_value">id</a></dt> 
     382        <dd>a parameter from the routine ./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_domain</dd> 
     383         
     384        <dt><a href="./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_combobox_pm.html#_cw_combobox_pm_get_value">id</a></dt> 
     385        <dd>a parameter from the routine ./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_combobox_pm</dd> 
     386         
     387        <dt><a href="./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_combobox_pm.html#_cw_combobox_pm_set_value">id</a></dt> 
     388        <dd>a parameter from the routine ./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_combobox_pm</dd> 
     389         
     390        <dt><a href="./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_calendar.html#_get_cal_value">id</a></dt> 
     391        <dd>a parameter from the routine ./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_calendar</dd> 
     392         
     393        <dt><a href="./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_calendar.html#_cw_calendar_set_value">id</a></dt> 
     394        <dd>a parameter from the routine ./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_calendar</dd> 
     395         
     396        <dt><a href="./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_bgroup.html#_cw_bgroup_getv">id</a></dt> 
     397        <dd>a parameter from the routine ./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_bgroup</dd> 
     398         
     399        <dt><a href="./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_bgroup.html#_cw_bgroup_setv">id</a></dt> 
     400        <dd>a parameter from the routine ./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_bgroup</dd> 
     401         
    354402        <dt><a href="./ToBeReviewed/HOPE/cw_selectinterval.html#_cw_selectinterval_get_value">id</a></dt> 
    355403        <dd>a parameter from the routine ./ToBeReviewed/HOPE/cw_selectinterval</dd> 
    356404         
    357         <dt><a href="./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_calendar.html#_cw_calendar_set_value">id</a></dt> 
    358         <dd>a parameter from the routine ./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_calendar</dd> 
    359          
    360         <dt><a href="./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_calendar.html#_cw_calendar_get_value">id</a></dt> 
    361         <dd>a parameter from the routine ./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_calendar</dd> 
    362          
    363         <dt><a href="./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_calendar.html#_get_cal_value">id</a></dt> 
    364         <dd>a parameter from the routine ./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_calendar</dd> 
    365          
    366         <dt><a href="./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_bgroup.html#_cw_bgroup_setv">id</a></dt> 
    367         <dd>a parameter from the routine ./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_bgroup</dd> 
    368          
    369         <dt><a href="./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_bgroup.html#_cw_bgroup_getv">id</a></dt> 
    370         <dd>a parameter from the routine ./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_bgroup</dd> 
    371          
    372         <dt><a href="./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_specifie.html#_cw_specifie_get_value">id</a></dt> 
    373         <dd>a parameter from the routine ./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_specifie</dd> 
    374          
    375         <dt><a href="./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_slider_pm.html#_cw_slider_pm_get_value">id</a></dt> 
    376         <dd>a parameter from the routine ./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_slider_pm</dd> 
    377          
    378         <dt><a href="./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_specifie.html#_cw_specifie_set_value">id</a></dt> 
    379         <dd>a parameter from the routine ./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_specifie</dd> 
    380          
    381         <dt><a href="./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_combobox_pm.html#_cw_combobox_pm_set_value">id</a></dt> 
    382         <dd>a parameter from the routine ./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_combobox_pm</dd> 
    383          
    384         <dt><a href="./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_combobox_pm.html#_cw_combobox_pm_get_value">id</a></dt> 
    385         <dd>a parameter from the routine ./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_combobox_pm</dd> 
    386          
    387         <dt><a href="./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_domain.html#_cw_domain_set_value">id</a></dt> 
    388         <dd>a parameter from the routine ./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_domain</dd> 
    389          
    390         <dt><a href="./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_domain.html#_cw_domain_get_value">id</a></dt> 
    391         <dd>a parameter from the routine ./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_domain</dd> 
    392          
    393         <dt><a href="./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_droplist_pm.html#_cw_droplist_pm_set_value">id</a></dt> 
    394         <dd>a parameter from the routine ./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_droplist_pm</dd> 
    395          
    396         <dt><a href="./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_droplist_pm.html#_cw_droplist_pm_get_value">id</a></dt> 
    397         <dd>a parameter from the routine ./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_droplist_pm</dd> 
    398          
    399         <dt><a href="./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_slide_slice.html#_cw_slide_slice_set_value">id</a></dt> 
    400         <dd>a parameter from the routine ./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_slide_slice</dd> 
    401          
    402         <dt><a href="./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_slider_pm.html#_cw_slider_pm_set_value">id</a></dt> 
    403         <dd>a parameter from the routine ./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_slider_pm</dd> 
    404          
    405405        <dt><a href="./ToBeReviewed/WIDGET/AUTOUR_de_XXX/identifyclick.html#_identifyclick">identifyclick</a></dt> 
    406406        <dd>a function from the file identifyclick.pro</dd> 
     
    478478        <dd>a file from the directory ./Obsolete</dd> 
    479479         
     480        <dt><a href="./Interpolation/extrapsmooth.html#_extrapsmooth">in</a></dt> 
     481        <dd>a parameter from the routine ./Interpolation/extrapsmooth</dd> 
     482         
    480483        <dt><a href="./ToBeReviewed/CALCULS/determ3.html#_determ3">in00</a></dt> 
    481484        <dd>a parameter from the routine ./ToBeReviewed/CALCULS/determ3</dd> 
  • trunk/SRC/Documentation/idldoc_html_output/idldoc-index-M.html

    r200 r203  
    172172      <dl> 
    173173         
     174        <dt><a href="./ToBeReviewed/STATISTICS/c_timecorrelate.html#_timecross_cov">M</a></dt> 
     175        <dd>a parameter from the routine ./ToBeReviewed/STATISTICS/c_timecorrelate</dd> 
     176         
    174177        <dt><a href="./ToBeReviewed/STATISTICS/a_timecorrelate.html#_timeauto_cov">M</a></dt> 
    175178        <dd>a parameter from the routine ./ToBeReviewed/STATISTICS/a_timecorrelate</dd> 
    176179         
    177         <dt><a href="./ToBeReviewed/STATISTICS/c_timecorrelate.html#_timecross_cov">M</a></dt> 
    178         <dd>a parameter from the routine ./ToBeReviewed/STATISTICS/c_timecorrelate</dd> 
    179          
    180180        <dt><a href="./ToBeReviewed/STRING/strsci.html#_strsci">MANTISSA_ONLY</a></dt> 
    181181        <dd>a keyword from the routine strsci</dd> 
     
    184184        <dd>a keyword from the routine cw_bgroup</dd> 
    185185         
     186        <dt><a href="./ToBeReviewed/PLOTS/DIVERS/placedessin.html#_placedessin">MAP</a></dt> 
     187        <dd>a keyword from the routine placedessin</dd> 
     188         
    186189        <dt><a href="./ToBeReviewed/PLOTS/DESSINE/plt.html#_plt">MAP</a></dt> 
    187190        <dd>a keyword from the routine plt</dd> 
    188191         
    189         <dt><a href="./ToBeReviewed/PLOTS/DIVERS/placedessin.html#_placedessin">MAP</a></dt> 
    190         <dd>a keyword from the routine placedessin</dd> 
    191          
    192192        <dt><a href="./ToBeReviewed/PLOTS/DIVERS/placedessin.html#_placedessin">MARGES</a></dt> 
    193193        <dd>a keyword from the routine placedessin</dd> 
     
    196196        <dd>a keyword from the routine imdisp</dd> 
    197197         
     198        <dt><a href="./Picture/imdisp.html#_imdisp_imsize">MARGIN</a></dt> 
     199        <dd>a keyword from the routine imdisp_imsize</dd> 
     200         
    198201        <dt><a href="./Picture/imdisp.html#_imdisp_getpos">MARGIN</a></dt> 
    199202        <dd>a keyword from the routine imdisp_getpos</dd> 
    200203         
    201         <dt><a href="./Picture/imdisp.html#_imdisp_imsize">MARGIN</a></dt> 
    202         <dd>a keyword from the routine imdisp_imsize</dd> 
    203          
    204204        <dt><a href="./ToBeReviewed/PLOTS/DESSINE/tvplus.html#_tvplus">MASK</a></dt> 
    205205        <dd>a keyword from the routine tvplus</dd> 
     
    211211        <dd>a keyword from the routine litchamp</dd> 
    212212         
     213        <dt><a href="./ToBeReviewed/PLOTS/DESSINE/plt.html#_plt">MASKFILL</a></dt> 
     214        <dd>a keyword from the routine plt</dd> 
     215         
    213216        <dt><a href="./ToBeReviewed/PLOTS/DESSINE/pltz.html#_pltz">MASKFILL</a></dt> 
    214217        <dd>a keyword from the routine pltz</dd> 
    215218         
    216         <dt><a href="./ToBeReviewed/PLOTS/DESSINE/plt.html#_plt">MASKFILL</a></dt> 
    217         <dd>a keyword from the routine plt</dd> 
    218          
    219219        <dt><a href="./ToBeReviewed/INIT/initncdf.html#_initncdf">MASKNAME</a></dt> 
    220220        <dd>a keyword from the routine initncdf</dd> 
     
    229229        <dd>a keyword from the routine pltv</dd> 
    230230         
     231        <dt><a href="./Colors/colorbar.html#_colorbar">MAX</a></dt> 
     232        <dd>a keyword from the routine colorbar</dd> 
     233         
     234        <dt><a href="./ToBeReviewed/PLOTS/DESSINE/tvplus.html#_tvplus">MAX</a></dt> 
     235        <dd>a keyword from the routine tvplus</dd> 
     236         
     237        <dt><a href="./ToBeReviewed/PLOTS/DIVERS/barrecouleur.html#_barrecouleur">MAX</a></dt> 
     238        <dd>a keyword from the routine barrecouleur</dd> 
     239         
    231240        <dt><a href="./ToBeReviewed/PLOTS/DIVERS/checktypeminmax.html#_checktypeminmax">MAX</a></dt> 
    232241        <dd>a keyword from the routine checktypeminmax</dd> 
    233242         
    234         <dt><a href="./ToBeReviewed/PLOTS/DESSINE/tvplus.html#_tvplus">MAX</a></dt> 
    235         <dd>a keyword from the routine tvplus</dd> 
    236          
    237         <dt><a href="./ToBeReviewed/PLOTS/DIVERS/barrecouleur.html#_barrecouleur">MAX</a></dt> 
    238         <dd>a keyword from the routine barrecouleur</dd> 
    239          
    240         <dt><a href="./Colors/colorbar.html#_colorbar">MAX</a></dt> 
    241         <dd>a keyword from the routine colorbar</dd> 
    242          
    243243        <dt><a href="./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_slider_pm.html#_cw_slider_pm">MAXIMUM</a></dt> 
    244244        <dd>a keyword from the routine cw_slider_pm</dd> 
    245245         
     246        <dt><a href="./ToBeReviewed/PLOTS/DESSINE/pltz.html#_pltz">MAXIN</a></dt> 
     247        <dd>a keyword from the routine pltz</dd> 
     248         
    246249        <dt><a href="./ToBeReviewed/PLOTS/DESSINE/pltv.html#_pltv">MAXIN</a></dt> 
    247250        <dd>a keyword from the routine pltv</dd> 
    248251         
    249         <dt><a href="./ToBeReviewed/PLOTS/DESSINE/pltz.html#_pltz">MAXIN</a></dt> 
    250         <dd>a keyword from the routine pltz</dd> 
     252        <dt><a href="./ToBeReviewed/PLOTS/DESSINE/pltt.html#_pltt">MAXIN</a></dt> 
     253        <dd>a keyword from the routine pltt</dd> 
    251254         
    252255        <dt><a href="./ToBeReviewed/PLOTS/DESSINE/plt1d.html#_plt1d">MAXIN</a></dt> 
    253256        <dd>a keyword from the routine plt1d</dd> 
    254257         
     258        <dt><a href="./ToBeReviewed/PLOTS/DESSINE/plt.html#_plt">MAXIN</a></dt> 
     259        <dd>a keyword from the routine plt</dd> 
     260         
    255261        <dt><a href="./ToBeReviewed/PLOTS/DIVERS/determineminmax.html#_determineminmax">MAXIN</a></dt> 
    256262        <dd>a keyword from the routine determineminmax</dd> 
    257263         
    258         <dt><a href="./ToBeReviewed/PLOTS/DESSINE/plt.html#_plt">MAXIN</a></dt> 
    259         <dd>a keyword from the routine plt</dd> 
    260          
    261         <dt><a href="./ToBeReviewed/PLOTS/DESSINE/pltt.html#_pltt">MAXIN</a></dt> 
    262         <dd>a keyword from the routine pltt</dd> 
     264        <dt><a href="./Interpolation/extrapsmooth.html#_extrapsmooth">MAXVAL</a></dt> 
     265        <dd>a keyword from the routine extrapsmooth</dd> 
    263266         
    264267        <dt><a href="./Interpolation/extrapolate.html#_extrapolate">MAXVAL</a></dt> 
     
    283286        <dd>a keyword from the routine checktypeminmax</dd> 
    284287         
     288        <dt><a href="./ToBeReviewed/PLOTS/DIVERS/barrecouleur.html#_barrecouleur">MIN</a></dt> 
     289        <dd>a keyword from the routine barrecouleur</dd> 
     290         
     291        <dt><a href="./Colors/colorbar.html#_colorbar">MIN</a></dt> 
     292        <dd>a keyword from the routine colorbar</dd> 
     293         
    285294        <dt><a href="./ToBeReviewed/PLOTS/DESSINE/tvplus.html#_tvplus">MIN</a></dt> 
    286295        <dd>a keyword from the routine tvplus</dd> 
    287296         
    288         <dt><a href="./Colors/colorbar.html#_colorbar">MIN</a></dt> 
    289         <dd>a keyword from the routine colorbar</dd> 
    290          
    291         <dt><a href="./ToBeReviewed/PLOTS/DIVERS/barrecouleur.html#_barrecouleur">MIN</a></dt> 
    292         <dd>a keyword from the routine barrecouleur</dd> 
    293          
    294297        <dt><a href="./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_slider_pm.html#_cw_slider_pm">MINIMUM</a></dt> 
    295298        <dd>a keyword from the routine cw_slider_pm</dd> 
    296299         
     300        <dt><a href="./ToBeReviewed/PLOTS/DIVERS/determineminmax.html#_determineminmax">MININ</a></dt> 
     301        <dd>a keyword from the routine determineminmax</dd> 
     302         
     303        <dt><a href="./ToBeReviewed/PLOTS/DESSINE/pltv.html#_pltv">MININ</a></dt> 
     304        <dd>a keyword from the routine pltv</dd> 
     305         
     306        <dt><a href="./ToBeReviewed/PLOTS/DESSINE/pltz.html#_pltz">MININ</a></dt> 
     307        <dd>a keyword from the routine pltz</dd> 
     308         
     309        <dt><a href="./ToBeReviewed/PLOTS/DESSINE/plt.html#_plt">MININ</a></dt> 
     310        <dd>a keyword from the routine plt</dd> 
     311         
    297312        <dt><a href="./ToBeReviewed/PLOTS/DESSINE/plt1d.html#_plt1d">MININ</a></dt> 
    298313        <dd>a keyword from the routine plt1d</dd> 
    299314         
    300         <dt><a href="./ToBeReviewed/PLOTS/DIVERS/determineminmax.html#_determineminmax">MININ</a></dt> 
    301         <dd>a keyword from the routine determineminmax</dd> 
    302          
    303         <dt><a href="./ToBeReviewed/PLOTS/DESSINE/pltv.html#_pltv">MININ</a></dt> 
    304         <dd>a keyword from the routine pltv</dd> 
    305          
    306         <dt><a href="./ToBeReviewed/PLOTS/DESSINE/plt.html#_plt">MININ</a></dt> 
    307         <dd>a keyword from the routine plt</dd> 
    308          
    309315        <dt><a href="./ToBeReviewed/PLOTS/DESSINE/pltt.html#_pltt">MININ</a></dt> 
    310316        <dd>a keyword from the routine pltt</dd> 
    311317         
    312         <dt><a href="./ToBeReviewed/PLOTS/DESSINE/pltz.html#_pltz">MININ</a></dt> 
    313         <dd>a keyword from the routine pltz</dd> 
     318        <dt><a href="./Interpolation/extrapsmooth.html#_extrapsmooth">MINVAL</a></dt> 
     319        <dd>a keyword from the routine extrapsmooth</dd> 
    314320         
    315321        <dt><a href="./Interpolation/extrapolate.html#_extrapolate">MINVAL</a></dt> 
     
    370376        <dd>a parameter from the routine ./ToBeReviewed/POSTSCRIPT/calibre</dd> 
    371377         
     378        <dt><a href="./ToBeReviewed/GRILLE/grille.html#_grille">mask</a></dt> 
     379        <dd>a parameter from the routine ./ToBeReviewed/GRILLE/grille</dd> 
     380         
     381        <dt><a href="./ToBeReviewed/CALCULS/remplit.html#_remplit">mask</a></dt> 
     382        <dd>a keyword from the routine remplit</dd> 
     383         
     384        <dt><a href="./ToBeReviewed/GRILLE/decoupeterre.html#_decoupeterre">mask</a></dt> 
     385        <dd>a parameter from the routine ./ToBeReviewed/GRILLE/decoupeterre</dd> 
     386         
     387        <dt><a href="./ToBeReviewed/PLOTS/DESSINE/pltbase.html#_pltbase">mask</a></dt> 
     388        <dd>a parameter from the routine ./ToBeReviewed/PLOTS/DESSINE/pltbase</dd> 
     389         
     390        <dt><a href="./ToBeReviewed/PLOTS/DIVERS/axis4pltz.html#_axis4pltz">mask</a></dt> 
     391        <dd>a parameter from the routine ./ToBeReviewed/PLOTS/DIVERS/axis4pltz</dd> 
     392         
    372393        <dt><a href="./ToBeReviewed/PLOTS/DIVERS/determineminmax.html#_determineminmax">mask</a></dt> 
    373394        <dd>a parameter from the routine ./ToBeReviewed/PLOTS/DIVERS/determineminmax</dd> 
    374395         
    375         <dt><a href="./ToBeReviewed/GRILLE/decoupeterre.html#_decoupeterre">mask</a></dt> 
    376         <dd>a parameter from the routine ./ToBeReviewed/GRILLE/decoupeterre</dd> 
    377          
    378         <dt><a href="./ToBeReviewed/CALCULS/remplit.html#_remplit">mask</a></dt> 
    379         <dd>a keyword from the routine remplit</dd> 
    380          
    381         <dt><a href="./ToBeReviewed/PLOTS/DESSINE/pltbase.html#_pltbase">mask</a></dt> 
    382         <dd>a parameter from the routine ./ToBeReviewed/PLOTS/DESSINE/pltbase</dd> 
    383          
    384396        <dt><a href="./ToBeReviewed/TRIANGULATION/drawcoast_c.html#_drawcoast_c">mask</a></dt> 
    385397        <dd>a parameter from the routine ./ToBeReviewed/TRIANGULATION/drawcoast_c</dd> 
     
    388400        <dd>a parameter from the routine ./ToBeReviewed/TRIANGULATION/drawcoast_e</dd> 
    389401         
    390         <dt><a href="./ToBeReviewed/PLOTS/DIVERS/axis4pltz.html#_axis4pltz">mask</a></dt> 
    391         <dd>a parameter from the routine ./ToBeReviewed/PLOTS/DIVERS/axis4pltz</dd> 
    392          
    393         <dt><a href="./ToBeReviewed/GRILLE/grille.html#_grille">mask</a></dt> 
    394         <dd>a parameter from the routine ./ToBeReviewed/GRILLE/grille</dd> 
     402        <dt><a href="./ToBeReviewed/TRIANGULATION/triangule_e.html#_triangule_e">maskentree</a></dt> 
     403        <dd>a parameter from the routine ./ToBeReviewed/TRIANGULATION/triangule_e</dd> 
    395404         
    396405        <dt><a href="./ToBeReviewed/TRIANGULATION/tracemask.html#_tracemask">maskentree</a></dt> 
     
    403412        <dd>a parameter from the routine ./ToBeReviewed/TRIANGULATION/triangule_c</dd> 
    404413         
    405         <dt><a href="./ToBeReviewed/TRIANGULATION/triangule_e.html#_triangule_e">maskentree</a></dt> 
    406         <dd>a parameter from the routine ./ToBeReviewed/TRIANGULATION/triangule_e</dd> 
    407          
    408414        <dt><a href="./ToBeReviewed/TRIANGULATION/drawsectionbottom.html#_drawsectionbottom">maskin</a></dt> 
    409415        <dd>a parameter from the routine ./ToBeReviewed/TRIANGULATION/drawsectionbottom</dd> 
     
    421427        <dd>a parameter from the routine ./ToBeReviewed/PLOTS/DIVERS/autoscale</dd> 
    422428         
     429        <dt><a href="./ToBeReviewed/PLOTS/LABEL/label_gmt.html#_label_gmt">max</a></dt> 
     430        <dd>a parameter from the routine ./ToBeReviewed/PLOTS/LABEL/label_gmt</dd> 
     431         
    423432        <dt><a href="./ToBeReviewed/PLOTS/DESSINE/pltv.html#_pltv">max</a></dt> 
    424433        <dd>a parameter from the routine ./ToBeReviewed/PLOTS/DESSINE/pltv</dd> 
     
    427436        <dd>a parameter from the routine ./ToBeReviewed/PLOTS/LABEL/label</dd> 
    428437         
    429         <dt><a href="./ToBeReviewed/PLOTS/LABEL/label_gmt.html#_label_gmt">max</a></dt> 
    430         <dd>a parameter from the routine ./ToBeReviewed/PLOTS/LABEL/label_gmt</dd> 
    431          
    432438        <dt><a href="./ToBeReviewed/PLOTS/DESSINE/pltsc.html#_pltsc">max1</a></dt> 
    433439        <dd>a parameter from the routine ./ToBeReviewed/PLOTS/DESSINE/pltsc</dd> 
     
    475481        <dd>a file from the directory ./Grid</dd> 
    476482         
     483        <dt><a href="./ToBeReviewed/PLOTS/DESSINE/pltv.html#_pltv">min</a></dt> 
     484        <dd>a parameter from the routine ./ToBeReviewed/PLOTS/DESSINE/pltv</dd> 
     485         
    477486        <dt><a href="./ToBeReviewed/PLOTS/DIVERS/autoscale.html#_autoscale">min</a></dt> 
    478487        <dd>a parameter from the routine ./ToBeReviewed/PLOTS/DIVERS/autoscale</dd> 
    479488         
    480         <dt><a href="./ToBeReviewed/PLOTS/DESSINE/pltv.html#_pltv">min</a></dt> 
    481         <dd>a parameter from the routine ./ToBeReviewed/PLOTS/DESSINE/pltv</dd> 
    482          
    483489        <dt><a href="./ToBeReviewed/PLOTS/LABEL/label.html#_label">min</a></dt> 
    484490        <dd>a parameter from the routine ./ToBeReviewed/PLOTS/LABEL/label</dd> 
     
    505511        <dd>a parameter from the routine ./Obsolete/jourdsmois</dd> 
    506512         
     513        <dt><a href="./Calendar/daysinmonth.html#_daysinmonth">month</a></dt> 
     514        <dd>a parameter from the routine ./Calendar/daysinmonth</dd> 
     515         
     516        <dt><a href="./Calendar/caldat.html#_caldat">month</a></dt> 
     517        <dd>a parameter from the routine ./Calendar/caldat</dd> 
     518         
    507519        <dt><a href="./Calendar/monthname.html#_monthname">month</a></dt> 
    508520        <dd>a parameter from the routine ./Calendar/monthname</dd> 
    509521         
    510         <dt><a href="./Calendar/daysinmonth.html#_daysinmonth">month</a></dt> 
    511         <dd>a parameter from the routine ./Calendar/daysinmonth</dd> 
    512          
    513         <dt><a href="./Calendar/caldat.html#_caldat">month</a></dt> 
    514         <dd>a parameter from the routine ./Calendar/caldat</dd> 
    515          
    516522        <dt><a href="./Calendar/monthname.html#_monthname">monthname</a></dt> 
    517523        <dd>a function from the file monthname.pro</dd> 
     
    532538        <dd>a parameter from the routine ./Grid/numbisland</dd> 
    533539         
     540        <dt><a href="./Interpolation/extrapsmooth.html#_extrapsmooth">mskin</a></dt> 
     541        <dd>a parameter from the routine ./Interpolation/extrapsmooth</dd> 
     542         
     543        <dt><a href="./Interpolation/fromirr.html#_fromirr">mskin</a></dt> 
     544        <dd>a parameter from the routine ./Interpolation/fromirr</dd> 
     545         
    534546        <dt><a href="./Grid/numbisland.html#_numbisland">mskin</a></dt> 
    535547        <dd>a parameter from the routine ./Grid/numbisland</dd> 
    536548         
    537         <dt><a href="./Interpolation/fromirr.html#_fromirr">mskin</a></dt> 
    538         <dd>a parameter from the routine ./Interpolation/fromirr</dd> 
    539          
    540549        <dt><a href="./Grid/numbisland.html#_mskneig">mskneig</a></dt> 
    541550        <dd>a procedure from the file numbisland.pro</dd> 
  • trunk/SRC/Documentation/idldoc_html_output/idldoc-index-X.html

    r200 r203  
    172172      <dl> 
    173173         
     174        <dt><a href="./ToBeReviewed/STATISTICS/a_correlate2d.html#_auto_cov2d">X</a></dt> 
     175        <dd>a parameter from the routine ./ToBeReviewed/STATISTICS/a_correlate2d</dd> 
     176         
     177        <dt><a href="./ToBeReviewed/PLOTS/DESSINE/plt1d.html#_plt1d">X</a></dt> 
     178        <dd>a keyword from the routine plt1d</dd> 
     179         
     180        <dt><a href="./ToBeReviewed/PLOTS/DIVERS/rotation.html#_rotation">X</a></dt> 
     181        <dd>a parameter from the routine ./ToBeReviewed/PLOTS/DIVERS/rotation</dd> 
     182         
    174183        <dt><a href="./ToBeReviewed/STATISTICS/c_timecorrelate.html#_c_timecorrelate">X</a></dt> 
    175184        <dd>a parameter from the routine ./ToBeReviewed/STATISTICS/c_timecorrelate</dd> 
    176185         
    177         <dt><a href="./ToBeReviewed/PLOTS/DESSINE/plt1d.html#_plt1d">X</a></dt> 
    178         <dd>a keyword from the routine plt1d</dd> 
    179          
    180186        <dt><a href="./ToBeReviewed/PLOTS/VECTEUR/velovect.html#_velovect">X</a></dt> 
    181187        <dd>a parameter from the routine ./ToBeReviewed/PLOTS/VECTEUR/velovect</dd> 
    182188         
    183         <dt><a href="./ToBeReviewed/PLOTS/DIVERS/rotation.html#_rotation">X</a></dt> 
    184         <dd>a parameter from the routine ./ToBeReviewed/PLOTS/DIVERS/rotation</dd> 
    185          
    186189        <dt><a href="./ToBeReviewed/STATISTICS/a_timecorrelate.html#_a_timecorrelate">X</a></dt> 
    187190        <dd>a parameter from the routine ./ToBeReviewed/STATISTICS/a_timecorrelate</dd> 
    188191         
    189         <dt><a href="./ToBeReviewed/STATISTICS/a_correlate2d.html#_auto_cov2d">X</a></dt> 
    190         <dd>a parameter from the routine ./ToBeReviewed/STATISTICS/a_correlate2d</dd> 
     192        <dt><a href="./ToBeReviewed/STATISTICS/a_timecorrelate.html#_timeauto_cov">X</a></dt> 
     193        <dd>a parameter from the routine ./ToBeReviewed/STATISTICS/a_timecorrelate</dd> 
    191194         
    192195        <dt><a href="./ToBeReviewed/STATISTICS/a_correlate2d.html#_a_correlate2d">X</a></dt> 
    193196        <dd>a parameter from the routine ./ToBeReviewed/STATISTICS/a_correlate2d</dd> 
    194197         
    195         <dt><a href="./ToBeReviewed/STATISTICS/a_timecorrelate.html#_timeauto_cov">X</a></dt> 
    196         <dd>a parameter from the routine ./ToBeReviewed/STATISTICS/a_timecorrelate</dd> 
    197          
    198198        <dt><a href="./Picture/imdisp.html#_imdisp_imsize">X0</a></dt> 
    199199        <dd>a parameter from the routine ./Picture/imdisp</dd> 
     
    205205        <dd>a keyword from the routine initncdf</dd> 
    206206         
     207        <dt><a href="./ToBeReviewed/GRILLE/domdef.html#_domdef">XINDEX</a></dt> 
     208        <dd>a keyword from the routine domdef</dd> 
     209         
    207210        <dt><a href="./ToBeReviewed/PLOTS/DIVERS/checktypeminmax.html#_checktypeminmax">XINDEX</a></dt> 
    208211        <dd>a keyword from the routine checktypeminmax</dd> 
    209212         
    210         <dt><a href="./ToBeReviewed/GRILLE/domdef.html#_domdef">XINDEX</a></dt> 
    211         <dd>a keyword from the routine domdef</dd> 
    212          
    213213        <dt><a href="./ToBeReviewed/HOPE/read_hope.html#_read_hope">XLIMITS</a></dt> 
    214214        <dd>a keyword from the routine read_hope</dd> 
     
    226226        <dd>a keyword from the routine cw_bgroup</dd> 
    227227         
     228        <dt><a href="./ToBeReviewed/TRIANGULATION/drawcoast_e.html#_drawcoast_e">XSEUIL</a></dt> 
     229        <dd>a keyword from the routine drawcoast_e</dd> 
     230         
    228231        <dt><a href="./ToBeReviewed/TRIANGULATION/drawcoast_c.html#_drawcoast_c">XSEUIL</a></dt> 
    229232        <dd>a keyword from the routine drawcoast_c</dd> 
    230233         
    231         <dt><a href="./ToBeReviewed/TRIANGULATION/drawcoast_e.html#_drawcoast_e">XSEUIL</a></dt> 
    232         <dd>a keyword from the routine drawcoast_e</dd> 
    233          
    234234        <dt><a href="./Picture/imdisp.html#_imdisp_imsize">XSIZE</a></dt> 
    235235        <dd>a parameter from the routine ./Picture/imdisp</dd> 
     
    244244        <dd>a keyword from the routine tracegrille</dd> 
    245245         
     246        <dt><a href="./ToBeReviewed/PLOTS/DIVERS/checktypeminmax.html#_checktypeminmax">XT</a></dt> 
     247        <dd>a keyword from the routine checktypeminmax</dd> 
     248         
    246249        <dt><a href="./ToBeReviewed/PLOTS/DESSINE/pltt.html#_pltt">XT</a></dt> 
    247250        <dd>a keyword from the routine pltt</dd> 
    248251         
    249         <dt><a href="./ToBeReviewed/PLOTS/DIVERS/checktypeminmax.html#_checktypeminmax">XT</a></dt> 
    250         <dd>a keyword from the routine checktypeminmax</dd> 
    251          
    252252        <dt><a href="./ToBeReviewed/PLOTS/DIVERS/checktypeminmax.html#_checktypeminmax">XX</a></dt> 
    253253        <dd>a keyword from the routine checktypeminmax</dd> 
     
    265265        <dd>a keyword from the routine computegrid</dd> 
    266266         
     267        <dt><a href="./ToBeReviewed/PLOTS/DIVERS/checktypeminmax.html#_checktypeminmax">XZ</a></dt> 
     268        <dd>a keyword from the routine checktypeminmax</dd> 
     269         
    267270        <dt><a href="./ToBeReviewed/PLOTS/DESSINE/pltz.html#_pltz">XZ</a></dt> 
    268271        <dd>a keyword from the routine pltz</dd> 
    269272         
    270         <dt><a href="./ToBeReviewed/PLOTS/DIVERS/checktypeminmax.html#_checktypeminmax">XZ</a></dt> 
    271         <dd>a keyword from the routine checktypeminmax</dd> 
    272          
    273273        <dt><a href="./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_bgroup.html#_cw_bgroup">X_SCROLL_SIZE</a></dt> 
    274274        <dd>a keyword from the routine cw_bgroup</dd> 
     
    277277        <dd>a parameter from the routine ./ToBeReviewed/STATISTICS/c_timecorrelate</dd> 
    278278         
     279        <dt><a href="./Interpolation/spl_incr.html#_spl_incr">x</a></dt> 
     280        <dd>a parameter from the routine ./Interpolation/spl_incr</dd> 
     281         
     282        <dt><a href="./ToBeReviewed/PLOTS/LABEL/label_date.html#_label_date">x</a></dt> 
     283        <dd>a parameter from the routine ./ToBeReviewed/PLOTS/LABEL/label_date</dd> 
     284         
     285        <dt><a href="./ToBeReviewed/STRING/isnumber.html#_isnumber">x</a></dt> 
     286        <dd>a parameter from the routine ./ToBeReviewed/STRING/isnumber</dd> 
     287         
     288        <dt><a href="./ToBeReviewed/TRIANGULATION/dessinetri.html#_dessinetri">x</a></dt> 
     289        <dd>a parameter from the routine ./ToBeReviewed/TRIANGULATION/dessinetri</dd> 
     290         
     291        <dt><a href="./Obsolete/congridseb.html#_congridseb">x</a></dt> 
     292        <dd>a parameter from the routine ./Obsolete/congridseb</dd> 
     293         
     294        <dt><a href="./Matrix/cmapply.html#_cmapply_product">x</a></dt> 
     295        <dd>a parameter from the routine ./Matrix/cmapply</dd> 
     296         
     297        <dt><a href="./Interpolation/inquad.html#_inquad">x</a></dt> 
     298        <dd>a parameter from the routine ./Interpolation/inquad</dd> 
     299         
    279300        <dt><a href="./Interpolation/spl_keep_mean.html#_spl_keep_mean">x</a></dt> 
    280301        <dd>a parameter from the routine ./Interpolation/spl_keep_mean</dd> 
    281302         
    282         <dt><a href="./ToBeReviewed/TRIANGULATION/dessinetri.html#_dessinetri">x</a></dt> 
    283         <dd>a parameter from the routine ./ToBeReviewed/TRIANGULATION/dessinetri</dd> 
    284          
    285         <dt><a href="./Interpolation/spl_incr.html#_spl_incr">x</a></dt> 
    286         <dd>a parameter from the routine ./Interpolation/spl_incr</dd> 
    287          
    288         <dt><a href="./Interpolation/spl_incr.html#_pure_convex">x</a></dt> 
    289         <dd>a parameter from the routine ./Interpolation/spl_incr</dd> 
     303        <dt><a href="./ToBeReviewed/PLOTS/DESSINE/pltbase.html#_pltbase">x</a></dt> 
     304        <dd>a parameter from the routine ./ToBeReviewed/PLOTS/DESSINE/pltbase</dd> 
     305         
     306        <dt><a href="./ToBeReviewed/PLOTS/DESSINE/splot.html#_splot">x</a></dt> 
     307        <dd>a parameter from the routine ./ToBeReviewed/PLOTS/DESSINE/splot</dd> 
    290308         
    291309        <dt><a href="./ToBeReviewed/PLOTS/DESSINE/scontour.html#_scontour">x</a></dt> 
    292310        <dd>a parameter from the routine ./ToBeReviewed/PLOTS/DESSINE/scontour</dd> 
    293311         
     312        <dt><a href="./Interpolation/spl_fstdrv.html#_spl_fstdrv">x</a></dt> 
     313        <dd>a parameter from the routine ./Interpolation/spl_fstdrv</dd> 
     314         
     315        <dt><a href="./Interpolation/spl_incr.html#_pure_concave">x</a></dt> 
     316        <dd>a parameter from the routine ./Interpolation/spl_incr</dd> 
     317         
     318        <dt><a href="./Interpolation/spl_incr.html#_pure_convex">x</a></dt> 
     319        <dd>a parameter from the routine ./Interpolation/spl_incr</dd> 
     320         
    294321        <dt><a href="./ToBeReviewed/PLOTS/reinitplt.html#_reinitplt">x</a></dt> 
    295322        <dd>a keyword from the routine reinitplt</dd> 
    296323         
    297         <dt><a href="./ToBeReviewed/PLOTS/LABEL/label_date.html#_label_date">x</a></dt> 
    298         <dd>a parameter from the routine ./ToBeReviewed/PLOTS/LABEL/label_date</dd> 
    299          
    300         <dt><a href="./Interpolation/inquad.html#_inquad">x</a></dt> 
    301         <dd>a parameter from the routine ./Interpolation/inquad</dd> 
    302          
    303         <dt><a href="./Obsolete/congridseb.html#_congridseb">x</a></dt> 
    304         <dd>a parameter from the routine ./Obsolete/congridseb</dd> 
    305          
    306         <dt><a href="./Matrix/cmapply.html#_cmapply_product">x</a></dt> 
    307         <dd>a parameter from the routine ./Matrix/cmapply</dd> 
    308          
    309         <dt><a href="./ToBeReviewed/PLOTS/DESSINE/pltbase.html#_pltbase">x</a></dt> 
    310         <dd>a parameter from the routine ./ToBeReviewed/PLOTS/DESSINE/pltbase</dd> 
    311          
    312         <dt><a href="./ToBeReviewed/PLOTS/DESSINE/splot.html#_splot">x</a></dt> 
    313         <dd>a parameter from the routine ./ToBeReviewed/PLOTS/DESSINE/splot</dd> 
    314          
    315         <dt><a href="./Interpolation/spl_fstdrv.html#_spl_fstdrv">x</a></dt> 
    316         <dd>a parameter from the routine ./Interpolation/spl_fstdrv</dd> 
    317          
    318         <dt><a href="./ToBeReviewed/STRING/isnumber.html#_isnumber">x</a></dt> 
    319         <dd>a parameter from the routine ./ToBeReviewed/STRING/isnumber</dd> 
    320          
    321         <dt><a href="./Interpolation/spl_incr.html#_pure_concave">x</a></dt> 
    322         <dd>a parameter from the routine ./Interpolation/spl_incr</dd> 
     324        <dt><a href="./Interpolation/cutsegment.html#_cutsegment">x0</a></dt> 
     325        <dd>a parameter from the routine ./Interpolation/cutsegment</dd> 
    323326         
    324327        <dt><a href="./Interpolation/cutpar.html#_cutpar">x0</a></dt> 
    325328        <dd>a parameter from the routine ./Interpolation/cutpar</dd> 
    326329         
    327         <dt><a href="./Interpolation/cutsegment.html#_cutsegment">x0</a></dt> 
    328         <dd>a parameter from the routine ./Interpolation/cutsegment</dd> 
     330        <dt><a href="./Interpolation/square2quadrilateral.html#_square2quadrilateral">x0in</a></dt> 
     331        <dd>a parameter from the routine ./Interpolation/square2quadrilateral</dd> 
    329332         
    330333        <dt><a href="./Interpolation/quadrilateral2square.html#_quadrilateral2square">x0in</a></dt> 
    331334        <dd>a parameter from the routine ./Interpolation/quadrilateral2square</dd> 
    332335         
    333         <dt><a href="./Interpolation/square2quadrilateral.html#_square2quadrilateral">x0in</a></dt> 
    334         <dd>a parameter from the routine ./Interpolation/square2quadrilateral</dd> 
     336        <dt><a href="./Interpolation/spl_incr.html#_pure_convex">x1</a></dt> 
     337        <dd>a parameter from the routine ./Interpolation/spl_incr</dd> 
     338         
     339        <dt><a href="./Interpolation/spl_incr.html#_pure_concave">x1</a></dt> 
     340        <dd>a parameter from the routine ./Interpolation/spl_incr</dd> 
     341         
     342        <dt><a href="./Interpolation/cutsegment.html#_cutsegment">x1</a></dt> 
     343        <dd>a parameter from the routine ./Interpolation/cutsegment</dd> 
     344         
     345        <dt><a href="./Interpolation/cutpar.html#_cutpar">x1</a></dt> 
     346        <dd>a parameter from the routine ./Interpolation/cutpar</dd> 
    335347         
    336348        <dt><a href="./ToBeReviewed/GRILLE/domdef.html#_domdef">x1</a></dt> 
    337349        <dd>a parameter from the routine ./ToBeReviewed/GRILLE/domdef</dd> 
    338350         
    339         <dt><a href="./Interpolation/spl_incr.html#_pure_convex">x1</a></dt> 
    340         <dd>a parameter from the routine ./Interpolation/spl_incr</dd> 
    341          
    342         <dt><a href="./Interpolation/spl_incr.html#_pure_concave">x1</a></dt> 
    343         <dd>a parameter from the routine ./Interpolation/spl_incr</dd> 
    344          
    345351        <dt><a href="./Interpolation/inquad.html#_inquad">x1</a></dt> 
    346352        <dd>a parameter from the routine ./Interpolation/inquad</dd> 
    347353         
    348         <dt><a href="./Interpolation/cutsegment.html#_cutsegment">x1</a></dt> 
    349         <dd>a parameter from the routine ./Interpolation/cutsegment</dd> 
    350          
    351         <dt><a href="./Interpolation/cutpar.html#_cutpar">x1</a></dt> 
    352         <dd>a parameter from the routine ./Interpolation/cutpar</dd> 
    353          
    354354        <dt><a href="./Interpolation/inrecgrid.html#_inrecgrid">x1d</a></dt> 
    355355        <dd>a parameter from the routine ./Interpolation/inrecgrid</dd> 
    356356         
     357        <dt><a href="./Interpolation/square2quadrilateral.html#_square2quadrilateral">x1in</a></dt> 
     358        <dd>a parameter from the routine ./Interpolation/square2quadrilateral</dd> 
     359         
    357360        <dt><a href="./Interpolation/quadrilateral2square.html#_quadrilateral2square">x1in</a></dt> 
    358361        <dd>a parameter from the routine ./Interpolation/quadrilateral2square</dd> 
    359362         
    360         <dt><a href="./Interpolation/square2quadrilateral.html#_square2quadrilateral">x1in</a></dt> 
    361         <dd>a parameter from the routine ./Interpolation/square2quadrilateral</dd> 
    362          
    363363        <dt><a href="./Interpolation/spl_incr.html#_spl_incr">x2</a></dt> 
    364364        <dd>a parameter from the routine ./Interpolation/spl_incr</dd> 
     
    409409        <dd>a keyword from the routine extrapolate</dd> 
    410410         
     411        <dt><a href="./Interpolation/extrapsmooth.html#_extrapsmooth">x_periodic</a></dt> 
     412        <dd>a keyword from the routine extrapsmooth</dd> 
     413         
    411414        <dt><a href="./buildinit.html#_xask">xask</a></dt> 
    412415        <dd>a function from the file buildinit.pro</dd> 
     
    559562        <dd>a parameter from the routine ./ToBeReviewed/TRIANGULATION/drawsectionbottom</dd> 
    560563         
     564        <dt><a href="./Interpolation/square2quadrilateral.html#_square2quadrilateral">xxin</a></dt> 
     565        <dd>a parameter from the routine ./Interpolation/square2quadrilateral</dd> 
     566         
    561567        <dt><a href="./Interpolation/quadrilateral2square.html#_quadrilateral2square">xxin</a></dt> 
    562568        <dd>a parameter from the routine ./Interpolation/quadrilateral2square</dd> 
    563569         
    564         <dt><a href="./Interpolation/square2quadrilateral.html#_square2quadrilateral">xxin</a></dt> 
    565         <dd>a parameter from the routine ./Interpolation/square2quadrilateral</dd> 
    566          
    567570        <dt><a href="./ToBeReviewed/WIDGET/xxx.html#_xxx">xxx</a></dt> 
    568571        <dd>a procedure from the file xxx.pro</dd> 
  • trunk/SRC/Documentation/idldoc_html_output/idldoc-warnings.html

    r200 r203  
    728728</tr> 
    729729 
    730 </table><a href="./Interpolation/extrapolate.html">./Interpolation/extrapolate.pro</a> 
    731 <table> 
    732  
    733 <tr> 
    734 <td class="docroutine"><a href="./Interpolation/extrapolate.html#_extrapolate">extrapolate</a></td> 
     730</table><a href="./Interpolation/extrapsmooth.html">./Interpolation/extrapsmooth.pro</a> 
     731<table> 
     732 
     733<tr> 
     734<td class="docroutine"><a href="./Interpolation/extrapsmooth.html#_extrapsmooth">extrapsmooth</a></td> 
    735735<td class="docstat partialdoc">partially documented</td> 
    736736</tr> 
     
    17011701<tr> 
    17021702<td class="statroutine"><a href="./Grid/computegrid.html#_computegrid">computegrid</a></td> 
    1703 <td class="stat warning">         214</td> 
     1703<td class="stat warning">         215</td> 
    17041704</tr> 
    17051705 
     
    17651765<tr> 
    17661766<td class="statroutine"><a href="./Interpolation/compute_fromirr_bilinear_weigaddr.html#_compute_fromirr_bilinear_weigaddr">compute_fromirr_bilinear_weigaddr</a></td> 
    1767 <td class="stat warning">          22</td> 
     1767<td class="stat warning">          37</td> 
    17681768</tr> 
    17691769 
     
    17891789<tr> 
    17901790<td class="statroutine"><a href="./Interpolation/extrapolate.html#_extrapolate">extrapolate</a></td> 
    1791 <td class="stat warning">          11</td> 
     1791<td class="stat warning">          13</td> 
     1792</tr> 
     1793 
     1794</table><a href="./Interpolation/extrapsmooth.html">./Interpolation/extrapsmooth.pro</a> 
     1795<table> 
     1796 
     1797<tr> 
     1798<td class="statroutine"><a href="./Interpolation/extrapsmooth.html#_extrapsmooth">extrapsmooth</a></td> 
     1799<td class="stat warning">          14</td> 
    17921800</tr> 
    17931801 
  • trunk/SRC/Documentation/idldoc_html_output/overview.html

    r200 r203  
    366366        <tr> 
    367367          <td>PRO files</td> 
    368           <td class="value">         398</td> 
     368          <td class="value">         399</td> 
    369369        </tr> 
    370370        <tr> 
     
    382382        <tr> 
    383383          <td>Lines of code</td> 
    384           <td class="value">       64224</td> 
     384          <td class="value">       64428</td> 
    385385        </tr> 
    386386      </table> 
  • trunk/SRC/Documentation/idldoc_html_output/search.js

    r200 r203  
    3535a[33] = new Array("./Grid/changemsk.html", "changemsk.pro", "", "           file_comments add land points on a 2D land sea mask      categories    Grid      param TAB  in required  a 2D land sea mask  with 1 on sea and 0 on land      keyword CELLSIZE    size  in pixel  of the square   representing one point of the mask      returns    newmsk the new 2D land sea mask      examples   IDL  a   changemsk tmask 0     to add ocean points   IDL  a   1   changemsk 1   tmask 0       history        Sebastien Masson  smasson lodyc jussieu fr         June 2006      version     Id: changemsk pro 163 2006 08 29 12:59:46Z navarro           function changemsk tab  CELLSIZE   cellsize     compile_opt idl2  strictarrsubs      newmsk    1    taille   size tab     if taille 0  NE 2 then return  newmsk    newmsk byte tab     if keyword_set cellsize  THEN cellsize   long cellsize       ELSE cellsize   long 2     window xsize taille 1 cellsize ysize taille 2 cellsize    tvscl  congrid newmsk  taille 1 cellsize  taille 2 cellsize      if NOT keyword_set nouseinfos  then begin     print   left button  : use it twice to define the diagonal of the rectangle to be set to 0  land      print   middle button: put 0  land  on the clicked point      print   right button : quit    endif    cursor x1 y1 device   up    while  mouse button ne 4  do begin       case  mouse button of          0:return  newmsk          1:BEGIN             cursor x2 y2 device   up             x    x1  x2              x   x sort x              x   round x cellsize              y    y1  y2              y   y sort y              y   round y cellsize              newmsk x 0 :x 1  y 0 :y 1      0             tvscl  replicate 0 x 1 x 0 1 cellsize                                 y 1 y 0 1 cellsize                  x 0 cellsize y 0 cellsize          end          2:BEGIN             x1   round x1 cellsize              y1   round y1 cellsize              newmsk x1  y1    0             tvscl replicate 0 cellsize cellsize                  x1 cellsize y1 cellsize            END          ELSE:       endcase       cursor x1 y1 device   up    endwhile     return  newmsk end "); 
    3636a[34] = new Array("./Grid/checkperio.html", "checkperio.pro", "", "     file_comments   check ORCA2 and ORCA05 periodicity  east west and noth fold  for files related to the T GRID ONLY      categories   Grid      param file  in required type scalar string    A string giving the name of the NetCdf file       keyword WRITE  default 0 type scalar: 0 or 1    Define to 1 to write the good periodicity in the file    By default print only mesage of periodicity errors      restrictions   Works only for grid T points   if the WRITE keyword is activated  we need the writing access on the file       examples      IDL  checkperio   Users smasson OPA modipsl bin runoff_1m_nomask nc       checkperio   Users smasson OPA modipsl bin runoff_1m_nomask nc       nav_lon bad y periodicity  1       nav_lon bad y periodicity  2       nav_lon bad x periodicity  1       nav_lon bad x periodicity  2       nav_lat bad y periodicity  1       nav_lat bad y periodicity  2       nav_lat bad x periodicity  1       nav_lat bad x periodicity  2       socoefr bad y periodicity  1       socoefr bad x periodicity  1       socoefr bad x periodicity  2       sorunoff bad x periodicity  1       sorunoff bad x periodicity  2       IDL  checkperio   Users smasson OPA modipsl bin runoff_1m_nomask nc   WRITE      IDL  checkperio   Users smasson OPA modipsl bin runoff_1m_nomask nc       history   October 2006: Sebastien Masson  smasson locean ipsl upmc fr           version    Id: checkperio pro 197 2006 10 26 10:45:17Z smasson     PRO checkperio  file  WRITE   write    IF file_test file  EQ 0 THEN BEGIN      print   file  file  not found      RETURN   ENDIF    cdfid   ncdf_open file  WRITE   write    finq   ncdf_inquire cdfid      dimsz   lonarr finq ndims    FOR did   0  finq ndims 1 DO BEGIN      ncdf_diminq  cdfid  did  name  size     dimsz did    size   ENDFOR     FOR vid   0  finq nvars 1 DO BEGIN      vinq    ncdf_varinq cdfid  vid      IF vinq ndims GE 2 THEN BEGIN       vdimsz   dimsz vinq dim        jpi   vdimsz 0        jpj   vdimsz 1        CASE vinq ndims OF     2D VAR           2:BEGIN    y periodicity  1            CASE 1 OF             array_equal 182  149  vdimsz 0:1 :BEGIN   ORCA2               ncdf_varget  cdfid  vid  part1  count    jpi 2  1  offset    1  jpj 1                ncdf_varget  cdfid  vid  part2  count    jpi 2  1  offset    1  jpj 3                part2   reverse shift part2   1                IF array_equal part1  part2  NE 1 THEN BEGIN                  print  vinq name  bad y periodicity  1                  IF keyword_set write  THEN                      ncdf_varput  cdfid  vid  part2  count    jpi 2  1  offset    1  jpj 1                ENDIF             END             array_equal 722  511  vdimsz 0:1 :BEGIN   ORCA05               ncdf_varget  cdfid  vid  part1  count    jpi 2  1  offset    1  jpj 1                ncdf_varget  cdfid  vid  part2  count    jpi 2  1  offset    1  jpj 2                part2   reverse part2                IF array_equal part1  part2  NE 1 THEN BEGIN                  print  vinq name  bad y periodicity  1                  IF keyword_set write  THEN                      ncdf_varput  cdfid  vid  part2  count    jpi 2  1  offset    1  jpj 1                ENDIF             END             ELSE:print  vinq name  nothing to check            ENDCASE   y periodicity  2            CASE 1 OF             array_equal 182  149  vdimsz 0:1 :BEGIN   ORCA2               ncdf_varget  cdfid  vid  part1  count    jpi 1 2 2 1  1  offset    jpi 1 2 2  jpj 2                ncdf_varget  cdfid  vid  part2  count    jpi 1 2 2 1  1  offset              2  jpj 2                part2   reverse part2                IF array_equal part1  part2  NE 1 THEN BEGIN                  print  vinq name  bad y periodicity  2                  IF keyword_set write  THEN                      ncdf_varput  cdfid  vid  part2  count    jpi 1 2 2 1  1  offset    jpi 1 2 2  jpj 2                ENDIF             END             array_equal 722  511  vdimsz 0:1 :BEGIN   ORCA05             END             ELSE:print  vinq name  nothing to check            ENDCASE   x periodicity  1            ncdf_varget  cdfid  vid  part1  count    1  jpj  offset    0  0            ncdf_varget  cdfid  vid  part2  count    1  jpj  offset    jpi 2  0            IF array_equal part1  part2  NE 1 THEN BEGIN              print  vinq name  bad x periodicity  1              IF keyword_set write  THEN                  ncdf_varput  cdfid  vid  part2  count    1  jpj  offset    0  0            ENDIF   x periodicity  2            ncdf_varget  cdfid  vid  part1  count    1  jpj  offset    jpi 1  0            ncdf_varget  cdfid  vid  part2  count    1  jpj  offset    1  0            IF array_equal part1  part2  NE 1 THEN BEGIN              print  vinq name  bad x periodicity  2              IF keyword_set write  THEN                  ncdf_varput  cdfid  vid  part2  count    1  jpj  offset    jpi 1  0            ENDIF         END     3D VAR           3:BEGIN            jpk   vdimsz 2    y periodicity  1            CASE 1 OF             array_equal 182  149  vdimsz 0:1 :BEGIN   ORCA2               ncdf_varget  cdfid  vid  part1  count    jpi 2  1  jpk  offset    1  jpj 1  0                ncdf_varget  cdfid  vid  part2  count    jpi 2  1  jpk  offset    1  jpj 3  0                IF jpk EQ 1 THEN part2   reform part2  jpi 2  1  jpk   over                part2   reverse shift part2   1  0  0  1                IF array_equal part1  part2  NE 1 THEN BEGIN                  print  vinq name  bad y periodicity  1                  IF keyword_set write  THEN                      ncdf_varput  cdfid  vid  part2  count    jpi 2  1  jpk  offset    1  jpj 1  0                ENDIF             END             array_equal 722  511  vdimsz 0:1 :BEGIN   ORCA05               ncdf_varget  cdfid  vid  part1  count    jpi 2  1  jpk  offset    1  jpj 1  0                ncdf_varget  cdfid  vid  part2  count    jpi 2  1  jpk  offset    1  jpj 2  0                IF jpk EQ 1 THEN part2   reform part2  jpi 2  1  jpk   over                part2   reverse part2  1                IF array_equal part1  part2  NE 1 THEN BEGIN                  print  vinq name  bad y periodicity  1                  IF keyword_set write  THEN                      ncdf_varput  cdfid  vid  part2  count    jpi 2  1  jpk  offset    1  jpj 1  0                ENDIF             END             ELSE:print  vinq name  nothing to check            ENDCASE   y periodicity  2            CASE 1 OF             array_equal 182  149  vdimsz 0:1 :BEGIN   ORCA2               ncdf_varget  cdfid  vid  part1  count    jpi 1 2 2 1  1  jpk  offset    jpi 1 2 2  jpj 2  0                ncdf_varget  cdfid  vid  part2  count    jpi 1 2 2 1  1  jpk  offset              2  jpj 2  0                part2   reverse part2  1                IF array_equal part1  part2  NE 1 THEN BEGIN                  print  vinq name  bad y periodicity  2                  IF keyword_set write  THEN                      ncdf_varput  cdfid  vid  part2  count    jpi 1 2 2 1  1  jpk  offset    jpi 1 2 2  jpj 2  0                ENDIF             END             array_equal 722  511  vdimsz 0:1 :BEGIN   ORCA05             END             ELSE:print  vinq name  nothing to check            ENDCASE   x periodicity  1            ncdf_varget  cdfid  vid  part1  count    1  jpj  jpk  offset    0  0  0            ncdf_varget  cdfid  vid  part2  count    1  jpj  jpk  offset    jpi 2  0  0            IF array_equal part1  part2  NE 1 THEN BEGIN              print  vinq name  bad x periodicity  1              IF keyword_set write  THEN                  ncdf_varput  cdfid  vid  part2  count    1  jpj  jpk  offset    0  0  0            ENDIF   x periodicity  2            ncdf_varget  cdfid  vid  part1  count    1  jpj  jpk  offset    jpi 1  0  0            ncdf_varget  cdfid  vid  part2  count    1  jpj  jpk  offset    1  0  0            IF array_equal part1  part2  NE 1 THEN BEGIN              print  vinq name  bad x periodicity  2              IF keyword_set write  THEN                  ncdf_varput  cdfid  vid  part2  count    1  jpj  jpk  offset    jpi 1  0  0            ENDIF         END     4D VAR           4:BEGIN            jpk   vdimsz 2            jpt   vdimsz 3    y periodicity  1            CASE 1 OF             array_equal 182  149  vdimsz 0:1 :BEGIN   ORCA2               ncdf_varget  cdfid  vid  part1  count    jpi 2  1  jpk  jpt  offset    1  jpj 1  0  0                ncdf_varget  cdfid  vid  part2  count    jpi 2  1  jpk  jpt  offset    1  jpj 3  0  0                IF jpt EQ 1 THEN part2   reform part2  jpi 2  1  jpk  jpt   over                part2   reverse shift part2   1  0  0  0  1                IF array_equal part1  part2  NE 1 THEN BEGIN                  print  vinq name  bad y periodicity  1                  IF keyword_set write  THEN                      ncdf_varput  cdfid  vid  part2  count    jpi 2  1  jpk  jpt  offset    1  jpj 1  0  0                ENDIF             END             array_equal 722  511  vdimsz 0:1 :BEGIN   ORCA05               ncdf_varget  cdfid  vid  part1  count    jpi 2  1  jpk  jpt  offset    1  jpj 1  0  0                ncdf_varget  cdfid  vid  part2  count    jpi 2  1  jpk  jpt  offset    1  jpj 2  0  0                IF jpt EQ 1 THEN part2   reform part2  jpi 2  1  jpk  jpt   over                part2   reverse part2  1                IF array_equal part1  part2  NE 1 THEN BEGIN                  print  vinq name  bad y periodicity  1                  IF keyword_set write  THEN                      ncdf_varput  cdfid  vid  part2  count    jpi 2  1  jpk  jpt  offset    1  jpj 1  0  0                ENDIF             END             ELSE:print  vinq name  nothing to check            ENDCASE   y periodicity  2            CASE 1 OF             array_equal 182  149  vdimsz 0:1 :BEGIN   ORCA2               ncdf_varget  cdfid  vid  part1  count    jpi 1 2 2 1  1  jpk  jpt  offset    jpi 1 2 2  jpj 2  0  0                ncdf_varget  cdfid  vid  part2  count    jpi 1 2 2 1  1  jpk  jpt  offset              2  jpj 2  0  0                part2   reverse part2  1                IF array_equal part1  part2  NE 1 THEN BEGIN                  print  vinq name  bad y periodicity  2                  IF keyword_set write  THEN                      ncdf_varput  cdfid  vid  part2  count    jpi 1 2 2 1  1  jpk  jpt  offset    jpi 1 2 2  jpj 2  0  0                ENDIF             END             array_equal 722  511  vdimsz 0:1 :BEGIN   ORCA05             END             ELSE:print  vinq name  nothing to check            ENDCASE   x periodicity  1            ncdf_varget  cdfid  vid  part1  count    1  jpj  jpk  jpt  offset    0  0  0  0            ncdf_varget  cdfid  vid  part2  count    1  jpj  jpk  jpt  offset    jpi 2  0  0  0            IF array_equal part1  part2  NE 1 THEN BEGIN              print  vinq name  bad x periodicity  1              IF keyword_set write  THEN                  ncdf_varput  cdfid  vid  part2  count    1  jpj  jpk  jpt  offset    0  0  0  0            ENDIF   x periodicity  2            ncdf_varget  cdfid  vid  part1  count    1  jpj  jpk  jpt  offset    jpi 1  0  0  0            ncdf_varget  cdfid  vid  part2  count    1  jpj  jpk  jpt  offset    1  0  0  0            IF array_equal part1  part2  NE 1 THEN BEGIN              print  vinq name  bad x periodicity  2              IF keyword_set write  THEN                  ncdf_varput  cdfid  vid  part2  count    1  jpj  jpk  jpt  offset    jpi 1  0  0  0            ENDIF         END         ELSE:print  vinq name  nothing to check        ENDCASE     ENDIF       ENDFOR    ncdf_close  cdfid    RETURN END"); 
    37 a[35] = new Array("./Grid/computegrid.html", "computegrid.pro", "", "             file_comments      compute the grid parameters  cm_4mesh  common     domains sizes:       jpi  jpj  jpk  jpiglo  jpjglo  jpkglo  jpidta  jpjdta  jpkdta     domains positions regarding to the original grid:       ixminmesh  ixmaxmesh  iyminmesh  iymaxmesh  izminmesh  izmaxmesh   ixmindta  ixmaxdta  iymindta  iymaxdta  izmindta  izmaxdta     horizontal parameters:       glamt  glamf  gphit  gphit  e1t  e2t     additional horizontal parameters if FULLCGRID keyword is defined:       glamu  glamv  gphiu  gphiv  e1u  e1v  e1f  e2u  e2v  e2f     verticals parameters:       gdept  gdepw  e3t  e3w     masks:       tmask     additional masks if FULLCGRID keyword is defined:       umaskred  vmaskred  fmaskredx  fmaskredy     triangles_list:       triangulation     key_  variables:       key_onearth  key_periodic  key_shift  key_stride  key_partialstep    key_yreverse  key_zreverse  key_gridtype     xxx related variables:       ccmeshparameters  ccreadparameters      categories    Grid      param startx  in optional type scalar          x starting point  optional if  XY AXIS keyword is used      param starty  in optional type scalar          y starting point  optional if  XY AXIS keyword is used      param stepxin  in optional type scalar or vector          x direction step  optional if  XY AXIS keyword is used  must be   0         if stepxin is a vector nx is not used      param stepyin  in optional type scalar or vector          y direction step  optional if  XY AXIS keyword is used          could be   0  south to north  or  lon1           lon2   lon1 le 360         By default  the common  cm_4mesh  variable key_shift will be automatically         defined according to GLAMBOUNDARY       keyword MASK  default array of 1 type 2D or 3D array          Specify the land 0 sea 1  mask      keyword ONEARTH  default 1 type scalar: 0 or 1          Force the manual definition of data localization on the earth or not            0  if the data are not on the earth            1  if the data are on earth  in that case we can for example use               the labels  longitude   latitude  in plots          The resulting value will be stored in the common  cm_4mesh  variable key_onearth         ONEARTH   0 forces PERIODIC   0  SHIFT   0 and is cancelling GLAMBOUNDARY      keyword PERIODIC  default computed by using the first line of glamt type scalar: 0 or 1          Force the manual definition of the grid zonal periodicity          The resulting value will be stored in the common  cm_4mesh  variable key_periodic         PERIODIC   0 forces SHIFT   0      keyword PLAIN  default 0 type scalar: 0 or 1          Force PERIODIC   0  SHIFT   0  STRIDE    1  1  1  and         suppress the automatic redefinition of the domain in case of         x periodicity overlap  y periodicity overlap  ORCA type only          and mask border to 0       keyword SHIFT  default computed according to glamboundary type scalar          Force the manual definition of the zonal shift that must be apply to the data           The resulting value will be stored in the common  cm_4mesh  variable key_shift         Note that if key_periodic 0 then in any case key_shift   0       keyword STRCALLING  type string          a string containing the calling command used to         call computegrid  this is used by xxx pro       keyword STRIDE  default 1  1  1 type 3 elements vector          Specify the stride in x  y and z direction  The resulting         value will be stored in the common  cm_4mesh  variable key_stride      keyword XAXIS  type 1D or 2D array          Specify longitudes in this case startx  stepx and nx are not used but         could be necessary if the y axis is not defined with yaxis  It must be         possible to sort the first line of xaxis in the increasing order by         shifting its elements       keyword YAXIS  type 1D or 2D array          Specify latitudes in this case starty  stepy and ny are not used but         starty and stepy could be necessary if the x axis is not defined with         xaxis  It must be sorted in the increasing or deceasing order  along each column if 2d array       keyword XYINDEX activate to specify that the horizontal grid should         be simply defined by using the index of the points             xaxis   findgen nx  and yaxis   findgen ny          using this keyword forces key_onearth 0      keyword XMINMESH  default 0L type scalar          Define common  cm_4mesh  variables ixminmesh used to define the localization         of the first point of the grid along the x direction in a zoom of the original grid      keyword YMINMESH  default 0L type scalar          Define common  cm_4mesh  variables iyminmesh used to define the localization         of the first point of the grid along the y direction in a zoom of the original grid      keyword ZMINMESH  default 0L type scalar          Define common  cm_4mesh  variables izminmesh used to define the localization         of the first point of the grid along the z direction in a zoom of the original grid      keyword XMAXMESH  default jpiglo 1 type scalar          Define common  cm_4mesh  variables ixmaxmesh used to define the localization         of the last point of the grid along the x direction in a zoom of the original grid         Note that if XMAXMESH  we are back to a C grid based on T point as for OPA model       keyword ROMSH  type 2D array          This array is the final bathymetry at RHO points  It is stored in the common         variable  cm_4mesh  romszinfos h         Used when the model is a ROMS C grid with one more point         in longitude for T and V grid and one more point in latitude         for T and U grid  In this case  we ignore              the last line of T and U points             the last column of T and V points           we are back to a C grid based on T point as for OPA model          Note that activate ROMSH forces FULLCGRID 1      keyword STRCALLING  type scalar string          Used by xxx       keyword ZAXIS  type 1D          Specify the vertical axis  Must be sorted in the increasing or deceasing order      keyword _EXTRA        not used in the present case       uses cm_4mesh cm_4data cm_4cal      restrictions if the grid has x y periodicity orverlap and or if      the mask has 0 everywhere at the border  like a close sea  and      if  we did not activate  plain and xminmesh  xmaxmesh  yminmesh       ymaxmesh keywords are defined to their default values  we redefine      xminmesh  xmaxmesh  yminmesh  ymaxmesh in order to reove the      overlapping part and or to open the domain  avoid ti be forced      to use cell_fill   1       restrictions FUV points definition is not exact if the grid is irregular      history Sebastien Masson  smasson lodyc jussieu fr                         2000 04 20    Sept 2004  several bug fixs to suit C grid type     Aug 2005  rewritte almost everything       version  Id: computegrid pro 192 2006 09 22 09:37:08Z smasson             PRO computegrid  startx  starty  stepxin  stepyin  nxin  nyin                      XAXIS   xaxis  YAXIS   yaxis  ZAXIS   zaxis                      MASK   mask  GLAMBOUNDARY   glamboundary                      XMINMESH   xminmesh  XMAXMESH   xmaxmesh                      YMINMESH   yminmesh  YMAXMESH   ymaxmesh                      ZMINMESH   zminmesh  ZMAXMESH   zmaxmesh                      ONEARTH   onearth  PERIODIC   periodic                      PLAIN   plain  SHIFT   shift  STRIDE   stride                      FULLCGRID   fullcgrid  XYINDEX   xyindex                      FBASE2TBASE   fbase2tbase  STRCALLING   strcalling                      ROMSH   romsh  _extra   ex       compile_opt idl2  strictarrsubs    cm_4mesh  cm_4data  cm_4cal   IF NOT keyword_set key_forgetold  THEN BEGIN  updatenew  updatekwd   ENDIF       time1   systime 1               for key_performance         Check input parameters       xaxis related parameters     if n_elements xaxis  NE 0 then BEGIN     CASE  size xaxis 0  OF       0:nx   1L       1:nx    size xaxis 1        2:nx    size xaxis 1      ENDCASE   ENDIF ELSE BEGIN     IF n_elements startx  EQ 0 THEN BEGIN       dummy   report If xaxis is not given  startx must be defined        return     ENDIF     CASE n_elements stepxin  OF       0:BEGIN         dummy   report If xaxis is not given  stepxin must be defined          return       END       1:BEGIN         IF n_elements nxin  EQ 0 THEN BEGIN           dummy   report If xaxis is not given and stepxin has only one element  nx must be defined            return         ENDIF ELSE nx   nxin       END       ELSE:nx   n_elements stepxin      ENDCASE   ENDELSE     yaxis related parameters     if n_elements yaxis  NE 0 then BEGIN     CASE  size yaxis 0  OF       0:ny   1L       1:ny    size yaxis 1        2:ny    size yaxis 2      ENDCASE   ENDIF ELSE BEGIN     IF n_elements starty  EQ 0 THEN BEGIN       dummy   report If yaxis is not given  starty must be defined        return     ENDIF     CASE n_elements stepyin  OF       0:BEGIN         dummy   report If yaxis is not given  stepyin must be defined          return       END       1:BEGIN         IF n_elements nyin  EQ 0 THEN BEGIN           dummy   report If yaxis is not given and stepyin has only one element  ny must be defined            return         ENDIF ELSE ny   nyin       END       ELSE:ny   n_elements stepyin      ENDCASE   ENDELSE     zaxis related parameters     if n_elements zaxis  NE 0 then BEGIN     CASE  size zaxis 0  OF       0:nz   1L       1:nz    size zaxis 1        ELSE:BEGIN         print   not coded          stop       END     ENDCASE   ENDIF ELSE nz   1L       Others automatic definitions        jpiglo   long nx    jpjglo   long ny    jpkglo   long nz    IF keyword_set romsh  THEN BEGIN     jpiglo   jpiglo   1     jpjglo   jpjglo   1     fullcgrid   1   ENDIF     impact of plain keyword:     IF keyword_set plain  THEN BEGIN     periodic   0     shift   0     stride    1  1  1    ENDIF     IF n_elements xminmesh  NE 0 THEN ixminmesh   long xminmesh 0  ELSE ixminmesh    0l   IF n_elements xmaxmesh  NE 0 THEN ixmaxmesh   long xmaxmesh 0  ELSE ixmaxmesh    jpiglo 1   IF n_elements yminmesh  NE 0 THEN iyminmesh   long yminmesh 0  ELSE iyminmesh    0l   IF n_elements ymaxmesh  NE 0 THEN iymaxmesh   long ymaxmesh 0  ELSE iymaxmesh    jpjglo 1   IF n_elements zminmesh  NE 0 THEN izminmesh   long zminmesh 0  ELSE izminmesh    0l   IF n_elements zmaxmesh  NE 0 THEN izmaxmesh   long zmaxmesh 0  ELSE izmaxmesh    jpkglo 1     iymaxmesh   iymaxmesh keyword_set fbase2tbase      IF ixmaxmesh LT 0 THEN ixmaxmesh   jpiglo  1   ixmaxmesh   IF iymaxmesh LT 0 THEN iymaxmesh   jpjglo  1   iymaxmesh   IF izmaxmesh LT 0 THEN izmaxmesh   jpkglo  1   izmaxmesh   avoid basics errors    ixmaxmesh   0   ixmaxmesh  ixminmesh  iymaxmesh  iyminmesh  izmaxmesh  izminmesh  temporary glamf   gphif  temporary glamu   gphiu  temporary glamv   gphiv   gdept stepz 2      ENDIF ELSE BEGIN       stepz   1        gdepw   gdept     ENDELSE     IF keyword_set romsh  THEN gdepw   gdept        e3 tw :         e3t   stepz     IF n_elements stepz  GT 1 THEN BEGIN       e3w   0 5 stepz shift stepz  1        e3w 0    0 5 e3t 0      ENDIF ELSE e3w   e3t       Mask       default mask eq 1   if NOT keyword_set mask  then tmask    1 ELSE tmask   mask   IF keyword_set romsh  AND tmask 0  NE  1 THEN tmask   tmask 0:jpiglo 1  0:jpjglo 1    IF array_equal size tmask   dimensions   jpiglo  jpjglo  EQ 1 AND jpkglo GT 1 THEN BEGIN     tmask   tmask replicate 1  jpkglo      tmask   reform tmask  jpiglo  jpjglo  jpkglo   overwrite    ENDIF     if tmask 0  NE  1 then BEGIN     tmask   byte tmask ixminmesh:ixmaxmesh  iyminmesh:iymaxmesh  izminmesh:izmaxmesh      tmask   reform tmask  jpi  jpj  jpk   over      if key_shift NE 0 then tmask   shift tmask  key_shift  0  0    because tmask   reverse tmask  2  is not working if the 3rd   dimension of tmask   1  we call reform      IF jpk EQ 1 THEN tmask   reform tmask   over      IF key_yreverse EQ 1 THEN tmask   reverse tmask  2      IF jpk EQ 1 THEN tmask   reform tmask  jpi  jpj  jpk   over      IF key_zreverse EQ 1 THEN tmask   reverse tmask  3      IF jpk EQ 1 THEN tmask   reform tmask  jpi  jpj  jpk   over      IF keyword_set fullcgrid  THEN BEGIN       IF keyword_set key_periodic  THEN BEGIN         msk   tmask shift tmask   1  0  0          umaskred   msk jpi 1            ENDIF ELSE umaskred   tmask jpi 1            vmaskred   tmask  jpj 1          fmaskredy   tmask jpi 1            fmaskredx   tmask  jpj 1        ENDIF   ENDIF ELSE BEGIN     tmask   replicate 1b  jpi  jpj  jpk      IF keyword_set fullcgrid  THEN BEGIN       umaskred    replicate 1b  jpj  jpk        vmaskred    replicate 1b  jpi  jpk        fmaskredy   replicate 1b  jpj  jpk        fmaskredx   replicate 1b  jpi  jpk      ENDIF   ENDELSE     IF jpi GT 2 AND jpj GT 2 AND NOT keyword_set plain         AND ixminmesh EQ 0l AND ixmaxmesh eq jpiglo 1        AND iyminmesh EQ 0l AND iymaxmesh eq jpjglo 1        AND total tmask  0    EQ 0 AND total tmask  jpj 1    EQ 0        AND total tmask 0      EQ 0 AND total tmask jpi 1      EQ 0 THEN BEGIN         xminmesh   1         xmaxmesh    1         yminmesh   1         ymaxmesh    1         computegrid  XAXIS   glamt  YAXIS   gphit  ZAXIS   zaxis                          MASK   mask  GLAMBOUNDARY   glamboundary                          XMINMESH   xminmesh  XMAXMESH   xmaxmesh                          YMINMESH   yminmesh  YMAXMESH   ymaxmesh                          ZMINMESH   zminmesh  ZMAXMESH   zmaxmesh                          ONEARTH   onearth  PERIODIC   periodic                          PLAIN   plain  SHIFT   shift  STRIDE   stride                          FULLCGRID   fullcgrid  XYINDEX   xyindex                          FBASE2TBASE   fbase2tbase  STRCALLING   strcalling                          ROMSH   romsh  _extra   ex         return   ENDIF     IF NOT keyword_set fullcgrid  THEN BEGIN     umaskred    values f_nan     vmaskred    values f_nan     fmaskredy    values f_nan     fmaskredx    values f_nan   ENDIF       stride        IF total key_stride  GT 3 THEN BEGIN     IF key_shift NE 0 THEN BEGIN   for explanation  see header of read_ncdf_varget pro       jpiright   key_shift       jpileft   jpi   key_shift      key_stride 0 1 key_shift 1  MOD key_stride 0          jpi    jpiright 1 key_stride 0 1     jpileft 1 key_stride 0 1      ENDIF ELSE jpi    jpi 1 key_stride 0 1     jpj    jpj 1 key_stride 1 1     jpk    jpk 1 key_stride 2 1       glamt    temporary glamt 0: :stride 0  0: :stride 1      gphit    temporary gphit 0: :stride 0  0: :stride 1      e1t    temporary e1t 0: :stride 0  0: :stride 1      e2t    temporary e2t 0: :stride 0  0: :stride 1      tmask    temporary tmask 0: :stride 0  0: :stride 1  0: :stride 2      gdept   gdept 0: :stride 2      gdepw   gdepw 0: :stride 2      e3t   e3t 0: :stride 2      e3w   e3w 0: :stride 2    we must recompute glamf and gphif      IF jpi GT 1 THEN BEGIN       if  keyword_set key_onearth  AND keyword_set xnotsorted            OR  keyword_set key_periodic  AND key_irregular  then BEGIN         stepxf    glamt   720  MOD 360         stepxf   shift stepxf   1   1    stepxf         stepxf      stepxf   stepxf   360   stepxf   360            stepxf   min abs stepxf  dimension   3          IF NOT keyword_set key_periodic  THEN             stepxf jpi 1      stepxf jpi 2          ENDIF ELSE BEGIN         stepxf   shift glamt   1   1    glamt         IF keyword_set key_periodic  THEN             stepxf jpi 1      360   stepxf jpi 1                ELSE stepxf jpi 1      stepxf jpi 2          ENDELSE       IF jpj GT 1 THEN BEGIN         stepxf  jpj 1    stepxf  jpj 2          stepxf jpi 1  jpj 1    stepxf jpi 2  jpj 2        ENDIF       glamf   glamt   0 5   stepxf     ENDIF ELSE glamf   glamt   0 5     IF jpj GT 1 THEN BEGIN   we must compute stepyf: y distance between T i j  T i 1 j 1        stepyf   shift gphit   1   1    gphit       stepyf  jpj 1    stepyf  jpj 2        IF jpi GT 1 THEN BEGIN         if NOT keyword_set key_periodic  THEN             stepyf jpi 1      stepyf jpi 2            stepyf jpi 1  jpj 1    stepyf jpi 2  jpj 2        ENDIF       gphif   gphit   0 5   stepyf     ENDIF ELSE gphif   gphit   0 5       IF jpj EQ 1 THEN BEGIN       glamt   reform glamt  jpi  jpj   over        gphit   reform gphit  jpi  jpj   over        glamf   reform glamf  jpi  jpj   over        gphif   reform gphif  jpi  jpj   over        e1t   reform e1t  jpi  jpj   over        e2t   reform e2t  jpi  jpj   over      ENDIF       IF keyword_set fullcgrid  THEN BEGIN       glamu    temporary glamu 0: :stride 0  0: :stride 1        gphiu    temporary gphiu 0: :stride 0  0: :stride 1        e1u    temporary e1u 0: :stride 0  0: :stride 1        e2u    temporary e2u 0: :stride 0  0: :stride 1        glamv    temporary glamv 0: :stride 0  0: :stride 1        gphiv    temporary gphiv 0: :stride 0  0: :stride 1        e1v    temporary e1v 0: :stride 0  0: :stride 1        e2v    temporary e2v 0: :stride 0  0: :stride 1        e1f    temporary e1f 0: :stride 0  0: :stride 1        e2f    temporary e2f 0: :stride 0  0: :stride 1        umaskred    temporary umaskred 0  0: :stride 1  0: :stride 2        vmaskred    temporary vmaskred 0: :stride 0  0  0: :stride 2        fmaskredy    temporary fmaskredy 0  0: :stride 1  0: :stride 2        fmaskredx    temporary fmaskredx 0: :stride 0  0  0: :stride 2        IF jpj EQ 1 THEN BEGIN         glamu   reform glamu  jpi  jpj   over          gphiu   reform gphiu  jpi  jpj   over          e1u   reform e1u  jpi  jpj   over          e2u   reform e2u  jpi  jpj   over          glamv   reform glamv  jpi  jpj   over          gphiv   reform gphiv  jpi  jpj   over          e1v   reform e1v  jpi  jpj   over          e2v   reform e2v  jpi  jpj   over          e1f   reform e1f  jpi  jpj   over          e2f   reform e2f  jpi  jpj   over        ENDIF     ENDIF   ENDIF       apply all the grid parameters        updateold   domdef       Triangulation       IF total tmask  EQ jpi jpj jpk       AND NOT keyword_set key_irregular  THEN triangles_list    1     ELSE BEGIN   are we using ORCA2       IF jpiglo EQ 182 AND jpi EQ 181 AND jpjglo EQ 149 AND jpj EQ 148 THEN          triangles_list   triangule  ELSE triangles_list   triangule keep_cont    ENDELSE       time axis  default definition        IF n_elements time  EQ 0 OR n_elements jpt  EQ 0 THEN BEGIN     jpt   1     time   0   ENDIF     IF NOT keyword_set key_forgetold  THEN BEGIN  updateold   ENDIF     grid parameters used by xxx       IF NOT keyword_set strcalling  THEN BEGIN     IF n_elements ccmeshparameters  EQ 0 THEN strcalling    computegrid        ELSE strcalling   ccmeshparameters filename   ENDIF   IF n_elements glamt  GE 2 THEN BEGIN     glaminfo   moment glamt      IF finite glaminfo 2  EQ 0 THEN glaminfo   glaminfo 0:1      gphiinfo   moment gphit      IF finite gphiinfo 2  EQ 0 THEN gphiinfo   gphiinfo 0:1    ENDIF ELSE BEGIN     glaminfo   glamt     gphiinfo   gphit   ENDELSE   IF keyword_set romsh  THEN        romszinfos    h:romsh ixminmesh:ixmaxmesh  iyminmesh:iymaxmesh  zeta:replicate 0  jpi  jpj  theta_s: 1  theta_b: 1  hc: 1      ELSE romszinfos    h: 1  zeta: 1  theta_s: 1  theta_b: 1  hc: 1     ccmeshparameters    filename:strcalling                glaminfo:float string glaminfo  format    E11 4                gphiinfo:float string gphiinfo  format    E11 4                jpiglo:jpiglo  jpjglo:jpjglo  jpkglo:jpkglo               jpi:jpi  jpj:jpj  jpk:jpk               ixminmesh:ixminmesh  ixmaxmesh:ixmaxmesh               iyminmesh:iyminmesh  iymaxmesh:iymaxmesh               izminmesh:izminmesh  izmaxmesh:izmaxmesh               key_shift:key_shift  key_periodic:key_periodic               key_stride:key_stride  key_gridtype:key_gridtype               key_yreverse:key_yreverse  key_zreverse:key_zreverse               key_partialstep:key_partialstep  key_onearth:key_onearth     ccreadparameters    funclec_name: read_ncdf                jpidta:jpidta  jpjdta:jpjdta  jpkdta:jpkdta               ixmindta:ixmindta  ixmaxdta:ixmaxdta               iymindta:iymindta  iymaxdta:iymaxdta               izmindta:izmindta  izmaxdta:izmaxdta      IF keyword_set key_performance  EQ 1 THEN       print   time computegrid  systime 1 time1     return end"); 
     37a[35] = new Array("./Grid/computegrid.html", "computegrid.pro", "", "             file_comments      compute the grid parameters  cm_4mesh  common     domains sizes:       jpi  jpj  jpk  jpiglo  jpjglo  jpkglo  jpidta  jpjdta  jpkdta     domains positions regarding to the original grid:       ixminmesh  ixmaxmesh  iyminmesh  iymaxmesh  izminmesh  izmaxmesh   ixmindta  ixmaxdta  iymindta  iymaxdta  izmindta  izmaxdta     horizontal parameters:       glamt  glamf  gphit  gphit  e1t  e2t     additional horizontal parameters if FULLCGRID keyword is defined:       glamu  glamv  gphiu  gphiv  e1u  e1v  e1f  e2u  e2v  e2f     verticals parameters:       gdept  gdepw  e3t  e3w     masks:       tmask     additional masks if FULLCGRID keyword is defined:       umaskred  vmaskred  fmaskredx  fmaskredy     triangles_list:       triangulation     key_  variables:       key_onearth  key_periodic  key_shift  key_stride  key_partialstep    key_yreverse  key_zreverse  key_gridtype     xxx related variables:       ccmeshparameters  ccreadparameters      categories    Grid      param startx  in optional type scalar          x starting point  optional if  XY AXIS keyword is used      param starty  in optional type scalar          y starting point  optional if  XY AXIS keyword is used      param stepxin  in optional type scalar or vector          x direction step  optional if  XY AXIS keyword is used  must be   0         if stepxin is a vector nx is not used      param stepyin  in optional type scalar or vector          y direction step  optional if  XY AXIS keyword is used          could be   0  south to north  or  lon1           lon2   lon1 le 360         By default  the common  cm_4mesh  variable key_shift will be automatically         defined according to GLAMBOUNDARY       keyword MASK  default array of 1 type 2D or 3D array          Specify the land 0 sea 1  mask      keyword ONEARTH  default 1 type scalar: 0 or 1          Force the manual definition of data localization on the earth or not            0  if the data are not on the earth            1  if the data are on earth  in that case we can for example use               the labels  longitude   latitude  in plots          The resulting value will be stored in the common  cm_4mesh  variable key_onearth         ONEARTH   0 forces PERIODIC   0  SHIFT   0 and is cancelling GLAMBOUNDARY      keyword PERIODIC  default computed by using the first line of glamt type scalar: 0 or 1          Force the manual definition of the grid zonal periodicity          The resulting value will be stored in the common  cm_4mesh  variable key_periodic         PERIODIC   0 forces SHIFT   0      keyword PLAIN  default 0 type scalar: 0 or 1          Force PERIODIC   0  SHIFT   0  STRIDE    1  1  1  and         suppress the automatic redefinition of the domain in case of         x periodicity overlap  y periodicity overlap  ORCA type only          and mask border to 0       keyword SHIFT  default computed according to glamboundary type scalar          Force the manual definition of the zonal shift that must be apply to the data           The resulting value will be stored in the common  cm_4mesh  variable key_shift         Note that if key_periodic 0 then in any case key_shift   0       keyword STRCALLING  type string          a string containing the calling command used to         call computegrid  this is used by xxx pro       keyword STRIDE  default 1  1  1 type 3 elements vector          Specify the stride in x  y and z direction  The resulting         value will be stored in the common  cm_4mesh  variable key_stride      keyword XAXIS  type 1D or 2D array          Specify longitudes in this case startx  stepx and nx are not used but         could be necessary if the y axis is not defined with yaxis  It must be         possible to sort the first line of xaxis in the increasing order by         shifting its elements       keyword YAXIS  type 1D or 2D array          Specify latitudes in this case starty  stepy and ny are not used but         starty and stepy could be necessary if the x axis is not defined with         xaxis  It must be sorted in the increasing or deceasing order  along each column if 2d array       keyword XYINDEX activate to specify that the horizontal grid should         be simply defined by using the index of the points             xaxis   findgen nx  and yaxis   findgen ny          using this keyword forces key_onearth 0      keyword XMINMESH  default 0L type scalar          Define common  cm_4mesh  variables ixminmesh used to define the localization         of the first point of the grid along the x direction in a zoom of the original grid      keyword YMINMESH  default 0L type scalar          Define common  cm_4mesh  variables iyminmesh used to define the localization         of the first point of the grid along the y direction in a zoom of the original grid      keyword ZMINMESH  default 0L type scalar          Define common  cm_4mesh  variables izminmesh used to define the localization         of the first point of the grid along the z direction in a zoom of the original grid      keyword XMAXMESH  default jpiglo 1 type scalar          Define common  cm_4mesh  variables ixmaxmesh used to define the localization         of the last point of the grid along the x direction in a zoom of the original grid         Note that if XMAXMESH  we are back to a C grid based on T point as for OPA model       keyword ROMSH  type 2D array          This array is the final bathymetry at RHO points  It is stored in the common         variable  cm_4mesh  romszinfos h         Used when the model is a ROMS C grid with one more point         in longitude for T and V grid and one more point in latitude         for T and U grid  In this case  we ignore              the last line of T and U points             the last column of T and V points           we are back to a C grid based on T point as for OPA model          Note that activate ROMSH forces FULLCGRID 1      keyword STRCALLING  type scalar string          Used by xxx       keyword ZAXIS  type 1D          Specify the vertical axis  Must be sorted in the increasing or deceasing order      keyword _EXTRA        not used in the present case       uses cm_4mesh cm_4data cm_4cal      restrictions if the grid has x y periodicity orverlap and or if      the mask has 0 everywhere at the border  like a close sea  and      if  we did not activate  plain and xminmesh  xmaxmesh  yminmesh       ymaxmesh keywords are defined to their default values  we redefine      xminmesh  xmaxmesh  yminmesh  ymaxmesh in order to reove the      overlapping part and or to open the domain  avoid ti be forced      to use cell_fill   1       restrictions FUV points definition is not exact if the grid is irregular      history Sebastien Masson  smasson lodyc jussieu fr                         2000 04 20    Sept 2004  several bug fixs to suit C grid type     Aug 2005  rewritte almost everything       version  Id: computegrid pro 202 2007 01 12 11:00:06Z smasson             PRO computegrid  startx  starty  stepxin  stepyin  nxin  nyin                      XAXIS   xaxis  YAXIS   yaxis  ZAXIS   zaxis                      MASK   mask  GLAMBOUNDARY   glamboundary                      XMINMESH   xminmesh  XMAXMESH   xmaxmesh                      YMINMESH   yminmesh  YMAXMESH   ymaxmesh                      ZMINMESH   zminmesh  ZMAXMESH   zmaxmesh                      ONEARTH   onearth  PERIODIC   periodic                      PLAIN   plain  SHIFT   shift  STRIDE   stride                      FULLCGRID   fullcgrid  XYINDEX   xyindex                      FBASE2TBASE   fbase2tbase  STRCALLING   strcalling                      ROMSH   romsh  _extra   ex       compile_opt idl2  strictarrsubs    cm_4mesh  cm_4data  cm_4cal   IF NOT keyword_set key_forgetold  THEN BEGIN  updatenew  updatekwd   ENDIF       time1   systime 1               for key_performance         Check input parameters       xaxis related parameters     if n_elements xaxis  NE 0 then BEGIN     CASE  size xaxis 0  OF       0:nx   1L       1:nx    size xaxis 1        2:nx    size xaxis 1      ENDCASE   ENDIF ELSE BEGIN     IF n_elements startx  EQ 0 THEN BEGIN       dummy   report If xaxis is not given  startx must be defined        return     ENDIF     CASE n_elements stepxin  OF       0:BEGIN         dummy   report If xaxis is not given  stepxin must be defined          return       END       1:BEGIN         IF n_elements nxin  EQ 0 THEN BEGIN           dummy   report If xaxis is not given and stepxin has only one element  nx must be defined            return         ENDIF ELSE nx   nxin       END       ELSE:nx   n_elements stepxin      ENDCASE   ENDELSE     yaxis related parameters     if n_elements yaxis  NE 0 then BEGIN     CASE  size yaxis 0  OF       0:ny   1L       1:ny    size yaxis 1        2:ny    size yaxis 2      ENDCASE   ENDIF ELSE BEGIN     IF n_elements starty  EQ 0 THEN BEGIN       dummy   report If yaxis is not given  starty must be defined        return     ENDIF     CASE n_elements stepyin  OF       0:BEGIN         dummy   report If yaxis is not given  stepyin must be defined          return       END       1:BEGIN         IF n_elements nyin  EQ 0 THEN BEGIN           dummy   report If yaxis is not given and stepyin has only one element  ny must be defined            return         ENDIF ELSE ny   nyin       END       ELSE:ny   n_elements stepyin      ENDCASE   ENDELSE     zaxis related parameters     if n_elements zaxis  NE 0 then BEGIN     CASE  size zaxis 0  OF       0:nz   1L       1:nz    size zaxis 1        ELSE:BEGIN         print   not coded          stop       END     ENDCASE   ENDIF ELSE nz   1L       Others automatic definitions        jpiglo   long nx    jpjglo   long ny    jpkglo   long nz    IF keyword_set romsh  THEN BEGIN     jpiglo   jpiglo   1     jpjglo   jpjglo   1     fullcgrid   1   ENDIF     impact of plain keyword:     IF keyword_set plain  THEN BEGIN     periodic   0     shift   0     stride    1  1  1    ENDIF     IF n_elements xminmesh  NE 0 THEN ixminmesh   long xminmesh 0  ELSE ixminmesh    0l   IF n_elements xmaxmesh  NE 0 THEN ixmaxmesh   long xmaxmesh 0  ELSE ixmaxmesh    jpiglo 1   IF n_elements yminmesh  NE 0 THEN iyminmesh   long yminmesh 0  ELSE iyminmesh    0l   IF n_elements ymaxmesh  NE 0 THEN iymaxmesh   long ymaxmesh 0  ELSE iymaxmesh    jpjglo 1   IF n_elements zminmesh  NE 0 THEN izminmesh   long zminmesh 0  ELSE izminmesh    0l   IF n_elements zmaxmesh  NE 0 THEN izmaxmesh   long zmaxmesh 0  ELSE izmaxmesh    jpkglo 1     iymaxmesh   iymaxmesh keyword_set fbase2tbase      IF ixmaxmesh LT 0 THEN ixmaxmesh   jpiglo  1   ixmaxmesh   IF iymaxmesh LT 0 THEN iymaxmesh   jpjglo  1   iymaxmesh   IF izmaxmesh LT 0 THEN izmaxmesh   jpkglo  1   izmaxmesh   avoid basics errors    ixmaxmesh   0   ixmaxmesh  ixminmesh  iymaxmesh  iyminmesh  izmaxmesh  izminmesh  temporary glamf   gphif  temporary glamu   gphiu  temporary glamv   gphiv   gdept stepz 2      ENDIF ELSE BEGIN       stepz   1        gdepw   gdept     ENDELSE     IF keyword_set romsh  THEN gdepw   gdept        e3 tw :         e3t   stepz     IF n_elements stepz  GT 1 THEN BEGIN       e3w   0 5 stepz shift stepz  1        e3w 0    0 5 e3t 0      ENDIF ELSE e3w   e3t       Mask       default mask eq 1   if NOT keyword_set mask  then tmask    1 ELSE tmask   mask   IF keyword_set romsh  AND tmask 0  NE  1 THEN tmask   tmask 0:jpiglo 1  0:jpjglo 1    IF array_equal size tmask   dimensions   jpiglo  jpjglo  EQ 1 AND jpkglo GT 1 THEN BEGIN     tmask   tmask replicate 1  jpkglo      tmask   reform tmask  jpiglo  jpjglo  jpkglo   overwrite    ENDIF     IF jpiglo EQ 1 OR jpjglo EQ 1 THEN tmask   reform tmask  jpiglo  jpjglo  jpkglo   overwrite      if tmask 0  NE  1 then BEGIN     tmask   byte tmask ixminmesh:ixmaxmesh  iyminmesh:iymaxmesh  izminmesh:izmaxmesh      tmask   reform tmask  jpi  jpj  jpk   over      if key_shift NE 0 then tmask   shift tmask  key_shift  0  0    because tmask   reverse tmask  2  is not working if the 3rd   dimension of tmask   1  we call reform      IF jpk EQ 1 THEN tmask   reform tmask   over      IF key_yreverse EQ 1 THEN tmask   reverse tmask  2      IF jpk EQ 1 THEN tmask   reform tmask  jpi  jpj  jpk   over      IF key_zreverse EQ 1 THEN tmask   reverse tmask  3      IF jpk EQ 1 THEN tmask   reform tmask  jpi  jpj  jpk   over      IF keyword_set fullcgrid  THEN BEGIN       IF keyword_set key_periodic  THEN BEGIN         msk   tmask shift tmask   1  0  0          umaskred   msk jpi 1            ENDIF ELSE umaskred   tmask jpi 1            vmaskred   tmask  jpj 1          fmaskredy   tmask jpi 1            fmaskredx   tmask  jpj 1        ENDIF   ENDIF ELSE BEGIN     tmask   replicate 1b  jpi  jpj  jpk      IF keyword_set fullcgrid  THEN BEGIN       umaskred    replicate 1b  jpj  jpk        vmaskred    replicate 1b  jpi  jpk        fmaskredy   replicate 1b  jpj  jpk        fmaskredx   replicate 1b  jpi  jpk      ENDIF   ENDELSE     IF jpi GT 2 AND jpj GT 2 AND NOT keyword_set plain         AND ixminmesh EQ 0l AND ixmaxmesh eq jpiglo 1        AND iyminmesh EQ 0l AND iymaxmesh eq jpjglo 1        AND total tmask  0    EQ 0 AND total tmask  jpj 1    EQ 0        AND total tmask 0      EQ 0 AND total tmask jpi 1      EQ 0 THEN BEGIN         xminmesh   1         xmaxmesh    1         yminmesh   1         ymaxmesh    1         computegrid  XAXIS   glamt  YAXIS   gphit  ZAXIS   zaxis                          MASK   mask  GLAMBOUNDARY   glamboundary                          XMINMESH   xminmesh  XMAXMESH   xmaxmesh                          YMINMESH   yminmesh  YMAXMESH   ymaxmesh                          ZMINMESH   zminmesh  ZMAXMESH   zmaxmesh                          ONEARTH   onearth  PERIODIC   periodic                          PLAIN   plain  SHIFT   shift  STRIDE   stride                          FULLCGRID   fullcgrid  XYINDEX   xyindex                          FBASE2TBASE   fbase2tbase  STRCALLING   strcalling                          ROMSH   romsh  _extra   ex         return   ENDIF     IF NOT keyword_set fullcgrid  THEN BEGIN     umaskred    values f_nan     vmaskred    values f_nan     fmaskredy    values f_nan     fmaskredx    values f_nan   ENDIF       stride        IF total key_stride  GT 3 THEN BEGIN     IF key_shift NE 0 THEN BEGIN   for explanation  see header of read_ncdf_varget pro       jpiright   key_shift       jpileft   jpi   key_shift      key_stride 0 1 key_shift 1  MOD key_stride 0          jpi    jpiright 1 key_stride 0 1     jpileft 1 key_stride 0 1      ENDIF ELSE jpi    jpi 1 key_stride 0 1     jpj    jpj 1 key_stride 1 1     jpk    jpk 1 key_stride 2 1       glamt    temporary glamt 0: :stride 0  0: :stride 1      gphit    temporary gphit 0: :stride 0  0: :stride 1      e1t    temporary e1t 0: :stride 0  0: :stride 1      e2t    temporary e2t 0: :stride 0  0: :stride 1      tmask    temporary tmask 0: :stride 0  0: :stride 1  0: :stride 2      gdept   gdept 0: :stride 2      gdepw   gdepw 0: :stride 2      e3t   e3t 0: :stride 2      e3w   e3w 0: :stride 2    we must recompute glamf and gphif      IF jpi GT 1 THEN BEGIN       if  keyword_set key_onearth  AND keyword_set xnotsorted            OR  keyword_set key_periodic  AND key_irregular  then BEGIN         stepxf    glamt   720  MOD 360         stepxf   shift stepxf   1   1    stepxf         stepxf      stepxf   stepxf   360   stepxf   360            stepxf   min abs stepxf  dimension   3          IF NOT keyword_set key_periodic  THEN             stepxf jpi 1      stepxf jpi 2          ENDIF ELSE BEGIN         stepxf   shift glamt   1   1    glamt         IF keyword_set key_periodic  THEN             stepxf jpi 1      360   stepxf jpi 1                ELSE stepxf jpi 1      stepxf jpi 2          ENDELSE       IF jpj GT 1 THEN BEGIN         stepxf  jpj 1    stepxf  jpj 2          stepxf jpi 1  jpj 1    stepxf jpi 2  jpj 2        ENDIF       glamf   glamt   0 5   stepxf     ENDIF ELSE glamf   glamt   0 5     IF jpj GT 1 THEN BEGIN   we must compute stepyf: y distance between T i j  T i 1 j 1        stepyf   shift gphit   1   1    gphit       stepyf  jpj 1    stepyf  jpj 2        IF jpi GT 1 THEN BEGIN         if NOT keyword_set key_periodic  THEN             stepyf jpi 1      stepyf jpi 2            stepyf jpi 1  jpj 1    stepyf jpi 2  jpj 2        ENDIF       gphif   gphit   0 5   stepyf     ENDIF ELSE gphif   gphit   0 5       IF jpj EQ 1 THEN BEGIN       glamt   reform glamt  jpi  jpj   over        gphit   reform gphit  jpi  jpj   over        glamf   reform glamf  jpi  jpj   over        gphif   reform gphif  jpi  jpj   over        e1t   reform e1t  jpi  jpj   over        e2t   reform e2t  jpi  jpj   over      ENDIF       IF keyword_set fullcgrid  THEN BEGIN       glamu    temporary glamu 0: :stride 0  0: :stride 1        gphiu    temporary gphiu 0: :stride 0  0: :stride 1        e1u    temporary e1u 0: :stride 0  0: :stride 1        e2u    temporary e2u 0: :stride 0  0: :stride 1        glamv    temporary glamv 0: :stride 0  0: :stride 1        gphiv    temporary gphiv 0: :stride 0  0: :stride 1        e1v    temporary e1v 0: :stride 0  0: :stride 1        e2v    temporary e2v 0: :stride 0  0: :stride 1        e1f    temporary e1f 0: :stride 0  0: :stride 1        e2f    temporary e2f 0: :stride 0  0: :stride 1        umaskred    temporary umaskred 0  0: :stride 1  0: :stride 2        vmaskred    temporary vmaskred 0: :stride 0  0  0: :stride 2        fmaskredy    temporary fmaskredy 0  0: :stride 1  0: :stride 2        fmaskredx    temporary fmaskredx 0: :stride 0  0  0: :stride 2        IF jpj EQ 1 THEN BEGIN         glamu   reform glamu  jpi  jpj   over          gphiu   reform gphiu  jpi  jpj   over          e1u   reform e1u  jpi  jpj   over          e2u   reform e2u  jpi  jpj   over          glamv   reform glamv  jpi  jpj   over          gphiv   reform gphiv  jpi  jpj   over          e1v   reform e1v  jpi  jpj   over          e2v   reform e2v  jpi  jpj   over          e1f   reform e1f  jpi  jpj   over          e2f   reform e2f  jpi  jpj   over        ENDIF     ENDIF   ENDIF       apply all the grid parameters        updateold   domdef       Triangulation       IF total tmask  EQ jpi jpj jpk       AND NOT keyword_set key_irregular  THEN triangles_list    1     ELSE BEGIN   are we using ORCA2       IF jpiglo EQ 182 AND jpi EQ 181 AND jpjglo EQ 149 AND jpj EQ 148 THEN          triangles_list   triangule  ELSE triangles_list   triangule keep_cont    ENDELSE       time axis  default definition        IF n_elements time  EQ 0 OR n_elements jpt  EQ 0 THEN BEGIN     jpt   1     time   0   ENDIF     IF NOT keyword_set key_forgetold  THEN BEGIN  updateold   ENDIF     grid parameters used by xxx       IF NOT keyword_set strcalling  THEN BEGIN     IF n_elements ccmeshparameters  EQ 0 THEN strcalling    computegrid        ELSE strcalling   ccmeshparameters filename   ENDIF   IF n_elements glamt  GE 2 THEN BEGIN     glaminfo   moment glamt      IF finite glaminfo 2  EQ 0 THEN glaminfo   glaminfo 0:1      gphiinfo   moment gphit      IF finite gphiinfo 2  EQ 0 THEN gphiinfo   gphiinfo 0:1    ENDIF ELSE BEGIN     glaminfo   glamt     gphiinfo   gphit   ENDELSE   IF keyword_set romsh  THEN        romszinfos    h:romsh ixminmesh:ixmaxmesh  iyminmesh:iymaxmesh  zeta:replicate 0  jpi  jpj  theta_s: 1  theta_b: 1  hc: 1      ELSE romszinfos    h: 1  zeta: 1  theta_s: 1  theta_b: 1  hc: 1     ccmeshparameters    filename:strcalling                glaminfo:float string glaminfo  format    E11 4                gphiinfo:float string gphiinfo  format    E11 4                jpiglo:jpiglo  jpjglo:jpjglo  jpkglo:jpkglo               jpi:jpi  jpj:jpj  jpk:jpk               ixminmesh:ixminmesh  ixmaxmesh:ixmaxmesh               iyminmesh:iyminmesh  iymaxmesh:iymaxmesh               izminmesh:izminmesh  izmaxmesh:izmaxmesh               key_shift:key_shift  key_periodic:key_periodic               key_stride:key_stride  key_gridtype:key_gridtype               key_yreverse:key_yreverse  key_zreverse:key_zreverse               key_partialstep:key_partialstep  key_onearth:key_onearth     ccreadparameters    funclec_name: read_ncdf                jpidta:jpidta  jpjdta:jpjdta  jpkdta:jpkdta               ixmindta:ixmindta  ixmaxdta:ixmaxdta               iymindta:iymindta  iymaxdta:iymaxdta               izmindta:izmindta  izmaxdta:izmaxdta      IF keyword_set key_performance  EQ 1 THEN       print   time computegrid  systime 1 time1     return end"); 
    3838a[36] = new Array("./Grid/micromeshmask.html", "micromeshmask.pro", "", "       file_comments    Reduce the size of the NetCDF meshmask created by OPA by   using bit  and not byte  format for the masks and the float format   for the other fields       categories    For OPA      param inid  in required     param outid  in required     param inname  in required     param outname  in optional       history        July 2004 Sebastien Masson  smasson lodyc jussieu fr       version     Id: micromeshmask pro 157 2006 08 21 09:01:50Z navarro           PRO ncdf_transfer  inid  outid  inname  outname     compile_opt idl2  strictarrsubs     IF n_elements outname  EQ 0 THEN outname   inname   ncdf_varget  inid  inname  zzz   ncdf_varput  outid  outname  float reform zzz   over    RETURN END          param ncfilein  in required    1  the name of the meshmask file to be reduced  In that case    there is only one meshmask file     OR     2  the xxx part in the names: xxx mesh_hgr nc xxx mesh_zgr nc   xxx mask nc  In that case  the meshmask is split into 3 files       param ncfileout  in optional  the name of the uniq reduced meshmask file    default definition is micromeshmask nc      keyword IODIR to define the files path       examples   IDL  meshdir d1fes2 raid2 smasson DATA ORCA05    IDL  micromeshmask   meshmask_ORCA_R05 nc iodir meshdir     PRO micromeshmask  ncfilein  ncfileout  IODIR   iodir     compile_opt idl2  strictarrsubs     filein   isafile FILE   ncfilein  IODIR   iodir   NEW    test    findfile filein 0    IF test EQ   THEN BEGIN     filein_hgr    findfile filein mesh_hgr nc 0      filein_zgr    findfile filein mesh_zgr nc 0      filein_msk    findfile filein mask nc 0      IF filein_hgr EQ   OR filein_zgr EQ   OR filein_msk EQ    THEN BEGIN       print   meshmask file s  not found        print  filein  does not exist        print  filein mesh_hgr nc does not exist        print  filein mesh_zgr nc does not exist        print  filein mask nc does not exist        return     ENDIF   ENDIF ELSE filein   test       get the horizontal dimensions   IF n_elements filein_hgr  NE 0  THEN cdfid   ncdf_open filein_hgr      ELSE cdfid   ncdf_open filein    ncdf_diminq  cdfid   x  name  jpi   ncdf_diminq  cdfid   y  name  jpj   for the mask  we use  its byte  representation   its y dimension   will be extended to be a multiple of 8  then it will be divided by   8    if  jpj mod 8  eq 0 the jpj_m jpi 8 else jpj_m jpi 8   1   jpj_m    jpj 7 8   get the vertical dimensions   IF n_elements filein_zgr  NE 0  THEN BEGIN     ncdf_close  cdfid     cdfid   ncdf_open filein_zgr    ENDIF   listdims   strlowcase ncdf_listdims cdfid    IF  where listdims EQ  z 0  NE  1 THEN ncdf_diminq  cdfid   z  name  jpk ELSE BEGIN     dimid    where strmid listdims  0  5  EQ  depth 0      IF dimid NE  1 THEN ncdf_diminq  cdfid  dimid  name  jpk ELSE BEGIN       dummy   report We could not find the vertical dimension  its name must be z or start with depth        return     ENDELSE   ENDELSE   get the variables list related to the partial steps   varlist_ps   ncdf_listvars cdfid    varlist_ps   strtrim strlowcase varlist_ps  2            define the output file     IF n_elements ncfileout  EQ 0  THEN ncfileout    micromeshmask nc    cdfidout   ncdf_create isafile FILE   ncfileout  IODIR   iodir   NEW   clobber    ncdf_control  cdfidout   nofill   dimension   dimidx   ncdf_dimdef cdfidout   x  jpi    dimidy   ncdf_dimdef cdfidout   y  jpj    dimidy_m   ncdf_dimdef cdfidout   y_m  jpj_m    dimidz   ncdf_dimdef cdfidout   z  jpk    global attributs   ncdf_attput  cdfidout   IDL_Program_Name   micromeshmask pro   GLOBAL   ncdf_attput  cdfidout   Creation_Date  systime   GLOBAL   declaration des variables   varid   lonarr 20    horizontal variables   hgrlist    glamt   glamu   glamv   glamf                    gphit   gphiu   gphiv   gphif                    e1t   e1u   e1v   e1f                    e2t   e2u   e2v   e2f    FOR h   0  n_elements hgrlist 1 DO       varid h    ncdf_vardef cdfidout  hgrlist h   dimidx  dimidy   float    vertical variables   zgrlist    e3t   e3w   gdept   gdepw    FOR z   0  n_elements zgrlist 1 DO       varid 16 z    ncdf_vardef cdfidout  zgrlist z   dimidz   float    variables related to the partial steps   IF  where varlist_ps EQ  hdept 0  NE  1 THEN       varid    varid  ncdf_vardef cdfidout   hdept   dimidx  dimidy   float    IF  where varlist_ps EQ  hdepw 0  NE  1 THEN       varid    varid  ncdf_vardef cdfidout   hdepw   dimidx  dimidy   float    old variable name  keep for compatibility with old run  Change e3tp to e3t_ps   IF  where varlist_ps EQ  e3tp 0  NE  1 THEN       varid    varid  ncdf_vardef cdfidout   e3t_ps   dimidx  dimidy   float    old variable name  keep for compatibility with old run  Change e3wp to e3w_ps   IF  where varlist_ps EQ  e3wp 0  NE  1 THEN       varid    varid  ncdf_vardef cdfidout   e3w_ps   dimidx  dimidy   float      IF  where varlist_ps EQ  e3t_ps 0  NE  1 THEN       varid    varid  ncdf_vardef cdfidout   e3t_ps   dimidx  dimidy   float    IF  where varlist_ps EQ  e3w_ps 0  NE  1 THEN       varid    varid  ncdf_vardef cdfidout   e3w_ps   dimidx  dimidy   float      IF  where varlist_ps EQ  e3u_ps 0  NE  1 THEN         varid    varid  ncdf_vardef cdfidout   e3u_ps   dimidx  dimidy   float      IF  where varlist_ps EQ  e3v_ps 0  NE  1 THEN         varid    varid  ncdf_vardef cdfidout   e3v_ps   dimidx  dimidy   float    mask variable   msklist    tmask   umask   vmask   fmask    FOR m   0  n_elements msklist 1 DO BEGIN     varid    varid  ncdf_vardef cdfidout  msklist m                                       dimidx  dimidy_m  dimidz   byte        ncdf_attput  cdfidout  varid n_elements varid 1               Comment   the mask is stored as bit  You must use              the binary representation of the byte to get back the data    ENDFOR       ncdf_control  cdfidout   endef       get the horizontal variables     IF n_elements filein_hgr  NE 0  THEN BEGIN     ncdf_close  cdfid     cdfid   ncdf_open filein_hgr    ENDIF     FOR h   0  n_elements hgrlist 1 DO       ncdf_transfer  cdfid  cdfidout  hgrlist h      get the vertical variables     IF n_elements filein_zgr  NE 0  THEN BEGIN     ncdf_close  cdfid     cdfid   ncdf_open filein_zgr    ENDIF     FOR z   0  n_elements zgrlist 1 DO       ncdf_transfer  cdfid  cdfidout  zgrlist z    partial step variables   IF  where varlist_ps EQ  hdept 0  NE  1 THEN       ncdf_transfer  cdfid  cdfidout   hdept    IF  where varlist_ps EQ  hdepw 0  NE  1 THEN       ncdf_transfer  cdfid  cdfidout   hdepw    IF  where varlist_ps EQ  e3tp 0  NE  1 THEN       ncdf_transfer  cdfid  cdfidout   e3tp   e3t_ps    IF  where varlist_ps EQ  e3wp 0  NE  1 THEN       ncdf_transfer  cdfid  cdfidout   e3wp   e3w_ps    IF  where varlist_ps EQ  e3t_ps 0  NE  1 THEN       ncdf_transfer  cdfid  cdfidout   e3t_ps    IF  where varlist_ps EQ  e3w_ps 0  NE  1 THEN       ncdf_transfer  cdfid  cdfidout   e3w_ps      IF  where varlist_ps EQ  e3u_ps 0  NE  1 THEN         ncdf_transfer  cdfid  cdfidout   e3u_ps      IF  where varlist_ps EQ  e3v_ps 0  NE  1 THEN         ncdf_transfer  cdfid  cdfidout   e3v_ps      mask     IF n_elements filein_msk  NE 0  THEN BEGIN     ncdf_close  cdfid     cdfid   ncdf_open filein_msk    ENDIF   loop on the vertical levels to limit the memory use   FOR k   0  jpk 1 DO BEGIN     FOR m   0  3 DO BEGIN       CASE  ncdf_varinq cdfid  msklist m ndims OF         3:ncdf_varget  cdfid  msklist m  zzz  offset    0  0  k              count    jpi  jpj  1          4:ncdf_varget  cdfid  msklist m  zzz  offset    0  0  k  0              count    jpi  jpj  1  1        ENDCASE       zzz   byte temporary zzz    zzz must contain only 0 or 1       zzz   temporary zzz  MOD 2   we transpose zzz because we need to work with the y dimension as the   first dimension       zzz   transpose temporary zzz    extend jpj to be a multiple of 8       jpjadd   jpj_m 8 jpj       IF jpjadd NE 0 THEN zzz    temporary zzz  bytarr jpjadd  jpi    reform zzz  to look like output of binary pro       zzz   reform zzz  8  1  jpj_m  jpi   over    convert into  its byte form        zzz   inverse_binary temporary zzz        ncdf_varput  cdfidout  msklist m  transpose temporary zzz              offset    0  0  k  count    jpi  jpj_m  1      ENDFOR   ENDFOR       ncdf_close  cdfid   ncdf_close  cdfidout    RETURN END"); 
    3939a[37] = new Array("./Grid/n128gaussian.html", "n128gaussian.pro", "", "     file_comments compute the latitudes of the n128 gaussian grid  See:   http: www ecmwf int products data technical gaussian n128FIS html      categories   Grid      examples    IDL  lat n128gaussian       returns a 1d array      history        Sebastien Masson  smasson lodyc jussieu fr         June 2004      version  Id: n128gaussian pro 157 2006 08 21 09:01:50Z navarro         FUNCTION n128gaussian       compile_opt idl2  strictarrsubs              latitude   reduced     regular  latitude             number     points      points                              n128        1          18         512   89 46282                  2          25         512   88 76695                  3          36         512   88 06697                  4          40         512   87 36606                  5          45         512   86 66480                  6          50         512   85 96337                  7          60         512   85 26184                  8          64         512   84 56026                  9          72         512   83 85863                  10          72         512   83 15698                  11          80         512   82 45531                  12          90         512   81 75363                  13          90         512   81 05194                  14         100         512   80 35023                  15         108         512   79 64852                  16         120         512   78 94681                  17         120         512   78 24509                  18         125         512   77 54336                  19         128         512   76 84163                  20         144         512   76 13990                  21         144         512   75 43817                  22         150         512   74 73644                  23         160         512   74 03470                  24         160         512   73 33296                  25         180         512   72 63123                  26         180         512   71 92949                  27         180         512   71 22774                  28         192         512   70 52600                  29         192         512   69 82426                  30         200         512   69 12252                  31         216         512   68 42077                  32         216         512   67 71903                  33         216         512   67 01728                  34         225         512   66 31554                  35         240         512   65 61379                  36         240         512   64 91204                  37         240         512   64 21030                  38         250         512   63 50855                  39         250         512   62 80680                  40         256         512   62 10505                  41         270         512   61 40330                  42         270         512   60 70156                  43         288         512   59 99981                  44         288         512   59 29806                  45         288         512   58 59631                  46         300         512   57 89456                  47         300         512   57 19281                  48         320         512   56 49106                  49         320         512   55 78931                  50         320         512   55 08756                  51         320         512   54 38581                  52         324         512   53 68406                  53         360         512   52 98231                  54         360         512   52 28056                  55         360         512   51 57881                  56         360         512   50 87705                  57         360         512   50 17530                  58         360         512   49 47355                  59         360         512   48 77180                  60         375         512   48 07005                  61         375         512   47 36830                  62         375         512   46 66655                  63         375         512   45 96479                  64         384         512   45 26304                  65         384         512   44 56129                  66         400         512   43 85954                  67         400         512   43 15779                  68         400         512   42 45604                  69         400         512   41 75428                  70         405         512   41 05253                  71         432         512   40 35078                  72         432         512   39 64903                  73         432         512   38 94728                  74         432         512   38 24552                  75         432         512   37 54377                  76         432         512   36 84202                  77         432         512   36 14027                  78         450         512   35 43851                  79         450         512   34 73676                  80         450         512   34 03501    n128    n128              81         450         512   33 33326              82         450         512   32 63150              83         480         512   31 92975              84         480         512   31 22800              85         480         512   30 52625              86         480         512   29 82449              87         480         512   29 12274              88         480         512   28 42099              89         480         512   27 71924              90         480         512   27 01748              91         480         512   26 31573              92         480         512   25 61398              93         486         512   24 91223              94         486         512   24 21047              95         486         512   23 50872              96         500         512   22 80697              97         500         512   22 10521              98         500         512   21 40346              99         500         512   20 70171              100         500         512   19 99996              101         500         512   19 29820              102         500         512   18 59645              103         512         512   17 89470              104         512         512   17 19294              105         512         512   16 49119              106         512         512   15 78944              107         512         512   15 08768              108         512         512   14 38593              109         512         512   13 68418              110         512         512   12 98243              111         512         512   12 28067              112         512         512   11 57892              113         512         512   10 87717              114         512         512   10 17541              115         512         512    9 47366              116         512         512    8 77191              117         512         512    8 07016              118         512         512    7 36840              119         512         512    6 66665              120         512         512    5 96490              121         512         512    5 26314              122         512         512    4 56139              123         512         512    3 85964              124         512         512    3 15788              125         512         512    2 45613              126         512         512    1 75438              127         512         512    1 05262              128         512         512    0 35087      n128   reform n128  4  128   over    n128   reform n128 3     over    n128    n128   reverse n128     return  n128 end"); 
     
    4949a[47] = new Array("./Grid/saveboxparam.html", "saveboxparam.pro", "", "             file_comments save all the zoom parameters  defined by calling domdef    in a file  using save command  located in myuniquetmpdir    common variable defined by def_myuniquetmpdir        param filename  in required  a scalar string defining the file name       uses cm_4mesh  and cm_demomode_used if we are in demo mode       restrictions call def_myuniquetmpdir  if myuniquetmpdir is undefined:                    define  create and add it to  path      examples   IDL  saveboxparam  filename      history Sebastien Masson  smasson lodyc jussieu fr                         June 2005      version  Id: saveboxparam pro 155 2006 08 11 14:32:05Z smasson             PRO saveboxparam  filename     compile_opt idl2  strictarrsubs    cm_4mesh     def_myuniquetmpdir     IF lmgr demo  EQ 1 THEN BEGIN   if we are in demo mode  we cannot save the parameters in a temporary file   cm_demomode_used         boxzoomparam    bound: lon1  lon2  lat1  lat2  vert1  vert2             indexes: firstxt  lastxt  firstyt  lastyt            firstxu  lastxu  firstyu  lastyu            firstxv  lastxv  firstyv  lastyv            firstxf  lastxf  firstyf  lastyf            firstzt  lastzt  firstzw  lastzw            nxt  nyt  nxu  nyu  nxv  nyv  nxf  nyf  nzt  nzw             key:key_irregular       ENDIF ELSE BEGIN         save  lon1  lon2  lat1  lat2  vert1  vert2            firstxt  lastxt  firstyt  lastyt            firstxu  lastxu  firstyu  lastyu            firstxv  lastxv  firstyv  lastyv            firstxf  lastxf  firstyf  lastyf            firstzt  lastzt  firstzw  lastzw            nxt  nyt  nxu  nyu  nxv  nyv  nxf  nyf  nzt  nzw            key_irregular  filename   myuniquetmpdir   filename      ENDELSE     return end"); 
    5050a[48] = new Array("./Grid/smallmeshmask.html", "smallmeshmask.pro", "", "         categories    For OPA      param inid  in required     param outid  in required     param inname  in required     param outname  in optional       history        July 2004 Sebastien Masson  smasson lodyc jussieu fr       version     Id: smallmeshmask pro 157 2006 08 21 09:01:50Z navarro           PRO ncdf_transfer  inid  outid  inname  outname     compile_opt idl2  strictarrsubs     IF n_elements outname  EQ 0 THEN outname   inname   ncdf_varget  inid  inname  zzz   ncdf_varput  outid  outname  float reform zzz   over    RETURN END        file_comments    Reduce the size of the NetCDF meshmask created by OPA by   using byte format for the masks and the float format for the other   fields       keyword IODIR to define the files path     param ncfilein  in required    1  the name of the meshmask file to be reduced  In that case    there is only one meshmask file     OR     2  the xxx part in the names: xxx mesh_hgr nc xxx mesh_zgr nc   xxx mask nc  In that case  the meshmask is split into 3 files       param ncfileout  in optional default smallmeshmask nc     the name of the reduced meshmask file        examples   IDL  meshdir d1fes2 raid2 smasson DATA ORCA05    IDL  smallmeshmask   meshmask_ORCA_R05 nc iodir meshdir      categories    For OPA      history        July 2004 Sebastien Masson  smasson lodyc jussieu fr       version     Id: smallmeshmask pro 157 2006 08 21 09:01:50Z navarro       PRO smallmeshmask  ncfilein  ncfileout  IODIR   iodir       compile_opt idl2  strictarrsubs     filein   isafile FILE   ncfilein  IODIR   iodir   NEW    test    findfile filein 0    IF test EQ   THEN BEGIN     filein_hgr    findfile filein mesh_hgr nc 0      filein_zgr    findfile filein mesh_zgr nc 0      filein_msk    findfile filein mask nc 0      IF filein_hgr EQ   OR filein_zgr EQ   OR filein_msk EQ    THEN BEGIN       print   meshmask file s  not found        print  filein  does not exist        print  filein mesh_hgr nc does not exist        print  filein mesh_zgr nc does not exist        print  filein mask nc does not exist        return     ENDIF   ENDIF ELSE filein   test       get the horizontal dimensions   IF n_elements filein_hgr  NE 0  THEN cdfid   ncdf_open filein_hgr      ELSE cdfid   ncdf_open filein     ncdf_diminq  cdfid   x  name  jpi   ncdf_diminq  cdfid   y  name  jpj   get the vertical dimensions   IF n_elements filein_zgr  NE 0  THEN BEGIN     ncdf_close  cdfid     cdfid   ncdf_open filein_zgr    ENDIF   listdims   strlowcase ncdf_listdims cdfid    IF  where listdims EQ  z 0  NE  1 THEN ncdf_diminq  cdfid   z  name  jpk ELSE BEGIN      dimid    where strmid listdims  0  5  EQ  depth 0      IF dimid NE  1 THEN ncdf_diminq  cdfid  dimid  name  jpk ELSE BEGIN        dummy   report We could not find the vertical dimension  its name must be z or start with depth        return     ENDELSE    ENDELSE    get the variables list related to the partial steps   varlist_ps   ncdf_listvars cdfid    varlist_ps   strtrim strlowcase varlist_ps  2            define the output file     IF n_elements ncfileout  EQ 0  THEN ncfileout    smallmeshmask nc       cdfidout   ncdf_create isafile FILE   ncfileout  IODIR   iodir   NEW   clobber    ncdf_control  cdfidout   nofill   dimension   dimidx   ncdf_dimdef cdfidout   x  jpi    dimidy   ncdf_dimdef cdfidout   y  jpj    dimidz   ncdf_dimdef cdfidout   z  jpk    global attributs   ncdf_attput  cdfidout   IDL_Program_Name   smallmeshmask pro   GLOBAL   ncdf_attput  cdfidout   Creation_Date  systime   GLOBAL   declaration des variables   varid   lonarr 20    horizontal variables   hgrlist    glamt   glamu   glamv   glamf                    gphit   gphiu   gphiv   gphif                    e1t   e1u   e1v   e1f                    e2t   e2u   e2v   e2f    FOR h   0  n_elements hgrlist 1 DO       varid h    ncdf_vardef cdfidout  hgrlist h   dimidx  dimidy   float    vertical variables   zgrlist    e3t   e3w   gdept   gdepw    FOR z   0  n_elements zgrlist 1 DO       varid 16 z    ncdf_vardef cdfidout  zgrlist z   dimidz   float    variables related to the partial steps   IF  where varlist_ps EQ  hdept 0  NE  1 THEN       varid    varid  ncdf_vardef cdfidout   hdept   dimidx  dimidy   float    IF  where varlist_ps EQ  hdepw 0  NE  1 THEN       varid    varid  ncdf_vardef cdfidout   hdepw   dimidx  dimidy   float    old variable name  keep for compatibility with old run  Change e3tp to e3t_ps   IF  where varlist_ps EQ  e3tp 0  NE  1 THEN       varid    varid  ncdf_vardef cdfidout   e3t_ps   dimidx  dimidy   float    old variable name  keep for compatibility with old run  Change e3wp to e3w_ps   IF  where varlist_ps EQ  e3wp 0  NE  1 THEN       varid    varid  ncdf_vardef cdfidout   e3w_ps   dimidx  dimidy   float      IF  where varlist_ps EQ  e3t_ps 0  NE  1 THEN       varid    varid  ncdf_vardef cdfidout   e3t_ps   dimidx  dimidy   float    IF  where varlist_ps EQ  e3w_ps 0  NE  1 THEN       varid    varid  ncdf_vardef cdfidout   e3w_ps   dimidx  dimidy   float      IF  where varlist_ps EQ  e3u_ps 0  NE  1 THEN         varid    varid  ncdf_vardef cdfidout   e3u_ps   dimidx  dimidy   float      IF  where varlist_ps EQ  e3v_ps 0  NE  1 THEN         varid    varid  ncdf_vardef cdfidout   e3v_ps   dimidx  dimidy   float    mask variable   msklist    tmask   umask   vmask   fmask    FOR m   0  n_elements msklist 1 DO       varid    varid  ncdf_vardef cdfidout  msklist m                                       dimidx  dimidy  dimidz   byte        ncdf_control  cdfidout   endef       get the horizontal variables     IF n_elements filein_hgr  NE 0  THEN BEGIN     ncdf_close  cdfid     cdfid   ncdf_open filein_hgr    ENDIF     FOR h   0  n_elements hgrlist 1 DO       ncdf_transfer  cdfid  cdfidout  hgrlist h      get the vertical variables     IF n_elements filein_zgr  NE 0  THEN BEGIN     ncdf_close  cdfid     cdfid   ncdf_open filein_zgr    ENDIF     FOR z   0  n_elements zgrlist 1 DO       ncdf_transfer  cdfid  cdfidout  zgrlist z    partial step variables    IF  where varlist_ps EQ  hdept 0  NE  1 THEN       ncdf_transfer  cdfid  cdfidout   hdept    IF  where varlist_ps EQ  hdepw 0  NE  1 THEN       ncdf_transfer  cdfid  cdfidout   hdepw    IF  where varlist_ps EQ  e3tp 0  NE  1 THEN       ncdf_transfer  cdfid  cdfidout   e3tp   e3t_ps    IF  where varlist_ps EQ  e3wp 0  NE  1 THEN       ncdf_transfer  cdfid  cdfidout   e3wp   e3w_ps    IF  where varlist_ps EQ  e3t_ps 0  NE  1 THEN       ncdf_transfer  cdfid  cdfidout   e3t_ps    IF  where varlist_ps EQ  e3w_ps 0  NE  1 THEN       ncdf_transfer  cdfid  cdfidout   e3w_ps      IF  where varlist_ps EQ  e3u_ps 0  NE  1 THEN         ncdf_transfer  cdfid  cdfidout   e3u_ps      IF  where varlist_ps EQ  e3v_ps 0  NE  1 THEN         ncdf_transfer  cdfid  cdfidout   e3v_ps      mask     IF n_elements filein_msk  NE 0  THEN BEGIN     ncdf_close  cdfid     cdfid   ncdf_open filein_msk    ENDIF   loop on the vertical levels to limit the memory use   FOR k   0  jpk 1 DO BEGIN     FOR m   0  3 DO BEGIN       CASE  ncdf_varinq cdfid  msklist m ndims OF         3:ncdf_varget  cdfid  msklist m  zzz  offset    0  0  k              count    jpi  jpj  1          4:ncdf_varget  cdfid  msklist m  zzz  offset    0  0  k  0              count    jpi  jpj  1  1        ENDCASE       ncdf_varput  cdfidout  msklist m  byte temporary zzz              offset    0  0  k  count    jpi  jpj  1      ENDFOR   ENDFOR       ncdf_close  cdfid   ncdf_close  cdfidout    RETURN END"); 
    51 a[49] = new Array("./Interpolation/angle.html", "angle.pro", "", "       file_comments   north stereographic polar projection      categories    Interpolation      param plam  in required       param pphi  in required       keyword DOUBLE  default 0    use double precision  default is float       returns         gsinu gcosu : sinus and cosinus of the angle         gsinv gcosv   between north south direction         gsint gcost   and the j direction of the mesh      restrictions   to compute the lateral boundary conditions  we assume that:        1  the first line is similar to the second line              gcosu  0    gcosu  1               gsinu  0    gsinu  1         2  the grid follows OPA x periodicity rule  first column is       equal to the next to last column              gcosv 0      gcosv jpj 2                 gsinv 0      gsinv jpj 2           history         Original :  96 07  O  Marti                      98 06  G  Madec          Feb 2005: IDL adaptation S  Masson      version  Id: angle pro 157 2006 08 21 09:01:50Z navarro         FUNCTION fsnspp  plam  pphi  DOUBLE   double     compile_opt idl2  strictarrsubs     IF keyword_set double  THEN BEGIN     a   2 d   tan   dpi 4 d    dpi 180 d pphi 2 d       x   cos   dpi 180 d plam     a     y   sin   dpi 180 d plam     a   ENDIF ELSE BEGIN     a   2    tan   pi 4     pi 180 float pphi 2        x   cos   pi 180 float plam      a     y   sin   pi 180 float plam      a   ENDELSE   RETURN   x:x  y:y  END        file_comments Compute angles between grid lines and direction of the North  fom angle F v 2 2 in OPA8 2       param fileocemesh  in required  a netcdf file that contains  at least :          glamu  gphiu: longitudes and latitudes at U points          glamv  gphiv: longitudes and latitudes at V points          glamf  gphif: longitudes and latitudes at F points      param gcosu  in required     param gsinu  in required     param gcosv  in required     param gsinv  in required     param gcost  in required     param gsint  in required     keyword IODIRECTORY the directory path where is located fileocemesh    keyword DOUBLE  default 0  use double precision  default is float        PRO angle  fileocemesh  gcosu  gsinu  gcosv  gsinv  gcost  gsint                IODIRECTORY   iodirectory  DOUBLE   double     0  read oceanic grid parameters           compile_opt idl2  strictarrsubs     IF keyword_set IODIRECTORY  THEN BEGIN     IF  strpos iodirectory reverse_search  NE  strlen iodirectory 1  THEN         iodirectory   iodirectory    ENDIF ELSE iodirectory       fileoce   iodirectory fileocemesh     fileoce   findfile fileoce  count   okfile    IF okfile NE 1 THEN BEGIN     print   the file  fileoce  is not found  we stop      stop   ENDIF     cdfido   ncdf_open fileoce 0    ncdf_varget  cdfido   glamt  glamt   ncdf_varget  cdfido   glamu  glamu   ncdf_varget  cdfido   glamv  glamv   ncdf_varget  cdfido   glamf  glamf   ncdf_varget  cdfido   gphit  gphit   ncdf_varget  cdfido   gphiu  gphiu   ncdf_varget  cdfido   gphiv  gphiv   ncdf_varget  cdfido   gphif  gphif   ncdf_close  cdfido     glamt   reform glamt   over    glamu   reform glamu   over    glamv   reform glamv   over    glamf   reform glamf   over    gphit   reform gphit   over    gphiu   reform gphiu   over    gphiv   reform gphiv   over    gphif   reform gphif   over    jpj    size glamf   dimension 1      I  Compute the cosinus and sinus        computation done on the north stereographic polar plan         north pole direction   modulous  at t point    znpt   fsnspp  glamt  gphit  DOUBLE   double     glamt    1   gphit    1  free memory   znpt x     znpt x   znpt y     znpt y   znnpt   znpt x znpt x   znpt y znpt y       north pole direction   modulous  at u point    znpu   fsnspp  glamu  gphiu  DOUBLE   double     glamu    1   gphiu    1  free memory   znpu x     znpu x   znpu y     znpu y   znnpu   znpu x znpu x   znpu y znpu y       north pole direction   modulous  at v point    znpv   fsnspp  glamv  gphiv  DOUBLE   double     znpv00   znpv   znpv01   fsnspp  shift glamv  0  1  shift gphiv  0  1  DOUBLE   double     glamv    1   gphiv    1  free memory   znpv x     znpv x   znpv y     znpv y   znnpv   znpv x znpv x   znpv y znpv y       f point   znpf00   fsnspp  glamf  gphif  DOUBLE   double     znpf01   fsnspp  shift glamf  0  1  shift gphif  0  1  DOUBLE   double     znpf10   fsnspp  shift glamf  1  0  shift gphif  1  0  DOUBLE   double     glamf    1   gphif    1  free memory       j direction: v point segment direction  t point    zxvvt   znpv00 x   znpv01 x   zyvvt   znpv00 y   znpv01 y   zmnpvt   sqrt   temporary znnpt      zxvvt zxvvt   zyvvt zyvvt        znpv00    1  free memory   znpv01    1  free memory   IF keyword_set double  THEN zmnpvt   1 e 14   zmnpvt     ELSE zmnpvt   1 e 6   zmnpvt       j direction: f point segment direction  u point    zxffu   znpf00 x   znpf01 x   zyffu   znpf00 y   znpf01 y   zmnpfu   sqrt   temporary znnpu      zxffu zxffu   zyffu zyffu        znpf01    1  free memory   IF keyword_set double  THEN zmnpfu   1 e 14   zmnpfu     ELSE zmnpfu   1 e 6   zmnpfu       i direction: f point segment direction  v point    zxffv   znpf00 x   znpf10 x   zyffv   znpf00 y   znpf10 y   znpf00    1    znpf10    1  free memory   zmnpfv   sqrt   temporary znnpv      zxffv zxffv   zyffv zyffv        IF keyword_set double  THEN zmnpfv   1 e 14   zmnpfv     ELSE zmnpfv   1 e 6   zmnpfv       cosinus and sinus using scalar and vectorial products   gsint     znpt x zyvvt   znpt y zxvvt     zmnpvt   gcost     znpt x zxvvt   znpt y zyvvt     zmnpvt       cosinus and sinus using scalar and vectorial products   gsinu     znpu x zyffu   znpu y zxffu     zmnpfu   gcosu     znpu x zxffu   znpu y zyffu     zmnpfu       cosinus and sinus using scalar and vectorial products          caution  rotation of 90 degres    gsinv      znpv x zxffv   znpv y zyffv     zmnpfv   gcosv     znpv x zyffv   znpv y zxffv     zmnpfv     II  Geographic mesh               bad   where abs glamf shift glamf  0  1  LT 1 e 8          IF bad 0  NE  1 THEN BEGIN           gcosu bad    1            gsinu bad    0          ENDIF         bad   where abs gphif shift gphif  1  0  LT 1 e 8          IF bad 0  NE  1 THEN BEGIN           gcosv bad    1            gsinv bad    0          ENDIF     III  Lateral boundary conditions         gcost  0    gcost  1    gsint  0    gsint  1    gcosu  0    gcosu  1    gsinu  0    gsinu  1    gcosv 0      gcosv jpj 2      gsinv 0      gsinv jpj 2        RETURN END"); 
     51a[49] = new Array("./Interpolation/angle.html", "angle.pro", "", "       file_comments   north stereographic polar projection      categories    Interpolation      param plam  in required    longitude position      param pphi  in required    latitude position      keyword DOUBLE  default 0    use double precision  default is float       returns   structure:  x:x  y:y  containing the point position in north stereographic polar projection      hidden       FUNCTION fsnspp  plam  pphi  DOUBLE   double     compile_opt idl2  strictarrsubs     IF keyword_set double  THEN BEGIN     a   2 d   tan   dpi 4 d    dpi 180 d pphi 2 d       x   cos   dpi 180 d plam     a     y   sin   dpi 180 d plam     a   ENDIF ELSE BEGIN     a   2    tan   pi 4     pi 180 float pphi 2        x   cos   pi 180 float plam      a     y   sin   pi 180 float plam      a   ENDELSE   RETURN   x:x  y:y  END        file_comments Compute angles between grid lines and direction of the North pole  fom angle F v 2 2 in OPA8 2       categories    Interpolation      param fileocemesh  in required type scalar string    a netcdf file that contains  at least  the following variables:          glamu  gphiu: longitudes and latitudes at U points          glamv  gphiv: longitudes and latitudes at V points          glamf  gphif: longitudes and latitudes at F points      param gcosu  out type 2d array    cosinus of the angle between grid lines at U points and direction of the North pole      param gsinu  out type 2d array    sinus of the angle between grid lines at U points and direction of the North pole      param gcosv  out type 2d array    cosinus of the angle between grid lines at V points and direction of the North pole      param gsinv  out type 2d array    sinus of the angle between grid lines at V points and direction of the North pole      param gcost  out type 2d array    cosinus of the angle between grid lines at T points and direction of the North pole      param gsint  out type 2d array    sinus of the angle between grid lines at T points and direction of the North pole      keyword IODIRECTORY  type scalar string default    the directory path where is located fileocemesh      keyword DOUBLE  type 1 ou 2 default 0    put 1 to use double precision  default is float       restrictions   to compute the lateral boundary conditions  we assume that:        1  the first line is similar to the second line              gcosu  0    gcosu  1               gsinu  0    gsinu  1         2  the grid follows OPA x periodicity rule  first column is       equal to the next to last column              gcosv 0      gcosv jpj 2                 gsinv 0      gsinv jpj 2         history         Original :  96 07  O  Marti                      98 06  G  Madec          Feb 2005: IDL adaptation S  Masson      version  Id: angle pro 202 2007 01 12 11:00:06Z smasson         PRO angle  fileocemesh  gcosu  gsinu  gcosv  gsinv  gcost  gsint                IODIRECTORY   iodirectory  DOUBLE   double     0  read oceanic grid parameters           compile_opt idl2  strictarrsubs     IF keyword_set IODIRECTORY  THEN BEGIN     IF  strpos iodirectory reverse_search  NE  strlen iodirectory 1  THEN         iodirectory   iodirectory    ENDIF ELSE iodirectory       fileoce   iodirectory fileocemesh     fileoce   findfile fileoce  count   okfile    IF okfile NE 1 THEN BEGIN     print   the file  fileoce  is not found  we stop      stop   ENDIF     cdfido   ncdf_open fileoce 0    ncdf_varget  cdfido   glamt  glamt   ncdf_varget  cdfido   glamu  glamu   ncdf_varget  cdfido   glamv  glamv   ncdf_varget  cdfido   glamf  glamf   ncdf_varget  cdfido   gphit  gphit   ncdf_varget  cdfido   gphiu  gphiu   ncdf_varget  cdfido   gphiv  gphiv   ncdf_varget  cdfido   gphif  gphif   ncdf_close  cdfido     glamt   reform glamt   over    glamu   reform glamu   over    glamv   reform glamv   over    glamf   reform glamf   over    gphit   reform gphit   over    gphiu   reform gphiu   over    gphiv   reform gphiv   over    gphif   reform gphif   over    jpj    size glamf   dimension 1      I  Compute the cosinus and sinus        computation done on the north stereographic polar plan         north pole direction   modulous  at t point    znpt   fsnspp  glamt  gphit  DOUBLE   double     glamt    1   gphit    1  free memory   znpt x     znpt x   znpt y     znpt y   znnpt   znpt x znpt x   znpt y znpt y       north pole direction   modulous  at u point    znpu   fsnspp  glamu  gphiu  DOUBLE   double     glamu    1   gphiu    1  free memory   znpu x     znpu x   znpu y     znpu y   znnpu   znpu x znpu x   znpu y znpu y       north pole direction   modulous  at v point    znpv   fsnspp  glamv  gphiv  DOUBLE   double     znpv00   znpv   znpv01   fsnspp  shift glamv  0  1  shift gphiv  0  1  DOUBLE   double     glamv    1   gphiv    1  free memory   znpv x     znpv x   znpv y     znpv y   znnpv   znpv x znpv x   znpv y znpv y       f point   znpf00   fsnspp  glamf  gphif  DOUBLE   double     znpf01   fsnspp  shift glamf  0  1  shift gphif  0  1  DOUBLE   double     znpf10   fsnspp  shift glamf  1  0  shift gphif  1  0  DOUBLE   double     glamf    1   gphif    1  free memory       j direction: v point segment direction  t point    zxvvt   znpv00 x   znpv01 x   zyvvt   znpv00 y   znpv01 y   zmnpvt   sqrt   temporary znnpt      zxvvt zxvvt   zyvvt zyvvt        znpv00    1  free memory   znpv01    1  free memory   IF keyword_set double  THEN zmnpvt   1 e 14   zmnpvt     ELSE zmnpvt   1 e 6   zmnpvt       j direction: f point segment direction  u point    zxffu   znpf00 x   znpf01 x   zyffu   znpf00 y   znpf01 y   zmnpfu   sqrt   temporary znnpu      zxffu zxffu   zyffu zyffu        znpf01    1  free memory   IF keyword_set double  THEN zmnpfu   1 e 14   zmnpfu     ELSE zmnpfu   1 e 6   zmnpfu       i direction: f point segment direction  v point    zxffv   znpf00 x   znpf10 x   zyffv   znpf00 y   znpf10 y   znpf00    1    znpf10    1  free memory   zmnpfv   sqrt   temporary znnpv      zxffv zxffv   zyffv zyffv        IF keyword_set double  THEN zmnpfv   1 e 14   zmnpfv     ELSE zmnpfv   1 e 6   zmnpfv       cosinus and sinus using scalar and vectorial products   gsint     znpt x zyvvt   znpt y zxvvt     zmnpvt   gcost     znpt x zxvvt   znpt y zyvvt     zmnpvt       cosinus and sinus using scalar and vectorial products   gsinu     znpu x zyffu   znpu y zxffu     zmnpfu   gcosu     znpu x zxffu   znpu y zyffu     zmnpfu       cosinus and sinus using scalar and vectorial products          caution  rotation of 90 degres    gsinv      znpv x zxffv   znpv y zyffv     zmnpfv   gcosv     znpv x zyffv   znpv y zxffv     zmnpfv     II  Geographic mesh               bad   where abs glamf shift glamf  0  1  LT 1 e 8          IF bad 0  NE  1 THEN BEGIN           gcosu bad    1            gsinu bad    0          ENDIF         bad   where abs gphif shift gphif  1  0  LT 1 e 8          IF bad 0  NE  1 THEN BEGIN           gcosv bad    1            gsinv bad    0          ENDIF     III  Lateral boundary conditions         gcost  0    gcost  1    gsint  0    gsint  1    gcosu  0    gcosu  1    gsinu  0    gsinu  1    gcosv 0      gcosv jpj 2      gsinv 0      gsinv jpj 2        RETURN END"); 
    5252a[50] = new Array("./Interpolation/clickincell.html", "clickincell.pro", "", "     file_comments   click on a map and find in which cell the click was      categories   Grid      keyword CELLTYPE    T   W   U   V  or  F  This this the type of point       that is located in the center of the cell which the click is       located  default is T type of cell  with corner defined by F       points       keyword DRAWCELL to draw the cell in which we clicked      keyword COLOR  the color used to draw the cells  Clicking one more       time in the same cell will draw the cell with the white color       keyword ORIGINAL to get the position of the cell regarding the original       grid  with no key_shift  ixminmesh  iyminmesh       keyword IJ see outputs      keyword _EXTRA to pass extra keywords to inquad and plot  when  drawcell       returns       the index of the selected cells regarding to the grid which       is in memory in the variable of the common  If  ij keyword is       activated give 2D array  2  n  which are the i j position of the       n selected cells       uses common pro      examples     IDL  res   clickincell        Click with the left button to select a cell  Clicking one more       time in the same cell remove the cell from the selection        Click on the right button to quit      IDL  plt  findgen jpi jpj nodata map 90 0 0 ortho   IDL  print  clickincell draw color 150 xy       history        Sebastien Masson  smasson lodyc jussieu fr         August 2003      version  Id: clickincell pro 163 2006 08 29 12:59:46Z navarro       FUNCTION clickincell  CELLTYPE   celltype  DRAWCELL   drawcell  COLOR   color  ORIGINAL   original  IJ   ij  _EXTRA   extra     compile_opt idl2  strictarrsubs    common     initialization   cellnum    1L   selected   0     Cell list   get the grid parameter according to celltype   oldgrid   vargrid   IF NOT keyword_set celltype  THEN celltype    T    CASE strupcase celltype  OF      T :vargrid    F       W :vargrid    F       U :vargrid    V       V :vargrid    U       F :vargrid    T    ENDCASE   grille   1  glam  gphi   1  nx  ny  nz  firstx  firsty  firstz  lastx  lasty  lastz   vargrid   oldgrid   define the corner of the cells in the clockwise direction   IF keyword_set key_periodic  AND nx EQ jpi THEN BEGIN     x1   glam  0:ny 2      y1   gphi  0:ny 2      x2   glam  1:ny 1      y2   gphi  1:ny 1      x3   shift glam  1:ny 1   1  0      y3   shift gphi  1:ny 1   1  0      x4   shift glam  0:ny 2   1  0      y4   shift gphi  0:ny 2   1  0    ENDIF ELSE BEGIN     x1   glam 0:nx 2  0:ny 2      y1   gphi 0:nx 2  0:ny 2      x2   glam 0:nx 2  1:ny 1      y2   gphi 0:nx 2  1:ny 1      x3   glam 1:nx 1  1:ny 1      y3   gphi 1:nx 1  1:ny 1      x4   glam 1:nx 1  0:ny 2      y4   gphi 1:nx 1  0:ny 2    ENDELSE   glam    1   free memory   gphi    1   free memory     get mousse position on the reference map   cursor  x  y   data   up     while  mouse button ne 4  do BEGIN     IF finite x finite x  EQ 0 THEN GOTO  outwhile       case  mouse button of       1:BEGIN   What is the longitude          WHILE x GT  x range 1  DO x   x 360         WHILE x LT  x range 0  DO x   x 360         IF x GT  x range 1  THEN GOTO  outwhile         IF y GT  y range 1  THEN GOTO  outwhile         IF y LT  y range 0  THEN GOTO  outwhile           cell   inquad x  y  x1  y1  x2  y2  x3  y3  x4  y4                            onsphere  _extra   extra            IF cell 0  EQ  1 OR n_elements cell  GT 1 THEN GOTO  outwhile         cell   cell 0          already    where cellnum EQ cell 0          IF already EQ  1 THEN BEGIN           cellnum    cellnum  cell            selected    selected  1            already   n_elements selected 1         ENDIF ELSE selected already    1 selected already          IF keyword_set drawcell  THEN BEGIN           oplot   x1 cell  x2 cell  x3 cell  x4 cell  x1 cell                   y1 cell  y2 cell  y3 cell  y4 cell  y1 cell                  color   color selected already                   d n_colors   255 1 selected already                  _extra   extra         ENDIF       END       2:                          middle button       ELSE:     ENDCASE   get mousse position on the reference map outwhile:     cursor  x  y   data   up   ENDWHILE     good   where selected NE 0    IF good 0  EQ  1 THEN RETURN   1     cellnum   cellnum good      yy   cellnum nx 1 key_periodic nx EQ jpi    xx   cellnum MOD  nx 1 key_periodic nx EQ jpi      CASE strupcase celltype  OF      T :BEGIN       xx   xx firstx 1       yy   yy firsty 1     END      W :BEGIN       xx   xx firstx 1       yy   yy firsty 1     END      U :BEGIN       xx   xx firstx       yy   yy firsty 1     END      V :BEGIN       xx   xx firstx 1       yy   yy firsty     END      F :BEGIN       xx   xx firstx       yy   yy firsty     END   ENDCASE     bad   where xx GE jpi    IF bad 0  NE  1 THEN BEGIN     xx bad    xx bad jpi     yy bad    yy bad 1   ENDIF   bad   where yy GE jpj    IF bad 0  NE  1 THEN stop     IF keyword_set original  THEN BEGIN     xx   xx key_shift     bad   where xx LT 0      IF bad 0  NE  1 THEN xx bad    xx bad jpi     xx   xx MOD jpi     xx   xx  ixminmesh     yy   yy iyminmesh   ENDIF     ncell   n_elements xx    IF keyword_set ij  THEN       RETURN   reform xx  1  ncell   over                   reform yy  1  ncell   over      IF keyword_set original  THEN RETURN  xx jpiglo yy     ELSE RETURN  xx jpi yy END"); 
    53 a[51] = new Array("./Interpolation/compute_fromirr_bilinear_weigaddr.html", "compute_fromirr_bilinear_weigaddr.pro", "", "     file_comments   compute the weight and address needed to interpolate data from   an  irregular 2D grid   defined as a grid made of quadrilateral cells    to any grid using the bilinear method      categories    Interpolation      param olonin  in required    longitude of the input data      param olat  in required    latitude of the input data      param omsk  in required    land sea mask of the input data      param alonin  in required    longitude of the output data      param alat  in required    latitude of the output data      param amsk  in required    land sea mask of the output data      param weig  out     param addr  out    2D arrays  weig and addr are the weight and addresses used to   perform the interpolation:    dataout   total weig datain addr  1     dataout   reform dataout  jpia  jpja   over       restrictions       the input grid must be an  irregular 2D grid  defined as a grid made    of quadrilateral cells which corners positions are defined with olonin and olat       We supposed the data are located on a sphere  with a periodicity along    the longitude       to perform the bilinear interpolation within quadrilateral cells  we    first morph the cell into a square cell and then compute the bilinear    interpolation        if some corners of the cell are land points  their weight is set to 0    and the weight is redistributed on the remaining  water  corners       points located out of the southern and northern boundaries or in cells    containing only land points are set the the same value as their closest neighbor l      history    June 2006: Sebastien Masson  smasson lodyc jussieu fr       version  Id: compute_fromirr_bilinear_weigaddr pro 157 2006 08 21 09:01:50Z navarro         PRO compute_fromirr_bilinear_weigaddr  olonin  olat  omsk  alonin  alat  amsk  weig  addr     compile_opt idl2  strictarrsubs     jpia    size alonin   dimensions 0    jpja    size alonin   dimensions 1      jpio    size olonin   dimensions 0    jpjo    size olonin   dimensions 1      longitude  between 0 and 360   alon   alonin MOD 360   out   where alon LT 0    IF out 0  NE  1 THEN alon out    alon out 360   olon   olonin MOD 360   out   where olon LT 0    IF out 0  NE  1 THEN olon out    olon out 360     we work only on the water points   owater   where omsk EQ 1    nowater   n_elements owater    awater   where amsk EQ 1    nawater   n_elements awater      define all cells that have corners located at olon  olat   we define the cell with the address of all corners                3        2                                                                                                                   0        1     alladdr   lindgen jpio  jpjo 1    celladdr   lonarr 4  jpio jpjo 1    celladdr 0      alladdr   celladdr 1      shift alladdr   1    celladdr 2      shift alladdr   jpio   1    celladdr 3      alladdr   jpio     list the cells that have at least 1 ocean point as corner   good   where total omsk celladdr  1  GT 0    keep only those cells   celladdr   celladdr  temporary good      xcell   olon celladdr    minxcell   min xcell  dimension   1  max   maxxcell    ycell   olat celladdr    minycell   min ycell  dimension   1  max   maxycell    foraddr: address of the ocean water cell associated to each atmosphere water point   foraddr   lonarr nawater    forweight: x y position of the atmosphere water point in the ocean water cell   forweight   dblarr nawater  2      Loop on all the water point of the atmosphere   We look for which ocean water cell contains the atmosphere water point     delta   max 360 jpio   180 jpjo  4    FOR n   0L  nawater 1 DO BEGIN   control print     IF  n MOD 5000  EQ 0 THEN print  n   longitude and latitude of the atmosphere water point     xx   alon awater n      yy   alat awater n    1  we reduce the number of ocean cells for which we will try to know if   xx yy is inside      CASE 1 OF   if we are near the norh pole       yy GE  90 delta :BEGIN         lat1   90 2 delta         good   where maxycell GE lat1          onsphere   1       END   if we are near the longitude periodicity area       xx LE delta OR xx GE  360 delta :BEGIN         lat1   yy delta         lat2   yy delta         good   where minxcell LE 2 delta OR maxxcell GE  360 2 delta  AND maxycell GE lat1 AND minycell LE lat2          onsphere   1       END   other cases       ELSE:BEGIN         lon1   xx delta         lon2   xx delta         lat1   yy delta         lat2   yy delta         good   where maxxcell GE lon1 AND minxcell LE lon2 AND maxycell GE lat1 AND minycell le lat2    ORCA cases : orca grid is irregular only northward of 40N         CASE 1 OF           jpio EQ 92   AND  jpjo EQ 76   OR jpjo EQ 75   OR jpjo EQ 74   :onsphere   yy GT 40           jpio EQ 180  AND  jpjo EQ 149  OR jpjo EQ 148  OR jpjo EQ 147  :onsphere   yy GT 40           jpio EQ 720  AND  jpjo EQ 522  OR jpjo EQ 521  OR jpjo EQ 520  :onsphere   yy GT 40           jpio EQ 1440 AND  jpjo EQ 1021 OR jpjo EQ 1020 OR jpjo EQ 1019 :onsphere   yy GT 40           ELSE:onsphere   1         ENDCASE       END     ENDCASE   we found a short list of possible ocean water cells containing the atmosphere water point     IF good 0  NE  1 THEN BEGIN   in which cell is located the atmosphere water point    Warning  inquad use clockwise quadrilateral definition       ind   inquad xx  yy                        xcell 0  good  ycell 0  good                         xcell 3  good  ycell 3  good                         xcell 2  good  ycell 2  good                         xcell 1  good  ycell 1  good                         onsphere   onsphere  newcoord   newcoord   noprint    keep only the first cell  if the atmospheric point was located in several ocean cells        ind   ind 0    we found one ocean water cell containing the atmosphere water point       IF ind NE  1 THEN BEGIN         ind   good ind    we keep its address         foraddr n    ind   now  we morph the quadrilateral ocean cell into the reference square  0   1    in addition we get the corrdinates of the atmospheric point in this new morphed square         IF onsphere THEN BEGIN   Warning  quadrilateral2square use anticlockwise quadrilateral definition           xy   quadrilateral2square newcoord 0  0  newcoord 1  0                                          newcoord 0  3  newcoord 1  3                                          newcoord 0  2  newcoord 1  2                                          newcoord 0  1  newcoord 1  1                                          newcoord 0  4  newcoord 1  4          ENDIF ELSE BEGIN           xy   quadrilateral2square xcell 0  ind  ycell 0  ind                                          xcell 1  ind  ycell 1  ind                                          xcell 2  ind  ycell 2  ind                                          xcell 3  ind  ycell 3  ind  xx  yy          ENDELSE   take care of rounding errors          zero   where abs xy  LT 1e 4          IF zero 0  NE  1 THEN xy zero    0         one   where abs 1 xy  LT 1e 4          IF one 0  NE  1 THEN xy one    1   some  useless  checks          IF  xy 0  LT 0 OR xy 0  GT 1 THEN stop         IF  xy 0  LT 0 OR xy 0  GT 1 THEN stop   keep the new coordinates         forweight n  0    xy 0          forweight n  1    xy 1        ENDIF ELSE foraddr n     1     ENDIF ELSE foraddr n     1   ENDFOR   do we have some water atmospheric points that are not located in an water oceanic cell    bad   where foraddr EQ  1    IF bad 0  NE  1 THEN BEGIN   yes    we look for neighbor water atmospheric point located in water oceanic cell     badaddr   awater bad      good   where foraddr NE  1    list the atmospheric points located in water oceanic cell     goodaddr   awater good    there longitude and latitude     goodlon   alon goodaddr      goodlat   alat goodaddr    for all the bad points  look for a neighbor     neig   lonarr n_elements bad      FOR i   0  n_elements bad 1 DO BEGIN       neig i     neighbor alon badaddr i  alat badaddr i  goodlon  goodlat   sphere 0      ENDFOR   get the address regarding foraddr     neig   good neig    associate each bad point with its neighbor  get its address and weight      foraddr bad    foraddr neig      forweight bad      forweight neig      endif   transform the address of the ocean cell into the address of its 4 corners   newaaddr   celladdr  temporary foraddr    now we compute the weight to give at each corner   newaweig   dblarr 4  nawater    a   reform forweight  0  1  nawater    b   reform forweight  1  1  nawater    forweight     1   free memory   newaweig    1 a 1 b   1 b a  a b   1 a b    a    1    b    1   free memory   mask the weight to suppress the corner located on land   newaweig   newaweig omsk newaaddr    totalweig   total newaweig  1    for cell with some land corner    we have to redistribute the weight on the reaining water corners   weights normalization   totalweig   total newaweig  1    newaweig   newaweig replicate 1  4 totalweig    totalweig   total newaweig  1     weights   weig   dblarr 4  jpia jpja    weig  awater    temporary newaweig    address   addr   dblarr 4  jpia jpja    addr  awater    temporary newaaddr      RETURN END"); 
    54 a[52] = new Array("./Interpolation/compute_fromreg_bilinear_weigaddr.html", "compute_fromreg_bilinear_weigaddr.pro", "", "     file_comments   compute the weight and address needed to interpolate data from a    regular grid  to any grid using the bilinear method      categories    Interpolation      param alonin in required    longitude of the input data      param alatin  in required    latitude of the input data      param olonin  in required    longitude of the output data      param olat  in required    latitude of the output data      keyword NONORTHERNLINE   activate if you don t want to take into   account the northen line of the input data when performing the interpolation       keyword NOSOUTHERNLINE   activate if you don t want to take into   account the southern line of the input data when performing the interpolation       param weig  out     param addr  out    2D arrays  weig and addr are the weight and addresses used to   perform the interpolation:    dataout   total weig datain addr  1     dataout   reform dataout  jpio  jpjo   over       restrictions      the input grid must be a  regular grid  defined as a grid for which each    longitudes lines have the same latitude and each latitudes columns have the    same longitude       We supposed the data are located on a sphere  with a periodicity along    the longitude       points located out of the southern and northern boundaries are interpolated    using a linear interpolation only along the longitudinal direction       history    November 2005: Sebastien Masson  smasson lodyc jussieu fr       version  Id: compute_fromreg_bilinear_weigaddr pro 163 2006 08 29 12:59:46Z navarro         PRO compute_fromreg_bilinear_weigaddr  alonin  alatin  olonin  olat  weig  addr       NONORTHERNLINE   nonorthernline  NOSOUTHERNLINE   nosouthernline     compile_opt idl2  strictarrsubs     alon   alonin   alat   alatin   olon   olonin     jpia   n_elements alon    jpja   n_elements alat      jpio    size olon   dimensions 0    jpjo    size olon   dimensions 1      alon   minalon   min alon   max   maxalon    IF maxalon minalon GE 360  THEN stop   alon must be monotonically increasing   IF array_equal sort alon  lindgen jpia  NE 1 THEN BEGIN     shiftx    where alon EQ min alon 0      alon   shift alon  shiftx      IF array_equal sort alon  lindgen jpia  NE 1 THEN stop   ENDIF ELSE shiftx   0   for longitude periodic boundary condition we add the fist   column on the right side of the array and   alon    alon  alon 0 360    jpia   jpia 1L   alat   revy   alat 0  GT alat 1    IF revy THEN alat   reverse alat    alat must be monotonically increasing   IF array_equal sort alat  lindgen jpja  NE 1 THEN stop     if keyword_set nonorthernline  then BEGIN     jpja   jpja   1L     alat   alat 0: jpja 1L    ENDIF   if keyword_set nosouthernline  then BEGIN     alat   alat 1: jpja 1L      jpja   jpja   1L   ENDIF   olon between minalon et minalon 360   out   where olon LT minalon    WHILE out 0  NE  1 DO BEGIN     olon out    olon out 360      out   where olon LT minalon    ENDWHILE   out   where olon GE minalon 360    WHILE out 0  NE  1 DO BEGIN     olon out    olon out  360      out   where olon GE minalon 360    ENDWHILE   make sure that all values of olon are located within values of alon   IF min olon  max   ma  LT minalon THEN stop   IF ma GE minalon 360  THEN stop     we want to do biliear interpolation   for each ocean point  we must   find in which atm cell it is located    if the ocean point is out of the atm grid  we use closest neighbor   interpolation     for each T point of oce grid  we find in which armospheric cell it is   located    As the atmospheric grid is regular  we can use inrecgrid instead   of inquad    pos   inrecgrid olon  olat  alon 0:jpia 2L  alat 0:jpja 2L                        checkout    alon jpia 1L  alat jpja 1L   output2d    checks    for longitude  each ocean points must be located in atm cell    IF  where pos 0    EQ  1 0  NE  1 THEN stop   no ocean point should be located westward of the left boundary of the   atm cell in which it is supposed to be located   IF total olon LT alon pos 0    NE 0 THEN stop   no ocean point should be located eastward of the right boundary of the   atm cell in which it is supposed to be located   IF total olon GT alon pos 0   1  NE 0 THEN stop     we use bilinear interpolation     we change the coordinates of each ocean points to fit into a   rectangle defined by:      y2                                                                     y1         x1          x2        X    x x1 x2 x1       Y    y y1 y2 y1      indx   pos 0      indy    temporary pos 1      points located out of the atmospheric grid too much northward or southward    bad   where indy EQ  1    indy   0   indy     IF max indx  GT jpia 2 THEN stop   checks    IF max indy  GT jpja 2 THEN stop   checks    x coordinates of the atm cell   x1   alon indx    x2   alon indx 1    new x coordinates of the ocean points in each cell   divi   temporary x2 x1   glamnew    olon x1 temporary divi    x1    1   free memory   olon    1   free memory   y coordinates of the atm cell   y1   alat indy    y2   alat indy 1                  new y coordinates of the ocean points in each cell   divi   temporary y2 y1   zero   where divi EQ 0    IF zero 0  NE  1 THEN divi zero    1    gphinew    olat y1 temporary divi    y1    1   free memory   checks    IF min glamnew  LT 0 THEN stop   IF max glamnew  GT 1 THEN stop     weight and address array used for bilinear interpolation    xaddr   lonarr 4  jpio jpjo    xaddr 0      indx   xaddr 1      indx   1L   xaddr 2      indx   1L   xaddr 3      indx     yaddr   lonarr 4  jpio jpjo    yaddr 0      indy   yaddr 1      indy   yaddr 2      indy   1L   yaddr 3      indy   1L   compute the weight for the bilinear interpolation    weig   fltarr 4  jpio jpjo    weig 0       1 glamnew     1 gphinew    weig 1          glamnew     1 gphinew    weig 2          glamnew        gphinew   weig 3       1 glamnew        gphinew   free memory   gphinew    1   IF bad 0  EQ  1 THEN glamnew    1 ELSE glamnew    temporary glamnew bad    we work now on the  bad  points   linear interpolation only along the longitudinal direction   IF bad 0  NE  1 THEN BEGIN     ybad   olat bad    the ocean points that are not located into an atm cell should be   located northward of the northern boundary of the atm grid        or southward of the southern boundary of the atm grid     IF total ybad GE min alat  AND ybad LE max alat  GE 1 THEN stop       weig 0  bad     1 glamnew      weig 1  bad    temporary glamnew      weig 2  bad    0      weig 3  bad    0      south   where ybad LT alat 0      IF south 0  NE  1 THEN yaddr  bad temporary south    0L     north   where ybad GT alat jpja 1      IF north 0  NE  1 THEN yaddr  bad temporary north    0L     ybad    1   bad    1   free memory   ENDIF   check totalweight   1   totalweig   abs 1 total weig  1    IF  where temporary totalweig  GE 1 e 5 0  NE  1 THEN stop     come back to the original atm grid without longitudinal overlap      jpia   jpia 1L   xaddr   temporary xaddr  MOD jpia   take into account shiftx if needed   IF shiftx NE 0 THEN xaddr    temporary xaddr    shiftx  MOD jpia   take into account nosouthernline and nonorthernline   if keyword_set nosouthernline  then BEGIN     yaddr   temporary yaddr    1L     jpja   jpja   1L   ENDIF   if keyword_set nonorthernline  then jpja   jpja   1L   take into account revy if needed   IF revy EQ 1 THEN yaddr   jpja   1L   temporary yaddr                                addr   temporary yaddr jpia   temporary xaddr      return end "); 
    55 a[53] = new Array("./Interpolation/compute_fromreg_imoms3_weigaddr.html", "compute_fromreg_imoms3_weigaddr.pro", "", "       file_comments   compute the weight and address need to interpolate data from a    regular grid  to any grid using the imoms3 method      categories    Interpolation      param alonin  in required    longitude of the input data      param alatin  in required    latitude of the input data      param olonin  in required    longitude of the output data    param olat  in required    latitude of the output data      keyword NONORTHERNLINE    keyword NOSOUTHERNLINE   activate if you don t want to take into account the northen southern line   of the input data when performing the interpolation       param weig  out     param addr  out    2D arrays  weig and addr are the weight and addresses used to   perform the interpolation:    dataout   total weig datain addr  1     dataout   reform dataout  jpio  jpjo   over       restrictions      the input grid must be a  regular rectangular grid  defined as a grid for    which each longitudes lines have the same latitude and each latitudes columns    have the same longitude        We supposed the data are located on a sphere  with a periodicity along    the longitude        points located between the first last 2 lines are interpolated    using a imoms3 interpolation along the longitudinal direction and linear    interpolation along the latitudinal direction      points located out of the southern and northern boundaries are interpolated    using a imoms3 interpolation only along the longitudinal direction       history    November 2005: Sebastien Masson  smasson lodyc jussieu fr     March 2006: works for rectangular grids      version  Id: compute_fromreg_imoms3_weigaddr pro 163 2006 08 29 12:59:46Z navarro               PRO compute_fromreg_imoms3_weigaddr  alonin  alatin  olonin  olat  weig  addr                                          NONORTHERNLINE   nonorthernline  NOSOUTHERNLINE   nosouthernline     compile_opt idl2  strictarrsubs     alon   alonin   alat   alatin   olon   olonin     jpia   n_elements alon    jpja   n_elements alat      jpio    size olon   dimensions 0    jpjo    size olon   dimensions 1      alon   minalon   min alon   max   maxalon    IF maxalon minalon GE 360  THEN stop   alon must be monotonically increasing   IF array_equal sort alon  lindgen jpia  NE 1 THEN BEGIN     shiftx    where alon EQ min alon 0      alon   shift alon  shiftx      IF array_equal sort alon  lindgen jpia  NE 1 THEN stop   ENDIF ELSE shiftx   0   alon is it regularly spaced    step   alon shift alon  1    step 0    step 0    360    IF total step step 0  GE 1 e 6  NE 0 THEN noregx   1   we extend the longitude range of alon   easy interpolation even   near minalon et maxalon    toadd   10 jpia 360 1   alon    alon jpia toadd:jpia 1 360  alon  alon 0:toadd 1 360    jpia   jpia 2 toadd   alat   revy   alat 0  GT alat 1    IF revy THEN alat   reverse alat    alat must be monotonically increasing   IF array_equal sort alat  lindgen jpja  NE 1 THEN stop   alat is it regularly spaced    step   alat shift alat  1    step   step 1:jpja   1L    IF total step step 0  GE 1 e 6  NE 0 THEN noregy   1     if keyword_set nonorthernline  then BEGIN     jpja   jpja   1L     alat   alat 0: jpja 1L    ENDIF   if keyword_set nosouthernline  then BEGIN     alat   alat 1: jpja 1L      jpja   jpja   1L   ENDIF   olon between minalon et minalon 360   out   where olon LT minalon    WHILE out 0  NE  1 DO BEGIN     olon out    olon out 360      out   where olon LT minalon    ENDWHILE   out   where olon GE minalon 360    WHILE out 0  NE  1 DO BEGIN     olon out    olon out  360      out   where olon GE minalon 360    ENDWHILE   make sure that all values of olon are located within values of alon   IF min olon  max   ma  LT minalon THEN stop   IF ma GE minalon 360  THEN stop     xaddr   lonarr 16  jpio jpjo    yaddr   lonarr 16  jpio jpjo    weig   fltarr 16  jpio jpjo      indexlon   value_locate alon  olon    IF total alon indexlon  GT olon  NE 0 THEN stop   IF total alon indexlon   1L  LE olon  NE 0 THEN stop   IF  where indexlon LE 1L      0  NE  1 THEN stop   IF  where indexlon GE jpia 3L 0  NE  1 THEN stop   indexlat   value_locate alat  olat      for the ocean points located below the atm line   jpja 2 and above the line 1   for those points we can always find 16 neighbors   imoms interpolation along longitude and latitude     short   where indexlat LT jpja 2L AND indexlat GE 1L    ilon   indexlon short    ilat   indexlat short      IF NOT keyword_set noregy  THEN BEGIN     delta   alat ilat 1L alat ilat      IF max abs delta delta 0  GE 1 e 6 THEN stop     delta   delta 0        d0    alat ilat 1L olat short delta     IF min d0  max   ma  LE  2 THEN stop     IF ma GT  1 THEN stop     wy0   imoms3 temporary d0      d1    alat ilat    olat short delta     IF min d1  max   ma  LE  1 THEN stop     IF ma GT 0 THEN stop     wy1   imoms3 temporary d1      d2    alat ilat 1L olat short delta     IF min d2  max   ma  LE 0 THEN stop     IF ma GT 1 THEN stop     wy2   imoms3 temporary d2      d3    alat ilat 2L olat short delta     IF min d3  max   ma  LE 1 THEN stop     IF ma GT 2 THEN stop     wy3   imoms3 temporary d3    ENDIF ELSE BEGIN     nele   n_elements short      wy0   fltarr nele      wy1   fltarr nele      wy2   fltarr nele      wy3   fltarr nele      FOR i   0L  nele 1 DO BEGIN       IF i MOD 10000 EQ 0 THEN print  i       newlat   spl_incr alat ilat i 1L:ilat i 2L   1  0  1  2  olat short i        IF newlat LE 0 THEN stop       IF newlat GT 1 THEN stop       wy0 i    imoms3 newlat 1        wy1 i    imoms3 newlat        wy2 i    imoms3 1 newlat        wy3 i    imoms3 2 newlat      ENDFOR   ENDELSE     mi   min wy0 wy1 wy2 wy3  max   ma    IF abs mi 1  GE 1 e 6 THEN stop   IF abs ma 1  GE 1 e 6 THEN stop     IF NOT keyword_set noregx  THEN BEGIN     delta   alon ilon alon ilon 1L      IF max abs delta delta 0  GE 1 e 6 THEN stop     delta   delta 0        d0    alon ilon 1L olon short delta     IF min d0  max   ma  LE  2 THEN stop     IF ma GT  1 THEN stop     wx0   imoms3 temporary d0      d1    alon ilon    olon short delta     IF min d1  max   ma  LE  1 THEN stop     IF ma GT 0 THEN stop     wx1   imoms3 temporary d1      d2    alon ilon 1L olon short delta     IF min d2  max   ma  LE 0 THEN stop     IF ma GT 1 THEN stop     wx2   imoms3 temporary d2      d3    alon ilon 2L olon short delta     IF min d3  max   ma  LE 1 THEN stop     IF ma GT 2 THEN stop     wx3   imoms3 temporary d3    ENDIF ELSE BEGIN     nele   n_elements short      wx0   fltarr nele      wx1   fltarr nele      wx2   fltarr nele      wx3   fltarr nele      FOR i   0L  nele 1 DO BEGIN       IF i MOD 10000 EQ 0 THEN print  i       newlon   spl_incr alon ilon i 1L:ilon i 2L   1  0  1  2  olon short i        IF newlon LE 0 THEN stop       IF newlon GT 1 THEN stop       wx0 i    imoms3 newlon 1        wx1 i    imoms3 newlon        wx2 i    imoms3 1 newlon        wx3 i    imoms3 2 newlon      ENDFOR   ENDELSE     mi   min wx0 wx1 wx2 wx3  max   ma    IF abs mi 1  GE 1 e 6 THEN stop   IF abs ma 1  GE 1 e 6 THEN stop     line 0   xaddr 0  short    ilon   1L   xaddr 1  short    ilon   xaddr 2  short    ilon   1L   xaddr 3  short    ilon   2L   yaddr 0  short    ilat   1L   yaddr 1  short    yaddr 0  short    yaddr 2  short    yaddr 0  short    yaddr 3  short    yaddr 0  short    weig 0  short    wx0   wy0   weig 1  short    wx1   wy0   weig 2  short    wx2   wy0   weig 3  short    wx3   wy0   line 1   xaddr 4  short    ilon   1L   xaddr 5  short    ilon   xaddr 6  short    ilon   1L   xaddr 7  short    ilon   2L   yaddr 4  short    ilat   yaddr 5  short    ilat   yaddr 6  short    ilat   yaddr 7  short    ilat   weig 4  short    wx0   wy1   weig 5  short    wx1   wy1   weig 6  short    wx2   wy1   weig 7  short    wx3   wy1   line 2   xaddr 8  short    ilon   1L   xaddr 9  short    ilon   xaddr 10  short    ilon   1L   xaddr 11  short    ilon   2L   yaddr 8  short    ilat   1L   yaddr 9  short    yaddr 8  short    yaddr 10  short    yaddr 8  short    yaddr 11  short    yaddr 8  short    weig 8  short    wx0   wy2   weig 9  short    wx1   wy2   weig 10  short    wx2   wy2   weig 11  short    wx3   wy2   line 3   xaddr 12  short    ilon   1L   xaddr 13  short    ilon   xaddr 14  short    ilon   1L   xaddr 15  short    ilon   2L   yaddr 12  short    ilat   2L   yaddr 13  short    yaddr 12  short    yaddr 14  short    yaddr 12  short    yaddr 15  short    yaddr 12  short    weig 12  short    wx0   wy3   weig 13  short    wx1   wy3   weig 14  short    wx2   wy3   weig 15  short    wx3   wy3     mi   min total weig  short  1  max   ma    IF abs mi 1  GE 1 e 6 THEN stop   IF abs ma 1  GE 1 e 6 THEN stop     for the ocean points located between the atm lines   jpja 2 and jpja 1 or between the atm lines 0 and 1   linear interpolation between line 1 and line 2     short   where indexlat EQ jpja 2L OR indexlat EQ 0    IF short 0  NE  1 THEN BEGIN     ilon   indexlon short      ilat   indexlat short        delta   alat ilat 1L alat ilat      IF NOT keyword_set noregy  THEN BEGIN       IF max abs delta delta 0  GE 1 e 6 THEN stop       delta   delta 0      ENDIF       d1    alat ilat    olat short delta     IF min d1  max   ma  LE  1 THEN stop     IF ma GT 0 THEN stop     wy1   1  temporary d1      d2    alat ilat 1L olat short delta     IF min d2  max   ma  LE 0 THEN stop     IF ma GT 1 THEN stop     wy2   1  temporary d2        mi   min wy1 wy2  max   ma      IF abs mi 1  GE 1 e 6 THEN stop     IF abs ma 1  GE 1 e 6 THEN stop   but imoms3 along the longitude     IF NOT keyword_set noregx  THEN BEGIN       delta   alon ilon alon ilon 1L        IF max abs delta delta 0  GE 1 e 6 THEN stop       delta   delta 0          d0    alon ilon 1L olon short delta       IF min d0  max   ma  LE  2 THEN stop       IF ma GT  1 THEN stop       wx0   imoms3 temporary d0        d1    alon ilon    olon short delta       IF min d1  max   ma  LE  1 THEN stop       IF ma GT 0 THEN stop       wx1   imoms3 temporary d1        d2    alon ilon 1L olon short delta       IF min d2  max   ma  LE 0 THEN stop       IF ma GT 1 THEN stop       wx2   imoms3 temporary d2        d3    alon ilon 2L olon short delta       IF min d3  max   ma  LE 1 THEN stop       IF ma GT 2 THEN stop       wx3   imoms3 temporary d3      ENDIF ELSE BEGIN       nele   n_elements short        wx0   fltarr nele        wx1   fltarr nele        wx2   fltarr nele        wx3   fltarr nele        FOR i   0L  nele 1 DO BEGIN         IF i MOD 10000 EQ 0 THEN print  i         newlon   spl_incr alon ilon i 1L:ilon i 2L   1  0  1  2  olon short i          IF newlon LE 0 THEN stop         IF newlon GT 1 THEN stop         wx0 i    imoms3 newlon 1          wx1 i    imoms3 newlon          wx2 i    imoms3 1 newlon          wx3 i    imoms3 2 newlon        ENDFOR     ENDELSE       mi   min wx0 wx1 wx2 wx3  max   ma      IF abs mi 1  GE 1 e 6 THEN stop     IF abs ma 1  GE 1 e 6 THEN stop   line 1     xaddr 0  short    ilon   1L     xaddr 1  short    ilon     xaddr 2  short    ilon   1L     xaddr 3  short    ilon   2L     yaddr 0  short    ilat     yaddr 1  short    ilat     yaddr 2  short    ilat     yaddr 3  short    ilat     weig 0  short    wx0   wy1     weig 1  short    wx1   wy1     weig 2  short    wx2   wy1     weig 3  short    wx3   wy1   line 2     xaddr 4  short    ilon   1L     xaddr 5  short    ilon     xaddr 6  short    ilon   1L     xaddr 7  short    ilon   2L     yaddr 4  short    ilat   1L     yaddr 5  short    yaddr 4  short      yaddr 6  short    yaddr 4  short      yaddr 7  short    yaddr 4  short      weig 4  short    wx0   wy2     weig 5  short    wx1   wy2     weig 6  short    wx2   wy2     weig 7  short    wx3   wy2       mi   min total weig  short  1  max   ma      IF abs mi 1  GE 1 e 6 THEN stop     IF abs ma 1  GE 1 e 6 THEN stop     ENDIF     for the ocean points located below the line 0   Interpolation only along the longitude     short   where indexlat EQ  1    IF short 0  NE  1 THEN BEGIN     ilon   indexlon short        IF NOT keyword_set noregx  THEN BEGIN       delta   alon ilon alon ilon 1L        IF max abs delta delta 0  GE 1 e 6 THEN stop       delta   delta 0          d0    alon ilon 1L olon short delta       IF min d0  max   ma  LE  2 THEN stop       IF ma GT  1 THEN stop       wx0   imoms3 temporary d0        d1    alon ilon    olon short delta       IF min d1  max   ma  LE  1 THEN stop       IF ma GT 0 THEN stop       wx1   imoms3 temporary d1        d2    alon ilon 1L olon short delta       IF min d2  max   ma  LE 0 THEN stop       IF ma GT 1 THEN stop       wx2   imoms3 temporary d2        d3    alon ilon 2L olon short delta       IF min d3  max   ma  LE 1 THEN stop       IF ma GT 2 THEN stop       wx3   imoms3 temporary d3      ENDIF ELSE BEGIN       nele   n_elements short        wx0   fltarr nele        wx1   fltarr nele        wx2   fltarr nele        wx3   fltarr nele        FOR i   0L  nele 1 DO BEGIN         IF i MOD 10000 EQ 0 THEN print  i         newlon   spl_incr alon ilon i 1L:ilon i 2L   1  0  1  2  olon short i          IF newlon LE 0 THEN stop         IF newlon GT 1 THEN stop         wx0 i    imoms3 newlon 1          wx1 i    imoms3 newlon          wx2 i    imoms3 1 newlon          wx3 i    imoms3 2 newlon        ENDFOR     ENDELSE       mi   min wx0 wx1 wx2 wx3  max   ma      IF abs mi 1  GE 1 e 6 THEN stop     IF abs ma 1  GE 1 e 6 THEN stop   line 1     xaddr 0  short    ilon   1L     xaddr 1  short    ilon     xaddr 2  short    ilon   1L     xaddr 3  short    ilon   2L     yaddr 0:3  short    0     weig 0  short    wx0     weig 1  short    wx1     weig 2  short    wx2     weig 3  short    wx3       mi   min total weig  short  1  max   ma      IF abs mi 1  GE 1 e 6 THEN stop     IF abs ma 1  GE 1 e 6 THEN stop     ENDIF     for the ocean points located above jpia 1   Interpolation only along the longitude     short   where indexlat EQ jpja 1L    IF short 0  NE  1 THEN BEGIN     ilon   indexlon short        IF NOT keyword_set noregx  THEN BEGIN       delta   alon ilon alon ilon 1L        IF max abs delta delta 0  GE 1 e 6 THEN stop       delta   delta 0          d0    alon ilon 1L olon short delta       IF min d0  max   ma  LE  2 THEN stop       IF ma GT  1 THEN stop       wx0   imoms3 temporary d0        d1    alon ilon    olon short delta       IF min d1  max   ma  LE  1 THEN stop       IF ma GT 0 THEN stop       wx1   imoms3 temporary d1        d2    alon ilon 1L olon short delta       IF min d2  max   ma  LE 0 THEN stop       IF ma GT 1 THEN stop       wx2   imoms3 temporary d2        d3    alon ilon 2L olon short delta       IF min d3  max   ma  LE 1 THEN stop       IF ma GT 2 THEN stop       wx3   imoms3 temporary d3      ENDIF ELSE BEGIN       nele   n_elements short        wx0   fltarr nele        wx1   fltarr nele        wx2   fltarr nele        wx3   fltarr nele        FOR i   0L  nele 1 DO BEGIN         IF i MOD 10000 EQ 0 THEN print  i         newlon   spl_incr alon ilon i 1L:ilon i 2L   1  0  1  2  olon short i          IF newlon LE 0 THEN stop         IF newlon GT 1 THEN stop         wx0 i    imoms3 newlon 1          wx1 i    imoms3 newlon          wx2 i    imoms3 1 newlon          wx3 i    imoms3 2 newlon        ENDFOR     ENDELSE       mi   min wx0 wx1 wx2 wx3  max   ma      IF abs mi 1  GE 1 e 6 THEN stop     IF abs ma 1  GE 1 e 6 THEN stop   line 1     xaddr 0  short    ilon 1L     xaddr 1  short    ilon     xaddr 2  short    ilon 1L     xaddr 3  short    ilon 2L     yaddr 0:3  short    jpja 1L     weig 0  short    wx0     weig 1  short    wx1     weig 2  short    wx2     weig 3  short    wx3       mi   min total weig  short  1  max   ma      IF abs mi 1  GE 1 e 6 THEN stop     IF abs ma 1  GE 1 e 6 THEN stop     ENDIF     Come back to the original index of atm grid without longitudinal overlap        xaddr   temporary xaddr    toadd   jpia   jpia   2 toadd   make sure all values are ge 0   xaddr   temporary xaddr    jpia   range the values between 0 and jpia 1   xaddr   temporary xaddr  mod jpia     take into account shiftx if needed   IF shiftx NE 0 THEN xaddr    temporary xaddr    shiftx  MOD jpia   take into account nosouthernline and nonorthernline   if keyword_set nosouthernline  then BEGIN     yaddr   temporary yaddr    1L     jpja   jpja   1L   ENDIF   if keyword_set nonorthernline  then jpja   jpja   1L   take into account revy if needed   IF revy EQ 1 THEN yaddr   jpja   1L   temporary yaddr                               addr   temporary yaddr jpia temporary xaddr      RETURN END"); 
     53a[51] = new Array("./Interpolation/compute_fromirr_bilinear_weigaddr.html", "compute_fromirr_bilinear_weigaddr.pro", "", "     file_comments   compute the weight and address needed to interpolate data from   an  irregular 2D grid   defined as a grid made of quadrilateral cells    to any grid using the bilinear method      categories    Interpolation      param olonin  in required type 2d array    longitude of the input data      param olat  in required type 2d array    latitude of the input data      param omsk  in required type 2d array or  1    land sea mask of the input data   put  1 if input data are not masked      param alonin  in required type 2d array    longitude of the output data      param alat  in required type 2d array    latitude of the output data      param amsk  in required type 2d array or  1    land sea mask of the output data   put  1 if output data are not masked      param weig  out type 2d array     see ADDR       param addr  out type 2d array    2D arrays  weig and addr are the weight and addresses used to   perform the interpolation:    dataout   total weig datain addr  1     dataout   reform dataout  jpia  jpja   over       restrictions       the input grid must be an  irregular 2D grid  defined as a grid made    of quadrilateral cells which corners positions are defined with olonin and olat       We supposed the data are located on a sphere  with a periodicity along    the longitude       to perform the bilinear interpolation within quadrilateral cells  we    first morph the cell into a square cell and then compute the bilinear    interpolation        if some corners of the cell are land points  their weight is set to 0    and the weight is redistributed on the remaining  water  corners       points located out of the southern and northern boundaries or in cells    containing only land points are set the the same value as their closest neighbor      history    June 2006: Sebastien Masson  smasson lodyc jussieu fr       version  Id: compute_fromirr_bilinear_weigaddr pro 202 2007 01 12 11:00:06Z smasson         PRO compute_fromirr_bilinear_weigaddr  olonin  olat  omsk  alonin  alat  amsk  weig  addr     compile_opt idl2  strictarrsubs     jpia    size alonin   dimensions 0    jpja    size alonin   dimensions 1      jpio    size olonin   dimensions 0    jpjo    size olonin   dimensions 1      mask check   IF n_elements omsk  EQ 1 AND omsk 0  EQ  1 THEN omsk   replicate 1b  jpio  jpjo    IF n_elements amsk  EQ 1 AND amsk 0  EQ  1 THEN amsk   replicate 1b  jpia  jpja    IF n_elements omsk  NE jpio jpjo THEN BEGIN     print   input grid mask do not have the good size      stop   ENDIF   IF n_elements amsk  NE jpia jpja THEN BEGIN      print   output grid mask do not have the good size      stop   ENDIF     longitude  between 0 and 360   alon   alonin MOD 360   out   where alon LT 0    IF out 0  NE  1 THEN alon out    alon out 360   olon   olonin MOD 360   out   where olon LT 0    IF out 0  NE  1 THEN olon out    olon out 360     we work only on the ouput grid water points   awater   where amsk EQ 1    nawater   n_elements awater      define all cells that have corners located at olon  olat   we define the cell with the address of all corners                3        2                                                                                                                   0        1     alladdr   lindgen jpio  jpjo 1    celladdr   lonarr 4  jpio jpjo 1    celladdr 0      alladdr   celladdr 1      shift alladdr   1    celladdr 2      shift alladdr   jpio   1    celladdr 3      alladdr   jpio     list the cells that have at least 1 ocean point as corner   good   where total omsk celladdr  1  GT 0    keep only those cells   celladdr   celladdr  temporary good      xcell   olon celladdr    minxcell   min xcell  dimension   1  max   maxxcell    ycell   olat celladdr    minycell   min ycell  dimension   1  max   maxycell    foraddr: address of the ocean water cell associated to each atmosphere water point   foraddr   lonarr nawater    forweight: x y position of the atmosphere water point in the ocean water cell   forweight   dblarr nawater  2      Loop on all the water point of the atmosphere   We look for which ocean water cell contains the atmosphere water point     delta   max 360 jpio   180 jpjo  4    FOR n   0L  nawater 1 DO BEGIN   control print     IF  n MOD 5000  EQ 0 THEN print  n   longitude and latitude of the atmosphere water point     xx   alon awater n      yy   alat awater n    1  we reduce the number of ocean cells for which we will try to know if   xx yy is inside      CASE 1 OF   if we are near the norh pole       yy GE  90 delta :BEGIN         lat1   90 2 delta         good   where maxycell GE lat1          onsphere   1       END   if we are near the longitude periodicity area       xx LE delta OR xx GE  360 delta :BEGIN         lat1   yy delta         lat2   yy delta         good   where minxcell LE 2 delta OR maxxcell GE  360 2 delta  AND maxycell GE lat1 AND minycell LE lat2          onsphere   1       END   other cases       ELSE:BEGIN         lon1   xx delta         lon2   xx delta         lat1   yy delta         lat2   yy delta         good   where maxxcell GE lon1 AND minxcell LE lon2 AND maxycell GE lat1 AND minycell le lat2    ORCA cases : orca grid is irregular only northward of 40N         CASE 1 OF           jpio EQ 92   AND  jpjo EQ 76   OR jpjo EQ 75   OR jpjo EQ 74   :onsphere   yy GT 40           jpio EQ 180  AND  jpjo EQ 149  OR jpjo EQ 148  OR jpjo EQ 147  :onsphere   yy GT 40           jpio EQ 720  AND  jpjo EQ 522  OR jpjo EQ 521  OR jpjo EQ 520  :onsphere   yy GT 40           jpio EQ 1440 AND  jpjo EQ 1021 OR jpjo EQ 1020 OR jpjo EQ 1019 :onsphere   yy GT 40           ELSE:onsphere   1         ENDCASE       END     ENDCASE   we found a short list of possible ocean water cells containing the atmosphere water point     IF good 0  NE  1 THEN BEGIN   in which cell is located the atmosphere water point    Warning  inquad use clockwise quadrilateral definition       ind   inquad xx  yy                        xcell 0  good  ycell 0  good                         xcell 3  good  ycell 3  good                         xcell 2  good  ycell 2  good                         xcell 1  good  ycell 1  good                         onsphere   onsphere  newcoord   newcoord   noprint    keep only the first cell  if the atmospheric point was located in several ocean cells        ind   ind 0    we found one ocean water cell containing the atmosphere water point       IF ind NE  1 THEN BEGIN         ind   good ind    now  we morph the quadrilateral ocean cell into the reference square  0   1    in addition we get the corrdinates of the atmospheric point in this new morphed square         IF onsphere THEN BEGIN   Warning  quadrilateral2square use anticlockwise quadrilateral definition           xy   quadrilateral2square newcoord 0  0  newcoord 1  0                                          newcoord 0  3  newcoord 1  3                                          newcoord 0  2  newcoord 1  2                                          newcoord 0  1  newcoord 1  1                                          newcoord 0  4  newcoord 1  4          ENDIF ELSE BEGIN           xy   quadrilateral2square xcell 0  ind  ycell 0  ind                                          xcell 1  ind  ycell 1  ind                                          xcell 2  ind  ycell 2  ind                                          xcell 3  ind  ycell 3  ind  xx  yy          ENDELSE   take care of rounding errors          zero   where abs xy  LT 1e 4          IF zero 0  NE  1 THEN xy zero    0         one   where abs 1 xy  LT 1e 4          IF one 0  NE  1 THEN xy one    1   some checks          tmpmsk   omsk celladdr  ind          CASE 1 OF           xy 0  LT 0 OR xy 0  GT 1 : stop           xy 1  LT 0 OR xy 1  GT 1 : stop           xy 0  EQ 0 AND xy 1  EQ 0 AND tmpmsk 0  EQ 0 : foraddr n     1           xy 0  EQ 1 AND xy 1  EQ 0 AND tmpmsk 1  EQ 0 : foraddr n     1           xy 0  EQ 1 AND xy 1  EQ 1 AND tmpmsk 2  EQ 0 : foraddr n     1           xy 0  EQ 0 AND xy 1  EQ 1 AND tmpmsk 3  EQ 0 : foraddr n     1           xy 0  EQ 0 AND  tmpmsk 0 tmpmsk 3  EQ 0    : foraddr n     1           xy 0  EQ 1 AND  tmpmsk 1 tmpmsk 2  EQ 0    : foraddr n     1           xy 1  EQ 0 AND  tmpmsk 0 tmpmsk 1  EQ 0    : foraddr n     1           xy 1  EQ 1 AND  tmpmsk 2 tmpmsk 3  EQ 0    : foraddr n     1           ELSE: BEGIN    we keep its address         foraddr n    ind   keep the new coordinates             forweight n  0    xy 0              forweight n  1    xy 1            END         ENDCASE          ENDIF ELSE foraddr n     1     ENDIF ELSE foraddr n     1   ENDFOR   do we have some water atmospheric points that are not located in an water oceanic cell    bad   where foraddr EQ  1    IF bad 0  NE  1 THEN BEGIN   yes    we look for neighbor water atmospheric point located in water oceanic cell     badaddr   awater bad      good   where foraddr NE  1    list the atmospheric points located in water oceanic cell     goodaddr   awater good    there longitude and latitude     goodlon   alon goodaddr      goodlat   alat goodaddr    for all the bad points  look for a neighbor     neig   lonarr n_elements bad      FOR i   0  n_elements bad 1 DO BEGIN       neig i     neighbor alon badaddr i  alat badaddr i  goodlon  goodlat   sphere 0      ENDFOR   get the address regarding foraddr     neig   good neig    associate each bad point with its neighbor  get its address and weight      foraddr bad    foraddr neig      forweight bad      forweight neig      endif   transform the address of the ocean cell into the address of its 4 corners   newaaddr   celladdr  temporary foraddr    now we compute the weight to give at each corner   newaweig   dblarr 4  nawater    a   reform forweight  0  1  nawater    b   reform forweight  1  1  nawater    forweight     1   free memory   newaweig    1 a 1 b   1 b a  a b   1 a b    a    1    b    1   free memory   mask the weight to suppress the corner located on land   newaweig   newaweig omsk newaaddr    totalweig   total newaweig  1    for cell with some land corner    we have to redistribute the weight on the reaining water corners   weights normalization   totalweig   total newaweig  1    IF min totalweig  max   ma  EQ 0 then stop   IF ma GT 1 then stop   newaweig   newaweig replicate 1  4 totalweig    totalweig   total newaweig  1     weights   weig   dblarr 4  jpia jpja    weig  awater    temporary newaweig    address   addr   dblarr 4  jpia jpja    addr  awater    temporary newaaddr      RETURN END"); 
     54a[52] = new Array("./Interpolation/compute_fromreg_bilinear_weigaddr.html", "compute_fromreg_bilinear_weigaddr.pro", "", "     file_comments   compute the weight and address needed to interpolate data from a    regular grid  to any grid using the bilinear method      categories    Interpolation      param alonin in required type 2d array    longitude of the input data      param alatin  in required type 2d array    latitude of the input data      param olonin  in required type 2d array    longitude of the output data      param olat  in required type 2d array    latitude of the output data      keyword NONORTHERNLINE  type scalar 0 or 1 default 0    put 1 if you don t want to take into   account the northen line of the input data when performing the interpolation       keyword NOSOUTHERNLINE  type scalar 0 or 1 default 0    put 1 if you don t want to take into   account the southern line of the input data when performing the interpolation       param weig  out type 2d array     see ADDR       param addr  out type 2d array    2D arrays  weig and addr are the weight and addresses used to   perform the interpolation:    dataout   total weig datain addr  1     dataout   reform dataout  jpio  jpjo   over       restrictions      the input grid must be a  regular grid  defined as a grid for which each    longitudes lines have the same latitude and each latitudes columns have the    same longitude       We supposed the data are located on a sphere  with a periodicity along    the longitude       points located out of the southern and northern boundaries are interpolated    using a linear interpolation only along the longitudinal direction       history    November 2005: Sebastien Masson  smasson lodyc jussieu fr       version  Id: compute_fromreg_bilinear_weigaddr pro 202 2007 01 12 11:00:06Z smasson         PRO compute_fromreg_bilinear_weigaddr  alonin  alatin  olonin  olat  weig  addr       NONORTHERNLINE   nonorthernline  NOSOUTHERNLINE   nosouthernline     compile_opt idl2  strictarrsubs     alon   alonin   alat   alatin   olon   olonin     jpia   n_elements alon    jpja   n_elements alat      jpio    size olon   dimensions 0    jpjo    size olon   dimensions 1      alon   minalon   min alon   max   maxalon    IF maxalon minalon GE 360  THEN stop   alon must be monotonically increasing   IF array_equal sort alon  lindgen jpia  NE 1 THEN BEGIN     shiftx    where alon EQ min alon 0      alon   shift alon  shiftx      IF array_equal sort alon  lindgen jpia  NE 1 THEN stop   ENDIF ELSE shiftx   0   for longitude periodic boundary condition we add the fist   column on the right side of the array and   alon    alon  alon 0 360    jpia   jpia 1L   alat   revy   alat 0  GT alat 1    IF revy THEN alat   reverse alat    alat must be monotonically increasing   IF array_equal sort alat  lindgen jpja  NE 1 THEN stop     if keyword_set nonorthernline  then BEGIN     jpja   jpja   1L     alat   alat 0: jpja 1L    ENDIF   if keyword_set nosouthernline  then BEGIN     alat   alat 1: jpja 1L      jpja   jpja   1L   ENDIF   olon between minalon et minalon 360   out   where olon LT minalon    WHILE out 0  NE  1 DO BEGIN     olon out    olon out 360      out   where olon LT minalon    ENDWHILE   out   where olon GE minalon 360    WHILE out 0  NE  1 DO BEGIN     olon out    olon out  360      out   where olon GE minalon 360    ENDWHILE   make sure that all values of olon are located within values of alon   IF min olon  max   ma  LT minalon THEN stop   IF ma GE minalon 360  THEN stop     we want to do biliear interpolation   for each ocean point  we must   find in which atm cell it is located    if the ocean point is out of the atm grid  we use closest neighbor   interpolation     for each T point of oce grid  we find in which armospheric cell it is   located    As the atmospheric grid is regular  we can use inrecgrid instead   of inquad    pos   inrecgrid olon  olat  alon 0:jpia 2L  alat 0:jpja 2L                        checkout    alon jpia 1L  alat jpja 1L   output2d    checks    for longitude  each ocean points must be located in atm cell    IF  where pos 0    EQ  1 0  NE  1 THEN stop   no ocean point should be located westward of the left boundary of the   atm cell in which it is supposed to be located   IF total olon LT alon pos 0    NE 0 THEN stop   no ocean point should be located eastward of the right boundary of the   atm cell in which it is supposed to be located   IF total olon GT alon pos 0   1  NE 0 THEN stop     we use bilinear interpolation     we change the coordinates of each ocean points to fit into a   rectangle defined by:      y2                                                                     y1         x1          x2        X    x x1 x2 x1       Y    y y1 y2 y1      indx   pos 0      indy    temporary pos 1      points located out of the atmospheric grid too much northward or southward    bad   where indy EQ  1    indy   0   indy     IF max indx  GT jpia 2 THEN stop   checks    IF max indy  GT jpja 2 THEN stop   checks    x coordinates of the atm cell   x1   alon indx    x2   alon indx 1    new x coordinates of the ocean points in each cell   divi   temporary x2 x1   glamnew    olon x1 temporary divi    x1    1   free memory   olon    1   free memory   y coordinates of the atm cell   y1   alat indy    y2   alat indy 1                  new y coordinates of the ocean points in each cell   divi   temporary y2 y1   zero   where divi EQ 0    IF zero 0  NE  1 THEN divi zero    1    gphinew    olat y1 temporary divi    y1    1   free memory   checks    IF min glamnew  LT 0 THEN stop   IF max glamnew  GT 1 THEN stop     weight and address array used for bilinear interpolation    xaddr   lonarr 4  jpio jpjo    xaddr 0      indx   xaddr 1      indx   1L   xaddr 2      indx   1L   xaddr 3      indx     yaddr   lonarr 4  jpio jpjo    yaddr 0      indy   yaddr 1      indy   yaddr 2      indy   1L   yaddr 3      indy   1L   compute the weight for the bilinear interpolation    weig   fltarr 4  jpio jpjo    weig 0       1 glamnew     1 gphinew    weig 1          glamnew     1 gphinew    weig 2          glamnew        gphinew   weig 3       1 glamnew        gphinew   free memory   gphinew    1   IF bad 0  EQ  1 THEN glamnew    1 ELSE glamnew    temporary glamnew bad    we work now on the  bad  points   linear interpolation only along the longitudinal direction   IF bad 0  NE  1 THEN BEGIN     ybad   olat bad    the ocean points that are not located into an atm cell should be   located northward of the northern boundary of the atm grid        or southward of the southern boundary of the atm grid     IF total ybad GE min alat  AND ybad LE max alat  GE 1 THEN stop       weig 0  bad     1 glamnew      weig 1  bad    temporary glamnew      weig 2  bad    0      weig 3  bad    0      south   where ybad LT alat 0      IF south 0  NE  1 THEN yaddr  bad temporary south    0L     north   where ybad GT alat jpja 1      IF north 0  NE  1 THEN yaddr  bad temporary north    0L     ybad    1   bad    1   free memory   ENDIF   check totalweight   1   totalweig   abs 1 total weig  1    IF  where temporary totalweig  GE 1 e 5 0  NE  1 THEN stop     come back to the original atm grid without longitudinal overlap      jpia   jpia 1L   xaddr   temporary xaddr  MOD jpia   take into account shiftx if needed   IF shiftx NE 0 THEN xaddr    temporary xaddr    shiftx  MOD jpia   take into account nosouthernline and nonorthernline   if keyword_set nosouthernline  then BEGIN     yaddr   temporary yaddr    1L     jpja   jpja   1L   ENDIF   if keyword_set nonorthernline  then jpja   jpja   1L   take into account revy if needed   IF revy EQ 1 THEN yaddr   jpja   1L   temporary yaddr                                addr   temporary yaddr jpia   temporary xaddr      return end "); 
     55a[53] = new Array("./Interpolation/compute_fromreg_imoms3_weigaddr.html", "compute_fromreg_imoms3_weigaddr.pro", "", "       file_comments   compute the weight and address need to interpolate data from a    regular grid  to any grid using the imoms3 method      categories    Interpolation      param alonin  in required type 2d array    longitude of the input data      param alatin  in required type 2d array    latitude of the input data      param olonin  in required type 2d array    longitude of the output data      param olat  in required type 2d array    latitude of the output data      keyword NONORTHERNLINE  type scalar 0 or 1 default 0    put 1 if you don t want to take into   account the northen line of the input data when performing the interpolation       keyword NOSOUTHERNLINE  type scalar 0 or 1 default 0    put 1 if you don t want to take into   account the southern line of the input data when performing the interpolation       param weig  out type 2d array     see ADDR       param addr  out type 2d array    2D arrays  weig and addr are the weight and addresses used to   perform the interpolation:    dataout   total weig datain addr  1     dataout   reform dataout  jpio  jpjo   over       restrictions      the input grid must be a  regular rectangular grid  defined as a grid for    which each longitudes lines have the same latitude and each latitudes columns    have the same longitude        We supposed the data are located on a sphere  with a periodicity along    the longitude        points located between the first last 2 lines are interpolated    using a imoms3 interpolation along the longitudinal direction and linear    interpolation along the latitudinal direction      points located out of the southern and northern boundaries are interpolated    using a imoms3 interpolation only along the longitudinal direction       history    November 2005: Sebastien Masson  smasson lodyc jussieu fr     March 2006: works for rectangular grids      version  Id: compute_fromreg_imoms3_weigaddr pro 202 2007 01 12 11:00:06Z smasson               PRO compute_fromreg_imoms3_weigaddr  alonin  alatin  olonin  olat  weig  addr                                          NONORTHERNLINE   nonorthernline  NOSOUTHERNLINE   nosouthernline     compile_opt idl2  strictarrsubs     alon   alonin   alat   alatin   olon   olonin     jpia   n_elements alon    jpja   n_elements alat      jpio    size olon   dimensions 0    jpjo    size olon   dimensions 1      alon   minalon   min alon   max   maxalon    IF maxalon minalon GE 360  THEN stop   alon must be monotonically increasing   IF array_equal sort alon  lindgen jpia  NE 1 THEN BEGIN     shiftx    where alon EQ min alon 0      alon   shift alon  shiftx      IF array_equal sort alon  lindgen jpia  NE 1 THEN stop   ENDIF ELSE shiftx   0   alon is it regularly spaced    step   alon shift alon  1    step 0    step 0    360    IF total step step 0  GE 1 e 6  NE 0 THEN noregx   1   we extend the longitude range of alon   easy interpolation even   near minalon et maxalon    toadd   10 jpia 360 1   alon    alon jpia toadd:jpia 1 360  alon  alon 0:toadd 1 360    jpia   jpia 2 toadd   alat   revy   alat 0  GT alat 1    IF revy THEN alat   reverse alat    alat must be monotonically increasing   IF array_equal sort alat  lindgen jpja  NE 1 THEN stop   alat is it regularly spaced    step   alat shift alat  1    step   step 1:jpja   1L    IF total step step 0  GE 1 e 6  NE 0 THEN noregy   1     if keyword_set nonorthernline  then BEGIN     jpja   jpja   1L     alat   alat 0: jpja 1L    ENDIF   if keyword_set nosouthernline  then BEGIN     alat   alat 1: jpja 1L      jpja   jpja   1L   ENDIF   olon between minalon et minalon 360   out   where olon LT minalon    WHILE out 0  NE  1 DO BEGIN     olon out    olon out 360      out   where olon LT minalon    ENDWHILE   out   where olon GE minalon 360    WHILE out 0  NE  1 DO BEGIN     olon out    olon out  360      out   where olon GE minalon 360    ENDWHILE   make sure that all values of olon are located within values of alon   IF min olon  max   ma  LT minalon THEN stop   IF ma GE minalon 360  THEN stop     xaddr   lonarr 16  jpio jpjo    yaddr   lonarr 16  jpio jpjo    weig   fltarr 16  jpio jpjo      indexlon   value_locate alon  olon    IF total alon indexlon  GT olon  NE 0 THEN stop   IF total alon indexlon   1L  LE olon  NE 0 THEN stop   IF  where indexlon LE 1L      0  NE  1 THEN stop   IF  where indexlon GE jpia 3L 0  NE  1 THEN stop   indexlat   value_locate alat  olat      for the ocean points located below the atm line   jpja 2 and above the line 1   for those points we can always find 16 neighbors   imoms interpolation along longitude and latitude     short   where indexlat LT jpja 2L AND indexlat GE 1L    ilon   indexlon short    ilat   indexlat short      IF NOT keyword_set noregy  THEN BEGIN     delta   alat ilat 1L alat ilat      IF max abs delta delta 0  GE 1 e 6 THEN stop     delta   delta 0        d0    alat ilat 1L olat short delta     IF min d0  max   ma  LE  2 THEN stop     IF ma GT  1 THEN stop     wy0   imoms3 temporary d0      d1    alat ilat    olat short delta     IF min d1  max   ma  LE  1 THEN stop     IF ma GT 0 THEN stop     wy1   imoms3 temporary d1      d2    alat ilat 1L olat short delta     IF min d2  max   ma  LE 0 THEN stop     IF ma GT 1 THEN stop     wy2   imoms3 temporary d2      d3    alat ilat 2L olat short delta     IF min d3  max   ma  LE 1 THEN stop     IF ma GT 2 THEN stop     wy3   imoms3 temporary d3    ENDIF ELSE BEGIN     nele   n_elements short      wy0   fltarr nele      wy1   fltarr nele      wy2   fltarr nele      wy3   fltarr nele      FOR i   0L  nele 1 DO BEGIN       IF i MOD 10000 EQ 0 THEN print  i       newlat   spl_incr alat ilat i 1L:ilat i 2L   1  0  1  2  olat short i        IF newlat LE 0 THEN stop       IF newlat GT 1 THEN stop       wy0 i    imoms3 newlat 1        wy1 i    imoms3 newlat        wy2 i    imoms3 1 newlat        wy3 i    imoms3 2 newlat      ENDFOR   ENDELSE     mi   min wy0 wy1 wy2 wy3  max   ma    IF abs mi 1  GE 1 e 6 THEN stop   IF abs ma 1  GE 1 e 6 THEN stop     IF NOT keyword_set noregx  THEN BEGIN     delta   alon ilon alon ilon 1L      IF max abs delta delta 0  GE 1 e 6 THEN stop     delta   delta 0        d0    alon ilon 1L olon short delta     IF min d0  max   ma  LE  2 THEN stop     IF ma GT  1 THEN stop     wx0   imoms3 temporary d0      d1    alon ilon    olon short delta     IF min d1  max   ma  LE  1 THEN stop     IF ma GT 0 THEN stop     wx1   imoms3 temporary d1      d2    alon ilon 1L olon short delta     IF min d2  max   ma  LE 0 THEN stop     IF ma GT 1 THEN stop     wx2   imoms3 temporary d2      d3    alon ilon 2L olon short delta     IF min d3  max   ma  LE 1 THEN stop     IF ma GT 2 THEN stop     wx3   imoms3 temporary d3    ENDIF ELSE BEGIN     nele   n_elements short      wx0   fltarr nele      wx1   fltarr nele      wx2   fltarr nele      wx3   fltarr nele      FOR i   0L  nele 1 DO BEGIN       IF i MOD 10000 EQ 0 THEN print  i       newlon   spl_incr alon ilon i 1L:ilon i 2L   1  0  1  2  olon short i        IF newlon LE 0 THEN stop       IF newlon GT 1 THEN stop       wx0 i    imoms3 newlon 1        wx1 i    imoms3 newlon        wx2 i    imoms3 1 newlon        wx3 i    imoms3 2 newlon      ENDFOR   ENDELSE     mi   min wx0 wx1 wx2 wx3  max   ma    IF abs mi 1  GE 1 e 6 THEN stop   IF abs ma 1  GE 1 e 6 THEN stop     line 0   xaddr 0  short    ilon   1L   xaddr 1  short    ilon   xaddr 2  short    ilon   1L   xaddr 3  short    ilon   2L   yaddr 0  short    ilat   1L   yaddr 1  short    yaddr 0  short    yaddr 2  short    yaddr 0  short    yaddr 3  short    yaddr 0  short    weig 0  short    wx0   wy0   weig 1  short    wx1   wy0   weig 2  short    wx2   wy0   weig 3  short    wx3   wy0   line 1   xaddr 4  short    ilon   1L   xaddr 5  short    ilon   xaddr 6  short    ilon   1L   xaddr 7  short    ilon   2L   yaddr 4  short    ilat   yaddr 5  short    ilat   yaddr 6  short    ilat   yaddr 7  short    ilat   weig 4  short    wx0   wy1   weig 5  short    wx1   wy1   weig 6  short    wx2   wy1   weig 7  short    wx3   wy1   line 2   xaddr 8  short    ilon   1L   xaddr 9  short    ilon   xaddr 10  short    ilon   1L   xaddr 11  short    ilon   2L   yaddr 8  short    ilat   1L   yaddr 9  short    yaddr 8  short    yaddr 10  short    yaddr 8  short    yaddr 11  short    yaddr 8  short    weig 8  short    wx0   wy2   weig 9  short    wx1   wy2   weig 10  short    wx2   wy2   weig 11  short    wx3   wy2   line 3   xaddr 12  short    ilon   1L   xaddr 13  short    ilon   xaddr 14  short    ilon   1L   xaddr 15  short    ilon   2L   yaddr 12  short    ilat   2L   yaddr 13  short    yaddr 12  short    yaddr 14  short    yaddr 12  short    yaddr 15  short    yaddr 12  short    weig 12  short    wx0   wy3   weig 13  short    wx1   wy3   weig 14  short    wx2   wy3   weig 15  short    wx3   wy3     mi   min total weig  short  1  max   ma    IF abs mi 1  GE 1 e 6 THEN stop   IF abs ma 1  GE 1 e 6 THEN stop     for the ocean points located between the atm lines   jpja 2 and jpja 1 or between the atm lines 0 and 1   linear interpolation between line 1 and line 2     short   where indexlat EQ jpja 2L OR indexlat EQ 0    IF short 0  NE  1 THEN BEGIN     ilon   indexlon short      ilat   indexlat short        delta   alat ilat 1L alat ilat      IF NOT keyword_set noregy  THEN BEGIN       IF max abs delta delta 0  GE 1 e 6 THEN stop       delta   delta 0      ENDIF       d1    alat ilat    olat short delta     IF min d1  max   ma  LE  1 THEN stop     IF ma GT 0 THEN stop     wy1   1  temporary d1      d2    alat ilat 1L olat short delta     IF min d2  max   ma  LE 0 THEN stop     IF ma GT 1 THEN stop     wy2   1  temporary d2        mi   min wy1 wy2  max   ma      IF abs mi 1  GE 1 e 6 THEN stop     IF abs ma 1  GE 1 e 6 THEN stop   but imoms3 along the longitude     IF NOT keyword_set noregx  THEN BEGIN       delta   alon ilon alon ilon 1L        IF max abs delta delta 0  GE 1 e 6 THEN stop       delta   delta 0          d0    alon ilon 1L olon short delta       IF min d0  max   ma  LE  2 THEN stop       IF ma GT  1 THEN stop       wx0   imoms3 temporary d0        d1    alon ilon    olon short delta       IF min d1  max   ma  LE  1 THEN stop       IF ma GT 0 THEN stop       wx1   imoms3 temporary d1        d2    alon ilon 1L olon short delta       IF min d2  max   ma  LE 0 THEN stop       IF ma GT 1 THEN stop       wx2   imoms3 temporary d2        d3    alon ilon 2L olon short delta       IF min d3  max   ma  LE 1 THEN stop       IF ma GT 2 THEN stop       wx3   imoms3 temporary d3      ENDIF ELSE BEGIN       nele   n_elements short        wx0   fltarr nele        wx1   fltarr nele        wx2   fltarr nele        wx3   fltarr nele        FOR i   0L  nele 1 DO BEGIN         IF i MOD 10000 EQ 0 THEN print  i         newlon   spl_incr alon ilon i 1L:ilon i 2L   1  0  1  2  olon short i          IF newlon LE 0 THEN stop         IF newlon GT 1 THEN stop         wx0 i    imoms3 newlon 1          wx1 i    imoms3 newlon          wx2 i    imoms3 1 newlon          wx3 i    imoms3 2 newlon        ENDFOR     ENDELSE       mi   min wx0 wx1 wx2 wx3  max   ma      IF abs mi 1  GE 1 e 6 THEN stop     IF abs ma 1  GE 1 e 6 THEN stop   line 1     xaddr 0  short    ilon   1L     xaddr 1  short    ilon     xaddr 2  short    ilon   1L     xaddr 3  short    ilon   2L     yaddr 0  short    ilat     yaddr 1  short    ilat     yaddr 2  short    ilat     yaddr 3  short    ilat     weig 0  short    wx0   wy1     weig 1  short    wx1   wy1     weig 2  short    wx2   wy1     weig 3  short    wx3   wy1   line 2     xaddr 4  short    ilon   1L     xaddr 5  short    ilon     xaddr 6  short    ilon   1L     xaddr 7  short    ilon   2L     yaddr 4  short    ilat   1L     yaddr 5  short    yaddr 4  short      yaddr 6  short    yaddr 4  short      yaddr 7  short    yaddr 4  short      weig 4  short    wx0   wy2     weig 5  short    wx1   wy2     weig 6  short    wx2   wy2     weig 7  short    wx3   wy2       mi   min total weig  short  1  max   ma      IF abs mi 1  GE 1 e 6 THEN stop     IF abs ma 1  GE 1 e 6 THEN stop     ENDIF     for the ocean points located below the line 0   Interpolation only along the longitude     short   where indexlat EQ  1    IF short 0  NE  1 THEN BEGIN     ilon   indexlon short        IF NOT keyword_set noregx  THEN BEGIN       delta   alon ilon alon ilon 1L        IF max abs delta delta 0  GE 1 e 6 THEN stop       delta   delta 0          d0    alon ilon 1L olon short delta       IF min d0  max   ma  LE  2 THEN stop       IF ma GT  1 THEN stop       wx0   imoms3 temporary d0        d1    alon ilon    olon short delta       IF min d1  max   ma  LE  1 THEN stop       IF ma GT 0 THEN stop       wx1   imoms3 temporary d1        d2    alon ilon 1L olon short delta       IF min d2  max   ma  LE 0 THEN stop       IF ma GT 1 THEN stop       wx2   imoms3 temporary d2        d3    alon ilon 2L olon short delta       IF min d3  max   ma  LE 1 THEN stop       IF ma GT 2 THEN stop       wx3   imoms3 temporary d3      ENDIF ELSE BEGIN       nele   n_elements short        wx0   fltarr nele        wx1   fltarr nele        wx2   fltarr nele        wx3   fltarr nele        FOR i   0L  nele 1 DO BEGIN         IF i MOD 10000 EQ 0 THEN print  i         newlon   spl_incr alon ilon i 1L:ilon i 2L   1  0  1  2  olon short i          IF newlon LE 0 THEN stop         IF newlon GT 1 THEN stop         wx0 i    imoms3 newlon 1          wx1 i    imoms3 newlon          wx2 i    imoms3 1 newlon          wx3 i    imoms3 2 newlon        ENDFOR     ENDELSE       mi   min wx0 wx1 wx2 wx3  max   ma      IF abs mi 1  GE 1 e 6 THEN stop     IF abs ma 1  GE 1 e 6 THEN stop   line 1     xaddr 0  short    ilon   1L     xaddr 1  short    ilon     xaddr 2  short    ilon   1L     xaddr 3  short    ilon   2L     yaddr 0:3  short    0     weig 0  short    wx0     weig 1  short    wx1     weig 2  short    wx2     weig 3  short    wx3       mi   min total weig  short  1  max   ma      IF abs mi 1  GE 1 e 6 THEN stop     IF abs ma 1  GE 1 e 6 THEN stop     ENDIF     for the ocean points located above jpia 1   Interpolation only along the longitude     short   where indexlat EQ jpja 1L    IF short 0  NE  1 THEN BEGIN     ilon   indexlon short        IF NOT keyword_set noregx  THEN BEGIN       delta   alon ilon alon ilon 1L        IF max abs delta delta 0  GE 1 e 6 THEN stop       delta   delta 0          d0    alon ilon 1L olon short delta       IF min d0  max   ma  LE  2 THEN stop       IF ma GT  1 THEN stop       wx0   imoms3 temporary d0        d1    alon ilon    olon short delta       IF min d1  max   ma  LE  1 THEN stop       IF ma GT 0 THEN stop       wx1   imoms3 temporary d1        d2    alon ilon 1L olon short delta       IF min d2  max   ma  LE 0 THEN stop       IF ma GT 1 THEN stop       wx2   imoms3 temporary d2        d3    alon ilon 2L olon short delta       IF min d3  max   ma  LE 1 THEN stop       IF ma GT 2 THEN stop       wx3   imoms3 temporary d3      ENDIF ELSE BEGIN       nele   n_elements short        wx0   fltarr nele        wx1   fltarr nele        wx2   fltarr nele        wx3   fltarr nele        FOR i   0L  nele 1 DO BEGIN         IF i MOD 10000 EQ 0 THEN print  i         newlon   spl_incr alon ilon i 1L:ilon i 2L   1  0  1  2  olon short i          IF newlon LE 0 THEN stop         IF newlon GT 1 THEN stop         wx0 i    imoms3 newlon 1          wx1 i    imoms3 newlon          wx2 i    imoms3 1 newlon          wx3 i    imoms3 2 newlon        ENDFOR     ENDELSE       mi   min wx0 wx1 wx2 wx3  max   ma      IF abs mi 1  GE 1 e 6 THEN stop     IF abs ma 1  GE 1 e 6 THEN stop   line 1     xaddr 0  short    ilon 1L     xaddr 1  short    ilon     xaddr 2  short    ilon 1L     xaddr 3  short    ilon 2L     yaddr 0:3  short    jpja 1L     weig 0  short    wx0     weig 1  short    wx1     weig 2  short    wx2     weig 3  short    wx3       mi   min total weig  short  1  max   ma      IF abs mi 1  GE 1 e 6 THEN stop     IF abs ma 1  GE 1 e 6 THEN stop     ENDIF     Come back to the original index of atm grid without longitudinal overlap        xaddr   temporary xaddr    toadd   jpia   jpia   2 toadd   make sure all values are ge 0   xaddr   temporary xaddr    jpia   range the values between 0 and jpia 1   xaddr   temporary xaddr  mod jpia     take into account shiftx if needed   IF shiftx NE 0 THEN xaddr    temporary xaddr    shiftx  MOD jpia   take into account nosouthernline and nonorthernline   if keyword_set nosouthernline  then BEGIN     yaddr   temporary yaddr    1L     jpja   jpja   1L   ENDIF   if keyword_set nonorthernline  then jpja   jpja   1L   take into account revy if needed   IF revy EQ 1 THEN yaddr   jpja   1L   temporary yaddr                               addr   temporary yaddr jpia temporary xaddr      RETURN END"); 
    5656a[54] = new Array("./Interpolation/cutpar.html", "cutpar.pro", "", "       file_comments   cut p parallelogram s  into p n 2 parallelograms      categories basic work      param x0  in required     param y0  in required     param x1  in required     param y1  in required     param x2  in required     param y2  in required     param x3  in required     param y3  in required    1d arrays of p elements  giving the edge positions    The edges must be given as in plot to draw the parallelogram   see example       param n  in required    each parallelogram will be cut in n 2 pieces      keyword ENDPOINTS   see outputs      keyword ONSPHERE   to specify that the points are located on a   sphere  In this case  x and y corresponds to longitude and   latitude in degrees       returns      default: a 3d array 2 n 2 p  giving the center position of each    piece of the parallelograms      if  ENDPOINTS : a 3d array 2 n 1 2 p  giving the edge positions    of each piece of the parallelograms      uses cutsegment pro      examples     IDL  x0    2 6 2    IDL  y0    0 2 6    IDL  x1    3 8 4    IDL  y1    4 4 6    IDL  x2    1 6 4    IDL  y2    5 6 8    IDL  x3    0 4 2    IDL  y3    1 4 8    IDL  n   4   IDL  splot   0 10   0 10  xstyle   1  ystyle   1 nodata   IDL  for i 0 2 do oplot   x0 i x1 i x2 i x3 i x0 i y0 i y1 i y2 i y3 i y0 i    IDL  res cutpar x0  y0  x1  y1  x2  y2  x3  y3  n    IDL  for i 0 2 do oplot   res 0 i   res 1 i  color   20 10 i  psym   1  thick   3      history             S  Masson  smasson lodyc jussieu fr              July 5th  2002      version  Id: cutpar pro 163 2006 08 29 12:59:46Z navarro       FUNCTION cutpar  x0  y0  x1  y1  x2  y2  x3  y3  n  ENDPOINTS   endpoints  ONSPHERE   onsphere     compile_opt idl2  strictarrsubs     is it a parallelogram    eps   1e 4   IF total abs x0 x2 2 x1 x3 2  GE eps  GT 0       OR total abs y0 y2 2 y1 y3 2  GE eps  GT 0       THEN stop  print   NOT a parallelogram    x0 npar    npar   n_elements x0    firstborder 2 n keyword_set endpoints npar    firstborder   cutsegment x0  y0  x1  y1  n                                endpoints   endpoints  onsphere   onsphere    thirdborder   cutsegment x3  y3  x2  y2  n                                endpoints   endpoints  onsphere   onsphere    res 2 n keyword_set endpoints n keyword_set endpoints npar    res   cutsegment firstborder 0      firstborder 1                             thirdborder 0      thirdborder 1                             n  endpoints   endpoints  onsphere   onsphere    free memory   firstborder    1   thirdborder    1   reform the result   res   reform res  2   n keyword_set endpoints 2  npar   overwrite     RETURN  res END"); 
    5757a[55] = new Array("./Interpolation/cutsegment.html", "cutsegment.pro", "", "       file_comments   cut p segments into p n equal parts      categories basic work      param x0  in required     param y0  in required     param x1  in required     param y1  in required    1d arrays of p elements  the coordinates of the endpoints of the p segments      param n  in required    the number of pieces we want to cut each segment      keyword ENDPOINTS   see outputs      keyword ONSPHERE   to specify that the points are located on a sphere    In this case  x and y corresponds to longitude and latitude in degrees       returns      default: a 3d array  2 n p  that gives the coordinates of the    middle of the cut segments       if  ENDPOINTS  a 3d array  2 n 1 p  that gives the    coordinates of the endpoints of the cutted segments       examples     IDL  x0 2 5    IDL  y0 5 1    IDL  x1 9 3    IDL  y1 1 8    IDL  res cutsegment x0  y0  x1  y1  10    IDL  splot   0 10   0 10  xstyle   1  ystyle   1 nodata   IDL  oplot   x0 0  x1 0   y0 0  y1 0    IDL  oplot   res 0 0   res 1 0  color   20  psym   1  thick   3   IDL  oplot   x0 1  x1 1   y0 1  y1 1    IDL  oplot   res 0 1   res 1 1  color   40  psym   1  thick   3      history             S  Masson  smasson lodyc jussieu fr              July 5th  2002      version  Id: cutsegment pro 163 2006 08 29 12:59:46Z navarro       FUNCTION cutsegment  x0  y0  x1  y1  n  ENDPOINTS   endpoints  ONSPHERE   onsphere     compile_opt idl2  strictarrsubs     number of segment   nseg   n_elements x0    number of point to find on each segment   n2find   n keyword_set endpoints      IF keyword_set onsphere  THEN BEGIN   save the inputs arrays     x0in   temporary x0      y0in   temporary y0      x1in   temporary x1      y1in   temporary y1      sp_cood    transpose x0in transpose y0in replicate 1  1  nseg      rect_coord   CV_COORD FROM_SPHERE   temporary sp_cood   TO_RECT   DEGREES      x0   rect_coord 0        y0   rect_coord 1        z0   rect_coord 2        rect_coord    1  free memory     sp_cood    transpose x1in transpose y1in replicate 1  1  nseg      rect_coord   CV_COORD FROM_SPHERE   temporary sp_cood   TO_RECT   DEGREES      x1   rect_coord 0        y1   rect_coord 1        z1   rect_coord 2        rect_coord    1  free memory   ENDIF     resx   replicate 1  n2find x0    resx   temporary resx 1 n findgen n2find                                     5 1 keyword_set endpoints x1 x0    resx    temporary resx      resy   replicate 1  n2find y0    resy   temporary resy 1 n findgen n2find                                     5 1 keyword_set endpoints y1 y0    resy    temporary resy     IF keyword_set onsphere  THEN BEGIN     resz   replicate 1  n2find z0      resz   temporary resz 1 n findgen n2find                                       5 1 keyword_set endpoints z1 z0      resz    temporary resz       rec_cood    transpose temporary resx  transpose temporary resy                      transpose temporary resz      res   CV_COORD FROM_RECT   temporary rec_cood   TO_SPHERE   DEGREES    restore the input arrays     x0   temporary x0in      y0   temporary y0in      x1   temporary x1in      y1   temporary y1in    ENDIF ELSE res    transpose temporary resx  transpose temporary resy     res   reform res 0:1    2  n2find  nseg   overwrite     RETURN  res END"); 
    58 a[56] = new Array("./Interpolation/extrapolate.html", "extrapolate.pro", "", "     file_comments   extrapolate data  zinput  where maskinput eq 0 by filling   step by step the coastline points with the mean value of the 8 neighbourgs       categories    Interpolation      param zinput  in required    data to be extrapolate      param maskinput  in required       param nb_iteration  in optional    number of iteration      keyword x_periodic    keyword MINVAL    keyword MAXVAL    keyword GE0      version  Id: extrapolate pro 199 2006 12 13 07:47:14Z smasson       FUNCTION extrapolate  zinput  maskinput  nb_iteration  x_periodic   x_periodic  MINVAL   minval  MAXVAL   maxval  GE0   ge0     compile_opt idl2  strictarrsubs     check the number of iteration used in the extrapolation    IF n_elements nb_iteration  EQ 0 THEN nb_iteration   10 E20   IF nb_iteration EQ 0 THEN return  zinput   nx    size zinput 1    ny    size zinput 2    take care of the boundary conditions      for the x direction  we put 2 additional columns at the left and   right side of the array    for the y direction  we put 2 additional lines at the bottom and   top side of the array    These changes allow us to use shift function without taking care of   the x and y periodicity      ztmp   bytarr nx 2  ny 2    ztmp 1:nx  1:ny    byte maskinput    msk   temporary ztmp      ztmp   replicate 1 e20  nx 2  ny 2    ztmp 1:nx  1:ny    zinput   if keyword_set x_periodic  then begin     ztmp 0  1:ny    zinput nx 1        ztmp nx 1  1:ny    zinput 0      ENDIF   remove NaN points if there is some    nan   where finite ztmp  EQ 0  cnt_nan    IF cnt_nan NE 0 THEN ztmp temporary nan    1 e20   z   temporary ztmp    nx2   nx 2   ny2   ny 2       extrapolation     sqrtinv   1 sqrt 2      cnt   1   When we look for the coast line  we don t want to select the   borderlines of the array    we force the value of the mask for   those lines    msk 0      1b   msk nx 1      1b   msk  0    1b   msk  ny 1    1b   find the land points   land   where msk EQ 0  cnt_land      WHILE cnt LE nb_iteration AND cnt_land NE 0 DO BEGIN     find the coast line points      Once the land points list has been found  we change back the the   mask values for the boundary conditions      msk 0      0b     msk nx 1      0b     msk  0    0b     msk  ny 1    0b     if keyword_set x_periodic  then begin       msk 0      msk nx          msk nx 1      msk 1        endif     we compute the weighted number of sea neighbourgs    those 4 neighbours have a weight of 1:                         those 4 neighbours have a weight of 1 sqrt 2 :                                 As we make sure that none of the land points are located on the   border of the array  we can compute the weight without shift    faster        weight   msk land 1 msk land 1 msk land nx2 msk land nx2                  sqrtinv msk land nx2 1 msk land nx2 1                            msk land nx2 1 msk land nx2 1    list all the points that have sea neighbourgs     ok   where weight GT 0    the coastline points     coast   land ok    their weighted number of sea neighbourgs      weight   weight temporary ok      fill the coastine points       z   temporary z msk       zcoast   z 1 coast z 1 coast z nx2 coast z nx2 coast                  1 sqrt 2 z nx2 1 coast z nx2 1 coast                               z nx2 1 coast z nx2 1 coast        IF keyword_set ge0  THEN zcoast   0    temporary zcoast      IF n_elements minval  NE 0 THEN zcoast   minval   temporary zcoast      IF n_elements maxval  NE 0 THEN zcoast   temporary zcoast   we force the value of the mask for   those lines      msk 0      1b     msk nx 1      1b     msk  0    1b     msk  ny 1    1b   find the land points     land   where msk EQ 0  cnt_land      ENDWHILE     we return the original size of the array       return  z 1:nx  1:ny  END "); 
    59 a[57] = new Array("./Interpolation/fromirr.html", "fromirr.pro", "", "       file_comments   interpolate data from an irregular 2D grid to any 2D grid      Only 1 method available   bilinear      categories    Interpolation      param method  in required type string    a string defining the interpolation method  must be  bilinear       param datain  in required type 2d array    a 2D array the input data to interpolate      param lonin  in optional type 2d array    a 2D array defining the longitude of the input data      param latin  in optional type 2d array    a 2D array defining the latitude of the input data       param mskin  in optional type 2d array    a 2D array  the land sea mask of the input data  1 on ocean  0 on land       param lonout  in optional type 1d or 2d array    1D or 2D array defining the longitude of the output data       param latout  in optional type 1d or 2d array    1D or 2D array defining the latitude of the output data       param mskout  in required type 2d array    a 2D array  the land sea mask of the output data  1 on ocean  0 on land       keyword WEIG  type 2d array     see ADDR       keyword ADDR  type 2d array    2D arrays  weig and addr are the weight and addresses used to   perform the interpolation:            dataout   total weig datain addr  1             dataout   reform dataout  jpio  jpjo   over    Those keywords can be set to named variables  that are undefined or equal to 0  into which the   values will be copied when the current routine exits  Next  they can be used to perform   the interpolation without computing again those 2 parameters  This greatly   speed up the interpolation  In that case  lonin  latin  lonout and latout are not necessary       returns   2D array the interpolated data      restrictions   We supposed the data are located on a sphere  with a periodicity along   the longitude    Note that the input data can contain the same cells several times    like ORCA grid near the north pole boundary       examples     IDL  tncep   fromirr bilinear  topa  glamt  gphit  tmask 0  lonout  latout  mskout       or     IDL  t1ncep   fromirr bilinear  topa  glamt  gphit  tmask 0  lonout  latout  mskout                                  WEIG   a  ADDR   b    IDL  help  a  b   IDL  t2ncep   fromirr bilinear  topa  WEIG   a  ADDR   b       history    June 2006: Sebastien Masson  smasson lodyc jussieu fr       version  Id: fromirr pro 163 2006 08 29 12:59:46Z navarro             FUNCTION fromirr  method  datain  lonin  latin  mskin  lonout  latout  mskout                       WEIG   weig  ADDR   addr     compile_opt strictarr  strictarrsubs       atmospheric grid parameters       alon   lonin     alat   latin     get_gridparams  alon  alat  jpia  jpja  2   double     Oceanic grid parameters       olon   lonout     olat   latout     get_gridparams  olon  olat  jpio  jpjo  2   double     Compute weight and address     IF NOT  keyword_set weig  AND keyword_set addr  THEN BEGIN     CASE method OF        bilinear :compute_fromirr_bilinear_weigaddr  alon  alat  mskin  olon  olat  mskout  weig  addr       ELSE:BEGIN         print    unknown interpolation method  we stop          stop       ENDELSE     ENDCASE   ENDIF     to the interpolation     dataout   total weig datain addr  1    dataout   reform dataout  jpio  jpjo   over      RETURN  dataout END"); 
    60 a[58] = new Array("./Interpolation/fromreg.html", "fromreg.pro", "", "       file_comments   interpolate data from a  regular rectangular grid  to any grid      2 methods available: bilinear and imoms3     A  regular rectangular grid  is defined as a grid for which each longitudes lines have     the same latitude and each latitudes columns have the same longitude       categories    Interpolation      param method  in required type string    a string defining the interpolation method    must be  bilinear  or  imoms3       param datain  in required type 2d array    a 2D array the input data to interpolate      param lonin  in optional type 1d or 2d array    1D or 2D array defining the longitude of the input data      param latin  in optional type 1d or 2d array    1D or 2D array defining the latitude of the input data      param lonout  in optional type 1d or 2d array    1D or 2D array defining the longitude of the output data      param latout  in required type 1d or 2d array    1D or 2D array defining the latitude of the output data      keyword WEIG  type 2d array     see ADDR       keyword ADDR  type 2d array    2D arrays  weig and addr are the weight and addresses used to   perform the interpolation:            dataout   total weig datain addr  1             dataout   reform dataout  jpio  jpjo   over    Those keywords can be set to named variables  that are undefined or equal to 0  into which the   values will be copied when the current routine exits  Next  they can be used to perform   the interpolation without computing again those 2 parameters  In that   case  lonin  latin  lonout and latout are not necessary       keyword NONORTHERNLINE   activate if you don t want to take into account the northern line   of the input data when performing the interpolation       keyword NOSOUTHERNLINE   activate if you don t want to take into account the southern line   of the input data when performing the interpolation       returns   2D array the interpolated data      restrictions   We supposed the data are located on a sphere  with a periodicity along the   longitude       examples     IDL  topa   fromreg bilinear  tncep  xncep  yncep  glamt  gphit       or     IDL  t1opa   fromreg bilinear  t1ncep  xncep  yncep  glamt  gphit  WEIG   a  ADDR   b    IDL  help  a  b   IDL  t2opa   fromreg bilinear  t2ncep  xncep  WEIG   a  ADDR   b       history    November 2005: Sebastien Masson  smasson lodyc jussieu fr       version  Id: fromreg pro 163 2006 08 29 12:59:46Z navarro             FUNCTION fromreg  method  datain  lonin  latin  lonout  latout                       WEIG   weig  ADDR   addr                       NONORTHERNLINE   nonorthernline                       NOSOUTHERNLINE   nosouthernline     compile_opt idl2  strictarrsubs       atmospheric grid parameters       alon   lonin     alat   latin     get_gridparams  alon  alat  jpia  jpja  1   double     Oceanic grid parameters       olon   lonout     olat   latout     get_gridparams  olon  olat  jpio  jpjo  2   double     Compute weight and address     IF NOT  keyword_set weig  AND keyword_set addr  THEN BEGIN     CASE method OF        bilinear :compute_fromreg_bilinear_weigaddr  alon  alat  olon  olat  weig  addr  NONORTHERNLINE   nonorthernline  NOSOUTHERNLINE   nosouthernline        imoms3 :  compute_fromreg_imoms3_weigaddr    alon  alat  olon  olat  weig  addr  NONORTHERNLINE   nonorthernline  NOSOUTHERNLINE   nosouthernline       ELSE:BEGIN         print    unknown interpolation method  we stop          stop       ENDELSE     ENDCASE   ENDIF     dataout   total weig datain addr  1    dataout   reform dataout  jpio  jpjo   over      RETURN  dataout END"); 
    61 a[59] = new Array("./Interpolation/get_gridparams.html", "get_gridparams.pro", "", "       file_comments   1  extract from a NetCDF file the longitude  latitude  and their dimensions   and make sure it is 1D or 2D arrays     or   2  given longitude and latitude arrays get their dimensions and make   sure they are 1D or 2D arrays      categories    Interpolation      examples     1    IDL  get_gridparams  file  lonname  latname  lon  lat  jpi  jpj  n_dimensions     or     2    IDL  get_gridparams  lon  lat  jpi  jpj  n_dimensions     1     param in1  in required    Case 1: the name of the netcdf file   Case 2: 1d or 2D arrays defining longitudes and latitudes    Out: the variable that will contain the longitudes      param in2  in required    Case 1: the name of the variable that contains the longitude in the NetCDF file   Case 2: 1d or 2D arrays defining longitudes and latitudes            Note that these arrays are also outputs and can therefore be modified    Out: the variable that will contain the latitudes      param in3  in required    Case 1: the name of the variable that contains the latitude in the NetCDF file   Case 2: the number of points in the longitudinal direction       param in4  out    Case 1: the number of points in the longitudinal direction   Case 2: the number of points in the latitudinal direction      param in5  out    Case 1: the number of points in the latitudinal direction   Case 2: 1 or 2 to specify if lon and lat should be 1D  jpi or jpj    arrays or 2D arrays  jpi jpj  Note that of  n_dimensions   1  then the   grid must be regular  each longitudes must be the same for all latitudes   and each latitudes should be the same for all longitudes       param in6  out    the variable that will contain the longitudes      param in7  out    the variable that will contain the latitudes      param in8  out    1 or 2 to specify if lon and lat should be 1D  jpi or jpj       keyword DOUBLE   use double precision to perform the computation      examples     1  IDL  ncdf_get_gridparams   coordinates_ORCA_R05 nc   glamt   gphit                   olon  olat  jpio  jpjo  2     2  IDL  ncdf_get_gridparams  olon  olat  jpio  jpjo  2      history    November 2005: Sebastien Masson  smasson lodyc jussieu fr       version  Id: get_gridparams pro 163 2006 08 29 12:59:46Z navarro               PRO get_gridparams  in1    in2    in3      in4  in5  in6  in7  in8  DOUBLE   double                    file  lonname  latname  lon  lat  jpi  jpj  n_dimensions                     lon    lat    jpi      jpj  n_dimensions       compile_opt idl2  strictarrsubs     CASE n_params  OF     8:BEGIN   get longitude and latitude       IF file_test in1  EQ 0 THEN BEGIN         print   file     in1     does not exist          stop       ENDIF       cdfido   ncdf_open in1        ncdf_varget  cdfido  in2  lon       ncdf_varget  cdfido  in3  lat       ncdf_close  cdfido       n_dimensions   in8     END     5:BEGIN       lon   temporary in1        lat   temporary in2        n_dimensions   in5     END     ELSE:BEGIN       print   Bad nimber of input parameters        stop     end   ENDCASE     sizelon   size lon    sizelat   size lat    CASE 1 OF     lon and lat are 1D arrays       sizelon 0  EQ 1 AND sizelat 0  EQ 1:BEGIN   get jpi and jpj       jpi   sizelon 1        jpj   sizelat 1    make sure that lon and lat have the good number of dimensions       CASE n_dimensions OF         1:         2:BEGIN   make lon and lat 2D arrays           lon   temporary lon    replicate 1  jpj            lat   replicate 1  jpi    temporary lat          END         ELSE:stop       ENDCASE     END     lon is 2D array and lat is 1D array       sizelon 0  EQ 2 AND sizelat 0  EQ 1:BEGIN   get jpi and jpj       jpi   sizelon 1        jpj   sizelon 2        IF jpj NE n_elements lat  THEN stop   make sure that lon and lat have the good number of dimensions       CASE n_dimensions OF         1:BEGIN           IF array_equal lon  lon  0    replicate 1  jpj  NE 1 THEN BEGIN             print   Longitudes are not the same for all latitudes  imposible to extract a 1D array of the longitudes              stop           ENDIF           lon   lon  0          END         2:lat   replicate 1  jpi    temporary lat          ELSE:stop       ENDCASE     END     lon is 1D array and lat is 2D array       sizelon 0  EQ 1 AND sizelat 0  EQ 2:BEGIN   get jpi and jpj       jpi   sizelat 1        jpj   sizelat 2        IF jpi NE n_elements lon  THEN stop   make sure that lon and lat have the good number of dimensions       CASE n_dimensions OF         1:BEGIN           IF array_equal lat  replicate 1  jpi    lat 0    NE 1 THEN BEGIN             print   Latitudes are not the same for all longitudes  imposible to extract a 1D array of the latitudes              stop           ENDIF           lat   reform lat 0            END         2:lon   temporary lon    replicate 1  jpj          ELSE:stop       ENDCASE     END     lon and lat are 2D arrays       sizelon 0  EQ 2 AND sizelat 0  EQ 2:BEGIN   get jpi and jpj       IF array_equal sizelon 1:2  sizelat 1:2  NE 1 THEN stop       jpi   sizelon 1        jpj   sizelon 2    make sure that lon and lat have the good number of dimensions       CASE n_dimensions OF         1:BEGIN           IF array_equal lon  lon  0    replicate 1  jpj  NE 1 THEN BEGIN             print   Longitudes are not the same for all latitudes  imposible to extract a 1D array of the longitudes              stop           ENDIF           lon   lon  0            IF array_equal lat  replicate 1  jpi    reform lat 0    NE 1 THEN BEGIN             print   Latitudes are not the same for all longitudes  imposible to extract a 1D array of the latitudes              stop           ENDIF         lat   reform lat 0            END         2:         ELSE:stop       ENDCASE     END     lon and lat are not 1D and or 2D arrays       ELSE:stop   ENDCASE       double keyword     if keyword_set double  then BEGIN     lon   double temporary lon      lat   double temporary lat    ENDIF     give back the right outparameters       CASE n_params  OF     8:BEGIN       in4   temporary lon        in5   temporary lat        in6   temporary jpi        in7   temporary jpj      END     5:BEGIN       in1   temporary lon        in2   temporary lat        in3   temporary jpi        in4   temporary jpj      END   ENDCASE    return END"); 
    62 a[60] = new Array("./Interpolation/imoms3.html", "imoms3.pro", "", "         param xin  in required       version  Id: imoms3 pro 134 2006 07 07 10:19:08Z navarro       FUNCTION imoms3  xin     compile_opt idl2  strictarrsubs      x   abs xin    y   fltarr n_elements x     test1   where x LT 1    IF test1 0  NE  1 THEN BEGIN     xtmp   x test1      y test1    0 5 xtmp xtmp xtmp  xtmp xtmp  0 5 xtmp   1   ENDIF   test1   where x LT 2 AND x GE 1    IF test1 0  NE  1 THEN BEGIN     xtmp   x test1      y test1     1 6 xtmp xtmp xtmp   xtmp xtmp    11 6 xtmp   1   ENDIF    RETURN  y END"); 
    63 a[61] = new Array("./Interpolation/inquad.html", "inquad.pro", "", "     file_comments   to find if an  x y  point is in a quadrilateral  x1 x2 x3 x4       categories    Grid      param x  in required     param y  in required    the coordinates of the point we want to know where it is    Must be a scalar if  ONSPHERE activated else can be scalar or array       param x1  in required     param y1  in required     param x2  in required     param y2  in required     param x3  in required     param y3  in required     param x4  in required     param y4  in required    the coordinates of the quadrilateral given in the CLOCKWISE order    Scalar or array       keyword DOUBLE   use double precision to perform the computation      keyword ONSPHERE   to specify that the quadrilateral are on a sphere and   that their coordinates are longitude latitude coordinates  In this   case  est west periodicity  poles singularity and other pbs   related to longitude latitude coordinates are managed   automatically       keyword ZOOMRADIUS  default 4    the zoom  circle centered on the  x y  with a radius of   zoomradius degree where we look for the the quadrilateral which   contains the  x y  point  used for the satellite projection   when  ONSPHERE is activated    4 seems to be the minimum which can be used    Can be increase if the cell size is larger than 5 degrees       keyword NOPRINT   to suppress the print messages       keyword NEWCOORD      returns   a n element vector  Where n is the number of elements of   x  res i j means that the point number i is located in the   quadrilateral number j with  0  x   1 1  2  6  7  3    IDL  y   1 1  3  3  4  7    IDL  x1   1 0 4 2    IDL  y1   1 1 4 8    IDL  x2   1 1 6 4    IDL  y2   1 5 6 8    IDL  x3   1 3 8 4    IDL  y3   1 4 4 6    IDL  x4   1 2 6 2    IDL  y4   1 0 2 6    IDL  splot   0 10   0 10  xstyle   1  ystyle   1 nodata   IDL  for i 0 2 do oplot   x4 i x1 i x2 i x3 i x4 i y4 i y1 i y2 i y3 i y4 i    IDL  oplot  x  y  color   20  psym   1  thick   2   IDL  print  inquad x  y  x1  y1  x2  y2  x3  y3  x4  y4      On a sphere see clickincell pro       history        Sebastien Masson  smasson lodyc jussieu fr         August 2003        Based on Convert_clic_ij pro written by Gurvan Madec      version  Id: inquad pro 163 2006 08 29 12:59:46Z navarro       FUNCTION inquad  x  y  x1  y1  x2  y2  x3  y3  x4  y4  ONSPHERE   onsphere   DOUBLE   double  ZOOMRADIUS   zoomradius  NOPRINT   noprint  NEWCOORD   newcoord     compile_opt idl2  strictarrsubs     ntofind   n_elements x    nquad   n_elements x2      IF keyword_set onsphere  THEN BEGIN   save the inputs parameters     xin   x     yin   y     x1in   x1     y1in   y1     x2in   x2     y2in   y2     x3in   x3     y3in   y3     x4in   x4     y4in   y4   for map_set     x   x MOD 360     x1   x1 MOD 360     x2   x2 MOD 360     x3   x3 MOD 360     x4   x4 MOD 360   save  map     save    map: map  x: x  y: y  z: z  p: p    do a satellite projection     IF NOT keyword_set zoomradius  THEN zoomradius   4     map_set  y 0  x 0  0   satellite  sat_p    1 zoomradius 20 6371 229  0  0   noerase   iso   noborder   use normal coordinates to reject cells which are out of the projection      tmp    convert_coord x  y   DATA   TO_NORMAL  DOUBLE   double      tmp1   convert_coord x1  y1   DATA   TO_NORMAL  DOUBLE   double      tmp2   convert_coord x2  y2   DATA   TO_NORMAL  DOUBLE   double      tmp3   convert_coord x3  y3   DATA   TO_NORMAL  DOUBLE   double      tmp4   convert_coord x4  y4   DATA   TO_NORMAL  DOUBLE   double    remove cell which have one corner with coordinates equal to NaN     test   finite tmp1 0   tmp1 1   tmp2 0   tmp2 1                         tmp3 0   tmp3 1   tmp4 0   tmp4 1        good   where temporary test  EQ 1        IF good 0  EQ  1 THEN BEGIN       IF NOT keyword_set noprint  THEN print   The point is out of the cells    restore the input parameters       x   temporary xin        y   temporary yin        x1   temporary x1in        y1   temporary y1in        x2   temporary x2in        y2   temporary y2in        x3   temporary x3in        y3   temporary y3in        x4   temporary x4in        y4   temporary y4in    restore old  map         map   save map        x   save x        y   save y        z   save z        p   save p       RETURN    1     ENDIF       x    tmp 0      y    tmp 1      x1   tmp1 0  good      y1   tmp1 1  good      x2   tmp2 0  good      y2   tmp2 1  good      x3   tmp3 0  good      y3   tmp3 1  good      x4   tmp4 0  good      y4   tmp4 1  good        tmp1    1   tmp2    1   tmp3    1   tmp4    1   remove cells which are obviously bad     test    x1 GT x AND x2 GT x AND x3 GT x AND x4 GT x          OR  x1 LT x AND x2 LT x AND x3 LT x AND x4 LT x          OR  y1 GT y AND y2 GT y AND y3 GT y AND y4 GT y          OR  y1 LT y AND y2 LT y AND y3 LT y AND y4 LT y      good2   where temporary test  EQ 0        IF good2 0  EQ  1 THEN BEGIN       IF NOT keyword_set noprint  THEN print   The point is out of the cells    restore the input parameters       x   temporary xin        y   temporary yin        x1   temporary x1in        y1   temporary y1in        x2   temporary x2in        y2   temporary y2in        x3   temporary x3in        y3   temporary y3in        x4   temporary x4in        y4   temporary y4in    restore old  map         map   save map        x   save x        y   save y        z   save z        p   save p       RETURN    1     ENDIF       nquad   n_elements good2      x1   x1 good2      y1   y1 good2      x2   x2 good2      y2   y2 good2      x3   x3 good2      y3   y3 good2      x4   x4 good2      y4   y4 good2    ENDIF       the point is inside the quadrilateral if test eq 1   with test equal to:       test    x x1 y2 y1  GE  x2 x1 y y1             x x2 y3 y2  GT  x3 x2 y y2             x x3 y4 y3  GT  x4 x3 y y3             x x4 y1 y4  GE  x1 x4 y y4      computation of test without any do loop for ntofind points  x y  and   nquad quadilateral x1 x2 x3 x4 y1 y2 y3 y4    test dimensions are  ntofind  nquad    column i of test corresponds to the intersection of point i with all   quadirlateral    row j of test corresponds to all the points localized in cell j   test        x x1     x replicate 1  nquad replicate 1  ntofind x1       y2 y1     replicate 1  ntofind y2 y1      GE  x2 x1    GE  replicate 1  ntofind x2 x1       y y1     y replicate 1  nquad replicate 1  ntofind y1      test   temporary test       x x2     x replicate 1  nquad replicate 1  ntofind x2       y3 y2     replicate 1  ntofind y3 y2      GE  x3 x2    GE  replicate 1  ntofind x3 x2       y y2     y replicate 1  nquad replicate 1  ntofind y2      test   temporary test       x x3     x replicate 1  nquad replicate 1  ntofind x3       y4 y3     replicate 1  ntofind y4 y3      GE  x4 x3    GE  replicate 1  ntofind x4 x3       y y3     y replicate 1  nquad replicate 1  ntofind y3      test   temporary test       x x4     x replicate 1  nquad replicate 1  ntofind x4       y1 y4     replicate 1  ntofind y1 y4      GE  x1 x4    GE  replicate 1  ntofind x1 x4       y y4     y replicate 1  nquad replicate 1  ntofind y4      check test if ntofind gt 1   if ntofind gt 1  each point must be localised in one uniq cell    IF ntofind GT 1 THEN BEGIN   each column of test must have only 1 position equal to one     chtest   total test  2    points out of the cells     IF  where chtest EQ 0 0  NE  1 THEN BEGIN       IF NOT keyword_set noprint  THEN print   Points number  strjoin strtrim where chtest EQ 0  1      are out of the grid        stop     ENDIF   points in more than one cell     IF  where chtest GT 1 0  NE  1 THEN BEGIN       IF NOT keyword_set noprint  THEN print   Points number  strjoin strtrim where chtest GT 1  1      are in more than one cell        stop     ENDIF   ENDIF   find the points for which test eq 1   found   where temporary test  EQ 1    if ntofind eq 1  the point may be localised in more than one grid   cell ou may also be out of the cells   IF ntofind EQ 1 THEN BEGIN     CASE 1 OF       found 0  EQ  1:BEGIN         IF NOT keyword_set noprint  THEN print   The point is out of the cells          IF keyword_set onsphere  THEN BEGIN   restore old  map             map   save map            x   save x            y   save y            z   save z            p   save p         ENDIF         return    1       END       n_elements found  GT ntofind:BEGIN         IF NOT keyword_set noprint  THEN print   The point is in more than one cell        END       ELSE:     ENDCASE   ENDIF ELSE BEGIN   if ntofind GT 1  found must be sorted   i position of found  this corresponds to one x y point     forsort   found MOD ntofind   j position of found  this corresponds to cell in which is one x y   point     found   temporary found ntofind   found must be sorted according to forsort     found   found sort forsort    ENDELSE     IF keyword_set onsphere  THEN BEGIN     IF arg_present newcoord  THEN BEGIN       found   found 0        newcoord    x1 found  y1 found                         x2 found  y2 found                         x3 found  y3 found                         x4 found  y4 found                         x  y      ENDIF       found   good good2 found    restore the input parameters     x   temporary xin      y   temporary yin      x1   temporary x1in      y1   temporary y1in      x2   temporary x2in      y2   temporary y2in      x3   temporary x3in      y3   temporary y3in      x4   temporary x4in      y4   temporary y4in    restore old  map       map   save map      x   save x      y   save y      z   save z      p   save p   ENDIF     RETURN  found END"); 
    64 a[62] = new Array("./Interpolation/inrecgrid.html", "inrecgrid.pro", "", "       file_comments   given   a list of points   x y  position           the x and y limits of a rectangular grid   find in which cell is located each given point       categories    Without loop      param x1d  in required type 1d array    the x position on the points      param y1d  in required type 1d array    the y position on the points      param left  in required type 1d monotonically increasing array    the position of the  left  border of each cell       param bottom  in required type 1d monotonically increasing array    the position of the  bottom  border of each cell       keyword OUTPUT2D   to get the output as a 2d array  2 n_elements x1d    with res 0  the x index according to the 1d array defined by   left and res 1  the y index according to the 1d array defined by bottom       keyword CHECKOUT      rbgrid ubgrid  specify the right and upper boundaries of   the grid and check if some points are out       returns   the index on the cell according to the 2d array defined by left and bottom       examples     IDL  a indgen 5    IDL  b indgen 7    IDL  r inrecgrid 0 25 3 25 2 4 25 2 8 1 4 a b    IDL  print  r              20          13           7   IDL  r inrecgrid 0 25 3 25 2 4 25 2 8 1 4 a a 1 b b 1 output2d    IDL  print  r          0 00000      4 00000          3 00000      2 00000          2 00000      1 00000      history   S  Masson  smasson lodyc jussieu fr    July 3rd  2002   October 3rd  2003: use value_locate      version  Id: inrecgrid pro 163 2006 08 29 12:59:46Z navarro       FUNCTION inrecgrid  x1d  y1d  left  bottom  OUTPUT2D   output2d  CHECKOUT   checkout     compile_opt idl2  strictarrsubs     ncellx   n_elements left    ncelly   n_elements bottom      xpos   value_locate left  x1d    ypos   value_locate bottom  y1d      IF n_elements checkout  EQ 2 THEN BEGIN     out   where x1d GT checkout 0      IF out 0  NE  1 THEN xpos out     1     out   where y1d GT checkout 1      IF out 0  NE  1 THEN ypos out     1   ENDIF     IF keyword_set output2d  THEN return   transpose xpos  transpose ypos      IF NOT keyword_set checkout  THEN RETURN  xpos ncellx ypos     res   xpos ncellx ypos   out   where xpos EQ  1 OR ypos EQ  1    IF out 0  NE  1 THEN res out     1     RETURN  res  END"); 
    65 a[63] = new Array("./Interpolation/ll_narcs_distances.html", "ll_narcs_distances.pro", "", "       file_comments   This function returns the longitude and latitude  lon  lat  of   a point a given arc distance  pi  Lon_lat0    1 0  2 0  Initial point specified in radians   IDL  Arc_Dist   2 0  Arc distance in radians   IDL  Az   1 0  Azimuth in radians   IDL  Result   LL_ARC_DISTANCE Lon_lat0  Arc_Dist  Az    IDL  PRINT  Result         2 91415     0 622234     IDL  lon0    10  20  100    IDL  lat0    0   10  45    IDL  lon1    10  60  280    IDL  lat1    0  10  45    IDL  dist   map_npoints lon0  lat0  lon1  lat1  azimuth   azi   two_by_two    IDL  earthradius   6378206 4d0   IDL  res   ll_narcs_distances lon0  lat0  dist earthradius  azi   degrees    IDL  print  reform res 0            10 000000       60 000000       280 00000   IDL  print  reform res 1                1 1999280e 15       10 000000       45 000000      history         Based on the IDL function ll_arc_distance pro v 1 11 2003 02 03   Sebastien Masson  smasson lodyc jussieu fr                     August 2005      version  Id: ll_narcs_distances pro 163 2006 08 29 12:59:46Z navarro         FUNCTION ll_narcs_distances  lon0  lat0  arc_dist  az  DEGREES   degs     compile_opt idl2  strictarrsubs       IF n_elements lon0  NE n_elements lat0        OR n_elements lon0  NE n_elements arc_dist        OR n_elements lon0  NE n_elements az  THEN return   1    cdist   cos arc_dist        Arc_Dist is always in radians    sdist   sin arc_dist     if keyword_set degs  then s    dpi 180 0 else s   1 0d0    ll   lat0    s               To radians   sinll1   sin ll    cosll1   cos ll    azs   az    s   phi   asin sinll1   cdist   cosll1   sdist   cos azs    ll   lon0    s               To radians   lam   ll   atan sdist   sin azs                      cosll1   cdist   sinll1   sdist   cos azs     zero   where arc_dist eq 0  count    IF count NE 0 THEN BEGIN     lam zero    lon0 zero      phi zero    lat0 zero    ENDIF    if keyword_set degs  then return  transpose lam   phi    s     ELSE return  transpose lam   phi   end"); 
    66 a[64] = new Array("./Interpolation/map_npoints.html", "map_npoints.pro", "", "       file_comments   Return the distance in meter between all np0 points P0 and all   np1 points P1 on a sphere  If keyword  TWO_BY_TWO is given then   returns the distances between number n of P0 points and number   n of P1 points  in that case  np0 and np1 must be equal    Same as map_2points with the meter parameter but for n points   without do loop       categories Maps      param Lon0  in required     param Lat0  in required    np0 elements vector  longitudes and latitudes of np0 points P0      param Lon1  in required     param Lat1  in required    np1 elements vector  longitude and latitude of np1 points P1      keyword AZIMUTH   A named variable that will receive the azimuth of the great   circle connecting the two points  P0 to P1      keyword MIDDLE   to get the longitude latitude of the middle point between P0 and P1       keyword RADIANS   if set  inputs and angular outputs are in radians  otherwise degrees       keyword RADIUS  default 6378206 4d0    If given  return the distance between the two points calculated using the   given radius    Default value is the Earth radius       keyword TWO_BY_TWO   If given then Map_nPoints returns the distances between number n of   P0 points and number n of P1 points   In that case  np0 and np1 must be equal       returns   An  np0 np1  array giving the distance in meter between np0   points P0 and np1 points P1  Element  i j  of the output is the   distance between element P0 i  and P1 j    If keyword  TWO_BY_TWO is given then Map_nPoints returns   an np element vector giving the distance in meter between P0 i    and P1 i   in that case  we have np0   np1   np    if  MIDDLE see this keyword     examples   IDL  print      IDL  map_npoints 105 15 1 40 02 1 0 07 100 50 51 30 20 0    7551369 3 5600334 8   12864354  10921254    14919237  5455558 8     IDL  lon0    10  20  100    IDL  lat0    0   10  45    IDL  lon1    10  60  280    IDL  lat1    0  10  45    IDL  dist   map_npoints lon0  lat0  lon1  lat1  AZIMUTH   azi    IDL  help  dist  azi   DIST DOUBLE   Array 3  3    AZI DOUBLE   Array 3  3    IDL  print  dist 4 lindgen 3  azi 4 lindgen 3    2226414 0 4957944 5 10018863    90 000000 64 494450 4 9615627e 15   IDL  dist   map_npoints lon0  lat0  lon1  lat1  AZIMUTH   azi   TWO_BY_TWO    IDL  help  dist  azi   DIST DOUBLE   Array 3    AZI DOUBLE   Array 3    IDL  print  dist  azi   2226414 0 4957944 5 10018863    90 000000 64 494450 4 9615627e 15   IDL  print  map_2points lon0 0  lat0 0  lon1 0  lat1 0    20 000000 90 000000   IDL  print  map_npoints lon0 0  lat0 0  lon1 0  lat1 0  AZIMUTH azi 6378206 4d0    dtor  azi   20 000000   90 000000     IDL  lon0    10  20  100    IDL  lat0    0   10  45    IDL  lon1    10  60  280    IDL  lat1    0  10  45    IDL  mid   map_npoints lon0  lat0  lon1  lat1   MIDDLE   TWO_BY_TWO    IDL  print  reform mid 0  reform mid 1    0 0000000 40 000000 190 00000   0 0000000  1 5902773e 15 90 000000   IDL  print   map_2points lon0 0  lat0 0  lon1 0  lat1 0  npath   3  1    0 0000000 0 0000000   IDL  print   map_2points lon0 1  lat0 1  lon1 1  lat1 1  npath   3  1    40 000000  1 5902773e 15   IDL  print   map_2points lon0 2  lat0 2  lon1 2  lat1 2  npath   3  1    190 00000 90 000000      history   Based on the IDL function map_2points pro v 1 6 2001 01 15   Sebastien Masson  smasson lodyc jussieu fr    October 2003      version  Id: map_npoints pro 163 2006 08 29 12:59:46Z navarro       Function map_npoints  lon0  lat0  lon1  lat1  AZIMUTH   azimuth      RADIANS   radians  RADIUS   radius  MIDDLE   middle  TWO_BY_TWO   two_by_two   COMPILE_OPT idl2  strictarrsubs   IF  N_PARAMS  LT 4  THEN    MESSAGE   Incorrect number of arguments    np0   n_elements lon0   IF n_elements lat0  NE np0 THEN    MESSAGE   lon0 and lat0 must have the same number of elements   np1   n_elements lon1   IF n_elements lat1  NE np1 THEN    MESSAGE   lon1 and lat1 must have the same number of elements   if keyword_set two_by_two  AND np0 NE np1 then    MESSAGE   When using two_by_two keyword  P0 and P1 must have the same number of elements    mx   MAX ABS lat0  lat1   pi2    dpi 2  IF  mx GT  KEYWORD_SET radians    pi2 : 90  THEN    MESSAGE   Value of Latitude is out of allowed range    k   KEYWORD_SET radians    1 0d0 :  dpi 180 0  Earth equatorial radius  meters  Clarke 1866 ellipsoid  r_sphere   n_elements RADIUS  NE 0   RADIUS : 6378206 4d0    coslt1   cos k lat1   sinlt1   sin k lat1   coslt0   cos k lat0   sinlt0   sin k lat0     IF np0 EQ np1 AND np1 EQ 1 THEN two_by_two   1    if NOT keyword_set two_by_two  THEN BEGIN  coslt1   replicate 1 0d0  np0 temporary coslt1   sinlt1   replicate 1 0d0  np0 temporary sinlt1   coslt0   temporary coslt0 replicate 1 0d0  np1   sinlt0   temporary sinlt0 replicate 1 0d0  np1   ENDIF    if keyword_set two_by_two  THEN BEGIN  cosl0l1   cos k lon1 lon0   sinl0l1   sin k lon1 lon0   ENDIF ELSE BEGIN  cosl0l1   cos k replicate 1 0d0  np0 lon1 lon0 replicate 1 0d0  np1   sinl0l1   sin k replicate 1 0d0  np0 lon1 lon0 replicate 1 0d0  np1   ENDELSE   cosc   sinlt0   sinlt1   coslt0   coslt1   cosl0l1  Cos of angle between pnts   Avoid roundoff problems by clamping cosine range to  1 1   cosc    1 0d0   cosc   1 0d0    if arg_present azimuth  OR keyword_set middle  then begin  sinc   sqrt 1 0d0   cosc cosc   bad   where abs sinc  le 1 0e 7   IF bad 0  NE  1 THEN sinc bad    1  cosaz    coslt0   sinlt1   sinlt0 coslt1 cosl0l1    sinc  sinaz   sinl0l1 coslt1 sinc  IF bad 0  NE  1 THEN BEGIN  sinc bad    0 0d0  sinaz bad    0 0d0  cosaz bad    1 0d0  ENDIF  ENDIF    IF keyword_set middle  then BEGIN   s0   0 5d0   acos cosc      coss   cos s0   sins   sin s0     lats   asin sinlt0   coss   coslt0   sins   cosaz    k  lons   atan sins   sinaz  coslt0   coss   sinlt0   sins   cosaz    k    if keyword_set two_by_two  THEN BEGIN  return  transpose lon0    lons   lats   ENDIF ELSE BEGIN  return     lon0 replicate 1 0d0  np1    lons   lats     ENDELSE    ENDIF    if arg_present azimuth  then begin  azimuth   atan sinaz  cosaz   IF k NE 1 0d0 THEN azimuth   temporary azimuth    k  ENDIF  return  acos cosc    r_sphere   end"); 
    67 a[65] = new Array("./Interpolation/neighbor.html", "neighbor.pro", "", "       file_comments   find the closetest point of  P0  within a list of np1 points   P1 Which can be on a sphere      categories Maps      param p0lon  in required    scalar  longitudes of point P0       param p0lat  in required    scalar  latitudes of point P0       param neighlon  in optional       param neighlat  in optional       keyword RADIANS   if set  inputs and angular outputs are in radians  otherwise degrees       keyword DISTANCE   dis  to get back the distances between P0 and the np1 points P1 in the   variable dis       keyword SPHERE to activate if points are located on a sphere       returns   index giving the P1 index  point that is the closest point of  P0       examples   IDL  print  neighbor 105 15 40 02 0 07 100 50 51 30 20 0      IDL  distance dis                     0   IDL  print  dis               105 684      206 125      160 228      history   Sebastien Masson  smasson lodyc jussieu fr                     October 2003      version  Id: neighbor pro 136 2006 07 10 15:20:19Z pinsard       FUNCTION neighbor  p0lon  p0lat  neighlon  neighlat  sphere   sphere  distance   distance  radians   radians     compile_opt idl2  strictarrsubs     somme checks   IF  n_elements p0lon  NE 1 THEN MESSAGE   Sorry p0lon must be a scalar    p0lon   p0lon 0    IF  n_elements p0lat  NE 1 THEN MESSAGE   Sorry p0lat must be a scalar    p0lat   p0lat 0    nneig   n_elements neighlon    IF  n_elements neighlat  NE nneig  THEN       MESSAGE   neighlon and neighlat must have the same number of elements    distance between P0 and the others points   IF keyword_set sphere  THEN BEGIN     IF sphere NE 1 THEN radius   sphere     distance   Map_nPoints p0lon  p0lat  neighlon  neighlat                            radius   radius  radians   radians    ENDIF ELSE BEGIN     distance    neighlon p0lon 2 neighlat p0lat 2     IF arg_present distance  THEN distance   sqrt distance    ENDELSE   RETURN  where distance EQ min distance  END"); 
    68 a[66] = new Array("./Interpolation/quadrilateral2square.html", "quadrilateral2square.pro", "", "       file_comments   warm  or map  an arbitrary quadrilateral onto a unit square   according to the 4 point correspondences:          x0 y0     0 0           x1 y1     1 0           x2 y2     1 1           x3 y3     0 1    This is the inverse function of square2quadrilateral pro   The mapping is done using perspective transformation which preserve   lines in all orientations and permit quadrilateral to quadrilateral   mappings  see ref  bellow       categories    Picture  Grid      param x0in  in required     param y0in  in required     param x1in  in required     param y1in  in required     param x2in  in required     param y2in  in required     param x3in  in required     param y3in   in required    the coordinates of the quadrilateral    see above for correspondence with the unit square  Can be   scalar or array   x0 y0   x1 y1   x2 y2  and  x3 y3  are   given in the anticlockwise order       param xxin  in required    the coordinates of the point s  for which we want to do the mapping    Can be scalar or array       param yyin  in required    the coordinates of the point s  for which we want to do the mapping    Can be scalar or array       keyword PERF      returns      2 n  array: the new coordinates  xout  yout  of the  xin yin  point s  after   mapping    If xin is a scalar  then n is equal to the number of elements of x0    If xin is an array   then n is equal to the number of elements of xin       restrictions   I think degenerated quadrilateral  e g  flat of twisted  is not work    This has to be tested       examples     IDL  splot 0 5 0 3 nodata xstyle 1 ystyle 1   IDL  tracegrille  findgen 11 1  findgen 11 1 color indgen 12 20   IDL  xin    findgen 11 1 replicate 1  11    IDL  yin   replicate 1  11 findgen 11 1    IDL  out   square2quadrilateral 2 1 3 0 5 1 2 3  xin  yin    IDL  tracegrille  reform out 0 11 11  reform out 1 11 11 color indgen 12 20     IDL  inorg quadrilateral2square 2 1 3 0 5 1 2 3 out 0 out 1    IDL  tracegrille  reform inorg 0 11 11  reform inorg 1 11 11 color indgen 12 20      history        Sebastien Masson  smasson lodyc jussieu fr         August 2003        Based on  Digital Image Warping  by G  Wolberg        IEEE Computer Society Press  Los Alamitos  California        Chapter 3  see p 52 56        version  Id: quadrilateral2square pro 163 2006 08 29 12:59:46Z navarro             FUNCTION quadrilateral2square  x0in  y0in  x1in  y1in  x2in  y2in  x3in  y3in  xxin  yyin  PERF   perf       compile_opt idl2  strictarrsubs   tempsone   systime 1      Warning  wrong definition of  x2 y2  and  x3 y3  at the bottom of   page 54 of Wolberg s book  see figure 3 7 page 56 for the good   definition      IF keyword_set double  THEN BEGIN     x0   double x0in      x1   double x1in      x2   double x2in      x3   double x3in      y0   double y0in      y1   double y1in      y2   double y2in      y3   double y3in      xin   double xxin      yin   double yyin    ENDIF ELSE BEGIN     x0   float x0in      x1   float x1in      x2   float x2in      x3   float x3in      y0   float y0in      y1   float y1in      y2   float y2in      y3   float y3in      xin   float xxin      yin   float yyin    ENDELSE     get the matrix A     a   square2quadrilateral x0in  y0in  x1in  y1in  x2in  y2in  x3in  y3in      compute the adjoint matrix     IF keyword_set double  THEN adj   dblarr 9  n_elements x0      ELSE adj   fltarr 9  n_elements x0      adj 0      a 4            a 7   a 5      adj 1      a 7   a 2   a 1      adj 2      a 1   a 5   a 4   a 2      adj 3      a 6   a 5   a 3      adj 4      a 0            a 6   a 2      adj 5      a 3   a 2   a 0   a 5      adj 6      a 3   a 7   a 6   a 4      adj 7      a 6   a 1   a 0   a 7      adj 8      a 0   a 4   a 3   a 1        IF n_elements xin  EQ 1 THEN BEGIN     xin   replicate xin  n_elements x0      yin   replicate yin  n_elements x0    ENDIF     compute xprime  yprime and wprime     IF n_elements x0  EQ 1 THEN BEGIN     wpr   1 adj 6 xin   adj 7 yin   adj 8    ENDIF ELSE BEGIN     wpr   1 adj 6   xin   adj 7   yin   adj 8      ENDELSE   xpr   xin wpr   ypr   yin wpr     IF keyword_set double  THEN res   dblarr 2  n_elements xin      ELSE res   fltarr 2  n_elements xin      IF n_elements x0  EQ 1 THEN BEGIN     res 0      xpr adj 0    ypr adj 1   wpr adj 2      res 1      xpr adj 3    ypr adj 4   wpr adj 5    ENDIF ELSE BEGIN     res 0      xpr adj 0      ypr adj 1     wpr adj 2        res 1      xpr adj 3      ypr adj 4     wpr adj 5      ENDELSE     IF keyword_set perf  THEN print   time quadrilateral2square  systime 1 tempsone    RETURN  res END"); 
    69 a[67] = new Array("./Interpolation/spl_fstdrv.html", "spl_fstdrv.pro", "", "             file_comments   SPL_FSTDRV returns the values of the first derivative of   the interpolating function at the points X2i  It is a double   precision array      Given the arrays X and Y  which tabulate a function  with the X i    AND Y i  in ascending order  and given an input value X2  the   SPL_INCR function returns an interpolated value for the given values   of X2  The interpolation method is based on cubic spline  corrected   in a way that interpolated value are also in ascending order      examples   IDL  y2    spl_fstdrv x  y  yscd  x2       param x  in required    An n element  at least 2  input vector that specifies the   tabulate points in ascending order       param y  in required    f x    y  An n element input vector that specifies the values   of the tabulated function F Xi  corresponding to Xi       param yscd  in required    The output from SPL_INIT for the specified X and Y       param x2  in required    The input values for which the first derivative values are desired    X can be scalar or an array of values       returns      y2: f x2    y2       history    Sebastien Masson  smasson lodyc jussieu fr : May 2005      version  Id: spl_fstdrv pro 186 2006 09 20 10:50:37Z pinsard             FUNCTION spl_fstdrv  x  y  yscd  x2     compute the first derivative of the spline function     compile_opt idl2  strictarrsubs     nx   n_elements x    ny   n_elements y    x must have at least 2 elements   IF nx LT 2 THEN stop   y must have the same number of elements than x   IF nx NE ny THEN stop   define loc in a way that    if loc i  eq  1   :                 x2 i    x nx 1     else              :    x loc i   extrapolation   use x nx 2  and x nx 1  even if x2 i    x nx 1    extrapolation   loc   0   temporary loc     nx 2    distance between to consecutive x   deltax   x loc 1 x loc    distance between to consecutive y   deltay   y loc 1 y loc    relative distance between x2 i  and x loc i 1    a    x loc 1 x2 deltax   relative distance between x2 i  and x loc i    b   1 0d   a   compute the first derivative on x  see numerical recipes Chap 3 3    yfrst   temporary deltay deltax         1 0d 6 0d    3 0d a a   1 0d    deltax   yscd loc          1 0d 6 0d    3 0d b b   1 0d    deltax   yscd loc 1    beware of the computation precision    force near zero values to be exactly 0 0   zero   where abs yfrst  LT 1 e 10    IF zero 0  NE  1 THEN yfrst zero    0 0d    RETURN  yfrst END "); 
    70 a[68] = new Array("./Interpolation/spl_incr.html", "spl_incr.pro", "", "             file_comments     Given the arrays X and Y  which tabulate a function  with the X i    AND Y i  in ascending order  and given an input value X2  the   SPL_INCR function returns an interpolated value for the given values   of X2  The interpolation method is based on cubic spline  corrected   in a way that interpolated values are also monotonically increasing       param x1  in required    An n element  at least 2  input vector that specifies the tabulate points in   a strict ascending order       param y1  in required    f x    y  An n element input vector that specifies the values   of the tabulated function F Xi  corresponding to Xi  As f is   supposed to be monotonically increasing  y values must be   monotonically increasing  y can have equal consecutive values       param x2  in required    The input values for which the interpolated values are   desired  Its values must be strictly monotonically increasing       param der2      param x      returns        y2: f x2    y2  Double precision array      restrictions   It might be possible that y2 i 1 y2 i  has very small negative   values  amplitude smaller than 1 e 6       examples     IDL  n   100L   IDL  x    dindgen n 2   IDL  y   abs randomn 0  n    IDL  y n 2:n 2 1    0    IDL  y n n 3    0    IDL  y n n 6:n n 6 5    0    IDL  y   total y   cumulative   double    IDL  x2   dindgen n 1 2    IDL  n2   n_elements x2    IDL  print  min y 1:n 1 y 0:n 2  LT 0   IDL  y2   spl_incr  x  y  x2    IDL  splot  x  y  xstyle   1  ystyle   1  ysurx 25  petit    1  2  1   land   IDL  oplot  x2  y2  color   100   IDL  c   y2 1:n2 1    y2 0:n2 2    IDL  print  min c  LT 0   IDL  print  min c  max   ma  ma   IDL  splot c xstyle 1 ystyle 1  yrange 01 05  ysurx 25  petit    1  2  2   noerase   IDL  oplot 0  n_elements c   0  0  linestyle   1      history    Sebastien Masson  smasson lodyc jussieu fr : May Dec 2005      version  Id: spl_incr pro 163 2006 08 29 12:59:46Z navarro             FUNCTION pure_concave  x1  x2  y1  y2  der2  x   X n type     compile_opt idl2  strictarrsubs     xx    double x double x1 double x2 double x1    f    double x2 double x1 double y2 double y1    n   der2 temporary f    res   xx n      IF check_math  GT 0 THEN BEGIN         zero   where abs res  LT 1 e 10          IF zero 0  NE  1 THEN res zero    0 0d     END   res   temporary res double y2 double y1 y1      IF array_equal sort res  lindgen n_elements res    NE 1 THEN stop   RETURN  res END       param x1  in required    An n element  at least 2  input vector that specifies the tabulate points in   a strict ascending order       param y1  in required    f x    y  An n element input vector that specifies the values      of the tabulated function F Xi  corresponding to Xi  As f is      supposed to be monotonically increasing  y values must be      monotonically increasing  y can have equal consecutive values       param x2  in required    The input values for which the interpolated values are   desired  Its values must be strictly monotonically increasing       param der2    param x     FUNCTION pure_convex  x1  x2  y1  y2  der2  x   1 1 X n type     compile_opt idl2  strictarrsubs     xx   1 0d    double x double x1 double x2 double x1    f    double x2 double x1 double y2 double y1    n   der2 temporary f    res   xx n      IF check_math  GT 0 THEN BEGIN         zero   where abs res  LT 1 e 10          IF zero 0  NE  1 THEN res zero    0 0d     END   res   1 0d   temporary res    res   temporary res y2 y1 y1      IF array_equal sort res  lindgen n_elements res    NE 1 THEN stop   RETURN  res END       param x    param y    param x2    keyword YP0 The first derivative of the interpolating function at the      point X0  If YP0 is omitted  the second derivative at the      boundary is set to zero  resulting in a  natural spline     keyword YPN_1 The first derivative of the interpolating function at the      point Xn 1  If YPN_1 is omitted  the second derivative at the      boundary is set to zero  resulting in a  natural spline    FUNCTION spl_incr  x  y  x2  YP0   yp0  YPN_1   ypn_1     compile_opt idl2  strictarrsubs       check and initialization         nx   n_elements x    ny   n_elements y    nx2   n_elements x2    x must have at least 2 elements   IF nx LT 2 THEN stop   y must have the same number of elements than x   IF nx NE ny THEN stop   x be monotonically increasing   IF min x 1:nx 1 x 0:nx 2  LE 0 THEN stop   x2 be monotonically increasing   IF N_ELEMENTS X2  GE 2 THEN     IF min x2 1:nx2 1 x2 0:nx2 2   LE 0 THEN stop   y be monotonically increasing   IF min y 1:ny 1 y 0:ny 2  LT 0 THEN stop     first check: check if two consecutive values are equal     bad   where y 1:ny 1 y 0:ny 2  EQ 0  cntbad    IF cntbad NE 0 THEN BEGIN   define the results: y2       y2   dblarr nx2    define xinx2: see help of value_locate    if xinx2 i  eq  1   :                 x bad i    x2 nx2 1     else                : x2 xinx2 i    x2 nx2 1     else                : x2 xinx2 i   we have middle pieces for which   we force yp0   0 0d and ypn_1   0 0d       IF cntbad GT 1 THEN BEGIN   we take care of the piece located wetween bad ib 1  and bad ib          FOR ib   1  cntbad 1 DO BEGIN   if there is x2 values smaller that x bad ib  then the x2 values   located between bad ib 1  and bad ib  are  xinx2 ib 1 1:xinx2 ib            IF xinx2 ib  NE  1 THEN begin             y2 xinx2 ib 1 1   0                y i 1    y i      2  y  reach its minimum value between  x i  and x i 1           0  y i 1    0   y i      we do a first selection by looking for those points      loc   lindgen nx 1    maybebad   where yscd loc  LE 0 0d AND yscd loc 1  GE 0 0d  cntbad      IF cntbad NE 0 THEN BEGIN      mbbloc   loc maybebad       aaa    yscd mbbloc 1 yscd mbbloc 6 0d x mbbloc 1 x mbbloc      bbb   0 5d   yscd mbbloc      ccc   yifrst mbbloc      ddd   y mbbloc      definitive selection:   y  can become negative if and only if  2b 2   4 3a c   0   y  can become negative if and only if    b 2     3a c   0       delta   bbb bbb   3 0d aaa ccc       bad   where delta GT 0  cntbad        IF cntbad NE 0 THEN BEGIN       delta   delta bad        aaa   aaa bad        bbb   bbb bad        ccc   ccc bad        ddd   ddd bad        bad   maybebad bad    define xinx2_1: see help of value_locate    if xinx2_1 i  eq  1   :                   x bad i    x2 nx2 1     else                  : x2 xinx2_1 i    x2 nx2 1     else                  : x2 xinx2_2 i   y bad ib 1  then we cannot applay the method we want to   apply   we use then convex concave case by changing by hand the   value of yinfl and xinfl                   IF yzero GT y bad ib 1  THEN BEGIN                     yinfl   0 5d y bad ib 1 y bad ib                      xinfl   0 5d x bad ib 1 x bad ib                      GOTO  convexconcave                   ENDIF   define xinx2_3: see help of value_locate    if xinx2_3 ib  eq  1   :                x bad ib xzero   x2 nx2 1     else                   : x2 xinx2_3   we use then convex concave case by changing by hand the   value of yinfl and xinfl                   IF yzero lt y bad ib  THEN BEGIN                     yinfl   0 5d y bad ib 1 y bad ib                      xinfl   0 5d x bad ib 1 x bad ib                      GOTO  convexconcave                   ENDIF   define xinx2_3: see help of value_locate    if xinx2_3 ib  eq  1   :                x bad ib xzero   x2 nx2 1     else                   : x2 xinx2_3    x2 nx2 1     else                   : x2 xinx2_3    x bad ib xzero    x2 xinx3_2 1                    xinx2_3   value_locate x2  x bad ib xinfl                     IF xinx2_3 ge xinx2_1 ib 1 THEN BEGIN                     y2 xinx2_1 ib 1:xinx2_3                            pure_convex x bad ib  x bad ib xinfl                                          y bad ib  yinfl                                          yifrst bad ib                                          x2 xinx2_1 ib 1:xinx2_3                     ENDIF                   IF xinx2_2 ib  GE xinx2_3 1 THEN BEGIN                     y2 xinx2_3 1:xinx2_2 ib                            pure_concave x bad ib xinfl  x bad ib 1                                           yinfl  y bad ib 1                                           yifrst bad ib 1                                           x2 xinx2_3 1:xinx2_2 ib                    ENDIF                 END               ENDCASE              END           ENDCASE         ENDIF       ENDFOR      ENDIF   ENDIF     RETURN  y2         END"); 
    71 a[69] = new Array("./Interpolation/spl_keep_mean.html", "spl_keep_mean.pro", "", "           file_comments     Given the arrays X and Y  which tabulate a function  with the X i    AND Y i  in ascending order  and given an input value X2  the   SPL_INCR function returns an interpolated value for the given values   of X2  The interpolation method is based on cubic spline  corrected   in a way that integral of the interpolated values is the same as the   integral of the input values    for exemple to build daily data   from monthly mean and keep the monthly mean of the computed daily   data equa to the original values       param x  in required    An n element  at least 2  input vector that specifies the tabulate points in   a strict ascending order       param yin  in required type array    an array with one element less than x  y i  represents the   mean value between x i  and x i 1  if  GE0 is activated  y must   have positive values       param x2  in required    The input values for which the interpolated values are desired    Its values must be strictly monotonically increasing       keyword GE0   to force that y2 is always GE than 0  In that case  y must also be GE than 0       keyword YP0   The first derivative of the interpolating function at the   point X0  If YP0 is omitted  the second derivative at the   boundary is set to zero  resulting in a  natural spline       keyword YPN_1   The first derivative of the interpolating function at the   point Xn 1  If YPN_1 is omitted  the second derivative at the   boundary is set to zero  resulting in a  natural spline       returns   y2: the mean value between two consecutive values of x2  This   array has one element less than y2  y2 has double precision       restrictions   It might be possible that y2 has very small negative values    amplitude smaller than 1 e 6       examples        12 monthly values of precipitations into daily values:     IDL  yr1   1990   IDL  yr2   1992   IDL  nyr   yr2 yr1 1   IDL  n1   12 nyr 1   IDL  x   julday 1 findgen n1  replicate 1  n1      IDL           replicate yr1  n1  fltarr n1    IDL  n2   365 nyr   total leapyr yr1 indgen nyr    1   IDL  x2   julday replicate 1  n2  1 findgen n2      IDL               replicate yr1  n2  fltarr n2    IDL  y   abs randomn 0  n1 1    IDL  y2   spl_keep_mean x  y  x2   ge0     IDL  print  min x  max   ma  ma   IDL  print  min x2  max   ma  ma   IDL  print  vairdate min x  max   ma  ma    IDL  print  total y x 1:n1 1 x 0:n1 2    IDL  print  total y2 x2 1:n2 1 x2 0:n2 2       history    Sebastien Masson  smasson lodyc jussieu fr : May 2005      version  Id: spl_keep_mean pro 163 2006 08 29 12:59:46Z navarro             FUNCTION spl_keep_mean  x  yin  x2  YP0   yp0  YPN_1   ypn_1  GE0   ge0     compile_opt idl2  strictarrsubs       check and initialization         nx   n_elements x    ny   n_elements yin    nx2   n_elements x2    x must have at least 2 elements   IF nx LT 2 THEN stop   x2 must have at least 2 elements   IF nx2 LT 2 THEN stop   x be monotonically increasing   IF min x 1:nx 1 x 0:nx 2  LE 0 THEN stop   x2 be monotonically increasing   IF min x2 1:nx2 1 x2 0:nx2 2   LE 0 THEN stop       compute the integral of y     if spl_keep_mean is called by the user  and not by itself  we must compute   the integral of y  yin must have one element less than x   IF nx NE ny 1 THEN stop   y   double yin double x 1:nx 1 x 0:nx 2    y    0 0d  temporary y    y   total temporary y   cumulative   double        compute the  spline  interpolation       IF keyword_set ge0  THEN BEGIN   if the want that the interpolated values are always   0  we must   have yin   0 0d     IF min yin  LT 0 THEN stop   call spl_incr     y2   spl_incr x  temporary y  x2  yp0   yp0  ypn_1   ypn_1    ENDIF ELSE BEGIN     yscd   spl_init x  y  yp0   yp0  ypn_1   ypn_1   double      y2   spl_interp x  y  temporary yscd  x2   double    ENDELSE                        Compute the derivative of y       yfrst    y2 1:nx2 1 y2 0:nx2 2 x2 1:nx2 1 x2 0:nx2 2    it can happen that we have very small negative values  1 e 6 for ex     yfrst   0 0d   temporary yfrst    RETURN  yfrst         END"); 
    72 a[70] = new Array("./Interpolation/square2quadrilateral.html", "square2quadrilateral.pro", "", "       file_comments   warm  or map  a unit square onto an arbitrary quadrilateral   according to the 4 point correspondences:          0 0     x0 y0           1 0     x1 y1           1 1     x2 y2           0 1     x3 y3    The mapping is done using perspective transformation which preserve   lines in all orientations and permit quadrilateral to quadrilateral   mappings  see ref  bellow       categories    Picture  Grid      param x0in  in required     param y0in  in required     param x1in  in required     param y1in  in required     param x2in  in required     param y2in  in required     param x3in  in required     param y3in  in required    the coordinates of the quadrilateral  see above for correspondence with the   unit square    Can be scalar or array     x0 y0   x1 y1   x2 y2  and  x3 y3  are given in the anticlockwise order         param xxin  in optional     param yyin  in optional    the coordinates of the point s  for which we want to do the mapping       returns    2 n  array: the new coordinates  xout  yout  of the  xin yin    point s  after mapping    If xin is a scalar  then n is equal to the number of elements of   x0  If xin is an array   then n is equal to the number of   elements of xin    If xin and yin are omited  square2quadrilateral returns the   matrix A which is used for the inverse transformation       restrictions   I think degenerated quadrilateral  e g  flat of twisted  is not work    This has to be tested       examples     IDL  splot 0 5 0 3 nodata xstyle 1 ystyle 1   IDL  tracegrille  findgen 11 1  findgen 11 1 color indgen 12 20   IDL  xin    findgen 11 1 replicate 1  11    IDL  yin   replicate 1  11 findgen 11 1    IDL  out   square2quadrilateral 2 1 3 0 5 1 2 3  xin  yin    IDL  tracegrille  reform out 0 11 11  reform out 1 11 11 color indgen 12 20      history        Sebastien Masson  smasson lodyc jussieu fr         August 2003        Based on  Digital Image Warping  by G  Wolberg        IEEE Computer Society Press  Los Alamitos  California        Chapter 3  see p 52 56        version  Id: square2quadrilateral pro 163 2006 08 29 12:59:46Z navarro             FUNCTION square2quadrilateral  x0in  y0in  x1in  y1in  x2in  y2in  x3in  y3in  xxin  yyin     Warning  wrong definition of  x2 y2  and  x3 y3  at the bottom of   page 54 of Wolberg s book  see figure 3 7 page 56 for the good   definition        compile_opt idl2  strictarrsubs     IF keyword_set double  THEN BEGIN     x0   double x0in      x1   double x1in      x2   double x2in      x3   double x3in      y0   double y0in      y1   double y1in      y2   double y2in      y3   double y3in      IF arg_present xxin  THEN BEGIN       xin   double xxin        yin   double yyin      ENDIF   ENDIF ELSE BEGIN     x0   float x0in      x1   float x1in      x2   float x2in      x3   float x3in      y0   float y0in      y1   float y1in      y2   float y2in      y3   float y3in      IF arg_present xxin  THEN BEGIN       xin   float xxin        yin   float yyin      ENDIF   ENDELSE     IF keyword_set double  THEN a   dblarr 8  n_elements x0      ELSE a   fltarr 8  n_elements x0      delx3   x0 x1 x2 x3   dely3   y0 y1 y2 y3     affinemap   where delx3 EQ 0 AND dely3 EQ 0    IF affinemap 0  NE  1 THEN BEGIN     xx0   x0 affinemap      xx1   x1 affinemap      xx2   x2 affinemap      yy0   y0 affinemap      yy1   y1 affinemap      yy2   y2 affinemap        a 0  affinemap    xx1 xx0     a 1  affinemap    xx2 xx1     a 2  affinemap    xx0     a 3  affinemap    yy1 yy0     a 4  affinemap    yy2 yy1     a 5  affinemap    yy0     a 6  affinemap    0     a 7  affinemap    0   ENDIF     projectivemap   where delx3 NE 0 OR dely3 NE 0    IF projectivemap 0  NE  1 THEN BEGIN     xx0   x0 projectivemap      xx1   x1 projectivemap      xx2   x2 projectivemap      xx3   x3 projectivemap      yy0   y0 projectivemap      yy1   y1 projectivemap      yy2   y2 projectivemap      yy3   y3 projectivemap        delx1   xx1 xx2     dely1   yy1 yy2     delx2   xx3 xx2     dely2   yy3 yy2     delx3   delx3 projectivemap      dely3   dely3 projectivemap        div   delx1 dely2 dely1 delx2     zero   where div EQ 0      IF zero 0  NE  1 THEN BEGIN       stop     ENDIF     a13    delx3 dely2 dely3 delx2 div     a23    delx1 dely3 dely1 delx3 div       a 0  projectivemap    xx1 xx0 a13 xx1     a 1  projectivemap    xx3 xx0 a23 xx3     a 2  projectivemap    xx0     a 3  projectivemap    yy1 yy0 a13 yy1     a 4  projectivemap    yy3 yy0 a23 yy3     a 5  projectivemap    yy0     a 6  projectivemap    a13     a 7  projectivemap    a23   ENDIF     IF NOT arg_present xxin  THEN return  a     IF n_elements xin  EQ 1 THEN BEGIN     xin   replicate xin  n_elements x0      yin   replicate yin  n_elements x0    ENDIF     IF keyword_set double  THEN res   dblarr 2  n_elements xin      ELSE res   fltarr 2  n_elements xin    IF n_elements x0  EQ 1 THEN BEGIN     div   a 6 xin    a 7 yin    1     zero   where div EQ 0      IF zero 0  NE  1 THEN BEGIN       stop     ENDIF     res 0       a 0 xin    a 1 yin    a 2 div     res 1       a 3 xin    a 4 yin    a 5 div   ENDIF ELSE BEGIN     div   a 6   xin  a 7   yin   1     zero   where div EQ 0      IF zero 0  NE  1 THEN BEGIN       stop     ENDIF     res 0       a 0   xin    a 1   yin    a 2   div     res 1       a 3   xin    a 4   yin    a 5   div   ENDELSE     RETURN  res END"); 
    73 a[71] = new Array("./Matrix/cmapply.html", "cmapply.pro", "", "     file_comments   Utility function  adapted from CMPRODUCT      param X        version  Id: cmapply pro 163 2006 08 29 12:59:46Z navarro        todo seb     function cmapply_product  x     compile_opt idl2  strictarrsubs     sz   size x    n   sz 1     while n GT 1 do begin       if  n mod 2  EQ 1 then x 0    x 0    x n 1        n2   floor n 2        x   x 0:n2 1    x n2:        n   n2   endwhile   return  reform x 0   overwrite  end       file_comments   cmapply_redim : Utility function  used to collect collaped dimensions      param newarr        param dimapply        param dimkeep        param nkeep        param totcol        param totkeep        todo seb     pro cmapply_redim  newarr  dimapply  dimkeep  nkeep  totcol  totkeep     compile_opt idl2  strictarrsubs     sz   size newarr      First task: rearrange dimensions so that the dimensions     that are  kept   ie  uncollapsed  are at the back   dimkeep   where histogram dimapply min 1 max sz 0  ne 1  nkeep    if nkeep EQ 0 then return    newarr   transpose temporary newarr   dimapply 1  dimkeep      totcol is the total number of collapsed elements   totcol   sz dimapply 0    for i   1  n_elements dimapply 1 do totcol   totcol   sz dimapply i    totkeep   sz dimkeep 0 1    for i   1  n_elements dimkeep 1 do totkeep   totkeep   sz dimkeep i 1       this new array has two dimensions:         the first  all elements that will be collapsed         the second  all dimensions that will be preserved      the ordering is so that all elements to be collapsed are      adjacent in memory    newarr   reform newarr   totcol  totkeep   overwrite  end    Main function        file_comments   Applies a function to specified dimensions of an array     Description:     CMAPPLY will apply one of a few select functions to specified   dimensions of an array   Unlike some IDL functions  you  do  have   a choice of which dimensions that are to be  collapsed  by this   function   Iterative loops are avoided where possible  for   performance reasons        The possible functions are:              and number of loop iterations:                Performs a sum  as in TOTAL        number of collapsed dimensions       AND     Finds LOGICAL  AND   not bitwise   same       OR      Finds LOGICAL  OR    not bitwise   same               Performs a product                 LOG_2 no  of collapsed elts          MIN     Finds the minimum value            smaller of no  of collapsed       MAX     Finds the maximum value            or output elements         USER    Applies user defined function      no  of output elements         It is possible to perform user defined operations arrays using     CMAPPLY   The OP parameter is set to  USER:FUNCTNAME  where     FUNCTNAME is the name of a user defined function   The user     defined function should be defined such that it accepts a single     parameter  a vector  and returns a single scalar value   Here is a     prototype for the function definition:          FUNCTION FUNCTNAME  x  KEYWORD1 key1              scalar     function of x or keywords             RETURN  scalar        END       The function may accept keywords   Keyword values are passed in to     CMAPPLY through the FUNCTARGS keywords parameter  and passed to     the user function via the _EXTRA mechanism   Thus  while the     definition of the user function is highly constrained in the     number of positional parameters  there is absolute freedom in     passing keyword parameters        It s worth noting however  that the implementation of user defined     functions is not particularly optimized for speed   Users are     encouraged to implement their own array if the number of output     elements is large       categories    Array      param OP  in required type string    The operation to perform  as a string   May be upper or lower case      If a user defined operation is to be passed  then OP is of   the form   USER:FUNCTNAME  where FUNCTNAME is the name of   the user defined function       param ARRAY  in required type array     An array of values to be operated on    Must not be of type STRING  7  or STRUCTURE  8       param dimapply  in optional default 1  ie  first dimension type array    An array of dimensions that are to be  collapsed  where   the the first dimension starts with 1  ie  same convention   as IDL function TOTAL   Whereas TOTAL only allows one   dimension to be added  you can specify multiple dimensions   to CMAPPLY   Order does not matter  since all operations   are associative and transitive   NOTE: the dimensions refer   to the  input  array  not the output array   IDL allows a   maximum of 8 dimensions       keyword DOUBLE  default not set    Set this if you wish the internal computations to be done   in double precision if necessary   If ARRAY is double   precision  real or complex  then DOUBLE 1 is implied       keyword TYPE  default same as input type    Set this to the IDL code of the desired output type  refer   to documentation of SIZE   Internal results will be   rounded to the nearest integer if the output type is an   integer type       keyword FUNCTARGS   If OP is  USER:  then the contents of this keyword   are passed to the user function using the _EXTRA   mechanism   This way you can pass additional data to   your user supplied function  via keywords  without   using common blocks    DEFAULT: undefined  i e  no keywords passed by _EXTRA       returns   An array of the required TYPE  whose elements are the result of   the requested operation   Depending on the operation and number of   elements in the input array  the result may be vulnerable to   overflow or underflow       examples       First example:  Shows how CMAPPLY can be used to total the second dimension of the     array called IN   This is equivalent to OUT   TOTAL IN  2        IDL  IN    INDGEN 5 5      IDL  OUT   CMAPPLY  IN   2      IDL  HELP  OUT     OUT             INT         Array 5        Second example:  Input is assumed to be an 5x100 array of 1 s and     0 s indicating the status of 5 detectors at 100 points in time      The desired output is an array of 100 values  indicating whether     all 5 detectors are on  1  at one time   Use the logical AND     operation        IDL  IN   detector_status               5x100 array     IDL  OUT   CMAPPLY AND  IN   1       collapses 1st dimension     IDL  HELP  OUT     OUT             BYTE        Array 100         note that MIN could also have been used in this particular case      although there would have been more loop iterations        Third example:  Shows sum over first and third dimensions in an     array with dimensions 4x4x4:       IDL  IN   INDGEN 4 4 4      IDL  OUT   CMAPPLY  IN   1 3      IDL  PRINT  OUT          408     472     536     600       Fourth example:  A user function  MEDIAN  is used:       IDL  IN   RANDOMN SEED 10 10 5      IDL  OUT   CMAPPLY USER:MEDIAN  IN  3      IDL  HELP  OUT     OUT             FLOAT       Array 10  10         OUT i j  is the median value of IN i j       history Mar 1998  Written  CM     Changed usage message to not bomb  24 Mar 2000  CM     Significant rewrite for   MIN and MAX  inspired by Todd Clements         FOR loop indices are now type       LONG  copying terms are liberalized  CM  22  Aug 2000     More efficient MAX MIN  inspired by Alex Schuster  CM  25 Jan       2002     Make new MAX MIN actually work with 3d arrays  CM  08 Feb 2002     Add user defined functions  ON_ERROR  CM  09 Feb 2002     Correct bug in MAX MIN initialization of RESULT  CM  05 Dec 2002      Author: Craig B  Markwardt  NASA GSFC Code 662  Greenbelt  MD 20770    craigm lheamail gsfc nasa gov      version  Id: cmapply pro 163 2006 08 29 12:59:46Z navarro       function cmapply  op  array  dimapply  double dbl  type type                      functargs functargs  nocatch nocatch     compile_opt idl2  strictarrsubs      if n_params  LT 2 then begin       message   USAGE: XX   CMAPPLY OP ARRAY 2   info       message          where OP is     AND  OR  MIN  MAX   info       return   1L   endif   if NOT keyword_set nocatch  then       on_error  2     else       on_error  0      Parameter checking     1  the dimensions of the array   sz   size array    if sz 0  EQ 0 then       message   ERROR: ARRAY must be an array       2  The type of the array   if sz sz 0 1  EQ 0 OR sz sz 0 1  EQ 7 OR sz sz 0 1  EQ 8 then       message   ERROR: Cannot apply to UNDEFINED  STRING  or STRUCTURE    if n_elements type  EQ 0 then type   sz sz 0 1       3  The type of the operation   szop   size op    if szop szop 0 1  NE 7 then       message   ERROR: operation OP was not a string       4  The dimensions to apply  default is to apply to first dim    if n_params  EQ 2 then dimapply   1   dimapply     dimapply     dimapply   dimapply sort dimapply      Sort in ascending order   napply   n_elements dimapply       5  Use double precision if requested or if needed   if n_elements dbl  EQ 0 then begin       dbl 0       if type EQ 5 OR type EQ 9 then dbl 1   endif    newop   strupcase op    newarr   array   newarr   reform newarr  sz 1:sz 0   overwrite    case 1 of            Addition        newop EQ  : begin           for i   0L  napply 1 do begin               newarr   total temporary newarr  dimapply i i  double dbl            endfor       end            Multiplication        newop EQ  : begin   Multiplication  by summation of logarithms            cmapply_redim  newarr  dimapply  dimkeep  nkeep  totcol  totkeep           if nkeep EQ 0 then begin               newarr   reform newarr  n_elements newarr  1   overwrite                return   cmapply_product newarr 0            endif            result   cmapply_product newarr            result   reform result  sz dimkeep 1   overwrite            return  result       end            LOGICAL AND or OR        newop EQ  AND  OR  newop EQ  OR : begin           newarr   temporary newarr  NE 0           totelt   1L           for i   0L  napply 1 do begin               newarr   total temporary newarr  dimapply i i                totelt   totelt   sz dimapply i            endfor           if newop EQ  AND  then return   round newarr  EQ totelt            if newop EQ  OR   then return   round newarr  NE 0        end          Operations requiring a little more attention over how to         iterate        newop EQ  MAX  OR  newop EQ  MIN : begin           cmapply_redim  newarr  dimapply  dimkeep  nkeep  totcol  totkeep           if nkeep EQ 0 then begin               if newop EQ  MAX  then return  max newarr                if newop EQ  MIN  then return  min newarr            endif              Next task: create result array           result   make_array totkeep  type type               Now either iterate over the number of output elements  or             the number of collapsed elements  whichever is smaller            if totcol LT totkeep then begin                 Iterate over the number of collapsed elements               result 0    reform newarr 0 totkeep overwrite                case newop of                    MAX : for i   1L  totcol 1 do                       result 0    result   newarr i                     MIN : for i   1L  totcol 1 do                       result 0    result   newarr i                endcase           endif else begin                 Iterate over the number of output elements               case newop of                    MAX : for i   0L  totkeep 1 do result i    max newarr i                     MIN : for i   0L  totkeep 1 do result i    min newarr i                endcase           endelse            result   reform result  sz dimkeep 1   overwrite            return  result       end          User function        strmid newop 0 4  EQ  USER : begin           functname   strmid newop 5            if functname EQ   then               message   ERROR:  newop  is not a valid operation             cmapply_redim  newarr  dimapply  dimkeep  nkeep  totcol  totkeep           if nkeep EQ 0 then begin               if n_elements functargs  GT 0 then                   return  call_function functname  newarr  _EXTRA functargs                return  call_function functname  newarr            endif              Next task: create result array           result   make_array totkeep  type type               Iterate over the number of output elements           if n_elements functargs  GT 0 then begin               for i   0L  totkeep 1 do                   result i    call_function functname  newarr i  _EXTRA functargs            endif else begin               for i   0L  totkeep 1 do                   result i    call_function functname  newarr i            endelse            result   reform result  sz dimkeep 1   overwrite            return  result       end     endcase    newsz   size newarr    if type EQ newsz newsz 0 1  then return  newarr      Cast the result into the desired type  if necessary   castfns    UNDEF   BYTE   FIX   LONG   FLOAT                  DOUBLE   COMPLEX   UNDEF   UNDEF   DCOMPLEX      if type GE 1 AND type LE 3 then       return  call_function castfns type  round newarr      else       return  call_function castfns type  newarr  end"); 
    74 a[72] = new Array("./Matrix/cmset_op.html", "cmset_op.pro", "", "     hidden      file_comments   Simplified version of CMSET_OP_UNIQ which sorts  and takes the    first  value  whatever that may mean       todo seb     function cmset_op_uniq  a     compile_opt idl2  strictarrsubs     if n_elements a  LE 1 then return  0L    ii   sort a    b   a ii    wh   where b NE shift b   1L  ct    if ct GT 0 then return  ii wh     return  0L   end        file_comments   Performs an AND  OR  or XOR operation between two sets     Description: SET_OP performs three common operations between two sets  The   three supported functions of OP are:            OP          Meaning         AND    to find the intersection of A and B          OR     to find the union of A and B          XOR    to find the those elements who are members of A or B                but not both        Sets as defined here are one dimensional arrays composed of     numeric or string types  Comparisons of equality between elements     are done using the IDL EQ operator        The complements of either set can be taken as well  by using the     NOT1 and NOT2 keywords  For example  it may be desirable to find     the elements in A but not B  or B but not A  they are different      The following IDL expressions achieve each of those effects:          SET   CMSET_OP A   AND   NOT2  B      A but not B        SET   CMSET_OP NOT1  A   AND  B      B but not A       Note the distinction between NOT1 and NOT2   NOT1 refers to the     first set  A  and NOT2 refers to the second  B   Their ordered     placement in the calling sequence is entirely optional  but the     above ordering makes the logical meaning explicit        NOT1 and NOT2 can only be set for the  AND  operator  and never     simultaneously  This is because the results of an operation with      OR  or  XOR  and any combination of NOTs   or with  AND  and     both NOTs   formally cannot produce a defined result        The implementation depends on the type of operands  For integer     types  a fast technique using HISTOGRAM is used  However  this     algorithm becomes inefficient when the dynamic range in the data     is large  For those cases  and for other data types  a technique     based on SORT  is used  Thus the compute time should scale     roughly as  A B ALOG A B  or better  rather than  A B  for the     brute force approach  For large arrays this is a significant     benefit       categories    Array      param A  in required    The two sets to be operated on  A one dimensional array of   either numeric or string type  A and B must be of the same   type  Empty sets are permitted  and are either represented   as an undefined variable  or by setting EMPTY1 or EMPTY2       param B  in required    See A      param OP0  in required type string    a string  the operation to be performed  Must be one of    AND   OR  or  XOR   lower or mixed case is permitted    Other operations will cause an error message to be produced       keyword NOT1   If set and OP is  AND  then the complement of A  for   NOT1  or B  for NOT2  will be used in the operation    NOT1 and NOT2 cannot be set simultaneously       keyword NOT2   See NOT1      keyword EMPTY1   If set  then A  for EMPTY1  or B  for EMPTY2  are   assumed to be the empty set  The actual values   passed as A or B are then ignored       keyword EMPTY2   See EMPTY1      keyword INDEX   if set  then return a list of indexes instead of the array   values themselves  The  slower  set operations are always   performed in this case      The indexes refer to the  combined  array  A B  To   clarify  in the following call: I   CMSET_OP   INDEX    returned values from 0 to NA 1 refer to A I  and values   from NA to NA NB 1 refer to B I NA       keyword COUNT   upon return  the number of elements in the result set    This is only important when the result set is the empty   set  in which case COUNT is set to zero       returns   The resulting set as a one dimensional array  The set may be   represented by either an array of data values  default  or an   array of indexes  if INDEX is set  Duplicate elements  if any    are removed  and element order may not be preserved      The empty set is represented as a return value of  1L  and COUNT   is set to zero  Note that the only way to recognize the empty set   is to examine COUNT      SEE ALSO:      SET_UTILS PRO by RSI      history Written  CM  23 Feb 2000     Added empty set capability  CM  25 Feb 2000     Documentation clarification  CM 02 Mar 2000     Incompatible but more consistent reworking of EMPTY keywords  CM        04 Mar 2000     Minor documentation clarifications  CM  26 Mar 2000     Corrected bug in empty_arg special case  CM 06 Apr 2000     Add INDEX keyword  CM 31 Jul 2000     Clarify INDEX keyword documentation  CM 06 Sep 2000     Made INDEX keyword always force SLOW_SET_OP  CM 06 Sep 2000     Added CMSET_OP_UNIQ  and ability to select FIRST_UNIQUE or       LAST_UNIQUE values  CM  18 Sep 2000     Removed FIRST_UNIQUE and LAST_UNIQUE  and streamlined       CMSET_OP_UNIQ until problems with SORT can be understood  CM  20       Sep 2000  thanks to Ben Tupper      Still trying to get documentation of INDEX and NOT right  CM  28       Sep 2000  no code changes      Correct bug for AND case  when input sets A and B each only have       one unique value  and the values are equal   CM  04 Mar 2004        thanks to James B  jbattat at cfa dot harvard dot edu      Add support for the cases where the input data types are mixed         but still compatible  also  attempt to return the same data        type that was passed in  CM  05 Feb 2005     Fix bug in type checking  thanks to  marit  CM  10 Dec 2005     Work around a stupidity in the built in IDL HISTOGRAM routine         which tries to  help  you by restricting the MIN MAX to the        range of the input variable  thanks to Will Maddox  CM  16 Jan 2006       Author: Craig B  Markwardt  NASA GSFC Code 662  Greenbelt  MD 20770     craigm lheamail gsfc nasa gov      version  Id: cmset_op pro 163 2006 08 29 12:59:46Z navarro        examples   Utility function  similar to UNIQ  but allowing choice of taking   first or last unique element  or non unique elements    Unfortunately this doesn t work because of implementation dependent   versions of the SORT  function      function cmset_op_uniq  a  first first  non non  count ct  sort sortit     if n_elements a  LE 1 then return  0L     sh    2L keyword_set first 1L 2L keyword_set non 1        if keyword_set sortit  then begin           Sort it manually         ii   sort a    b   a ii          if keyword_set non  then wh   where b EQ shift b  sh  ct            else                     wh   where b NE shift b  sh  ct          if ct GT 0 then return  ii wh      endif else begin           Use the user s values directly         if keyword_set non  then wh   where a EQ shift a  sh  ct            else                     wh   where a NE shift a  sh  ct          if ct GT 0 then return  wh     endelse       if keyword_set first  then return  0L else return  n_elements a 1   end    Simplified version of CMSET_OP_UNIQ which sorts  and takes the    first  value  whatever that may mean        function cmset_op  a  op0  b  not1 not1  not2 not2  count count                  empty1 empty1  empty2 empty2  maxarray ma  index index     compile_opt idl2  strictarrsubs      on_error  2   return on error   count   0L   index0    1L     Histogram technique is used for array sizes  max2       nbins   maxx minn 1       if  maxx minn  GT floor ma 0  then goto  SLOW_SET_OP          Work around a stupidity in the built in IDL HISTOGRAM routine       if  tp1 EQ 2 OR tp2 EQ 2  AND  minn LT  32768 OR maxx GT 32767  then           goto  SLOW_SET_OP          Following operations create a histogram of the integer values        ha   histogram a  min minn  max maxx    1       hb   histogram b  min minn  max maxx    1          Compute NOT cases       if keyword_set not1  then ha   1b   ha       if keyword_set not2  then hb   1b   hb       case op of             Boolean operations            AND : mask   temporary ha  AND temporary hb              OR : mask   temporary ha   OR temporary hb             XOR : mask   temporary ha  XOR temporary hb        endcase        wh   where temporary mask  count        if count EQ 0 then return   1L        result   temporary wh minn        if tp1 NE tp2 then return  result       szr   size result    tpr   szr szr 0 1           Cast to the original type if necessary       if tpr NE tp1 then begin           fresult   make_array n_elements result  type tp1            fresult 0    temporary result            result   temporary fresult        endif        return  result    endelse    return   1L    DEFAULT CASE end        Here is how I did the INDEX stuff with fast histogramming   It       works  but is complicated  so I forced it to go to SLOW_SET_OP        ha   histogram a  min minn  max maxx  reverse ra    1       rr   ra 0:nbins    mask   rr NE rr 1:    ra   ra rr mask 1L mask       hb   histogram b  min minn  max maxx  reverse rb    1       rr   rb 0:nbins    mask   rr NE rr 1:    rb   rb rr mask 1L mask          AND OR XOR NOT masking here         ra   ra wh    rb   rb wh        return  ra ra GE 0     rb n1 ra LT 0    is last  ra  right  "); 
    75 a[73] = new Array("./Matrix/different.html", "different.pro", "", "             file_comments    calculate the different elements of 2 matrix of positive whole numbers       categories   Calculation      param a  in required  arrays of positive integers  which need                 not be sorted  Duplicate elements are ignored  as they have no                 effect on the result      param b  in required  see a      returns tableau      restrictions The empty set is denoted by an array with the first element equal to    1       restrictions These functions will not be efficient on sparse sets with wide   ranges  as they trade memory for efficiency  The HISTOGRAM function   is used  which creates arrays of size equal to the range of the   resulting set       examples       a    2 4 6 8      b    6 1 3 2      different a b      4  8            Elements in A but not in B      history http: www dfanning com tips set_operations html      version  Id: different pro 163 2006 08 29 12:59:46Z navarro             FUNCTION different  a  b       compile_opt idl2  strictarrsubs           a and  not b    elements in A but not in B  mina   Min a  Max maxa  minb   Min b  Max maxb  IF  minb GT maxa  OR  maxb LT mina  THEN RETURN  a  No intersection  r   Where Histogram a  Min mina  Max maxa               1 Histogram b  Min mina  Max maxa  count  IF count eq 0 THEN RETURN   1 ELSE RETURN  r   mina END"); 
    76 a[74] = new Array("./Matrix/extrac2.html", "extrac2.pro", "", "             file_comments   extraction of subdomains of matrices    Even if the subdomain is  pierced   see the example    By default  IDL can make extractions of subdomain:          IDL  a indgen 5 5         IDL  print  a               0       1       2       3       4               5       6       7       8       9              10      11      12      13      14              15      16      17      18      19              20      21      22      23      24        IDL  print  a 0 2 3               15      17        IDL  print  a 0 2                0       2               5       7              10      12              15      17              20      22   but        IDL  print  a 0 2 3 4               15      22   while        IDL  print  extrac2 a 0 2 3 4               15      17              20      22      categories    Utilities      param array  in required    a 1 2 3 or 4 dim input array      param index1  in required    can have 2 forms:   1 a vector containing indexes of lines we want to keep   2 the string   if we want to keep all lines       param index2  in required    the same thing that index1 but for dim 2       param index3  in required    the same thing that index1 but for dim 3       param index4  in required    the same thing that index1 but for dim 4       returns   a matrix 1 2 3 or 4d extract from input array      restrictions    1 in case of mistake      examples   I have a dim 2 matrix named A  I want extract a small intersection   matrix 2d of the line 2 3 and 7 and of the column 0 and 1:      IDL  res extrac2 A 2 3 7 0 1      other ex:   IDL  print  a   a b c   d e f   g h i   IDL  print  extrac2 a 0 2 0 2    a c   g i      history Sebastien Masson  smasson lodyc jussieu fr                          12 1 1999                         29 4 1999: correction of a bug and complement of the heading      version  Id: extrac2 pro 163 2006 08 29 12:59:46Z navarro             FUNCTION extrac2  array  index1  index2  index3  index4       compile_opt idl2  strictarrsubs      taille   size array      test of the numbre of parameters   and of the nature of the index  for THE case  x       if n_params  NE taille 0 1 THEN       return  report we need as many indexes as the number of dimensions of the input array     IF n_params  GE 5 THEN BEGIN       if size index4 type  EQ 7 then index4   lindgen taille 4          ELSE index4   long index4        nt   n_elements index4     ENDIF    IF n_params  GE 4 THEN BEGIN       if size index3 type  EQ 7 then index3   lindgen taille 3          ELSE index3   long index3        nz   n_elements index3     ENDIF    IF n_params  GE 3 THEN BEGIN       if size index2 type  EQ 7 then index2   lindgen taille 2          ELSE index2   long index2        ny   n_elements index2     ENDIF    IF n_params  GE 2 THEN BEGIN       if size index1 type  EQ 7 then index1   lindgen taille 1          ELSE index1   long index1        nx   n_elements index1     ENDIF      construction of an array of indexes and of results following the size of array     case taille 0  of       1:res   array index1        2:BEGIN          index   index1 replicate 1  ny taille 1 replicate 1  nx index2          res   array index        END       3:BEGIN          index   index1 replicate 1  ny taille 1 replicate 1  nx index2          index   temporary index replicate 1  nz               taille 1 taille 2 replicate 1  nx ny index3          res   array reform index  nx  ny  nz   over        END       4:BEGIN          index   index1 replicate 1  ny taille 1 replicate 1  nx index2          index   temporary index replicate 1  nz               taille 1 taille 2 replicate 1  nx ny index3          index   temporary index replicate 1  nt               taille 1 taille 2 taille 3 replicate 1  nx ny nz index4          res   array reform index  nx  ny  nz  nz   over        END    endcase          return  res end"); 
    77 a[75] = new Array("./Matrix/inter.html", "inter.pro", "", "             file_comments    calculate the intersection between 2 matrices of whole numbers      categories    Calculation      param a  in required  arrays of positive integers  which need not to be   sorted  Duplicate elements are ignored  as they have no effect on the   result      param b  in required  see a      returns tableau      restrictions The empty set is denoted by an array with the first element equal to    1       restrictions These functions will not be efficient on sparse sets with wide   ranges  as they trade memory for efficiency  The HISTOGRAM function   is used  which creates arrays of size equal to the range of the   resulting set       examples  a    2 4 6 8      b    6 1 3 2      inter a b      2  6          Common elements       history  http: www dfanning com tips set_operations html      version  Id: inter pro 163 2006 08 29 12:59:46Z navarro              FUNCTION inter  a  b       compile_opt idl2  strictarrsubs      case 1 of       n_elements a  EQ 0:return    1       n_elements b  EQ 0:return    1       n_elements a  EQ 1 AND n_elements b  NE 1:          if  where b EQ a 0 0  EQ  1 then return   1 ELSE return   a 0        n_elements b  EQ 1 AND n_elements a  NE 1:          if  where a EQ b 0 0  EQ  1 then return   1 ELSE return   b 0        n_elements a  EQ 1 AND n_elements b  EQ 1:          if  where a 0  EQ b 0 0  EQ  1 then return   1 ELSE return   a 0        ELSE:    ENDCASE   minab   Min a  Max maxa    Min b  Max maxb   Only need intersection of ranges maxab   maxa   maxb       If either set is empty  or their ranges don t intersect: result   NULL   IF maxab LT minab OR maxab LT 0 THEN RETURN   1 r   Where Histogram a  Min minab  Max maxab               Histogram b  Min minab  Max maxab  count   IF count EQ 0 THEN RETURN   1 ELSE RETURN  r   minab END"); 
    78 a[76] = new Array("./Matrix/make_selection.html", "make_selection.pro", "", "      file_comments    Convert an array of selected values to an index          array that identifies the selected values in a list          or data array       categories tools       param NAMES  in required  A list or array of values to choose from       param SELNAMES  in required  A list of selected values      keyword ONLY_VALID Return only indexes of found values  Values not              found are skipped  Default is to return 1 index value for              each SELNAME  which is  1 if SELNAME is not contained in               NAMES  If ONLY_VALID is set  the  1 values will be deleted               and a value of  1 indicates that no SELNAME has been found              at all       keyword REQUIRED Normally  MAKE_SELECTION will return indexes for              all values that are found  simply ignoring the selected              values that are not in the NAMES array  although an error              message is displayed  Set this keyword to return with               1 as soon as a selected value is not found       keyword QUIET Suppress printing of the error message if a              selected value is not found  the error condition will              still be set       returns A  long  array with indexes to reference the selected values          in the NAMES array       restrictions If the NAMES array contains multiple entries of the same value           only the index to the first entry will be returned             A selection can contain multiple instances of the same value           The index array will contain one entry per selected item           See example below       examples names      Alfred Anton Peter John Mary              index   MAKE_SELECTION names Peter Mary              print index               prints  2  4               vals   indgen 20              index   MAKE_SELECTION vals 9 5 8 7 7 8 9              print index               prints  9   1  8  7  7  8  9               index   MAKE_SELECTION vals 9 5 8 7 7 8 9 ONLY_VALID              print index               prints  9  8  7  7  8  9               index   MAKE_SELECTION vals 9 5 8 7 7 8 9 REQUIRED              print index               prints   1      history mgs  28 Aug 1998: VERSION 1 00            mgs  29 Aug 1998:   changed behavior and added ONLY_VALID keyword      version  Id: make_selection pro 163 2006 08 29 12:59:46Z navarro         Copyright  C  1998  Martin Schultz  Harvard University   This software is provided as is without any warranty   whatsoever  It may be freely used  copied or distributed   for non commercial purposes  This copyright notice must be   kept with any copy of this software  If this software shall   be used commercially or sold as part of a larger package    please contact the author to arrange payment    Bugs and comments should be directed to mgs io harvard edu   with subject  IDL routine make_selection      function make_selection names selnames                 only_valid only_valid required required                 quiet quiet     compile_opt idl2  strictarrsubs               return an index array with a number for each element in        selnames that is found in names        Set the REQUIRED keyword to return  1 if one element is       not found  otherwise  1 will only be returned  if no        element is found          reset error state to 0     message reset       quiet   keyword_set quiet      result    1L       for i 0 n_elements selnames 1 do begin        test   where names eq selnames i         result     result  test 0            if  test 0  lt 0  then begin            if  keyword_set ONLY_VALID  OR keyword_set REQUIRED  then                 message Selected name not found in names array                           strtrim selnames i 2 CONT NOPRINT quiet            if  keyword_set required  then return 1L        endif     endfor       if  n_elements result  gt 1  then result   result 1:       if  keyword_set only_valid  then begin         ind   where result ge 0          if  ind 0  ge 0  then result   result ind            else result    1L     endif       return result   end"); 
    79 a[77] = new Array("./Matrix/union.html", "union.pro", "", "             file_comments    calculate the union between 2 matrices of whole numbers      categories    Calculation      param a  in required  arrays of positive integers  which need                 not be sorted  Duplicate elements are ignored  as they have no                 effect on the result      param b  in required  see a      returns tableau      restrictions The empty set is denoted by an array with the first element equal to    1       restrictions These functions will not be efficient on sparse sets with wide   ranges  as they trade memory for efficiency  The HISTOGRAM function   is used  which creates arrays of size equal to the range of the   resulting set       examples a    2 4 6 8              b    6 1 3 2              union a b      1  2  3  4  6  8     Elements in either set      history  http: www dfanning com tips set_operations html      version  Id: union pro 163 2006 08 29 12:59:46Z navarro             FUNCTION union  a  b     compile_opt idl2  strictarrsubs   IF a 0  LT 0 THEN RETURN  b     A union NULL   a IF b 0  LT 0 THEN RETURN  a     B union NULL   b RETURN  Where Histogram a b  OMin   omin    omin   Return combined set END"); 
    80 a[78] = new Array("./Matrix/zero_one.html", "zero_one.pro", "", "           file_comments    Send back a vector or a matrix constituted of 0 and 1 in alternation      categories    Function  Matrix      param n1  in required  number of elements in the first dimension    param n2  in required  number of elements in the second dimension      returns result       history Sebastien Masson  smasson lodyc jussieu fr                          1 12 98      version  Id: zero_one pro 163 2006 08 29 12:59:46Z navarro             function zero_one  n1 n2     compile_opt idl2  strictarrsubs      CASE N_PARAMS  OF       1:return  findgen n1  mod 2       2:BEGIN           if fix n1 2  EQ n1 2  then BEGIN  even number of columns             res   findgen n1 1 n2  mod 2             return  res 0:n1 1             ENDIF ELSE return  findgen n1 n2  mod 2  odd number of columns       END       else: return   report bad number of arguments     endcase             end"); 
    81 a[79] = new Array("./Obsolete/common.html", "common.pro", "", ""); 
    82 a[80] = new Array("./Obsolete/congridseb.html", "congridseb.pro", "", "           file_comments     Used to avoid a bug in congrid in a old version of IDL   Useless now      old example: based on a old version of IDL  5    IDL  print  congrid 1 2 3 4 5 6 7 8 12 4          1 1 1 2 2 2 3 3 3 3 4 4         1 1 1 2 2 2 3 3 3 3 4 4         5 5 5 6 6 6 7 7 7 7 8 8         5 5 5 6 6 6 7 7 7 7 8 8   IDL  print  rebin 1 2 3 4 5 6 7 8 12 4          1 1 1 2 2 2 3 3 3 4 4 4         3 3 3 4 4 4 5 5 5 6 6 6         5 5 5 6 6 6 7 7 7 8 8 8         5 5 5 6 6 6 7 7 7 8 8 8   IDL  print  congridseb 1 2 3 4 5 6 7 8 12 4          1 1 1 2 2 2 3 3 3 4 4 4         1 1 1 2 2 2 3 3 3 4 4 4         5 5 5 6 6 6 7 7 7 8 8 8         5 5 5 6 6 6 7 7 7 8 8 8      obsolete      param tableau  in required    1 or 2d array      param x  in required    first dimension of the result which must be   a multiple of the first dimension of the input array       param y  in required    second dimension of the result which must be   a multiple of the second dimension of the input array      returns   an array which dimensions are x y      history Sebastien Masson  smasson lodyc jussieu fr                         20 3 98                        18 6 1999 supression d une horrible boucle      version  Id: congridseb pro 157 2006 08 21 09:01:50Z navarro             function congridseb  tableau  x  y     compile_opt idl2  strictarrsubs      CASE N_PARAMS  OF       2: return  congrid tableau  x        3:return  congrid tableau  x  y        else: return  report Bad number or arguments in the call of congridseb     endcase end"); 
    83 a[81] = new Array("./Obsolete/cp.html", "cp.pro", "", "           file_comments   copy files   file_copy should be used instead       obsolete      param filenamein  in required       param filenameout  in required       keyword _EXTRA used to pass your keywords      history   June 2005: Sebastien Masson   obsolete routine      version  Id: cp pro 134 2006 07 07 10:19:08Z navarro             PRO cp  filenamein  filenameout  _extra   ex     compile_opt idl2  strictarrsubs  obsolete     file_copy  filenamein  filenameout  _extra   ex   RETURN END"); 
    84 a[82] = new Array("./Obsolete/extrait.html", "extrait.pro", "", "             file_comments    extraction of subdomains of matrices     Even if the subdomain is  pierced   see the example    By default  IDL can make extractions of subdomain:          IDL  a indgen 5 5          IDL  print  a                0       1       2       3       4               5       6       7       8       9              10      11      12      13      14              15      16      17      18      19              20      21      22      23      24        IDL  print  a 0 2 3                15      17        IDL  print  a 0 2                  0       2               5       7              10      12              15      17              20      22   but        IDL  print  a 0 2 3 4                15      22   while        IDL  print  extrait a 0 2 3 4                 15      17              20      22       you better use extrac2      obsolete      categories    Utilities      param tab  in required     a 1 2 3 or 4 dim table      param indicex  in required     can have 2 forms:   1 a vector containing indexes of lines we want to keep   2 the string   if we want to keep all lines       param indicey  in required     the same thing that indicex but for dim 2       param indicez  in required     the same thing that indicex but for dim 3        param indicet  in required     the same thing that indicex but for dim 4       returns    a matrix 1 2 3 or 4d extract from tab      restrictions    res 1 in case of mistake       examples    I have a dim 2 matrix named A  I want extract a small intersection    matrix 2d of the line 2 3 and 7 and of the column 0 and 1:           IDL  res extrait A 2 3 7 0 1      other ex:   IDL  print  a    a b c   d e f   g h i   IDL  print  extrait a 0 2 0 2            a c   g i       history Sebastien Masson  smasson lodyc jussieu fr    12 1 1999   29 4 1999: correction of a bug and complement of the heading      version  Id: extrait pro 163 2006 08 29 12:59:46Z navarro             FUNCTION extrait  tab  indicex  indicey  indicez  indicet       compile_opt idl2  strictarrsubs     case n_params  of       0:return  extrac2        1:return  extrac2 tab        2:return  extrac2 tab  indicex        3:return  extrac2 tab  indicex  indicey        4:return  extrac2 tab  indicex  indicey  indicez        5:return  extrac2 tab  indicex  indicey  indicez  indicet    endcase end"); 
    85 a[83] = new Array("./Obsolete/ficdate.html", "ficdate.pro", "", "           file_comments   sets s_fichier to name of the vairmer file associated   to the given date in vairmer format   yymmdd        obsolete      param vdate  in  date vairmer ex:930124      param dim  in   so  ou  vo  par defaut so est choisi      param nomexp  in  nom de l experience en trois lettres par defaut prefix      returns le nom du fichier vairmer  depuis iodir       uses common pro      examples   IDL  fic   ficdate 930124       history Jerome Vialard   jv lodyc jussieu fr   1 7 98      version  Id: ficdate pro 134 2006 07 07 10:19:08Z navarro             function ficdate  vdate  dim  nomexp     compile_opt idl2  strictarrsubs  obsolete    common   case n_params  of   1: dim    SO    2: dim strupcase dim    3: begin        prefix nomexp        dim strupcase dim       end endcase       constitution de l adresse ou aller chercher le fichier     date yymmdd   vdate   sets month  year and day to the good value :    rien   juldate vdate    constitution de la date yymmdd    case 1 of      year lt 10:                s_year  0 string format i1 year       year ge 10 and year lt 100:s_year      string format i2 year       year ge 100:BEGIN         year   year 1900         if year LT 10 then s_year  0 string format i1 year             ELSE s_year  string format i2 year       end    endcase    if month lt 10 then s_month 0 string format i1 month                      else s_month     string format i2 month     if day lt 10 then s_day 0 string format i1 day                    else s_day     string format i2 day       case dim of       SO : begin        case 1 of            year eq 0  and  month eq 0  : s_fichier iodir prefix O EX SO             year eq 0  and  month ne 0  and  day eq 0  : s_fichier iodir prefix O SE SO s_month            year ne 0  and  month eq 0  : s_fichier iodir prefix O AN SO s_year            year ne 0  and  day eq 0  :   s_fichier iodir prefix O MO SO s_year s_month           else: s_fichier iodir prefix O SO s_year s_month s_day        endcase      end       VO : begin        case 1 of            year eq 0  and  month eq 0  : s_fichier iodir prefix O EX VO             year eq 0  and  month ne 0  and  day eq 0  : s_fichier iodir prefix O SE VO s_month            year ne 0  and  month eq 0  : s_fichier iodir prefix O AN VO s_year            year ne 0  and  day eq 0  : s_fichier iodir prefix O MO VO s_year s_month           else: s_fichier iodir prefix O VO s_year s_month s_day        endcase      end      else: return  report le fichier doit etre VO ou SO     endcase       print        print  adresse du fichier:  fichier      return  s_fichier   end  "); 
    86 a[84] = new Array("./Obsolete/fictype.html", "fictype.pro", "", "           file_comments   gives fictype  DA   MO   AN   SE   EX  corresponding   to the given date in vairmer format   yymmdd        param vdate  in required       param dim unused      uses common pro      examples   IDL  fictype   fictype 930124       history Jerome Vialard   jv lodyc jussieu fr    2 7 98      version  Id: fictype pro 134 2006 07 07 10:19:08Z navarro             function fictype  vdate  dim     compile_opt idl2  strictarrsubs  obsolete    common       constitution de l adresse ou aller chercher le fichier     date yymmdd   vdate    jul   juldate vdate       case 1 of        year eq 0  and  month eq 0  : return   EX         year eq 0  and  month ne 0  and  day eq 0  : return   SE         year ne 0  and  month eq 0  : return   AN         year ne 0  and  day eq 0    : return   MO        else                         : return   DA     endcase        fini:      return   1 end  "); 
    87 a[85] = new Array("./Obsolete/imprime.html", "imprime.pro", "", "           file_comments   use printps instead       obsolete      param filename  in required       keyword TRANS      keyword NB      uses printps      history   June 2005: Sebastien Masson  english version      version  Id: imprime pro 134 2006 07 07 10:19:08Z navarro             PRO imprime  filename  TRANS   trans  NB   nb     this is working only with unix linux osX machines     compile_opt idl2  strictarrsubs  obsolete     thisOS   strupcase strmid version os_family  0  3    CASE thisOS OF      MAC :return      WIN :return     ELSE:   ENDCASE     call printps     CASE N_PARAMS  OF     0:printps     1:printps  filename     ELSE: BEGIN       ras   report imprime accept only one element: psfilename        return     END   ENDCASE     return END  "); 
    88 a[86] = new Array("./Obsolete/jourdsmois.html", "jourdsmois.pro", "", "           file_comments   used daysinmonth instead       obsolete      param mois  in optional       param annee  in optional       history Sebastien Masson  smasson lodyc jussieu fr    June 2005: Sebastien Masson  english version      version  Id: jourdsmois pro 134 2006 07 07 10:19:08Z navarro             function jourdsmois  mois  annee     compile_opt idl2  strictarrsubs  obsolete    case n_params  OF   0:return  daysinmonth    1:return  daysinmonth mois    2:return  daysinmonth mois  annee  endcase  end"); 
    89 a[87] = new Array("./Obsolete/juldate.html", "juldate.pro", "", "           file_comments    gives julian date equivalent of a date in vairmer     yymmdd or yyyymmdd   format   sets month  day and year to the corresp values     you better use date2jul      obsolete      categories    Calendar      param vvdate  in  date de la forme yymmdd ou yyyymmdd      keyword _EXTRA used to pass your keywords      uses common pro vraidate      returns date en jour julien     l annee 0 n existant pas  qd year est nulle on calcule le       jour julien de l annee  1      COMPATIBLE AVEC L AN 2000  : une date de la forme yymmdd est      convertit sous la forme yyyymmdd a l aide de vraidate      Attention  les variables globales year  month day sont attribuees      examples   IDL  date   juldate 930124       history Jerome Vialard   jv lodyc jussieu fr    2 7 98      version  Id: juldate pro 157 2006 08 21 09:01:50Z navarro             function juldate  vvdate  _EXTRA   ex     compile_opt idl2  strictarrsubs  obsolete   vdate   vvdate vdate   vraidate vdate  _EXTRA   ex   common      year vdate 10000    month vdate 100   year 100    day abs vdate   year 10000   month 100     month   abs month       mm   month   dd   day   yy   year      ndate   n_elements vdate     if total mm EQ 0  EQ ndate then mm    6    if total dd EQ 0  EQ ndate then dd    15    if total yy EQ 0  EQ ndate THEN yy     1      return  julday mm dd yy  _EXTRA   ex       return   1 end  "); 
    90 a[88] = new Array("./Obsolete/lec.html", "lec.pro", "", "           file_comments   lit les fichiers Vairmer en sort:   un tableau 2d ou 3d en fonction de nomchamp qui est le nom   du champ a extaire  2d s il commence par SO et 3d s il commence par VO    cette fonction modifie aussi les variables globales:   varname: trois lettres: nom de l experience   vargrid: nom de la grille   vardate: date  yy yymmdd   varexp: nom Vairmer du champ a tarcer      obsolete      categories    Graphics  Reading      examples   IDL  resultat lec nom_Vairmer date nom_experience       param nomchamp  in required  2 choix possibles:               1  nom de champ Vairmer  chaine de 8 caracteres en majuscule ou   minuscule commencant par vo ou so  Dans cette methode on saute directement   d en tete en en tete jusqu a trouver le bon fichier                2  chaine de characteres commencant par vo ou so suivit du   numero de champ a aller chercher  par ex  vo5  Cette methode est un peu   plus rapide car elle va directement chercher le fichier qui nous interesse       param date  in optional  nombres de 6 ou 8 chiffres  anneemoisjour  par ex:19980507       param nomexp  in optional  trois lettres designant le nom de l experience        keyword ANOM  in  type du fichier vairmer par rapport auquel on doit calculer               l anomalie  EX AN SE MO       keyword ECRIT  in  permet d imprimer tous les noms vairmer que contient le fichier    ds ce cas en input on met seulement  vo  ou  so  la fonction retourne le   nombre de fichiers lus       keyword BOITE      keyword EXPANOM  in  si on calcule l anom par rapport a une exper         differente      keyword FILENAME string pour passer directement le nom du champ sans         utiliser les inputs: nom_Vairmer date nom_experience  Rq si         ces inputs sont qd meme donnes ils ne sont pas modifies par         filename       keyword GRID lorsque ce mot clef est active  lec retourne la liste         des types de grilles  T  U  auxquelles se rapportent les         variables  ds ce cas en input on met seulement  vo  ou  so       keyword NAME lorsque ce mot clef est active  lec retourne la liste         des noms des variables  ds ce cas en input on met seulement          vo  ou  so       keyword TOUT  oblige lec a lire le champ sur tout le domaine qui a         etait selectionne pour la cession en cours  jpi jpj jpk       returns un tableau 2 ou 3d  sans le mot cle  TOUT  sa taille est   celle du sous domaine definit par domdef  nx ny nz  avec  TOUT le   champ a la taille du  domaine qui a etait selectionne pour la   cession en cours  jpi jpj jpk    pour les sous domaines cf:          http: www ipsl jussieu fr smlod sousdomaine html   Retourne  1 en cas d erreur       uses common pro isnumber pro fivardate pro      history Sebastien Masson  smasson lodyc jussieu fr   26 5 98                         Jerome Vialard : adaptation au format vairmer                                          keyword anom et expanom  1 7 98                         Sebastien Masson  masque des terres   14 8 98                         Sebastien Masson  decoupe pour les sous domaines   2 99      version  Id: lec pro 157 2006 08 21 09:01:50Z navarro             function lec  nomchamp date nomexp ECRIT ecrit ANOM anom  BOITE   boite EXPANOM expanom  TOUT   tout  GRID   grid  NAME   name  filename   FILENAME     compile_opt idl2  strictarrsubs  obsolete    common    tempsun   systime 1            pour key_performance    z    1      if keyword_set filename  then BEGIN       CASE strupcase strmid version os_family  0  3  of           MAC :sep    :            WIN :sep              ELSE:sep           ENDCASE       fname   strmid filename  rstrpos filename  sep 1        if n_elements nomchamp  EQ 0 then nomchamp   strmid fname 6  2        if n_elements date  EQ 0 then date   long strmid fname 8        if n_elements nomexp  EQ 0 then nomexp   strmid fname 0  3     endif      nomchamp strupcase nomchamp     dim string format a2 nomchamp   print   nom de l experience:  nomchamp     specification de la date et de l experience      case n_params  OF       0:BEGIN          if keyword_set filename  then begin             rien juldate date              prefix nomexp          ENDIF ELSE return  report Donnez un argument en entree ou utilisez le mot clef FILENAME        END       1:date long day long month 100 long year 10000       2:rien juldate date        3:begin          rien juldate date           prefix nomexp       end    endcase     verification de la dim du fichier      if dim ne  SO  and dim ne  VO  then return  report le nom du champ doit commencer par VO ou SO        constitution de l adresse ou aller chercher le fichier      s_fichier ficdate date dim      ouverture du fichier a l adresse s_fichier      openr  numlec  s_fichier   get_lun ERROR err   swap_if_little_endian    if err ne 0 then begin    print err_string       return   1    endif  taille en octet du fichier    infofichier fstat numlec      definition de la taille du fichier a aller chercher: jpidta jpjdta jpkdta       if n_elements jpidta  EQ 0 THEN BEGIN       if n_elements ixmindta  EQ 0 OR n_elements ixmaxdta  EQ 0 then          jpidta   jpiglo else jpidta   ixmaxdta ixmindta 1    endif    if n_elements jpjdta  EQ 0 THEN BEGIN       if n_elements iymindta  EQ 0 OR n_elements iymaxdta  EQ 0 then          jpjdta   jpjglo else jpjdta   iymaxdta iymindta 1    endif    if n_elements jpkdta  EQ 0 THEN BEGIN       if n_elements izmindta  EQ 0 OR n_elements izmaxdta  EQ 0 then          jpkdta   jpkglo else jpkdta   izmaxdta izmindta 1    endif     lecture des champs directement vers le champ ou l en tete que l on recherche   il faut savoir que:    le fortran ajoute au debut et a la fin de chaque write 4 octets de controle    les reels du model sont codes sur 4 octets    un charactere fait 1 octet    4 chaines de 8 characteres un tableau de reels 4 trucs de controle  pour les   2 write :    if dim eq  VO  then       taillebloc 4 8 long jpidta jpjdta jpkdta 4 4 4 else       taillebloc 4 8 long jpidta jpjdta 4 4 4     choix du type de lecture      typelec strmid nomchamp 2 strlen nomchamp     test isnumber typelec numerochamp     if test eq 0 then begin     1  LECTURE DIRECTE D EN TETE en EN TETE         numerochamp 1     lecture des noms de champ         resname           resgrid           while numerochamp taillebloc le infofichier size do begin          offset numerochamp 1 taillebloc 4          a assoc numlec bytarr 8 nozero  offset           varname string a 0           if keyword_set ecrit  OR keyword_set name  OR keyword_set grid              then begin             vargrid a 1              vargrid string vargrid 7              vardate strtrim long string a 2  2              varexp strtrim a 3  2              if keyword_set ecrit  THEN                print  numerochamp   varname   vargrid   vardate   varexp             resname    resname  varname              resgrid    resgrid  vargrid           endif          if nomchamp eq varname then begin             vargrid a 1              vargrid string vargrid 7              vardate strtrim long string a 2  2              varexp strtrim a 3  2              goto sortieboucle          endif          numerochamp numerochamp 1       ENDWHILE       free_lun numlec       close  numlec       case 1 of          keyword_set ecrit :return  numerochamp 1          keyword_set name :return  resname 1:numerochamp 1           keyword_set grid :            return  strmid resgrid 1:numerochamp 1 0    strlen resgrid 0 2           ELSE:return  report Ce nom Vairmer de champ n existe pas ds le fichier:  infofichier name        endcase    endif else begin     2  LECTURE DIRECTEMENT DU CHAMP QUE L ON VEUT       test pour savoir si numero de champ est accessible         if taillebloc numerochamp gt infofichier size then          return  report Ce numero de champ n exite pas  Le fichier  infofichier name  ne contient que  infofichier size taillebloc  champs      lecture de l en tete numero numerochamp         offset numerochamp 1 taillebloc 4       a assoc numlec bytarr 8 nozero  offset        varname string a 0        vargrid a 1        vargrid string vargrid 7        vardate string a 2        varexp string a 3     endelse sortieboucle:     lecture du champ lui meme      offset numerochamp 1 taillebloc 8 4 8 4    if dim eq  VO  then       a assoc numlec fltarr jpidta jpjdta jpkdta nozero  offset  else       a assoc numlec fltarr jpidta jpjdta nozero  offset     z a 0      on initialise les ixmindta  iymindta  au besoin      if n_elements ixmindta  EQ 0 OR n_elements ixmaxdta  EQ 0 then BEGIN       ixmindta   0       ixmaxdta   jpidta 1    endif    if n_elements iymindta  EQ 0 OR n_elements iymaxdta  EQ 0 then BEGIN       iymindta   0       iymaxdta   jpjdta 1    endif    if n_elements izmin  EQ 0 OR n_elements izmax  EQ 0 then BEGIN       izmindta   0       izmaxdta   jpkdta 1    endif     on reduit z selon les valeurs de ixmindta  iymindta         if dim EQ  SO  then z   z ixminmesh ixmindta:ixmaxmesh ixmindta                                 iyminmesh iymindta:iymaxmesh iymindta       ELSE z   z ixminmesh ixmindta:ixmaxmesh ixmindta                   iyminmesh iymindta:iymaxmesh iymindta  izminmesh izmindta:izmaxmesh izmindta      on shift z si key_shift est defininit      if n_elements key_shift  NE 0 THEN BEGIN       if dim EQ  SO  then z   shift z key_shift  0          ELSE z   shift z key_shift  0  0     endif      si  TOUT n est pas active  on coupe z pour q il soit a la taille    du zoom: nx ny nz      if NOT keyword_set tout  then BEGIN     changement de domaine         if keyword_set boite  then BEGIN          Case 1 Of             N_Elements Boite  Eq 1:bte lon1  lon2  lat1  lat2  0 boite 0              N_Elements Boite  Eq 2:bte lon1  lon2  lat1  lat2  boite 0 boite 1              N_Elements Boite  Eq 4:bte Boite  prof1  prof2              N_Elements Boite  Eq 5:bte Boite 0:3  0  Boite 4              N_Elements Boite  Eq 6:bte Boite             Else: return  report Mauvaise Definition de Boite           endcase          oldboite    lon1  lon2  lat1  lat2  prof1  prof2           domdef  bte GRILLE vargrid       ENDIF         grille mask glam gphi gdep nx ny nz premierx premiery premierz dernierx derniery dernierz       if nx EQ 1 OR ny EQ 1 OR nz EQ 1 then mask   reform mask  nx  ny  nz   over        if dim EQ  SO  then z   z premierx:dernierx  premiery:derniery           ELSE z   z premierx:dernierx  premiery:derniery  premierz:dernierz     ENDIF ELSE BEGIN       case vargrid OF             on recupere le mask en entier ds le cas ou  TOUT           U :mask   umask        n est pas active et on le choisit en fontion           T :mask   tmask          de la valeur de vargrid           W :mask   tmask           V :mask   vmask            F :mask   fmask        ENDCASE    ENDELSE     calcul d une anomalie si le keyword anom est active      if keyword_set anom  then begin       case anom of           EX  : adate   0           AN  : adate   floor date 10000 10000           SE  : adate   floor date   floor date 10000 10000 100   100           MO  : adate   floor date 100 100           DA  : adate   date   floor date 10000 10000              : adate   date   floor date 10000 10000          else : return  report Anom doit etre egal a EX AN SE MO DA         endcase       if keyword_set expanom  then nomexpa   expanom         else nomexpa   nomexp       if keyword_set bavard  THEN print  nomchamp     adate     nomexpa       z   z   lec nomchamp adate nomexpa  TOUT   tout     endif     on masque les terres par valmask      IF n_elements valmask  EQ 0 THEN valmask   1e20    if dim EQ  SO  then BEGIN       terre   where mask 0  EQ 0        if terre 0  NE  1 then z terre    valmask    ENDIF ELSE BEGIN       terre   where mask 0  EQ 0        if terre 0  NE  1 then z where mask EQ 0    valmask    ENDELSE      free_lun numlec    close  numlec      if n_elements oldboite  NE 0 then domdef   oldboite    IF keyword_set key_performance  EQ 1 THEN print   temps lec  systime 1 tempsun      return reform z   end "); 
    91 a[89] = new Array("./Obsolete/lect.html", "lect.pro", "", "             file_comments   lit les fichiers Vairmer de date1 a date2 et en sort un tableau   1D  2D ou 3D qui peut etre reutilise pour une courbe   hov   animation   cette fonction modifie aussi les variables globales:   varname: huit lettres: nom Vairmer du champ a tracer   vargrid:1 lettre : nom de la grille   varexp: trois lettres :nom de l experience      obsolete      categories    Graphics  Reading      examples   IDL  resultat lec nom_Vairmer date1 date2 nomexp direc BOITE boite       param nomchamp  in required    nom de champ Vairmer  chaine de 8 caracteres commencant par VO ou SO      param date1  in required    date de depart de la serie temporelle a extraire      param date2  in required    date de fin de la serie temporelle a extraire      param nomexp  in required   default prefix    nom de l experience a lire      param direc  in required     x   y   z   xy   xz   yz   xyz   xt   yt   zt   xyt   xzt     yzt   xyzt  directions selon lesquelles effectuer les moyennes    si rien n est donne on n effectue pas de moyenne       keyword BOITE  in    boite sur laquelle integrer  par defaut tout le domaine       keyword ANOM  in    type de fichiers  SE AN  a relire pour calc une  anomalie      keyword EXPANOM  in    experience pour laquelle on veut calculer une anomalie   par defaut la meme que nomexp      uses common vraidate juldate      history Jerome Vialard  jv lodyc jussieu fr    2 7 98      version  Id: lect pro 157 2006 08 21 09:01:50Z navarro                                1      2      3    4      5 function lect  nomchamp date1 date2 nomexp direc BOITE boite                   ANOM anom EXPANOM expanom  REPEAT repeat     compile_opt idl2  strictarrsubs  obsolete    common    tempsun   systime 1            pour key_performance      nomchamp   strupcase nomchamp     date1 vraidate date1     date2 vraidate date2       dim string format a2 nomchamp        specification de la date et de l experience        if fictype date1  ne fictype date2  then       return  report Les deux dates doivent correspondre au meme type de fic vairmer     fictyp   fictype date1      creation du nom du fichier      if n_elements nomexp  EQ 0 then nomexp   prefix    ficname iodir nomchamp strcompress date1 remove_all     ficname ficname  fictyp strcompress date2 remove_all nomexp    if  keyword_set anom  then ficname ficname  anom    if  keyword_set expanom  then ficname ficname  expanom    case n_elements boite  of       4 : box   strcompress string format i4 _ i4 _ i4 _ i4 boite                                 remove_all        6 : box   strcompress string format i4 _ i4 _ i4 _ i4 _ i4 _ i4 boite remove_all        else: box  strcompress string format i4 _ i4 _ i4 _ i4 _ i4 _ i4 lon1 lon2 lat1 lat2 prof1 prof2 remove_all     ENDCASE    if n_elements direc  EQ 0 then direc        ficname ficname box direc hovdat      Est ce que le fichier de hovmoller existe         structure du fichier :   jpt  valeur de la dim temporelle  dimtableau  dimension du tableau    dimttab 0  dimttab 1     valeur des dim     time  axe des tps  ttab  tableau a lire    def du domaine  lon1 lon2    prof1 prof2       get_lun  numlec    openr  numlec  ficname   get_lun ERROR err   swap_if_little_endian    if  err eq 0  then begin       jpt   long 1        dimtableau   long 1        readu  numlec  jpt dimtableau       case dimtableau of          1 : begin             n1   long 1              readu  numlec n1             ttab   fltarr n1           end          2 : begin             n1   long 1              n2   long 1              readu  numlec n1 n2             ttab   fltarr n1 n2           end          3 : begin             n1   long 1              n2   long 1              n3   long 1              readu  numlec n1 n2 n3             ttab   fltarr n1 n2 n3           end       endcase       time   lonarr jpt    lecture axe des tps et du tableau       readu  numlec time  ttab       newboite   fltarr 6    lecture du domaine       readu  numlec newboite       domdef  newboite   lecture info complementaire : nom du champs  de l experience       varname aaaaaaaa        readu  numlec  varname       vargrid a        readu  numlec  vargrid       varexp aaa        readu  numlec  varexp         close  numlec       free_lun  numlec       return  ttab    ENDIF    close  numlec    free_lun  numlec     changement de domaine      if keyword_set boite  then BEGIN       Case 1 Of          N_Elements Boite  Eq 1:bte lon1  lon2  lat1  lat2  0 boite 0           N_Elements Boite  Eq 2:bte lon1  lon2  lat1  lat2  boite 0 boite 1           N_Elements Boite  Eq 4:bte Boite  prof1  prof2           N_Elements Boite  Eq 5:bte Boite 0:3  0  Boite 4           N_Elements Boite  Eq 6:bte Boite          Else: return  report Mauvaise Definition de Boite        endcase       oldboite    lon1  lon2  lat1  lat2  prof1  prof2        domdef  bte    ENDIF       Boucle de lecture des fichiers      case fictyp of        DA  : dec   0         MO  : dec   14         SE  : dec   14         AN  : dec   182     endcase  initialisation des variables associees au tps    time   lonarr jptmax     jpt   0    vdat   date1   debut de la boucle    while  vdat le date2  do begin     lecture du fichier a la date vdat  vairmer          tab   lec nomchamp vdat nomexp ANOM anom EXPANOM expanom      attribution du mask et des tableaux de longitude et latitude          if jpt EQ 0 THEN grille  mask  glam  gphi  gdep  nx  ny nz premierx premiery premierz dernierx  derniery  dernierz         if  n_elements tab  eq 1 and tab 0  eq  1  then begin          goto  incrdate       endif else begin          jpt   jpt   1          if  jpt gt jptmax  then return  report lect : augmenter jptmax        endelse     Moyenne du champs tab         IF n_params  EQ 5 THEN if direc NE   then BEGIN          if nx EQ 1 OR ny EQ 1 OR nz EQ 1 THEN BEGIN             if string format a2 nomchamp  EQ  SO  then tab   reform tab  nx  ny   over                ELSE tab   reform tab  nx  ny  nz   over           ENDIF          tab   moyenne tab direc        endif       if  jpt eq 1  then begin          ttab   tab       endif else BEGIN          ttab   colle ttab  tab   size tab 0 1         endelse       time jpt 1    juldate vdat dec     Incrementation de la date         incrdate :       case fictyp of           DA  : caldat juldate vdat 1 month day year           MO  : begin             caldat julday month 1 year jourdsmois month day year             day 0          end           SE  : month month 1           AN  : year year 1       endcase       Fin de boucle de lecture des fichiers         vdat long 10000 year long 100 month day    ENDWHILE    if ttab 0  EQ  1 then return  report Aucun fichier n a ete lu        Ecriture du fichier      get_lun  numlec    openw  numlec  ficname   get_lun   swap_if_little_endian    taille   size ttab     writeu  numlec  long jpt long taille 0     case taille 0  of       1 : writeu  numlec long taille 1        2 : writeu  numlec long taille 1 long taille 2        3 : writeu  numlec long taille 1 long taille 2 long taille 3     endcase    writeu  numlec long time 0:jpt 1  ttab    writeu  numlec float lon1  lon2  lat1  lat2  prof1  prof2    ecriture info complementaire : nom du champs  de l experience    writeu  numlec  strmid varname 0 8     writeu  numlec  strmid vargrid 0 1     writeu  numlec  strmid varexp 0 3       close  numlec    free_lun  numlec    if keyword_set repeat  then begin     jpt   jpt   repeat     if  jpt gt jptmax  then begin       print   lect : augmenter jptmax        goto  fini     endif     tabadd   ttab     ti  endif      if n_elements oldboite  NE 0 then domdef   oldboite      close   all      IF keyword_set key_performance  THEN print   temps lect  systime 1 tempsun      return  ttab  end    "); 
    92 a[90] = new Array("./Obsolete/meshlec.html", "meshlec.pro", "", "             file_comments    lecture du mask des sorties d OPA  les sources se trouvent ds les   repertoires sur maia du type:    nom_exp RESTARTS      obsolete      examples   IDL  meshmask  nomfich       param nomfich  in required  string  c est le nom du fichier a lire  Par defaut  c est meshmask       keyword GLAMBOUNDARY  in  un vecteur de 2 elements specifaint le min et le   max qui doivent etre imposes en longitude  obligatoire si le   tableau depasse 360 degres       keyword pasblabla  in  pour suprimer les blablas      keyword DOUBLE  in  pour forcer a lire les tableaux en double          precision  ce Mot clef est maintenant active          automatiquement       keyword GETDIMENSIONS      uses common pro      restrictions    La definition de ixminmesh ixmaxmesh iyminmesh iymaxmesh     izminmesh izmaxmesh doit etre faite avant l entree dans cette    routine  pour attribuer automatiquement ces valeurs au maximum    possible les mettre toutes a  1 et meshlec les calculera       history Sebastien Masson  smasson lodyc jussieu fr        Marina Levy : lecture en double precision  cas calcul sur shine       version  Id: meshlec pro 134 2006 07 07 10:19:08Z navarro             pro meshlec  nomfich  PASBLABLA   pasblabla DOUBLE   double  GLAMBOUNDARY   glamboundary  GETDIMENSIONS   GETDIMENSIONS     compile_opt idl2  strictarrsubs  obsolete    common    tempsun   systime 1            pour key_performance        jpiglo        0L    jpjglo        0L    jpkglo        0L    tab       aaaaa       definition du domaine de la grille surlequel sont    effectuees les sorties les indices des tableaux commencant    a 1: cf le fichier wrivr2 F ds WKOPA sur le cray     LECTURE DU MASK trouve ds les fichiers restart                 constitution de l adresse s_fichier et       ouverture du fichier a l adresse s_fichier       IF n_params  EQ 0 then nomfich    meshmask     s_fichier   isafile file   nomfich  iodir   iodir     if not keyword_set pasblabla  then print         if not keyword_set pasblabla  then print adresse du fichier:  s_fichier     openr  numlec  s_fichier   get_lun   f77_unformatted   swap_if_little_endian    filepamameters   fstat numlec          lecture      readu  numlec  jpiglo  jpjglo  jpkglo    if not keyword_set pasblabla  then print   taille de la grille d origine:  jpiglo   jpjglo   jpkglo      if keyword_set getdimensions  then begin       free_lun numlec       close  numlec       return    endif      on determine si le fichier a ete ecrit en double precision on non     sizenumber   8l    sizefile8   4l 3l 4l 4l        4l 4l jpiglo jpjglo sizenumber 4l         4l 4l jpiglo jpjglo sizenumber 4l         4l 4l jpiglo jpjglo sizenumber 4l         4l 4l jpiglo jpjglo sizenumber 4l         4l 4l jpiglo jpjglo jpkglo sizenumber 4l         1l 4l jpiglo jpjglo sizenumber 4l         4l 4l jpkglo sizenumber 4l     if filepamameters size GE sizefile8 THEN double   1      sizenumber   4l      sizefile4   4l 3l 4l 4l          4l 4l jpiglo jpjglo sizenumber 4l           4l 4l jpiglo jpjglo sizenumber 4l           4l 4l jpiglo jpjglo sizenumber 4l           4l 4l jpiglo jpjglo sizenumber 4l           4l 4l jpiglo jpjglo jpkglo sizenumber 4l           1l 4l jpiglo jpjglo sizenumber 4l           4l 4l jpkglo sizenumber 4l    print  filepamameters size   sizefile4   sizefile8      case filepamameters size of         sizefile8:double   1         sizefile4:double   0         ELSE:BEGIN            nothing   report The OPA Mesh file as not the good size             free_lun numlec            close  numlec            return         END      endcase        if n_elements ixminmesh  EQ 0 THEN ixminmesh   0    if n_elements ixmaxmesh  EQ 0 then ixmaxmesh   jpiglo 1    if ixminmesh EQ  1 THEN ixminmesh   0    IF ixmaxmesh EQ  1 then ixmaxmesh   jpiglo 1    if n_elements iyminmesh  EQ 0 THEN iyminmesh   0    IF n_elements iymaxmesh  EQ 0 then iymaxmesh   jpjglo 1    if iyminmesh EQ  1 THEN iyminmesh   0    IF iymaxmesh EQ  1 then iymaxmesh   jpjglo 1    if n_elements izminmesh  EQ 0 THEN izminmesh   0    IF n_elements izmaxmesh  EQ 0 then izmaxmesh   jpkglo 1    if izminmesh EQ  1 THEN izminmesh   0    IF izmaxmesh EQ  1 then izmaxmesh   jpkglo 1         jpi      long ixmaxmesh ixminmesh 1     jpj      long iymaxmesh iyminmesh 1     jpk      long izmaxmesh izminmesh 1      doit on reellement lire la grille       meshparameters    jpiglo:jpiglo  jpjglo:jpjglo  jpkglo:jpkglo                          jpi:jpi  jpj:jpj  jpk:jpk                          ixminmesh:ixminmesh  ixmaxmesh:ixmaxmesh                          iyminmesh:iyminmesh  iymaxmesh:iymaxmesh                          izminmesh:izminmesh  izmaxmesh:izmaxmesh                          key_shift:key_shift         noticebase xnotice Lecture du fichier  C  s_fichier C         IF NOT keyword_set double  THEN BEGIN       z3d      fltarr jpiglo  jpjglo  jpkglo        z2d      fltarr jpiglo  jpjglo        z1d      fltarr jpkglo     ENDIF ELSE BEGIN       z3d      dblarr jpiglo  jpjglo  jpkglo        z2d      dblarr jpiglo  jpjglo        z1d      dblarr jpkglo     ENDELSE     if not keyword_set pasblabla  then print         readu  numlec  tab z2d    GLAMT float z2d ixminmesh:ixmaxmesh iyminmesh:iymaxmesh     if not keyword_set pasblabla  then print   tableau:  tab  exemple de valeur GLAMT 25 31 :  GLAMT 25 31     readu  numlec  tab z2d    GLAMU float z2d ixminmesh:ixmaxmesh iyminmesh:iymaxmesh     if not keyword_set pasblabla  then print   tableau:  tab  exemple de valeur GLAMU 25 31 :  GLAMU 25 31     readu  numlec  tab z2d    GLAMV float z2d ixminmesh:ixmaxmesh iyminmesh:iymaxmesh     if not keyword_set pasblabla  then print   tableau:  tab  exemple de valeur GLAMV 25 31 :  GLAMV 25 31     readu  numlec  tab z2d    GLAMF float z2d ixminmesh:ixmaxmesh iyminmesh:iymaxmesh     if not keyword_set pasblabla  then print   tableau:  tab  exemple de valeur GLAMF 25 31 :  z2d 25 31      if not keyword_set pasblabla  then print         readu  numlec  tab  z2d    GPHIT float z2d ixminmesh:ixmaxmesh iyminmesh:iymaxmesh     if not keyword_set pasblabla  then print   tableau:  tab  exemple de valeur GPHIT 25 31 :  GPHIT 25 31     readu  numlec  tab  z2d    GPHIU float z2d ixminmesh:ixmaxmesh iyminmesh:iymaxmesh     if not keyword_set pasblabla  then print   tableau:  tab  exemple de valeur GPHIU 25 31 :  GPHIU 25 31     readu  numlec  tab  z2d    GPHIV float z2d ixminmesh:ixmaxmesh iyminmesh:iymaxmesh     if not keyword_set pasblabla  then print   tableau:  tab  exemple de valeur GPHIV 25 31 :  GPHIV 25 31     readu  numlec  tab  z2d    GPHIF float z2d ixminmesh:ixmaxmesh iyminmesh:iymaxmesh     if not keyword_set pasblabla  then print   tableau:  tab  exemple de valeur GPHIF 25 31 :  z2d 25 31      if not keyword_set pasblabla  then print         readu  numlec  tab  z2d    E1T float z2d ixminmesh:ixmaxmesh iyminmesh:iymaxmesh     if not keyword_set pasblabla  then print   tableau:  tab  exemple de valeur E1T 25 5 :  z2d 25 5     readu  numlec  tab  z2d    E1U float z2d ixminmesh:ixmaxmesh iyminmesh:iymaxmesh     if not keyword_set pasblabla  then print   tableau:  tab  exemple de valeur E1U 25 5 :  z2d 25 5     readu  numlec  tab  z2d    E1V float z2d ixminmesh:ixmaxmesh iyminmesh:iymaxmesh     if not keyword_set pasblabla  then print   tableau:  tab  exemple de valeur E1V 25 5 :  z2d 25 5     readu  numlec  tab  z2d    E1F float z2d ixminmesh:ixmaxmesh iyminmesh:iymaxmesh     if not keyword_set pasblabla  then print   tableau:  tab  exemple de valeur E1F 25 5 :  z2d 25 5      if not keyword_set pasblabla  then print         readu  numlec  tab  z2d    E2T float z2d ixminmesh:ixmaxmesh iyminmesh:iymaxmesh     if not keyword_set pasblabla  then print   tableau:  tab  exemple de valeur E2T 25 5 :  z2d 25 5     readu  numlec  tab  z2d    E2U float z2d ixminmesh:ixmaxmesh iyminmesh:iymaxmesh     if not keyword_set pasblabla  then print   tableau:  tab  exemple de valeur E2U 25 5 :  z2d 25 5     readu  numlec  tab  z2d    E2V float z2d ixminmesh:ixmaxmesh iyminmesh:iymaxmesh     if not keyword_set pasblabla  then print   tableau:  tab  exemple de valeur E2V 25 5 :  z2d 25 5     readu  numlec  tab  z2d    E2F float z2d ixminmesh:ixmaxmesh iyminmesh:iymaxmesh     if not keyword_set pasblabla  then print   tableau:  tab  exemple de valeur E2F 25 5 :  z2d 25 5      if not keyword_set pasblabla  then print         readu  numlec  tab  z3d    TMASK byte z3d ixminmesh:ixmaxmesh iyminmesh:iymaxmesh izminmesh:izmaxmesh     if not keyword_set pasblabla  then print   tableau:  tab  exemple de valeur TMASK 25 5 0 :  TMASK 25 5 0     readu  numlec  tab  z3d    UMASKred byte z3d ixmaxmesh iyminmesh:iymaxmesh izminmesh:izmaxmesh     umaskred   reform umaskred     if not keyword_set pasblabla  then print   tableau:  tab  exemple de valeur UMASK 25 5 0 :  z3d 25 5 0     readu  numlec  tab  z3d    VMASKred byte z3d ixminmesh:ixmaxmesh iymaxmesh izminmesh:izmaxmesh     vmaskred   reform vmaskred     if not keyword_set pasblabla  then print   tableau:  tab  exemple de valeur VMASK 25 5 0 :  z3d 25 5 0     readu  numlec  tab  z3d    fmaskredy byte z3d ixmaxmesh iyminmesh:iymaxmesh izminmesh:izmaxmesh     coast   where fmaskredy NE 0 and fmaskredy NE 1     IF coast 0  NE  1 THEN fmaskredy coast    0b    fmaskredx byte z3d ixminmesh:ixmaxmesh iymaxmesh izminmesh:izmaxmesh     coast   where fmaskredx NE 0 and fmaskredx NE 1     IF coast 0  NE  1 THEN fmaskredx coast    0b    fmaskredx   reform fmaskredx     fmaskredy   reform fmaskredy     if not keyword_set pasblabla  then print   tableau:  tab  exemple de valeur FMASK 25 5 0 :  z3d 25 5 0       if not keyword_set pasblabla  then print         readu  numlec  tab  z2d  FF z2d ixminmesh:ixmaxmesh iyminmesh:iymaxmesh     if not keyword_set pasblabla  then print   tableau:  tab  exemple de valeur FF 25 5 :  z2d 25 5     readu  numlec  tab  z1d    GDEPT float z1d izminmesh:izmaxmesh     if not keyword_set pasblabla  then print   tableau:  tab  exemple de valeur GDEPT 1 :  GDEPT 1     readu  numlec  tab  z1d    GDEPW float z1d izminmesh:izmaxmesh     if not keyword_set pasblabla  then print   tableau:  tab  exemple de valeur GDEPW 1 :  GDEPW 1     readu  numlec  tab  z1d    E3T float z1d izminmesh:izmaxmesh     if not keyword_set pasblabla  then print   tableau:  tab  exemple de valeur E3T 3 :  E3T 3     readu  numlec  tab  z1d    E3W float z1d izminmesh:izmaxmesh     if not keyword_set pasblabla  then print   tableau:  tab  exemple de valeur E3W 3 :  E3W 3       free_lun numlec    close  numlec       bornes de glam qui ne doivent pas depasser 360 degres         minglam   min glamt  max   maxglam       if maxglam minglam GE 360 AND NOT keyword_set glamboundary  then         nothing   execute glamboundary    xquestion What are the longitudes boundary   180 180 chkwidget       if keyword_set glamboundary  then begin       if glamboundary 0  NE glamboundary 1  then begin          glamt   glamt MOD 360          smaller   where glamt LT glamboundary 0           if smaller 0  NE  1 then glamt smaller    glamt smaller 360          bigger   where glamt GE glamboundary 1           if bigger 0  NE  1 then glamt bigger    glamt bigger 360          glamu   glamu MOD 360          smaller   where glamu LT glamboundary 0           if smaller 0  NE  1 then glamu smaller    glamu smaller 360          bigger   where glamu GE glamboundary 1           if bigger 0  NE  1 then glamu bigger    glamu bigger 360          glamv   glamv MOD 360          smaller   where glamv LT glamboundary 0           if smaller 0  NE  1 then glamv smaller    glamv smaller 360          bigger   where glamv GE glamboundary 1           if bigger 0  NE  1 then glamv bigger    glamv bigger 360          glamf   glamf MOD 360          smaller   where glamf LT glamboundary 0           if smaller 0  NE  1 then glamf smaller    glamf smaller 360          bigger   where glamf GE glamboundary 1           if bigger 0  NE  1 then glamf bigger    glamf bigger 360       endif    endif     shift en x      if keyword_set key_shift  AND jpi NE 1 then begin       glamt   shift glamt key_shift   0        gphit   shift gphit key_shift   0        e1t   shift e1t  key_shift  0        e2t   shift e2t key_shift   0        glamu   shift glamu  key_shift  0        gphiu   shift gphiu  key_shift  0        e1u   shift e1u key_shift   0        e2u   shift e2u  key_shift  0        glamv   shift glamv  key_shift  0        gphiv   shift gphiv  key_shift  0        e1v   shift e1v key_shift   0        e2v   shift e2v  key_shift  0        glamf   shift glamf  key_shift  0        gphif   shift gphif  key_shift  0        e1f   shift e1f  key_shift   0        e2f   shift e2f  key_shift  0        if jpk EQ 1 then begin          tmask   shift tmask  key_shift  0           vmaskred   shift vmaskred  key_shift           fmaskredx   shift fmaskredx  key_shift        ENDIF ELSE BEGIN          tmask   shift tmask  key_shift  0 0           vmaskred   shift vmaskred  key_shift  0           fmaskredx   shift fmaskredx  key_shift  0        ENDELSE    endif      key_yreverse   0    key_zreverse   0    key_partialstep   0    key_stride    1  1  1     key_gridtype    c       if not keyword_set pasblabla  then print lecture  nomfich  finie     widget_control  noticebase  bad_id   toto   destroy    if keyword_set key_performance  THEN print   temps meshlec  systime 1 tempsun     return end    "); 
    93 a[91] = new Array("./Obsolete/ncdf_meshlec.html", "ncdf_meshlec.pro", "", "           file_comments    use ncdf_meshread instead       obsolete      param filename      keyword _EXTRA used to pass your keywords      history   Aug  2005  Sebastien Masson: switch to ncdf_meshread      version  Id: ncdf_meshlec pro 134 2006 07 07 10:19:08Z navarro             PRO ncdf_meshlec  filename  _EXTRA   ex       compile_opt idl2  strictarrsubs  obsolete     CASE n_params  OF     0:ncdf_meshread  _EXTRA   ex     1:ncdf_meshread  filename  _EXTRA   ex   ENDCASE     return END"); 
    94 a[92] = new Array("./Obsolete/nlec.html", "nlec.pro", "", "           file_comments    lit les fichiers Net Cdf de l experience TOTEM ECMWF qui sont sur   maia:  u rech eee reee217 TOTEM REF OUTPUTS      obsolete      param name  in required  nom du tableau contenant le champ que l on veut  le   trouver avec ncdflec fichier var      param debut  in  nombres de 6 ou 8 chiffres  anneemoisjour  par ex:19980507     param fin  in  nombres de 6 ou 8 chiffres  anneemoisjour  par ex:19980507     param nomexperience  in optional  trois lettres designant le nom de l experience        keyword BOITE boite sur laquelle integrer  par defaut tt le domaine       keyword DIREC  x   y   z   xy   xz   yz   xyz  directions selon lesquelles               effectuer les moyennes  si rien n est donne on n effectue pas de moyenne       keyword GRILLE impose la grille a laquelle est rapporte le champ  rq permet   d aller plus vite ds la lecture      keyword TOUT oblige a lire le tableau entier en non pas celui reduit a domdef    keyword STRUCTURE    keyword SEUILMIN    keyword SEUILMAX    keyword NAN      keyword _EXTRA used to pass your keywords      uses common pro vraidate juldate  nlec5j nlecserie      history Sebastien Masson  smasson lodyc jussieu fr      14 8 98      version  Id: nlec pro 134 2006 07 07 10:19:08Z navarro          REF 07 790101 grid T nc  REF 07 790101 grid U nc  REF 07 790101 grid V nc  REF 07 790101 grid W nc     function nlec name debut fin nomexperience BOITE boite DIREC direc GRILLE grille TOUT tout                   STRUCTURE   structure  SEUILMIN   seuilmin  SEUILMAX   seuilmax  NAN   nan                   _EXTRA   ex     compile_opt idl2  strictarrsubs  obsolete    common      tempsun   systime 1            pour key_performance    nom strlowcase name      specification de la date et de l experience      case n_params  of       1:BEGIN          year year 1900 year ne 0 and year ne  1 and year lt 100           date   day 100 month 10000 year       end       2:BEGIN          if size debut   tname  EQ  STRING  then begin             prefix   strupcase debut              year year 1900 year ne 0 and year ne  1 and year lt 100              date   day 100 month 10000 year          ENDIF ELSE BEGIN             date   debut             rien juldate date           ENDELSE       end       3:begin          date   debut          rien juldate date           if size fin   tname  EQ  STRING  then begin             prefix   strupcase fin           ENDIF ELSE BEGIN             date2 vraidate fin              year2 date2 10000             month2 date2 100   year2 100             day2 date2   year2 10000   month2 100          ENDELSE       end       4:BEGIN          date   debut          rien juldate date            if size nomexperience   tname  EQ  STRING  then begin             prefix   strupcase nomexperience              date2   fin          ENDIF ELSE BEGIN             prefix   strupcase fin              date2   nomexperience          ENDELSE          date2 vraidate date2           year2 date2 10000          month2 date2 100   year2 100          day2 date2   year2 10000   month2 100       end    endcase    date   long date     if n_elements date2  NE 0 then date2   long date2     if n_elements date2  NE 0 then if date2 eq date then tempvar   SIZE TEMPORARY date2      verification de la coherence des dates      if n_elements date2  ne 0 then begin       if  day    EQ 0 AND day2  NE 0  OR  month EQ 0 AND month2 NE 0  OR           year   EQ 0 AND year2 NE 0  or  day2  EQ 0 AND day    NE 0  OR           month2 EQ 0 AND month NE 0  OR  year2 EQ 0 AND year   NE 0  then          return   report verifier la coherence des dates        if date2 le date then return  report date2 doit etre posterieure a date     endif     case sur le type de fichiers que l on veut lire    determination ds chaque cas de numsortie et nbretps      if day NE 0 then begin         SORTIES A 5 JOURS     numsortie   testjour:       numsortie 1 julday month day year julday 1 1 year 5 0        if numsortie ne floor numsortie  then begin          if n_elements date2  ne 0 then begin             caldat julday month day 1 year month day year             goto  testjour          endif          return    1       ENDIF       numsortie   long numsortie      determination du nombre de pas de tps a extraire pour la serie temporelle   entiere: nbretps         if n_elements date2  ne 0 then begin          testjour2:          numsortie2 1 julday month2 day2 year2 julday 1 1 year2 5           if numsortie2 ne floor numsortie2  then begin             caldat julday month2 day2 1 year2 month2 day2 year2             goto  testjour2          endif          if year eq year2 then nbretps numsortie2 numsortie 1 else             nbretps 73 numsortie 1 year2 year 1 73 numsortie2          numsortie2   long numsortie2        endif else nbretps 1       nbretps   long nbretps      si on fait une serie temporelle on cherche a lire plutot un fichier   contenant deja une serie temporelle par contre pour une sortie   unique on cherche d abord a lire un fichier contenant toutes les variables          IF n_elements date2  ne 0 THEN BEGIN          serie:          IF n_elements dejaserie  eq 1 then return   1          datejul   5 numsortie 1 julday 1  1  year           if n_elements date2  ne 0 then date2jul   5 numsortie2 1 julday 1  1  year2             ELSE date2jul   datejul          res   nlecserie nom  datejul  date2jul BOITE boite GRILLE grille TOUT tout  _EXTRA   ex           IF res 0  EQ  1 THEN BEGIN             dejaserie   1             GOTO   passerie          ENDIF       ENDIF ELSE BEGIN          passerie:          IF n_elements dejapasserie  eq 1 then return   1          res     nlec5j  nom  numsortie    nbretps BOITE boite GRILLE grille TOUT tout  _EXTRA   ex           IF res 0  EQ  1 THEN BEGIN             dejapasserie   1             GOTO   serie          ENDIF       endelse    ENDIF ELSE BEGIN       CASE 1 of          month NE 0 AND year NE 0:BEGIN   SORTIES MENSUELLES             numsortie79    year 1979 12 month             if n_elements date2  ne 0 then nbretps   month2 month 1 12 year2 year                ELSE nbretps   1             res   nlecmois nom numsortie79 nbretps  BOITE boite GRILLE grille TOUT tout  _EXTRA   ex           end          month EQ 0 AND year NE 0:BEGIN   SORTIES ANNUELLES             numsortie79    year 1978              if n_elements date2  ne 0 then nbretps   year2 year 1               ELSE nbretps   1             res   nlecan nom numsortie79 nbretps  BOITE boite GRILLE grille TOUT tout  _EXTRA   ex           end          month NE 0 AND year EQ 0:BEGIN   SORTIES SAISONNIERES             numsortie79   month             if n_elements date2  ne 0 then nbretps   month2 month 1               ELSE nbretps   1             res   nlecsaison nom numsortie79 nbretps  BOITE boite GRILLE grille TOUT tout  _EXTRA   ex           end          month EQ 0 AND year EQ 0:BEGIN   SORTIES CLIMATOLOGIQUE             numsortie79   13             nbretps   1             res   nlecsaison nom numsortie79 nbretps  BOITE boite GRILLE grille TOUT tout  _EXTRA   ex           end       endcase    endelse      seuil      if n_elements seuilmin  NE 0 then BEGIN       if n_elements valmask  EQ 0 then valmask   1e20       terre   where res GT valmask 10        res   seuilmin   res       if terre 0  NE  1 then res terre    valmask       undefine  terre    endif    if n_elements seuilmax  NE 0 then begin       if n_elements valmask  EQ 0 then valmask   1e20       terre   where res GT valmask 10        res   res   seuilmax       if terre 0  NE  1 then res terre    valmask       undefine  terre    endif     points a metre a nan      if n_elements nan  NE 0 then BEGIN       if n_elements valmask  EQ 0 then valmask   1e20       if abs valmask  LT 1e6 then terre   where abs res  GT abs valmask 10          ELSE terre   where res EQ valmask        if abs nan  LT 1e6 then notan   where res EQ nan          ELSE notan   where abs res  GT abs nan        if notan 0  NE  1 then res notan     values f_nan       notan   notan 0  NE  1       if terre 0  NE  1 then res terre    valmask       undefine  terre    endif     ajustement de niveau pour les tableau 2d simples      if jpt EQ 1 then begin       taille   size res        IF taille 0  EQ 2 THEN niveau   1    endif     moyenne eventuelle      IF keyword_set direc  THEN BEGIN       IF jpt EQ 1 THEN res   moyenne res direc BOITE boite  nan   notan          ELSE res   grossemoyenne res direc BOITE boite  nan   notan     ENDIF     mise en placer des parametres pour le trace        if keyword_set boite  then legende_pltt   boite ELSE legende_pltt    lon1  lon2  lat1  lat2        IF n_elements res  NE 1 THEN res   reform res over     IF NOT keyword_set direc  THEN domdef  lon1  lon2  lat1  lat2  prof1  prof2  _extra   ex  grille   vargrid      ELSE if direc eq  t  then domdef  lon1  lon2  lat1  lat2  prof1  prof2  _extra   ex  grille   vargrid      if keyword_set structure  then res    tab:res  grille:vargrid  unite:varunit  experience:varexp  nom:varname       if keyword_set key_performance  THEN print   temps nlec  systime 1 tempsun    time   time 2l    return res     end"); 
    95 a[93] = new Array("./Obsolete/nlec5j.html", "nlec5j.pro", "", "           file_comments    lit les fichiers Net Cdf de l experience TOTEM ECMWF qui   contiennent les sorties a 5j regroupees par type de grille par   paquets de 6 mois    sur maia:  u rech eee reee217 TOTEM REF OUTPUTS      obsolete      categories    Reading      examples   IDL  res nlec5j  nom  numsortie  nbretps       param nom  in required  nom du tableau contenant le champ que l on veut  le   trouver avec ncdflec fichier var      param numsortie  in required    le numero du pas de temps que l on veut sortir du   fichier  compte a partir de 1  a partir de year      param nbretps  in required  nombre de pas de temps a extraire      keyword BOITE boite sur laquelle integrer  par defaut tt le domaine       keyword GRILLE impose la grille a laquelle est rapporte le champ  rq permet   d aller plus vite ds la lecture      keyword TOUT oblige a lire le tableau entier en non pas celui reduit a domdef      keyword _EXTRA used to pass your keywords     returns tableau 2d  qd on ne demande pas de serie  ou 3d ou 4d ds le cas dune serie      uses common pro      restrictions appele par nlec      history Sebastien Masson  smasson lodyc jussieu fr         version  Id: nlec5j pro 157 2006 08 21 09:01:50Z navarro             function nlec5j  nom  numsortie  nbretps BOITE   boite  GRILLE grille TOUT tout  _EXTRA   ex     compile_opt idl2  strictarrsubs  obsolete    common      res 1    anneedepart 1979     gestion du nom du fichier      if numsortie le 36 then BEGIN       mmdd 0101        numsort numsortie    ENDIF  else BEGIN       if leapyr year  then mmdd 0629  else mmdd 0630        numsort numsortie 36    endelse    case 1 of       year lt 10:                 s_year  0 string format i1 year        year lt 100 and year ge 10 :s_year      string format i2 year        year ge 100:                s_year      string format i2 year 1900 year LT 2000     endcase    numfich year anneedepart 2 7 mmdd ne  0101     s_date s_year mmdd    if numfich lt 10 then numfich 0 string format i1 numfich       else numfich     string format i2 numfich      gestion du nom de la grille en testant les differentes possibilites   et ouverture du fichier      if keyword_set grille  then begin       vargrid grille       nomfich prefix numfich s_date grid vargrid nc        IF  version OS_FAMILY EQ  unix  THEN spawn   file  iodir nomfich     dev null        cdfid ncdf_open iodir nomfich        varcontient ncdf_varinq cdfid nom     endif else begin   liste des fichiers pouvant convenir       quelsfichiers   findfile iodir prefix numfich s_date grid        IF quelsfichiers 0  EQ   THEN BEGIN   liste vide          if keyword_set bavard  then             ras   report LES FICHIERS:  iodir prefix numfich s_date grid  n existe pas           return    1       ENDIF       for i 0 n_elements quelsfichiers 1 do begin          IF  version OS_FAMILY EQ  unix  THEN spawn   file  quelsfichiers i     dev null           cdfid ncdf_open quelsfichiers i           contient ncdf_inquire cdfid           for varid 0 contient nvars 1 do BEGIN   ds les fichiers existants on             varcontient ncdf_varinq cdfid varid    cherche le nom des variables             if varcontient name eq nom then BEGIN                vargrid strmid quelsfichiers i strpos quelsfichiers i grid 5 1   nom de grille                goto  grilletrouvee             ENDIF          endfor          ncdf_close cdfid       endfor       if keyword_set bavard  then          ras   report La variable  nom  n existe pas ds les fichiers iodir prefix numfich s_date grid        return    1    endelse grilletrouvee:     lecture de certains attributs      ncdf_attget cdfid nom title value    varname string value     ncdf_attget cdfid nom units value    varunit string value     if rstrpos varname  eq  1 then varname varname   varunit     if month lt 10 then s_month 0 string format i1 month       else s_month     string format i2 month     if day lt 10 then s_day 0 string format i1 day       else s_day     string format i2 day     vardate s_year s_month s_day    ncdf_attget cdfid file_name value global    varexp string value 0: where value EQ  byte 0 0 1        extraction du tableau qui nous interesse       determination du domaine geographique      if keyword_set tout  then begin       nx jpi       ny jpj       nz jpk       premierx   0       premiery   0       premierz   0    endif else BEGIN     redefinition eventuelle du domaine ajuste a boite  a 6 elements      on recupere la dim du no9uveau domaine         if keyword_set boite  then BEGIN          Case  N_Elements Boite  Of             1:Domdef  lon1  lon2  lat1  lat2  0 boite 0 GRILLE vargrid  _EXTRA   ex             2:Domdef  lon1  lon2  lat1  lat2  boite 0 boite 1 GRILLE vargrid  _EXTRA   ex             4:Domdef   Boite  prof1  prof2 GRILLE vargrid  _EXTRA   ex             5:Domdef   Boite 0:3  0  Boite 4 GRILLE vargrid  _EXTRA   ex             6:Domdef  Boite GRILLE vargrid  _EXTRA   ex             Else: return  report Mauvaise Definition de Boite           endcase       ENDIF       grille  mask  glam  gphi  gdep  nx  ny nz premierx premiery  premierz  dernierx  derniery  dernierz    ENDELSE     determination du nombre de pas de tps a extraire ds ce fichier      if nbretps gt 36 1 mmdd ne  0101 numsort 1 then nt 36 1 mmdd ne  0101 numsort 1      else nt nbretps        if varcontient ndims eq 3 then       ncdf_varget cdfid nom res offset premierx premiery numsort 1 count nx ny nt       else       ncdf_varget cdfid nom res offset premierx premiery  premierz numsort 1 count nx ny nz nt      rappel en boucle de nlec si il faut ouvrir de nouveaux fichiers   pour constituer la serie temporelle      if nbretps gt 36 1 mmdd ne  0101 numsort 1 then begin       if mmdd ne  0101  then year   year 1       if varcontient ndims eq 3 then          res    res                   nlec5j nom 1 36 mmdd eq  0101 nbretps nt tout tout GRILLE vargrid BOITE boite          ELSE BEGIN        res res                 nlec5j nom 1 36 mmdd eq  0101 nbretps nt tout tout GRILLE vargrid  BOITE boite         res reform res nx ny nz nbretps   over      ENDELSE       ncdf_varget cdfid time_counter temps  offset    numsort 1 count nt        time    long temps julday 1  5  1979  time        jpt nt jpt    endif else BEGIN       ncdf_varget cdfid time_counter temps  offset    numsort 1 count nt        time   long temps julday 1  5  1979        jpt nt    endelse      ncdf_close cdfid    return res     end"); 
    96 a[94] = new Array("./Obsolete/nlecan.html", "nlecan.pro", "", "           file_comments   lit les moyennes annuelles   sur maia:  u rech eee reee217 TOTEM REF OUTPUTS      obsolete    categories    Reading      examples   IDL  res nlecan nom  numsortie79  nbretps       param nom  in required  nom du tableau contenant le champ que l on veut  le   trouver avec ncdflec fichier var      param numsortie79  in required  le numero du pas de temps que l on veut sortir du   fichier  compte a partir de 1  a partir de 79      param nbretps  in required  nombre de pas de temps a extraire      keyword BOITE  boite sur laquelle integrer  par defaut tt le domaine       keyword GRILLE impose la grille a laquelle est rapporte le champ  rq permet   d aller plus vite ds la lecture      keyword TOUT oblige a lire le tableau entier en non pas celui reduit a domdef      keyword _EXTRA used to pass your keywords      returns tableau 2d  qd la serie ne fait que 1 pas de temps  ou   3d  valable ds 1 premier tps que pour les tableaux 2d       uses common pro      restrictions appele par nlec      history Sebastien Masson  smasson lodyc jussieu fr       version  Id: nlecan pro 157 2006 08 21 09:01:50Z navarro            REF moyenne annuelle grid T nc   function nlecan  nom  numsortie79  nbretps BOITE   boite GRILLE grille TOUT tout  _EXTRA   ex     compile_opt idl2  strictarrsubs  obsolete    common        res 1    anneedepart 1979     gestion du nom de la grille en testant les differentes possibilites   et ouverture du fichier      if keyword_set grille  then begin       vargrid grille       nomfich prefix moyenne annuelle grid vargrid nc        IF  version OS_FAMILY EQ  unix  THEN spawn   file  iodir nomfich     dev null        cdfid ncdf_open iodir nomfich        varcontient ncdf_varinq cdfid nom     endif else begin   liste des fichiers pouvant convenir       quelsfichiers   findfile iodir prefix moyenne annuelle grid        IF quelsfichiers 0  EQ   THEN     liste vide          return   report LES FICHIERS:  iodir prefix moyenne annuelle grid  n existe pas        for i 0 n_elements quelsfichiers 1 do begin          IF  version OS_FAMILY EQ  unix  THEN spawn   file  quelsfichiers i     dev null           cdfid ncdf_open quelsfichiers i           contient ncdf_inquire cdfid           for varid 0 contient nvars 1 do BEGIN     ds les fichiers existants on             varcontient ncdf_varinq cdfid varid    cherche le nom des variables             if varcontient name eq nom then BEGIN                vargrid strmid quelsfichiers i strpos quelsfichiers i grid 5 1   nom de grille                goto  grilletrouvee             ENDIF          endfor          ncdf_close cdfid       endfor       return  report La variable  nom  n existe pas ds les fichiers iodir prefix moyenne annuelle grid     endelse grilletrouvee:     lecture de certains attributs et de l axe des temps      ncdf_attget cdfid nom title value    varname string value     ncdf_attget cdfid nom units value    varunit string value     if rstrpos varname  eq  1 then varname varname   varunit     varexp prefix     lecture de l axe des temps      ncdf_varget cdfid time_counter time  offset    numsortie79 1 count nbretps     time   long time julday 12  31  1978     jpt nbretps    IF jpt EQ 1 THEN BEGIN       caldat  time 0  month  day  year       case 1 of          year lt 10:                 s_year  0 string format i1 year           year lt 100 and year ge 10 :s_year      string format i2 year           year ge 100:                s_year      string format i2 year 1900        endcase       vardate annee:  s_year    endif       extraction du tableau qui nous interesse         determination du domaine geographique      if keyword_set tout  then begin       nx jpi       ny jpj       nz jpk       glam 1        gphi 1        gdep 1        premierx   0       premiery   0       premierz   0    endif else BEGIN     redefinition eventuelle du domaine ajuste a boite  a 6 elements      on recupere la dim du no9uveau domaine         if keyword_set boite  then BEGIN          Case N_Elements Boite  Of             1:Domdef  lon1  lon2  lat1  lat2  0 boite 0 GRILLE vargrid  _EXTRA   ex             2:Domdef  lon1  lon2  lat1  lat2  boite 0 boite 1 GRILLE vargrid  _EXTRA   ex             4:Domdef   Boite prof1  prof2 GRILLE vargrid  _EXTRA   ex             5:Domdef   Boite 0:3  0  Boite 4 GRILLE vargrid  _EXTRA   ex             6:Domdef  Boite GRILLE vargrid  _EXTRA   ex             Else:return  report Mauvaise Definition de Boite           endcase       ENDIF       grille  mask  glam  gphi  gdep  nx  ny nz premierx premiery  premierz    ENDELSE      if varcontient ndims eq 3 then       ncdf_varget cdfid nom res offset premierx premiery numsortie79 1         count nx ny nbretps  else       ncdf_varget cdfid nom res offset premierx premiery  premierz numsortie79 1         count nx ny nz nbretps       ncdf_close cdfid    return res     end"); 
    97 a[95] = new Array("./Obsolete/nlecmois.html", "nlecmois.pro", "", "             file_comments   lit les fichiers Net Cdf  de moyenne mensuel  de   l experience TOTEM ECMWF qui sont sur   maia:  u rech eee reee217 TOTEM REF OUTPUTS      obsolete      keyword BOITE boite sur laquelle integrer  par defaut tt le domaine       keyword GRILLE impose la grille a laquelle est rapporte le champ  rq permet   d aller plus vite ds la lecture      keyword TOUT oblige a lire le tableau entier en non pas celui reduit a domdef      keyword _EXTRA used to pass your keywords      uses common pro      history Sebastien Masson  smasson lodyc jussieu fr       version  Id: nlecmois pro 134 2006 07 07 10:19:08Z navarro            REF moyenne mensuelle 79 81 grid T nc   function nlecmois nom numsortie79 nbretps  BOITE boite GRILLE grille TOUT tout  _EXTRA   ex     compile_opt idl2  strictarrsubs  obsolete    common      res  1     annee du nom du 1er fichier      annee   floor floor numsortie79 1 12 3 3 79     gestion du nom de la grille en testant les differentes possibilites   et ouverture du fichier      if keyword_set grille  then begin       vargrid grille       nomfich prefix moyenne mensuelle strtrim annee  1 strtrim annee 2  1 grid vargrid nc        IF  version OS_FAMILY EQ  unix  THEN spawn   file  iodir nomfich     dev null        cdfid ncdf_open iodir nomfich        varcontient ncdf_varinq cdfid nom     endif else begin   liste des fichiers pouvant convenir       quelsfichiers   findfile iodir prefix moyenne mensuelle strtrim annee  1 strtrim annee 2  1 grid        IF quelsfichiers 0  EQ   THEN     liste vide          return  report LES FICHIERS:  iodir prefix moyenne mensuelle strtrim annee  1 strtrim annee 2  1 grid  n existe pas        for i 0 n_elements quelsfichiers 1 do begin          IF  version OS_FAMILY EQ  unix  THEN spawn   file  quelsfichiers i     dev null           cdfid ncdf_open quelsfichiers i           contient ncdf_inquire cdfid           for varid 0 contient nvars 1 do BEGIN   ds les fichiers existants on             varcontient ncdf_varinq cdfid varid    cherche le nom des variables             if varcontient name eq nom then BEGIN                vargrid strmid quelsfichiers i strpos quelsfichiers i grid 5 1   nom de grille                goto  grilletrouvee             ENDIF          endfor          ncdf_close cdfid       endfor       return  report La variable  nom  n existe pas ds les fichiers iodir prefix moyenne mensuelle strtrim annee  1 strtrim annee 2  1 grid     endelse grilletrouvee:     lecture de certains attributs et de l axe des temps      ncdf_attget cdfid nom title value    varname string value     ncdf_attget cdfid nom units value    varunit string value     if rstrpos varname  eq  1 then varname varname   varunit     varexp prefix     determination du domaine geographique      if keyword_set tout  then begin       nx jpi       ny jpj       nz jpk       premierx 0       premiery 0       premierz 0    endif else BEGIN     redefinition eventuelle du domaine ajuste a boite  a 6 elements      on recupere la dim du no9uveau domaine         if keyword_set boite  then BEGIN          Case N_Elements Boite  Of             1:Domdef  lon1  lon2  lat1  lat2  0 boite 0 GRILLE vargrid  _EXTRA   ex             2:Domdef  lon1  lon2  lat1  lat2  boite 0 boite 1 GRILLE vargrid  _EXTRA   ex             4:Domdef   Boite  prof1  prof2 GRILLE vargrid  _EXTRA   ex             5:Domdef   Boite 0:3  0  Boite 4 GRILLE vargrid  _EXTRA   ex             6:Domdef  Boite GRILLE vargrid  _EXTRA   ex             Else:return   report Mauvaise Definition de Boite           endcase       ENDIF       grille  mask  glam  gphi  gdep  nx  ny nz premierx premiery  premierz    ENDELSE     determination du nombre de pas de tps a extraire ds ce fichier      numsortie   numsortie79 12 annee 79     if nbretps numsortie 1 gt 36 then nt 36 numsortie 1      else nt nbretps    numsortie   numsortie79 12 annee 79        if varcontient ndims eq 3 then       ncdf_varget cdfid nom res offset premierx premiery numsortie 1 count nx ny nt  else       ncdf_varget cdfid nom res offset premierx premiery premierz numsortie 1 count nx ny nz nt      rappel en boucle de nlec si il faut ouvrir de nouveaux fichiers   pour constituer la serie temporelle      if nbretps gt 36 numsortie 1 then begin       if varcontient ndims eq 3 then          res    res                   nlecmois nom numsortie79 nt nbretps nt tout tout GRILLE vargrid BOITE boite          else BEGIN          res res                   nlecmois nom numsortie79 nt nbretps nt tout tout GRILLE vargrid BOITE boite            res reform res nx ny nz nbretps   over        ENDELSE       ncdf_varget cdfid time_counter temps  offset    numsortie 1 count nt        time    long temps julday 12  31  1978  time        jpt nt jpt    endif else BEGIN       ncdf_varget cdfid time_counter temps  offset    numsortie 1 count nt        time   long temps julday 12  31  1978        jpt nt    endelse      ncdf_close cdfid    IF n_elements time  EQ 1 THEN BEGIN       caldat  time  m  d  y       if m lt 10 then m 0 string format i1 m          else m     string format i2 m        if n_elements langage  EQ 0 then langage    non definit        if langage EQ  gb  then vardate   strtrim y  1   string format C CMoA 31 m 1          ELSE vardate   string format C CMoA 31 m 1   strtrim y  1     endif      return res     end"); 
    98 a[96] = new Array("./Obsolete/nlecsaison.html", "nlecsaison.pro", "", "           file_comments   lit les moyennes annuelles   sur maia:  u rech eee reee217 TOTEM REF OUTPUTS      obsolete      categories    Reading      examples   IDL  res nlecsaison nom  numsortie79  nbretps       param nom  in required  nom du tableau contenant le champ que l on veut  le   trouver avec ncdflec fichier var      param numsortie79  in required  le numero du pas de temps que l on veut sortir du   fichier  compte a partir de 1  a partir de 79      param nbretps  in required  nombre de pas de temps a extraire      keyword BOITE boite sur laquelle integrer  par defaut tt le domaine       keyword GRILLE impose la grille a laquelle est rapporte le champ  rq permet   d aller plus vite ds la lecture      keyword TOUT oblige a lire le tableau entier en non pas celui reduit a domdef      keyword _EXTRA used to pass your keywords      returns tableau 2d  qd la serie ne fait que 1 pas de temps  ou   3d  valable ds 1 premier tps que pour les tableaux 2d       uses common pro      restrictions appele par nlec      history Sebastien Masson  smasson lodyc jussieu fr         version  Id: nlecsaison pro 157 2006 08 21 09:01:50Z navarro          REF saisonnier climato grid T nc     function nlecsaison  nom  numsortie79  nbretps BOITE   boite  GRILLE grille TOUT tout  _EXTRA   ex     compile_opt idl2  strictarrsubs  obsolete    common        res 1    anneedepart 1979     gestion du nom de la grille en testant les differentes possibilites   et ouverture du fichier      if keyword_set grille  then begin       vargrid grille       nomfich prefix saisonnier climato grid vargrid nc        IF  version OS_FAMILY EQ  unix  THEN spawn   file  iodir nomfich     dev null        cdfid ncdf_open iodir nomfich        varcontient ncdf_varinq cdfid nom     endif else begin   liste des fichiers pouvant convenir       quelsfichiers   findfile iodir prefix saisonnier climato grid        IF quelsfichiers 0  EQ   THEN     liste vide          return  report LES FICHIERS:  iodir prefix saisonnier climato grid  n existe pas        for i 0 n_elements quelsfichiers 1 do begin          IF  version OS_FAMILY EQ  unix  THEN spawn   file  quelsfichiers i     dev null           cdfid ncdf_open quelsfichiers i           contient ncdf_inquire cdfid           for varid 0 contient nvars 1 do BEGIN     ds les fichiers existants on             varcontient ncdf_varinq cdfid varid    cherche le nom des variables             if varcontient name eq nom then BEGIN                vargrid strmid quelsfichiers i strpos quelsfichiers i grid 5 1   nom de grille                goto  grilletrouvee             ENDIF          endfor          ncdf_close cdfid       endfor       return  report La variable  nom  n existe pas ds les fichiers iodir prefix saisonnier climato grid     endelse grilletrouvee:     lecture de certains attributs et de l axe des temps      ncdf_attget cdfid nom title value    varname string value     ncdf_attget cdfid nom units value    varunit string value     if rstrpos varname  eq  1 then varname varname   varunit     varexp prefix     lecture de l axe des temps      ncdf_varget cdfid time_counter time  offset    numsortie79 1 count nbretps     time   long time julday 12  31  1978     jpt nbretps    IF jpt EQ 1 THEN BEGIN       IF numsortie79 EQ 13 THEN vardate CLIMATOLOGIE  prefix         ELSE begin          vardate climato mensuelle  strtrim numsortie79 1        endelse    endif       extraction du tableau qui nous interesse         determination du domaine geographique      if keyword_set tout  then begin       nx jpi       ny jpj       nz jpk       glam 1        gphi 1        gdep 1        premierx   0       premiery   0       premierz   0    endif else BEGIN     redefinition eventuelle du domaine ajuste a boite  a 6 elements      on recupere la dim du no9uveau domaine         if keyword_set boite  then BEGIN          CASE N_Elements Boite  Of             1:Domdef  lon1  lon2  lat1  lat2  0 boite 0 GRILLE vargrid  _EXTRA   ex             2:Domdef  lon1  lon2  lat1  lat2  boite 0 boite 1 GRILLE vargrid  _EXTRA   ex             4:Domdef   Boite  prof1  prof2 GRILLE vargrid  _EXTRA   ex             5:Domdef   Boite 0:3  0  Boite 4 GRILLE vargrid  _EXTRA   ex             6:Domdef  Boite GRILLE vargrid  _EXTRA   ex             Else:return  report Mauvaise Definition de Boite           endcase       ENDIF       grille  mask  glam  gphi  gdep  nx  ny nz premierx premiery premierz    ENDELSE      if varcontient ndims eq 3 then       ncdf_varget cdfid nom res        offset premierx premiery numsortie79 1 count nx ny nbretps  else       ncdf_varget cdfid nom res        offset premierx premiery premierz numsortie79 1 count nx ny nz nbretps       ncdf_close cdfid    return res     end"); 
    99 a[97] = new Array("./Obsolete/nlecserie.html", "nlecserie.pro", "", "           file_comments   lit les series temporelles se rapportant a une variable   sur maia:  u rech eee reee217 TOTEM REF OUTPUTS      obsolete      categories    Reading      examples   IDL  res nlecserie nom  date1  date2       param nom  in required  nom du tableau contenant le champ que l on veut  le   trouver avec ncdflec fichier var      param date1  in required      param date2  in required     les dates vermairs qui delimitent la serie temporelle      keyword BOITE boite sur laquelle integrer  par defaut tt le domaine       keyword GRILLE impose la grille a laquelle est rapporte le champ  rq permet   d aller plus vite ds la lecture      keyword TOUT oblige a lire le tableau entier en non pas celui reduit a domdef      keyword _EXTRA used to pass your keywords      returns tableau 2d  qd la serie ne fait que 1 pas de temps  ou   3d  valable ds 1 premier tps que pour les tableaux 2d       uses common pro      restrictions appele par nlec      history Sebastien Masson  smasson lodyc jussieu fr       version  Id: nlecserie pro 157 2006 08 21 09:01:50Z navarro            REF sss grid T nc   function nlecserie  nom  date1  date2 BOITE   boite  GRILLE grille TOUT tout  _EXTRA   ex     compile_opt idl2  strictarrsubs  obsolete    common        res 1    anneedepart 1979     gestion du nom de la grille   et ouverture du fichier     liste des fichiers pouvant convenir    quelsfichiers   findfile iodir prefix nom grid     IF quelsfichiers 0  EQ   THEN BEGIN   liste vide        print   LES FICHIERS:  iodir prefix nom grid  n existe pas        return    1    ENDIF ELSE BEGIN       vargrid strmid quelsfichiers 0 strpos quelsfichiers 0 grid 5 1   nom de grille       IF  version OS_FAMILY EQ  unix  THEN spawn   file  quelsfichiers 0     dev null        cdfid ncdf_open quelsfichiers 0     ENDELSE     lecture de certains attributs et de l axe des temps      ncdf_attget cdfid nom title value    varname string value     ncdf_attget cdfid nom units value    varunit string value     if rstrpos varname  eq  1 then varname varname   varunit     ncdf_attget cdfid file_name value global    varexp string value     varexp strmid varexp  0  strpos varexp        lecture de l axe des temps en entier on ja reperer la place des   dates debut et fin pour faire l extraction temporelle      ncdf_varget cdfid time_counter time    time   long time julday 1  5  1979      debut   where time EQ juldate date1      fin   where time EQ juldate date2     debut   where time EQ date1     fin   where time EQ date2     if debut 0  EQ  1 then         return  report l axe des temps ne contient pas la date de debut  strtrim date1  1     if fin 0  EQ  1 then         return  report l axe des temps ne contient pas la date de fin  strtrim date2  1     time   time debut 0 :fin 0     jpt fin 0 debut 0 1    IF jpt EQ 1 THEN BEGIN       caldat  time 0  month  day  year       case 1 of          year lt 10:                 s_year  0 string format i1 year           year lt 100 and year ge 10 :s_year      string format i2 year           year ge 100:                s_year      string format i2 year 1900        endcase       if month lt 10 then s_month 0 string format i1 month          else s_month     string format i2 month        if day lt 10 then s_day 0 string format i1 day          else s_day     string format i2 day        vardate s_year s_month s_day    endif       extraction du tableau qui nous interesse         determination du domaine geographique      if keyword_set tout  then begin       nx jpi       ny jpj       nz jpk       premierx   0       premiery   0       premierz   0    endif else BEGIN     redefinition eventuelle du domaine ajuste a boite  a 6 elements      on recupere la dim du no9uveau domaine         if keyword_set boite  then BEGIN          Case N_Elements Boite  Of             1:Domdef  lon1  lon2  lat1  lat2  0 boite 0 GRILLE vargrid  _EXTRA   ex             2:Domdef  lon1  lon2  lat1  lat2  boite 0 boite 1 GRILLE vargrid  _EXTRA   ex             4:Domdef   Boite  prof1  prof2 GRILLE vargrid  _EXTRA   ex             5:Domdef   Boite 0:3  0  Boite 4 GRILLE vargrid  _EXTRA   ex             6:Domdef  Boite GRILLE vargrid  _EXTRA   ex             Else:return  report Mauvaise Definition de Boite           endcase       ENDIF       grille  mask  glam  gphi  gdep  nx  ny nz premierx premiery    ENDELSE      ncdf_varget cdfid nom res        offset premierx premiery debut 0         count nx ny fin 0 debut 0 1       ncdf_close cdfid    return res     end"); 
    100 a[98] = new Array("./Obsolete/strrepl.html", "strrepl.pro", "", "         file_comments    replace one  or more  character s string s  in a string     OBSOLETE   you should better use strsed pro      categories   String      param STR  in required    the string to be changed      param ARG2  in required    position of the character s  to be replaced or a string to be changed in STR       param RCHAR  in required    replacement character string      returns   another string      restrictions    Known shortcoming: if index is an array  it must contain all   valid elements  only the first entry is checked       examples            Convert one letter into upper case            abc    abcdefghijklmnopqrstuvwxyz           print strrepl abc strpos abc m M               prints  abcdefghijklMnopqrstuvwxyz                 Use with strwhere function          a    abcabcabc           print strrepl a strwhere a a               prints   bc bc bc bc bc            IDL  print  strrepl a bc eeee          a eeee a eeee a eeee          IDL  print  strrepl a b 0000          a0000ca0000ca0000         IDL  print  strrepl a toto 0000          abcabcabc      history          mgs  02 Jun 1998: VERSION 1 00          sebastien Masson  smlod ipsl jussieu fr       version    Id: strrepl pro 192 2006 09 22 09:37:08Z smasson         Copyright  C  1998  Martin Schultz  Harvard University   This software is provided as is without any warranty   whatsoever  It may be freely used  copied or distributed   for non commercial purposes  This copyright notice must be   kept with any copy of this software  If this software shall   be used commercially or sold as part of a larger package    please contact the author to arrange payment    Bugs and comments should be directed to mgs io harvard edu   with subject  IDL routine strrepl      function strrepl str arg2 rchar     compile_opt idl2  strictarrsubs  obsolete          if  n_elements str  eq 0  then return                                        convert strign and replace character to byte    BStr   byte str     new   byte rchar     if size arg2   type  EQ 7 then begin       old   byte arg2        index   strpos str  arg2        pos   index       while strpos str  arg2  pos 1  NE  1 do BEGIN          pos   strpos str  arg2  pos 1           index    index  pos        ENDWHILE   make sure index is in range       if  index 0  lt 0 OR index 0  ge n_elements BStr  THEN return Str    ENDIF ELSE BEGIN       index   arg2       if  index 0  lt 0 OR index 0  ge n_elements BStr  then return Str       old   BStr index 0     ENDELSE                                   replace indexed characters in string    nelenew   n_elements new     neleold   n_elements old     nindex   n_elements index     if nelenew neleold NE 1 then begin       if index 0  EQ 0 then          BStr    NEW   BStr index 0 neleold: n_elements BStr 1    ELSE          BStr    BStr 0:index 0 1  NEW   BStr index 0 neleold: n_elements BStr 1          if nindex EQ 1 then return string BStr        if nindex GT 2 then          for i   1  nindex 2 do          BStr    BStr 0:index i i nelenew neleold 1  NEW                    BStr index i i nelenew neleold neleold: n_elements BStr 1          BStr    BStr 0:index n_elements index 1 nindex 1 nelenew neleold 1  NEW      ENDIF ELSE BStr index    NEW                                   return result as string    return string BStr      end"); 
    101 a[99] = new Array("./Obsolete/vairdate.html", "vairdate.pro", "", "             file_comments   gives vairmer date equivalent of a date in julian format   sets month  day and year to the corresp values     you better use jul2date      obsolete      examples   IDL  vdate   vairdate 1755087       param jdate  in required  date en jours juliens      keyword MENSUEL a activer si on veut pour  que les dates dont le jour est      15 deviennent avec un jour egale a 0  par ex:      19990115       19990100      keyword ANNUEL a activer si on veut pour  que les dates dont le mois est      6 et dont le jour est 1 deviennent avec un mois et jour egale a      0  par ex:      19990601       19990000      keyword _EXTRA used to pass your keywords      returns vdate date vairmer     plus year  month et day      uses  common        history  Jerome Vialard   jv lodyc jussieu fr      2 7 98                  13 9 1999  Sebastien Masson  smasson lodyc jussieu fr                          ANNUEL MENSUEL _EXTRA et possibilite                         d utiliser vairdate avec des scalaire ou des                         tableaux      version  Id: vairdate pro 134 2006 07 07 10:19:08Z navarro             function vairdate  jdate   ANNUEL   annuel  MENSUEL   mensuel  _EXTRA   ex     compile_opt idl2  strictarrsubs  obsolete    common      caldat  jdate  month  day  year  _EXTRA   ex    index   where year eq  1     if index 0  NE  1 then year index    0    if keyword_set mensuel  THEN BEGIN       index   where day EQ 15        if index 0  NE  1 then day index    0    endif    if keyword_set annuel  THEN BEGIN       index   where day EQ 1 AND month EQ 6        if index 0  NE  1 then BEGIN          day index    0          month index    0       endif    endif      return  10000L year 100L month day   end  "); 
    102 a[100] = new Array("./Obsolete/vraidate.html", "vraidate.pro", "", "           file_comments   donne la date en long      obsolete      param date  in required  une date du type yyyymmdd      keyword GRADS if  1 le year le 49 then year   2000 year                 if 50 le year le 99 then year   1900 year      keyword _EXTRA used to pass your keywords      returns une date vairmer du type yyyymmdd   si year est nulle ou egale a  1 ne change rien      examples   IDL  res vraidate date    IDL  vraidate 980703    donne 19980703 qui est un long      history Sebastien Masson  smasson lodyc jussieu fr      3 7 98   remove automatic change from year 1 to 1901  Aug 2004      version  Id: vraidate pro 134 2006 07 07 10:19:08Z navarro             function vraidate  date  GRADS   grads  _EXTRA   ex       compile_opt idl2  strictarrsubs  obsolete     IF NOT keyword_set GRADS  THEN return  long date      date   long date    annee   date 10000   return  date 19000000L annee GE 50 and date lt 1000000 20000000L annee LT 50 and date lt 1000000    end"); 
    103 a[101] = new Array("./Obsolete/zeroun.html", "zeroun.pro", "", "           file_comments    Send back a vector or a matrix constituate of 0 and 1 in alternation     you better use zero_one      obsolete      categories    Function  Matrix      param n1  in required  number of elements in the first dimension    param n2  in required  numbre of elements in the second dimension      returns resultat       history Sebastien Masson  smasson lodyc jussieu fr                          1 12 98      version  Id: zeroun pro 157 2006 08 21 09:01:50Z navarro             function zeroun  n1 n2     compile_opt idl2  strictarrsubs     case n_params  of       0:return  zero_one        1:return  zero_one n1        2:return  zero_one n1  n2    endcase  end"); 
    104 a[102] = new Array("./Picture/image_viewer.html", "image_viewer.pro", "", "       file_comments   The purpose of this program is to provide an interactive tool that can be used   to view JPEG  BMP  GIF  PNG  and TIFF picture files   Images are loaded into   memory  so the initial file access may take a while  but once each picture has   been opened they can all be viewed in a very rapid fashion       categories    Visualization  Widget      param EVENT  in required       restrictions   While this program is running in an IDL session it will change the current   working directory  enables disables color decomposition  and sets  QUIET 1     ORDER 0     P BACKGROUND 0   These settings are returned to their initial   settings before the program was initiated once it is terminated       restrictions   This program is supported in IDL version 5 5 and newer   In order to open   GIF files or TIFF files with LZW compression the copy of IDL being used must   be licensed with these features   IDL only supports BMP files in the standard   Windows format and does not support OS2 bitmaps       history    Written by: AEB  1 02       version    Id: image_viewer pro 163 2006 08 29 12:59:46Z navarro    _  PRO image_viewer_open_files event  THIS PROCEDURE IS CALLED WHEN A USER SELECTS  File   Open Picture Files  FROM THE MAIN MENU  error handling:     compile_opt idl2  strictarrsubs    ERROR_STATE CODE 0 CATCH error if error NE 0 then begin   HELP LAST_MESSAGE OUTPUT traceback   messageStr Error Caught : traceback    dummy DIALOG_MESSAGE messageStr ERROR     if status report dialog is still active  destroy it:   if SIZE tlb TYPE  NE 0 then WIDGET_CONTROL tlb DESTROY   RETURN endif  obtain state structure for top level base from its UVALUE: WIDGET_CONTROL event top GET_UVALUE pState  prompt user to select files with native file selection dialog: if  pState gifFlag EQ 1 then filter JPG jpg JPEG jpeg JPE jpe     JFIF jfif GIF gif BMP bmp TIF tif TIFF tiff     PNG png  else     filter JPG jpg JPEG jpeg JPE jpe JFIF jfif BMP bmp     TIF tif TIFF tiff PNG png  files DIALOG_PICKFILE TITLE Select picture files to open MULTIPLE_FILES                        FILTER filter GET_PATH path   if user hit  Cancel  then return to previous program level: if  files 0  EQ   then RETURN  change current working directory to location of selected files: CD path nFiles N_ELEMENTS files   pState nFiles nFiles  pState increment 100 nFiles files files SORT files   create status report dialog: xCenter pState screenSize 0 2 yCenter pState screenSize 1 2 tlb2 WIDGET_BASE TITLE Status Report COLUMN ALIGN_CENTER TLB_FRAME_ATTR 19 MODAL                   GROUP_LEADER pState tlb    spacer WIDGET_LABEL tlb2 VALUE      label1 WIDGET_LABEL tlb2 VALUE LOADING SELECTED IMAGE FILES INTO MEMORY    spacer WIDGET_LABEL tlb2 VALUE      label2 WIDGET_LABEL tlb2 VALUE  PLEASE WAIT     spacer WIDGET_LABEL tlb2 VALUE      statusBase WIDGET_BASE tlb2 ROW FRAME BASE_ALIGN_CENTER ALIGN_CENTER EVENT_PRO image_viewer_timer      cancelBut WIDGET_BUTTON statusBase VALUE Cancel EVENT_PRO image_viewer_cancel      progressLabel WIDGET_LABEL statusBase Value  Progress :  0       statusSlider WIDGET_SLIDER statusBase SENSITIVE 0 TITLE   XSIZE 200      percentLabel WIDGET_LABEL statusBase VALUE  100   geom WIDGET_INFO tlb2 GEOMETRY  xHalfSize geom Scr_XSize 2 yHalfSize geom Scr_YSize 2 WIDGET_CONTROL tlb2 XOFFSET xCenter xHalfSize YOFFSET yCenter yHalfSize WIDGET_CONTROL tlb2 REALIZE  pState statusBase statusBase  pState statusSlider statusSlider WIDGET_CONTROL tlb2 SET_UVALUE pState  reset settings of GUI: WIDGET_CONTROL pState fileText SET_VALUE  WIDGET_CONTROL pState imageDraw GET_VALUE drawID WSET drawID TVLCT 0 0 0 0 ERASE  re create thumbnails base with appropriate size for number of images selected: nRows   CEIL  nFiles   3 0  WIDGET_CONTROL pState thumbBase DESTROY  pState thumbBase WIDGET_BASE pState controlsBase COLUMN ALIGN_TOP FRAME XSIZE 260                                  YSIZE nRows 89 SCROLL X_SCROLL_SIZE 260 Y_SCROLL_SIZE 650   initialize pointer array to reference image data: numImages N_ELEMENTS pState images  if numImages NE 0 then PTR_FREE pState images  pState images PTRARR nFiles ALLOCATE_HEAP   pState files files  loop through each file:  pState timer 1B WIDGET_CONTROL statusBase TIMER 0 01 END            param event  in required    PRO image_viewer_open_folder event  THIS PROCEDURE IS CALLED WHEN A USER SELECTS  File   Open All In Folder  FROM THE MAIN MENU  error handling:     compile_opt idl2  strictarrsubs    ERROR_STATE CODE 0 CATCH error if error NE 0 then begin   HELP LAST_MESSAGE OUTPUT traceback   messageStr Error Caught : traceback    dummy DIALOG_MESSAGE messageStr ERROR     if status report dialog is still active  destroy it:   if SIZE tlb TYPE  NE 0 then WIDGET_CONTROL tlb DESTROY   RETURN endif  obtain state structure for top level base from its UVALUE: WIDGET_CONTROL event top GET_UVALUE pState  prompt user to select files with native file selection dialog: folder DIALOG_PICKFILE TITLE Select folder that contains picture files DIRECTORY   if user hit  Cancel  then return to previous program level: if folder EQ   then RETURN  change current working directory to location of selected files: CD folder if  pState gifFlag EQ 1 then filter JPG JPEG JPE JFIF GIF BMP     TIF TIFF PNG  else     filter JPG JPEG JPE JFIF BMP TIF TIFF PNG  files FILE_SEARCH filter COUNT nFiles FOLD_CASE FULLY_QUALIFY_PATH NOSORT  if nFiles EQ 0 then begin   dummy DIALOG_MESSAGE No valid picture files were found in the selected folder  INFO    RETURN endif  pState nFiles nFiles  pState increment 100 nFiles files files SORT files   create status report dialog: xCenter pState screenSize 0 2 yCenter pState screenSize 1 2 tlb2 WIDGET_BASE TITLE Status Report COLUMN ALIGN_CENTER TLB_FRAME_ATTR 19 MODAL                   GROUP_LEADER pState tlb    spacer WIDGET_LABEL tlb2 VALUE      label1 WIDGET_LABEL tlb2 VALUE LOADING SELECTED IMAGE FILES INTO MEMORY    spacer WIDGET_LABEL tlb2 VALUE      label2 WIDGET_LABEL tlb2 VALUE  PLEASE WAIT     spacer WIDGET_LABEL tlb2 VALUE      statusBase WIDGET_BASE tlb2 ROW FRAME BASE_ALIGN_CENTER ALIGN_CENTER EVENT_PRO image_viewer_timer      cancelBut WIDGET_BUTTON statusBase VALUE Cancel EVENT_PRO image_viewer_cancel      progressLabel WIDGET_LABEL statusBase Value  Progress :  0       statusSlider WIDGET_SLIDER statusBase SENSITIVE 0 TITLE   XSIZE 200      percentLabel WIDGET_LABEL statusBase VALUE  100   geom WIDGET_INFO tlb2 GEOMETRY  xHalfSize geom Scr_XSize 2 yHalfSize geom Scr_YSize 2 WIDGET_CONTROL tlb2 XOFFSET xCenter xHalfSize YOFFSET yCenter yHalfSize WIDGET_CONTROL tlb2 REALIZE  pState statusBase statusBase  pState statusSlider statusSlider WIDGET_CONTROL tlb2 SET_UVALUE pState  reset settings of GUI: WIDGET_CONTROL pState fileText SET_VALUE  WIDGET_CONTROL pState imageDraw GET_VALUE drawID WSET drawID TVLCT 0 0 0 0 ERASE  re create thumbnails base with appropriate size for number of images selected: nRows   CEIL  nFiles   3 0  WIDGET_CONTROL pState thumbBase DESTROY  pState thumbBase WIDGET_BASE pState controlsBase COLUMN ALIGN_TOP FRAME XSIZE 260                                  YSIZE nRows 89 SCROLL X_SCROLL_SIZE 260 Y_SCROLL_SIZE 650   initialize pointer array to reference image data: numImages N_ELEMENTS pState images  if numImages NE 0 then PTR_FREE pState images  pState images PTRARR nFiles ALLOCATE_HEAP   pState files files  loop through each file:  pState timer 1B WIDGET_CONTROL statusBase TIMER 0 01 END            param event  in required    PRO image_viewer_cancel event  obtain state structure for top level base from its UVALUE:     compile_opt idl2  strictarrsubs   WIDGET_CONTROL event top GET_UVALUE pState  shut off timer:  pState timer 0B END            param event  in required    PRO image_viewer_timer event  obtain state structure for top level base from its UVALUE:     compile_opt idl2  strictarrsubs   WIDGET_CONTROL event top GET_UVALUE pState if  pState timer EQ 1 then begin  continue processing files:   if  pState currFile LE  pState nFiles 1 then begin     i pState currFile     extension STRUPCASE STRMID pState files i STRPOS pState files i REVERSE_SEARCH 1      if extension EQ  JPG  or extension EQ  JPEG  or extension EQ  JPE  or extension EQ  JFIF  then begin       result QUERY_JPEG pState files i info        if result NE 1 then begin         dummy DIALOG_MESSAGE Selected file: pState files i                                 does not appear to be a valid JPEG file  ERROR          if  i MOD 3  EQ 0 then  pState rowBase WIDGET_BASE pState thumbBase ROW ALIGN_LEFT          if  pState currFile EQ  pState nFiles 1 then begin            last file   terminate timer:            pState timer 0B            pState currFile 0L           WIDGET_CONTROL event top DESTROY         endif else begin            increment file number and update progress slider:            pState currFile pState currFile 1           progressValue   ROUND i 1 pState increment   Exit  FROM THE MAIN MENU  terminate the program by destroying the top level base  widgetID always stored in event top :     compile_opt idl2  strictarrsubs   WIDGET_CONTROL event top DESTROY END            param event  in required    PRO image_viewer_help event  THIS PROCEDURE IS CALLED WHEN A USER SELECTS  Help   Help on IMAGE_VIEWER   FROM THE MAIN MENU  display a simple message:     compile_opt idl2  strictarrsubs   messageStr IMAGE_VIEWER written by AEB  2002               The purpose of this program is to provide an interactive tool that can be used               to view JPEG  BMP  GIF  PNG  and TIFF picture files   In order to provide rapid               viewing capabilities the images are loaded into memory  which can cause the               initial file access to take a bit of time while the pictures are opened and               thumbnails are created  dummy DIALOG_MESSAGE messageStr info  END            param event  in required    PRO image_viewer_thumbs event  THIS PROCEDURE IS CALLED WHEN A USER CLICKS ON ONE OF THE THUMBNAIL PICTURES  error handling:     compile_opt idl2  strictarrsubs    ERROR_STATE CODE 0 CATCH error if error NE 0 then begin   HELP LAST_MESSAGE OUTPUT traceback   messageStr Error Caught : traceback    dummy DIALOG_MESSAGE messageStr ERROR    RETURN endif if event press EQ 1 then begin   WIDGET_CONTROL HOURGLASS    obtain state structure for top level base from its UVALUE:   WIDGET_CONTROL event top GET_UVALUE pState   WIDGET_CONTROL pState imageDraw GET_VALUE drawID   WSET drawID   TVLCT 0 0 0 0   ERASE    obtain current image data:   WIDGET_CONTROL event id GET_UVALUE fileID   imageStruct pState images fileID 1    xOffset ROUND 710 imageStruct xSize 2    yOffset ROUND 650 imageStruct ySize 2    if  pState colorMode EQ  PSEUDO  then begin     TVLCT imageStruct red imageStruct green imageStruct blue     TV TEMPORARY imageStruct image xOffset yOffset   endif else begin  pState colorMode EQ  TRUE :     if imageStruct imageColorMode EQ  PSEUDO  then begin       DEVICE DECOMPOSED 0       TVLCT imageStruct red imageStruct green imageStruct blue       TV TEMPORARY imageStruct image xOffset yOffset     endif else begin  imageStruct imageColorMode EQ  TRUE :       DEVICE DECOMPOSED 1       TV TEMPORARY imageStruct image xOffset yOffset TRUE 1     endelse   endelse   WIDGET_CONTROL pState fileText SET_VALUE pState files fileID 1  endif END            param widgetID  in required    PRO image_viewer_cleanup widgetID  THIS PROCEDURE IS CALLED WHEN THE PROGRAM IS TERMINATED AND XMANAGER REGISTERS A CLEANUP:  obtain state structure for top level base from its uvalue:     compile_opt idl2  strictarrsubs   WIDGET_CONTROL widgetID GET_UVALUE pState  test for validity of state structure pointer: if PTR_VALID pState  then begin    reset original settings:    QUIET pState quietInit    ORDER pState orderInit    P BACKGROUND pState backInit   CD pState currentDir   DEVICE DECOMPOSED pState dc   TVLCT pState r pState g pState b    cleanup heap memory:   PTR_FREE TEMPORARY pState files    numImages N_ELEMENTS pState images    if numImages NE 0 then PTR_FREE pState images   PTR_FREE TEMPORARY pState images    PTR_FREE TEMPORARY pState  endif END            param event  in required    PRO image_viewer_event event  THIS PROCEDURE IS CALLED WHEN A USER RESIZES THE TOP LEVEL BASE  error handling:     compile_opt idl2  strictarrsubs    ERROR_STATE CODE 0 CATCH error if error NE 0 then begin   HELP LAST_MESSAGE OUTPUT traceback   messageStr Error Caught : traceback    dummy DIALOG_MESSAGE messageStr ERROR    RETURN endif  obtain state structure for top level base from its UVALUE: WIDGET_CONTROL event top GET_UVALUE pState  reset widget size: WIDGET_CONTROL event top XSIZE pState tlbWidth YSIZE pState tlbHeight XOFFSET 0 YOFFSET 0 END       PRO image_viewer  error handling:     compile_opt idl2  strictarrsubs    ERROR_STATE CODE 0 CATCH error if error NE 0 then begin   HELP LAST_MESSAGE OUTPUT traceback   messageStr Error Caught : traceback    dummy DIALOG_MESSAGE messageStr ERROR     QUIET quietInit    ORDER orderInit    P BACKGROUND backInit   CD currentDir   RETURN endif  ignore beta and development build versions of IDL because string to float conversion will fail: betaTest STRPOS STRLOWCASE VERSION RELEASE beta  buildTest STRPOS STRLOWCASE VERSION RELEASE build   check to make sure the version of IDL running is 5 5 or newer: if betaTest EQ  1 and buildTest EQ  1 then begin   if FLOAT VERSION RELEASE  LT 5 5 then begin     dummy dialog_message IMAGE_VIEWER is only supported in IDL version 5 5 or newer ERROR      RETURN   endif endif  check to make sure there is adequate real estate: DEVICE GET_SCREEN_SIZE screenSize if  LONG screenSize 0 screenSize 1  LT 786432 then begin   messageStr IMAGE_VIEWER requires the computer monitor  Display  to be                 configured in  1024 x 768  mode or better    dummy DIALOG_MESSAGE messageStr    RETURN endif  check in auxiliary license: result LMGR idl_tifflzw VERSION 1 0  result LMGR idl_gif VERSION 1 0  gifFlag 1B if result NE 1 then begin   messageStr The ability to read GIF  and TIFF LZW compressed  images requires                 an auxiliary license in order to conform with the patent rights of the                 Unisys Corporation   IMAGE_VIEWER was unable to find the required                 license in this installation   Consequently  the ability to read GIF files                 will be disabled    dummy DIALOG_MESSAGE messageStr    gifFlag 0B endif  warn users of color flashing if monitor in PseudoColor mode: if  D N_COLORS LE 256 then begin   messageStr The computer monitor  Display  is currently configured in 8 bit  256 Colors                 PseudoColor mode   Due to the dynamic  read write  nature of the colormap                 system for this visual  when a colortable is loaded for an image it affects                 all visible graphics windows  including the thumbnails of other images   This                 can lead to a phenomenon known as  color flashing                 If possible  it is recommended that you exit this program  reconfigure your                 monitor in 24 bit  TrueColor  mode or better  and restart IMAGE_VIEWER    dummy DIALOG_MESSAGE messageStr  endif  obtain the current working directory: CD CURRENT currentDir if STRUPCASE VERSION OS_FAMILY  EQ  WINDOWS  then begin   executeStr cd  USERPROFILE My Documents My Pictures    cd    SPAWN executeStr pathInit HIDE   pathInit pathInit 0    result FILE_TEST pathInit READ    if result EQ 1 then begin     CD pathInit   endif else begin     result FILE_TEST C: My Documents My Pictures READ      if result EQ 1 then begin       CD C: My Documents My Pictures      endif else begin       result FILE_TEST C: READ        if result EQ 1 then CD C:      endelse   endelse endif  suppress informational messaging: quietInit QUIET  QUIET 1  make sure color decomposition is disabled: DEVICE GET_DECOMPOSED dc if  D N_COLORS GT 256 then colorMode TRUE  else colorMode PSEUDO   obtain the current color table: TVLCT r g b GET LOADCT 0 SILENT  force  ORDER 0: orderInit ORDER  ORDER 0  force  P BACKGROUND 0: backInit P BACKGROUND  P BACKGROUND 0  create GUI: tlb WIDGET_BASE TITLE Image Viewer ROW MBAR menuBar TLB_SIZE_EVENTS XOFFSET 0 YOFFSET 0    fileMenu WIDGET_BUTTON menuBar VALUE File MENU      fileBttn1 WIDGET_BUTTON fileMenu VALUE Open Picture Files EVENT_PRO image_viewer_open_files      fileBttn2 WIDGET_BUTTON fileMenu VALUE Open All In Folder EVENT_PRO image_viewer_open_folder      fileBttn3 WIDGET_BUTTON fileMenu VALUE Exit EVENT_PRO image_viewer_exit    helpMenu WIDGET_BUTTON menuBar VALUE Help MENU      helpBttn1 WIDGET_BUTTON helpMenu VALUE Help on IMAGE_VIEWER EVENT_PRO image_viewer_help    controlsBase WIDGET_BASE tlb COLUMN FRAME ALIGN_TOP      labelBase WIDGET_BASE controlsBase COLUMN SCR_XSIZE 280        thumbLabel WIDGET_LABEL labelBase ALIGN_CENTER VALUE CLICK ON THUMBNAIL TO VIEW IMAGE      thumbBase WIDGET_BASE controlsBase COLUMN ALIGN_TOP FRAME XSIZE 260 YSIZE 700                             SCROLL X_SCROLL_SIZE 260 Y_SCROLL_SIZE 650    imageBase WIDGET_BASE tlb COLUMN FRAME ALIGN_TOP      fileBase WIDGET_BASE imageBase ROW ALIGN_CENTER        fileLabel WIDGET_LABEL fileBase VALUE Current Image File           fileText WIDGET_TEXT fileBase XSIZE 75 YSIZE 1      imageDraw WIDGET_DRAW imageBase XSIZE 710 YSIZE 650 RETAIN 2   display the GUI on the computer monitor: WIDGET_CONTROL tlb REALIZE  obtain the top level base geometry: tlbGeom WIDGET_INFO tlb GEOMETRY  tlbWidth tlbGeom xsize tlbHeight tlbGeom ysize if tlbWidth EQ 0 or tlbHeight EQ 0 then begin   WIDGET_CONTROL tlb TLB_GET_SIZE tlbSize   tlbWidth tlbSize 0    tlbHeight tlbSize 1  endif  create state structure to store information needed by the other event handling procedures: pState PTR_NEW files:PTR_NEW ALLOCATE_HEAP                  images:PTR_NEW ALLOCATE_HEAP                  screenSize:screenSize quietInit:quietInit orderInit:orderInit tlb:tlb statusBase:0L                  controlsBase:controlsBase thumbBase:thumbBase fileText:fileText timer:0B nFiles:0L                  currentDir:currentDir imageDraw:imageDraw dc:dc r:r g:g b:b gifFlag:gifFlag statusSlider:0L                  backInit:backInit colorMode:colorMode tlbWidth:tlbWidth tlbHeight:tlbHeight currFile:0L                  rowBase:0L increment:0 0   store this state structure in the uvalue of the top level base  so it can be obtained by other program units: WIDGET_CONTROL tlb SET_UVALUE pState  register the GUI with the XMANAGER event handler routine: XMANAGER image_viewer tlb CLEANUP image_viewer_cleanup  END  "); 
    105 a[103] = new Array("./Picture/imdisp.html", "imdisp.pro", "", "       hidden   FUNCTION imdisp_getpos  ASPECT  POSITION POSITION  MARGIN MARGIN     compile_opt idl2  strictarrsubs      Compute a position vector given an aspect ratio  called by IMDISP_IMSIZE     Check arguments if  n_params  ne 1  then message   Usage: RESULT   IMDISP_GETPOS ASPECT  if  n_elements aspect  eq 0  then message   ASPECT is undefined     Check keywords if  n_elements position  eq 0  then position    0 0  0 0  1 0  1 0  if  n_elements margin  eq 0  then margin   0 1    Get range limited aspect ratio and margin input values aspect_val    float aspect 0    0 01   0 0   0L y0   round position 1     d y_vsize    0L    Compute size of image  device units  xsize   round position 2    position 0     d x_vsize    2L ysize   round position 3    position 1     d y_vsize    2L    Recompute the image position based on actual image size position   fltarr 4  position 0    x0   float d x_vsize  position 1    y0   float d y_vsize  position 2     x0   xsize    float d x_vsize  position 3     y0   ysize    float d y_vsize   END          file_comments      Display an image on the current graphics device       IMDISP is an advanced replacement for TV and TVSCL           Supports WIN  MAC  X  CGM  PCL  PRINTER  PS  and Z graphics devices         Image is automatically byte scaled  can be disabled         Custom byte scaling of Pseudo color images via the RANGE keyword         Pseudo  indexed  color and True color images are handled automatically         8 bit and 24 bit graphics devices  are handled automatically         Decomposed color settings are handled automatically         Image is automatically sized to fit the display  can be disabled         The  P MULTI system variable is honored for multiple image display         Image can be positioned via the POSITION keyword         Color table splitting via the BOTTOM and NCOLORS keywords         Image aspect ratio customization via the ASPECT keyword         Resized images can be resampled  default  or interpolated         Top down image display via the ORDER keyword  ORDER is ignored         Selectable display channel  R G B  via the CHANNEL keyword         Background can be set to a specified color via the BACKGROUND keyword         Screen can be erased prior to image display via the ERASE keyword         Plot axes can be drawn on the image via the AXIS keyword         Photographic negative images can be displayed via the NEGATIVE keyword       categories   Picture      param IMAGE  in required    Array containing image data    Pseudo  indexed  color images must have 2 dimensions    True color images must have 3 dimensions  in either    3  NX  NY   NX  3  NY  or  NX  NY  3  form       keyword RANGE  type vector default min and max array values    For Pseudo Color images only  a vector with two elements   specifying the minimum and maximum values of the image   array to be considered when the image is byte scaled   This keyword is ignored for True Color images    or if the NOSCALE keyword is set       keyword BOTTOM  default 0    Bottom value in the color table to be used   for the byte scaled image    This keyword is ignored if the NOSCALE keyword is set       keyword NCOLORS  default D TABLE_SIZE   BOTTOM    Number of colors in the color table to be used   for the byte scaled image   This keyword is ignored if the NOSCALE keyword is set       keyword MARGIN  default 0 1 or 0 025 if  P MULTI is set to display multiple images    A scalar value specifying the margin to be maintained   around the image in normal coordinates      keyword INTERP  default nearest neighbor sampling    If set  the resized image will be interpolated using   bilinear interpolation      keyword DITHER  default no dithering    If set  true color images will be dithered when displayed   on an 8 bit graphics device      keyword ASPECT  default maintain native aspect ratio    A scalar value specifying the aspect ratio  height width    for the displayed image      keyword POSITION  default   0 0 0 0 1 0 1 0    On input  a 4 element vector specifying the position   of the displayed image in the form  X0 Y0 X1 Y1  in   in normal coordinates   See the examples below to display an image where only the   offset and size are known  e g  MAP_IMAGE output       keyword OUT_POS   On output  a 4 element vector specifying the position   actually used to display the image       keyword NOSCALE  default to byte scale the image    If set  the image will not be byte scaled       keyword NORESIZE  default To resize the image to fit the display    If set  the image will not be resized       keyword ORDER  default To display the image from the bottom up    If set  the image is displayed from the top down   Note that the system variable  ORDER is always ignored       keyword USEPOS  default To honor ASPECT and MARGIN when POSITION vector is supplied    If set  the image will be sized to exactly fit a supplied   POSITION vector  over riding ASPECT and MARGIN       keyword CHANNEL   Display channel  Red  Green  or Blue  to be written    0   All channels  the default    1   Red channel   2   Green channel   3   Blue channel   This keyword is only recognized by graphics devices which   support 24 bit decomposed color  WIN  MAC  X  It is ignored   by all other graphics devices  However True color  RGB    images can be displayed on any device supported by IMDISP       keyword BACKGROUND   If set to a positive integer  the background will be filled   with the color defined by BACKGROUND       keyword ERASE   If set  the screen contents will be erased  Note that if    P MULTI is set to display multiple images  the screen is   always erased when the first image is displayed       keyword AXIS   If set  plot axes will be drawn on the image  The default   x and y axis ranges are determined by the size of the image    When the AXIS keyword is set  IMDISP accepts any keywords   supported by PLOT  e g  TITLE  COLOR  CHARSIZE etc       keyword NEGATIVE   If set  a photographic negative of the image is displayed    The values of BOTTOM and NCOLORS are honored  This keyword   allows True color images scanned from color negatives to be   displayed  It also allows Pseudo color images to be displayed   as negatives without reversing the color table  This keyword   is ignored if the NOSCALE keyword is set       restrictions   The image is displayed on the current graphics device       restrictions   Requires IDL 5 0 or higher  square bracket array syntax       examples     Load test data     openr  lun  filepath ctscan dat  subdir examples data   get_lun  ctscan   bytarr 256  256   readu  lun  ctscan  free_lun  lun  openr  lun  filepath hurric dat  subdir examples data   get_lun  hurric   bytarr 440  330   readu  lun  hurric  free_lun  lun  read_jpeg  filepath rose jpg  subdir examples data  rose  help  ctscan  hurric  rose     Display single images    p multi   0  loadct  0  imdisp  hurric   erase  wait  3 0  imdisp  rose   interp   erase  wait  3 0     Display multiple images without color table splitting    works on 24 bit displays only  top 2 images are garbled on 8 bit displays     p multi    0  1  3  0  0   loadct  0  imdisp  ctscan  margin 0 02  loadct  13  imdisp  hurric  margin 0 02  imdisp  rose  margin 0 02  wait  3 0     Display multiple images with color table splitting    works on 8 bit or 24 bit displays     p multi    0  1  3  0  0   loadct  0  ncolors 64  bottom 0  imdisp  ctscan  margin 0 02  ncolors 64  bottom 0  loadct  13  ncolors 64  bottom 64  imdisp  hurric  margin 0 02  ncolors 64  bottom 64  imdisp  rose  margin 0 02  ncolors 64  bottom 128  wait  3 0     Display an image at a specific position  over riding aspect and margin    p multi   0  loadct  0  imdisp  hurric  position 0 0  0 0  1 0  0 5   usepos   erase  wait  3 0     Display an image with axis overlay    p multi   0  loadct  0  imdisp  rose   axis   erase  wait  3 0     Display an image with contour plot overlay    p multi   0  loadct  0  imdisp  hurric  out_pos out_pos   erase  contour  smooth hurric  10   edge   noerase  position out_pos       xstyle 1  ystyle 1  levels findgen 5 40 0   follow  wait  3 0     Display a small image with correct resizing    p multi   0  loadct  0  data    dist 8 1:7  1:7   imdisp  data   erase  wait  3 0  imdisp  data   interp  wait  3 0     Display a true color image without and with interpolation    p multi   0  imdisp  rose   erase  wait  3 0  imdisp  rose   interp  wait  3 0     Display a true color image as a photographic negative    imdisp  rose   negative   erase  wait  3 0     Display a true color image on PostScript output    note that color table is handled automatically     current_device    d name  set_plot   PS   device   color  bits_per_pixel 8  filename imdisp_true ps   imdisp  rose   axis  title PostScript True Color Output   device   close  set_plot  current_device     Display a pseudo color image on PostScript output    current_device    d name  set_plot   PS   device   color  bits_per_pixel 8  filename imdisp_pseudo ps   loadct  0  imdisp  hurric   axis  title PostScript Pseudo Color Output   device   close  set_plot  current_device     Display an image where only the offset and size are known     Read world elevation data  file   filepath worldelv dat  subdir examples data   openr  lun  file   get_lun  data   bytarr 360  360   readu  lun  data  free_lun  lun   Reorganize array so it spans 180W to 180E  world   data  world 0:179      data 180:     world 180:      data 0:179      Create remapped image  map_set   orthographic   isotropic   noborder  remap   map_image world  x0  y0  xsize  ysize  compress 1    Convert offset and size to position vector  pos   fltarr 4   pos 0    x0   float d x_vsize   pos 1    y0   float d y_vsize   pos 2     x0   xsize    float d x_vsize   pos 3     y0   ysize    float d y_vsize    Display the image  loadct  0  imdisp  remap  pos pos   usepos  map_continents  map_grid      history Liam Gumley ssec wisc edu   http: cimss ssec wisc edu gumley     Copyright  C  1999  2000 Liam E  Gumley     This program is free software  you can redistribute it and or   modify it under the terms of the GNU General Public License   as published by the Free Software Foundation  either version 2   of the License  or  at your option  any later version      This program is distributed in the hope that it will be useful    but WITHOUT ANY WARRANTY  without even the implied warranty of   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE   See the   GNU General Public License for more details      You should have received a copy of the GNU General Public License   along with this program  if not  write to the Free Software   Foundation  Inc  59 Temple Place   Suite 330  Boston  MA  02111 1307  USA       version  Id: imdisp pro 163 2006 08 29 12:59:46Z navarro         PRO imdisp  IMAGE  RANGE RANGE  BOTTOM BOTTOM  NCOLORS NCOLORS      MARGIN MARGIN  INTERP INTERP  DITHER DITHER  ASPECT ASPECT      POSITION POSITION  OUT_POS OUT_POS  NOSCALE NOSCALE  NORESIZE NORESIZE      ORDER ORDER  USEPOS USEPOS  CHANNEL CHANNEL      BACKGROUND BACKGROUND  ERASE ERASE      AXIS AXIS  NEGATIVE NEGATIVE  _EXTRA EXTRA_KEYWORDS     compile_opt idl2  strictarrsubs    rcs_id    Id: imdisp pro 163 2006 08 29 12:59:46Z navarro        CHECK INPUT      Check arguments if  n_params  ne 1  then message   Usage: IMDISP  IMAGE  if  n_elements image  eq 0  then message   Argument IMAGE is undefined  if  max p multi  eq 0  then begin   if  n_elements margin  eq 0  then begin     if  n_elements position  eq 4  then margin   0 0 else margin   0 1   endif endif else begin   if  n_elements margin  eq 0  then margin   0 025 endelse if  n_elements order  eq 0  then order   0 if  n_elements channel  eq 0  then channel   0    Check position vector if  n_elements position  gt 0  then begin   if  n_elements position  ne 4  then       message   POSITION must be a 4 element vector of the form  X0  Y0  X1  Y1    if  position 0  lt 0 0  then message   POSITION 0  must be GE 0 0    if  position 1  lt 0 0  then message   POSITION 1  must be GE 0 0    if  position 2  gt 1 0  then message   POSITION 2  must be LE 1 0    if  position 3  gt 1 0  then message   POSITION 3  must be LE 1 0    if  position 0  ge position 2  then       message   POSITION 0  must be LT POSITION 2    if  position 1  ge position 3  then       message   POSITION 1  must be LT POSITION 3  endif    Check the image dimensions result   size image  ndims   result 0  if  ndims lt 2  or  ndims gt 3  then     message   IMAGE must be a Pseudo Color  2D  or True Color  3D  image array  dims   result 1:ndims     Check that 3D image array is in valid true color format true   0 if  ndims eq 3  then begin   index   where dims eq 3L  count    if  count eq 0  then       message   True Color dimensions must be  3 NX NY   NX 3 NY  or  NX NY 3    true   1   truedim   index 0  endif    Check scaling range for pseudo color images if  true eq 0  then begin   if  n_elements range  eq 0  then begin     min_value   min image  max max_value      range    min_value  max_value    endif   if  n_elements range  ne 2  then       message   RANGE keyword must be a 2 element vector  endif else begin   if  n_elements range  gt 0  then       message   RANGE keyword is not used for True Color images   continue endelse    Check for supported graphics devices names    WIN   MAC   X   CGM   PCL   PRINTER   PS   Z  result   where d name eq names  count  if  count eq 0  then message   Graphics device is not supported     Get color table information if  d flags and 256  ne 0  and  d window lt 0  then begin   window   free   pixmap   wdelete   d window endif if  n_elements bottom  eq 0  then bottom   0 if  n_elements ncolors  eq 0  then ncolors    d table_size   bottom    Get IDL version number version   float version release     Check for IDL 5 2 or higher if printer device is selected if  version lt 5 2  and  d name eq  PRINTER  then     message   IDL 5 2 or higher is required for PRINTER device support       GET RED  GREEN  AND BLUE COMPONENTS OF TRUE COLOR IMAGE    if  true eq 1  then begin     case truedim of       0 : begin             red   image 0                  grn   image 1                  blu   image 2            end       1 : begin             red   image  0                grn   image  1                blu   image  2          end       2 : begin             red   image    0              grn   image    1              blu   image    2        end   endcase   red   reform red   overwrite    grn   reform grn   overwrite    blu   reform blu   overwrite  endif      COMPUTE POSITION FOR IMAGE      Save first element of  p multi multi_first    p multi 0     Establish image position if not defined if  n_elements position  eq 0  then begin   if  max p multi  eq 0  then begin     position    0 0  0 0  1 0  1 0    endif else begin     plot   0   nodata  xstyle 4  ystyle 4  xmargin 0  0  ymargin 0  0      position    x window 0   y window 0   x window 1   y window 1    endelse endif    Erase and fill the background if required if  multi_first eq 0  then begin   if keyword_set erase  then erase   if  n_elements background  gt 0  then begin     polyfill   0 01   1 01   1 01   0 01   0 01           0 01   0 01   1 01   1 01   0 01   normal  color background 0    endif endif    Compute image aspect ratio if not defined if  n_elements aspect  eq 0  then begin   case true of     0 : result   size image      1 : result   size red    endcase   dims   result 1:2    aspect   float dims 1    float dims 0  endif    Save image xrange and yrange for axis overlays xrange    0  dims 0  yrange    0  dims 1  if  order eq 1  then yrange   reverse yrange     Set the aspect ratio and margin to fill the position window if requested if keyword_set usepos  then begin   xpos_size   float d x_vsize     position 2    position 0    ypos_size   float d y_vsize     position 3    position 1    aspect_value   ypos_size   xpos_size   margin_value   0 0 endif else begin   aspect_value   aspect   margin_value   margin endelse    Compute size of displayed image and save output position pos   position case true of   0 : imdisp_imsize  image  x0  y0  xsize  ysize  position pos            aspect aspect_value  margin margin_value   1 : imdisp_imsize    red  x0  y0  xsize  ysize  position pos            aspect aspect_value  margin margin_value endcase out_pos   pos      BYTE SCALE THE IMAGE IF REQUIRED      Choose whether to scale the image or not if  keyword_set noscale  eq 0  then begin      Scale the image   case true of     0 : scaled   imdisp_imscale image  bottom bottom  ncolors ncolors              range range  negative keyword_set negative      1 : begin           scaled_dims    size red 1:2            scaled   bytarr scaled_dims 0  scaled_dims 1  3            scaled 0  0  0    imdisp_imscale red  bottom 0  ncolors 256                negative keyword_set negative            scaled 0  0  1    imdisp_imscale grn  bottom 0  ncolors 256                negative keyword_set negative            scaled 0  0  2    imdisp_imscale blu  bottom 0  ncolors 256                negative keyword_set negative          end   endcase  endif else begin      Don t scale the image   case true of     0 : scaled   image     1 : begin           scaled_dims    size red 1:2            scaled   replicate red 0  scaled_dims 0  scaled_dims 1  3            scaled 0  0  0    red           scaled 0  0  1    grn           scaled 0  0  2    blu         end   endcase  endelse      DISPLAY IMAGE ON PRINTER DEVICE    if  d name eq  PRINTER  then begin      Display the image   case true of     0 : begin           device   index_color           tv  scaled  x0  y0  xsize xsize  ysize ysize  order order         end     1 : begin           device   true_color           tv  scaled  x0  y0  xsize xsize  ysize ysize  order order  true 3         end   endcase      Draw axes if required   if keyword_set axis  then       plot   0   nodata   noerase  position out_pos          xrange xrange  xstyle 1  yrange yrange  ystyle 1          _extra extra_keywords      Return to caller   return  endif      DISPLAY IMAGE ON GRAPHICS DEVICES WHICH HAVE SCALEABLE PIXELS    if  d flags and 1  ne 0  then begin      Display the image   case true of     0 : tv  scaled  x0  y0  xsize xsize  ysize ysize  order order     1 : begin           tvlct  r  g  b   get           loadct  0   silent           tv  scaled  x0  y0  xsize xsize  ysize ysize  order order  true 3           tvlct  r  g  b         end   endcase      Draw axes if required   if keyword_set axis  then       plot   0   nodata   noerase  position out_pos          xrange xrange  xstyle 1  yrange yrange  ystyle 1          _extra extra_keywords      Return to caller   return  endif      RESIZE THE IMAGE      Resize the image if  keyword_set noresize  eq 0  then begin   if  true eq 0  then begin     resized   imdisp_imregrid scaled  xsize  ysize  interp keyword_set interp    endif else begin     resized   replicate scaled 0  xsize  ysize  3      resized 0  0  0    imdisp_imregrid reform scaled    0  xsize  ysize          interp keyword_set interp      resized 0  0  1    imdisp_imregrid reform scaled    1  xsize  ysize          interp keyword_set interp      resized 0  0  2    imdisp_imregrid reform scaled    2  xsize  ysize          interp keyword_set interp    endelse endif else begin   resized   temporary scaled    x0   0   y0   0 endelse      GET BIT DEPTH FOR THIS DISPLAY      If this device supports windows  make sure a window has been opened if  d flags and 256  ne 0 then begin   if  d window lt 0  then begin     window   free   pixmap     wdelete   d window   endif endif    Set default display depth depth   8    Get actual bit depth on supported displays if  d name eq  WIN  or  d name eq  MAC  or  d name eq  X  then begin   if  version ge 5 1  then begin     device  get_visual_depth depth   endif else begin     if  d n_colors gt 256  then depth   24   endelse endif      SELECT DECOMPOSED COLOR MODE  ON OR OFF  FOR 24 BIT DISPLAYS    if  d name eq  WIN  or  d name eq  MAC  or  d name eq  X  then begin   if  depth gt 8  then begin     if  version ge 5 2  then device  get_decomposed entry_decomposed else         entry_decomposed   0     if  true eq 1  or  channel gt 0  then device  decomposed 1 else         device  decomposed 0   endif endif      DISPLAY THE IMAGE      If the display is 8 bit and the image is true color    convert image from true color to indexed color if  depth le 8  and  true eq 1  then begin   resized   color_quan temporary resized  3  r  g  b        colors ncolors  dither keyword_set dither    byte bottom    tvlct  r  g  b  bottom   true   0 endif    Set channel value for supported devices if  d name eq  WIN  or  d name eq  MAC  or  d name eq  X  then begin   channel_value   channel endif else begin   channel_value   0 endelse    Display the image case true of   0 : tv  resized  x0  y0  order order  channel channel_value   1 : tv  resized  x0  y0  order order  true 3 endcase      RESTORE THE DECOMPOSED COLOR MODE FOR 24 BIT DISPLAYS    if  d name eq  WIN  or  d name eq  MAC  or  d name eq  X  and      depth gt 8  then begin   device  decomposed entry_decomposed   if  d name eq  MAC  then tv   0   1   1 endif      DRAW AXES IF REQUIRED    if keyword_set axis  then     plot   0   nodata   noerase  position out_pos        xrange xrange  xstyle 1  yrange yrange  ystyle 1        _extra extra_keywords  END"); 
    106 a[104] = new Array("./Picture/saveimage.html", "saveimage.pro", "", "       file_comments   Save the current graphics window to an output file  GIF by default         The output formats supported are:      GIF   8 bit with color table       BMP   8 bit with color table       PNG   8 bit with color table       PICT  8 bit with color table       JPEG 24 bit true color       TIFF 24 bit true color         Any conversions necessary to convert 8 bit or 24 bit images onscreen to      8 bit or 24 bit output files are done automatically       categories Input Output       param FILE  in required default format GIF    Name of the output file      keyword BMP   Set this keyword to create BMP format  8 bit with color table       keyword PNG   Set this keyword to create PNG format  8 bit with color table       keyword PICT   Set this keyword to create PICT format  8 bit with color table       keyword JPEG   Set this keyword to create JPEG format  24 bit true color       keyword TIFF   Set this keyword to create TIFF format  24 bit true color       keyword QUALITY  default 75    If set to a named variable  specifies the quality for   JPEG output  Ranges from 0  terrible  to   100  excellent  Smaller quality values yield higher   compression ratios and smaller output files       keyword DITHER  default no dithering    If set  dither the output image when creating 8 bit output   which is read from a 24 bit display       keyword CUBE  default to use statistical method    If set  use the color cube method to quantize colors when   creating 8 bit output which is read from a 24 bit display    This may improve the accuracy of colors in the output image     especially white       keyword QUIET  default to print an information message    Set this keyword to suppress the information message       restrictions   The output file is overwritten if it exists       restrictions   requires IDL 5 0 or higher  square bracket array syntax       examples     IDL  openr  lun  filepath hurric dat  subdir examples data   get_lun   IDL  image   bytarr 440  330    IDL  readu  lun  image   IDL  free_lun  lun   IDL  loadct  13   IDL  tvscl  image   IDL  saveimage   hurric gif       history Liam Gumley ssec wisc edu   http: cimss ssec wisc edu gumley     This program is free software  you can redistribute it and or   modify it under the terms of the GNU General Public License   as published by the Free Software Foundation  either version 2   of the License  or  at your option  any later version      This program is distributed in the hope that it will be useful    but WITHOUT ANY WARRANTY  without even the implied warranty of   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE   See the   GNU General Public License for more details      You should have received a copy of the GNU General Public License   along with this program  if not  write to the Free Software   Foundation  Inc  59 Temple Place   Suite 330  Boston  MA  02111 1307  USA       version  Id: saveimage pro 163 2006 08 29 12:59:46Z navarro       PRO saveimage  FILE  BMP BMP  PNG PNG  PICT PICT  JPEG JPEG  TIFF TIFF      QUALITY QUALITY  DITHER DITHER  CUBE CUBE  QUIET QUIET  MULTIPLE   multiple     compile_opt idl2  strictarrsubs    rcs_id    Id: saveimage pro 163 2006 08 29 12:59:46Z navarro        CHECK INPUT      Check arguments if  n_params  ne 1  then message   Usage: SAVEIMAGE  FILE  if  n_elements file  eq 0  then message   Argument FILE is undefined  if  n_elements file  gt 1  then message   Argument FILE must be a scalar string     Check keywords output    GIF  if keyword_set bmp   then output    BMP  if keyword_Set png   then output    PNG  if keyword_set pict  then output    PICT  if keyword_set jpeg  then output    JPEG  if keyword_set tiff  then output    TIFF  if  n_elements quality  eq 0  then quality   75    Check for TVRD capable device if  d flags and 128  eq 0 then message   Unsupported graphics device     Check for open window if  d flags and 256  ne 0 then begin   if  d window lt 0  then message   No graphics windows are open  endif    Get display depth depth   8 if  d n_colors gt 256  then depth   24      GET CONTENTS OF GRAPHICS WINDOW      Handle window devices  other than the Z buffer  if  d flags and 256  ne 0 then begin      Copy the contents of the current display to a pixmap   current_window    d window   xsize    d x_size   ysize    d y_size   window   free   pixmap  xsize xsize  ysize ysize  retain 2   device  copy 0  0  xsize  ysize  0  0  current_window       Set decomposed color mode for 24 bit displays   version   float version release    if  depth gt 8  then begin     if  version gt 5 1  then device  get_decomposed entry_decomposed     device  decomposed 1   endif  endif    Read the pixmap contents into an array if  depth gt 8  then begin   image   tvrd order 0  true 1  endif else begin   image   tvrd order 0  endelse    Handle window devices  other than the Z buffer  if  d flags and 256  ne 0 then begin      Restore decomposed color mode for 24 bit displays   if  depth gt 8  then begin     if  version gt 5 1  then begin       device  decomposed entry_decomposed     endif else begin       device  decomposed 0       if  keyword_set quiet  eq 0  then           print   Decomposed color was turned off      endelse   endif      Delete the pixmap   wdelete   d window   wset  current_window  endif    Get the current color table tvlct  r  g  b   get    If an 8 bit image was read  reduce the number of colors if  depth le 8  then begin   reduce_colors  image  index   r   r index    g   g index    b   b index  endif      WRITE OUTPUT FILE    case 1 of      Save the image in 8 bit output format    output eq  GIF   or  output eq  BMP  or      output eq  PICT  or  output eq  PNG  : begin      if  depth gt 8  then begin          Convert 24 bit image to 8 bit       case keyword_set cube  of         0 : image   color_quan image  1  r  g  b  colors 256                  dither keyword_set dither          1 : image   color_quan image  1  r  g  b  cube 6        endcase          Sort the color table from darkest to brightest       table_sum   total long r   long g   long b  2        table_index   sort table_sum        image_index   sort table_index        r   r table_index        g   g table_index        b   b table_index        oldimage   image       image    image_index temporary oldimage       endif        Save the image     case output of        GIF   : write_gif   file  image  r  g  b  MULTIPLE   multiple        BMP   : write_bmp   file  image  r  g  b        PNG   : write_png   file  image  r  g  b        PICT  : write_pict  file  image  r  g  b     endcase    end      Save the image in 24 bit output format    output eq  JPEG  or  output eq  TIFF  : begin        Convert 8 bit image to 24 bit     if  depth le 8  then begin       info   size image        nx   info 1        ny   info 2        true   bytarr 3  nx  ny        true 0        r image        true 1        g image        true 2        b image        image   temporary true      endif        If TIFF format output  reverse image top to bottom     if  output eq  TIFF  then image   reverse temporary image  3         Write the image     case output of        JPEG  : write_jpeg  file  image  true 1  quality quality        TIFF  : write_tiff  file  image  1     endcase    end  endcase    Print information for the user if  keyword_set quiet  eq 0  then     print  file  output  format Created  a  in  a  format   END"); 
    107 a[105] = new Array("./Picture/showimage.html", "showimage.pro", "", "       file_comments   Show the contents of a graphics file in the current window         The input formats supported are:      GIF   8 bit with color table       BMP   8 bit with color table or 24 bit true color       PICT  8 bit with color table       TIFF  8 bit with color table or 24 bit true color       JPEG 24 bit true color      Any conversions necessary to translate 8 bit or 24 bit files   to 8 bit or 24 bit images on screen are done automatically       categories Input Output       param FILE  in required    Name of the output file  format is identified automatically       keyword DITHER  default no dithering    Set this keyword to dither the input image when displaying   24 bit images on an 8 bit display       keyword CURRENT   Set this keyword to display the image in the current window    default is to create a new window sized to fit the image       restrictions   The color table is modified       restrictions   Requires IDL 5 2 or higher  image QUERY functions       examples   IDL  showimage  filepath rose jpg  subdir examples data       history Liam Gumley ssec wisc edu   http: cimss ssec wisc edu gumley     This program is free software  you can redistribute it and or   modify it under the terms of the GNU General Public License   as published by the Free Software Foundation  either version 2   of the License  or  at your option  any later version      This program is distributed in the hope that it will be useful    but WITHOUT ANY WARRANTY  without even the implied warranty of   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE   See the   GNU General Public License for more details      You should have received a copy of the GNU General Public License   along with this program  if not  write to the Free Software   Foundation  Inc  59 Temple Place   Suite 330  Boston  MA  02111 1307  USA       version  Id: showimage pro 186 2006 09 20 10:50:37Z pinsard       PRO showimage  FILE  DITHER DITHER  CURRENT CURRENT     compile_opt idl2  strictarrsubs   rcs_id    Id: showimage pro 186 2006 09 20 10:50:37Z pinsard        CHECK INPUT      Check IDL version  if float version release  lt 5 2 then begin   message   IDL 5 2 or higher is required   continue   return endif    Check input arguments  case 1 of   n_params  ne 1           : error    Usage: SHOWIMAGE  FILE    n_elements file  eq 0     : error    Argument FILE is undefined    n_elements file  gt 1     : error    Argument FILE must be a scalar string     findfile file 0  eq   : error    Argument FILE was not found    else                      : error     endcase  if error ne   then begin   message  error   continue   return endif      CHECK THE GRAPHICS DEVICE      Check for device supporting windows and tvrd   if  d flags and 256  eq 0  or  d flags and 128  eq 0  then begin   error   string d name  format Graphics device  a  is not supported    message  error   continue   return endif    Make sure a window has been opened in this session and get visual depth  if  d window lt 0 then begin   window   free   pixmap  xsize 20  ysize 20   wdelete   d window endif device  get_visual_depth depth    If 8 bit display is low on colors  print a message  if  depth eq 8  and  d table_size  lt 64 then message       Display has less than 64 colors  image quality may degrade   continue      IDENTIFY FILE AND READ IMAGE      Identify the file format  result   query_gif file  info  if result eq 0 then result   query_bmp file  info  if result eq 0 then result   query_pict file  info  if result eq 0 then result   query_tiff file  info  if result eq 0 then result   query_jpeg file  info  if result eq 0 then begin   message   File format not recognized   continue   return endif    Fix the channel information for GIF images  if info type eq  GIF  then info channels   1    Read the image  case info type of     GIF  : read_gif  file  image  r  g  b     BMP  : begin     if info channels eq 1 then begin       image   read_bmp file  r  g  b      endif else begin       image   read_bmp file        image   reverse temporary image  1      endelse   end     PICT  : read_pict  file  image  r  g  b     TIFF  : begin     if info channels eq 1 then begin       image   read_tiff file  r  g  b  order order        image   reverse temporary image  2      endif else begin       image   read_tiff file  order order        image   reverse temporary image  3      endelse   end     JPEG  : read_jpeg  file  image  endcase    If an 8 bit image was read  reduce the number of colors  if info channels eq 1 then begin   reduce_colors  image  index   r   r index    g   g index    b   b index  endif    Get image size  dims   size image   dimensions  if n_elements dims  eq 2 then begin   nx   dims 0    ny   dims 1  endif else begin   nx   dims 1    ny   dims 2  endelse      CREATE A WINDOW      Create a draw widget sized to fit the image  if not keyword_set current  then begin      Set default window size    scroll   0   xsize   nx   ysize   ny   draw_xsize   nx   draw_ysize   ny      Adjust the window size if the image is too large    device  get_screen_size screen   screen_xsize   screen 0    screen_ysize   screen 1    if  nx gt screen_xsize  then begin     xsize   0 9   screen_xsize     scroll   1   endif   if  ny gt screen_ysize  then begin     ysize   0 9   screen_ysize     scroll   1   endif      Create the draw widget    base   widget_base title file    draw   widget_draw base  scroll scroll    widget_control  draw  xsize xsize  ysize ysize        draw_xsize draw_xsize  draw_ysize draw_ysize  endif      HANDLE IDL 8 BIT MODE    if depth eq 8 then begin      If the color table of an 8 bit image is larger than     the current display table  convert the image to 24 bit    if  info channels eq 1  and  n_elements r  gt  d table_size  then begin        Convert to 24 bit      dims   size image   dimensions      nx   dims 0      ny   dims 1      true   bytarr 3  nx  ny      true 0        r image      true 1        g image      true 2        b image      image   temporary true         Reset the number of channels      info channels   3    endif      If image is 24 bit  convert to 8 bit    if info channels eq 3 then begin        Convert 24 bit image to 8 bit      image   color_quan image  1  r  g  b  colors d table_size          dither keyword_set dither         Sort the color table from darkest to brightest      table_sum   total long r   long g   long b  2      table_index   sort table_sum      image_index   sort table_index      r   r table_index      g   g table_index      b   b table_index      oldimage   image     image    image_index temporary oldimage         Reset the number of channels      info channels   1    endif  endif      DISPLAY THE IMAGE      Realize the draw widget  if not keyword_set current  then widget_control  base   realize    Save current decomposed mode and display order  device  get_decomposed current_decomposed current_order    order    Set image to display from bottom up   order   0    Display the image  if info channels eq 1 then begin    device  decomposed 0   tvlct  r  g  b   tv  image  endif else begin    device  decomposed 1   tv  image  true 1  endelse    Restore decomposed mode and display order  device  decomposed current_decomposed  order   current_order  END"); 
    108 a[106] = new Array("./Postscript/closeps.html", "closeps.pro", "", "           file_comments   Close the Postscript mode     when archive_ps ne 0  we add the name and the date at the bottom left corner   of the postscript page    If the postscript is called idl ps we change its name to number ps    number automatically found to be 1 larger that any of the existing ps file       keyword INFOWIDGET   A long integer giving the id of the information widget  created by openps    that we have to destroy at the end of closeps  when the postscript is done       uses cm_4ps      history Sebastien Masson  smasson lodyc jussieu fr                          21 12 98   June 2005: Sebastien Masson  english version with new commons      version  Id: closeps pro 136 2006 07 10 15:20:19Z pinsard             PRO closeps  INFOWIDGET   infowidget       compile_opt idl2  strictarrsubs      IF lmgr demo  EQ 1 THEN return     include commons  cm_4ps   IF NOT keyword_set key_forgetold  THEN BEGIN  updatenew   ENDIF     IF  d name NE  PS  THEN GOTO  last_part     if archive_ps   0 we will add its name and the date at the bottom   left corner of the page  in case if the postscript will be archived   in printps      IF keyword_set archive_ps  THEN BEGIN     we get the name of the latest created postscript         psdir   isadirectory psdir  title    Select psdir       nameps   file_search psdir ps                                 test_regular   test_write   nosort       dates    file_info nameps mtime      lastdate    reverse sort temporary dates 0       nameps   nameps lastdate       nameps   file_basename nameps   ps    If this name is idl ps then we change it to the number ps      IF nameps EQ  idl  then BEGIN   get the name of all the  ps or  ps gz files available in psdir        allps   file_search psdir ps ps gz pdf   test_regular   nosort         allps   file_basename file_basename allps gz ps         allps   file_basename allps pdf    find which of these names corresponds to numbers    get ascii codes of the names        testnumb   byte allps    longest name        maxstrlen    size testnumb   dimensions 0    ascii codes can be 0 or between byte 0  and byte 9         testnumb   testnumb EQ 0 OR                      testnumb GE  byte 0 0  AND testnumb LE  byte 9 0         testnumb   where total testnumb  1  EQ maxstrlen  count         IF count NE 0 THEN BEGIN   get the largest number          psnumber   fix allps testnumb           psnumber    psnumber reverse sort psnumber 0    1        ENDIF ELSE psnumber   0        nameps   strtrim psnumber  2       ENDIF     we annotate the postscript        date   byte systime 0       we get the date      xyouts   d x_px_cm   d y_px_cm                  nameps   string date 4:10 string date 20:23                    device  charsize    75    ENDIF     close the postscript mode    device   close   last_part:      thisOS   strupcase strmid version os_family  0  3     CASE thisOS of       MAC : SET_PLOT  thisOS       WIN : SET_PLOT  thisOS      ELSE: SET_PLOT   X     ENDCASE    def_myuniquetmpdir    colorfile   myuniquetmpdir    original_colors dat     IF file_test colorfile   regular  THEN BEGIN      restore  colorfile      file_delete  colorfile   quiet   reload the original colors      tvlct  red  green  blue    ENDIF     p font    1   force background color to the last color  white      p BACKGROUND d n_colors 1    255     p color 0    if  d n_colors gt 256 then  p background ffffff x      if keyword_set infowidget  then       widget_control  long infowidget  bad_id   toto   destroy      return end"); 
    109 a[107] = new Array("./Postscript/openps.html", "openps.pro", "", "             file_comments   switch to postscript mode and define it      param namepsin  in optional    name of the postscript file    Extension  ps  is added if missing  It will be stored in the psdir directory       keyword FILENAME   to define the name of the postscript file through a keyword rather than with    nameps input argument  in this case the keyword can be pass through   different routines via _EXTRA keyword       keyword INFOWIDGET   If INFOWIDGET is present  it specifies a named variable into which the id of    the widget giving information about the postscript creation is stored as a    long integer    This id is needed by closeps to kill    the information widget       keyword KEEP_PFONT   activate to suppress the modification of  p font    by default we force   p font   0  to make smaller postscripts       keyword PORTRAIT      keyword LANDSCAPE      keyword KEEPPFONT   same as keep_pfont      keyword LIGHTNESS   a scalar used to change the Lightness of the color palette to be able to   adjust according to the printer we use  the media  paper or slide      1 to get darker colors      keyword _EXTRA   used to pass any keyword to device procedure       uses cm_4ps      history Sebastien Masson  smasson lodyc jussieu fr    21 12 98   1 2 98: ajout de nameps en input   1 9 1999: ajout du mot cle FILENAME et du widget   June 2005: Sebastien Masson  cleaning  english version with new commons      version  Id: openps pro 186 2006 09 20 10:50:37Z pinsard             pro openps  namepsin  FILENAME   filename  INFOWIDGET   infowidget                 KEEPPFONT   keeppfont  KEEP_PFONT   keep_pfont                 PORTRAIT   portrait  LANDSCAPE   landscape                 LIGHTNESS   Lightness _extra   ex       compile_opt idl2  strictarrsubs      IF lmgr demo  EQ 1 THEN BEGIN       dummy   report impossible to create a PS in demo mode        return    ENDIF     include commons  cm_4ps IF NOT keyword_set key_forgetold  THEN BEGIN  updatenew ENDIF     close the postscript device if we are already in postscript mode    IF  d name EQ  PS  THEN device   close   switch to postscript mode    set_plot ps      if we use  keyword Lightness   save the actual color palette in a temporary file    to be restored when calling closeps      IF n_elements Lightness  NE 0 THEN BEGIN      IF Lightness NE 1 THEN BEGIN        tvlct  red  green  blue   get        def_myuniquetmpdir        save  red  green  blue  filename   myuniquetmpdir    original_colors dat         palit  Lightness  red  green  blue      ENDIF    ENDIF     we define the name of the file      CASE 1 OF      n_params  EQ 1:nameps   namepsin      keyword_set filename : nameps   filename      ELSE:nameps   xquestion Name of the postscript file   idl ps   chkwid     ENDCASE   make sure that nameps ends with  ps     nameps   file_dirname nameps   mark_directory                  file_basename nameps   ps     ps    add path  psdir  and check that nameps is ok    nameps   isafile nameps  iodir   psdir   new      we define xsize  ysize  xoffset et  yoffset      IF n_elements portrait  NE 0 OR n_elements landscape  NE 0 THEN        key_portrait   keyword_set portrait     1   keyword_set landscape      if key_portrait EQ 1 then begin       xs   min page_size        ys   max page_size        xoff   0        yoff   0     ENDIF ELSE BEGIN       xs   max page_size        ys   min page_size        xoff   0        yoff   max page_size     ENDELSE     We define the device of the postscript mode      device   color   palatino  filename   strcompress nameps   remove_all                 LANDSCAPE   1   key_portrait  PORTRAIT   key_portrait                xsize   xs  ysize   ys  xoffset   xoff  yoffset   yoff                bits_per_pixel   8  language_level   2  _extra   ex   to make smaller postcripts    IF NOT  keyword_set keeppfont  OR keyword_set keep_pfont       THEN  p font   0   show some informations    IF arg_present infowidget  THEN       infowidget   xnotice Postcript file is currently processed       RETURN END            "); 
    110 a[108] = new Array("./Postscript/printps.html", "printps.pro", "", "             file_comments     archiving possibilities       if archive_ps  common variable of cm_4ps  ne 0 then the postscript   can be saved for archiving if it is printed or if the button    archive ps  is pressed  if it is printed and archive_ps   1 then   the archiving is done automatically whereas we ask if the postscript   file must be archived or not    If the postscript name is  idl ps   default name  then this name will   be changed to number ps  number automatically found to be 1 larger   that any of the existing ps file       categories    Postscripts      param event      restrictions     1  this is working only with unix linux osX machines     2  definition of the printing command     the printing command is defined by the common variable  print_command    in cm_4ps  This command must be defined build in a way that it the   instruction:       print_command i printer_machine_names i   file ps   or       print_command printer_machine_names i   file ps   is working  default definition is  lpr  P         history Sebastien Masson  smasson lodyc jussieu fr   21 12 98                         25 8 19999 utilisation des widgets                         8 9 1999 utilisation de cw_bgroup   June 2005: Sebastien Masson: cleaning  English version with new commons      version  Id: printps pro 157 2006 08 21 09:01:50Z navarro             PRO printps_event  event     include commons     compile_opt idl2  strictarrsubs    cm_4ps   IF NOT keyword_set key_forgetold  THEN BEGIN  updatenew   ENDIF     What kind of event do we have     widget_control  event id  get_uvalue   uval   case on the event   CASE uval name OF     visualize case : postscript visualization        visualize :BEGIN   paper orientation       if key_portrait EQ 1 then ori    portrait  ELSE ori    seascape    paper format       CASE round 10 total page_size  OF         round 10 83 9611   118 816  : papsize    a0          round 10 59 4078   83 9611  : papsize    a1          round 10 41 9806   59 4078  : papsize    a2          round 10 29 7039   41 9806  : papsize    a3          round 10 20 9903   29 7039  : papsize    a4          round 10 14 8519   20 9903  : papsize    a5          round 10 10 4775   14 8519  : papsize    a6          round 10 7 40833   10 4775  : papsize    a7          round 10 5 22111   7 40833  : papsize    a8          round 10 3 70417   5 22111  : papsize    a9          round 10 2 61056   3 70417  : papsize    a10          round 10 100 048   141 393  : papsize    b0          round 10 70 6967   100 048  : papsize    b1          round 10 50 0239   70 6967  : papsize    b2          round 10 35 3483   50 0239  : papsize    b3          round 10 25 0119   35 3483  : papsize    b4          round 10 17 6742   25 0119  : papsize    b5          round 10 22 86   30 48  : papsize    archA          round 10 30 48   45 72  : papsize    archB          round 10 45 72   60 96  : papsize    archC          round 10 60 96   91 44  : papsize    archD          round 10 91 44   121 92  : papsize    archE          round 10 21 59   33 02  : papsize    flsa          round 10 21 59   33 02  : papsize    flse          round 10 13 97   21 59  : papsize    halfletter          round 10 19 05   25 4  : papsize    note          round 10 21 59   27 94  : papsize    letter          round 10 21 59   35 56  : papsize    legal          round 10 27 94   43 18  : papsize    11x17          round 10 43 18   27 94  : papsize    ledger          ELSE:papsize    a4        ENDCASE   call the viewers       CASE event value OF          Ghostview :spawn   ghostview  papsize   quiet  ori   uval nameps          Ghostscript :spawn   gs  sPAPERSIZE papsize   q  uval nameps          Kghostview :spawn   kghostview  uval nameps       ENDCASE       return     END     print case: print and archive the file if needed        print :BEGIN   printer selection       printer   printer_machine_names event value    print       CASE n_elements print_command  OF         0:ptcmd    lpr  P          1:ptcmd   print_command 0          n_elements printer_machine_names :ptcmd   print_command event value          ELSE:BEGIN           ng   report bad definition of print_command  common variable of cm_4ps   C we did not print the postscript file   simple            return         END       ENDCASE       spawn  ptcmd   printer         uval nameps     printing informations          spawn   lpq  P imprimante   l  info     display them         xdisplayfile   nothing  text   info                           title    Printing Info  file_basename uval nameps                            height   n_elements info   printps      history Sebastien Masson  smasson lodyc jussieu fr   21 12 98                         25 8 19999 utilisation des widgets                         8 9 1999 utilisation de cw_bgroup   June 2005: Sebastien Masson: cleaning  English version with new commons      version  Id: printps pro 157 2006 08 21 09:01:50Z navarro           PRO printps  psfilename     this is working only with unix linux osX machines     compile_opt idl2  strictarrsubs     thisOS   strupcase strmid version os_family  0  3    CASE thisOS OF      MAC :return      WIN :return     ELSE:   ENDCASE     include commons  cm_4ps   IF NOT keyword_set key_forgetold  THEN BEGIN  updatenew   ENDIF     we get the name of the latest created postscript      psdir   isadirectory psdir  title    Select psdir    CASE N_PARAMS  OF     0: BEGIN       nameps   file_search psdir ps   test_regular   nosort        IF nameps 0  EQ   THEN BEGIN         ras   report no postsrcipt file  ending with  ps  found in :     psdir          RETURN       ENDIF       dates    file_info nameps mtime       lastdate    reverse sort temporary dates 0        nameps   nameps lastdate      END     1: nameps   psfilename     ELSE: BEGIN       ras   report printps accept only one element: psfilename        RETURN     END   ENDCASE     we check if the file is exist in psdir  if necessary we complete   its name with  ps and or  gz     nameps   find nameps ps gz  iodir   psdir   nopro    IF nameps EQ  NOT FOUND  THEN BEGIN     ng   report file  nameps ps gz  does not exist       return   ENDIF   gzipped   strpos nameps   gz    if the file is gzipped we call gunzip et change its name   IF gzipped NE  1 THEN BEGIN     spawn   gunzip     nameps     nameps   strmid nameps  0  gzipped    endif     build the widget     base   widget_base row  title    Postscript file:                            file_basename nameps    ps viewers grouped button   psviewers    no psviewers found    IF file_which getenv PATH   ghostview  NE   THEN       psviewers    psviewers   Ghostview    IF file_which getenv PATH   gs  NE   THEN       psviewers    psviewers   Ghostscript    IF file_which getenv PATH   kghostview  NE   THEN       psviewers    psviewers   Kghostview    if at least one of viewer was found we define these buttons   IF n_elements psviewers  GT 1 THEN BEGIN     psviewers   psviewers 1:      notused   cw_bgroup base  psviewers   frame  label_top    Visualize                              uvalue    name: visualize  nameps:nameps                               column   return_name    ENDIF   printers list grouped buttons   are the common variables printer_human_names and printer_human_names   defined in a proper way    CASE 1 OF     n_elements printer_human_names  eq 0:         noting   report the cm_4ps variable printer_human_names is not defined   CWe could not propose any printer   simple      n_elements printer_human_names  NE n_elements printer_machine_names :         noting   report the cm_4ps variables printer_human_names and  Cprinter_machine_names do not have the same number of arguments   CWe could not propose any printer   simple      printer_human_names 0  EQ  :     ELSE:notused           cw_bgroup base  printer_human_names   frame   column                     label_top    Select printer                      uvalue    name: print  nameps:nameps  gzip:gzipped NE  1    ENDCASE    archive ps  button  can be created only if archive_ps ne 0   IF keyword_set archive_ps  THEN       notused   widget_button base  value    archive ps                                  uvalue    name: archive  nameps:nameps                                             gzip:gzipped NE  1    quit button   notused   widget_button base  value    quit                                uvalue    name: quit  nameps:nameps                                           gzip:gzipped NE  1      widget_control  base   realize     xmanager   printps  base   no_block     return end"); 
    111 a[109] = new Array("./ReadWrite/idl-NetCDF/ncdf_listdims.html", "ncdf_listdims.pro", "", "     file_comments        categories        param NCID        restrictions        examples          history        version    Id: ncdf_listdims pro 157 2006 08 21 09:01:50Z navarro       FUNCTION ncdf_listdims ncid     compile_opt idl2  strictarrsubs    n ncdf_inquire ncid ndims  names strarr n   for i 0 n 1 do begin     ncdf_diminq ncid i name size     names i name endfor  return names  end"); 
    112 a[110] = new Array("./ReadWrite/idl-NetCDF/ncdf_listvars.html", "ncdf_listvars.pro", "", "     file_comments        categories        param NCID         returns        restrictions        examples          history        version    Id: ncdf_listvars pro 157 2006 08 21 09:01:50Z navarro       FUNCTION ncdf_listvars ncid     compile_opt idl2  strictarrsubs    n ncdf_inquire ncid nvars  names strarr n   for i 0 n 1 do begin     names i ncdf_varinq ncid i name endfor  return names  end"); 
    113 a[111] = new Array("./ReadWrite/idl-NetCDF/ncdf_quickread/ncdf_quickread.html", "ncdf_quickread.pro", "", ""); 
    114 a[112] = new Array("./ReadWrite/idl-NetCDF/ncdf_quickread/ncdf_quickread_helper.html", "ncdf_quickread_helper.pro", "", "      ncdf_quickread_helper pro   This file contains IDL functions to read netCDF                                data files into IDL variables       Adapted from CDF2IDL pro      This file contains the following functions and procedures:       functions:          ncdf_quickread_getfile   strips the directory and optionally  any                                    suffixes from the path file          ncdf_quickread_getdir   returns the directory from the full path file          ncdf_quickread_validatename   validates the name that will be used                                        as a netCDF variable       procedures:          ncdf_quickread_helper1   construct commands which when executed at                                   the top level will read netCDF variables                                   into IDL      History:    Date       Name          Action               06 Jun 97  S  Rupert     Created     09 Jun 97  S  Rupert     Fully tested     10 Jun 97  S  Rupert     Modified keyword usage     03 Feb 98  S  Rupert     Added additional error checking  and warning to                             output script      17 Feb 98  S  Rupert     Corrected validation routine to handle instance                             of name strating with a number and containing a                             dash     05 Jul 00  A M Iwi       Added keyword PREFIX  on CDF2IDL   Supplied string                             gets prepended to all variable names     19 Jun 01  A M Iwi       Added keyword REFORM on CDF2IDL   REFORM function                             is used to remove dimensions of size 1     02 Oct 03  A M Iwi       Change into helper routine for ncdf_quickread    11 Aug 04  A M Iwi       Add  fields  option to read only certain fields                              Also  only stringify attributes of type CHAR         file_comments   This function returns the filename name from the full path       categories        param FULLPATH   full directory file path      keyword SUFFIX   include input suffix in output file name      returns   file   filename      restrictions        examples   Call: file   ncdf_quickread_getfile fullpath        history        version    Id: ncdf_quickread_helper pro 163 2006 08 29 12:59:46Z navarro     function ncdf_quickread_getfile  fullpath  suffix suffix on_error 2 compile_opt hidden   Retrieve the postion at which the first   character occurs from   the end of the string  dirlen   rstrpos fullpath       Retrieve the full length of the original string  len   strlen fullpath     Retrieve the filename  fullfile   strmid fullpath  dirlen 1  len     Retrieve the position at which the first   character occurs from   the end of the string  len    1 if not keyword_set suffix  then len   rstrpos fullfile    if  len EQ  1  then len   strlen fullfile     Retrieve the file  file   strmid fullfile  0  len     Return the file name  return  file    End function  end       file_comments   This function returns the directory name from the full path       categories        param FULLPATH   full directory file path      returns   directory path      restrictions        examples   Call: dir   ncdf_quickread_getdir fullpath        history        version    Id: ncdf_quickread_helper pro 163 2006 08 29 12:59:46Z navarro      function ncdf_quickread_getdir  fullpath on_error 2 compile_opt hidden   Retrieve the postion at which the first   character occurs from   the end of the string  len   rstrpos fullpath       Retrieve the filename  if  len EQ  1  then dir       else dir   strmid fullpath  0  len 1     Return the file name  return  dir    End function  end       file_comments   This routine ensures that the given name does not start with a number    nor contain a dash   IDL cannot accept a variable starting with a    number or containing a dash   If the name starts with a number  an    underscore is prepended to the name  and if it contains a dash  the    dash is replaced with an underscore         categories        param VARNAME   The name of the variable to be read         returns        restrictions        examples          history        version    Id: ncdf_quickread_helper pro 163 2006 08 29 12:59:46Z navarro      function ncdf_quickread_validatename  varname on_error 2 compile_opt hidden    Initialize the name  name   varname    If the name starts with a number  prepend it with an underscore  if  strpos varname   0  EQ 0  then name   strcompress _ varname  if  strpos varname   1  EQ 0  then name   strcompress _ varname  if  strpos varname   2  EQ 0  then name   strcompress _ varname  if  strpos varname   3  EQ 0  then name   strcompress _ varname  if  strpos varname   4  EQ 0  then name   strcompress _ varname  if  strpos varname   5  EQ 0  then name   strcompress _ varname  if  strpos varname   6  EQ 0  then name   strcompress _ varname  if  strpos varname   7  EQ 0  then name   strcompress _ varname  if  strpos varname   8  EQ 0  then name   strcompress _ varname  if  strpos varname   9  EQ 0  then name   strcompress _ varname     If the name contains a dash replace it with an underscore   if  strpos name    NE  1  then begin    pieces   str_sep name       n_pieces   n_elements pieces     name   pieces 0     for i 1 n_pieces 1 do begin       name   strcompress name _ pieces i     endfor endif    Return the file name  return  name    End function  end      file_comments   This procedure creates a script to read the data in a given netCDF   file into IDL   The default output file is the name of the netCDF   file with idl replacing any existing suffix   The default output is   variable data only       categories        param INFILE   full path to netCDF file of interest      keyword VERBOSE     Set this keyword to return an error message in case of an error       keyword PREFIX   see changelog above       keyword FIELDS        keyword REFORM   see changelog above        returns   array of commands to run at top level      restrictions        examples          history        version    Id: ncdf_quickread_helper pro 163 2006 08 29 12:59:46Z navarro       function ncdf_quickread_helper  infile  verbose verbose                                     prefix prefix  fields fields                                    reform reform on_error 2 compile_opt hidden        Ensure that the netCDF format is supported on the current platform  if not ncdf_exists  then message       The Network Common Data Format is not supported on this platform     Open the netcdf file for reading  ncid   NCDF_OPEN strcompress infile   remove_all  if  ncid EQ  1  then message     The file  infile  could not be opened  please check the path     Retrieve general information about this netCDF file  ncidinfo   NCDF_INQUIRE ncid     command to write file header commands __ncid   NCDF_OPEN infile   subset 0 if n_elements fields  ne 0 then begin   if  fields ne   then begin       subset 1       subfields strsplit fields extract    endif endif    Place the desired variables in local arrays  for i 0  ncidinfo Nvars 1 do begin     vardata   NCDF_VARINQ ncid  i     if not subset then begin        wanted 1    endif else begin        match   where subfields eq vardata Name  nmatch         wanted nmatch ne 0     endelse    if wanted then begin        varname   ncdf_quickread_validatename vardata Name          if keyword_set prefix  then varname prefix varname        commands                   commands NCDF_VARGET  __ncid   strcompress string i   varname         if keyword_set reform  and vardata ndims ge 2            then commands commands varname reform varname         if  keyword_set verbose  then begin            for j 0  vardata Natts 1 do begin                att   NCDF_ATTNAME ncid  i  j                 attname   strcompress varname _ strcompress att REMOVE_ALL                 commands                           commands NCDF_ATTGET  __ncid   strcompress string i                              att   attname                 attinfo   ncdf_attinq ncid  i  att                 if attinfo datatype eq  CHAR  then                    commands commands attname    STRING attname             endfor        endif    endif endfor  if  keyword_set verbose  then begin    for i 0  ncidinfo Ngatts 1 do begin      name   NCDF_ATTNAME ncid   GLOBAL  i       attname   ncdf_quickread_validatename name       if keyword_set prefix  then attname prefix attname      commands          commands NCDF_ATTGET  __ncid   GLOBAL   name   attname       attinfo   ncdf_attinq ncid   global  name       if attinfo datatype eq  CHAR  then          commands commands attname    STRING attname    endfor endif  ncdf_close ncid commands commands NCDF_CLOSE  __ncid     Return commands to the caller  return commands    End procedure  end"); 
    115 a[113] = new Array("./ReadWrite/idl-NetCDF/ncdf_quickwrite/ncdf_quickwrite.html", "ncdf_quickwrite.pro", "", ""); 
    116 a[114] = new Array("./ReadWrite/idl-NetCDF/ncdf_quickwrite/ncdf_quickwrite_helper1.html", "ncdf_quickwrite_helper1.pro", "", "     file_comments        categories        param NCVARSTRING        param NCDFSTRUCT        param STRUCTNAME         returns        restrictions        examples          history        version    Id: ncdf_quickwrite_helper1 pro 157 2006 08 21 09:01:50Z navarro       pro ncdf_quickwrite_helper1 ncvarstring ncdfstruct structname     Parses the variable string so as to create the main structure        on_error 2 compile_opt hidden ncdfstruct ncommands: 1     split string  to extract IDL global attribute variable name bits strsplit ncvarstring extract  case n_elements bits  of     1: begin           no attributes         globattflag 0B         globattnameidl      end     2: begin         globattflag 1B         globattnameidl bits 1      end     else: begin         message Parse error: more than one   sign in  ncvarstring               noname     end endcase allvarspec bits 0    vars strsplit strcompress allvarspec remove_all extract  nvar n_elements vars   varnames strarr nvar  varnamesidl strarr nvar   nvardims intarr nvar  vardims ptrarr nvar   varattflags bytarr nvar  varattnamesidl strarr nvar      at start  no dimensions known ndim 0 dimnames  dimunlim 1  for ivar 0 nvar 1 do begin          varandattspec vars ivar             split into IDL attribute variable name and full variable specification     bits strsplit varandattspec : extract      case n_elements bits  of         1:   no variable attributes         2: begin             varattflags ivar 1B             varattnamesidl ivar bits 1          end         else: begin             message Parse error: more than one  :  sign in  varandattspec                   noname         end     endcase     fullvarspec bits 0                  split full variable specification       into variable specification and IDL variable name            bits strsplit fullvarspec extract      case n_elements bits  of         1: varnameidl    fill this in later         2: varnameidl bits 1          else: begin             message Parse error: more than one   sign in  fullvarspec                   noname         end     endcase          varspec bits 0             split variable specification into name and dimension specification               bits strsplit varspec extract      varname bits 0      case n_elements bits  of         1: begin               scalar             nvardims ivar 0         end         2: begin             dimspec bits 1                test for and strip trailing               len strlen dimspec              if strmid dimspec len 1 1  ne   then begin                 message Parse error: dimension specification  dimspec                        for variable  varname  should end with                        noname             endif             dimspec strmid dimspec 0 len 1                           if dimspec eq   then begin                   dimensions not specified   assume 1d array with                    same name for dimension as for variable                 vardimnames varname              endif else if dimspec eq   then begin                   dimensions not specified but   given   as above                    again assume same name for dimension as for variable                     but with    parsed below as meaning UNLIMITED                  vardimnames varname              endif else begin                 vardimnames strsplit dimspec extract              endelse                            now for each dimension name  see if it already exists                and if not then add it as a new name                          nvardim n_elements vardimnames              nvardims ivar nvardim                          thisvardims intarr nvardim                           for i 0 nvardim 1 do begin                                  dimname vardimnames i                                     first see if dimname has leading                     if so  strip it  but record the fact that UNLIMITED                   is wanted                 unlimited    strmid dimname 0 1  eq                   if unlimited then dimname strmid dimname 1                                   if ndim gt 0 then begin                     match where dimnames eq dimname nmatch                      case nmatch of                         0: begin                               no match   append to array                             dimnames dimnames dimname                              vardim ndim                             ndim ndim 1                         end                         1: begin                               match found   point to it                             vardim match 0                          end                         else: stop Duplicate match: BUG in NCDF_QUICK_HELPER1                      endcase                 endif else begin                       no dimensions known   this is the first                     ndim 1                     dimnames dimname                      vardim 0    for completeness                  endelse                                  if unlimited then begin                     if  dimunlim ge 0                            and dimunlim ne vardim  then begin                         message NCDF dimensions  dimnames dimunlim                                       and  dimnames vardim                                       cannot both be of UNLIMITED size                               noname                                             endif                     dimunlim vardim                 endif                                  thisvardims i vardim                              endfor                         vardims ivar ptr_new thisvardims                      end         else: message Parse error: variable specification  varspec                             has stray  noname     endcase          if varnameidl eq   then varnameidl varname          varnames ivar varname     varnamesidl ivar varnameidl endfor        now construct some commands  which  when executed at the top level  will   put IDL variable size information into the structure   commands  structname varsizes string indgen nvar                ptr_new size varnamesidl        now some more commands  to tell the main level to copy the attributes   into a heap location where the next helper routine will see them   if globattflag then     commands commands structname globatts ptr_new globattnameidl   for ivar 0 nvar 1 do begin     if varattflags ivar  then begin         commands commands                      structname varatts string ivar                       ptr_new varattnamesidl ivar      endif       endfor      second argument comes back with a structure which contains all the   information  and also some variables to be used by next helper routine    ncdfstruct ncommands:          n_elements commands                commands:           ptr_new commands                    nvar:               nvar                                varnames:           varnames                            varids:             intarr nvar                         nvardims:           nvardims                            vardims:            vardims                             varnamesidl:        varnamesidl                         varsizes:           ptrarr nvar                         varatts:            ptrarr 1 nvar                       varattflags:        varattflags                         varattnamesidl:     varattnamesidl                      globatts:           ptr_new                            globattflag:        globattflag                         globattnameidl:     globattnameidl                      ndim:               ndim                                dimnames:           dimnames                            dimids:             intarr ndim 1                       dimunlim:           dimunlim                            fileid:             0   end"); 
    117 a[115] = new Array("./ReadWrite/idl-NetCDF/ncdf_quickwrite/ncdf_quickwrite_helper2.html", "ncdf_quickwrite_helper2.pro", "", "    HELPER2   Constructs the commands which are actually needed to write the NetCDF file         this file contains:  STR  ncdf_quickwrite_typename  ncdf_quickwrite_helper2  compile_opt hidden      _STR   like STRING  but with no whitespace      we use this function enough to give it a short name  but the underscore   is to make it unlikely to conflict with a user s function       file_comments        categories        param STRING   String to be split  Contains text after in  out token on output          returns        restrictions        examples          history        version    Id: ncdf_quickwrite_helper2 pro 163 2006 08 29 12:59:46Z navarro       function _str string return strcompress string remove_all  end         file_comments        categories        param NUM        param NAME type string    It is a string giving the name of the file to be opened  If NAME does not contain   the separating character of directories   under unix for example  the file   will be looked for in the current directory          returns        restrictions        examples          history        version    Id: ncdf_quickwrite_helper2 pro 163 2006 08 29 12:59:46Z navarro       function ncdf_quickwrite_typename num name on_error 2     translate type number returned from  size  function into name usable by   ncdf routines     if not valid type  throw an error  and use  name  in informational   message if set     case num of            usable types     1: type byte      2: type short      3: type long      4: type float      5: type double                 other types: set to something appropriate      7: type char    string     12: type long    unsigned     13: type long    unsigned long     14: type float    64 bit integer     15: type float    64 bit integer          else: begin         if num eq 0 then gripe undefined            else gripe not of valid type for a NetCDF file                   if n_params  eq 1 then name Data item                   message name  is  gripe noname              end      endcase  return type  end         file_comments        categories        param NCFILENAME        param S   The string to be searched      param SNAME         returns        restrictions        examples          history        version    Id: ncdf_quickwrite_helper2 pro 163 2006 08 29 12:59:46Z navarro        pro ncdf_quickwrite_helper2 ncfilename s sname   on_error 2 compile_opt hidden    NB main structure is called  s    we use it so much that anything longer   could get tedious      start with no commands   in fact  1  is an error condition s ncommands 1   free commands written by helper1 from heap ptr_free s commands  dimsize lonarr s ndim   1     1  stops error if all fields scalar  types strarr s nvar      first of all  work out dimension sizes     for ivar 0 s nvar 1 do begin          nvardim s nvardims ivar           sizeinfo s varsizes ivar           ntype sizeinfo sizeinfo 0 1           types ivar          ncdf_quickwrite_typename ntype IDL expression  s varnamesidl ivar                                 for NCDF variable  s varnames ivar           if nvardim ne sizeinfo 0  then          message NCDF variable  s varnames ivar  is defined with                    _str s nvardims ivar  dimension s                      but corresponding                       IDL expression  s varnamesidl ivar  has                    _str sizeinfo 0  dimension s noname          if nvardim ne 0 then begin   not scalar                  for ivardim 0 nvardim 1 do begin                          idim s vardims ivar ivardim              wanted sizeinfo 1 ivardim              previous dimsize idim                           if previous ne 0 and previous ne wanted then                 message NCDF dimension  s dimnames idim                             is multiply used  but with conflicting sizes:                            _str previous  and  _str wanted                   noname                          dimsize idim wanted                      endfor              endif          endfor      make commands to write the file       to open the file if n_elements ncfilename  eq 0 then ncfilename idl nc  if strmid ncfilename 0 1  eq   then begin     ncfilename1 strmid ncfilename 1      clobstr clobber  endif else begin     ncfilename1 ncfilename     clobstr  endelse commands sname fileid ncdf_create ncfilename1 clobstr     to do the dimensions for idim 0 s ndim 1 do begin          if idim eq s dimunlim then sizestr unlimited        else sizestr _str dimsize idim           commands commands                  sname dimids _str idim ncdf_dimdef sname                   fileid s dimnames idim sizestr  endfor    to do the variables for ivar 0 s nvar 1 do begin          if s nvardims ivar  eq 0 then dimstr        else dimstr sname dimids strjoin _str s vardims ivar           commands commands                  sname varids _str ivar ncdf_vardef sname                   fileid s varnames ivar                  dimstr types ivar  endfor    to do the global attributes  if s globattflag then begin          tags tag_names s globatts      ntags n_elements tags           for itag 0 ntags 1 do begin         sizeinfo size s globatts itag          type ncdf_quickwrite_typename sizeinfo sizeinfo 0 1                   commands commands                       ncdf_attput sname fileid global                       strlowcase tags itag                        s globattnameidl tags itag type      endfor      endif          to do the variable attributes  for ivar 0 s nvar 1 do begin     if s varattflags ivar  then begin              tags tag_names s varatts ivar          ntags n_elements tags               for itag 0 ntags 1 do begin             sizeinfo size s varatts ivar itag              type ncdf_quickwrite_typename sizeinfo sizeinfo 0 1                           commands commands                           ncdf_attput sname fileid                           sname varids _str ivar                           strlowcase tags itag s varattnamesidl ivar                           tags itag type          endfor     endif       endfor    to end the definition section commands commands ncdf_control sname fileid endef     to write the data for ivar 0 s nvar 1 do begin     commands commands                   ncdf_varput sname fileid sname varids _str ivar                   s varnamesidl ivar    endfor    close the file commands commands ncdf_close sname fileid      make commands available to main level s ncommands n_elements commands  s commands ptr_new commands   end "); 
    118 a[116] = new Array("./ReadWrite/idl-NetCDF/ncdf_quickwrite/ncdf_quickwrite_helper3.html", "ncdf_quickwrite_helper3.pro", "", "     file_comments        categories        param S   The string to be searched         returns        restrictions        examples          history        version    Id: ncdf_quickwrite_helper3 pro 157 2006 08 21 09:01:50Z navarro       pro ncdf_quickwrite_helper3 s     Frees the variables in heap memory      on_error 2 compile_opt hidden    s is our ncdf structure  ptr_free s globatts ptr_free s varatts ptr_free s commands ptr_free s vardims ptr_free s varsizes ptr_free s varatts  end"); 
    119 a[117] = new Array("./ReadWrite/idl-NetCDF/ncdf_quickwrite/ncdf_quickwrite_verbose.html", "ncdf_quickwrite_verbose.pro", "", ""); 
    120 a[118] = new Array("./ReadWrite/idl-NetCDF/ncdf_read.html", "ncdf_read.pro", "", "     file_comments        categories        param FILENAME   The filename      param INFO   General info      param DINFO   Dimension info       param VINFO   Variable info      param GATTS   Global attributes      param VATTS   Variable attributes      param DATA   Data         returns        restrictions        examples          history        version    Id: ncdf_read pro 157 2006 08 21 09:01:50Z navarro       PRO ncdf_read filename info dinfo vinfo gatts vatts data                                                                                              general info                                 data        dimension info                     variable attributes         variable info         global attributes         read a NetCDF file         NB The data is read into a rather nasty combination of structures  arrays       and pointers  which is  unfortunately  necessary in order to cope with      the full generality of the data format   Here is the sort of syntax you      might use to get at elements of the returned data   cumbersome because      IDL doesn t support C type  a b  shorthand for  a b            INFO NDIMS          INFO NVARS          INFO NGATTS          INFO RECDIM            DINFO idim NAME          DINFO idim SIZE            VINFO ivar NAME          VINFO ivar NAME          VINFO ivar DATATYPE          VINFO ivar NDIMS          VINFO ivar NATTS          VINFO ivar DIM ivdim            GATTS NAME          GATTS DATATYPE          GATTS LENGTH          GATTS VALUES   or maybe   STRING GATTS VALUES            VATTS ivar iatt NAME          VATTS ivar iatt DATATYPE          VATTS ivar iatt LENGTH          VATTS ivar iatt VALUES   or maybe           STRING VATTS ivar iatt VALUES            DATA ivar   or maybe   DATA ivar idim1 idim2 idim3          compile_opt idl2  strictarrsubs       open file  id ncdf_open filename      info  info ncdf_inquire id      dimension info  dinfo replicate name: size:0L info ndims  for idim 0 info ndims 1 do begin     ncdf_diminq id idim name size   dinfo idim name name   dinfo idim size size endfor     variable info  vinfo replicate  name:                      datatype:                      ndims:0l  natts:0l                      dim:lonarr info ndims                     info nvars   for ivar 0 info nvars 1 do begin     var ncdf_varinq id ivar      vinfo ivar name var name     vinfo ivar datatype var datatype     vinfo ivar ndims var ndims     vinfo ivar natts var natts     vinfo ivar dim var dim endfor     global attributes  if info ngatts gt 0 then begin     gatts replicate name:                         datatype:                         length:0L                         values:ptr_new                        info ngatts      for iatt 0 info ngatts 1 do begin         name ncdf_attname id iatt global          gatts iatt name name         att ncdf_attinq id name global          gatts iatt length att length         gatts iatt datatype att datatype         ncdf_attget id name vals global         gatts iatt values ptr_new vals      endfor endif else begin       arbitary scalar value       an empty list would be sensible but IDL doesn t support it     gatts 1 endelse      variable attributes  vatts replicate ptr_new info nvars  for ivar 0 info nvars 1 do begin     if vinfo ivar natts gt 0 then begin         vatts ivar ptr_new replicate name:                                           datatype:                                           length:0L                                           values:ptr_new                                          vinfo ivar natts          for iatt 0 vinfo ivar natts 1 do begin             name ncdf_attname id ivar iatt               vatts ivar iatt name name             att ncdf_attinq id ivar name               vatts ivar iatt length att length              vatts ivar iatt datatype att datatype             ncdf_attget id ivar name vals              vatts ivar iatt values ptr_new vals          endfor     endif else begin         vatts ivar ptr_new 1            Pointer to arbitrary scalar   analogous to case of lack of           global attributes above   We could put a  here           instead  but try to be friendlier to code that might try           to dereference it      endelse endfor     data  data replicate ptr_new info nvars  for ivar 0 info nvars 1 do begin     ncdf_varget id ivar val     data ivar ptr_new val  endfor   end"); 
    121 a[119] = new Array("./ReadWrite/idl-NetCDF/ncdf_struct.html", "ncdf_struct.pro", "", "     file_comments        categories        param FILENAME   The file s name       keyword NODATA        keyword NOATTRIBUTES         returns        restrictions        examples          history        version    Id: ncdf_struct pro 157 2006 08 21 09:01:50Z navarro       FUNCTION ncdf_struct filename nodata nodata noattributes noattributes     Read entire netcdf file into a structure       Structure contains metadata  actual array contents are on heap  with   pointers contained in the structure   Heap variables not created if    nodata  specified      Use ncdf_struct_free to free heap memory       Some data is duplicated for ease of access  in particular if there is   a variable name matching a dimension name  then a pointer to the variable   contents is accessible via the substructures corresponding to the dimension   and every other variable that uses it      Alan Iwi 27 6 02       compile_opt idl2  strictarrsubs    id ncdf_open filename   g ncdf_inquire id  ndim g ndims nvar g nvars natt g ngatts  if ndim gt 0 then begin     dnames strarr ndim      dsizes lonarr ndim      for idim 0 ndim 1 do begin         ncdf_diminq id idim dname dsize         dnames idim dname         dsizes idim dsize     endfor endif  if natt gt 0 and not keyword_set noattributes  then begin     anames strarr natt      for iatt 0 natt 1 do begin         aname ncdf_attname id global iatt          ainq ncdf_attinq id global aname          ncdf_attget id global aname aval         if  ainq datatype eq  CHAR  then aval string aval          if iatt eq 0 then begin             atts create_struct aname aval          endif else begin             atts create_struct atts aname aval          endelse         anames iatt aname     endfor     g create_struct g gatts atts gattnames anames  endif  if nvar gt 0 then begin     vnames strarr nvar      for ivar 0 nvar 1 do begin         v ncdf_varinq id ivar                   vname v name         vndim v ndims         vnatt v natts         vname v name                  if vnatt gt 0 and not keyword_set noattributes  then begin             vanames strarr vnatt              for iatt 0 vnatt 1 do begin                 aname ncdf_attname id ivar iatt                  ainq ncdf_attinq id ivar aname                  ncdf_attget id ivar aname aval                 if  ainq datatype eq  CHAR  then aval string aval                  if iatt eq 0 then begin                     atts create_struct aname aval                  endif else begin                     atts create_struct atts aname aval                  endelse                 vanames iatt aname             endfor             v create_struct v atts atts attnames anames          endif                  vdnames dnames v dim          vdsizes dsizes v dim          v create_struct v dimnames vdnames dimsizes vdsizes                   if not keyword_set nodata  then begin             ncdf_varget id ivar vdata             v create_struct v data ptr_new vdata                                 dimdata replicate ptr_new vndim          endif                  if ivar eq 0 then begin             vars create_struct vname v          endif else begin             vars create_struct vars vname v          endelse                  vnames ivar vname         endfor endif  if ndim gt 0 then begin     for idim 0 ndim 1 do begin         dname dnames idim          d name:dname size:dsizes idim                   if not keyword_set nodata  and nvar gt 0 then begin             matchvar 1             for ivar 0 nvar 1 do begin                 if vnames ivar  eq dname then matchvar ivar             endfor             if matchvar ne  1 then                  d create_struct d data vars matchvar data          endif                  if idim eq 0 then begin             dims create_struct dname d          endif else begin             dims create_struct dims dname d          endelse              endfor     g create_struct g dims dims dimnames dnames dimsizes dsizes  endif  if nvar gt 0 then begin     if not keyword_set nodata  then begin         for ivar 0 nvar 1 do begin             for idim 0 vars ivar ndims 1 do begin                 vars ivar dimdata idim dims vars ivar dim idim data             endfor         endfor     endif     g create_struct g vars vars varnames vnames  endif       ncdf_close id  return g  end"); 
    122 a[120] = new Array("./ReadWrite/idl-NetCDF/ncdf_struct_free.html", "ncdf_struct_free.pro", "", "     file_comments        categories        param S   The string to be searched         returns        restrictions        examples          history        version    Id: ncdf_struct_free pro 157 2006 08 21 09:01:50Z navarro       PRO ncdf_struct_free s     compile_opt idl2  strictarrsubs        free heap memory associated with struct returned by ncdf_struct    for i 0 s nvars 1 do ptr_free s vars i data  end"); 
    123 a[121] = new Array("./ReadWrite/ncdf_timeget.html", "ncdf_timeget.pro", "", "           file_comments   get the time axis from a netcdf_file and transforms it in   Julian days of IDL       categories    Reading      param CDFID  in required    the ID of the ncdf_file  which is already open      param TIMEID  in required    the ID or the name of the variable which describe the calendar      keyword YYYYMMDD   active to obtain the date as a long integer with   the format YearYearYearYearMonthMonthDayDay      keyword _EXTRA   the keyword parameters of ncdf_varget      returns   a long array of IDL Julian days      restrictions   the calendar variable must have the units attribute   following the syntax bellow:     time_counter:units    seconds since 0001 01 01 00:00:00      time_counter:units    hours since 0001 01 01 00:00:00      time_counter:units    days since 1979 01 01 00:00:00      time_counter:units    months since 1979 01 01 00:00:00      time_counter:units    years since 1979 01 01 00:00:00         history Sebastien Masson  smasson lodyc jussieu fr                         June 2001    version  Id: ncdf_timeget pro 163 2006 08 29 12:59:46Z navarro           FUNCTION ncdf_timeget  cdfid  timeid  YYYYMMDD   yyyymmdd  _EXTRA   ex     compile_opt idl2  strictarrsubs       insidetime ncdf_varinq cdfid timeid     if insidetime natts NE 0 then begin       attnames   strarr insidetime natts        for attiq 0 insidetime natts 1 do attnames attiq strlowcase ncdf_attname cdfid timeid attiq     ENDIF ELSE return  report the variable  timeid  must have the units attribut    reading of the time axis    ncdf_varget  cdfid  timeid  time  _extra   ex     time_counter:units    seconds since 0001 01 01 00:00:00      time_counter:units    hours since 0001 01 01 00:00:00      time_counter:units    days since 1979 01 01 00:00:00      time_counter:units    months since 1979 01 01 00:00:00      time_counter:units    years since 1979 01 01 00:00:00         if  where attnames EQ  units 0  NE  1 then begin       ncdf_attget cdfid timeid units value       value   strtrim strcompress string value  2        words   str_sep value            unite   words 0        start   str_sep words 2          case strlowcase unite  of           seconds :time   julday start 1  start 2  start 0 time long 24 3600            hours :time   julday start 1  start 2  start 0 time long 24            days :time   julday start 1  start 2  start 0 time           months :BEGIN             for t   0  n_elements time 1  do begin                time t    julday start 1 time t  start 2  start 0              endfor          END           years :BEGIN             for t   0  n_elements time 1  do begin                time t    julday start 1  start 2  start 0 time t              endfor          END          ELSE:return  report bad syntax of the units attribut of the variable  timeid        ENDCASE    ENDIF ELSE return  report the variable  timeid  must have the units attribut     if keyword_set yyyymmdd  then time   jul2date time     return  time end"); 
    124 a[122] = new Array("./ReadWrite/read_grads.html", "read_grads.pro", "", "           file_comments   reading grads file  except  data type station  or  grib    from the grads control file even if there is multiple data files       categories    Reading      param VAR  in required    the variable name      param DATE1  in required    date of the beginning  yyyymmdd if TIMESTEP is not activate       param DATE2  in optional    last date  Optional  if not specified date2 date1      keyword FILENAME   the grads control file name:  xxxx ctl       keyword TIMESTEP   to specify that the dates are time steps instead of true calendar        NOT yet available        keyword BOX  type A 4 or 6 elements 1d array   lon1 lon2 lat1 lat2  depth1  depth2    It specifies the area where data must be read      keyword EVERYTHING        keyword NOSTRUCT        keyword _EXTRA   Used to pass your keywords      returns   an array      uses    common      restriction   define all the grid parameters  defined in common pro    associated to the data       restrictions   this function call the procedure scanfile that use the   unix commands grep and sed      examples   IDL  a read_grads sst 19900101 19900131 filename outputs ctl    IDL  plt  a      history    Sebastien Masson  smasson lodyc jussieu fr       version    Id: read_grads pro 163 2006 08 29 12:59:46Z navarro              FUNCTION read_grads  var  date1  date2  FILENAME   filename  BOX box  TIMESTEP   timestep  EVERYTHING   everything  NOSTRUCT   nostruct  _EXTRA   ex       compile_opt idl2  strictarrsubs    cm_4mesh  cm_4data  cm_4cal   IF NOT keyword_set key_forgetold  THEN BEGIN  updatenew   ENDIF     we find the filename       filename   isafile FILENAME   filename  IODIRECTORY   iodir  _EXTRA   ex     if size filename   type  NE 7 then       return  report read_ncdf cancelled      we scan the control file called filename      scanctl  filename  filesname  jpt1file  varsname  varslev  swapbytes  bigendian  littleendian  f77sequential  fileheader  theader  xyheader  VARFMT   varfmt  _EXTRA   ex    if n_elements varfmt  EQ 0 then varfmt    float        check date1 and date2 and found the starting index  t1  and the   ending index  t2  that corresponds to the time series specified by   date1 and date2 for the time axis defined in the  ctl file         if n_elements date1  EQ 0 then begin       t0   0       t1   0    ENDIF    if n_elements date2  EQ 0 then date2   date1    if keyword_set timestep  then BEGIN       if date1 GT date2 then begin          print   date2 must be larger than date1           return   1       endif       t1   0   long date1   long date2   date2jul date2   grads        if jdate1 GT jdate2 then begin          print   date2 must be larger than date1           return   1       endif       t1    where time GE jdate1 0        tmp   where time LE jdate2  t2        t2   t2 1    ENDELSE    if t2 LT t1 then begin       print   There is no date between date1 and date2        return   1    endif    jpt2read   t2 t1 1       index of the variable        varid   where strlowcase varsname  EQ strlowcase var     varid   varid 0     if varid EQ  1 then begin       print  var  not found in the variable list of  filename       return    1    ENDIF    varname   var    if varslev varid  EQ 1 then res   fltarr jpi  jpj  jpt2read   nozero       ELSE res   fltarr jpi  jpj  varslev varid  jpt2read   nozero        find the first file to be read according to the file list  the   number of time step in each file and t1 and t2        indf2read   t1 jpt1file    startread   t1 indf2read jpt1file    alreadyread   0 readagain:    jpt2read1file   min jpt1file startread  jpt2read     f2read   filesname indf2read        opening       check the existence of the file    f2read   isafile filename   f2read  iodirectory   iodir  _EXTRA   ex    if the file is stored on tape    if  version os_family EQ  unix  then spawn   file  f2read     dev null    open the file    openr  unit  f2read   get_lun  error err         swap_if_little_endian   bigendian         swap_if_big_endian   littleendian         swap_endian   swapbytes    if err ne 0 then begin       print err_string       return   1    endif      case varfmt of        byte :fmtsz   1l        uint :fmtsz   2l        int :fmtsz   2l        long :fmtsz   4l        float :fmtsz   4l    endcase     check its size    addf77sec   long 4 2 f77sequential     xyblocsize   xyheader   addf77sec xyheader NE 0    jpi jpj fmtsz  addf77sec    nxybloc   long total varslev     filesize    fileheader   addf77sec fileheader NE 0         theader addf77sec theader NE 0    nxybloc xyblocsize jpt1file    infof2read fstat unit     if infof2read size NE filesize then begin       print   According to  filename  the file size must be  strtrim filesize  1  instead of  strtrim infof2read size  1        print   jpi:  strtrim jpi  2        print   jpj:  strtrim jpj  2        print   jpt:  strtrim jpt  2        print   format size in byte:  strtrim fmtsz  2        print   number of xy arrays:  strtrim nxybloc  2        return   1    endif       reading         loop on the time steps to be read in one file    for i   0  jpt2read1file 1 do begin   computing the offset       offset    fileheader   addf77sec fileheader NE 0            theader addf77sec theader NE 0    nxybloc xyblocsize startread i            theader addf77sec theader NE 0        if varid NE 0 THEN          offset   offset   long total varslev 0:varid 1 xyblocsize   if there is only one level       IF varslev varid  EQ 1 then begin          case varfmt of              byte :a assoc unit  bytarr jpi jpj nozero  offset 4 f77sequential               uint :a assoc unit uintarr jpi jpj nozero  offset 4 f77sequential               int :a assoc unit   intarr jpi jpj nozero  offset 4 f77sequential               long :a assoc unit  lonarr jpi jpj nozero  offset 4 f77sequential               float :a assoc unit fltarr jpi jpj nozero  offset 4 f77sequential           endcase          res    i alreadyread a 0        ENDIF ELSE BEGIN   more than 1 level to be read          if f77sequential then BEGIN   sequential access             case varfmt of                 byte :a assoc unit  bytarr jpi jpj 8  varslev varid nozero  offset                  uint :a assoc unit uintarr jpi jpj 4  varslev varid nozero  offset                  int :a assoc unit   intarr jpi jpj 4  varslev varid nozero  offset                  long :a assoc unit  lonarr jpi jpj 2  varslev varid nozero  offset                  float :a assoc unit fltarr jpi jpj 2  varslev varid nozero  offset              endcase             tmp   a 0              case varfmt OF   we cut the headers and tailers of f77 write                 byte : tmp   tmp 4:jpi jpj 3                    uint : tmp   tmp 2:jpi jpj 1                    int :  tmp   tmp 2:jpi jpj 1                    long : tmp   tmp 1:jpi jpj 0                    float :tmp   tmp 1:jpi jpj 0                endcase             if keyword_set key_zreverse  then res      i alreadyread reverse reform tmp   jpi  jpj  varslev varid   over  3  ELSE res      i alreadyread reform tmp   jpi  jpj  varslev varid   over           ENDIF ELSE BEGIN    direct acces             case varfmt of                 byte :a assoc unit  bytarr jpi jpj varslev varid nozero offset                  uint :a assoc unit uintarr jpi jpj varslev varid nozero offset                  int :a assoc unit   intarr jpi jpj varslev varid nozero offset                  long :a assoc unit  lonarr jpi jpj varslev varid nozero offset                  float :a assoc unit fltarr jpi jpj varslev varid nozero offset              endcase             if keyword_set key_zreverse  then res      i alreadyread reverse a 0  3  ELSE res      i alreadyread a 0           ENDELSE       ENDELSE    endfor     close the file    free_lun unit    close unit       do we need to read a new file to complete the time series          if jpt2read1file NE jpt2read then BEGIN       indf2read   indf2read 1       startread   0       alreadyread   alreadyread jpt2read1file       jpt2read   jpt2read jpt2read1file       GOTO  readagain    ENDIF       post processing        if keyword_set key_yreverse  then res   reverse res  2     if keyword_set key_shift  then begin       case  size res 0  of          2:res   shift res  key_shift  0           3:res   shift res  key_shift  0  0           4:res   shift res  key_shift  0  0  0        endcase    endif       mask     IF varslev varid  EQ 1 then begin        if abs valmask  LE 1e5 then notgood   where res    0  EQ valmask           ELSE notgood   where abs res    0  GE abs valmask 10         if notgood 0  NE  1 then tmask notgood    0b     ENDIF ELSE BEGIN        if abs valmask  LE 1e5 then notgood   where res      0  EQ valmask           ELSE notgood   where abs res      0  GE abs valmask 10         if notgood 0  NE  1 then tmask notgood    0b     ENDELSE    if abs valmask  LE 1e5 then notgood   where res EQ valmask       ELSE notgood   where abs res  GE abs valmask 10     if notgood 0  NE  1 THEN res notgood     values f_nan     valmask   1e20     if abs valmask  LE 1e5 then notgood   where res EQ valmask        ELSE notgood   where abs res  GE abs valmask 10      if notgood 0  NE  1 THEN res notgood    1e20     valmask   1e20    triangles_list   triangule      subdomain extraction      time arguments      time   time t1:t2     jpt   t2 t1 1    if keyword_set timestep  then vardate   strtrim time 0  2       ELSE vardate   date2string vairdate time 0        updateold       return  res end"); 
    125 a[123] = new Array("./ReadWrite/read_oasis.html", "read_oasis.pro", "", "           file_comments   read the f77 unformatted files used in Oasis  version  a read_oasis grids_orca_t106 a106 lon 320 160    IDL  m read_oasis masks_orca_t106 or1t msk 182 149 i4      see also IDL  scanoasis grids_orca_t106       history Sebastien Masson  smasson lodyc jussieu fr                         July 01  2002    version  Id: read_oasis pro 163 2006 08 29 12:59:46Z navarro             FUNCTION read_oasis  filename  varname  jpi  jpj  I2   I2  I4   i4  I8   i8  R4   r4     compile_opt idl2  strictarrsubs       openr  unit  filename   f77_unformatted   get_lun   swap_if_little_endian         error err    if err ne 0 then begin       print err_string       return   1    endif     char8    12345678     readu  unit  char8     print  char8    found   char8 EQ varname     WHILE NOT EOF unit  AND found NE 1 DO BEGIN       readu  unit       if EOF unit  then begin          print  varname  not found in  filename          return   1       endif       readu  unit  char8        print  char8       found   char8 EQ varname    ENDWHILE    case 1 of       keyword_set i2 :res   intarr jpi  jpj        keyword_set i4 :res   lonarr jpi  jpj        keyword_set i8 :res   lon64arr jpi  jpj        keyword_set r4 :res   fltarr jpi  jpj        ELSE:res   dblarr jpi  jpj     endcase     readu  unit  res     free_lun unit     return  res end"); 
    126 a[124] = new Array("./ReadWrite/readbat.html", "readbat.pro", "", "           file_comments   reading the bathymetry ASCII file of OPA      categories   For OPA      param FILENAME  in required type string    It contains the filename       keyword ZERO to put 0 on land instead of negatives values for the islands       returns a 2d array      history Sebastien Masson  smasson lodyc jussieu fr                         May 31  2002      based on batlec2 pro  written by Maurice Imbard  March 17  1998      version  Id: readbat pro 163 2006 08 29 12:59:46Z navarro       FUNCTION readbat  filename  ZERO   zero     compile_opt idl2  strictarrsubs              lecture de la bathymetrie         iname_file   findfile filename     if iname_file 0  EQ   then begin       print   Bad file name        return   1    ENDIF ELSE iname_file   iname_file 0     openr  iunit  iname_file   get_lun     readf  iunit  FORMAT    16x 2i8  iim  ijm     iim   long iim      ijm   long ijm     tmp        readf  iunit  tmp    tmp   strsplit tmp   extract     iim   long tmp n_elements tmp 2     ijm   long tmp n_elements tmp 1    print  iim  ijm    ifreq   40L    ifin    iim ifreq 1    irest   iim ifin 1 ifreq   print  ifin irest ifreq    zbati    intarr ifreq     zbati2   intarr irest     zbat      intarr iim ijm       readf  iunit  FORMAT        readf  iunit  FORMAT        il1   0    FOR jn   1  ifin 1 DO BEGIN       readf  iunit  FORMAT           readf  iunit  FORMAT           il2   min  iim 1  il1 ifreq 1          readf  iunit  FORMAT           readf  iunit  FORMAT           readf  iunit  FORMAT           il3   il2 jn 1 ifreq       iformat   string  il3 2   i3       print jn il1 il2 il3 ifreq 1       FOR jj    ijm 1  0   1  DO BEGIN          readf  iunit  FORMAT   iformat  ij  zbati          zbat il1:il2  jj    zbati       ENDFOR       il1   il1   ifreq    ENDFOR    readf  iunit  FORMAT        readf  iunit  FORMAT        il2   min  iim 1  il1 ifreq 1       readf  iunit  FORMAT        readf  iunit  FORMAT        readf  iunit  FORMAT        il3   il2 ifin 1 ifreq    iformat   string  il3 2   i3       print  irest 1 il1 il2 il3    FOR jj    ijm 1  0   1  DO BEGIN       readf  iunit  FORMAT   iformat  ij  zbati2       zbat il1:il2  jj    zbati2    ENDFOR    close  iunit    free_lun  iunit         if keyword_set zero  then zbat   0   zbat    return  zbat end"); 
    127 a[125] = new Array("./ReadWrite/readoldopadistcoast.html", "readoldopadistcoast.pro", "", "           file_comments   read the old binary direct access file that contains the   distance to the coast in OPA    based on the OPA subroutines dtacof and parctl      categories    For OPA      param UNIT        param PARAMS          param NUM         returns     a structure that contains two elements: tdistcoast  the   distance for the t points  and fdiscoast  the distance for the   f points       history Sebastien Masson  smasson lodyc jussieu fr                         June  2002    version  Id: readoldopadistcoast pro 157 2006 08 21 09:01:50Z navarro            FUNCTION read3fromopa  unit  params  num     compile_opt idl2  strictarrsubs      offset params reclen params jpk num 1L     a assoc unit dblarr params jpiglo params jpjglo params jpk nozero offset     b   a 0     return  b end       file_comments        categories   For OPA      param FILENAME  in required    Filename  with the whole path if necessary       param JPIGLO  in required         param JPJGLO  in required         param JPK  in required    Dimensions of the opa grid      keyword IBLOC  default 4096L    Ibloc size       keyword JPBYT  default 8L    Jpbyt size       keyword NUMREC  default 19L jpk    Number of records in the file       history   Sebastien Masson  smasson lodyc jussieu fr                         June  2002      version    Id: readoldopadistcoast pro 157 2006 08 21 09:01:50Z navarro     FUNCTION readoldopadistcoast  filename  jpiglo  jpjglo  jpk  IBLOC   ibloc  JPBYT   jpbyt  NUMREC   numrec       compile_opt idl2  strictarrsubs      iname_file   findfile filename     if iname_file 0  EQ   then begin       print   Bad file name        return   1    ENDIF ELSE iname_file   iname_file 0    open the file    openr numcost   iname_file   get_lun   swap_if_little_endian   check the size of the file    filepamameters   fstat numcost    default parameter definition for ORCA2    IF keyword_set ibloc  THEN ibloc   long ibloc  ELSE ibloc   4096L    jpiglo   long jpiglo     jpjglo   long jpjglo     jpk   long jpk     IF keyword_set jpbyt  THEN jpbyt   long jpbyt  ELSE jpbyt   8L   record length computation    reclen   ibloc jpiglo jpjglo jpbyt 1  ibloc 1    number of records    IF keyword_set numrec  THEN numrec   long numrec  ELSE numrec   3L jpk   difference between the record length and the size of the contened   array     toomuch   reclen jpiglo jpjglo jpbyt   expected size computation    size   numrec reclen toomuch    if size NE filepamameters size then begin       print   The size of the file is not the expected one        print   Check your file or the values of ibloc  jpiglo        print   jpjglo  jpk  jpbyt  numrec in this program        return   1    endif   first record: six 64 bit integer to read    default definition    iimlu   long64 999     ijmlu   long64 999     ikmlu   long64 999    read    readu  numcost  iimlu  ijmlu  ikmlu    if iimlu NE jpiglo then begin       print   iimlu    strtrim iimlu  1  differs from jpiglo  strtrim jpiglo  1        return   1    endif    if ijmlu NE jpjglo then begin       print   ijmlu    strtrim ijmlu  1  differs from jpjglo  strtrim jpjglo  1        return   1    endif    if ikmlu NE jpk then begin       print   ikmlu    strtrim ikmlu  1  differs from jpk  strtrim jpk  1        return   1    endif   other records    params    jpiglo:jpiglo  jpjglo:jpjglo  jpk:jpk  reclen:reclen     tdistcoast   read3fromopa numcost  params  2     fdistcoast   read3fromopa numcost  params  3       close  numcost    free_lun  numcost     return   tdistcoast:tdistcoast  fdistcoast:fdistcoast  end"); 
    128 a[126] = new Array("./ReadWrite/readoldoparestart.html", "readoldoparestart.pro", "", "             categories   For OPA      param UNIT        param PARAMS          param NUM         restrictions    bug for etab and etan written on the same record       history Sebastien Masson  smasson lodyc jussieu fr                         June 2002    version  Id: readoldoparestart pro 163 2006 08 29 12:59:46Z navarro             FUNCTION read2fromopa  unit  params  num     compile_opt idl2  strictarrsubs      offset params reclen params jpk num 1L     a assoc unit dblarr params jpiglo params jpjglo nozero offset     return  a 0  end      categories   For OPA      param UNIT        param PARAMS          param NUM         history Sebastien Masson  smasson lodyc jussieu fr                         June 2002   FUNCTION read3fromopa  unit  params  num     compile_opt idl2  strictarrsubs      offset params reclen params jpk num 1L     a assoc unit dblarr params jpiglo params jpjglo params jpk nozero offset     return  a 0  end       file_comments   read the old restart files of OPA  before NetCDF    based on the OPA subroutine dtrlec included at the end of the file       categories    For OPA      param FILENAME  in required    with the whole path if necessary      param JPIGLO  in required           param JPJGLO  in required           param JPK  in required    dimensions of the opa grid      keyword IBLOC  default 4096L     Ibloc size       keyword JPBYT  default 8L    Jpbyt size       keyword NUMREC  default 19L jpk     Number of records in the file       keyword UB          keyword VB          keyword TB          keyword SB          keyword ROTB          keyword HDIVB          keyword UN          keyword VN          keyword TN          keyword SN          keyword ROTN          keyword HDIVN          keyword GCX          keyword GCXB          keyword ETAB          keyword ETAN          keyword BSFB          keyword BSFN          keyword BSFD          keyword EN   the variable we want to read       returns    According to the given keywords        restrictions    Bug for etab and etan written on the same record       history    Sebastien Masson  smasson lodyc jussieu fr                         June 2002       version    Id: readoldoparestart pro 163 2006 08 29 12:59:46Z navarro      PRO readoldoparestart  filename  jpiglo  jpjglo  jpk  IBLOC   ibloc  JPBYT   jpbyt  NUMREC   numrec  ub   ub  vb   vb  tb   tb  sb   sb  rotb   rotb  hdivb   hdivb  un   un  vn   vn  tn   tn  sn   sn  rotn   rotn  hdivn   hdivn  gcx   gcx  gcxb   gcxb  etab   etab  etan   etan  bsfb   bsfb  bsfn   bsfn  bsfd   bsfd  en   en       compile_opt idl2  strictarrsubs      iname_file   findfile filename     if iname_file 0  EQ   then begin       print   Bad file name        return    ENDIF ELSE iname_file   iname_file 0    open the file    openr numrst   iname_file   get_lun   swap_if_little_endian   check the size of the file    filepamameters   fstat numrst    parameter definition    IF keyword_set ibloc  THEN ibloc   long ibloc  ELSE ibloc   4096L    jpiglo   long jpiglo     jpjglo   long jpjglo     jpk   long jpk     IF keyword_set jpbyt  THEN jpbyt   long jpbyt  ELSE jpbyt   8L   record length computation    reclen   ibloc jpiglo jpjglo jpbyt 1  ibloc 1     IF keyword_set numrec  THEN numrec   long numrec  ELSE numrec   19L jpk    toomuch   reclen jpiglo jpjglo jpbyt   expected size computation    size   numrec reclen toomuch    if size NE filepamameters size then begin       print   The size of the file is not the expected one        print   Check your file or the values of ibloc  jpiglo        print   jpjglo  jpk  jpbyt  numrec in this program        return    endif   first record: six 64 bit integer to read    default definition    ino1   long64 9999     it1   long64 9999     isor1   long64 9999     ipcg1   long64 9999     itke1   long64 9999     idast1   long64 9999    read    readu  numrst  ino1  it1  isor1  ipcg1  itke1  idast1    print  ino1  it1  isor1  ipcg1  itke1  idast1   other records    params    jpiglo:jpiglo  jpjglo:jpjglo  jpk:jpk  reclen:reclen         CALL read3 numrst ub    2      IF arg_present ub  THEN ub   read3fromopa numrst  params  2         CALL read3 numrst vb    3      IF arg_present vb  THEN vb   read3fromopa numrst  params  3         CALL read3 numrst tb    5      IF arg_present tb  THEN tb   read3fromopa numrst  params  5         CALL read3 numrst sb    6      IF arg_present sb  THEN sb   read3fromopa numrst  params  6         CALL read3 numrst rotb  7      IF arg_present rotb  THEN rotb   read3fromopa numrst  params  7         CALL read3 numrst hdivb 8      IF arg_present hdivb  THEN hdivb   read3fromopa numrst  params  8         CALL read3 numrst un    9      IF arg_present un  THEN un   read3fromopa numrst  params  9         CALL read3 numrst vn    10     IF arg_present vn  THEN vn   read3fromopa numrst  params  10         CALL read3 numrst tn    12     IF arg_present tn  THEN tn   read3fromopa numrst  params  12         CALL read3 numrst sn    13     IF arg_present sn  THEN sn   read3fromopa numrst  params  13         CALL read3 numrst rotn  14     IF arg_present rotn  THEN rotn   read3fromopa numrst  params  14         CALL read3 numrst hdivn 15     IF arg_present hdivn  THEN hdivn   read3fromopa numrst  params  15   C  C   Read elliptic solver arrays  C        CALL read2 numrst gcx  jpk 17     IF arg_present gcx  THEN gcx   read2fromopa numrst  params  17         CALL read2 numrst gcxb jpk 18     IF arg_present gcxb  THEN gcxb   read2fromopa numrst  params  18   C  ifdef key_freesurf_cstvol  C  C   free surface formulation  eta   C        CALL read2 numrst etab  jpk 4      IF arg_present etab  THEN etab   read2fromopa numrst  params  4         CALL read2 numrst etan  jpk 4      IF arg_present etan  THEN etan   read2fromopa numrst  params  4     else  C  C   Rigid lid formulation  bsf   C        CALL read2 numrst bsfb  jpk 4      IF arg_present bsfb  THEN bsfb   read2fromopa numrst  params  4         CALL read2 numrst bsfn  jpk 11     IF arg_present bsfn  THEN bsfn   read2fromopa numrst  params  11         CALL read2 numrst bsfd  jpk 16     IF arg_present bsfd  THEN bsfd    read2fromopa numrst  params  16   endif  ifdef key_zdftke            CALL read3 numrst en 19     IF arg_present en  THEN en   read3fromopa numrst  params  19        close  numrst    free_lun  numrst     return end     CDIR  LIST        SUBROUTINE dtrlec  CCC   CCC  CCC                       ROUTINE dtrlec  CCC                        CCC  CCC  Purpose :  CCC     CCC     Read files for restart  CCC  CC   Method :  CC      CC      Read the previous fields on the file numrst  CC      the first record indicates previous characteristics  CC      after control with the present run  we read :  CC        prognostic variables on the second record  CC        elliptic solver arrays  CC  barotropic stream function arrays  default option   CC   or free surface arrays  key_freesurf_cstvol  defined   CC        tke arrays  key_zdftke  defined   CC      for this last three records   the previous characteristics  CC      could be different with those used in the present run   CC  CC   Input :  CC      CC      common  CC             comrst           : restart parameter  CC             comctl           : parameters for the control  CC  CC   Output :  CC      CC      common  CC             combef           : previous fields  before   CC             comnow           : present fields  now   CC             combsf           : barotropic stream function  CC             comspg           : surface pressure  CC             comsol           : diagonal preconditioned conjugate  CC  CC   Modifications :  CC      CC      original  : 91 03    CC      additions : 92 01  M  Imbard   CC                : 92 06 correction restart file  M  Imbard   CC                : 98 02  M  Guyon  FETI method  CC      addition  : 98 05  G  Roullet  free surface  CC   CC parameters and commons  CC    CDIR  NOLIST  include  parameter h   include  common h   CDIR  LIST  CC   CC local declarations  CC          INTEGER ji  jj  jk  jl        INTEGER ino0  it0  ipcg0  isor0  itke0        INTEGER ino1  it1  isor1  ipcg1  itke1  idast1  CC   CC statement functions  CC    CDIR  NOLIST  include  stafun h   CDIR  LIST  CCC   CCC  OPA8  LODYC  1997   CCC   C  C  C 0  Initialisations  C    C        ino0    no        it0     nit000        ipcg0   0        isor0   0        itke0   0        isor0   nsolv 1        ipcg0   2 nsolv  ifdef key_zdftke        itke0   1  endif  C FETI method        IF  nsolv  EQ  3  THEN            isor0 2            ipcg0 2        ENDIF  C        IF lwp  THEN            WRITE numout                 WRITE numout      dtrlec:  beginning of restart             WRITE numout                 WRITE numout    the present run :             WRITE numout      job number :   no            WRITE numout      with nit000 :   nit000            WRITE numout      with pcg option ipcg0 :   ipcg0            WRITE numout      with sor option isor0 :   isor0            WRITE numout      with FETI solver option ipcg0   isor0 :                  ipcg0     isor0            WRITE numout      with tke option itke0 :   itke0        ENDIF  C  C 1  Read numrst  C    C  C   First record  C        READ numrst REC 1  ino1  it1  isor1  ipcg1  itke1  idast1  C        IF lwp  THEN            WRITE numout                 WRITE numout    READ numrst with              WRITE numout      job number :   ino1            WRITE numout      with time step it :   it1            WRITE numout      with pcg option ipcg1 :   ipcg1            WRITE numout      with sor option isor1 :   isor1            WRITE numout      with tke option itke1 :   itke1            WRITE numout      with FETI solver option ipcg1   isor1 :                  ipcg1   isor1            WRITE numout             ENDIF  C  C   Control of date  C        IF    it0 it1 NE 1  AND  abs nrstdt EQ 1   THEN            IF lwp  THEN                WRITE numout      : problem with nit000 for the                       restart                 WRITE numout                                                                           WRITE numout    we stop  verify the file                 WRITE numout    or rerun with the value  0 for the                 WRITE numout    control of time parameter  nrstdt                 WRITE numout                 ENDIF            STOP  dtrlec         ENDIF        IF   nrstdt EQ 1   ndate0   idast1  C  C   Read prognostic variables  C        CALL read3 numrst ub    2          CALL read3 numrst vb    3          CALL read3 numrst tb    5          CALL read3 numrst sb    6          CALL read3 numrst rotb  7          CALL read3 numrst hdivb 8          CALL read3 numrst un    9          CALL read3 numrst vn    10         CALL read3 numrst tn    12         CALL read3 numrst sn    13         CALL read3 numrst rotn  14         CALL read3 numrst hdivn 15   C  C   Read elliptic solver arrays  C        CALL read2 numrst gcx  jpk 17         CALL read2 numrst gcxb jpk 18   C  ifdef key_freesurf_cstvol  C  C   free surface formulation  eta   C        CALL read2 numrst etab  jpk 4          CALL read2 numrst etan  jpk 4      else  C  C   Rigid lid formulation  bsf   C        CALL read2 numrst bsfb  jpk 4          CALL read2 numrst bsfn  jpk 11         CALL read2 numrst bsfd  jpk 16   endif  C  ifdef key_zdftke  C  C   Read tke arrays  C        IF itke1 eq 1  THEN            CALL read3 numrst en 19         ELSE            IF lwp  THEN                WRITE numout      : the previous restart file                       didnt used  tke scheme                 WRITE numout                                  ENDIF            nrstdt 2        ENDIF  endif  C  C        RETURN        END"); 
    129 a[127] = new Array("./ReadWrite/scanctl.html", "scanctl.pro", "", "     file_comments   GLAMBOUNDARY 2 elements vector   lon1 lon2  the longitude   boundaries that should be used to visualize the data     lon2   lon1    lon2   lon1 le 360   key_shift will be defined according to GLAMBOUNDARY       version  Id: scanctl pro 136 2006 07 10 15:20:19Z pinsard     PRO scanctl  filename  filesname  jpt1file  varsname  varslev  swapbytes  bigendian  littleendian  f77sequential  fileheader  theader  xyheader  VARFMT   varfmt  _EXTRA   ex     compile_opt idl2  strictarrsubs    common     time1   systime 1              for key_performance      DTYPE      spawn   grep  i  DTYPE   filename  notgood    if keyword_set notgood  then begin       print   This program is not adapted to data type station or grib  Sorry        stop    endif     UNDEF  define valmask      spawn   grep  i  UNDEF   filename  valmask    valmask   strtrim valmask  2     valmask   strsplit valmask 0 extract     valmask   float valmask 1      Headers      spawn   grep  i  FILEHEADER   filename  fileheader    fileheader   strtrim fileheader  2     if keyword_set fileheader  then BEGIN       fileheader   strsplit fileheader 0 extract        fileheader   long fileheader 1     ENDIF ELSE fileheader   0L    spawn   grep  i  THEADER   filename  theader    theader   strtrim theader  2     if keyword_set theader  then BEGIN       theader   strsplit theader 0 extract        theader   long theader 1     ENDIF ELSE theader   0L    spawn   grep  i  XYHEADER   filename  xyheader    xyheader   strtrim xyheader  2     if keyword_set xyheader  then BEGIN       xyheader   strsplit xyheader 0 extract        xyheader   long xyheader 1     ENDIF ELSE xyheader   0L       find the x axis        spawn   sed  n  e  d   e  Xx Dd Ee Ff Yy Dd Ee Ff p   filename  xdef    if xdef 0  EQ   then BEGIN       print   Bad definition of xdef or ydef        stop    ENDIF    xdef   xdef 0:n_elements xdef 2     if n_elements xdef  NE 1 then begin       xdef    byte xdef  replicate byte   1 n_elements xdef        xdef   xdef where xdef NE 0        xdef   string xdef     endif    xdef   strtrim xdef 0  2     xdef   strsplit xdef extract     jpi   long xdef 1     case strupcase xdef 2  of        LINEAR :xaxis   float xdef 3 findgen jpi float xdef 4         LEVELS :xaxis   float xdef 3:n_elements xdef 1     ENDCASE       find the y axis        spawn   sed  n  e  d   e  Yy Dd Ee Ff Zz Dd Ee Ff p   filename  ydef    if ydef 0  EQ   then BEGIN       print   Bad definition of ydef or zdef        stop    ENDIF    ydef   ydef 0:n_elements ydef 2     if n_elements ydef  NE 1 then begin       ydef    byte ydef  replicate byte   1 n_elements ydef        ydef   ydef where ydef NE 0        ydef   string ydef     endif    ydef   strtrim ydef 0  2     ydef   strsplit ydef extract     jpj   long ydef 1     case strupcase ydef 2  of        LINEAR :yaxis   float ydef 3 findgen jpj float ydef 4         LEVELS :yaxis   float ydef 3:n_elements ydef 1      GAUST62 :BEGIN   print   Not yet coded    stop   END     GAUSR15 :BEGIN   print   Not yet coded    stop   END     GAUSR20 :BEGIN   print   Not yet coded    stop   END     GAUSR30 :BEGIN   print   Not yet coded    stop   END     GAUSR40 :BEGIN   print   Not yet coded    stop   END    ELSE:BEGIN   print   Not yet coded    stop   END    endcase       find the z axis        spawn   sed  n  e  d   e  Zz Dd Ee Ff Tt Dd Ee Ff p   filename  zdef    if zdef 0  EQ   then BEGIN       print   Bad definition of zdef or tdef        stop    ENDIF    zdef   zdef 0:n_elements zdef 2     if n_elements zdef  NE 1 then begin       zdef    byte zdef  replicate byte   1 n_elements zdef        zdef   zdef where zdef NE 0        zdef   string zdef     endif    zdef   strtrim zdef 0  2     zdef   strsplit zdef extract     jpk   long zdef 1     case strupcase zdef 2  of        LINEAR :zaxis   float zdef 3 findgen jpk float zdef 4         LEVELS :zaxis   float zdef 3:n_elements zdef 1     ENDCASE       compute the grid        computegrid  xaxis   xaxis  yaxis   yaxis  zaxis   zaxis  _EXTRA   ex    domdef       find the time axis        spawn   grep  i  TDEF   filename  timedef    timedef   strupcase strtrim timedef  2     timedef   strsplit timedef 0 extract     jpt   long timedef 1      initial date: y0  m0  d0  h0  mn0                 Julian day of IDL: julday m0  d0  y0  h0  mn0  00       t0   timedef 3     monthsname   string format C CMOA 31 indgen 12     case 1 OF   h h :mmZd d mmmyy yy        strpos t0   :  NE  1:BEGIN          pp   strpos t0   :           h0   long strmid t0  0  pp           mn0   long strmid t0  pp 1  2           pp   strpos t0   Z           dd   byte strmid t0  pp 2  1  LT byte A           d0   long strmid t0  pp 1  1 dd           m0    where monthsname EQ strmid t0  pp 2 dd  3 0 1          y0   long strmid t0  pp 5 dd        END   m m Zd d mmmyy yy        strpos t0   Z  NE  1:BEGIN          h0   0 12          pp   strpos t0   Z           mn0   long strmid t0  0  pp           dd   byte strmid t0  pp 2  1  LT byte A           d0   long strmid t0  pp 1  1 dd           m0    where monthsname EQ strmid t0  pp 2 dd  3 0 1          y0   long strmid t0  pp 5 dd        END   d d mmmyy yy         byte strmid t0  0  1  LT byte A 0 :BEGIN          h0   0 12          mn0   0          dd   byte strmid t0  1  1  LT byte A           d0   long strmid t0  0  1 dd           m0    where monthsname EQ strmid t0  1 dd  3 0 1          y0   long strmid t0  4 dd        END   mmmyy yy        ELSE:BEGIN          h0   0 12          mn0   0          d0   1          m0    where monthsname EQ strmid t0  0  3 0 1          y0   long strmid t0  3        END    ENDCASE   if y0 is a two digit integer   between 1950 and 2049    case 1 of       y0 LE 49:y0   2000 y0       y0 LE 99:y0   1900 y0       ELSE:    ENDCASE     increment date and definition of the calendar with IDL Julian days      tstep   timedef 4     tsval   long strmid tstep 0  strlen tstep 2     case strlowcase strmid tstep  1   reverse  of        mn :time   julday m0  d0  y0  h0  mn0 lindgen jpt tsval  0         hr :time   julday m0  d0  y0  h0 lindgen jpt tsval  mn0  0         dy :time   julday m0  d0 lindgen jpt tsval  y0  h0  mn0  0         mo :time   julday m0 lindgen jpt tsval  d0  y0  h0  mn0  0         yr :time   julday m0  d0  y0 lindgen jpt tsval  h0  mn0  0     ENDCASE                          shit the calendar to correspond to the time step     case strlowcase strmid tstep  1   reverse  of        dy :time   long time         mo :time   long time 14L        yr :time   long time 365L 2       ELSE:    endcase     OPTIONS      spawn   grep  i  OPTIONS   filename  options    options   strtrim options  2     options   strlowcase options 0     key_yreverse   strpos options   yrev  NE  1    key_zreverse   strpos options   zrev  EQ  1    multifiles   strpos options   template  NE  1    f77sequential   strpos options   sequential  NE  1    swapbytes   strpos options   byteswapped  NE  1    bigendian   strpos options   big_endian  NE  1    littleendian   strpos options   little_endian  NE  1    cray   strpos options   cray_32bit_ieee  NE  1 IF cray THEN BEGIN   print   cray_32bit_ieee  Not yet coded    stop   ENDIF    cal365   strpos options   365_day_calendar  NE  1 IF cal365 THEN BEGIN   print   365_day_calenda  Not yet coded    stop   ENDIF       building the filesname        spawn   grep  i  DSET   filename  files    files   strtrim files 0  2     files   strsplit files extract     if n_elements files  NE 2 then begin       print   Bad definition of the filename  There should be 2 elements:        print   DEST and 1 filename  that may define many files        stop    endif    files   files 1      files   strmid files 0  strpos files 0     reverse_search 1     filesname   files    if keyword_set multifiles  then begin   minutes       if  stregex files i n2 0  NE  1 then begin          filetsep    mn           mnend   long mn0 jpt 1           tmp   strarr hend h0 1           for i   0  n_elements tmp 1 do tmp i    strjoin strsplit filesname i n2 extract regex  string mn0 i  format    i2 2           filesname   strjoin tmp          endif   hours       if  stregex files i hf 123 0  NE  1 then begin          filetsep    hr           case strlowcase strmid tstep  1   reverse  of              mn :hend   long h0 jpt mn0 1 1 60               hr :hend   long h0 jpt 1           endcase          tmp   strarr hend h0 1           case 1 of             stregex files i h1  NE  1:for i   0  n_elements tmp 1 do tmp i    strjoin strsplit filesname i h1 extract regex  strtrim h0 i  1              stregex files i h2  NE  1:for i   0  n_elements tmp 1 do tmp i    strjoin strsplit filesname i h2 extract regex  string h0 i  format    i2 2              stregex files f2  NE  1:for i   0  n_elements tmp 1 do tmp i    strjoin strsplit filesname f2 extract regex  string h0 i  format    i3 2              stregex files i hf 3  NE  1:for i   0  n_elements tmp 1 do tmp i    strjoin strsplit filesname i hf 3 extract regex  string h0 i  format    i3 3           endcase          filesname   strjoin tmp          endif   days       if  stregex files i d 12 0  NE  1 then begin          filetsep    dy           case strlowcase strmid tstep  1   reverse  of              mn :dend   long d0 jpt mn0 1 1 1440               hr :dend   long d0 jpt h0 1 1 24               dy :dend   long d0 jpt 1           endcase          tmp   strarr dend d0 1           case 1 of             stregex files i d1  NE  1:for i   0  n_elements tmp 1 do tmp i    strjoin strsplit filesname i d1 extract regex  strtrim d0 i  1              stregex files i d2  NE  1:for i   0  n_elements tmp 1 do tmp i    strjoin strsplit filesname i d2 extract regex  string d0 i  format    i2 2           endcase          filesname   strjoin tmp          endif   months       if  stregex files i m 12c 0  NE  1 then begin          filetsep    mo           tmp   strarr 12           case 1 of             stregex files i m1  NE  1:for i   1  12 do tmp i 1    strjoin strsplit filesname i m1 extract regex  strtrim i  1              stregex files i m2  NE  1:for i   1  12 do tmp i 1    strjoin strsplit filesname i m2 extract regex  string i  format    i2 2              stregex files i mc  NE  1:for i   1  12 do tmp i 1    strjoin strsplit filesname i mc extract regex  monthsname i 1           endcase          filesname   strjoin tmp          endif   years       if  stregex files i y 24 0  NE  1 then begin          case strlowcase strmid tstep  1   reverse  of              dy :yend   long y0 jpt d0 1 1 365               mo :yend   long y0 jpt m0 1 1 12               yr :yend   long y0 jpt 1              ELSE:yend   y0          endcase          tmp   strarr yend y0 1           case 1 of             stregex files i y2  NE  1:for i   0  n_elements tmp 1 do tmp i    strjoin strsplit filesname i y2 extract regex  string y0 i 100 y0 i 100  format    i2 2              stregex files i y4  NE  1:for i   0  n_elements tmp 1  do tmp i    strjoin strsplit filesname i y 4 extract regex  string y0 i  format    i4 4           endcase          filesname   strjoin tmp          endif       filesname   strsplit filesname     extract      time step unit of each file:         case 1 of           stregex files i n2 0  NE  1:filetsep    mn            stregex files i hf 123 0  NE  1:filetsep    hr            stregex files i d 12 0  NE  1:filetsep    dy            stregex files i m 12c 0  NE  1: filetsep    mo            stregex files i y 24 0  NE  1:filetsep    yr        ENDCASE     number of time steps for each files         case strlowcase strmid tstep  1   reverse  of           mn :BEGIN             case filetsep of                 yr :jpt1file   60L 24L 365L                 mo :jpt1file   60L 24L 30L                 dy :jpt1file   60L 24L                 hr :jpt1file   60L                 mn :jpt1file   1L             endcase          END           hr :BEGIN             case filetsep of                 yr :jpt1file   24L 365L                 mo :jpt1file   24L 30L                 dy :jpt1file   24L                 hr :jpt1file   1L             endcase          END           dy :BEGIN             case filetsep of                 yr :jpt1file   365L                 mo :jpt1file   30L                 dy :jpt1file   1L             endcase          END           mo :BEGIN             case filetsep of                 yr :jpt1file   12L                 mo :jpt1file   1L             endcase          END           yr :jpt1file   1L       endcase     number of files         nof   ceil jpt 1 jpt1file        filesname   filesname 0:nof 1     ENDIF ELSE BEGIN       nof   1       jpt1file   jpt    ENDELSE   first character      if stregex files  GE 0 THEN BEGIN       iodir   strmid filename 0 strpos filename reverse_search 1        for i   0  nof 1 do filesname i    iodir strmid filesname i  1     ENDIF       extracting the variables        spawn   grep  i  VARS   filename  nvars    nvars   strtrim nvars  2     nvars   strsplit nvars 0 extract     nvars   long nvars 1     spawn   sed  n  e  d   e  Vv Aa Rr Ss Ee Nn Dd Vv Aa Rr Ss p   filename  varlist    if n_elements varlist  LE 2  then begin       print   No lines between vars and endvars        stop    endif    varlist   varlist 1:n_elements varlist 2     if n_elements varlist  NE nvars  then begin       print   Number of variables indicated by VARS  strtrim nvars  1  differs from number of lines  without   at the beginning  located between VARS and ENDVARS:  strtrim n_elements varlist  1        stop    ENDIF    varsname   strarr nvars     varsdes   strarr nvars     varslev   lonarr nvars     for i   0  nvars 1 do BEGIN       varlist i    strtrim varlist i  2        tmp   strsplit varlist i extract        if strmid tmp 2  0  2  EQ  1  then BEGIN          case long strmid tmp 2  3  2  of             10:BEGIN                print   Special data formats  units    1 10  Not yet coded                 stop             END             20:BEGIN                print   Special data formats  units    1 20  Not yet coded                 stop             END             30:BEGIN                print   Special data formats  units    1 30  Not yet coded                 stop             END             40:BEGIN                case long strmid tmp 2  6  of                   1:varfmt    byte                    2:varfmt    uint                     2:varfmt    int                    4:varfmt    long                    ELSE:BEGIN                      print   Bad definition of the special data formats:                        print long strmid tmp 2 6  should be equal to 1  2   2 or 4                       stop                   END                endcase             END             ELSE:BEGIN                print   Special data formats  units    1    Not yet coded                 stop             END          endcase       endif       varsname i    tmp 0        varsdes i    strjoin tmp 3:n_elements tmp 1            varslev i    long tmp 1     ENDFOR    varslev   1   varslev       ccmeshparameters filename   filename    ccmeshparameters filename    Grads       IF keyword_set key_performance  EQ 1 THEN print   time scanctl  systime 1 time1     return end     "); 
    130 a[128] = new Array("./ReadWrite/scanoasis.html", "scanoasis.pro", "", "           file_comments   scan an Oasis file  version  scanoasis grids_orca_t106       history Sebastien Masson  smasson lodyc jussieu fr                               July 01  2002    version  Id: scanoasis pro 163 2006 08 29 12:59:46Z navarro            PRO scanoasis  filename     compile_opt idl2  strictarrsubs       openr  unit filename    F77_UNFORMATTED   GET_LUN   SWAP_IF_LITTLE_ENDIAN         error err    if err ne 0 then begin       print err_string       return    endif     char8    12345678     WHILE NOT EOF unit  DO BEGIN       readu  unit  char8       print   char8       readu  unit    ENDWHILE     free_lun unit    return end"); 
    131 a[129] = new Array("./ReadWrite/write_oasis.html", "write_oasis.pro", "", "             file_comments   write an Oasis file  version   2 5       param FILENAME  in required     the filename      param VARNAME  in required     the name of the variable to be written      param Z2D  in required     the variable  2D array  to be written      keyword I2    keyword I4    keyword I8    keyword R4   to change the default format  R8  of the data to be written       keyword APPEND    to open the file with the file pointer at the end of the file  ready for    data to be appended       restrictions    varname is automatically written as a  character 8    by default z2d is written as an R8 array      history Sebastien Masson  smasson lodyc jussieu fr                         July 01  2002    version  Id: write_oasis pro 163 2006 08 29 12:59:46Z navarro             PRO write_oasis  filename  varname  z2d  I2   i2  I4   i4  I8   i8  R4   r4  APPEND   append     compile_opt idl2  strictarrsubs      openw  unit  filename    F77_UNFORMATTED   GET_LUN   SWAP_IF_LITTLE_ENDIAN         error err  APPEND   append    if err ne 0 then begin       print err_string       return    endif        writeu  unit  string varname  format a8     case 1 of       keyword_set i2 :writeu  unit  fix z2d        keyword_set i4 :writeu  unit  long z2d        keyword_set i8 :writeu  unit  long64 z2d        keyword_set r4 :writeu  unit  float z2d        ELSE:writeu  unit  double z2d     endcase     free_lun unit    return end"); 
    132 a[130] = new Array("./ReadWrite/writebat.html", "writebat.pro", "", "             file_comments   write the bathymetry ASCII file of OPA      categories    For OPA      param ZBAT  in required     the bathymetry  a 2d array      param FILENAME  in required type string    It contains the filename      history Sebastien Masson  smasson lodyc jussieu fr                         Sept 30  2003      based on batsav2 pro  written by Maurice Imbard  March 17  1998      version  Id: writebat pro 163 2006 08 29 12:59:46Z navarro     PRO writebat  zbat  filename     compile_opt idl2  strictarrsubs     basic checks   IF n_params  NE 2 THEN BEGIN     print   bad number of arguments in the call of writebat      return   ENDIF   IF size filename   type  NE 7 THEN BEGIN     print   the filename should be a string      return   ENDIF   sbat   size zbat    IF sbat 0  NE 2 THEN BEGIN     print   bathymetry array should be 2d array      return   ENDIF     jpi2   sbat 1    jpj2   sbat 2    parameters def   ifreq    40   ifin     jpi2 ifreq 1   irest    jpi2 ifin 1 ifreq   zbati    intarr ifreq    zbati2   intarr irest    i0       intarr ifreq 5    i1       intarr max 1  irest 5      openw  iunit  filename   get_lun     fill the file     printf  iunit  FORMAT    1x  bathy IDL      2i8  jpi2  jpj2   printf  iunit  FORMAT       il1   0   FOR jn   1  ifin 1 DO BEGIN     printf  iunit  FORMAT         il2   min  jpi2 1  il1 ifreq 1        i0 0    il1 1     FOR jj   1  ifreq 5 1 DO BEGIN       i0 jj    i0 jj 1 5     END     printf  iunit  FORMAT    3x 13 i3 12x  i0     printf  iunit  FORMAT         il3   il2 jn 1 ifreq     iformat   string  il3 2   i3      FOR jj    jpj2 1  0   1  DO BEGIN       zbati 0:il3    zbat il1:il2  jj        printf  iunit  FORMAT   iformat  jj 1  zbati     END     il1   il1   ifreq   END   printf  iunit  FORMAT       il2   min  jpi2 1  il1 ifreq 1      i1 0    il1 1   FOR jj   1  irest 5 1 DO BEGIN     i1 jj    i1 jj 1 5   END   printf  iunit  FORMAT    3x 13 i3 12x  i1   printf  iunit  FORMAT       il3   il2 ifin 1 ifreq   iformat   string  il3 2   i3    FOR jj    jpj2 1  0   1  DO BEGIN     zbati2 0:irest 1    0     zbati2 0:il3    zbat il1:il2  jj      printf  iunit  FORMAT   iformat  jj 1  zbati2   END     end     close  iunit   free_lun  iunit     return end"); 
    133 a[131] = new Array("./Tests/TestsOld/tst_basic_old.html", "tst_basic_old.pro", "", "     file_comments   figure 1: basics plots   plot and contours      history   Sebastien Masson may 2005      version  Id: tst_basic_old pro 189 2006 09 21 13:55:54Z pinsard     PRO tst_basic_old     1  plot     compile_opt idl2  strictarrsubs     n   10   y   findgen n    basic plot   splot  y  petit    2  2  1   portrait   improved plot by using plot and  graphic keywords    splot  y  petit    2  2  2   noerase  yrange    0   n 1 2  title    x and x 2    oplot  y 2  color   100  linestyle   2  thick   3     2  contour     z   dist n    basic plot   scontour  z   fill  nlevels   15  petit    2  2  3   noerase   improved plot by using contour and  graphic keywords    ind   findgen 2 n 2 n    scontour  z  levels   n ind  c_orientation   180 ind  c_spacing    2 ind                 petit    2  2  4   noerase   contour  z   overplot  c_label   rebin 1  0  2  n  levels   n ind                c_charthick   2  c_charsize   1 5  c_colors   250 ind   return end"); 
    134 a[132] = new Array("./Tests/TestsOld/tst_initlev_index_old.html", "tst_initlev_index_old.pro", "", ""); 
    135 a[133] = new Array("./Tests/TestsOld/tst_initlev_index_stride_old.html", "tst_initlev_index_stride_old.pro", "", ""); 
    136 a[134] = new Array("./Tests/TestsOld/tst_initlev_old.html", "tst_initlev_old.pro", "", ""); 
    137 a[135] = new Array("./Tests/TestsOld/tst_initlev_stride_old.html", "tst_initlev_stride_old.pro", "", ""); 
    138 a[136] = new Array("./Tests/TestsOld/tst_initorca05_index_old.html", "tst_initorca05_index_old.pro", "", ""); 
    139 a[137] = new Array("./Tests/TestsOld/tst_initorca05_index_stride_old.html", "tst_initorca05_index_stride_old.pro", "", ""); 
    140 a[138] = new Array("./Tests/TestsOld/tst_initorca05_old.html", "tst_initorca05_old.pro", "", ""); 
    141 a[139] = new Array("./Tests/TestsOld/tst_initorca05_short_old.html", "tst_initorca05_short_old.pro", "", ""); 
    142 a[140] = new Array("./Tests/TestsOld/tst_initorca05_short_stride_old.html", "tst_initorca05_short_stride_old.pro", "", ""); 
    143 a[141] = new Array("./Tests/TestsOld/tst_initorca05_stride_old.html", "tst_initorca05_stride_old.pro", "", ""); 
    144 a[142] = new Array("./Tests/TestsOld/tst_initorca2_index_old.html", "tst_initorca2_index_old.pro", "", ""); 
    145 a[143] = new Array("./Tests/TestsOld/tst_initorca2_index_stride_old.html", "tst_initorca2_index_stride_old.pro", "", ""); 
    146 a[144] = new Array("./Tests/TestsOld/tst_initorca2_old.html", "tst_initorca2_old.pro", "", ""); 
    147 a[145] = new Array("./Tests/TestsOld/tst_initorca2_short_old.html", "tst_initorca2_short_old.pro", "", ""); 
    148 a[146] = new Array("./Tests/TestsOld/tst_initorca2_short_stride_old.html", "tst_initorca2_short_stride_old.pro", "", ""); 
    149 a[147] = new Array("./Tests/TestsOld/tst_initorca2_stride_old.html", "tst_initorca2_stride_old.pro", "", ""); 
    150 a[148] = new Array("./Tests/TestsOld/tst_plt_old.html", "tst_plt_old.pro", "", "     file_comments        categories          keyword IMAGE      history   Sebastien Masson      version     Id: tst_plt_old pro 189 2006 09 21 13:55:54Z pinsard     PRO tst_plt_old  IMAGE   image   commons     compile_opt idl2  strictarrsubs    common     figure 2: regular grid     CASE jpi key_stride 0 jpj key_stride 1  OF     180 148:file    Levitus98_1m_01_12_Temperature_Pot_ORCA2 nc      360 180:file    Levitus98_1m_01_12_Temperature_Pot_1x1 nc      720 510:file    Levitus98_1m_01_12_Temperature_Pot_ORCA05 nc    ENDCASE   file   isafile file  title    Where is  file     lookalldir    IF size file   type  NE 7 THEN return     dummy       cnt   1     domdef   domdef  gdept 0  gdept 0  grille    T    temp   read_ncdf votemper  00101  00131  file   file      plt  temp   landscape   if keyword_set image  then saveimage   tst_plt_ image _ string cnt  format i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1     plt  temp   2  31  int    5   nocontour  format    i3    if keyword_set image  then saveimage   tst_plt_ image _ string cnt  format i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1     plt  temp   2  31  int   1   color_c   if keyword_set image  then saveimage   tst_plt_ image _ string cnt  format i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1     plt  temp   2  31  int   1   nocouleur  c_thick   1  cont_thick   2   if keyword_set image  then saveimage   tst_plt_ image _ string cnt  format i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1     plt  temp  cell_fill   1    jpi EQ 180    we must use cell_fill   2 for ORCA2   if keyword_set image  then saveimage   tst_plt_ image _ string cnt  format i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1   zoom   IF key_onearth THEN box    40  375   20  20      ELSE box    jpi 4  3 jpi 4  jpj 4  3 jpj 4    plt  temp  boite   box   landscape   if keyword_set image  then saveimage   tst_plt_ image _ string cnt  format i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1    projections   IF key_onearth THEN BEGIN       plt  temp  boite    20  380  60  90   stereo  map    90  0  0   portrait     if keyword_set image  then saveimage   tst_plt_ image _ string cnt  format i2 2 png   png       ELSE read  dummy   prompt    press return for the next plot      cnt   cnt   1       plt  temp  boite    20  380   90  50   ortho  map    90  180  0   portrait     if keyword_set image  then saveimage   tst_plt_ image _ string cnt  format i2 2 png   png       ELSE read  dummy   prompt    press return for the next plot      cnt   cnt   1       plt  temp   ortho  map    0  0  21   portrait   carte     if keyword_set image  then saveimage   tst_plt_ image _ string cnt  format i2 2 png   png       ELSE read  dummy   prompt    press return for the next plot      cnt   cnt   1     ENDIF    deep plot   domdef  150  150     warning message   domdef  gdept jpk 2  gdept jpk 2  grille    T    temp   read_ncdf votemper  00101  00131  file   file    plt  temp  carte   2 key_onearth   land   if keyword_set image  then saveimage   tst_plt_ image _ string cnt  format i2 2 png   png   cnt   cnt   1     return end"); 
    151 a[149] = new Array("./Tests/TestsOld/tst_pltt_old.html", "tst_pltt_old.pro", "", "     file_comments        categories        keyword IMAGE      history   Sebastien Masson      version    Id: tst_pltt_old pro 189 2006 09 21 13:55:54Z pinsard     PRO tst_pltt_old  IMAGE   image   commons     compile_opt idl2  strictarrsubs    common  common     figure 2: regular grid     CASE jpi key_stride 0 jpj key_stride 1  OF     180 148:file    Levitus98_1m_01_12_Temperature_Pot_ORCA2 nc      360 180:file    Levitus98_1m_01_12_Temperature_Pot_1x1 nc      720 510:file    Levitus98_1m_01_12_Temperature_Pot_ORCA05 nc    ENDCASE   file   isafile file  title    Where is  file     lookalldir    IF size file   type  NE 7 THEN return     dummy       cnt   1      1 1 xt plot     IF key_onearth THEN domdef  20  380   1  1  0  gdept 0      ELSE domdef  min glamt  max glamf  jpj 2 1  jpj 2 1  0  gdept 0      temp   read_ncdf votemper  00101  01231  file   file    IF key_forgetold THEN help  temp arr ELSE help  temp tab   help  jpt  time   pltt  temp   if keyword_set image  then saveimage   tst_pltt_ image _ string cnt  format    i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1     pltt  temp   nocontour   if keyword_set image  then saveimage   tst_pltt_ image _ string cnt  format    i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1     pltt  temp   color_c   if keyword_set image  then saveimage   tst_pltt_ image _ string cnt  format    i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1     pltt  temp   nocouleur   if keyword_set image  then saveimage   tst_pltt_ image _ string cnt  format    i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1     equatorial plot     IF key_onearth THEN BEGIN     a   abs gphit 0        yind   where a EQ min a      domdef  20  380  yind 0  yind n_elements yind 1            gdept 10    jpk 1  gdept 10    jpk 1  grille    T   yindex   ENDIF ELSE BEGIN     domdef  min glamt  max glamf  jpj 2  jpj 2           gdept 10    jpk 1  gdept 10    jpk 1  grille    T   yindex   ENDELSE   temp   read_ncdf votemper  00101  01231  file   file    IF key_forgetold THEN help  temp arr ELSE help  temp tab   pltt  temp   if keyword_set image  then saveimage   tst_pltt_ image _ string cnt  format    i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1     yt plot along the column that contain the largest latitude     IF key_onearth THEN BEGIN     ind   where gphit EQ max gphit      ind   ind 0  MOD jpi     domdef  ind  ind   90  90  gdept 0  gdept 0  grille    T   xindex   ENDIF ELSE BEGIN     domdef  jpi 2  jpi 2  min gphit  max gphif  gdept 0  gdept 0  grille    T   xindex   ENDELSE    temp   read_ncdf votemper  00101  01231  file   file    IF key_forgetold THEN help  temp arr ELSE help  temp tab   pltt  temp    if keyword_set image  then saveimage   tst_pltt_ image _ string cnt  format    i2 2 png   png   cnt   cnt   1    return end"); 
    152 a[150] = new Array("./Tests/TestsOld/tst_pltz_old.html", "tst_pltz_old.pro", "", "     file_comments        categories        keyword IMAGE      history   Sebastien Masson      version    Id: tst_pltz_old pro 189 2006 09 21 13:55:54Z pinsard     PRO tst_pltz_old  IMAGE   image   commons     compile_opt idl2  strictarrsubs    common     IF jpk EQ 1 THEN return     dummy       cnt   1     CASE jpi key_stride 0 jpj key_stride 1  OF     180 148:file    Levitus98_1m_01_12_Temperature_Pot_ORCA2 nc      360 180:file    Levitus98_1m_01_12_Temperature_Pot_1x1 nc      720 510:file    Levitus98_1m_01_12_Temperature_Pot_ORCA05 nc    ENDCASE   file   isafile file  title    Where is  file     lookalldir    IF size file   type  NE 7 THEN return     IF key_onearth THEN domdef  20  380   1  1  0  max gdept      ELSE domdef  min glamt  max glamf  jpj 2 1  jpj 2 1  0  max gdept      temp   read_ncdf votemper  00101  00131  file   file    IF key_forgetold THEN help  temp arr ELSE help  temp tab     pltz  temp   portrait   if keyword_set image  then saveimage   tst_pltz_ image _ string cnt  format    i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1     pltz  temp   portrait   nocontour   if keyword_set image  then saveimage   tst_pltz_ image _ string cnt  format    i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1     pltz  temp   portrait   color_c   if keyword_set image  then saveimage   tst_pltz_ image _ string cnt  format    i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1     pltz  temp   portrait   nocouleur   if keyword_set image  then saveimage   tst_pltz_ image _ string cnt  format    i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1     pltz  temp  boite    6000    if keyword_set image  then saveimage   tst_pltz_ image _ string cnt  format    i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1                                     pltz  temp  boite    6000  zoom   1000   if keyword_set image  then saveimage   tst_pltz_ image _ string cnt  format    i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1     pltz  temp  boite    6000  zoom   1000  ysurx   2   if keyword_set image  then saveimage   tst_pltz_ image _ string cnt  format    i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1     pltz  temp  boite    6000  zoom   1000  ysurx   2  hzsurht    5   if keyword_set image  then saveimage   tst_pltz_ image _ string cnt  format    i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1     yt plot along the column that contain the largest latitude     IF key_onearth THEN BEGIN     ind   where gphit EQ max gphit      ind   ind 0  MOD jpi     domdef  ind  ind   90  90  0  max gdept  grille    T   xindex   ENDIF ELSE BEGIN     domdef  jpi 2  jpi 2  min gphit  max gphif  0  max gdept  grille    T   xindex   ENDELSE    temp   read_ncdf votemper  00101  01231  file   file    pltz  temp  boite    6000  zoom   1000  ysurx   2  hzsurht    5   if keyword_set image  then saveimage   tst_pltz_ image _ string cnt  format    i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1     oblique sections      IF key_onearth THEN endpoints    110   45  290  45      ELSE endpoints    jpi 6  jpj 3  5 jpi 6  2 jpj 3    domdef  endpoints   endpoints  type    pltz    temp   read_ncdf votemper  00101  00131  file   file    pltz  temp  endpoints   endpoints   if keyword_set image  then saveimage   tst_pltz_ image _ string cnt  format    i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1     false oblique sections      IF key_onearth THEN endpoints    180   70  180  90      ELSE endpoints    jpi 2 0 25   0 25  jpi 2 0 25   jpj    domdef  6000  endpoints   endpoints  type    pltz    temp   read_ncdf votemper  00101  00131  file   file    pltz  temp  endpoints   endpoints  boite    6000              zoom   1000  ysurx   2  hzsurht    5      showbuild   if keyword_set image  then saveimage   tst_pltz_ image _ string cnt  format    i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1     comparison between real section and false oblique sections     IF  where gphit EQ 0 0  NE  1 THEN BEGIN     IF key_onearth THEN box    20  380  0  0  0  6000        ELSE box    0  jpi 1  jpj 2  jpj 2  0  6000      domdef  box  grille    T      temp   read_ncdf votemper  00101  00131  file   file      pltz  temp  boite    6000   portrait  petit    1  2  1                zoom   500  hzsurht    5      IF key_onearth THEN endpoints    20  0  380  0        ELSE endpoints    0  jpj 2  jpi 1  jpj 2      domdef  6000  endpoints   endpoints  type    pltz  grille    T      temp   read_ncdf votemper  00101  00131  file   file      pltz  temp  endpoints   endpoints  boite    6000                zoom   500  hzsurht    5               petit    1  2  2   noerase      if keyword_set image  then saveimage   tst_pltz_ image _ string cnt  format    i2 2 png   png     cnt   cnt   1   ENDIF    return end"); 
    153 a[151] = new Array("./Tests/tst_basic.html", "tst_basic.pro", "", "     file_comments   figure 1: basics plots   plot and contours      history   Sebastien Masson may 2005      version  Id: tst_basic pro 131 2006 07 06 14:52:56Z pinsard     PRO tst_basic     1  plot     compile_opt idl2  strictarrsubs     n   10   y   findgen n    basic plot   splot  y  small    2  2  1   portrait   improved plot by using plot and  graphic keywords    splot  y  small    2  2  2   noerase  yrange    0   n 1 2  title    x and x 2    oplot  y 2  color   100  linestyle   2  thick   3     2  contour     z   dist n    basic plot   scontour  z   fill  nlevels   15  small    2  2  3   noerase   improved plot by using contour and  graphic keywords    ind   findgen 2 n 2 n    scontour  z  levels   n ind  c_orientation   180 ind  c_spacing    2 ind                 small    2  2  4   noerase   contour  z   overplot  c_label   rebin 1  0  2  n  levels   n ind                c_charthick   2  c_charsize   1 5  c_colors   250 ind   return end"); 
    154 a[152] = new Array("./Tests/tst_initlev.html", "tst_initlev.pro", "", ""); 
    155 a[153] = new Array("./Tests/tst_initlev_index.html", "tst_initlev_index.pro", "", ""); 
    156 a[154] = new Array("./Tests/tst_initlev_index_stride.html", "tst_initlev_index_stride.pro", "", ""); 
    157 a[155] = new Array("./Tests/tst_initlev_stride.html", "tst_initlev_stride.pro", "", ""); 
    158 a[156] = new Array("./Tests/tst_initorca05.html", "tst_initorca05.pro", "", ""); 
    159 a[157] = new Array("./Tests/tst_initorca05_index.html", "tst_initorca05_index.pro", "", ""); 
    160 a[158] = new Array("./Tests/tst_initorca05_index_stride.html", "tst_initorca05_index_stride.pro", "", ""); 
    161 a[159] = new Array("./Tests/tst_initorca05_short.html", "tst_initorca05_short.pro", "", ""); 
    162 a[160] = new Array("./Tests/tst_initorca05_short_stride.html", "tst_initorca05_short_stride.pro", "", ""); 
    163 a[161] = new Array("./Tests/tst_initorca05_stride.html", "tst_initorca05_stride.pro", "", ""); 
    164 a[162] = new Array("./Tests/tst_initorca2.html", "tst_initorca2.pro", "", ""); 
    165 a[163] = new Array("./Tests/tst_initorca2_index.html", "tst_initorca2_index.pro", "", ""); 
    166 a[164] = new Array("./Tests/tst_initorca2_index_stride.html", "tst_initorca2_index_stride.pro", "", ""); 
    167 a[165] = new Array("./Tests/tst_initorca2_short.html", "tst_initorca2_short.pro", "", ""); 
    168 a[166] = new Array("./Tests/tst_initorca2_short_stride.html", "tst_initorca2_short_stride.pro", "", ""); 
    169 a[167] = new Array("./Tests/tst_initorca2_stride.html", "tst_initorca2_stride.pro", "", ""); 
    170 a[168] = new Array("./Tests/tst_plt.html", "tst_plt.pro", "", "     file_comments        categories          keyword IMAGE      history   Sebastien Masson      version     Id: tst_plt pro 157 2006 08 21 09:01:50Z navarro     PRO tst_plt  IMAGE   image   commons     compile_opt idl2  strictarrsubs    cm_4mesh     figure 2: regular grid     CASE jpi key_stride 0 jpj key_stride 1  OF     180 148:file    Levitus98_1m_01_12_Temperature_Pot_ORCA2 nc      360 180:file    Levitus98_1m_01_12_Temperature_Pot_1x1 nc      720 510:file    Levitus98_1m_01_12_Temperature_Pot_ORCA05 nc    ENDCASE   file   isafile file  title    Where is  file     lookalldir    IF size file   type  NE 7 THEN return     dummy       cnt   1     domdef   domdef  gdept 0  gdept 0  gridtype    T    temp   read_ncdf votemper  00101  00131  file   file      plt  temp   landscape   if keyword_set image  then saveimage   tst_plt_ image _ string cnt  format i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1     plt  temp   2  31  int    5   nocontour  format    i3    if keyword_set image  then saveimage   tst_plt_ image _ string cnt  format i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1     plt  temp   2  31  int   1   color_c   if keyword_set image  then saveimage   tst_plt_ image _ string cnt  format i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1     plt  temp   2  31  int   1   nofill  c_thick   1  coast_thick   2   if keyword_set image  then saveimage   tst_plt_ image _ string cnt  format i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1     plt  temp  cell_fill   1    jpi EQ 180    we must use cell_fill   2 for ORCA2   if keyword_set image  then saveimage   tst_plt_ image _ string cnt  format i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1   zoom   IF key_onearth THEN box    40  375   20  20      ELSE box    jpi 4  3 jpi 4  jpj 4  3 jpj 4    plt  temp  boxzoom   box   landscape   if keyword_set image  then saveimage   tst_plt_ image _ string cnt  format i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1    projections   IF key_onearth THEN BEGIN       plt  temp  boxzoom    20  380  60  90   stereo  map    90  0  0   portrait     if keyword_set image  then saveimage   tst_plt_ image _ string cnt  format i2 2 png   png       ELSE read  dummy   prompt    press return for the next plot      cnt   cnt   1       plt  temp  boxzoom    20  380   90  50   ortho  map    90  180  0   portrait     if keyword_set image  then saveimage   tst_plt_ image _ string cnt  format i2 2 png   png       ELSE read  dummy   prompt    press return for the next plot      cnt   cnt   1       plt  temp   ortho  map    0  0  21   portrait   realcont     if keyword_set image  then saveimage   tst_plt_ image _ string cnt  format i2 2 png   png       ELSE read  dummy   prompt    press return for the next plot      cnt   cnt   1     ENDIF    deep plot   domdef  150  150     warning message   domdef  gdept jpk 2  gdept jpk 2  gridtype    T    temp   read_ncdf votemper  00101  00131  file   file    plt  temp  realcont   2 key_onearth   land   if keyword_set image  then saveimage   tst_plt_ image _ string cnt  format i2 2 png   png   cnt   cnt   1     return end"); 
    171 a[169] = new Array("./Tests/tst_pltt.html", "tst_pltt.pro", "", "     file_comments        categories        keyword IMAGE      history   Sebastien Masson      version    Id: tst_pltt pro 157 2006 08 21 09:01:50Z navarro     PRO tst_pltt  IMAGE   image   commons     compile_opt idl2  strictarrsubs    cm_4mesh  cm_4cal     figure 2: regular grid     CASE jpi key_stride 0 jpj key_stride 1  OF     180 148:file    Levitus98_1m_01_12_Temperature_Pot_ORCA2 nc      360 180:file    Levitus98_1m_01_12_Temperature_Pot_1x1 nc      720 510:file    Levitus98_1m_01_12_Temperature_Pot_ORCA05 nc    ENDCASE   file   isafile file  title    Where is  file     lookalldir    IF size file   type  NE 7 THEN return     dummy       cnt   1      1 1 xt plot     IF key_onearth THEN domdef  20  380   1  1  0  gdept 0      ELSE domdef  min glamt  max glamf  jpj 2 1  jpj 2 1  0  gdept 0      temp   read_ncdf votemper  00101  01231  file   file    IF key_forgetold THEN help  temp arr ELSE help  temp tab   help  jpt  time   pltt  temp   if keyword_set image  then saveimage   tst_pltt_ image _ string cnt  format    i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1     pltt  temp   nocontour   if keyword_set image  then saveimage   tst_pltt_ image _ string cnt  format    i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1     pltt  temp   color_c   if keyword_set image  then saveimage   tst_pltt_ image _ string cnt  format    i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1     pltt  temp   nofill   if keyword_set image  then saveimage   tst_pltt_ image _ string cnt  format    i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1     equatorial plot     IF key_onearth THEN BEGIN     a   abs gphit 0        yind   where a EQ min a      domdef  20  380  yind 0  yind n_elements yind 1            gdept 10    jpk 1  gdept 10    jpk 1  gridtype    T   yindex   ENDIF ELSE BEGIN     domdef  min glamt  max glamf  jpj 2  jpj 2           gdept 10    jpk 1  gdept 10    jpk 1  gridtype    T   yindex   ENDELSE   temp   read_ncdf votemper  00101  01231  file   file    IF key_forgetold THEN help  temp arr ELSE help  temp tab   pltt  temp   if keyword_set image  then saveimage   tst_pltt_ image _ string cnt  format    i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1     yt plot along the column that contain the largest latitude     IF key_onearth THEN BEGIN     ind   where gphit EQ max gphit      ind   ind 0  MOD jpi     domdef  ind  ind   90  90  gdept 0  gdept 0  gridtype    T   xindex   ENDIF ELSE BEGIN     domdef  jpi 2  jpi 2  min gphit  max gphif  gdept 0  gdept 0  gridtype    T   xindex   ENDELSE    temp   read_ncdf votemper  00101  01231  file   file    IF key_forgetold THEN help  temp arr ELSE help  temp tab   pltt  temp    if keyword_set image  then saveimage   tst_pltt_ image _ string cnt  format    i2 2 png   png   cnt   cnt   1    return end"); 
    172 a[170] = new Array("./Tests/tst_pltz.html", "tst_pltz.pro", "", "     file_comments        categories        keyword IMAGE      history   Sebastien Masson      version    Id: tst_pltz pro 157 2006 08 21 09:01:50Z navarro     PRO tst_pltz  IMAGE   image   commons     compile_opt idl2  strictarrsubs    cm_4mesh     IF jpk EQ 1 THEN return     dummy       cnt   1     CASE jpi key_stride 0 jpj key_stride 1  OF     180 148:file    Levitus98_1m_01_12_Temperature_Pot_ORCA2 nc      360 180:file    Levitus98_1m_01_12_Temperature_Pot_1x1 nc      720 510:file    Levitus98_1m_01_12_Temperature_Pot_ORCA05 nc    ENDCASE   file   isafile file  title    Where is  file     lookalldir    IF size file   type  NE 7 THEN return     IF key_onearth THEN domdef  20  380   1  1  0  max gdept      ELSE domdef  min glamt  max glamf  jpj 2 1  jpj 2 1  0  max gdept      temp   read_ncdf votemper  00101  00131  file   file    IF key_forgetold THEN help  temp arr ELSE help  temp tab     pltz  temp   portrait   if keyword_set image  then saveimage   tst_pltz_ image _ string cnt  format    i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1     pltz  temp   portrait   nocontour   if keyword_set image  then saveimage   tst_pltz_ image _ string cnt  format    i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1     pltz  temp   portrait   color_c   if keyword_set image  then saveimage   tst_pltz_ image _ string cnt  format    i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1     pltz  temp   portrait   nofill   if keyword_set image  then saveimage   tst_pltz_ image _ string cnt  format    i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1     pltz  temp  boxzoom    6000    if keyword_set image  then saveimage   tst_pltz_ image _ string cnt  format    i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1                                     pltz  temp  boxzoom    6000  zoom   1000   if keyword_set image  then saveimage   tst_pltz_ image _ string cnt  format    i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1     pltz  temp  boxzoom    6000  zoom   1000  yxaspect   2   if keyword_set image  then saveimage   tst_pltz_ image _ string cnt  format    i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1     pltz  temp  boxzoom    6000  zoom   1000  yxaspect   2  zratio    5   if keyword_set image  then saveimage   tst_pltz_ image _ string cnt  format    i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1     yt plot along the column that contain the largest latitude     IF key_onearth THEN BEGIN     ind   where gphit EQ max gphit      ind   ind 0  MOD jpi     domdef  ind  ind   90  90  0  max gdept  gridtype    T   xindex   ENDIF ELSE BEGIN     domdef  jpi 2  jpi 2  min gphit  max gphif  0  max gdept  gridtype    T   xindex   ENDELSE    temp   read_ncdf votemper  00101  01231  file   file    pltz  temp  boxzoom    6000  zoom   1000  yxaspect   2  zratio    5   if keyword_set image  then saveimage   tst_pltz_ image _ string cnt  format    i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1     oblique sections      IF key_onearth THEN endpoints    110   45  290  45      ELSE endpoints    jpi 6  jpj 3  5 jpi 6  2 jpj 3    domdef  endpoints   endpoints  type    pltz    temp   read_ncdf votemper  00101  00131  file   file    pltz  temp  endpoints   endpoints   if keyword_set image  then saveimage   tst_pltz_ image _ string cnt  format    i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1     false oblique sections      IF key_onearth THEN endpoints    180   70  180  90      ELSE endpoints    jpi 2 0 25   0 25  jpi 2 0 25   jpj    domdef  6000  endpoints   endpoints  type    pltz    temp   read_ncdf votemper  00101  00131  file   file    pltz  temp  endpoints   endpoints  boxzoom    6000              zoom   1000  yxaspect   2  zratio    5      showbuild   if keyword_set image  then saveimage   tst_pltz_ image _ string cnt  format    i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1     comparison between real section and false oblique sections     IF  where gphit EQ 0 0  NE  1 THEN BEGIN     IF key_onearth THEN box    20  380  0  0  0  6000        ELSE box    0  jpi 1  jpj 2  jpj 2  0  6000      domdef  box  gridtype    T      temp   read_ncdf votemper  00101  00131  file   file      pltz  temp  boxzoom    6000   portrait  small    1  2  1                zoom   500  zratio    5      IF key_onearth THEN endpoints    20  0  380  0        ELSE endpoints    0  jpj 2  jpi 1  jpj 2      domdef  6000  endpoints   endpoints  type    pltz  gridtype    T      temp   read_ncdf votemper  00101  00131  file   file      pltz  temp  endpoints   endpoints  boxzoom    6000                zoom   500  zratio    5               small    1  2  2   noerase      if keyword_set image  then saveimage   tst_pltz_ image _ string cnt  format    i2 2 png   png     cnt   cnt   1   ENDIF    return end"); 
    173 a[171] = new Array("./Textoidl/matchdelim.html", "matchdelim.pro", "", "     file_comments   Match open close delimiters in a string       categories   Text  String      param INSTRING  in required type string    a string containing an open delimiter  e g    in which you    want to find the matching closing delimiter  e g         param OPENPOS  in optional    Set to a named variable to receive the   position of the first opening delimiter       keyword OPEN_DELIM  default    A single character containing the opening   delimiter  e g         keyword CLOSE_DELIM  default    A single character containing the closing    delimiter  e g         returns        uses        restrictions   Any pair of  nonidentical  characters can be used as delimiters       examples   matchdelim one two three  returns 9  the character just before  three       history    Log: matchdelim pro v     Revision 1 3  1996 06 14 20:00:27  mcraig   Updated Copyright info      Revision 1 2  1996 05 09 00:22:17  mcraig   Removed restriction that open delim must be first char   Added argument   to allow for return of position of open delim      Revision 1 1  1996 01 31 18:41:06  mcraig   Initial revision      Copyright  C  1996 The Regents of the University of California  All   Rights Reserved   Written by Matthew W  Craig    See the file COPYRIGHT for restrictions on distrubting this code    This code comes with absolutely NO warranty  see DISCLAIMER for details       version    Id: matchdelim pro 163 2006 08 29 12:59:46Z navarro       FUNCTION matchdelim  InString  OpenPos                         OPEN_DELIM OpenDelim                         CLOSE_DELIM CloseDelim                         HELP Help     compile_opt idl2  strictarrsubs      Return to caller if error      On_error  2      IF  n_params  LT 1  OR keyword_set Help  THEN BEGIN         offset                 print  offset Match open close delimiters in a string          print  offset position   matchdelim  strn   openpos          print  offset Inputs:          print  offset offset strn          a string containing an open                 in          print  offset offset                delimiter  e g    in which you           print  offset offset                want to find the matching closing            print  offset offset                delimiter  e g            print  offset Keywords:          print  offset offset OPEN_DELIM    A single character containing the opening   in          print  offset offset                delimiter  e g     Default is           print  offset offset CLOSE_DELIM   A single character containing the closing   in          print  offset offset                delimiter  e g     Default is           print  offset Outputs:          print  offset offset position   returns the position in strn of the            out          print  offset offset             closing delimiter   1 if no closing found          print  offset offset openpos    Set to a named variable to receive the         out          print  offset offset             position of the first opening delimiter          print  offset offset             Optional          print  offset Example:          print  offset offset matchdelim a one two three  returns 10  the character just          print  offset offset   before  three             print  offset offset             a matchdelim aaa bbb ccc ddd eee f OP CL          print  offset offset   returns a 12  just before ddd  f 3              just before bbb            return   1     ENDIF     Set default delimiters      IF n_elements OpenDelim  EQ 0 THEN OpenDelim          IF n_elements CloseDelim  EQ 0 THEN CloseDelim         Make sure InString has more than 1 character      length   strlen InString       IF  length LE 1  THEN return 1    Return if no open delimiter     OpenPos   strpos  InString  OpenDelim       IF  OpenPos EQ  1  THEN BEGIN          print   Error: No opening delimiter          return   1     ENDIF         Convert strings to array of integers to speed processing      OpenDelim   fix byte OpenDelim 0      CloseDelim   fix byte CloseDelim 0      TmpStr   fix byte strmid  InString  OpenPos  length    Leave the  1  in here   This forces conversion from BYTE to INTEGER    necessary because there are no negative BYTEs      TmpStr    TmpStr EQ OpenDelim                   1 TmpStr EQ CloseDelim      length   n_elements TmpStr      Initialize count of number of delimiters   We ve found one  the   first opener      BraceCnt   1     i 0     WHILE  BraceCnt GT 0  AND  i LT length 1  DO BEGIN          i   i 1         BraceCnt   BraceCnt   TmpStr i      ENDWHILE           i   i   OpenPos     IF  BraceCnt GT 0  THEN i    1     return  i END      "); 
    174 a[172] = new Array("./Textoidl/nexttok.html", "nexttok.pro", "", "      NAME:         NEXTTOK   PURPOSE:         Find the next occurance of any of a set of characters in a         string and return the character which occurs next    CATEGORY:         text strings   CALLING SEQUENCE:         tok   nexttok  strn  tokens     INPUTS:         strn     string to be searched for sub superscripts    in         tokens   string containing characters to be found      in   KEYWORD PARAMETERS:         POSITION   Set to a named variable to get position     out                     of next token  or  1 if none found           HELP      Print useful message and exit    OUTPUTS:         tok      Contains the character among tokens which     out                   occurs next in strn  or null   if none found    COMMON BLOCKS:   SIDE EFFECTS:   NOTES:   EXAMPLE:         nexttok   x 2   N_j 3   _  position pos   returns   and sets         pos to 1    MODIFICATION HISTORY:          Id: nexttok pro 134 2006 07 07 10:19:08Z navarro            Log: nexttok pro v           Revision 1 4  2004 06 15 17:25:54  mcraig         Fixed bug in regular expression  changed array notation to square brackets           Revision 1 3  1996 06 14 20:00:27  mcraig         Updated Copyright info            Revision 1 2  1996 05 09 00:22:17  mcraig         Generalized so that the next occurence of any of a set of characters will         be returned            Revision 1 1  1996 01 31 18:41:06  mcraig         Initial revision     RELEASE:          Name: Rel_2_1_2       COPYRIGHT:    Copyright  C  1996 The Regents of the University of California  All    Rights Reserved   Written by Matthew W  Craig     See the file COPYRIGHT for restrictions on distrubting this code     This code comes with absolutely NO warranty  see DISCLAIMER for details    FUNCTION nexttok  strn  tokens                      POSITION position                      HELP Help     compile_opt idl2  strictarrsubs       Return to caller on error      On_error  2     Help those in need of it      IF  n_params  NE 2  OR keyword_set Help  THEN BEGIN          offset                 print  offset Find the next occurance of any of a set of characters in a          print  offset string and return the character which occurs next    CALLING SEQUENCE:         print  offset tok   nexttok  strn  tokens     INPUTS:         print  offset Inputs:          print  offset offset strn     string to be searched for sub superscripts    in          print  offset offset tokens   string containing characters to be found      in    KEYWORD PARAMETERS:         print  offset Keywords:          print  offset offset POSITION   Set to a named variable to get position     out          print  offset offset             of next token  or  1 if none found          print  offset offset HELP      Print useful message and exit    OUTPUTS:         print  offset Outputs:          print  offset offset tok     Contains the character among tokens which      out          print  offset offset          occurs next in strn  or null   if none found    EXAMPLE:         print  offset Example:          print  offset offset nexttok   x 2   N_j 3   _  position pos   returns   and sets          print  offset offset pos to 1          return        ENDIF       TmpStr   byte strn      TmpTok   byte tokens      NumToks   n_elements TmpTok        MatchIdx   0L     Matches   0L     FOR j 0  NumToks 1 DO BEGIN          TmpMatch   where TmpStr EQ TmpTok j   TmpCnt          IF  TmpCnt GT 0  THEN BEGIN             MatchIdx    MatchIdx  Replicate j  TmpCnt              Matches    Matches  TmpMatch          ENDIF      ENDFOR       IF n_elements MatchIdx  EQ 1 THEN BEGIN          Position    1         return        ENDIF       MatchIdx   MatchIdx 1:      Matches   Matches 1:       SortInd   sort Matches       Position   Matches SortInd 0       Tok   string TmpTok MatchIdx SortInd 0           return  Tok END   "); 
    175 a[173] = new Array("./Textoidl/showtex.html", "showtex.pro", "", "      NAME:         SHOWTEX   PURPOSE:         Display TeX sequence translation table on current graphics device    CATEGORY:         text strings   CALLING SEQUENCE:         showtex   INPUTS:   KEYWORD PARAMETERS:          HELP   print out info on use of the function                  and exit          FONT    Set to 0 to use hardware font   1 to use vector                   Note that the only hardware font supported is                  Postscript   OUTPUTS:   COMMON BLOCKS:   SIDE EFFECTS:         Plot is created    NOTES:         Hardware fonts are supported only for device PS  PostScript    EXAMPLE:   MODIFICATION HISTORY:          Id: showtex pro 163 2006 08 29 12:59:46Z navarro            Log: showtex pro v           Revision 1 4  2004 06 15 17:25:54  mcraig         Fixed bug in regular expression  changed array notation to square brackets           Revision 1 3  1996 06 14 20:00:27  mcraig         Updated Copyright info            Revision 1 2  1996 05 09 00:22:17  mcraig         Added error handling and updated built in help            Revision 1 1  1996 02 08 18:55:12  mcraig         Initial revision     RELEASE:          Name: Rel_2_1_2       COPYRIGHT:    Copyright  C  1996 The Regents of the University of California  All    Rights Reserved   Written by Matthew W  Craig     See the file COPYRIGHT for restrictions on distrubting this code     This code comes with absolutely NO warranty  see DISCLAIMER for details      PRO showtex  FONT fnt  HELP help     compile_opt idl2  strictarrsubs      Return to caller on error      On_error  2    Print help if needed      IF keyword_set help  THEN BEGIN         print       Display TeX sequence translation table on current graphics device          print       showtex          print       Keywords:          print           HELP       print this message and return          print          FONT        set to 0 to use hardware fonts for current device          print                       1 to use vector fonts  DEFAULT          print       NOTES:    The only hardware font supported is PostScript          print                 The FONT keyword overrides the font selected in  p font          return     ENDIF         We begin by deciding on the font   PostScript   0 means use vector      PostScript   0     PlotTitle    Vector Fonts      IF n_elements fnt  EQ 0 THEN BEGIN   get font from  p font         IF  P font NE  1 THEN BEGIN   User wants hardware font              PostScript   1             PlotTitle    PostScript Fonts          ENDIF      ENDIF ELSE BEGIN              get font from FONT keyword         IF fnt NE  1 THEN BEGIN             PostScript   1             PlotTitle    PostScript Fonts          ENDIF     ENDELSE         Bomb out if user wants hardware font for non PostScript device      IF  PostScript EQ 1  AND  strupcase D name  NE  PS  THEN BEGIN                                                    Device isn t postscript                                                  and user wants hardware                                                 font   Not good          print   Warning: No translation for device:    D name         return     ENDIF       Set  P font to value indicated by FONT keyword  saving surrent   setting to reset at end      OldPFont    p font      p font   PostScript   1      erase     seq   textoidl tex      DisplayString   seq          textoidl seq       nseq   n_elements seq      nrows   nseq 5   1            Five sequences per row      dx    9 5      dy    9 nrows     y 95     xyouts 5 y PlotTitle align 5 norm size 2 5     count 0     FOR i   1L  nrows DO BEGIN         y  y   dy         x    1         FOR j   1  5 DO BEGIN             IF  count LT nseq   THEN xyouts  x  y  DisplayString count  align    5   norm             count   count 1             x   x   dx         ENDFOR     ENDFOR    Restore old  P font       p font   OldPFont END"); 
    176 a[174] = new Array("./Textoidl/str_token.html", "str_token.pro", "", "      NAME:         STR_TOKEN   PURPOSE:         Retrieve portion of string up to token    CATEGORY:         text strings   CALLING SEQUENCE:         new   str_token  old  token     INPUTS:         old     String to be split   Contains text after    in  out                  token on output          token   Token to use in splitting old               in   KEYWORD PARAMETERS:          TRIM   set to remove leading blanks from old                   before returning           HELP   print useful message and exit    OUTPUTS:         new     portion of string up to token               out         old     portion of old after token                  out  in   COMMON BLOCKS:   SIDE EFFECTS:         Input parameter old is modified    NOTES:         Token may be one or more characters          If token is not found  returns old and sets old to     EXAMPLE:         If old is  foo44 bar  then str_token  old   44    would return          foo  and upon return  old will be left with   bar   If  TRIM         were set  old would be  bar  on return            If old xyz  then new str_token old a  would return with         new xyz  and old    THANKS:         To D  Linder who wrote GETTOK  part of the goddard library          upon which this is based    MODIFICATION HISTORY:          Id: str_token pro 163 2006 08 29 12:59:46Z navarro            Log: str_token pro v           Revision 1 1  2000 06 14 19:09:22  mcraig         Changed name of strtok str_token to avoid conflict in IDL 5 3            Revision 1 3  1996 06 14 20:00:27  mcraig         Updated Copyright info            Revision 1 2  1996 05 09 00:22:17  mcraig         Added built in help            Revision 1 1  1996 01 31 18:47:37  mcraig         Initial revision     RELEASE:          Name: Rel_2_1_2       COPYRIGHT:    Copyright  C  1996 The Regents of the University of California  All    Rights Reserved   Written by Matthew W  Craig     See the file COPYRIGHT for restrictions on distrubting this code     This code comes with absolutely NO warranty  see DISCLAIMER for details    FUNCTION str_token  string  token                     TRIM trim  HELP Help     compile_opt idl2  strictarrsubs      Back to the caller if error occurs      On_error  2      IF  n_params  NE 2  OR keyword_set Help  THEN BEGIN          offset                 print  offset Retrieve portion of string up to token          print  offset new   str_token  old  token           print  offset Inputs:          print  offset offset old     String to be split   Contains text after    in  out          print  offset offset          token on output          print  offset offset token   Token to use in splitting old               in          print  offset Keywords:          print  offset offset TRIM   set to remove leading blanks from old           print  offset offset          before returning          print  offset offset HELP   print useful message and exit          print  offset Outputs:          print  offset offset new     portion of string up to token               out          print  offset offset old     portion of old after token                  out  in          print  offset Side effects:          print  offset offset Input parameter old is modified          print  offset Notes:          print  offset offset Token may be one or more characters          print  offset offset If token is not found  returns old and sets old to           print  offset Examples:          print  offset offset If old is  foo44 bar  then str_token  old   44    would return          print  offset offset    foo  and upon return  old will be left with   bar   If  TRIM          print  offset offset   were set  old would be  bar  on return            print  offset offset If old xyz  then new str_token old a  would return with          print  offset offset   new xyz  and old          return   1     ENDIF       pos   strpos string  token       IF  pos GE 0  THEN BEGIN         front   strmid string  0  pos           string   strmid string  pos   strlen token  strlen string          IF keyword_set trim  THEN string   strtrim string  1          return  front     ENDIF          front   string     string         return  front      END "); 
    177 a[175] = new Array("./Textoidl/strcnt.html", "strcnt.pro", "", "     file_comments   Count number of occurrences of a substring in a string       categories   Text  String      param STRN  in required type string    The string in which to count occurences       param SUBSTRN  in required type string    The substring to count occurrences of       param STARTPOS  in required    The position at which to begin the search    If not supplied  start at beginning of string       keyword HELP   Print useful message and return       returns   Number of occurances of substring in string       restrictions   Overlapping occurances are not counted separately   For   example  counting occurances of  bb  in  blah bbb  returns one   occurance        history          Log: strcnt pro v           Revision 1 3  1996 06 14 20:00:27  mcraig         Updated Copyright info            Revision 1 2  1996 05 09 00:22:17  mcraig         Added fast processing using BYTE arrays if we are counting occurences of         a single character   Added error handling            Revision 1 1  1996 01 31 18:47:37  mcraig         Initial revision      Copyright  C  1996 The Regents of the University of California  All    Rights Reserved   Written by Matthew W  Craig     See the file COPYRIGHT for restrictions on distrubting this code     This code comes with absolutely NO warranty  see DISCLAIMER for details       version    Id: strcnt pro 163 2006 08 29 12:59:46Z navarro     FUNCTION strcnt  strn  substrn  startpos                     HELP Help     compile_opt idl2  strictarrsubs      Return to caller if error      On_error  2    Help user  if needed      IF  n_params  LT 2  OR keyword_set Help  THEN BEGIN         offset                 print  offset Count number of occurrences of a substring in a string          print  offset num   strcnt strn  substring   pos          print  offset Inputs:          print offset offset string      The string in which to count occurences      in          print offset offset substring   The substring to count occurrences of        in          print offset offset pos         the position at which to begin the search     in          print offset offset              If not supplied  start at beginning of          print offset offset              string          print  offset Keywords:          print offset offset HELP       Print useful message and return          print  offset Outputs:          print offset offset num         Number of occurances of substring in string  out          return   1     ENDIF       IF n_params  EQ 2 THEN startpos   0     return if we weren t really given a substring to search for          IF strlen substrn  EQ 0 THEN BEGIN          print   Error: Can t count occurances of null string          return   1     ENDIF          or if we were told to start at the end of the string      tmpstrn   strmid strn  startpos  strlen strn      IF strlen tmpstrn  EQ 0 THEN return  0    If looking for occurences of single character  process using BYTE   array      IF strlen substrn  EQ 1 THEN BEGIN         tmpstrn   byte TmpStrn          count   n_elements where TmpStrn EQ  byte substrn 0       ENDIF ELSE BEGIN          count   0L         pos   rstrpos tmpstrn  substrn          WHILE pos GE 0 DO BEGIN             count   count   1             pos   rstrpos tmpstrn  substrn  pos          ENDWHILE     ENDELSE       return  count END         "); 
    178 a[176] = new Array("./Textoidl/strtrans.html", "strtrans.pro", "", "      NAME:         STRTRANS   PURPOSE:         Translate all occurences of one substring to another    CATEGORY:         text strings   CALLING SEQUENCE:         new   strtrans oldstr from to ned    INPUTS:         oldstr   string on which to operate               in                   May be an array          from     substrings to be translated  May be      in                   an array          to       what strings in from should be           in                   translated to  May be an array    KEYWORD PARAMETERS:          HELP    Set this to print useful message and                    exit    OUTPUTS:         new      Translated string  Array if oldstr is    out                             an array          ned      number of substitutions performed in     out                   oldstr   Array if oldstr is an array    COMMON BLOCKS:   SIDE EFFECTS:   NOTES:           Any of old  from  and to can be arrays              from and to must have the same number of elements    EXAMPLE:         inp Many bad chars in_here          from _          to                    out   strtrans inp from to ned          Will produce out Many bad chars in here  and set ned to 4    MODIFICATION HISTORY:          Id: strtrans pro 134 2006 07 07 10:19:08Z navarro            Log: strtrans pro v           Revision 1 7  2004 06 15 17:25:54  mcraig         Fixed bug in regular expression  changed array notation to square brackets           Revision 1 6  2004 01 11 01:49:00  mcraig         Changed format of one array to newer   style to avoidf conflict with function name in astro library            Revision 1 5  2001 11 23 21:14:35  mcraig         Added keywords  EXTRACT   PRESERVE_NULL   REGEX to call to         strsplit  This comes very close to reproducing the behavior of the         obsolete routine str_sep            Revision 1 4  2001 11 21 19:13:23  mcraig         Changed str_sep to strsplit  The former is now considered obsolete by RSI            Revision 1 3  1996 06 14 20:00:27  mcraig         Updated Copyright info            Revision 1 2  1996 05 09 00:22:17  mcraig         Sped up significantly by using str_sep to handle the translation   No longer         relies on routines fromother user libraries            Revision 1 1  1996 01 31 18:47:37  mcraig         Initial revision     RELEASE:          Name: Rel_2_1_2       COPYRIGHT:    Copyright  C  1996 The Regents of the University of California  All    Rights Reserved   Written by Matthew W  Craig     See the file COPYRIGHT for restrictions on distrubting this code     This code comes with absolutely NO warranty  see DISCLAIMER for details      FUNCTION strtrans  InputString  from  to  ned                        HELP Help     compile_opt idl2  strictarrsubs      Bomb out to caller if error      On_error  2    Offer help if we don t have at least InputString  from  and to  or   if the user asks for it      IF  n_params  LT 3  OR keyword_set help  THEN BEGIN         offset                 print  offset Translate all occurences of one substring to another          print  offset new   strtrans oldstr from to ned          print  offset Inputs:          print  offset offset oldstr   string on which to operate               in          print  offset offset           May be an array          print  offset offset from     substrings to be translated  May be      in          print  offset offset           an array          print  offset offset to       what strings in from should be           in          print  offset offset           translated to  May be an array          print  offset Outputs:          print  offset offset new      Translated string  Array if oldstr is    out          print  offset offset           an array          print  offset offset ned      number of substitutions performed in     out          print  offset offset           oldstr   Array if oldstr is an array          print  offset Notes:          print  offset offset  Any of old  from  and to can be arrays             print  offset offset  from and to must have the same number of elements          return   1     ENDIF           strn   InputString     Check that From To have same number of elements   RETURN if they don t      NFrom   n_elements from      NTo   n_elements to      IF  NFrom EQ 0  OR  NTo EQ 0  THEN return  strn     IF NFrom NE NTo THEN BEGIN         print Error: Number of elements in from to unequal          return 1     ENDIF     Make sure there are no null strings in From   RETURN if there are         FromLen   strlen From      IF  total FromLen EQ 0  GT 0  THEN BEGIN         print   Error: elements of From must have nonzero length          return   1     ENDIF       NStrings   n_elements strn      ned   lonarr NStrings      tmpned   0L    Say strn a b c  from  and to   Then the approach here is to   first split strn at all occurances of   then recombine the pieces   with   inserted instead   Do this for all elements of strn  and   all elements of from      FOR i   0L  NStrings 1 DO BEGIN         ned i    0L         FOR j 0L  NFrom 1 DO BEGIN             SepStr   strsplit strn i  from j                                   EXTRACT   REGEX   PRESERVE_NULL              NSubs   n_elements SepStr    1             strn i    SepStr 0              FOR k 1L  NSubs DO strn i    strn i    To j    SepStr k              ned i     ned i    NSubs         ENDFOR      ENDFOR      return  strn END "); 
    179 a[177] = new Array("./Textoidl/sub_sup_idl.html", "sub_sup_idl.pro", "", "      NAME:         SUB_SUP_IDL   PURPOSE:         Return the proper IDL font positioning command for TeX         sub superscripts     CATEGORY:   CALLING SEQUENCE:         fnt   sub_sup_idl  strn     INPUTS:         strn   Either   or  _  the TeX super subscript       in                 characters   KEYWORD PARAMETERS:          FORCE_UD   Set this to use  U D instead of  E I for                      sub superscripts     OUTPUTS:         fnt   Either  U  or  E  for superscripts               out                or  D  or  I  for subscripts    COMMON BLOCKS:   SIDE EFFECTS:   NOTES:   EXAMPLE:   LIBRARY FUNCTIONS CALLED:             MODIFICATION HISTORY:          Id: sub_sup_idl pro 134 2006 07 07 10:19:08Z navarro            Log: sub_sup_idl pro v           Revision 1 1  1996 01 31 18:47:37  mcraig         Initial revision     RELEASE:          Name: Rel_2_1_2     FUNCTION Sub_sup_idl  token   FORCE_UD   force_ud     compile_opt idl2  strictarrsubs    IF keyword_set force_ud  THEN BEGIN      IF  token EQ   THEN return   U       IF  token EQ  _  THEN return   D      return    ENDIF ELSE BEGIN     IF  token EQ   THEN return   E       IF  token EQ  _  THEN return   I      return    ENDELSE  END  "); 
    180 a[178] = new Array("./Textoidl/textable.html", "textable.pro", "", "     file_comments   Returns a translation table from TeX to IDL       categories   Text  String      keyword POSTSCRIPT   If set  return postscript translation   table rather than vector fonts table    Default is translations for vector fonts       keyword HELP   Print help and exit       keyword VECTOR        returns   a 2D text array   table 0  contains the words to be translated away  table 1    contains the words to translate them to       restrictions   To find out what TeX sequences are available  look at table 0       history          Log: textable pro v           Revision 1 8  2004 06 15 17:25:54  mcraig         Fixed bug in regular expression  changed array notation to square brackets           Revision 1 7  1996 07 22 23:56:08  mcraig         Added  vartheta            Revision 1 6  1996 07 12 21:31:42  mcraig         Fixed  varphi in vector font  added  circ            Revision 1 5  1996 06 14 20:00:27  mcraig         Updated Copyright info            Revision 1 4  1996 05 09 00:22:17  mcraig         Added command to return to previous font after switching to Greek or         symbol font            Revision 1 3  1996 02 08 19:49:35  mcraig         Removed control sequence  perp because the postscript code for it is             Revision 1 2  1996 02 08 18:53:38  mcraig         Added translations for PostScript fonts  and added several new TeX         control sequences            Revision 1 1  1996 01 31 18:47:37  mcraig         Initial revision      Copyright  C  1996 The Regents of the University of California  All    Rights Reserved   Written by Matthew W  Craig     See the file COPYRIGHT for restrictions on distrubting this code     This code comes with absolutely NO warranty  see DISCLAIMER for details       version    Id: textable pro 163 2006 08 29 12:59:46Z navarro     FUNCTION textable  POSTSCRIPT ps  VECTOR vec   HELP Help     compile_opt idl2  strictarrsubs      Return to caller if error      On_error  2    Print help if necessary      IF keyword_set Help   THEN BEGIN         offset                 print  offset Returns a translation table from TeX to IDL          print  offset table   textable          print  offset Keywords:          print  offset offset POSTSCRIPT   If set  return postscript translation          print  offset offset                table rather than vector fonts table          print  offset offset                Default is translations for vector          print  offset offset                fonts          print  offset offset HELP         Print help and exit          print  offset Outputs:          print  offset offset table   a 2D text array   table 0  contains          out          print  offset offset          the words to be translated away  table 1          print  offset offset          contains the words to translate them to          print  offset Notes:          print  offset offset To find out what TeX sequences are available  look at          print  offset offset table 0      ENDIF       VECFONT 1                     index of vector font in translation table     PSFONT 2  index of postscript font in trans table     IF keyword_set ps  THEN FontSelection PSFONT ELSE FontSelection VECFONT     Set IDL font sequence needed to switch to Greek letters      GreekFont   strarr 3      GreekFont VECFONT     7      GreekFont PSFONT     M      Set IDL font sequence needed to switch to special symbol font      SymbolFont   strarr 3      SymbolFont VECFONT     M      SymbolFont PSFONT     M      Set IDL font sequence needed to switch back to initial font      PreviousFont   strarr 3      PreviousFont VECFONT     X      PreviousFont PSFONT     X    lowercase Greek         Note there is some trickery involved in getting  varphi      to work in the vector fonts  because it is actually      a member of the symbol font set  not the Greek font      set   Go figure   Solution is just to make the vector      character a switch to symbol  the proper character from      that font  and a switch back out of symbol   Same comment holds      for  vartheta           TeX SEQUENCE       VECTOR       POSTSCRIPT     LowercaseGreek        alpha       a             a           beta        b             b           gamma       c             g           delta       d             d           epsilon     e             e           zeta        f             z           eta   g       h           theta   h       q           iota   i       i           kappa   j       k           lambda   k       l           mu   l       m           nu   m       n           xi   n    S  Rx         pi   p       p           rho   q       r           sigma   r       s           tau   s       t           upsilon   t       u           phi   u       f           chi   v       c           psi   w       y           omega   x       w           varpi   p       v           varepsilon   e             e           varphi                SymbolFont VECFONT P PreviousFont VECFONT                                                   j           vartheta                SymbolFont VECFONT t PreviousFont VECFONT                                                   J                                 Uppercase Greek             TeX SEQUENCE        VECTOR          POSTSCRIPT     UppercaseGreek        Gamma   C              G               Delta   D              D               Theta   H              Q               Lambda   K              L               Xi   N            S  RX             Pi   P              P               Sigma   R              S               Upsilon   T       string byte 161        Phi   U              F               Psi   W              Y               Omega   X              W                   Special symbols       NOTES   You must leave  infty before  in in the translatation             table to avoid having the  in part of  infty translated             away                            DO NOT blindly add the control sequence  perp   Its             PostScript code is   which leads to thing being             interpreted as superscripts which shouldn t be             TeX SEQUENCE        VECTOR          POSTSCRIPT     Symbols        aleph        string byte 192        ast                              cap   3      string byte 199        cdot        string byte 215        cup   1      string byte 200        exists   E                            infty        string byte 165        in   e      string byte 206        equiv   :      string byte 186        pm        string byte 177        div        string byte 184        subset   0      string byte 204        superset   2      string byte 201        leftarrow   4      string byte 172        downarrow   5      string byte 175        rightarrow   6      string byte 174        uparrow   7      string byte 173        neq        string byte 185        propto        string byte 181        sim   A      string byte 126        partial   D      string byte 182        nabla   G      string byte 209        angle   a      string byte 208        times   X      string byte 180        geq   b      string byte 179        leq   l      string byte 163               string byte 162        prime        string byte 162        circ        string byte 176                              LowercaseGreek 1            GreekFont FontSelection            LowercaseGreek FontSelection            PreviousFont FontSelection      UppercaseGreek 1            GreekFont FontSelection          UppercaseGreek FontSelection            PreviousFont FontSelection      Symbols 1            SymbolFont FontSelection            Symbols FontSelection            PreviousFont FontSelection       TranslationTable    LowercaseGreek UppercaseGreek Symbols      return TranslationTable 0:1   END  "); 
    181 a[179] = new Array("./Textoidl/textoidl.html", "textoidl.pro", "", "     file_comments   Convert a valid TeX string to a valid IDL string for plot labels       categories   Text  String      param INPUTSTRING  in required    TeX string to be converted   Will not be modified   old may be a string array       keyword FONT   Set to 0 to use hardware font   1 to use    vector   Note that the only hardware font    supported is PostScript       keyword TEX_SEQUENCES   return the available TeX sequences      keyword HELP   print out info on use of the function and exit       restrictions           Use the procedure SHOWTEX to get a list of the available TeX           control sequences              The only hardware font for which translation is available is           PostScript             The only device for which hardware font            translation is available is PostScript            The FONT keyword overrides the font selected            by  p font       examples         out   TeXtoIDL Gamma 2   5N_ ed          The string out may be used in XYOUTS or other IDL text         display routines   It will be an uppercase Gamma  with an         exponent of 2  then a plus sign  then an N with the subscript         ed       history          Log: textoidl pro v           Revision 1 7  2004 06 15 17:25:54  mcraig         Fixed bug in regular expression  changed array notation to square brackets           Revision 1 6  2004 01 11 01:49:00  mcraig         Changed format of one array to newer   style to avoidf conflict with function name in astro library            Revision 1 5  2001 11 23 21:10:55  mcraig         Added backslash   to tex sequences in translation table to protect them during regexp search in strsplit            Revision 1 4  1996 06 14 20:00:27  mcraig         Updated Copyright info            Revision 1 3  1996 05 09 00:22:17  mcraig         Added error handling  cleaned up documentation            Revision 1 2  1996 02 08 18:52:50  mcraig         Added ability to use hardware fonts for PostScript device            Revision 1 1  1996 01 31 18:47:37  mcraig         Initial revision      Copyright  C  1996 The Regents of the University of California  All    Rights Reserved   Written by Matthew W  Craig     See the file COPYRIGHT for restrictions on distrubting this code     This code comes with absolutely NO warranty  see DISCLAIMER for details       version    Id: textoidl pro 163 2006 08 29 12:59:46Z navarro       FUNCTION textoidl  InputString                       FONT fnt                       HELP hlp                       TEX_SEQUENCES tex_seq     compile_opt idl2  strictarrsubs       Return to caller if there is an error      On_error  2    We begin by deciding on the font   PostScript   0 means use vector      PostScript   0     IF n_elements fnt  EQ 0 THEN BEGIN       get font from  p font         IF  p font NE  1 THEN BEGIN          User wants hardware font              PostScript 1         ENDIF     ENDIF ELSE BEGIN                         get font from FONT keyword         IF fnt NE  1 THEN PostScript   1     ENDELSE     Bomb out if user wants non PostScript hardware font      IF  PostScript EQ 1  AND  d name NE  PS  THEN BEGIN                                                    Device isn t postscript                                                  and user wants hardware                                                 font   Not good          print Warning: No translation for device:  d name         return InputString                    ENDIF           IF keyword_set  tex_seq  THEN BEGIN         table textable          return table 0      ENDIF       IF keyword_set hlp  OR  n_params  EQ 0  THEN BEGIN         print      Convert a TeX string to an IDL string          print      new   TeXtoIDL old          print        old   TeX string to translate                  in          print        new   resulting IDL string                     out          print      Keywords:          print         FONT       set to  1 to translate for vector fonts           print                     DEFAULT     Set to 0 to translate for          print                    hardware font          print          TEX_SEQUENCES   return the available TeX sequences          print          HELP      print this message and exit          print      NOTES:            print           Use SHOWTEX to obtain a list of the available          print           TeX control sequences          print           old may be a string array   If so  new is too          print           The only device for which hardware font          print           translation is available is PostScript          print           The FONT keyword overrides the font selected          print           by  p font          return   1     ENDIF        PostScript has been set to 1 if PostScript fonts are desired      strn   InputString     table   textable POSTSCRIPT PostScript           Greek sub superscripts need to be protected by putting braces     around them if they are unbraced   This will have the result the     it will be difficult to use   as a sub superscript   Get over it       V2 11 Must include the   in from of translation table TeX     sequences to ensure that strsplit properly treats the   in the     TeX sequence  Since strsplit is doing a regexp replace  and   is     special in regexps  need to escape it      strn    strtrans strn   table 0     table 0        strn    strtrans strn   _ table 0     _ table 0        First we translate Greek letters and the like   This makes guessing    alignment of sub superscripts easier  as all special characters will then    be one character long       V2 11 Must include the   in from of translation table TeX     sequences to ensure that strsplit properly treats the   in the     TeX sequence  Since strsplit is doing a regexp replace  and   is     special in regexps  need to escape it      strn   strtrans strn   table 0    table 1          FOR i   0L  n_elements strn 1 DO BEGIN          strn i    translate_sub_super strn i    Take care of sub superscripts     ENDFOR       return strn END "); 
    182 a[180] = new Array("./Textoidl/translate_sub_super.html", "translate_sub_super.pro", "", "     file_comments   Return the proper IDL font positioning command for TeX   sub superscripts        categories   Text  String      param TOKEN   Either   or  _  the TeX super subscript characters      keyword FORCE_UD   Set this to use  U D instead of  E I for sub superscripts       returns   Either  U  or  E  for superscripts  or  D  or  I  for subscripts       uses        restrictions   Make sure sub_sup_idl stays before translate_sub_super   At least   for now  when IDL encounters a function and automatically compiles   it  it only compiles the functions in the file up to the named   function   So even if sub_sup_idl was declared with   FORWARD_FUNCTION in translate_sub_super  it would not properly   compile       The file translate_sub_super pro contains two functions    translate_sub_super  and sub_sup_idl   The former is the   generic routine for processing TeX sub superscripts  the   latter is used only by translate_sub_super and has no general   utility   Hence it lives here   You will see documentation for   translate_sub_super second if you use DOC_LIBRARY      Used only by translate_sub_super   Should be kept in same   file        examples        history          Log: translate_sub_super pro v           Revision 1 5  2000 06 14 19:09:22  mcraig         Changed name of strtok str_token to avoid conflict in IDL 5 3            Revision 1 4  1996 06 14 20:00:27  mcraig         Updated Copyright info            Revision 1 3  1996 05 09 00:22:17  mcraig         Changed some function calls to reflect changes in those functions  moved         some code out of the main loop that didn t need to be there  added         documentation            Revision 1 1  1996 01 31 18:47:37  mcraig         Initial revision      Copyright  C  1996 The Regents of the University of California  All    Rights Reserved   Written by Matthew W  Craig     See the file COPYRIGHT for restrictions on distrubting this code     This code comes with absolutely NO warranty  see DISCLAIMER for details       version    Id: translate_sub_super pro 163 2006 08 29 12:59:46Z navarro     FUNCTION sub_sup_idl  token   FORCE_UD   force_ud     compile_opt idl2  strictarrsubs      provide help if needed      IF  n_params  NE 1  OR keyword_set Help  THEN BEGIN         offset                 print  offset Return the proper IDL font positioning command for TeX          print  offset sub superscripts            print  offset fnt   sub_sup_idl  strn           print  offset Inputs:          print  offset offset strn        Either   or  _  the TeX super subscript       in          print  offset offset              characters          print  offset Keywords:          print  offset offset FORCE_UD   Set this to use  U D instead of  E I for          print  offset offset              sub superscripts           print  offset offset HELP       Set to print useful message and exit          print  offset Outputs:          print  offset offset fnt         Either  U  or  E  for superscripts              out          print  offset offset              or  D  or  I  for subscripts          return   1     ENDIF       IF keyword_set force_ud  THEN BEGIN          IF  token EQ   THEN return   U           IF  token EQ  _  THEN return   D          return        ENDIF ELSE BEGIN         IF  token EQ   THEN return   E           IF  token EQ  _  THEN return   I          return        ENDELSE      END        NAME:         TRANSLATE_SUB_SUPER   PURPOSE:         Translate TeX sub superscripts to IDL sub superscripts    CATEGORY:         text strings   CALLING SEQUENCE:         new   translate_sub_super  old     INPUTS:         old         string to be translated from TeX to IDL    in   KEYWORD PARAMETERS:          RECURSED   set if this function is being called                       recursively                             HELP       Set to print useful message and exit    OUTPUTS:         new         string old converted from TeX to IDL       out   COMMON BLOCKS:   SIDE EFFECTS:   NOTES:           For best results  when both a sub and superscript are used            place the shorter of the two first  e g   N a _ bbbb  is           better than  N_ bbbb a            Single character sub super scripts do not need to be           protected by braces            Sub superscripts may be nested  e g   N N_1 N    EXAMPLE:         out   translate_sub_super   N 2_ big            Then out N U2 N Dbig N  which looks like it should on the         display     LIBRARY FUNCTIONS CALLED:         str_token        Text string  mcraig          sub_sup_idl   contained in this file   MODIFICATION HISTORY:          Id: translate_sub_super pro 163 2006 08 29 12:59:46Z navarro            Log: translate_sub_super pro v           Revision 1 5  2000 06 14 19:09:22  mcraig         Changed name of strtok str_token to avoid conflict in IDL 5 3            Revision 1 4  1996 06 14 20:00:27  mcraig         Updated Copyright info            Revision 1 3  1996 05 09 00:22:17  mcraig         Changed some function calls to reflect changes in those functions  moved         some code out of the main loop that didn t need to be there  added         documentation            Revision 1 2  1996 02 08 18:54:20  mcraig         Changed default sub superscript size to be  D U rather than  I E to         improve readability of plat annotations            Revision 1 1  1996 01 31 18:47:37  mcraig         Initial revision     RELEASE:          Name: Rel_2_1_2       COPYRIGHT:    Copyright  C  1996 The Regents of the University of California  All    Rights Reserved   Written by Matthew W  Craig     See the file COPYRIGHT for restrictions on distrubting this code     This code comes with absolutely NO warranty  see DISCLAIMER for details    FUNCTION translate_sub_super  InputString                                  RECURSED recursed                                  HELP Help     compile_opt idl2  strictarrsubs      Return to caller if error      On_error  2    Offer help if needed and or desired     IF  n_params  NE 1  OR keyword_set help  THEN BEGIN         offset                 print  offset Translate TeX sub superscripts to IDL sub superscripts          print  offset new   translate_sub_super  old           print  offset Inputs:          print  offset offset old         string to be translated from TeX to IDL    in          print  offset Keywords:          print  offset offset RECURSED   set if this function is being called           print  offset offset              recursively                             print  offset offset HELP       Set to print useful message and exit          print  offset Outputs:          print  offset offset new         string old converted from TeX to IDL       out          print  offset Notes:          print  offset offset  For best results  when both a sub and superscript are used          print  offset offset   place the shorter of the two first  e g   N a _ bbbb  is          print  offset offset   better than  N_ bbbb a          print  offset offset  Single character sub super scripts do not need to be          print  offset offset   protected by braces          print  offset offset  Sub superscripts may be nested  e g   N N_1 N          return   1     ENDIF      To allow for nested scripts  use  E I instead of  U D for scripts    when called recursively      IF  NOT keyword_set recursed  THEN         ud   1       ELSE         ud   0     Return to the normal level after making sub superscript unless we    are recursed  which indicates we are processing a nested script      IF keyword_set recursed  THEN fontRestore     ELSE fontRestore    N      Initialize vars for processing scripts      SpcByte    byte   0      We need the BYTE value for a space below      strn   InputString     pos   0     StorePos         RecallPos         OldToken          LenLastScript   0    Grab next sub superscript   Token will be either   or  _    RETURN if no scripts      Token   nexttok strn    _  pos   pos      if pos EQ  1 then return  InputString  nothing to process       FntChange    sub_sup_idl Token     Our approach will be to grab the input string up to the next   or    _  then process the script we ve found      NewString str_token strn Token       WHILE  strlen strn  GT  0 DO  BEGIN    Grab first char of sub superscript          Script   strmid strn  0  1          EndOfScript   0          Position of end of this script          IF  Script EQ   THEN BEGIN     Scripts of more than 1 char              EndOfScript   matchdelim strn                    Script   translate_sub_super strmid strn  1  EndOfScript 1                                              recursed           ENDIF        Grab rest of string _after_ the end of the script                  strn   strmid strn  EndOfScript 1                          strlen strn EndOfScript 1         Find the next script and prepare for processing it          FntChange   sub_sup_idl Token  FORCE_UD   ud          OldToken   Token         Token   nexttok strn   _  POS   pos         If the input is  n 2_j  we want the  2  to be directly above       the  j  rather than having the  j  below and to the right of       the 2   In other words  we want the first below  not the second                 2               2               N               N                J                J       To accomplish this  we need to save the position at which we       begin writing the 2 with a  S  and restore that position with a        R after writing the 2   The first section in the IF block below       handles the  J  above  the thing after the first script   We       don t care if there is another script following   We also padd       the second script with spaces if it is shorter than the first to       make sure that whatever comes out after the scripts starts in       the proper place   The worry is that without the spaces  the       input  N looong _ s    1  will end up with the   starting right       the  s  ends          IF  StorePos EQ  S  THEN BEGIN             StorePos                 RecallPos           calculate the difference in length between this script and the        previous stacked one  removing font change commands  crudely by       guessing that the number of characters this takes is twice the       number of exclamation points   The    1 below is a kludge   I       don t know why  but I need one extra space              NumSpaces   LenLastScript    strlen script    2 strcnt Script              NumSpaces    NumSpaces   1    0             IF NumSpaces GT 0 THEN                 Script   Script   string  replicate SpcByte  NumSpaces            ENDIF ELSE BEGIN             IF  Token NE OldToken  AND  pos EQ 0  THEN BEGIN               The next script immediately folows this one   Arrange to               save the position of the current script so that both begin               with the same horizontal position                  StorePos    S                  RecallPos    R                  LenLastScript   strlen Script    2 strcnt Script              ENDIF         ENDELSE       Continue building the IDL string  adding on our just processed script          NewString   NewString   StorePos   FntChange   Script   RecallPos               FontRestore          IF   pos NE  1   THEN BEGIN       more left to process                  NewString   NewString                   str_token strn  Token             ENDIF ELSE BEGIN                  we are done             NewString   NewString   strn             strn             ENDELSE     ENDWHILE           return  NewString END    "); 
    183 a[181] = new Array("./ToBeReviewed/CALCULS/depth2floatlevel.html", "depth2floatlevel.pro", "", "           file_comments   Rather comparable to depth2level but here  the calculated level is in float     For example  the level 5 4 correspond to a depth equal    to gdep 5 4 gdep 6 gdep 5       categories    Without loop      param TAB  in required    2d depth array  or a structure respecting litchamp criterion       keyword NOMASK   To do not mask land points      returns   An 2d array of float containing levels s values       uses   common pro      restrictions   Accept values at  values f_nan and mask land points at valmask       examples      IDL  a jpk 1 1 jpi jpj findgen jpi jpj       IDL  plt  1e6 a floatlevel2depth depth2floatlevel a nocontour       champ nul a 1e 6 pres      history    Sebastien Masson  smasson lodyc jussieu fr                         15 06 2000       version    Id: depth2floatlevel pro 163 2006 08 29 12:59:46Z navarro             FUNCTION depth2floatlevel  tab  NOMASK   nomask     compile_opt idl2  strictarrsubs      tempsun   systime 1            for key_performance  common      depthin   litchamp tab       levelup   depth2level depthin   UPPER   nomask     depthup   level2depth levelup   nomask       levellow   depth2level depthin   lower   nomask     depthlow   level2depth levellow   nomask    calculate the distance depthlow depthup and management of the case    of this distance is null or eqal to  values f_nan    divi   depthlow depthup    nan   where finite divi  EQ 0     if nan 0  NE  1 then divi nan    0    nan   where divi EQ 0     if nan 0  NE  1 then divi nan     values f_nan   calculation of the result    res   levelup depthin depthup divi   We mask land point at valmask    if NOT keyword_set nomask  then begin       grille mask       if n_elements valmask  EQ 0 then valmask   1e20       terre   where temporary mask    0  EQ 0        if terre 0  NE  1 then res terre    valmask    endif      if keyword_set key_performance  THEN print   temps depth2floatlevel  systime 1 tempsun       return  res end"); 
    184 a[182] = new Array("./ToBeReviewed/CALCULS/depth2level.html", "depth2level.pro", "", "             file_comments    Allows to pass from a 2d depth array to a corresponding 2d level array       categories   Without loop      param TAB  type 2d array    2d depth array  or a structure respecting litchamp critrions       keyword UPPER    activated by default  We select the level just above the depth      keyword LOWER   We select the level just below the depth       keyword CLOSER    We select the depth s closer level       keyword NOMASK    To do not mask land points      returns    It is a 2d array containing level s values       uses   common pro      restrictions    For depths out of gdep s values  the value  values f_nan is sent back    if the depth is superior to this one of the bottom  we send back jpk 1 in    the upper case  and  values f_nan in the lower case       history   Sebastien Masson  smasson lodyc jussieu fr                          17 6 1999                         15 6 2000 accepte  values f_nan      version    Id: depth2level pro 163 2006 08 29 12:59:46Z navarro           FUNCTION depth2level  tab  LOWER   lower  UPPER   upper  CLOSER   closer                           NOMASK   nomask  _extra   ex     compile_opt idl2  strictarrsubs      tempsun   systime 1            for key_performance  common      upper   1    if keyword_set lower  THEN upper   0     Reading of the input field and recuperation of the used subdomain s size      in   litchamp tab     grille mask 1 1 gdep nx ny nz firstx firsty firstz lastx lasty lastz     Verification of the coherence between array s size and the defined by domdef domain      IF ny EQ 1 THEN in   reform in  nx  ny   over     taille   size in     if taille 0  NE 2 then return  report le champ en entree doit contenir un tableau 2d     case 1 of       taille 1  eq jpi and taille 2  eq jpj:in in firstx:lastx  firsty:lasty        taille 1  eq  nx and taille 2  eq  ny:       else:return  report Probleme d adequation entre les tailles du domaine et celle du champ     endcase         delete points at  values f_nan    notanumber   where finite in   nan  EQ 1     if notanumber 0  NE  1 then in notanumber    0     We transform the 2d deth value in a 2d array of levels corresponding to depthes     We go on array who have the size of 3d arrays    prof replicate 1 nx ny gdep firstz:lastz      in   in replicate 1  nz       mask01    prof  LT in     mask01   reform mask01  nx  ny  nz     levels   total mask01  3     notvalid   where levels EQ nz     if keyword_set upper  then begin       levels   levels 1       notvalid   where levels EQ  1     ENDIF ELSE notvalid   where levels EQ nz     IF notvalid 0  NE  1 THEN levels notvalid     values f_nan    If closer is activated    if keyword_set closer  then begin       test      litchamp tab level2depth levels                      level2depth   levels 1 jpk 1   litchamp tab          test   test    0 test    1        changer   where test GE 0        if changer 0  NE  1 then levels changer     levels changer 1     jpk 1     endif     We put back points at  values f_nan    if notanumber 0  NE  1 then levels notanumber     values f_nan   We mask land points at valmask    if NOT keyword_set nomask  then begin       if n_elements valmask  EQ 0 then valmask   1e20       terre   where mask    0  EQ 0        if terre 0  NE  1 then levels terre    valmask    endif          if keyword_set key_performance  THEN print   temps depth2level  systime 1 tempsun     return  levels end"); 
    185 a[183] = new Array("./ToBeReviewed/CALCULS/depth2mask.html", "depth2mask.pro", "", "             file_comments    Allows to pass from a 2d depth sill array to a 3d array of mask    with one of levels above the sill depth and 0s below       categories   Without loop      param TAB  type 3d array    2d sill depth array  or a structure respecting litchamp critrions       keyword _EXTRA   used to pass your keywords       returns   It is a 3d array containing the mas associated to the 2d sill depth array      uses   common pro      history   Sebastien Masson  smasson lodyc jussieu fr                          17 6 1999      version    Id: depth2mask pro 163 2006 08 29 12:59:46Z navarro             FUNCTION depth2mask  tab  _extra   ex       compile_opt idl2  strictarrsubs      tempsun   systime 1            For key_performance  common     We transform the 2d deth value in a 2d array of levels corresponding to depthes      niveaux   depth2level tab  _extra   ex     IF niveaux 0  EQ  1 THEN return    1     We transform the 2d array in a 3d array of mask      mask   level2mask niveaux       if keyword_set key_performance  NE 0 THEN print   temps depth2mask  systime 1 tempsun     return  mask end"); 
    186 a[184] = new Array("./ToBeReviewed/CALCULS/determ2.html", "determ2.pro", "", "      file_comments   computes the determinant of n 2 by 2 arrays   Z2DS is an 2 2 n array      categories    Without loop       param A  in required    n element array   Defined as z2ds 0  0      z1d00      param B  in required    n element array   Defined as z2ds 0  1      z1d01      param C  in required    n element array   Defined as z2ds 1  0      z1d10      param D  in required    n element array   Defined as z2ds 1  1      z1d11      returns    n elements array  the determinent of each 2 2 arrrays      examples   a findgen 2 2 5    print  determ2 a    FOR i 0 4 DO print  determ a i    IDL solution      history             S  Masson  smasson lodyc jussieu fr              July 11th  2002      version    Id: determ2 pro 157 2006 08 21 09:01:50Z navarro       FUNCTION determ2  a  b  c  d     compile_opt idl2  strictarrsubs     CASE n_params  OF     1:res   a 0  0   a 1  1   a 0  1   a 1  0        4:res   a d c b      ELSE:stop   ENDCASE    RETURN  res END"); 
    187 a[185] = new Array("./ToBeReviewed/CALCULS/determ3.html", "determ3.pro", "", "       file_comments   computes the determinant of n 3 by 3 arrays    Z2DS is an 3 3 n array      categories   Without loop      param IN00  in required    It is an n element array   defined by in00   z2ds 0  0         param IN01  in required    It is an n element array   defined by in01   z2ds 0  1         param IN02  in required    It is an n element array   defined by in02   z2ds 0  2         param IN10  in required    It is an n element array   defined by in10   z2ds 1  0           param IN11  in required    It is an n element array   defined by in11   z2ds 1  1           param IN12  in required    It is an n element array   defined by in12   z2ds 1  2           param IN20  in required    It is an n element array   defined by in20   z2ds 2  0           param IN21  in required    It is an n element array   defined by in21   z2ds 2  1           param IN22  in required    It is an n element array   defined by in22   z2ds 2  2         returns    n elements array  the determinant of each 3 3 arrays      examples   a findgen 3 3 5    print  determ3 a 2    FOR i 0 4 DO print  determ a i 2    IDL solution      history             S  Masson  smasson lodyc jussieu fr              July 11th  2002      version    Id: determ3 pro 163 2006 08 29 12:59:46Z navarro       FUNCTION determ3  in00  in01  in02  in10  in11  in12  in20  in21  in22     compile_opt idl2  strictarrsubs     IF n_params  EQ 1 THEN BEGIN     in00save   temporary in00      in00   in00save 0  0        in01   in00save 0  1        in02   in00save 0  2        in10   in00save 1  0        in11   in00save 1  1        in12   in00save 1  2        in20   in00save 2  0        in21   in00save 2  1        in22   in00save 2  2      ENDIF    a01    determ2 in10  in20                       in12  in22     a11   determ2 in00  in20                      in02  in22     a21    determ2 in00  in10                       in02  in12     res   in01 a01 in11 a11 in21 a21    IF n_params  EQ 1 THEN in00   temporary in00save     RETURN  res END"); 
    188 a[186] = new Array("./ToBeReviewed/CALCULS/floatlevel2depth.html", "floatlevel2depth.pro", "", "             file_comments    Rather comparable to level2depth  It is the invert function of depth2floatlevel      categories   Without loop      param TAB   2d array of sill levels  or a structure respecting litchamp criterions       keyword NOMASK   To do not mask land points      returns   2d array containing depthes      uses   common pro      examples      IDL  a gdept jpk 1 1 jpi jpj findgen jpi jpj       IDL  plt  1e6 a floatlevel2depth depth2floatlevel a nocontour       null field at 1e 6 pres      history   Sebastien Masson  smasson lodyc jussieu fr                         15 6 2000      version    Id: floatlevel2depth pro 163 2006 08 29 12:59:46Z navarro             FUNCTION floatlevel2depth  tab  NOMASK   nomask     compile_opt idl2  strictarrsubs      tempsun   systime 1            To key_performance  common      flevelin   litchamp tab    We delete points at  values f_nan    notanumber   where finite flevelin   nan  EQ 1     if notanumber 0  NE  1 then flevelin notanumber    0   We sill  delete land points at valmask for example     flevelin   0   flevelin    jpk 1    We caculate the depth     depthup   level2depth floor flevelin   nomask     depthlow  level2depth ceil flevelin   nomask     weight   flevelin floor flevelin     res   depthup weight depthlow depthup    We put back points at  values f_nan    if notanumber 0  NE  1 then res notanumber     values f_nan   We mask land points at valmask    if NOT keyword_set nomask  then begin       grille mask       if n_elements valmask  EQ 0 then valmask   1e20       terre   where temporary mask    0  EQ 0        if terre 0  NE  1 then res terre    valmask    endif      if keyword_set key_performance  THEN print   temps floatlevel2depth  systime 1 tempsun       return  res end"); 
    189 a[187] = new Array("./ToBeReviewed/CALCULS/fsfzpt.html", "fsfzpt.pro", "", "     file_comments        categories        param PFS        param PFP        returns        uses        restrictions        examples        history        version    Id: fsfzpt pro 163 2006 08 29 12:59:46Z navarro       Ice freezing point        fsfzpt: freezing point of seawater in degrees celsius         units : salinity        pfs        ipss 78                  pressure        pfp      decibars                 temperature     fszfpt   degrees celsius                 freezing pt  reference : unesco tech  papers in the marine science no 28 1978                 eigth report jpots                 annex 6 freezing point of seawater F J Millero pp 29 35  checkvalue: fsfzpt 2 588567 deg c for s 40 0 p 500 decibars      todo seb     FUNCTION fsfzpt  pfs  pfp     compile_opt idl2  strictarrsubs     RETURN     0 0575   1 710523e 3   sqrt pfs    2 154996e 4   pfs      pfs   7 53e 4   pfp END"); 
    190 a[188] = new Array("./ToBeReviewed/CALCULS/grossemoyenne.html", "grossemoyenne.pro", "", "             file_comments     averages a 3  or 4 d time series field over a selected   geographical area or along the time axis  For one ore more   selected axes  x  y  z  t       categories      param TAB  in required    3 or 4d field      param DIREC  in required     x   y   z   t   xy   xz   yz   xyz   xt   yt   zt     xyt   xzt   yzt  or  xyzt        keyword BOXZOOM      xmin xmax ymin ymax  zmin zmax  to more details  see domdef   boxzoom can have 5 forms:     vert2   vert1  vert2 lon1  lon2  lat1  lat2       lon1  lon2  lat1  lat2  vert2 lon1  lon2  lat1  lat2  vert1 vert2                    keyword NAN    not a number  we activate it if we want to average without considerate some masked values of TAB    If masked values of TAB are values consecrated by IDL values f_nan  wr just have to put NAN    If masked values of TAB are valued a  a must be different of 1  corresponding to nan      values f_nan and of 0  which desactivate nan  We have to put NAN a     Comment: In output  rsult points which are NAN will be valued a or  values f_nan                   keyword NODOMDEF   We activate it if we do not want to pass in domdef even if the keyword boxzoom    is present  like when grossemoyenne is called via checkfield       keyword INTEGRATION    To make an integral rather than an average      keyword SPATIALFIRST    when performing at the same time   spatial and temporal mean  grossemoyenne is assuming   that the mask is not changing with the time  In   consequence  grossemoyenne performs temporal mean   first and then call moyenne  Activate  SPATIALFIRST if   you want to perform the spatial mean before the   temporal mean  Note that if NAN is activated  then   SPATIALFIRST is activated automatically       keyword TEMPORALFIRST    to force to perform first temporal   mean even if nan is activated  see SPATIALFIRST   explanations          keyword WDEPTH    to specify that the field is at W depth instead of T    depth  automatically activated if vargrid eq  W        uses   result:un tableau    common   domdef      restrictions Put values corresponding to land at 1 e20      history    Jerome Vialard  jv lodyc jussieu fr   2 7 98                         Sebastien Masson  smasson lodyc jussieu fr    adaptation array containing a temporal dimension                          14 8 98                         15 1 98                         12 3 99 adaptation for NAN and utilization of TEMPORARY      version    Id: grossemoyenne pro 163 2006 08 29 12:59:46Z navarro      function grossemoyenne  tab  direc  BOXZOOM   boxzoom  INTEGRATION   integration                             NAN   nan  NODOMDEF   nodomdef  WDEPTH   wdepth                             SPATIALFIRST   spatialfirst  TEMPORALFIRST   temporalfirst                             _extra   ex       compile_opt idl2  strictarrsubs    cm_4mesh  cm_4data  cm_4cal   IF NOT keyword_set key_forgetold  THEN BEGIN  updatenew  updatekwd   ENDIF     tempsun   systime 1             For key_performance    I  preliminaries     dirt   0   dirx   0   diry   0   dirz   0   dim     aa      I 1  Directions s  we follow to integrate     if   strpos direc   t  ge 0   then dirt   1   if   strpos direc   x  ge 0   then dirx   1   if   strpos direc   y  ge 0   then diry   1   if   strpos direc   z  ge 0   then dirz   1   IF keyword_set NAN  AND  dirx EQ 1 OR diry EQ 1 OR dirz EQ 1        THEN spatialfirst   1   IF keyword_set temporalfirst  THEN spatialfirst   0     I 2  verification of the input array s size     taille   size tab    case 1 of     taille 0  eq 1 :return   report Le tableau n a qu une dimension  cas non traite      taille 0  eq 2 :return   report Le tableau n a qu deux dimension  cas non traite      taille 0  eq 3 :BEGIN        dim    3d        if dirx eq 0 and diry eq 0 and dirt eq 0 then return  tab     END     taille 0  eq 4 :BEGIN        dim    4d        if dirx eq 0 and diry eq 0 and dirz eq 0 and dirt eq 0 then return  tab     END     else : return  report Le tableau d entree doit etre a 3 ou 4 dimensions s il ne contient pas de dim temporelle utiliser moyenne    endcase       I 3  Obtainment of scale s factors and of the mask on the subdomain concernedby the average    Redefinition of the domain ajusted at boxzoom  at 6 elements    This will allowed us to calculate only in the domain concerned by the average    Domdef  followed by grid give us all arrays of the grid on the subdomain      if keyword_set boxzoom  then BEGIN      Case 1 Of       N_Elements Boxzoom  Eq 1: bte    lon1  lon2  lat1  lat2  0  boxzoom 0        N_Elements Boxzoom  Eq 2: bte    lon1  lon2  lat1  lat2  boxzoom 0  boxzoom 1        N_Elements Boxzoom  Eq 4: bte    Boxzoom  vert1  vert2        N_Elements Boxzoom  Eq 5: bte    Boxzoom 0:3  0  Boxzoom 4        N_Elements Boxzoom  Eq 6: bte   Boxzoom       Else: return  report Wrong Definition of Boxzoom      endcase     if NOT keyword_set nodomdef  then BEGIN        savedbox   1b       saveboxparam   boxparam4grmoyenne dat        domdef  bte  GRIDTYPE   vargrid  _extra   ex     ENDIF    ENDIF      attribution of the mask and of longitude and latitude arrays      grille  mask  glam  gphi  gdep  nx  ny  nz  firstx  firsty  firstz  lastx  lasty  lastz  e1  e2  e3  WDEPTH   wdepth     I 4  if dirt equal 1  we make the temporal average and we send it in moyenne     if dirt EQ 1 AND NOT keyword_set spatialfirst  then begin     if dim EQ 3d then BEGIN        case 1 of         taille 1  eq jpi and taille 2  eq jpj and taille 3  eq jpt:             res   tab firstx:firstx nx 1                         firsty:firsty ny 1            taille 1  EQ  nx and taille 2  eq  ny and taille 3  eq jpt:res   tab         else:BEGIN            if keyword_set savedbox  THEN restoreboxparam   boxparam4grmoyenne dat            return  report Probleme d adequation entre les tailles du domaine nx ny jpt  strtrim nx  1 strtrim ny  1 strtrim jpt  1  et du tableau  strtrim taille 1  1 strtrim taille 2  1 strtrim taille 3  1          END       ENDCASE       if keyword_set integration  then begin         res   total res  3  nan   nan        ENDIF ELSE BEGIN         if keyword_set nan  then BEGIN           divi   finite res            divi   total temporary divi  3            notanum   where divi EQ 0            res   total res  3  nan   keyword_set nan   1   divi            if notanum 0  NE  1 then res temporary notanum     values f_nan         ENDIF ELSE res   total res  3 1 taille 3         ENDELSE     ENDIF ELSE BEGIN       case 1 of         taille 1  eq jpi and taille 2  eq jpj and taille 3  eq jpk and taille 4  eq jpt:             res   tab firstx:lastx  firsty:lasty  firstz:lastz            taille 1  eq jpi and taille 2  eq jpj and taille 3  eq nz and taille 4  eq jpt:             res   tab firstx:lastx  firsty:lasty              taille 1  EQ  nx and taille 2  eq  ny and taille 3  eq nz and taille 4  eq jpt:res   tab         taille 1  EQ  nx and taille 2  eq  ny and taille 3  eq jpk and taille 4  eq jpt:             res   tab    firstz:lastz            else:BEGIN             if keyword_set savedbox  THEN restoreboxparam   boxparam4grmoyenne dat            return  report Probleme d adequation entre les tailles du domaine nx ny nz jpt                               strtrim nx  1 strtrim ny  1 strtrim nz  1                              strtrim jpt  1  et du tableau  strtrim taille 1  1                              strtrim taille 2  1 strtrim taille 3  1                              strtrim taille 4  1          END         endcase       if keyword_set integration  then begin         res   total res  4  nan   nan        ENDIF ELSE BEGIN         if keyword_set nan  then begin           divi   finite res            divi   total temporary divi  4            notanum   where divi EQ 0            res   total res  4   nan 1   divi            if notanum 0  NE  1 then res temporary notanum     values f_nan         ENDIF ELSE res   total res  4 1 taille 4        ENDELSE     ENDELSE     if keyword_set savedbox  THEN restoreboxparam   boxparam4grmoyenne dat          return   moyenne temporary res  direc  BOXZOOM   boxzoom  NAN   nan  INTEGRATION   integration  NODOMDEF   nodomdef  WDEPTH   wdepth  _extra   ex    ENDIF ELSE res   tab   IF jpt EQ 1 THEN BEGIN     if keyword_set savedbox  THEN restoreboxparam   boxparam4grmoyenne dat          return  moyenne reform res   over  direc  BOXZOOM   boxzoom  NAN   nan  INTEGRATION   integration  NODOMDEF   nodomdef  WDEPTH   wdepth  _extra   ex    END       II  Case 2d arrays series  tab3d        if  dim eq  3d  then begin       II 1  verification of the coherence of the array s size to average   Verification of the coherence between the array s size and the domain defined by domdef   The input array must have either the total domain s size  jpi jpj jpt  or this    one of the reduced domain  nx ny jpt        case 1 of       taille 1  eq jpi and taille 2  eq jpj and taille 3  eq jpt:           res   tab firstx:firstx nx 1                       firsty:firsty ny 1          taille 1  EQ  nx and taille 2  eq  ny and taille 3  eq jpt:res   tab       else:BEGIN          if keyword_set savedbox  THEN restoreboxparam   boxparam4grmoyenne dat          return  report Probleme d adequation entre les tailles du domaine nx ny jpt  strtrim nx  1 strtrim ny  1 strtrim jpt  1  et du tableau  strtrim taille 1  1 strtrim taille 2  1 strtrim taille 3  1        enD     endcase     if keyword_set nan  NE 0 then BEGIN        if nan NE 1 then BEGIN      If nan is not  values f_nan    we put it at  values f_nan         if abs nan  LT 1e6 then notanumber   where res EQ nan            ELSE notanumber   where abs res  GT abs nan 10          if notanumber 0  NE  1 then res temporary notanumber     values f_nan       ENDIF     ENDIF     Comment : WE HAVE TO BE CAREFUL ABOUT CASES WHERE THE DIMENSION TO AVERAGE   1     AND MAKE SURE THAT IT EXIST  THAT IS WHY WE USE reform nx ny  WHICH CAN    LOOK USELESS AT THE BEGINNING       if nx EQ 1 OR ny EQ 1 then BEGIN        res   reform res  nx  ny  jpt   over        e1    reform e1  nx  ny   over        e2    reform e2  nx  ny   over      endif     if nx EQ 1 OR ny EQ 1 OR nz EQ 1 THEN         mask    reform mask  nx  ny  nz   over      II 3  Different types of average       if keyword_set nan  NE 0 then msknan   finite res  ELSE msknan    1     mask   mask    0      case 1 of        dirx eq 1  and  diry eq 0  : begin         e   temporary e1 temporary mask          echelle    temporary e replicate 1  jpt          echelle   reform echelle  nx  ny  jpt   over          if keyword_set integration  then divi   1 ELSE BEGIN            IF msknan 0  NE  1 THEN divi   total echelle msknan  1              ELSE divi   total echelle  1          ENDELSE         res   total temporary res echelle  1  nan   nan divi   1          if msknan 0  NE  1 then BEGIN           echelle   temporary echelle  NE 0           testnan   temporary msknan echelle           testnan   total temporary testnan  1                 total temporary echelle  1  EQ 0          endif       end        dirx eq 0  and  diry eq 1  : begin         e   temporary e2 temporary mask          if nx EQ 1 OR ny EQ 1 then e   reform e  nx  ny   over          echelle    temporary e replicate 1  jpt          echelle   reform echelle  nx  ny  jpt   over          if keyword_set integration  then divi   1 ELSE BEGIN            IF msknan 0  NE  1 THEN divi   total echelle msknan  2              ELSE divi   total echelle  2          ENDELSE          res   total temporary res echelle  2  nan   nan divi   1          if msknan 0  NE  1 then begin           echelle   temporary echelle  NE 0           testnan   temporary msknan echelle           testnan   total temporary testnan  2                 total temporary echelle  2  EQ 0          endif       end        dirx eq 1  and  diry eq 1  : begin         echelle    temporary e1 temporary e2 temporary mask replicate 1  jpt          echelle   reform echelle  nx  ny  jpt   over          if keyword_set integration  then divi   1 ELSE BEGIN            IF msknan 0  NE  1 THEN divi   total total echelle msknan  1  1              ELSE divi   total total echelle  1  1          ENDELSE         res   total temporary total temporary res echelle  1  nan   nan  1  nan   nan divi   1          if msknan 0  NE  1 then begin           echelle   temporary echelle  NE 0           testnan   temporary msknan echelle           testnan   total total temporary testnan  1  1                 total total temporary echelle  1  1  EQ 0          endif       end     endcase   endif       III  Case 3d arrays series  tab4d      if  dim eq  4d  then begin     III 1  Verification of the coherence of the array to average size    Verification of the coherence between the array s size and the domain    defind by domdef    The input array must have either the total domain size  jpi jpj jpk jpt     or this one of the reduced domain  nx ny ny jpt        case 1 of       taille 1  eq jpi and taille 2  eq jpj and taille 3  eq jpk and taille 4  eq jpt:           res   tab firstx:lastx  firsty:lasty  firstz:lastz          taille 1  eq jpi and taille 2  eq jpj and taille 3  eq nz and taille 4  eq jpt:           res   tab firstx:lastx  firsty:lasty            taille 1  EQ  nx and taille 2  eq  ny and taille 3  eq nz and taille 4  eq jpt:res   tab       taille 1  EQ  nx and taille 2  eq  ny and taille 3  eq jpk and taille 4  eq jpt:           res   tab    firstz:lastz          else:BEGIN          if keyword_set savedbox  THEN restoreboxparam   boxparam4grmoyenne dat          return  report Probleme d adequation entre les tailles du domaine nx ny nz jpt                             strtrim nx  1 strtrim ny  1 strtrim nz  1                            strtrim jpt  1  et du tableau  strtrim taille 1  1                            strtrim taille 2  1 strtrim taille 3  1                            strtrim taille 4  1        END     endcase     if nx EQ 1 OR ny EQ 1 OR nz EQ 1 OR jpt EQ 1 then res   reform res  nx  ny  nz  jpt   over      if keyword_set nan  NE 0 then BEGIN        if nan NE 1 then BEGIN      if nan is not  values f_nan    we put it at  values f_nan         if abs nan  LT 1e6 then notanumber   where res EQ nan            ELSE notanumber   where abs res  GT abs nan 10          if notanumber 0  NE  1 then res temporary notanumber     values f_nan       ENDIF     ENDIF     Comment : WE HAVE TO BE CAREFUL ABOUT CASES WHERE THE DIMENSION TO AVERAGE   1     AND MAKE SURE THAT IT EXIST  THAT IS WHY WE USE reform nx ny  WHICH CAN    LOOK USELESS AT THE BEGINNING       if nx EQ 1 OR ny EQ 1 OR nz EQ 1 then BEGIN        res   reform res  nx  ny  nz  jpt   over        mask    reform mask  nx  ny  nz   over      ENDIF     IF keyword_set key_partialstep  THEN BEGIN   the top of the ocean floor is       IF vargrid EQ  T  OR vargrid EQ  W  THEN bottom   total mask  3          ELSE bottom   total tmask firstx:lastx  firsty:lasty  firstz:lastz  3     we suppress columns with only ocean or land        good   where bottom NE 0 AND bottom NE nz    the bottom of the ocean in 3D index is:       bottom   lindgen nx ny temporary bottom 1L nx ny       IF good 0  NE  1 THEN bottom   bottom good          ELSE bottom    1     ENDIF ELSE bottom    1     III 2  different average types       IF keyword_set nan  NE 0 THEN msknan   finite res  ELSE msknan    1     case 1 of        dirx eq 1  and  diry eq 0  and  dirz eq 0  : BEGIN         e13    temporary e1 replicate 1  nz          e13   reform e13  nx  ny  nz   over          echelle    temporary e13 temporary mask replicate 1  jpt          echelle   reform echelle  nx  ny  nz  jpt   over          IF keyword_set key_partialstep  AND bottom 0  NE  1             AND nx NE 1 THEN BEGIN           IF msknan 0  EQ  1 THEN BEGIN              msknan   replicate 1b  nx  ny  nz  jpt              nan   1           ENDIF           bottom   bottom replicate 1  jpt      4D bottom                replicate 1  n_elements bottom nx ny nz lindgen jpt            msknan bottom    0           res temporary bottom     values f_nan         ENDIF         if keyword_set integration  then divi   1 ELSE begin            IF msknan 0  NE  1 THEN divi   total echelle msknan  1              ELSE divi   total echelle  1          endelse         res   temporary res echelle         res   total temporary res  1  nan   nan divi   1          if msknan 0  NE  1 then begin           echelle   temporary echelle  NE 0           testnan   temporary msknan echelle           testnan   total temporary testnan  1                 total temporary echelle  1  EQ 0          endif       end        dirx eq 0  and  diry eq 1  and  dirz eq 0  : begin         e23   temporary e2 replicate 1  nz          e23   reform e23  nx  ny  nz   over          echelle    temporary e23 temporary mask replicate 1  jpt          echelle   reform echelle  nx  ny  nz  jpt   over          IF keyword_set key_partialstep  AND bottom 0  NE  1             AND ny NE 1 THEN BEGIN           IF msknan 0  EQ  1 THEN BEGIN              msknan   replicate 1b  nx  ny  nz              nan   1           endif           bottom   bottom replicate 1  jpt      4D bottom                replicate 1  n_elements bottom nx ny nz lindgen jpt            msknan bottom    0           res temporary bottom     values f_nan         ENDIF         if keyword_set integration  then divi   1 ELSE begin            IF msknan 0  NE  1 THEN divi   total echelle msknan  2              ELSE divi   total echelle  2          endelse         res   total temporary res echelle  2  nan   nan divi   1          if msknan 0  NE  1 then begin           echelle   temporary echelle  NE 0           testnan   temporary msknan echelle           testnan   total temporary testnan  2                 total temporary echelle  2  EQ 0          endif       end        dirx eq 0  and  diry eq 0  and  dirz eq 1  : begin         e33   replicate 1  1 nx ny e3         e33   reform e33  nx  ny  nz   over          IF keyword_set key_partialstep  AND bottom 0  NE  1 THEN BEGIN           IF keyword_set wdepth  THEN               e33 bottom     e3w_ps firstx:lastx  firsty:lasty temporary good              ELSE e33 bottom     e3t_ps firstx:lastx  firsty:lasty temporary good          ENDIF         echelle    temporary e33 temporary mask replicate 1  jpt          echelle   reform echelle  nx  ny  nz  jpt   over          if keyword_set integration  then divi   1 ELSE begin            IF msknan 0  NE  1 THEN divi   total echelle msknan  3              ELSE divi   total echelle  3          endelse         res   total temporary res echelle  3  nan   nan divi   1          if msknan 0  NE  1 then begin           echelle   temporary echelle  NE 0           testnan   temporary msknan echelle           testnan   total temporary testnan  3                 total temporary echelle  3  EQ 0          endif       end        dirx eq 1  and  diry eq 1  and  dirz eq 0  : begin         e13   e1 replicate 1  nz          e13   reform e13  nx  ny  nz   over          e23   e2 replicate 1  nz          e23   reform e23  nx  ny  nz   over          echelle    temporary e13 temporary e23 temporary mask replicate 1  jpt          echelle   reform echelle  nx  ny  nz  jpt   over          IF keyword_set key_partialstep  AND bottom 0  NE  1             AND nx ny NE 1 THEN BEGIN           IF msknan 0  EQ  1 THEN BEGIN              msknan   replicate 1b  nx  ny  nz              nan   1           endif           bottom   bottom replicate 1  jpt      4D bottom                replicate 1  n_elements bottom nx ny nz lindgen jpt            msknan bottom    0           res temporary bottom     values f_nan         ENDIF         if keyword_set integration  then divi   1 ELSE begin            IF msknan 0  NE  1 THEN divi   total total echelle msknan  1  1              ELSE divi   total total echelle  1  1          endelse         res   total total temporary res echelle  1  nan   nan  1  nan   nan divi   1          if msknan 0  NE  1 then begin           echelle   temporary echelle  NE 0           testnan   temporary msknan echelle           testnan   total total temporary testnan  1  1                 total total temporary echelle  1  1  EQ 0          endif       end        dirx eq 1  and  diry eq 0  and  dirz eq 1  : begin         e133   e1 e3         IF keyword_set key_partialstep  AND bottom 0  NE  1 THEN BEGIN           IF keyword_set wdepth  THEN               e133 bottom     e1 e3w_ps firstx:lastx  firsty:lasty temporary good              ELSE e133 bottom     e1 e3t_ps firstx:lastx  firsty:lasty temporary good          ENDIF         echelle    temporary e133 temporary mask replicate 1  jpt          echelle   reform echelle  nx  ny  nz  jpt   over          if keyword_set integration  then divi   1 ELSE begin            IF msknan 0  NE  1 THEN divi   total total echelle msknan  1  2              ELSE divi   total total echelle  1  2          endelse         res   total total temporary res echelle  1  nan   nan  2  nan   nan divi   1          if msknan 0  NE  1 then begin           echelle   temporary echelle  NE 0           testnan   temporary msknan echelle           testnan   total total temporary testnan  1  2                 total total temporary echelle  1  2  EQ 0          endif       end        dirx eq 0  and  diry eq 1  and  dirz eq 1  : begin         e233   e2 e3         IF keyword_set key_partialstep  AND bottom 0  NE  1 THEN BEGIN           IF keyword_set wdepth  THEN               e233 bottom     e2 e3w_ps firstx:lastx  firsty:lasty temporary good              ELSE e233 bottom     e2 e3t_ps firstx:lastx  firsty:lasty temporary good          ENDIF         echelle    temporary e233 temporary mask replicate 1  jpt          echelle   reform echelle  nx  ny  nz  jpt   over          if keyword_set integration  then divi   1 ELSE begin            IF msknan 0  NE  1 THEN divi   total total echelle msknan  2  2              ELSE divi   total total echelle  2  2          endelse         res   total total temporary res echelle  2  nan   nan  2  nan   nan divi   1          if msknan 0  NE  1 then begin           echelle   temporary echelle  NE 0           testnan   temporary msknan echelle           testnan   total total temporary testnan  2  2                 total total temporary echelle  2  2  EQ 0          endif       end        dirx eq 1  and  diry eq 1  and  dirz eq 1  : begin         e1233    e1 e2 e3         IF keyword_set key_partialstep  AND bottom 0  NE  1 THEN BEGIN           IF keyword_set wdepth  THEN               e1233 bottom     e1 e2 e3w_ps firstx:lastx  firsty:lasty temporary good              ELSE e1233 bottom     e1 e2 e3t_ps firstx:lastx  firsty:lasty temporary good          ENDIF         echelle    temporary e1233 temporary mask replicate 1  jpt          echelle   reform echelle  nx  ny  nz  jpt   over          if keyword_set integration  then divi   1 ELSE begin            IF msknan 0  NE  1 THEN divi   total total total echelle msknan  1  1  1              ELSE divi   total total total echelle  1  1  1          endelse         res   total total total temporary res echelle  1  nan   nan  1  nan   nan  1  nan   nan divi   1          if msknan 0  NE  1 then begin           echelle   temporary echelle  NE 0           testnan   temporary msknan echelle           testnan   total total total temporary testnan  1  1  1                 total total total temporary echelle  1  1  1  EQ 0          endif       end     endcase   endif     if dirt EQ 1 AND keyword_set spatialfirst  then BEGIN     IF  reverse size res   dimension 0  NE jpt THEN BEGIN       print   the last dimension of res is not equal to jpt:  strtrim jpt  2        if keyword_set savedbox  THEN restoreboxparam   boxparam4grmoyenne dat        return   1     ENDIF     tdim   size res   n_dimensions      if keyword_set integration  then res   total res  tdim  nan   nan        ELSE BEGIN        if keyword_set nan  then BEGIN          testnan   testnan  divi      ENDELSE    ENDIF      IV   finishing       IV 1  We mask land by a value equal to 1 e 20     valmask   1e 20   terre   where divi EQ 0    IF terre 0  NE  1 THEN BEGIN      res temporary terre    1e 20   ENDIF      IV 2  We replace  when nan equal 1   values f_nan by nan     if keyword_set nan  NE 0 then BEGIN      puttonan   where temporary testnan  EQ 0      if puttonan 0  NE  1 then res temporary puttonan     values f_nan     if nan NE 1 then BEGIN        notanumber   where finite res  eq 0        if notanumber 0  NE  1 then res temporary notanumber    nan     ENDIF   ENDIF     IV 3  We replace in the domain whch was defined at the entry of average     if keyword_set savedbox  THEN restoreboxparam   boxparam4grmoyenne dat      if keyword_set key_performance  THEN print   temps grossemoyenne  systime 1 tempsun    return  res     end"); 
    191 a[189] = new Array("./ToBeReviewed/CALCULS/hdyn.html", "hdyn.pro", "", "             file_comments   Calculate the height by rapport to a reference state for a depth reference     See keywords for different possibilities  By default  the state reference    is rho 1020 and the depth reference is gdepw ka  with ka the first W level    directly above 1000 m        categories   Calculation      param TABSN  in required    array representing the salinity      param TABTN  in required    array representing the temperature Has the same size than SN      keyword GILL We activate this key if we want to calculate the dynamic height    like in the GILL page 215  which means by rapport to a reference state which    vary in depth and which is determined by a reference temperature tref at 0 C    and a reference salinity sref at 35psu      keyword LEVEL   It is the same reference level to take  This level is defined like    that gdepw level  is the reference depth       keyword SREF    Give a value to this keyword to change the reference salinity used in the    calculation when GILL  is activated           keyword TREF   Give a value to this keyword to change the reference temperature used in the    calculation when GILL  is activated        keyword PROFREF   Give a depth to this keyword which will be considered as the reference depth     in this case  LEVEL has not any effect  the calculation will be effectuated    until this depth effecting an interpolation between the the last W level above    PROFREF and PROFREF       keyword SURFACE_LEVEL  default 0    It is the level where we wan to calculate the dynamic height       returns   An array of the same size of sn and tn representing the dynamic height calculated    from a reference depth nd by rapport to a reference state       uses    common pro      restrictions   Points for which we can not calculate the dynamic height  whose the batymetry    is less deep than the reference depth  are put at the value  values f_nan      restrictions   approximation: The pressure in decibars is equal to the depth in meters  the pressure increase of 1bar all 10m       history   Sebastien Masson  smasson lodyc jussieu fr       version    Id: hdyn pro 163 2006 08 29 12:59:46Z navarro             FUNCTION hdyn   tabsn  tabtn  TREF   tref   SREF   sref  PROFREF   profref  LEVEL   level  GILL   gill  SURFACE_LEVEL   surface_level     compile_opt idl2  strictarrsubs      tempsun   systime 1            for key_performance  common     if NOT keyword_set surface_level  then surface_level   0   useful if GILL is activated    if NOT keyword_set tref  then tref   0     if NOT keyword_set sref  then sref   35    If needed  we determinate the reference depth and the W level situated directly above     if keyword_set profref  then begin       rien   where gdepw LE profref  level        level   level 1       za   gdepw level     ENDIF ELSE BEGIN        if NOT keyword_set level  then BEGIN           rien   where gdepw LE 1000  level           level   level 1       ENDIF       profref   gdepw level        za   profref    ENDELSE     tailles   size tabsn     taillet   size tabtn     if total tailles 0:tailles 0  NE taillet 0:taillet 0  NE 0 then       return   report Les tableaux sn et tn doivent avoir la meme taille     if tailles 3  NE jpk then return  report La dim verticale des tableaux sn et tn doit etre egalre a jpk     nx   nxt    ny   nyt    case  size tabsn 0  OF       3:BEGIN           case 1 of             tailles 1  eq jpi and tailles 2  eq jpj: BEGIN                sn   tabsn firstxt:lastxt  firstyt:lastyt                   tn   tabtn firstxt:lastxt  firstyt:lastyt                end             tailles 1  eq  nx and tailles 2  eq  ny:BEGIN                 sn   tabsn                tn   tabtn             end             else:return  report Probleme d adequation entre les tailles du domaine et de la boite           ENDCASE          if keyword_set gill  then             rhonref   rhon replicate sref nx  ny  jpk replicate tref nx  ny  jpk   insitu             ELSE rhonref   1020           vol rhonref rhon sn tn   insitu rhonref          e33d   replicate 1  nx ny e3t          e33d   reform e33d  nx  ny  jpk   over           terre   where tmask firstxt:lastxt  firstyt:lastyt    EQ 0           if terre 0  NE  1 then vol terre     values f_nan          case level of             0:hdyn  100 profref gdepw 0 vol    0              1:hdyn  100 vol e33d    0 profref gdepw 1 vol    1              ELSE:hdyn  100 total   vol e33d    surface_level: level 1  3                  profref gdepw level vol    level           endcase       END       4:BEGIN           case 1 of             tailles 1  eq jpi and tailles 2  eq jpj AND tailles 4  EQ jpt: BEGIN                sn   tabsn firstxt:lastxt  firstyt:lastyt                     tn   tabtn firstxt:lastxt  firstyt:lastyt                  end             tailles 1  eq  nx and tailles 2  eq  ny AND tailles 4  EQ jpt:BEGIN                 sn   tabsn                tn   tabtn             end             else:return  report Probleme d adequation entre les tailles du domaine et de la boite           endcase          if keyword_set gill  then             rhonref   rhon replicate sref nx  ny  jpk  jpt replicate tref nx  ny  jpk  jpt   insitu             ELSE rhonref   1020           vol rhonref rhon sn tn   insitu rhonref          e33d   replicate 1  nx ny e3t          e33d   e33d replicate 1  jpt           e33d   reform e33d  nx  ny  jpk  jpt   over           mask   tmask firstxt:lastxt  firstyt:lastyt             mask   mask replicate 1  jpt           terre   where mask EQ 0           if terre 0  NE  1 then vol terre     values f_nan          case level of             0:hdyn  100 profref gdepw 0 vol    0                1:hdyn  100 vol e33d    0   profref gdepw 1 vol    1                ELSE:hdyn  100 total   vol e33d    surface_level: level 1    3                  profref gdepw level vol    level             endcase       END       ELSE: return   report cas non code     ENDCASE    varunit    cm     varname    Dynamic Height  href strtrim round profref  1 m     IF keyword_set key_performance  THEN print   temps hdyn  systime 1 tempsun      return  hdyn end"); 
    192 a[190] = new Array("./ToBeReviewed/CALCULS/level2depth.html", "level2depth.pro", "", "               file_comments   Allows to pass from a 2d level array to a 2d depth array corresponding o these levels      categories   Without loop      param TAB  in required type 2d array    2d level array of sill levels  or a structure respecting litchamp criterions       keyword NOMASK   To do not mask land points       returns    2d array containing depths      uses   common pro      history   Sebastien Masson  smasson lodyc jussieu fr                          17 6 1999                         14 6 2000 accepte  values f_nan      version    Id: level2depth pro 163 2006 08 29 12:59:46Z navarro             FUNCTION level2depth  tab  NOMASK   nomask     compile_opt idl2  strictarrsubs      tempsun   systime 1            To key_performance  common     Reading of the input field  and recovery of the used subdomain s size      niveaux   litchamp tab     grille mask   1   1 gdep nx ny nz firstx firsty firstz lastx lasty lastz     verification of the coherence between array s size and the domain definied by domdef      taille   size niveaux     if taille 0  NE 2 then return  report le champ en entree doit contenir un tableau 2d     case 1 of       taille 1  eq jpi and taille 2  eq jpj:niveaux niveaux firstx:lastx  firsty:lasty        taille 1  eq  nx and taille 2  eq  ny:       else:return  report Probleme d adequation entre les tailles du domaine et celle du champ     endcase       wherenan   where finite niveaux   nan  EQ 1     if wherenan 0  NE  1 then niveaux wherenan    0    niveaux   0   niveaux    jpk 1       gdep   replicate 1  nx ny gdep    niveaux   lindgen nx ny nx ny niveaux    gdep   reform gdep niveaux  nx  ny       if wherenan 0  NE  1 then gdep wherenan     values f_nan    if NOT keyword_set nomask  then begin       if n_elements valmask  EQ 0 then valmask   1e20       terre   where mask    0  EQ 0        if terre 0  NE  1 then gdep terre    valmask    endif      if keyword_set key_performance  THEN print   temps level2depth  systime 1 tempsun     return  gdep end"); 
    193 a[191] = new Array("./ToBeReviewed/CALCULS/level2index.html", "level2index.pro", "", "             file_comments    We want  from a 3d matrix  to extract a 2d  x y  array whose each element    has been extract from a level specified by the 2d level array  typically     we want to obtain the salinity along an isopycn we have repered by its level    level2index is a function who give  in function of level  a 2d indexes array    which will allow to extract the 2d array from the 3d array       categories   Without loop      param LEVEL  in required type 2d array    A 2d level array      returns   a 2d indexes array      history   Sebastien Masson  smasson lodyc jussieu fr                         24 11 1999      version    Id: level2index pro 163 2006 08 29 12:59:46Z navarro             FUNCTION level2index  level   An element of 3d array  whose the two first dimensions are nx and ny  whose    coordinates are i  j and k have for index in the same 3d array i   j nx   k nx ny    level given  for  each point of level  we know i  j et k    so we can calculate the index     compile_opt idl2  strictarrsubs      taille   size level     nx   taille 1     ny   taille 2    array k nx ny     tabknxny    nx ny long level         return  lindgen nx  ny tabknxny end"); 
    194 a[192] = new Array("./ToBeReviewed/CALCULS/level2mask.html", "level2mask.pro", "", "             file_comments   Allow to pass from a 2d sill level array to the 3d mask array with 1s in    levels above the sill level and 0s below  and on it       categories    Without loop      param TAB  in required type 2d array    2d level array of sill level  or a structure respecting litchamp criterions       returns   It is a 3d array containing the mask associated to the 2d sill level array      uses   common pro      history   Sebastien Masson  smasson lodyc jussieu fr                          17 6 1999   Setp 2004: boundary level have 0 values and not 1  as it was   explained before in the header  see:   print  array_equal niveau  total level2mask niveau 3         version    Id: level2mask pro 163 2006 08 29 12:59:46Z navarro             FUNCTION level2mask  tab       compile_opt idl2  strictarrsubs      tempsun   systime 1            To key_performance  common     Reading of the input field and recovery of the size of the used subdomain      niveaux   litchamp tab     grille maskterre   1   1   1 nx ny nz firstx firsty firstz lastx lasty lastz     verification of the coherence between the array s size and the defined by domdef domain      IF ny EQ 1 THEN niveaux   reform niveaux  nx  ny   over     taille   size niveaux     if taille 0  NE 2 then return  report le champ en entree doit contenir un tableau 2d     case 1 of       taille 1  eq jpi and taille 2  eq jpj:niveaux niveaux firstx:lastx  firsty:lasty        taille 1  eq  nx and taille 2  eq  ny:       else:return  report Probleme d adequation entre les tailles du domaine et celle du champ     endcase       We transform the 2d leval array in 3d mask array      mask   reform  niveaux 1 indgen nz 1  nx  ny  nz      mask   floor temporary mask    1    mask   temporary mask temporary maskterre           if keyword_set key_performance  THEN print   temps level2mask  systime 1 tempsun     return  mask end"); 
    195 a[193] = new Array("./ToBeReviewed/CALCULS/moyenne.html", "moyenne.pro", "", "             file_comments     averages a 2  or 3 d field over a selected             geographical area and along one ore more      selected axes  x  y or z       categories      param TAB  in required    2 or 3d field      param DIREC  in required     x   y   z   xy   xz   yz  or  xyz       keyword BOXZOOM      xmin xmax ymin ymax  zmin zmax  to more details  see domdef   boxzoom can have 5 forms:      vert2      vert1  vert2      lon1  lon2  lat1  lat2        lon1  lon2  lat1  lat2  vert2      lon1  lon2  lat1  lat2  vert1 vert2       keyword NAN    not a number  we activate it if we want to average without considerate some masked values of TAB    If masked values of TAB are values consecrated by IDL values f_nan  we just have to put NAN    If masked values of TAB are valued a  a must be different of 1  corresponding to nan      values f_nan and of 0  which desactivate nan  We have to put NAN a     Comment: In output  result points which are NAN will be valued a or  values f_nan                   keyword NODOMDEF   We activate it if we do not want to pass in domdef even if the keyword boxzoom    is present  like when grossemoyenne is called via checkfield       keyword INTEGRATION    To make an integral rather than an average       keyword WDEPTH    to specify that the field is at W depth instead of T    depth  automatically activated if vargrid eq  W                    returns   An array       uses   common   domdef      restrictions Put values corresponding to land at 1 e20      history    Jerome Vialard  jv lodyc jussieu fr   2 7 98                         Sebastien Masson  smasson lodyc jussieu fr                          14 8 98                         15 1 98                         11 3 99 adaptation for NAN                         28 7 99 Averages 1d arrays      version    Id: moyenne pro 163 2006 08 29 12:59:46Z navarro        function moyenne  tab  direc  BOXZOOM   boxzoom  INTEGRATION   integration                       NAN   nan  NODOMDEF   nodomdef  WDEPTH   wdepth                       _extra   ex       compile_opt idl2  strictarrsubs    cm_4mesh  cm_4data  cm_4cal   IF NOT keyword_set key_forgetold  THEN BEGIN  updatenew  updatekwd   ENDIF     tempsun   systime 1             To key_performance    I  preliminaries     dirt   0   dirx   0   diry   0   dirz   0     I 1  Directions s  we follow to integrate     if   strpos direc   t  ge 0   then dirt   1   if   strpos direc   x  ge 0   then dirx   1   if   strpos direc   y  ge 0   then diry   1   if   strpos direc   z  ge 0   then dirz   1   if  dirx eq 0 and diry eq 0 and dirz eq 0  then return  tab     I 2  verification of the input array s size     taille   size tab    case 1 of     taille 0  eq 1 :dim    1d      taille 0  eq 2 :BEGIN       dim    2d        if dirx eq 0 and diry eq 0 then return  tab     END     taille 0  eq 3 :BEGIN       dim    3d        if dirx eq 0 and diry eq 0 and dirz eq 0 then return  tab     END     else : return  report Le tableau d entree doit etre a 2 ou 3 dimensions s il contient une dim temporelle utiliser grossemoyenne    endcase       I 3  Obtainment of scale s factors and of the mask on the subdomain concernedby the average    Redefinition of the domain ajusted at boxzoom  at 6 elements    This will allowed us to calculate only in the domain concerned by the average    Domdef  followed by grid give us all arrays of the grid on the subdomain      if keyword_set boxzoom  then BEGIN      Case 1 Of       N_Elements Boxzoom  Eq 1:bte    lon1  lon2  lat1  lat2  0  boxzoom 0        N_Elements Boxzoom  Eq 2:bte    lon1  lon2  lat1  lat2  boxzoom 0  boxzoom 1        N_Elements Boxzoom  Eq 4:bte    Boxzoom  vert1  vert2        N_Elements Boxzoom  Eq 5:bte    Boxzoom 0:3  0  Boxzoom 4        N_Elements Boxzoom  Eq 6:bte   Boxzoom       Else: return  report Mauvaise Definition de Boxzoom      endcase     if NOT keyword_set nodomdef  then BEGIN        savedbox   1b       saveboxparam   boxparam4moyenne dat        domdef  bte  GRIDTYPE   vargrid  _extra   ex     ENDIF    ENDIF      attribution of the mask and of longitude and latitude arrays      IF vargrid EQ  W  THEN wdepth   1   grille  mask  glam  gphi  gdep  nx  ny  nz  firstx  firsty  firstz  lastx  lasty  lastz  e1  e2  e3  WDEPTH   wdepth       II  Case of the 1d array       if dim EQ  1d  then BEGIN     if n_elements tab  NE nx ny AND n_elements tab  NE nx ny nz then BEGIN       if keyword_set savedbox  THEN restoreboxparam   boxparam4moyenne dat        return  report Probleme d adequation entre les tailles du domaine et de la boxzoom      ENDIF     case 1 of       nx EQ 1 AND ny EQ 1:BEGIN  vector following z         case n_elements tab  of           jpk:res   tab firstz:lastz            nz:res   tab           ELSE:BEGIN              if keyword_set savedbox  THEN restoreboxparam   boxparam4moyenne dat              return  report Probleme d adequation entre les tailles du domaine et de la boxzoom            END         ENDCASE         if dirz EQ 1 then BEGIN            dim    3d             taille   size reform res  nx  ny  nz          ENDIF ELSE BEGIN           if keyword_set savedbox  THEN restoreboxparam   boxparam4moyenne dat            return  res         ENDELSE        END       ny EQ 1:BEGIN              vector following x         case n_elements tab  of           jpi:res   tab firstx:lastx            nx:res   tab           ELSE:BEGIN              if keyword_set savedbox  THEN restoreboxparam   boxparam4moyenne dat              return  report Probleme d adequation entre les tailles du domaine et de la boxzoom            END         ENDCASE         if dirx EQ 1 then BEGIN            dim    2d             taille   size reform res  nx  ny          ENDIF ELSE BEGIN            if keyword_set savedbox  THEN restoreboxparam   boxparam4moyenne dat            return  res         ENDELSE       END       nx EQ 1:BEGIN              vector following y         case n_elements tab  of           jpj:res   tab firsty:lasty            ny:res   tab           ELSE:BEGIN              if keyword_set savedbox  THEN restoreboxparam   boxparam4moyenne dat              return  report Probleme d adequation entre les tailles du domaine et de la boxzoom            END         ENDCASE         if diry EQ 1 then BEGIN           dim    2d            taille   size reform res  nx  ny          ENDIF ELSE BEGIN            if keyword_set savedbox  THEN restoreboxparam   boxparam4moyenne dat            return  res         ENDELSE        END     endcase   endif       II  Case of the 2d array       if  dim eq  2d  then begin       II 1  verification of the coherence of the array s size to average   Verification of the coherence between the array s size and the domain defined by domdef   The input array must have either the total domain s size  jpi jpj  or this    one of the reduced domain  nx ny        case 1 of       taille 1  eq jpi and taille 2  eq jpj:           res   tab firstx:lastx  firsty:lasty        taille 1  eq  nx and taille 2  eq  ny:res   tab       else:BEGIN          if keyword_set savedbox  THEN restoreboxparam   boxparam4moyenne dat          return  report Probleme d adequation entre les tailles du domaine nx ny  strtrim nx  1 strtrim ny  1  et du tableau  strtrim taille 1  1 strtrim taille 2  1        END     ENDCASE     if keyword_set nan  NE 0 then BEGIN        if nan NE 1 then BEGIN      If nan is not  values f_nan    we put it at  values f_nan         if abs nan  LT 1e6 then notanumber   where res EQ nan            ELSE notanumber   where abs res  GT abs nan 10          if notanumber 0  NE  1 then res temporary notanumber     values f_nan       ENDIF     ENDIF     Comment : WE HAVE TO BE CAREFUL ABOUT CASES WHERE THE DIMENSION TO AVERAGE   1     AND MAKE SURE THAT IT EXIST  THAT IS WHY WE USE reform nx ny  WHICH CAN    LOOK USELESS AT THE BEGINNING       if nx EQ 1 OR ny EQ 1 then BEGIN        res   reform res  nx  ny   over        e1    reform e1  nx  ny   over        e2    reform e2  nx  ny   over      endif     if nx EQ 1 OR ny EQ 1 OR nz EQ 1 THEN         mask    reform mask  nx  ny  nz   over      II 3  Different types of average       mask   mask    0      if keyword_set nan  NE 0 then msknan   finite res  ELSE msknan    1     case 1 of        dirx eq 1  and  diry eq 0  : begin         e   e1 mask         if keyword_set integration  then divi   1           else begin            divi   e           IF msknan 0  NE  1 THEN divi   temporary divi msknan           if ny EQ 1 then divi   reform divi  nx  ny   over            divi   total divi  1          endelse         res   res e         if ny EQ 1 then res   reform res  nx  ny   over          res   total res  1  nan   nan divi   1          if msknan 0  NE  1 then begin           testnan    msknan mask           if ny EQ 1 then testnan   reform testnan  nx  ny   over            testnan   total testnan  1 total mask  1  EQ 0          endif       end        dirx eq 0  and  diry eq 1  : begin         e   e2 mask         if keyword_set integration  then divi   1           else begin            divi   e           IF msknan 0  NE  1 THEN divi   temporary divi msknan           if ny EQ 1 then divi   reform divi  nx  ny   over            divi   total divi  2          endelse         res   res e         if ny EQ 1 then res   reform res  nx  ny   over          res   total res  2  nan   nan divi   1          if msknan 0  NE  1 then begin           testnan    msknan mask           if ny EQ 1 then testnan    reform testnan  nx  ny   over            testnan   total testnan  2 total mask  2  EQ 0          endif       end        dirx eq 1  and  diry eq 1  : begin         if keyword_set integration  then divi   1 else BEGIN            IF msknan 0  NE  1 THEN divi   total e1 e2 mask msknan              ELSE divi   total e1 e2 mask          ENDELSE          res   total res e1 e2 mask  nan   nan divi   1          if msknan 0  NE  1 then begin           testnan    msknan mask           testnan   total testnan total mask  EQ 0          endif       end     endcase   endif       III  Case 3d arrays series  tab4d        if  dim eq  3d  then begin     III 1  Verification of the coherence of the array to average size    Verification of the coherence between the array s size and the domain    defind by domdef    The input array must have either the total domain size  jpi jpj jpk     or this one of the reduced domain  nx ny ny        case 1 of       taille 1  eq jpi and taille 2  eq jpj and taille 3  eq jpk:           res   tab firstx:lastx  firsty:lasty  firstz:lastz        taille 1  eq jpi and taille 2  eq jpj and taille 3  eq nz:           res   tab firstx:lastx  firsty:lasty          taille 1  EQ  nx and taille 2  eq  ny and taille 3  eq nz :res   tab       taille 1  EQ  nx and taille 2  eq  ny and taille 3  eq jpk :           res   tab    firstz:lastz        else:BEGIN          if keyword_set savedbox  THEN restoreboxparam   boxparam4moyenne dat          return  report Probleme d adequation entre les tailles du domaine nx ny nz  strtrim nx  1 strtrim ny  1 strtrim nz  1  et du tableau  strtrim taille 1  1 strtrim taille 2  1 strtrim taille 3  1        END     endcase     if keyword_set nan  NE 0 then BEGIN        if nan NE 1 then BEGIN      if nan is not  values f_nan    we put it at  values f_nan         if abs nan  LT 1e6 then notanumber   where res EQ nan            ELSE notanumber   where abs res  GT abs nan 10          if notanumber 0  NE  1 then res temporary notanumber     values f_nan       ENDIF     ENDIF     Comment : WE HAVE TO BE CAREFUL ABOUT CASES WHERE THE DIMENSION TO AVERAGE   1     AND MAKE SURE THAT IT EXIST  THAT IS WHY WE USE reform nx ny  WHICH CAN    LOOK USELESS AT THE BEGINNING       if nx EQ 1 OR ny EQ 1 OR nz EQ 1 then BEGIN        res   reform res  nx  ny  nz   over        e1    reform e1  nx  ny   over        e2    reform e2  nx  ny   over      endif     if nx EQ 1 OR ny EQ 1 OR nz EQ 1 THEN         mask    reform mask  nx  ny  nz   over      IF keyword_set key_partialstep  THEN BEGIN   the top of the ocean floor is       IF vargrid EQ  T  OR vargrid EQ  W  THEN bottom   total mask  3          ELSE bottom   total tmask firstx:lastx  firsty:lasty  firstz:lastz  3     we suppress columns with only ocean or land        good   where bottom NE 0 AND bottom NE nz    the bottom of the ocean in 3D index is:       bottom   lindgen nx ny temporary bottom 1L nx ny       IF good 0  NE  1 THEN bottom   bottom good          ELSE bottom    1     ENDIF ELSE bottom    1     III 2  different average types       if keyword_set nan  NE 0 then msknan   finite res  ELSE msknan    1     case 1 of        dirx eq 1  and  diry eq 0  and  dirz eq 0  : begin         e13   e1 replicate 1  nz          e13   reform e13  nx  ny  nz   over          IF keyword_set key_partialstep  AND bottom 0  NE  1             AND nx NE 1 THEN BEGIN           IF msknan 0  EQ  1 THEN BEGIN              msknan   replicate 1b  nx  ny  nz              nan   1           endif           msknan bottom    0           res bottom     values f_nan         ENDIF         if keyword_set integration  then divi   1 else begin           divi   e13 mask           IF msknan 0  NE  1 THEN divi   temporary divi msknan           if nz EQ 1 then divi   reform divi  nx  ny  nz   over            divi   total divi  1          ENDELSE         res   res e13 mask         if nz EQ 1 then res   reform res  nx  ny  nz   over          res   total res  1  nan   nan divi   1          e13   1         if msknan 0  NE  1 then begin           testnan    msknan mask           if nz EQ 1 then testnan    reform testnan  nx  ny  nz   over            testnan   total testnan  1 total mask  1  EQ 0          endif       end        dirx eq 0  and  diry eq 1  and  dirz eq 0  : begin         e23   e2 replicate 1  nz          e23   reform e23  nx  ny  nz   over          IF keyword_set key_partialstep  AND bottom 0  NE  1             AND ny NE 1 THEN BEGIN           IF msknan 0  EQ  1 THEN BEGIN              msknan   replicate 1b  nx  ny  nz              nan   1           endif           msknan bottom    0           res bottom     values f_nan         ENDIF         if keyword_set integration  then divi   1 else begin           divi   e23 mask           IF msknan 0  NE  1 THEN divi   temporary divi msknan           if nz EQ 1 then divi   reform divi  nx  ny  nz   over            divi   total divi  2          ENDELSE         res   res e23 mask         if nz EQ 1 then res   reform res  nx  ny  nz   over          res   total res  2  nan   nan divi   1          e23   1         if msknan 0  NE  1 then begin           testnan    msknan mask           if nz EQ 1 then testnan   reform testnan  nx  ny  nz   over            testnan   total testnan  2 total mask  2  EQ 0          endif       end        dirx eq 0  and  diry eq 0  and  dirz eq 1  : begin         e33   replicate 1  1 nx ny e3         e33   reform e33  nx  ny  nz   over          IF keyword_set key_partialstep  AND bottom 0  NE  1 THEN BEGIN           IF keyword_set wdepth  THEN               e33 bottom     e3w_ps firstx:lastx  firsty:lasty temporary good              ELSE e33 bottom     e3t_ps firstx:lastx  firsty:lasty temporary good          ENDIF         if keyword_set integration  then divi   1 else begin           divi   e33 mask           if msknan 0  NE  1 then divi   temporary divi msknan           if nz EQ 1 then divi   reform divi  nx  ny  nz   over            divi   total divi  3          ENDELSE         res   res e33 mask         if nz EQ 1 then res   reform res  nx  ny  nz   over          res   total res  3  nan   nan divi   1          e33   1         if msknan 0  NE  1 then begin           testnan    msknan mask           if nz EQ 1 then testnan    reform testnan  nx  ny  nz   over            testnan   total testnan  3 total mask  3  EQ 0          endif       end        dirx eq 1  and  diry eq 1  and  dirz eq 0  : begin         e123    e1 e2 replicate 1  nz          e123   reform e123  nx  ny  nz   over          IF keyword_set key_partialstep  AND bottom 0  NE  1             AND nx ny NE 1 THEN BEGIN           IF msknan 0  EQ  1 THEN BEGIN              msknan   replicate 1b  nx  ny  nz              nan   1           endif           msknan bottom    0           res bottom     values f_nan         ENDIF         if keyword_set integration  then divi   1 else BEGIN            divi   e123 mask           IF msknan 0  NE  1 THEN divi   temporary divi msknan           if nz EQ 1 then divi   reform divi  nx  ny  nz   over            divi   total total divi  1  1          ENDELSE         res   res e123 mask         if nz EQ 1 then res   reform res  nx  ny  nz   over          res   total total res  1  nan   nan  1  nan   nan     divi   1          e123   1         if msknan 0  NE  1 then begin           testnan    msknan mask           if nz EQ 1 then testnan    reform testnan  nx  ny  nz   over            testnan   total total testnan  1  1 total total mask  1  1  EQ 0          endif       end        dirx eq 1  and  diry eq 0  and  dirz eq 1  : begin         e133   e1 e3         e133   reform e133  nx  ny  nz   over          IF keyword_set key_partialstep  AND bottom 0  NE  1 THEN BEGIN           IF keyword_set wdepth  THEN               e133 bottom     e1 e3w_ps firstx:lastx  firsty:lasty temporary good              ELSE e133 bottom     e1 e3t_ps firstx:lastx  firsty:lasty temporary good          ENDIF         if keyword_set integration  then divi   1 else BEGIN            divi   e133 mask           if msknan 0  NE  1 then divi   temporary divi msknan           if nz EQ 1 then divi   reform divi  nx  ny  nz   over            divi   total total divi  1  2          ENDELSE         res   res e133 mask         if nz EQ 1 then res   reform res  nx  ny  nz   over          res   total total res  1  nan   nan  2  nan   nan     divi   1          e133   1         if msknan 0  NE  1 then begin           testnan    msknan mask           if nz EQ 1 then testnan    reform testnan  nx  ny  nz   over            testnan   total total testnan  1  2 total total mask  1  2  EQ 0          endif       end        dirx eq 0  and  diry eq 1  and  dirz eq 1  : begin         e233   e2 e3         e233   reform e233  nx  ny  nz   over          IF keyword_set key_partialstep  AND bottom 0  NE  1 THEN BEGIN           IF keyword_set wdepth  THEN               e233 bottom     e2 e3w_ps firstx:lastx  firsty:lasty temporary good              ELSE e233 bottom     e2 e3t_ps firstx:lastx  firsty:lasty temporary good          ENDIF         if keyword_set integration  then divi   1 else BEGIN            divi   e233 mask           if msknan 0  NE  1 then divi   temporary divi msknan           if nz EQ 1 then divi   reform divi  nx  ny  nz   over            divi   total total divi  2  2          ENDELSE         res   res e233 mask         if nz EQ 1 then res   reform res  nx  ny  nz   over          res   total total res  2  nan   nan  2  nan   nan     divi   1          e233   1         if msknan 0  NE  1 then begin           testnan    msknan mask           if nz EQ 1 then testnan    reform testnan  nx  ny  nz   over            testnan   total total testnan  2  2 total total mask  2  2  EQ 0          endif       end        dirx eq 1  and  diry eq 1  and  dirz eq 1  : begin         e1233    e1 e2 e3         e1233   reform e1233  nx  ny  nz   over          IF keyword_set key_partialstep  AND bottom 0  NE  1 THEN BEGIN           IF keyword_set wdepth  THEN               e1233 bottom     e1 e2 e3w_ps firstx:lastx  firsty:lasty temporary good              ELSE e1233 bottom     e1 e2 e3t_ps firstx:lastx  firsty:lasty temporary good          ENDIF         if keyword_set integration  then divi   1 else BEGIN            if msknan 0  NE  1 then divi   total e1233 mask msknan              ELSE divi   total e1233 mask          ENDELSE         res   total res e1233 mask  nan   nan     divi   1          e1233   1         if msknan 0  NE  1 then begin           testnan    msknan mask           testnan   total testnan total mask  EQ 0          endif       end     endcase   endif      IV   finishing       IV 1  We mask land by a value equal to 1 e 20     valmask   1e 20   terre   where divi EQ 0    IF terre 0  NE  1 THEN BEGIN     res terre    1e 20   ENDIF       IV 2  We replace  when nan equal 1   values f_nan by nan     if keyword_set nan  NE 0 then BEGIN      puttonan   where testnan EQ 0      if puttonan 0  NE  1 then res puttonan     values f_nan     if nan NE 1 then BEGIN        notanumber   where finite res  eq 0        if notanumber 0  NE  1 then res notanumber    nan     ENDIF   ENDIF     IV 3  We replace in the domain whch was defined at the entry of average     if keyword_set savedbox  THEN restoreboxparam   boxparam4moyenne dat      if keyword_set key_performance  THEN print   temps moyenne  systime 1 tempsun    return  res     end"); 
    196 a[194] = new Array("./ToBeReviewed/CALCULS/norme.html", "norme.pro", "", "             file_comments    calculate the norm of a field of vectors  then make a possible average      Comment 1: The field of vector can be  2d:xy  3d: xyz or xyt    4d: xyzt     Comment 2:   The calculation of the norm is made before the possible spatial or    temporal average because the average of the norm is not equal to the    norm of averages       categories   Calculation      param COMPOSANTEU  in required    an 2d  3d or 4d array      param COMPOSANTEV  in required    an 2d  3d or 4d array      keyword BOXZOOM   boxzoom on which do the average  by default the domain selected    by the last domdef done       keyword DIREC    t   x   y   z   xys   xz   yz   xyz   xt   yt   zt   xyt           xzt   yzt   xyzt  Direction on which do averages       returns   Array to trace with plt  pltz or pltt       uses   common pro      restrictions    The norm is calculated on points TTo do this calculation  we average    field U and Von points T before calculate the norme  At the edge of    coast and of domain  we can not calculate fields U and V at points T     that is why these points are at value  values f_nan        When we calculate on a reduce geographic domain  field U and V have not    necessarily the same number of point  In this case  we recut U and V to    keep only common points  We profit of this to redo a domdef which redefine    a geographic domain on which fields U and V are extracted on same points      restrictions   To know what type of array we work with  we  test its size and dates    gave by time 0  and time jpt 1  to know if thee is a temporal dimension     Before to start norme  make sure that time and jpt are defined how    they have to        examples   To calculate the average of the norme of streams on all the domain    between 0 et 50:        IDL  res norme un vn boxzoom 0 50 dir xyz       history   Sebastien Masson  smasson lodyc jussieu fr                          9 6 1999      version    Id: norme pro 163 2006 08 29 12:59:46Z navarro             FUNCTION norme  composanteu  composantev  BOXZOOM   boxzoom  DIREC   direc  _extra   ex       compile_opt idl2  strictarrsubs    cm_4mesh  cm_4data  cm_4cal   IF NOT keyword_set key_forgetold  THEN BEGIN  updatenew  updatekwd   ENDIF      tempsun   systime 1            To key_performance      IF finite glamu 0 finite gphiu 0 finite glamv 0 finite gphiv 0  EQ 0 THEN        return  report This version of norme is based on Arakawa C grid                            U and V grids must therefore be defined        if keyword_set boxzoom  then BEGIN      Case 1 Of       N_Elements Boxzoom  Eq 1:bte    lon1  lon2  lat1  lat2  0  boxzoom 0        N_Elements Boxzoom  Eq 2:bte    lon1  lon2  lat1  lat2  boxzoom 0  boxzoom 1        N_Elements Boxzoom  Eq 4:bte    Boxzoom  vert1  vert2        N_Elements Boxzoom  Eq 5:bte    Boxzoom 0:3  0  Boxzoom 4        N_Elements Boxzoom  Eq 6:bte   Boxzoom       Else: return  report Mauvaise Definition de Boxzoom      ENDCASE     domdef  boxzoom   ENDIF       if NOT keyword_set direc  then direc   0   construction of u and v at points T    u   litchamp composanteu     v   litchamp composantev     date1   time 0     if n_elements jpt  EQ 0 then date2   date1 ELSE date2   time jpt 1      if  size u 0  NE  size v 0  then return    1     vargrid T     varname    norme      valmask   1e20      grilleu   litchamp composanteu   grid     if grilleu EQ   then grilleu    U     grillev   litchamp composantev   grid     if grillev EQ   then grillev    V     IF grilleu EQ  V  AND grillev EQ  U  THEN inverse   1    IF grilleu EQ  T  AND grillev EQ  T  THEN BEGIN        interpolle    0        return  report cas non code mais facile a faire     ENDIF ELSE interpolle   1    if keyword_set inverse  then begin       rien   u       u   v       v   rien    endif       We find common points between u and v      indicexu    lindgen jpi firstxu:firstxu nxu 1     indicexv    lindgen jpi firstxv:firstxv nxv 1     indicex   inter indicexu  indicexv     indiceyu    lindgen jpj firstyu:firstyu nyu 1     indiceyv    lindgen jpj firstyv:firstyv nyv 1     indicey   inter indiceyu  indiceyv     nx   n_elements indicex      ny   n_elements indicey       case 1 of      xyz            size u 0  EQ 3 AND date1 EQ date2 :BEGIN             indice2d   lindgen jpi  jpj           indice2d   indice2d indicex 0 :indicex 0 nx 1 indicey 0 :indicey 0 ny 1           indice3d   lindgen jpi  jpj  jpk           indice3d   indice3d indicex 0 :indicex 0 nx 1 indicey 0 :indicey 0 ny 1 firstzt:lastzt      extraction of u and v on the appropriated domain            case 1 of              size u 1  EQ nxu AND  size u 2  EQ nyu AND                 size v 1  EQ nxv AND  size v 2  EQ nyv:BEGIN                 case  size u 3  OF                   nzt:BEGIN                       if nxu NE nx then                         if indicex 0  EQ firstxu then u   u 0:nx 1  ELSE u   u 1: nx                          IF nxv NE nx THEN                         if indicex 0  EQ firstxv then v   v 0:nx 1  ELSE v   v 1: nx                         IF nyu NE ny THEN                         if indicey 0  EQ firstyu then u   u 0:ny 1  ELSE u   u  1: ny                        IF nyv NE ny THEN                         if indicey 0  EQ firstyv then v   v 0:ny 1  ELSE v   v  1: ny                    end                   jpk:BEGIN                       if nxu NE nx then                         if indicex 0  EQ firstxu then u   u 0:nx 1   firstzt:lastzt  ELSE u   u 1: nx   firstzt:lastzt                        IF nxv NE nx THEN                         if indicex 0  EQ firstxv then v   v 0:nx 1   firstzt:lastzt  ELSE v   v 1: nx   firstzt:lastzt                       IF nyu NE ny THEN                         if indicey 0  EQ firstyu then u   u  0:ny 1 firstzt:lastzt  ELSE u   u  1: ny firstzt:lastzt                        IF nyv NE ny THEN                         if indicey 0  EQ firstyv then v   v  0:ny 1 firstzt:lastzt  ELSE v   v  1: ny firstzt:lastzt                    end                   ELSE: return  report problemes d adequation entre la taille du domaine et la taille des matrices necessaires a tracer des vecteurs                 endcase             END              size u 1  EQ jpi AND  size u 2  EQ jpj AND  size u 3  EQ jpk AND                 size v 1  EQ jpi AND  size v 2  EQ jpj AND  size u 3  EQ jpk :BEGIN                 u   u indice3d                 v   v indice3d              END             ELSE: return  report problemes d adequation entre la taille du domaine et la taille des matrices necessaires a tracer des vecteurs           endcase     We reshape u and v to make sure that no dimension has been erased            if nzt EQ 1 then begin             u   reform u  nx  ny  nzt   over              v   reform v  nx  ny  nzt   over           endif     construction of u and v at points T            a u 0           u u shift u 1 0 0 2           if NOT keyword_set key_periodic  OR nx NE jpi then u 0 a          a v 0           v v shift v 0 1 0 2           if NOT keyword_set key_periodic  OR nx NE jpi then v 0 a     attribution of the mask and of logitude and latitude arrays            mask   tmask indice3d           if nzt EQ 1 then mask   reform mask  nx  ny  nzt   over             if n_elements valmask  EQ 0 THEN valmask   1e20          landu   where u GE valmask 10           if landu 0  NE  1 then u landu    0          landv   where v GE valmask 10           if landv 0  NE  1 then v landv    0          res sqrt u 2 v 2           if NOT keyword_set key_periodic  OR nx NE jpi then res 0   values f_nan          res 0   values f_nan          mask   where mask eq 0           IF mask 0  NE  1 THEN res mask    valmask   All kind of average          domdef   glamt indice2d 0  0   glamu indice2d nx 1  0 gphit indice2d 0  0   gphiv indice2d 0  ny 1  vert1  vert2   meme          if keyword_set direc  then res   moyenne res direc nan  boxzoom   boxzoom   nodomdef          END      xyt           date1 NE date2 AND  size u 0  EQ 3 :BEGIN           indice2d   lindgen jpi  jpj           indice2d   indice2d indicex 0 :indicex 0 nx 1 indicey 0 :indicey 0 ny 1      extraction of u and v on the appropriated domain            case 1 of              size u 1  EQ nxu AND  size u 2  EQ nyu AND                 size v 1  EQ nxv AND  size v 2  EQ nyv:BEGIN                 if nxu NE nx then                   if indicex 0  EQ firstxu then u   u 0:nx 1      ELSE u   u 1: nx                      IF nxv NE nx THEN                   if indicex 0  EQ firstxv then v   v 0:nx 1      ELSE v   v 1: nx                     IF nyu NE ny THEN                   if indicey 0  EQ firstyu then u   u  0:ny 1    ELSE u   u  1: ny                    IF nyv NE ny THEN                   if indicey 0  EQ firstyv then v   v  0:ny 1    ELSE v   v  1: ny                END              size u 1  EQ jpi AND  size u 2  EQ jpj AND                 size v 1  EQ jpi AND  size v 2  EQ jpj:BEGIN                 u   u indicex 0 :indicex 0 nx 1 indicey 0 :indicey 0 ny 1                   v   v indicex 0 :indicex 0 nx 1 indicey 0 :indicey 0 ny 1                END             ELSE:return  report problemes d adequation entre la taille du domaine et la taille des matrices necessaires a tracer des vecteurs           endcase     construction of u and v at points T            a u 0           u u shift u 1 0 0 2           if NOT keyword_set key_periodic  OR nx NE jpi then u 0 a          a v 0           v v shift v 0 1 0 2           if NOT keyword_set key_periodic  OR nx NE jpi then v 0 a     attribution of the mask and of longitude and latitude arrays    We recover the complete grid to establish a big mask extent in the four    direction to cover pointsfor which a land point has been    considerated  make a small drawing             mask   tmask indice2d jpi jpj firstzt           if ny EQ 1 then mask   reform mask  nx  ny   over      construction of land containing all points to mask            if n_elements valmask  EQ 0 THEN valmask   1e20          landu   where u GE valmask 10           if landu 0  NE  1 then u landu    0          landv   where v GE valmask 10           if landv 0  NE  1 then v landv    0          res sqrt u 2 v 2           if NOT keyword_set key_periodic  OR nx NE jpi then res 0   values f_nan          res 0   values f_nan          mask   where mask eq 0           IF mask 0  NE  1 THEN BEGIN              coeftps   lindgen jpt nx ny             coeftps   replicate 1  n_elements mask coeftps             mask    temporary mask replicate 1  jpt              mask  temporary mask    temporary coeftps              res temporary mask    valmask          ENDIF   moyennes en tous genres          domdef   glamt indice2d 0  0   glamu indice2d nx 1  0 gphit indice2d 0  0   gphiv indice2d 0  ny 1  vert1  vert2   meme          if keyword_set direc  then res   grossemoyenne res direc nan  boxzoom   boxzoom   nodomdef        END      xyzt           date1 NE date2 AND  size u 0  EQ 4:BEGIN           indice2d   lindgen jpi  jpj           indice2d   indice2d indicex 0 :indicex 0 nx 1 indicey 0 :indicey 0 ny 1           indice3d   lindgen jpi  jpj  jpk           indice3d   indice3d indicex 0 :indicex 0 nx 1 indicey 0 :indicey 0 ny 1 firstzt:lastzt      extraction of u and v on the appropriated domain            case 1 of              size u 1  EQ nxu AND  size u 2  EQ nyu AND                 size v 1  EQ nxv AND  size v 2  EQ nyv:BEGIN                 case  size u 3  OF                   nzt:BEGIN                       if nxu NE nx then                         if indicex 0  EQ firstxu then u   u 0:nx 1  ELSE u   u 1: nx                          IF nxv NE nx THEN                         if indicex 0  EQ firstxv then v   v 0:nx 1  ELSE v   v 1: nx                         IF nyu NE ny THEN                         if indicey 0  EQ firstyu then u   u 0:ny 1  ELSE u   u  1: ny                        IF nyv NE ny THEN                         if indicey 0  EQ firstyv then v   v 0:ny 1  ELSE v   v  1: ny                    end                   jpk:BEGIN                       if nxu NE nx then                         if indicex 0  EQ firstxu then u   u 0:nx 1   firstzt:lastzt  ELSE u   u 1: nx   firstzt:lastzt                        IF nxv NE nx THEN                         if indicex 0  EQ firstxv then v   v 0:nx 1   firstzt:lastzt  ELSE v   v 1: nx   firstzt:lastzt                       IF nyu NE ny THEN                         if indicey 0  EQ firstyu then u   u  0:ny 1 firstzt:lastzt  ELSE u   u  1: ny firstzt:lastzt                        IF nyv NE ny THEN                         if indicey 0  EQ firstyv then v   v  0:ny 1 firstzt:lastzt  ELSE v   v  1: ny firstzt:lastzt                    end                   ELSE: return  report problemes d adequation entre la taille du domaine et la taille des matrices necessaires a tracer des vecteurs                 endcase             END              size u 1  EQ jpi AND  size u 2  EQ jpj AND  size u 3  EQ jpk AND                 size v 1  EQ jpi AND  size v 2  EQ jpj AND  size u 3  EQ jpk :BEGIN                 u   u indicex 0 :indicex 0 nx 1 indicey 0 :indicey 0 ny 1 firstzt:lastzt                   v   v indicex 0 :indicex 0 nx 1 indicey 0 :indicey 0 ny 1 firstzt:lastzt                END             ELSE: return  report problemes d adequation entre la taille du domaine et la taille des matrices necessaires a tracer des vecteurs           endcase     construction of u and v at points T            a u 0           u u shift u 1 0 0 0 2           if NOT keyword_set key_periodic  OR nx NE jpi then u 0 a          a v 0           v v shift v 0 1 0 0 2           if NOT keyword_set key_periodic  OR nx NE jpi then v 0 a     attribution of the mask and of logitude and latitude arrays            mask   tmask indice3d           if nzt EQ 1 then mask   reform mask  nx  ny  nzt   over             if n_elements valmask  EQ 0 THEN valmask   1e20          landu   where u GE valmask 10           if landu 0  NE  1 then u landu    0          landv   where v GE valmask 10           if landv 0  NE  1 then v landv    0          res sqrt u 2 v 2           if NOT keyword_set key_periodic  OR nx NE jpi then res 0     values f_nan          res 0     values f_nan          mask   where mask eq 0           IF mask 0  NE  1 THEN BEGIN              coeftps   lindgen jpt nx ny nzt             coeftps   replicate 1  n_elements mask coeftps             mask    temporary mask replicate 1  jpt              mask  temporary mask    temporary coeftps              res temporary mask    valmask          ENDIF   All kind of average          domdef   glamt indice2d 0  0   glamu indice2d nx 1  0 gphit indice2d 0  0   gphiv indice2d 0  ny 1  vert1  vert2   meme          if keyword_set direc  then res   grossemoyenne res direc nan  boxzoom   boxzoom   nodomdef        END      xy           ELSE:BEGIN                 xy          indice2d   lindgen jpi  jpj           indice2d   indice2d indicex 0 :indicex 0 nx 1 indicey 0 :indicey 0 ny 1      extraction of u and v on the appropriated domain            case 1 of              size u 1  EQ nxu AND  size u 2  EQ nyu AND                 size v 1  EQ nxv AND  size v 2  EQ nyv:BEGIN                 if nxu NE nx then                   if indicex 0  EQ firstxu then u   u 0:nx 1    ELSE u   u 1: nx                    IF nxv NE nx THEN                   if indicex 0  EQ firstxv then v   v 0:nx 1    ELSE v   v 1: nx                   IF nyu NE ny THEN                   if indicey 0  EQ firstyu then u   u  0:ny 1  ELSE u   u  1: ny                  IF nyv NE ny THEN                   if indicey 0  EQ firstyv then v   v  0:ny 1  ELSE v   v  1: ny              END              size u 1  EQ jpi AND  size u 2  EQ jpj AND                 size v 1  EQ jpi AND  size v 2  EQ jpj:BEGIN                 u   u indice2d                 v   v indice2d              END             ELSE:return  report problemes d adequation entre la taille du domaine et la taille des matrices necessaires a tracer des vecteurs           endcase     We reshape u and v to make sure that no dimension has been erased            if ny EQ 1 then begin             u   reform u  nx  ny   over              v   reform v  nx  ny   over           endif     construction of u and v at points T            a u 0           u u shift u 1 0 2           if NOT keyword_set key_periodic  OR nx NE jpi then u 0 a          a v 0           v v shift v 0 1 2           if NOT keyword_set key_periodic  OR nx NE jpi then v 0 a     attribution of the mask and of longitude and latitude arrays    We recover the complete grid to establish a big mask extent in the four    direction to cover pointsfor which a land point has been    considerated  make a small drawing             mask   tmask indice2d jpi jpj firstzt           if nyt EQ 1 THEN mask   reform mask  nx  ny   over      construction of land containing all points to mask            if n_elements valmask  EQ 0 THEN valmask   1e20          landu   where u GE valmask 10           if landu 0  NE  1 then u landu    0          landv   where v GE valmask 10           if landv 0  NE  1 then v landv    0          res sqrt u 2 v 2           if NOT keyword_set key_periodic  OR nx NE jpi then res 0 values f_nan          res 0 values f_nan          mask   where mask eq 0           IF mask 0  NE  1 THEN res mask    valmask   All kind of average          domdef   glamt indice2d 0  0   glamu indice2d nx 1  0 gphit indice2d 0  0   gphiv indice2d 0  ny 1  vert1  vert2   meme          if keyword_set direc  then res   moyenne res direc nan  boxzoom   boxzoom   nodomdef        END      endcase      if keyword_set key_performance  THEN print   temps norme  systime 1 tempsun     return  res end"); 
    197 a[195] = new Array("./ToBeReviewed/CALCULS/projectondepth.html", "projectondepth.pro", "", "             file_comments   Allows to project a 3d field following a depth array       categories   Without loop      param ARRAYIN  type 3d array    It is a 3d array whose 3rd dimension must be equal to jpk       param DEPTHIN  type 2d array    It is a 2d array indicating for each point n  at which depth to project             returns   A 2d array which is the projection of the 3d array following depths indicated by depthin      uses   common pro      restrictions    points at  values f_nan impossible calculation  Land points masked at valmask       examples   we build a possible depths array     IDL  a gdept jpk 1 1 jpi jpj findgen jpi jpj    We build an array to project on these depths  For the test    we build a 3d array whose each vector following z is the depth       IDL  arraytest replicate 1 jpi jpj gdept     IDL  arraytest reform arraytest jpi jpj jpk   over    We test the projection of the depth array on the depth      IDL  plt  1e6 a projectondepth arraytest a nocontour      null field at 1e 6 pres       verifcation projecting the temperature of 20 C for example       history   Sebastien Masson  smasson lodyc jussieu fr                         15 6 2000      version    Id: projectondepth pro 163 2006 08 29 12:59:46Z navarro             FUNCTION projectondepth  arrayin  depthin     compile_opt idl2  strictarrsubs      tempsun   systime 1            To key_performance  common      depth   litchamp depthin     array   litchamp arrayin    Small verifications    tailledepth   size depth     taillearray   size array     if tailledepth 0  NE 2 THEN return  report Depth array must have 2 dimensions     if taillearray 0  NE 3 THEN return  report Array in must have 3 dimensions    verification of the coherence between array s size and the domain     grille  mask   1   1   1 nx ny nz firstx firsty firstz lastx lasty lastz    case 1 of       tailledepth 1  eq jpi and tailledepth 2  eq jpj:depth depth firstx:lastx  firsty:lasty        tailledepth 1  eq  nx and tailledepth 2  eq  ny:       else:return  report Probleme d adequation entre les tailles du domaine et celle du tableau de profondeur     endcase    case 1 OF       taillearray 3  NE jpk:return  report Le tableau 3d doit avoir sa 3eme dimension egale a jpk        taillearray 1  eq jpi and taillearray 2  eq jpj:array array firstx:lastx  firsty:lasty          taillearray 1  eq  nx and taillearray 2  eq  ny:       else:return  report Probleme d adequation entre les tailles du domaine et celle du tableau de profondeur     endcase     c est parti      flevel   depth2floatlevel depth    we delete points at  values f_nan    notanumber   where finite flevel   nan  EQ 1     if notanumber 0  NE  1 then flevel notanumber    0   we sill  delete land points at valmask for example     flevel   0   flevel    jpk 1       indexup   level2index floor flevel     indexlow   nx ny indexup    out   where indexlow GE nx ny jpk 1     if out 0  NE  1 then indexlow out    indexlow out nx ny      weight   flevel floor flevel     res   array indexup     res   res weight array indexlow res      We put back points at  values f_nan    if notanumber 0  NE  1 then res notanumber     values f_nan    if out 0  NE  1 then res out     values f_nan   We mask land points at valmask    if n_elements valmask  EQ 0 then valmask   1e20    terre   where temporary mask    0  EQ 0     if terre 0  NE  1 then res terre    valmask      if keyword_set key_performance  THEN print   temps projectondepth  systime 1 tempsun     return  res end"); 
    198 a[196] = new Array("./ToBeReviewed/CALCULS/remplit.html", "remplit.pro", "", "     file_comments        categories        param ZINPUT        keyword NAN        keyword NITER        keyword BASIQUE        keyword MASK        keyword FILLXDIR         keyword FILLYDIR        keyword FILLVAL        keyword _EXTRA   Used to pass your keywords      returns        uses        restrictions        examples        history        version    Id: remplit pro 163 2006 08 29 12:59:46Z navarro             Extrapole zinout jpi jpj  sur les continents en utilisant les 4     plus proches voisins masques oceaniquement et construit un nouveau     masque     contenant l ancien masque oceanique PLUSles points extrapoles      Reitere le processus niter fois      C est pas clair  essayez                   Nan: to fill the point which have the value       values f_nan  Whitout this keyword  these point are not filling      and stays at  values f_nan         todo seb     FUNCTION remplit  zinput  NAN   nan  NITER   niter  BASIQUE   basique  mask   mask  FILLXDIR   fillxdir  FILLYDIR   fillydir  FILLVAL   fillval  _extra   ex     compile_opt idl2  strictarrsubs    common   tempsun   systime 1             pour key_performance   les points non remplis sont masques a valmask   IF n_elements niter  EQ 0 THEN niter   1   IF niter EQ 0 THEN return  zinput   z   zinput   if n_elements key_gridtype  EQ 0 then key_gridtype    c    if keyword_set basique  then begin     oldkey_gridtype   key_gridtype     key_gridtype    c      nx    size zinput 1      ny    size zinput 2      if NOT keyword_set mask  then mmmask   basique ELSE mmmask   mask     if  key_gridtype eq  e  then begin       case vargrid of          T :glam   glamt firstxt:lastxt  firstyt:lastyt           U :glam   glamu firstxu:lastxu  firstyu:lastyu        endcase     endif   ENDIF ELSE grille  mmmask  glam  gphi  gdep  nx  ny  nz  _extra   ex   if keyword_set mask  then mmmask   mask     if  size mmmask 0  EQ 3 THEN mmmask   mmmask    0      if n_elements mmmask  EQ 1 then mmmask   replicate 1b  nx  ny    if keyword_set nan  then begin     nanpoint   where finite z  EQ 0      if nanpoint 0  NE  1 then begin       mmmask nanpoint    0b       z nanpoint    0     endif   ENDIF   mmmask   byte mmmask      on ajoute un cadre de zero a z  mask  e1  e2   comme ca apres on peut faire des shifts ds tous les sens sans se   soucier des bords du domaine      tempdeux   systime 1            pour key_performance  2   nx2   nx 2   case key_gridtype of      c :BEGIN       ztmp   bytarr nx 2  ny 2        ztmp 1:nx  1:ny    mmmask       mmmask   temporary ztmp        ztmp   fltarr nx 2  ny 2        ztmp 1:nx  1:ny    z       if keyword_set key_periodic  AND nx EQ jpi then begin         ztmp 0  1:ny    z jpi 1            ztmp nx 1  1:ny    z 0          endif       z   temporary ztmp      END      e :BEGIN       ztmp   bytarr nx 2  ny 4        ztmp 1:nx  2:ny 1    mmmask       mmmask   temporary ztmp        ztmp   fltarr nx 2  ny 4        ztmp 1:nx  2:ny 1    z       if keyword_set key_periodic  AND nx EQ jpi then begin         ztmp 0  2:ny 1    z jpi 1            ztmp nx 1  2:ny 1    z 0          endif       z   temporary ztmp      END   endcase   IF testvar var   key_performance  EQ 2 THEN       print   temps remplit: on ajoute un cadre de zero   systime 1 tempdeux       iteration        FOR n   1  niter DO BEGIN    on trouve les points coast     tempdeux   systime 1          pour key_performance  2   les points du bord du cadre ne doivent pas etre selectionnes comme   la coast     case key_gridtype of        c :BEGIN         mmmask 0      1b         mmmask nx 1      1b         mmmask  0    1b         mmmask  ny 1    1b       END        e :BEGIN         mmmask 0      1b         mmmask nx 1      1b         mmmask  0:1    1b         mmmask  ny 2:ny 3    1b       END     endcase   liste des points terre restant     IF keyword_set fillxdir  THEN BEGIN   we stop if all the lines  that contains data  have been filled       test   total mmmask 1:nx    1        IF total test EQ 0 test EQ nx  EQ ny 2 THEN GOTO  fini     ENDIF     IF keyword_set fillydir  THEN BEGIN   we stop if all the columns  that contains data  have been filled       test   total mmmask  1:ny  2        IF total test EQ 0 test EQ ny  EQ nx 2 THEN GOTO  fini     ENDIF     land   where mmmask EQ 0      if land 0  EQ  1 then GOTO  fini   les points du bord du cadre doivent maintenant etre dans la terre     case key_gridtype of        c :BEGIN         mmmask 0      0b         mmmask nx 1      0b         mmmask  0    0b         mmmask  ny 1    0b       END        e :BEGIN         mmmask 0      0b         mmmask nx 1      0b         mmmask  0:1    0b         mmmask  ny 2:ny 3    0b       END     endcase     if keyword_set key_periodic  AND nx EQ jpi then begin       mmmask 0      mmmask nx          mmmask nx 1      mmmask 1        endif   liste des voisins mer     case key_gridtype of        c :BEGIN         CASE 1 OF           keyword_set fillxdir :weight   mmmask 1 land mmmask 1 land            keyword_set fillydir :weight   mmmask nx2 land mmmask nx2 land            ELSE:weight   mmmask 1 land mmmask 1 land mmmask nx2 land mmmask nx2 land                 1 sqrt 2 mmmask nx2 1 land mmmask nx2 1 land                              mmmask nx2 1 land mmmask nx2 1 land          ENDCASE       END        e :BEGIN         shifted   glam 0  0  LT glam 0  1          oddeven    land nx2 1 shifted  MOD 2         weight   mmmask 1 land mmmask 1 land               mmmask 2 nx2 land mmmask 2 nx2 land               sqrt 2 mmmask nx2 oddeven land mmmask nx2 1 oddeven land                         mmmask nx2 oddeven land mmmask nx2 1 oddeven land        END     endcase      ok   where weight GT 0      weight   weight ok      coast   land temporary ok        IF testvar var   key_performance  EQ 2 THEN         print   temps remplit: trouver la coast   systime 1 tempdeux     remplissage des points coast       tempdeux   systime 1          pour key_performance  2   on masque z     z   temporary z mmmask       case key_gridtype of        c :BEGIN         CASE 1 OF           keyword_set fillxdir :zcoast   z 1 coast z 1 coast            keyword_set fillydir :zcoast   z nx2 coast z nx2 coast            ELSE:zcoast   z 1 coast z 1 coast z nx2 coast z nx2 coast                 1 sqrt 2 z nx2 1 coast z nx2 1 coast                              z nx2 1 coast z nx2 1 coast          ENDCASE       END        e :BEGIN         oddeven    coast nx2 1 shifted  MOD 2         zcoast   z 1 coast z 1 coast z 2 nx2 coast z 2 nx2 coast               sqrt 2 z nx2 oddeven coast z nx2 1 oddeven coast                         z nx2 oddeven coast z nx2 1 oddeven coast        END     endcase           z coast     temporary zcoast  temporary weight    we update the the boundary conditions of z     if keyword_set key_periodic  AND nx EQ jpi then begin       z 0      z nx          z nx 1      z 1        endif     IV  on reduit le masque       mmmask  temporary coast    1       IF testvar var   key_performance  EQ 2 THEN         print   temps remplit: une iteration   systime 1 tempdeux   ENDFOR  fini:     on masque les valeurs sur les lands restantes     IF n_elements valmask  EQ 0 then valmask   1e20   IF n_elements fillval  EQ 0 THEN fillval   valmask   z   temporary z mmmask   fillval 1b mmmask      on redecoupe le tableau pour retirer le cadre      case key_gridtype of      c :BEGIN       z   z 1:nx  1:ny      END      e :BEGIN       z   z 1:nx  2:ny 1      END   endcase     if keyword_set basique  then key_gridtype   oldkey_gridtype     if keyword_set key_performance  THEN print   temps remplit  systime 1 tempsun    return  z END  "); 
    199 a[197] = new Array("./ToBeReviewed/CALCULS/rhon.html", "rhon.pro", "", "     file_comments        categories        param SN        param TN        keyword INSITU        keyword SIGMA_N        returns        uses        restrictions        examples        history        version    Id: rhon pro 163 2006 08 29 12:59:46Z navarro               Calcul de la fonction d etat  issue de eos F            Creation : 1997   G  Roullet      adaptation pour les tableaux z zt xyz xyzt      par seb            todo seb     FUNCTION rhon  sn  tn  INSITU   insitu  SIGMA_N   sigma_n     compile_opt idl2  strictarrsubs    common    tempsun   systime 1            pour key_performance       sn    1e5   double sn   double tn    1e5         IF keyword_set sigma_n  then insitu   1     taille   size sn     case taille 0  of       0:BEGIN                    z          zrhop 0d          jkmax   1       END        1:BEGIN                    z          zrhop dblarr taille 1           jkmax   taille 1        END        2:BEGIN                    xy  jpt 1  ou zt          zrhop dblarr taille 1 taille 2           if jpt EQ 1 then jkmax   1 ELSE jkmax   taille 1        END        3:BEGIN                    xyz  jpt 1  ou xyt          zrhop dblarr taille 1 taille 2 taille 3           if jpt EQ 1 then jkmax   taille 3  ELSE jkmax   1       END        4:BEGIN                    xyzt          zrhop dblarr taille 1 taille 2 taille 3 taille 4             jkmax   taille 3        END     endcase          FOR jk   0  jkmax 1 DO BEGIN        case taille 0  of          0:BEGIN                 z             ztt   tn             zs   sn          END           1:BEGIN                 z             ztt   tn jk              zs   sn jk            END           2:BEGIN                 xy  jpt 1  ou zt             if jpt EQ 1 then begin                ztt   tn                zs   sn             ENDIF ELSE BEGIN                ztt   tn jk                   zs   sn jk                 ENDELSE          END           3:BEGIN                 xyz  jpt 1  ou xyt             if jpt EQ 1 then begin                ztt   tn    jk                 zs   sn   jk               endif ELSE BEGIN                ztt   tn                zs   sn             ENDELSE          END           4:BEGIN                 xyzt             ztt   tn    jk                zs   sn   jk              END        endcase       if n_elements sigma_n  NE 0 then zh   1000 sigma_n ELSE zh   gdept jk        square root salinity       zsr  sqrt abs zs        compute density pure water at atm pressure       zr1 6 536332e 9 ztt 1 120083e 6 ztt 1 001685e 4 ztt 9 095290e 3 ztt 6 793952e 2 ztt 999 842594       seawater density atm pressure       zr2   5 3875e 9 ztt 8 2467e 7 ztt 7 6438e 5 ztt 4 0899e 3 ztt 0 824493       zr3   1 6546e 6 ztt 1 0227e 4 ztt 5 72466e 3       zr4  4 8314e 4         potential density  reference to the surface        case taille 0  of          0: zrhop       zr4 zs   zr3 zsr   zr2 zs   zr1          1: zrhop jk   zr4 zs   zr3 zsr   zr2 zs   zr1          2:BEGIN              if jpt EQ 1 then zrhop    zr4 zs   zr3 zsr   zr2 zs   zr1               ELSE zrhop jk     zr4 zs   zr3 zsr   zr2 zs   zr1          END          3:BEGIN              if jpt EQ 1 then zrhop   jk   zr4 zs   zr3 zsr   zr2 zs   zr1                ELSE zrhop    zr4 zs   zr3 zsr   zr2 zs   zr1          END          4: zrhop   jk     zr4 zs   zr3 zsr   zr2 zs   zr1       endcase        IF n_elements insitu  EQ 1 THEN BEGIN        add the compression terms          ze    3 508914e 8 ztt 1 248266e 8 ztt 2 595994e 6          zbw    1 296821e 6 ztt 5 782165e 9 ztt 1 045941e 4          zb   zbw   ze   zs            zd    2 042967e 2          zc    7 267926e 5 ztt 2 598241e 3 ztt 0 1571896          zaw    5 939910e 6 ztt 2 512549e 3 ztt 0 1028859 ztt  4 721788          za     zd zsr   zc zs   zaw            zb1   0 1909078 ztt 7 390729 ztt 55 87545          za1   2 326469e 3 ztt 1 553190 ztt 65 00517 ztt 1044 077          zkw   1 361629e 4 ztt 1 852732e 2 ztt 30 41638 ztt 2098 925 ztt 190925 6          zk0   zb1 zsr   za1 zs   zkw         masked in situ density          case taille 0  of             0: zrhop   zrhop    1 0 zh zk0 zh za zh zb              1: zrhop jk    zrhop jk     1 0 zh zk0 zh za zh zb              2:BEGIN                 if jpt EQ 1 then zrhop   zrhop    1 0 zh zk0 zh za zh zb                   ELSE zrhop jk      zrhop jk       1 0 zh zk0 zh za zh zb              END             3:BEGIN                 if jpt EQ 1 then zrhop   jk    zrhop   jk     1 0 zh zk0 zh za zh zb                   ELSE zrhop   zrhop    1 0 zh zk0 zh za zh zb              END             4: zrhop   jk      zrhop   jk       1 0 zh zk0 zh za zh zb           endcase                 ENDIF     ENDFOR         terre   where tn GE 1e6     if terre 0  NE  1 then zrhop terre    valmask     if keyword_set key_performance  THEN print   temps rhon  systime 1 tempsun          return  zrhop END   "); 
    200 a[198] = new Array("./ToBeReviewed/CALENDRIER/def_month.html", "def_month.pro", "", "     file_comments        categories        param TIMAVE        param DATE        returns        uses        restrictions        examples        history        version    Id: def_month pro 163 2006 08 29 12:59:46Z navarro        todo seb   FUNCTION def_month  timave  date     translate month number in string       compile_opt idl2  strictarrsubs      IF strpos date   _  GT  1 THEN date   strmid date  0  strpos date   _     CASE strmid timave  0  2  OF         1m : BEGIN          CASE strmid date  strlen date 2  2  OF               01 : mn    January               02 : mn    February               03 : mn    March               04 : mn    April               05 : mn    May               06 : mn    June               07 : mn    July               08 : mn    August               09 : mn    September               10 : mn    October               11 : mn    November               12 : mn    December              ELSE: mn              ENDCASE        END         3m : BEGIN          CASE strmid date  strlen date 2  2  OF               01 : mn    DJF               02 : mn    MMA               03 : mn    JJA               04 : mn    SON              ELSE: mn              ENDCASE        END        ELSE:    ENDCASE       return  mn END "); 
    201 a[199] = new Array("./ToBeReviewed/COULEURS/palit.html", "palit.pro", "", "     file_comments    Clarify the current palette playing with brightness      param COEF  in required  The rule of attenuation of colors divide by 2 the brightness by default      param RED       param GREEN      param BLUE      todo Seb: compl ter param red green blue   PRO palit  coef  red  green  blue     compile_opt idl2  strictarrsubs      IF n_elements coef  EQ 0 THEN coef   0 5    IF n_elements red  EQ 0 THEN tvlct  red  green  blue   get    color_convert  red  green  blue  h  l  s   rgb_hls    l   1 coef 1 l       Black must stay really black     Each palette starts by Black and ends by white      l 0    0     tvlct  h  l  s   hls    return END"); 
    202 a[200] = new Array("./ToBeReviewed/GRILLE/changegrid.html", "changegrid.pro", "", "     file_comments        categories        param NEWGRID        returns        uses        restrictions        examples        history        version    Id: changegrid pro 163 2006 08 29 12:59:46Z navarro          todo seb     function changegrid  newgrid       compile_opt idl2  strictarrsubs    cm_4mesh        if cmpgrid newgrid  EQ 0 then return  0     update the common paramaters      ccmeshparameters   newgrid     ixminmesh   newgrid ixminmesh    ixmaxmesh   newgrid ixmaxmesh    iyminmesh   newgrid iyminmesh    iymaxmesh   newgrid iymaxmesh    izminmesh   newgrid izminmesh    izmaxmesh   newgrid izmaxmesh     read the new file      loadgrid  newgrid filename     IF NOT keyword_set key_forgetold  THEN BEGIN     updateold   ENDIF      return  1 end"); 
    203 a[201] = new Array("./ToBeReviewed/GRILLE/cmpgrid.html", "cmpgrid.pro", "", "     file_comments        categories        param NEWGRID        returns        uses        restrictions        examples        history        version    Id: cmpgrid pro 163 2006 08 29 12:59:46Z navarro          todo seb     FUNCTION cmpgrid  newgrid       compile_opt idl2  strictarrsubs    common       newgrid must be a structure      if size newgrid   type  NE 8 then return  0     does ccmeshparameters exist        if n_elements ccmeshparameters  EQ 0 then return  1     we compare the structure which caracterise the grid whith   ccmeshparameters      case 1 of       ccmeshparameters jpiglo NE newgrid jpiglo:       ccmeshparameters jpjglo NE newgrid jpjglo:       ccmeshparameters jpkglo NE newgrid jpkglo:       ccmeshparameters jpi NE newgrid jpi:       ccmeshparameters jpj NE newgrid jpj:       ccmeshparameters jpk NE newgrid jpk:       total ccmeshparameters glaminfo   newgrid glaminfo  NE 0:       total ccmeshparameters gphiinfo   newgrid gphiinfo  NE 0:       ccmeshparameters ixminmesh NE newgrid ixminmesh:       ccmeshparameters ixmaxmesh NE newgrid ixmaxmesh:       ccmeshparameters iyminmesh NE newgrid iyminmesh:       ccmeshparameters iymaxmesh NE newgrid iymaxmesh:       ccmeshparameters izminmesh NE newgrid izminmesh:       ccmeshparameters izmaxmesh NE newgrid izmaxmesh:       ccmeshparameters key_shift NE newgrid key_shift:       ccmeshparameters key_periodic NE newgrid key_periodic:       array_equal ccmeshparameters key_stride  newgrid key_stride  EQ 0:       ccmeshparameters key_gridtype NE newgrid key_gridtype:       ccmeshparameters key_yreverse NE newgrid key_yreverse:       ccmeshparameters key_zreverse NE newgrid key_zreverse:       ccmeshparameters key_partialstep NE newgrid key_partialstep:       ccmeshparameters key_onearth NE newgrid key_onearth:       ELSE:return  0    endcase     return  1 end"); 
    204 a[202] = new Array("./ToBeReviewed/GRILLE/decoupeterre.html", "decoupeterre.pro", "", "             file_comments   Similar to grille  Here  when vargrid is not  T  or  W  we have to   recuperate Tmask  glamt  gphit and the array of triangulation on the   considered sub domain for the drawing  The specificity of decoupeterre   in comparaison with grille  is that we take  if possible  a sub domain   just a little bit bigger than the one defined by domdef in order to be   sure that the mask we draw will cover over all the drawing       categories   Utilities      param MASK        param GLAM        param GPHI        param GDEP        keyword TYPE        keyword INDICEZOOM        keyword COINMONTE        keyword COINDESCEND        keyword REALSECTION        keyword USETRI        keyword _EXTRA   Used to pass your keywords      keyword TRI    This keyword serve to obtain  thanks to grille  the triangulation which   refer to the grid but only on the part of the zoom  This of triangulation   is passed in the variable we have equate at TRI    For example: grille tri triangulation_reduite    This keyword is used in plt pro      keyword WDEPTH   To specify that the field is at W depth instead of T    depth  automatically activated if vargrid eq  W       uses   common pro      history   Sebastien Masson  smasson lodyc jussieu fr                          24 2 99      version    Id: decoupeterre pro 163 2006 08 29 12:59:46Z navarro        todo seb : manque tous les param et plein de keywords                  PRO decoupeterre  mask  glam  gphi  gdep  TYPE   type  TRI   tri  INDICEZOOM   indicezoom  COINMONTE   coinmonte  COINDESCEND   coindescend  WDEPTH   wdepth  REALSECTION   realsection  USETRI   usetri  _extra   ex       compile_opt idl2  strictarrsubs    cm_4mesh  cm_4data   IF NOT keyword_set key_forgetold  THEN BEGIN  updatenew   ENDIF     tempsun   systime 1             For key_performance     if vargrid EQ  W  then wdepth   1       horizontal parameters     if possible extent the domain according to the grid type   default case   case vargrid of      U :BEGIN       firstx   0    min firstxt  firstxu 1        lastx    max lastxt  lastxu 1    min firstyt  firstyu 1        lasty    max lastyt  lastyu 1    min firstxt  firstxv 1        lastx    max lastxt  lastxv 1    min firstyt  firstyv 1        lasty    max lastyt  lastyv 1    min firstxt  firstxf 1        lastx    max lastxt  lastxf 1    min firstyt  firstyf 1        lasty    max lastyt  lastyf 1    firstx 1 :lastx  firsty:lasty            ELSE glam   glamu 0    firstx 1 :lastx  firsty:lasty        ENDELSE     END      yz :BEGIN       if keyword_set realsection  EQ 0 then begin         if vargrid EQ  U  OR vargrid EQ  F  then             gphi   gphiu firstx:lastx  firsty:lasty        ENDIF ELSE BEGIN            to drawsectionbottom           if vargrid EQ  U  OR vargrid EQ  F  OR finite gphiv 0  EQ 0 then             gphi   gphif firstx:lastx  0    firsty 1 :lasty            ELSE gphi   gphiv firstx:lastx  0    firsty 1 :lasty        ENDELSE     END     ELSE:   ENDCASE     vertical boundaries     if keyword_set wdepth   then begin     firstz   0    min firstzt  firstzw 1      lastz    max lastzt  lastzw 1     jpk 1    ENDIF ELSE BEGIN     firstz   firstzt     lastz   lastzt   ENDELSE    nz   lastz firstz 1     mask     case type of      xy :BEGIN       mask   tmask firstx:lastx  firsty:lasty  firstz        profond   firstz NE 0     END   for the verical section  we have to choose the right mask according   to the grid point and to the direction of the section      xz :BEGIN       if vargrid EQ  V  OR vargrid EQ  F  then begin         mask    vmask firstx:lastx  firstyv:lastyv  firstz:lastz        ENDIF ELSE mask   tmask firstx:lastx  firsty:lasty  firstz:lastz      END      yz :BEGIN       if vargrid EQ  U  OR vargrid EQ  F  then begin         mask    umask firstxu:lastxu  firsty:lasty  firstz:lastz        ENDIF ELSE mask   tmask firstx:lastx  firsty:lasty  firstz:lastz      END     ELSE:mask   tmask firstx:lastx  firsty:lasty  firstz:lastz    endcase     vertical axis     when we do a real section we directly plot the gdepw    in drawsectionbottom pro  instead of contouring the mask at 0 5 at   gdept   IF keyword_set realsection  EQ 0 then gdep   gdept firstz:lastz      ELSE BEGIN       if lastz EQ jpk 1 then     we add some fictive very deep level that will not be used but that is   necessary to avoid array size bugs in draw bottom section        gdep    gdepw firstz 1:lastz  2 gdept jpk 1         ELSE gdep   gdepw firstz 1:lastz 1       gdep   gdepw firstz:lastz    special case when we are using the partial steps in the vertical   section that are only 1 point wide    in that case  the z axis is a 2d array and we modify the depth of   the last level ocean with hdepw that is the real depth of the bottom      CASE 1 OF       keyword_set key_partialstep  and type EQ  xz            AND ny EQ 1 AND keyword_set realsection :BEGIN         bottom   total mask  3          good   where bottom NE 0 AND bottom NE nz 1          bottom   lindgen nx bottom nx         IF good 0  NE  1 THEN BEGIN           bottom   bottom good            gdep   replicate 1  nx gdep           truegdep   hdepw firstx:lastx  firsty:lasty            gdep bottom    truegdep good          ENDIF       END       keyword_set key_partialstep  and type EQ  yz            AND nx EQ 1 AND keyword_set realsection :BEGIN          bottom   total mask  3          good   where bottom NE 0 AND bottom NE nz 1          bottom   lindgen ny bottom ny         IF good 0  NE  1 THEN BEGIN           bottom   bottom good            gdep   replicate 1  ny gdep           truegdep   hdepw firstx:lastx  firsty:lasty            gdep bottom    truegdep good          ENDIF       END       ELSE:     ENDCASE   ENDELSE     Triangulation vector when TRI is activated      IF arg_present TRI  then       if triangles_list 0  EQ  1 OR usetri LT 1 then tri    1 ELSE BEGIN   If we are tracing a deep level  we redo the triangulation     if keyword_set profond  then begin       tri   triangule mask  coinmonte   coinmonte  coindescend   coindescend  _extra   ex        indicezoom    lindgen jpi  jpj firstx:lastx  firsty:lasty    ENDIF ELSE BEGIN    Otherwise  we recuperate the part of triangulation that interest us and we number them well        if nx EQ jpi AND ny EQ jpj then tri   triangles_list ELSE BEGIN          msk   bytarr jpi  jpj          msk firstx:lastx  firsty:lasty    1         ind   where  msk triangles_list 0    EQ 1                        AND msk triangles_list 1    EQ 1                        AND msk triangles_list 2    EQ 1           tri   triangles_list  ind firstx firsty jpi          y   tri jpi         x   tri y jpi         tri   x y nx       ENDELSE     ENDELSE   ENDELSE     if keyword_set key_performance  THEN print   temps decoupeterre  systime 1 tempsun      return end "); 
    205 a[203] = new Array("./ToBeReviewed/GRILLE/domdef.html", "domdef.pro", "", "             file_comments    Allows to extract a sub domain of study by providing parameters    needed for drawings  see outputs       categories      param Z1  in optional    For a 3d domain whose the horizontal part cover all glam       param Z2  in optional    For a 3d domain whose the horizontal part cover all gphi      param X1  in optional    Define the minimum longitude   All levels are selected       param X2  in optional    Define the maximum longitude   All levels are selected       param Y1  in optional    Define the minimum latitude   All levels are selected       param Y2  in optional    Define the maximum latitude   All levels are selected       keyword ENDPOINTS  type vector    A four elements vector  x1 y1 x2 y2  used to specify   that domdef must define the box used to make a plot  pltz  pltt    plt1d  done strictly along the line  that can have any direction    starting at  x1  y1  ending at  x2  y2  When defining endpoints    you must also define TYPE which define the type of plots    pltz   xt   yt   zt   x   y   z   t  will used   ENDPOINTS keywords      keyword FINDALWAYS   Force to redefine a box even when none point is find in the box     In this case  we select all the grid       keyword GRIDTYPE  type string or vector    It is a string or a vector of strings containing the grids s name     Only determined by  T U V W F  for which the calculation    must be done      For example:  T  or  T U       keyword MEMEINDICES   It is possible that points t u v and F correspond to a same geographic   box which do not concern the same array indexes  This is sometimes a   problem  or at least serious complications  in programs where several   type of grid intervene  see norme  curl  Activate MEMEINDICE to   force domdef to take same indexes  those of the grid T  for all other   grids       keyword INDEX    We activate it if we want that all elements passed in input of domdef    refer to indexes of glam  gphi and gdep arrays rather than to values    of these arrays       keyword XINDEX    We activate it if we want that all elements passed in input of domdef    and concerning the X dimension refer to indexes of glam arrays rather    than to values of these arrays       keyword YINDEX    We activate it if we want that all elements passed in input of domdef    and concerning the X dimension refer to indexes of gphi arrays rather    than to values of these arrays        keyword ZINDEX    We activate it if we want that all elements passed in input of domdef    and concerning the X dimension refer to indexes of gdep arrays rather    than to values of these arrays       uses   common pro        history   Sebastien Masson  smasson lodyc jussieu fr   8 2 98   rewrite everything  debug and spee up Sebastien Masson April 2005      version    Id: domdef pro 163 2006 08 29 12:59:46Z navarro        todo seb: output pas clair  pas d input required          pro domdef  x1  x2  y1  y2  z1  z2  FINDALWAYS   findalways                 GRIDTYPE   gridtype  MEMEINDICES   memeindices                 XINDEX   xindex  YINDEX   yindex  ZINDEX   zindex                 ENDPOINTS   endpoints  TYPE   type                 INDEX   index  _extra   ex     include commons     compile_opt idl2  strictarrsubs    cm_4mesh   IF NOT keyword_set key_forgetold  THEN BEGIN  updatenew  updatekwd   ENDIF     tempsun   systime 1             For key_performance     CASE N_PARAMS  OF     0:     1:     2:     4:     6:     ELSE:BEGIN       ras   report Bad number of parameter in the call of domdef        RETURN     END   ENDCASE     IF keyword_set endpoints  THEN BEGIN     IF NOT keyword_set type  THEN BEGIN        dummy   report If domdef is used do find the box associated                             to endpoints  you must also specify type keyword        return     ENDIF      CASE N_PARAMS  OF       0:       1:boxzoom    x1        2:boxzoom    x1  x2        4:boxzoom    x1  x2  y1  y2        6:boxzoom    x1  x2  y1  y2  z1  z2      ENDCASE     section  BOXZOOM   boxzoom  ENDPOINTS   endpoints  TYPE   type   ONLYBOX     return   ENDIF         recall domdef when there is only one input parameter       IF N_PARAMS  EQ 1 THEN BEGIN     CASE n_elements x1  OF       2:domdef  x1 0  x1 1  FINDALWAYS   findalways  GRIDTYPE   gridtype  MEMEINDICES   memeindices  XINDEX   xindex  YINDEX   yindex  ZINDEX   zindex  INDEX   index  _extra   ex       4:domdef  x1 0  x1 1  x1 2  x1 3  FINDALWAYS   findalways  GRIDTYPE   gridtype  MEMEINDICES   memeindices  XINDEX   xindex  YINDEX   yindex  ZINDEX   zindex  INDEX   index  _extra   ex       6:domdef  x1 0  x1 1  x1 2  x1 3  x1 4  x1 5  FINDALWAYS   findalways  GRIDTYPE   gridtype  MEMEINDICES   memeindices  XINDEX   xindex  YINDEX   yindex  ZINDEX   zindex  INDEX   index  _extra   ex       ELSE:BEGIN         ras   report Bad number of elements in x1          RETURN       END     ENDCASE     RETURN     ENDIF     default definitions and checks     IF NOT keyword_set gridtype  THEN gridtype    T   U   V   W   F      ELSE gridtype   strupcase gridtype    IF keyword_set memeindices  THEN gridtype    T  gridtype    IF finite glamu 0  eq 0 THEN gridtype   gridtype where gridtype NE  U    IF finite glamv 0  eq 0 THEN gridtype   gridtype where gridtype NE  V    default definitions   lon1t   99999    lon2t    99999    lat1t   99999    lat2t    99999    lon1u   99999    lon2u    99999    lat1u   99999    lat2u    99999    lon1v   99999    lon2v    99999    lat1v   99999    lat2v    99999    lon1f   99999    lon2f    99999    lat1f   99999    lat2f    99999    vert1t   99999    vert2t    99999    vert1w   99999    vert2w    99999      IF jpj EQ 1 THEN BEGIN      IF  where gridtype eq  T 0  NE  1 OR  where gridtype EQ  W 0  NE  1 THEN BEGIN       glamt   reform glamt  jpi  jpj   over        gphit   reform gphit  jpi  jpj   over      ENDIF      IF  where gridtype eq  U 0  NE  1 THEN BEGIN       glamu   reform glamu  jpi  jpj   over        gphiu   reform gphiu  jpi  jpj   over      ENDIF       IF  where gridtype eq  V 0  NE  1 THEN BEGIN       glamv   reform glamv  jpi  jpj   over        gphiv   reform gphiv  jpi  jpj   over      ENDIF       IF  where gridtype eq  F 0  NE  1 THEN BEGIN       glamf   reform glamf  jpi  jpj   over        gphif   reform gphif  jpi  jpj   over      ENDIF     ENDIF     IF N_PARAMS  EQ 2 THEN GOTO  vertical         define all horizontal parameters     lon1 et lon2   lat1 et lat2   firstx tuvf  lastx tuvf  nx tuvf      check if the grid is defined for U and V points  If not  take care   of the cases gridtype eq  U  or  V      errstatus   0   IF  finite glamu 0 gphiu 0  EQ 0 OR n_elements glamu  EQ 0 OR n_elements gphiu  EQ 0  AND  where gridtype eq  U 0  NE  1 THEN BEGIN     firstxu    values f_nan     lastxu    values f_nan     nxu    values f_nan     okgrid   where gridtype NE  U  count      IF count NE 0 THEN gridtype   gridtype okgrid        ELSE errstatus   report U grid is undefined  Impossible to call domdef with vargid    U    ENDIF     IF  finite glamv 0 gphiv 0  EQ 0 OR n_elements glamv  EQ 0 OR n_elements gphiv  EQ 0  AND  where gridtype eq  V 0  NE  1 THEN BEGIN     firstxv    values f_nan     lastxv    values f_nan     nxv    values f_nan     okgrid   where gridtype NE  V  count      IF count NE 0 THEN gridtype   gridtype okgrid        ELSE errstatus   report V grid is undefined  Impossible to call domdef with vargid    V    ENDIF   IF errstatus EQ  1 THEN return       horizontal domain defined with lon1  lon2  lat1 and lat2       IF N_PARAMS  EQ 0       OR    N_PARAMS  EQ 4 OR N_PARAMS  EQ 6             AND NOT keyword_set xindex  AND NOT keyword_set yindex  AND NOT keyword_set index    THEN BEGIN     IF N_PARAMS  EQ 0 THEN BEGIN   find lon1 and lon2 the longitudinal boudaries of the full domain       IF  where gridtype eq  T 0  NE  1 THEN lon1t   min glamt  max   lon2t        IF  where gridtype eq  W 0  NE  1 AND  where gridtype eq  T 0  EQ  1 THEN lon1t   min glamt  max   lon2t        IF  where gridtype eq  U 0  NE  1 THEN lon1u   min glamu  max   lon2u        IF  where gridtype eq  V 0  NE  1 THEN lon1v   min glamv  max   lon2v        IF  where gridtype eq  F 0  NE  1 THEN lon1f   min glamf  max   lon2f        lon1   min lon1t  lon1u  lon1v  lon1f        lon2   max lon2t  lon2u  lon2v  lon2f    find lat1 and lat2 the latitudinal boudaries of the full domain       IF  where gridtype eq  T 0  NE  1 THEN lat1t   min gphit  max   lat2t        IF  where gridtype eq  W 0  NE  1 AND  where gridtype eq  T 0  EQ  1 THEN lat1t   min gphit  max   lat2t        IF  where gridtype eq  U 0  NE  1 THEN lat1u   min gphiu  max   lat2u        IF  where gridtype eq  V 0  NE  1 THEN lat1v   min gphiv  max   lat2v        IF  where gridtype eq  F 0  NE  1 THEN lat1f   min gphif  max   lat2f        lat1   min lat1t  lat1u  lat1v  lat1f        lat2   max lat2t  lat2u  lat2v  lat2f      ENDIF ELSE BEGIN        lon1   min x1  x2  max   lon2        lat1   min y1  y2  max   lat2      ENDELSE   find firstxt  firstxt  nxt and nyt according to lon1  lon2  lat1 and lat2     IF  where gridtype eq  T 0  NE  1 OR  where gridtype EQ  W 0  NE  1 THEN BEGIN       dom   where   glamt GE lon1  AND  glamt LE lon2                       AND  gphit GE lat1  AND  gphit LE lat2          IF  dom 0  EQ  1  THEN BEGIN         IF keyword_set findalways  THEN BEGIN           print   WARNING  empty T points box  we get the neighnors to define a new box            neig1   neighbor lon1  lat1  glamt  gphit  sphere   keyword_set key_onearth    keyword_set key_irregular            neig2   neighbor lon2  lat2  glamt  gphit  sphere   keyword_set key_onearth    keyword_set key_irregular            CASE N_PARAMS  OF             4:domdef  min glamt neig1  max glamt neig2  min gphit neig1  max gphit neig2  GRIDTYPE   gridtype  MEMEINDICES   memeindices  ZINDEX   zindex  _extra   ex             6:domdef  min glamt neig1  max glamt neig2  min gphit neig1  max gphit neig2  z1  z2  GRIDTYPE   gridtype  MEMEINDICES   memeindices  ZINDEX   zindex  _extra   ex           ENDCASE           RETURN         ENDIF ELSE BEGIN           ras   report WARNING  The box does not contain any T points            firstxt    1   lastxt    1   nxt   0           firstyt    1   lastyt    1   nyt   0         ENDELSE       ENDIF ELSE BEGIN         jyt   dom   jpi         ixt   temporary dom  MOD jpi         firstxt   min temporary ixt  max   lastxt          firstyt   min temporary jyt  max   lastyt          nxt   lastxt   firstxt   1         nyt   lastyt   firstyt   1       ENDELSE     ENDIF   find firstxu  firstxu  firstyu  firstyu  nxu and nyu   according to lon1  lon2  lat1 and lat2     IF  where gridtype eq  U 0  NE  1 THEN BEGIN       IF keyword_set memeindices  THEN BEGIN         firstxu   firstxt   lastxu   lastxt   nxu   nxt         firstyu   firstyt   lastyu   lastyt   nyu   nyt       ENDIF ELSE BEGIN         dom   where   glamu GE lon1  AND  glamu LE lon2                         AND  gphiu GE lat1  AND  gphiu LE lat2            IF  dom 0  EQ  1  THEN BEGIN           IF keyword_set findalways  THEN BEGIN   if t grid parameters alreday defined  we use them               CASE 1 OF                where gridtype eq  T 0  NE  1 OR  where gridtype EQ  W 0  NE  1:BEGIN                 print   WARNING  empty U points box  we use the same index as T points                  firstxu   firstxt   lastxu   lastxt   nxu   nxt                 firstyu   firstyt   lastyu   lastyt   nyu   nyt               END               ELSE:BEGIN                 print   WARNING  empty U points box  we get the neighnors to define a new box                  neig1   neighbor lon1  lat1  glamu  gphiu  sphere   keyword_set key_onearth    keyword_set key_irregular                  neig2   neighbor lon2  lat2  glamu  gphiu  sphere   keyword_set key_onearth    keyword_set key_irregular                  CASE N_PARAMS  OF                   4:domdef  min glamu neig1  max glamu neig2  min gphiu neig1  max gphiu neig2  GRIDTYPE   gridtype  MEMEINDICES   memeindices  ZINDEX   zindex  _extra   ex                   6:domdef  min glamu neig1  max glamu neig2  min gphiu neig1  max gphiu neig2  z1  z2  GRIDTYPE   gridtype  MEMEINDICES   memeindices  ZINDEX   zindex  _extra   ex                 ENDCASE                 RETURN               END             ENDCASE           ENDIF ELSE BEGIN             ras   report WARNING  The box does not contain any U points              firstxu    1   lastxu    1   nxu   0             firstyu    1   lastyu    1   nyu   0           ENDELSE         ENDIF ELSE BEGIN           jyu   dom   jpi           ixu   temporary dom  MOD jpi           firstxu   min temporary ixu  max   lastxu            firstyu   min temporary jyu  max   lastyu            nxu   lastxu   firstxu   1           nyu   lastyu   firstyu   1         ENDELSE       ENDELSE     ENDIF   find firstxv  firstxv  firstyv  firstyv  nxv and nyv    according to lon1  lon2  lat1 and lat2     IF  where gridtype eq  V 0  NE  1 THEN BEGIN       IF keyword_set memeindices  THEN BEGIN         firstxv   firstxt   lastxv   lastxt   nxv   nxt         firstyv   firstyt   lastyv   lastyt   nyv   nyt       ENDIF ELSE BEGIN         dom   where   glamv GE lon1  AND  glamv LE lon2                         AND  gphiv GE lat1  AND  gphiv LE lat2            IF  dom 0  EQ  1  THEN BEGIN           IF keyword_set findalways  THEN BEGIN             CASE 1 OF                where gridtype eq  T 0  NE  1 OR  where gridtype EQ  W 0  NE  1:BEGIN                 print   WARNING  empty V points box  we use the same index as T points                  firstxv   firstxt   lastxv   lastxt   nxv   nxt                 firstyv   firstyt   lastyv   lastyt   nyv   nyt               END                 where gridtype eq  U 0  NE  1:BEGIN                 print   WARNING  empty V points box  we use the same index as U points                  firstxv   firstxu   lastxv   lastxu   nxv   nxu                 firstyv   firstyu   lastyv   lastyu   nyv   nyu               END                ELSE:BEGIN                 print   WARNING  empty V points box  we get the neighnors to define a new box                  neig1   neighbor lon1  lat1  glamv  gphiv  sphere   keyword_set key_onearth    keyword_set key_irregular                  neig2   neighbor lon2  lat2  glamv  gphiv  sphere   keyword_set key_onearth    keyword_set key_irregular                  CASE N_PARAMS  OF                   4:domdef  min glamv neig1  max glamv neig2  min gphiv neig1  max gphiv neig2  GRIDTYPE   gridtype  MEMEINDICES   memeindices  ZINDEX   zindex  _extra   ex                   6:domdef  min glamv neig1  max glamv neig2  min gphiv neig1  max gphiv neig2  z1  z2  GRIDTYPE   gridtype  MEMEINDICES   memeindices  ZINDEX   zindex  _extra   ex                 ENDCASE                 RETURN               END             ENDCASE           ENDIF ELSE BEGIN             ras   report WARNING  The box does not contain any V points              firstxv    1   lastxv    1   nxv   0             firstyv    1   lastyv    1   nyv   0           ENDELSE         ENDIF ELSE BEGIN           jyv   dom   jpi           ixv   temporary dom  MOD jpi           firstxv   min temporary ixv  max   lastxv            firstyv   min temporary jyv  max   lastyv            nxv   lastxv   firstxv   1           nyv   lastyv   firstyv   1         ENDELSE       ENDELSE     ENDIF   find firstxf  firstxf  firstyf  firstyf  nxf and nyf   according to lon1  lon2  lat1 and lat2     IF  where gridtype eq  F 0  NE  1 THEN BEGIN       IF keyword_set memeindices  THEN BEGIN         firstxf   firstxt   lastxf   lastxt   nxf   nxt         firstyf   firstyt   lastyf   lastyt   nyf   nyt       ENDIF ELSE BEGIN         dom   where   glamf GE lon1  AND  glamf LE lon2                         AND  gphif GE lat1  AND  gphif LE lat2            IF  dom 0  EQ  1  THEN BEGIN           IF keyword_set findalways  THEN BEGIN             CASE 1 OF                where gridtype eq  T 0  NE  1 OR  where gridtype EQ  W 0  NE  1:BEGIN                 print   WARNING  empty F points box  we use the same index as T points                  firstxf   firstxt   lastxf   lastxt   nxf   nxt                 firstyf   firstyt   lastyf   lastyt   nyf   nyt               END                 where gridtype eq  U 0  NE  1:BEGIN                 print   WARNING  empty F points box  we use the same index as U points                  firstxf   firstxu   lastxf   lastxu   nxf   nxu                 firstyf   firstyu   lastyf   lastyu   nyf   nyu               END                 where gridtype eq  V 0  NE  1:BEGIN                 print   WARNING  empty F points box  we use the same index as V points                  firstxf   firstxv   lastxf   lastxv   nxf   nxv                 firstyf   firstyv   lastyf   lastyv   nyf   nyv               END                ELSE:BEGIN                 print   WARNING  empty F points box  we get the neighnors to define a new box                  neig1   neighbor lon1  lat1  glamf  gphif  sphere   keyword_set key_onearth    keyword_set key_irregular                  neig2   neighbor lon2  lat2  glamf  gphif  sphere   keyword_set key_onearth    keyword_set key_irregular                  CASE N_PARAMS  OF                   4:domdef  min glamf neig1  max glamf neig2  min gphif neig1  max gphif neig2  GRIDTYPE   gridtype  MEMEINDICES   memeindices  ZINDEX   zindex  _extra   ex                   6:domdef  min glamf neig1  max glamf neig2  min gphif neig1  max gphif neig2  z1  z2  GRIDTYPE   gridtype  MEMEINDICES   memeindices  ZINDEX   zindex  _extra   ex                 ENDCASE                 RETURN               END             ENDCASE             ENDIF ELSE BEGIN             ras   report WARNING  The box does not contain any F points              firstxf    1   lastxf    1   nxf   0             firstyf    1   lastyf    1   nyf   0           ENDELSE         ENDIF ELSE BEGIN           jyf   dom   jpi           ixf   temporary dom  MOD jpi           firstxf   min temporary ixf  max   lastxf            firstyf   min temporary jyf  max   lastyf            nxf   lastxf   firstxf   1           nyf   lastyf   firstyf   1         ENDELSE       ENDELSE     ENDIF     ENDIF ELSE BEGIN     CASE 1 OF       horizontal domain defined with the X and Y indexes            keyword_set xindex  AND keyword_set yindex  OR keyword_set index :BEGIN         fstx   min x1  x2  max   lstx          fsty   min y1  y2  max   lsty          IF fstx LT 0 OR lstx GE jpi THEN BEGIN           ras   report Bad definition of X1 or X2            return         ENDIF         IF fsty LT 0 OR lsty GE jpj THEN BEGIN           ras   report Bad definition of Y1 or Y2            return         ENDIF         nx   lstx   fstx   1         ny   lsty   fsty   1   find lon1t  lon2t  lat1t  lat2t  firstxt  firstxt  nxt and nyt   according to x1  x2  y1  y2         IF  where gridtype eq  T 0  NE  1 OR  where gridtype eq  W 0  NE  1 THEN BEGIN           lon1t   min glamt fstx:lstx  fsty:lsty  max   lon2t            lat1t   min gphit fstx:lstx  fsty:lsty  max   lat2t            firstxt   fstx   lastxt   lstx           firstyt   fsty   lastyt   lsty           nxt   nx   nyt   ny         ENDIF   find lon1u  lon2u  lat1u  lat2u  firstxu  firstxu  nxu and nyu   according to x1  x2  y1  y2         IF  where gridtype eq  U 0  NE  1 THEN BEGIN           lon1u   min glamu fstx:lstx  fsty:lsty  max   lon2u            lat1u   min gphiu fstx:lstx  fsty:lsty  max   lat2u            firstxu   fstx   lastxu   lstx           firstyu   fsty   lastyu   lsty           nxu   nx   nyu   ny         ENDIF   find lon1v  lon2v  lat1v  lat2v  firstxv  firstxv  nxv and nyv   according to x1  x2  y1  y2         IF  where gridtype eq  V 0  NE  1 THEN BEGIN           lon1v   min glamv fstx:lstx  fsty:lsty  max   lon2v            lat1v   min gphiv fstx:lstx  fsty:lsty  max   lat2v            firstxv   fstx   lastxv   lstx           firstyv   fsty   lastyv   lsty           nxv   nx   nyv   ny         ENDIF            find lon1f  lon2f  lat1f  lat2f  firstxf  firstxf  nxf and nyf   according to x1  x2  y1  y2         IF  where gridtype eq  F 0  NE  1 THEN BEGIN           lon1f   min glamf fstx:lstx  fsty:lsty  max   lon2f            lat1f   min gphif fstx:lstx  fsty:lsty  max   lat2f            firstxf   fstx   lastxf   lstx           firstyf   fsty   lastyf   lsty           nxf   nx   nyf   ny         ENDIF         lon1   min lon1t  lon1u  lon1v  lon1f          lon2   max lon2t  lon2u  lon2v  lon2f          lat1   min lat1t  lat1u  lat1v  lat1f          lat2   max lat2t  lat2u  lat2v  lat2f        END       horizontal domain defined with the X index and lat1 lat2           keyword_set xindex :BEGIN         fstx   min x1  x2  max   lstx          IF fstx LT 0 OR lstx GE jpi THEN BEGIN           ras   report Bad definition of X1 or X2            return         ENDIF         nx   lstx   fstx   1         lat1   min y1  y2  max   lat2    find lon1t  lon2t  firstxt  firstxt  firstyt  firstyt  nxt   and nyt according to x1  x2  lat1 and lat2         IF  where gridtype eq  T 0  NE  1 OR  where gridtype EQ  W 0  NE  1 THEN BEGIN           firstxt   fstx   lastxt   lstx   nxt   nx           dom   where   gphit fstx:lstx    GE lat1  AND  gphit fstx:lstx    LE lat2              IF  dom 0  EQ  1  THEN BEGIN             IF keyword_set findalways  THEN BEGIN               print   WARNING  empty T points box  we get the neighnors to define a new box                neig1   neighbor lon1  lat1  glamt fstx:lstx    gphit fstx:lstx    sphere   keyword_set key_onearth    keyword_set key_irregular                neig2   neighbor lon2  lat2  glamt fstx:lstx    gphit fstx:lstx    sphere   keyword_set key_onearth    keyword_set key_irregular                CASE N_PARAMS  OF                 4:domdef  fstx  lstx  min gphit fstx:lstx   neig1  max gphit fstx:lstx   neig2  GRIDTYPE   gridtype  MEMEINDICES   memeindices   XINDEX  ZINDEX   zindex  _extra   ex                 6:domdef  fstx  lstx  min gphit fstx:lstx   neig1  max gphit fstx:lstx   neig2  z1  z2  GRIDTYPE   gridtype  MEMEINDICES   memeindices   XINDEX  ZINDEX   zindex  _extra   ex               ENDCASE               RETURN             ENDIF ELSE BEGIN               ras   report WARNING  The box does not contain any T points                firstyt    1   lastyt    1   nyt   0             ENDELSE           ENDIF ELSE BEGIN             jyt   temporary dom    nx             firstyt   min temporary jyt  max   lastyt              nyt   lastyt   firstyt   1           ENDELSE           IF nyt NE 0 THEN lon1t   min glamt firstxt:lastxt  firstyt:lastyt  max   lon2t          ENDIF   find lon1u  lon2u  firstxu  firstxu  firstyu  firstyu  nxu   and nyu according to x1  x2  lat1 and lat2         IF  where gridtype eq  U 0  NE  1 THEN BEGIN           firstxu   fstx   lastxu   lstx   nxu   nx           IF keyword_set memeindices  THEN BEGIN             firstyu   firstyt   lastyu   lastyt   nyu   nyt           ENDIF ELSE BEGIN             dom   where   gphiu fstx:lstx    GE lat1  AND  gphiu fstx:lstx    LE lat2                IF  dom 0  EQ  1  THEN BEGIN               IF keyword_set findalways  THEN BEGIN                 CASE 1 OF                    where gridtype eq  T 0  NE  1 OR  where gridtype EQ  W 0  NE  1:BEGIN                     print   WARNING  empty U points box  we use the same index as T points                      firstyu   firstyt   lastyu   lastyt   nyu   nyt                   END                    ELSE:BEGIN                     print   WARNING  empty U points box  we get the neighnors to define a new box                      neig1   neighbor lon1  lat1  glamu fstx:lstx    gphiu fstx:lstx    sphere   keyword_set key_onearth    keyword_set key_irregular                      neig2   neighbor lon2  lat2  glamu fstx:lstx    gphiu fstx:lstx    sphere   keyword_set key_onearth    keyword_set key_irregular                      CASE N_PARAMS  OF                       4:domdef  fstx  lstx  min gphiu fstx:lstx   neig1  max gphiu fstx:lstx   neig2  GRIDTYPE   gridtype  MEMEINDICES   memeindices   XINDEX  ZINDEX   zindex  _extra   ex                       6:domdef  fstx  lstx  min gphiu fstx:lstx   neig1  max gphiu fstx:lstx   neig2  z1  z2  GRIDTYPE   gridtype  MEMEINDICES   memeindices   XINDEX  ZINDEX   zindex  _extra   ex                     ENDCASE                     RETURN                   END                 ENDCASE                ENDIF ELSE BEGIN                 ras   report WARNING  The box does not contain any U points                  firstyu    1   lastyu    1   nyu   0               ENDELSE             ENDIF ELSE BEGIN               jyu   temporary dom    nx               firstyu   min temporary jyu  max   lastyu                nyu   lastyu   firstyu   1             ENDELSE           ENDELSE           IF nyu NE 0 THEN lon1u   min glamu firstxu:lastxu  firstyu:lastyu  max   lon2u          ENDIF   find lon1v  lon2v  firstxv  firstxv  firstyv  firstyv  nxv   and nyv according to x1  x2  lat1 and lat2         IF  where gridtype eq  V 0  NE  1 THEN BEGIN           firstxv   fstx   lastxv   lstx   nxv   nx           IF keyword_set memeindices  THEN BEGIN             firstyv   firstyt   lastyv   lastyt   nyv   nyt           ENDIF ELSE BEGIN             dom   where   gphiv fstx:lstx    GE lat1  AND  gphiv fstx:lstx    LE lat2                IF  dom 0  EQ  1  THEN BEGIN               IF keyword_set findalways  THEN BEGIN                 CASE 1 OF                    where gridtype eq  T 0  NE  1 OR  where gridtype EQ  W 0  NE  1:BEGIN                     print   WARNING  empty V points box  we use the same index as T points                      firstyv   firstyt   lastyv   lastyt   nyv   nyt                   END                     where gridtype eq  U 0  NE  1:BEGIN                     print   WARNING  empty V points box  we use the same index as U points                      firstyv   firstyu   lastyv   lastyu   nyv   nyu                   END                    ELSE:BEGIN                     print   WARNING  empty V points box  we get the neighnors to define a new box                      neig1   neighbor lon1  lat1  glamv fstx:lstx    gphiv fstx:lstx    sphere   keyword_set key_onearth    keyword_set key_irregular                      neig2   neighbor lon2  lat2  glamv fstx:lstx    gphiv fstx:lstx    sphere   keyword_set key_onearth    keyword_set key_irregular                      CASE N_PARAMS  OF                       4:domdef  fstx  lstx  min gphiv fstx:lstx   neig1  max gphiv fstx:lstx   neig2  GRIDTYPE   gridtype  MEMEINDICES   memeindices   XINDEX  ZINDEX   zindex  _extra   ex                       6:domdef  fstx  lstx  min gphiv fstx:lstx   neig1  max gphiv fstx:lstx   neig2  z1  z2  GRIDTYPE   gridtype  MEMEINDICES   memeindices   XINDEX  ZINDEX   zindex  _extra   ex                     ENDCASE                     RETURN                   END                  ENDCASE                ENDIF ELSE BEGIN                 ras   report WARNING  The box does not contain any V points                  firstyv    1   lastyv    1   nyv   0               ENDELSE             ENDIF ELSE BEGIN               jyv   temporary dom    nx               firstyv   min temporary jyv  max   lastyv                nyv   lastyv   firstyv   1             ENDELSE           ENDELSE           IF nyv NE 0 THEN lon1v   min glamv firstxv:lastxv  firstyv:lastyv  max   lon2v          ENDIF   find lon1f  lon2f  firstxf  firstxf  firstyf  firstyf  nxf   and nyf according to x1  x2  lat1 and lat2         IF  where gridtype eq  F 0  NE  1 THEN BEGIN           firstxf   fstx   lastxf   lstx   nxf   nx           IF keyword_set memeindices  THEN BEGIN             firstyf   firstyt   lastyf   lastyt   nyf   nyt           ENDIF ELSE BEGIN             dom   where   gphif fstx:lstx    GE lat1  AND  gphif fstx:lstx    LE lat2                IF  dom 0  EQ  1  THEN BEGIN               IF keyword_set findalways  THEN BEGIN                 CASE 1 OF                    where gridtype eq  T 0  NE  1 OR  where gridtype EQ  W 0  NE  1:BEGIN                     print   WARNING  empty F points box  we use the same index as T points                      firstyf   firstyt   lastyf   lastyt   nyf   nyt                   END                     where gridtype eq  U 0  NE  1:BEGIN                     print   WARNING  empty F points box  we use the same index as U points                      firstyf   firstyu   lastyf   lastyu   nyf   nyu                   END                     where gridtype eq  V 0  NE  1:BEGIN                     print   WARNING  empty F points box  we use the same index as V points                      firstyf   firstyv   lastyf   lastyv   nyf   nyv                   END                    ELSE:BEGIN                     print   WARNING  empty F points box  we get the neighnors to define a new box                      neig1   neighbor lon1  lat1  glamf fstx:lstx    gphif fstx:lstx    sphere   keyword_set key_onearth    keyword_set key_irregular                      neig2   neighbor lon2  lat2  glamf fstx:lstx    gphif fstx:lstx    sphere   keyword_set key_onearth    keyword_set key_irregular                      CASE N_PARAMS  OF                       4:domdef  fstx  lstx  min gphif fstx:lstx   neig1  max gphif fstx:lstx   neig2  GRIDTYPE   gridtype  MEMEINDICES   memeindices   XINDEX  ZINDEX   zindex  _extra   ex                       6:domdef  fstx  lstx  min gphif fstx:lstx   neig1  max gphif fstx:lstx   neig2  z1  z2  GRIDTYPE   gridtype  MEMEINDICES   memeindices   XINDEX  ZINDEX   zindex  _extra   ex                     ENDCASE                     RETURN                   END                 ENDCASE                ENDIF ELSE BEGIN                 ras   report WARNING  The box does not contain any F points                  firstyf    1   lastyf    1   nyf   0               ENDELSE             ENDIF ELSE BEGIN               jyf   temporary dom    nx               firstyf   min temporary jyf  max   lastyf                nyf   lastyf   firstyf   1             ENDELSE           ENDELSE           IF nyf NE 0 THEN lon1f   min glamf firstxf:lastxf  firstyf:lastyf  max   lon2f          ENDIF         lon1   min lon1t  lon1u  lon1v  lon1f          lon2   max lon2t  lon2u  lon2v  lon2f        END       horizontal domain defined with the Y index and lon1 lon2           keyword_set yindex :BEGIN         fsty   min y1  y2  max   lsty          IF fsty LT 0 OR lsty GE jpj THEN BEGIN           ras   report Bad definition of Y1 or Y2            return         ENDIF         ny   lsty   fsty   1         lon1   min x1  x2  max   lon2    find lat1t  lat2t  firstxt  firstxt  firstyt  firstyt  nxt   and nyt according to x1  x2  lon1 and lon2         IF  where gridtype eq  T 0  NE  1 OR  where gridtype EQ  W 0  NE  1 THEN BEGIN           firstyt   fsty   lastyt   lsty   nyt   ny           dom   where   glamt  fsty:lsty  GE lon1  AND  glamt  fsty:lsty  LE lon2              IF  dom 0  EQ  1  THEN BEGIN             IF keyword_set findalways  THEN BEGIN               print   WARNING  empty T points box  we get the neighnors to define a new box                neig1   neighbor lon1  lat1  glamt  fsty:lsty  gphit  fsty:lsty  sphere   keyword_set key_onearth    keyword_set key_irregular                neig2   neighbor lon2  lat2  glamt  fsty:lsty  gphit  fsty:lsty  sphere   keyword_set key_onearth    keyword_set key_irregular                CASE N_PARAMS  OF                 4:domdef  min glamt  fsty:lsty neig1  max glamt  fsty:lsty neig2  fsty  lsty  GRIDTYPE   gridtype  MEMEINDICES   memeindices   YINDEX  ZINDEX   zindex  _extra   ex                 6:domdef  min glamt  fsty:lsty neig1  max glamt  fsty:lsty neig2  fsty  lsty  z1  z2  GRIDTYPE   gridtype  MEMEINDICES   memeindices   YINDEX  ZINDEX   zindex  _extra   ex               ENDCASE               RETURN             ENDIF ELSE BEGIN               ras   report WARNING  The box does not contain any T points                firstxt    1   lastxt    1   nxt   0             ENDELSE           ENDIF ELSE BEGIN             jxt   temporary dom  MOD jpi             firstxt   min temporary jxt  max   lastxt              nxt   lastxt   firstxt   1           ENDELSE           IF nxt NE 0 THEN lat1t   min gphit firstxt:lastxt  firstyt:lastyt  max   lat2t          ENDIF   find lat1u  lat2u  firstxu  firstxu  firstyu  firstyu  nxu   and nyu according to x1  x2  lon1 and lon2         IF  where gridtype eq  U 0  NE  1 THEN BEGIN           firstyu   fsty   lastyu   lsty   nyu   ny           IF keyword_set memeindices  THEN BEGIN             firstxu   firstyt   lastxu   lastyt   nxu   nxt           ENDIF ELSE BEGIN             dom   where   glamu  fsty:lsty  GE lon1  AND  glamu  fsty:lsty  LE lon2                IF  dom 0  EQ  1  THEN BEGIN               IF keyword_set findalways  THEN BEGIN                 CASE 1 OF                    where gridtype eq  T 0  NE  1 OR  where gridtype EQ  W 0  NE  1:BEGIN                     print   WARNING  empty U points box  we use the same index as T points                      firstxu   firstxt   lastxu   lastxt   nxu   nxt                   END                    ELSE:BEGIN                     print   WARNING  empty U points box  we get the neighnors to define a new box                      neig1   neighbor lon1  lat1  glamu  fsty:lsty  gphiu  fsty:lsty  sphere   keyword_set key_onearth    keyword_set key_irregular                      neig2   neighbor lon2  lat2  glamu  fsty:lsty  gphiu  fsty:lsty  sphere   keyword_set key_onearth    keyword_set key_irregular                      CASE N_PARAMS  OF                       4:domdef  min glamu  fsty:lsty neig1  max glamu  fsty:lsty neig2  fsty  lsty  GRIDTYPE   gridtype  MEMEINDICES   memeindices   YINDEX  ZINDEX   zindex  _extra   ex                       6:domdef  min glamu  fsty:lsty neig1  max glamu  fsty:lsty neig2  fsty  lsty  z1  z2  GRIDTYPE   gridtype  MEMEINDICES   memeindices   YINDEX  ZINDEX   zindex  _extra   ex                     ENDCASE                     RETURN                   END                 ENDCASE                ENDIF ELSE BEGIN                 ras   report WARNING  The box does not contain any U points                  firstxu    1   lastxu    1   nxu   0               ENDELSE             ENDIF ELSE BEGIN               jxu   temporary dom  MOD jpi               firstxu   min temporary jxu  max   lastxu                nxu   lastxu   firstxu   1             ENDELSE           ENDELSE           IF nxu NE 0 THEN lat1u   min gphiu firstxu:lastxu  firstyu:lastyu  max   lat2u          ENDIF   find lat1v  lat2v  firstxv  firstxv  firstyv  firstyv  nxv   and nyv according to x1  x2  lon1 and lon2         IF  where gridtype eq  V 0  NE  1 THEN BEGIN           firstyv   fsty   lastyv   lsty   nyv   ny           IF keyword_set memeindices  THEN BEGIN             firstxv   firstyt   lastxv   lastyt   nxv   nxt           ENDIF ELSE BEGIN             dom   where   glamv  fsty:lsty  GE lon1  AND  glamv  fsty:lsty  LE lon2                IF  dom 0  EQ  1  THEN BEGIN               IF keyword_set findalways  THEN BEGIN                 CASE 1 OF                    where gridtype eq  T 0  NE  1 OR  where gridtype EQ  W 0  NE  1:BEGIN                     print   WARNING  empty V points box  we use the same index as T points                      firstxv   firstxt   lastxv   lastxt   nxv   nxt                   END                     where gridtype eq  U 0  NE  1:BEGIN                     print   WARNING  empty V points box  we use the same index as U points                      firstxv   firstxu   lastxv   lastxu   nxv   nxu                   END                    ELSE:BEGIN                     print   WARNING  empty V points box  we get the neighnors to define a new box                      neig1   neighbor lon1  lat1  glamv  fsty:lsty  gphiv  fsty:lsty  sphere   keyword_set key_onearth    keyword_set key_irregular                      neig2   neighbor lon2  lat2  glamv  fsty:lsty  gphiv  fsty:lsty  sphere   keyword_set key_onearth    keyword_set key_irregular                      CASE N_PARAMS  OF                       4:domdef  min glamv  fsty:lsty neig1  max glamv  fsty:lsty neig2  fsty  lsty  GRIDTYPE   gridtype  MEMEINDICES   memeindices   YINDEX  ZINDEX   zindex  _extra   ex                       6:domdef  min glamv  fsty:lsty neig1  max glamv  fsty:lsty neig2  fsty  lsty  z1  z2  GRIDTYPE   gridtype  MEMEINDICES   memeindices   YINDEX  ZINDEX   zindex  _extra   ex                     ENDCASE                     RETURN                   END                  ENDCASE                ENDIF ELSE BEGIN                 ras   report WARNING  The box does not contain any V points                  firstxv    1   lastxv    1   nxv   0               ENDELSE             ENDIF ELSE BEGIN               jxv   temporary dom  MOD jpi               firstxv   min temporary jxv  max   lastxv                nxv   lastxv   firstxv   1             ENDELSE           ENDELSE           IF nxv NE 0 THEN lat1v   min gphiv firstxv:lastxv  firstyv:lastyv  max   lat2v          ENDIF   find lat1f  lat2f  firstxf  firstxf  firstyf  firstyf  nxf   and nyf according to x1  x2  lon1 and lon2         IF  where gridtype eq  F 0  NE  1 THEN BEGIN           firstyf   fsty   lastyf   lsty   nyf   ny           IF keyword_set memeindices  THEN BEGIN             firstxf   firstyt   lastxf   lastyt   nxf   nxt           ENDIF ELSE BEGIN             dom   where   glamf  fsty:lsty  GE lon1  AND  glamf  fsty:lsty  LE lon2                IF  dom 0  EQ  1  THEN BEGIN               IF keyword_set findalways  THEN BEGIN                 CASE 1 OF                    where gridtype eq  T 0  NE  1 OR  where gridtype EQ  W 0  NE  1:BEGIN                     print   WARNING  empty F points box  we use the same index as T points                      firstxf   firstxt   lastxf   lastxt   nxf   nxt                   END                     where gridtype eq  U 0  NE  1:BEGIN                     print   WARNING  empty F points box  we use the same index as U points                      firstxf   firstxu   lastxf   lastxu   nxf   nxu                   END                     where gridtype eq  V 0  NE  1:BEGIN                     print   WARNING  empty F points box  we use the same index as V points                      firstxf   firstxv   lastxf   lastxv   nxf   nxv                   END                    ELSE:BEGIN                     print   WARNING  empty F points box  we get the neighnors to define a new box                      neig1   neighbor lon1  lat1  glamf  fsty:lsty  gphif  fsty:lsty  sphere   keyword_set key_onearth    keyword_set key_irregular                      neig2   neighbor lon2  lat2  glamf  fsty:lsty  gphif  fsty:lsty  sphere   keyword_set key_onearth    keyword_set key_irregular                      CASE N_PARAMS  OF                       4:domdef  min glamf  fsty:lsty neig1  max glamf  fsty:lsty neig2  fsty  lsty  GRIDTYPE   gridtype  MEMEINDICES   memeindices   YINDEX  ZINDEX   zindex  _extra   ex                       6:domdef  min glamf  fsty:lsty neig1  max glamf  fsty:lsty neig2  fsty  lsty  z1  z2  GRIDTYPE   gridtype  MEMEINDICES   memeindices   YINDEX  ZINDEX   zindex  _extra   ex                     ENDCASE                     RETURN                   END                  ENDCASE                ENDIF ELSE BEGIN                 ras   report WARNING  The box does not contain any F points                  firstxf    1   lastyf    1   nxf   0               ENDELSE             ENDIF ELSE BEGIN               jxf   temporary dom  MOD jpi               firstxf   min temporary jxf  max   lastxf                nxf   lastxf   firstxf   1             ENDELSE           ENDELSE           IF nxf NE 0 THEN lat1f   min gphif firstxf:lastxf  firstyf:lastyf  max   lat2f          ENDIF         lat1   min lat1t  lat1u  lat1v  lat1f          lat2   max lat2t  lat2u  lat2v  lat2f        END     ENDCASE   ENDELSE      The extracted domain is it regular or not       CASE 1 OF      where gridtype eq  T 0  NE  1 OR  where gridtype eq  W 0  NE  1  AND nxt NE 0 AND nyt NE 0:BEGIN   to get faster  we first test the most basic cases befor testing the   full array        CASE 0 OF         array_equal glamt firstxt:lastxt  firstyt  glamt firstxt:lastxt  lastyt :key_irregular   1b         array_equal gphit firstxt  firstyt:lastyt  gphit lastxt  firstyt:lastyt :key_irregular   1b         array_equal glamt firstxt:lastxt  firstyt:lastyt                          glamt firstxt:lastxt  firstyt replicate 1  nyt :key_irregular   1b         array_equal gphit firstxt:lastxt  firstyt:lastyt                          replicate 1  nxt gphit firstxt  firstyt:lastyt :key_irregular   1b         ELSE:key_irregular   0b       ENDCASE     END      where gridtype eq  U 0  NE  1 AND nxu NE 0 AND nyu NE 0:BEGIN       CASE 0 OF         array_equal glamu firstxu:lastxu  firstyu  glamu firstxu:lastxu  lastyu :key_irregular   1b         array_equal gphiu firstxu  firstyu:lastyu  gphiu lastxu  firstyu:lastyu :key_irregular   1b         array_equal glamu firstxu:lastxu  firstyu:lastyu                          glamu firstxu:lastxu  firstyu replicate 1  nyu :key_irregular   1b         array_equal gphiu firstxu:lastxu  firstyu:lastyu                          replicate 1  nxu gphiu firstxu  firstyu:lastyu :key_irregular   1b         ELSE:key_irregular   0b       ENDCASE     END      where gridtype eq  V 0  NE  1 AND nxv NE 0 AND nyv NE 0:BEGIN       CASE 0 OF         array_equal glamv firstxv:lastxv  firstyv  glamv firstxv:lastxv  lastyv :key_irregular   1b         array_equal gphiv firstxv  firstyv:lastyv  gphiv lastxv  firstyv:lastyv :key_irregular   1b         array_equal glamv firstxv:lastxv  firstyv:lastyv                          glamv firstxv:lastxv  firstyv replicate 1  nyv :key_irregular   1b         array_equal gphiv firstxv:lastxv  firstyv:lastyv                          replicate 1  nxv gphiv firstxv  firstyv:lastyv :key_irregular   1b         ELSE:key_irregular   0b       ENDCASE     END      where gridtype eq  F 0  NE  1 AND nxf NE 0 AND nyf NE 0:BEGIN       CASE 0 OF         array_equal glamf firstxf:lastxf  firstyf  glamf firstxf:lastxf  lastyf :key_irregular   1b         array_equal gphif firstxf  firstyf:lastyf  gphif lastxf  firstyf:lastyf :key_irregular   1b         array_equal glamf firstxf:lastxf  firstyf:lastyf                          glamf firstxf:lastxf  firstyf replicate 1  nyf :key_irregular   1b         array_equal gphif firstxf:lastxf  firstyf:lastyf                          replicate 1  nxf gphif firstxf  firstyf:lastyf :key_irregular   1b         ELSE:key_irregular   0b       ENDCASE     END     ELSE:   ENDCASE         define all vertical parameters     vert1  vert2   firstz tw  lastz tw  nz tw          vertical:       vertical domain defined with vert1  vert2     IF NOT  keyword_set zindex  OR keyword_set index  THEN BEGIN   define vert1 et vert2     CASE N_PARAMS  OF       2:vert1   min x1  x2  max   vert2        6:vert1   min z1  z2  max   vert2        ELSE:BEGIN         IF  inter byte gridtype  byte T   U   V   F 0  NE  1 THEN             vert1t   min gdept  max   vert2t          IF  where gridtype eq  W 0  NE  1 AND n_elements gdepw  NE 0 THEN             vert1w   min gdepw  max   vert2w          vert1   min vert1t  vert1w          vert2   max vert2t  vert2w        END     ENDCASE   define firstzt  firstzt  nzt     IF  inter byte gridtype  byte T   U   V   F 0  NE  1 THEN BEGIN       domz   where gdept ge vert1 and gdept le vert2  nzt        IF nzt NE 0 THEN BEGIN         firstzt   domz 0          lastzt   domz nzt 1        ENDIF ELSE BEGIN          ras   report WARNING  The box does not contain any T level          firstzt    1         lastzt    1       ENDELSE      ENDIF   define firstzw  firstzw  nzw     IF  where gridtype eq  W 0  NE  1 AND n_elements gdepw  NE 0 THEN BEGIN       IF keyword_set memeindices  THEN BEGIN         firstzw   firstzt         lastzw   lastzt         nzw   nzt       ENDIF ELSE BEGIN          domz   where gdepw ge vert1 and gdepw le vert2  nzw          IF nzw NE 0 THEN BEGIN           firstzw   domz 0            lastzw   domz nzw 1          ENDIF ELSE BEGIN            ras   report WARNING  The box does not contain any W level            firstzw    1           lastzw    1         ENDELSE        ENDELSE      ENDIF     vertical domain defined with the Z index     ENDIF ELSE BEGIN      CASE N_PARAMS  OF       2:fstz   min x1  x2  max   lstz        4:return       6:fstz   min z1  z2  max   lstz      ENDCASE     IF fstz LT 0 OR lstz GE jpk THEN BEGIN       ras   report Bad definition of X1  X2  Z1 or Z2        return     ENDIF     nz   lstz   fstz   1   find vert1t  vert2t  firstzt  firstzt  nzt   according to  x1  x2  or  z1  z2      IF  where gridtype eq  T 0  NE  1 THEN BEGIN       vert1t   min gdept fstz:lstz  max   vert2t        firstzt   fstz   lastzt   lstz   nzt   nz     ENDIF         find vert1w  vert2w  firstzw  firstzw  nzw   according to  x1  x2  or  z1  z2      IF  where gridtype eq  W 0  NE  1 AND n_elements gdepw  NE 0 THEN BEGIN       vert1w   min gdepw fstz:lstz  max   vert2w        firstzw   fstz   lastzw   lstz   nzw   nz     ENDIF           vert1   min vert1t  vert1w      vert2   max vert2t  vert2w    ENDELSE       IF NOT keyword_set key_forgetold  THEN BEGIN  updateold   ENDIF      if keyword_set key_performance  THEN print   temps domdef  systime 1 tempsun         return end"); 
    206 a[204] = new Array("./ToBeReviewed/GRILLE/f2v.html", "f2v.pro", "", "             file_comments   Allows to pass a field referring to the grid F on the grid V     thanks to the average:    res   0 5 res   shift res  1  0           categories    Grid      param TEMP  in required    A 2  3 or 4d array      returns   res  a 2  3 or 4d array      uses   common pro      restrictions    Force parameters of the zoom on the grid V to be the same as    those on the grid T       restrictions    Points which can not be calculated are put at the value NaN    consecrated by IDL:  values f_nan      history   From Marina Levy s programs   Sebastien Masson  smasson lodyc jussieu fr :   Validation  5 6 2000      version    Id: f2v pro 163 2006 08 29 12:59:46Z navarro             FUNCTION f2v  temp       compile_opt idl2  strictarrsubs    cm_4mesh  cm_4data  cm_4cal   IF NOT keyword_set key_forgetold  THEN BEGIN  updatenew   ENDIF      res   temp  We force nxt nxf  etc      firstxv   firstxf    lastxv   lastxf    firstyv   firstyf    lastyv   lastyf    nxv   nxf    nyv   nyf    vargrid    V     if NOT keyword_set valmask  then valmask   1e20    lon1   glamv firstxv  0     lon2   glamf lastxf  0     case on tha array s size and application    taille   size temp     CASE taille 0  OF        1: res    1       2: BEGIN           case 1 of             taille 1  eq nxf and taille 2  eq nyf:             taille 1  eq jpi and taille 2  eq jpj:                res res firstxf:lastxf  firstyf:lastyf              else:                return  report Probleme d adequation entre les tailles du domaine et de la boite           endcase          mask    fmask firstxf:lastxf  firstyf:lastyf  0           terre   where mask EQ 0            IF terre 0  NE  1 THEN res terre     values f_nan          res   0 5 res   shift res  1  0           if NOT  keyword_set key_periodic  AND nxf EQ jpi  then res 0       values f_nan          mask    vmask firstxf:lastxf  firstyf:lastyf  0           terre   where mask EQ 0            IF terre 0  NE  1 THEN res terre    valmask       END       3: BEGIN           case 1 of             taille 1  eq nxf and taille 2  eq nyf AND taille 3  EQ nzt:             taille 1  eq nxf and taille 2  eq nyf AND taille 3  EQ jpk:                res res    firstzt:lastzt              taille 1  eq nxf and taille 2  eq nyf AND taille 3  EQ jpt:             taille 1  eq jpi and taille 2  eq jpj AND taille 3  EQ jpk:                res res firstxf:lastxf  firstyf:lastyf  firstzt:lastzt              taille 1  eq jpi and taille 2  eq jpj AND taille 3  EQ jpt:                res res firstxf:lastxf  firstyf:lastyf                else:                return  report Probleme d adequation entre les tailles du domaine et de la boite           ENDCASE          if taille 3  EQ jpt then begin             mask    fmask firstxf:lastxf  firstyf:lastyf  lastzt nzt NE jpk              mask   temporary mask replicate 1  jpt              mask   reform mask  nxf  nyf  jpt   over           ENDIF ELSE mask    fmask firstxf:lastxf  firstyf:lastyf  firstzt:lastzt           terre   where temporary mask  EQ 0            IF terre 0  NE  1 THEN res temporary terre     values f_nan          res   0 5 res   shift res  1  0  0           if NOT  keyword_set key_periodic  AND nxf EQ jpi  then res 0         values f_nan          if taille 3  EQ jpt then BEGIN             mask   tmask firstxf:lastxf  firstyf:lastyf  lastzt nzt NE jpk              mask   temporary mask replicate 1  jpt              mask   reform mask  nxf  nyf  jpt   over           ENDIF ELSE mask    vmask firstxf:lastxf  firstyf:lastyf  firstzt:lastzt           terre   where temporary mask  EQ 0            IF terre 0  NE  1 THEN res temporary terre    valmask       END       4: BEGIN           case 1 of             taille 1  eq nxf and taille 2  eq nyf AND taille 3  EQ nzt AND taille 4  EQ jpt:             taille 1  eq nxf and taille 2  eq nyf AND taille 3  EQ jpk AND taille 4  EQ jpt:                res res    firstzt:lastzt                taille 1  eq jpi and taille 2  eq jpj AND taille 3  EQ jpk AND taille 4  EQ jpt:                res res firstxf:lastxf  firstyf:lastyf  firstzt:lastzt                else:                return  report Probleme d adequation entre les tailles du domaine et de la boite           ENDCASE          mask    fmask firstxf:lastxf  firstyf:lastyf  firstzt:lastzt           mask   temporary mask replicate 1  jpt           mask   reform mask  nxf  nyf  nzt  jpt   over           terre   where temporary mask  EQ 0            IF terre 0  NE  1 THEN res temporary terre     values f_nan          res   0 5 res   shift res  1  0  0  0           if NOT  keyword_set key_periodic  AND nxf EQ jpi  then res 0           values f_nan          mask    vmask firstxf:lastxf  firstyf:lastyf  firstzt:lastzt           mask   temporary mask replicate 1  jpt           mask   reform mask  nxf  nyf  nzt  jpt   over           terre   where temporary mask  EQ 0            IF terre 0  NE  1 THEN res temporary terre    valmask       END    endcase     IF NOT keyword_set key_forgetold  THEN BEGIN     updateold    ENDIF         return  res END "); 
    207 a[205] = new Array("./ToBeReviewed/GRILLE/fmask.html", "fmask.pro", "", "             file_comments   calculate fmask  Economize memory  we do not need to keep fmask anymore       categories   Utilities      returns   A 3d array corresponding to fmask       examples   Used like if fmask was a known array by substituing fmask by  fmask    For example: Instaed of write fmask domainef  we have to write  fmask domainef       history   Sebastien Masson  smasson lodyc jussieu fr                          11 12 98      version    Id: fmask pro 157 2006 08 21 09:01:50Z navarro             FUNCTION fmask       compile_opt idl2  strictarrsubs    cm_4mesh   IF NOT keyword_set key_forgetold  THEN BEGIN  updatenew   ENDIF     tempsun   systime 1             For key_performance      CASE size tmask   n_dimensions  OF     2:res   tmask shift tmask   1  0 shift tmask  0   1 shift tmask   1   1      3:res   tmask shift tmask   1  0  0 shift tmask  0   1  0 shift tmask   1   1  0    ENDCASE     if NOT keyword_set key_periodic  then res jpi 1        fmaskredy   res  jpj 1      fmaskredx     if keyword_set key_performance  THEN print   temps fmask  systime 1 tempsun       return  res end"); 
    208 a[206] = new Array("./ToBeReviewed/GRILLE/grille.html", "grille.pro", "", "             file_comments   Choose the grid which must be used to do the graph in function of   vargrid and send back corresponding parameters calculated in   domdef pro and reduced at the domain defined by domdef  contrarily   to grandegrille pro    BEWARE  The choice of the grid is made from the value of the    global variable vargrid  which can be equal to  T   U   V   W  ou  F       categories      keyword TRI    This keyword serve to obtain  thanks to grille  the triangulation which   refer to the grid but only on the part of the zoom  This of triangulation   is passed in the variable we have equate at TRI    For example: grille tri triangulation_reduite    This keyword is used in plt pro      keyword WDEPTH   To specify that the field is at W depth instead of T    depth  automatically activated if vargrid eq  W        keyword FORPLT   In plt  we want that land points  glam and gphi  be equal to glamt and    gphit regardless of the grid       keyword NOTRI   Useful only when TRI is activated  In this case  grill send back  1 in the    variable tri even if the variable of the common triangles_list is defined    and different of 1       keyword _EXTRA    Used to pass your keywords      keyword TOUT      param MASK  out optional    For the definition  see domdef and the management of subdomains on the web        param  GLAM  out optional    For the definition  see domdef and the management of subdomains on the web        param  GPHI  out optional    For the definition  see domdef and the management of subdomains on the web        param  GDEP  out optional    For the definition  see domdef and the management of subdomains on the web        param  NX  out optional    For the definition  see domdef and the management of subdomains on the web        param  NY  out optional    For the definition  see domdef and the management of subdomains on the web        param  NZ  out optional    For the definition  see domdef and the management of subdomains on the web        param  FIRSTX  out optional    For the definition  see domdef and the management of subdomains on the web        param  FIRSTY  out optional    For the definition  see domdef and the management of subdomains on the web        param  FIRSTZ  out optional    For the definition  see domdef and the management of subdomains on the web                param LASTX  out optional    For the definition  see domdef and the management of subdomains on the web        param  LASTY  out optional    For the definition  see domdef and the management of subdomains on the web        param  LASTZ  out optional    For the definition  see domdef and the management of subdomains on the web        param  E1  out optional    For the definition  see domdef and the management of subdomains on the web       param  E2  out optional    For the definition  see domdef and the management of subdomains on the web        param  E3  out optional    For the definition  see domdef and the management of subdomains on the web       uses   cm_4mesh    cm_4data      restrictions    Use the variable vargrid      restrictions   Vargrid must be  T   W   U   V  or  F       history    Sebastien Masson  smasson lodyc jussieu fr   12 2 1999                         10 11 1999  forplt      version    Id: grille pro 172 2006 09 11 07:11:26Z smasson         todo Comment ecrire la remarque sur les inputs             pro grille  mask  glam  gphi  gdep  nx  ny  nz  firstx  firsty  firstz  lastx  lasty  lastz  e1  e2  e3  TRI   tri  NOTRI   notri  TOUT   tout  FORPLT   forplt  TYPE   type  WDEPTH   wdepth  _EXTRA   ex     include commons     compile_opt idl2  strictarrsubs    cm_4mesh  cm_4data  cm_4cal   for jpt   IF NOT keyword_set key_forgetold  THEN BEGIN  updatenew   ENDIF     tempsun   systime 1             For key_performance     vargrid   strupcase strmid vargrid 0 reverse_offset      if vargrid eq  W  then wdepth   1   if keyword_set tout  then begin     savedbox   1b     saveboxparam   boxparam4grille dat      domdef  gridtype   vargrid  _EXTRA   ex   endif   tempdeux   systime 1            For key_performance  2       IF keyword_set wdepth  THEN BEGIN     firstz   firstzw      lastz   lastzw     nz   nzw   ENDIF ELSE BEGIN     firstz   firstzt     lastz   lastzt     nz   nzt   ENDELSE       CASE 1 OF      grid T and W       vargrid eq  T  OR vargrid eq  W  : begin  scalars       nx   nxt       ny   nyt       firstx   firstxt       firsty   firstyt       lastx   lastxt       lasty   lastyt  2d vectors       IF arg_present glam  THEN glam   glamt firstx:lastx  firsty:lasty        IF arg_present gphi  THEN gphi   gphit firstx:lastx  firsty:lasty        IF arg_present e1  THEN e1   e1t firstx:lastx  firsty:lasty        IF arg_present e2  THEN e2   e2t firstx:lastx  firsty:lasty   3d vectors        IF keyword_set forplt  THEN mask   tmask firstx:lastx  firsty:lasty  firstz          ELSE IF arg_present mask  THEN mask   tmask firstx:lastx  firsty:lasty  firstz:lastz      end     grid U       vargrid eq  U : begin  scalars       nx   nxu       ny   nyu       firstx   firstxu       firsty   firstyu       lastx   lastxu       lasty   lastyu  2d vectors       IF arg_present glam  THEN glam   glamu firstx:lastx  firsty:lasty        IF arg_present gphi  THEN gphi   gphiu firstx:lastx  firsty:lasty        if keyword_set forplt  then BEGIN         mask   1b tmask firstx:lastx  firsty:lasty  firstz          eastboarder   mask shift mask  1  0 mask         westboarder   mask shift mask   1  0 mask         if key_periodic NE 1 OR nx NE jpi then westboarder nx 1      0b         tmp1   shift eastboarder  0  1          tmp1  0    0b         tmp2   shift eastboarder  0   1          tmp2  ny 1    0b         add    temporary tmp1 temporary tmp2 1b eastboarder 1b temporary westboarder          eastboarder   temporary eastboarder temporary add          tmp1    mask shift mask  0   1 shift mask  0  1  NE 1b         tmp1  ny 1    1b         tmp1  0    1b         tmp2    mask shift mask   1  0 shift mask  1  0  NE 1b         if key_periodic NE 1 OR nx NE jpi then begin           tmp2 nx 1      1b           tmp2 0      0b         endif         no1   temporary tmp1 temporary tmp2          tmp   temporary eastboarder temporary no1 mask         mask 0:nx 2      0b          tmp   temporary tmp temporary mask          tmp   where tmp GE 1          if tmp 0  NE  1 then begin           glam tmp     glamt firstx:lastx  firsty:lasty tmp            gphi tmp     gphit firstx:lastx  firsty:lasty tmp          endif       ENDIF       IF arg_present e1  THEN e1    e1u firstx:lastx  firsty:lasty        IF arg_present e2  THEN e2    e2u firstx:lastx  firsty:lasty   3d vectors       IF keyword_set forplt  THEN mask    umask firstx:lastx  firsty:lasty  firstz          ELSE IF arg_present mask  THEN mask    umask firstx:lastx  firsty:lasty  firstz:lastz      end     grid V       vargrid eq  OPAPTDHV  or vargrid eq  OPAPT3DV          or vargrid eq  V : begin  scalars       nx   nxv       ny   nyv       firstx   firstxv       firsty   firstyv       lastx   lastxv       lasty   lastyv  2d vectors       IF arg_present glam  THEN glam   glamv firstx:lastx  firsty:lasty        IF arg_present gphi  THEN gphi   gphiv firstx:lastx  firsty:lasty        if keyword_set forplt  then BEGIN          mask   1b tmask firstx:lastx  firsty:lasty  firstz          northboarder   mask shift mask  0  1 mask         southboarder   mask shift mask  0   1 mask         southboarder  ny 1    0b         tmp1   shift northboarder   1  0          if key_periodic NE 1 OR nx NE jpi then tmp1 nx 1      0b         tmp2   shift northboarder  1  0          if key_periodic NE 1 OR nx NE jpi then tmp2 0      0b         add    temporary tmp1 temporary tmp2 1b northboarder 1b southboarder          northboarder   temporary northboarder temporary add          tmp1    mask shift mask  0   1 shift mask  0  1  NE 1b         tmp1  ny 1    1b         tmp1  0    0b         tmp2    mask shift mask   1  0 shift mask  1  0  NE 1b         if key_periodic NE 1 OR nx NE jpi then begin           tmp2 nx 1      1b           tmp2 0      1b         endif         no1   temporary tmp1 temporary tmp2          tmp   temporary northboarder mask temporary no1          mask  0:ny 2    0b         tmp   temporary tmp temporary mask          tmp   where tmp GE 1          if tmp 0  NE  1 then begin           glam tmp     glamt firstx:lastx  firsty:lasty tmp            gphi tmp     gphit firstx:lastx  firsty:lasty tmp          endif       ENDIF       IF arg_present e1  THEN e1    e1v firstx:lastx  firsty:lasty        IF arg_present e2  THEN e2    e2v firstx:lastx  firsty:lasty   3d vecteurs       IF keyword_set forplt  THEN mask    vmask firstx:lastx  firsty:lasty  firstz          ELSE IF arg_present mask  THEN mask    vmask firstx:lastx  firsty:lasty  firstz:lastz      end     grid F       vargrid eq  OPAPTDHF  or vargrid eq  OPAPT3DF           or vargrid eq  F : begin  scalars       nx   nxf       ny   nyf       firstx   firstxf       firsty   firstyf       lastx   lastxf       lasty   lastyf  2d vectors       IF arg_present glam  THEN glam   glamf firstx:lastx  firsty:lasty        IF arg_present gphi  THEN gphi   gphif firstx:lastx  firsty:lasty        if keyword_set forplt  then BEGIN          mask   1b tmask firstx:lastx  firsty:lasty  firstz          eastboarder   mask shift mask  1  0 mask         westboarder   mask shift mask   1  0 mask         westboarder nx 1      0b         northboarder   mask shift mask  0  1 mask         southboarder   mask shift mask  0   1 mask         southboarder  ny 1    0b         tmp1   shift northboarder   1  0          if key_periodic NE 1 OR nx NE jpi then tmp1 nx 1      0b         tmp2   shift northboarder  1  0          if key_periodic NE 1 OR nx NE jpi then tmp2 0      0b         add    temporary tmp1 temporary tmp2 1b northboarder 1b southboarder          northboarder   temporary northboarder temporary add          tmp1   shift eastboarder  0  1          tmp1  0    0b         tmp2   shift eastboarder  0   1          tmp2  ny 1    0b         add    temporary tmp1 temporary tmp2 1b eastboarder 1b temporary westboarder          eastboarder   temporary eastboarder temporary add          tmp1    mask shift mask  0   1 shift mask  0  1  NE 1b         tmp1  ny 1    1b         tmp1  0    1b         tmp2    mask shift mask   1  0 shift mask  1  0  NE 1b         if key_periodic NE 1 OR nx NE jpi then begin           tmp2 nx 1      1b           tmp2 0      1b         endif         no1   temporary tmp1 temporary tmp2          tmp    temporary northboarder temporary eastboarder mask temporary no1          mask 0:nx 2      0b          mask  0:ny 2    0b          tmp   temporary tmp temporary mask          tmp   where tmp GE 1          if tmp 0  NE  1 then begin           glam tmp     glamt firstx:lastx  firsty:lasty tmp            gphi tmp     gphit firstx:lastx  firsty:lasty tmp          endif       ENDIF       IF arg_present e1  THEN e1    e1f firstx:lastx  firsty:lasty        IF arg_present e2  THEN e2    e2f firstx:lastx  firsty:lasty   3d vectors        IF keyword_set forplt  THEN mask    fmask firstx:lastx  firsty:lasty  firstz          ELSE IF arg_present mask  THEN mask    fmask firstx:lastx  firsty:lasty  firstz:lastz      END       ELSE:BEGIN        ras   report Wrong definition of vargrid    vargrid  Only T  U  V  W or F are acceptable        stop     END   ENDCASE   IF testvar var   key_performance  EQ 2 THEN       print   temps grille: attribution des scalaires  vecteurs et tableaux   systime 1 tempdeux           Variables refering to the vertical dimension             tempdeux   systime 1            For key_performance  2   if keyword_set wdepth  then begin     gdep   gdepw firstz:lastz      e3   e3w firstz:lastz    endif else begin     gdep   gdept firstz:lastz      e3   e3t firstz:lastz    ENDELSE   for the vertical sections with partial steps   IF keyword_set type  AND keyword_set key_partialstep  THEN BEGIN     CASE 1 OF       type EQ  xz  AND ny EQ 1:BEGIN         bottom   total tmask firstx:lastx  firsty:lasty  firstz:lastz  3          good   where bottom NE 0 AND bottom NE nz keyword_set wdepth          bottom   lindgen nx bottom 1l keyword_set wdepth nx         IF good 0  NE  1 THEN BEGIN           bottom   bottom good            IF lastz EQ jpk 1 THEN gdep nz 1    max hdepw            gdep   replicate 1  nx gdep           if keyword_set wdepth  THEN               truegdep   hdepw firstx:lastx  firsty:lasty              ELSE truegdep   hdept firstx:lastx  firsty:lasty            gdep bottom    truegdep good          ENDIF       END       type EQ  yz  AND nx EQ 1:BEGIN         bottom   total tmask firstx:lastx  firsty:lasty  firstz:lastz  3          good   where bottom NE 0 AND bottom NE nz keyword_set wdepth          bottom   lindgen ny bottom 1l keyword_set wdepth ny         IF good 0  NE  1 THEN BEGIN           bottom   bottom good            IF lastz EQ jpk 1 THEN gdep nz 1    max hdepw            gdep   replicate 1  ny gdep           if keyword_set wdepth  THEN               truegdep   hdepw firstx:lastx  firsty:lasty              ELSE truegdep   hdept firstx:lastx  firsty:lasty            gdep bottom    truegdep good          ENDIF       END       ELSE:     ENDCASE   ENDIF   for the vertical sections with roms   IF keyword_set type  AND n_elements romszinfos  NE 0 THEN BEGIN     romsdp   romsdepth      IF romsdp 0  NE  1 THEN BEGIN        IF jpt EQ 1 THEN BEGIN         CASE type OF            z :gdep   moyenne temporary romsdp   xy             xz :gdep   moyenne temporary romsdp   y             yz :gdep   moyenne temporary romsdp   x             zt :gdep   moyenne temporary romsdp   xy            ELSE:         ENDCASE       ENDIF ELSE BEGIN          CASE type OF            z :gdep   moyenne temporary romsdp   xyt             xz :gdep   grossemoyenne temporary romsdp   yt             yz :gdep   grossemoyenne temporary romsdp   xt             zt :gdep   grossemoyenne temporary romsdp   xy            ELSE:         ENDCASE       ENDELSE       IF size gdep   n_dimensions  EQ 2 THEN            gdep   remplit gdep  niter   32000  mask   gdep LT 1 E19   basique   fillxdir      ENDIF   ENDIF     IF testvar var   key_performance  EQ 2 THEN       print   temps grille: Variables se rapportant a la dimension verticale   systime 1 tempdeux     Triangulation vector when TRI is activated      if arg_present TRI  then       if triangles_list 0  EQ  1 OR keyword_set notri  then tri    1 ELSE BEGIN      tempdeux   systime 1          pour key_performance  2     msk   bytarr jpi  jpj      msk firstx:lastx  firsty:lasty    1     ind   where  msk triangles_list 0   msk triangles_list 1   msk triangles_list 2    EQ 1       tri   triangles_list  ind firstx firsty jpi      y   tri jpi     x   tri y jpi     tri   x y nx     IF testvar var   key_performance  EQ 2 THEN         print   temps grille: decoupage de la triangulation   systime 1 tempdeux   ENDELSE     To make sure there is not any degenerated dimension  1         mask reform mask   over       glam reform glam   over       gphi reform gphi   over       gdep reform gdep   over       e1 reform e1   over       e2 reform e2   over       e3 reform e3   over     if keyword_set savedbox  THEN restoreboxparam   boxparam4grille dat    if keyword_set key_performance  THEN print   temps grille  systime 1 tempsun       IF NOT keyword_set key_forgetold  THEN BEGIN  updateold   ENDIF      return  end       "); 
    209 a[207] = new Array("./ToBeReviewed/GRILLE/t2v.html", "t2v.pro", "", "             file_comments   Allows to pass a field referring to the grid T on the grid V     thanks to the average res   0 5 res   shift res  0   1        categories    Grid      param TEMP  in required    A 2  3 or 4d array      returns   res  a 2  3 or 4d array      uses   common pro      restrictions    Force parameters of the zoom on the grid V to be the same as    those on the grid T       restrictions    Points which can not be calculated are put at the value NaN    consecrated by IDL:  values f_nan      history   From Marina Levy s programs   Sebastien Masson  smasson lodyc jussieu fr :   Validation  5 6 2000      version    Id: t2v pro 163 2006 08 29 12:59:46Z navarro             FUNCTION t2v  temp       compile_opt idl2  strictarrsubs    cm_4mesh  cm_4data  cm_4cal   IF NOT keyword_set key_forgetold  THEN BEGIN  updatenew   ENDIF      res   temp   We force nxt nxv  etc      firstxv   firstxt    lastxv   lastxt    firstyv   firstyt    lastyv   lastyt    nxv   nxt    nyv   nyt    vargrid    V     if NOT keyword_set valmask  then valmask   1e20    lat1   gphit 0  firstyt     lat2   gphiv 0  lastyv     case on tha array s size and application    taille   size temp     CASE taille 0  OF        1: res    1       2: BEGIN           case 1 of             taille 1  eq nxt and taille 2  eq nyt:             taille 1  eq jpi and taille 2  eq jpj:                res res firstxt:lastxt  firstyt:lastyt              else:                return  report Probleme d adequation entre les tailles du domaine et de la boite           endcase          mask   tmask firstxt:lastxt  firstyt:lastyt  0           terre   where mask EQ 0            IF terre 0  NE  1 THEN res terre     values f_nan          res   0 5 res   shift res  0   1           res  nyt 1     values f_nan          mask    vmask firstxt:lastxt  firstyt:lastyt  0           terre   where mask EQ 0            IF terre 0  NE  1 THEN res terre    valmask       END       3: BEGIN           case 1 of             taille 1  eq nxt and taille 2  eq nyt AND taille 3  EQ nzt:             taille 1  eq nxt and taille 2  eq nyt AND taille 3  EQ jpk:                res res    firstzt:lastzt              taille 1  eq nxt and taille 2  eq nyt AND taille 3  EQ jpt:             taille 1  eq jpi and taille 2  eq jpj AND taille 3  EQ jpk:                res res firstxt:lastxt  firstyt:lastyt  firstzt:lastzt              taille 1  eq jpi and taille 2  eq jpj AND taille 3  EQ jpt:                res res firstxt:lastxt  firstyt:lastyt                else:                return  report Probleme d adequation entre les tailles du domaine et de la boite           ENDCASE          if taille 3  EQ jpt then begin             mask   tmask firstxt:lastxt  firstyt:lastyt  lastzt nzt NE jpk              mask   temporary mask replicate 1  jpt              mask   reform mask  nxt  nyt  jpt   over           ENDIF ELSE mask   tmask firstxt:lastxt  firstyt:lastyt  firstzt:lastzt           terre   where temporary mask  EQ 0            IF terre 0  NE  1 THEN res temporary terre     values f_nan          res   0 5 res   shift res  0   1  0           res  nyt 1       values f_nan          if taille 3  EQ jpt then BEGIN             mask    vmask firstxt:lastxt  firstyt:lastyt  lastzt nzt NE jpk              mask   temporary mask replicate 1  jpt              mask   reform mask  nxt  nyt  jpt   over           ENDIF ELSE mask    vmask firstxt:lastxt  firstyt:lastyt  firstzt:lastzt           terre   where temporary mask  EQ 0            IF terre 0  NE  1 THEN res temporary terre    valmask       END       4: BEGIN           case 1 of             taille 1  eq nxt and taille 2  eq nyt AND taille 3  EQ nzt AND taille 4  EQ jpt:             taille 1  eq nxt and taille 2  eq nyt AND taille 3  EQ jpk AND taille 4  EQ jpt:                res res    firstzt:lastzt                taille 1  eq jpi and taille 2  eq jpj AND taille 3  EQ jpk AND taille 4  EQ jpt:                res res firstxt:lastxt  firstyt:lastyt  firstzt:lastzt                else:                return  report Probleme d adequation entre les tailles du domaine et de la boite           ENDCASE          mask   tmask firstxt:lastxt  firstyt:lastyt  firstzt:lastzt           mask   temporary mask replicate 1  jpt           mask   reform mask  nxt  nyt  nzt  jpt   over           terre   where temporary mask  EQ 0            IF terre 0  NE  1 THEN res temporary terre     values f_nan          res   0 5 res   shift res  0   1  0  0           res  nyt 1         values f_nan          mask    vmask firstxt:lastxt  firstyt:lastyt  firstzt:lastzt           mask   temporary mask replicate 1  jpt           mask   reform mask  nxt  nyt  nzt  jpt   over           terre   where temporary mask  EQ 0            IF terre 0  NE  1 THEN res temporary terre    valmask       END     ENDCASE    IF NOT keyword_set key_forgetold  THEN BEGIN     updateold   ENDIF      return  res END "); 
    210 a[208] = new Array("./ToBeReviewed/GRILLE/tracegrille.html", "tracegrille.pro", "", "             file_comments   Draw the grid      categories       param GLAMIN  in required    The 1d or 2d array in longitude of points of the grid If GLAM GLAMIN    is not specified  it trace the grid specified by vargrid  on the    domain defined by domdef       param GPHIIN  in required    The 1d or 2d array in latitude of points of the grid If GPHI GPHIIN    is not specified  it trace the grid specified by vargrid  on the    domain defined by domdef       keyword XSTRIDE  type integer     It specify that we want to trace only one line of    constant i every xstride points      keyword YSTRIDE  type integer    It specify that we want to trace only one line of    constant j every xstride points      keyword OCEAN    To trace the grid only on ocean points        keyword EARTH   To trace the grid only on land points       keyword RMOUT   Select to remove all cell having one corner out of the   plot boundaries  x range   y range       keyword _EXTRA   Used to pass your keywords        uses   common pro       examples         IDL  plt indgen jpi jpj nocontour nofill       IDL  vargrid T        IDL  tracegrille ocean color 20       IDL  tracegrille earth color 80        history   Sebastien Masson  smasson lodyc jussieu fr       version    Id: tracegrille pro 163 2006 08 29 12:59:46Z navarro                               PRO tracegrille  glamin  gphiin  OCEAN   ocean  EARTH   earth                      XSTRIDE   xstride  YSTRIDE   ystride  RMOUT   rmout                      _extra   extra       compile_opt idl2  strictarrsubs    cm_4mesh  cm_4data   IF NOT keyword_set key_forgetold  THEN BEGIN  updatenew   ENDIF     tempsun   systime 1             For key_performance   to avoid warning message   oldexcept    except    except   0   if n_elements key_gridtype  EQ 0 then key_gridtype    c      if n_elements glamin    n_elements gphiin  EQ 0 then BEGIN     grille  mask  glam  gphi  gdep  nx  ny  nz  firstx  firsty  firstz  lastx  lasty  lastz     IF keyword_set ocean  AND key_gridtype EQ  c  THEN BEGIN   we reduce the mask to take into account the point located ON the coastline        CASE vargrid OF          U :BEGIN           mask   tmask firstx:lastx  firsty:lasty            IF NOT keyword_set key_periodic  OR nx NE jpi               THEN tmpx   mask nx 1              mask    mask shift mask   1  0    1           IF NOT keyword_set key_periodic  OR nx NE jpi               THEN mask nx 1      temporary tmpx          END          V :BEGIN           mask   tmask firstx:lastx  firsty:lasty            tmpy   mask  ny 1            mask    mask shift mask  0   1    1           mask  ny 1    temporary tmpy          END          F :BEGIN           mask   tmask firstx:lastx  firsty:lasty            IF NOT keyword_set key_periodic  OR nx NE jpi               THEN tmpx   mask nx 1              tmpy   mask  ny 1            mask    mask shift mask   1  0 shift mask  0   1 shift mask   1   1    1           mask  ny 1    temporary tmpy            IF NOT keyword_set key_periodic  OR nx NE jpi               THEN mask nx 1      temporary tmpx          END         ELSE:       ENDCASE     ENDIF   ENDIF ELSE BEGIN     glam   glamin     gphi   gphiin     IF  size glam 0  EQ 1 AND  size gphi 0  EQ 1 THEN BEGIN       nx   n_elements glam         ny   n_elements gphi         glam   glam replicate 1  ny        gphi   replicate 1  nx gphi     ENDIF ELSE BEGIN       nx    size glam 1        ny    size glam 2      ENDELSE   ENDELSE   if n_elements mask  EQ 0 then mask   replicate 1b  nx  ny    if  size mask 0  EQ 3 then mask   mask    0      IF keyword_set RMOUT  THEN BEGIN     out   where glam GT max x range  OR glam LT min x range                    OR gphi GT max y range  OR gphi LT min y range      IF out 0  NE  1 THEN BEGIN       glam out     values f_nan       gphi out     values f_nan     ENDIF   ENDIF     IF keyword_set ocean  then BEGIN     earth   where mask EQ 0      if earth 0  NE  1 then begin       glam earth     values f_nan       gphi earth     values f_nan     ENDIF     earth   0   ENDIF     IF keyword_set earth  THEN BEGIN     ocean   where mask EQ 1      if ocean 0  NE  1 then begin       glam ocean     values f_nan       gphi ocean     values f_nan     ENDIF     ocean   0   ENDIF     if NOT keyword_set xstride  then xstride   1   if NOT keyword_set ystride  then ystride   1   case key_gridtype of      c :BEGIN       for i   0  ny 1  ystride do begin         plots   glam  i  gphi  i  _extra   extra       endfor       for i   0  nx 1  xstride do begin         plots   glam i    gphi i    _extra   extra       endfor     END      e :BEGIN       shifted   glam 0  0  LT glam 0  1        glam2   glam glam 1 glam 0 2        if shifted then begin         for i   0  ny 2 do BEGIN           xx    transpose glam  i   glam2  i            yy    transpose gphi  i   gphi  i 1            plots  xx 0:2 nx 2  yy 0:2 nx 2  _extra   extra         ENDFOR       ENDIF ELSE BEGIN         for i   1  ny 1 do BEGIN           xx    transpose glam  i   glam2  i            yy    transpose gphi  i   gphi  i 1            plots  xx 0:2 nx 2  yy 0:2 nx 2  _extra   extra         ENDFOR       ENDELSE       for i   1   ny 1 2 do           plots   glam 0  2 i 1  glam 0  2 i               gphi 0  2 i 1  gphi 0  2 i  _extra   extra       for i   0   ny 2 2 do           plots   glam nx 1  2 i  glam nx 1  2 i 1               gphi nx 1  2 i  gphi nx 1  2 i 1  _extra   extra     END   endcase    if keyword_set key_performance  THEN print   temps trace grille  systime 1 tempsun     except   oldexcept    return end"); 
    211 a[209] = new Array("./ToBeReviewed/GRILLE/u2t.html", "u2t.pro", "", "             file_comments   Allows to pass a field referring to the grid U on the grid T     thanks to the average:    res   0 5 res   shift res  1  0           categories    Grid      param TEMP  in required    A 2  3 or 4d array      returns   res  a 2  3 or 4d array      uses   common pro      restrictions    Force parameters of the zoom on the grid V to be the same as    those on the grid T       restrictions    Points which can not be calculated are put at the value NaN    consecrated by IDL:  values f_nan      history   From Marina Levy s programs   Sebastien Masson  smasson lodyc jussieu fr :   Validation  5 6 2000      version    Id: u2t pro 163 2006 08 29 12:59:46Z navarro             FUNCTION u2t  temp       compile_opt idl2  strictarrsubs    cm_4mesh  cm_4data  cm_4cal   IF NOT keyword_set key_forgetold  THEN BEGIN  updatenew   ENDIF      res   temp  on force nxt nxu  etc      firstxt   firstxu    lastxt   lastxu    firstyt   firstyu    lastyt   lastyu    nxt   nxu    nyt   nyu    vargrid    T     if NOT keyword_set valmask  then valmask   1e20    lon1   glamt firstxt  0     lon2   glamu lastxu  0      case on tha array s size and application    taille   size temp     CASE taille 0  OF        1: res    1       2: BEGIN           case 1 of             taille 1  eq nxu and taille 2  eq nyu:             taille 1  eq jpi and taille 2  eq jpj:                res res firstxu:lastxu  firstyu:lastyu              else:                return  report Probleme d adequation entre les tailles du domaine et de la boite           endcase          mask    umask firstxu:lastxu  firstyu:lastyu  0           terre   where mask EQ 0            IF terre 0  NE  1 THEN res terre     values f_nan          res   0 5 res   shift res  1  0           if NOT  keyword_set key_periodic  AND nxu EQ jpi  then res 0       values f_nan          mask   tmask firstxu:lastxu  firstyu:lastyu  0           terre   where mask EQ 0            IF terre 0  NE  1 THEN res terre    valmask       END       3: BEGIN           case 1 of             taille 1  eq nxu and taille 2  eq nyu AND taille 3  EQ nzt:             taille 1  eq nxu and taille 2  eq nyu AND taille 3  EQ jpk:                res res    firstzt:lastzt              taille 1  eq nxu and taille 2  eq nyu AND taille 3  EQ jpt:             taille 1  eq jpi and taille 2  eq jpj AND taille 3  EQ jpk:                res res firstxu:lastxu  firstyu:lastyu  firstzt:lastzt              taille 1  eq jpi and taille 2  eq jpj AND taille 3  EQ jpt:                res res firstxu:lastxu  firstyu:lastyu                else:                return  report Probleme d adequation entre les tailles du domaine et de la boite           ENDCASE          if taille 3  EQ jpt then begin             mask    umask firstxu:lastxu  firstyu:lastyu  lastzt nzt NE jpk              mask   temporary mask replicate 1  jpt              mask   reform mask  nxu  nyu  jpt   over           ENDIF ELSE mask    umask firstxu:lastxu  firstyu:lastyu  firstzt:lastzt           terre   where temporary mask  EQ 0            IF terre 0  NE  1 THEN res temporary terre     values f_nan          res   0 5 res   shift res  1  0  0           if NOT  keyword_set key_periodic  AND nxu EQ jpi  then res 0         values f_nan          if taille 3  EQ jpt then BEGIN             mask   tmask firstxu:lastxu  firstyu:lastyu  lastzt nzt NE jpk              mask   temporary mask replicate 1  jpt              mask   reform mask  nxu  nyu  jpt   over           ENDIF ELSE mask   tmask firstxu:lastxu  firstyu:lastyu  firstzt:lastzt           terre   where temporary mask  EQ 0            IF terre 0  NE  1 THEN res temporary terre    valmask       END       4: BEGIN           case 1 of             taille 1  eq nxu and taille 2  eq nyu AND taille 3  EQ nzt AND taille 4  EQ jpt:             taille 1  eq nxu and taille 2  eq nyu AND taille 3  EQ jpk AND taille 4  EQ jpt:                res res    firstzt:lastzt                taille 1  eq jpi and taille 2  eq jpj AND taille 3  EQ jpk AND taille 4  EQ jpt:                res res firstxu:lastxu  firstyu:lastyu  firstzt:lastzt                else:                return  report Probleme d adequation entre les tailles du domaine et de la boite           ENDCASE          mask    umask firstxu:lastxu  firstyu:lastyu  firstzt:lastzt           mask   temporary mask replicate 1  jpt           mask   reform mask  nxu  nyu  nzt  jpt   over           terre   where temporary mask  EQ 0            IF terre 0  NE  1 THEN res temporary terre     values f_nan          res   0 5 res   shift res  1  0  0  0           if NOT  keyword_set key_periodic  AND nxu EQ jpi  then res 0           values f_nan          mask   tmask firstxu:lastxu  firstyu:lastyu  firstzt:lastzt           mask   temporary mask replicate 1  jpt           mask   reform mask  nxu  nyu  nzt  jpt   over           terre   where temporary mask  EQ 0            IF terre 0  NE  1 THEN res temporary terre    valmask       END    endcase    IF NOT keyword_set key_forgetold  THEN BEGIN     updateold   ENDIF        return  res END "); 
    212 a[210] = new Array("./ToBeReviewed/GRILLE/umask.html", "umask.pro", "", "             file_comments   calculate umask  Economize memory  we do not need to keep umask anymore       categories   Utilities       returns   A 3d array corresponding to umask        uses   common pro      examples   Used like if umask was a known array by substituing umask by  umask    For example: Instaed of write umask domainef  we have to write  umask domainef      MODIFICATION HISTORY: Sebastien Masson  smasson lodyc jussieu fr                          11 12 98                          6 99 introduction of the key_shift                         20 9 99 cas jpk 1  Thanks to  jpblod ipsl jussieu fr       version    Id: umask pro 157 2006 08 21 09:01:50Z navarro             FUNCTION umask       compile_opt idl2  strictarrsubs    cm_4mesh   IF NOT keyword_set key_forgetold  THEN BEGIN  updatenew   ENDIF     tempsun   systime 1             For key_performance     CASE size tmask   n_dimensions  OF     2:res   tmask shift tmask   1  0      3:res   tmask shift tmask   1  0  0    ENDCASE        if NOT keyword_set key_periodic  then res jpi 1        umaskred   if keyword_set key_performance  THEN print   temps umask  systime 1 tempsun      return  res end"); 
    213 a[211] = new Array("./ToBeReviewed/GRILLE/v2t.html", "v2t.pro", "", "             file_comments   Allows to pass a field referring to the grid V on the grid T     thanks to the average:    res   0 5 res   shift res  1  0           categories    Grid      param TEMP  in required    A 2  3 or 4d array      returns   res  a 2  3 or 4d array      uses   common pro      restrictions    Force parameters of the zoom on the grid V to be the same as    those on the grid T       restrictions    Points which can not be calculated are put at the value NaN    consecrated by IDL:  values f_nan      history   From Marina Levy s programs   Sebastien Masson  smasson lodyc jussieu fr :   Validation  5 6 2000      version    Id: v2t pro 163 2006 08 29 12:59:46Z navarro        todo seb: nom du input            FUNCTION v2t  temp       compile_opt idl2  strictarrsubs    cm_4mesh  cm_4data  cm_4cal   IF NOT keyword_set key_forgetold  THEN BEGIN  updatenew   ENDIF      res   temp  We force nxt nxv  etc      firstxt   firstxv    lastxt   lastxv    firstyt   firstyv    lastyt   lastyv    nxt   nxv    nyt   nyv    vargrid    T     if NOT keyword_set valmask  then valmask   1e20    lat1   gphit 0  firstyt     lat2   gphiv 0  lastyv     case on tha array s size and application    taille   size temp     CASE taille 0  OF        1: res    1       2: BEGIN           case 1 of             taille 1  eq nxv and taille 2  eq nyv:             taille 1  eq jpi and taille 2  eq jpj:                res res firstxv:lastxv  firstyv:lastyv              else:                return  report Probleme d adequation entre les tailles du domaine et de la boite           endcase          mask    vmask firstxv:lastxv  firstyv:lastyv  0           terre   where mask EQ 0            IF terre 0  NE  1 THEN res terre     values f_nan          res   0 5 res   shift res  0   1           res  0     values f_nan          mask   tmask firstxv:lastxv  firstyv:lastyv  0           terre   where mask EQ 0            IF terre 0  NE  1 THEN res terre    valmask       END       3: BEGIN           case 1 of             taille 1  eq nxv and taille 2  eq nyv AND taille 3  EQ nzt:             taille 1  eq nxv and taille 2  eq nyv AND taille 3  EQ jpk:                res res    firstzt:lastzt              taille 1  eq nxv and taille 2  eq nyv AND taille 3  EQ jpt:             taille 1  eq jpi and taille 2  eq jpj AND taille 3  EQ jpk:                res res firstxv:lastxv  firstyv:lastyv  firstzt:lastzt              taille 1  eq jpi and taille 2  eq jpj AND taille 3  EQ jpt:                res res firstxv:lastxv  firstyv:lastyv                else:                return  report Probleme d adequation entre les tailles du domaine et de la boite           ENDCASE          if taille 3  EQ jpt then begin             mask    vmask firstxv:lastxv  firstyv:lastyv  lastzt nzt NE jpk              mask   temporary mask replicate 1  jpt              mask   reform mask  nxv  nyv  jpt   over           ENDIF ELSE mask    vmask firstxv:lastxv  firstyv:lastyv  firstzt:lastzt           terre   where temporary mask  EQ 0            IF terre 0  NE  1 THEN res temporary terre     values f_nan          res   0 5 res   shift res  0   1  0           res  0       values f_nan          if taille 3  EQ jpt then BEGIN             mask   tmask firstxv:lastxv  firstyv:lastyv  lastzt nzt NE jpk              mask   temporary mask replicate 1  jpt              mask   reform mask  nxv  nyv  jpt   over           ENDIF ELSE mask   tmask firstxv:lastxv  firstyv:lastyv  firstzt:lastzt           terre   where temporary mask  EQ 0            IF terre 0  NE  1 THEN res temporary terre    valmask       END       4: BEGIN           case 1 of             taille 1  eq nxv and taille 2  eq nyv AND taille 3  EQ nzt AND taille 4  EQ jpt:             taille 1  eq nxv and taille 2  eq nyv AND taille 3  EQ jpk AND taille 4  EQ jpt:                res res    firstzt:lastzt                taille 1  eq jpi and taille 2  eq jpj AND taille 3  EQ jpk AND taille 4  EQ jpt:                res res firstxv:lastxv  firstyv:lastyv  firstzt:lastzt                else:                return  report Probleme d adequation entre les tailles du domaine et de la boite           ENDCASE          mask    vmask firstxv:lastxv  firstyv:lastyv  firstzt:lastzt           mask   temporary mask replicate 1  jpt           mask   reform mask  nxv  nyv  nzt  jpt   over           terre   where temporary mask  EQ 0            IF terre 0  NE  1 THEN res temporary terre     values f_nan          res   0 5 res   shift res  0   1  0  0           res  0         values f_nan          mask   tmask firstxv:lastxv  firstyv:lastyv  firstzt:lastzt           mask   temporary mask replicate 1  jpt           mask   reform mask  nxv  nyv  nzt  jpt   over           terre   where temporary mask  EQ 0            IF terre 0  NE  1 THEN res temporary terre    valmask       END    endcase     IF NOT keyword_set key_forgetold  THEN BEGIN     updateold    ENDIF       return  res END "); 
    214 a[212] = new Array("./ToBeReviewed/GRILLE/vmask.html", "vmask.pro", "", "             file_comments   calculate fmask  Economize memory  we do not need to keep vmask anymore       categories   Utilities      returns   A 3d array corresponding to vmask       examples   Used like if vmask was a known array by substituing vmask by  vmask    For example: Instaed of write vmask domainef  we have to write  vmask domainef       history   Sebastien Masson  smasson lodyc jussieu fr                          11 12 98                         20 9 99 cas jpk 1  merci jpblod ipsl jussieu fr       version    Id: vmask pro 157 2006 08 21 09:01:50Z navarro             FUNCTION vmask     compile_opt idl2  strictarrsubs    common   tempsun   systime 1             For key_performance     CASE size tmask   n_dimensions  OF     2:res   tmask shift tmask  0   1      3:res   tmask shift tmask  0   1  0    ENDCASE     res  jpj 1      vmaskred   if keyword_set key_performance  THEN print   temps vmask  systime 1 tempsun      return  res end"); 
    215 a[213] = new Array("./ToBeReviewed/HOPE/completetype.html", "completetype.pro", "", "     file_comments        categories        param TYPEIN        returns        uses        restrictions        examples        history        version    Id: completetype pro 163 2006 08 29 12:59:46Z navarro        todo seb     function completetype  typein     compile_opt idl2  strictarrsubs      type typein    case type of        x :type type yzt         y :type type xzt         z :type type zyt         t :type type xyz         xy :type type zt         xz :type type yt         yz :type type xt         xt :type type yz         yt :type type xz         zt :type type xy         xyz :type type t         xyt :type type z         yzt :type type x         xyzt :    endcase    return  type  end  "); 
    216 a[214] = new Array("./ToBeReviewed/HOPE/computehopegrid.html", "computehopegrid.pro", "", "             file_comments      categories   Grid       param XAXIS      param YAXIS      param ZAXIS      param LINETYPE      keyword FORTHEMASK      keyword WPOINT      keyword FIRSTS      keyword LASTS      keyword PTTYPE      uses   common pro      history   Sebastien Masson  smasson lodyc jussieu fr                         2001 06      version    Id: computehopegrid pro 157 2006 08 21 09:01:50Z navarro        todo seb           PRO computehopegrid  xaxis  yaxis  zaxis  linetype  FORTHEMASK   forthemask  WPOINT   wpoint  FIRSTS   firsts  LASTS   lasts  PTTYPE   pttype       compile_opt idl2  strictarrsubs    cm_4mesh  cm_4data   IF NOT keyword_set key_forgetold  THEN BEGIN  updatenew   ENDIF        if not  keyword_set scalar keyword_set vector  then scalar 1      jpiglo   n_elements xaxis     jpjglo   n_elements yaxis     jpkglo   n_elements zaxis       jpi   jpiglo    jpj   jpjglo    jpk   jpkglo      if NOT keyword_set firsts  then firsts    0  0  0     if NOT keyword_set lasts  then lasts    jpi 1  jpj 1  jpk 1      depermination of the grid type and of the point type      if keyword_set pttype  then vargrid   pttype    if linetype EQ  odd even  then key_gridtype    e  ELSE key_gridtype    c      computation of the horizontal grid      if key_gridtype EQ  e  then begin       if vargrid EQ  T  then begin          glamt xaxis          glamt   glamt replicate 1  jpj           xstep glamt 1 0 glamt 0 0 2           glamt 2 lindgen jpj 2 glamt 2 lindgen jpj 2 xstep          glamu glamt xstep       ENDIF ELSE BEGIN          glamu xaxis          glamu   glamu replicate 1  jpj           xstep glamu 1 0 glamu 0 0 2           glamu 2 lindgen jpj 2 glamu 2 lindgen jpj 2 xstep          glamt glamu xstep       ENDELSE  zoom       glamt   glamt firsts 0 :lasts 0  firsts 1 :lasts 1        glamu   glamu firsts 0 :lasts 0  firsts 1 :lasts 1        jpiglo   lasts 0 firsts 0 1       jpi   jpiglo       jpjglo   lasts 1 firsts 1 1       jpj   jpjglo       glamv   glamu       glamf   glamu       gphit   yaxis firsts 1 :lasts 1        gphit   replicate 1  jpi gphit       gphif   gphit       gphiu   gphit       gphiv   gphif    ENDIF ELSE BEGIN       if vargrid eq  T  then begin          glamt xaxis          glamt   glamt replicate 1  jpj           glamu glamt glamt 1 0 glamt 0 0 2        ENDIF ELSE BEGIN          glamu xaxis          glamu   glamu replicate 1  jpj           xstep glamu 1 0 glamu 0 0 2           glamt glamu glamu 1 0 glamu 0 0 2        ENDELSE  zoom       glamt   glamt firsts 0 :lasts 0  firsts 1 :lasts 1        glamu   glamu firsts 0 :lasts 0  firsts 1 :lasts 1        jpiglo   lasts 0 firsts 0 1       jpi   jpiglo       jpjglo   lasts 1 firsts 1 1       jpj   jpjglo       glamv   glamt       glamf   glamu       gphit   yaxis firsts 1 :lasts 1        gphit   replicate 1  jpi gphit       gphiu   gphit       if jpj GT 1 then begin          gphiv   gphit gphit 0  1 gphit 0  0 2           gphif   gphit gphit 0  1 gphit 0  0 2        ENDIF ELSE BEGIN           gphiv   gphit          gphif   gphit       ENDELSE    ENDELSE     computation of the vertical grid      if keyword_set wpoint  then begin       gdepw   zaxis       if jpk ne 1 then begin          gdept shift gdepw   1 gdepw 2           gdept jpk 1 gdepw jpk 1 5 gdepw jpk 1 gdepw jpk 2        endif else gdept zaxis    endif else begin       gdept   zaxis       if jpk ne 1 then begin          gdepw shift gdept  1 gdept 2           gdepw 0 0       endif else gdepw   zaxis    endelse     computation of the vertical scale factors      if jpk ne 1 then begin       e3t   abs shift gdepw 1 gdepw        e3t jpk 1    abs gdept jpk 1 gdepw jpk 1        e3w   abs gdept shift gdept 1        e3w 0    abs gdept 0 gdepw 0     endif else begin       e3t 1       e3w 1    endelse   zoom    gdept   gdept firsts 2 :lasts 2     gdepw   gdepw firsts 2 :lasts 2     e3t   e3t firsts 2 :lasts 2     e3w   e3w firsts 2 :lasts 2     jpkglo   lasts 2 firsts 2 1    jpk   jpkglo     computation of the horizontal scale factors      e1t   replicate 1b jpi jpj     e2t   replicate 1b jpi jpj     e1u   e1t    e2u   e2t    e1v   e1t    e2v   e2t    e1f   e1t    e2f   e2t     mask       tmask   replicate 1b  jpi  jpj  jpk     if keyword_set forthemask  then BEGIN       land where forthemask ge valmask 10        if land 0  ne  1 then tmask land    0b    endif    umaskred   replicate 1  jpj  jpk     vmaskred   replicate 1  jpi  jpk     fmaskredy   replicate 1  jpj  jpk     fmaskredx   replicate 1  jpi  jpk      updateold    domdef    if keyword_set firsts  AND keyword_set lasts  then BEGIN       if vargrid EQ  T  then BEGIN          if jpj GT 1 then begin             lon1   min glamt 0   0  1              lon2   max glamt jpi 1   0  1           endif ELSE BEGIN             lon1   min glamt 0  0              lon2   max glamt jpi 1   0           ENDELSE       ENDIF ELSE BEGIN          if jpj GT 1 then begin             lon1   min glamu 0   0  1              lon2   max glamu jpi 1   0  1           endif ELSE BEGIN             lon1   min glamu 0  0              lon2   max glamu jpi 1  0           ENDELSE       ENDELSE       lat1   min gphit 0  0  gphit 0  jpj 1        lat2   max gphit 0  0  gphit 0  jpj 1        domdef  lon1  lon2  lat1  lat2  gdepw 0  gdept jpk 1  gridtype   vargrid    ENDIF      ixminmesh   0l    ixmaxmesh   long jpi 1     iyminmesh   0l    iymaxmesh   long jpj 1     izminmesh   0l    izmaxmesh   long jpk 1      for the triangulation      key_periodic   glamt 0  EQ  glamt jpi 1 glamt 1 glamt 0  MOD 360     if jpi gt 4 AND jpj GT 4 then begin       triangles_list   triangule shifted   glamt 0  0  LT glamt 0  1        twin_corners_up 1       twin_corners_dn 1    ENDIF ELSE BEGIN       triangles_list 1       twin_corners_up 1       twin_corners_dn 1    ENDELSE     IF NOT keyword_set key_forgetold  THEN BEGIN     updateold   ENDIF       return end  "); 
    217 a[215] = new Array("./ToBeReviewed/HOPE/createhopestruct.html", "createhopestruct.pro", "", "     file_comments        categories        param EVENT        returns        uses        restrictions        examples        history        version    Id: createhopestruct pro 163 2006 08 29 12:59:46Z navarro        todo seb     FUNCTION createhopestruct  event     compile_opt idl2  strictarrsubs      widget_control  event top  get_uvalue top_uvalue   find the selected variable    selected    top_uvalue 1  findline top_uvalue   selected    get the variable id    varid top_uvalue 1  findline top_uvalue   datavarid selected    get the section type    type    top_uvalue 1  findline top_uvalue   sectype selected    get its dimension    dimsvar top_uvalue 1  findline top_uvalue   dimvar selected     tosort sortdim completetype type     dimsvar dimsvar tosort    get the specified spatial domain and build reading parameters    linetype  top_uvalue 1  findline top_uvalue   linetype selected     case linetype of        odd :domainid   widget_info event top find_by_uname    basedomainodd         even :domainid   widget_info event top find_by_uname    basedomaineven         odd even :domainid   widget_info event top find_by_uname    basedomainodd even     endcase    allaxes top_uvalue 1  findline top_uvalue   dimlist     xaxis allaxes dimsvar 0     xlimits    top_uvalue 1  findline top_uvalue   xlimits     if NOT keyword_set xlimits  then begin       xid widget_info domainid find_by_uname    xinterval        widget_control  xid  get_value xint    endif ELSE xint   xaxis where xaxis GE xlimits 0  AND xaxis LE xlimits 1     yaxis allaxes dimsvar 1     yaxis   reverse yaxis          latitudes from the south to the north    ylimits    top_uvalue 1  findline top_uvalue   ylimits     if NOT keyword_set ylimits  then begin       yid widget_info domainid find_by_uname    yinterval        widget_control  yid  get_value yint    endif ELSE yint   yaxis where yaxis GE ylimits 0  AND yaxis LE ylimits 1     zaxis allaxes dimsvar 2     zlimits    top_uvalue 1  findline top_uvalue   zlimits     if NOT keyword_set zlimits  then begin       zid widget_info domainid find_by_uname    zinterval        widget_control  zid  get_value zint    endif ELSE zint   zaxis where zaxis GE zlimits 0  AND zaxis LE zlimits 1    time axis and time interval    time allaxes dimsvar 3     yyyymmdd   vairdate time     tlimits    top_uvalue 1  findline top_uvalue   tlimits     if NOT keyword_set tlimits  then BEGIN       date1id   widget_info event top  find_by_uname    date1        widget_control  date1id  get_value   date1       date2id   widget_info event top  find_by_uname    date2        widget_control  date2id  get_value   date2       tlimits    date1  date2     ENDIF    tint   time where yyyymmdd GE tlimits 0  AND yyyymmdd LE tlimits 1       limits of the domain      nxt   n_elements xint     nyt   n_elements yint     nzt   n_elements zint     jpt   n_elements tint        firstx    where xaxis GE xint 0 0     firsty    where yaxis GE yint 0 0     lasty   firsty nyt 1    firstz    where zaxis GE zint 0 0     firstt    where time GE tint 0 0      read the array      cdfid ncdf_open top_uvalue 1  findline top_uvalue   filename     offset firstx n_elements yaxis lasty 1 firstz firstt     count nxt nyt nzt jpt     tosortinv sortdim completetype type inv    sort the offset and count for the case of the array is not written   as a xyzt array but for example as a yzxt array     offset offset tosortinv     count count tosortinv    call to ncdf_varget    ncdf_varget  cdfid  varid  array  offset offset  count count     force to keep the dimension equal to 1    if count 3  eq 1 then array reform array count 0 count 1 count 2 count 3 over     if not  array_equal tosort  lindgen 4  then array transpose temporary array tosort     count nxt nyt nzt jpt     if jpt eq 1 then array reform array count 0 count 1 count 2 count 3 over     array reverse array  2   over    if there is no longitude zoom  shift the array to obtain longitude   between 20 and 380    if nxt EQ 128 OR nxt EQ 256 then begin       key_shift    where xaxis GE 20 0        xaxis   shift temporary xaxis  key_shift        xaxis where xaxis LT 20    xaxis where xaxis LT 20 360       array   shift temporary array  key_shift  0  0  0     ENDIF ELSE key_shift   0   get some informations about the array    insidevar ncdf_varinq cdfid varid     if insidevar natts NE 0 then begin       attnames   strarr insidevar natts        for attiq 0 insidevar natts 1 do attnames attiq strlowcase ncdf_attname cdfid varid attiq    get the name       if  where attnames EQ  long_name 0  EQ  1 then value             ELSE ncdf_attget cdfid varid long_name value       varname   strtrim string value  2    get the units       if  where attnames EQ  units 0  EQ  1 then value             ELSE ncdf_attget cdfid varid units value       varunit   strtrim string value  2    get the  missing_value        if  where attnames EQ  missing_value 0  EQ  1 then valmask   1e20         ELSE ncdf_attget cdfid varid missing_value  valmask    ENDIF ELSE BEGIN        varunit           valmask   1e20       varname        ENDELSE    varexp         build arguments to use computehopegrid and put it together in a structure    firsts    firstx firsty firstz     lasts    firstx nxt 1 firsty nyt 1 firstz nzt 1     vargrid    top_uvalue 1  findline top_uvalue   pointtype selected     hopegrid    xaxis:xaxis  yaxis:yaxis  zaxis:zaxis  firsts:firsts  lasts:lasts  type:type  linetype:linetype  pttype:vargrid     hopestru    array:array  unit:varunit  name:varname  date:time firstt:firstt jpt 1  grid:vargrid  hopegrid:hopegrid    we close the netcdf file before living     ncdf_close   cdfid    return  hopestru end"); 
    218 a[216] = new Array("./ToBeReviewed/HOPE/cw_selectinterval.html", "cw_selectinterval.pro", "", "       todo seb       PRO testwid_event  event         compile_opt idl2  strictarrsubs          widget_control  event id  get_uvalue uval      if n_elements uval  EQ 0 then return      case uval of          done :widget_control  event top   destroy          get :BEGIN            id   widget_info event top find_by_uname    discret             widget_control  id  get_value   value1            help  value1            print   value1  value1            id   widget_info event top find_by_uname    continus             widget_control  id  get_value   value2            help  value2            print   value2  value2         END         ELSE:      endcase      return   end   PRO testwid  _extra   ex         compile_opt idl2  strictarrsubs          base widget_base COLUMN       nothing   widget_label base  value    beginning of the test           nothing   cw_selectinterval base  10 indgen 5  _extra   ex  uname    discret  uvalue    discret       print  nothing      nothing   cw_selectinterval base  indgen 20  _extra   ex  uname    continus  uvalue    continus       print  nothing          nothing   widget_button base  value    get  uvalue    get       nothing   widget_button base  value    done  uvalue    done       widget_control  base   REALIZE      xmanager testwid  base   no_block      return   end            file_comments           categories   Compound widget       param ID          returns          restrictions          examples        history         version    Id: cw_selectinterval pro 163 2006 08 29 12:59:46Z navarro     function cw_selectinterval_get_value  id     compile_opt idl2  strictarrsubs      bgroupid widget_info id  find_by_uname    bgroup    the widget is a set of button    if bgroupid ne 0 then begin       widget_control  bgroupid  get_value   selected       widget_control  bgroupid  get_uvalue   vecteur       vecteur   vecteur vecteur    endif else begin   the widget is 2 sliders       Minid   Widget_Info Id  Find_by_uname    min        widget_control  minid  get_value   minval       minval   minval value       maxid   widget_info id  find_by_uname    max        widget_control  maxid  get_value   maxval       maxval   maxval value       widget_control  minid  get_uvalue   vecteur       vecteur   vecteur vecteur       selected   where vecteur ge minval and vecteur le maxval     ENDELSE   if selected 0  eq  1 then return   1 else return  vecteur selected  END        file_comments           categories   Compound widget       param EVENT          returns          restrictions          examples        history         version    Id: cw_selectinterval pro 163 2006 08 29 12:59:46Z navarro      function cw_selectinterval_event  event     compile_opt idl2  strictarrsubs      widget_control  event id  get_uvalue uval    case uval name of        min :begin                 change the value if the minimum for the slider called max          maxid widget_info event handler  find_by_uname    max           widget_control  maxid  set_value SLIDER_MIN:event value 1        end        max :begin                 change the value if the maximum for the slider called min          minid widget_info event handler  find_by_uname    min           widget_control  minid  set_value SLIDER_MAX:event value 1        end        bgroup :    endcase    return   ID:event handler  TOP:event top  HANDLER:0L  END         file_comments           categories   Compound widget        param PARENT    The widget ID of the parent widget        param VECTEUR  type vector    A vector whose the first element must be the smallest one and the last    must be the biggest one        keyword _EXTRA   Used to pass your keywords       returns          restrictions          examples        history         version    Id: cw_selectinterval pro 163 2006 08 29 12:59:46Z navarro     function cw_selectinterval  parent  vecteur  _extra   ex     compile_opt idl2  strictarrsubs       base   widget_base parent                           EVENT_FUNC    cw_selectinterval_event                            FUNC_GET_VALUE cw_selectinterval_get_value                            PRO_SET_VALUE cw_selectinterval_set_value                             ROW  _extra   ex     if n_elements vecteur  le 10 then begin       nothing   CW_BGROUP base  strtrim vecteur 1 nonexclusive row  uvalue    name: bgroup  vecteur:vecteur  uname bgroup        buttvalue bytarr n_elements nothing        buttvalue 0 1       widget_control  nothing  set_value buttvalue    endif else begin       min min floor vecteur        max max ceil vecteur        nothing cw_slider_pm base  value   min  min min  max max 1  uvalue    name: min  vecteur:vecteur  uname min        nothing cw_slider_pm base  value   max  min min 1  max max  uvalue    name: max  uname max     endelse    return  base end"); 
    219 a[217] = new Array("./ToBeReviewed/HOPE/domainpart.html", "domainpart.pro", "", "     file_comments        categories        param TOP_UVALUE        param BASEDOMAIN        param SELECTED        keyword DESTROY        returns        uses        restrictions        examples        history        version    Id: domainpart pro 163 2006 08 29 12:59:46Z navarro        todo seb     pro domainpart  top_uvalue  basedomain  selected  DESTROY   destroy     compile_opt idl2  strictarrsubs       if keyword_set destroy  then BEGIN         id   widget_info basedomain find_by_uname    title          IF id NE 0 THEN widget_control  id   destroy       id   widget_info basedomain find_by_uname    oddsecchoice        IF id NE 0 THEN widget_control  id   destroy       id   widget_info basedomain find_by_uname    evensecchoice        IF id NE 0 THEN widget_control  id   destroy       id   widget_info basedomain find_by_uname    odd evensecchoice        IF id NE 0 THEN widget_control  id   destroy       id   widget_info basedomain find_by_uname    basex        IF id NE 0 THEN widget_control  id   destroy       id   widget_info basedomain find_by_uname    basey        IF id NE 0 THEN widget_control  id   destroy       id   widget_info basedomain find_by_uname    basez        IF id NE 0 THEN widget_control  id   destroy       return    endif     we get the size of the dimenstion id of this section      dimvar    top_uvalue 1  findline top_uvalue   dimvar     selecteddim   dimvar  selected     typedim    top_uvalue 1  findline top_uvalue   typedim     sorteddim   selecteddim sortdim typedim selecteddim     dimlist    top_uvalue 1  findline top_uvalue   dimlist       longitude part      basex widget_info basedomain find_by_uname    basex     IF basex NE 0 THEN widget_control  basex   destroy    basex widget_base basedomain row  uname basex     nothing widget_text basex value longitude  xsize   10     nothing cw_selectinterval basex dimlist sorteddim 0 uname xinterval uvalue name: xinterval       latitude part      basey widget_info basedomain find_by_uname    basey     IF basey NE 0 THEN widget_control  basey   destroy    basey widget_base basedomain row  uname basey     nothing widget_text basey value latitude  xsize   10     nothing cw_selectinterval basey reverse dimlist sorteddim 1  uname yinterval uvalue name: yinterval       depth part      basez widget_info basedomain find_by_uname    basez     IF basez NE 0 THEN widget_control  basez   destroy    basez widget_base basedomain row  uname basez     nothing widget_text basez value depth  xsize   10     nothing cw_selectinterval basez dimlist sorteddim 2 uname zinterval uvalue name: zinterval    end  "); 
    220 a[218] = new Array("./ToBeReviewed/HOPE/findlineandpointtype.html", "findlineandpointtype.pro", "", "     file_comments        categories        param SECTYPE        param XAXIS        param YAXIS        param IODIR        returns        uses        restrictions        examples        history        version    Id: findlineandpointtype pro 163 2006 08 29 12:59:46Z navarro        todo seb     FUNCTION findlineandpointtype  sectype  xaxis  yaxis  iodir   the file  HOPE_lonlat nc  is used in this function  This file must   be localized in iodir   netcdf HOPE_lonlat     dimensions:           latTlow   242             lonTlowodd   128             latThigh   390             lonThighodd   256     variables:           float latTlow latTlow                      latTlow:units    degrees_north              float lonTlowodd lonTlowodd                      lonTlowodd:units    degrees_east                      lonTlowodd:point_spacing    even                      lonTlowodd:modulo                   float latThigh latThigh                      latThigh:units    degrees_north              float lonThighodd lonThighodd                      lonThighodd:units    degrees_east                      lonThighodd:point_spacing    even                      lonThighodd:modulo                 compile_opt idl2  strictarrsubs      jpi   n_elements xaxis     jpj   n_elements yaxis      depermination of the grid type and of the point type     low resolution grid: jpi 128  jpj 121   x 2  jpk 20                     0        1 4         2 8       4 2        5 6      odd                    T          u          T          u  93 3      even        T          u          T          u             92 2      odd                    T          u          T          u  91 1      even        T          u          T          u             90 0       high resolution grid: jpi 256  jpj 195   x 2  jpk 29                     0        0 7         1 4        2 1        2 8             odd                    T          u          T          u  91 6      even        T          u          T          u             91 0      odd                    T          u          T          u  90 5      even        T          u          T          u             90 0        x0   floor xaxis 0 10 10     y0   floor yaxis 0 10 10     case sectype of        xy :BEGIN          if  jpi NE 128 and jpi NE 256              OR  jpj NE 121 AND jpj NE 121 2 AND jpj NE 195 AND jpj NE 195 2  then begin             print    CASE NOT coded              stop          ENDIF          case 1 of             jpj EQ 195: BEGIN                case X0 OF                   0:BEGIN                      line    even                       vargrid    T                    END                   0 7:BEGIN                      case y0 OF                         91 6:BEGIN                            line    odd                             vargrid    T                          END                         91 0:BEGIN                            line    even                             vargrid    U                          END                         ELSE:BEGIN                            print    CASE NOT coded                             stop                         END                      endcase                   END                   1 4:BEGIN                      line    odd                       vargrid    U                    END                endcase             END             jpj EQ 121:BEGIN                case x0 OF                   0:BEGIN                      line    even                       vargrid    T                    END                   1 4:BEGIN                      case y0 OF                         93 3:BEGIN                            line    odd                             vargrid    T                          END                         92 2:BEGIN                            line    even                             vargrid    U                          END                         ELSE:BEGIN                            print    CASE NOT coded                             stop                         END                      endcase                   END                   2 8:BEGIN                      line    odd                       vargrid    U                    END                endcase             END             jpj EQ 195 2:BEGIN                line    odd even                 case x0 OF                   0 7:vargrid    T                    1 4:vargrid    U                    ELSE:BEGIN                      print    CASE NOT coded                       stop                   END                endcase             END             jpj EQ 121 2:BEGIN                line    odd even                 case x0 OF                   1 4:vargrid    T                    2 8:vargrid    U                    ELSE:BEGIN                      print    CASE NOT coded                       stop                   END                endcase             END             ELSE:BEGIN                print    CASE NOT coded                 stop             END          endcase       END        xz :BEGIN          if  jpi NE 128 and jpi NE 256  then begin             print    CASE NOT coded              stop          ENDIF          case X0 OF             0:BEGIN                line    even                 vargrid    T              END             0 7:BEGIN                id   ncdf_open iodir HOPE_lonlat nc                 ncdf_varget  id   latThigh  lat                test    where lat EQ yaxis 0 0                 if test EQ  1 then begin                   print    CASE NOT coded                    stop                endif                IF  test MOD 2  EQ 1 THEN BEGIN                   line    even                    vargrid    U                 ENDIF ELSE BEGIN                   line    odd                    vargrid    T                 ENDELSE                ncdf_close  id             END             1 4:BEGIN                if jpi EQ 128 then begin                   id   ncdf_open iodir HOPE_lonlat nc                    ncdf_varget  id   latTlow  lat                   test    where lat EQ yaxis 0 0                    if test EQ  1 then begin                      print    CASE NOT coded                       stop                   endif                   IF  test MOD 2  EQ 1 THEN BEGIN                      line    even                       vargrid    U                    ENDIF ELSE BEGIN                      line    odd                       vargrid    T                    ENDELSE                   ncdf_close  id                ENDIF ELSE BEGIN                   line    odd                    vargrid    U                 ENDELSE             END             2 8:BEGIN                line    odd                 vargrid    U              END          endcase       END        yz :BEGIN          if  jpj NE 121 AND jpj NE 195  then begin             print    CASE NOT coded              stop          ENDIF          id   ncdf_open iodir HOPE_lonlat nc           case y0 of             93 3:BEGIN                line    odd                 ncdf_varget  id   lonTlowodd  lonTodd                xstep    lonTodd 1 lonTodd 0 2                 case 1 OF                    where lonTodd EQ xaxis 0 0  NE  1:vargrid    T                     where lonTodd xstep EQ xaxis 0 0  NE  1:vargrid    U                    ELSE:BEGIN                      print    CASE NOT coded                       stop                   END                endcase             END             92 2:BEGIN                line    even                 ncdf_varget  id   lonTlowodd  lonTodd                xstep    lonTodd 1 lonTodd 0 2                 case 1 OF                    where lonTodd EQ xaxis 0 0  NE  1:vargrid    U                     where lonTodd xstep EQ xaxis 0 0  NE  1:vargrid    T                    ELSE:BEGIN                      print    CASE NOT coded                       stop                   END                endcase             END             91 6:BEGIN                line    odd                 ncdf_varget  id   lonThighodd  lonTodd                xstep    lonTodd 1 lonTodd 0 2                 case 1 OF                    where lonTodd EQ xaxis 0 0  NE  1:vargrid    T                     where lonTodd xstep EQ xaxis 0 0  NE  1:vargrid    U                    ELSE:BEGIN                      print    CASE NOT coded                       stop                   END                endcase             END             91 0:BEGIN                line    even                 ncdf_varget  id   lonThighodd  lonTodd                xstep    lonTodd 1 lonTodd 0 2                 case 1 OF                    where lonTodd EQ xaxis 0 0  NE  1:vargrid    U                     where lonTodd xstep EQ xaxis 0 0  NE  1:vargrid    T                    ELSE:BEGIN                      print    CASE NOT coded                       stop                   END                endcase             END             ELSE:BEGIN                print    CASE NOT coded                 stop             END          endcase          ncdf_close  id       END       else:BEGIN          print   case not coded           stop       END    endcase     return   linetype:line  pointtype:vargrid  end"); 
    221 a[219] = new Array("./ToBeReviewed/HOPE/read_hope.html", "read_hope.pro", "", "     file_comments        categories        param EVENT         returns        restrictions        examples          history        version    Id: read_hope pro 163 2006 08 29 12:59:46Z navarro         pro read_hope_event  event     compile_opt idl2  strictarrsubs      widget_control  event id  get_uvalue uval    widget_control  event top  get_uvalue top_uvalue    case uval name OF          cancel :begin   close the file          cdfid top_uvalue 1  findline top_uvalue   cdfid           ncdf_close  cdfid   clear the pointer          for i 0 n_elements top_uvalue 1 do ptr_free  top_uvalue i    kill the widget          widget_control event top destroy       end          type choice :begin   find the new type of selected section          typeindex widget_info event id droplist_select           selectedtype top_uvalue 1  findline top_uvalue   type choice typeindex    find the available variables for this type of section          sectype    top_uvalue 1  findline top_uvalue   sectype           goodvar   where sectype EQ selectedtype           namevar    top_uvalue 1  findline top_uvalue   namevar           goodnamevar   namevar goodvar    find the selected var name          varchoiceid   widget_info event top find_by_uname    var choice           varindex   widget_info varchoiceid droplist_select           varchoice    top_uvalue 1  findline top_uvalue   var choice           selectedvarname varchoice varindex    do we change the variable           if  where goodnamevar EQ selectedvarname 0  EQ  1 then begin             selectedvarname   goodnamevar 0              varindex    where varchoice EQ selectedvarname 0              widget_control  varchoiceid  set_droplist_select   varindex          ENDIF   displays the different domains          selected   goodvar where goodnamevar EQ selectedvarname           rh_alldomains  event top  selected       end          var choice :BEGIN   find the new variable          varindex widget_info event id droplist_select           selectedvar top_uvalue 1  findline top_uvalue   var choice varindex    find the available variables for this type of section          namevar    top_uvalue 1  findline top_uvalue   namevar           goodvar   where namevar EQ selectedvar           sectype    top_uvalue 1  findline top_uvalue   sectype           goodtype   sectype goodvar    find the selected type of section          typechoiceid   widget_info event top find_by_uname    type choice           typeindex   widget_info typechoiceid droplist_select           typechoice    top_uvalue 1  findline top_uvalue   type choice           selectedtype typechoice typeindex    do we change the type of section            if  where goodtype EQ selectedtype 0  EQ  1 then begin             selectedtype   goodtype 0              typeindex    where typechoice EQ selectedtype 0              widget_control  typechoiceid  set_droplist_select   typeindex          ENDIF   displays the different domains          selected   goodvar where goodtype EQ selectedtype           rh_alldomains  event top  selected       END          plot :BEGIN   plot the array          res   createhopestruct event    type of section          selected    top_uvalue 1  findline top_uvalue   selected           type    top_uvalue 1  findline top_uvalue   sectype selected    get the informations of cw_specifie          specifieid widget_info event top find_by_uname    specifie           widget_control  specifieid  get_value   specifie          specifie   struct2string specifie direct2string           case type of              x :command    plt1d res x specifie              y :command    plt1d res y specifie              z :command    plt1d res z specifie              t :command    pltt res t   specifie              xy :command    plt  res specifie              xz :command    pltz  res xz specifie              yz :command    pltz  res yz specifie              xt :command    pltt res xt specifie              yt :command    pltt res yt specifie              zt :command    pltt res zt specifie              xyz :              xyt :              yzt :              xyzt :          ENDCASE          test   execute command           if test EQ 0 then stop       end          linechoice :BEGIN          if event select EQ 1 then begin             sensitive   bytarr 3              sensitive where odd   even   odd even  eq event value    1             basedomainodd widget_info event top find_by_uname    basedomainodd              widget_control  basedomainodd  sensitive   sensitive 0              basedomaineven widget_info event top find_by_uname    basedomaineven              widget_control  basedomaineven  sensitive   sensitive 1              basedomainoddeven widget_info event top find_by_uname    basedomainodd even              widget_control  basedomainoddeven  sensitive   sensitive 2              case  where sensitive EQ 1 0  of                0:BEGIN                   widget_control  basedomainodd  get_uvalue   oddsecchoice                   oddsecchoiceid widget_info event top find_by_uname    oddsecchoice                    if oddsecchoiceid NE 0 then                      index   widget_info oddsecchoiceid   droplist_select                      ELSE index   0                    top_uvalue 1  findline top_uvalue   selected    oddsecchoice index                 END                1:BEGIN                   widget_control  basedomaineven  get_uvalue   evensecchoice                   evensecchoiceid widget_info event top find_by_uname    evensecchoice                    if evensecchoiceid NE 0 then                      index   widget_info evensecchoiceid   droplist_select                      ELSE index   0                    top_uvalue 1  findline top_uvalue   selected    evensecchoice index                 END                2:BEGIN                   widget_control  basedomainodd  get_uvalue   oddevensecchoice                   oddevensecchoiceid widget_info event top find_by_uname    odd evensecchoice                    if oddevensecchoiceid NE 0 then                      index   widget_info oddevensecchoiceid   droplist_select                      ELSE index   0                    top_uvalue 1  findline top_uvalue   selected    oddevensecchoice index                 END             endcase          endif       END          oddsecchoice :BEGIN          widget_control  event top  update 0          basedomainodd widget_info event top find_by_uname    basedomainodd           widget_control  basedomainodd  get_uvalue   oddsecchoice          domainpart  top_uvalue  basedomainodd  oddsecchoice event index            top_uvalue 1  findline top_uvalue   selected    oddsecchoice event index           widget_control  event top  update 1       END          evensecchoice :BEGIN          widget_control  event top  update 0          basedomaineven widget_info event top find_by_uname    basedomaineven           widget_control  basedomaineven  get_uvalue   evensecchoice          domainpart  top_uvalue  basedomaineven  evensecchoice event index            top_uvalue 1  findline top_uvalue   selected    evensecchoice event index           widget_control  event top  update 1       END          odd evensecchoice :BEGIN          widget_control  event top  update 0          basedomainoddeven widget_info event top find_by_uname    basedomainodd even           widget_control  basedomainoddeven  get_uvalue   oddevensecchoice          domainpart  top_uvalue  basedomainoddeven  oddevensecchoice event index            top_uvalue 1  findline top_uvalue   selected    oddevensecchoice event index           widget_control  event top  update 1       END          date1 :BEGIN          date2id   widget_info event top  find_by_uname    date2           widget_control  date2id  get_value   date2          if event value GT date2 then widget_control  date2id  set_value   event value       END          date2 :BEGIN          date1id   widget_info event top  find_by_uname    date1           widget_control  date1id  get_value   date1          if event value LT date1 then widget_control  date1id  set_value   event value       END         else:    endcase    return end                file_comments   Read the Hope grid file converted in NetCdf by xconv      categories   Reading      param TYPEIN  in required type string    A string specifying from which type of section the 4D   array based:  xy   xz   yz       param VARNAMEIN  in required type string    A string the name of the variable to be read  in   lower or upper case       keyword FILENAME  type string    The name of the file to be read      keyword XLIMITS  type vector    A two elements vector  lonmin  lonmax    the boundary of the longitudes  from 0 to 360       keyword YLIMITS  type vector    A two elements vector  latmin  latmax    the boundary of the latitudes  from  90 to 90       keyword ZLIMITS  type vector    A two elements vector  depthmin  depthmax    the boundary of the depth      keyword TLIMITS  type vector    A two elements vector  date1  date2    the boundary of the calendar with date1 and date2   folowing the syntax yyyymmdd      keyword ODDPT   Activate to read only the sections located on ODD   points       keyword EVENPT   Activate to read only the sections located on even   points       keyword ODDEVENPT   Activate to read only the sections located on   both even and odd points  horizontal sections       keyword _EXTRA   Used to pass your keywords      returns    1 if typein and varnamein are undefine  this is the widget   version      A structure which but be read by litchamp pro and is   necessary to complete the grid associated to the data  see   the example       uses   common pro  useful only for the definition of iodir       restrictions    x   y   z   t   xt   yt  and  zt  section not coded  xconv   must be able to works with this kind of function    The grid file has no zoom possibilities on horizontal dimensions       restrictions     When typein and varnamein are defined  the method to find the   good variable is:    1  find the variables which are available on this type of   sections with this name    2  if ODDPT  EVENPT or ODDEVENPT are specified  consider only   these types of sections    3  For an XY section the chosen variable is the one which has   the most level in the vertical domain specified by ZLIMITS        For an XZ section the chosen variable is the one which has   the most points in the latitude domain specified by YLIMITS        For an YZ section the chosen variable is the one which has   the most points in the longitude domain specified by XLIMITS         examples         IDL  a read_hope xy ocpt filename CLIM_CNT_1993 1998 nc        IDL  help  a struct         Structure   6 tags  length 1860176  refs 1:          ARRAY           FLOAT     Array 128  242  15           UNIT            STRING     deg C           NAME            STRING     Ocean potential temperature           DATE            FLOAT     Array 1           GRID            STRING     T           HOPEGRID        STRUCT       Array 1        IDL  help  a hopegrid struct         Structure   8 tags  length 1588  refs 2:          XAXIS           FLOAT     Array 128           YAXIS           FLOAT     Array 242           ZAXIS           FLOAT     Array 15           FIRSTS          LONG      Array 3           LASTS           LONG      Array 3           TYPE            STRING     xy           LINETYPE        STRING     odd even           PTTYPE          STRING     T        IDL  help  litchamp a            FLOAT       Array 128  242  15       history   Sebastien Masson  smasson lodyc jussieu fr                         June 2001      version    Id: read_hope pro 163 2006 08 29 12:59:46Z navarro             FUNCTION read_hope  typein  varnamein  FILENAME   filename  XLIMITS   xlimits  YLIMITS   ylimits   ZLIMITS   zlimits  TLIMITS   tlimits  ODDPT   oddpt  ODDEVENPT   oddevenpt  EVENPT   evenpt  _extra   ex     compile_opt idl2  strictarrsubs    common                           usefull only for the definition of iodir    if n_elements filename  EQ 0 then filename   isafile iodirectory   iodir  _extra   ex    IF size filename   type  NE 7 THEN return   1   filename   isafile filename   filename  iodirectory   iodir  _extra   ex      cdfid   ncdf_open filename          id of the netcdf file    wathinside   ncdf_inquire cdfid     structure with global informations       dimensions      namedim   strarr wathinside ndims     name of the dimensions   typedim   strarr wathinside ndims     type of the dimensions  x y z t    sizedim   lonarr wathinside ndims     size of each dimension   loop on the dimensions to get the names and sizes   for dimiq   0  wathinside ndims 1 do begin     ncdf_diminq  cdfid  dimiq  name  value     namedim dimiq    name     case 1 of        STRCMP name   lon  3   FOLD_CASE :typedim dimiq     x        STRCMP name   lat  3   FOLD_CASE :typedim dimiq     y        STRCMP name   z  1   FOLD_CASE :typedim dimiq     z        STRCMP name   t  1   FOLD_CASE :typedim dimiq     t        ELSE:BEGIN         ncdf_close  cdfid         return  report Unknown name of dimension        END     endcase     sizedim dimiq    value   endfor   dimlist: structure which contains the name and the value of each   dimension   we suppose that there is always a variable which has the    same name that the dimension and which gives the values of   this dimension   ncdf_varget  cdfid  namedim 0  value   dimlist   create_struct namedim 0  value    for dimiq   1  wathinside ndims 1 do begin     ncdf_varget  cdfid  namedim dimiq  value  get the value     dimlist   create_struct dimlist  namedim dimiq  value    endfor       variables      namevar   strarr wathinside nvars      names of the variables   ndimsvar   lonarr wathinside nvars     number of dim for each variable   dimvar   replicate 1  wathinside ndims  wathinside nvars    dims of each variables   loop over the variable ids to fill namevar  ndimsvar and dimvar   for varid   0  wathinside nvars 1 do begin     res   ncdf_varinq cdfid  varid      namevar varid    res name     namevar varid    strjoin strsplit namevar varid   _ 0 99   EXTRACT   REGEX      ndimsvar varid    res ndims     dimvar 0:res ndims 1  varid    res dim   ENDFOR   we cut dimvar to select only the interessant part   dimvar   dimvar 0:max ndimsvar 1      selection of the data variables which are diffrent from the   dimension variables   we suppose that that data variables are 4D array  with sometime   dimensions equal to 1  they must be different from dimension   variables which have only 1 dimension   datavarid   where ndimsvar eq 4    numberofvar   n_elements datavarid    namevar   namevar datavarid    ndimsvar   ndimsvar datavarid    dimvar   dimvar  datavarid      sectype   strarr numberofvar    the type of section for each variable : xy   xz   yz    linetype   strarr numberofvar    the line of the points : odd  even or odd even   pointtype   strarr numberofvar    the type of variable : scalar  T  or vector  U    for i   0  numberofvar 1 do begin     dimofthevar   dimvar  i      sectype i    typedim dimofthevar 0 typedim dimofthevar 1      xaxisid   dimofthevar where typedim dimofthevar  EQ  x      yaxisid   dimofthevar where typedim dimofthevar  EQ  y      lineandpt   findlineandpointtype sectype i  dimlist xaxisid 0  dimlist yaxisid 0  iodir      linetype i    lineandpt linetype     pointtype i    lineandpt pointtype   endfor                  definition of the widget               base   widget_base column        first base:       droplist to select the type of section      droplist to select the variable      button to select type of line : odd  even or odd even       base1   widget_base base   row   frame    typechoice   sectype uniq sectype  sort sectype    if n_elements typechoice  GT 1 then typechoice   typechoice sortdim typechoice    base11   widget_droplist base1  title    Type of section  value   typechoice  uvalue    name: type choice  uname    type choice    if n_elements typein  NE 0 then BEGIN     selectedtype   strmid typein  0  2      widget_control  base11  set_droplist_select                         0L    where typechoice EQ selectedtype 0    ENDIF ELSE selectedtype   typechoice 0       varchoice   namevar uniq namevar  sort namevar    base12   widget_droplist base1  title    Available data  value   varchoice  uvalue    name: var choice  uname    var choice    if n_elements varnamein  NE 0 THEN BEGIN     selectedname   varnamein     widget_control  base12  set_droplist_select                         0L    where strlowcase varchoice  EQ strlowcase varnamein 0    ENDIF ELSE selectedname   varchoice 0      base13   widget_base base1   row  uname    linechoicebase        base 2: base to select the domain of the odd points     base2   widget_base base   column  uname    basedomainodd   frame        base 3: base to select the domain of the even points     base3   widget_base base   column  uname    basedomaineven   frame        base 4: base to select the domain of the odd even points     base4   widget_base base   column  uname    basedomainodd even   frame        base 5: calendar     base5   widget_base base   row  uname    baset   frame    timename   strlowcase tag_names dimlist wathinside recdim    read the time axis in julina days   time   ncdf_timeget cdfid  timename    update the dimlist structure   dimlist wathinside recdim    time   base51   cw_calendar base5  time  uname    date1  uvalue    name: date1    base52   cw_calendar base5  time  uname    date2  uvalue    name: date2         base 6: base to select the min  max    and others keywords     base6   cw_specifie base   column  uname    specifie  uvalue    name: specifie         base 7: last base with the action buttons     base7   widget_base base   row  uname    finalaction    base71   widget_button base7  value    Plot  uvalue    name: plot    base72   widget_button base7  value    Cancel  uvalue    name: cancel        determination of the selected variable         goodname   0   where strlowcase namevar  EQ strlowcase selectedname    goodtype   0   where sectype EQ selectedtype    selected   inter goodname  goodtype    if selected 0  EQ  1 then BEGIN     widget_control  base   destroy     ncdf_close  cdfid     return  report impossible combinaison : type of section  selectedtype  variable name  selectedname    ENDIF   if n_elements typein  NE 0 then BEGIN     if NOT keyword_set xlimits  then xlimits    1e9  1e9      if NOT keyword_set ylimits  then ylimits    1e9  1e9      if NOT keyword_set zlimits  then zlimits    1e9  1e9      if NOT keyword_set tlimits  then tlimits    1e9  1e9    ENDIF   if n_elements typein  NE 0 AND n_elements selected  NE 1 then BEGIN     if keyword_set oddpt  then selected   inter selected  where linetype EQ  odd      if keyword_set evenpt  then selected   inter selected  where linetype EQ  even      if keyword_set oddevenpt  then selected   inter selected  where linetype EQ  odd even      if selected 0  EQ  1 then BEGIN       widget_control  base   destroy       ncdf_close  cdfid       return  report impossible combinaison : type of section  selectedtype  variable name  selectedname  and line type       endif     if n_elements selected  NE 1 then begin       case selectedtype of          xy :BEGIN   choice on the vertical axis   choice based on the variable which has the most available levels   between the zlimits            if NOT keyword_set zlimits  then begin             print   case not coded              stop           ENDIF           number   lonarr n_elements selected            for i   0  n_elements selected 1 do begin             zdim   dimvar 2  selected i              zaxis   dimlist zdim              nothing   where zaxis GE zlimits 0  AND zaxis LE zlimits 1  count              number i    count           ENDFOR           selected   selected where number EQ max number            if n_elements selected  NE 1 then begin             print   case not coded              stop           endif         END          xz :BEGIN   choice on the latitude axis           if NOT keyword_set ylimits  then begin             print   case not coded              stop           ENDIF           number   lonarr n_elements selected            for i   0  n_elements selected 1 do begin             ydim   dimvar 2  selected i              yaxis   dimlist ydim              nothing   where yaxis GE ylimits 0  AND yaxis LE ylimits 1  count              number i    count           ENDFOR           selected   selected where number EQ max number            if n_elements selected  NE 1 then begin             print   case not coded              stop           endif         END          yz :BEGIN   choice on the longitude axis           if NOT keyword_set xlimits  then begin             print   case not coded              stop           ENDIF           number   lonarr n_elements selected            for i   0  n_elements selected 1 do begin             xdim   dimvar 2  selected i              xaxis   dimlist xdim              nothing   where xaxis GE xlimits 0  AND xaxis LE xlimits 1  count              number i    count           ENDFOR           selected   selected where number EQ max number            if n_elements selected  NE 1 then begin             print   case not coded              stop           endif         END       endcase     endif   ENDIF       definition of the uvalue of the base which allows to share the   variables between programs         top_uvalue   ptrarr 2  18   allocate_heap     top_uvalue 0  0     type choice     top_uvalue 1  0    temporary typechoice     top_uvalue 0  1     var choice     top_uvalue 1  1    temporary varchoice     top_uvalue 0  2     namevar     top_uvalue 1  2    temporary namevar     top_uvalue 0  3     dimvar     top_uvalue 1  3    temporary dimvar     top_uvalue 0  4     sectype     top_uvalue 1  4    temporary sectype     top_uvalue 0  5     linetype     top_uvalue 1  5    temporary linetype     top_uvalue 0  6     pointtype     top_uvalue 1  6    temporary pointtype     top_uvalue 0  7     dimlist     top_uvalue 1  7    temporary dimlist     top_uvalue 0  8     typedim     top_uvalue 1  8    temporary typedim     top_uvalue 0  9     sizedim     top_uvalue 1  9    temporary sizedim     top_uvalue 0  10     cdfid     top_uvalue 1  10    cdfid    top_uvalue 0  11     datavarid     top_uvalue 1  11    datavarid    top_uvalue 0  12     selected     top_uvalue 1  12    selected    top_uvalue 0  13     filename     top_uvalue 1  13    filename    top_uvalue 0  14     xlimits     top_uvalue 1  14    testvar var   xlimits     top_uvalue 0  15     ylimits     top_uvalue 1  15    testvar var   ylimits     top_uvalue 0  16     zlimits     top_uvalue 1  16    testvar var   zlimits     top_uvalue 0  17     tlimits     top_uvalue 1  17    testvar var   tlimits      widget_control  base  set_uvalue   top_uvalue   rh_alldomains  base  selected    if n_params  EQ 0 then BEGIN   we use the widget     widget_control  base   REALIZE     xmanager   read_hope  base   no_block     return    1   ENDIF   get the output   output   createhopestruct top:base    clear the pointer   for i   0  n_elements top_uvalue 1 do ptr_free  top_uvalue i    close the file   ncdf_close  cdfid   return  output end"); 
    222 a[220] = new Array("./ToBeReviewed/HOPE/rh_alldomains.html", "rh_alldomains.pro", "", "     file_comments        categories        param TOPID        param SELECTED        returns        uses        restrictions        examples        history        version    Id: rh_alldomains pro 163 2006 08 29 12:59:46Z navarro        todo seb     PRO rh_alldomains  topid  selected     compile_opt idl2  strictarrsubs       widget_control  topid  get_uvalue top_uvalue    widget_control  topid  update 0      selectedline top_uvalue 1  findline top_uvalue   linetype selected      we get the size of the dimenstion id of this section      dimvar    top_uvalue 1  findline top_uvalue   dimvar     typedim    top_uvalue 1  findline top_uvalue   typedim     dimlist    top_uvalue 1  findline top_uvalue   dimlist     sizedim    top_uvalue 1  findline top_uvalue   sizedim      buttons to select type of line : odd  even or odd even      linechoicebase widget_info topid find_by_uname    linechoicebase     id   widget_info linechoicebase find_by_uname    linechoice     IF id NE 0 THEN widget_control  id   destroy    choice        if  where selectedline EQ  odd 0  NE  1 then choice    choice   odd     if  where selectedline EQ  even 0  NE  1 then choice    choice   even     if  where selectedline EQ  odd even 0  NE  1 then choice    choice   odd even     choice   choice 1:n_elements choice 1     nothing   cw_bgroup linechoicebase choice   row exclusive   return_name  uname    linechoice  uvalue    name: linechoice     widget_control  nothing  set_value   0    sensitive   bytarr 3     sensitive where odd   even   odd even  eq choice 0    1      odd points domain      basedomainodd widget_info topid find_by_uname    basedomainodd     id   widget_info basedomainodd find_by_uname    title     IF id NE 0 THEN widget_control  id   destroy    oddsecchoice   where selectedline EQ  odd     if oddsecchoice 0  NE  1 then BEGIN       oddsecchoice   selected oddsecchoice        nothing widget_label basedomainodd  value    Domain of the odd points  uname    title        IF n_elements oddsecchoice  GT 1 THEN BEGIN          selecteddim   dimvar  oddsecchoice           sorteddim   selecteddim          FOR i   0  n_elements oddsecchoice 1 DO             sorteddim  i    selecteddim sortdim typedim selecteddim  i  i           zdim   sorteddim 2             sizedims   sizedim zdim           sortedzdim   sort sizedims           sizedims   sizedims sortedzdim           oddsecchoice   oddsecchoice sortedzdim           nothing widget_droplist basedomainodd title    number of levels  value   strtrim sizedims  2  uvalue    name: oddsecchoice  uname oddsecchoice        ENDIF        domainpart  top_uvalue  basedomainodd  oddsecchoice 0        widget_control  basedomainodd  set_uvalue   oddsecchoice    ENDIF ELSE BEGIN        nothing widget_label basedomainodd  value       uname    title        domainpart  top_uvalue  basedomainodd   destroy       widget_control  basedomainodd  set_uvalue    1    ENDELSE    widget_control  basedomainodd  sensitive   sensitive 0       even points domain      basedomaineven widget_info topid find_by_uname    basedomaineven     id   widget_info basedomaineven find_by_uname    title     IF id NE 0 THEN widget_control  id   destroy    evensecchoice   where selectedline EQ  even     if evensecchoice 0  NE  1 then BEGIN       evensecchoice   selected evensecchoice        nothing widget_label basedomaineven  value    Domain of the even points  uname    title        IF n_elements evensecchoice  GT 1 THEN BEGIN          selecteddim   dimvar  evensecchoice           sorteddim   selecteddim          FOR i   0  n_elements evensecchoice 1 DO             sorteddim  i    selecteddim sortdim typedim selecteddim  i  i           zdim   sorteddim 2             sizedims   sizedim zdim           sortedzdim   sort sizedims           sizedims   sizedims sortedzdim           evensecchoice   evensecchoice sortedzdim           nothing widget_droplist basedomaineven title    number of levels  value   strtrim sizedims  2  uvalue    name: evensecchoice  uname evensecchoice        ENDIF        domainpart  top_uvalue  basedomaineven  evensecchoice 0        widget_control  basedomaineven  set_uvalue   evensecchoice    ENDIF ELSE BEGIN       domainpart  top_uvalue  basedomaineven   destroy       nothing widget_label basedomaineven  value       uname    title        widget_control  basedomaineven  set_uvalue    1    ENDELSE    widget_control  basedomaineven  sensitive   sensitive 1       odd even points domain      basedomainoddeven widget_info topid find_by_uname    basedomainodd even     id   widget_info basedomainoddeven find_by_uname    title     IF id NE 0 THEN widget_control  id   destroy    oddevensecchoice   where selectedline EQ  odd even     if oddevensecchoice 0  NE  1 then BEGIN       oddevensecchoice   selected oddevensecchoice        nothing widget_label basedomainoddeven  value    Domain of the odd even points  uname    title        IF n_elements oddevensecchoice  GT 1 THEN BEGIN          selecteddim   dimvar  oddevensecchoice           sorteddim   selecteddim          FOR i   0  n_elements oddevensecchoice 1 DO             sorteddim  i    selecteddim sortdim typedim selecteddim  i  i           zdim   sorteddim 2             sizedims   sizedim zdim           sortedzdim   sort sizedims           sizedims   sizedims sortedzdim           oddevensecchoice   oddevensecchoice sortedzdim           nothing widget_droplist basedomainoddeven title    number of levels  value   strtrim sizedims  2  uvalue    name: odd evensecchoice  uname odd evensecchoice        ENDIF        domainpart  top_uvalue  basedomainoddeven  oddevensecchoice 0        widget_control  basedomainoddeven  set_uvalue   oddevensecchoice    ENDIF ELSE BEGIN       domainpart  top_uvalue  basedomainoddeven   destroy       nothing widget_label basedomainoddeven  value       uname    title        widget_control  basedomainoddeven  set_uvalue    1    ENDELSE    widget_control  basedomainoddeven  sensitive   sensitive 2       case  where sensitive EQ 1 0  of       0: top_uvalue 1  findline top_uvalue   selected    oddsecchoice 0        1: top_uvalue 1  findline top_uvalue   selected    evensecchoice 0        2: top_uvalue 1  findline top_uvalue   selected    oddevensecchoice 0     endcase      widget_control  topid  update 1    return end"); 
    223 a[221] = new Array("./ToBeReviewed/HOPE/sortdim.html", "sortdim.pro", "", "     file_comments        categories        param DIMS        keyword INVERSE        returns        uses        restrictions        examples        history        version    Id: sortdim pro 163 2006 08 29 12:59:46Z navarro        todo seb       function sortdim  dims  inverse inverse       IDL  a x y t z       IDL  b a sortdim a       IDL  print  a      x y t z     IDL  print  b      x y z t     IDL  print  b sortdim a inv       x y t z     IDL  a xytz      IDL  print  sortdim a                 0           1           3           2           compile_opt idl2  strictarrsubs      tosort   dims    if n_elements tosort  eq 1 then       tosort   string reform byte tosort 1 strlen tosort 0     tosort   strrepl tosort strwhere tosort x a     tosort   strrepl tosort strwhere tosort y b     tosort   strrepl tosort strwhere tosort z c     tosort   strrepl tosort strwhere tosort t d     tosort   uniq tosort sort tosort     if keyword_set inverse  then tosort sort tosort     return  tosort  end   "); 
    224 a[222] = new Array("./ToBeReviewed/HOPE/xrh.html", "xrh.pro", "", "     file_comments        categories        keyword _EXTRA   Used to pass your keywords      returns        uses        restrictions        examples        history        version    Id: xrh pro 163 2006 08 29 12:59:46Z navarro        todo seb       procedure to call read_hope in the widget mode PRO xrh  _extra   ex     compile_opt idl2  strictarrsubs      a   read_hope _extra   ex     return end"); 
    225 a[223] = new Array("./ToBeReviewed/IMAGE/animgif.html", "animgif.pro", "", "             file_comments    Build a gif animation      categories    Animated drawings       param NOMFIC  in required     It is the name of the gif file containing the animation             Comment: this file is placed in the directory defined by iodir       uses    common pro      restrictions    We use the Z buffer to go faster                 So  if it failed in animgif  you have to do:                IDL  device   close                IDL  set_plot   x                 IDL  retall      restrictions    If we want to delete the  common                  we have to define manually the picture s size                   variables xsize and ysize  just as iodir       history    Guillaume Roullet  grlod ipsl jussieu fr             Sebastien Masson  smasson lodyc jussieu fr             30 4 1999      version     Id: animgif pro 157 2006 08 21 09:01:50Z navarro             PRO animgif  nomfic     compile_opt idl2  strictarrsubs    common      It recuperates the color palette and put it in red  green  blue       tvlct   rouge vert bleu get      It completes the current palette on 256 colors       red    rouge  replicate 255  256 n_elements rouge      green    vert  replicate 255  256 n_elements rouge      blue    bleu  replicate 255  256 n_elements rouge       It rocks on the z device  allowing to create the picture without display it     thisOS    VERSION OS_FAMILY    thisOS   STRMID thisOS  0  3     thisOS   STRUPCASE thisOS     set_plot   z    size of the picture  in pixel :    xsize   30 min page_size  max   ma key_portrait   ma 1 key_portrait     ysize   30 min page_size  max   ma 1 key_portrait    ma key_portrait     device  set_resolution    xsize  ysize      Beginning of the gif file  Writing of an empty picture        reinitplt    plot   0   0   nodata    write_gif iodir nomfic tvrd red  green  blue   multiple         Beggining of the part we want to change        Loop of picture s creation       calen   TIMEGEN 366  START JULDAY 1 1 2000      debut   where calen EQ 19810105     debut   where calen EQ 19790105     debut   debut 0     if debut EQ  1 then begin       device   close       CASE thisOS of           MAC : SET_PLOT  thisOS           WIN : SET_PLOT  thisOS          ELSE: SET_PLOT   X        ENDCASE       stop    endif     for i   0  73 15 1 do begin     for i   0  3 2 1 do begin     for i   0  73 2 1 do begin       print   Image numero :  strtrim i  2        date   calen debut i        erase  255       plt  nlec sst  date   ATF  19  29  int    5   noerase        plt  nlec sss  date   ATF  label   2   noerase        plt  nlec htoth  date   RE3 nlec hpycn  date   RE3  10  60  int   5   inv   noerase        domdef  290 340 5 15         plt  norme nlec unsurf  date   RE3  nlec vnsurf  date   RE3  0  1 2  int    1   noerase         Writing of the picture in the file  gif          write_gif iodir nomfic tvrd red  green  blue   multiple    ENDFOR      End of the part we want to change        Closing of the file     write_gif iodir nomfic close    Rerock on terminal X mode      device   close    CASE thisOS of        MAC : SET_PLOT  thisOS        WIN : SET_PLOT  thisOS       ELSE: SET_PLOT   X     ENDCASE      return end"); 
    226 a[224] = new Array("./ToBeReviewed/INIT/initncdf.html", "initncdf.pro", "", "             file_comments   Initfile for Netcdf file  define all the grid parameters through   an appropriate call to computegid      categories   Grid       param NCFILEIN  in required type scalar string    A string giving the name of the NetCdf file      keyword INVMASK  default 0 type scalar: 0 or 1    Inverse the land sea mask  that should have 0 1 values for land sea : mask   1 mask      keyword MASKNAME  type string    A string giving the name of the variable in the file    that contains the land sea mask      keyword MISSING_VALUE  type scalar    To define  or redefine if the attribute is   already existing  the missing values used with USEASMASK   keyword      keyword START1  default 0 type scalar: 0 or 1    Index the axis from 1 instead of 0 when using    xyindex and or zindex      keyword USEASMASK  type scalar string    A string giving the name of the variable in the file    that will be used to build the land sea mask  In this case the   mask is based on the first record  if record dimension   exists  The mask is build according to :      1 the keyword missing_value if existing      2 the attribute  missing_value  if existing      3 NaN values if existing      keyword XAXISNAME  default x   longitude   nav_lon   lon   lon_rho  or  NbLongitudes type scalar string    A string giving the name of the variable in the file    that contains the  xyz axis              keyword YAXISNAME  default y   latitude   nav_lat lat   lat_rho  or  NbLatitudes type scalar string    A string giving the name of the variable in the file    that contains the  xyz axis        keyword ZAXISNAME  default z   level   lev   depth type scalar string    A string giving the name of the variable in the file    that contains the  xyz axis        keyword XYINDEX  default 0 type scalar: 0 or 1    To define the x y axis with index instead of using   the values contained in X YAXISNAME     x yaxis   keyword_set start1    findgen jpi jpj     this forces key_onearth   0      keyword ZINDEX  default 0 type scalar: 0 or 1    To define the z axis with index instead of using   the values contained in ZAXISNAME     zaxis   keyword_set start1    findgen jpk         keyword _EXTRA   Used to pass keywords to computegrid      uses   common pro      restrictions   Change the grid parameters  see computegrid       restrictions   the file must contain an x and an y axis   1 ou 2 dimentional array       examples    IDL  initncdf toto nc glam 180 180       history   Sebastien Masson  smasson lodyc jussieu fr                         8 May 2002      version    Id: initncdf pro 192 2006 09 22 09:37:08Z smasson             PRO initncdf  ncfilein  XAXISNAME   xaxisname  YAXISNAME   yaxisname                   ZAXISNAME   zaxisname  MASKNAME   maskname                   INVMASK   invmask  USEASMASK   useasmask                   MISSING_VALUE   missing_value  START1   start1                   XYINDEX   xyindex  ZINDEX   zindex                   _EXTRA   ex       compile_opt idl2  strictarrsubs    common     check the name of the file   ncfile   isafile FILENAME   ncfilein  IODIRECTORY   iodir  _extra   ex    if size ncfile   type  NE 7 then BEGIN     print   initncdf cancelled      return   endif   if the file is stored on tape   if  version os_family EQ  unix  then spawn   file  ncfile     dev null       open the file   cdfid   ncdf_open ncfile    what is inside the file   inside   ncdf_inquire cdfid      name of the variables   namevar   strarr inside nvars    for varid   0  inside nvars 1 do begin     invar   ncdf_varinq cdfid  varid      namevar varid    strlowcase invar name    ENDFOR     find the xaxis   if keyword_set xaxisname  then xaxisname   strlowcase xaxisname  ELSE xaxisname    x    xvarid    where namevar EQ xaxisname OR namevar EQ  longitude                      OR namevar EQ  nav_lon  OR namevar EQ  lon                      OR namevar EQ  lon_rho  OR namevar EQ  nblongitudes 0    if xvarid EQ  1 then begin     print   the xaxis was not found  check the use of XAXISNAME keyword      stop   endif   romsgrid   strmid namevar xvarid  0  4  EQ  lon_    get the size of xaxis   xinq   ncdf_varinq cdfid  xvarid    ncdf_diminq  cdfid  xinq dim 0  blabla  jpifromx   should we read or compute the xaxis    IF NOT keyword_set xyindex  THEN BEGIN   read the xaxis     ncdf_varget  cdfid  xvarid  xaxis   make sure of the shape of xaxis     IF xinq ndims GE 2 THEN BEGIN       ncdf_diminq  cdfid  xinq dim 1  blabla  jpjfromx       xaxis   reform xaxis  jpifromx  jpjfromx   over      ENDIF   ENDIF ELSE xaxis   keyword_set start1    findgen jpifromx      find the yaxis   if keyword_set yaxisname  then yaxisname   strlowcase yaxisname  ELSE yaxisname    y    yvarid    where namevar EQ yaxisname OR namevar EQ  latitude                      OR namevar EQ  nav_lat  OR namevar EQ  lat                      OR namevar EQ  lat_rho  OR namevar EQ  nblatitudes 0    yvarid   yvarid 0    if yvarid EQ  1 then begin     print   the yaxis was not found  check the use of YAXISNAME keyword      stop   endif   get the size of yaxis and check it is ok with the values found for x   yinq   ncdf_varinq cdfid  yvarid    IF xinq ndims GE 2 THEN BEGIN     ncdf_diminq  cdfid  yinq dim 0  blabla  jpifromy     ncdf_diminq  cdfid  yinq dim 1  blabla  jpjfromy     IF jpifromy NE jpifromx THEN BEGIN        print   xaxis and y axis do not have the same x dimension      ENDIF   ENDIF ELSE ncdf_diminq  cdfid  yinq dim 0  blabla  jpjfromy   IF n_elements jpjfromx  NE 0 THEN BEGIN     IF jpjfromy NE jpjfromx THEN BEGIN        print   xaxis and y axis do not have the same y dimension      ENDIF       ENDIF   should we read or compute the xaxis    IF NOT keyword_set xyindex  THEN BEGIN   read the yaxis     ncdf_varget  cdfid  yvarid  yaxis   make sure of the shape of xaxis     IF xinq ndims GE 2 THEN yaxis   reform yaxis  jpifromy  jpjfromy   over    ENDIF ELSE yaxis   keyword_set start1    findgen jpjfromy      find the zaxis   IF keyword_set romsgrid  THEN BEGIN     FOR i   0  inside ndims 1 DO BEGIN        ncdf_diminq  cdfid  i  name  size       CASE strlowcase name  OF          s_rho :zaxis   reverse indgen size           s_u :zaxis   reverse indgen size           s_v :zaxis   reverse indgen size           s_psi :zaxis   reverse indgen size           s_w :zaxis   reverse indgen size 1          ELSE:       ENDCASE     ENDFOR      IF  where namevar EQ  h 0  NE  1 THEN BEGIN       ncdf_varget  cdfid   h  romsh     ENDIF ELSE romsh    1   ENDIF ELSE BEGIN      if keyword_set zaxisname  then zaxisname   strlowcase zaxisname  ELSE zaxisname    z      zvarid    where namevar EQ  nav_lev  or namevar EQ zaxisname OR namevar EQ  level  OR namevar EQ  lev  OR strmid namevar  0  5  EQ  depth 0      if zvarid EQ  1 AND inside ndims GT 3 then begin       print   initncdf: the zaxis was not found  check the the use of ZAXISNAME keyword if you whant to find one        stop     endif   read the zaxis     if zvarid NE  1 THEN ncdf_varget  cdfid  zvarid  zaxis   ENDELSE    IF keyword_set zindex  AND keyword_set zaxis  THEN        zaxis   keyword_set start1    findgen n_elements zaxis      mask   IF NOT  keyword_set maskname  OR keyword_set useasmask  AND keyword_set romsgrid  THEN maskname    mask_rho    CASE 1 OF     keyword_set maskname :BEGIN       mskid    where namevar EQ strlowcase maskname 0        if mskid NE  1 THEN BEGIN          mskinq   ncdf_varinq cdfid  mskid    is the mask variable containing the record dimension          withrcd    where mskinq dim EQ inside recdim 0          IF withrcd NE  1 THEN BEGIN   in order to read only the first record             we need to get the size of each dimension           count   replicate 1L  mskinq ndims            FOR d   0  mskinq ndims  1 DO BEGIN             IF d NE withrcd THEN BEGIN               ncdf_diminq  cdfid  mskinq dim d  name  size               count d    size             ENDIF           ENDFOR   read the variable for the first record                     ncdf_varget  cdfid  mskid  tmask  count   count         ENDIF ELSE ncdf_varget  cdfid  mskid  tmask   check if we need to applay add_offset and scale factor                  FOR a   0  mskinq natts 1 DO BEGIN           attname   ncdf_attname cdfid  mskid  a                 CASE strlowcase attname  OF              add_offset :ncdf_attget  cdfid  mskid  attname  add_offset              scale_factor :ncdf_attget  cdfid  mskid  attname  scale_factor             ELSE:           ENDCASE         ENDFOR         IF n_elements scale_factor  NE 0 THEN tmask   tmask scale_factor         IF n_elements add_offset  NE 0 THEN tmask   tmask add_offset         if keyword_set invmask  then tmask   1 tmask         tmask   byte round tmask        ENDIF ELSE tmask    1            END       keyword_set useasmask :BEGIN       mskid    where namevar EQ strlowcase useasmask 0        if mskid NE  1 THEN BEGIN          mskinq   ncdf_varinq cdfid  mskid    is the mask variable containing the record dimension          withrcd    where mskinq dim EQ inside recdim 0          IF withrcd NE  1 THEN BEGIN   in order to read only the first record             we need to get the size of each dimension           count   replicate 1L  mskinq ndims            FOR d   0  mskinq ndims  1 DO BEGIN             IF d NE withrcd THEN BEGIN               ncdf_diminq  cdfid  mskinq dim d  name  size               count d    size             ENDIF           ENDFOR   read the variable for the first record                  ncdf_varget  cdfid  mskid  tmask  count   count         ENDIF ELSE ncdf_varget  cdfid  mskid  tmask   check if we need to applay add_offset and scale factor                FOR a   0  mskinq natts 1 DO BEGIN           attname   ncdf_attname cdfid  mskid  a                 CASE strlowcase attname  OF              add_offset :ncdf_attget  cdfid  mskid  attname  add_offset              scale_factor :ncdf_attget  cdfid  mskid  attname  scale_factor              missing_value :IF n_elements missing_value  EQ 0 THEN                  ncdf_attget  cdfid  mskid  attname  missing_value             ELSE:           ENDCASE         ENDFOR         IF n_elements scale_factor  NE 0 THEN tmask   tmask scale_factor         IF n_elements add_offset  NE 0 THEN tmask   tmask add_offset         IF n_elements missing_value  NE 0 THEN BEGIN   we have to take care of the float accuracy           CASE 1 OF             missing_value GE 1 e6:tmask   tmask LT  missing_value 10              missing_value LE  1 e6:tmask   tmask GT  missing_value 10              abs missing_value  LE 1 e 6:tmask   abs tmask  GT 1 e 6             ELSE:tmask   tmask NE missing_value           ENDCASE           if keyword_set invmask  then tmask   1 tmask         ENDIF ELSE BEGIN           tmask   finite tmask            IF min tmask  EQ 1 THEN BEGIN             print   missing or nan values not found              tmask    1                     ENDIF         ENDELSE       ENDIF ELSE tmask    1            END       ELSE:tmask     1   ENDCASE     ncdf_close  cdfid     compute the grid   if NOT keyword_set zaxis  then BEGIN      computegrid  xaxis   xaxis  yaxis   yaxis                      mask   tmask  onearth   1b   keyword_set xyindex  ROMSH   romsh  _EXTRA   ex    ENDIF ELSE BEGIN      computegrid  xaxis   xaxis  yaxis   yaxis  zaxis   zaxis                      mask   tmask  onearth   1b   keyword_set xyindex  ROMSH   romsh  _EXTRA   ex   ENDELSE    IF n_elements time  EQ 0 THEN time   0   jpt   n_elements time        return end"); 
    227 a[225] = new Array("./ToBeReviewed/INIT/initncdfxxx.html", "initncdfxxx.pro", "", ""); 
    228 a[226] = new Array("./ToBeReviewed/INIT/initorca05.html", "initorca05.pro", "", ""); 
    229 a[227] = new Array("./ToBeReviewed/INIT/initorca2.html", "initorca2.pro", "", ""); 
    230 a[228] = new Array("./ToBeReviewed/INIT/initorca2full.html", "initorca2full.pro", "", ""); 
    231 a[229] = new Array("./ToBeReviewed/LECTURE/GRIB/bit2int.html", "bit2int.pro", "", "     file_comments        categories        param BITIN        keyword CHECKNEG        returns        uses        restrictions        examples        history        version    Id: bit2int pro 163 2006 08 29 12:59:46Z navarro        todo   seb     FUNCTION bit2int  bitin  checkneg   checkneg     compile_opt idl2  strictarrsubs      res   0L   n   n_elements bitin 1   IF keyword_set checkneg  THEN BEGIN     IF bitin 0  EQ 1 THEN BEGIN       bitin 0    0       neg    1     ENDIF ELSE neg   1   ENDIF ELSE neg   1   FOR i   0  n  DO res   res 2L i bitin n i     RETURN  neg res END"); 
    232 a[230] = new Array("./ToBeReviewed/LECTURE/GRIB/read_grib.html", "read_grib.pro", "", "     file_comments           categories          param VARCODE         param DATE1  in optional    Date of the beginning  yyyymmdd if TIMESTEP is not activate       param DATE2  in optional    Last date  Optional  if not specified date2 date1       keyword FILE type array or string    A single filename or an array of filenames to be retrieved        returns          restrictions          examples        history         version    Id: read_grib pro 163 2006 08 29 12:59:46Z navarro     function read_grib  varcode  date1  date2  file   file     compile_opt idl2  strictarrsubs    common   http: www wmo ch web www WDM Guides Guide binary 2 html      gribfile       d1fes2 raid6 SINTEX common ES10 d 00 atm 5d ES10 d 00_5d_00911201_00911230 grib    IF keyword_set file  THEN gribfile   isafile file   file   iodir   iodir  ELSE gribfile    d1fes2 raid6 SINTEX common ES10 atm 5d ZOOM_IND ES10_5d_00210101_00301230 grib      openr  num  gribfile   GET_LUN  ERROR   err   SWAP_IF_LITTLE_ENDIAN   if err ne 0 then begin     print   err_string     return   1   ENDIF     recstart   scan_grib_recstart num         messize   scan_grib_messize num  recstart       addoff   lonarr n_elements recstart       FOR i   1L  n_elements recstart 1 DO          addoff i    recstart i recstart i 1 messize i 1           nbits   scan_grib_nbits num  recstart       print nbits uniq nbits sort nbits      codes   scan_grib_code num  recstart    nbcodes    uniq codes  sort codes      dates   scan_grib_date num  recstart    nbdates   uniq dates  sort dates      goodvar   where codes EQ varcode    IF goodvar 0  EQ  1 THEN BEGIN     print   no var code  strtrim varcode  2  in the file      return   1   ENDIF     recstart   recstart goodvar    dates   dates goodvar      gooddate   where dates GE date1 AND dates LE date2    IF gooddate 0  EQ  1 THEN BEGIN     print   no dates between  strtrim date1  2  and  strtrim date2  2  in the file      return   1   ENDIF   recstart   recstart gooddate    dates   dates gooddate    key_caltype    360d    time   date2jul dates    jpt   n_elements time    IF jpt EQ 1 THEN vardate   strtrim dates 0  2  ELSE vardate   strtrim dates 0  2     strtrim dates jpt 1  2     varname   vargrid    T     varexp    varunit     grib_pds   read_grib_pds num  recstart 0    grid parameters   IF grib_pds gdsnotomitted THEN BEGIN     grib_gds   read_grib_gds num  recstart 0    min  max of the latitude with a precision of 10 2     lat1   fix 100 grib_gds la1 100      lat2   fix 100 grib_gds la2 100        CASE grib_gds gridtype OF   Latitude Longitude Grid       0:BEGIN          computegrid  grib_gds lo1  grib_gds la1  grib_gds di   grib_gds dj               grib_gds ni  grib_gds nj        END   Gaussian Latitude Longitude Grid       4:BEGIN   find the latitude axis         CASE 1 OF   n48           grib_gds n EQ 48 AND lat1 EQ 88 57 AND lat2 EQ  88 57:              gphit   n48gaussian    n80            grib_gds n EQ 80 AND lat1 EQ 89 14 AND lat2 EQ  89 14:               gphit   n80gaussian    n128            grib_gds n EQ 128 AND lat1 EQ 89 46 AND lat2 EQ  89 46:               gphit   n128gaussian    n160            grib_gds n EQ 160 AND lat1 EQ 89 57 AND lat2 EQ  89 57:               gphit   n160gaussian    n256            grib_gds n EQ 256 AND lat1 EQ 89 73 AND lat2 EQ  89 73:               gphit   n256gaussian    part of one of the gaussian grids defined above            ELSE:BEGIN              cnt   0              REPEAT BEGIN                CASE cnt OF                  0:gphit   n48gaussian                   1:gphit   n80gaussian                   2:gphit   n128gaussian                   3:gphit   n160gaussian                   4:gphit   n256gaussian                   5:BEGIN                    gphit   n80gaussian                     lat1   29 71                    lat2    19 62                  END                  ELSE:stop                ENDCASE                nfix   fix gphit 100 100                 nlat1    where nfix EQ lat1 0                 nlat2    where nfix EQ lat2 0                 IF nlat1 NE  1 AND  nlat2 NE  1                    AND nlat2 nlat1 1 EQ grib_gds nj                    THEN gphit   gphit nlat1:nlat2  ELSE gphit    1                cnt   cnt 1              ENDREP UNTIL gphit 0  NE  1            END          ENDCASE          computegrid  grib_gds lo1   1  grib_gds di   1  grib_gds ni   1  YAXIS   gphit        END   Mercator Projection Grid        gridtype EQ 1:   Gnomonic Projection Grid        gridtype EQ 2:   Lambert Conformal  secant or tangent  conical or bipolar  normal or   oblique  Projection Grid          gridtype EQ 3:   Polar Stereographic Projection Grid        gridtype EQ 5:   Oblique Lambert conformal  secant or tangent  conical or bipolar    projection        gridtype EQ 13:   Spherical Harmonic Coefficients        gridtype EQ 50:   Space view perspective or orthographic grid        gridtype EQ 90:   reserved   see Manual on Codes        ELSE:      ENDCASE    ENDIF ELSE stop      res   fltarr grib_gds ni  grib_gds nj  n_elements recstart     FOR i   0  n_elements recstart 1 DO BEGIN      res    i    read_grib_bds num  recstart i  grib_gds ni  grib_gds nj     ENDFOR      free_lun  num      IF keyword_set key_yreverse  THEN res   reverse res  2      RETURN  res  END"); 
    233 a[231] = new Array("./ToBeReviewed/LECTURE/GRIB/read_grib_bds.html", "read_grib_bds.pro", "", "     file_comments           categories          param NUM         param RECSTART        param NI          param NJ          returns          restrictions          examples        history         version    Id: read_grib_bds pro 157 2006 08 21 09:01:50Z navarro     FUNCTION read_grib_bds  num  recstart  ni  nj       compile_opt idl2  strictarrsubs     offset   recstart 8   a   assoc num  bytarr 1   nozero  offset 1    sizepds   bit2int binary a 1  binary a 2  binary a 3    flag   binary a 8    gdsnotomitted   flag 0    bmsnotomitted   flag 1    ddd    bit2int binary a 27  binary a 28   checkneg      offset   offset sizepds     IF gdsnotomitted THEN BEGIN     a   assoc num  bytarr 1   nozero  offset 1      sizedds   bit2int binary a 1  binary a 2  binary a 3      offset   offset sizedds   ENDIF     IF bmsnotomitted THEN BEGIN     a   assoc num  bytarr 1   nozero  offset 1      sizebms   bit2int binary a 1  binary a 2  binary a 3      offset   offset sizebms   ENDIF     a   assoc num  bytarr 1   nozero  offset 1      sizebds   bit2int binary a 1  binary a 2  binary a 3                                       flags   binary a 4    BIT VALUE MEANING   1   0     Grid point data       1     Spherical Harmonic Coefficients   2   0     Simple packing        1     Second order  Complex  Packing    3   0     Original data were floating point values       1     Original data were integer values   4   0     No additional flags at octet 14       1     Octet 14 contains flag bits 5   12   5         Reserved  set to 0    6   0     Single datum at each grid point       1     Matrix of values at each grid point   7   0     No secondary bit maps       1     Secondary bit maps present   8   0     Second order values have constant width       1     Second order values have different widths   9 12      Reserved  set to 0      eee   bit2int binary a 5  binary a 6   checkneg      aaa   bit2int binary a 7   checkneg    bbb   bit2int binary a 8  binary a 9  binary a 10    IF aaa LT 0 THEN rrr    2 24    bbb   16 aaa 64      ELSE rrr   2 24    bbb   16 aaa 64      nbits    a 11 0    CASE 1 OF     flags 0  EQ 0 AND flags 1  EQ 0:BEGIN       CASE nbits OF         8 :a   assoc num  bytarr ni  nj   nozero  offset 1 12          16:a   assoc num  uintarr ni  nj   nozero  offset 1 12          32:a   assoc num  ulonarr ni  nj   nozero  offset 1 12          64:a   assoc num  ulon64arr ni  nj   nozero  offset 1 12          ELSE:       ENDCASE     END   ENDCASE    RETURN   rrr a 0 2 eee 10 ddd  END"); 
    234 a[232] = new Array("./ToBeReviewed/LECTURE/GRIB/read_grib_end.html", "read_grib_end.pro", "", "     file_comments           categories          param NUM         param OFFSET         returns          restrictions          examples        history         version    Id: read_grib_end pro 157 2006 08 21 09:01:50Z navarro     PRO read_grib_end   num  offset     compile_opt idl2  strictarrsubs      a   assoc num  bytarr 4   nozero  offset    endcode   string a 0    IF endcode NE  7777  THEN stop    RETURN END"); 
    235 a[233] = new Array("./ToBeReviewed/LECTURE/GRIB/read_grib_gds.html", "read_grib_gds.pro", "", "     file_comments           categories          param NUM         param RECSTART         returns          restrictions          examples        history         version    Id: read_grib_gds pro 157 2006 08 21 09:01:50Z navarro     FUNCTION read_grib_gds  num  recstart       compile_opt idl2  strictarrsubs     offset   recstart 8   a   assoc num  bytarr 1   nozero  offset 1    sizepds   bit2int binary a 1  binary a 2  binary a 3      offset   recstart 8 sizepds   a   assoc num  bytarr 1   nozero  offset 1      sizegds   bit2int binary a 1  binary a 2  binary a 3       nv    a 4 0    pv    a 5 0      gridtype    a 6 0      CASE 1 OF   Latitude Longitude Grid   Gaussian Latitude Longitude Grid     gridtype EQ 0 OR gridtype EQ 4:BEGIN       ni   bit2int binary a 7  binary a 8        nj   bit2int binary a 9  binary a 10          la1   bit2int binary a 11  binary a 12  binary a 13   checkneg 1000        lo1   bit2int binary a 14  binary a 15  binary a 16   checkneg 1000          resflags   binary a 17          la2   bit2int binary a 18  binary a 19  binary a 20   checkneg 1000        lo2   bit2int binary a 21  binary a 22  binary a 23   checkneg 1000          di   bit2int binary a 24  binary a 25 1000        IF di EQ 65 5350 THEN di    1         IF gridtype EQ 0 THEN BEGIN         dj   bit2int binary a 26  binary a 27 1000          IF dj EQ 65 5350 THEN dj    1       ENDIF ELSE BEGIN         n   bit2int binary a 26  binary a 27        ENDELSE         scanflags   binary a 28          res    size:sizegds  gridtype:gridtype  ni:ni  nj:nj  la1:la1  la2:la2  lo1:lo1  lo2:lo2  di:di        IF gridtype EQ 0 THEN res   create_struct res   dj  dj          ELSE res   create_struct res   n  n        RETURN  res     END   Mercator Projection Grid     gridtype EQ 1:   Gnomonic Projection Grid     gridtype EQ 2:   Lambert Conformal  secant or tangent  conical or bipolar  normal or   oblique  Projection Grid       gridtype EQ 3:   Polar Stereographic Projection Grid     gridtype EQ 5:   Oblique Lambert conformal  secant or tangent  conical or bipolar    projection     gridtype EQ 13:   Spherical Harmonic Coefficients     gridtype EQ 50:   Space view perspective or orthographic grid     gridtype EQ 90:   reserved   see Manual on Codes     ELSE:   ENDCASE     RETURN   1 END"); 
    236 a[234] = new Array("./ToBeReviewed/LECTURE/GRIB/read_grib_is.html", "read_grib_is.pro", "", "     file_comments           categories          param NUM         param OFFSET         returns          restrictions          examples        history         version    Id: read_grib_is pro 157 2006 08 21 09:01:50Z navarro     FUNCTION read_grib_is  num  offset     compile_opt idl2  strictarrsubs      infofile   fstat num     a   assoc num  bytarr 4   nozero  offset    typefile   string a 0    IF  typefile NE  GRIB  THEN stop        a   assoc num  bytarr 1   nozero  offset 4    sizerecord   bit2int binary a 0  binary a 1  binary a 2        a   assoc num  bytarr 1   nozero  offset 7    gribed   a 0    IF gribed NE 1 THEN stop     RETURN   typefile:typefile  sizerecord:sizerecord  gribed:gribed 0  END"); 
    237 a[235] = new Array("./ToBeReviewed/LECTURE/GRIB/read_grib_pds.html", "read_grib_pds.pro", "", "     file_comments           categories          param NUM         param RECSTART         returns          restrictions          examples        history         version    Id: read_grib_pds pro 157 2006 08 21 09:01:50Z navarro     FUNCTION read_grib_pds  num  recstart       compile_opt idl2  strictarrsubs     offset   recstart 8   a   assoc num  bytarr 1   nozero  offset 1      sizepds   bit2int binary a 1  binary a 2  binary a 3        paramtableversion    a 4 0        centerid    a 5 0        procid    a 6 0        gridid    a 7 0      flag   binary a 8    gdsnotomitted   flag 0    bmsnotomitted   flag 1      paramunitid    a 9 0      levtype    a 10 0      levalue1    a 11 0    levalue2    a 12 0      year    a 13 0    month    a 14 0    day    a 15 0    hour    a 16 0    minute    a 17 0    timeunit    a 18 0    p1    a 19 0    p2    a 20 0    timerange    a 21 0    n1    a 22 0    n2    a 23 0    nbmiss    a 24 0    century    a 25 0      subcenterid    a 26 0      d    bit2int binary a 27  binary a 28   checkneg        RETURN   size:sizepds  gdsnotomitted:gdsnotomitted  bmsnotomitted:bmsnotomitted  d:d  END"); 
    238 a[236] = new Array("./ToBeReviewed/LECTURE/GRIB/read_gribtable.html", "read_gribtable.pro", "", "     file_comments   Read contents of a gribtable  Gribtables are located   in the gribtables subdirectory of HIPHOP      categories        param TABLENAME  in required    The full path name of a gribtable file      keyword PARMTABL        keyword CENTER        keyword SUBCENTER        keyword TABLNUM        returns        uses        restrictions        examples   tablename ectab_128       history   Dominik Brunner  Apr 2000      version    Id: read_gribtable pro 163 2006 08 29 12:59:46Z navarro     PRO read_gribtable tablename parmtabl parmtabl center center                     subcenter subcenter tablnum tablnum     compile_opt idl2  strictarrsubs      ON_ERROR 2  parmtabl StrArr 3 256  center 1 subcenter 1 tablnum 1   First Subscript  3  is  name description units    Second   256  is defined size of a parameter table  IF n_elements tablename  EQ 0 THEN return  openr lun tablename get  line    read first line which  eventually  contains information   about center  subcenter and table number readf lun line parts STR_SEP line :  IF n_elements parts  GT 3 THEN BEGIN   center fix parts 1    subcenter fix parts 2    tablnum fix parts 3  ENDIF ELSE BEGIN   IF n_elements parts  GE 3 THEN parmtabl 0:1 fix parts 0 parts 1:2      ELSE IF n_elements parts  EQ 2 THEN parmtabl 0 fix parts 0 parts 1  ENDELSE    loop over remaining lines REPEAT BEGIN   readf lun line   parts STR_SEP line :    IF n_elements parts  GE 3 THEN parmtabl 0:1 fix parts 0 parts 1:2      ELSE IF n_elements parts  EQ 2 THEN parmtabl 0 fix parts 0 parts 1  END UNTIL EOF lun   free_lun lun    fill up missing varible names index WHERE parmtabl 0  EQ  count  IF count GT 0 THEN parmtabl 0 index var strcompress index rem   END"); 
    239 a[237] = new Array("./ToBeReviewed/LECTURE/GRIB/scan_grib_code.html", "scan_grib_code.pro", "", "     file_comments           categories          param NUM         param RECSTART         returns          restrictions          examples        history         version    Id: scan_grib_code pro 157 2006 08 21 09:01:50Z navarro     FUNCTION scan_grib_code  num  recstart       compile_opt idl2  strictarrsubs     nrec    n_elements recstart    codes   bytarr nrec      FOR i   0L nrec 1 DO BEGIN     offset   recstart i      a   assoc num  bytarr 1   nozero  offset 8 9 1      codes i    a 0    ENDFOR     RETURN  codes END"); 
    240 a[238] = new Array("./ToBeReviewed/LECTURE/GRIB/scan_grib_date.html", "scan_grib_date.pro", "", "     file_comments           categories          param NUM         param RECSTART         returns          restrictions          examples        history         version    Id: scan_grib_date pro 157 2006 08 21 09:01:50Z navarro     FUNCTION scan_grib_date  num  recstart       compile_opt idl2  strictarrsubs     nrec    n_elements recstart    dates   lonarr nrec      FOR i   0L nrec 1 DO BEGIN     offset   recstart i      a   assoc num  bytarr 1   nozero  offset 8 1      dates i     a 13 100L a 25 1 10000L a 14 100L a 15    ENDFOR     RETURN  dates END"); 
    241 a[239] = new Array("./ToBeReviewed/LECTURE/GRIB/scan_grib_messize.html", "scan_grib_messize.pro", "", "     file_comments           categories          param NUM         param RECSTART         returns          restrictions          examples        history         version    Id: scan_grib_messize pro 157 2006 08 21 09:01:50Z navarro     FUNCTION scan_grib_messize  num  recstart       compile_opt idl2  strictarrsubs     nrec    n_elements recstart    messize   lonarr nrec      FOR i   0L nrec 1 DO BEGIN     offset   recstart i      a   assoc num  bytarr 1   nozero  offset 4      messize i    bit2int binary a 0  binary a 1  binary a 2    ENDFOR     RETURN  messize END"); 
    242 a[240] = new Array("./ToBeReviewed/LECTURE/GRIB/scan_grib_nbits.html", "scan_grib_nbits.pro", "", "     file_comments           categories          param NUM         param RECSTART         returns          restrictions          examples        history         version    Id: scan_grib_nbits pro 157 2006 08 21 09:01:50Z navarro     FUNCTION scan_grib_nbits  num  recstart     compile_opt idl2  strictarrsubs        nrec    n_elements recstart    nbits   bytarr nrec      FOR i   0L  nrec 1 DO BEGIN     offset   recstart i 8     a   assoc num  bytarr 1   nozero  offset 1      sizepds   bit2int binary a 1  binary a 2  binary a 3      flag   binary a 8      gdsnotomitted   flag 0      bmsnotomitted   flag 1      ddd    bit2int binary a 27  binary a 28   checkneg        offset   offset sizepds       IF gdsnotomitted THEN BEGIN       a   assoc num  bytarr 1   nozero  offset 1        sizedds   bit2int binary a 1  binary a 2  binary a 3        offset   offset sizedds     ENDIF       IF bmsnotomitted THEN BEGIN       a   assoc num  bytarr 1   nozero  offset 1        sizebms   bit2int binary a 1  binary a 2  binary a 3        offset   offset sizebms     ENDIF      a   assoc num  bytarr 1   nozero  offset 1      nbits i    a 11     ENDFOR     RETURN  nbits END"); 
    243 a[241] = new Array("./ToBeReviewed/LECTURE/GRIB/scan_grib_recstart.html", "scan_grib_recstart.pro", "", "     file_comments           categories          param NUM          returns          restrictions          examples        history         version    Id: scan_grib_recstart pro 157 2006 08 21 09:01:50Z navarro     FUNCTION scan_grib_recstart  num     compile_opt idl2  strictarrsubs      infofile   fstat num    minimum size of one record   minisize   8L 28L 4L 4L   maxoffset   infofile size minisize     start   0L   offset   0L   previousrecsize   0L    WHILE offset LT maxoffset DO BEGIN   Every record must begin with  GRIB    However  their is no rule to define the space between 2 records     1  we try space   previousrecsize MOD 8  because for echam outputs    the total size of the records is rounded to modulo 8     addoff   8    previousrecsize MOD 8      offset   offset addoff     IF offset GE maxoffset THEN GOTO  out     a   assoc num  bytarr 4   nozero  offset      typefile   string a 0      IF typefile NE  GRIB  THEN offset   offset addoff    2  we try space   previousrecsize MOD 120  because for ecmwf   outputs  the total size of the records is rounded to modulo 120     addoff   120    previousrecsize MOD 120      IF typefile NE  GRIB  THEN BEGIN       offset   offset addoff       IF offset GE maxoffset THEN GOTO  out       a   assoc num  bytarr 4   nozero  offset        typefile   string a 0        IF typefile NE  GRIB  THEN offset   offset addoff     ENDIF    3  we try space   0     IF typefile NE  GRIB  THEN BEGIN       a   assoc num  bytarr 4   nozero  offset        typefile   string a 0      ENDIF    4  we try any value for space     IF typefile NE  GRIB  THEN BEGIN       REPEAT BEGIN         CASE 1 OF           array_equal a 0 3    byte G    :offset   offset 3           array_equal a 0 2:3  byte GR   :offset   offset 2           array_equal a 0 1:3  byte GRI :offset   offset 1           else:offset   offset 4         ENDCASE         IF offset GE maxoffset THEN GOTO  out         a   assoc num  bytarr 4   nozero  offset          typefile   string a 0        ENDREP UNTIL typefile EQ  GRIB      ENDIF       start    start  offset            a   assoc num  bytarr 1   nozero  offset 4      recsize   bit2int binary a 0  binary a 1  binary a 2      offset   offset recsize     previousrecsize   recsize     ENDWHILE   out:     RETURN  start 1:n_elements start 1   END"); 
    244 a[242] = new Array("./ToBeReviewed/LECTURE/binary.html", "binary.pro", "", "     file_comments   Returns the binary representation of a number of any numerical type        param NUMBER  in required    scalar or array of numbers  any numerical type        Returns   Byte array with binary representation of numbers        Examples     Binary representation of 11b:       IDL  print  binary 11b        0 0 0 0 1 0 1 1     Binary representation of pi  x86: Little endian IEEE representation :       IDL  print  format z9 8 5x 4 1x 8i1  long pi 0  binary pi         40490fdb      01000000 01001001 00001111 11011011  x86 Linux         0fdb4149      00001111 11011011 01000001 01001001  Alpha OpenVMS        IDL  print  format 8 1x 8i0  binary dpi         01000000 00001001 00100001 11111011 01010100 01000100 00101101 00011000     Some first tests before type double was added:       print  format 2a6 4x 2z9 8 4x 8z3 2             version arch   version os  long dpi 0 2  byte dpi 0 8          x86 linux     54442d18 400921fb     18 2d 44 54 fb 21 09 40       sparc sunos     400921fb 54442d18     40 09 21 fb 54 44 2d 18       alpha   vms     0fda4149 68c0a221     49 41 da 0f 21 a2 c0 68        Beginning with IDL 5 1  Alpha VMS uses IEEE representation as well        history:      19 Dec 1997  Originally a news posting by David Fanning                           Re: bits from bytes       20 Dec 1997   Complete  rewrite: eliminate loops       22 Dec 1997  Bit shift instead of exponentiation  return byte        array  handle input arrays         Think about double and complex types       22 Sep 1998  Complete rewrite: reduce every numerical type to        single bytes  Check that big and little endian machines        return exactly the same results  if IEEE       7 May 2003     Added newish data types  unsigned and long64   BT      version    Id: binary pro 142 2006 07 21 12:47:49Z navarro       function binary  number     compile_opt idl2  strictarrsubs     s   size number    type   s s 0    1    n_no   s s 0    2    Numerical types:  will have to be completed if IDL adds double long      1: byte              1 byte unsigned integer    2: integer           2 byte   signed integer    3: long              4 byte   signed integer    4: floating point    4 byte  single precision    5: double precision  8 byte  double precision    6: complex         2x4 byte  single precision    9: double complex  2x8 byte  double precision    12: uInt       2 byte  unsigned integer    13: uLong      4 byte  unsigned integer    14: Long64        8 byte  signed integer    15: uLong64       8 byte  unsigned integer    Non numerical types:   0: undefined  7: string  8: structure  10: pointer  11: object reference    nbyt    0  1  2  4  4  8  8  0  0  16  0  0    number of bytes per type   code    0  1  2  3  4  5  6  7  8  9  10  11  12  13  14  15    nbyt    0  1  2  4  4  8  8  0  0  16  0  0   2   4   8   8    ntyp   nbyt type    if ntyp eq 0 then message   Invalid argument  must be numerical type    bits    128  64  32  16   8   4   2   1      ishft 1b  7 indgen 8    For correct array handling and byte comparison   number  and  bits  require   same dimensions   numvalue and bitvalue   bitvalue    bits  intarr ntyp    intarr n_no    little_endian    byte 1  0  1 0    In case of complex type and little endian machine  swap the two float values   before the complete second dimension is reversed at returning    if  type eq 6 or type eq 9  and little_endian then     type complex     numvalue   reform byte number  0  1  ntyp 2  2  n_no                         intarr 8     1 0    8  ntyp  n_no      else numvalue    byte number  0  1  ntyp  n_no intarr 8        On little endian machines  the second dimension of the return value must   be reversed    if little_endian AND type NE 1 then       return  reverse numvalue and bitvalue  ne 0  2  else       return           numvalue and bitvalue  ne 0 end"); 
    245 a[243] = new Array("./ToBeReviewed/LECTURE/changeread.html", "changeread.pro", "", "     file_comments        categories        param NEWREAD        returns        uses        restrictions        examples        history        version    Id: changeread pro 163 2006 08 29 12:59:46Z navarro        todo seb     FUNCTION changeread  newread       compile_opt idl2  strictarrsubs    common       newread must be two structures      if size newread   type  NE 8 then return  0     we compare the two structure which caracterise the read        case 1 of       ccreadparameters funclec_name NE newread funclec_name:       ccreadparameters jpidta NE newread jpidta:       ccreadparameters jpjdta NE newread jpjdta:       ccreadparameters jpkdta NE newread jpkdta:       ccreadparameters ixmindta NE newread ixmindta:       ccreadparameters ixmaxdta NE newread ixmaxdta:       ccreadparameters iymindta NE newread iymindta:       ccreadparameters iymaxdta NE newread iymaxdta:       ccreadparameters izmindta NE newread izmindta:       ccreadparameters izmaxdta NE newread izmaxdta:       ELSE:return  0    endcase     update the common paramaters      ccreadparameters   newread    jpidta   newread jpidta    jpjdta   newread jpjdta    jpkdta   newread jpkdta    ixmindta   newread ixmindta    ixmaxdta   newread ixmaxdta    iymindta   newread iymindta    iymaxdta   newread iymaxdta    izmindta   newread izmindta    izmaxdta   newread izmaxdta      return  1 end"); 
    246 a[244] = new Array("./ToBeReviewed/LECTURE/inverse_binary.html", "inverse_binary.pro", "", "       file_comments   Inverse function of the binary pro function   given a   input array of 0 1  return its corresponding byte integer long   representation      categories      param BINNUMB  in required    Must be a binary type array containing only 0 and 1    According to binary pro outputs  binnum array must have the   following dimensions values:  8  t  d1  d2    t gives the output type: t   1   byte                               t   2   integer                               t   4   long           d1  d2  are the output dimensions        returns    A byte integer long array with  d1  d2  dimensions      restrictions   The binary number can represent only byte integer long      examples         IDL  a indgen 5        IDL  b binary a        IDL  help  b       B               BYTE        Array 8  2  5        IDL  print  b          0   0   0   0   0   0   0   0          0   0   0   0   0   0   0   0                 0   0   0   0   0   0   0   0          0   0   0   0   0   0   0   1                 0   0   0   0   0   0   0   0          0   0   0   0   0   0   1   0                 0   0   0   0   0   0   0   0          0   0   0   0   0   0   1   1                 0   0   0   0   0   0   0   0          0   0   0   0   0   1   0   0       IDL  help  inverse_binary b            INT         Array 5        IDL  print  inverse_binary b               0       1       2       3       4      history        Sebastien Masson  smasson jamstec go jp         July 2004      version    Id: inverse_binary pro 157 2006 08 21 09:01:50Z navarro           FUNCTION inverse_binary  binnumb       compile_opt idl2  strictarrsubs     s   size binnumb   dimensions    IF n_elements s  EQ 1 THEN numbofbit   8 ELSE numbofbit   8 s 1    nvalues   n_elements binnumb numbofbit   bn   reform long binnumb  numbofbit  nvalues      CASE numbofbit OF     8:res   byte total temporary bn 2b reverse indgen numbofbit replicate 1b  nvalues  1  1      16:res   fix total temporary bn 2 reverse indgen numbofbit replicate 1  nvalues  1  1   double      32:res   long total temporary bn 2L reverse indgen numbofbit replicate 1L  nvalues  1  1   double    ENDCASE     CASE n_elements s  OF     1:res   res 0      2:res   res 0      3:     ELSE:res   reform res  s 2:n_elements s 1   over    ENDCASE     return  res end"); 
    247 a[245] = new Array("./ToBeReviewed/LECTURE/litchamp.html", "litchamp.pro", "", "             file_comments   Allows to read an array or a structure corresponding to a field    If we have in input:       an array  litchamp send back the array       a structure  litchamp send back the first element of the structure      which must be the field in an array      Litchamp profit of this to look other elements of the structure et     update if needed global variables which refer to the field:     vargrid  varname  varunit  vardate  varexp   valmask et time       categories   Graphics      param STRUCT  in required type array or struct type array or structure     If STRUCT is a structure  it must follow following rules:           the first element is the array containing the field            other elements are strings containing informations on the field except          for the one about the date  This one can be either a string to designate          a particular date  ex:  August 1999  or a vector of julian days  of IDL           corresponding  to the calendar to be associated with the field if it is a          temporal series            the order of elements  except the first  has not any importance             the other elements  except the first  are optional            they are recognize by the first letter of their names:               g  to update vargrid               u  to update varunit               e  to update varexp               d  to update vardate               n  to update varname               m  to update valmask      keyword GRID   We activate this keyword if we want litchamp to send back the variable    associated with the element of the structure starting by  g  if it exist    and   if it does not       keyword UNIT   We activate this keyword if we want litchamp to send back the variable    associated with the element of the structure starting by  u  if it exist    and   if it does not       keyword EXP   We activate this keyword if we want litchamp to send back the variable    associated with the element of the structure starting by  u  if it exist    and   if it does not       keyword DATE   We activate this keyword if we want litchamp to send back the variable    associated with the element of the structure starting by  d  if it exist    and   if it does not       keyword NAME   We activate this keyword if we want litchamp to send back the variable    associated with the element of the structure starting by  n  if it exist    and   if it does not       keyword LEVEL   We activate this keyword if we want litchamp to send back the variable    associated with the element of the structure starting by  l  if it exist    and  1 if it does not        keyword MASK   We activate this keyword if we want litchamp to send back the variable    associated with the element of the structure starting by  m  if it exist    and  1 if it does not       returns   It is the array containing the field       uses   common pro      restrictions   Update if needed global variables vargrid    varname  varunit  vardate  varexp  valmask and time       examples             IDL  print  vargrid    varname    varunit    vardate    varexp           T        0         IDL  help  litchamp a:indgen 5  u: C  name: toto              INT         Array 5       IDL  print  vargrid    varname    varunit    vardate    varexp            T  toto  C  0         IDL  help  litchamp a:indgen 5  da: 1999              INT         Array 5       IDL  print  vargrid    varname    varunit    vardate    varexp           T  toto  C  1999            history   Sebastien Masson  smasson lodyc jussieu fr                          28 5 1999      version    Id: litchamp pro 163 2006 08 29 12:59:46Z navarro             FUNCTION litchamp  struct  GRID   grid  NAME   name  UNIT   unit  EXP   exp  DATE   date                        LEVEL   level  MASK   mask     compile_opt idl2  strictarrsubs    common     if size struct   type  ne 8 then BEGIN   so contour is not a structure        if keyword_set grid  then return          if keyword_set name  then return          if keyword_set unit  then return          if keyword_set exp   then return          if keyword_set date   then return          if keyword_set level   then return   1       if keyword_set mask   then return   1       return   struct               ENDIF        IF n_tags struct  EQ 1 then BEGIN   The structure has only one element        if keyword_set grid  then return          if keyword_set name  then return          if keyword_set unit  then return          if keyword_set exp   then return          if keyword_set date   then return          if keyword_set level   then return   1       if keyword_set mask   then return   1       return   struct 0     ENDIF        nomelements   tag_names struct     for i   1  n_tags struct 1 do begin       case strlowcase strmid nomelements i  0  1  of           g :BEGIN             if keyword_set grid  then return  strupcase struct i              vargrid   strupcase struct i           END           n :BEGIN             if keyword_set name  then return  struct i              varname   struct i           END           u :BEGIN             if keyword_set unit  then return  struct i              varunit   struct i           END           e :BEGIN             if keyword_set exp  then return  struct i              varexp   struct i           END           m :BEGIN             if keyword_set mask  then return  struct i              valmask   struct i           END           d :BEGIN              if size struct i type  EQ 7 THEN BEGIN                 vardate   struct i              ENDIF ELSE BEGIN                time   struct i                 jpt   n_elements time                 if jpt EQ 1 then vardate    strtrim vairdate struct i 0  2                 ELSE vardate    strtrim vairdate struct i 0  2                         strtrim vairdate struct i jpt 1  2               ENDELSE             if keyword_set date  then return  vardate          END           h :BEGIN             computehopegrid   struct i xaxis   struct i yaxis                   struct i zaxis   struct i linetype                  FIRSTS    struct i firsts  LASTS    struct i lasts                  FORTHEMASK   struct 0  pttype    struct i pttype          END          ELSE:BEGIN              ras   report Le nom  nomelements i  ne correspont a aucun element reconnu de la structure  cf  IDL  xhelp   litchamp           end       endcase    endfor      if keyword_set grid  then return       if keyword_set name  then return       if keyword_set unit  then return       if keyword_set exp   then return       if keyword_set date   then return       if keyword_set level   then return   1    if keyword_set mask   then return   1     return   struct 0  end"); 
    248 a[246] = new Array("./ToBeReviewed/LECTURE/ncdf_lec.html", "ncdf_lec.pro", "", "             file_comments   Give informations on a file net cdf and allows to recuperate    variables which are write in       categories   Reading      param NOM  in required    Name of a file net cdf situated in the directory stipulated by iodir       keyword ATT    global  or at the name of a variable  Allows to see all attributes    joined at a variable      keyword DIM   Give the list of dimensions       keyword VAR         1   var: Gove the list of dimensions          2  var nom de variable : in this case the function send back the variable       keyword IODIR   String containing the directory containing the file to be read      keyword _EXTRA   Allows to pass keywords defined by IDL to functions NETCDF   particularly OFFSET    and COUNT in ncdf_varget       returns    1  except if var nom de variable  then the function send back the variable       restrictions   Variables s names of the program are similar to these used by the IDL manual     scientific data formats       history   Sebastien Masson  smasson lodyc jussieu fr                          4 1 98      version    Id: ncdf_lec pro 163 2006 08 29 12:59:46Z navarro         function ncdf_lec nom ATT att DIM dim VAR var  IODIR   iodir  _extra   ex     compile_opt idl2  strictarrsubs      res    1      if NOT keyword_set IODIR  then iodir        if not keyword_set att  or keyword_set dim  or keyword_set var  then BEGIN       att   1       dim   1       var   1        commande ncdump  c  iodir nom        spawn commande        goto fini    endif     opening of the file name       cdfid ncdf_open iodir nom      Wht does the file contain       wathinside ncdf_inquire cdfid      print in the file   iodir nom  there are:     if keyword_set dim  then begin        print nombre de dimensions:  strtrim wathinside ndims 1        print numero de la dimension dont la valeur est infini:  strtrim wathinside recdim 1     endif    if keyword_set var  then       if size var   type  NE 7 then print nombre de variables  : strtrim wathinside nvars 1     if keyword_set att  then begin       if strlowcase att  ne  global  then goto nonglobal       print nombre de attributs globaux : strtrim wathinside ngatts 1     endif     Global attributes      if keyword_set att  then begin       print          print ATTRIBUTS GLOBAUX        for attiq 0 wathinside ngatts 1 do begin          name ncdf_attname cdfid attiq global   attribute s name          ncdf_attget cdfid name value global  attribute s value          print name :  string value        endfor    endif nonglobal:     Display of different dimensions       if keyword_set dim  then begin        print          print DIMENSIONS     endif    nomdim    strarr wathinside ndims     tailledim lonarr wathinside ndims     for dimiq 0 wathinside ndims 1 do begin       ncdf_diminq cdfid dimiq name value   dimension s name and value       nomdim dimiq name       tailledim dimiq value       if keyword_set dim  then begin           print dimension numero  strtrim dimiq 1  nom:  nomdim dimiq                valeur:    strtrim tailledim dimiq 1        endif    endfor     Display of different variables         if keyword_set att  or keyword_set var  then begin    var s value  string or 1    help  var  output   nature    if  strpos nature   STRING 0  NE  1 then nature    string  ELSE nature    1    If we just have to read the variable     if nature EQ  string  then begin       ncdf_varget  cdfid  var  res  _extra   ex       GOTO  sortie    ENDIF    If it is to have pieces of information     if not keyword_set att  then att rien        print          for varid 0 wathinside nvars 1 do begin          varcontent ncdf_varinq cdfid varid    What does variable contain           if strlowcase att  eq strlowcase varcontent name  or keyword_set var              then begin             print variable numero:  strtrim varid 1  nom: varcontent name                  type:   varcontent datatype  dimensions: nomdim varcontent dim              if strlowcase att  eq strlowcase varcontent name  then begin                for attiq 0 varcontent natts 1 do begin                   name ncdf_attname cdfid varid attiq                    ncdf_attget cdfid varid name value                   print       strtrim attiq   name :  strtrim string value 1                 endfor                goto  sortie             endif          endif       endfor    endif   sortie:    ncdf_close cdfid     fini:     return  res end"); 
    249 a[247] = new Array("./ToBeReviewed/LECTURE/read_ftp.html", "read_ftp.pro", "", "     file_comments           categories          param U         param CMD        param RES          keyword OUT        keyword COUNT   Upon return  the number of elements in the result set     This is only important when the result set is the empty   set  in which case COUNT is set to zero        restrictions          examples        history         version    Id: read_ftp pro 157 2006 08 21 09:01:50Z navarro      pro ftp_post  u  cmd  res  out out  count count   compile_opt idl2   if  cmd ne   then begin     printf  u  cmd  format a      comment out the following line to disable debug info     print   cmd   endif   if  size out type  eq 0  then out 2      catch  err   if  err ne 0  then return   line    count 0   while arg_present res  do begin     readf  u  line     if count eq 0 then res line else res res line      count count 1     comment out the following line to disable debug info     print    READ_FTP   ftp: ftp rsinc com pub gzip README GZIP  DATA data     IDL  help  data            DATA            BYTE        Array 2134      IDL  print  string data                README file: Research Systems Anonymous FTP site  ftp rsinc com                      pub directory                     gzip directory                 2  Retrieve some files from podaac jpl nasa gov and store the files      in the current working directory:        IDL  files   string lindgen 10 50 format MGB370 3 3d gz       IDL  READ_FTP   podaac jpl nasa gov  files          IDL         pub sea_surface_height topex_poseidon mgdrb data MGB_370   FILE      IDL  spawn dir MGB log_output       Volume in drive C is Local Disk       Volume Serial Number is 34CE 24DF         Directory of C: test test0307        07 28 2003  11:58a             362 167 MGB370 050 gz      07 28 2003  11:58a             333 005 MGB370 051 gz      07 28 2003  11:58a             310 287 MGB370 052 gz      07 28 2003  11:58a             358 771 MGB370 053 gz      07 28 2003  11:59a             387 282 MGB370 054 gz      07 28 2003  11:59a             361 633 MGB370 055 gz      07 28 2003  11:59a             383 075 MGB370 056 gz      07 28 2003  11:59a             365 844 MGB370 057 gz      07 28 2003  11:59a             383 918 MGB370 058 gz      07 28 2003  12:00p             372 712 MGB370 059 gz                    10 File s       3 618 694 bytes      These compressed files can cosequently be opened with OPENR and the      COMPRESSED keyword       history      version    Id: read_ftp pro 157 2006 08 21 09:01:50Z navarro        todo    seb: que fait on de  syntax  au debut du header    give examples with date in year 0  should not exists but may happen       pro read_ftp  site  files  dir  port  data data  file file  user user                  pass pass  ptr ptr   compile_opt idl2   if n_elements port  eq 0 then port ftp    if n_elements files  eq 0 then begin     if strcmp site ftp: 6  then host strmid site 6  else host site     pos strpos host      dir strmid host pos      host strmid host 0 pos      pos strpos dir reverse_search      files strmid dir pos 1      dir strmid dir 0 pos    endif else host site   if  size user type  eq 0  then user anonymous    if  size pass type  eq 0  then pass test test com                                      socket  u  host  port  connect_timeout 5  read_timeout 5   get_lun   ftp_post  u    res   ftp_post  u   USER  user  res  out 3      ftp_post  u   PASS  pass  res   ftp_post  u   TYPE I  res   if  size dir type  ne 0  then ftp_post  u   CWD  dir  res   if keyword_set file  or arg_present data  then begin     bufsize 512     buffer bytarr bufsize      n n_elements files      if arg_present data  then dat ptrarr n      for i 0  n 1 do begin       ftp_post  u   SIZE  files i  res  out 213         sz long64 strmid res n_elements res 1 4        if arg_present data  then dat i ptr_new bytarr sz        ftp_post  u   PASV  res       ftp_parse_pasv  res  host  port       ftp_post  u   RETR  files i  res  out 1          socket  v  host  port  connect_timeout 5  read_timeout 5              get_lun   rawio       tc 0ll       if keyword_set file  then openw w files i get_lun       while  tc lt sz  do begin         if  sz tc lt bufsize  then begin           bufsize sz tc           buffer bytarr bufsize          endif         readu  v  buffer  transfer_count dtc         if arg_present data  then               dat i tc dtc eq bufsize buffer:buffer 0:dtc 1          if keyword_set file  then              writeu w dtc eq bufsize buffer:buffer 0:dtc 1          tc tc dtc       endwhile       free_lun  v       if keyword_set file  then free_lun  w       ftp_post  u    res     endfor     if arg_present data  then begin        if  n gt 1 or keyword_set ptr  then data dat          else data temporary dat 0       endif   endif   ftp_post  u   QUIT  res   free_lun  u end"); 
    250 a[248] = new Array("./ToBeReviewed/LECTURE/read_ncdf.html", "read_ncdf.pro", "", "     file_comments   Reading function for the file net_cdf    This program is less universal than ncdf_lec  it appeal to declared    variables in common pro  but it is very easier to be used  It considerate   the declaration of the different zooms which have been defined    ixminmesh premierx  the declaration of the variable key_shift    To put it in a nutshell  the result of read_ncdf can be directly used in plt    This is also this program which is used by default in our reading widgets         categories   Reading       param NAME  in required type string    It define the field to be read       param BEGINNING  in required    Relative with the time axis    These can be      2 date of the  type yyyymmdd and in this case  we select dates     which are included between these two dates       2 indexes which define between which and which time step we have     to extract the temporal dimension       param ENDING   in required    Relative with the time axis    See BEGINNING        param COMPATIBILITY  in optional    Useless  defined for compatibility        keyword BOXZOOM    Contain the boxzoom on which we have to do the reading        keyword CALLITSELF  default 0 type scalar: 0 or 1    For ROMS outputs  Use by read_ncdf itself to access auxilliary data  h and zeta        keyword FILENAME  required type string    It contains he file s name        keyword INIT  default 0 type scalar: 0 or 1    To call automatically initncdf  filename and thus   redefine all the grid parameters       keyword GRID    UTVWF  to specify the type of grid  Default is  1    based on the name of the file if the file ends by   GRID _ TUVFW NC  not case sensible  or  2  T if case  1    is not found        keyword TIMESTEP  default 0 type scalar: 0 or 1    Specify that BEGINNING and ENDING refer to indexes of the time axis and not to dates      keyword TOUT  default 0 type scalar: 0 or 1    We activate it if we want to read the file on the whole domain without    considerate the sub domain defined by the boxzoom or    lon1 lon2 lat1 lat2 vert1 vert2        keyword NOSTRUCT  default 0 type scalar: 0 or 1    We activate it if we do not want that read_ncdf send back a structure    but only the array referring to the field        keyword TIMEVAR  type string    It define the name of the variable that   contains the time axis  This keyword can be useful if there   is no unlimited dimension or if the time axis selected by default    the first 1D array with unlimited dimension  is not the good one       keyword ZETAFILENAME  default FILENAME type string    For ROMS outputs  The filename of the file where zeta vriable should be read      keyword ZETAZERO  default 0 type scalar: 0 or 1    For ROMS outputs  To define zeta to 0  instead of reading it      keyword _EXTRA   Used to pass your keywords       returns   Structure readable by litchamp pro or an array if NOSTRUCT is activated        uses   common pro       restrictions   The field must have a temporal dimension        history   Sebastien Masson  smasson lodyc jussieu fr                         15 10 1999        version    Id: read_ncdf pro 199 2006 12 13 07:47:14Z smasson             FUNCTION read_ncdf  name  beginning  ending  compatibility  BOXZOOM   boxzoom  FILENAME   filename                         PARENTIN   parentin  TIMESTEP   timestep  TIMEVAR   timevar                         TOUT   tout  NOSTRUCT   nostruct  CONT_NOFILL   CONT_NOFILL  INIT   init                         GRID   grid  FBASE2TBASE   fbase2tbase  CALLITSELF   callitself                         ZETAFILENAME   zetafilename  ZETAZERO   zetazero                         _EXTRA   ex       compile_opt idl2  strictarrsubs    cm_4mesh  cm_4data  cm_4cal   IF NOT keyword_set key_forgetold  THEN BEGIN  updatenew  updatekwd   ENDIF     we find the filename       print filename    is parent a valid widget     if keyword_set parentin  then BEGIN     parent   long parentin      parent   parent widget_info parent   managed    ENDIF   filename   isafile filename   filename  IODIRECTORY   iodir  _EXTRA   ex      Opening of the name file     if size filename   type  NE 7 then       return  report read_ncdf cancelled    IF  version OS_FAMILY EQ  unix  THEN spawn   file  filename     dev null    cdfid   ncdf_open filename    contient   ncdf_inquire cdfid      we check if the variable name exists in the file      if ncdf_varid cdfid  name  EQ  1 then BEGIN     ncdf_close  cdfid     return  report variable  name   C not found in the file  filename    ENDIF   varcontient   ncdf_varinq cdfid  name    IF varcontient ndims LT 2 THEN return  report read_ncdf cannot read scalar or 1D data    look for the dimension names   dimnames   strarr varcontient ndims    FOR i   0  varcontient ndims 1 DO BEGIN     ncdf_diminq  cdfid  varcontient dim i  tmp  dimsize     dimnames i    tmp   ENDFOR      shall we redefine the grid parameters     if keyword_set init  THEN initncdf  filename  _extra   ex     check the time axis and the debut and ending dates     if n_elements beginning  EQ 0 then begin     beginning   0     timestep   1   endif   if keyword_set timestep  then begin     firsttps   beginning 0      if n_elements ending  NE 0 then lasttps   ending 0  ELSE lasttps   firsttps     jpt   lasttps firsttps 1     IF NOT keyword_set callitself  then time   julday 1  1  1    lindgen jpt    ENDIF ELSE BEGIN     if keyword_set parent  then BEGIN       widget_control  parent  get_uvalue   top_uvalue       filelist   extractatt top_uvalue   filelist        IF filelist 0  EQ  many   THEN filelist   filename       currentfile    where filelist EQ filename 0        time    extractatt top_uvalue   fileparameters currentfile time_counter       date1   date2jul beginning 0        if n_elements ending  NE 0 then date2   date2jul ending 0  ELSE date2   date1       firsttps   where time EQ date1    firsttps   firsttps 0        lasttps   where time EQ date2    lasttps   lasttps 0      ENDIF ELSE BEGIN       IF keyword_set timevar  THEN BEGIN          timeid   ncdf_varid cdfid  timevar          IF timeid EQ  1 THEN BEGIN           ncdf_close  cdfid           return  report the file  filename  as no variable     timevar                                 C Use the TIMESTEP keyword          endif         timecontient   ncdf_varinq cdfid  timeid          contient recdim   timecontient dim 0        ENDIF ELSE BEGIN    we find the infinite dimension         timedim   contient recdim         if timedim EQ  1 then BEGIN           ncdf_close  cdfid           return  report the file  filename  as no infinite dimension   C Use TIMESTEP or TIMEVAR keyword          endif   we find the FIRST time axis               timeid   0         repeat BEGIN         As long as we have not find a variable having only one dimension: the infinite one           timecontient   ncdf_varinq cdfid  timeid    that the variable contain            timeid   timeid 1         endrep until  n_elements timecontient dim  EQ 1                         AND timecontient dim 0  EQ contient recdim              OR timeid EQ contient nvars 1           if timeid EQ contient nvars 1 then BEGIN           ncdf_close  cdfid           return  report the file  filename  as no time axis variable   C Use the TIMESTEP keyword          endif         timeid   timeid 1       ENDELSE    we must found the time origin of the julian calendar used in the   time axis     does the attribut units an dcalendar exist for the variable time axis        if timecontient natts EQ 0 then BEGIN         ncdf_close  cdfid         return  report the variable  timecontient name  has no attribut C Use the TIMESTEP keyword or add the attribut  units  to the variable        endif       attnames   strarr timecontient natts        for attiq   0  timecontient natts 1 do attnames attiq    ncdf_attname cdfid  timeid  attiq        if  where attnames EQ  units 0  EQ  1 then BEGIN         ncdf_close  cdfid         return  report Attribut  units  not found for the variable  timecontient name   C Use the TIMESTEP keyword        ENDIF     now we try to find the attribut called calendar    the attribute  calendar  exists    If no  we suppose that the calendar is gregorian calendar         if  where attnames EQ  calendar 0  NE  1 then BEGIN         ncdf_attget  cdfid  timeid   calendar  value         value   string value          CASE value OF            noleap :key_caltype    noleap             360d :key_caltype    360d             greg :IF n_elements key_caltype  EQ 0 THEN key_caltype    greg            ELSE:BEGIN              notused   report Unknown calendar:  value  we use greg calendar               key_caltype    greg            END         ENDCASE       ENDIF ELSE BEGIN          notused   report Unknown calendar  we use  key_caltype  calendar           IF n_elements key_caltype  EQ 0 THEN key_caltype    greg        ENDELSE     now we take acre of units attribut       ncdf_attget  cdfid  timeid   units  value     time_counter:units    seconds since 0001 01 01 00:00:00      time_counter:units    hours since 0001 01 01 00:00:00      time_counter:units    days since 1979 01 01 00:00:00      time_counter:units    months since 1979 01 01 00:00:00      time_counter:units    years since 1979 01 01 00:00:00        we decript the  units  attribut to find the time origin       value   strtrim strcompress string value  2        mots   str_sep value            unite   mots 0        unite   strlowcase unite        IF strpos unite   s  strlen unite 1  NE  1 THEN unite   strmid unite  0  strlen unite 1        IF strpos unite   julian_  NE  1 THEN unite   strmid unite  7        IF unite NE  second  AND unite NE  hour  AND unite NE  day             AND unite NE  month  AND unite NE  year  THEN BEGIN         ncdf_close  cdfid         return  report time units does not start with seconds hours days months years        ENDIF       IF stregex value      since  0 9 1 4 0 9 1 2 0 9 1 2   boolean  EQ 0 THEN BEGIN         ncdf_close  cdfid         return  report attribut units of time has not the good format:     since  0 9 1 4 0 9 1 2 0 9 1 2        ENDIF       depart   str_sep mots 2          ncdf_varget  cdfid  timeid  time       time   double time        case unite of          second :time   julday depart 1  depart 2  depart 0 time 86400 d          hour :time   julday depart 1  depart 2  depart 0 time 24 d          day :time   julday depart 1  depart 2  depart 0 time          month :BEGIN            if total fix time  NE time  NE 0 then     we switch to days with 30d m             time   julday depart 1  depart 2  depart 0 round time 30                ELSE for t   0  n_elements time 1 DO               time t    julday depart 1 time t  depart 2  depart 0          END          year :BEGIN           if total fix time  NE time  NE 0 then     we switch to days with 365d y             time   julday depart 1  depart 2  depart 0 round time 365                ELSE for t   0  n_elements time 1 do               time t    julday depart 1  depart 2  depart 0 time t          END         ELSE:BEGIN           ncdf_close  cdfid           return  report The  units  attribute of the time axis must be something like:  C  seconds since 0001 01 01    C  days since 1979 01 01    C  months since 1979 01 01    C  years since 1979 01 01           end       ENDCASE       date1   date2jul beginning 0        if n_elements ending  NE 0 then date2   date2jul ending 0  ELSE date2   date1       time   double time        firsttps   where time GE date1    firsttps   firsttps 0        if firsttps EQ  1 THEN BEGIN         ncdf_close  cdfid         return  report date 1:  strtrim jul2date date1  1  is not found in the time axis        ENDIF       lasttps   where time LE date2        if lasttps 0  EQ  1 THEN BEGIN         ncdf_close  cdfid         return  report the time axis has no date before date 2:  strtrim jul2date date2  1        endif       lasttps   lasttps n_elements lasttps 1        if lasttps LT firsttps then BEGIN         ncdf_close  cdfid         return  report the time axis has no dates between date1 and  date 2:  strtrim jul2date date1  1   strtrim jul2date date2  1        endif     ENDELSE     time   time firsttps:lasttps      jpt   lasttps firsttps 1   ENDELSE     Name of the grid on which the field refer to      IF keyword_set grid  THEN vargrid   strupcase grid  ELSE BEGIN     vargrid    T                  default definition     IF finite glamu 0  EQ 1 THEN BEGIN   are we in one of the case corresponding to ROMS conventions        CASE 1 OF         dimnames 2  long key_stride    key_shift   long testvar var   key_shift      IF n_elements key_yreverse  EQ 0 THEN key_yreverse   0   IF keyword_set key_yreverse  THEN BEGIN     tmp   jpj 1 firsty     firsty   jpj 1 lasty     lasty   tmp   ENDIF     IF n_elements key_zreverse  EQ 0 THEN key_zreverse   0   IF keyword_set key_zreverse  THEN BEGIN     tmp   jpk 1 firstz     firstz   jpk 1 lastz     lastz   tmp   ENDIF     IF keyword_set fbase2tbase  THEN BEGIN     case strupcase vargrid  of        U :BEGIN         IF NOT keyword_set key_periodic  THEN BEGIN           firstx   firstx 1           lastx   lastx 1         ENDIF       END        V :BEGIN         firsty   firsty 1         lasty   lasty 1       END        F :BEGIN         firsty   firsty 1         lasty   lasty 1         IF NOT keyword_set key_periodic  THEN BEGIN           firstx   firstx 1           lastx   lastx 1         ENDIF       END       ELSE:     endcase   ENDIF     IF keyword_set fbase2tbase  AND keyword_set key_periodic        AND  strupcase vargrid  EQ  U  OR strupcase vargrid  EQ  F  THEN key_shift    key_shift 1        read_ncdf_varget         IF keyword_set fbase2tbase  AND keyword_set key_periodic        AND  strupcase vargrid  EQ  U  OR strupcase vargrid  EQ  F  THEN key_shift    key_shift 1     We define global variable joined with the variable      varname   IF NOT keyword_set callitself  THEN varname   name   varunit   if varcontient natts NE 0 then begin     attnames   strarr varcontient natts      for attiq   0  varcontient natts 1 do attnames attiq    ncdf_attname cdfid  name  attiq      lowattnames   strlowcase attnames        found    where lowattnames EQ  units 0      IF found NE  1 then ncdf_attget  cdfid  name  attnames found  value ELSE value         IF NOT keyword_set callitself  THEN varunit   strtrim string value  2        found    where lowattnames EQ  add_offset 0      if found NE  1 then ncdf_attget  cdfid  name  attnames found  add_offset ELSE add_offset   0        found    where lowattnames EQ  scale_factor 0      if found NE  1 then ncdf_attget  cdfid  name  attnames found  scale_factor ELSE scale_factor   1        missing_value    no      found    where lowattnames EQ  _fillvalue 0      if found NE  1 then ncdf_attget  cdfid  name  attnames found  missing_value     found    where lowattnames EQ  missing_value 0      if found NE  1 then ncdf_attget  cdfid  name  attnames found  missing_value     ENDIF ELSE BEGIN      IF NOT keyword_set callitself  THEN varunit         add_offset   0      scale_factor   1      missing_value    no    ENDELSE   vardate   We make a legible date in function of the specified language    year   long beginning 0 10000   month    long beginning 0 100  MOD 100   day    long beginning 0  MOD 100    vardate   string format    C CMoA  31 month 1   strtrim day  1   strtrim year  1    varexp   file_basename filename     we apply reverse   if keyword_set key_yreverse  AND ny NE 1 THEN        res   reverse reform res  nx  ny  nz  jpt   overwrite   2    if keyword_set key_zreverse  AND nz NE 1        AND varcontient ndims    where varcontient dim EQ contient recdim 0  NE  1  EQ 3 THEN           res   reverse reform res  nx  ny  nz  jpt   overwrite   3    We apply the value valmask on land points    if NOT keyword_set cont_nofill  then begin     valmask   1e20     case 1 of       varcontient ndims eq 2:BEGIN  xy array         mask   mask    0          earth   where mask EQ 0        END       varcontient ndims eq 3 AND  where varcontient dim EQ contient recdim 0  EQ  1:BEGIN  xyz array         earth   where mask EQ 0        END       varcontient ndims eq 3 AND  where varcontient dim EQ contient recdim 0  NE  1:BEGIN  xyt array         mask   mask    0          earth   where mask EQ 0          if earth 0  NE  1 then BEGIN           earth   earth replicate 1  jpt replicate nx ny  n_elements earth lindgen jpt          END       END       varcontient ndims eq 4:BEGIN  xyzt array         earth   where mask EQ 0          if earth 0  NE  1 then BEGIN           earth   earth replicate 1  jpt replicate nx ny nz  n_elements earth lindgen jpt          END       END     endcase   ENDIF ELSE earth    1   we look for  missing_value   IF size missing_value   type  NE 7 then BEGIN     IF size missing_value   type  EQ 1 THEN BEGIN        IF isnumber string missing_value  tmp  EQ 1 THEN missing_value   tmp     ENDIF       if missing_value NE valmask then begin     if abs missing_value  LT 1e6 then missing   where res EQ missing_value        ELSE missing   where abs res  gt abs missing_value 10       ENDIF ELSE missing    1   ENDIF ELSE missing    1   we apply add_offset  scale_factor and missing_value    if scale_factor NE 1 then res   temporary res scale_factor   if add_offset NE 0 then res   temporary res add_offset   if missing 0  NE  1 then res temporary missing     values f_nan   if earth 0  NE  1 then res temporary earth    1 e20     if it is roms outputs  we need to get additionals infos    IF NOT keyword_set callitself  THEN BEGIN     IF strmid dimnames 0  0  3  EQ  xi_  AND strmid dimnames 1  0  4  EQ  eta_  THEN BEGIN       ncdf_attget  cdfid   theta_s  theta_s   global       ncdf_attget  cdfid   theta_b  theta_b   global       ncdf_attget  cdfid   hc  hc   global   look for all variables names       allvarnames   strarr contient nvars        FOR i   0  contient nvars 1 DO BEGIN         tmp   ncdf_varinq  cdfid  i          allvarnames i    tmp name       ENDFOR       CASE 1 OF         keyword_set zetazero :zeta   fltarr nx  ny  jpt          keyword_set zetafilename :               zeta   read_ncdf zeta  firsttps  lasttps  FILENAME   zetafilename                                  TIMESTEP   NOSTRUCT  CONT_NOFILL   CONT_NOFILL                                 GRID   vargrid   CALLITSELF  _EXTRA   ex           where allvarnames EQ  zeta 0  NE  1:              zeta   read_ncdf zeta  firsttps  lasttps  FILENAME   filename                                  TIMESTEP   NOSTRUCT  CONT_NOFILL   CONT_NOFILL                                 GRID   vargrid   CALLITSELF  _EXTRA   ex          ELSE:return  report The variable zeta was not found in the file  please use the keyword ZETAFILENAME to specify the name of a file containing zeta or use  keyword ZETAZERO to define zeta to 0        ENDCASE       romszinfos    h:romszinfos h  zeta:temporary zeta  theta_s:theta_s  theta_b:theta_b  hc:hc      ENDIF ELSE romszinfos    h: 1  zeta: 1  theta_s: 1  theta_b: 1  hc: 1    ENDIF     ncdf_close  cdfid    IF keyword_set savedbox  THEN restoreboxparam   boxparam4rdncdf dat     IF keyword_set nostruct  THEN return  res   IF keyword_set key_forgetold  THEN BEGIN     return   arr:temporary res  grid:vargrid  unit:varunit  experiment:varexp  name:varname     ENDIF ELSE BEGIN      return   tab:temporary res  grille:vargrid  unite:varunit  experience:varexp  nom:varname    ENDELSE  END      "); 
    251 a[249] = new Array("./ToBeReviewed/LECTURE/read_ncdf_varget.html", "read_ncdf_varget.pro", "", ""); 
    252 a[250] = new Array("./ToBeReviewed/LECTURE/xncdf_lec.html", "xncdf_lec.pro", "", "             file_comments   Reading of a Net Cdf file with widgets         categories    Widget      param NAME  in optional type string     It give the name of the file to be opened  If NAME    does not contain the separating character of directories   under    unix for example  the file will be looked for in the current directory       keyword IODIR  type string    It contains the directory where to go look for the file to be read    If NAME does not contain the separating character of directories   under    unix for example  the file will be called iodir nom_fichier       keyword COUNT  type vector    An optional vector containing the counts to be used in   reading Value  COUNT is a 1 based vector with an element for   each dimension of the data to be written The default matches   the size of the variable so that all data is written out       keyword GROUP   The widget ID of the widget that calls XNCDF_LEC  When   this ID is specified  a death of the caller results in a death   of XNCDF_LEC        keyword OFFSET  type vector default 0  0    An optional vector containing the starting position   for the read  The default start position is  0  0         keyword SHIFT  type vector default 0  0    A vector of integers  specifying for each dimension how much we have to shift it     By default  it is  0 0  See the function shift for more explanations  BEWARE     the shift is done on the biggest array before a possible reduction determined    by OFFSET and COUNT  On the other hand  it is done after the possible extraction    created by the STRIDE       keyword STRIDE  type vector default 1  1    An optional vector containing the strides  or sampling   intervals  between accessed values of the netCDF variable  The   default stride vector is that for a contiguous read   1  1       returns    2 different cases:         1  None attribute has been selected  In this case  res is the array we         wanted to read          2  Some attributes has been selected  In this case  res is a structure          whose the first element having the name of the variable is the values          array and the other arguments are the select arguments       uses   wididbase  infovariable  resultat  motcle      examples   help  xncdf_lec       history   Sebastien Masson  smasson lodyc jussieu fr                         24 8 1999      version    Id: xncdf_lec pro 163 2006 08 29 12:59:46Z navarro           FUNCTION xncdf_lec  name  ATT   att  COUNT   count  GROUP   group  OFFSET   offset  IODIR   iodir  SHIFT   shift   STRIDE   stride  VAR   var     compile_opt idl2  strictarrsubs      COMMON wididbase  base    COMMON infovariable  cdfid  listename  contient  nomdim  tailledim  varid  varcontient    COMMON resultat  res    COMMON motcle  mcatt  mccount  mcoffset  mciodir  mcshift  mcstride  mcvar     Trick for using keywords  we pass by variables declarated in a common       res    1    if keyword_set att  then mcatt   att ELSE mcatt   0    if keyword_set count  then mccount  count  ELSE mccount   0    if keyword_set offset  then mcoffset   offset ELSE mcoffset   0    if keyword_set shift  then mcshift   shift ELSE mcshift   0    if keyword_set stride  then mcstride   stride ELSE mcstride   0    if keyword_set var  then mcvar   var ELSE mcvar   0     choice of the file s name     What type of machine is used    thisOS   strupcase strmid version os_family  0  3     CASE thisOS of        MAC :sep    :         WIN :sep           ELSE: sep        ENDCASE   If IODIR is not defined  we initialize it at the current directory    if NOT keyword_set iodir  then cd   current   iodir    mciodir   iodir   We complete IODIR with a separating character if needed     IF rstrpos iodir  sep  NE strlen iodir 1 THEN iodir   iodir sep     if n_elements name  EQ 0 then BEGIN   If NAME is not defined  we find one thanks to the program dialog_pickfile        name   dialog_pickfile filter   iodir nc         if name 0  EQ   then return    1  If we do not have find anything  we go out   We complete NAME by IODIR if NAME does not contain any directory separating character     ENDIF ELSE if strpos name  sep  EQ  1 then name   iodir name    test   findfile name            Does the name looked for correspond to a file     while test 0  EQ   OR n_elements test  GT 1 do BEGIN   We look for one as long as it correspond to nothing        test   test 0        name   dialog_pickfile filter   iodir nc        if name EQ   then return    1       test   findfile name     endwhile     Opening of the file name       cdfid ncdf_open name     contient ncdf_inquire cdfid      What does this file contain      Opening of the base window as columns    if n_elements group  EQ 0 then base   widget_base column  title Fichier:  name   align_left       ELSE base   widget_base column  title Fichier:  name   align_left  GROUP_LEADER   group    Opening of base sub windows       base 1 title having the file s name      base1   widget_base base   column   align_center     rien   widget_label base1  value    Net Cdf filename   align_center      rien   widget_text base1  value   name   align_center  uvalue 1   editable   File s name we can change    rien   widget_label base1  value         We jump a line     base 2 General informations on the file      base2   widget_base base   column      Informations on global attributes      if contient ngatts NE  1 then begin       rien   widget_label base2  value    Nombre de attributs globaux:   strtrim contient ngatts 1   align_left        for attiq 0 contient ngatts 1 do BEGIN   Loop on  the number of global attributes          name ncdf_attname cdfid attiq global   Attribute s name          ncdf_attget cdfid name value global  Attribute s value          rien   widget_text base2  value   name :  strtrim string value 1  xsize   60   scroll   wrap   align_right        endfor       rien   widget_label base2  value          endif      Informations on dimensions      rien   widget_label base2  value    Nombre de dimensions:  strtrim contient ndims 1   align_left     if contient recdim NE  1 then begin    Loop on  the number of global attributes       ncdf_diminq cdfid contient recdim name value   Name and value of the dimension       rien   widget_label base2  value    name de la dimension infinie:  name   align_left     endif      nomdim    strarr contient ndims    Vector containing dimensions s name    tailledim lonarr contient ndims    Vector containing dimensions s value    for dimiq 0 contient ndims 1 do begin   Loop on the number of dimensions       ncdf_diminq cdfid dimiq name value   Name and value of the dimension       nomdim dimiq name       tailledim dimiq value       rien   widget_label base2  value   name  de taille:  strtrim value 1   align_right     ENDFOR    rien   widget_label base2  value         We jump a line     base 3 choice of the variable      base3   widget_base base   column     rien   widget_label base3  value    Nombre de variables:  strtrim contient nvars 1   align_left     base31   widget_base base3   row   align_center   Creation of a listename containing the name of all file s variables    listename   strarr contient nvars     for varid 0 contient nvars 1 do begin       varcontient ncdf_varinq cdfid varid    that the variable contain       listename varid    varcontient name    endfor    rien  widget_label base31  value    variable    Creation of a button with a pop up menu     base311 widget_droplist base31 value listename  uvalue 2     rien   widget_label base3  value         base 4 button done      base4   widget_base base   row     base42 widget_button base4 value done  uvalue 3   align_right   Execution of the base window and of sub windows    widget_control base realize      xmanager xncdf_lec base          return  res end     La lecture de ce programme se fait de bas en haut:     1  xncdf_lec       2  xncdf_lec_event           3  wid_var                wid_var_event        file_comments   Procedure called by xmanager when we press on a button of a second widget created by wid_var        param EVENT  in required    A structure caracterizing the type of event which arrive to a widget number1 2      uses   wididbase resultat infovariable indicewid motcle       version    Id: xncdf_lec pro 163 2006 08 29 12:59:46Z navarro           pro wid_var_event   event     compile_opt idl2  strictarrsubs      COMMON wididbase  base    COMMON resultat  res    COMMON infovariable  cdfid  listename  contient  nomdim  tailledim  varid  varcontient    COMMON indicewid_var  widbase1  widbase2111  widbase212  widbase213  selectatt    COMMON motcle  mcatt  mccount  mcoffset  mciodir  mcshift  mcstride  mcvar     What is the type of event     widget_control  event id  get_uvalue uval    tailledimvar   tailledim varcontient dim     if n_elements uval  EQ 0 then return   case on the type of event     case uval OF       1:BEGIN                     We change values in the array   We check that values put in the array are not totally false           widget_control  widbase1  get_value   table   Is it the good type of argument    If the type is wrong  we automatically change it by default values           if event x GT  size table 1  then return          if event y GT  size table 2  then return          if size table event x  event y   type  GE 6             OR size table event x  event y   type  EQ 0 then BEGIN              if event x EQ 1 then                widget_control  widbase1  use_table_select    1  event y 1  event y                   set_value   tailledimvar event y                ELSE widget_control  widbase1                  use_table_select    event x  event y  event x  event y  set_value   0          endif   Argument with a wrong name value           table   fix table           case event x of             0:BEGIN               We touched the offset                if table 0  event y  LT 0 then BEGIN                   table 0  event y    0                   widget_control  widbase1  use_table_select    0  event y  0  event y                         set_value   0               endif   If it exceed the dimension of the array  we put it at the max and the cont at 1                 if table 0  event y  GT tailledimvar event y table 3  event y  then begin                   widget_control  widbase1  use_table_select    0  event y 1  event y                         set_value    tailledimvar event y table 3  event y  1                ENDIF ELSE BEGIN   If  with the new offset  the cont is too big  we reduce it  until it goes well                    if table 1  event y  GT                       tailledimvar event y table 3  event y table 0  event y  then begin                      widget_control  widbase1  use_table_select    1  event y  1  event y                            set_value    tailledimvar event y table 3  event y table 0  event y                    endif                ENDELSE             END             1:BEGIN              We touched the cont                 if table 1  event y  LT 1 then BEGIN                   table 1  event y    1                   widget_control  widbase1  use_table_select    1  event y  1  event y                         set_value   1                endif   If it is too big  we reduce it  until it goes well                 if table 1  event y  GT                    tailledimvar event y table 3  event y table 0  event y  then BEGIN                   widget_control  widbase1  use_table_select    1  event y  1  event y                         set_value    tailledimvar event y table 3  event y table 0  event y                 endif             END             2:BEGIN              We touched the shift                 widget_control  widbase1  use_table_select    2  event y  2  event y                      set_value   table 2  event y  MOD  tailledimvar event y table 3  event y              END             3:BEGIN              We touched the stride                 if table 3  event y  LT 1 then BEGIN                   table 3  event y    1                   widget_control  widbase1  use_table_select    3  event y  3  event y                         set_value   1                endif                if table 3  event y  EQ 0 then    It must not be null                  widget_control  widbase1  use_table_select    3  event y  3  event y                      set_value   1   It must not be too big                 if table 3  event y  GT tailledimvar event y  then                   widget_control  widbase1  use_table_select    0  event y 3  event y                      set_value    0  1  0  tailledimvar event y                   ELSE BEGIN                   if table 1  event y  GT                       tailledimvar event y table 3  event y table 0  event y  then begin                      widget_control  widbase1  use_table_select    1  event y  1  event y                            set_value    tailledimvar event y table 3  event y table 0  event y                    endif                ENDELSE             END             ELSE:          endcase       END       2111:BEGIN                 We touched buttons yes no   We update the vector selectatt at 0 or 1 for the concerned attribute  number event id           selectatt where widbase2111 EQ event id    event select       end       31:BEGIN                   We pressed on  get           widget_control  widbase1  get_value   table          table   fix table           mcshift   where table 2    NE 0           mcoffset   table 0             mccount   table 1             mcstride   table 3             if mcshift 0  NE  1 then BEGIN   There are some shifts    We read the wholeness of dimensions for which ones there is a shift              mcoffset mcshift    0             mccount mcshift    tailledimvar mcshift    We do not activate stride when there is no need because it makes write something weird on the screen              if total mcstride  EQ n_elements mcstride  then                ncdf_varget  cdfid  varid  res  OFFSET   mcoffset  COUNT   mccount               ELSE                ncdf_varget  cdfid  varid  res  OFFSET   mcoffset  COUNT   mccount  STRIDE   mcstride   To do the shift             mcshift   table 2                mcoffset   table 0                mccount   table 1      We define the command allowing to do a shift              commande    res shift res              for dim   0  varcontient ndims 1 do commande   commande string table 2 dim              commande   commande              rien   execute commande    We redefine the command allowing to cut dimensions which has not been cut yet  ones we shift              commande    res res    initialization of the command             for dim   0  varcontient ndims 1 do BEGIN                 if mcshift dim  EQ 0 then commande   commande                   ELSE commande commande string mcoffset dim : string mccount dim mcoffset dim 1              ENDFOR             commande   strmid commande  0  strlen commande 1              rien   execute commande    Case without shift  we read directly the good part of the array           ENDIF ELSE BEGIN             if total mcstride  EQ n_elements mcstride  then                ncdf_varget  cdfid  varid  res  OFFSET   mcoffset  COUNT   mccount               ELSE                ncdf_varget  cdfid  varid  res  OFFSET   mcoffset  COUNT   mccount  STRIDE   mcstride          ENDELSE   Do we have to constitute a structure with selected attributes           if total selectatt  NE 0 then BEGIN   There are selected attributes             res   create_struct varcontient name  res    We create the structure             selectatt   where selectatt EQ 1    We find selected attributes             for attid   0   n_elements selectatt 1 do BEGIN   for which we take                widget_control  widbase212 selectatt attid  get_value   attname   the name                widget_control  widbase213 selectatt attid  get_value   attvalue   the value               res   create_struct res  attname 0  attvalue 0    We concatenate the structure             endfor          endif          widget_control  event top   destroy  We shut the second widget           widget_control  base   destroy  We shut the first widget           ncdf_close cdfid       END       32:                        Case of the display of a held  with xdisplayfile        33:widget_control  event top   destroy  We shut the second widget        ELSE:    endcase    return end            file_comments   This procedure manage the second created whiget when we call xncdf_lec     This widget concern the reading of the variable       param WIDID_PERE  type scalar in required    It contains the identity of the father widget which was    created by xncdf_lec and which has allowed to select the variable to be read      OUTPUTS: indirectement res  le tableau ou la structure resultat       uses    resultat infovariable indicewid_var motcle      version    Id: xncdf_lec pro 163 2006 08 29 12:59:46Z navarro           PRO wid_var  widid_pere     compile_opt idl2  strictarrsubs      COMMON resultat  res    COMMON infovariable  cdfid  listename  contient  nomdim  tailledim  varid  varcontient    COMMON indicewid_var  widbase1  widbase2111  widbase212  widbase213  selectatt    COMMON motcle  mcatt  mccount  mcoffset  mciodir  mcshift  mcstride  mcvar    res    1     Opening of the base window as columns     widbase   widget_base column  title variable:  varcontient name   align_center  group_leader   widid_pere      Opening of the base subwindow      widbase1 array of offsets      rien   widget_label widbase  value         We jump a line   Definition of labels of lines of the array    rowlab   string tailledim varcontient dim     for i   0   n_elements rowlab 1 do rowlab i    strtrim rowlab i  1     rowlab   nomdim varcontient dim replicate :   n_elements varcontient dim rowlab   Definition of array s initial values    valinit   lonarr 4  n_elements varcontient dim    column 0 : offsets    if keyword_set mcoffset  AND n_elements mcoffset  EQ varcontient ndims THEN       valinit 0 mcoffset ELSE valinit 0      0   colomn 1 : counts    if keyword_set mccount  AND n_elements mccount  EQ varcontient ndims THEN        valinit 1 mccount ELSE valinit 1      tailledim varcontient dim    column 2 : shifts    if keyword_set mcshift  AND n_elements mcshift  EQ varcontient ndims THEN       valinit 2 mcshift ELSE valinit 2      0   column 3 : strides    if keyword_set mcstride  AND n_elements mcstride  EQ varcontient ndims THEN       valinit 3 mcstride ELSE valinit 3      1   test of initial values of the array    valinit   fix valinit     valinit 3      1   valinit 3     valinit 0     valinit 1       tailledim varcontient dim valinit 3   valinit 0       valinit 2      valinit 2    MOD  tailledim varcontient dim valinit 3      test of shifts   declaration of the array    widbase1   widget_table widbase  row_labels   rowlab  value   valinit   editable                                column_labels    Offset   Count   Shift   Stride  uvalue   1    un petit blabla    rien   widget_label widbase  value    ATTENTION: Faire des  return  pour que les valeurs   align_center     rien   widget_label widbase  value    du tableau ou des textes soient bien prises en compte   align_center      widbase2 choice of attributes      rien   widget_label widbase  value         We jump a line    widbase2   widget_base widbase   column    To each attribute  we created a widget  widbase21  containing in line a button    yes no  widbase211  and two wigdet text  widbase212  widbase213  comprising the    name and the value of the attribute     widbase21   lonarr varcontient natts     widbase211   lonarr varcontient natts     widbase2111   lonarr varcontient natts    Vector which will serve to know which yes no are selected  see  wid_var_event    selectatt   lonarr varcontient natts     selectatt    0    widbase212   lonarr varcontient natts     widbase213   lonarr varcontient natts     for attid   0  varcontient natts 1 do BEGIN  Lop on the number of attribute        widbase21 attid    widget_base widbase2   row        name ncdf_attname cdfid varid attid        ncdf_attget cdfid varid name value       widbase211 attid    widget_base widbase21 attid   nonexclusive        widbase2111 attid     widget_button widbase211 attid  value       uvalue   2111        widbase212 attid    widget_text widbase21 attid  value   name   editable        widbase213 attid    widget_text widbase21 attid  value strtrim string value 1   editable     endfor     widbase3 buttons of the bottom       widbase3   widget_base widbase   row align_center     widbase31 widget_button widbase3 value GET  uvalue 31     widbase32 widget_button widbase3 value Help  uvalue 32     widbase33 widget_button widbase3 value DONE  uvalue 33     execution of the base window and of sub window       widget_control widbase realize      xmanager wid_var widbase    return end               file_comments   Procedure called by xmanager when we press a button of the first widget    created by par xncdf_lec       param EVENT   A structure caracterising the event type which arrive at the widget number 1       uses   resultat  infovariable  motcle      version    Id: xncdf_lec pro 163 2006 08 29 12:59:46Z navarro           PRO xncdf_lec_event  event     compile_opt idl2  strictarrsubs      COMMON resultat  res    COMMON infovariable  cdfid  listename  contient  nomdim  tailledim  varid  varcontient    COMMON motcle  mcatt  mccount  mcoffset  mciodir  mcshift  mcstride  mcvar   What is the type of event     widget_control  event id  get_uvalue uval   case on the type of event     case uval of       1:BEGIN                     We want to read an other file          widget_control  event id  get_value   nom   We recuperate the name           widget_control  event top   destroy  We shut the widget           ncdf_close cdfid        We shut the wrong file which has been opened   We call back xncdf_lec          res   xncdf_lec nom 0  ATT   mcatt  COUNT   mccount  OFFSET   mcoffset  IODIR   mciodir                              SHIFT   mcshift   STRIDE   mcstride  VAR   mcvar            return       END       2:BEGIN                     A variable is selected           varid   event index      We recuperat its number in the file Netcdf          varcontient   ncdf_varinq cdfid varid           wid_var  event top       We call the program which launch the second widget  See sooner        END       3:BEGIN                     button done          widget_control  event top   destroy   We delete the widget          ncdf_close cdfid         We shut the file        END       ELSE:    endcase    return end"); 
    253 a[251] = new Array("./ToBeReviewed/MATRICE/colle.html", "colle.pro", "", "     file_comments    This concatenation function exist in IDL so long    as we do not try to stick with a dimension superior or equal at 4         categories    Utilities      param a0  in required       param a1  in required       param a2  in required       param a3  in required       param a4  in required       param a5  in required       param a6  in required       param a7  in required       param a8  in required       param a9  in required       param a10  in required       param a11  in required       param a12  in required       param a13  in required       param a14  in required       param a15  in required       param a16  in required       param a17  in required       param a18  in required       param a19  in required       param a20  in required       keyword SAUVE   force to save the pointer array and arrays to be stuck      returns res matrice resultat      examples IDL  print  colle replicate 1 2 2 2 indgen 2 2 2 2                      1       1                  1       1                  0       1                  2       3                    1       1                  1       1                  4       5                  6       7      history Sebastien Masson  smasson lodyc jussieu fr                          13 1 98      version  Id: colle pro 163 2006 08 29 12:59:46Z navarro       FUNCTION colle  a0  a1  a2  a3  a4  a5  a6  a7  a8  a9  a10  a11  a12  a13  a14  a15  a16  a17  a18  a19  a20  SAUVE   sauve     compile_opt idl2  strictarrsubs      res    1     We put in place ptrtab and direc in function of input arguments      case 1 of       n_params  EQ 2:BEGIN       case where we directly give the pointer array          ptrtab   a0          direc   a1          if NOT keyword_set sauve  then undefine  a0   on recuperate the number of array to be pasted           nbretab    size ptrtab 1        end       n_params  GT 2:BEGIN   on recuperate the number of array to be pasted           nbretab   n_params 1          bidon   execute direc   a strtrim n_params 1  2    We write the pointer array whose each element point on an array           ptrtab ptrarr nbretab allocate_heap           for n   0 nbretab 1 do begin             bidon   execute ptrtab n a strtrim n  2              if NOT keyword_set sauve  then bidon   execute undefine  a strtrim n  2           endfor          sauve   0       end       ELSE:    endcase     case on the direct s value       case direc of       1:BEGIN                     we paste following the dimension 1          res    ptrtab 0           if NOT keyword_set sauve  then ptr_free  ptrtab 0           FOR n   1 nbretab 1 DO BEGIN             res    temporary res   ptrtab n              if NOT keyword_set sauve  then ptr_free  ptrtab n           ENDFOR        END        2:BEGIN                     we paste following the dimension 2          res    ptrtab 0           if NOT keyword_set sauve  then ptr_free  ptrtab 0           FOR n   1 nbretab 1 DO BEGIN             res    temporary res   ptrtab n              if NOT keyword_set sauve  then ptr_free  ptrtab n           ENDFOR        END        3:BEGIN                     we paste following the dimension 3          res    ptrtab 0           if NOT keyword_set sauve  then ptr_free  ptrtab 0           FOR n   1 nbretab 1 DO BEGIN             res    temporary res   ptrtab n              if NOT keyword_set sauve  then ptr_free  ptrtab n           ENDFOR        END       ELSE:BEGIN    We transpose res in order to put the dimension to be pasted number 1   To this  we contain the permuter vector which give the place that dimension    in the transposed matrix must take          siz    size ptrtab 0 0           if siz LT direc then              ptrtab 0    reform ptrtab 0   size ptrtab 0 1:siz  replicate 1  direc siz   over           permute   indgen size ptrtab 0 0           permute 0    direc 1          permute direc 1    0          res   transpose ptrtab 0  permute           if NOT keyword_set sauve  then ptr_free  ptrtab 0           FOR n   1 nbretab 1 DO BEGIN   we paste following the dimension 1on colle suivant la dimension 1             if  size ptrtab n 0  LT direc then                 ptrtab n    reform ptrtab n   size ptrtab n 1:siz  replicate 1  direc siz                          res    temporary res  transpose ptrtab n  permute              if NOT keyword_set sauve  then ptr_free  ptrtab n           ENDFOR          res   transpose temporary res  permute        END    ENDCASE       if NOT keyword_set sauve  then undefine  ptrtab sortie:    return   res      END     "); 
    254 a[252] = new Array("./ToBeReviewed/PLOTS/DESSINE/bar_plot.html", "bar_plot.pro", "", "        file_comments    Create a bar graph  or overplot on an existing one       categories    Graphics      param Values  in required   type vector    A vector containing the values to be represented by the bars    Each element in VALUES corresponds to a single bar in the   output       keyword BASELINES  type vector    A vector  the same size as VALUES  that contains the   base value associated with each bar   If not specified    a base value of zero is used for all bars       keyword COLORS  type vector    A vector  the same size as VALUES  containing the color index   to be used for each bar   If not specified  the colors are   selected based on spacing the color indexes as widely as   possible within the available colors  specified by D N_COLORS       keyword BARNAMES  type string    A string array  containing one string label per bar    If the bars are vertical  the labels are placed beneath   them   If horizontal  rotated  bars are specified  the labels   are placed to the left of the bars       keyword TITLE  type string    A string containing the main title to for the bar plot       keyword XTITLE  type string    A string containing the title for the X axis       keyword YTITLE  type string    A string containing the title for the Y axis       keyword BASERANGE  type float    A floating point scalar in the range 0 0 to 1 0  that   determines the fraction of the total available plotting area    in the direction perpendicular to the bars  to be used    If not specified  the full available area is used       keyword BARWIDTH  type float    A floating point value that specifies the width of the bars   in units of  nominal bar width   The nominal bar width is   computed so that all the bars  and the space between them    set by default to 20  of the width of the bars  will fill the   available space  optionally controlled with the BASERANGE   keyword       keyword BARSPACE  type scalar    A scalar that specifies  in units of  nominal bar width    the spacing between bars   For example  if BARSPACE is 1 0    then all bars will have one bar width of space between them    If not specified  the bars are spaced apart by 20  of the bar   width       keyword BAROFFSET  default BARSPACE type scalar    A scalar that specifies the offset to be applied to the   first bar  in units of  nominal bar width   This keyword   allows  for example  different groups of bars to be overplotted   on the same graph       keyword OUTLINE    If set  this keyword specifies that an outline should be   drawn around each bar       keyword OVERPLOT    If set  this keyword specifies that the bar plot should be   overplotted on an existing graph       keyword BACKGROUND  default The normal IDL background color is used type scalar    A scalar that specifies the color index to be used for   the background color       keyword ROTATE    If set  this keyword indicates that horizontal rather than   vertical bars should be drawn   The bases of horizontal bars   are on the left   Y  axis and the bars extend to the right       examples By using the overplotting capability  it is relatively easy to create  stacked bar charts  or different groups of bars on the same graph     For example  if ARRAY is a two dimensional array of 5 columns and 8  rows  it is natural to make a plot with 5 bars  each of which is a  stacked  composite of 8 sections   First  create a 2D COLORS array   equal in size to ARRAY  that has identical color index values across  each row to ensure that the same item is represented by the same color  in all bars     With ARRAYS and COLORS defined  the following code fragment  illustrates the creation of stacked bars  note that the number of rows  and columns is arbitrary :    Y RANGE    0 ymax    Scale range to accommodate the total bar lengths   BASE   INTARR NROWS   FOR I   0  NROWS 1 DO BEGIN     BAR_PLOT  ARRAY I  COLORS COLORS I  BASELINES BASE                  BARWIDTH 0 75  BARSPACE 0 25  OVER I GT 0      BASE   BASE   ARRAY I   ENDFOR    To plot each row of ARRAY as a clustered group of bars within the same  graph  use the BASERANGE keyword to restrict the available plotting  region for each set of bars   The sample code fragment below  illustrates this method:    FOR I   0  NROWS 1 DO       BAR_PLOT  ARRAY I  COLORS COLORVECT  BARWIDTH 0 8 BARSPACE 0 2          BAROFFSET I 1 0 BARSPACE NCOLS  OVER I GT 0  BASERANGE 0 19    where NCOLS is the number of columns in ARRAY  and COLORVECT is a  vector containing the color indices to be used for each group of  bars    In this example  each group uses the same set of colors  but  this could easily be changed       history August 1990  T J  Armitage  RSI  initial programming   Replacement  for PLOTBAR and OPLOTBAR routines written by William Thompson     September 1990  Steve Richards  RSI  changed defaults to improve the  appearance of the bar plots in the default mode  Included  spacing the bars slightly       Id: bar_plot pro 163 2006 08 29 12:59:46Z navarro       pro bar_plot values baselines baselines colors colors barnames barnames              title title xtitle xtitle ytitle ytitle baserange baserange              barwidth barwidth barspace barspace baroffset baroffset              outline outline overplot overplot background background              rotate rotate  _EXTRA   ex     compile_opt idl2  strictarrsubs   if  n_params d  eq 0  then begin   Print call   return if no parameters   print bar_test values baselines baselines colors colors barnames barnames    print  title title xtitle xtitle ytitle ytitle baserange baserange      print  barwidth barwidth barspace barspace baroffset baroffset      print  outline outline overplot overplot background background      print  rotate rotate    return endif  nbars n_elements values  Determine number of bars   Baselines  bars extend from baselines through values  default 0 if not keyword_set baselines  then baselines intarr nbars    Default colors spaced evenly in current color table if not keyword_set colors  then      colors fix d n_colors float nbars indgen nbars 0 5    Labels for the individual bars  none by default if not keyword_set barnames  then barnames strarr nbars      Main title if not keyword_set title  then title    Centered title under X axis if not keyword_set xtitle  then xtitle    Title for Y axis if not keyword_set ytitle  then ytitle    Fraction  0 1  of full X range to use if not keyword_set baserange  then baserange 1 0   Space betw  bars  taken from nominal bar widths  default is none If not keyword_set barspace  then barspace 0 2   Bar width scaling factor  relative to nominal if not keyword_set barwidth  then barwidth 1 0   barspace   barspace   nbars   Initial X offset  in scaled bar widths  default is none if not keyword_set baroffset  then baroffset barspace barwidth   Outline of bars  default is none outline   keyword_set outline    Overplot  do not erase the existing display  default is to create new plot overplot   keyword_set overplot    Background color index  defaults to 0  usually black  if not specified if not keyword_set background  then background 0   Rotate  make horizontal bars  default is vertical bars rotate   keyword_set rotate   mnB   MIN baselines  MAX mxB   NAN  mnV   MIN values  MAX mxV   NAN  range mnB  mxV        Maximum of bases   values  if  rotate  then begin     Horizontal bars    if  x range 0  eq 0  and  x range 1  eq 0      Determine range for X axis       then xrange range         else xrange x range     Or  use range specified    if  y range 0  eq 0  and  y range 1  eq 0      Plot will calculate       then                                           defaults for X  but not         yrange    0  n_elements values              for Ys  so fill in here        else           yrange y range     Axis perpend  to bars    yticks 1     Suppress ticks in plot    ytickname strarr 2       xticks 0    xtickname strarr 1  endif else begin     Vertical bars    if  y range 0  eq 0  and  y range 1  eq 0      Determine range for Y axis       then yrange range         else yrange y range                 Or  use range specified    xrange x range     Axis perpend  to bars    xticks 1     Suppress ticks in plot    xtickname strarr 2       yticks 0    ytickname strarr 1  endelse if  overplot eq 0  then      Create new plot  no data plot values nodata title title xtitle xtitle ytitle ytitle       noerase overplot xrange xrange yrange yrange xticks xticks       xtickname xtickname yticks yticks ytickname ytickname       xstyle 1 ystyle 1 data background background  _EXTRA   ex if  rotate  then begin     Horizontal bars    base_win y window     Window range in Y    scal_fact x s     Scaling factors    tick_scal_fact y s     Tick scaling factors endif else begin     Vertical bars    base_win x window     Window range in X    scal_fact y s     Scaling factors    tick_scal_fact x s     Tick scaling factors endelse winrange baserange base_win 1 base_win 0     Normal  window range barsize barwidth winrange nbars     Normal  bar width winoffset base_win 0 baroffset barsize     Normal  first offset bases scal_fact 0 scal_fact 1 baselines     Baselines  in normal coor  normal scal_fact 0 scal_fact 1 values     Values  in normal coor  barstart indgen nbars barsize barspace winrange nbars   Coor  at left edges tickv winoffset barstart 0 5 barsize     Tick coor   centered  for i 0 nbars 1 do begin     Draw the bars    width winoffset barstart i barstart i         Compute bar width       barstart i barsize barstart i barsize     length bases i normal i normal i bases i    Compute bar length    if  rotate  then begin     Horizontal bars       x length     X axis is  length  axis       y width     Y axis is  width  axis    endif else begin     Vertical bars       x width     X axis is  width  axis       y length     Y axis is  length  axis    endelse    polyfill x y color colors i normal     Polyfill with color    if  outline  then plots x y normal     Outline using  p color endfor  tickv tickv tick_scal_fact 0 tick_scal_fact 1    Locations of the ticks if  rotate  then      Label the bars  Y axis    axis yaxis 0 ystyle 1 yticks nbars 1 ytickv tickv ytickname barnames      yticklen 0 0   else      Label the bars  X axis    axis xaxis 0 xstyle 1 xticks nbars 1 xtickv tickv xtickname barnames      xticklen 0 0 return end"); 
    255 a[253] = new Array("./ToBeReviewed/PLOTS/DESSINE/plt.html", "plt.pro", "", "             file_comments    Draw horizontal graph  map  with CONTOUR procedure      categories    Graphics      param TAB1  in required     The field whose we want to make the horizontal map can be:           1  an array  if needed  its mean along the z and t direction           will be automatically performed            2  a structure respecting all criterions specified by           litchamp pro  cf  IDL  xhelp litchamp         param PARAM2  in optional default min of tab1  on ocean points     Min value we want to consider in the contour s drawing            Note: Could also be the type of plot that can be only  xy  for plt      param PARAM3  in optional default max of tab1  on ocean points     Max value we want to consider in the contour s drawing            Note: if param2 is defined as  xy  then param3 is used to define the min  see param2       param PARAM4  in optional default xy     Type of plot  can be only  xy  for plt            Note: if param2 is defined as  xy  then param4 is used to define the max  see param3       keyword BOXZOOM  type vector    Vector indicating the geographic zone on which we want to cut the map      If BOXZOOM has :   1 element : The extraction is made on  lon1  lon2  lat1  lat2  0 boxzoom 0    2 elements: The extraction is made on  lon1  lon2  lat1  lat2  boxzoom 0 boxzoom 1    4 elements: The extraction is made on  Boxzoom  0  max gdept  gdepw    5 elements: The extraction is made on  Boxzoom 0:3  0  Boxzoom 4    6 elements: The extraction is made on Boxzoom     Where lon1  lon2 lat1 lat2 are global variables defined at the last domdef       keyword REALCONT    Allow to draw continents defined in IDL  REALCONT can have 2 form:              REALCONT: we draw continents in place of the mask             REALCONT 2 we draw continent s contour over the mask  this allows                         to see if the mask correspond at real continents       keyword CONTINTERVALLE    When CONTOUR is activated  it is the value between 2 isolines    traced by a trait  So it can be different from the one specified by INTERVALLE which     in this case  does not control colored isolines in color anymore  If there is noone    specified min  we choose a contour min which goes well with the specified interval     If this keyword is not specified  we trace 20 isolines from the min to the max        keyword CONTLABEL  type integer    It is an integer n  When CONTOUR is activated  if n   is different of 0  choose the label type corresponding to n cases for    the traced by a traitisolines  To specify the type of label of the    colored contour  use LABEL      keyword CONTMAX  default The max of the array passed in the keyword CONTOUR  on ocean points    When CONTOUR is activated  max value we want to consider in the isoline    traced by a trait s line      keyword CONTMIN  default The min of the array passed in the keyword CONTOUR  on ocean points    When CONTOUR is activated  min value we want to consider in the isoline    traced by a trait s line       keyword CONTNLEVEL  default 20    When  CONTOUR is activated  it is the number of contours   traced by a trait for drawing  active if   CONTLABEL 0       keyword CONTOUR    If we want to trace contours of a different field than the one    whose we have the colored drawing  by example E P in color and QSR in contours     It must be a field respecting same characteristics than the argument number one of plt       keyword GRIDTYPE  U T V W  or  F  to specify possibly the grid on which the field is joined    Comment: In this case  we should use a structure like field       keyword INTERVALLE    Value of an internal between to isoline  If there is none specified min     we choose a min contour which goes well with the specified interval  If this keyword is not    specified  we trace 20 isoline from the min to the max  Comment: When CONTOUR is activated     INTERVALLE only specify the interval between 2 colored isoline  To specify the interval    between 2 isolines traced by a trait  use CONTINTERVALLE       keyword INV    Invert the color vector used to color the graph                   without use the black  the white and the used palette        keyword LABEL  type integer    It is an integer n  If n different of 0  it choose the label s type    corresponding to cases n  cf label pro   Comment: When CONTOUR is activated  it only specify the label s type for colored isolines     For these one traced by a trait  use CONTLABEL       keyword MAP  default Cylindrical projection    We use it when we want to do a projection    This keyword can be of two types:       MAP P0lat P0lon Rot  For the description of these 3 values  see the online help of MAP_SET         MAP: In this case  map is automatically calculated have the value:             map    0   lon1 lon2 2  0    Comment: A good way to choose the type of the projection we want to do is to have a look at IDL demo:   IDL  demo   Then choose earth sciences and  mapping    Comment2: By default it is a cylindrical projection which is effectuated  with or without the keyword map     If we want an other projection  MAP must be activated and we have to add the keyword:  nom_projection    For example  for a polar projection centered on the south pole:   IDL  domdef 180 180 90 45   IDL  plt  tab   stereo map 90 0 0       keyword LABMAP  default labmap 1    Corresponds to label keywords of map_set       keyword MAXIN    to specify the max value we want to plot with a keyword instead of with the   input parameter max  If max is defined by both  parameter and keyword  the   keyword is retained       keyword MININ    to specify the min value we want to plot with a keyword instead of with the   input parameter min  If min is defined by both  parameter and keyword  the   keyword is retained       keyword NLEVEL  default 20    Number of contour to draw by default  20  active if   LABEL 0 or is not specified       keyword NOTRI    To force not to use the triangulation  Beware  in this case  the    drawing only works if the grid is undeformed  It means that each point of a longitude    give one latitude and each point of a latitude give one longitude  except if we use    the keyword CELL_FILL 2     Comment: if the field contain points  values f_nan  then we even do a triangulation       keyword OVERPLOT    To make a plot over an other one     Comment: Contrarily to the use of CONTOUR or VECTEUR  the use of this keyword    does not the caption and or the color bar       keyword STRICTFILL    Activate this keyword to that the filling of contours be    precisely done between the min and the max specified letting values inferior at the    specified min and values superior at the specified max in white       keyword STYLE  default style 0    Contour s style to adopt to draw isolines       keyword VECTEUR  type struct    It is a structure composed by 2 elements containing the 2 fields U   and V of values of the zonal and meridian component of the vector of the fields   to draw  These fields can be an array or a structure          For example: vecteur matriceu:lec unsurface matricev:lec vnsurface          Comment: name of elements of vectors are inconsequential          vecteur u:lec unsurface v:lec vnsurface  is also appropriated       keyword _EXTRA   used to pass your keywords       keyword CONT_NOFILL          Activate it not to fill the point mask to let them transparent     Comment: Nevertheless  we trace mask s contour        keyword USETRI   To force using triangulation        keyword MASKFILL        keyword DUPLICATE      keyword DECIMATETRI      uses   common pro      history    Sebastien Masson  smasson lodyc jussieu fr    7 1999   Sebastien Masson 08 02 2000 checkfield and   notri keyword  or triangule    1          version    Id: plt pro 171 2006 09 07 14:11:11Z smasson         todo seb    Changer param  tab1 keyword  REMPLI   UNLABSUR   UNSUR2     UNVECTSUR  quelques trucs dans la routine          pro plt  tab1  param2  param3  param4  REALCONT   realcont  CONTOUR   contour              INTERVALLE   intervalle  INV   inv  GRIDTYPE   gridtype  BOXZOOM   boxzoom              CONTINTERVALLE   contintervalle  LABEL   label  CONTLABEL   contlabel              STYLE   style  CONTMAX   contmax  CONTMIN   contmin  NLEVEL   nlevel  CONTNLEVEL   contnlevel              VECTEUR   vecteur  MAP   map  MININ   minin  MAXIN   maxin              CONT_NOFILL   cont_nofill              USETRI   usetri  NOTRI   notri  MASKFILL   maskfill              DUPLICATE   duplicate  STRICTFILL   strictfill  OVERPLOT   overplot              DECIMATETRI   decimatetri   LABMAP   labmap  _extra   ex     include common     compile_opt idl2  strictarrsubs    cm_4mesh  cm_4data   IF NOT keyword_set key_forgetold  THEN BEGIN  updatenew  updatekwd   ENDIF     tempsun   systime 1             To key_performance       I  preparation of the graphic environment and small verifications        I1  verification of the grid s type associated to tab1      if keyword_set gridtype  then vargrid   gridtype   if keyword_set vecteur  AND  NOT keyword_set gridtype  then BEGIN     vargrid   litchamp tab1   grid      if vargrid eq   then BEGIN       vargrid   xquestion What is the grid associated to the data to contour   T   chkwidget        vargrid   strupcase vargrid      endif   ENDIF     I2  Reading of the field and checkup      if keyword_set boxzoom  AND n_elements contour  ne 4  then BEGIN     savedbox   1b     saveboxparam   boxparam4plt dat    END   if n_elements param2  NE 0 then type   param2   if n_elements param3  NE 0 then min   param3   if n_elements param4  NE 0 then max   param4   if n_elements minin  NE 0 then min   minin    if n_elements maxin  NE 0 then max   maxin   checktypeminmax   plt  TYPE   type  MIN   min  MAX   max  _extra   ex   z2d   checkfield tab1   plt  TYPE   type  BOXZOOM   boxzoom  DIREC   direc  VECTEUR   vecteur  _extra   ex     if z2d 0  EQ  1 then BEGIN      IF keyword_set savedbox  THEN restoreboxparam   boxparam4plt dat      return   ENDIF   IF n_elements usetri  EQ 0 THEN BEGIN   do we have holes in the triangulation      holeintri   n_elements triangles_list 3 LT  jpi 1 keyword_set key_periodic jpj 1 2     the triangulation must be used to draw the field    do we have a triangulation      wehavetri   triangles_list 0  NE  1     the triangulation must be used to draw the continents   if we make a map  are we periodic and nx jpi       CASE strupcase vargrid  OF        T :nx   nxt        W :nx   nxt        U :nx   nxu        V :nx   nxv        F :nx   nxf     ENDCASE     mapperio   keyword_set map keyword_set key_periodic nx eq jpi       usetri    wehavetri wehavetri holeintri mapperio keyword_set key_irregular    2 notri    ENDIF     I3  reinitialization   p x y    Comment: We do not reinitializate when we call bck plt in loop to use contour      if n_elements contour  ne 4 AND NOT keyword_set overplot  then reinitplt   z   invert     I4  attribution of the mask and of longitude and latitude arrays      IF  strupcase vargrid  EQ  W  THEN profond   firstzw NE 0     ELSE profond   firstzt NE 0    do we need to extract now the triangulation that will be use for   contouring the field    if keyword_set profond        OR  usetri EQ 0 AND  vargrid EQ  T  OR vargrid EQ  W        OR  usetri NE 2 AND  vargrid NE  T  AND vargrid NE  W  THEN BEGIN     grille  mask  glam  gphi  gdep  nx  ny  nz           firstx  firsty  firstz  lastx           lasty  lastz   forplt  _extra   ex   ENDIF ELSE BEGIN     grille  mask  glam  gphi  gdep  nx  ny  nz           firstx  firsty  firstz  lastx  lasty           lastz  TRI   trifield   forplt  _extra   ex   ENDELSE     I5 determination of the mi:min and of the ma:max of z2d in the same way    as max: max and min: min for the drawing      masknan   finite z2d    nan   total masknan  NE n_elements z2d     Do we need to do an autoscale     autoscale   testvar var   min  EQ testvar var   max  AND NOT keyword_set intervalle    determineminmax  z2d  mask  mi  ma  glam  gphi  MININ   min  MAXIN   max         nan   nan  INTERVALLE   intervalle  usetri   usetri  _extra   ex   if z2d 0  EQ  1 THEN GOTO  sortie   We do an autoscale if needed    if autoscale then autoscale  min  max  intervalle       II  We put the drawing in its place on the window or the page    and possible opening of the window or of the page      if n_elements contour  NE 4 AND NOT keyword_set overplot  THEN       placedessin   plt  posfenetre  posbar         CONTOUR   contour  VECTEUR   vecteur  MAP   map  DIREC   direc  _extra   ex       III  Covering of the drawing  labels style axis            III1  Choice of labels     if keyword_set intervalle  AND NOT keyword_set label  then label   1   if keyword_set label  eq 0 then cas   0 else cas   label   label  cas  min  max  ncontour  level_z2d  colnumb  NLEVEL   nlevel         INTERVALLE   intervalle  strictfill   strictfill     III2  Choice of style     if not keyword_set style  then style   0   style  style  level_z2d  linestyle  thick   if keyword_set inv  then colnumb   reverse colnumb      III3  Definition of axis     if NOT keyword_set overplot  THEN axe   xy  _EXTRA   ex         IV  Drawing         extrapolation of field on lands and setup of min  max values     if keyword_set nan  then begin     z2d where masknan EQ 0    max   ENDIF ELSE masknan   1   filling the mask values   we fill only masknan or we fill mask masknan    IF keyword_set nan  AND keyword_set cont_nofill  THEN       z2d   remplit z2d  nite   1 vargrid NE  T  AND vargrid NE  W                        mask   masknan  _extra   ex       ELSE z2d   remplit z2d  nite    1    vargrid NE  T  AND vargrid NE  W                                         keyword_set nan                           1 keyword_set cont_nofill                           1 n_elements maskfill  NE 0                      mask   mask masknan  _extra   ex    IF keyword_set strictfill  EQ 0 AND n_elements maskfill  EQ 0 then       z2d   min   z2d    max   if n_elements maskfill  NE 0 then BEGIN     z2d   temporary z2d mask masknan     if maskfill NE 0 then z2d   temporary z2d    maskfill 1 mask masknan    ENDIF     check mask and triangulation according to the grid type and NaN      If we make a drawing at depth  we must redefine a triangulation    on the zoom because the land sea mask at depth may differ from   the one at the surface    As this triangulation will be used to draw the land sea mask with   the good shape  we use tmask to compute it even if the data are not   located on the T grid   if  keyword_set profond  OR keyword_set cont_nofill        AND  usetri GE 1 AND  vargrid EQ  T  OR vargrid EQ  W             OR  usetri EQ 2 AND  vargrid NE  T  AND vargrid NE  W  then BEGIN     trifield   triangule tmask firstx:lastx  firsty:lasty  firstz                               coinmonte   coinmontemask                              coindescend   coindescendmask                              keep_cont   cont_nofill  _extra   ex      indicezoommask    lindgen jpi  jpj firstx:lastx  firsty:lasty    ENDIF   triangulation for nan mask   if keyword_set nan  then BEGIN     trinan   triangule masknan   keep_cont  coinmonte   coinmontenan                            coindescend   coindescendnan      indicezoomnan    lindgen jpi  jpj firstx:lastx  firsty:lasty    ENDIF    IF n_elements twin_corners_up  EQ 0 THEN coinmontemask    1 ELSE coinmontemask   twin_corners_up    IF n_elements twin_corners_dn  EQ 0 THEN coindescendmask     1 ELSE coindescendmask   twin_corners_dn   if vargrid EQ  T  OR vargrid EQ  W  then BEGIN      glammsk   glam     gphimsk   gphi   ENDIF ELSE begin   decoupe terre: To draw the coast in a clean way  we try to take additionally    points to draw the land  Like that  we do not see gap between T and U V F grid    It is what decoupeterre do  We also redefine trimsk      maskorg   mask     decoupeterre  mask  glammsk  gphimsk  type    xy          TRI   trimsk  usetri   usetri  indicezoom   indicezoommask           coinmonte   coinmontemask  coindescend   coindescendmask           _EXTRA   ex   ENDELSE     IV1  Choice of type of drawing      typetrace    classique    if keyword_set map  AND key_onearth then BEGIN    Call of  mapset when we want to do projections      IF n_elements map  NE 3 THEN map    0   lon1 lon2 2  MOD 360  0      typetrace    projection      map_lat   map 0      map_lon   map 1      map_rot   map 2      if chkstru ex   TITLE  then begin       maptitre   ex title        ex title         endif     map_set  map_lat  map_lon  map_rot  _extra   ex  position   posfenetre   iso           limit    lat1  lon1  lat2  lon2   noborder     if n_elements maptitre  ne 0 then ex title   maptitre     if n_elements trifield  GE 2 then trifield   ciseauxtri trifield  glam  gphi  _EXTRA   ex      if n_elements trimsk  GE 2 then trimsk   ciseauxtri trimsk  glammsk  gphimsk  _EXTRA   ex      if n_elements trinan  GE 2 then BEGIN        trinan   ciseauxtri trinan  glam  gphi  _EXTRA   ex        if trinan 0  EQ  1 then undefine  trinan     endif   ENDIF ELSE BEGIN   To axes of coordinates be considerated      if  x type EQ 0 AND n_elements contour  LE 4 then         plot   0   0   nodata  xstyle   5  ystyle   5  title     subtitle      noerase      if keyword_set key_periodic  then BEGIN   In this case  triangulation is closed in x and cover all the sphere     We have to cut it at the level where we cut the sphere to make the drawing        if n_elements trifield  GE 2 then trifield   ciseauxtri trifield  glam  gphi  _EXTRA   ex        if n_elements trimsk  GE 2 then trimsk   ciseauxtri trimsk  glammsk  gphimsk  _EXTRA   ex        if n_elements trinan  GE 2 then trinan   ciseauxtri trinan  glam  gphi  _EXTRA   ex      ENDIF   endelse     IV2  Contours and coloring     if keyword_set duplicate   then BEGIN   pour marina uniquement ATTENTION C EST TRES MAL CODE     lon   glam  0      decalage   max lon min lon lon shift lon  1 n_elements lon 1       x range 1     x range 1 duplicate 1 decalage     for i   1  duplicate 1 do BEGIN       z2d    z2d  z2d        gphi    gphi  gphi        mask    mask  mask        gphimsk    gphimsk  gphimsk        glam    glam  glam i decalage        glammsk    glammsk  glammsk      ENDFOR   endif   save  glam  gphi  trifield  file    tri dat    if keyword_set decimatetri  then BEGIN     tempsdeux   systime 1         To key_performance     IF n_elements trimsk  EQ 0 THEN trimsk   trifield     Verts   transpose temporary glam   temporary gphi                              temporary z2d      Conn    replicate 3  1  n_elements trifield 3  trifield      Result   mesh_decimate temporary verts   temporary Conn                                 Connout  vertices   Vertsout                                percent_vertices   decimatetri      connout   reform connout  4   n_elements connout 4   over       trifield    temporary connout 1:3        glam   reform Vertsout 0        gphi   reform Vertsout 1        z2d   reform Vertsout 2        undefine  Vertsout     print   temps decimatetri  systime 1 tempsdeux    ENDIF   pltbase  z2d  glam  gphi         mask  glammsk  gphimsk  trichamp   trifield  trimsk   trimsk   forplt         level_z2d  colnumb  contour   contour  usetri   usetri  realcont   realcont         overplot   keyword_set overplot keyword_set map          c_linestyle   linestyle  c_labels   1 indgen n_elements level_z2d  MOD 2          c_thick   thick  cont_nofill   cont_nofill  nan   nan         coinmontemask   coinmontemask  coindescendmask   coindescendmask         coinmontenan   coinmontenan  coindescendnan   coindescendnan         indicezoommask   indicezoommask  indicezoomnan   indicezoomnan         maskorg   maskorg  masknan   masknan  trinan   trinan  _extra   ex     IV3  Recall of plt in loop when contour is activated      if n_elements contour  eq 4 then BEGIN   c est la 2eme fois que je passe ds pltt     contour    mietma: mi  ma  unit:varunit  inter:intervalle    je renvoie le min  le max et l unite     return   endif   if keyword_set contour  THEN BEGIN      pourlegende    1  1  1  1      oldattributs   saveatt      oldcolnumb   colnumb     plt  contour  contmin  contmax  CONTOUR   pourlegende   NOERASE           USETRI   usetri           INTERVALLE   contintervalle  LABEL   contlabel  STYLE   style           NLEVEL   contnlevel  DUPLICATE   duplicate  STRICTFILL   strictfill           MASKFILL   maskfill  _extra   ex     restoreatt  oldattributs     colnumb   oldcolnumb   ENDIF       V  Small functions           V1  Possible add of vectors in double exposure      if keyword_set vecteur  then BEGIN      oldattributs   saveatt      ajoutvect  vecteur  vectlegende  _extra   ex     restoreatt  oldattributs   ENDIF     if keyword_set overplot  then GOTO  fini     V2  Trace the line of change of date  the equator and the greenwich meridian        if NOT keyword_set map  AND key_onearth then meridienparallele   xy      V3  To trace IDL s continents     if keyword_set realcont  then BEGIN   si noease est passe de _extra  on s assure qu il est a 1     if chkstru ex   NOERASE  then begin       oldnoerase   ex noerase       ex noerase   1     ENDIF     if chkstru ex   coast_thick  then mlinethick   ex coast_thick ELSE mlinethick   1     if chkstru ex   coast_color  then mcolor   ex coast_color ELSE mcolor   0     IF NOT keyword_set map  THEN         map_set  0   lon1 lon2 2  MOD 360  0  position   posfenetre            limit    lat1  lon1  lat2  lon2   NOERASE   noborder  color   0           _extra   ex     if realcont NE 2 AND NOT keyword_set cont_nofill  then BEGIN       if chkstru ex   cont_color  then cntcol   ex coast_color         ELSE cntcol    d n_colors   1     255       map_continents   fill_continents  color   cntcol  _extra   ex   noerase     ENDIF     map_continents   continents  color   mcolor  MLINETHICK   mlinethick   noerase  _extra   ex     if chkstru ex   NOERASE  THEN  ex noerase   oldnoerase   ENDIF     V4  caption   display of these      legende  mi  ma   xy  CONTOUR   pourlegende  VECTLEGENDE   vectlegende  INTERVALLE   intervalle  DIREC   direc  _EXTRA   ex   if n_elements ex  NE 0 then BEGIN    To keep frame s axes in black     if  where tag_names ex  EQ  COLOR 0  NE  1 then ex COLOR   coast_color   endif     case typetrace of      classique :         plot   0   0   nodata   noerase  color   0  xstyle   1  ystyle   1  _extra   ex      projection : BEGIN        if chkstru ex   NOERASE  then begin         oldnoerase   ex noerase         ex noerase   1       endif       if chkstru ex   SUBTITLE  then  p subtitle   ex SUBTITLE       if n_elements maptitre  ne 0 then ex title   maptitre       map_set  map_lat  map_lon  map_rot  _extra   ex   iso  limit    lat1  lon1  lat2  lon2             NOERASE   noborder  title    p title  color   0           map_proj_info  numproj   current           map_proj_info  numproj  name   nomproj           if nomproj EQ  Mercator  OR nomproj EQ  Cylindrical  OR nomproj EQ  LambertConic             OR nomproj EQ  Gnomic  OR nomproj EQ  AlbersEqualAreaConic               OR nomproj EQ  TransverseMercator  OR nomproj EQ  MillerCylindrical               OR nomproj EQ  LambertConicEllipsoid  then map_grid  box_axes 1 latdel 10 londel 10             ELSE map_grid  charsize   0 75   label latalign   1 lonalign             1 latdel   10 londel   30       IF n_elements labmap  EQ 0 THEN labmap   1       map_grid  charsize   0 75  label   labmap  latalign   1  lonalign   1  latdel   10  londel   30  color   0  _extra   ex       if chkstru ex   NOERASE  THEN  ex noerase   oldnoerase     end   endcase     V5  Colorbar      colnumb   colnumb 0:ncontour 1 keyword_set strictfill    barrecouleur  colnumb  min   max   ncontour keyword_set strictfill 2                     position   posbar  _extra   ex       VI  Possible print      fini:   terminedessin  _extra   ex     sortie:   if keyword_set savedbox  THEN restoreboxparam   boxparam4plt dat    if keyword_set key_performance  NE 0 THEN print   temps plt  systime 1 tempsun        return end  "); 
    256 a[254] = new Array("./ToBeReviewed/PLOTS/DESSINE/plt1d.html", "plt1d.pro", "", "         file_comments   Trace 1d graphs: x y z  or t but in this case  we recall directly pltt       categories   Graphics      param TAB  in required     The field whose we want to make the hovmoller map can be 2 kind of thing:  1  An array which can be:              2d  3d or 4d:  array xy  xyz  xyt or xyzt  In this case  the array will pass             in moyenne or grossemoyenne to be averaged and become  an array 1d                1d:Nevertheless  the type must be specified in order to we know which trace             it is about  To have a correct caption  respecify the  extraction zone via BOXZOOM          2  a structure respecting all criterions specified by litchamp pro              See IDL  xhelp litchamp  The array contained in the structure             respecting criterions of case 1        param PARAM2  in required     Min value we want to consider in the contour s drawing    Note: could also be the type of plot: x y z         param PARAM3  in optional default min max of tab  on ocean points     Max value we want to consider in the contour s drawing    Note: if param2 is defined as  x y z  then param3 is used to define the min  see param2       param PARAM4  in optional default max of tab  on ocean points     Type of plot  can be only  x y z  for plt1d    Note: if param2 is defined as  xy  then param4 is used to define the max  see param3       keyword BOXZOOM   Vector indicating the geographic zone  3d  on which the extraction of the field must    be done to do the hovmoeller     If BOXZOOM has :   1 element : The extraction is made on  lon1  lon2  lat1  lat2  0 boxzoom 0    2 elements: The extraction is made on  lon1  lon2  lat1  lat2  boxzoom 0 boxzoom 1    4 elements: The extraction is made on  Boxzoom  vert1  vert2    5 elements: The extraction is made on  Boxzoom 0:3  0  Boxzoom 4    6 elements: The extraction is made on Boxzoom     Where lon1  lon2 lat1 lat2 vert1 vert2 are global variables defined at the last domdef       keyword COL1d     OBSOLETE Color number when we make a trace 1d by default  0 It is better to use the    keyword COLOR used by plot       keyword ENDPOINTS    keyword specifying that we want to make a vertical cut in diagonal  Then coordinated of extremities    of these one are defined by the 4 elements of the vector ENDPOINTS:  x1 y1 x2 y2  which are    coordinates       keyword MAXIN    Allows to specify the max value we want to consider in the drawing of contour    helping by the keyword instead of the argument max  If the argument and the keyword are    specified in the same time  it is the value specified by the keyword which is retained       keyword MININ    Allows to specify the min value we want to consider in the drawing of contour    helping by the keyword instead of the argument min  If the argument and the keyword are    specified in the same time  it is the value specified by the keyword which is retained       keyword OV1D   Allow the double exposure of an 1d curve to a precedent 1d trace       keyword REVERSE_X    To invert the x axis  so as the drawing       keyword REVERSE_Y    To invert the y axis  so as the drawing       keyword SIN    Activate this keyword if we want the x axis to be traced in sinus of the    latitude when we make a drawing f y       keyword STY1D     OBSOLETE    Number of the style used when we make a 1d drawing  We should better use the    keyword LINESTYLE which is tho one of the plot  Beware  this keyword is still    useful if we want to d bars instead of curves  put sty1d bar       keyword TYPEIN   allows to specify the type of hovmoller we want to do                xt yt zt t      with help of a keyword rather than the argument type  If the argument and the    keyword are specified in the same time  it is the value specified by the    keyword which is retained       keyword _EXTRA    used to pass your keywords      history    creation 24 6 99 Eric Guilyardi     a partir routine pltt de Sebastien Masson    8 7 1999 Sebastien Masson  smasson lodyc jussieu fr     inspection des travaux finis   8 2 2000 Sebastien Masson: checkfield      version     Id: plt1d pro 172 2006 09 11 07:11:26Z smasson             pro plt1d  tab  param2  param3  param4  BOXZOOM   boxzoom  SIN   sin                MININ   minin  MAXIN   maxin  TYPEIN   typein  ENDPOINTS   endpoints                COL1D   col1d  STY1D   sty1d  OV1D   ov1d  X   x  Y   y  Z   z  TT   tt                REVERSE_X   reverse_x  REVERSE_Y   reverse_y  SWITCHXY   switchxy                _extra   ex     include common     compile_opt idl2  strictarrsubs    cm_4mesh  cm_4data   IF NOT keyword_set key_forgetold  THEN BEGIN  updatenew  updatekwd   ENDIF     tempsun   systime 1             pour key_performance     1st part: initialization small calculations          verification of the type s value       if n_elements param2  NE 0 then type   param2   if n_elements param3  NE 0 then min   param3   if n_elements param4  NE 0 then max   param4   if n_elements minin  NE 0 then min   minin   if n_elements maxin  NE 0 then max   maxin   if keyword_set tt  then typein    t    if keyword_set typein  then BEGIN      if size type   type  NE 7 AND size type   type  NE 0 then begin       if n_elements min  NE 0 then max   min       min   type     endif     type   typein   endif     checktypeminmax   plt1d  TYPE   type  MIN   min  MAX   max  ENDPOINTS   endpoints         XX   keyword_set x  YY   keyword_set y  ZZ   keyword_set z     if type EQ  t  then BEGIN     pltt  tab  type  min  max  BOXZOOM   boxzoom  SIN   sin  TYPEIN   typein           COL1D   col1d  STY1D   sty1d  OV1D   ov1d  ENDPOINTS   endpoints  _extra   ex     return   endif     I2  reinitialization   p x y    Comment: We do not reinitializate when we call back plt1d     if NOT keyword_set ov1d  then reinitplt     I1  Reading of the field      if  keyword_set boxzoom  OR keyword_set endpoints  THEN BEGIN      savedbox   1b      saveboxparam   boxparam4plt1d dat     ENDIF     if keyword_set endpoints  then begin     section  tab  z1d  glam  gphi  ENDPOINTS   endpoints  TYPE   type           BOXZOOM   boxzoom  DIREC   direc     nx   n_elements glam       ny   nx     if strupcase vargrid  EQ  W  then begin       z   gdepw firstzw:lastzw        nz   nzw     ENDIF ELSE BEGIN       z   gdept firstzt:lastzt        nz   nzt     ENDELSE   ENDIF ELSE BEGIN      z1d   checkfield tab   plt1d  TYPE   type  BOXZOOM   boxzoom                          direc   direc  _extra   ex      grille  mask  glam  gphi  gdep  nx  ny  nz  type   type   ENDELSE   if z1d 0  EQ  1 then BEGIN      IF keyword_set savedbox  THEN restoreboxparam   boxparam4plt1d dat      return endif   We build the mask  For this  the array must be hidden  Automaticaly done at valmask    value if we pass in moyenne or grossemoyenne    mask   fltarr n_elements z1d    if n_elements valmask  EQ 0 then valmask   1e20   nan   total finite z1d   nan     1   if keyword_set nan  then begin     notanum   where finite z1d  EQ 0      z1d notanum    0     mask where z1d LT valmask 10    1     z1d notanum     values f_nan   ENDIF ELSE mask where z1d LT valmask 10    1     determination of the min and of the max after the average     nan   total finite z1d   nan    1   determineminmax  z1d  mask  mi  ma  MININ   min  MAXIN   max  nan   nan  INTERVALLE   intervalle  _extra   ex   if z1d 0  EQ  1 THEN return       if NOT keyword_set ov1d  THEN placedessin   autre  posfenetre  posbar  contour   contour  DIREC   direc  endpoints   endpoints  _extra   ex       2nd part: Drawing       definition of the abscisse and ordinate vectors    The triangulation is defined in order to the drawing be done from the    left bottom to the right up  So the matrix have to be shown like this     from which some transpose and reverse       case type of      y : begin       yy   z1d       IF  size gphi 0  EQ 1 then xx   gphi ELSE BEGIN          IF keyword_set key_irregular  THEN BEGIN            cln    where gphi EQ max gphi 0            xx   reform gphi cln MOD nx            ENDIF ELSE xx   reform gphi 0          ENDELSE       if keyword_set sin  then xx   sin pi 180 xx        min0   lat1   max0   lat2     END      x :begin       yy   z1d       xx   glam  0        min0   lon1   max0   lon2     END       z :begin       yy   reverse gdep  1        xx   reverse z1d  1        min0   0   max0   0       case n_elements boxzoom  of         0: y range    vert1  vert2          1: y range    0  boxzoom          2: y range   boxzoom         4: y range    vert1  vert2          5: y range    0  boxzoom 4          6: y range   boxzoom 4:5        endcase       if NOT keyword_set ov1d  then  y range   reverse y range      END    ENDCASE          definition of axes        if keyword_set integrationtps  then axe  type  time 0  time jpt 1  SIN   sin  _extra   ex        ELSE axe  type  SIN   sin   if NOT keyword_set ov1d  then axe  type  SIN   sin       drawing       if type EQ  z  then begin     idx   where xx NE valmask      if NOT keyword_set ov1d  then BEGIN        if min EQ mi then  x range    min abs max min 5  max abs max min 5          ELSE  x range    min  max      ENDIF   ENDIF ELSE BEGIN      idx   where yy NE valmask      if NOT keyword_set ov1d  then BEGIN        if min EQ mi then  y range    min abs max min 5  max abs max min 5          ELSE  y range    min  max      ENDIF   ENDELSE      if NOT keyword_set ov1d  then BEGIN      legende  mi  ma  type  CONTOUR   contour  DIREC   direc  ENDPOINTS   endpoints  _EXTRA   ex     ENDIF   IF keyword_set switchxy   THEN BEGIN     tmp   xx     xx   yy     yy   temporary tmp      if NOT keyword_set ov1d  then BEGIN        tmp    x        x    y        y   temporary tmp      ENDIF   ENDIF   if NOT keyword_set ov1d  then BEGIN      if keyword_set reverse_x  then  x range   reverse x range      if keyword_set reverse_y  then  y range   reverse y range    ENDIF     xx   xx idx    yy   yy idx    if  not keyword_set col1d  then col1d   0   if keyword_set sty1d  then BEGIN  If we want to make bars     IF strlowcase strtrim sty1d  EQ  bar  then begin        y range    y range 0 y range 1 y range 0 05   y range 1         bar_plot  yy  background    d n_colors 1    255             baselines   replicate y range 0  n_elements yy  barnames                 colors      replicate col1d  n_elements yy   outline       if n_elements ex  NE 0 then BEGIN    To have a black frame         if  where tag_names ex  EQ  COLOR 0  NE  1 then ex COLOR   0       ENDIF       plot   0   0   noerase   nodata  _extra   ex       GOTO  fini     ENDIF    ENDIF     if NOT keyword_set ov1d  then BEGIN        plot  xx  yy  color   col1d  linestyle   sty1d  thick   2  title     subtitle     _extra   ex     if n_elements ex  NE 0 then BEGIN    To have a 0 colored frame and trace a line at y 0       if  where tag_names ex  EQ  COLOR 0  NE  1 then ex COLOR   0       if  where tag_names ex  EQ  LINESTYLE 0  NE  1 then ex LINESTYLE   0       if  where tag_names ex  EQ  THICK 0  NE  1 then ex THICK   0     ENDIF     plot   x range   0  0   noerase   nodata           xstyle   1 4 keyword_set endpoints  AND                          type EQ  x  AND lat1 NE lat2  OR  type EQ  y  AND lon1 NE lon2            ystyle   1  _extra   ex   Add of an axis in the case where we use endpoints     if keyword_set endpoints  then addaxe  endpoints  type  posfenetre  _EXTRA   ex   Trace a line at x 0     plot   0  0   y range   noerase   nodata  title     subtitle     _extra   ex   ENDIF ELSE oplot  xx  yy  color   col1d  linestyle   sty1d  thick   2  _extra   ex       3rd part: Possible print      fini:   terminedessin  _extra   ex   if keyword_set savedbox  THEN restoreboxparam   boxparam4plt1d dat      if n_elements key_performance  NE 0 then       IF key_performance EQ 1 THEN print   temps plt1d  systime 1 tempsun          return end  "); 
    257 a[255] = new Array("./ToBeReviewed/PLOTS/DESSINE/pltbase.html", "pltbase.pro", "", "             file_comments   Overlayer contour to trace a field which can be mask     Elementary brick of plt  pltz et pltt       categories    Graphics      param Z2D  in required    The table to trace      param X  in required    Axis  Vector or array of the same size that z2d  This is the coordinate of z2d on x       param Y  in required    Axis  Vector or array of the same size that z2d  This is the coordinate of z2d on y       param MASK  in required type array    It is the array who mask z2d  with 0s on points we want to mask and 1s on others     If z2d is not masked  put this argument equal to 1       param XM  in required    Axis of the mask  Vector or array of the same size that mask     This is the coordinate of mask on x       param YM  in required    Axis of the mask  Vector or array of the same size that mask     This is the coordinate of mask on y       param LEVELS  in optional type vector    Vectors which contain levels needed at the contour     If it is not given  we take 20 levels between the min and the max         param COLORS  in optional type vector    Vectors which contain colors needed at the contour     If it is not given  we take 20 levels between the min and the max       keyword COLORTRICHAMP    The color we want to use to draw the triangulation which is used to make contours of the field       keyword COLORTRIMASK    The color we want to use to draw the triangulation which is used to make contours of the mask       keyword COLOR_C    To draw the contour in color instead of in black   with filling in color       keyword CONT_NOFILL    Activate it not to fill the point mask to let them transparent     Comment: Nevertheless  we trace mask s contour       keyword CONT_COLOR  default   d n_colors   1  white    The color of the continent       keyword DESSTRICHAMP    To draw the triangulation which is used to make field s contours        keyword DESSTRIMASK    To draw the triangulation which is used to make mask s contours        keyword FORPLT    To activate if we want that the drawing of coast be realized by tracecote rather than tracemask       keyword I_COLORS  type vector    It is a vector specifying the colors to use to trace contours     It is the same thing that c_colors which act on contours       keyword MORE  default 10    Number to give to avoid style s bugs:      Out of range subscript encountered:        Execution halted at:  PLTBASE           151               If the bug still exist  increase the value of more      The explanation and the justification of this method do not have scientific bases yet       keyword NOFILL   To make just isolines       keyword NOCONTOUR   To make just colors       keyword UNSUR2   To trace one isoline on two       keyword UNLABSUR  type integer    I specify we only label one contour on two       keyword CONTOUR    To be used since plt  pltz or pltt   Have a look on these routines       keyword _EXTRA    Used to pass your keywords      uses   common pro      restrictions   In the case of z2d  x and y are arrays of same size  we hate to put them as vectors: z2d  x  y       history    Sebastien Masson  smasson lodyc jussieu fr        8 2 2000 check if the tri array is not equal to    1  allow contour with out using a triangulation        version    Id: pltbase pro 171 2006 09 07 14:11:11Z smasson        todo seb L 172   173           PRO pltbase  z2d  x  y  mask  xm  ym  levels  colors  UNSUR2   unsur2  CONTOUR   contour                  NOCONTOUR   nocontour  NOFILL   nofill                  TRICHAMP   trichamp  TRIMSK   trimsk                  REALCONT   realcont  NAN   nan  usetri   usetri                  COLORTRICHAMP   colortrichamp  COLORTRIMASK   colortrimask                  COLORTRINAN   colortrinan                  COLORPOINTS   colorpoints  DRAWPOINTS   drawpoints                  TH_TRICHAMP   th_trichamp  TH_TRIMASK   th_trimask                  DESSTRICHAMP   desstrichamp  DESSTRIMASK   desstrimask                  DESSTRINAN   desstrinan  COLOR_C   color_c                  I_COLORS   i_colors   CONT_COLOR   CONT_COLOR                  CONT_NOFILL   cont_nofill  UNLABSUR   unlabsur                  COINMONTEMASK   coinmontemask  COINDESCENDMASK   coindescendmask                  COINMONTENAN   coinmontenan  COINDESCENDNAN   coindescendnan                  INDICEZOOMMASK   indicezoommask  INDICEZOOMNAN   indicezoomnan                  MASKORG   maskorg  MASKNAN   masknan  TRINAN   trinan                  FORPLT   forplt  REALSECTION   realsection                  MORE   more  EXCHANGE_XY   exchange_xy                  _EXTRA   ex       compile_opt idl2  strictarrsubs    cm_4mesh   IF NOT keyword_set key_forgetold  THEN BEGIN  updatenew  updatekwd   ENDIF       Explanation concerning contour  This keyword is activated when we trace a    colored contour different from the one with black trait    If it is activated  case n_elements contour  NE 0  we pass 2 time in pltbase:     1  We trace colors then we leave  it is the case:           n_elements contour  NE 0 AND n_elements contour  NE 4      2  We trace contours in traits then continents  it is the case:            n_elements contour  NE 0 AND n_elements contour  EQ 4        tempsun   systime 1             To key_performance   if n_elements mask  EQ 0 then mask   1b   if n_elements masknan  EQ 0 then masknan   1b   IF total mask  EQ n_elements z2d  THEN mask   1b     If levels and colors aren t given     if n_params  EQ 4 then        label  0  min z2d mask  max z2d mask  ncontour  levels  colors   attention bidouille inexplicable pour que tout se passe bien avec les   postcript ds pltz    if n_elements contour  LE 4 AND  x type EQ 0 THEN       plot   0   0  xstyle   5  ystyle   5   nodata   noerase  title     subtitle         Is cell_fill is a part of _extra  we desactive it if it is nt equal to 2     IF chkstru ex   CELL_FILL  THEN BEGIN      cell_fill   ex CELL_FILL     if ex CELL_FILL NE 2 then ex CELL_FILL   0   ENDIF ELSE cell_fill   0            I  Filling of contours in palette colors      if NOT keyword_set more  then more   10   if NOT keyword_set nofill  AND NOT keyword_set color_c  then begin     if n_elements contour  NE 4 THEN BEGIN        if usetri EQ 2 then BEGIN         IF size x   n_dimensions  EQ 1 THEN x   x replicate 1   size z2d 2          IF size y   n_dimensions  EQ 1 THEN y   replicate 1   size z2d 1 y         contour   z2d  fltarr more   x  fltarr more                 y  fltarr more  levels   levels  c_color   colors                noerase   fill  TRIANGULATION   trichamp  _extra   ex         ENDIF ELSE BEGIN         IF size x   n_dimensions  EQ 2 THEN x   x  0          IF size y   n_dimensions  EQ 2 THEN y   reform y 0            contour  z2d  x  y  levels   levels  c_color   colors   noerase                fill  _extra   ex        ENDELSE     ENDIF   ENDIF   if n_elements contour  NE 0 AND n_elements contour  NE 4 THEN GOTO  fini    IF chkstru ex   C_ORIENTATION  THEN ex   extractstru ex   C_ORIENTATION    IF chkstru ex   C_SPACING  THEN ex   extractstru ex   C_SPACING    IF chkstru ex   C_COLORS  THEN ex   extractstru ex   C_COLORS      II  Drawing of contours in traits     if n_elements contour  EQ 4 OR n_elements contour  EQ 0 THEN BEGIN     we put the masked values to NaN       IF  n_elements mask  GT 1 OR n_elements masknan  GT 1          AND NOT keyword_set cont_nofill  THEN BEGIN        IF keyword_set maskorg  THEN tonan   maskorg masknan ELSE tonan   mask masknan        tonan   where remplit tonan  nite   1  mask   tonan                                  basique  fillval   0                                 fillxdir   keyword_set realsection  EQ 0  count        IF count NE 0 THEN z2d temporary tonan     values f_nan     ENDIF        We do not pass if we have to make differents contours    In the case of unsur2 is activated  we reduce levels     if NOT keyword_set nocontour  then begin       IF keyword_set unsur2  THEN levels   levels where zeroun n_elements levels    eq 1    Is unlabsur activated   Does C_LABEL passed via _EXTRA        if keyword_set unlabsur  THEN IF chkstru ex   C_LABELS  THEN           ex C_LABELS   1 indgen n_elements ex C_LABELS  MOD unlabsur    1      Not to fill when cell_fill is imposed        IF chkstru ex   CELL_FILL  THEN ex CELL_FILL   0         CASE 1 OF         keyword_set color_c :c_colors   colors         keyword_set i_colors :c_colors   i_colors         ELSE:       ENDCASE         IF usetri EQ 2 THEN BEGIN          IF size x   n_dimensions  EQ 1 THEN x   x replicate 1   size z2d 2          IF size y   n_dimensions  EQ 1 THEN y   replicate 1   size z2d 1 y         contour   z2d  fltarr more   x  fltarr more                 y  fltarr more  levels   levels               overplot   1 keyword_set nofill  noerase   keyword_set nofill                c_colors   c_colors  TRIANGULATION   trichamp  _extra   ex       ENDIF ELSE BEGIN         IF size x   n_dimensions  EQ 2 THEN x   x  0          IF size y   n_dimensions  EQ 2 THEN y   reform y 0            contour  z2d  x  y  levels   levels               overplot   1 keyword_set nofill  noerase   keyword_set nofill                c_colors   c_colors  _extra   ex       ENDELSE     ENDIF     III  Filling of colored continents        IF chkstru ex   CELL_FILL  THEN ex CELL_FILL   cell_fill   1     IF chkstru ex   LEVELS  THEN ex   extractstru ex   LEVELS      IF chkstru ex   NODATA  THEN ex   extractstru ex   NODATA      IF NOT keyword_set cont_color  THEN cont_color    d n_colors 1     255         If there is points at NaN    We trace points in white at NaN bafore drawing coasts with a trait        if keyword_set trinan  THEN BEGIN       IF size x   n_dimensions  EQ 1 THEN x   x replicate 1   size masknan 2        IF size y   n_dimensions  EQ 1 THEN y   replicate 1   size masknan 1 y       contour   1b masknan  fltarr more   x  fltarr more               y  fltarr more  levels   0 5   overplot   fill             c_colors   cont_color  TRIANGULATION   trinan  _extra   ex       IF keyword_set forplt  THEN           completecointerre  COINMONTE   coinmontenan             COINDESCEND   coindescendnan  INDICEZOOM   indicezoomnan             CONT_COLOR   cont_color  _EXTRA   ex         ELSE fillcornermask  x  0  y 0    COINMONTE   coinmontenan             COINDESCEND   coindescendnan  CONT_COLOR   cont_color  _extra   ex     ENDIF     Filling of continents       if keyword_set realcont  then if realcont EQ 1 then mask   1b     if n_elements mask  NE 1 then BEGIN   If mask 1 we gap it          if NOT keyword_set cont_nofill  then BEGIN     mask filling           case 1 of           keyword_set realsection :drawsectionbottom  mask  xm  ym                 CONT_NOFILL   cont_nofill  CONT_COLOR   cont_color  _EXTRA   ex           usetri GE 1:BEGIN             if n_elements trimsk  eq 0 then trimsk   trichamp             IF size xm   N_DIMENSIONS  EQ 1 THEN xm   xm replicate 1   size mask 2              IF size ym   N_DIMENSIONS  EQ 1 THEN ym   replicate 1   size mask 1 ym             contour   1b mask  fltarr more   xm  fltarr more                     ym  fltarr more  LEVELS   0 5   OVERPLOT   FILL                   C_COLORS   cont_color  TRIANGULATION   trimsk  _extra   ex             IF keyword_set forplt  THEN                 completecointerre  COINMONTE   coinmontemask                   COINDESCEND   coindescendmask  INDICEZOOM   indicezoommask                   CONT_COLOR   cont_color  _EXTRA   ex               ELSE fillcornermask  xm  0  ym 0    COINMONTE   coinmontemask                   COINDESCEND   coindescendmask  CONT_COLOR   cont_color  _extra   ex           END           ELSE:BEGIN              IF size xm   n_dimensions  EQ 2 THEN xm   xm  0              IF size ym   n_dimensions  EQ 2 THEN ym   reform ym 0                contour  1b mask  xm  ym  LEVELS   0 5   OVERPLOT                    FILL  C_COLORS   cont_color  _EXTRA   ex           END         ENDCASE       ENDIF                       NOT keyword_set cont_nofill      IV  Trace coast in traits         case 1 of         keyword_set realsection  AND NOT keyword_set cont_nofill :               keyword_set realsection  AND keyword_set cont_nofill :             drawsectionbottom  mask  xm  ym               CONT_NOFILL   cont_nofill  _extra   ex          keyword_set forplt  AND  map projection GT 0 OR key_irregular              OR keyword_set nan :tracecote  _extra   ex         ELSE:tracemask  mask  xm  ym  _extra   ex       endcase                         ENDIF                         n_elements mask  NE 1   ENDIF     draw the triangulations     if keyword_set desstrichamp  then       dessinetri  trichamp  x  y  color   colortrichamp  thick   th_trichamp   if keyword_set desstrimask  then       dessinetri  trimsk  xm  ym  color   colortrimask  thick   th_trimask   if keyword_set desstrinan  then       dessinetri  trinan  x  y  color   colortrinan   if keyword_set drawpoints  then       tracegrille  x  y  color   colorpoints     fini:   IF keyword_set key_performance  THEN print   temps pltbase  systime 1 tempsun     return end"); 
    258 a[256] = new Array("./ToBeReviewed/PLOTS/DESSINE/pltsc.html", "pltsc.pro", "", "     file_comments        categories        param TAB1        param TAB2        param MIN1        param MAX1        param MIN2        param MAX2        param VARNAME2        keyword BOXZOOM   Vector indicating the geographic zone on which we want to cut the map      If BOXZOOM has :   1 element : The extraction is made on  lon1  lon2  lat1  lat2  0 boxzoom 0    2 elements: The extraction is made on  lon1  lon2  lat1  lat2  boxzoom 0 boxzoom 1    4 elements: The extraction is made on  Boxzoom  0  max gdept  gdepw    5 elements: The extraction is made on  Boxzoom 0:3  0  Boxzoom 4    6 elements: The extraction is made on Boxzoom      keyword COL1D        keyword STY1D        keyword OV1D        keyword _EXTRA   Used to pass your keywords      returns        uses        restrictions        examples        history        version    Id: pltsc pro 163 2006 08 29 12:59:46Z navarro        todo seb       PRO  pltsc tab1 tab2  min1  max1  min2  max2  varname2  BOXZOOM   boxzoom               COL1D col1d STY1D sty1d OV1D ov1d  _extra   ex   scatter plot  inspired from plt1d        compile_opt idl2  strictarrsubs        include common  cm_4mesh  cm_4data   IF NOT keyword_set key_forgetold  THEN BEGIN  updatenew  updatekwd   ENDIF      Comment: We do not reinitializate when we call back pltsc    if NOT keyword_set ov1d  then reinitplt      reduce data xyzt domain     if keyword_set boxzoom  then BEGIN       Case 1 Of        N_Elements Boxzoom  Eq 1:bte    lon1  lon2  lat1  lat2  0  boxzoom 0         N_Elements Boxzoom  Eq 2:bte    lon1  lon2  lat1  lat2  boxzoom 0  boxzoom 1         N_Elements Boxzoom  Eq 4:bte    Boxzoom  vert1  vert2         N_Elements Boxzoom  Eq 5:bte    Boxzoom 0:3  0  Boxzoom 4         N_Elements Boxzoom  Eq 6:bte   Boxzoom        Else: Begin          ras   report Wrong Definition of Boxzoom            return        End      endcase      savedbox   1b      saveboxparam   boxparam4pltsc dat       domdef  bte  GRIDTYPE   vargrid    ENDIF    extract indexes to plot     indexm   where tab1 LE valmask 10     tab1   tab1 indexm     tab2   tab2 indexm      npts    size indexm 1     deal with  min and max of plot    IF finite min1  EQ 0 THEN min1   min tab1     IF finite max1  EQ 0 THEN max1   max tab1     IF finite min2  EQ 0 THEN min2   min tab2     IF finite max2  EQ 0 THEN max2   max tab2         init plot if not overlay        IF NOT keyword_set ov1d  THEN placedessin   yfx  posfenetre  posbar        contour   contour  _extra   ex    yy   tab1    xx   tab2    axis range     x range    min2 abs max2 min2 5 max2 abs max2 min2 5      y range    min1 abs max1 min1 5 max1 abs max1 min1 5      IF  NOT keyword_set sty1d  THEN sty1d   0    IF  NOT keyword_set col1d  THEN col1d   0    IF  NOT keyword_set ov1d  THEN  BEGIN        legende  min1  max1   yfx  VARNAME2   varname2  NPTS   npts  _EXTRA   ex          plot xx yy  background   255  psym   sty1d 1  color col1d  thick 2            title     subtitle    _extra   ex        if n_elements ex  NE 0 then BEGIN    To have a 0 colored frame and trace a line at y 0          if  where tag_names ex  EQ  COLOR 0  NE  1 then ex COLOR   0          if  where tag_names ex  EQ  LINESTYLE 0  NE  1 then ex LINESTYLE  0        ENDIF        plot   x range   0  0   noerase   nodata  xstyle   1  ystyle   1  _extra   ex   trace a line at x 0       plot   0  0   y range   noerase   nodata  title     subtitle     _extra   ex    ENDIF ELSE oplot xx yy color col1d linestyle sty1d thick 2  _extra   ex       3rd part: Possible print     fini:    terminedessin  _extra   ex   if keyword_set savedbox  THEN restoreboxparam   boxparam4pltsc dat       if n_elements key_performance  NE 0 then       IF key_performance EQ 1 THEN print   temps plt1d  systime 1 tempsun           return end  "); 
    259 a[257] = new Array("./ToBeReviewed/PLOTS/DESSINE/pltt.html", "pltt.pro", "", "         file_comments    Trace hovmoller graphs: xt yt zt t      categories Graphics      param TAB  in required     The field whose we want to make the hovmoller map can be 2 kind of thing:  1  An array which can be:              3d or 4d: array   xt yt zt t  The last component is the time  In this case  the array will               pass in grossemoyenne to be averaged and become an 1d or 2d array               2d: If the array is already 2d  it is not modified  beware  lands must               be masked at the value valmask  and nevertheless type must be specified               to we know of which trace it is about               To have a correct caption  respecify the  extraction zone via BOXZOOM               1d: only for traces of the  t  type  Nevertheless  type must be specified               to we know of which trace it is about               To have a correct caption  respecify the  extraction zone via BOXZOOM          2  a structure respecting all criterions specified by litchamp pro              See IDL  xhelp litchamp  The array contained in the structure             respecting criterions of case 1         PARAM:          MAX: valeur maximum que l on veut prendre en compte dans le trace   des contours  Par defaut on prend le max de tableau  sur les pts mer     MIN: valeur minimum que l on veut prendre en compte dans le trace   des contours  Par defaut on prend le min de tableau  sur les pts   mer            DATMIN: c est la borne inf de l axe temporel  c est un         longinteger de la forme yyyymmdd  ou bien yymmdd            DATMAX: c est la borne max de l axe temporel  c est un         longinteger de la forme yyyymmdd  ou bien yymmdd       keyword BOXZOOM   Vector indicating the geographic zone  3d  on which the extraction of the field must    be done to do the hovmoeller     If BOXZOOM has :   1 element : The extraction is made on  lon1  lon2  lat1  lat2  0 boxzoom 0    2 elements: The extraction is made on  lon1  lon2  lat1  lat2  boxzoom 0 boxzoom 1    4 elements: The extraction is made on  Boxzoom  vert1  vert2    5 elements: The extraction is made on  Boxzoom 0:3  0  Boxzoom 4    6 elements: The extraction is made on Boxzoom     Where lon1  lon2 lat1 lat2 vert1 vert2 are global variables defined at the last domdef       keyword CONTINTERVALLE    When CONTOUR is activated  it is the value between 2 isolines    traced by a trait  So it can be different from the one specified by INTERVALLE which     in this case  does not control colored isolines in color anymore  If there is noone    specified min  we choose a contour min which goes well with the specified interval     If this keyword is not specified  we trace 20 isolines from the min to the max        keyword CONTLABEL  type integer    When CONTOUR is activated  if n   is different of 0  choose the label type corresponding to n cases for    the traced by a traitisolines  To specify the type of label of the    colored contour  use LABEL      keyword CONTMAX  default we take the max of the array passed in the keyword CONTOUR  on ocean points    When CONTOUR is activated  max value we want to consider in the isoline    traced by a trait s line        keyword CONTMIN  default we take the min of the array passed in the keyword CONTOUR  on ocean points    When CONTOUR is activated  min value we want to consider in the isoline    traced by a trait s line        keyword CONTNLEVEL  default 20    When  CONTOUR is activated  it is the number of contours   traced by a trait for drawing  active if   CONTLABEL 0       keyword CONTOUR    If we want to trace contours of a different field than the one    whose we have the colored drawing  by example E P in color and QSR in contours     It must be a field respecting same characteristics than the argument number one of pltt       keyword ENDPOINTS    keyword specifying that we want to make a vertical cut in diagonal  Then coordinated of extremities    of these one are defined by the 4 elements of the vector ENDPOINTS:  x1 y1 x2 y2  which are    coordinates        keyword EXCHANGE_XY   Allows to invert axes        keyword FILTER   Apply a slippery average of width FILTER       keyword INTERVALLE    Value of an internal between to isoline  If there is none specified min     we choose a min contour which goes well with the specified interval  If this keyword is not    specified  we trace 20 isoline from the min to the max  Comment: When CONTOUR is activated     INTERVALLE only specify the interval between 2 colored isoline  To specify the interval    between 2 isolines traced by a trait  use CONTINTERVALLE       keyword INV    Invert the color vector used to color the graph                   without use the black  the white and the used palette        keyword LABEL  type integer    If n different of 0  it choose the label s type    corresponding to cases n  cf label pro   Comment: When CONTOUR is activated  it only specify the label s type for colored isolines     For these one traced by a trait  use CONTLABEL        keyword COL1d    OBSOLETE Color number when we make a trace 1d by default  0 It is better to use the    keyword COLOR used by plot       keyword MAXIN    to specify the max value we want to plot with a keyword instead of with the   input parameter max  If max is defined by both  parameter and keyword  the   keyword is retained       keyword MININ    to specify the min value we want to plot with a keyword instead of with the   input parameter min  If min is defined by both  parameter and keyword  the   keyword is retained       keyword NLEVEL  default 20    Number of contour to draw by default  20  active if   LABEL 0 or is not specified       keyword CONTNLEVEL  default 20    When  CONTOUR is activated  it is the number of contours   traced by a trait for drawing  active if   CONTLABEL 0       keyword OV1D    Allows to overprint a 1d curve over a precedent 1d drawing       keyword OVERPLOT    To make a plot over an other one     Comment: Contrarily to the use of CONTOUR or VECTEUR  the use of this keyword    does not the caption and or the color bar       keyword STRICTFILL    Activate this keyword to that the filling of contours be    precisely done between the min and the max specified letting values inferior at the    specified min and values superior at the specified max in white       keyword STYLE  default style 0    Contour s style to adopt to draw isolines      keyword STY1D     OBSOLETE    Number of the style used when we make a 1d drawing  We should better use the    keyword LINESTYLE which is tho one of the plot  Beware  this keyword is still    useful if we want to d bars instead of curves  put sty1d bar       keyword TREND_TYPE   Modify field by calling trends pro      keyword TYPEIN   allows to specify the type of hovmoller we want to do                xt yt zt t      with help of a keyword rather than the argument type  If the argument and the    keyword are specified in the same time  it is the value specified by the    keyword which is retained       keyword _EXTRA   Used to pass your keywords      uses   common pro      history    Sebastien Masson  smasson lodyc jussieu fr   27 5 98                         Jerome Vialard  adapting plt to hovmoller drawing                          2 7 98                         Sebastien Masson 14 8 98  continents barres                          15 1 98   Adaptation for arrays 3 and 4d to the average be done in pltt rather than during the reading                          Sebastien Masson 14 8 98                          7 1999                          Eric Guilyardi 29 7 99 FILTER  TREND_TYPE                          REPEAT_C                          Sebastien Masson 08 02 2000 checkfield and                         usetri keyword        version     Id: pltt pro 192 2006 09 22 09:37:08Z smasson        todo seb: L 24   36  L 426   427  L  492   493         pro pltt tab giventype givenmin givenmax datmin datmax BOXZOOM   boxzoom  CONTOUR contour             ENDPOINTS endpoints INTERVALLE intervalle INV inv              CONTINTERVALLE contintervalle LABEL label CONTLABEL contlabel             STYLE style  CONTMAX contmax             CONTMIN contmin NLEVEL nlevel CONTNLEVEL contnlevel             COL1D col1d STY1D sty1d  MININ   minin  MAXIN   maxin             OV1D ov1d  FILTER   filter  TREND_TYPE   trend_type             REPEAT_C   repeat_c  TYPEIN   typein  XT   XT  YT   YT  ZT   zt              TT   tt  STRICTFILL   strictfill  OVERPLOT   overplot              EXCHANGE_XY   exchange_xy              _extra   ex     include common     compile_opt idl2  strictarrsubs    cm_4mesh  cm_4data  cm_4cal   IF NOT keyword_set key_forgetold  THEN BEGIN  updatenew  updatekwd   ENDIF        tempsun   systime 1            For key_performance     I2  reinitialization   p x y    Comment: we do not reinitializate when we call back plt in loop to use contour       if n_elements contour  ne 4 AND NOT keyword_set overplot        AND NOT keyword_set ov1d  then reinitplt     I1  Reading of the field       if  keyword_set boxzoom  OR keyword_set endpoints         AND n_elements contour  ne 4 THEN BEGIN      savedbox   1b      saveboxparam   boxparam4pltt dat     ENDIF    if n_elements giventype  NE 0 then type   giventype    if n_elements givenmin  NE 0 then min   givenmin    if n_elements givenmax  NE 0 then max   givenmax    if n_elements minin  NE 0 then min   minin    if n_elements maxin  NE 0 then max   maxin    if keyword_set typein  then BEGIN        if size type   type  NE 7 AND size type   type  NE 0 then begin          if n_elements min  NE 0 then max   min          min   type       endif       type   typein     ENDIF      checktypeminmax   pltt  TYPE   type  MIN   min  MAX   max          XT   XT  YT   YT  ZT   zt  TT   tt  ENDPOINTS   endpoints  _extra   ex      if keyword_set endpoints  then begin       section  tab  z2d  glam  gphi  ENDPOINTS   endpoints  TYPE   type             BOXZOOM   boxzoom  DIREC   direc       nx   n_elements glam         ny   nx       if strupcase vargrid  EQ  W  then begin          z   gdepw firstzw:lastzw           nz   nzw       ENDIF ELSE BEGIN          z   gdept firstzt:lastzt           nz   nzt       ENDELSE    ENDIF ELSE BEGIN        z2d   checkfield tab   pltt  TYPE   type  BOXZOOM   boxzoom                            direc   direc  _extra   ex        if z2d 0  EQ  1 then BEGIN          IF keyword_set savedbox  THEN restoreboxparam   boxparam4pltt dat          return       endif       grille  mask  glam  gphi  gdep  nx  ny  nz  type   type    ENDELSE     Calculation of trend anomaly following TREND_TYPE       IF NOT keyword_set trend_type  THEN trend_type   0     IF trend_type GT 0 THEN z2d   trends z2d  trend_type  type       Filtering of fields in the  t  case         IF type EQ  t  AND keyword_set filter  THEN BEGIN        print       Applying a running mean filter of width  string filter  format    I3        z2d   smooth z2d  filter        z2d 0:filter 2 1    0        z2d size z2d 1 filter 2 1: size z2d 1 1    0     ENDIF       Repetition of the temporal series       IF NOT keyword_set repeat_c  THEN repeat_c   1     temps   time 0:jpt 1     IF repeat_c GT 1 THEN BEGIN       taille size z2d        CASE taille 0  OF          1: z2d   reform z2d replicate 1  repeat_c  taille 1 repeat_c           2: BEGIN             z2d   z2d replicate 1  repeat_c              z2d   reform z2d  taille 1  taille 2 repeat_c   over           END           ELSE:        ENDCASE       temps    temps   lindgen jpt REPEAT_c 1 1 temps 1 temps 0 temps jpt 1     ENDIF       Selection of graphic s type        taille size z2d     case taille 0  of       2 : typdes 2d        1 : begin          z1d z2d          typdes 1d           if keyword_set OV1D  then begin             yy   z2d             if n_elements datmin  NE 0 then tempsmin   date2jul datmin                ELSE tempsmin   temps 0    on shift l axe du temps pour des questions de precision sur les   dates du calendier julien en long qui sont passes en float ds les axes             xx   temps tempsmin              x range x range tempsmin              x tickv x tickv tempsmin   We do a false plot to apply these changes              plot 0   0 noerase xstyle 5  ystyle   5  title     subtitle     ytitle     xtitle                 goto  trace1d          endif       end   endcase   We build the mask  For that  the table must be masked  automaticaly done at the    value valmask if we pass in moyenne or grossemoyenne     nan   total finite z2d nan   z2d  not very nice when xgridstyle 2    same if xticklen 0 5  not very nice in the middle    so we draw   the top  right  axis by hand using axis          if n_elements ex  NE 0 then BEGIN    pour avoir un cadre de la couleur noire         if  where tag_names ex  EQ  COLOR 0  NE  1 then ex COLOR   0       ENDIF         plot   0   0   nodata   noerase  _extra   ex             xstyle   1 4 keyword_set endpoints  AND type EQ  xt  AND lat1 NE lat2 8 type EQ  yt  OR type EQ  zt              ystyle   1 4 keyword_set endpoints  AND type EQ  yt 8 type EQ  xt    call axis for the missing axis        IF type EQ  xt  AND NOT keyword_set endpoints  THEN BEGIN         if n_elements ex  NE 0 then              if  where tag_names ex  EQ  YTICKNAME 0  NE  1 then             ex YTICKNAME   replicate    n_elements ex YTICKNAME          axis  yaxis   1  ystyle   1  yticklen   0               ytickname   replicate     y ticks 1  _extra   ex       ENDIF       IF  type EQ  yt  OR type EQ  zt  AND NOT keyword_set endpoints  THEN BEGIN         if n_elements ex  NE 0 then              if  where tag_names ex  EQ  XTICKNAME 0  NE  1 then             ex XTICKNAME   replicate    n_elements ex XTICKNAME         axis  xaxis   1  xstyle   1  xticklen   0             xtickname   replicate     x ticks 1  _extra   ex       ENDIF   ajout d un axe ds le cas ou l on utilise endpoints       if keyword_set endpoints  then addaxe  endpoints  type  posfenetre  _EXTRA   ex     color bar         colnumb   colnumb 0:ncontour 1 keyword_set strictfill        barrecouleur  colnumb  min   max   ncontour keyword_set strictfill 2                         position   posbar  _extra   ex      endif     1d   trace1d:    if  typdes eq  1d  then begin       if  not keyword_set col1d  then col1d   0       if keyword_set sty1d  then BEGIN  if we want to make bars          IF strlowcase strtrim sty1d  EQ  bar  then begin              y range    y range 0 y range 1 y range 0 05 y range 1               bar_plot  yy  background    d n_colors 1   not very nice when xgridstyle 2  same if   xticklen 0 5  not very nice in the middle       so we draw the top axis by hand using axis           if n_elements ex  NE 0 then BEGIN    To have a black frame             if  where tag_names ex  EQ  COLOR 0  NE  1 then ex COLOR   0          ENDIF          plot   0   0   nodata   noerase                xstyle   1 8 1 keyword_set exchange_xy                 ystyle   1 8 keyword_set exchange_xy  _extra   ex   call axis for the missing axis           if n_elements ex  NE 0 then BEGIN    force tickname to blank array             if  where tag_names ex  EQ  YTICKNAME 0  NE  1 AND keyword_set exchange_xy  then ex YTICKNAME   replicate    n_elements ex YTICKNAME              if  where tag_names ex  EQ  XTICKNAME 0  NE  1 AND NOT keyword_set exchange_xy  then ex XTICKNAME   replicate    n_elements ex XTICKNAME           ENDIF          if keyword_set exchange_xy  then  axis  yaxis   1  ystyle   1                yticklen   0  ytickname   replicate     y ticks 1  _extra   ex            ELSE axis  xaxis   1  xstyle   1  xticklen   0                xtickname   replicate     x ticks 1  _extra   ex        ENDIF ELSE oplot  xx  yy  color   col1d  linestyle   sty1d  thick   2  _extra   ex    endif fini:     we reput time axis in IDL julian days and not in julian days count from tempsmin       if type EQ  xt  then BEGIN         y range y range tempsmin         y tickv y tickv tempsmin    ENDIF ELSE BEGIN         x range x range tempsmin        x tickv x tickv tempsmin    ENDELSE   We do a false plot to these values are considerated    plot   0   0   nodata   noerase  xstyle   5  ystyle   5          title     subtitle     ytitle     xtitle           3rd part: possible print        terminedessin  _extra   ex    if keyword_set savedbox  THEN restoreboxparam   boxparam4pltt dat       if n_elements key_performance  NE 0 then       IF key_performance EQ 1 THEN print   temps pltt  systime 1 tempsun           return end  "); 
    260 a[258] = new Array("./ToBeReviewed/PLOTS/DESSINE/pltv.html", "pltv.pro", "", "       file_comments   Draw 2d plots with TV procedure      categories find a file   graphic      param DATA  in required     The field we want to display can be:      1  an array  If the array is not a 2D array  its mean along         the z and t direction will be automatically performed          as it is done in plt       2  a structure respecting all criterions specified by         litchamp pro  cf  IDL  xhelp litchamp       param MIN  in optional default min of DATA  on non masked points        param MAX  in optional default max of DATA  on non masked points        keyword BOTTOM  default 0    The lowest color index of the colors to be used      keyword BOXZOOM    Vector indicating the geographic zone on which we want to cut the map      If BOXZOOM has :   1 element : The extraction is made on  lon1  lon2  lat1  lat2  0 boxzoom 0    2 elements: The extraction is made on  lon1  lon2  lat1  lat2  boxzoom 0 boxzoom 1    4 elements: The extraction is made on  Boxzoom  0  max gdept  gdepw    5 elements: The extraction is made on  Boxzoom 0:3  0  Boxzoom 4    6 elements: The extraction is made on Boxzoom     Where lon1  lon2  lat1  lat2 are global variables defined at the last domdef       keyword C_NAN  default d n_colors  1 e6  the test to find the masked value is ge   abs mask 10  This is necessary to avoid the rounding errors      keyword NCOLORS  default d n_colors  tvplus  dist 100       history   Aug 2006: Sebastien Masson  smasson lodyc jussieu fr       version    Id: pltv pro 181 2006 09 15 08:24:36Z smasson          PRO pltv  data  min  max  BOTTOM   bottom  BOXZOOM   boxzoom               C_MASK   c_mask  C_NAN   c_nan  MININ   minin  MAXIN   maxin               MASKVAL   maskval  NCOLORS   ncolors  NOINTERP   nointerp               _EXTRA   ex     compile_opt idl2  strictarrsubs      cm_general   for key_performance     tempsun   systime 1             for key_performance       I2  Reading of the field and checkup      IF n_elements minin  NE 0 THEN min   minin    IF n_elements maxin  NE 0 THEN max   maxin   IF size data   type  NE 8 THEN z2d   reform float data  ELSE z2d   data   IF size z2d   n_dimensions  NE 2 then BEGIN     if keyword_set boxzoom  then BEGIN       savedbox   1b       saveboxparam   boxparam4pltv dat      ENDIF     z2d   checkfield temporary z2d   plt  TYPE    xy  direc   direc  BOXZOOM   boxzoom       if z2d 0  EQ  1 then BEGIN        IF keyword_set savedbox  THEN restoreboxparam   boxparam4pltv dat        return     ENDIF   ENDIF   dtasize   size z2d   dimensions      def of ncolmax  bottom  topcol et ncolors     ncolmax    d n_colors  temporary z2d   c_nan  c_mask    ncolmax   1  ELSE cmask    ncolmax  1      z2d maskind    cmask   ENDIF    z2d   round temporary z2d     use byte type to save memory   z2d   byte temporary z2d            if NOT keyword_set overplot  then reinitplt   z   invert   placedessin   plt  posplot  posbar  _extra   ex     3  Drawing       xsize    p position 2     p position 0     ysize    p position 3     p position 1     IF  d name EQ  X  THEN BEGIN       xsize   ceil xsize    d x_size       ysize   ceil ysize    d y_size       z2d   congrid z2d  xsize  ysize     ENDIF        tv  z2d   p position 0   p position 1             xsize   xsize  ysize   ysize             normal  _EXTRA   ex       caption   display of these       axe   pltv  dtasize  _EXTRA   ex    legende  truemin  truemax   plt  DIREC   direc                 INTERVALLE   float max min topcol bottom                  _extra   ex    plot   0   0   noerase   nodata  xstyle   1  ystyle   1     IF keyword_set masked  THEN tracemask  msk  indgen dtasize 0  indgen dtasize 1      color bar      barrecouleur  0  min   max  10  bottom   bottom  position   posbar  ncolors    topcol bottom 1  _extra   ex   4  End of drawing     terminedessin  _extra ex      if keyword_set savedbox  THEN restoreboxparam   boxparam4pltv dat    if keyword_set key_performance  NE 0 THEN print   time pltv  systime 1 tempsun       return end"); 
    261 a[259] = new Array("./ToBeReviewed/PLOTS/DESSINE/pltz.html", "pltz.pro", "", "             file_comments    Trace vertical graphs       categories    Graphics      param TAB    The field whose we want to make a vertical cut can be 2 kind of thing:           1  An 2d or 3d array             If the field is 2d  indicate  with the keyword BOXZOOM  geographic delineations of the boxzoom             If the field is 3d  we extract the section on we average possibly before to do the plot            2   a structure respecting all criterions specified by litchamp pro              See IDL  xhelp litchamp  The array contained in the structure must be 2 or 3d  See case 1      ces arguments ne sont pas obligatoires:      MAX: valeur maximum que l on veut prendre en compte dans le trace   des contours  Par defaut on prend le max de tab1  sur les pts mer     MIN: valeur minimum que l on veut prendre en compte dans le trace   des contours  Par defaut on prend le min de tab1  sur les pts mer       keyword BOXZOOM    Vector indicating the geographic zone on which we want to cut the map      If BOXZOOM has :   1 element : The extraction is made on  lon1  lon2  lat1  lat2  0 boxzoom 0    2 elements: The extraction is made on  lon1  lon2  lat1  lat2  boxzoom 0 boxzoom 1    4 elements: The extraction is made on  Boxzoom  0  max gdept  gdepw    5 elements: The extraction is made on  Boxzoom 0:3  0  Boxzoom 4    6 elements: The extraction is made on Boxzoom     Where lon1  lon2 lat1 lat2 are global variables defined at the last domdef       keyword CONTINTERVALLE    When CONTOUR is activated  it is the value between 2 isolines    traced by a trait  So it can be different from the one specified by INTERVALLE which     in this case  does not control colored isolines in color anymore  If there is noone    specified min  we choose a contour min which goes well with the specified interval     If this keyword is not specified  we trace 20 isolines from the min to the max        keyword CONTLABEL  type integer    When CONTOUR is activated  if n   is different of 0  choose the label type corresponding to n cases for    the traced by a traitisolines  To specify the type of label of the    colored contour  use LABEL      keyword CONTMAX  default max of the keyword CONTOUR  on ocean points    When CONTOUR is activated  max value we want to consider in the isoline    traced by a trait s line       keyword CONTMIN  default min of the keyword CONTOUR  on ocean points    When CONTOUR is activated  min value we want to consider in the isoline    traced by a trait s line        keyword CONTNLEVEL  default 20    When  CONTOUR is activated  it is the number of contours   traced by a trait for drawing  active if   CONTLABEL 0       keyword CONTOUR    If we want to trace contours of a different field than the one    whose we have the colored drawing  by example E P in color and QSR in contours     It must be a field respecting same characteristics than the argument number one of plt       keyword ENDPOINTS    keyword specifying that we want to make a vertical cut in diagonal  Then coordinated of extremities    of these one are defined by the 4 elements of the vector ENDPOINTS:  x1 y1 x2 y2  which are    coordinates        keyword INTERVALLE    Value of an internal between to isoline  If there is none specified min     we choose a min contour which goes well with the specified interval  If this keyword is not    specified  we trace 20 isoline from the min to the max  Comment: When CONTOUR is activated     INTERVALLE only specify the interval between 2 colored isoline  To specify the interval    between 2 isolines traced by a trait  use CONTINTERVALLE       keyword INV    Invert the color vector used to color the graph                   without use the black  the white and the used palette       keyword ZRATIO  default 2 3    When the drawing has a zoomed part  it is the size rapport between the zoomed part     hz  zoom height  and the whole drawing  ht  total height       keyword LABEL  default 0 type integer    It choose the label s type corresponding to cases in label pro    Comment: When CONTOUR is activated  it only specify the label s type for colored isolines     For these one traced by a trait  use CONTLABEL        keyword MAXIN    to specify the max value we want to plot with a keyword instead of with the   input parameter max  If max is defined by both  parameter and keyword  the   keyword is retained       keyword MININ    to specify the min value we want to plot with a keyword instead of with the   input parameter min  If min is defined by both  parameter and keyword  the   keyword is retained       keyword NLEVEL  default 20    Number of contour to draw by default  20  active if   LABEL 0 or is not specified        keyword NOTRI    To force not to use the triangulation  Beware  in this case  the    drawing only works if the grid is undeformed  It means that each point of a longitude    give one latitude and each point of a latitude give one longitude  except if we use    the keyword CELL_FILL 2     Comment: if the field contain points  values f_nan  then we even do a triangulation       keyword OVERPLOT    To make a plot over an other one     Comment: Contrarily to the use of CONTOUR or VECTEUR  the use of this keyword    does not the caption and or the color bar       keyword SIN    Activate this keyword if we want the x axis to be traced in sinus of the    latitude when we make a drawing f y       keyword STRICTFILL    Activate this keyword to that the filling of contours be    precisely done between the min and the max specified letting values inferior at the    specified min and values superior at the specified max in white       keyword STYLE  default style 0    Contour s style to adopt to draw isolines      keyword WDEPTH    To specify that the field is at W depth instead of T    depth  automatically activated if vargrid eq  W       keyword XZ   Force to make a cut following xz      keyword YZ   Force to make a cut following yz      keyword ZOOM   default 200m or max depth if it is inferior at 200m    Depth where i can make our maximum zoom       uses   common pro      history    Sebastien Masson  smasson lodyc jussieu fr    7 1999   Sebastien Masson 08 02 2000 checkfield and   notri keyword       version    Id: pltz pro 172 2006 09 11 07:11:26Z smasson        todo seb L 20   26  L 215   221           pro pltz  tab  giventype  givenmin  givenmax  BOXZOOM   boxzoom  CONTOUR   contour               ENDPOINTS   endpoints  INTERVALLE   intervalle  INV   inv  ZRATIO   zratio               CONTINTERVALLE   contintervalle  LABEL   label  CONTLABEL   contlabel               STYLE   style  CONTMAX   contmax  SIN   sin  TYPEIN   typein               CONTMIN   contmin  NLEVEL   nlevel  CONTNLEVEL   contnlevel               NOTRI   notri  USETRI   usetri  FILLXDIR   fillxdir               ZOOM   zoom  XZ   xz  YZ   yz  MININ   minin  MAXIN   maxin               STRICTFILL   strictfill  OVERPLOT   overplot  MASKFILL   maskfill               WDEPTH   wdepth  REALSECTION   realsection               _EXTRA   ex     include common     compile_opt idl2  strictarrsubs    cm_4mesh  cm_4data  cm_4ps   IF NOT keyword_set key_forgetold  THEN BEGIN  updatenew  updatekwd   ENDIF     tempsun   systime 1             For key_performance       1st part: initialization small calculations      Comment: we do not reinitializate when we call back plt in loop to use contour    if n_elements contour  ne 4 AND NOT keyword_set overplot  then reinitplt     if n_elements contour  ne 4 THEN saveboxparam   boxparam4pltz dat       Reading of the field      if n_elements giventype  NE 0 then type   giventype   if n_elements givenmin  NE 0 then min   givenmin   if n_elements givenmax  NE 0 then max   givenmax   if n_elements minin  NE 0 then min   minin   if n_elements maxin  NE 0 then max   maxin   if n_elements realsection  EQ 0 then realsection   1   IF n_elements usetri  EQ 0 THEN BEGIN     IF n_elements notri  NE 0 THEN usetri   2 notri ELSE usetri   1   ENDIF   no need of triangulation   IF usetri EQ 1 AND keyword_set realsection  THEN usetri   0   did we specify the type     if keyword_set typein  then BEGIN      if size type   type  NE 7 AND size type   type  NE 0 then begin       if n_elements min  NE 0 then max   min       min   type     endif     type   typein   ENDIF      checktypeminmax   pltz  TYPE   type  MIN   min  MAX   max         XZ   xz  YZ   yz  ENDPOINTS   endpoints  _extra   ex     if keyword_set endpoints  then begin     section  tab  z2d  glam  gphi  ENDPOINTS   endpoints  TYPE   type          BOXZOOM   boxzoom  DIREC   direc  WDEPTH   wdepth  _extra   ex     if z2d 0  EQ  1 AND n_elements contour  ne 4 then BEGIN        restoreboxparam   boxparam4pltz dat        return     ENDIF     nx   n_elements glam       ny   nx     if strupcase vargrid  EQ  W  then begin       gdep   gdepw firstzw:lastzw        nz   nzw     ENDIF ELSE BEGIN       gdep   gdept firstzt:lastzt        nz   nzt     ENDELSE     mask   z2d LE valmask 10    ENDIF ELSE BEGIN     z2d   checkfield tab   pltz  TYPE   type  BOXZOOM   boxzoom                          DIREC   direc  WDEPTH   wdepth  _extra   ex      if z2d 0  EQ  1 AND n_elements contour  ne 4 then BEGIN        restoreboxparam   boxparam4pltz dat        return     ENDIF     IF realsection EQ 1 THEN grille  mask  glam  gphi  gdep  nx  ny  nz  type   type  WDEPTH   wdepth       ELSE grille  mask  glam  gphi  gdep  nx  ny  nz  WDEPTH   wdepth   ENDELSE   IF size gdep   n_dimensions  EQ 2 THEN usetri   2     profmax    y range 0    profmin    y range 1    if not keyword_set zoom  then zoom   200   zoom   zoom 0    IF zoom LT profmin THEN zoom   profmax   if zoom GE vert2 then zoom   profmax   construction of the mask and of the axis   axis4pltz  type  mask  glam  gphi  gdep  XXAXIS   xxaxis  ZZAXIS   zzaxis  SIN   sin  ZRATIO   zratio  ZOOM   zoom  PROFMAX   profmax  PROFMIN   profmin  _extra   ex   to draw from bottom to top  avoid using cell_fill    z2d   reverse z2d  2      Determination of the mi:min and of the ma:max of z2d in the same way    as max: max and min: min for the drawing      nan   total finite z2d   nan   z2d    max   if n_elements maskfill  NE 0 then BEGIN     z2d   z2d mask masknan     if maskfill NE 0 then z2d   temporary z2d    maskfill 1b mask masknan    ENDIF     check the mask and the triangulation according to the grid type and    nan values  find the coordinates of the mask        if  where mask EQ 0 0  EQ  1 AND NOT keyword_set nan  then notri   1     if keyword_set notri  then trifield    1       ELSE trifield   triangule mask basic    if  usetri GE 1 AND  vargrid EQ  T  OR vargrid EQ  W        OR  usetri EQ 2 AND  vargrid NE  T  AND vargrid NE  W  THEN       trifield   triangule mask   basic      IF NOT keyword_set endpoints   THEN BEGIN     if keyword_set nan  then trinan   triangule masknan   basic  coinmonte   coinmontenan  coindescend   coindescendnan      maskorg   mask     decoupeterre  mask  glammsk  gphimsk  gdepmsk  type   type  WDEPTH   wdepth  REALSECTION   realsection     axis4pltz  type  mask  glammsk  gphimsk  gdepmsk  XXAXIS   xmask  ZZAXIS   zmask  SIN   sin  ZRATIO   zratio  ZOOM   zoom  PROFMAX   profmax  PROFMIN   profmin  _extra   ex   ENDIF ELSE BEGIN     xmask   xxaxis     zmask   zzaxis   ENDELSE      if  usetri GE 1 AND  vargrid NE  T  AND vargrid NE  W  THEN BEGIN      IF keyword_set realsection  THEN trimsk   triangule mask   basic        ELSE trimsk   triangule mask   basic  coinmonte   coinmontemask                                 coindescend   coindescendmask    ENDIF          dessin en lui meme     IF n_elements romszinfos  EQ 1 THEN BEGIN   add one line at bottom to have nicer plot  colors go until the ocean bottom      IF n_elements romszinfos h  NE 1 THEN BEGIN       CASE type OF          xz :romsh   moyenne romszinfos h   y           yz :romsh   moyenne romszinfos h   x        ENDCASE       IF nzt EQ jpk THEN BEGIN         z2d    z2d   z2d  jpk 1          zzaxis    zzaxis   romsh        ENDIF     ENDIF   ENDIF   pltbase  z2d  xxaxis  zzaxis  mask  xmask  zmask         level_z2d  colnumb  overplot   overplot         contour   contour  trichamp   trifield  trimsk   trimsk          c_linestyle   linestyle         c_labels   1 indgen n_elements level_z2d  MOD 2          c_thick   thick  unsur2   unsur2         maskorg   maskorg  masknan   masknan  trinan   trinan         coinmontenan   coinmontenan  coindescendnan   coindescendnan         coinmontemask   coinmontemask  coindescendmask   coindescendmask         REALSECTION   realsection  USETRI   usetri  _extra   ex     recall of pltz in loop when contour is activated     if n_elements contour  eq 4 then BEGIN   It is the second time I pass in pltt     contour    mietma: mi  ma  unit:varunit  inter:intervalle    I send back the min  the max and the unity     return   endif   if keyword_set contour  THEN BEGIN      pourlegende    1  1  1  1      oldattributs   saveatt      oldcolnumb   colnumb     pltz  contour  contmin  contmax  CONTOUR   pourlegende  ZRATIO   zratio           INTERVALLE   contintervalle  LABEL   contlabel  STYLE   style   noerase            NLEVEL   contnlevel  ZOOM   zoom  BOXZOOM   boxzoom  ENDPOINTS   endpoints           STRICTFILL   strictfill  REALSECTION   realsection  MASKFILL   maskfill           USETRI   usetri  WDEPTH   wdepth  _extra   ex     restoreatt  oldattributs     colnumb   oldcolnumb   ENDIF       3rd part: drawing of the frame  caption  colorbar      if keyword_set overplot  then BEGIN       y range     zoom  profmin    We get back on physic coordinates     plot   0   0   nodata   noerase  title     subtitle     xstyle   5  ystyle   5     GOTO  fini   endif     Caption   dysplay of them     legende  mi  ma  type  CONTOUR   pourlegende  INTERVALLE   intervalle  DIREC   direc  endpoints   endpoints  _EXTRA   ex   if type eq  yz  then xaxe    lataxe  else xaxe    lonaxe    if keyword_set sin  OR NOT key_onearth then xaxe       Frame applied by default   plot   xxaxis 0  xxaxis n_elements xxaxis 1   zratio   zratio   noerase         xstyle   1 4 keyword_set endpoints  AND  type EQ  xz  AND lat1 NE lat2  OR  type EQ  yz  AND lon1 NE lon2          xtickformat   xaxe  _extra   ex   Add of an axis in the case of we use endpoints   if keyword_set endpoints  then addaxe  endpoints  type  posfenetre  _EXTRA   ex     Y axis in 1 or 2 part     if n_elements ex  NE 0 then BEGIN    To do not put title anymore     if  where tag_names ex  EQ  TITLE 0  NE  1 then ex TITLE         To do not put subtitle anymore     if  where tag_names ex  EQ  SUBTITLE 0  NE  1 then ex SUBTITLE         To have just one ytitle     if  where tag_names ex  EQ  YTITLE 0  NE  1 then BEGIN        ytitle   ex YTITLE       ex YTITLE           endif   ENDIF   htotal   posfenetre 3 posfenetre 1    hzoom   1 zratio htotal   if zoom LT profmax then       plot   0   0   nodata   noerase  ystyle   1  yrange    profmax  zoom 0 001          position   posfenetre 0  0  0   hzoom  _extra   ex  title     subtitle     ytitle          y range     zoom  profmin      We get back in physic coordinates    plot   0   0   nodata   noerase  ystyle   1  _extra   ex         title     subtitle     ytitle     position   posfenetre 0  htotal hzoom  0  0      to write the ytitle      if  d name EQ  PS  then       xs    max page_size  min   mi 1 key_portrait    mi key_portrait d x_px_cm     ELSE xs    d x_size   if n_elements ytitle  NE 0 then  y title   ytitle   charsize   chkstru ex   ycharsize   extract    if charsize EQ  1 then charsize    p charsize   IF chkstru ex   charsize  THEN ex charsize   charsize   if chkstru ex   ytitle   extract  NE   then       decalage   string format    e10 3  profmax    decalage   float strmid decalage  strpos decalage   e 1    posy   posfenetre 1 1 htotal 2   posx   posfenetre 0 decalage 3 d x_ch_size charsize xs   xyouts  posx  posy   y title   normal  orientation   90  color   0  ALIGNMENT    5  charsize   charsize  _extra   ex      colorbar     colnumb   colnumb 0:ncontour 1 keyword_set strictfill    barrecouleur  colnumb  min   max   ncontour keyword_set strictfill 2                     position   posbar  _extra   ex       4th part: possible print     fini:   terminedessin  _extra   ex         sortie:   restoreboxparam   boxparam4pltz dat      if keyword_set key_performance  NE 0 THEN print   temps pltz  systime 1 tempsun    return end   "); 
    262 a[260] = new Array("./ToBeReviewed/PLOTS/DESSINE/sbar_plot.html", "sbar_plot.pro", "", "             file_comments    Same thing that bar_plot but compatible with the whole environment  common pro included       categories Graphics      keyword COLORS  type vector    A vector  the same size as VALUES  containing the color index   to be used for each bar   If not specified  the colors are   selected based on spacing the color indices as widely as   possible within the available colors  specified by D N_COLORS       keyword COLORS  type integer    I gives color of all colorbars   contrarily to colors    which is a vector giving the color of each colorbar       keyword NOREINITPLT   We active it if we do not want environment variables  p   x   y   z    to be reinitializated by the procedure reinitplt      keyword _EXTRA   used to pass your keyword      uses   common pro      restrictions    If NOREINITPLT is not activated  all environment    variables  p   x   y   z are reinitializted by the procedure reinitplt      examples        IDL  sbar_plot  indgen 10 small    2 2 2 rempli        IDL  sbar_plot  indgen 10 small    2 2 3 noerase        IDL   ps      history   Sebastien Masson  smasson lodyc jussieu fr                         10 10 1999      version    Id: sbar_plot pro 163 2006 08 29 12:59:46Z navarro              PRO sbar_plot  Values  COLORS   colors  NOREINITPLT   noreinitplt  _extra   ex      compile_opt idl2  strictarrsubs    common   1  I reinitialize the graphic environment  variables  x   y et  p :     if NOT keyword_set NOREINITPLT  then reinitplt  _extra   ex    2  I place the drawing on the screen like on the postscript     IF chkstru ex   overplot EQ 0 THEN placedessin   autre  _extra   ex   3  Drawing     if n_elements COLORS  NE 0 then BEGIN       if n_elements COLORS  EQ n_elements Values  then col   colors          ELSE col   replicate colors 0  n_elements Values     ENDIF ELSE col   congrid indgen d n_colors   256  n_elements Values       bar_plot  Values  background    p background  colors   col                  xstyle   1  ystyle   1  _extra   ex   4  End of drawing     terminedessin  _extra ex      return end"); 
    263 a[261] = new Array("./ToBeReviewed/PLOTS/DESSINE/scontour.html", "scontour.pro", "", "             File_comments   Same thing that contour but compatible with the whole environment  common pro included       categories    Graphics      keyword NOREINITPLT   We active it if we do not want environment variables  p   x   y   z    to be reinitilalizated by the procedure reinitplt       keyword _EXTRA   used to pass your keywords      uses   common pro      examples        IDL  z   dist 100          IDL  scontour  z  nlevels 10 small 1 2 1 xstyle 1 ystyle 1        IDL   ps      history Sebastien Masson  smasson lodyc jussieu fr                         10 10 1999       version    Id: scontour pro 163 2006 08 29 12:59:46Z navarro             PRO scontour  x  y  z  NOREINITPLT   noreinitplt  _EXTRA   ex     compile_opt idl2  strictarrsubs    common   1  I reinitializate the graphic environment  variables  x   y et  p :    if NOT keyword_set NOREINITPLT  then reinitplt  _extra   ex    2  i put the drawing on the screen like on the postcript    if ex contains norease and c_orientation keywords we force ex noerase   0   IF chkstru ex   overplot  EQ 0 THEN placedessin   autre  _extra   ex   fiddle when noerase is used with c_orentation    call contour with  nodata to get the graphic environment  then force   noerase   0 and overplot   1   IF size ex   type  EQ 8 THEN BEGIN   check if noerase is used with c_orentation     alltags   strlowcase tag_names ex      dummy   where alltags EQ  noerase  count1      dummy   where alltags EQ  c_orientation  count2      IF count1 count2 NE 0 THEN BEGIN        case n_params  OF         1:contour  x   nodata  _EXTRA   ex         2:contour  x  y   nodata  _EXTRA   ex         3:contour  x  y  z   nodata  _EXTRA   ex       endcase       ex noerase   0       ex   get_extra overplot  _extra   ex        noerase_orientation   1     ENDIF    ENDIF    3  je fais mon joli dessin    case n_params  OF     1:contour  x  xstyle   1  ystyle   1  _EXTRA   ex     2:contour  x  y  xstyle   1  ystyle   1  _EXTRA   ex     3:contour  x  y  z  xstyle   1  ystyle   1  _EXTRA   ex   ENDCASE   fiddle when noerase is used with c_orentation  draw the contour axis   IF keyword_set noerase_orientation   THEN BEGIN     ex noerase   1     ex overplot   0     case n_params  OF       1:contour  x  xstyle   1  ystyle   1   nodata  _EXTRA   ex       2:contour  x  y  xstyle   1  ystyle   1   nodata  _EXTRA   ex       3:contour  x  y  z  xstyle   1  ystyle   1   nodata  _EXTRA   ex     ENDCASE   ENDIF   4  End of drawing   terminedessin  _extra   ex     return end"); 
    264 a[262] = new Array("./ToBeReviewed/PLOTS/DESSINE/splot.html", "splot.pro", "", "            file_comments    Same thing that plot but compatible with the whole environment  common pro included       categories    Graphics      keyword NOREINITPLT   We active it if we do not want environment variables  p   x   y   z    to be reinitilalizated by the procedure reinitplt       keyword _EXTRA   used to pass your keywords      uses   common pro      restrictions    If NOREINITPLT is not activated  all environment    variables  p   x   y   z are reinitializted by the procedure reinitplt      examples        IDL  splot  indgen 10 ystyle 1 small 1 2 1 portrait        IDL  splot   indgen 10 ystyle 1 small 1 2 2 noerase        IDL   ps      history   Sebastien Masson  smasson lodyc jussieu fr                         18 10 1999      version    Id: splot pro 163 2006 08 29 12:59:46Z navarro             PRO splot   x  y  NOREINITPLT   noreinitplt  _EXTRA   ex     compile_opt idl2  strictarrsubs    common   1  I reinitializate the graphic environment  les variables  x   y et  p :     if NOT keyword_set NOREINITPLT  then reinitplt  _extra   ex    2  i put the drawing on the screen like on the postcript     placedessin   autre  _extra   ex   3  Drawing    if n_elements y  EQ 0 then plot   x  xstyle   1  ystyle   1  _EXTRA   ex      ELSE plot   x  y  xstyle   1  ystyle   1  _EXTRA   ex   4  End of drawing     terminedessin  _extra ex       return end"); 
    265 a[263] = new Array("./ToBeReviewed/PLOTS/DESSINE/tvplus.html", "tvplus.pro", "", "             file_comments   Enhanced version of tvscl      categories quick exploration of 2D arrays      INPUTS:       param Z2D  in required    2D array to visualize      param CELLSIZE  in optional    This is the size  in pixel  of the square   representing 1 array element  By default  this size is computed   automatically in order that the size of the plotting window do   not exceed the screen size  If the user specify a large value   of cellsize that forces tvplus to create a window larger than   the screen  a  scrolling window  will be displayed instead of a   regular window  Unfortunately the nice functionnalities of tvplus   are not coded for  scrolling window  case       keyword BOTTOM  default 1    The lowest color index of the colors to be used      keyword C_NAN  default d n_colors  1 e6  the test to find the masked value is ge   abs mask 10  This is necessary to avoid the rounding errors      keyword MIN   Scalar used to specify the min value to be drawn       keyword MAX   Scalar used to specify the max value to be drawn       keyword NCOLORS  default d n_colors  tvplus  dist 100       history   Sebastien Masson  smasson lodyc jussieu fr                          18 12 98   Aug 2005: quick cleaning   english      version    Id: tvplus pro 163 2006 08 29 12:59:46Z navarro             PRO tvplus  z2d  cellsize  BOTTOM   bottom  C_MASK   c_mask  C_NAN   c_nan  WINDOW   window                 MIN   min  MAX   max  MASK   mask  OFFSET   offset  NOUSEINFOS   NOUSEINFOS                 NCOLORS   ncolors  NOINTERP   nointerp  _EXTRA   ex       compile_opt idl2  strictarrsubs     IF n_elements z2d  EQ 0 THEN return   arr   reform float z2d      check the size of the input array      if  size arr 0  NE 2 then begin     ras   report Input array must have only 2 dimensions and not   strtrim size arr   n_dimensions  1      return   endif     def of ncolmax  bottom  topcol et ncolors     ncolmax    d n_colors  arr     truemin   min   ENDIF ELSE truemin   min arr    if n_elements max  NE 0 then BEGIN      arr   arr  floor x cellsize   floor y cellsize   floor x cellsize   floor y cellsize   floor x2 cellsize   floor y2 cellsize     size arr 2 cellsize 1          x     x  x2    x    x sort x          y     y  y2    y    y sort y          IF keyword_set OFFSET  THEN offset    x 0  y 0 offset ELSE offset    x 0  y 0          tvplus  z2d x 0 :x 1  y 0 :y 1    WINDOW   window  MIN   min  MAX   max                     MASK   mask  C_MASK   c_mask  C_NAN   c_nan   NOUSEINFOS  OFFSET   OFFSET                     NCOLORS   ncolors  NOINTERP   nointerp  BOTTOM   bottom  _EXTRA   ex         return       END       ELSE:     endcase   ENDWHILE      x   xenvsauve    y   yenvsauve    p   penvsauve    x range   1 0  nx cellsize 5 offset 0     y range   1 0  ny cellsize 5 offset 1      return end"); 
    266 a[264] = new Array("./ToBeReviewed/PLOTS/DIVERS/addaxe.html", "addaxe.pro", "", "             file_comments   Add an axis when we do an oblique section in pltz  pltt   or plt1d      categories   Graphics      param ENDPOINTS  in required    Coordinate of extremities of the section       param TYPE  in required type string    A string of two characters specifying the type of plot we do      param POSFENETRE  in required type vector    The vector  p position corresponding to the frame position of    the drawing part of the plot       uses   common pro      history   Sebastien Masson  smasson lodyc jussieu fr       version    Id: addaxe pro 163 2006 08 29 12:59:46Z navarro             PRO addaxe  endpoints  type  posfenetre  _EXTRA   ex     compile_opt idl2  strictarrsubs    common      IF strpos type   x  NE  1 THEN BEGIN       IF endpoints 1  EQ endpoints 3  THEN return       IF key_onearth THEN BEGIN          formeaxe0    lonaxe          formeaxe1    lataxe          titreaxe    latitude        ENDIF ELSE BEGIN          formeaxe0             formeaxe1             titreaxe    j index        ENDELSE       range    endpoints 1  endpoints 3        if endpoints 2  LT endpoints 0  THEN range   reverse range     ENDIF ELSE BEGIN       IF endpoints 0  EQ endpoints 2  THEN return       IF key_onearth THEN BEGIN          formeaxe0    lataxe          formeaxe1    lonaxe          titreaxe    longitude        ENDIF ELSE BEGIN          formeaxe0             formeaxe1             titreaxe    i index        ENDELSE       range    endpoints 0  endpoints 2        if endpoints 3  LT endpoints 1  THEN range   reverse range     ENDELSE    if type EQ  yt  then BEGIN       axis yaxis 0 ytickformat formeaxe0 color 0 ystyle   1  _EXTRA   ex       axis yaxis 1 ytickformat formeaxe1 color 0 ystyle   1 ytitle titreaxe  yrange   range  _EXTRA   ex    ENDIF ELSE BEGIN       axis xaxis 0 xtickformat formeaxe0 color 0 xstyle   1 _EXTRA   ex       axis xaxis 1 xtickformat formeaxe1 color 0 xstyle   1 xtitle titreaxe  xrange   range  _EXTRA   ex    ENDELSE       return end"); 
    267 a[265] = new Array("./ToBeReviewed/PLOTS/DIVERS/autoscale.html", "autoscale.pro", "", "             file_comments    We give a min and a max  and the procedure send back    the good contour interval and labels s value       categories    Graphics      param MIN  in required    A reel number specifying above what value we want to trace a contour      param MAX  in required    A reel number specifying below what value we want to trace a contour      param CI   out type real    It is a reel number giving the contour interval  Use it in CONTOUR with the keyword LEVEL       restrictions   CI is a multiple of the unity in unity log of 10    It force the number of contour to be even       history   G  Roullet   aout 99  gr lodyc jussieu fr       version    Id: autoscale pro 163 2006 08 29 12:59:46Z navarro             PRO autoscale  min  max  ci      Estimation of a first CI  notice the presence of the floor  Inferior round    This CI is a multiple of the unity in unity log of 10        compile_opt idl2  strictarrsubs       ci    max min 20      ci   10 floor alog10 ci       n   0     ci0   ci       coef    2  2 5  5  10      We test differents CI  contour intervals  i e  1  2  2 5  5 and 10   until the number of contour is inferior to 30        WHILE ceil max min ci  GE 30 DO BEGIN            ci   ci0 coef n            n   n 1     ENDWHILE       min   floor min ci 2 ci 2     max   ceil max ci 2 ci 2          nlevels   round max min ci            We force the number of contour to be even       IF nlevels MOD 2 EQ 1 THEN BEGIN            nlevels   nlevels 1           max   max ci     END    END     "); 
    268 a[266] = new Array("./ToBeReviewed/PLOTS/DIVERS/axis4pltz.html", "axis4pltz.pro", "", "             file_comments   compute the mask and the axis for a vertical section      param MASK  in required     3d mask              param GLAM  in required    2d longitude        param GPHI  in required    2d latitude      param Z  in required    1d depth      keyword XXAXIS    to get the xaxis we need to use in pltbase            keyword ZZAXIS    to get the yaxis we need to use in pltbase      keyword SIN    Activate this keyword if we want the x axis to be traced in sinus of the    latitude when we make a drawing f y       keyword ZRATIO  default 2 3    When the drawing has a zoomed part  it is the size rapport between the zoomed part     hz  zoom height  and the whole drawing  ht  total height       keyword _EXTRA   used to pass your keywords       Others: see pltz         history   Sebastien Masson  smasson lodyc jussieu fr                         June 24  2002      version    Id: axis4pltz pro 172 2006 09 11 07:11:26Z smasson              PRO axis4pltz  type  mask  glam  gphi  z  XXAXIS   xxaxis  ZZAXIS   zzaxis  SIN   sin  ZRATIO   zratio  ZOOM   zoom  PROFMAX   profmax  PROFMIN   profmin  _extra   ex     include common     compile_opt idl2  strictarrsubs    cm_4mesh   IF NOT keyword_set key_forgetold  THEN BEGIN  updatekwd   ENDIF        define the mask used for this section     if mask 0  NE  1 AND  size mask 0  NE 2 then begin     if type EQ  xz  then mask   total mask  2    1       ELSE mask   total mask  1    1   endif     define xxaxis and yyaxis the axis used for this section     nx    size glam 1    CASE  size gphi 0  OF     1:ny    size gphi 1      2:ny    size gphi 2    ENDCASE   CASE  size z 0  OF     1:nz    size z 1      2:nz    size z 2    ENDCASE     if type eq  yz  then BEGIN      IF  size gphi 0  EQ 1 then xxaxis   gphi ELSE BEGIN        IF keyword_set key_irregular  THEN BEGIN          cln    where gphi EQ max gphi 0          xxaxis   reform gphi cln MOD nx          ENDIF ELSE xxaxis   reform gphi 0        ENDELSE     if keyword_set sin  then xxaxis   sin pi 180 xxaxis    ENDIF ELSE BEGIN     xxaxis   glam  0    ENDELSE    zzaxis   z     We project the z axis in  0 1      if not keyword_set zratio  then zratio   2 3   if zoom ge profmax then zratio   1    if zoom LT profmax then begin     mp   projsegment profmin  zoom   0  zratio   mp      small   where zzaxis LE zoom      IF small 0  NE  1 THEN zzaxis small    mp 0 zzaxis small mp 1      mp   projsegment zoom  profmax   zratio  1   mp      big   where zzaxis GE zoom      IF big 0  NE  1 THEN zzaxis big    mp 0 zzaxis big mp 1    ENDIF ELSE BEGIN     mp   projsegment profmin  profmax   0  1   mp      zzaxis   mp 0 zzaxis mp 1    ENDELSE    to draw from bottom to top  avoid using cell_fill    CASE size zzaxis   n_dimensions  OF     1:zzaxis   reverse zzaxis       2:zzaxis   reverse zzaxis  2     ENDCASE   if mask 0  NE  1 then mask   reverse mask  2     return end"); 
    269 a[267] = new Array("./ToBeReviewed/PLOTS/DIVERS/barrecouleur.html", "barrecouleur.pro", "", "             file_comments   Overlayeur of colorbar      categories   Utilities      param COLNUMB        param CLBINF        param CLBSUP        param CLBDIV        keyword NOCOLORBAR         keyword CB_TITLE         keyword NOFILL         keyword COLOR_c         keyword MIN   Scalar used to specify the min value to be drawn       keyword MAX   Scalar used to specify the max value to be drawn       keyword DIVISIONS         keyword CB_SUBTITLE         keyword POST         keyword _EXTRA   Used to pass your keywords      restrictions pass all argument we want thanks to _extra      history   Sebastien Masson  smasson lodyc jussieu fr                          23 12 98      version    Id: barrecouleur pro 163 2006 08 29 12:59:46Z navarro        todo seb: mettre les keyword et les param         PRO barrecouleur  colnumb  clbinf  clbsup  clbdiv                       NOCOLORBAR   nocolorbar  CB_TITLE   cb_title                       NOFILL   nofill  COLOR_c   color_c                       MIN   min  MAX   max  divisions   divisions                       CB_SUBTITLE   cb_subtitle  POST   post  _extra   ex       compile_opt idl2  strictarrsubs    cm_general   IF NOT keyword_set key_forgetold  THEN BEGIN  updatekwd   ENDIF     if keyword_set min  then clbinf   min   if keyword_set max  then clbsup   min   if keyword_set divisions  THEN  clbdiv   divisions   nocolorbar   keyword_set nocolorbar    keyword_set nofill                     keyword_set color_c          def_myuniquetmpdir     IF lmgr demo  EQ 1 THEN BEGIN   if we are in demo mode  we cannot save the parameters in a temporary file   cm_demomode_used        colorbarparam    colnumb:colnumb  clbinf:clbinf                           clbsup:clbsup  clbdiv:clbdiv     ENDIF ELSE BEGIN       save  colnumb  clbinf  clbsup  clbdiv               file   myuniquetmpdir    4colorbar dat     ENDELSE      if keyword_set nocolorbar  then return       ancienx    x    ancieny    y    ancienp    p    reinitplt     x style   1     y style   1        colorbar  cb_color   0  cb_charsize   ancienp charsize            pscolor   keyword_set post  division   clbdiv            min   clbinf  max   clbsup            cb_title   cb_title  discret   colnumb  _extra   ex       x  ancienx     y  ancieny     p  ancienp      return end"); 
    270 a[268] = new Array("./ToBeReviewed/PLOTS/DIVERS/checkfield.html", "checkfield.pro", "", "     file_comments           categories          param TYPE  in required type string    A string of two characters specifying the type of plot we do      param N1  in required type integer    Number of elements in the first dimension      param N2  in required type integer    Number of elements in the second dimension      param NAME  in optional type string    It gives the name of the file to be opened  If NAME   does not contain the separating character of directories   under   unix for example  the file will be looked for in the current directory       returns          restrictions          examples        history         version    Id: checkfield pro 163 2006 08 29 12:59:46Z navarro     FUNCTION err_1d  type  n1  name  n2     compile_opt idl2  strictarrsubs     return  report Error in     type     type plot with a 1D input array:                         the number of elements of the input vector  strtrim n1  1                           is not equal to     name      strtrim n2  1   simple  END        file_comments           categories          param TYPE  in required type string    A string of two characters specifying the type of plot we do      param SZ  in optional default defined by grille pro         param NX  in optional default defined by grille pro         param NY  in optional default defined by grille pro          param NZ          returns          restrictions          examples        history         version    Id: checkfield pro 163 2006 08 29 12:59:46Z navarro     FUNCTION err_2d  type  sz  nx  ny  nz     compile_opt idl2  strictarrsubs      cm_4mesh    cm_4cal   return  report Error in     type     type plot with a 2D input array:                         the array dimensions     tostr sz 1:2      are incompatible                         with the the domain dimensions                          jpi nx  jpj ny  jpk nz  jpt                            strtrim jpi  1        strtrim nx  1                              strtrim jpj  1        strtrim ny  1                              strtrim jpk  1        strtrim nz  1                              strtrim jpt  1       simple  END        file_comments           categories          param TYPE  in required type string    A string of two characters specifying the type of plot we do      param SZ  in optional default defined by grille pro         param NX  in optional default defined by grille pro         param NY  in optional default defined by grille pro          param NZ          returns          restrictions          examples        history         version    Id: checkfield pro 163 2006 08 29 12:59:46Z navarro     FUNCTION err_3d  type  sz  nx  ny  nz     compile_opt idl2  strictarrsubs      cm_4mesh    cm_4cal   return  report Error in     type     type plot with a 3D input array:                         the array dimensions     tostr sz 1:3      are incompatible                         with the the domain dimensions                          jpi nx  jpj ny  jpk nz  jpt                            strtrim jpi  1        strtrim nx  1                              strtrim jpj  1        strtrim ny  1                              strtrim jpk  1        strtrim nz  1                              strtrim jpt  1       simple  END              file_comments   In input of plt  pltz  pltt and plt1d  it check that the field give    a size compatible with the domain and  if needed  average to give us    a 2d array if we make a plot of the type:  xy   xz   xt   yz   yt       zt  or a 1d array if we make a plot of the type:  x   y   z   t       categories   Graphics       param FIELD  in required type field    It respect litchamp pro s criterions  See IDL xhelp litchamp       param PROCEDURE  in required          keyword TYPE        keyword NOQUESTION        keyword BOXZOOM  type vector    Vector indicating the geographic zone on which we want to cut the map      If BOXZOOM has :   1 element : The extraction is made on  lon1  lon2  lat1  lat2  0 boxzoom 0    2 elements: The extraction is made on  lon1  lon2  lat1  lat2  boxzoom 0 boxzoom 1    4 elements: The extraction is made on  Boxzoom  0  max gdept  gdepw    5 elements: The extraction is made on  Boxzoom 0:3  0  Boxzoom 4    6 elements: The extraction is made on Boxzoom     Where lon1  lon2 lat1 lat2 are global variables defined at the last domdef       keyword WDEPTH   to specify that the field is at W depth instead of T    depth  automatically activated if vargrid eq  W        keyword VECTEUR type vetcor    It is a structure composed by 2 elements containing the 2 fields U   and V of values of the zonal and meridian component of the vector of the fields   to draw  These fields can be an array or a structure          For example: vecteur matriceu:lec unsurface matricev:lec vnsurface          Comment: name of elements of vectors are inconsequential          vecteur u:lec unsurface v:lec vnsurface  is also appropriated       keyword _EXTRA   used to pass your keywords      keyword DIREC           uses    common pro      history   Sebastien Masson  smasson lodyc jussieu fr                         08 02 2000      version    Id: checkfield pro 163 2006 08 29 12:59:46Z navarro        todo seb: mettre les param              FUNCTION checkfield  field  procedure  TYPE   type  BOXZOOM   boxzoom  DIREC   direc  NOQUESTION   noquestion  VECTEUR   vecteur  WDEPTH   wdepth  _EXTRA   ex       compile_opt idl2  strictarrsubs     include commons  cm_4mesh  cm_4cal  cm_4data   IF NOT keyword_set key_forgetold  THEN BEGIN  updatenew  updatekwd   ENDIF     I1  Reading of the field     if n_elements field  EQ 0 then return  report field undefined    arr   litchamp field    first check   IF n_elements arr  EQ 1 THEN BEGIN     if arr EQ  1 then         return  report Error: input array    1  Maybe the reading did ont perform well   simple        ELSE return  report Error: input array is a scalar   simple         ENDIF   nan   total finite arr   nan    firstzw 1        lastzw    lastzw 1    firstzt 1        lastzt    lastzt 1     jpk 1        nzt   lastzt   firstzt   1     ENDELSE      updateold   ENDIF   make the automatic definition of type for pltz if type is not specified    IF type EQ  z  AND procedure EQ  pltz  THEN       if  lon2 lon1  gt  lat2 lat1  then type    xz  else type    yz    make the automatic definition of type for pltt if type is not specified    IF type EQ  unkownpltt  AND procedure EQ  pltt  THEN       if  lon2 lon1  gt  lat2 lat1  then type    xt  else type    yt      verification of the input array size and the value of the type     grille   1   1   1   1  nx  ny  nz  firstx  firsty         firstz  lastx  lasty  lastz  WDEPTH   wdepth     basic checks     CASE 1 OF     nx EQ 1: IF strpos type   x  NE  1 THEN return  report Error: impossible to make a     type     type plot with nx   1    simple      ny EQ 1: IF strpos type   y  NE  1 THEN return  report Error: impossible to make a     type     type plot with ny   1    simple      nz EQ 1: IF strpos type   z  NE  1 THEN return  report Error: impossible to make a     type     type plot with nz   1    simple      jpt EQ 1: IF strpos type   t  NE  1 THEN return  report Error: impossible to make a     type     type plot with jpt   1    simple      ELSE:   ENDCASE     is the size of the array compatible with teh domain      arr   fitintobox temporary arr  nx  ny  nz  firstx  firsty         firstz  lastx  lasty  lastz      sz   size arr    case sz 0  of       0:return  arr       1:BEGIN       nele   n_elements arr        case type of          t :if jpt NE nele THEN return  err_1d type  nele   jpt  jpt           x :IF  nx NE nele THEN return  err_1d type  nele    nx   nx           y :IF  ny NE nele THEN return  err_1d type  nele    ny   ny           z :IF  nz NE nele THEN return  err_1d type  nele    nz   nx          ELSE:return  report Error:                                    Impossible to make a  type  plot with a 1D array   simple        ENDCASE     END        2:BEGIN       case type of          x :BEGIN           case 1 of             sz 1  EQ nx AND sz 2  EQ ny:direc    y    xy array             sz 1  EQ nx AND ny EQ 1 AND sz 2  EQ nz:direc    z    x y z array             sz 1  EQ nx AND sz 2  EQ jpt:direc    t    xt array             ELSE:return  err_2d type  sz  nx  ny  nz            endcase         end          y :BEGIN           case 1 of             sz 1  EQ nx AND sz 2  EQ ny:direc    x    xy array             nx EQ 1 AND sz 1  EQ ny AND sz 2  EQ nz:direc    z     x yz array             sz 1  EQ ny AND sz 2  EQ jpt:direc    t    yt array             ELSE:return  err_2d type  sz  nx  ny  nz            endcase         END          z :BEGIN           case 1 of             sz 1  EQ nx AND ny EQ 1 AND sz 2  EQ nz:direc    x    x y z array             nx EQ 1 AND sz 1  EQ ny AND sz 2  EQ nz:direc    y     x yz array             sz 1  EQ nz AND sz 2  EQ jpt:direc    t    zt array             ELSE:return  err_2d type  sz  nx  ny  nz            endcase         END          t :BEGIN           case 1 OF             sz 1  EQ nx AND sz 2  EQ jpt:direc    x    xt array             nx EQ 1 AND sz 1  EQ ny AND sz 2  EQ jpt:direc    y     x yt array             nx EQ 1 AND ny EQ 1 AND sz 1  EQ nz AND sz 2  EQ jpt:direc    z     x y zt array             ELSE:return  err_2d type  sz  nx  ny  nz            ENDCASE         END          xy :IF sz 1  NE nx OR sz 2  ne  ny THEN return  err_2d type  sz  nx  ny  nz    xy array          xz :IF sz 1  NE nx OR sz 2  ne  nz THEN return  err_2d type  sz  nx  ny  nz    xz array          yz :IF sz 1  NE ny OR sz 2  NE  nz THEN return  err_2d type  sz  nx  ny  nz    yz array          xt :IF sz 1  NE nx OR sz 2  NE jpt THEN return  err_2d type  sz  nx  ny  nz    xt array          yt :IF sz 1  NE ny OR sz 2  NE jpt THEN return  err_2d type  sz  nx  ny  nz    yt array          zt :IF sz 1  NE nz OR sz 2  NE jpt THEN return  err_2d type  sz  nx  ny  nz    zt array       ENDCASE     END        3:BEGIN       case type of          x :BEGIN           case 1 of             sz 1  EQ nx AND sz 2  EQ ny AND sz 3  EQ nz:direc    yz    xyz array             sz 1  EQ nx AND ny EQ 1 AND sz 2  EQ nz AND sz 3  EQ jpt:direc    zt    x y zt array             sz 1  EQ nx AND sz 2  EQ ny AND sz 3  EQ jpt:direc    yt    xyt array             ELSE:return  err_3d type  sz  nx  ny  nz            endcase         END          y :BEGIN           case 1 of             sz 1  EQ nx AND sz 2  EQ ny AND sz 3  EQ nz:direc    xz    xyz array             nx EQ 1 AND sz 1  EQ ny AND sz 2  EQ nz AND sz 3  EQ jpt:direc    zt     x yzt array             sz 1  EQ nx AND sz 2  EQ ny AND sz 3  EQ jpt:direc    xt    xyt array             ELSE:return  err_3d type  sz  nx  ny  nz            endcase         END          z :BEGIN           case 1 of             sz 1  EQ nx AND sz 2  EQ ny AND sz 3  EQ nz:direc    xy    xyz array             nx EQ 1 AND sz 1  EQ ny AND sz 2  EQ nz AND sz 3  EQ jpt:direc    yt     x yzt array             sz 1  EQ nx AND ny EQ 1 AND sz 2  EQ nz AND sz 3  EQ jpt:direc    xt    x y zt array             ELSE:return  err_3d type  sz  nx  ny  nz            endcase         END          t :BEGIN           case 1 of             sz 1  EQ nx AND sz 2  EQ ny AND sz 3  EQ jpt:direc    xy    xyt array             nx EQ 1 AND sz 1  EQ ny AND sz 2  EQ nz AND sz 3  EQ jpt:direc    yz     x yzt array             sz 1  EQ nx AND ny EQ 1 AND sz 2  EQ nz AND sz 3  EQ jpt:direc    xz    x y zt array             ELSE:return  err_3d type  sz  nx  ny  nz            endcase         END          xy :BEGIN           case 1 OF             sz 1  EQ nx AND sz 2  EQ ny AND sz 3  EQ  nz:direc    z    xyz array             sz 1  EQ nx AND sz 2  EQ ny AND sz 3  EQ jpt:direc    t    xyt array             ELSE:return  err_3d type  sz  nx  ny  nz            endcase         END          xz :BEGIN           case 1 of             sz 1  EQ nx AND sz 2  EQ ny AND sz 3  EQ  nz:direc    y    xyz array             sz 1  EQ nx AND ny EQ 1 AND sz 2  EQ nz AND sz 3  EQ jpt:direc    t    x y zt             ELSE:return  err_3d type  sz  nx  ny  nz            endcase         END          yz :BEGIN           case 1 of             sz 1  EQ nx AND sz 2  EQ ny AND sz 3  EQ  nz:direc    x    xyz array             nx EQ 1 AND sz 1  EQ ny AND sz 2  EQ nz AND sz 3  EQ jpt:direc    t     x yzt             ELSE:return  err_3d type  sz  nx  ny  nz             endcase         END          xt :BEGIN           case 1 of             sz 1  EQ nx AND sz 2  EQ ny AND sz 3  EQ jpt:direc    y    xyt array             sz 1  EQ nx AND ny EQ 1 AND sz 2  EQ nz AND sz 3  EQ jpt:direc    z    x y zt array             ELSE:return  err_3d type  sz  nx  ny  nz             endcase         END          yt :BEGIN           case 1 of             sz 1  EQ nx AND sz 2  EQ ny AND sz 3  EQ jpt:direc    x    xyt array             nx EQ 1 AND sz 1  EQ ny AND sz 2  EQ nz AND sz 3  EQ jpt:direc    z     x yzt array             ELSE:return  err_3d type  sz  nx  ny  nz             endcase         END          zt :BEGIN           case 1 of             sz 1  EQ nx AND ny EQ 1 AND sz 2  EQ nz AND sz 3  EQ jpt:direc    x    x y zt array             nx EQ 1 AND sz 1  EQ ny AND sz 2  EQ nz AND sz 3  EQ jpt:direc    y     x yzt array             ELSE:return  err_3d type  sz  nx  ny  nz             ENDCASE         END        ENDCASE      END        4:BEGIN        CASE type OF          x :direc    yzt           y :direc    xzt           z :direc    xyt           t :direc    xyz           xy :direc    zt           xz :direc    yt           yz :direc    xt           xt :direc    yz           yt :direc    xz           zt :direc    xy        ENDCASE      END   ENDCASE     IF keyword_set direc  THEN BEGIN     IF strpos direc   t  NE  1 OR strpos type   t  NE  1 THEN         arr   grossemoyenne temporary arr  direc  boxzoom   localbox                               NAN   nan   NODOMDEF  WDEPTH   wdepth  _extra   ex        ELSE arr   moyenne temporary arr  direc  boxzoom   localbox                            NAN   nan   NODOMDEF  WDEPTH   wdepth  _extra   ex    ENDIF           RETURN  arr END"); 
    271 a[269] = new Array("./ToBeReviewed/PLOTS/DIVERS/checktypeminmax.html", "checktypeminmax.pro", "", "     file_comments        categories        param PROCEDURE        keyword TYPE        keyword MIN        keyword MAX        keyword XY        keyword XZ        keyword YZ        keyword XT        keyword YT        keyword ZT        keyword TT        keyword XX        keyword YY        keyword ZZ        keyword XINDEX        keyword YINDEX        keyword ENDPOINTS        keyword _EXTRA   Used to pass your keywords      returns        uses   common pro      restrictions        examples        history   Sebastien Masson  smasson lodyc jussieu fr       version    Id: checktypeminmax pro 199 2006 12 13 07:47:14Z smasson        todo seb       PRO checktypeminmax  procedure  TYPE   type  MIN   min  MAX   max  XY   xy                          XZ   xz  YZ   yz  XT   XT  YT   YT  ZT   zt                          TT   tt  XX   xx  YY   yy  ZZ   zz                          XINDEX   xindex  YINDEX   yindex                          ENDPOINTS   endpoints  _extra   ex   compile_opt idl2  strictarrsubs    common      case size type   type  of       0:       7:       ELSE:BEGIN          vraimin   type          case size min   type  of             0:BEGIN                 min   vraimin                type   0             END             7:BEGIN                 type   min                min   vraimin             end             ELSE:BEGIN                case size max   type  of                   0:BEGIN                      max   min                      min   vraimin                      type   0                   END                   7:BEGIN                       type   max                      max   min                      min   vraimin                   end                   ELSE:BEGIN                      rien   report Probleme dans la definition des arguments en entree de                                         procedure   chkwidget                       return                   end                endcase             end          endcase       end    endcase      if keyword_set xy  then type    xy     if keyword_set xz  then type    xz     if keyword_set yz  then type    yz     if keyword_set xt  then type    xt     if keyword_set yt  then type    yt     if keyword_set zt  then type    zt     if keyword_set tt  then type    t     if keyword_set xx  then type    x     if keyword_set yy  then type    y     if keyword_set zz  then type    z       if keyword_set type  then begin      if type EQ  plt  then type          if type EQ  pltz  then type          if type EQ  pltt  then type          if type EQ  plt1d  then type        endif     determination du type de plot que l on veut faire      if NOT keyword_set type  then BEGIN       case procedure of          plt :type    xy           pltz :BEGIN           if keyword_set endpoints  then BEGIN              lon1   min endpoints 0  endpoints 2  max   lon2              lat1   min endpoints 1  endpoints 3  max   lat2              if  lon2 lon1  gt  lat2 lat1  then type    xz  else type    yz            ENDIF ELSE type    z          END          pltt :BEGIN           if keyword_set endpoints  then BEGIN              lon1   min endpoints 0  endpoints 2  max   lon2              lat1   min endpoints 1  endpoints 3  max   lat2              lat2   max endpoints 1  endpoints 3              if  lon2 lon1  gt  lat2 lat1  then type    xt  else type    yt            ENDIF ELSE type    unkownpltt          END          plt1d :BEGIN           if keyword_set endpoints  then BEGIN              lon1   min endpoints 0  endpoints 2  max   lon2              lat1   min endpoints 1  endpoints 3  max   lat2              if  lon2 lon1  gt  lat2 lat1  then type    x  else type    y            ENDIF ELSE BEGIN             type                 WHILE type NE  x  AND type NE  y  AND type NE  z  AND type NE  t  DO BEGIN               type   xquestion What kind of plot do you want to do  x y z ou t                                       chkwidget                type   strlowcase type              endwhile           ENDELSE         END       endcase     ENDIF      WHILE type NE  xy  AND type NE  xz  AND type NE  yz          AND type NE  xt  AND type NE  yt  AND type NE  zt          AND type NE  t  AND type NE  x  AND type NE  y          AND type NE  z  AND type NE  unkownpltt  DO BEGIN       type   xquestion What kind of plot do you want to do  xy xz yz xt yt zt t x y z                                 chkwidget        type   strlowcase type      ENDWHILE               return   end"); 
    272 a[270] = new Array("./ToBeReviewed/PLOTS/DIVERS/determineminmax.html", "determineminmax.pro", "", "             file_comments   Determine the min and the max of a mask array      categories    Plotting      param TAB  in required    The array whose we determine the min and the max      param MASK  in required    The mask array       keyword MININ  type scalar    If it is not defined  it takes the value of VRAIMIN      keyword MAXIN  type scalar    If it is not defined  it takes the value of VRAIMAX      keyword ZEROMIDDLE    Force the middle of the colorbar to be equal   to 0  force max max abs min max  and min max        keyword _EXTRA   used to pass your keywords      keyword USETRI   To force using triangulation        param VRAIMIN  out    The min of the array      param VRAIMAX  out    The max of the array      uses   Common pro      restrictions   Look if the field is constant on the sea      history   Sebastien Masson  smasson lodyc jussieu fr                          11 12 98      version    Id: determineminmax pro 163 2006 08 29 12:59:46Z navarro        todo seb: manque les param glam et gphi           PRO determineminmax  tab  mask  vraimin  vraimax  glam  gphi  MAXIN   maxin  MININ   minin  INTERVALLE   intervalle  usetri   usetri  ZEROMIDDLE   zeromiddle  _extra   ex     compile_opt idl2  strictarrsubs    common       Type o fthe vertical grid:   if vargrid EQ  W  then nz   nzw ELSE nz   nzt   liste des points mer   if  size mask 0  EQ 3 then mer   mask    0      ELSE mer   mask   If key_irregular eq 1  we mask also points which are not in the geographic    domain defined by lon1 lon2 lat1 lat2   if keyword_set key_irregular  AND n_elements glam  NE 0 AND n_elements gphi  NE 0 then begin     dom     where glam LT lon1 OR glam GT lon2 OR gphi LT lat1 OR gphi GT lat2      if dom 0  NE  1 then mer dom    0   endif     mer   where mer eq 1      if mer 0  eq  1 then begin     ras   report Il n y a que de la terre sur le dessin      vraimax   0     vraimin   0     maxin   vraimax 1     minin   vraimin 1     usetri   0     return   endif   ma and mi : max and min on ocean points   vraimax   max tab mer  min   vraimin  _extra   ex    sameminmax   testvar var   minin  EQ testvar var   maxin     if n_elements maxin  EQ 0 OR sameminmax then maxin   vraimax   if n_elements minin  EQ 0 OR sameminmax then BEGIN      if keyword_set intervalle  then minin   floor vraimin intervalle intervalle       ELSE minin   vraimin   endif   if vraimin eq vraimax then BEGIN     IF size vraimin   type  EQ 1 THEN vraimin   fix vraimin      question    Warning: constant filed  same value everywhere :     strtrim vraimin  2     Shall we make the plot      answer   report question   default_no   question      if answer then begin       maxin   vraimax 1       minin   vraimin 1     endif ELSE tab    1   ENDIF   IF keyword_set zeromiddle  THEN BEGIN       maxin   max abs minin  maxin        minin    maxin   ENDIF     return end"); 
    273 a[271] = new Array("./ToBeReviewed/PLOTS/DIVERS/givewindowsize.html", "givewindowsize.pro", "", "     file_comments        categories        returns        uses        restrictions        examples        history        version    Id: givewindowsize pro 163 2006 08 29 12:59:46Z navarro        todo seb   FUNCTION givewindowsize      include commons     compile_opt idl2  strictarrsubs    cm_4ps IF NOT keyword_set key_forgetold  THEN BEGIN  updatenew ENDIF        dimensions   get_screen_size RESOLUTION resolution     coef   floor 1 resolution 0     if NOT keyword_set windowsize_scale  then BEGIN      windowsize_scale   1       IF NOT keyword_set key_forgetold  THEN BEGIN       updateold      ENDIF     ENDIF     coef   windowsize_scale   coef       mipgsz   min page_size  max   mapgsz        xsize   coef    mipgsz key_portrait   mapgsz 1 key_portrait      ysize   coef    mipgsz 1 key_portrait    mapgsz key_portrait       return   xsize  ysize  end"); 
    274 a[272] = new Array("./ToBeReviewed/PLOTS/DIVERS/meridienparallele.html", "meridienparallele.pro", "", "             file_comments   Trace some meridians or parallel      categories   Graphics      param COUPE    The type of drawing we treat      uses   common pro      history   Sebastien Masson  smasson lodyc jussieu fr                          11 12 98      version    Id: meridienparallele pro 163 2006 08 29 12:59:46Z navarro             PRO meridienparallele  coupe     compile_opt idl2  strictarrsubs    common      case coupe of        xy :BEGIN           if lon1 lt 180 and lon2 gt 180 then             plot   180 180 lat1 lat2 noerase color 0          if lon1 lt 0 and lon2 gt 0 then             plot   0 0 lat1 lat2 noerase color 0          if lon1 lt 360 and lon2 gt 360 then             plot   360 360 lat1 lat2 noerase color 0          if lat1 lt 0 and lat2 gt 0 then             plot   lon1 lon2 0 0 noerase color 0       END     endcase     return end"); 
    275 a[273] = new Array("./ToBeReviewed/PLOTS/DIVERS/placecolor.html", "placecolor.pro", "", "             file_comments   allows to trace the independently from a graph   By default  trace a color bar of the same type than the one present in plt   and pltz  If max  min and divisions are not stipulated  then max sup min inf   and divisions div       categories   Graphics      param POS   Vector composed by 4 elements giving coordinates of the left bottom    corner and of the right up one  in cm  in which we want to do the color bar      keyword _extra   used to pass your keywords      uses   common pro      restrictions   Only usable for Postscripts effectuated with plein2dessin      history   Sebastien Masson  smasson lodyc jussieu fr   7 5 98      version    Id: placecolor pro 163 2006 08 29 12:59:46Z navarro             pro placecolor  pos  _extra   ex     include commons     compile_opt idl2  strictarrsubs    cm_4ps    IF NOT keyword_set key_forgetold  THEN BEGIN  updatenew    ENDIF        xsave    x    ysave    y    psave    p      reinitplt   z   invert    pos 1 pos    mipgsz   min page_size  max   mapgsz     if key_portrait eq 1 then begin       pos 0 pos 0 mipgsz         pos 1 pos 1 mapgsz           pos 2 pos 2 mipgsz        pos 3 pos 3 mapgsz        endif else begin       pos 0 pos 0 mapgsz           pos 1 pos 1 mipgsz           pos 2 pos 2 mapgsz           pos 3 pos 3 mipgsz        ENDELSE      def_myuniquetmpdir      IF lmgr demo  EQ 1 THEN BEGIN   if we are in demo mode  we cannot save the parameters in a temporary file   cm_demomode_used         colnumb   colorbarparam colnumb       clbinf   colorbarparam clbinf        clbsup   colorbarparam clbsup       clbdiv   colorbarparam clbdiv      ENDIF ELSE BEGIN       file   myuniquetmpdir    4colorbar dat        IF file_test file  THEN BEGIN          restore  file                  if size ex   type  EQ 8 then BEGIN              if  where tag_names ex  EQ  MIN 0  NE  1 then clbinf   ex MIN             if  where tag_names ex  EQ  MAX 0  NE  1 then clbsup   ex MAX             if  where tag_names ex  EQ  DIVISIONS 0  NE  1 then clbdiv   ex DIVISIONS          ENDIF            COLORBAR  COLOR   0  DIVISIONS   clbdiv  DISCRET   colnumb               cb_color   0  POSITION   pos  MAX   clbsup               MIN   clbinf  cb_charsize    p charsize               _extra   ex       ENDIF    ENDELSE       x   xsave     y   ysave     p   psave      return end"); 
    276 a[274] = new Array("./ToBeReviewed/PLOTS/DIVERS/placedessin.html", "placedessin.pro", "", "             file_comments    Putting into place of the drawing  opening of the window or of the PS      categories    Utilities      param TYPEDESSIN  type string    It specify what procedure is called by PLACEDESSIN:  plt   pltz  or  pltt       keyword LANDSCAPE    Force the page or the window on the screen to be in lengthened position       keyword LCT  type integer    It designate the number of the palette of color we want to use for the plot        keyword MAP    We use it when we want to do a projection    This keyword can be of two types:       MAP P0lat P0lon Rot  For the description of these 3 values  see the online help of MAP_SET         MAP: In this case  map is automatically calculated have the value:             map    0   lon1 lon2 2  0    Comment: A good way to choose the type of the projection we want to do is to have a look at IDL demo:   IDL  demo   Then choose earth sciences and  mapping    Comment2: By default it is a cylindrical projection which is effectuated  with or without the keyword map     If we want an other projection  MAP must be activated and we have to add the keyword:  nom_projection    For example  for a polar projection centered on the south pole:   IDL  domdef 180 180 90 45   IDL  plt  tab   stereo map 90 0 0       keyword NOCOLORBAR    We active it if we do not want the colorbar      keyword NOFILL    We active it if we only want contours in black and white with a white background       keyword NOERASE    We active it to make a drawing without creating a new frame       keyword SMALL    Vector composed of 3 or 4 elements  applied to make a drawing on a    small portion of a page or screen  It delimit the zone where the drawing will be done        If there is 4 elements:   then is constituted of coordinates  expressed in cm located from the up and    left corner of the page or the window  in portrait like in landscape  of the bottom    and left corner and of the up and right corner of the drawing zone        If there is 3 elements:   in this case  we divide the page or the screen in small 0  columns and in small 1  lines    the drawing made in the box numbered small 2  The numerotation starting up and left by    the number 1 and then  following the writing direction    By default  we make the largest drawing we can do  conserving the aspect rapport     except when REMPLI is activated        keyword PORTRAIT    Force the page or the window to be in standing position       keyword POST    Make a postscript  Only works if we made one drawing on the page    If we make several drawing  use  ps       keyword REMPLI    Force the drawing to occupy the whole space defined by small       keyword WINDOW    Number of the window on which we want to do the graph  Allow to open several windows     By default  we open  IDL0       keyword CB_TITLE    The colorbar s title      keyword CONTOUR    If we want to trace contours of a different field than the one    whose we have the colored drawing  by example E P in color and QSR in contours     It must be a field respecting same characteristics than the argument number one of plt       keyword ENDPOINTS    keyword specifying that we want to make a vertical cut in diagonal  Then coordinated of extremities    of these one are defined by the 4 elements of the vector ENDPOINTS:  x1 y1 x2 y2  which are    coordinates        keyword VECTEUR  type vector    It is a structure composed by 2 elements containing the 2 fields U   and V of values of the zonal and meridian component of the vector of the fields   to draw  These fields can be an array or a structure          For example: vecteur matriceu:lec unsurface matricev:lec vnsurface          Comment: name of elements of vectors are inconsequential          vecteur u:lec unsurface v:lec vnsurface  is also appropriated       keyword DIREC    t   x   y   z   xys   xz   yz   xyz   xt   yt   zt   xyt           xzt   yzt   xyzt  Direction on which do averages       keyword _EXTRA   Used to pass your keywords       keyword COLOR_C    To draw the contour in color instead of in black   with filling in color       param POSFENETRE  out type vector    It is a vector composed by 4 elements containing the position of the frame    containing captions and the graph in normalized coordinates     Comment: To position the drawing  we have to do  p position posfenetre    after the call of the caliber      param POSBAR  out type vector    Like POSFENETRE but for the color bar     Same comment to position the color bar   p position posbar      uses   common pro      history   Sebastien Masson  smasson lodyc jussieu fr                          26 4 1999      version    Id: placedessin pro 163 2006 08 29 12:59:46Z navarro             PRO placedessin  typedessin  posfenetre  posbar  BARMARGES   barmarges                      NOCOLORBAR   nocolorbar  NOFILL   nofill  COLOR_c   color_c                      CONTOUR   contour                      VECTEUR   vecteur  PORTRAIT   portrait  LANDSCAPE   landscape                      SMALL   small  MARGES   marges  MAP   map                      REMPLI   REMPLI  POST   post  WINDOW   window                      ENDPOINTS   endpoints  TYPE   type  BASICMARGES   basicmarges                      NOERASE   noerase  LCT   lct  DIREC   direc  CB_TITLE   cb_title  _extra   ex     include common     compile_opt idl2  strictarrsubs    cm_4ps  cm_4mesh   IF NOT keyword_set key_forgetold  THEN BEGIN  updatekwd   ENDIF     1  Determination of the size of margins  unity number of lines or columns    to the left  to the right  up and down    BEWARE in margebar  the last element is the right up corner    instead of the up margin     if n_elements typedessin  EQ 0 then typedessin    autre    if keyword_set basicmarges  then begin     marge   1 6  2  4  3      if keyword_set marges  THEN marge   marge marges     margebar   1 marge 0 1  marge 1 1   marge 2 8   marge 2 6      if keyword_set barmarges  then margebar   margebar barmarges   ENDIF ELSE BEGIN      nocolorbar   keyword_set nocolorbar    keyword_set nofill    keyword_set color_c        case typedessin of        plt :marge   1 6  2  4  3         pltt :marge   1 6 4 type EQ  xt  2  4  4         pltz :marge   1 6  2  4  3        else:marge   1 6  2  4  3      ENDCASE     if keyword_set marges  THEN marge   marge marges     if NOT keyword_set barmarges  then barmarges   replicate 0  4      barmarges 3     barmarges 3      margebar   1 marge 0 1  marge 1 1  2  4 barmarges     marge   marge 0  0  4  0 keyword_set cb_title      IF keyword_set direc  THEN         marge   marge 0  0  2  0 strlowcase direc  NE  t      marge   marge 0  0  2  0 keyword_set contour      marge   marge 0  0  2  0 keyword_set vecteur      if n_elements lon1  NE 0 and n_elements lon2  NE 0         and n_elements lat1  NE 0 and n_elements lat2  NE 0 then begin       if keyword_set type  then           marge   marge 0  3 type EQ  yt  AND lon1 NE lon2  0                            2 type NE  yt  AND lat1 NE lat2 keyword_set endpoints          ELSE marge   marge 0  0  0  2 lat1 NE lat2 keyword_set endpoints      endif     marge   marge 0  0  2 margebar 3  0 1 keyword_set nocolorbar    ENDELSE     Portrait or landscape     IF NOT keyword_set noerase  THEN BEGIN      CASE 1 OF       n_elements portrait  NE 0:key_portrait   portrait       n_elements landscape  NE 0:key_portrait   1 landscape       ELSE:     ENDCASE   ENDIF      What type of aspect rapport  it will be crushed if YXASPECT exist      case typedessin of      plt :yaspect   1 lat2 lat1 lon2 lon1       pltt :yaspect   1       pltz :yaspect    5     ELSE:yaspect   1    endcase     2  calculation of  p position   see calibre pro        IF NOT keyword_set small  then small    1  1  1      if keyword_set map  then rempli   1     calibre  yaspect  marge  margebar  small  posfenetre  posbar  REMPLI   rempli  _extra   ex      p position   posfenetre     3  opening of the graphic window or of the postscript     case 1 of   case of the first drawing on a postcript     keyword_set post  AND  d name ne  PS :openps  _extra   ex   case of the first drawing on a screen     keyword_set post  EQ 0 AND keyword_set noerase  EQ 0         AND  d name ne  PS  AND  d name ne  Z :BEGIN       if not keyword_set window  then window   0   For the using of  ps oups et de  vzoom       if lmgr demo  EQ 0 then BEGIN   Are we in the demo mode          if  journal NE 0 then journal   We close te journal if it is open         homedir   isadirectory io   homedir  title    Bad definition of homedir          def_myuniquetmpdir         journal  myuniquetmpdir idlsave pro    We open a new one         help   recall_commands  output   listecommande   We recuperate the last command         listecommande   strmid strcompress listecommande 1  2          journal  listecommande   We write it in the journal       ENDIF       windsize   givewindowsize        window  window  xsize   windsize 0  ysize   windsize 1   retain   2  _extra   ex   When we used colors which are coded on 24bit  we can not stipulate the background color    of a window thanks to  p background  so we have to to this:            if  d n_colors gt 256 then begin               device  decomposed 1                p background ffffff x               plot 0 0   nodata  xstyle   4  ystyle   4               device  decomposed 0            endif     END     ELSE:   endcase     if n_elements lct  NE 0 then lct  lct  _extra   ex      return end"); 
    277 a[275] = new Array("./ToBeReviewed/PLOTS/DIVERS/projsegment.html", "projsegment.pro", "", "             file_comments   project linearly a segment  a vector whose boundaries are  a b  on    a vector whose boundaries are  c d       categories   Calculation      param VECTEUR  type vector    A vector whose the first element must be the smallest one and the last must be the biggest one       param BORNES    New boundaries of the vector       keyword MP   Activate this keyword to the function send back this a vector of 2    elements which are the m and p of the linear projection y mx p used    to pass from the  a b  segment to the  c d  segment       returns    A vector whose new boundaries are specified by BORNES       examples          IDL  a indgen 9       IDL  print  a             0       1       2       3       4       5       6       7       8     IDL  print  projsegment a 0 80              0      10      20      30      40      50      60      70      80     IDL  print  projsegment a 0 80               0      10      20      30      40      50      60      70      80     IDL  print  projsegment a 80 0               80      70      60      50      40      30      20      10      0      history   Sebastien Masson  smasson lodyc jussieu fr                          24 6 1999      version    Id: projsegment pro 163 2006 08 29 12:59:46Z navarro             FUNCTION projsegment  vecteur  bornes  MP   mp       compile_opt idl2  strictarrsubs      a1   float vecteur 0     b1   float vecteur n_elements vecteur 1     a2   float bornes 0     b2  float  bornes 1     if a1 EQ b1 then return   1    m    b2 a2 b1 a1     p   a2 m a1      if keyword_set mp  then return   m  p  ELSE return  m vecteur p   end"); 
    278 a[276] = new Array("./ToBeReviewed/PLOTS/DIVERS/restoreatt.html", "restoreatt.pro", "", "             file_comments   Allows to reattribuate global variables associated with a field    when we give a structure created by saveatt pro by example       categories    Utilities      param STRUCT  in required    a structure like the one who read litchamp            See IDL  xhelp litchamp       uses   common pro      restrictions   Change the value if global variables attribute of a field: vargrid     varname  varunit  vardate  varexp   valmask and time       history   Sebastien Masson  smasson lodyc jussieu fr                          15 6 1999      version    Id: restoreatt pro 163 2006 08 29 12:59:46Z navarro             PRO restoreatt  struct     compile_opt idl2  strictarrsubs    common      nomelements   tag_names struct     for i   0  n_tags struct 1 do begin       case strlowcase strmid nomelements i  0  1  of           g :vargrid   strupcase struct i            n :varname   struct i            u :varunit   struct i            e :varexp   struct i            m :valmask   struct i            d :BEGIN              if size struct i type  EQ 7 THEN BEGIN                 vardate   struct i              ENDIF ELSE BEGIN                vardate     time series                 time   struct i              ENDELSE          end          ELSE:BEGIN              ras   report Le nom  nomelements i  ne correspont a aucun element reconnu de la structure   C cf  IDL  xhelp   litchamp           end       endcase    endfor      return end"); 
    279 a[277] = new Array("./ToBeReviewed/PLOTS/DIVERS/rotation.html", "rotation.pro", "", "       file_comments   Rotate two vectors by a specified amount           param X  in required    original data point pairs      param Y  in required    original data point pairs                 param DEG  in required    degrees to rotate           param NX  out    rotated point pairs        param NY  out    rotated point pairs           history   Jeff Bennett  U of Colorado      version    Id: rotation pro 163 2006 08 29 12:59:46Z navarro        PRO rotation X Y DEG NX NY     compile_opt idl2  strictarrsubs   ang deg dtor   convert to polar coordinates for rotation r   sqrt x x   y y  theta   r 0   get angle in for loop so that zero radii will be left as zero angle for i   0 n_elements r 1 do   if r i  ne 0 then theta i    atan y i x i    range from  pi to  pi    add rotation angle theta   theta   ang    convert back to rectangular coordinates  now rotated nx   r   cos theta  ny   r   sin theta    return end"); 
    280 a[278] = new Array("./ToBeReviewed/PLOTS/DIVERS/saveatt.html", "saveatt.pro", "", "             file_comments   Allows to put in a structure attributes which can be associated with a variable       categories   Utilities      returns    A structure of the form:            n:varname g:vargrid d:vardate e:varexp u:varunit m:valmask l:niveau       uses   common pro      history   Sebastien Masson  smasson lodyc jussieu fr                          15 6 1999      version    Id: saveatt pro 157 2006 08 21 09:01:50Z navarro             FUNCTION saveatt     compile_opt idl2  strictarrsubs    common    return   n:varname g:vargrid d:vardate e:varexp u:varunit m:valmask  end"); 
    281 a[279] = new Array("./ToBeReviewed/PLOTS/DIVERS/terminedessin.html", "terminedessin.pro", "", "             file_comments   End the drawing if needed when it is a postscript       categories   Utilities  Graphics      keyword POST    Make a postscript  Only works if we made one drawing on the page    If we make several drawing  use  ps       keyword SMALL  type vector     Vector composed of 3 or 4 elements  applied to make a drawing on a    small portion of a page or screen  It delimit the zone where the drawing will be done        If there is 4 elements:   then is constituted of coordinates  expressed in cm located from the up and    left corner of the page or the window  in portrait like in landscape  of the bottom    and left corner and of the up and right corner of the drawing zone        If there is 3 elements:   in this case  we divide the page or the screen in small 0  columns and in small 1  lines    the drawing made in the box numbered small 2  The numerotation starting up and left by    the number 1 and then  following the writing direction    By default  we make the largest drawing we can do  conserving the aspect rapport     except when REMPLI is activated       keyword _EXTRA    Used to pass your keywords      uses   common pro      history   Sebastien Masson  smasson lodyc jussieu fr                          3 6 1999      version    Id: terminedessin pro 163 2006 08 29 12:59:46Z navarro             PRO terminedessin  POST   post  SMALL   small  _extra   ex       compile_opt idl2  strictarrsubs    cm_4ps   IF NOT keyword_set key_forgetold  THEN BEGIN  updatenew  updatekwd   ENDIF      if keyword_set post  then BEGIN       if keyword_set small  then         if total small  NE            page_margins 2 page_margins 0 total page_size              page_margins 1 page_margins 3  then return       closeps       printps    endif    return end"); 
    282 a[280] = new Array("./ToBeReviewed/PLOTS/LABEL/label.html", "label.pro", "", "             file_comments   Allows to choose the type of the label we want to use at the time of a contour       categories   Graphics      param CAS  in required    Number of the type of the label we want to trace      param MIN  in required     Smallest value for the drawing of the contour       param MAX  in required    Biggest value for the drawing of the contour       keyword INTERVALLE  default 20    Value of an interval between two isolines  By default  it is calculated to    draw 20 isolines  In all cases  this keyword must be returned have a nice   caption  If levels do not contain regular intervals  put it at  1       keyword NLEVEL  default 20    Number of contour to be drawn  Active if LABEL 0 or is not specified       param NCONTOUR  out    Number of contour to be drawn        param LEVEL_Z2D  out    Vector containing values of contours we draw       param COLNUMB  out    Vector containing the number of colors which will serve to fill contours       uses   common pro      history    Sebastien Masson  smasson lodyc jussieu fr   7 5 98      version     Id: label pro 163 2006 08 29 12:59:46Z navarro             pro label  cas  min  max  ncontour  level_z2d  colnumb  NLEVEL   nlevel              INTERVALLE intervalle  STRICTFILL   strictfill     compile_opt idl2  strictarrsubs    common    if  d name EQ  PS  OR  d name EQ  Z  then BEGIN       old_dname    d name       thisOS    VERSION OS_FAMILY       thisOS   STRMID thisOS  0  3        thisOS   STRUPCASE thisOS        CASE thisOS of           MAC : SET_PLOT  thisOS           WIN : SET_PLOT  thisOS          ELSE: SET_PLOT   X        ENDCASE        p BACKGROUND d n_colors 1   ncontour          level_z2d    min    max min findgen Ncontour Ncontour           colnumb      ncoul findgen Ncontour Ncontour ncoul 2 ncontour           intervalle   level_z2d 1 level_z2d 0        end       1: begin   a certain number of label from the min to the nearest possible to the   max with a constant step by interval          ncontour    fix max min intervalle           ncontour   1   ncontour          level_z2d   min   intervalle findgen Ncontour            colnumb     ncoul findgen Ncontour Ncontour ncoul 2 ncontour           max level_z2d Ncontour 1 intervalle       end   label to do same sss than dessier        2: begin          lct  63  file    palette tbl           level_z2d     20  25  30  31  32  33  33 5  34 25 findgen 16           ncontour 23          colnumb      findgen 23 1          masx   37 75          intervalle    1          return       end       3: begin   Readinf of intervals   palette in the file GMT           label_gmt  min  max  intervalle  ncoul  ncontour  level_z2d  colnumb        end       else: begin          ras   report Le numero de label demande n existe pas        end    ENDCASE    if keyword_set strictfill  then begin       ncontour   ncontour 1       level_z2d    level_z2d  max        colnumb    colnumb  ncoul 1     endif    return end"); 
    283 a[281] = new Array("./ToBeReviewed/PLOTS/LABEL/label_date.html", "label_date.pro", "", "    Copyright  c  1993 1998  Research Systems  Inc   All rights reserved   Unauthorized reproduction prohibited          file_comments   This function labels axes with dates and times       categories   Plotting      param AXIS  in required       param INDEX  in required       param X  in required       keyword DATE_FORMAT   a format string which may contain the following:    M for month  3 character abbr     N for month  2 digit abbr     D for day of month     Y for 4 digit year     Z for last two digits of year     For time:    H for Hours  2 digits     I for Minutes  2 digits     S for Seconds  2 digits      is      Other characters are passed directly thru    For example   M  D   Y  prints DEC 11  1993    M  2Y  yields DEC 93    D M  yields 11 DEC    D N Y  yields 11 12 1993    M C Y  yields DEC on the top line  1993 on   the bottom  C is the new line graphic command       keyword MONTHS   The names of the months  a twelve element string array    If omitted  use Jan  Feb    Dec       keyword OFFSET   An optional starting offset of the plot    Unfortunately  single precision floating point is not accurate   enough to properly represent Julian times   This offset  which   may be double precision  contains an offset that is added to   all x values  before conversion to Julian date and time       uses   LABEL_DATE_COM       restrictions   Only one date axis may be simultaneously active       examples   For example  to plot from Jan 1  1993  to July 12  1994:   Start_date   julday 1  1  1993    End_date   julday 7  12  1994    Dummy   LABEL_DATE DATE_FORMAT N D    Simple mm dd   x   findgen end_date 1   start_date    start_date  Time axis   PLOT  x  sqrt x  XTICKFORMAT    LABEL_DATE  XSTYLE 1    Plot with X axis style set to exact      Example with times:  For example  to plot from 3PM  Jan 1  1993  to 5AM  Jan 3   1993:  Start_date   Julday 1 1 1993     Also starting offset  Start_time    3 12 24           Starting_time less offset  End_time    Julday 1 3 1993    Start_date    5 24   Ending          date time   offset  note that the order of operations is                   important to avoid loss of precision   Dummy   LABEL_DATE DATE_FORMAT D  M C H: I     offset Start_date         MMM NN  HH:MM format  x   findgen 20     End_time   Start_time    19   start_time  Time axis  PLOT  x  sqrt x  XTICKFORMAT    LABEL_DATE  XSTYLE 1      history  DMS  RSI April  1993 Written   DMS  RSI March  1997 Added Time format      Copyright  c  1993 1998  Research Systems  Inc   All rights reserved   Unauthorized reproduction prohibited       version    Id: label_date pro 163 2006 08 29 12:59:46Z navarro         FUNCTION label_date  axis  index  x  DATE_FORMAT   format  MONTHS   months                  OFFSET  offs  _EXTRA   ex     compile_opt idl2  strictarrsubs   COMMON label_date_com  fmt  month_chr  offset  if keyword_set format  then begin  Save format string      if n_elements offs  ne 0 then offset   double offs  else offset   0 0d0     if keyword_set months  then month_chr   months       else month_chr    Jan Feb Mar   Apr   May   Jun   Jul                           Aug   Sep   Oct   Nov   Dec      fmt   format     return  0 endif  if n_elements month_chr  ne 12 or n_elements fmt  le 0     or n_elements offset  eq 0 then     message  Not initialized   x1   x   offset caldat  long x1  month  day  year  _EXTRA   ex Get the calendar date from julian frac   x1   long x1              time of day  from 0 to 1   n   strlen fmt  out      for i 0  n 1 do begin            Each format character      c   strmid fmt  i  1         The character      if c eq   then begin         i   i   1         c   strmid fmt  i  1     The function         case c of format character               M  : out   out   month_chr month 1               N  : out   out   string format i2 2  month               D  : out   out   string format i2 2  day               Y  : out   out   string format i4  year               Z  : out   out   string format i2 2  year  mod 100               H  : out   out   string format i2 2  floor 24 frac               I  : out   out   string format i2 2  floor 1440   frac mod 60               S  : out   out   string format i2 2  86400L   frac mod 60                : out   out                 else : message   Illegal character in date format string:  fmt         endcase     endif else out   out   c endfor return  out end"); 
    284 a[282] = new Array("./ToBeReviewed/PLOTS/LABEL/label_gmt.html", "label_gmt.pro", "", "     file_comments    Apply GMT palette into IDL color intervals system       categories          param MIN  in required    A reel number specifying above what value we want to trace a contour      param MAX  in required    A reel number specifying below what value we want to trace a contour       param INTERVALLE          param NCOUL          param NCONTOUR  out    Number of contour to be drawn       param LEVEL_Z2D  in required    Vector containing values of isolignes to be traced       param COUL         restrictions          examples        history         version    Id: label_gmt pro 157 2006 08 21 09:01:50Z navarro     PRO label_gmt  min  max  intervalle  ncoul  ncontour  level_z2d  coul     compile_opt idl2  strictarrsubs    common  com_eg     IF pal_type NE  2dom  THEN BEGIN      color defined in lec_pal_gmt pro        ncontour   ncont_gmt       level_z2d   levels_gmt       coul   coul_gmt       max   max_gmt       intervalle     1     ENDIF ELSE BEGIN           grey_shade palette  case 1 in label        IF finite min  EQ 0 THEN read    Grey shade needs a min max :  min  max       ncontour    fix max min intervalle        level_z2d   min   intervalle findgen Ncontour         max level_z2d Ncontour 1 intervalle        print        Number of contour intervals  plotting min   max   ncontour  min  max       print               color index        IF idx_pal EQ 0 THEN BEGIN              build palette          red   lonarr 99           red    255          red 50:98    long 100 float grey_shade 100 255            IF field origin EQ  diff  THEN BEGIN                      difference plot : lighter below first negative interval             red 51:98    long 100 float grey_shade_2 100 255              red 1:48    long 100 float grey_shade 100 255              red 50    255           ENDIF              first color black            last   white          red    0  red           red 99    255            gray scale          green   red          blue   red           tvlct  red  green  blue        ENDIF           mid_index   max where level_z2d LE fldatt mid        coul   findgen Ncontour 49 mid_index  2     ENDELSE    END "); 
    285 a[283] = new Array("./ToBeReviewed/PLOTS/LABEL/lataxe.html", "lataxe.pro", "", "             file_comments   function called by  XYZ TICKFORMAT  see the help to see how to use it  to label axes in latitude       categories   Graphics       param AXIS    It is the axis number: 0 for X axis  1 for Y axis  2 for Z axis       param INDEX   It is the tick mark index which starts at 0       param VALUE   It is the default tick mark value  a floating point number       returns   A string  used automatically to label      history   Sebastien Masson  smasson lodyc jussieu fr                                                    14 10 1999 format of labels      version    Id: lataxe pro 157 2006 08 21 09:01:50Z navarro             FUNCTION lataxe  axis  index  value     We put back value in the segment  0 180      compile_opt idl2  strictarrsubs      lat value mod 360    if lat lt 0 then lat lat 360    if lat gt 180 then lat lat 180   format of labels:    case 1 of       lat EQ round lat :fmt    i4        10 lat EQ round 10 lat :fmt    f6 1        ELSE:fmt    f7 2     endcase   we write the label    if lat le 90 and lat ne 0 then nom string lat      format fmt N     if lat gt 90              then nom string 180 lat  format fmt S     if lat eq  0              then nom string lat      format fmt       return  nom end "); 
    286 a[284] = new Array("./ToBeReviewed/PLOTS/LABEL/lonaxe.html", "lonaxe.pro", "", "             file_comments   function called by  XYZ TICKFORMAT  see the help to see how to use it  to label axes in longitude       categories   Graphics       param AXIS    It is the axis number: 0 for X axis  1 for Y axis  2 for Z axis       param INDEX   It is the tick mark index which starts at 0       param VALUE   It is the default tick mark value  a floating point number       returns   A string  used automatically to label      history   Sebastien Masson  smasson lodyc jussieu fr                                                    14 10 1999 format of labels      version    Id: lonaxe pro 157 2006 08 21 09:01:50Z navarro             FUNCTION lonaxe  axis  index  value     We put back value in the segment  0 360      compile_opt idl2  strictarrsubs      lon value mod 360    if lon lt 0 then lon lon 360   format of labels:    case 1 of       lon EQ round lon :fmt    i4        10 lon EQ round 10 lon :fmt    f6 1        ELSE:fmt    f7 2     endcase   we write the label    if lon lt 180 then nom string lon      format fmt E     if lon gt 180 then nom string 360 lon  format fmt W     if lon eq 180 then nom string lon      format fmt       return  nom end "); 
    287 a[285] = new Array("./ToBeReviewed/PLOTS/VECTEUR/ajoutvect.html", "ajoutvect.pro", "", "             file_comments   Overprint vectors in a field traced by plt       categories   Graphics      param VECTEUR  in required type vector    It is a structure with 2 elements containing we 2 matrices U and V of    values of the zonal and meridian component of the field of vectors to    be traced         For ex:         vecteur matriceu:lec unsurface matricev:lec vnsurface          rq:the name of elements of  vector does not have any importance          vecteur u:lec unsurface v:lec vnsurface  goes well too       keyword UNVECTSUR  type scalar or array    It is a scalar n or an array with 2 elements  n1 n2    In the first case  we will trace a vector on n following x and y    In the second case  we will trace a vector on n1 following x and a    vector n2 following n2     Comments: To trace all vectors following y and one vector on two    following x  put unvectsur 2 1       keyword VECTMIN  in required    Minimum norme of vectors to be traced       keyword VECTMAX  in required    Maximum norme of vectors to be traced       keyword _EXTRA   Used to pass your keywords       uses   common pro       history   Sebastien Masson  smasson lodyc jussieu fr   10 3 1999                         11 6 1999 compatibilite avec NAN et la lecture                         des structures       version    Id: ajoutvect pro 163 2006 08 29 12:59:46Z navarro               pro ajoutvect vecteur  vectlegende  UNVECTSUR unvectsur VECTMIN vectmin  VECTMAX vectmax  _EXTRA   ex     compile_opt idl2  strictarrsubs    common    tempsun   systime 1            For key_performance        u   litchamp vecteur 0     u   checkfield u   plt  TYPE    xy   NOQUESTION     v   litchamp vecteur 1     v   checkfield v   plt  TYPE    xy   NOQUESTION        We recuperate possible informations on fields      grilleu   litchamp vecteur 0   grid     if grilleu EQ   then grilleu    U     grillev   litchamp vecteur 1   grid     if grillev EQ   then grillev    V      IF grilleu EQ  V  AND grillev EQ  U  THEN inverse   1    IF grilleu EQ grillev THEN interpolle    0 ELSE interpolle   1    if keyword_set inverse  then begin       rien   u       u   v       v   rien    endif     We find common points between u and v      if interpolle then begin       indicexu    lindgen jpi firstxu:firstxu nxu 1        indicexv    lindgen jpi firstxv:firstxv nxv 1        indicex   inter indicexu  indicexv        indiceyu    lindgen jpj firstyu:firstyu nyu 1        indiceyv    lindgen jpj firstyv:firstyv nyv 1        indicey   inter indiceyu  indiceyv        nx   n_elements indicex         ny   n_elements indicey        indice2d   lindgen jpi  jpj        indice2d   indice2d indicex 0 :indicex 0 nx 1 indicey 0 :indicey 0 ny 1      extraction of u and v on the appropriated domain         case 1 of           size u 0  NE 2 OR  size v 0  NE 2: return           size u 1  EQ nxu AND  size u 2  EQ nyu AND              size v 1  EQ nxv AND  size v 2  EQ nyv:BEGIN              if nxu NE nx then                if indicex 0  EQ firstxu then u   u 0:nx 1    ELSE u   u 1: nx                 IF nxv NE nx THEN                if indicex 0  EQ firstxv then v   v 0:nx 1    ELSE v   v 1: nx                IF nyu NE ny THEN                if indicey 0  EQ firstyu then u   u  0:ny 1  ELSE u   u  1: ny               IF nyv NE ny THEN                if indicey 0  EQ firstyv then v   v  0:ny 1  ELSE v   v  1: ny           END           size u 1  EQ jpi AND  size u 2  EQ jpj AND              size v 1  EQ jpi AND  size v 2  EQ jpj:BEGIN              u   u indice2d              v   v indice2d           END          ELSE:BEGIN              ras   report problemes d adequation entre la taille du domaine et la taille des matrices necessaires a tracer des vecteurs              return          end       endcase     We reshape u and v to make sure that none dimension has been erased          if ny EQ 1 then begin          u   reform u  nx  ny           v   reform v  nx  ny        endif     construction of u and v at points T         a u 0        u u shift u 1 0 2        if NOT keyword_set key_periodic  OR nx NE jpi then u 0 a       a v 0        v v shift v 0 1 2        if NOT keyword_set key_periodic  OR nx NE jpi then v 0 a     attribution of the mask and of longitude and latitude arrays    We recuperate the complete grid to establish a big mask extensive    in the four directions to cover points for which a land point has    been considerated  do a small drawing          vargrid T        msku    umask indice2d jpi jpj firstzt        mskv    vmask indice2d jpi jpj firstzt        glam   glamt indice2d        gphi   gphit indice2d        if ny EQ 1 then begin          msku   reform msku  nx  ny           mskv   reform mskv  nx  ny             glam   reform glam  nx  ny             gphi   reform gphi  nx  ny        endif     We mask u and v et v the long of coasts  the place where we    can not calculate the average       extention of the mask       u   u msku shift msku 1 0        v   v mskv shift mskv 0 1     ENDIF ELSE BEGIN        u   u tmask firstxt:lastxt firstyt:lastyt firstzt        v   v tmask firstxt:lastxt firstyt:lastyt firstzt        indice2d   lindgen jpi  jpj        indice2d   indice2d firstxt:lastxt  firstyt:lastyt        nx   nxt       ny   nyt    endelse    tabnorme sqrt u 2 v 2     nan   where finite u   nan  EQ 1     if nan 0  NE  1 then u nan    1e5    nan   where finite v   nan  EQ 1     if nan 0  NE  1 then v nan    1e5    if keyword_set vectmin  then BEGIN        toosmall where tabnorme lt vectmin        if toosmall 0  NE  1 then begin          u toosmall    1e5          v toosmall    1e5       ENDIF    endif    if keyword_set vectmax  then BEGIN       toobig where tabnorme gt vectmax        if toobig 0  NE  1 then begin          u toobig    1e5          v toobig    1e5       ENDIF    ENDIF     Put back of a big value on all points for which we can do the calculation       if interpolle then t2   msku shift msku 1 0 mskv shift mskv 0 1       ELSE t2   tmask firstxt:lastxt firstyt:lastyt firstzt     if NOT keyword_set key_periodic  OR nx NE jpi then t2 0   0     t2 0 0     terre where t2 eq 0     if terre 0  ne  1 then begin       u terre 1e5       v terre 1e5    ENDIF     trace only one vector one two      if keyword_set unvectsur  then BEGIN     indx is a vector containing number of columns to be selected    indy is a vector containing number of lines to be selected        if n_elements unvectsur  EQ 1 then begin          indx   where lindgen nx  MOD unvectsur 0  eq 0           indy   where lindgen ny  MOD unvectsur 0  eq 0        ENDIF ELSE BEGIN           indx   where lindgen nx  MOD unvectsur 0  eq 0           indy   where lindgen ny  MOD unvectsur 1  eq 0       ENDELSE   From indx and indy  we will construct an array which will give indexes   of intersections points of columns specified by indx        indicereduit   indx replicate 1 n_elements indy nx replicate 1 n_elements indx indy   We reduce arrays which will be passed to vecteur        u   u indicereduit        v   v indicereduit        tabnorme   tabnorme indicereduit       endif           if keyword_set inverse  then begin       rien   u       u   v       v   rien    endif     Drawing of vectors       vecteur  u  v  tabnorme  indice2d  indicereduit  missing 1e5  _extra   ex     We complete the caption       if terre 0  ne  1 then mini   min tabnorme where t2 eq 1  max   maxi   nan       ELSE mini   min tabnorme  max   maxi   nan         if litchamp vecteur 0   u  NE   then       vectlegende    minmax: mini  maxi  unite:litchamp vecteur 0   u       ELSE vectlegende    minmax: mini  maxi  unite:varunit    sortie:    if keyword_set key_performance  NE 0 THEN print   temps ajoutvect  systime 1 tempsun     return end  "); 
    288 a[286] = new Array("./ToBeReviewed/PLOTS/VECTEUR/vecteur.html", "vecteur.pro", "", "     file_comments           categories          param ANGLE         returns          restrictions          examples        history         version    Id: vecteur pro 163 2006 08 29 12:59:46Z navarro     FUNCTION cv_cm2normal  angle     Give the length in normal coordinates of a trait oriented of an angle   by rapport at the x axis and which must do 1 cm on the drawing    Angle can be an array           compile_opt idl2  strictarrsubs    common   What is the length in normal coordinates of a trait which will do 1 cm   on the paper an which is parallel to x    mipgsz   min page_size  max   mapgsz     sizexfeuille   mipgsz key_portrait mapgsz 1 key_portrait     sizeyfeuille   mapgsz key_portrait mipgsz 1 key_portrait     cm_en_normal   1 sizexfeuille     If the aspect rapport of the window is not equal to 1  the length in   normalized coordinates of  a trait of 1 cm vary following the polar   angle of this trait       aspect   sizexfeuille sizeyfeuille    cm_en_normal   cm_en_normal sqrt  1  aspect 2 1 sin angle 2        return  cm_en_normal END        file_comments           categories          param U        param V        param W         restrictions          examples        history         version    Id: vecteur pro 163 2006 08 29 12:59:46Z navarro     PRO normalise  u  v  w     normalize the vector       compile_opt idl2  strictarrsubs      IF n_elements w  NE 0 THEN BEGIN        norme   sqrt u 2 v 2 w 2        ind   where norme NE 0        u ind    u ind norme ind        v ind    v ind norme ind        w ind    w ind norme ind     ENDIF ELSE BEGIN       norme   sqrt u 2 v 2        ind   where norme NE 0        u ind    u ind norme ind        v ind    v ind norme ind     ENDELSE  END              file_comments   Trace vectors  even if they are on a deformed grid  on any projection    In this way  all vectors have a comparable norme on the drawing  to be   clear  a vector which measure 1 cm measure it  no matter the projection   and is position on the sphere       categories    Graphics       param COMPOSANTEU  in required    It is the u component of the vector to be traced  This 2d array has the    same dimension that reduitindice2d  see further        param COMPOSANTEV  in required    It is the v component of the vector to be traced  This 2d array has the    same dimension that reduitindice2d  see further        param NORMEVECTEUR        param INDICE2D   in required    It in an index allowing to to pass from an jpi or jpj array to the zoom    on which we do the drawing       param REDUITINDICE2D  in required    It is an index allowing to pass from an array defined by indice2d to the    array for which we really have vectors to be traced  to be clear  it is    for example when we trace only one vector on two       keyword CMREF  default between  5 and 1 5 cm    The length in cm that must measure the arrow normed normeref  By default     it is adjusted to other drawing and included between  5 and 1 5 cm       keyword MISSING   The value of a missing value  Do not use this keyword  Fixed at 1e5 by    ajoutvect pro            keyword NORMEREF    The norme of the reference arrow       keyword VECTCOLOR  default 0    The color of the arrow  Black by default  color 0        keyword VECTTHICK  default 1    The thick of the arrow        keyword VECTREFPOS   Vector composed of 2 elements specifying the position on DATA coordinates    from the beginning of the reference vector  By default at the right bottom    of the drawing       keyword VECTREFFORMAT   The format to be used to specify the norme of the reference vector       keyword NOVECTREF   To delete the display of the reference vector        keyword _EXTRA   Used to pass your keywords       uses    common pro      history    Creation : 13 02 98 G  Roullet  grlod lodyc jussieu fr     Modification : 14 01 99 realise la transformation    spheriquecartesien G  Roullet                   12 03 99 verification de la routine G  Roullet    8 11 1999:    G  Roullet et Sebastien Masson  smasson lodyc jussieu fr     adaptation pour les zoom  reverification traitement separe de la    direction et de la norme des vecteurs  mots cles NORMEREF et CMREF       version    Id: vecteur pro 163 2006 08 29 12:59:46Z navarro              PRO vecteur  composanteu  composantev  normevecteur  indice2d  reduitindice2d                  CMREF   cmref  MISSING   missing  NORMEREF   normeref                  VECTCOLOR   vectcolor  VECTTHICK   vectthick  VECTREFPOS   vectrefpos                  VECTREFFORMAT   vectrefformat  NOVECTREF   novectref  _extra   extra     compile_opt idl2  strictarrsubs    common    tempsun   systime 1            For key_performance        taille   size composanteu     nx   taille 1     ny   taille 2     if n_elements reduitindice2d  EQ 0 then reduitindice2d   lindgen nx  ny     zu   composanteu    zv   composantev    norme   normevecteur    taille   size indice2d     nxgd   taille 1     nygd   taille 2       msk   replicate 1  nx  ny     if keyword_set missing  then terre   where abs zu  GE missing 10  ELSE terre    1    if terre 0  NE  1  then BEGIN        msk terre    0       zu terre    0       zv terre    0       norme terre    0    ENDIF     Stage 1:      Given that the directions and the sense that the vector has on the sphere     we have to try to determinate this direction and the sense that the vector    will have on the screen once it will have been projected      In theory: on the sphere  a vector in a given point has for direction the    tangent at the circle passing by the center of the Earth and by the vector     So  find the direction once the projection is done  it is find the tangent   to the curve representing the projection of the circle on the 2d plan at the    point representing the projection of the starting point of the shere on the    2d plan       In practice we do no know the definition of the curve given by the projection    of a circle so find its tangente in a point      What we do:   In a 3d cartesian reference          a  We find coorinates of the point T  starting of the arrow  situed          on the sphere          b  To each point T  we determine local directions defined by the grid         on this point and on which coordinates  u v  of the vector refer to          These local directions are defined by gradients of glam and gphi  Once         we have obtain these directions  we considare them like orthogonal and         by norming them  we build an orthonormal reference  nu nv  on which         coordinates  u v  of the vector refer to  In the starting 3d cartesian         reference  the vector is defined by:         V u nu v nv          where V  nu and nv are 3d vectors and u and v are scalars          c  To approximate the tangente to the circle by the chord defined by         the beginning and the ending of the arrow  we will normalize V  and         then divide it by 100          d  This allows us to determine coordinates of extremities of the chord         in the 3d cartesian reference  We pass them in spherical coordinates in         order to recuperate latitude and longitude position of these points on         the sphere          e  We pass coordinates of these points in normalized coordinates  then         in polar coordinates in order to find the angle and the direction they         dertermine on the drawing        Stage 1  a        coordinates of the point T  beginning of the arrow  in spherical coordinates     glam   glamt indice2d reduitindice2d     gphi   gphit indice2d reduitindice2d      Coordinates of the point T  beginning of the arrow  in the cartesian reference    For the sphere  we use a sphere with a radius of 1       radius   replicate 1 nx ny     coord_sphe   transpose   glam   gphi   radius       r   cv_coord from_sphere coord_sphe to_rect degrees       x0   reform r 0    nx  ny     y0   reform r 1    nx  ny     z0   reform r 2    nx  ny      Stage 1  b      Construction of a vector nu  resp  nv  vectr normed carried by the axis of   points u i j  and u i 1 j   resp v i j  and v i j 1  which define  for each   point on the sphere  local directions associated with u and v  These vectors   define a local orthonormal reference     These vectors are built in a cartesian reference  cv_coord  We have choose a    unity radius of the Earth  unit      definition of nu    radius   replicate 1 nxgd nygd     IF finite glamu 0 gphiu 0  NE 0 THEN        coord_sphe   transpose   glamu indice2d   gphiu indice2d   radius         ELSE coord_sphe   transpose   glamf indice2d   gphit indice2d   radius       r   cv_coord from_sphere coord_sphe to_rect degrees    coordinates of points of the grid u in cartesian     ux   reform r 0    nxgd  nygd     uy   reform r 1    nxgd  nygd     uz   reform r 2    nxgd  nygd    calculation of nu     nux   ux shift ux  1  0     nuy   uy shift uy  1  0     nuz   uz shift uz  1  0    conditions at extremities     if NOT keyword_set key_periodic  OR nxgd NE jpi then begin       nux 0      nux 1          nuy 0      nuy 1          nuz 0      nuz 1       ENDIF   reduction of the grid    nux   nux reduitindice2d     nuy   nuy reduitindice2d     nuz   nuz reduitindice2d    definition of nv    IF finite glamv 0 gphiv 0  NE 0 THEN      coord_sphe   transpose   glamv indice2d   gphiv indice2d   radius         ELSE coord_sphe   transpose   glamt indice2d   gphif indice2d   radius                       r   cv_coord from_sphere coord_sphe to_rect degrees    coordinates of points of the grid in cartesian     vx   reform r 0    nxgd  nygd     vy   reform r 1    nxgd  nygd     vz   reform r 2    nxgd  nygd    calcul of nv     nvx   vx shift vx  0  1     nvy   vy shift vy  0  1     nvz   vz shift vz  0  1    conditions at extremities    nvx  0    nvx  1     nvy  0    nvy  1     nvz  0    nvz  1    reduction of the grid    nvx   nvx reduitindice2d     nvy   nvy reduitindice2d     nvz   nvz reduitindice2d      normalization      normalise  nux  nuy  nuz    normalise  nvx  nvy  nvz     Stage 1  c      coordinates of the vector V in the cartesian reference      direcx   zu nux   zv nvx    direcy   zu nuy   zv nvy    direcz   zu nuz   zv nvz   normalization of the vector V    normalise  direcx  direcy  direcz   on divide by 100    direcx   direcx 100     direcy   direcy 100     direcz   direcz 100      Stege 1  d    coordinates of the point of the arrow in the cartesian reference      x1   x0   direcx    y1   y0   direcy    z1   z0   direcz    coordinates of the point of the arrow in spherical coordinates      coord_rect   transpose   x1   y1   z1       r   cv_coord from_rect coord_rect to_sphere degrees     glam1   reform r 0    nx  ny     gphi1   reform r 1    nx  ny       modification of glams  Everything take place at the level of the line   of changing of date  BEWARE  do not cut arrow which goes out of the   window    test: If it goes out of the frame  but  thanks to   360  it come in    we modify it      ind   where glam1 LT  x range 0  AND glam1 360  LE  x range 1     if ind 0  NE  1 then glam1 ind    glam1 ind 360     ind   where glam1 GT  x range 1  AND glam1 360  GE  x range 0     if ind 0  NE  1 then glam1 ind    glam1 ind 360      ind   where glam LT  x range 0  AND glam 360  LE  x range 1     if ind 0  NE  1 then glam ind    glam ind 360     ind   where glam  GT  x range 1  AND glam 360  GE  x range 0     if ind 0  NE  1 then glam ind    glam ind 360        Stage 1  e       r   convert_coord glam gphi data to_normal      x0   r 0                      normal coordinates of the beginning of the array     y0   r 1                              r   convert_coord glam1 gphi1 data to_normal      x1   r 0                      normal coordinates of the ending of the array  Before scaling     y1   r 1                           tests to avoid that arrows be drawing out of the domain       out   where x0 LT  p position 0  OR x0 GT  p position 2                    OR y0 LT  p position 1  OR y0 GT  p position 3     if out 0  NE  1 THEN x0 out     values f_nan     Following projections  there may are points at NaN when we pass in normal coordinates     We delete these points       nan   finite x0 y0 x1 y1     number   where nan EQ 1     x0   x0 number    x1   x1 number     y0   y0 number    y1   y1 number     msk   msk number     norme   norme number      We define the vector direction in the normalize reference       dirx   x1 x0    diry   y1 y0    We pass in polar coordinates to recuperate the angle which wasb the goal of all the first stage        dirpol   cv_coord from_rect   transpose   dirx   diry     to_polar     dirpol   msk dirpol 0        Stage 2     Now we take care of the norme      Automatic putting at the scale       if NOT keyword_set cmref  then BEGIN        mipgsz   min page_size  max   mapgsz        sizexfeuille   mipgsz key_portrait mapgsz 1 key_portrait        sizexfeuille   10 sizexfeuille       cmref   5   floor sizexfeuille 10    15       cmref   cmref 10     ENDIF    if NOT keyword_set normeref  then BEGIN       value   max norme        puissance10   10 floor alog10 value        normeref   puissance10 floor value puissance10     endif    cm   1 normeref cmref     We modify the array norme to an element having the value cm be represented    by a trait of lenght 1 cm on the paper  Norme contain the norme of vectors    we want to draw       norme   1 1 cm norme cv_cm2normal dirpol        Stage 3   Now that we have the angle and the norme  we recuperate coordinates in    rectangular and we draw arrows       r   cv_coord from_polar   transpose   dirpol   norme     to_rect     composantex   r 0       composantey   r 1         x1   x0 composantex    y1   y0 composantey     Drawing      if NOT KEYWORD_SET vectcolor  then vectcolor   0     points   where msk EQ 1     IF points 0  NE  1 THEN arrow  x0 points  y0 points  x1 points  y1 points   norm         hsize    2  COLOR   vectcolor  THICK   vectthick      Draw an arrow at the right bottom of the drawing as a caption       if NOT keyword_set novectref  then BEGIN       dx   cmref cv_cm2normal 0    Lenght of the vector of reference in normalzed coordinates        if keyword_set vectrefformat  then          normelegende   strtrim string normeref  format   vectrefformat  1            ELSE normelegende   strtrim normeref  1            if keyword_set vectrefpos  then begin          r   convert_coord vectrefpos data   to_normal           x0   r 0           y0   r 1        ENDIF ELSE BEGIN          x0    x window 1 dx          r   convert_coord d x_ch_size   d y_ch_size   device   to_normal           dy   3 r 1 p charsize          y0    y window 0 dy       ENDELSE        arrow  x0  y0  x0 dx  y0   norm  hsize    2  color   0       xyouts  x0  y0  normelegende   norm  align   1  charsize    p charsize  color   0     endif         if keyword_set key_performance  NE 0 THEN print   temps vecteur  systime 1 tempsun         return END     "); 
    289 a[287] = new Array("./ToBeReviewed/PLOTS/VECTEUR/velovect.html", "velovect.pro", "", "          file_comments   Produce a two dimensional velocity field plot      A directed arrow is drawn at each point showing the direction and    magnitude of the field                      categories   Plotting  two dimensional         param U  in required    The X component of the two dimensional field      U must be a two dimensional array       param V  in required    The Y component of the two dimensional field   Y must have   the same dimensions as X   The vector at point  i j  has a    magnitude of:    U i j 2   V i j 2 0 5     and a direction of:    ATAN2 V i j U i j       param X  in optional type vector    Optional abscissa values   X must be a vector with a length    equal to the first dimension of U and V       param Y  in optional type vector    Optional ordinate values   Y must be a vector with a length   equal to the first dimension of U and V       keyword COLOR   The color index used for the plot       keyword DOTS   Set this keyword to 1 to place a dot at each missing point     Set this keyword to 0 or omit it to draw nothing for missing   points   Has effect only if MISSING is specified       keyword LENGTH  default 1 0    Length factor   The default of 1 0 makes the longest  U V    vector the length of a cell       keyword MISSING    Missing data value   Vectors with a LENGTH greater   than MISSING are ignored       keyword OVERPLOT   Set this keyword to make VELOVECT  overplot   That is  the   current graphics screen is not erased  no axes are drawn  and   the previously established scaling remains in effect        keyword CLIP       keyword NOCLIP      keyword _EXTRA   Used to pass your keywords       restrictions    Plotting on the selected device is performed   System   variables concerning plotting are changed    Note:   All other keywords are passed directly to the PLOT procedure  and may be used to set option such as TITLE  POSITION    NOERASE  etc       history  DMS  RSI  Oct  1983   For Sun  DMS  RSI  April  1989   Added TITLE  Oct  1990   Added POSITION  NOERASE  COLOR  Feb 91  RES   August  1993   Vince Patrick  Adv  Visualization Lab  U  of Maryland   fixed errors in math   August  1993  DMS  Added _EXTRA keyword inheritance   January  1994  KDB  Fixed integer math which produced 0 and caused              divide by zero errors   December  1994  MWR  Added _EXTRA inheritance for PLOTS and OPLOT   June  1995  MWR  Removed _EXTRA inheritance for PLOTS and changed   OPLOT to PLOTS          September  1996  GGS  Changed denominator of x_step and y_step vars           February  1998  DLD   Add support for CLIP and NO_CLIP keywords          June  1998  DLD   Add support for OVERPLOT keyword      Copyright  c  1983 1998  Research Systems  Inc   All rights reserved   Unauthorized reproduction prohibited       version    Id: velovect pro 163 2006 08 29 12:59:46Z navarro         PRO velovect U V X Y  Missing   Missing  Length   length  Dots   dots             Color color  CLIP clip  NOCLIP noclip  OVERPLOT overplot  _EXTRA extra     compile_opt idl2  strictarrsubs           on_error 2                       Return to caller if an error occurs         s   size u          t   size v          if s 0  ne 2 then begin  baduv:   message   U and V parameters must be 2D and same size                  endif         if total abs s 0:2 t 0:2  ne 0 then goto baduv           if n_params 0  lt 3 then x   findgen s 1  else                   if n_elements x  ne s 1  then begin badxy:                  message   X and Y arrays have incorrect size                          endif         if n_params 1  lt 4 then y   findgen s 2  else                   if n_elements y  ne s 2  then goto badxy           if n_elements missing  le 0 then missing   1 0e30         if n_elements length  le 0 then length   1 0          mag   sqrt u 2 v 2               magnitude                   Subscripts of good elements         nbad   0                          of missing points         if n_elements missing  gt 0 then begin                 good   where mag lt missing                   if keyword_set dots  then bad   where mag ge missing  nbad          endif else begin                 good   lindgen n_elements mag          endelse          ugood   u good          vgood   v good          x0   min x                       get scaling         x1   max x          y0   min y          y1   max y   x_step x1 x0 s 1 1 0      Convert to float  Integer math  y_step y1 y0 s 2 1 0      could result in divide by 0   maxmag max max abs ugood x_step max abs vgood y_step   sina   length    ugood maxmag   cosa   length    vgood maxmag            if n_elements title  le 0 then title                plot to get axes            if n_elements color  eq 0 then color    p color         if n_elements noclip  eq 0 then noclip   1         x_b0 x0 x_step  x_b1 x1 x_step  y_b0 y0 y_step  y_b1 y1 y_step         if  not keyword_set overplot  then begin           if n_elements position  eq 0 then begin             plot x_b0 x_b1 y_b1 y_b0 nodata xst yst                  color color  _EXTRA   extra           endif else begin             plot x_b0 x_b1 y_b1 y_b0 nodata xst yst                  color color  _EXTRA   extra           endelse         endif         if n_elements clip  eq 0 then               clip    x crange 0 y crange 0 x crange 1 y crange 1            r    3                           len of arrow head         angle   22 5    dtor             Angle of arrowhead         st   r   sin angle               sin 22 5 degs   length of head         ct   r   cos angle            for i 0 n_elements good 1 do begin      Each point                 x0   x good i  mod s 1          get coords of start   end                 dx   sina i                  x1   x0   dx                 y0   y good i    s 1                  dy   cosa i                  y1   y0   dy  xd x_step  yd y_step                 plots x0 x1 x1 ct dx xd st dy yd xd     x1 x1 ct dx xd st dy yd xd                           y0 y1 y1 ct dy yd st dx xd yd     y1 y1 ct dy yd st dx xd yd                          color color clip clip noclip noclip  _EXTRA   extra                 endfor         if nbad gt 0 then                Dots for missing                  PLOTS  x bad mod s 1  y bad   s 1  psym 3  color color                           clip clip noclip noclip  _EXTRA   extra end"); 
    290 a[288] = new Array("./ToBeReviewed/PLOTS/axe.html", "axe.pro", "", "             file_comments   Manage axes for the different drawings created by plt    pltz and pltt      categories    Graphics      param COUPE  type string    It designate the type of cut to which the axes we create    must report  For example:  xy xt       param TEMPSMIN  in required    In the case where we do cut containing the time dimension  we have    to specify the beginning of the time s axis in julian days       param TEMPSMAX  in required    In the case where we do cut containing the time dimension  we have    to specify the end of the time s axis in julian days       keyword SIN    activated when we trace in sinus of the latitude      keyword SEPDATE  type string    It separate the different constituents of the date  By default     it is a return to the line when we do a  yt   zt  or a  t     In the other cases  it is a blank        keyword DIGITSYEAR    2 to use  Z format  2 digits  to code years   instead of  Y format  See help of label_date for more   information on  Z and  Y       keyword _EXTRA    used to pass your keywords       uses   common pro      restrictions   It modify  x  and  y       history   Sebastien Masson  smasson lodyc jussieu fr                          11 12 98                         Eric Guilyardi types x y z   amelioration de                         l axe temporel      version    Id: axe pro 163 2006 08 29 12:59:46Z navarro             PRO axe  coupe tempsmin tempsmax  REVERSE_X   reverse_x  REVERSE_Y   reverse_y  SIN   sin  SEPDATE   sepdate  DIGITSYEAR   digitsyear  _EXTRA   ex     compile_opt idl2  strictarrsubs    common    tempsun   systime 1            pour key_performance     Management of ticks of the time axis in the case of TEMPSMIN    and TEMPSMAX are definied      divday   0    if n_params  EQ 3 then BEGIN         if keyword_set sepdate  then sep   sepdate ELSE          if coupe EQ  yt  OR coupe EQ  zt  OR coupe EQ  t  then sep    C  ELSE sep               caldat tempsmin  mmin  dmin  ymin  hmin  mnmin  smin  _EXTRA   ex       caldat tempsmax  mmax  dmax  ymax  hmax  mnmax  smax  _EXTRA   ex   format used for the year  2 or 4 5 digits        IF NOT keyword_set digitsyear  THEN digitsyear   4       IF digitsyear EQ 2 THEN fmtyr    Z  ELSE fmtyr    Y          if ymax EQ ymin then BEGIN          if mmin ne mmax then BEGIN   Same year but several monthes             nticks   mmax mmin 1             ticknom   lonarr nticks              for m   0 nticks 1 do ticknom m    julday m mmin  1  ymin  _EXTRA   ex              tminor   6             datfmt    M sep fmtyr   We check that labels are betwenn TEMPSMIN and TEMPSMAX              ticknom   ticknom where ticknom GE tempsmin AND ticknom LE tempsmax AND ticknom NE  1              nticks   n_elements ticknom    Particular case where we are overlap two monthes             if nticks LE 1 then begin                nticks    dmax jourdsmois mmin  ymin 0 dmin 1 2                ticknom   lonarr nticks                 for d   0 nticks 1 do ticknom d    julday mmin  d 2 dmin  ymin  _EXTRA   ex                 ticknom   ticknom where ticknom GE tempsmin AND ticknom LE tempsmax                                          AND ticknom NE  1                 nticks   n_elements ticknom                 tminor   2                datfmt    D sep M              endif          ENDIF ELSE BEGIN    Same year and same month             IF dmax dmin 1 GT 4 THEN BEGIN   more than 4 days                nticks   dmax dmin 1                ticknom   lonarr nticks                 for d   0 nticks 1 do ticknom d    julday mmin  d dmin  ymin  _EXTRA   ex                 ticknom   ticknom where ticknom GE tempsmin AND ticknom LE tempsmax                                          AND ticknom NE  1                 nticks   n_elements ticknom                 tminor   2                datfmt    D sep M              ENDIF ELSE BEGIN      less than 4 days : divday ticks per day                divday   4                nticks    dmax dmin divday   1                ticknom   fltarr nticks                 for d   0 nticks 1 do                   ticknom d    julday mmin  d divday dmin  ymin  _EXTRA   ex                     d MOD divday float divday                 tminor   2                datfmt    H:00              ENDELSE           ENDELSE        ENDIF ELSE BEGIN    Several years          CASE 1 OF          ymax ymin 1 LE 10: BEGIN   freq   1    tminor   12   datfmt    M sep fmtyr   end          ymax ymin 1 LE 20: BEGIN   freq   2    tminor   6   datfmt    M sep fmtyr   end          ymax ymin 1 LE 50: BEGIN   freq   5    tminor   5   datfmt    M sep fmtyr   end          ymax ymin 1 LE 100: BEGIN   freq   10    tminor   10   datfmt   fmtyr   end          ymax ymin 1 LE 1000: BEGIN   freq   50    tminor   5   datfmt   fmtyr   end          ELSE : BEGIN   freq   100    tminor   50   datfmt    Y    end          ENDCASE           nticks   floor ymax ymin freq 1          IF floor ymin freq  NE  ymin freq THEN             yminf    floor ymin freq 1 freq ELSE              yminf    floor ymin freq freq          ticknom   lonarr nticks           for y   0  nticks 1 do ticknom y    julday 1  1  yminf y freq  _EXTRA   ex    We check that labels are betwenn TEMPSMIN and TEMPSMAX           ticknom   ticknom where ticknom GE tempsmin AND ticknom LE tempsmax AND ticknom NE  1           nticks   n_elements ticknom    Particular case where we are overlap two monthes          if nticks LE 1 then begin             nticks    mmax 12 mmin 1             ticknom   lonarr nticks              for m   0 nticks 1 do ticknom m    julday m mmin  1  ymin  _EXTRA   ex              ticknom   ticknom where ticknom GE tempsmin AND ticknom LE tempsmax AND ticknom NE  1              nticks   n_elements ticknom              tminor   6             datfmt    M sep fmtyr    Particular case where we are overlap two monthes            if nticks LE 1 then begin                nticks    dmax jourdsmois mmin  ymin 0 dmin 1 2                ticknom   lonarr nticks                 for d   0 nticks 1 do ticknom d    julday mmin  d 2 dmin  ymin  _EXTRA   ex                 ticknom   ticknom where ticknom GE tempsmin AND ticknom LE tempsmax                                          AND ticknom NE  1                 nticks   n_elements ticknom                 tminor   2                datfmt    D sep M              endif          endif       ENDELSE        toto   label_date 0  0  0  DATE_FORMAT   datfmt  _EXTRA   ex        if chkstru ex   DATE_FORMAT  then ex DATE_FORMAT        ENDIF      Definition of axes parameters case by case      case coupe of        pltv :BEGIN          dtasize   tempsmin           x range    0 5  dtasize 0    0 5            y range    0 5  dtasize 1    0 5            if keyword_set reverse_x  then  x range reverse x range           if keyword_set reverse_y  then  y range reverse y range            x title    nx            y title    ny        END        xy :BEGIN           if keyword_set reverse_x  then  x range lon2 lon1  ELSE  x range lon1 lon2           if keyword_set reverse_y  then  y range lat2 lat1  ELSE  y range lat1 lat2           IF key_onearth THEN  x tickformat lonaxe           IF key_onearth THEN  y tickformat lataxe        END        yz :BEGIN           if keyword_set reverse_x  then  x range lat2 lat1  ELSE  x range lat1 lat2           if keyword_set reverse_y  then  y range 0   1  ELSE  y range    1  0           if keyword_set sin  then BEGIN   number of ticks by default             plot   0   0   noerase   nodata  xtick_get   xaxe   We increase this number to it be around 10              ticks   n_elements xaxe 1             ticks   ticks 1  2  4  8              ticks   ticks sort abs ticks 10 0    We recuperate the x axis for this new number of ticks             plot   0   0 xticks   ticks   noerase   nodata  xtick_get   xaxe              x ticks   ticks              x tickv   sin pi 180 xaxe              tickname   strarr ticks 1              for i   0 ticks do tickname i    lataxe 0  0  xaxe i               x tickname   tickname              x range   sin pi 180 x range           endif       end        xz :BEGIN           if keyword_set reverse_x  then  x range lon2 lon1  ELSE  x range lon1 lon2           if keyword_set reverse_y  then  y range 0   1  ELSE  y range    1  0        end        xt  : begin          if keyword_set reverse_x  then  x range    lon2 lon1  ELSE  x range lon1 lon2           if keyword_set reverse_y  then  y range tempsmax  tempsmin tempsmin            ELSE  y range tempsmin tempsmax tempsmin          IF key_onearth THEN  x tickformat lonaxe             result   LABEL_DATE DATE_FORMAT    M sep fmtyr              y tickformat LABEL_DATE            y tickname   LABEL_DATE 1  0 ticknom _EXTRA   ex             y ticklen 1            y gridstyle 2           y ticks nticks 1           y tickv ticknom tempsmin           y minor tminor          IF divday GT 0 THEN  y title    Time from  strtrim dmin 1                 def_month 1m  strtrim mmin  1   strtrim ymin 1        end        yt  : begin          if keyword_set reverse_x  then  x range    tempsmax tempsmin tempsmin            ELSE  x range tempsmin tempsmax tempsmin          if keyword_set reverse_y  then  y range lat2  lat1  ELSE  y range lat1 lat2           IF key_onearth THEN  y tickformat lataxe            x tickname   LABEL_DATE 0  0 ticknom _EXTRA   ex             x ticklen 1            x gridstyle 2           x ticks nticks 1           x tickv ticknom tempsmin           x minor tminor          IF divday GT 0 THEN  y title    Time from  strtrim dmin 1                 def_month 1m  strtrim mmin  1   strtrim ymin 1        end        zt  : begin          if keyword_set reverse_x  then  x range    tempsmax tempsmin tempsmin            ELSE  x range tempsmin tempsmax tempsmin          if vargrid EQ  W  then gdep gdepw 0:nzw 1  ELSE gdep gdept 0:nzt 1             x tickname   LABEL_DATE 0  0 ticknom _EXTRA   ex             x ticklen 1            x gridstyle 2           x ticks nticks 1           x tickv ticknom tempsmin           x minor tminor          IF divday GT 0 THEN  y title    Time from  strtrim dmin 1                 def_month 1m  strtrim mmin  1   strtrim ymin 1        end        t  : BEGIN          if keyword_set reverse_x  then  x range    tempsmax tempsmin tempsmin            ELSE  x range tempsmin tempsmax tempsmin           x tickname   LABEL_DATE 0  0 ticknom _EXTRA   ex             x ticklen 1            x gridstyle 2           x ticks nticks 1           x tickv ticknom tempsmin           x minor tminor          IF divday GT 0 THEN  y title    Time from  strtrim dmin 1                 def_month 1m  strtrim mmin  1   strtrim ymin 1        end        x  : begin           x range lon1 lon2           IF key_onearth THEN  x tickformat lonaxe        END        y  : begin          if keyword_set sin  then BEGIN   Number of ticks by default             plot   0   0   nodata   noerase  xstyle   5  ystyle   5  xtick_get   xaxe   We increase this number to it be around 10              ticks   n_elements xaxe 1             ticks   ticks 1  2  4  8              ticks   ticks sort abs ticks 10 0    We recuperate the x axis for this new number of ticks             plot   0   0 xticks   ticks nodata noerase xstyle 5 ystyle 5 xtick_get xaxe              x ticks   ticks              x tickv   sin pi 180 xaxe              tickname   strarr ticks 1              for i   0 ticks do tickname i    lataxe 0  0  xaxe i               x tickname   tickname              x range   sin pi 180 x range           ENDIF ELSE  x range lat1 lat2           IF key_onearth THEN  x tickformat lataxe        END        z  : begin            if vargrid EQ  W  then gdep gdepw 0:nzw 1  ELSE gdep gdept 0:nzt 1              if keyword_set reverse_y  then  y range gdep 0  gdep n_elements gdep 1               ELSE  y range gdep n_elements gdep 1  gdep 0        END     endcase    if keyword_set key_performance  THEN print   temps axe  systime 1 tempsun     return end"); 
    291 a[289] = new Array("./ToBeReviewed/PLOTS/legende.html", "legende.pro", "", "             file_comments   Provide caption      categories   Graphics      param MI  in required    The min of the drawing       param MA  in required    The max of the plot      param COUPE  type string    Character containing two letters giving the type of the cut   for example:  xz       keyword CONTOUR    If we want to trace contours of a different field than the one    whose we have the colored drawing  by example E P in color and QSR in contours     It must be a field respecting same characteristics than the argument number one of plt       keyword ENDPOINTS   Used when we do vertical cuts in diagonal       keyword _EXTRA   used to pass your keywords       uses   common pro      restrictions   The use of the global variable language allows to change the language and the caption easily       history    Sebastien Masson  smasson lodyc jussieu fr   14 8 98                         Eric Guilyardi  ericg lodyc jussieu fr  GB version  11 6 99      version    Id: legende pro 163 2006 08 29 12:59:46Z navarro             pro legende  mi  ma  coupe  CONTOUR   contour  ENDPOINTS   endpoints  DIREC   direc                  VECTLEGENDE   vectlegende                  INTERVALLE   intervalle  TYPE_YZ   type_yz  VARNAME2   varname2                  NPTS   npts  _EXTRA   ex     compile_opt idl2  strictarrsubs    common   tempsun   systime 1             pour key_performance     grille   1   1   1  gdep  nx  ny  nz     English legends     fmt_mm    f12 2    fmt_bt    f7 1    colorf       contourf    Contour plot    vecteurf    Vector norm      expf       datef           fieldf           depthf           endpointsf    Diag  Section    zonalf       IF key_onearth THEN latintf    latitudes in   ELSE latintf    j index in     timintf    time in     onf           depthf2    Depth  m    Meridf    Zonal Mean      IF key_onearth THEN lonintf    longitudes in   ELSE lonintf    i in     hovxt    XT plot       diaghovxt    Diag  XT plot       depintf    depths in     timef    Time    hovyt    YT plot       diaghovyt    Diag  YT plot       hovzt    ZT plot       hovt       IF key_onearth THEN lontitle    Longitude  ELSE lontitle    i index    IF key_onearth THEN lattitle    Latitude  ELSE lattitle    j index       vertz   depthf2   legniv     m    IF keyword_set TYPE_YZ  THEN BEGIN     IF type_yz EQ  hPa  THEN vertz    hPa       IF type_yz EQ  hPa  THEN legniv     hPa     ENDIF      Start legende       definition and possible complement of  p subtitle     if n_elements varunit  ne 0 then unite    varunit  else unite        p subtitle   colorf unite : Min   strtrim string format   fmt_mm  mi  2                    Max   strtrim string format   fmt_mm  ma  2    if keyword_set intervalle  then BEGIN     if intervalle NE  1 then           p subtitle    p subtitle  Int   strtrim string format   fmt_mm  intervalle  2    endif   if size contour   type  EQ 8 then BEGIN   it is a structure      unite    contour 1       p subtitle    p subtitle C  contourf unite                      : Min   strtrim string format   fmt_mm  contour 0 0  2                      Max   strtrim string format   fmt_mm  contour 0 1  2      if contour inter NE  1  then           p subtitle    p subtitle  Int   strtrim string format   fmt_mm  contour inter  2    ENDIF   if size vectlegende   type  EQ 8  then begin     unite    vectlegende 1       p subtitle    p subtitle C  vecteurf unite                      : Min   strtrim string format   fmt_mm  vectlegende 0 0  2                      Max   strtrim string format   fmt_mm  vectlegende 0 1  2    endif     Shapping of subdomain  s dimensions       la1   strtrim string format   fmt_bt  lat1  2    la2   strtrim string format   fmt_bt  lat2  2    lo1   strtrim string format   fmt_bt  lon1  2    lo2   strtrim string format   fmt_bt  lon2  2    pr1   strtrim string format   fmt_bt  vert1  2    pr2   strtrim string format   fmt_bt  vert2  2      Management of the date       if n_elements vardate  EQ 0 then vardate       if NOT keyword_set direc  then direc       if strpos direc   t  NE  1 then begin     svardate   strtrim vairdate time 0  1     strtrim vairdate time jpt 1  1    ENDIF ELSE svardate   vardate     case on the caes where the caption is applied        case coupe of      xy :begin                 if strupcase vargrid  EQ  W  then firstz   firstzw         ELSE firstz   firstzt       if strpos direc   z  EQ  1 AND firstz NE 0  then BEGIN         prof   strtrim round gdep 0  1           p title   expf varexp datef svardate fieldf varname depthf prof legniv       ENDIF ELSE  p title   expf varexp datef svardate fieldf varname        x title   lontitle        y title   lattitle     end       xz :begin       IF keyword_set npts  THEN n   strtrim npts  1  ELSE n   strtrim ny  1        IF long n  LE 3 THEN zonalf    Section           if keyword_set endpoints  AND lat1 NE lat2 then             p title   endpointsf varexp datef svardate fieldf varname ELSE                p title   zonalf varexp datef svardate fieldf varname        x title   lontitle       if keyword_set endpoints  AND lat1 EQ lat2 then BEGIN          IF key_onearth THEN  x title    x title  at  strtrim lataxe 0  0  lat1  1  ELSE  x title    x title  at j index  strtrim lat1  1        ENDIF        y title   depthf2     end       yz :begin       IF keyword_set npts  THEN n   strtrim npts  1  ELSE n   strtrim nx  1        IF long n  LE 3 THEN meridf           if keyword_set endpoints  AND lon1 NE lon2 then             p title   endpointsf varexp datef svardate fieldf varname ELSE                p title   meridf varexp datef svardate fieldf varname        y title   vertz        x title   lattitle       if keyword_set endpoints  AND lon1 EQ lon2 then BEGIN          IF key_onearth THEN  x title    x title  at  strtrim lonaxe 0  0  lon1  1  ELSE  x title    x title  at i index  strtrim lon1  1        ENDIF     end       xt :begin           IF keyword_set npts  THEN n   strtrim npts  1        if keyword_set endpoints  AND lat1 NE lat2 then             p title   diaghovxt varexp fieldf varname ELSE                p title        hovxt varexp fieldf varname       IF  time size time 0 1    time 0  GE 10 THEN  y title   timef        x title   lontitle       if keyword_set endpoints  AND lat1 EQ lat2 then BEGIN          IF key_onearth THEN  x title    x title  at  strtrim lataxe 0  0  lat1  1  ELSE  x title    x title  at j index  strtrim lat1  1        ENDIF     end       yt :begin           IF keyword_set npts  THEN n   strtrim npts  1         if keyword_set endpoints  AND lon1 NE lon2 then             p title   diaghovyt varexp fieldf varname ELSE                p title        hovyt varexp fieldf varname       IF  time size time 0 1    time 0  GE 10 THEN  x title   timef        y title   lattitle       if keyword_set endpoints  AND lon1 EQ lon2 then BEGIN          IF key_onearth THEN  x title    x title  at  strtrim lonaxe 0  0  lon1  1  ELSE  x title    x title  at i index  strtrim lon1  1        ENDIF     end       zt :begin           IF keyword_set npts  THEN n   strtrim npts  1  ELSE n strtrim nx ny  1         p title   hovzt varexp fieldf varname        y title   depthf2       IF  time size time 0 1    time 0  GE 10 THEN  x title   timef     end      t :begin           IF keyword_set npts  THEN n   strtrim npts  1  ELSE BEGIN               if keyword_set integration3d  then n strtrim nx ny nz  1  ELSE n strtrim nx ny  1            ENDELSE         p title   hovt varexp fieldf varname        y title   varname       IF  time size time 0 1    time 0  GE 10 THEN  x title   timef     end      x :begin                       IF keyword_set npts  THEN n   strtrim npts  1  ELSE n strtrim ny nz  1        if keyword_set endpoints  AND lat1 NE lat2 then             p title   endpointsf varexp datef svardate fieldf varname ELSE                p title               varexp datef svardate fieldf varname        x title   lontitle       if keyword_set endpoints  AND lat1 EQ lat2 then BEGIN          IF key_onearth THEN  x title    x title  at  strtrim lataxe 0  0  lat1  1  ELSE  x title    x title  at j index  strtrim lat1  1        ENDIF        y title   varname     end      y :begin                       IF keyword_set npts  THEN n   strtrim npts  1  ELSE n strtrim nx nz  1        if keyword_set endpoints  AND lon1 NE lon2 then             p title   endpointsf varexp datef svardate fieldf varname ELSE                p title               varexp datef svardate fieldf varname        x title   lattitle       if keyword_set endpoints  AND lon1 EQ lon2 then BEGIN          IF key_onearth THEN  x title    x title  at  strtrim lonaxe 0  0  lon1  1  ELSE  x title    x title  at i index  strtrim lon1  1        ENDIF        y title   varname     end      z :begin       IF keyword_set npts  THEN n   strtrim npts  1  ELSE n   strtrim nx ny  1         p title   varexp datef svardate fieldf varname        y title   depthf2        x title   varname     end      yfx : BEGIN       IF keyword_set npts  THEN n   strtrim npts  1  ELSE n   strtrim nx ny nz  1         p title   varexp datef svardate varunit        x title   varname2        y title   varname     END      else:   ENDCASE   if keyword_set direc  then BEGIN     if strpos direc   x  NE  1 then           p subtitle   lonintf lo1   lo2 onf strtrim nx  1  points    C   p subtitle     if strpos direc   y  NE  1 then BEGIN       if strpos p subtitle    EQ  1 then             p subtitle   latintf la1   la2 onf strtrim ny  1  points    C p subtitle         ELSE  p subtitle   latintf la1   la2 onf strtrim ny  1  points    p subtitle     ENDIF     if strpos direc   z  NE  1 AND  nz NE 1 OR coupe NE  xy  then BEGIN        if strpos p subtitle    EQ  1 then             p subtitle   depintf pr1   pr2 onf strtrim nz  1  points    C p subtitle         ELSE  p subtitle   depintf pr1   pr2 onf strtrim nz  1  points    p subtitle     ENDIF   ENDIF   if keyword_set endpoints  AND coupe NE  yt  AND lat1 NE lat2 then  p title    p title C C       if keyword_set key_performance  THEN print   temps legende  systime 1 tempsun    return end"); 
    292 a[290] = new Array("./ToBeReviewed/PLOTS/plotsym.html", "plotsym.pro", "", "       file_comments   function to make plotting symbols much easier        categories   Graphics      Keyword circle    circle symbol       Keyword TRIANGLE   triangle symbol       Keyword DIAMOND    diamond symbol       Keyword BOX   box symbol       Keyword LINE   line symbol       Keyword SCALE   scales the symbol       Keyword ANGLE   angle the symbol should be rotated       Keyword _EXTRA   extra keywords for usersym   These are thick  color and fill      history   Written by:   Ronn Kling   Ronn Kling Consulting   7038 Westmoreland Dr    Warrenton  VA 20187   klingrl juno com   copyright 1999  all rights reserved      version    Id: plotsym pro 163 2006 08 29 12:59:46Z navarro         function plotsym  circle circle  triangle triangle  diamond diamond                      angle angle  box box  line line  scale scale                      _extra extra     compile_opt idl2  strictarrsubs   if not keyword_set scale  then scale 1 0 if not keyword_set angle  then angle 0 0  if keyword_set circle  then begin   theta   findgen 30 29 360  endif else if keyword_set triangle  then begin   theta    30 90 210   30  endif else if keyword_set diamond  then begin   theta    0 90 180 270 0  endif else if keyword_set box  then begin   theta    315 45 135 225 315  endif else if keyword_set line  then begin   theta    180 0  endif  theta   theta   angle x   cos theta    dtor    scale y   sin theta    dtor    scale  usersym  x y  _extra extra return 8 end"); 
    293 a[291] = new Array("./ToBeReviewed/PLOTS/reinitplt.html", "reinitplt.pro", "", "             file_comments   This procedure will reinitialize all or a selection    of the system plot variables      categories   Utilities         keyword X   clear the appropriate variable      keyword Y   clear the appropriate variable        keyword Z    clear the appropriate variable       keyword P   clear the appropriate variable      keyword ALL    Clear all  this is equivalent to  x y z p      keyword INVERT   Invert the logic  Clear all unselected variables    Therefore  clearplt all invert  does nothing       uses   common pro       restrictions   The system plot variables are changed       history   Written by: Trevor Harris  Physics Dept  University of Adelaide   July  1990      Sebastien Masson 7 5 98      version    Id: reinitplt pro 163 2006 08 29 12:59:46Z navarro             pro reinitplt  all all x x y y z z p p  invert invert       compile_opt idl2  strictarrsubs    clearx   0  cleary   0  clearz   0  clearp   0  if  keyword_set x  then clearx   1  if  keyword_set y  then cleary   1  if  keyword_set z  then clearz   1  if  keyword_set p  then clearp   1  if  keyword_set all                or  not keyword_set x  and not keyword_set y  and                   not keyword_set z  and not keyword_set p  then begin      clearx   1  cleary   1  clearz   1  clearp   1  endif   if  keyword_set invert  then begin  clearx   not clearx  cleary   not cleary  clearz   not clearz  clearp   not clearp  endif   if  clearx  then begin                  x charsize 0                  x GRIDSTYLE 0                  X MARGIN 10 3             X MINOR 0                  X OMARGIN 0 0                   x region 0           X RANGE 0                  x STYLE 5                   x tick 1                  x TICKFORMAT                   x TICKLEN 0                  x tickname                   x ticks 0                  X TICKV 0 X TICKV 1   x title                   x TYPE 0  endif  if  cleary  then begin                  y charsize 0                  y GRIDSTYLE 0                  Y MARGIN 10 3             Y MINOR 0                  Y OMARGIN 0 0                   y region 0           Y RANGE 0                  y STYLE 5                   y tick 1                  y TICKFORMAT                   y TICKLEN 0                  y tickname                   y ticks 0                  Y TICKV 0 Y TICKV 1   y title                   y TYPE 0  endif  if  clearz  then begin                  z charsize 0                  z GRIDSTYLE 0                  Z MARGIN 10 3             Z MINOR 0                  Z OMARGIN 0 0                   z region 0           Z RANGE 0                  z STYLE 1                   z tick 1                  z TICKFORMAT                   z TICKLEN 0                  z tickname                   z ticks 0                  Z TICKV 0 Z TICKV 1   z title                   z TYPE 0  endif  if  clearp  then begin  p BACKGROUND d n_colors 1    255  p CHARSIZE 1   p CHARTHICK 0   p LINESTYLE 0   p MULTI replicate 0 5   p NOERASE 0   p POSITION 0   p region 0                   p title   p subtitle   p ticklen 0 02                  p thick 0 1                  p color 0  endif  return  end      "); 
    294 a[292] = new Array("./ToBeReviewed/PLOTS/style.html", "style.pro", "", "             file_comments    Choose the way to trace isolines       categories   Graphics      param LABSTYLE  in required    Number to which the style of drawing choosen refer to       param LEVEL_Z2D  in required    Vector containing values of isolignes to be traced       param LINESTYLE  out    Vector used to define the isocontour s style         Comment: remember:  Index Linestyle   0 Solid   1 Dotted   2 Dashed   3 Dash Dot   4 Dash Dot Dot Dot   5 Long Dashes        param THICK  out    Vector defining the thick of the isoline       history   Sebastien Masson  smasson lodyc jussieu fr       version    Id: style pro 163 2006 08 29 12:59:46Z navarro             pro style labstyle level_z2d linestyle thick     compile_opt idl2  strictarrsubs      case labstyle of       0: begin  series: Two thin continuous lines  one boldface continuous line          thick 1 1 2           linestyle 0           return       end       1: begin  series: Before the middle of levels: thin dash  Then thin continuous trait    If the middle of the drawing is drawn  it is in boldface continuous trait           impair n_elements level_z2d 2 fix n_elements level_z2d 2           a replicate 0 fix n_elements level_z2d 2           b replicate 1 fix n_elements level_z2d 2           c replicate 2 fix n_elements level_z2d 2                    if impair then begin             thick b 2 b              linestyle c 0 a           endif else begin             thick 0              linestyle c a           endelse          return       end       2: begin  series: Before the sill  defined by answering to a question : thin dash    Then thin continuous trait  If the sill is drawn  it is in boldface continuous trait           seuil xquestion Quelle est la limite tirets trait continu   0           seuil   float seuil           rien where level_z2d lt seuil n           a replicate 0 n_elements level_z2d n           c replicate 2 n                    if seuil eq level_z2d n  then begin             thick replicate 1 n 2 replicate 1 n_elements level_z2d 1 n              linestyle c a           endif else begin             thick 0              linestyle c a           endelse          return       end       3: begin          n   n_elements level_z2d           seuil   level_z2d 1 n 2            thick   intarr n           thick indgen n 4 4    1          thick indgen n 4 4 1    1          thick indgen n 4 4 2    2          thick indgen n 4 4 3    1           linestyle   intarr n           linestyle indgen n 4 4    3          linestyle indgen n 4 4 1    0          linestyle indgen n 4 4 2    0          linestyle indgen n 4 4 3    0           labels   intarr n           labels indgen n 2 2    1          labels n 2    0           return       end       4: begin   Boldface continuous trait           seuil   1 e 6          thick replicate 5   n_elements level_z2d           linestyle 0           rien where abs level_z2d max abs level_z2d  LT seuil           if rien 0  NE  1 then thick rien 0    3       end       else: begin          ras   report Le numero de labstyle demande n existe pas           stop       end    endcase    return end"); 
    295 a[293] = new Array("./ToBeReviewed/PLOTS/symbols.html", "symbols.pro", "", "       file_comments   Create custom plotting symbols       param NSYM  in required                      1   open circle                  2   filled circle                  3   arrow pointing right                  4   arrow pointing left                  5   arrow pointing up                  6   arrow pointing down                  7   arrow pointing up and left  45 degrees    8   arrow pointing down and left   9   arrow pointing down and right    10   arrow pointing up and right    11 through 18 are bold versions of 3 through 10   19   horizontal line   20   box   21   diamond   22   triangle   30   filled box   31   filled diamond   32   filled triangle       param SCALE  in required    size of symbols        keyword COLOR   color of symbols      restrictions   The desired symbol is stored in the user buffer and    will be plotted if  P PSYM   8       history   Jeff Bennett  U of Colorado  198       version    Id: symbols pro 142 2006 07 21 12:47:49Z navarro       pro symbols nsym scale color col     compile_opt idl2  strictarrsubs   on_error 2 fill   0 case 1 of       nsym le 2 :   begin                          circles                        for large scales increase number of points for res                        if scale ge 4 then a   findgen 25  else                         a   findgen 13                        a   a    3 14159   6         0   12 or 24  pi 6                       xarr   cos a                        yarr   sin a                        if nsym eq 2 then fill   1                     end       nsym ge 3 nsym le 18 :   begin            arrow heads                       xarr   fltarr 5                        yarr   xarr                       xarr 1    10                        xarr 2    6                        yarr 2    2                         nsyms greater than 10 should be filled arrows                       if nsym gt 10 then begin                          xarr 3    6                            xarr 4    10                           yarr 3     2                           fill   1                       endif else begin                          xarr 3    10                           xarr 4    6                           yarr 4     2                        endelse                       case 1 of                           nsym eq 3 : dummy   0b                           nsym eq 4 : xarr    1 xarr                           nsym eq 11 nsym eq 12 : begin                             xarr   extrac xarr 0 11                              yarr   extrac yarr 0 11                              yarr 6    0 5                             xarr 7    6                             yarr 7    0 5                             xarr 8    6                             yarr 8     0 5                             yarr 9     0 5                             if nsym eq 12 then begin                                rotation xarr yarr 180 nx ny                                xarr   nx                                yarr   ny                             endif                                                      end                           nsym eq 5 nsym eq 13 : begin                             temp   xarr                             xarr   yarr                             yarr   temp                                                      end                           nsym eq 6 nsym eq 14 : begin                             temp    1 xarr                             xarr   yarr                             yarr   temp                                                      end                           nsym ge 7 nsym le 10                                nsym ge 15 nsym le 18 : begin                             case 1 of                                   nsym eq 7 nsym eq 15 : deg   45                                   nsym eq 8 nsym eq 16 : deg   135                                   nsym eq 9 nsym eq 17 : deg   225                                   nsym eq 10 nsym eq 18 : deg   315                             endcase                             rotation xarr yarr deg nx ny                             xarr   nx                             yarr   ny                                                   end    end nsym ge 7                       endcase                                    end     nsym between 3 and 18       nsym eq 20 nsym eq 21 nsym eq 30 nsym eq 31 :  begin                       xarr   fltarr 5    3                       yarr   xarr                       xarr 1     3                        xarr 2     3                        yarr 2     3                        yarr 3     3                        if  nsym eq 21 nsym eq 31  then begin                          rotation xarr yarr 45 nx ny                          nx   0 70   nx      shrink the x direction                          xarr   nx                          yarr   ny                       endif                       if nsym ge 30 then fill   1                                    end     nsym 20 21 30 31       nsym eq 22 nsym eq 32 :  begin   side length 6  0 at centroid                       yarr   fltarr 4    6 4                        xarr   fltarr 4    6 2                        xarr 1    6 2                        xarr 2    0                        yarr 2    6 sqrt 3 2    6 4                        if nsym eq 32 then fill   1                                     end      else:                          begin                       xarr   fltarr 2    1                       yarr   xarr   0                        xarr 1     1                                      end endcase   xarr   xarr   scale yarr   yarr   scale    set symbol buffer if keyword_set col  then usersym xarr yarr fill fill color col else     usersym xarr yarr fill fill   return end"); 
    296 a[294] = new Array("./ToBeReviewed/POSTSCRIPT/calibre.html", "calibre.pro", "", "           file_comments   From a rapport of aspect and values  in line of character  of different margins     it calculate POSFENETRE and POSBAR which serve to place the drawing and the color    bar thanks to  p position on a leaf or a screen output whose the window has the same    proportion       categories    Graphics         param RAPPORTYX  in required    Scale rapport between the length of the y axis and the x one  For example     for an xy map: RAPPORTYX lat2 lat1 lon2 lon1       param MARGE  in required type vector    Vector made of 4 elements containing the size of the left  right  up and    bottom margin having to surround the graph  All is measured in lines of characters       param MARGEBAR  in required type vector    Vector made of 4 elements containing the size of the left  right and bottom    margin and  BEWARE  the last element is this time the position of the right up    corner  having to surround the color bar  All is measured in lines of characters       param SMALLDRAW  in required type vector    2 possibilities:      It is vector made of 4 elements giving  in portrait or landscape  the position    of the frame in which the drawing must go in  This position is given by coordinates    of the 2 corners of the frame: in the left bottom and the right up  It is always     for a postscript or a screen output  express in cm  the origin being the    left bottom corner       It is a vector made of 3 elements giving the number of column to be done in the    drawing  the number of line and the number of the case the number have to occupy     see matlab  For example  to do 6 drawing in 3 columns and 2 lines and occupy    the 4th case  small 2 3 4       keyword REMPLI   Force the drawing to occupy the biggest possible place defined by    SMALLDRAW without respect the rapport y on x       keyword YXASPECT   Force the rapport y on x to take the value RAPPORTYX YXASPECT     This keyword can be used in 2 cases:     1  YXASPECT 1 : force RAPPORTYX to be respected otherwise  Calibre take the      initiative to change it a little in the case of the aspect rapport of SMALL      is too different of the one of SMALLDRAW       2  YXASPECT n : multiply by n the aspect rapport given by default       For example in plt  RAPPORTYX is calculated to the reference be orthonormal      to have a reference where the y axis is 2 time bigger than the x one  YXASPECT 2       keyword PORTRAIT          Force the page or the window to be in standing position        keyword LANDSCAPE          Force the page or the window on the screen to be in lengthened position        keyword _EXTRA   Used to pass your keywords      param POSFENETRE  type vector    It is a vector made of 4 elements containing the position of the frame    containing captions   the graph in normalized coordinates     Comment: to position the drawing  we have to do  p position POSFENETRE    after the call of calibre       param POSBAR  type vector    See POSFENTRE but for the color bar  Same comment to position the color bar   p position POSBAR      uses   common pro      history   Sebastien Masson  smasson lodyc jussieu fr   11 12 98      version    Id: calibre pro 163 2006 08 29 12:59:46Z navarro           pro calibre  rapportyx  marge  margebar  smalldraw  posfenetre  posbar                  REMPLI   rempli  YXASPECT   yxaspect  PORTRAIT   portrait                  LANDSCAPE   lanscape  _extra   ex       compile_opt idl2  strictarrsubs    cm_4ps   IF NOT keyword_set key_forgetold  THEN BEGIN  updatenew  updatekwd   ENDIF        tempsun   systime 1            For key_performance      if keyword_set portrait  then key_portrait 1    if keyword_set landscape  then key_portrait 0    if keyword_set yxaspect  then begin       rapportyx rapportyx yxaspect        test2 0    endif else begin       yxaspect 1        test2 1     ENDELSE        mipgsz   min page_size  max   mapgsz      choice of Landscape or Portrait      if n_elements key_portrait  eq 0  then begin       if rapportyx ge 1 then key_portrait 1       if rapportyx lt 1 then key_portrait 0    endif     If smalldraw is count like in matlab      if n_elements smalldraw  EQ 3  then begin       if n_elements page_margins  EQ 0 then page_margins    1  1  1  1        smalldraw   long smalldraw        nbrecol   smalldraw 0        nbrelig   smalldraw 1        numero   smalldraw 2 1       numlig   numero nbrecol       numcol   numero numlig nbrecol       bas   mipgsz key_portrait mapgsz 1 key_portrait         cote   mapgsz key_portrait mipgsz 1 key_portrait         poscol   page_margins 0 findgen nbrecol 1 1 bas page_margins 0 page_margins 1 nbrecol        poslig   cote page_margins 3 findgen nbrelig 1 1 cote page_margins 2 page_margins 3 nbrelig        smalldraw    poscol numcol  poslig numlig 1  poscol numcol 1  poslig numlig     endif     determination of the size of characters  p charsize       nombre_de_mots_ds_titre   60      p charsize 1 smalldraw 2 smalldraw 0 d x_px_cm          nombre_de_mots_ds_titre   d y_ch_size     if  p charsize gt 1 then  p charsize 1     transfert of margin in cm      cm 1 d x_px_cm    marge 1  marge    d y_ch_size    p charsize   cm    margebar 1  margebar    d y_ch_size    p charsize   cm     definition of the part of the leaf where we draw      if key_portrait eq 0 then begin       big smalldraw 2 smalldraw 0        small smalldraw 3 smalldraw 1     endif else begin       small smalldraw 2 smalldraw 0        big smalldraw 3 smalldraw 1     endelse    if key_portrait eq 0 then       rapportmax 1 small marge 3 marge 1 big marge 2 marge 0       else rapportmax 1 small marge 2 marge 0 big marge 3 marge 1      If YXASPECT is not specified  we modify the value of RAPPORTYX    to it match better with the leaf s proportions       if rapportyx le rapportmax then begin       if test2 then begin          rap 1 rapportmax rapportyx          if rap ge 5  and rap lt 6  then rapportyx rapportyx 1 5          if rap ge 6  and rap lt 7  then rapportyx rapportyx 2           if rap ge 7  and rap lt 8  then rapportyx rapportyx 2 5          if rap ge 8  then rapportyx rapportyx 3        endif    endif else begin       if test2 then begin          rap 1 rapportmax rapportyx          if rap lt 1 5  and rap ge 1 6  then rapportyx rapportyx 1 5          if rap lt 1 6  and rap ge 1 7  then rapportyx rapportyx 2           if rap lt 1 7  and rap ge 1 8  then rapportyx rapportyx 2 5          if rap lt 1 8  then rapportyx rapportyx 3        endif    endelse     in the case where we do a Landscape:      if key_portrait eq 0 then begin              if keyword_set rempli  then begin          xs big          ys small       endif else begin          if rapportyx le rapportmax then begin             xs big             ys 1 big marge 0 marge 1 rapportyx marge 2 marge 3              if ys gt small then begin                xs 1 small marge 2 marge 3 rapportyx marge 0 marge 1                 ys small             endif          endif else begin             xs 1 small marge 2 marge 3 rapportyx marge 0 marge 1              ys small             if xs gt big then begin                xs big                ys 1 big marge 0 marge 1 rapportyx marge 2 marge 3              endif          endelse       endelse       xoff 1 small ys 2 smalldraw 1        yoff 1 big xs 2 xs mapgsz smalldraw 2        a 1 mapgsz yoff mapgsz       b 1 xoff mipgsz       c a 1 xs mapgsz       d b 1 ys mipgsz    endif       In the case where we do a portrait:      else begin              if keyword_set rempli  then begin          xs small          ys big       endif else begin          if rapportyx le rapportmax then begin             xs small             ys 1 small marge 0 marge 1 rapportyx marge 2 marge 3              if ys gt big then begin                xs 1 big marge 2 marge 3 rapportyx marge 0 marge 1                 ys big             endif          endif else begin             xs 1 big marge 2 marge 3 rapportyx marge 0 marge 1              ys big             if xs gt small then begin                xs small                ys 1 small marge 0 marge 1 rapportyx marge 2 marge 3              endif          endelse       endelse       xoff 1 small xs 2 smalldraw 0        yoff 1 big ys 2 smalldraw 1        a 1 xoff mipgsz       b 1 yoff mapgsz       c a 1 xs mipgsz       d b 1 ys mapgsz       xset   xoff       yset   yoff    endelse      bas mapgsz 1 key_portrait mipgsz key_portrait    cote mipgsz 1 key_portrait mapgsz key_portrait    posfenetre a b c d  marge 0 bas  marge 2 cote                              marge 1 bas marge 3 cote      posbar a b c d  margebar 0 bas  margebar 2 cote                          margebar 1 bas ys margebar 3 cote        if keyword_set key_performance  THEN print   temps calibre  systime 1 tempsun     IF NOT keyword_set key_forgetold  THEN BEGIN     updateold   ENDIF        return end"); 
    297 a[295] = new Array("./ToBeReviewed/POSTSCRIPT/chcolps.html", "chcolps.pro", "", "     file_comments           categories          param TABLE          restrictions          examples        history         version    Id: chcolps pro 163 2006 08 29 12:59:46Z navarro     PRO format_colortable_hexa  table     compile_opt idl2  strictarrsubs        tvlct  r  g  b   get      z   strarr 256      y   strarr 256      for k 0 255 do z k 00 strtrim string r k  format    Z 2      for k 0 255 do y k y k strmid z k strlen z k 2 2       for k 0 255 do z k 00 strtrim string g k  format    Z 2      for k 0 255 do y k y k strmid z k strlen z k 2 2       for k 0 255 do z k 00 strtrim string b k  format    Z 2      for k 0 255 do y k y k strmid z k strlen z k 2 2           table    strlowcase y   END        file_comments    Build a bloc of colortable       categories          param TABLEOUT          restrictions          examples        history         version    Id: chcolps pro 163 2006 08 29 12:59:46Z navarro     PRO build_table  tableout         compile_opt idl2  strictarrsubs        format_colortable_hexa  table       tableout   strarr 25       tableout 0     COLORTAB  def       END         file_comments    Modify colors of a postscript file      categories          param N1  in required    Number of elements in the first dimension       param N2  in required    Number of elements in the second dimension       param FILE   A scalar of string type  the name of the  pro  file to be tested    if necessary  the input name is completed with  pro  and its path   found in  path      keyword PALIT1          keyword PALIT2          restrictions          examples        history   G  Roullet 1999      version    Id: chcolps pro 163 2006 08 29 12:59:46Z navarro     PRO chcolps  n1  n2  file  PALIT1   palit1  PALIT2   palit2           recuperate palettes       compile_opt idl2  strictarrsubs       lct  n1     IF keyword_set palit1  THEN palit  palit1     tvlct  red  green  blue   get      lct  n2     IF keyword_set palit2  THEN palit  palit2     tvlct  red1  green1  blue1   get           filein   file     fileout   file new           openr  numin  filein   get_lun     openw  numout  fileout   get_lun     ligne         nl   0     colortab   0     Scan le fichier       WHILE NOT eof numin  DO BEGIN            readf  numin  ligne  format    A            nl   nl 1     Replace setrgbcolor statements             pos   strpos ligne   setrgbcolor            IF pos NE  1 THEN BEGIN                  r   round float strmid ligne  pos 18  6 255                  g   round float strmid ligne  pos 12  6 255                  b   round float strmid ligne  pos 6  6 255                            ind   where r EQ red AND g EQ green AND b EQ blue                  ind   ind 0                  IF ind 0  NE  1 THEN BEGIN                        r1   red1 ind 255                        g1   green1 ind 255                        b1   blue1 ind 255                        color   string r1  g1  b1  format    3 F5 3 : X                        strput  ligne  color  pos 18                 ENDIF ELSE BEGIN                        print   erreur ligne :  nl                       dist   abs r red abs g green abs b blue                        ind    where dist EQ min dist 0                        ind   ind 0                         print   je trouve              long r  g  b                         print   je remplace par    red ind  green ind  blue ind                        r1   red1 ind 255                        g1   green1 ind 255                        b1   blue1 ind 255                        color   string r1  g1  b1  format    3 F5 3 : X                        strput  ligne  color  pos 18                 ENDELSE            ENDIF                 Replace COLORTAB             pos   strpos ligne   COLORTAB            IF pos NE  1 THEN BEGIN                  build_table  table                 n   0                 colortab   1           ENDIF             IF colortab THEN BEGIN                 ligne   table n                  n   n 1                 IF n EQ 24 THEN colortab   0           ENDIF      Ecrit le fichier de sorti             printf  numout  ligne  format    A      ENDWHILE      close  numin     close  numout     free_lun  numin     free_lun  numout      spawn   gs  fileout  END  "); 
    298 a[296] = new Array("./ToBeReviewed/POSTSCRIPT/ps.html", "ps.pro", "", ""); 
    299 a[297] = new Array("./ToBeReviewed/STATISTICS/a_correlate2d.html", "a_correlate2d.pro", "", "       file_comments         categories   Statistics      param X  in required    An 2 dimension Array  nx ny       param LAG  in required    2 element vector  in the intervals  nx 2   nx 2 ny 2   ny 2    of type integer that specifies the absolute distance s  between    indexed elements of X       keyword ZERO2NAN      keyword DOUBLE   If set to a non zero value  computations are done in double precision arithmetic       history   28 2 2000 Sebastien Masson  smasson lodyc jussieu fr    Based on the A_CORRELATE procedure of IDL      version    Id: a_correlate2d pro 163 2006 08 29 12:59:46Z navarro        FUNCTION auto_cov2d  X  Lag  Double   Double  zero2nan   zero2nan     compile_opt idl2  strictarrsubs      XDim   SIZE X   dimensions     nx   XDim 0     ny   XDim 1   Sample autocovariance function    Xmean   TOTAL X  Double   Double     1 nx ny       res   TOTAL   X 0:nx 1 lag 0  0:ny 1 lag 1    Xmean                       X lag 0 :nx 1  lag 1 :ny 1    Xmean                      Double   Double      if keyword_set zero2nan  AND res EQ 0 then res    values f_nan    RETURN  res  END        file_comments   This function computes the autocorrelation Px K L  or   autocovariance Rx K L  of a sample population X nx ny  as a   function of the lag  K L       categories   Statistics      param X  in required    An 2 dimension Array  nx ny       param LAG  in required    2 element vector  in the intervals  nx 2   nx 2 ny 2   ny 2    of type integer that specifies the absolute distance s  between    indexed elements of X       keyword COVARIANCE   If set to a non zero value  the sample autocovariance is computed       keyword DOUBLE   If set to a non zero value  computations are done in double precision arithmetic       history   28 2 2000 Sebastien Masson  smasson lodyc jussieu fr    Based on the A_CORRELATE procedure of IDL      version    Id: a_correlate2d pro 163 2006 08 29 12:59:46Z navarro         FUNCTION a_correlate2d  X  Lag  Covariance   Covariance  Double   Double     compile_opt idl2  strictarrsubs     Compute the sample autocorrelation or autocovariance of  Xt  Xt l   as a function of the lag  l      ON_ERROR  2     XDim   SIZE X   dimensions     XNDim   SIZE X   n_dimensions     nx   XDim 0     ny   XDim 1     if XNDim NE 2 then       MESSAGE   X array must contain 2 dimensions   Check length     if nx lt 2 then       MESSAGE   first dimension of X array must contain 2 or more elements     if ny lt 2 then       MESSAGE   second dimension of X array must contain 2 or more elements     if n_elements Lag  NE 2 THEN       MESSAGE   Lag array must contain 2 elements       If the DOUBLE keyword is not set then the internal precision and  result are identical to the type of input     if N_ELEMENTS Double  eq 0 then       Double    SIZE X   type  eq 5      if KEYWORD_SET Covariance  eq 0 then begin  Compute Autocorrelation        Auto   Auto_Cov2d X  ABS Lag  Double   Double                Auto_Cov2d X   0L  0L  Double   Double   zero2nan     endif else begin              Compute Autocovariance        Auto   Auto_Cov2d X  ABS Lag  Double   Double    n_elements X      endelse     if Double eq 0 then RETURN  FLOAT Auto  else       RETURN  Auto  END"); 
    300 a[298] = new Array("./ToBeReviewed/STATISTICS/a_timecorrelate.html", "a_timecorrelate.pro", "", "     file_comments         categories   Statistics      param X  in required type array    An Array which last dimension is the time dimension so   size n       param M        param NT        keyword ZERO2NAN        keyword DOUBLE   If set to a non zero value  computations are done in   double precision arithmetic       examples        history        version    Id: a_timecorrelate pro 163 2006 08 29 12:59:46Z navarro       FUNCTION timeauto_cov  X  M  nT  Double   Double  zero2nan   zero2nan  Sample autocovariance function     compile_opt idl2  strictarrsubs      TimeDim   size X   n_dimensions     Xmean   TOTAL X  TimeDim  Double   Double    nT    if double then one   1 0d ELSE one   1 0    Xmean   Xmean replicate one  nT   M         case TimeDim of       1:res   TOTAL X 0:nT   M   1L    Xmean     X M:nT   1L    Xmean                        TimeDim  Double   Double        2:res   TOTAL X  0:nT   M   1L    Xmean                           X  M:nT   1L    Xmean                          TimeDim  Double   Double        3:res   TOTAL X    0:nT   M   1L    Xmean                           X    M:nT   1L    Xmean                          TimeDim  Double   Double        4:res   TOTAL X      0:nT   M   1L    Xmean                           X      M:nT   1L    Xmean                          TimeDim  Double   Double     ENDCASE    if keyword_set zero2nan  then begin       zero   where res EQ 0        if zero 0  NE  1 then res zero     values f_nan    endif    RETURN  res  END      file_comments   Same function as A_CORRELATE but accept array  until 4   dimension  for input and do the autocorrelation or the   autocovariance along the time dimension which must be the last   one of the input array      This function computes the autocorrelation Px L  or autocovariance   Rx L  of a sample population X as a function of the lag  L       categories   Statistics      param X  in required type array    An Array which last dimension is the time dimension so   size n       param LAG  in required type scalar or vector    A scalar or n element vector  in the interval  n 2   n 2    of type integer that specifies the absolute distance s  between    indexed elements of X       keyword COVARIANCE   If set to a non zero value  the sample autocovariance   is computed       keyword DOUBLE   If set to a non zero value  computations are done in   double precision arithmetic       examples         Define an n element sample population            x    3 73  3 67  3 77  3 83  4 67  5 87  6 70  6 97  6 40  5 57            Compute the autocorrelation of X for LAG    3  0  1  3  4  8           lag    3  0  1  3  4  8            result   a_correlate x  lag            The result should be:            0 0146185  1 00000  0 810879  0 0146185   0 325279   0 151684       history   24 2 2000 Sebastien Masson  smasson lodyc jussieu fr      Based on the A_CORRELATE procedure of IDL   INTRODUCTION TO STATISTICAL TIME SERIES   Wayne A  Fuller   ISBN 0 471 28715 6      version    Id: a_timecorrelate pro 163 2006 08 29 12:59:46Z navarro        FUNCTION a_timecorrelate  X  Lag  COVARIANCE   Covariance  DOUBLE   Double     compile_opt idl2  strictarrsubs     Compute the sample autocorrelation or autocovariance of  Xt  Xt l   as a function of the lag  l      ON_ERROR  2     XDim   SIZE X   dimensions     XNDim   SIZE X   n_dimensions     nT   XDim XNDim 1                                   Check length     if nT lt 2 then       MESSAGE   Time axis of X array must contain 2 or more elements       If the DOUBLE keyword is not set then the internal precision and  result are identical to the type of input     if N_ELEMENTS Double  eq 0 then       Double    SIZE X   type  eq 5          if n_elements lag  EQ 0 then lag   0    nLag   N_ELEMENTS Lag      if nLag eq 1 then Lag    Lag   Create a 1 element vector      case XNDim of       1:if Double eq 0 then Auto   FLTARR nLag  else Auto   DBLARR nLag        2:if Double eq 0 then Auto   FLTARR XDim 0  nLag  else Auto   DBLARR XDim 0  nLag        3:if Double eq 0 then Auto   FLTARR XDim 0  XDim 1  nLag          else Auto   DBLARR XDim 0  XDim 1  nLag        4:if Double eq 0 then Auto   FLTARR XDim 0  XDim 1  XDim 2  nLag          else Auto   DBLARR XDim 0  XDim 1  XDim 2  nLag     endcase     if KEYWORD_SET Covariance  eq 0 then begin  Compute Autocorrelation        for k   0  nLag 1 do          case XNDim of          1:Auto k    TimeAuto_Cov X  ABS Lag k  nT  Double   Double                TimeAuto_Cov X  0L  nT  Double   Double   zero2nan           2:Auto  k    TimeAuto_Cov X  ABS Lag k  nT  Double   Double                TimeAuto_Cov X  0L  nT  Double   Double   zero2nan           3:Auto    k    TimeAuto_Cov X  ABS Lag k  nT  Double   Double                TimeAuto_Cov X  0L  nT  Double   Double   zero2nan           4:Auto      k    TimeAuto_Cov X  ABS Lag k  nT  Double   Double                TimeAuto_Cov X  0L  nT  Double   Double   zero2nan        endcase    endif else begin              Compute Autocovariance        for k   0  nLag 1 do           case XNDim of          1:Auto k    TimeAuto_Cov X  ABS Lag k  nT  Double   Double    nT          2:Auto  k    TimeAuto_Cov X  ABS Lag k  nT  Double   Double    nT          3:Auto    k    TimeAuto_Cov X  ABS Lag k  nT  Double   Double    nT          4:Auto      k    TimeAuto_Cov X  ABS Lag k  nT  Double   Double    nT       endcase    endelse     if Double eq 0 then RETURN  FLOAT Auto  else       RETURN  Auto  END"); 
    301 a[299] = new Array("./ToBeReviewed/STATISTICS/c_timecorrelate.html", "c_timecorrelate.pro", "", "     file_comments         categories   Statistics      param XD        param YD        param M        param NT        param NDIM        keyword ZERO2NAN        keyword DOUBLE   If set to a non zero value  computations are done in   double precision arithmetic       examples        history        version    Id: c_timecorrelate pro 163 2006 08 29 12:59:46Z navarro       FUNCTION timecross_cov  Xd  Yd  M  nT  Ndim  Double   Double  ZERO2NAN   zero2nan    Sample cross covariance function     compile_opt hidden      case Ndim OF       1:res   TOTAL Xd 0:nT   M   1L    Yd M:nT   1L                          Double   Double        2:res   TOTAL Xd  0:nT   M   1L    Yd  M:nT   1L                          Ndim  Double   Double        3:res   TOTAL Xd    0:nT   M   1L    Yd    M:nT   1L                          Ndim  Double   Double        4:res   TOTAL Xd      0:nT   M   1L    Yd      M:nT   1L                          Ndim  Double   Double     ENDCASE    if keyword_set zero2nan  then begin       zero   where res EQ 0        if zero 0  NE  1 then res zero     values f_nan    ENDIF      RETURN  res  END      file_comments   This function computes the  time cross correlation  Pxy L  or   the  time cross covariance  between 2 arrays  this is some   kind of c_correlate but for multidimenstionals arrays  as a   function of the lag  L       categories   Statistics      param X  in required type array    An Array which last dimension is the time dimension of   size n  float or double       param Y  in required type array    An Array which last dimension is the time dimension of   size n  float or double       param LAG  in required type scalar or vector    A scalar or n element vector  in the interval  n 2   n 2    of type integer that specifies the absolute distance s  between   indexed elements of X       keyword COVARIANCE   If set to a non zero value  the sample cross    covariance is computed       keyword DOUBLE   If set to a non zero value  computations are done in   double precision arithmetic       examples            Define two n element sample populations            x    3 73  3 67  3 77  3 83  4 67  5 87  6 70  6 97  6 40  5 57            y    2 31  2 76  3 02  3 13  3 72  3 88  3 97  4 39  4 34  3 95            Compute the cross correlation of X and Y for LAG    5  0  1  5  6  7           lag    5  0  1  5  6  7            result   c_timecorrelate x  y  lag            The result should be:            0 428246  0 914755  0 674547   0 405140   0 403100   0 339685       history           01 03 2000 Sebastien Masson  smasson lodyc jussieu fr          Based on the C_CORRELATE procedure of IDL           August 2003 Sebastien Masson          update according to the update made in C_CORRELATE by         W  Biagiotti and available in IDL 5 5           INTRODUCTION TO STATISTICAL TIME SERIES         Wayne A  Fuller         ISBN 0 471 28715 6      version    Id: c_timecorrelate pro 163 2006 08 29 12:59:46Z navarro       FUNCTION c_timecorrelate  X  Y  Lag  Covariance   Covariance  Double   Double   Compute the sample cross correlation or cross covariance of   Xt  Xt l  and  Yt  Yt l  as a function of the lag  l      ON_ERROR  2     xsize   SIZE X     ysize   SIZE Y     nt   float xsize xsize 0     NDim   xsize 0      if total xsize 0:xsize 0  NE ysize 0:ysize 0  NE 0 then       MESSAGE   X and Y arrays must have the same size and the same dimensions    Check length     if nt lt 2 then       MESSAGE   Time dimension of X and Y arrays must contain 2 or more elements       If the DOUBLE keyword is not set then the internal precision and  result are identical to the type of input     if N_ELEMENTS Double  eq 0 then       Double    Xsize Xsize 0 1  eq 5 or ysize ysize 0 1  eq 5      if n_elements lag  EQ 0 then lag   0    nLag   N_ELEMENTS Lag    Deviations    if double then one   1 0d ELSE one   1 0    Ndim   size X   n_dimensions     Xd   TOTAL X  Ndim  Double   Double    nT    Xd   X   Xd replicate one   nT     Yd   TOTAL Y  Ndim  Double   Double    nT    Yd   Y   Yd replicate one   nT      if nLag eq 1 then Lag    Lag   Create a 1 element vector      case NDim of       1:if Double eq 0 then  Cross   FLTARR nLag  else  Cross   DBLARR nLag        2:if Double eq 0 then  Cross   FLTARR Xsize 1  nLag  else  Cross   DBLARR Xsize 1  nLag        3:if Double eq 0 then  Cross   FLTARR Xsize 1  Xsize 2  nLag          else  Cross   DBLARR Xsize 1  Xsize 2  nLag        4:if Double eq 0 then  Cross   FLTARR Xsize 1  Xsize 2  Xsize 3  nLag          else  Cross   DBLARR Xsize 1  Xsize 2  Xsize 3  nLag     endcase     if KEYWORD_SET Covariance  eq 0 then begin  Compute Cross  Crossation        for k   0  nLag 1 do begin          if Lag k  ge 0 then BEGIN              case NDim of                1: Cross k    TimeCross_Cov Xd  Yd  Lag k  nT  Ndim  Double   Double                 2: Cross  k    TimeCross_Cov Xd  Yd  Lag k  nT  Ndim  Double   Double                 3: Cross    k    TimeCross_Cov Xd  Yd  Lag k  nT  Ndim  Double   Double                 4: Cross      k    TimeCross_Cov Xd  Yd  Lag k  nT  Ndim  Double   Double                endcase          ENDIF else BEGIN              case NDim of                1: Cross k    TimeCross_Cov Yd  Xd  ABS Lag k  nT  Ndim  Double   Double                 2: Cross  k    TimeCross_Cov Yd  Xd  ABS Lag k  nT  Ndim  Double   Double                 3: Cross    k    TimeCross_Cov Yd  Xd  ABS Lag k  nT  Ndim  Double   Double                 4: Cross      k    TimeCross_Cov Yd  Xd  ABS Lag k  nT  Ndim  Double   Double               endcase          ENDELSE         ENDFOR        div   sqrt TimeCross_Cov Xd  Xd  0L  nT  Ndim  Double   Double   zero2nan                        TimeCross_Cov Yd  Yd  0L  nT  Ndim  Double   Double   zero2nan         Cross   temporary Cross temporary div replicate one  nLag     endif else begin              Compute Cross Covariance        for k   0  nLag 1 do begin          if Lag k  ge 0 then BEGIN             case NDim of                1: Cross k    TimeCross_Cov Xd  Yd  Lag k  nT  Ndim  Double   Double    nT                2: Cross  k    TimeCross_Cov Xd  Yd  Lag k  nT  Ndim  Double   Double    nT                3: Cross    k    TimeCross_Cov Xd  Yd  Lag k  nT  Ndim  Double   Double    nT                4: Cross      k    TimeCross_Cov Xd  Yd  Lag k  nT  Ndim  Double   Double    nT             ENDCASE          ENDIF else BEGIN              case NDim of                1: Cross k    TimeCross_Cov yd  xd  ABS Lag k  nT  Ndim  Double   Double    nT                2: Cross  k    TimeCross_Cov yd  xd  ABS Lag k  nT  Ndim  Double   Double    nT                3: Cross    k    TimeCross_Cov yd  xd  ABS Lag k  nT  Ndim  Double   Double    nT                4: Cross      k    TimeCross_Cov yd  xd  ABS Lag k  nT  Ndim  Double   Double    nT             ENDCASE          ENDELSE        endfor    endelse     if Double eq 0 then RETURN  FLOAT Cross  else RETURN   Cross  END   "); 
    302 a[300] = new Array("./ToBeReviewed/STRING/chkeywd.html", "chkeywd.pro", "", "             file_comments   In a string containing an order to execute with EXECUTE by example     We change the value of one of keywords    More generally  in a string  we look for the character chain:   keywdname      and we change the value of       categories   String  keywords         param STRINGIN  in required type string    it is a string      param KEYWDNAME  in required type string    it is a string designating the name of keyword to look for       param KEYWDVALUE  in required     The new value of the keyword to considerate in STRINGIN      keyword SEPARATOR   To look for the keyword  we look for the first sign   which follow    the position of keywdname  By default  we substitute the string    before the comma  With the keyword SEPARATOR we can modify the cut    of the string  SEPARATOR give a Character before the one we have to    look for the comma which delimit the keyword in the string     see examples       keyword AFTER   To look for the keyword  we look for the first sign   which follow    the position of keywdname  By default  we substitute the string    before the comma  With the keyword AFTER we can modify the cut    of the string  AFTER give a Character after the one we have to    look for the comma which delimit the keyword in the string     see examples       returns    stringout stringin modified if keywdname has been found in stringin      uses    common pro      restrictions   If keywdvalue is an array  it will be convert in a vector       restrictions   Beware  this function has loops  ifs ad cases everywhere  So it can    not be used by big keywords  with a lot of elements which are big    arrays  The input keyword must not contain Complex floatings  structure     Double precision complex  Pointer  Object reference  Unsigned Integer     Unsigned Longword Integer  64 bit Integer or Unsigned 64 bit Integer          examples       IDL  b ok 111  year 1997 1998 1999  age_capitaine 35      IDL  print  b     ok 111  year 1997 1998 1999  age_capitaine 35     IDL  print  chkeywd b ok c est bon      ok c est bon  year 1997 1998 1999  age_capitaine 35     IDL  print  chkeywd b YEAR indgen 5 sep      ok 111  year 0 1 2 3 4  age_capitaine 35     IDL  print  chkeywd b YEAR indgen 5 sep after      ok 111  year 0 1 2 3 4  age_capitaine 35     IDL  b ok 111   year   age_capitaine      IDL  print  chkeywd b year c est bon      ok 111  year c est bon   age_capitaine      history   Sebastien Masson  smasson lodyc jussieu fr                         18 10 1999                        24 11 1999: adaptation for keywords starting by         version    Id: chkeywd pro 163 2006 08 29 12:59:46Z navarro             FUNCTION chkeywd  stringin  keywdname  keywdvalue  SEPARATOR   separator  AFTER   after     compile_opt idl2  strictarrsubs       stringout   stringin    poskeywd   strpos strlowcase stringout  strlowcase keywdname     if poskeywd EQ  1 then return  stringout    while poskeywd NE  1 do BEGIN   change a keyword starting by  toto       if strmid stringout poskeywd 1 1  EQ   then BEGIN          ajoute   keywdname tostr keywdvalue           stringout   strmid stringout  0  poskeywd 1 ajoute strmid stringout poskeywd strlen keywdname             poskeywd   poskeywd strlen ajoute           poskeywd   strpos stringout  keywdname  poskeywd        ENDIF ELSE BEGIN    change a keyword sarting by toto           posegal   strpos stringout    poskeywd           if posegal EQ  1 then return  stringout           if NOT keyword_set separator  then separator              posvirgule   strpos stringout  separator  posegal 1           if keyword_set after  then posvirgule   strpos stringout    posvirgule 1             ELSE posvirgule   rstrpos stringout    posvirgule 1           if posvirgule EQ  1 then posvirgule   strlen stringout             stringout   strmid stringout  0  posegal 1 tostr keywdvalue strmid stringout  posvirgule             poskeywd   strpos stringout  keywdname  posvirgule 1        ENDELSE     endwhile     return   stringout end"); 
    303 a[301] = new Array("./ToBeReviewed/STRING/delchr.html", "delchr.pro", "", "         file_comments   Delete all occurrences of a character from a text string        categories      param OLD  in required    original text string        param C  in required    character to delete       keyword HELP      returns   new   resulting string        history         R  Sterner   5 Jul  1988          Johns Hopkins Applied Physics Lab          RES 11 Sep  1989   converted to SUN          R  Sterner  27 Jan  1993   dropped reference to array      Copyright  C  1988  Johns Hopkins University Applied Physics Laboratory   This software may be used  copied  or redistributed as long as it is not   sold and this copyright notice is reproduced on each copy made   This   routine is provided as is without any express or implied warranties   whatsoever   Other limitations apply as described in the file disclaimer txt       version    Id: delchr pro 163 2006 08 29 12:59:46Z navarro            FUNCTION delchr  OLD  C  help hlp     compile_opt idl2  strictarrsubs      if  n_params 0  lt 2  or keyword_set hlp  then begin    print  Delete all occurrences of a character from a text string     print  new   delchr old  char     print    old   original text string      in     print    char   character to delete      in     print    new   resulting string          out     return   1  endif    B   BYTE OLD      convert string to a byte array   CB   BYTE C      convert char to byte   w   where b ne cb 0   if w 0  eq  1 then return        Nothing left   return  string b w      Return new string   END"); 
    304 a[302] = new Array("./ToBeReviewed/STRING/getfile.html", "getfile.pro", "", "         file_comments   Read a text file into a string array       param filein  in required    text file name        Keyword ERROR    err  error flag: 0 ok  1 file not opened    2 no lines in file                keyword QUIET    means give no error message                keyword LINES    n  Number of lines to read  def all    Much faster if number of lines is known    Automatic for IDL 5 6 or later                keyword FIND    search the file in the all  path directories  use   find pro       keyword HELP       returns       history         R  Sterner  20 Mar  1990         R  Sterner  1999 Apr 14   Added LINES n keyword          R  Sterner  2003 Aug 29   Automatic lines if IDL 5 6          R  Sterner  2003 Sep 02   Check if file exists first          R  Sterner  2003 Sep 04   Fixed error in number of lines in file          R  Sterner  2003 Oct 10   Fixed error when no lines          R  Sterner  2004 Jan 27   Fixed to work in IDL as old as vers 4            S  Masson  smasson lodyc jussieu fr  4 Feb 2002         search te file in the all  path directories  use find pro          when using  find keyword  Use spawn   cat  for unix os      Copyright  C  1990  Johns Hopkins University Applied Physics Laboratory   This software may be used  copied  or redistributed as long as it is not   sold and this copyright notice is reproduced on each copy made   This   routine is provided as is without any express or implied warranties   whatsoever   Other limitations apply as described in the file disclaimer txt       version    Id: getfile pro 192 2006 09 22 09:37:08Z smasson            function getfile  filein  error err  help hlp  quiet quiet  lines lines  find   find     compile_opt idl2  strictarrsubs      if  n_params 0  lt 1  or keyword_set hlp  then begin    print  Read a text file into a string array     print  s   getfile f     print    f   text file name       in     print    s   string array         out     print  Keywords:     print    ERROR err  error flag: 0 ok  1 file not opened     print      2 no lines in file     print     QUIET means give no error message     print    LINES n  Number of lines to read  def all     print      Much faster if number of lines is known     print      Automatic for IDL 5 6 or later     return   1  endif           if keyword_set find  then begin           file   find filein            file   file 0            if file EQ  NOT FOUND  then begin             print    Error in getfile: File  filein  not fouond              return   1           endif         ENDIF ELSE file   filein                  if  version release 0  ge 5 5  then begin           f   call_function file_search  file  count   c   endif else begin    f   findfile file count c   endelse  if c eq 0 then begin    err   1    return   endif    if n_elements line  eq 0 and  version release 0  ge 5 6  then begin    lines   file_lines file     if lines eq 0 then begin      if not keyword_set quiet  then print  No lines in file       err   2      return 1    endif    minlines   0  endif else minlines 1    get_lun  lun  on_ioerror  err  openr  lun  file    if n_elements lines  ne 0 then begin    s   strarr lines     readf lun s  endif else begin    s          t        while not eof lun  do begin      readf  lun  t      s    s t     endwhile  endelse    close  lun  free_lun  lun  if n_elements s  eq minlines then begin    if not keyword_set quiet  then print  No lines in file     err   2    return 1  endif  if minlines eq 1 then s s 1:     err   0  return  s   err: if  err eq  168 then begin    if not keyword_set quiet  then print  Non standard text file format     free_lun  lun    return  s  endif  if not keyword_set quiet  then print       Error in getfile: File  file  not opened   free_lun  lun  err   1  return   1    end"); 
    305 a[303] = new Array("./ToBeReviewed/STRING/getwrd.html", "getwrd.pro", "", "         file_comments   Return the n th word from a text string        categories      param TXTSTR  in required    text string to extract from    The first element is used if txt is an array       param NTH  in required    word number to get  first   0   def       param MTH  in required    optional last word number to get       keyword LOCATION     l   Return word n string location                keyword DELIMITER     d  Set word delimiter  def   space   tab                keyword LAST   means n is offset from last word   So n 0 gives   last word  n 1 gives next to last      If n 2 and m 0 then last 3 words are returned       keyword NOTRIM   suppresses whitespace trimming on ends        keyword NWORDS     n  Returns number of words in string        returns wrd   returned word or words       uses   getwrd_com       restrictions   If a NULL string is given  txt  then the last string   given is used   This saves finding the words again    If m   n wrd will be a string of words from word n to   word m   If no m is given wrd will be a single word    n n wrd will be a string of words from word n to     print       word m   If no m is given wrd will be a single word     print       n 0  Smaller of in and im    im   im   0   to zero     if  in gt lst  and  im gt lst  then return    Out of range     in   in   lst  Larger of in and im    im   im   lst   to be last     ll   loc in  Nth word start     return  strtrim strmid txtstr0 ll loc im loc in len im  2    endif    N   ABS NTH  Allow nth 0   IF N GT NWDS 1 THEN RETURN  out of range  null   ll   loc n  N th word position   IF NTH LT 0 THEN GOTO  NEG  Handle nth 0   IF MTH GT NWDS 1 THEN MTH   NWDS 1  Words to end     if keyword_set notrim  then begin    RETURN  STRMID TXTSTR0 ll LOC MTH LOC NTH LEN MTH   endif else begin    RETURN  strtrim STRMID TXTSTR0 ll LOC MTH LOC NTH LEN MTH  2    endelse   NEG: if keyword_set notrim  then begin    RETURN  STRMID TXTSTR0 ll 9999   endif else begin    RETURN  strtrim STRMID TXTSTR0 ll 9999  2   endelse    END"); 
    306 a[304] = new Array("./ToBeReviewed/STRING/isnumber.html", "isnumber.pro", "", "         file_comments   Determine if a text string is a valid number       categories      param TXT0  in required    text string to test       param X  in required       keyword HELP      returns         x   optionaly returned numeric value if valid            i   test flag:                                               0: not a number              1: txt is a long integer              2: txt is a float               1: first word of txt is a long integer               2: first word of txt is a float        history         R  Sterner   15 Oct  1986          Johns Hopkins Applied Physics Lab          R  Sterner  12 Mar  1990   upgraded          Richard Garrett  14 June  1992   fixed bug in returned float value          R  Sterner  1999 Nov 30   Fixed a bug found by Kristian Kjaer  Denmark     Copyright  C  1986  Johns Hopkins University Applied Physics Laboratory   This software may be used  copied  or redistributed as long as it is not   sold and this copyright notice is reproduced on each copy made   This   routine is provided as is without any express or implied warranties   whatsoever   Other limitations apply as described in the file disclaimer txt       version    Id: isnumber pro 142 2006 07 21 12:47:49Z navarro            function isnumber  txt0  x  help hlp     compile_opt idl2  strictarrsubs     if  n_params 0  lt 1  or keyword_set hlp  then begin    print  Determine if a text string is a valid number     print  i   isnumber txt   x     print    txt   text string to test                       in     print    x   optionaly returned numeric value if valid   out     print    i   test flag:                                  out     print        0: not a number     print        1: txt is a long integer     print        2: txt is a float     print         1: first word of txt is a long integer     print         2: first word of txt is a float     return   1  endif    txt   strtrim txt0 2  trim blanks   x   0  define X     if txt eq   then return  0  null string not a number     sn   1  if nwrds txt  gt 1 then begin  get first word if more than one     sn    1    txt   getwrd txt 0   endif      f_flag   0  Floating flag   b   byte txt  Convert to byte array   if b 0  eq 45 then b b 1:  Drop leading       Kristian Kjaer  if b 0  eq 43 then b b 1:  Drop leading       bug fix   w   where b eq 43  cnt  Look for    if cnt gt 1 then return  0  Alow only 1   t   delchr txt  Drop it   w   where b eq 45  cnt  Look for    if cnt gt 1 then return  0  Allow only 1   t   delchr t  Drop it   w   where b eq 46  cnt  Look for    if cnt gt 1 then return  0  Allow only 1   if cnt eq 1 then f_flag   1  If one then floating   t   delchr t  Drop it   w   where b eq 101  cnt  Look for  e   if cnt gt 1 then return  0  Allow only 1   if cnt eq 1 then f_flag   1  If 1 then assume float   t   delchr t e  Drop it   w   where b eq 69  cnt  Look for  E   if cnt gt 1 then return  0  Allow only 1   if cnt eq 1 then f_flag   1  If 1 then assume float   t   delchr t E  Drop it   w   where b eq 100  cnt  Look for  d   if cnt gt 1 then return  0  Allow only 1   if cnt eq 1 then f_flag   1  If 1 then assume float   t   delchr t d  Drop it   w   where b eq 68  cnt  Look for  D   if cnt gt 1 then return  0  Allow only 1   if cnt eq 1 then f_flag   1  If 1 then assume float   t   delchr t D  Drop it     Allow only one  e   E   d  or  D      if total b eq 101 b eq 69 b eq 100 b eq 68  gt 1 then return 0  b   byte t     Allow no alphabetic characters     if total b ge 65  and  b le 122  ne 0 then return  0    c   strmid t 0 1   if  c lt  0  or  c gt  9  then return  0    First char not a digit     x   txt   0 0       Convert to a float   if f_flag eq 1 then return  2 sn       Was floating   if x eq long x  then begin    x   long x     return  sn  endif else begin    return  2 sn  endelse    end"); 
    307 a[305] = new Array("./ToBeReviewed/STRING/lenstr.html", "lenstr.pro", "", "    ROUTINE:         lenstr   USEAGE:          result lenstr str      input:    str             a single string or string array       output:    result          length of the string s  in normalized units                    the number of elements of RESULT matches the number of                     elements of STRING       procedure:                    This function returns the physical length of the                    string on the output device  not the number of                    characters   This is done by first switching to  X                     and writing the string s  with XYOUTS in graphics                    mode 5  which disables display to the screen but                    does not interfere with operation of XYOUTS   The                    WIDTH keyword parameter of XYOUTS is used to                    retrieve the physical length of the string s       author:  Paul Ricchiazzi                            7apr93             Institute for Computational Earth System Science             University of California  Santa Barbara      todo seb       function lenstr str     compile_opt idl2  strictarrsubs      dsave d name     thisOS    VERSION OS_FAMILY    thisOS   STRMID thisOS  0  3     thisOS   STRUPCASE thisOS     CASE thisOS of        MAC : SET_PLOT  thisOS        WIN : SET_PLOT  thisOS       ELSE: SET_PLOT   X     ENDCASE     p BACKGROUND d n_colors 1    255     p color 0    if  d n_colors gt 256 then  p background ffffff x     device get_graphics oldg set_graphics 5    if keyword_set charsize  eq 0 then charsize 1    nn n_elements str      case nn of        0:w 0        1:xyouts 0 0 device str width w        else:begin          w fltarr nn           for i 0 nn 1 do begin             xyouts 0 0 device str i width ww             w i ww          endfor       end    endcase     fac1 float d x_ch_size d x_vsize   ratio of char width to device1 width     device set_graphics oldg    set_plot dsave    IF dsave EQ  X  OR dsave EQ  MAC  OR dsave EQ  WIN  then BEGIN        p BACKGROUND d n_colors 1    255        p color 0       if  d n_colors gt 256 then  p background ffffff x    ENDIF     fac2 float d x_ch_size d x_vsize   ratio of char width to device2 width     return w fac2 fac1             string width adjusted for device width end "); 
    308 a[306] = new Array("./ToBeReviewed/STRING/nwrds.html", "nwrds.pro", "", "         file_comments   Return the number of words in the given text string        categories      param TXTSTR     text string to examine       keyword DELIMITER     d   Set delimiter character  def   space        keyword HELP      returns   n   number of words found        restrictions   See also getwrd        history         R  Sterner   7 Feb  1985          Johns Hopkins University Applied Physics Laboratory          RES 4 Sep  1989   converted to SUN      Copyright  C  1985  Johns Hopkins University Applied Physics Laboratory   This software may be used  copied  or redistributed as long as it is not   sold and this copyright notice is reproduced on each copy made   This   routine is provided as is without any express or implied warranties   whatsoever   Other limitations apply as described in the file disclaimer txt       version    Id: nwrds pro 142 2006 07 21 12:47:49Z navarro              function nwrds txtstr  help hlp  delimiter delim     compile_opt idl2  strictarrsubs      if  n_params 0  lt 1  or keyword_set hlp  then begin    print  Return the number of words in the given text string     print  n   nwrds txt     print    txt   text string to examine              in     print    n   number of words found                 out     print  Keywords:     print    DELIMITER   d   Set delimiter character  def   space     print  Notes: See also getwrd     return   1  endif    if strlen txtstr  eq 0 then return 0  A null string has 0 words   ddel       Default word delimiter is a space   if n_elements delim  ne 0 then ddel   delim   Use given word delimiter   tst    byte ddel 0  Delimiter as a byte value          tb   byte txtstr                                String to bytes          if ddel eq     then begin                       Check for tabs            w   where tb eq 9B  cnt                       Yes            if cnt gt 0 then tb w    32B                  Convert any to space          endif  x   tb ne tst  Locate words   x    0 x 0  Pad ends with delimiters     y    x shift x 1  eq 1  Look for word beginnings     n   fix total y  Count word beginnings     return  n    end"); 
    309 a[307] = new Array("./ToBeReviewed/STRING/putfile.html", "putfile.pro", "", "         file_comments   Write a text file from a string array        categories      param FILE  in required type string      text file name       param S  in required type string or array      string array       keyword ERROR    err  error flag: 0 ok  1 invalid string array        history         R  Sterner  20 Mar  1990         R  Sterner   4 Nov  1992   allowed scalar strings      Copyright  C  1990  Johns Hopkins University Applied Physics Laboratory   This software may be used  copied  or redistributed as long as it is not   sold and this copyright notice is reproduced on each copy made   This   routine is provided as is without any express or implied warranties   whatsoever   Other limitations apply as described in the file disclaimer txt       version    Id: putfile pro 163 2006 08 29 12:59:46Z navarro            pro putfile  file  s  error err  help hlp     compile_opt idl2  strictarrsubs      if  n_params 0  lt 1  or keyword_set hlp  then begin    print  Write a text file from a string array     print  putfile  f  s     print    f   text file name       in     print    s   string array         in     print  Keywords:     print    ERROR err  error flag: 0 ok  1 invalid string array     return  endif           if lmgr demo  then begin            print   you are in Demo mode  It is impossible to write a file             return         endif     if size s   type  ne 7 then begin    print  Error in putfile: argument must be a string array     err   1    return  endif    get_lun  lun  openw  lun  file    for i   0  n_elements s 1 do begin    t   s i     if t eq   then t          printf  lun  t  endfor    close  lun  free_lun  lun  err   0  return    end"); 
    310 a[308] = new Array("./ToBeReviewed/STRING/str_size.html", "str_size.pro", "", "       file_comments   The purpose of this function is to return the proper   character size to make a specified string a specified   width in a window  The width is specified in normalized   coordinates  The function is extremely useful for sizing   strings and labels in resizeable graphics windows       categories   Graphics  Widget      param STRING  in required    This is the string that you want to make a specified   target size or width       param TARGETWIDTH  in optional default 0 25    This is the target width of the string in normalized   coordinates in the current graphics window  The character   size of the string  returned as thisCharSize  will be   calculated to get the string width as close as possible to   the target width       keyword INITSIZE  default 1 0      This is the initial size of the string  Default is 1 0       keyword STEP default 0 05    This is the amount the string size will change in each step   of the interactive process of calculating the string size       returns    thisCharSize  This is the size the specified string should be set   to if you want to produce output of the specified target   width  The value is in standard character size units where   1 0 is the standard character size       examples   To make the string  Happy Holidays  take up 30  of the width of   the current graphics window  type this:       XYOUTS  0 5  0 5  ALIGN 0 5   Happy Holidays        CHARSIZE STR_SIZE Happy Holidays  0 3       history   Written by: David Fanning  17 DEC 96    Added a scaling factor to take into account the aspect ratio   of the window in determing the character size  28 Oct 97  DWF      version    Id: str_size pro 163 2006 08 29 12:59:46Z navarro        FUNCTION str_size  string  targetWidth  INITSIZE initsize  STEP step     compile_opt idl2  strictarrsubs    ON_ERROR  1       Check positional parameters   np   N_PARAMS  CASE np OF    0: MESSAGE   One string parameter is required     1: targetWidth   0 25    ELSE: ENDCASE       Check keywords  Assign default values   IF N_ELEMENTS step  EQ 0 THEN step   0 05 IF N_ELEMENTS initsize  EQ 0 THEN initsize   1 0       Calculate a trial width   size   initsize XYOUTS  0 5  0 5  ALIGN 0 5  string  WIDTH thisWidth          CHARSIZE size   NORMAL       Size is perfect   IF thisWidth EQ targetWidth THEN RETURN  size   Float D Y_Size D X_Size       Initial size is too big   IF thisWidth GT targetWidth THEN BEGIN    REPEAT BEGIN      XYOUTS  0 5  0 5  ALIGN 0 5  string  WIDTH thisWidth            CHARSIZE size   NORMAL       size   size   step    ENDREP UNTIL thisWidth LE targetWidth    RETURN  size   Float D Y_Size D X_Size ENDIF       Initial size is too small   IF thisWidth LT targetWidth THEN BEGIN    REPEAT BEGIN      XYOUTS  0 5  0 5  ALIGN 0 5  string  WIDTH thisWidth            CHARSIZE size   NORMAL       size   size   step    ENDREP UNTIL thisWidth GT targetWidth    size   size   step   Need a value slightly smaller than target     RETURN  size   Float D Y_Size D X_Size ENDIF  END"); 
    311 a[309] = new Array("./ToBeReviewed/STRING/string2struct.html", "string2struct.pro", "", "     file_comments   This is a really  really cool way to turn keywords into   a structure        categories        keyword _EXTRA   used to pass your keywords      returns        restrictions        examples        history        version    Id: string2struct pro 157 2006 08 21 09:01:50Z navarro     function too_cool _extra extra     compile_opt idl2  strictarrsubs   return extra end         file_comments   Takes an input string set up as keywords and returns an anonymous structure    This is particularly useful for taking keywords entered by a user in a text   field and passing then to other routines       categories   Utilities      param STRVAL  IN REQUIRED    String set up as keywords  Keywords require a little special treatment  Such as   plot findgen 100 _extra stringToStructure title testing       RETURNS    This function returns the string as an anonymous structure  If an   error was found then this function returns a structure with a null field       examples         The code below creates a widget that uses this routine          pro tPlot event         widget_control event top get_uvalue field         widget_control field get_value strVal         extra   stringToStructure strVal          plot findgen 100 _extra extra         wshow         return         end           pro testWid          enter any keyword to plot and see how it works         base   widget_base col          field   cw_field base title test value ax 0 string          void   widget_button base value plot event_pro tPlot          widget_control base realize set_uvalue field         xmanager testWid base no_block         return         end      history         Written by:         RLK  Ronn Kling Consulting          ronn rlkling com         www rlkling com                 May  1999      version    Id: string2struct pro 157 2006 08 21 09:01:50Z navarro        function string2struct strVal     compile_opt idl2  strictarrsubs   r   execute extra   too_cool    strVal 0     if r   0 then user did not enter keywords correctly so  return a structure with a null field  if r eq 0 then begin   print Error in input string    return null:0  endif return extra end "); 
    312 a[310] = new Array("./ToBeReviewed/STRING/strkeywd.html", "strkeywd.pro", "", "             file_comments   Translate a structure in a string able to be used to specify keywords    in the calling of a function when we use EXECUTE  see example       categories        param STRUCT   a structure      returns   a string composed like following:   For each element of the structure  we write a part of the string as:             name_of_the_element content_of_the_element       restrictions   If an element of the structure contain an array  it will be convert in a vector       restrictions   Beware  this function has loops  ifs ad cases everywhere  So it can    not be used by big keywords  with a lot of elements which are big    arrays  The input keyword must not contain Complex floatings  structure     Double precision complex  Pointer  Object reference  Unsigned Integer     Unsigned Longword Integer  64 bit Integer or Unsigned 64 bit Integer       examples   We create a structure         IDL  b get_extra ok 111  year 1997 1998 1999  age_capitaine 35          IDL  help  b struct           Structure   3 tags  length 10  refs 1:            AGE_CAPITAINE   INT             35            OK              INT            111            YEAR            INT       Array 3    We put this structure as a string         IDL  a strkeywd b          IDL  print  a         AGE_CAPITAINE 35  OK 111  YEAR 1997 1998 1999    Now we can use the string a to pass keywords in a function thanks to execute          IDL  test execute c get_extra a          IDL  help  c struct           Structure   3 tags  length 10  refs 1:            AGE_CAPITAINE   INT             35            OK              INT            111            YEAR            INT       Array 3       history   Sebastien Masson  smasson lodyc jussieu fr                         11 10 1999      version    Id: strkeywd pro 163 2006 08 29 12:59:46Z navarro             FUNCTION strkeywd  struct     compile_opt idl2  strictarrsubs      if size struct   type  NE 8 then return        tname   tag_names struct     if n_elements tname  EQ 0 then return         on s occupe du premier element      res   strlowcase tname 0 tostr struct 0     if n_elements tname  EQ 1 then return   res     on s occupe des autres elements      for n   1 n_elements tname 1 do res   res   strlowcase tname n tostr struct n       return   res end"); 
    313 a[311] = new Array("./ToBeReviewed/STRING/strright.html", "strright.pro", "", "         file_comments   return right subportion from a string      categories   String       param S  in required    the string to be searched      param LASTN  in required default 1    the number of characters to be returned    If NLAST is the strlen STRING  the complete string   is returned       returns   The portion of LASTN characters of S counted from the back       examples   if  strright path  ne   then path   path          history          mgs  19 Nov 1997: VERSION 1 00      version    Id: strright pro 163 2006 08 29 12:59:46Z navarro         Copyright  C  1997  Martin Schultz  Harvard University   This software is provided as is without any warranty   whatsoever  It may be freely used  copied or distributed   for non commercial purposes  This copyright notice must be   kept with any copy of this software  If this software shall   be used commercially or sold as part of a larger package    please contact the author to arrange payment    Bugs and comments should be directed to mgs io harvard edu   with subject  IDL routine strright      function strright s lastn     compile_opt idl2  strictarrsubs         on_error 2     return to caller       if  n_elements s  le 0  then return 1L       l   strlen s        if  n_elements lastn  le 0  then lastn   1     if lastn gt l then lastn   l       result   strmid s l lastn l        return result end"); 
    314 a[312] = new Array("./ToBeReviewed/STRING/strsci.html", "strsci.pro", "", "         file_comments   Given a number  returns a string of that          B   number in scientific notation format   e g  A x 10         categories   String      param DATA  in required    A floating point or integer number to be   converted into a power of 10       keyword FORMAT  default f12 2    The format specification used in the string   conversion for the mantissa  i e  the    A  of  A x 10 B         keyword POT_ONLY   Will return only the  power of 10  part of the   string  i e  the  10 B   Default is to return   the entire string  e g   A x 10 B         keyword MANTISSA_ONLY   return only mantissa of the string      keyword SHORT   return 10 0 as  1  and 10 1 as  10       keyword TRIM   don t insert blanks  i e  return Ax10 B       restrictions   This function does not  evaluate  the format statement thoroughly   which can result in somewhat quirky strings  Example:   print strsci 9 999  results in  10 0x10 0 instead of  1 0x10 1      Need a better symbol than the  x  for the multiplier       examples          Result   STRSCI  2000000  format i1             print  result                                                                                6                prints 2 x 10 u6 n  which gets plotted as 2 x 10                     Result   STRSCI   0 0001            print  result                                                                       4                prints  1 00 x 10 u 4 n  which gets plotted as 1 00 x 10            Result   STRSCI  0d0  format f13 8             print  result                           prints  0 00000000         history          bmy  28 May 1998: VERSION 1 00            B               now returns string of the form A x 10          mgs  29 May 1998:               bug fix: now allows negative numbers               keyword MANTISSA_ONLY added               default format changed to f12 2          bmy  02 Jun 1998:               renamed to STRSCI  STRing SCIentific notation           mgs  03 Jun 1998:               added TRIM keyword          mgs  22 Sep 1998:               added SHORT keyword               modified handling of TRIM keyword          mgs  24 Sep 1998:               bug fix with SHORT flag          bmy   mgs  02 Jun 1999:               now can handle DATA 0 0 correctly               updated comments          mgs  03 Jun 1999:                can now also handle values lt 1                 and doesn t choke on arrays      version    Id: strsci pro 163 2006 08 29 12:59:46Z navarro         Copyright  C  1998  1999 Bob Yantosca and Martin Schultz     Harvard University   This software is provided as is without any warranty   whatsoever  It may be freely used  copied or distributed   for non commercial purposes  This copyright notice must be   kept with any copy of this software  If this software shall   be used commercially or sold as part of a larger package    please contact the author to arrange payment    Bugs and comments should be directed to bmy io harvard edu   or mgs io harvard edu with subject  IDL routine strsci      function strsci  Data  Format Format  POT_Only POT_Only                 MANTISSA_ONLY MANTISSA_ONLY SHORT SHORT TRIM TRIM     compile_opt idl2  strictarrsubs              Error checking   Keyword settings          on_error  2     if   n_elements  Data   eq 0   then begin       return       endif     if   not Keyword_Set  Format     then Format      f12 2      POT_Only        keyword_set  POT_Only           MANTISSA_Only   keyword_set  MANTISSA_Only      Short           Keyword_Set  Short              Trim            Keyword_Set  Trim                NDat   n_elements Data     Result   strarr NDat      for i 0 NDat 1 do begin                 If ABS  DATA     0 then we can proceed to take the common log          For DATA   0  place a   sign in front of the number               if   Abs  Data i    ne 0 0   then begin                take the common log and store in LOG10DATA          Log10Data   ALog10  Abs  Data i                       Boolean flag if data   0          sign     Data i  lt 0 0                   Compute the characteristic  int part             Add the 1d 6 to prevent roundoff errors          Characteristic   Fix  Log10Data   1 0d 6            if  Log10Data lt 0  then               Characteristic   Characteristic   1                 Compute the Mantissa  frac part  and take its antilog           Mantissa   Log10Data   Characteristic           Mantissa   10 0 Mantissa           print data i log10data mantissa characteristic format 3f24 14 i8                 String for the coefficient part              The coefficient is just antilog of the Mantissa            Add the minus sign if DATA   0 0          A   StrTrim  String  Mantissa  Format Format   2            if   Sign   then A       A                String for the power of 10 part          B    10 u    strtrim  string  Characteristic   2      n           if   Short   then begin             if   Characteristic eq 0   then B    1              if   Characteristic eq 1   then B    10           endif                composite string          Result i    A     x     B          if   Short AND B eq  1  then Result i    A                         If DATA   0  then we cannot take the common log  so return         zeroes for the result strings   Use the FORMAT string                endif else begin          A        String  0d0  Format Format            B        A          Result i    A           endelse                     Return result to calling program  depending on keyword settings          Eliminate blanks if TRIM keyword is set               if   POT_Only   then            Result i    B       if   MANTISSA_Only   then            Result i    A       if   Trim   then            Result i    StrCompress  Result i   Remove_All            endfor     if  n_elements Result  eq 1  then         Result   Result 0       return  Result  end"); 
    315 a[313] = new Array("./ToBeReviewed/STRING/strsed.html", "strsed.pro", "", "         file_comments    replace one  or more  character s string s  in a string array    modern  version of the obsolete strrepl      categories   String      param STR  in required type string array or scalar    the string to be changed      param EXP1  in required type scalar string    a single regular expression  as implemented by the STREGEX function       param EXP2  in required type scalar string    replacement character string      keyword FOLD_CASE   Indicates that the regular expression matching should be done in a case insensitive fashion       returns   string array or scalar      examples        IDL  abc    abcdefghijklmnopqrstuvwxyz       IDL  print  strsed abc   m   M       abcdefghijklMnopqrstuvwxyz      IDL  print  strsed abc   m t   M_T       abcdefghijklM_Tuvwxyz      IDL  a    abcabcabc       IDL  help  strsed abc  a   eee   abc   XXX_           STRING      Array 3       IDL  print  strsed abc  a   eee   abc   XXX_       XXX_defghijklmnopqrstuvwxyz XXX_XXX_XXX_ eee      history   Sept 2006: Sebastien Masson  smasson lodyc jussieu fr       version    Id: strsed pro 192 2006 09 22 09:37:08Z smasson     FUNCTION strsed  str  exp1  exp2  FOLD_CASE   fold_case     compile_opt idl2  strictarrsubs     strout   str   line   stregex strout  exp1    line   where line NE  1  cnt    IF cnt GT 0 THEN BEGIN     FOR i   0L  cnt 1 DO          strout line i    strjoin strsplit strout line i  exp1   extract                                                regex   preserve_null  FOLD_CASE   fold_case  exp2    ENDIF      return  strout END"); 
    316 a[314] = new Array("./ToBeReviewed/STRING/strtok.html", "strtok.pro", "", "         file_comments   Retrieve portion of string up to token        categories   String      param STRING  in required    String to be split  Contains text after in  out token on output        param TOKEN  in required    Token to use in splitting old              keyword TRIM    set to remove leading blanks from old before returning       keyword HELP   print useful message and exit        returns   new     portion of string up to token               out   old     portion of old after token                  out  in      restrictions   Input parameter old is modified    Token may be one or more characters    if token is not found  returns old and sets old to         examples         If old is  foo44 bar  then strtok  old   44    would return          foo  and upon return  old will be left with   bar   If  TRIM         were set  old would be  bar  on return            If old xyz  then new strtok old a  would return with         new xyz  and old       history          Log: strtok pro v           Revision 1 3  1996 06 14 20:00:27  mcraig         Updated Copyright info            Revision 1 2  1996 05 09 00:22:17  mcraig         Added built in help            Revision 1 1  1996 01 31 18:47:37  mcraig         Initial revision     Thanks:         To D  Linder who wrote GETTOK  part of the goddard library          upon which this is based      Release:          Name: Rel_1_2       Copyright:    Copyright  C  1996 The Regents of the University of California  All    Rights Reserved   Written by Matthew W  Craig     See the file COPYRIGHT for restrictions on distrubting this code     This code comes with absolutely NO warranty  see DISCLAIMER for details       version    Id: strtok pro 186 2006 09 20 10:50:37Z pinsard       FUNCTION strtok  string  token                     TRIM trim  HELP Help     compile_opt idl2  strictarrsubs      Back to the caller if error occurs      On_error  2      IF  n_params  NE 2  OR keyword_set Help  THEN BEGIN          offset                 print  offset Retrieve portion of string up to token          print  offset new   strtok  old  token           print  offset Inputs:          print  offset offset old     String to be split   Contains text after    in  out          print  offset offset          token on output          print  offset offset token   Token to use in splitting old               in          print  offset Keywords:          print  offset offset TRIM   set to remove leading blanks from old           print  offset offset          before returning          print  offset offset HELP   print useful message and exit          print  offset Outputs:          print  offset offset new     portion of string up to token               out          print  offset offset old     portion of old after token                  out  in          print  offset Side effects:          print  offset offset Input parameter old is modified          print  offset Notes:          print  offset offset Token may be one or more characters          print  offset offset If token is not found  returns old and sets old to           print  offset Examples:          print  offset offset If old is  foo44 bar  then strtok  old   44    would return          print  offset offset    foo  and upon return  old will be left with   bar   If  TRIM          print  offset offset   were set  old would be  bar  on return            print  offset offset If old xyz  then new strtok old a  would return with          print  offset offset   new xyz  and old          return   1     ENDIF       pos   strpos string  token       IF  pos GE 0  THEN BEGIN         front   strmid string  0  pos           string   strmid string  pos   strlen token  strlen string          IF keyword_set trim  THEN string   strtrim string  1          return  front     ENDIF          front   string     string         return  front      END "); 
    317 a[315] = new Array("./ToBeReviewed/STRING/strwhere.html", "strwhere.pro", "", "         file_comments   return position  array  for occurrence of a character in a string      categories   String      param STR  in required    the string      param SCHAR  in required    the character to look for      returns COUNT  out optional    The number of matches that were found       The function returns an index array similar to the     result of the where function      examples          ind   strwhere abcabcabc a               returns   0  3  6        history          mgs  02 Jun 1998: VERSION 1 00          bmy  30 Jun 1998:   now returns COUNT  the number                               of matches that are found  this is                              analogous to the WHERE command       version    Id: strwhere pro 163 2006 08 29 12:59:46Z navarro         Copyright  C  1998  Martin Schultz  Harvard University   This software is provided as is without any warranty   whatsoever  It may be freely used  copied or distributed   for non commercial purposes  This copyright notice must be   kept with any copy of this software  If this software shall   be used commercially or sold as part of a larger package    please contact the author to arrange payment    Bugs and comments should be directed to mgs io harvard edu   with subject  IDL routine strwhere      function strwhere str schar Count     compile_opt idl2  strictarrsubs          if  n_elements str  eq 0  then return 1        convert to byte    BStr   byte Str     BSC     byte schar 0         Search for matches    Ind   where  Bstr eq BSC  Count         bmy   return where BStr eq BSC     return  Ind  end    "); 
    318 a[316] = new Array("./ToBeReviewed/STRING/tostr.html", "tostr.pro", "", "             file_comments   Convert an input in a string       categories    String      param INPUT  in required    input can not contain or be of the type of:       Complex floating  structure  Double precision complex  Pointer  Object     reference  Unsigned Integer  Unsigned Longword Integer  64 bit     Integer  Unsigned 64 bit Integer       returns   a string      restrictions   If keywdvalue is an array  it will be convert in a vector       restrictions   Beware  this function has loops  ifs ad cases everywhere  So it can    not be used by big keywords  with a lot of elements which are big    arrays        examples      IDL  help  tostr 1 tostr a tostr indgen 4 tostr a jkfjo           STRING       1           STRING       a           STRING       0 1 2 3           STRING       a jkfjo       IDL  print  tostr c est bon c est bon        c est bon c est bon       history   Sebastien Masson  smasson lodyc jussieu fr                         18 10 1999      version    Id: tostr pro 157 2006 08 21 09:01:50Z navarro             FUNCTION tostr  input     compile_opt idl2  strictarrsubs       case 1 of       size input   type  LE 5:BEGIN           if size input   type  EQ 1 then input   long input           if n_elements input  EQ 1 then res   strtrim input  1             ELSE BEGIN              res    strtrim input 0  1              for i   1   n_elements input 1 do res   res strtrim input i  1              res   res           ENDELSE        END       size input   type  eq 7:BEGIN           if n_elements input  EQ 1 then BEGIN             sinput   strrepl input                  res    sinput           ENDIF ELSE BEGIN              res    strrepl input 0                  for i   1   n_elements input 1 do res   res strrepl input i                  res   res           ENDELSE        END       ELSE:BEGIN           ras   report la fonction tostr ne marche pas pour input qui est de type  size input   tname           res           END    ENDCASE     return  res end"); 
    319 a[317] = new Array("./ToBeReviewed/STRUCTURE/chkstru.html", "chkstru.pro", "", "       file_comments   check validity of a structure and test if necessary   fields are contained      categories   Utilities      param STRUCTURE  in required type struct    The structure to be tested  If STRUCTURE is   not of type structure  the function will return 0      param FIELDS  in required type string    A string or string array with field names to    be contained in STRUCTURE  CHKSTRU returns 1  true    only if all field names are contained in STRUCTURE    The entries of FIELDS may be upper or lowercase       keyword INDEX  type string    A named variable that will contain the indices of   the required field names in the structure  They can then   be assessed through structure index i    Index will   contain  1 for all fields entries that are not in the   structure       keyword VERBOSE   set this keyword to return an error message    in case of an error       keyword EXTRACT   set this keyword to extract a fields from the   structure    1 is return is fields or structure  are   incorrect       returns   CHKSTRU returns 1 if successful  otherwise 0       examples          test     a:1  b:2  c:3            required    a c           if CHKSTRU test required  then print found a and c           IDL  print  CHKSTRU test b              1          IDL  print  CHKSTRU test b extract                  2      history          mgs  02 Mar 1998: VERSION 1 00          mgs  07 Apr 1998:   second parameter  FIELDS  now optional          12 Jan 2001: EXTRACT keyword by S  Masson  smasson lodyc jussieu fr        version    Id: chkstru pro 163 2006 08 29 12:59:46Z navarro         Copyright  C  1998  Martin Schultz  Harvard University   This software is provided as is without any warranty   whatsoever  It may be freely used  copied or distributed   for non commercial purposes  This copyright notice must be   kept with any copy of this software  If this software shall   be used commercially or sold as part of a larger package    please contact the author to arrange payment    Bugs and comments should be directed to mgs io harvard edu   with subject  IDL routine chkstru      function chkstru structure fields index index verbose verbose  extract   extract     compile_opt idl2  strictarrsubs             default index      index    1          first check number of parameters  must be at least 1       if  n_params  lt 1  then begin          if keyword_set verbose  then                ras   report CHKSTRU:   invalid number of parameters              if keyword_set extract  THEN return 1 ELSE return 0           endif            check if the user really passed a structure        s   size structure       if  s 1 s 0  ne 8  then begin          if keyword_set verbose  then                ras   report CHKSTRU:   No structure passed              if keyword_set extract  THEN return 1 ELSE return 0       endif          only one parameter: then we are finished      if  n_params  eq 1  then return 1            see if required field names are contained in the structure        and return indices of these fields        names   tag_names structure       index   intarr n_elements fields    1     default index to  not found        for i 0 n_elements fields 1 do begin          ind   where names eq strupcase fields i           if  ind 0  lt 0  then begin              if keyword_set verbose  then                   ras   report CHKSTRU:   Cannot find field  fields i               endif else index i    ind 0       endfor            check minimum value of index field:  1 indicates error      if keyword_set extract  then BEGIN         if index 0  NE  1 THEN return  structure index 0  ELSE return   1      ENDIF ELSE return min index  ge 0    end  "); 
    320 a[318] = new Array("./ToBeReviewed/STRUCTURE/extractstru.html", "extractstru.pro", "", "           file_comments   extract elements of a structure to constitute a new structure       categories   Utilities      param STRU  in required    A structure      param LISTE  in required type vector    A vector of string including names of STRU to be deleted     by default  or to be kept  if KEEP is activated       keyword KEEP   Specify that the given liste concern elements of STRU to be kept       keyword DELETE   Specify  that the given liste concern elements of STRU to be deleted    This keyword is activated by default       returns   A structure or  1 in case of problem      examples        IDL  extra get_extra ok  year 1999  age_capitaine 35        IDL  help  extra struct        Structure   3 tags  length 6  refs 1:         AGE_CAPITAINE   INT             35         OK              INT              1         YEAR            INT           1999      IDL  help  extractstru extra ok hhuihi YEAR stru        Structure   1 tags  length 2  refs 1:         AGE_CAPITAINE   INT             35      IDL  help  extractstru extra ok hhuihi YEAR keep stru        Structure   2 tags  length 4  refs 1:         OK              INT              1         YEAR            INT           1999      history   Sebastien Masson  smasson lodyc jussieu fr                         8 10 1999      version    Id: extractstru pro 163 2006 08 29 12:59:46Z navarro              FUNCTION extractstru  stru  liste  KEEP   keep  DELETE   delete     compile_opt idl2  strictarrsubs      if size stru   type  NE 8 then return    1    if size liste   type  NE 7 then return    1   cheking for keep and vire keywords    keep   keyword_set keep 1 keyword_set delete     delete   keyword_set delete 1 keyword_set keep   keyword_set delete  EQ keep       tname   tag_names stru     index   make_selection tname  strupcase liste   only_valid   quiet       if keep then BEGIN   We just keep the list       if index 0  EQ  1 then return    1       if n_elements index  EQ n_elements tname  then return  stru       res   create_struct tname index 0  stru index 0        if n_elements index  GT 1 then for i   1  n_elements index 1 do               res   create_struct res  tname index i  stru index i     ENDIF ELSE BEGIN   We delete the list       if n_elements index  EQ n_elements tname  then return    1       if index 0  EQ  1 then return  stru   We take the complementary one of index to obtain indexes we keep        index   different indgen n_elements tname  index        res   create_struct tname index 0  stru index 0        if n_elements index  GT 1 then for i   1  n_elements index 1 do               res   create_struct res  tname index i  stru index i     ENDELSE      return  res end"); 
    321 a[319] = new Array("./ToBeReviewed/STRUCTURE/mixstru.html", "mixstru.pro", "", "             file_comments   Concatenate 2 structures together  The difference with CREATE_STRUCT    is  that if the 2 structure have same elements s name  then mixstru    do not break down but choose for the common element the value    specified by the first structure       categories   Structure       param STRU1  in required    Structure which can have same elements s name than    STRU2 but with a different value       param STRU2  in required    Structure which can have same elements s name than    STRU1 but with a different value       returns   A structure      restrictions   If STRU1 or  STRU2 is not a structure  mixstru send back  1      examples              IDL  a get_extra toto ok 123        IDL  b get_extra ok 111  year 1999  age_capitaine 35        IDL  help  a b struct         Structure   2 tags  length 4  refs 1:          OK              INT            123          TOTO            INT              1         Structure   3 tags  length 6  refs 1:          AGE_CAPITAINE   INT             35          OK              INT            111          YEAR            INT           1999       IDL  help  mixstru a b struct         Structure   4 tags  length 8  refs 1:          AGE_CAPITAINE   INT             35          YEAR            INT           1999          OK              INT            123          TOTO            INT              1       IDL  help  mixstru b a struct         Structure   4 tags  length 8  refs 1:          TOTO            INT              1          AGE_CAPITAINE   INT             35          OK              INT            111          YEAR            INT           1999      history   Sebastien Masson  smasson lodyc jussieu fr                         7 10 1999      version    Id: mixstru pro 163 2006 08 29 12:59:46Z navarro             FUNCTION mixstru  stru1  stru2     compile_opt idl2  strictarrsubs    cm_general     IF size stru1   type  EQ 0 AND size stru2   type  EQ 8 THEN return  stru2    IF size stru2   type  EQ 0 AND size stru1   type  EQ 8 THEN return  stru1    if size stru1   type  NE 8 then return    1    if size stru2   type  NE 8 then return    1    tname   tag_names stru2         str        FOR i   0  n_tags stru2 1 DO str   str   tname i    stru2    strtrim i  2          res   createfunc get_extra str _extra   stru1                    kwdlist    stru1   stru1  stru2   stru2                    stru1   stru1  stru2   stru2                   filename   myuniquetmpdir  for_createfunc pro      return  res  end"); 
    322 a[320] = new Array("./ToBeReviewed/STRUCTURE/struct2string.html", "struct2string.pro", "", "              file_comments   Convert a structure to an  executable string       categories   Utilities       param STRUCT  in required    A structure      keyword MAX_STRUCT_LENGTH  default 10000l    The maximum length of the structure   permetted to convert the structure to string       keyword DIRECT2STRING   To get a string instead an  executable string       keyword CUT_IN_STRING   Try it      restrictions   Use tostr pro  cf this function header       examples          IDL  print  struct2string d         create_struct NAME X X_SIZE 891 Y_SIZE 630 X_VSIZE          891 Y_VSIZE 630 X_CH_SIZE 6 Y_CH_SIZE 10 X_PX_CM          40 0000 Y_PX_CM 40 0000 N_COLORS 16777216 TABLE_SIZE           256 FILL_DIST 1 WINDOW 32 UNIT 0 FLAGS 328124 ORIGIN          0 0 ZOOM 1 1       history   Sebastien Masson  smasson lodyc jussieu fr                         2000 07 03      version    Id: struct2string pro 163 2006 08 29 12:59:46Z navarro             FUNCTION struct2string  struct  CUT_IN_STRING   cut_in_string  MAX_STRUCT_LENGTH   max_struct_length  DIRECT2STRING   direct2string      compile_opt idl2  strictarrsubs      if size struct   type  NE 8 then return        if NOT keyword_set max_struct_length  then max_struct_length   10000l    if n_tags struct   length  GT max_struct_length then begin       rien   report The structure is too big to be converted to string   C See the MAX_STRUCT_LENGTH keyword        return       endif    names   tag_names struct     case 1 of       keyword_set direct2string :BEGIN          res   names 0 tostr struct 0           if n_tags struct  GT 1 then begin             FOR i   1  n_tags struct 1 do begin                res   res   names i tostr struct i              endfor          endif                 END       keyword_set CUT_IN_STRING :BEGIN          res    create_struct names 0 tostr struct 0           if n_tags struct  GT 1 then begin             FOR i   1  n_tags struct 1 do begin                res    res   create_struct res names i tostr struct i              endfor          endif       END       ELSE:BEGIN          res    create_struct names 0 tostr struct 0           if n_tags struct  GT 1 then begin             FOR i   1  n_tags struct 1 do begin                res   res names i tostr struct i              endfor          endif          res   res        END    endcase    return  res end"); 
    323 a[321] = new Array("./ToBeReviewed/STRUCTURE/where_tag.html", "where_tag.pro", "", "     file_comments   Like WHERE but works on structure tag names   Obtain subscripts of elements in structure array for which   a particular Tag has values in a range or matching specified values    Like the WHERE function but for use with structures       categories   Structure      param STRUCT  in required    structure array to search       keyword TAG_NAME   Scalar string specifying Tag Name       keyword TAG_NUMBER   Otherwise give the Tag Number        keyword RANGE     min max  range to search for in Struct       keyword VALUES   One or array of numbers to match for in Struct        keyword ISELECT   Specifies indices to select only part of structure array     use it to recycle subscripts from previous searches        keyword NOPRINT   Suppress informational messages about nothing found       returns   Nfound  out      of occurrences found        restrictions   User  must  specify  1  TAG_NAME or TAG_NUMBER to search  and  2    the VALUES or RANGE to search on       examples         Suppose STR is a structure with tags CAT_NO:indgen 10  and                  NAME:strarr 10    Find the indices where STR CAT_NO is                 between 3 and 5            IDL  print  WHERE_TAG  str  TAG_NAME    CAT_NO  VALUE    3 4 5      or         IDL  print  WHERE_TAG  str  TAG_NUM   0  RANGE    3 5        history         written 1990 Frank Varosi STX   NASA GSFC         Stop printing  Tag  not found  with  NOPRINT  CD Pike 8 Jun 93      version    Id: where_tag pro 163 2006 08 29 12:59:46Z navarro        function where_tag  Struct  Nfound      TAG_NAME Tag_Name                                                 TAG_NUMBER Tag_Num                                                ISELECT ipart  NOPRINT noprint                                            RANGE range  VALUES values  First check required parameters      compile_opt idl2  strictarrsubs            Ntag   N_tags  Struct            if  Ntag LE 1  then begin                 message expecting a Structure Array  try again CONTIN                 return 1             endif          if  N_elements  Tag_Num   NE 1  AND               N_elements  Tag_Name   NE 1  then begin                 message specify TAG_NAME  or TAG_NUMBER  to search CONTIN                 return 1             endif          Tags   Tag_names  Struct            if N_elements  Tag_Name   EQ 1 then begin                 Tag_Name   strupcase  Tag_Name                   Tag_Num   where  Tags EQ Tag_Name                   Tag_Num   Tag_Num 0                  if  Tag_Num LT 0  then begin                  if NOT keyword_set  noprint   then                           message Tag  not found CONTIN                         return 2                     endif            endif          if  Tag_Num LT 0  OR  Tag_Num GE Ntag  then begin                 message Tag      strtrim Tag_Num 2      exceeds Max Tag                                strtrim Ntag 1 2      in structure CONTIN                 return 1             endif          if N_elements  ipart   GT 0 then begin           check if any searching                                                           on a subset of input                  w   where  ipart GE 0  nf                   if  nf LE 0  then return 1                  if  nf LT N_elements  ipart   then ipart   ipart w             endif   Now find out where for RANGE :          if N_elements  range   EQ 2 then begin                  if N_elements  ipart   GT 0 then begin                       w   where   Struct ipart Tag_Num  GE range 0  AND                                    Struct ipart Tag_Num  LE range 1  Nfound                         if  Nfound GT 0  then windex   ipart w  else windex   w                   endif                     else  windex   where   Struct Tag_Num  GE range 0  AND                                            Struct Tag_Num  LE range 1  Nfound                    if  Nfound LE 0  AND  NOT keyword_set  noprint     then begin                         strnums   strtrim  range  2                           string   strnums 0        strnums 1                          message  NO values of  found in the Range     string    CONTIN                    endif  where Values:           endif else if N_elements  values   GE 1 then begin                  Nval   N_elements  values                   vals    values                  Nfound   0                  if N_elements  ipart   GT 0 then begin                      for v 0 Nval 1 do begin                         w   where  Struct ipart Tag_Num  EQ vals v  Nf                           if  Nf GT 0  then begin                                 if  Nfound GT 0  then ww    ww w  else ww   w                            endif                         Nfound   Nfound   Nf                       endfor                      if  Nfound GT 0  then windex   ipart ww sort  ww                                          else windex   w                   endif else begin                      for v 0 Nval 1 do begin                         w   where  Struct Tag_Num  EQ vals v  Nf                           if  Nf GT 0  then begin                                 if  Nfound GT 0  then ww    ww w  else ww   w                            endif                         Nfound   Nfound   Nf                       endfor                      if  Nfound GT 0  then windex   ww sort  ww                                          else windex   w                    endelse                  if  Nfound LE 0  AND  NOT keyword_set  noprint     then begin                         strnums   strtrim  vals  2                           string   strnums 0                          for i 1 Nval 1 do string   string       strnums i                          message  NO values of  found Equaling     string    CONTIN                    endif             endif else begin                  message must specify a RANGE   or VALUES s CONTIN                 windex 1              endelse  return  windex end"); 
    324 a[322] = new Array("./ToBeReviewed/TRIANGULATION/ciseauxtri.html", "ciseauxtri.pro", "", "           file_comments    Delete arrays which do not have to be drawn thanks to 2 tests:       1  Corners of the array must be in the window       2  Lengthes of side of triangles expressed in normalized           coordinates must not surpass a sill length        categories      param TRIANG       param GLAM       param GPHI        keyword _EXTRA   Used to pass your keywords       uses   common pro      history   Sebastien Masson  smasson lodyc jussieu fr                          20 2 99      version    Id: ciseauxtri pro 192 2006 09 22 09:37:08Z smasson              FUNCTION ciseauxtri  triang  glam  gphi  _EXTRA   ex       compile_opt idl2  strictarrsubs    cm_4mesh   IF NOT keyword_set key_forgetold  THEN BEGIN  updatenew   ENDIF     IF NOT keyword_set key_periodic  AND NOT keyword_set key_irregular        AND NOT  map projection LE 7 AND  map projection NE 0        AND NOT  map projection EQ 14 OR  map projection EQ 15                OR  map projection EQ 18  THEN return  triang      tempsun   systime 1            For key_performance      taille   size glam     nx   taille 1     ny   taille 2      tempdeux   systime 1           For key_performance  2    z   convert_coord glam gphi data to_normal      x   z 0       y   z 1       tempvar   SIZE TEMPORARY z    delete z    IF testvar var   key_performance  EQ 2 THEN       print   temps ciseauxtri: convert_coord data to_normal  systime 1 tempdeux     Beware  following the projection  some points x or y can become NaN     see points behind the Earth in an orthographic projection     In this case  we have to remove all triangle which contain one of these points       if  map projection LE 7 AND  map projection NE 0        OR  map projection EQ 14 OR  map projection EQ 15 OR  map projection EQ 18 then begin       tempdeux   systime 1        For key_performance  2         test    x y triang        test   finite temporary test   nan        test   total temporary test  1        ind   where temporary test  EQ 0          if ind 0  NE  1 then triang   triang  temporary ind  ELSE return    1       trichanged   1b       IF testvar var   key_performance  EQ 2 THEN          print   temps ciseauxtri: recherche points a NAN  systime 1 tempdeux    endif      seuil   5  indxtriang2       indxtriang   indxmin    nx 1 indxmin EQ 0 AND indxmax EQ  nx 1        ENDIF ELSE indxtriang   indxmin        listrect   nx indytriang indxtriang       IF testvar var   key_performance  EQ 2 THEN          print   temps ciseauxtri: liste des rectangles  systime 1 tempdeux     Now we have this list  we will make sure that we do not have triangles    with only a common summit          test   bytarr nx  ny        test listrect    1       dejavire   1b test         tempdeux   systime 1        For key_performance  2       vire1   0       vire2   0       while  vire1 0  NE  1 OR vire2 0  NE  1  ne 0 do begin          vire1   where   test shift test   1   1                              1 shift test  0   1 1 shift test   1  0  EQ 1           if vire1 0  NE  1 THEN test vire1    0   We delete the rectangle          vire2   where   1 test 1 shift test   1   1                              shift test  0   1 shift test   1  0  EQ 1    We delete the top rectangle  same x index but equal to 1           if vire2 0  NE  1 THEN test vire2 nx    0        ENDWHILE  stop       test   test temporary dejavire          avirer   where temporary test  EQ 0        IF testvar var   key_performance  EQ 2 THEN          print   temps ciseauxtri: determinationdes rectangles a virer  systime 1 tempdeux         if avirer 0  NE  1 then begin       tempdeux   systime 1        For key_performance  2       indnx   n_elements listrect        indny   n_elements avirer        ind   listrect replicate 1l  indny         ind   ind EQ replicate 1  indnx avirer        if indny GT 1 then ind   total ind  2        ind   where ind EQ 0        if ind 0  NE  1 then triang   triang  ind  ELSE return    1       endif       IF testvar var   key_performance  EQ 2 THEN          print   temps ciseauxtri: derniere retouche de la triangulation  systime 1 tempdeux    endif            if keyword_set key_performance  THEN print   temps ciseauxtri  systime 1 tempsun       return   triang end"); 
    325 a[323] = new Array("./ToBeReviewed/TRIANGULATION/completecointerre.html", "completecointerre.pro", "", "             file_comments        categories   Graphics      param LONS         param LATS        param SEUIL        keyword _EXTRA   Used to pass your keywords       keyword CONT_COLOR  default d n_colors   1   white    The color of the continent       uses   common pro      history   Sebastien Masson  smasson lodyc jussieu fr                         01 10 1999      version    Id: completecointerre pro 163 2006 08 29 12:59:46Z navarro             PRO draw_corner_triangle  lons  lats  seuil  CONT_COLOR   cont_color  _extra   ex     compile_opt idl2  strictarrsubs    cm_4mesh   the triangle must not be out of the domain   IF min lons  max   maxlon  GE lon1 AND maxlon LE lon2       AND min lats  max   maxlat  GE lat1 AND maxlat LE lat2 then BEGIN   the triangle must not be too big      z   convert_coord lons  lats   data   to_normal       alldist    z 0  2 z 0  0 2    z 1  2 z 1  0 2                     z 0  0 z 0  1 2    z 1  0 z 1  1 2                     z 0  1 z 0  2 2    z 1  1 z 1  2 2      IF max alldist  LT seuil 2 THEN polyfill  lons  lats           color   cont_color  _extra   ex     return   ENDIF  end              file_comments   To color cleanly continents      categories   Graphics      keyword _EXTRA   Used to pass your keywords       keyword CONT_COLOR   The color of the continent  default value is    d n_colors   1   white      keyword COINMONTE  type array    To obtain the array of  ascending land corner     to be treated with completecointerre pro in the variable array    instead of make it pass by the global variable twin_corners_up       keyword COINDESCEND  type array    See COINMONTE      keyword INDICEZOOM   The zoom s index      uses   common pro      history   Sebastien Masson  smasson lodyc jussieu fr                         01 10 1999      version    Id: completecointerre pro 163 2006 08 29 12:59:46Z navarro             PRO completecointerre  COINMONTE   coinmonte  COINDESCEND   coindescend                            CONT_COLOR   cont_color  INDICEZOOM   indicezoom                            _extra   ex     compile_opt idl2  strictarrsubs    common       if NOT keyword_set coinmonte  then return     if NOT keyword_set coindescend  then return     if NOT keyword_set indicezoom  then return   tempsun   systime 1             For key_performance     definitions of vectors coinmont and coindesc     if keyword_set coinmonte  then coinmont   coinmonte     ELSE coinmont   twin_corners_up   if keyword_set coindescend  then coindesc   coindescend     ELSE coindesc   twin_corners_dn   IF NOT keyword_set cont_color  THEN cont_color    d n_colors 1     255     definition of coordinates of points numbered 1 2 3 4 5 6  see figures below      tempdeux   systime 1            For key_performance  2   if coinmont 0  NE  1 OR coindesc 0  NE  1 then BEGIN     if keyword_set indicezoom  then BEGIN   if we use key_stide  the t  u  v and f points are no more related to   the same cell because glamf and gphif has be recomputed to be in the   middle of two t points       IF total key_stride  EQ 3 AND finite glamv 0 gphiv 0  NE 0 THEN BEGIN         long1   glamv indicezoom    lati1   gphiv indicezoom        ENDIF ELSE BEGIN          long1   glamt indicezoom    lati1   gphif indicezoom        ENDELSE       IF total key_stride  EQ 3 AND finite glamu 0 gphiu 0  NE 0 THEN BEGIN         long2   glamu indicezoom    lati2   gphiu indicezoom        ENDIF ELSE BEGIN         long2   glamf indicezoom    lati2   gphit indicezoom        ENDELSE       long3   glamf indicezoom    lati3   gphif indicezoom      ENDIF ELSE BEGIN        IF total key_stride  EQ 3 AND finite glamv 0 gphiv 0  NE 0 THEN BEGIN         long1   glamv   lati1   gphiv       ENDIF ELSE BEGIN          long1   glamt   lati1   gphif       ENDELSE       IF total key_stride  EQ 3 AND finite glamu 0 gphiu 0  NE 0 THEN BEGIN         long2   glamu   lati2   gphiu       ENDIF ELSE BEGIN          long2   glamf   lati2   gphit       ENDELSE       long3   glamf   lati3   gphif     ENDELSE        nx    size long1   dimensions 0      ny    size long1   dimensions 1      seuil   5    min nx  ny 2      seuil   min p position 2 p position 0 seuil                       p position 3 p position 1 seuil      ENDIF     IF testvar var   key_performance  EQ 2 THEN       print   temps completecointerre: positions des points  systime 1 tempdeux       Case land corner in ascent:        2 land points in diagonal ascending with 2 ocean points on the descendant diagonal                          4           t i nx 1    u i nx        t i nx 1 0                                                                         1         3                  5         v i f i v i 1                                                                                 t i 0       2 u i           t i 1 1       if coinmont 0  NE  1 then BEGIN     tempdeux   systime 1          For key_performance  2     for id   0  n_elements coinmont 1 do BEGIN       i   coinmont id        ii   i MOD nx       ij   i nx   bottom triangle       lons    long1 i  long2 i  long3 i        lats    lati1 i  lati2 i  lati3 i        draw_corner_triangle  lons  lats  seuil  CONT_COLOR   cont_color  _extra   ex   upper triangle       IF ii NE nx 1 AND ij NE ny 1 THEN BEGIN         lons    long3 i  long1 i 1  long2 i nx          lats    lati3 i  lati1 i 1  lati2 i nx          draw_corner_triangle  lons  lats  seuil  CONT_COLOR   cont_color  _extra   ex       ENDIF      ENDFOR      IF testvar var   key_performance  EQ 2 THEN         print   temps completecointerre: trace de cointerremonte  systime 1 tempdeux   ENDIF     Case land corner in descent:        2 land points in diagonal descending with 2 ocean points on the ascendant diagonal                           4       t i nx 1    u i nx        t i nx 1 0                                                                                      3                  5         v i f i v i 1            1                                                                                                  t i 0      2 u i           t i 1 1     if coindesc 0  NE  1 then begin     tempdeux   systime 1          For key_performance  2     for id   0  n_elements coindesc 1 do BEGIN       i   coindesc id        ii   i MOD nx       ij   i nx       IF ii NE nx 1 AND ij NE ny 1 THEN BEGIN   left triangle         lons    long1 i  long3 i  long2 i nx          lats    lati1 i  lati3 i  lati2 i nx          draw_corner_triangle  lons  lats  seuil  CONT_COLOR   cont_color  _extra   ex   right triangle         lons    long3 i  long2 i  long1 i 1          lats    lati3 i  lati2 i  lati1 i 1          draw_corner_triangle  lons  lats  seuil  CONT_COLOR   cont_color  _extra   ex       ENDIF     ENDFOR     IF testvar var   key_performance  EQ 2 THEN         print   temps completecointerre: trace de cointerredescend  systime 1 tempdeux   ENDIF      IF keyword_set key_performance  THEN print   temps completecointerre  systime 1 tempsun      return end"); 
    326 a[324] = new Array("./ToBeReviewed/TRIANGULATION/definetri.html", "definetri.pro", "", "       file_comments   Define a triangulation array like TRIANGULATE             But in a VERY SIMPLE CASE:   the points are regulary gridded on nx ny array    Find a Delaunay triangulation for this set of points is easy:   Points define  nx 1 ny 1  rectangles which we can cut in 2 triangles     cf  figure above        fixe        ny 1                                                                                                                                            ny 2                                                                                                                                                    1                                                                                                                                         0                          0   1   2        nx 3  nx 2 nx 1         You have 2 ways to cut a rectangle:        1  the upward diagonal       2  the downward diagonal                                                                                                                                                                                                                                  categories   Utilities       param NX  in required    The x dimension array      param NY  in required    The y dimension array      param DOWNWARD  in optional    When downward is undefine all rectangles are cut in using the upward    diagonal     Downward is a vector which contains the rectangles numbers which are cut in    using the downward diagonal    The rectangle number is defined by the index  in a nx ny vector  of the    lower left corner of the rectangle       returns   triangles is a 2d array and its dimensions are 3 and 2 nx 1 ny 1    triangles is defined like in the TRIANGULATE procedure       examples     IDL  triangles definetri 3 3 1 3    triangles will be this kind of triangulation:                                                                                                                                                                       history   sebastien Masson  smlod ipsl jussieu fr                          4 3 1999      version    Id: definetri pro 186 2006 09 20 10:50:37Z pinsard     FUNCTION definetri  nx  ny  downward     compile_opt idl2  strictarrsubs      nx   long nx     ny   long ny     if n_elements downward  NE 0 THEN BEGIN        if n_elements downward  GT  nx 1 ny 1  then begin          print   downward a trop d elements par rapport a nx et ny           return    1       endif       downward   long downward     ENDIF   we define triangles     triangles   lonarr 3  2 nx 1 ny 1      we cut the rectangles with the upward diagonal      if n_elements downward  NE  nx 1 ny 1  then BEGIN   there is some rectangle to cut    we define upward: upward is a vector which contains the rectangles   numbers which are cut in using the upward diagonal    The rectangle number is defined by the index  in a nx ny vector  of   the lower left corner of the rectangle        upward   bytarr nx  ny 1       upward  ny 1    0       upward nx 1      0       if n_elements downward  NE 0 then upward downward    0       upward   where upward EQ 1        n1   n_elements upward       4 corners indexes of a rectangle number i are           i nx  i nx 1                                                                                                                                                                                   i   i 1         trinumber   2 upward upward nx    we define the right triangles       triangles 0  trinumber    upward       triangles 1  trinumber    upward 1       triangles 2  trinumber    upward 1 nx   we define the left triangles       triangles 0  trinumber 1    upward 1 nx       triangles 1  trinumber 1    upward nx       triangles 2  trinumber 1    upward    ENDIF ELSE n1   0     we cut the rectangles with the downward diagonal      if n_elements downward  NE 0 then BEGIN       n2   n_elements downward         trinumber   2 downward downward nx    we define the right triangles       triangles 0  trinumber    downward 1       triangles 1  trinumber    downward nx 1       triangles 2  trinumber    downward nx   we define the left triangles       triangles 0  trinumber 1    downward nx       triangles 1  trinumber 1    downward       triangles 2  trinumber 1    downward 1    endif     return  triangles end"); 
    327 a[325] = new Array("./ToBeReviewed/TRIANGULATION/definetri_e.html", "definetri_e.pro", "", "     file_comments        categories        param INDEX   It is the tick mark index which starts at 0       param NX  in required    The x dimension array      param NY  in required    The y dimension array        returns        restrictions          examples          history        version    Id: definetri_e pro 186 2006 09 20 10:50:37Z pinsard      function numtri  index  nx  ny     compile_opt idl2  strictarrsubs       y index nx    x index y nx    numtri    y NE 0 nx 1 2 y 1 1     2 y EQ  ny 1  OR y EQ  ny 1 x     return  numtri end          file_comments   Define a triangulation array like TRIANGULATE but for a   E grid type      categories   Make contours with E grid type       param NX  in required    The x dimension array      param NY  in required    The y dimension array      param SINGULAR  in optional    When singular is undefined all rectangles are cut in using the vertical    diagonal     Singular is a vector which contains the rectangles numbers which are cut in    using the horizontal diagonal    The rectangle number is defined by the index  in a nx ny vector  of the    lower left corner of the rectangle       keyword SHIFTED        returns   Triangles is a 2d array and is dimensions are 3 and  nx 1 ny 1    Triangles is defined like in the TRIANGULATE procedure               history   Sebastien Masson  smlod ipsl jussieu fr                          June 2001      version    Id: definetri_e pro 186 2006 09 20 10:50:37Z pinsard        todo    seb: documenter SHIFTED   FUNCTION definetri_e  nx  ny  singular  SHIFTED   shifted     compile_opt idl2  strictarrsubs      nx   long nx     ny   long ny     triangles   lonarr 3  2 nx 1 ny 1      build the base triangulation with the diamond cut in two triangles   by the vertical diagonal     first line    index   lindgen nx 1     trinumber   index    triangles 0  trinumber    index    triangles 1  trinumber    index 1    triangles 2  trinumber    index nx 1 shifted    last line    index    ny 1 nx lindgen nx 1     trinumber   numtri index  nx  ny     triangles 0  trinumber    index    triangles 1  trinumber    index nx index nx 1 shifted  MOD 2     triangles 2  trinumber    index 1   other lines    if ny GT 2 then begin       index   lindgen nx  ny        index   index 0:nx 2  1:ny 2        index   index        oddeven    index nx 1 shifted  MOD 2       trinumber   numtri index  nx  ny        triangles 0  trinumber    index       triangles 1  trinumber    index nx oddeven       triangles 2  trinumber    index nx oddeven       triangles 0  trinumber 1    index nx oddeven       triangles 1  trinumber 1    index nx oddeven       triangles 2  trinumber 1    index 1    endif     cut the diamond specified by singular in two triangles   by the horizontal diagonal      IF keyword_set singular  then BEGIN       yindex   singular nx       otherline   where yindex NE 0 AND yindex NE  ny 1        if otherline 0  NE  1 then begin          index   singular otherline           oddeven    index nx 1 shifted  MOD 2          trinumber   numtri index  nx  ny           triangles 0  trinumber    index          triangles 1  trinumber    index nx oddeven          triangles 2  trinumber    index 1          triangles 0  trinumber 1    index          triangles 1  trinumber 1    index 1          triangles 2  trinumber 1    index nx oddeven       endif     endif    return  triangles end "); 
    328 a[326] = new Array("./ToBeReviewed/TRIANGULATION/dessinetri.html", "dessinetri.pro", "", "             file_comments   Draw the triangulation      categories   Utilities       param TRI  in optional    Array which define the triangulation  provided by triangule pro or triangulate        param X  in optional    The x position of points to which the trangulation refer to     see the x array provided in triangulate       param Y  in optional    The y position of points to which the trangulation refer to     see the y array provided in triangulate       keyword WAIT    x  to call wait x second between each triangle draw       keyword ONEBYONE   To draw the triangles one by one      keyword FILL   To fill the triangles  using polyfill  instead of plotting them      keyword CHANGECOLOR    n  To change the color of each triangle  n colors   will be used and repeted if necessary       uses   common pro      history   Sebastien Masson  smasson lodyc jussieu fr       version    Id: dessinetri pro 163 2006 08 29 12:59:46Z navarro              PRO dessinetri  tri  x  y  WAIT   wait  ONEBYONE   onebyone  FILL   fill  CHANGECOLOR   changecolor  _extra   ex     compile_opt idl2  strictarrsubs    common    tempsun   systime 1             For key_performance    a        if n_params  EQ 3 then BEGIN      CASE size x   n_dimensions size y   n_dimensions  OF        2:BEGIN          nx   n_elements x            ny   n_elements y            glam   x replicate 1  ny           gphi   replicate 1  nx y        END         4:BEGIN          glam   x          gphi   y        END        ELSE:BEGIN          dummy   report x and y inputs of dessinetri must have the same number of dimensions  1 or 2           return        END      ENDCASE    ENDIF ELSE BEGIN        grille mask glam gphi  tri   tri       undefine  mask       tri   ciseauxtri tri  glam  gphi     ENDELSE       IF keyword_set changecolor  THEN BEGIN       oldname    d name       if  d name EQ  PS  OR  d name EQ  Z  then BEGIN           thisos   strupcase strmid version os_family  0  3           CASE thisOS of              MAC : set_plot  thisOS              WIN : set_plot  thisOS             ELSE: set_plot   X           ENDCASE          ncolors d n_colors 1    255          set_plot  oldname        ENDIF ELSE ncolors d n_colors 1    255        color   1 indgen changecolor ncolors changecolor 1       ENDIF ELSE color   0      color   color replicate 1  n_elements tri 3 n_elements color 1        tempdeux   systime 1            For key_performance  2    for i   0L  n_elements tri 3 1 do begin       t    tri  i  tri 0  i        IF keyword_set fill  THEN           polyfill  glam t  gphi t  color   color i  _extra   ex         ELSE plots  glam t  gphi t  color   color i  _extra   ex       IF keyword_set wait  THEN wait  wait       IF keyword_set onebyone  THEN read  a  prompt    press a key     ENDFOR    IF testvar var   key_performance  EQ 2 THEN       print   temps dessinetri: trace des triangles  systime 1 tempdeux      if keyword_set key_performance  THEN print   temps dessinetri  systime 1 tempsun      return end"); 
    329 a[327] = new Array("./ToBeReviewed/TRIANGULATION/drawcoast_c.html", "drawcoast_c.pro", "", "     file_comments        categories         param MASK         param XF         param YF         param NX         param NY         keyword COAST_COLOR  default 0    The color of the coastline    Default is black  0       keyword COAST_THICK  default 1    The thick of the trait to trace continents      keyword XSEUIL  default 5    To eliminate segments of coasts which are to big  which link points which can    be close on the sphere but distant on the drawing  We delete all segments    whose the size surpass the size of the window following X XSEUIL     But it can be to big if we do a big zoom or a little one for some    projections  We specify it the keyword thanks to this keyword       keyword YSEUIL   See XSEUIL       keyword _EXTRA   Used to pass our keywords        returns          uses          restrictions          examples          history          version        todo    Seb: remplir le header       PRO drawcoast_c  mask  xf  yf  nx  ny  COAST_COLOR   coast_color  COAST_THICK   coast_thick  YSEUIL   yseuil  XSEUIL   xseuil  _extra   ex     compile_opt idl2  strictarrsubs    cm_4mesh   IF NOT keyword_set key_forgetold  THEN BEGIN  updatenew  updatekwd   ENDIF      tempsun   systime 1            For key_performance       We trace vertical segments:      if NOT keyword_set yseuil  then yseuil   5     min nx  ny 2     distanceseuil    p position 3 p position 1 yseuil   list: list of points i for which we will trace a segment between the point i j 1 and i j    tempdeux   systime 1           For key_performance  2    liste   where mask shift mask   1  0  EQ 1                    AND  xf shift xf  0  1 2 yf shift yf  0  1 2  LE distanceseuil 2     IF liste 0  NE  1 THEN BEGIN   We recuperate lx an dly which are indexes in a 2d array of points given by list       ly   liste nx   lx   temporary liste nx ly       indice   where ly NE 0      We do not take points concerning       if indice 0  NE  1 then begin   the first line because in this case  the point j 1 is undefined           lx   lx indice    ly   ly temporary indice    Loop on concerned points and drawing of the segment    Comment: we use plots instead of plot because plots goes faster           IF testvar var   key_performance  EQ 2 THEN             print   temps tracecote: determiner liste des points concernes par un trait vertical  systime 1 tempdeux          tempdeux   systime 1     For key_performance  2          for pt   0L  n_elements lx 1 do BEGIN              i   lx pt    j   ly pt              plots   xf i  j 1  xf i  j   yf i  j 1  yf i  j                    color   coast_color  thick   coast_thick   normal  _extra   ex          endfor          IF testvar var   key_performance  EQ 2 THEN             print   temps tracecote: trace des traits verticaux  systime 1 tempdeux       endif    ENDIF     For the drawing of horizontal segments   it is the same thing but we have to be careful if it is periodic      If it is periodic  we duplicate the first column and we put it at the end      This is made not for the shift which is periodic by default but for the plots     tempdeux   systime 1           For key_performance  2    if keyword_set key_periodic  AND nx EQ jpi then begin       mask    mask  mask 0          xf    xf  xf 0          yf    yf  yf 0          nx   nx 1    ENDIF    if NOT keyword_set xseuil  then xseuil   5     min nx  ny 2     distanceseuil    p position 2 p position 0 xseuil    liste   where mask shift mask  0   1  EQ 1                    AND  xf shift xf  1  0 2 yf shift yf  1  0 2  LE distanceseuil 2     IF liste 0  NE  1 THEN BEGIN       ly   liste nx   lx   temporary liste nx ly       indice   where ly NE ny 1 AND lx NE 0        if indice 0  NE  1 then begin   We do not take points of the first column and of the last line  because we added artificially           lx   lx indice    ly   ly temporary indice           IF testvar var   key_performance  EQ 2 THEN             print   temps tracecote: determiner liste des points concernes par un trait horizontal  systime 1 tempdeux          tempdeux   systime 1     For key_performance  2          for pt   0L  n_elements lx 1 do BEGIN              i   lx pt    j   ly pt              plots   xf i 1  j  xf i  j   yf i 1  j  yf i  j                    color   coast_color  thick   coast_thick   normal  _extra   ex          endfor          IF testvar var   key_performance  EQ 2 THEN             print   temps tracecote: trace des traits horizontaux  systime 1 tempdeux       endif    endif      if keyword_set key_performance  THEN print   temps drawcoast_c  systime 1 tempsun    return end"); 
    330 a[328] = new Array("./ToBeReviewed/TRIANGULATION/drawcoast_e.html", "drawcoast_e.pro", "", "     file_comments        categories         param MASK         param XF         param YF         param NX         param NY         keyword COAST_COLOR  default 0    The color of the coastline    Default is black  0       keyword COAST_THICK  default 1    The thick of the trait to trace continents      keyword XSEUIL  default 5    To eliminate segments of coasts which are to big  which link points which can    be close on the sphere but distant on the drawing  We delete all segments    whose the size surpass the size of the window following X XSEUIL    But it can be to big if we do a big zoom or a little one for some    projections  We specify it the keyword thanks to this keyword       keyword YSEUIL   See XSEUIL      keyword _EXTRA   Used to pass our keywords        returns          uses          restrictions          examples          history          version       todo   Seb: remplir le header       PRO drawcoast_e  mask  xf  yf  nx  ny  COAST_COLOR   coast_color  COAST_THICK   coast_thick  YSEUIL   yseuil  XSEUIL   xseuil  onemore   onemore  _extra   ex       compile_opt idl2  strictarrsubs    cm_4mesh   IF NOT keyword_set key_forgetold  THEN BEGIN  updatenew  updatekwd   ENDIF      tempsun   systime 1            pour key_performance      if keyword_set key_periodic  AND nx EQ jpi then begin       mask    mask  mask 0          xf    xf  xf 0          yf    yf  yf 0          nx   nx 1    ENDIF     we plot the borders of the diamond in this sense :        if NOT keyword_set onemore  then onemore   0    if NOT keyword_set xseuil  then xseuil   5     min nx  ny 2     distanceseuil    p position 2 p position 0 xseuil   liste: liste des points i pourlesquels on va tracer un segment     index   lindgen nx  ny     index   index 0:nx 2  1:ny 1     indexbis   index nx index nx onemore  MOD 2     liste   where mask index 1 mask indexbis  EQ 1                    AND  xf index xf indexbis 2 yf index yf indexbis 2 LE distanceseuil 2     IF liste 0  NE  1 THEN BEGIN       index   index liste        indexbis   indexbis liste        for pt   0  n_elements index 1 do begin          plots   xf index pt  xf indexbis pt   yf index pt  yf indexbis pt                 color   coast_color  thick   coast_thick   normal  _extra   ex       endfor    ENDIF     we plot the borders of the diamond in this sense :        if NOT keyword_set xseuil  then xseuil   5     min nx  ny 2     distanceseuil    p position 2 p position 0 xseuil   liste: liste des points i pourlesquels on va tracer un segment     index   lindgen nx  ny 1     index   index 0:nx 2       indexbis   index nx index nx onemore  MOD 2     liste   where mask index 1 mask indexbis  EQ 1                    AND  xf index xf indexbis 2 yf index yf indexbis 2 LE distanceseuil 2     IF liste 0  NE  1 THEN BEGIN       index   index liste        indexbis   indexbis liste        for pt   0  n_elements index 1 do begin          plots   xf index pt  xf indexbis pt   yf index pt  yf indexbis pt                 color   coast_color  thick   coast_thick   normal  _extra   ex       endfor    ENDIF       if keyword_set key_performance  THEN print   temps drawcoast_e  systime 1 tempsun    return end"); 
    331 a[329] = new Array("./ToBeReviewed/TRIANGULATION/drawsectionbottom.html", "drawsectionbottom.pro", "", "             file_comments   Fill and draw the bottom continents for a real section       categories       param MASKIN  in required       param XXAXISIN  in required        param DEPTHSIN  in required       keyword COAST_COLOR  default 0    The color of the coastline    Default is black  0       keyword COAST_THICK  default 1    The thickness of the coastline       keyword CONT_COLOR  default d n_colors   1   xx   zz    max y range      xx   float xx    zz   float zz      filling of the continents   IF NOT keyword_set cont_color  THEN cont_color    d n_colors   1    255     if NOT keyword_set cont_nofill  then         polyfill   min xx   max   maxx  xx  maxx                       min zz   max   mazz  zz  mazz                      color   cont_color    if NOT keyword_set cont_nofill  then        polyfill   min xx  max   maxx  xx  maxx                      y range 0  zz   y range 0  color   cont_color     drawing of the coast  bottom  line    we could have plot directly xx and yy but if countout ne 0  doing   this will draw an non existing bottom line along  y range values   which is not so good    we thus do this ugly for if loops to make sure that we don t draw   these lines but we keep all vertical lines     IF countout NE 0 THEN BEGIN      FOR i   0  countout  1 DO BEGIN        CASE 1 OF          out i  EQ 0:BEGIN    if we start with a out point            xxx    values f_nan            zzz    values f_nan                     END           i EQ 0:BEGIN    i eq 0 but out i  ne 0            xxx    xx 0:out i   values f_nan             zzz    zz 0:out i   values f_nan           END          ELSE:BEGIN   two consecutive out values at the same depth: we just keep    values f_nan values until the next change of depth            IF  out i 1  EQ out i 1  AND  zz out i 1  EQ zz out i  THEN BEGIN               xxx    xxx   values f_nan               zzz    zzz   values f_nan                          ENDIF ELSE BEGIN    we keep everything inbetween the out values  including themselves   for the vertical lines  but we had  values f_nan to remove the horizontal lines              xxx    xxx  xx out i 1 :out i   values f_nan               zzz    zzz  zz out i 1 :out i   values f_nan                          ENDELSE          END        ENDCASE        IF i EQ countout 1 AND out i  NE n_elements xx 1 THEN BEGIN          xxx    xxx  xx out i :           zzz    zzz  zz out i :                      ENDIF      ENDFOR      plots  xxx  zzz  color   coast_color  thick   coast_thick  _extra   ex    ENDIF ELSE plots  xx  zz  color   coast_color  thick   coast_thick  _extra   ex     return end "); 
    332 a[330] = new Array("./ToBeReviewed/TRIANGULATION/fillcornermask.html", "fillcornermask.pro", "", "             file_comments   To color cleanly continents      categories   Graphics      keyword _EXTRA   Used to pass your keywords       keyword CONT_COLOR  default d n_colors   1   white    The color of the continent       uses   common pro      history   Sebastien Masson  smasson lodyc jussieu fr                         8 8 2002      version    Id: fillcornermask pro 163 2006 08 29 12:59:46Z navarro             PRO fillcornermask  xin  yin  COINMONTE   coinmonte  COINDESCEND   coindescend                                     CONT_COLOR   cont_color  INDICEZOOM   indicezoom                         _extra   ex     compile_opt idl2  strictarrsubs    common     if NOT keyword_set coinmonte  AND NOT keyword_set coindescend  then return     tempsun   systime 1             For key_performance     IF NOT keyword_set cont_color  THEN cont_color    d n_colors 1     255         definition of coordinates of points numbered 1 2 3 4 5 6  see figures below        x1   reform xin    y1   reform yin    IF  size x1 0  EQ 2 THEN x1   x1   0    IF  size y1 0  EQ 2 THEN y1   y1  0      x2    5 x1 shift x1   1    y2    5 y1 shift y1   1    nx   n_elements x1    ny   n_elements y1           Case land corner in ascent:        2 land points in diagonal ascending with 2 ocean points on the descendant diagonal                          3           t i nx 1    u i nx        t i nx 1 0                                                                            1                            4         v i f i v i 1                                                                                 t i 0       2 u i           t i 1 1       if keyword_set coinmonte  then BEGIN     if coinmonte 0  NE  1 then BEGIN       iup   coinmonte MOD nx       jup   coinmonte nx       for id   0  n_elements coinmonte 1 do BEGIN         i   iup id          j   jup id          IF i NE nx 1 AND j NE ny 1 THEN BEGIN           polyfill   x1 i  x2 i  x2 i  x1 i 1  x1 i                   y2 j  y1 j  y1 j 1  y2 j  y2 j                  color   cont_color  _extra   ex         ENDIF       endfor     endif   endif     Case land corner in descent:        2 land points in diagonal descending with 2 ocean points on the ascendant diagonal                          4       t i nx 1    u i nx        t i nx 1 0                                                                                      3                  5         v i f i v i 1            1                                                                                               t i 0      2 u i           t i 1 1     if keyword_set coindescend  then BEGIN     if coindescend 0  NE  1 then begin       idw   coindescend MOD nx       jdw   coindescend nx       for id   0  n_elements coindescend 1 do BEGIN         i   idw id          j   jdw id          IF i NE nx 1 AND j NE ny 1 THEN BEGIN           polyfill   x1 i  x2 i  x2 i  x1 i 1  x1 i                   y2 j  y1 j 1  y1 j  y2 j  y2 j                  color   cont_color  _extra   ex         ENDIF       endfor     endif   endif      IF keyword_set key_performance  THEN print   temps fillcornermask  systime 1 tempsun      return end"); 
    333 a[331] = new Array("./ToBeReviewed/TRIANGULATION/section.html", "section.pro", "", "     file_comments        categories         param FIELD         param RES         param GLAMAXE         param GPHIAXE         keyword ENDPOINTS           keyword BOXZOOM         keyword TYPE         keyword WDEPTH        keyword DIREC        keyword SHOWBUILD        keyword ONLYBOX        keyword _EXTRA    Used to pass your keywords       returns          uses   common pro       restrictions          examples          history   Sebastien Masson  smasson lodyc jussieu fr        version     Id: section pro 186 2006 09 20 10:50:37Z pinsard         PRO section  field  res  glamaxe  gphiaxe  ENDPOINTS   endpoints                  BOXZOOM   boxzoom  TYPE   type  WDEPTH   wdepth                  DIREC   direc  SHOWBUILD   showbuild  ONLYBOX   onlybox                  _extra   ex       include common     compile_opt idl2  strictarrsubs    cm_4mesh  cm_4data  cm_4cal   IF NOT keyword_set key_forgetold  THEN BEGIN  updatenew  updatekwd   ENDIF         definition of boxzoom in function of endpoints  then redefinition of the domain   boxzoom2d    min endpoints 0  endpoints 2  max   ma02  ma02                    min endpoints 1  endpoints 3  max   ma13  ma13      minprof   0    profdefault   200    if n_elements type  EQ 0 then type    nothing    Case N_Elements Boxzoom  OF     0:localbox    boxzoom2d  minprof  profdefault      1:localbox    boxzoom2d  minprof  boxzoom 0      2:localbox    boxzoom2d  boxzoom 0      4:if strpos type   z  NE  1 THEN         localbox    boxzoom2d  minprof  profdefault  ELSE localbox   boxzoom2d     5:localbox    boxzoom2d  minprof  boxzoom 4      6:localbox    boxzoom2d  boxzoom 4:5      Else:BEGIN       print  report Bad definition of the box        stop     END   ENDCASE   nelbox   n_elements localbox      if keyword_set wdepth  then grillechoice    vargrid   W      ELSE grillechoice   vargrid   domdef  localbox  GRIDTYPE   grillechoice   findalways  _extra   ex   grille   1   1   1   1  nx  ny   if less than 10 points where found  we apply domdef over the whole domain      problem  why 10 points as a test value    how can we find a good test value    IF nx   ny LE 10 THEN domdef  GRIDTYPE   grillechoice  _extra   ex   We redefine lon1    in case findalways has been used in domdef   lon1   min endpoints 0  endpoints 2  max   lon2    lat1   min endpoints 1  endpoints 3  max   lat2    we extend the box along the z axis   i that way the plot will be drawn   until its bottom part    if strpos type   z  NE  1 THEN BEGIN   We keep yranges  axis z  before changing the boxzoom       y range    localbox nelbox 1  localbox nelbox 2       if vargrid EQ  W  OR keyword_set wdepth  then BEGIN       firstzw   0    firstzw 1        lastzw    lastzw 1    firstzt 1        lastzt    lastzt 1    firstx   1    lastx    lastx   1    firsty   1    lasty    lasty   1     jpj  1       domdef  firstx  lastx  firsty  lasty  firstz  lastz                index  gridtype   vargrid    IF keyword_set onlybox  THEN return     grille  mask  glam  gphi  gdep  nx  ny  nz               firstx  firsty  firstz  lastx  lasty  lastz      We define the triangulation which will allows us to determinate the section     We recalculate it because it must be defined on the Earth and on oceans    Following the direction of the section  rather longitude or rather latitude     we define the way to triangulate    if strpos type   x  NE  1 then BEGIN      downward    lindgen nx  ny 0:nx 2  0:ny 2      tri   definetri nx  ny   downward     ENDIF ELSE tri   definetri nx  ny    If we have an irregular grid that is periodic  then it is possible that   some of the triangle have a very large size  neighborg points on the   sphere but far away when doing the projection  and should not be   taken into account     IF keyword_set key_irregular  AND keyword_set key_periodic  THEN BEGIN     glamtri   glam tri      glamtri   abs glamtri   shift glamtri  1  0      good   temporary glamtri  LT  10 max glam nx      good   where total temporary good  1  EQ 3      tri    temporary tri  temporary good    ENDIF     Equation of the line on which we do the section      abc   linearequation endpoints 0:1  endpoints 2:3    glamtri   glam tri    gphitri   gphi tri    Which points of the triangulation are above and below the line    if abc 1  NE 0 THEN       test   temporary gphitri  GE  abc 0 abc 1 temporary glamtri abc 2 abc 1      ELSE test   temporary glamtri  GE  abc 1 abc 0 temporary gphitri abc 2 abc 0     zero123   total test  1    to keep: triangles of the triangulation which are over the line    tokeep1   where zero123 EQ 1    tokeep2   where temporary zero123  EQ 2    tokeep    tokeep1  tokeep2     test   test  tokeep    tri   tri  tokeep    Which summit of the triangle is alone in a side of the line    single1   where test  0:n_elements tokeep1 1  EQ 1    single1   single1 single1 3 3   single2   where test  n_elements tokeep1 :n_elements tokeep 1  EQ 0    single2   single2 single2 3 3    undefine  tokeep   undefine  tokeep1   undefine  tokeep2   undefine  test    single    temporary single1  temporary single2    points1 the point  of the triangle  alone in a side of the line    point2 the other point of the triangle in the other side of the line    point1    single  single    point2    single EQ 0  1    single LE 1     undefine   single    ntri    size tri 2    index    lindgen ntri  lindgen ntri     points1   tri point1  index    points2   tri point2  temporary index    points : complex containing couples of points in a side and the other    side of the line  We have to delete duplicates    points   dcomplex points1  points2    points   points uniq points  sort points    symetrique   dcomplex imaginary points  double points    points   points where points shift temporary symetrique  1  NE 0    points1 coordinates of the point of the triangle which is alone in a side of the line    point2 coordinates of the other point of the triangle in the other side of the line    points1   complex glam    double points  gphi    double points    points2   complex glam imaginary points  gphi imaginary points    droites equations of line whose we look for the intersection wit the section    droites   linearequation points1  points2    inter   lineintersection droites  abc replicate 1  n_elements points1         Geographic coordinates of points we look for on the section    glamaxe   float inter    gphiaxe   imaginary inter    We arrange them in the growing order between boundaries of the section    if strpos type   x  NE  1 then BEGIN      sort   sort glamaxe      glamaxe   glamaxe sort      inbox   where glamaxe GE lon1 AND glamaxe LE lon2      glamaxe   glamaxe inbox      sort   sort inbox      gphiaxe   gphiaxe sort    ENDIF ELSE BEGIN     sort   sort gphiaxe      gphiaxe   gphiaxe sort      inbox   where gphiaxe GE lat1 AND gphiaxe LE lat2      gphiaxe   gphiaxe inbox      sort   sort inbox      glamaxe   glamaxe sort    ENDELSE   points   points sort    points1   points1 sort    points2   points2 sort    inter   inter sort    poids   abs points2 inter abs points2 points1       array   litchamp field    array   fitintobox array    if array 0  EQ  1 THEN BEGIN     res    1     return   ENDIF   if n_elements valmask  EQ 0 THEN valmask   1e20   taille   size array    if jpt GT 1 AND taille 0  GE 3 AND strpos type   t  EQ  1 then BEGIN     direc    t      array   grossemoyenne array   t      taille   size array      jpt   1   ENDIF   case 1 of    xy       taille 0  EQ 2:BEGIN       value1   array double points        terre   where value1 GT valmask 10        if terre 0  NE  1 then value1 terre     values f_nan       value2   array imaginary points        terre   where value2 GT valmask 10        if terre 0  NE  1 then value2 terre     values f_nan       res   poids value1 1 poids value2     END    xyz       taille 0  EQ 3 AND jpt EQ 1:BEGIN       npoints   n_elements points         index   double points replicate 1  nz replicate nx ny  npoints lindgen nz        value1   array index        terre   where value1 GT valmask 10        if terre 0  NE  1 then value1 terre     values f_nan       index   imaginary points replicate 1  nz replicate nx ny  npoints lindgen nz        value2   array index        terre   where value2 GT valmask 10        if terre 0  NE  1 then value2 terre     values f_nan       poids   poids replicate 1  nz        res   poids value1 1 poids value2   average following z         if strpos type   z  EQ  1 then begin         nan   where finite res  EQ 0          if vargrid EQ  W  then e3   e3w firstzw:lastzw  ELSE e3   e3t firstzt:lastzt          weight   replicate 1  npoints e3         if nan 0  NE  1 then weight nan     values f_nan         totalweight   total weight  2   nan          zero   where totalweight EQ 0          if zero 0  NE  1 then totalweight zero     values f_nan         res   total res weight  2   nan totalweight         direc    z string byte testvar var   toto        endif     END    xyt       taille 0  EQ 3 AND jpt NE 1:BEGIN       npoints   n_elements points         index   double points replicate 1  jpt replicate nx ny  npoints lindgen jpt        value1   array index        terre   where value1 GT valmask 10        if terre 0  NE  1 then value1 terre     values f_nan       index   imaginary points replicate 1  jpt replicate nx ny  npoints lindgen jpt        value2   array index        terre   where value2 GT valmask 10        if terre 0  NE  1 then value2 terre     values f_nan       poids   poids replicate 1  jpt        res   poids value1 1 poids value2     END    xyzt       taille 0  EQ 4:BEGIN       npoints   n_elements points         index   double points replicate 1  nz jpt replicate nx ny  npoints lindgen nz jpt        index   reform index  npoints  nz  jpt   over        value1   array index        terre   where value1 GT valmask 10        if terre 0  NE  1 then value1 terre     values f_nan       index   imaginary points replicate 1  nz jpt replicate nx ny  npoints lindgen nz jpt        index   reform index  npoints  nz  jpt   over        value2   array index        terre   where value2 GT valmask 10        if terre 0  NE  1 then value2 terre     values f_nan       poids   poids replicate 1  nz jpt        poids   reform poids  npoints  nz  jpt   over        res   poids value1 1 poids value2   average following z         if strpos type   z  EQ  1 then begin         nan   where finite res  EQ 0          if vargrid EQ  W  then e3   e3w firstzw:lastzw  ELSE e3   e3t firstzt:lastzt          weight   replicate 1  npoints e3         weight   weight replicate 1  jpt          weight   reform weight  npoints  nz  jpt   over          if nan 0  NE  1 then weight nan     values f_nan         totalweight   total weight  2   nan          zero   where totalweight EQ 0          if zero 0  NE  1 then totalweight zero     values f_nan         res   total res weight  2   nan totalweight         direc    z string byte testvar var   toto        endif     END   endcase      terre   where finite res  EQ 0    if terre 0  NE  1 then res terre    valmask    if n_elements showbuild  then BEGIN      winsave    window     psave    p     xsave    x     ysave    y     plt  findgen nx  ny   nodata   nofill   rempli  title     subtitle                  coast_thick   2  window   showbuild      p title          p subtitle          plots   endpoints 0  endpoints 2   endpoints 1  endpoints 3  color   50     plots   endpoints 0  endpoints 2   endpoints 1  endpoints 3  color   50  psym   2  thick   2      FOR i   0  n_elements points1 1 DO         plots   float points1 i  float points2 i                    imaginary points1 i  imaginary points2 i  color   150      plots  float points1  imaginary points1  color   150  psym   1     plots  float points2  imaginary points2  color   150  psym   1     plots  float inter  imaginary inter  color   250  psym   1       bug      IF terre 0  NE  1 THEN plots  float terre inter  imaginary terre inter  color   0  psym   1              dummy            read  dummy   prompt    press return to continue      IF  d name EQ  PS  THEN erase ELSE wset  winsave      p   psave      x   xsave      y   ysave   ENDIF     restoreboxparam   boxparam4section dat       return end"); 
    334 a[332] = new Array("./ToBeReviewed/TRIANGULATION/tracecote.html", "tracecote.pro", "", "             file_comments   Draw coasts in plt       categories   Graphics      keyword SURFACE_COASTLINE   To draw the surface coast line instead of   the coast line at level firstz tw  Useful only for deep   plots       keyword _EXTRA   used to pass your keywords      uses   common pro      history   Sebastien Masson  smasson lodyc jussieu fr                         30 9 1999      version    Id: tracecote pro 163 2006 08 29 12:59:46Z navarro             PRO tracecote  SURFACE_COASTLINE   surface_coastline  _EXTRA   ex     include commons     compile_opt idl2  strictarrsubs    cm_4data  cm_4mesh   IF NOT keyword_set key_forgetold  THEN BEGIN  updatenew   ENDIF      tempsun   systime 1            For key_performance    if n_elements key_gridtype  EQ 0 then key_gridtype    c      We enlarge a bit the frame defined by firsts  lasts  in order to    recuperate edges of the coast which are in the edging of the domain          tempdeux   systime 1           For key_performance  2    firstx   0    min firstxt  firstxf 1     lastx    max lastxt  lastxf 1    min firstyt  firstyf 1     lasty    max lastyt  lastyf 1     jpj 1     nx   lastx firstx 1    ny   lasty firsty 1   Which vertical level choose     IF keyword_set surface_coastline  THEN firstz   0 ELSE        IF strupcase vargrid  eq  W  THEN firstz   firstzw ELSE firstz   firstzt   Attribution of the mask and of coordinates  delimiting limits of the land  coordinates f     mask   tmask firstx:lastx  firsty:lasty  firstz     xf   glamf firstx:lastx  firsty:lasty     yf   gphif firstx:lastx  firsty:lasty       IF testvar var   key_performance  EQ 2 THEN       print   temps tracecote: determiner mask xf yf  systime 1 tempdeux      if key_gridtype EQ  e  then onemore   xf 0  0  gT xf 0  1    We pass in normalized coordinates to be able to become independant from the projection s    type choosen and from the support on which we do the drawing  screen or postscript     z   convert_coord xf yf data to_normal      xf   reform z 0    nx  ny     yf   reform z 1    nx  ny     tempvar   SIZE TEMPORARY z      Beware  following the projection  some points x or y can become NaN  see point    behind the earth in an orthographic projection      We put points to be eliminated at a very big value so that they will not pass the    test with distanceseuil  see further       if  map projection LE 7 AND  map projection NE 0        OR  map projection EQ 14 OR  map projection EQ 15 OR  map projection EQ 18 then begin       ind   where finite xf yf  EQ 0        IF ind 0  NE  1 THEN BEGIN           xf ind    1e5          yf ind    1e5       ENDIF    ENDIF    ind   where xf LT  p position 0  OR xf GT  p position 2     IF ind 0  NE  1 THEN xf ind    1e5    ind   where yf LT  p position 1  OR yf GT  p position 3     IF ind 0  NE  1 THEN yf ind    1e5    tempvar   SIZE TEMPORARY ind    we delete ind      if n_elements key_gridtype  EQ 0 then key_gridtype    c     case key_gridtype of        c :drawcoast_c  mask  xf  yf  nx  ny  _extra   ex        e :drawcoast_e  mask  xf  yf  nx  ny  onemore   onemore  _extra   ex    endcase    if keyword_set key_performance  THEN print   temps tracecote  systime 1 tempsun    return end"); 
    335 a[333] = new Array("./ToBeReviewed/TRIANGULATION/tracemask.html", "tracemask.pro", "", "             file_comments   Draw contours of a mask      categories   Utilities       param MASKENTREE  in required    2d array specifying the mask       param XIN  in required    2d array specifying longitude coordinates        param YIN  in required    2d array specifying latitude coordinates       keyword COAST_COLOR  default 0    The color of the coastline    Default is black  0       keyword COAST_THICK  default 1    The thick of the trait to trace continents      keyword OVERPLOT   To do a plot over an other one       keyword _EXTRA   used to pass your keywords      uses   common pro      history   Sebastien Masson  smasson lodyc jussieu fr       version    Id: tracemask pro 163 2006 08 29 12:59:46Z navarro             PRO tracemask  maskentree  xin  yin  COAST_COLOR   coast_color  COAST_THICK   coast_thick  OVERPLOT   overplot  _extra   ex       compile_opt idl2  strictarrsubs      if keyword_set overplot  then return    cm_general   IF NOT keyword_set key_forgetold  THEN BEGIN  updatekwd   ENDIF       tempsun   systime 1            For key_performance   We avoid edging problems:    tempdeux   systime 1           For key_performance  2    tailleentree   size maskentree     nx   tailleentree 1 1    ny   tailleentree 2 1   we check the input axis   IF n_elements xin  EQ 0 THEN xentree   findgen nx 1  ELSE xentree   xin   IF  size xentree 0  EQ 1 THEN xentree   xentree replicate 1 ny 1    IF n_elements yin  EQ 0 THEN yentree   findgen ny 1  ELSE yentree   yin   IF  size yentree 0  EQ 1 THEN yentree   replicate 1 nx 1 yentree   We enlarge the mask by 1 column to the left an d1 line to the bottom    mask   intarr tailleentree 1 1  tailleentree 2 1     mask 1:tailleentree 1  1:tailleentree 2    maskentree   The 2 first columns are identical     mask 0  1:tailleentree 2    maskentree 0      The 2 first lines are identical     mask 1:tailleentree 1  0    maskentree  0    We calculate the position following x of points which will serve to trace the mask  They are situated between each points of the mask  exept for the last column we can not calculate and so we put at max  x range     xrange    x range sort x range    if REVERSE_X is used    xentree    5 xentree shift xentree   1  0     IF not keyword_set overplot  THEN xentree nx 2      xrange 1       ELSE xentree nx 2      xentree nx 3      we sill    xentree   xrange 0    xentree  yentree   yrange 1     yf   fltarr nx  ny     yf 1:nx 1  1:ny 1    yentree    yf 0  1:ny 1    yentree 0       IF not keyword_set overplot  THEN BEGIN        if yinverse then yf  0    yrange 1  ELSE yf  0    yrange 0     ENDIF ELSE yentree  0    yentree  1       IF testvar var   key_performance  EQ 2 THEN       print   temps tracemask: determination du mask et des ses coordonnes  systime 1 tempdeux     We trace vertical segments:      tempdeux   systime 1           For key_performance  2    liste   where mask shift mask   1  0  EQ 1     IF liste 0  NE  1 THEN BEGIN   We recuperate lx and ly which are indexes in a 2d array of points given by list       ly   liste nx   lx   temporary liste nx ly       indice   where ly NE 0    We do not take points concernining    the first line because in this case  the point j 1 is not defined        if indice 0  NE  1 then begin          lx   lx indice    ly   ly temporary indice           IF testvar var   key_performance  EQ 2 THEN             print   temps tracemask: liste traits verticaux  systime 1 tempdeux          tempdeux   systime 1     For key_performance  2   loop on concerned points and drawing of the segment    comments: we use plots instead of plot because plots is faster           for pt   0L  n_elements lx 1 do BEGIN              i   lx pt    j   ly pt              plots   xf i  j 1  xf i  j   yf i  j 1  yf i  j                    color   coast_color  thick   coast_thick  _extra   ex             if pt LT 5 then begin             endif          endfor          IF testvar var   key_performance  EQ 2 THEN             print   temps tracemask: trace traits verticaux  systime 1 tempdeux       endif    ENDIF     We trace horizontal segments:      tempdeux   systime 1           For key_performance  2    liste   where mask shift mask  0   1  EQ 1     IF liste 0  NE  1 THEN BEGIN       ly   liste nx   lx   temporary liste nx ly       indice   where lx NE 0      We do not take point sof the first column        if indice 0  EQ  1 then return       lx   lx indice    ly   ly temporary indice        IF testvar var   key_performance  EQ 2 THEN          print   temps tracemask: liste traits horizontaux  systime 1 tempdeux       tempdeux   systime 1        For key_performance  2       for pt   0L  n_elements lx 1 do BEGIN           i   lx pt    j   ly pt           plots   xf i 1  j  xf i  j   yf i 1  j  yf i  j                 color   coast_color  thick   coast_thick  _extra   ex       endfor       IF testvar var   key_performance  EQ 2 THEN          print   temps tracemask: trace traits horizontaux  systime 1 tempdeux    endif        if keyword_set key_performance  THEN print   temps tracemask  systime 1 tempsun         return end     "); 
    336 a[334] = new Array("./ToBeReviewed/TRIANGULATION/triangule.html", "triangule.pro", "", "     file_comments        categories        param MASKENTREE  in optional type 2d array    It is a 2d array which will serve to mask the field we will trace after with CONTOUR      TRIANGULATION triangule mask    If this argument is not specified  the function use tmask      keyword BASIC   Specify that the mask is on a basic grid  use the triangulation for vertical cuts and hovmoellers       keyword COINMONTE  type array    To obtain the array of  ascending land corner  to be treated with    completecointerre pro in the variable array instead of make it pass by the global    variable twin_corners_up       keyword COINDESCEND  type array    See COINMONTE      keyword _EXTRA   Used to pass your keywords      returns        uses        restrictions        examples        history        version    Id: triangule pro 163 2006 08 29 12:59:46Z navarro        todo   seb       FUNCTION triangule  maskentree  BASIC   basic  COINMONTE   coinmonte  COINDESCEND   coindescend  _extra   ex     compile_opt idl2  strictarrsubs    common     szmsk   size maskentree    IF szmsk 0  EQ 0 THEN BEGIN     nx   jpi     ny   jpj   ENDIF ELSE BEGIN      nx   szmsk 1      ny   szmsk 2    ENDELSE   IF nx EQ 1 OR ny EQ 1 THEN return   1     IF arg_present coinmonte  THEN coinmonte   1   IF arg_present coindescend  THEN coindescend   1      if keyword_set basic  then        return  triangule_c maskentree   BASIC  COINMONTE   coinmonte                              COINDESCEND   coindescend  _extra   ex       if n_elements key_gridtype  EQ 0 then key_gridtype    c     if n_elements maskentree  EQ 0 then maskentree   tmask    0     case key_gridtype of        e :res   triangule_e maskentree  _extra   ex         c :res   triangule_c maskentree  COINMONTE   coinmonte  COINDESCEND   coindescend  _extra   ex     endcase    return  res end"); 
    337 a[335] = new Array("./ToBeReviewed/TRIANGULATION/triangule_c.html", "triangule_c.pro", "", "             file_comments   Construct the triangulation array      The idea is: construct a list of triangle which link points between them     This is automatically done by the function TRIANGULATE    Here:   we consider the fact that points are disposed on a grid  regular or not     but not unstructured  that is to say that points are written following a    rectangular matrix  A easy way to do triangles between all points is then:          for each point  i j  of the matrix  except those of the last line and of       the last column  we call rectangle  i j  the rectangle made of the four       points  i j   i 1 j   i j 1   i 1 j 1  To trace all triangle  we just       have to trace the 2 triangles contained in rectangles  i j      We notice that each rectangle  i j  have 2 diagonals  it is true  Make a   drawing to make sure  so there are two possible choice for each rectangle   we want to cut in 2 triangles       It is thanks to this choice that we will be able to trace coast with right   angles  At each angle of coast remarkable by the existence of an unique land   point or of an unique ocean point on one of the four summit of a rectangle  i j    we have to cut the rectangle following the diagonal passing by this point        categories   Graphics      param MASKENTREE  in optional type 2d array    It is a 2d array which will serve to mask the field we will trace after with CONTOUR      TRIANGULATION triangule mask    If this argument is not specified  the function use tmask      keyword BASIC   Specify that the mask is on a basic grid  use the triangulation for vertical cuts and hovmoellers       keyword KEEP_CONT   To keep the triangulation even on the continents      keyword COINMONTE  type array    To obtain the array of  ascending land corner  to be treated with    completecointerre pro in the variable array instead of make it pass by the global    variable twin_corners_up       keyword COINDESCEND  type array    See COINMONTE      returns   res: tableau 2d  3 nbre de triangles    Each line of res represent indexes of points constituting summits of a triangle     See how we trace triangles in definetri pro      uses   common pro   different pro   definetri pro      restrictions   Datas whose we want to do the contour must be disposed in a matrix     On the other hand  in the matrix  the points s arrangement can not be    irregular  If it is  use TRIANGULE       history   Sebastien Masson  smasson lodyc jussieu fr                          26 4 1999      version    Id: triangule_c pro 163 2006 08 29 12:59:46Z navarro        todo   seb L 267 268 je ne pense pas que ce soit ce que tu voulais dire mais    c est la traduction de ce qu il y avait  crit  Correction si besoin          FUNCTION triangule_c  maskentree  COINMONTE   coinmonte  COINDESCEND   coindescend  BASIC   basic  KEEP_CONT   keep_cont   compile_opt idl2  strictarrsubs   tempsun   systime 1               For key_performance    cm_4mesh IF NOT keyword_set key_forgetold  THEN BEGIN  updatenew ENDIF     Is the mask given or do we have to take tmask      msk   maskentree taille   size msk  nx   taille 1  ny   taille 2    IF n_elements keep_cont  EQ 0 THEN keep_cont   1 key_irregular   if keyword_set key_periodic nx EQ jpi      AND NOT keyword_set basic  then BEGIN      msk    msk  msk 0        nx   nx 1 ENDIF     We will find the list of rectangles  i j located by their left    bottom corner  we have to cut folowing a descendant diagonal     We will call this list : pts_downward    pts_downward   0    We construct the test which allow to find this triangle :             shift msk   0   1 shift msk   1   1                                                                                                                                                                                                            msk shift msk   1   0    sum1   msk shift msk   1  0 shift msk   1   1      points which surround the left top point  sum2   msk shift msk  0   1 shift msk   1   1      points which surround the right bottom point    tempdeux   systime 1              For key_performance  2   The left top land point surrounded by ocean points liste   where   4 sum1 1 shift msk  0   1  EQ 1   if liste 0  NE  1 THEN pts_downward    pts_downward liste     The left top ocean point surrounded by land points liste   where   1 sum1 shift msk  0   1  EQ 1  if liste 0  NE  1 THEN pts_downward    pts_downward liste     The right bottom land point surrounded by ocean points liste   where   4 sum2 1 shift msk   1   0  EQ 1  if liste 0  NE  1 THEN pts_downward    pts_downward liste     The right bottom ocean point surrounded by land points liste   where   1 sum2 shift msk   1   0  EQ 1  if liste 0  NE  1 THEN pts_downward    pts_downward liste   undefine  liste   IF testvar var   key_performance  EQ 2 THEN     print   temps triangule: trouver pts_downward  systime 1 tempdeux   if  NOT keyword_set basic  OR keyword_set coinmonte  OR keyword_set coindescend  then begin     tempdeux   systime 1          For key_performance  2  2 land points in ascendant diagonal with 2 ocean points in descendant diagonal      coinmont   where   1 msk 1 shift msk   1   1                           shift msk  0   1 shift msk   1   0  EQ 1        if coinmont 0  NE  1 THEN pts_downward    pts_downward  coinmont        IF testvar var   key_performance  EQ 2 THEN         print   temps triangule: trouver coinmont  systime 1 tempdeux     tempdeux   systime 1          pour key_performance  2       coindesc   where   1 shift msk   0   1 1 shift msk   1  0                            msk shift msk   1   1  EQ 1       2 land points in descendant diagonal with 2 ocean points in ascendant diagonal      IF testvar var   key_performance  EQ 2 THEN         print   temps triangule: trouver coindesc  systime 1 tempdeux   ENDIF   if n_elements pts_downward  EQ 1 then BEGIN      tempdeux   systime 1          For key_performance  2       triang   definetri nx  ny        IF testvar var   key_performance  EQ 2 THEN         print   temps triangule: definetri  systime 1 tempdeux     coinmont    1     coindesc    1 ENDIF ELSE BEGIN      tempdeux   systime 1          For key_performance  2     pts_downward   pts_downward 1:n_elements pts_downward 1      pts_downward   pts_downward uniq pts_downward  sort pts_downward    None rectangle can have an element of the last column or of the    last line as left bottom corner    so we have to remove these points if they has been selected in pts_downward      derniere_colonne    lindgen ny 1 nx 1      derniere_ligne   lindgen nx ny 1 nx      pts_downward  different pts_downward derniere_colonne       pts_downward  different pts_downward derniere_ligne       if  NOT keyword_set basic  OR keyword_set coinmonte  OR keyword_set coindescend  then begin         if coinmont 0  NE  1 then begin             coinmont  different coinmont derniere_colonne               coinmont  different coinmont derniere_ligne           endif         if coindesc 0  NE  1 then begin             coindesc  different coindesc derniere_colonne               coindesc  different coindesc derniere_ligne           endif     ENDIF ELSE BEGIN          coinmont    1         coindesc    1     ENDELSE      IF testvar var   key_performance  EQ 2 THEN         print   temps triangule: menage ds pts_downward coinmont et coindesc  systime 1 tempdeux       tempdeux   systime 1          For key_performance  2     if  pts_downward 0  EQ  1 then triang   definetri nx  ny        ELSE triang   definetri nx  ny  pts_downward      IF testvar var   key_performance  EQ 2 THEN         print   temps triangule: definetri  systime 1 tempdeux ENDELSE      We delete land points which only contain land points          if  NOT keyword_set basic  AND  NOT keyword_set keep_cont  then begin     tempdeux   systime 1          For key_performance  2   We delete rectangles which are entirely in the land      recdsterre   where 1 msk 1 shift msk   1  0 1 shift msk  0   1 1 shift msk   1   1  EQ 1      IF testvar var   key_performance  EQ 2 THEN         print   temps triangule: tous les recdsterre  systime 1 tempdeux    We do an other sort :   We have to do not remove rectangles which only have one common summit    t1   systime 1      indice   intarr nx  ny      trimask   intarr nx  ny      trimask 0:nx 2  0:ny 2    1     IF recdsterre 0  NE  1 then BEGIN          tempdeux   systime 1      For key_performance  2         indice recdsterre    1         if NOT keyword_set basic  then begin             vire1   0             vire2   0             while  vire1 0  NE  1 OR vire2 0  NE  1  ne 0 do begin   Delete rectangles we have to remove from recsterre  in fact those we have    to keep although they ar eentirely in the land                  vire1   where   indice shift indice   1   1                                     1 shift indice  0   1 1 shift indice   1  0 trimask  EQ 1                  if vire1 0  NE  1 THEN BEGIN                      indice vire1    0                 indice vire1 nx 1    0                 endif                                  vire2   where   1 indice 1 shift indice   1   1                                     shift indice  0   1 shift indice   1  0 trimask  EQ 1                  if vire2 0  NE  1 THEN BEGIN                      indice vire2 1    0                 indice vire2 nx    0                 endif             endwhile             IF testvar var   key_performance  EQ 2 THEN                 print   temps triangule: trier les recdsterre  systime 1 tempdeux         endif         indice  ny 1    1       The last column and the last line         indice nx 1      1       can not define any rectangle            tempdeux   systime 1      For key_performance  2         recgarde   where indice EQ 0    We recuperate numbers of triangles we will keep          trigarde   2 recgarde recgarde nx          trigarde   transpose temporary trigarde          trigarde    trigarde  trigarde 1             triang   triang  temporary trigarde          IF testvar var   key_performance  EQ 2 THEN             print   temps triangule: virer les triangle de la liste  systime 1 tempdeux     endif endif   print   temps tri triangles  systime 1 t1      When key_periodic equal 1  triang is a list of indexes s array which    have a surplus column    We have to put it back to the initial matrix by putting indexes of    the last column equal to these of the last column    tempdeux   systime 1              For key_performance  2 if keyword_set key_periodic nx 1 EQ jpi      AND NOT keyword_set basic  then BEGIN      indicey   triang nx     indicex   triang indicey nx     nx   nx 1     liste   where indicex EQ nx      if liste 0  NE  1 then indicex liste    0     triang   indicex nx indicey     nx   nx 1     if coinmont 0  NE  1 then begin         indicey   coinmont nx         indicex   coinmont indicey nx         nx   nx 1         liste   where indicex EQ nx          if liste 0  NE  1 THEN indicex liste    0         coinmont   indicex nx indicey         nx   nx 1     endif     if coindesc 0  NE  1 then begin         indicey   coindesc nx         indicex   coindesc indicey nx         nx   nx 1         liste   where indicex EQ nx          if liste 0  NE  1 THEN indicex liste    0         coindesc   indicex nx indicey         nx   nx 1     endif endif IF testvar var   key_performance  EQ 2 THEN     print   temps triangule: finitions  systime 1 tempdeux    if keyword_set coinmonte  THEN coinmonte   coinmont ELSE twin_corners_up   coinmont if keyword_set coindescend  THEN coindescend   coindesc ELSE twin_corners_dn   coindesc   IF NOT keyword_set key_forgetold  THEN BEGIN     updateold ENDIF   IF keyword_set key_performance  THEN print   temps triangule  systime 1 tempsun   return  triang  END "); 
    338 a[336] = new Array("./ToBeReviewed/TRIANGULATION/triangule_e.html", "triangule_e.pro", "", "           file_comments   Build the triangulation for a E grid type      categories   Graphics       param MASKENTREE  in optional type 2d array    It is a 2d array which will serve to mask the field we will trace after with CONTOUR      TRIANGULATION triangule mask    If this argument is not specified  the function use tmask       keyword BASIC   Specify that the mask is on a basic grid  use the triangulation for vertical cuts and hovmoellers        keyword COINMONTE  type array     To obtain the array of  ascending land corner  to be treated with    completecointerre pro in the variable array instead of make it pass by the global    variable twin_corners_up       keyword COINDESCEND  type array    See COINMONTE      keyword SHIFTED       uses   common pro       history   Sebastien Masson  smasson lodyc jussieu fr                         june 2001       version     Id: triangule_e pro 163 2006 08 29 12:59:46Z navarro         todo   seb L 152 153 je ne pense pas que ce soit ce que tu voulais dire mais    c est la traduction de ce qu il y avait  crit  Correction si besoin          FUNCTION triangule_e  maskentree  COINMONTE   coinmonte  COINDESCEND   coindescend                       SHIFTED   shifted  BASIC   basic       compile_opt idl2  strictarrsubs    cm_4mesh   IF NOT keyword_set key_forgetold  THEN BEGIN  updatenew   ENDIF      tempsun   systime 1            For key_performance     Is the mask given or do we have to take tmask         msk   maskentree    sizem   size msk     nx   sizem 1     ny   sizem 2       if keyword_set key_periodic nx EQ jpi        AND NOT keyword_set basic  then BEGIN        msk    msk  msk 0          nx   nx 1    ENDIF     we will find the diamond that must be cut in two triangle using the   horizontal diagonal       index   lindgen nx  ny     index   index 0:nx 2  1:ny 2     if n_elements shifted  EQ 0 then shifted   1    oddeven    index nx 1 shifted  MOD 2    msk1   msk index     msk2   msk index 1     sum   msk index nx oddeven msk index nx oddeven     sum1   msk2 sum    sum2   msk1 sum     horizontal      singularpoint   where msk1 EQ 0 AND sum1 EQ 3  OR  msk1 EQ 1 AND sum1 EQ 0                             OR  msk2 EQ 0 AND sum2 EQ 3  OR  msk2 EQ 1 AND sum2 EQ 0                             OR  sum EQ 0 AND  msk1 msk2  EQ 2       if singularpoint 0  NE  1 then begin       horizontal   index singularpoint        triang   definetri_e nx  ny  horizontal  SHIFTED   shifted     ENDIF ELSE triang   definetri_e nx  ny  SHIFTED   shifted       coinmont   index where sum EQ 2 AND  msk1 msk2  EQ 0       coindesc   index where sum EQ 0 AND  msk1 msk2  EQ 2      we keep only the triangles which are outside the land   but for some reasons we will in fact delete the land diamond        allrecinland   where sum1 msk1 EQ 0       indexallinland   index allrecinland       otherrec    lindgen nx  ny 0:nx 2  1:ny 2       otherrec   different otherrec  indexallinland           index   lindgen nx  ny       index   index 0:nx 3  2:ny 3       out   inter index  indexallinland       IF out 0  NE  1 THEN begin         out   inter out 1  indexallinland          IF out 0  NE  1 THEN begin            out   out 1            oddeven    out nx 1 shifted  MOD 2            out   inter out nx oddeven  otherrec             IF out 0  NE  1 THEN begin               out   inter out 2 nx  otherrec                IF out 0  NE  1 THEN begin                  out   out nx out nx shifted  MOD 2                endif            endif         endif      ENDIF      help   out          index   lindgen nx  ny       index   index 0:nx 3  2:ny 3       out   inter index  otherrec       IF out 0  NE  1 THEN begin         out   inter out 1  otherrec          IF out 0  NE  1 THEN begin            out   out 1            oddeven    out nx 1 shifted  MOD 2            out   inter out nx oddeven  indexallinland             IF out 0  NE  1 THEN begin               out   inter out 2 nx  indexallinland                IF out 0  NE  1 THEN begin                  out   out nx out nx shifted  MOD 2                endif            endif         endif      endif      help   out          IF out 0  EQ  1 THEN out   different indexallinland  out  ELSE out   indexallinland      triout   numtri out  nx  ny       triout    triout  triout 1       goodtri   lindgen 2 nx 1 ny 1       goodtri   different goodtri  triout       triang   triang  temporary goodtri           When key_periodic equal 1  triang is a list of indexes s array which    have a surplus column    We have to put it back to the initial matrix by putting indexes of    the last column equal to these of the last column       tempdeux   systime 1           For key_performance  2    if keyword_set key_periodic nx 1 EQ jpi        AND NOT keyword_set basic  then BEGIN        indicey   triang nx       indicex   triang indicey nx       nx   nx 1       liste   where indicex EQ nx        if liste 0  NE  1 then indicex liste    0       triang   indicex nx indicey       nx   nx 1         if coinmont 0  NE  1 then begin            indicey   coinmont nx            indicex   coinmont indicey nx            nx   nx 1            liste   where indicex EQ nx             if liste 0  NE  1 THEN indicex liste    0            coinmont   indicex nx indicey            nx   nx 1         endif         if coindesc 0  NE  1 then begin            indicey   coindesc nx            indicex   coindesc indicey nx            nx   nx 1            liste   where indicex EQ nx             if liste 0  NE  1 THEN indicex liste    0            coindesc   indicex nx indicey            nx   nx 1         endif    endif    IF testvar var   key_performance  EQ 2 THEN       print   temps triangule: finitions  systime 1 tempdeux        if arg_present coinmonte  THEN coinmonte   coinmont ELSE twin_corners_up   coinmont     if arg_present coindescend  THEN coindescend   coindesc ELSE twin_corners_dn   coindesc     IF NOT keyword_set key_forgetold  THEN BEGIN      updateold    ENDIF        IF keyword_set key_performance  THEN print   temps triangule  systime 1 tempsun      return  triang  END "); 
    339 a[337] = new Array("./ToBeReviewed/UTILITAIRE/get_extra.html", "get_extra.pro", "", "     todo    seb       elle fait quoi      elle permet :      soit de creer une variable extra contenant les mots clefs que tu   desires      soit de completer une variable extra avec des mots clefs que tu   rajoutes     imagine :    tu es dans une routine et tu veux passer un mot clef en extra car la   routine que tu appelles ne le connait pas mais la routine suivante oui    tu fais     extra get_extra ok  year 1999  age_capitaine 35      et tu obtiens la bonne variable extra  fait un help extra struc     ou alors  tu completes un extra existant :    extra get_extra _extra extra  name Guillaume     FUNCTION get_extra  _extra   extra     compile_opt idl2  strictarrsubs       return  extra END "); 
    340 a[338] = new Array("./ToBeReviewed/UTILITAIRE/oups.html", "oups.pro", "", ""); 
    341 a[339] = new Array("./ToBeReviewed/UTILITAIRE/vzoom.html", "vzoom.pro", "", ""); 
    342 a[340] = new Array("./ToBeReviewed/WIDGET/AUTOUR_de_XXX/buildcmd.html", "buildcmd.pro", "", "             file_comments   This function send back a string which contain the reading command    and drawing s parameters       param BASE  in required       keyword BOXZOOM   Vector indicating the geographic zone on which we want to cut the map     If BOXZOOM has :      1 element : The extraction is made on  lon1  lon2  lat1  lat2  0 boxzoom 0      2 elements: The extraction is made on  lon1  lon2  lat1  lat2  boxzoom 0 boxzoom 1      4 elements: The extraction is made on  Boxzoom  0  max gdept  gdepw      5 elements: The extraction is made on  Boxzoom 0:3  0  Boxzoom 4      6 elements: The extraction is made on Boxzoom    Where lon1  lon2 lat1 lat2 are global variables defined at the last domdef       keyword FORCETYPE      history   Sebastien Masson  smasson lodyc jussieu fr       version    Id: buildcmd pro 172 2006 09 11 07:11:26Z smasson        todo   seb: documenter le param BASE et le keyword FORCETYPE           FUNCTION buildcmd  base  BOXZOOM   boxzoom  FORCETYPE   forcetype       we get back the ids of the widget parts       compile_opt idl2  strictarrsubs     txtcmdid   widget_info base  find_by_uname    txtcmd    domainid   widget_info base  find_by_uname    domain    actionid   widget_info base  find_by_uname    action      optionid   widget_info base  find_by_uname    option      widget_control  base  get_uvalue   top_uvalue   smallin   extractatt top_uvalue   smallin    numdessinin   smallin 2 1   smallout   extractatt top_uvalue   smallout    numdessinout   smallout 2 1     options   extractatt top_uvalue   options       optionsflag   extractatt top_uvalue   optionsflag    portrait    strtrim optionsflag where options EQ  Portrait Landscape  0  1 0        We determinate which procedure we will call to do the drawing and the type     IF keyword_set forcetype  THEN type   forcetype     ELSE type   widget_info actionid   combobox_gettext    case type of      pltz diag up :procedure    pltz       pltz diag dn :procedure    pltz       pltt diag up :procedure    pltt       pltt diag dn :procedure    pltt       xy :procedure    plt       xz :procedure    pltz       yz :procedure    pltz       xt :procedure    pltt       yt :procedure    pltt       zt :procedure    pltt       x :procedure    plt1d       y :procedure    plt1d       z :procedure    plt1d       t :procedure    pltt      ELSE:procedure   type   endcase      Search of options     options   extractatt top_uvalue   options       optionsflag   extractatt top_uvalue   optionsflag    flags   optionsflag  numdessinin    xindex    flags where options EQ  Longitude   x index 0    yindex    flags where options EQ  Latitude   y index 0    drawvecteur    flags where options EQ  Vecteur 0 procedure eq  plt    drawover    flags where options EQ  Overlay 0      alreadyread   extractatt top_uvalue   alreadyread    alreadyvector   extractatt top_uvalue   alreadyvector    alreadyover   extractatt top_uvalue   alreadyoer    What must we read     case 1 of     alreadyover NE  1:BEGIN       toread   alreadyover 1       readswitch    over      END     alreadyvector NE  1 AND alreadyvector NE  pi:BEGIN       toread   alreadyvector 1       readswitch    vector      END     alreadyread NE  1 AND alreadyread NE  pi AND alreadyread NE 2 pi:BEGIN       toread   alreadyread 1       readswitch    classic      END     else:BEGIN       case 1 of         alreadyvector eq  pi:BEGIN           toread   alreadyover 1           readswitch    over          END         alreadyread EQ  pi:BEGIN           toread   alreadyvector 1           readswitch    vector          END         alreadyread EQ 2 pi:BEGIN           toread   alreadyover 1           readswitch    over          END         ELSE:BEGIN           toread   alreadyread 1           readswitch    classic          END       endcase     END   ENDCASE     widget_control  txtcmdid  get_value   widcmd   widcmd    strtrim widcmd  2    IF widcmd 0  EQ   THEN widcmd    zzz       cutcmd  widcmd 0  toread  numberofread  prefix  nameexp  ending     readcmd   buildreadcmd base   nameexp  procedure  type                              BOXZOOM   boxzoom  complete   readswitch EQ  classic  AND alreadyread EQ  1    we look for the line containing funclec_name   currentfile   extractatt top_uvalue   currentfile    readparameters    extractatt top_uvalue   readparameters currentfile    i   0   while strpos readcmd i  readparameters funclec_name     EQ  1 do i   i 1              case readswitch of      classic :BEGIN       if alreadyread 1 EQ 0 then BEGIN   we start the reading command         readcmd     beginning of reading the field to draw  readcmd          readcmd i 1     field       prefix   readcmd i 1        ENDIF ELSE BEGIN   we complet the reading command         oldrdcmd   extractatt top_uvalue   currentreadcmd          nl   n_elements oldrdcmd           oldrdcmd nl 1    oldrdcmd nl 1                readcmd i    prefix   readcmd i          readcmd    temporary oldrdcmd  temporary readcmd        ENDELSE   exit if we have to read other fields        if alreadyread 1 NE numberofread 1 THEN BEGIN           top_uvalue 1  findline top_uvalue   currentreadcmd    readcmd          top_uvalue 1  findline top_uvalue   alreadyread    alreadyread 1          top_uvalue 1  findline top_uvalue   noticebase    xnotice Select the field number  strtrim alreadyread 3  1          return           ENDIF   we finalize the reading command       IF ending NE   THEN BEGIN          nl   n_elements readcmd           readcmd nl 1    readcmd nl 1                readcmd    temporary readcmd  ending        ENDIF       readcmd    temporary readcmd                        field   create_struct arr:temporary field  grid:vargrid  unit:varunit  experiment:varexp  name:varname                         end of reading the field to draw      we get back _EXTRA:       extra   extractatt top_uvalue   extra        if xindex NE 0 then extra   create_struct extra   xindex  xindex        if yindex NE 0 then extra   create_struct extra   yindex  yindex        exextra   cw_specifie_get_value base        tgnm   strlowcase tag_names exextra        indtmp   where tgnm EQ  box  OR tgnm EQ  boxzoom  cnt        IF cnt EQ 1 THEN BEGIN          boxextra   exextra indtmp 0          exextra   extractstru exextra   box   boxzoom        ENDIF        extra    mixstru exextra  extra        sextra   struct2string extra        readcmd    temporary readcmd   extra    sextra           top_uvalue 1  findline top_uvalue   currentreadcmd    readcmd       case 1 of         drawvecteur:BEGIN   we have to read the vectors            top_uvalue 1  findline top_uvalue   alreadyread     pi            top_uvalue 1  findline top_uvalue   noticebase    xnotice Select the zonal component of vector            return             END         drawover:BEGIN   we have to read the field to overlay             top_uvalue 1  findline top_uvalue   alreadyread    2 pi            top_uvalue 1  findline top_uvalue   noticebase    xnotice Select the field to overlay            return             END   finished  we draw the plot          ELSE: top_uvalue 1  findline top_uvalue   alreadyread     1       endcase     END      vector :BEGIN   for the vectors  there is 2 components  we read u when alreadyvector   is a interger and v when alreadyvector is a interger 0 5       if floor alreadyvector 1 EQ 0 then begin         if floor alreadyvector  EQ alreadyvector then begin           readcmd     beginning of reading the zonal component of vector  readcmd            readcmd i 1     fieldu       prefix   readcmd i 1          ENDIF ELSE BEGIN           readcmd     beginning of reading the meridional component of vector  readcmd            readcmd i 1     fieldv       prefix   readcmd i 1          ENDELSE         readcmd    extractatt top_uvalue   currentreadcmd  temporary readcmd        ENDIF ELSE BEGIN         oldrdcmd   extractatt top_uvalue   currentreadcmd          nl   n_elements oldrdcmd           oldrdcmd nl 1    oldrdcmd nl 1                readcmd i    prefix   readcmd i          readcmd    temporary oldrdcmd  temporary readcmd        ENDELSE         case alreadyvector 1 of         numberofread 1:BEGIN   we finalize the reading command           IF ending NE   THEN BEGIN              nl   n_elements readcmd               readcmd nl 1    readcmd nl 1                    readcmd    temporary readcmd  ending            ENDIF           readcmd    temporary readcmd                            fieldu   create_struct arr:temporary fieldu  grid:vargrid  unit:varunit  experiment:varexp  name:varname                             end of reading the zonal component of vector               top_uvalue 1  findline top_uvalue   currentreadcmd    readcmd   we finished zonal component reading    we know switch to meridional component             top_uvalue 1  findline top_uvalue   alreadyvector     5            top_uvalue 1  findline top_uvalue   noticebase    xnotice Select the meridional component of vector            return             END         numberofread 0 5:BEGIN   we finalize the reading command           IF ending NE   THEN BEGIN              nl   n_elements readcmd               readcmd nl 1    readcmd nl 1                    readcmd    temporary readcmd  ending            ENDIF           readcmd    temporary readcmd                             fieldv   create_struct arr:temporary fieldv  grid:vargrid  unit:varunit  experiment:varexp  name:varname                             end of reading the meridional component of vector      we finished meridional component reading      we get back _EXTRA of the vector and we complet extra already build           extra   extractatt top_uvalue   extra            exextra   cw_specifie_get_value base            extra    mixstru exextra  extra            sextra   struct2string extra            readcmd    readcmd   vectorextra    sextra   extra mixstru extra vectorextra               top_uvalue 1  findline top_uvalue   currentreadcmd    readcmd             if drawover then BEGIN   shall we do an overlay               top_uvalue 1  findline top_uvalue   alreadyvector     pi              top_uvalue 1  findline top_uvalue   noticebase    xnotice Select the field to overlay              return               ENDIF ELSE BEGIN   it is done know               top_uvalue 1  findline top_uvalue   alreadyread     1              top_uvalue 1  findline top_uvalue   alreadyvector     1           ENDELSE         END         ELSE:BEGIN   we still need to read some vector components             top_uvalue 1  findline top_uvalue   currentreadcmd    readcmd            top_uvalue 1  findline top_uvalue   alreadyvector    alreadyvector 1           if floor alreadyvector  EQ alreadyvector then text     zonal               ELSE text     meridional              top_uvalue 1  findline top_uvalue   noticebase    xnotice Select the  strtrim floor alreadyread 3  1 text component of vector            return             END       endcase     END      over :BEGIN       if alreadyover 1 EQ 0 then begin   we start the reading          readcmd     beginning of reading the field to overdraw  readcmd          readcmd i 1     fieldover     prefix  readcmd i 1          readcmd    extractatt top_uvalue   currentreadcmd  temporary readcmd        ENDIF ELSE BEGIN         oldrdcmd   extractatt top_uvalue   currentreadcmd          nl   n_elements oldrdcmd           oldrdcmd nl 1    oldrdcmd nl 1                readcmd i    prefix   readcmd i          readcmd    temporary oldrdcmd  temporary readcmd        ENDELSE         if alreadyover 1 NE numberofread 1 THEN BEGIN    we still need to read some files           top_uvalue 1  findline top_uvalue   currentreadcmd    readcmd          top_uvalue 1  findline top_uvalue   alreadyover    alreadyover 1          top_uvalue 1  findline top_uvalue   noticebase    xnotice Select the field number  strtrim alreadyover 3  1  to overlay          return           ENDIF   we finalize the reading command       IF ending NE   THEN BEGIN          nl   n_elements readcmd           readcmd nl 1    readcmd nl 1                readcmd    temporary readcmd  ending        ENDIF   on finalise la commande de lecture       readcmd    readcmd                       fieldover   create_struct arr:temporary fieldover  grid:vargrid  unit:varunit  experiment:varexp  name:varname                         end of reading the field to overdraw      we get back _EXTRA of over and we complet extra already build       extra   extractatt top_uvalue   extra        exextra   cw_specifie_get_value base        extra    mixstru exextra  extra        sextra   struct2string extra        readcmd    readcmd   overextra    sextra   extra mixstru extra overextra           top_uvalue 1  findline top_uvalue   currentreadcmd    readcmd   we reinitialize        top_uvalue 1  findline top_uvalue   alreadyread     1        top_uvalue 1  findline top_uvalue   alreadyvector     1        top_uvalue 1  findline top_uvalue   alreadyover     1     END   endcase                   determination of the boxzoom s name    if NOT keyword_set boxzoom  then widget_control  domainid  get_value   boxzoom   CASE n_elements boxextra  OF     0:     1:boxzoom 5    boxextra     2:boxzoom 4:5    boxextra     4:boxzoom 0:3    boxextra     5:boxzoom    boxextra 0:3  0  boxextra 4      6:boxzoom   boxextra   ENDCASE   Writting of this one as a string   box    strtrim boxzoom 0  1    for i   1   n_elements boxzoom 1   pmax  1      ENDELSE   endif   box   box    IF strpos type    diag up  NE  1 THEN BEGIN     sendpoints       strtrim boxzoom 0  1          strtrim boxzoom 2  1                            strtrim boxzoom 1  1          strtrim boxzoom 3  1        ENDIF   IF strpos type    diag dn  NE  1 THEN BEGIN     sendpoints       strtrim boxzoom 0  1          strtrim boxzoom 3  1                            strtrim boxzoom 1  1          strtrim boxzoom 2  1        ENDIF     We determinate typein       IF strpos type    diag   NE  1 THEN typein    strmid type  0  4        ELSE typein    type        determination of small     ssmall   tostr smallout      We will define the string which will contain the command to be executed by widgetdessine pro     Cmd    readCmd  procedure    field                       boxzoom    box   findalways  typein typein  small ssmall      IF drawvecteur then Cmd    Cmd         vecteur    u: fieldu v: fieldv      IF drawover then Cmd    Cmd         contour   fieldover     IF n_elements sendpoints  NE 0 then Cmd    Cmd         endpoints       sendpoints         Cmd    Cmd         _extra  mixstru ex  extra  portrait       portrait     NOERASE noerase        print         for i   0  n_elements Cmd 1 do print  Cmd i       print        We complete and or update the structure top_uvalue       top_uvalue 1  findline top_uvalue   nameprocedures numdessinout    procedure    top_uvalue 1  findline top_uvalue   types numdessinout    type    top_uvalue 1  findline top_uvalue   domaines  numdessinout    boxzoom    top_uvalue 1  findline top_uvalue   txtcmd numdessinout    widcmd    top_uvalue 1  findline top_uvalue   optionsflag  numdessinout    flags    top_uvalue 1  findline top_uvalue   exextra numdessinout    extra     return  Cmd end  "); 
    343 a[341] = new Array("./ToBeReviewed/WIDGET/AUTOUR_de_XXX/buildreadcmd.html", "buildreadcmd.pro", "", "        param BASE  in required     The id of the widget where apply the drawing       param SNAMEEXP  in required         param PROCEDURE  in required         param TYPE  in required          keyword BOXZOOM   Vector indicating the geographic zone on which we want to cut the map     If BOXZOOM has :      1 element : The extraction is made on  lon1  lon2  lat1  lat2  0 boxzoom 0      2 elements: The extraction is made on  lon1  lon2  lat1  lat2  boxzoom 0 boxzoom 1      4 elements: The extraction is made on  Boxzoom  0  max gdept  gdepw      5 elements: The extraction is made on  Boxzoom 0:3  0  Boxzoom 4      6 elements: The extraction is made on Boxzoom    Where lon1  lon2 lat1 lat2 are global variables defined at the last domdef       keyword COMPLETE          keyword NAMEFIELD        uses   common pro       history   Sebastien Masson  smasson lodyc jussieu fr        version     Id: buildreadcmd pro 172 2006 09 11 07:11:26Z smasson        todo   seb: documenter les param et les keyword qui ne le sont pas      FUNCTION buildreadcmd  base  snameexp  procedure  type  BOXZOOM   boxzoom                            COMPLETE   complete  NAMEFIELD   namefield       compile_opt idl2  strictarrsubs    cm_4cal   for key_caltype     get back widgets IDs     vlstid   widget_info base  find_by_uname    varlist    date1id   widget_info base  find_by_uname    calendar1    date2id   widget_info base  find_by_uname    calendar2    domainid   widget_info base  find_by_uname    domain      optionid   widget_info base  find_by_uname    option      widget_control  base  get_uvalue   top_uvalue   numdessinin    extractatt top_uvalue   smallin 2 1   numdessinout    extractatt top_uvalue   smallout 2 1     name of the file     currentfile   extractatt top_uvalue   currentfile    filelist   extractatt top_uvalue   filelist    filename   filelist currentfile    sfilename    filename      name of the variable     if keyword_set namefield  then namevar   namefield     ELSE namevar   widget_info vlstid   combobox_gettext    snamevar    namevar      get the options     options   extractatt top_uvalue   options       flags   extractatt top_uvalue   optionsflag    flags   flags  numdessinin    xindex    flags where options EQ  Longitude   x index 0    yindex    flags where options EQ  Latitude   y index 0      extra   extractatt top_uvalue   extra    if xindex NE 0 then extra   create_struct extra   xindex  xindex    if yindex NE 0 then extra   create_struct extra   yindex  yindex    exextra   cw_specifie_get_value base    tgnm   strlowcase tag_names exextra    indtmp   where tgnm EQ  box  OR tgnm EQ  boxzoom  cnt    IF cnt EQ 1 THEN boxextra   exextra indtmp 0    exextra   extractstru exextra   min   max   inter   lct   box   boxzoom    if size exextra   type  EQ 8 then extra   mixstru exextra  extra    sextra   struct2string extra      find date1 and date2     key_caltype    extractatt top_uvalue   fileparameters currentfile caltype   widget_control  date1id  get_value   date1   widget_control  date2id  get_value   date2    if procedure EQ  pltt  AND date1 EQ date2 then BEGIN   we redefine the dates to the begining and end of the calendar     calendar    extractatt top_uvalue   fileparameters currentfile time_counter     date1   jul2date calendar 0      date2   jul2date calendar n_elements calendar 1      widget_control  date1id  set_value   date1     widget_control  date2id  set_value   date2   endif     fakecal    extractatt top_uvalue   fileparameters currentfile fakecal   IF keyword_set fakecal  THEN BEGIN     date1   date2jul date1    fakecal     date2   date2jul date2    fakecal   ENDIF   sdate1   strtrim date1  1    sdate2   strtrim date2  1      find boxzoom     if NOT keyword_set boxzoom  then widget_control  domainid  get_value   boxzoom   CASE n_elements boxextra  OF     0:     1:boxzoom 5    boxextra     2:boxzoom 4:5    boxextra     4:boxzoom 0:3    boxextra     5:boxzoom    boxextra 0:3  0  boxextra 4      6:boxzoom   boxextra   ENDCASE   put boxzoom into a string   box    strtrim boxzoom 0  1    for i   1   n_elements boxzoom 1     3 2 strpos type   z  EQ  1  do        box   box   strtrim boxzoom i  1    if strpos type   z  NE  1 then BEGIN        cm_4mesh       min   min gdept  gdepw  boxzoom 4:5  max   max        box   box strtrim floor min  1 strtrim ceil max  1      endif   box   box    IF strpos type    diag up  NE  1 THEN BEGIN     sendpoints       strtrim boxzoom 0  1          strtrim boxzoom 2  1                            strtrim boxzoom 1  1          strtrim boxzoom 3  1        ENDIF   IF strpos type    diag dn  NE  1 THEN BEGIN     sendpoints       strtrim boxzoom 0  1          strtrim boxzoom 3  1                            strtrim boxzoom 1  1          strtrim boxzoom 2  1        ENDIF     find funclec_name  readparameters  meshparameters     readparameters    extractatt top_uvalue   readparameters currentfile    funclec_name   readparameters funclec_name   if keyword_set complete  then begin     sreadparameters   struct2string readparameters      meshparameters    extractatt top_uvalue   meshparameters currentfile      smeshparameters   struct2string meshparameters          We will define the string which will contain the command to be executed for the reading        Cmd     Definition of extra structure:   extra    sextra                  Definition of readparameters structure:   readparameters    sreadparameters                  Do we change of reading :   dummy   changeread readparameters                   Definition of meshparameters structure:   meshparameters    smeshparameters                  Do we change the grid :   dummy   changegrid meshparameters                   Read the data                  if n_elements date1in  ne 0 then date1   date1in else date1       sdate1                 if n_elements date2in  ne 0 then date2   date2in else date2       sdate2                funclec_name snamevar  date1  date2   snameexp                  timestep    strtrim keyword_set fakecal  1  parent    strtrim base  2                          boxzoom    box   findalways                         filename    sfilename        if n_elements sendpoints  NE 0 then          Cmd    Cmd         endpoints       sendpoints     type       type            Cmd    Cmd         _extra   mixstru ex  extra   nostruct       top_uvalue 1  findline top_uvalue   varinfo  numdessinout     filename  namevar       top_uvalue 1  findline top_uvalue   dates  numdessinout     date1  date2    ENDIF ELSE BEGIN     Cmd    funclec_name snamevar   sdate1   sdate2   snameexp                  timestep    strtrim keyword_set fakecal  1  parent    strtrim base  1                          boxzoom    box   findalways                         filename    sfilename        if n_elements sendpoints  NE 0 then          Cmd    Cmd         endpoints       sendpoints     type       type            Cmd    Cmd         _extra   mixstru ex  extra   nostruct    ENDELSE      print   ::::::::::::::::::::::       for i   0  n_elements Cmd 1 do print  Cmd i       print   ::::::::::::::::::::::         return  cmd end"); 
    344 a[342] = new Array("./ToBeReviewed/WIDGET/AUTOUR_de_XXX/changefield.html", "changefield.pro", "", "     file_comments        categories         param BASE  in required    The id of the widget where apply the drawing       param NEWFIELDNAME         keyword BOXZOOM   Vector indicating the geographic zone on which we want to cut the map     If BOXZOOM has :      1 element : The extraction is made on  lon1  lon2  lat1  lat2  0 boxzoom 0      2 elements: The extraction is made on  lon1  lon2  lat1  lat2  boxzoom 0 boxzoom 1      4 elements: The extraction is made on  Boxzoom  0  max gdept  gdepw      5 elements: The extraction is made on  Boxzoom 0:3  0  Boxzoom 4      6 elements: The extraction is made on Boxzoom    Where lon1  lon2 lat1 lat2 are global variables defined at the last domdef        returns          uses          restrictions          examples          history          version     Id: changefield pro 150 2006 08 09 10:12:54Z navarro        todo   seb     PRO changefield  base  newfieldname  BOXZOOM   boxzoom       compile_opt idl2  strictarrsubs     widget_control  base  get_uvalue   top_uvalue     Change exextra :   exextra   definedefaultextra newfieldname    specifieid   widget_info base  find_by_uname    specifie    widget_control  specifieid  set_value   exextra   Change the variable   Do we need to change the vertical axis   according to the tye of points  T or W    dthlv1id   widget_info base  find_by_uname    dthlv1    widget_control  dthlv1id  get_uvalue   dthlv1_uval   oldzgridt   dthlv1_uval grid_t   get the type of point   currentfile   extractatt top_uvalue   currentfile    listgrid    extractatt top_uvalue   fileparameters currentfile listgrid   listvar    extractatt top_uvalue   fileparameters currentfile listvar     for i   0   n_elements listvar 1 do print   listvar i    listgrid i    indexvar   where listvar EQ newfieldname    indexvar   0   indexvar 0    zgridt   strupcase listgrid indexvar  NE  W    if we change the type of point   if zgridt NE oldzgridt then BEGIN   update dthlv1_uval grid_t     dthlv1_uval grid_t   zgridt     widget_control  dthlv1id  set_uvalue   dthlv1_uval   update cw_domain     if NOT keyword_set boxzoom  THEN          widget_control  widget_info base  find_by_uname    domain  get_value   boxzoom     widget_control  widget_info base  find_by_uname    domain  set_value   boxzoom   endif     return end"); 
    345 a[343] = new Array("./ToBeReviewed/WIDGET/AUTOUR_de_XXX/changefile.html", "changefile.pro", "", "     file_comments        categories         param BASE  in required    The id of the widget where apply the drawing       param NEWFILENAME         keyword BOXZOOM   Vector indicating the geographic zone on which we want to cut the map     If BOXZOOM has :      1 element : The extraction is made on  lon1  lon2  lat1  lat2  0 boxzoom 0      2 elements: The extraction is made on  lon1  lon2  lat1  lat2  boxzoom 0 boxzoom 1      4 elements: The extraction is made on  Boxzoom  0  max gdept  gdepw      5 elements: The extraction is made on  Boxzoom 0:3  0  Boxzoom 4      6 elements: The extraction is made on Boxzoom    Where lon1  lon2 lat1 lat2 are global variables defined at the last domdef        keyword DATE1       keyword DATE2      keyword FIELDNAME          returns          uses          restrictions          examples          history          version     Id: changefile pro 150 2006 08 09 10:12:54Z navarro        todo   seb     PRO changefile  base  newfilename  BOXZOOM   boxzoom  DATE1   date1  DATE2   date2  FIELDNAME   fieldname       compile_opt idl2  strictarrsubs     widget_control  base   hourglass   widget_control  base  get_uvalue   top_uvalue   filelist   extractatt top_uvalue   filelist    IF size newfilename   type  EQ 7 THEN newfile    where filelist EQ newfilename 0      ELSE newfile   newfilename      it is already the index of the new file   if newfile EQ  1 then begin     nothing   report invalid filename      return   endif   oldfile   extractatt top_uvalue   currentfile    oldfilename   filelist oldfile     did we really change the file    if oldfile EQ newfile AND NOT  keyword_set BOXZOOM  OR keyword_set DATE1  OR keyword_set DATE2  OR keyword_set FIELDNAME  then return      widget_control  base  update   0       we update currentfile element of the top_uvalue      top_uvalue 1  findline top_uvalue   currentfile    newfile     Calendar     oldcalendar    extractatt top_uvalue   fileparameters oldfile time_counter   newcalendar    extractatt top_uvalue   fileparameters newfile time_counter   Did we change the calendar    if array_equal oldcalendar  newcalendar  NE 1 then begin  cm_4cal    for key_caltype     key_caltype    extractatt top_uvalue   fileparameters newfile caltype   fake or real calendar      fakecal    extractatt top_uvalue   fileparameters newfile fakecal   Which dates were selected          date1id   widget_info base  find_by_uname    calendar1      if NOT keyword_set date1  then widget_control  date1id  get_value   date1     jdate1   date2jul date1      if  where newcalendar EQ jdate1 0  EQ  1 then jdate1   newcalendar 0      date2id   widget_info base  find_by_uname    calendar2      if NOT keyword_set date2  then widget_control  date2id  get_value   date2     jdate2   date2jul date2      if  where newcalendar EQ jdate2 0  EQ  1 then jdate2   date1     if jdate2 LT jdate1 THEN jdate2   jdate1     widget_control  date1id   destroy     widget_control  date2id   destroy     basecal   widget_info base  find_by_uname    basecal      rien   cw_calendar basecal  newcalendar  jdate1  uname    calendar1                             FAKECAL   fakecal  uvalue    name: calendar1   frame      rien   cw_calendar basecal  newcalendar  jdate2  uname    calendar2                             FAKECAL   fakecal  uvalue    name: calendar2   frame    ENDIF ELSE BEGIN      if keyword_set date1  then begin       date1id   widget_info base  find_by_uname    calendar1        widget_control  date1id  set_value   date1     endif     if keyword_set date2  then begin       date2id   widget_info base  find_by_uname    calendar2        widget_control  date2id  set_value   date2     endif   ENDELSE     Grid parameters and domain     newgrid    extractatt top_uvalue   meshparameters newfile    change   changegrid newgrid    if change OR keyword_set boxzoom  then BEGIN     if NOT keyword_set boxzoom  then boxzoom    1     domainid   widget_info base  find_by_uname    domain      widget_control  domainid  set_value   boxzoom   endif     file name     IF oldfile NE newfile THEN BEGIN      flstid   widget_info base  find_by_uname    filelist      widget_control  flstid  set_combobox_select    newfile   ENDIF      Variables name     vlstid   widget_info base  find_by_uname    varlist    oldfieldname   widget_info vlstid   combobox_gettext    did we really change the liste of variables    oldlistvar    extractatt top_uvalue   fileparameters oldfile listvar   newlistvar    extractatt top_uvalue   fileparameters newfile listvar   if array_equal oldlistvar  newlistvar  NE 1 THEN        widget_control  vlstid  set_value   newlistvar   set the liste of variables to the new variable name   if keyword_set fieldname  then newfieldname   fieldname ELSE newfieldname   oldfieldname   indexvar   where newlistvar EQ newfieldname    indexvar   0   indexvar 0    widget_control  vlstid  set_combobox_select   indexvar   newfieldname   newlistvar indexvar    did we change the name of the variable    if newfieldname NE oldfieldname then BEGIN     changefield  base  newfieldname  BOXZOOM   boxzoom   ENDIF       widget_control  base  update   1     return end"); 
    346 a[344] = new Array("./ToBeReviewed/WIDGET/AUTOUR_de_XXX/createhistory.html", "createhistory.pro", "", "     file_comments        categories         param BASE  in required    The id of the widget where apply the drawing       param SMALL   Vector composed of 3 or 4 elements  applied to make a drawing on a small    portion of a page or screen  It delimit the zone where the drawing will    be done  If there is 4 elements: then is constituted of coordinates  expressed    in cm located from the up and left corner of the page or the window  in portrait    like in landscape  of the bottom and left corner and of the up and right corner    of the drawing zone  If there is 3 elements: in this case  we divide the page or    the screen in small 0  columns and in small 1  lines the drawing made in the box    numbered small 2  The numerotation starting up and left by the number 1 and then     following the writing direction  By default  we make the largest drawing we can do     conserving the aspect rapport  except when REMPLI is activated        returns          uses          restrictions          examples          history          version     Id: createhistory pro 163 2006 08 29 12:59:46Z navarro        todo   seb: je ne suis pas sur pour les param    documenter le reste      PRO createhistory  base  small       we save globalcommand in globaloldcommand     compile_opt idl2  strictarrsubs      widget_control base  get_uvalue   top_uvalue    globalcommand   extractatt top_uvalue   globalcommand      top_uvalue 1  findline top_uvalue   globaloldcommand    globalcommand   portrait or landscape      options   extractatt top_uvalue   options        optionsflag   extractatt top_uvalue   optionsflag     portrait    optionsflag where options EQ  Portrait Landscape  0 0    composition du text contennu ds history pro    texte    common                                       if keyword_set postscript  then begin                        noerase   1                       openps  infowidget   infowidget  portrait       strtrim portrait  2                   endif                                        beginning of 1                                      end of 1     if small 0 small 1  GT 1 then begin       for draw   1  small 0 small 1 1  do begin          texte    texte                         beginning of  strtrim draw 1  2                         noerase 1                          end of  strtrim draw 1  2        endfor    ENDIF    texte    texte                  if keyword_set postscript  then begin                       closeps  infowidget   infowidget                       printps                   endif    the new globalcommand     top_uvalue 1  findline top_uvalue   globalcommand    texte      for i   0  n_elements texte 1 do print  texte i       return end"); 
    347 a[345] = new Array("./ToBeReviewed/WIDGET/AUTOUR_de_XXX/cutcmd.html", "cutcmd.pro", "", "     file_comments        categories         param WIDCMD        param TOREAD        param NUMBEROFREAD        param PREFIX        param NAMEEXP        param ENDING         returns          uses          restrictions          examples          history          version     Id: cutcmd pro 192 2006 09 22 09:37:08Z smasson         todo   seb     PRO cutcmd  widcmd  toread  numberofread  prefix  nameexp  ending       compile_opt idl2  strictarrsubs     dummy   where byte widcmd  EQ  byte 0  nbdblquote     CASE 1 OF     nbdblquote MOD 2: stop   odd numbers are impossibles      nbdblquote GT 0:     nbdblquote EQ 0:BEGIN   widcmd is an expression of type:   numb1 a   numb2 b     numb   we will change into the form   numb1 a    numb2 b      numb   in order to suits the new method of cutcmd       widcmd   strtrim widcmd  2    we force to start with a   or         case 1 of         strpos widcmd    EQ 0:         strpos widcmd    EQ 0:         ELSE:widcmd       widcmd       ENDCASE       separator   strsplit widcmd     extract   regex        other   strsplit widcmd     extract        IF n_elements separator  NE n_elements other  THEN stop       widcmd           FOR i   0  n_elements other 1 DO BEGIN          IF isnumber other i  LT 1 THEN other i        other i              widcmd   widcmd   separator i    other i        ENDFOR        print  widcmd     END    ENDCASE    cutted   strsplit widcmd     extract    IF strpos widcmd    EQ 0 THEN start   0 ELSE start   1   nameexp   cutted start: :2    numberofread   n_elements nameexp     IF toread GE numberofread then begin     dummy   report toread cannot be larger than numberofread      stop   ENDIF   IF n_elements cutted  EQ 1 THEN other     ELSE other   cutted 1 start: :2    make sure that we have a prefix for each nameexp   IF start EQ 0 THEN other     other      nameexp   nameexp toread    prefix   other toread    IF n_elements other  EQ numberofread   1 THEN ending   other numberofread  ELSE ending        help  prefix  nameexp  ending     return end"); 
    348 a[346] = new Array("./ToBeReviewed/WIDGET/AUTOUR_de_XXX/definedefaultextra.html", "definedefaultextra.pro", "", "     file_comments        categories         param NOMVARIABLE         returns          uses          restrictions          examples          history          version    Id: definedefaultextra pro 150 2006 08 09 10:12:54Z navarro          todo   seb     FUNCTION definedefaultextra  nomvariable     compile_opt idl2  strictarrsubs      case strlowcase nomvariable  of          sn :BEGIN            return  get_extra min   31  max   37  inter    2  lct   33 nocontout          END          tn :BEGIN            return  get_extra min   20  max   31  inter    5  lct   39          END          un :BEGIN            return  get_extra min    1  max   1  inter    1  lct   64          END          vn :BEGIN            return  get_extra min    1  max   1  inter    1  lct   64          END       ELSE:    ENDCASE     return  get_extra min     max     inter     lct   39  end"); 
    349 a[347] = new Array("./ToBeReviewed/WIDGET/AUTOUR_de_XXX/doubleclickaction.html", "doubleclickaction.pro", "", "     file_comments        categories         param EVENT         returns          uses          restrictions          examples          history          version    Id: doubleclickaction pro 150 2006 08 09 10:12:54Z navarro          todo   seb     PRO doubleclickaction  event       compile_opt idl2  strictarrsubs      widget_control  event id   get_uvalue   uval    widget_control  event top  get_uvalue   top_uvalue   We activate the right window    widget_control  event id  get_value   win    wset  win   What is the selected drawing     smallin   extractatt top_uvalue   smallin     smallout   extractatt top_uvalue   smallout     x    convert_coord uval x 0 uval y 0   device   to_normal 0     y    convert_coord uval x 0 uval y 0   device   to_normal 1     numcolonne   n_elements where findgen smallin 0 smallin 0  lt x 1    numligne   n_elements where findgen smallin 1 smallin 1  lt 1 y 1    numdessin   numcolonne numligne smallin 0 1   Choice of the type of action     case uval press of       1:BEGIN           if top_uvalue smallin 2  NE numdessin then begin          tracecadre  smallin   erase          if total smallin EQ smallout  EQ 3 then             tracecadre  smallout   out          smallin    smallin 0:1  numdessin            top_uvalue 1  findline top_uvalue   smallin    smallin          tracecadre  smallin           p    extractatt top_uvalue   penvs numdessin 1            x    extractatt top_uvalue   xenvs numdessin 1            y    extractatt top_uvalue   yenvs numdessin 1          END       2:BEGIN            if top_uvalue smallout 2  NE numdessin then begin          tracecadre  smallout   erase          if total smallin EQ smallout  EQ 3 then             tracecadre  smallin          smallout    smallin 0:1  numdessin            top_uvalue 1  findline top_uvalue   smallout    smallout          tracecadre  smallout   out           endif       END       4:BEGIN          tracecadre   smallin 0:1  numdessin   fill          inserthistory  event top      beginning of  strtrim numdessin  2                  end of  strtrim numdessin  2    Putting at 0 of attributes of the value concerning the drawing:            numdessin   numdessin 1           top_uvalue 1  findline top_uvalue   varinfo  numdessin                  top_uvalue 1  findline top_uvalue   dates  numdessin     0l  0l            top_uvalue 1  findline top_uvalue   nameprocedures numdessin                top_uvalue 1  findline top_uvalue   types numdessin                top_uvalue 1  findline top_uvalue   domaines  numdessin    fltarr 6            top_uvalue 1  findline top_uvalue   txtcmd numdessin                if numdessin EQ smallin 2  then             tracecadre  smallin          if numdessin EQ smallout 2  then             tracecadre  smallout   out        END        ELSE:    endcase    updatewidget  event top      return end"); 
    350 a[348] = new Array("./ToBeReviewed/WIDGET/AUTOUR_de_XXX/extractatt.html", "extractatt.pro", "", "     file_comments        categories         param TOP_UVALUE        param NAME         returns          uses          restrictions          examples          history          version     Id: extractatt pro 150 2006 08 09 10:12:54Z navarro         todo   seb     FUNCTION extractatt  top_uvalue  name     compile_opt idl2  strictarrsubs      taille   size top_uvalue     j    1    repeat BEGIN       j   j 1       if j EQ  size top_uvalue 2  then return   1    endrep until  top_uvalue 0  j  EQ name    return   top_uvalue 1  j  end"); 
    351 a[349] = new Array("./ToBeReviewed/WIDGET/AUTOUR_de_XXX/findline.html", "findline.pro", "", "     file_comments        categories         param TOP_UVALUE        param NAME         returns          uses          restrictions          examples          history          version     Id: findline pro 150 2006 08 09 10:12:54Z navarro         todo   seb     FUNCTION findline  top_uvalue  name     compile_opt idl2  strictarrsubs      taille   size top_uvalue     j    1    repeat BEGIN       j   j 1       if j EQ  size top_uvalue 2  then return   1    endrep until  top_uvalue 0  j  EQ name    return  j end"); 
    352 a[350] = new Array("./ToBeReviewed/WIDGET/AUTOUR_de_XXX/identifyclick.html", "identifyclick.pro", "", "     file_comments        categories         param EVENT         returns          uses          restrictions          examples          history          version    Id: identifyclick pro 150 2006 08 09 10:12:54Z navarro          todo   seb     FUNCTION identifyclick  event     compile_opt idl2  strictarrsubs      widget_control  event id  get_uvalue uval   no_copy    thisEvent   TAG_NAMES event   Structure     if thisEvent EQ  WIDGET_TIMER  then press   0 ELSE press   event press      d 0 1  t 1 0 d 2 0     long click            d 1 0 t 2 0   normal click                          d 2 1 d 3 0 t 0 0  double click                                              t 3 0 d 0 0  double click    type    inutile     case 1 OF   d 0 0 1er reascending       thisEvent EQ  WIDGET_DRAW  AND uval click EQ 0 AND press EQ 0:   d 0 1 1er click of the series       thisEvent EQ  WIDGET_DRAW  AND uval click EQ 0 AND press ge 1:BEGIN          uval x    event x  0           uval y    event y  0           uval press   press          uval click   1          widget_control  event id  timer    3       END   d 1 0 1er reascending       thisEvent EQ  WIDGET_DRAW  AND uval click EQ 1 AND press EQ 0:uval click   2   d 2 0 End of the long click       thisEvent EQ  WIDGET_DRAW  AND uval click EQ 2 AND press EQ 0:BEGIN          type    long           uval x    uval x 0 event x    uval x   uval x sort uval x           uval y    uval y 0 event y    uval y   uval y sort uval y           uval click   0          uval press   event release       END   d 2 1       thisEvent EQ  WIDGET_DRAW  AND uval click EQ 2 AND press ge 1:BEGIN          type    double           uval press   press          uval click   3       END   d 3 0 reascending and end of the double click       thisEvent EQ  WIDGET_DRAW  AND uval click EQ 3 AND press EQ 0:uval click   0   t 0 0 End of the double click       thisEvent EQ  WIDGET_TIMER  AND uval click EQ 0 AND press EQ 0:   t 1 0 long click       thisEvent EQ  WIDGET_TIMER  AND uval click EQ 1 AND press EQ 0:uval click   2   t 2 0 normal click       thisEvent EQ  WIDGET_TIMER  AND uval click EQ 2 AND press EQ 0:BEGIN           type    single           press   uval press          uval click   0       END   t 3 0 End of the double click       thisEvent EQ  WIDGET_TIMER  AND uval click EQ 3 AND press EQ 0:uval click   0   Imposible case in theory:       ELSE:BEGIN          print  thisEvent  uval click  press          print   Probleme  cas normalement impossible        END    endcase     widget_control  event id  set_uvalue uval   no_copy    return   type:type  end"); 
    353 a[351] = new Array("./ToBeReviewed/WIDGET/AUTOUR_de_XXX/inserthistory.html", "inserthistory.pro", "", "     file_comments        categories         param BASE        param TEXT        param LINE1        param LINE2         returns          uses          restrictions          examples          history          version    Id: inserthistory pro 150 2006 08 09 10:12:54Z navarro          todo   seb       PRO inserthistory   base  text  line1  line2     compile_opt idl2  strictarrsubs      widget_control base  get_uvalue   top_uvalue    globalcommand   extractatt top_uvalue   globalcommand      top_uvalue 1  findline top_uvalue   globaloldcommand    globalcommand     for i   0  n_elements globalcommand 1 do print  globalcommand i    we insert text between line1 and line2     index1   where globalcommand EQ line1    index1   index1 0 1     if index1  EQ  1 then begin        rien   report line1  n est pas trouve ds globalcommand         return     endif     index2   where globalcommand EQ line2    index2   index2 0      if index2  EQ  1 then begin        rien   report line2  n est pas trouve ds globalcommand         return     ENDIF   the new text:     globalcommand    globalcommand 0:index1  text  globalcommand index2:n_elements globalcommand 1    the new globalcommand      top_uvalue 1  findline top_uvalue   globalcommand    globalcommand       return end"); 
    354 a[352] = new Array("./ToBeReviewed/WIDGET/AUTOUR_de_XXX/letsdraw.html", "letsdraw.pro", "", "     file_comments    It is the procedure launching the drawing     If we do not give the command to it  it call    construitcommande to know what to trace       categories         param BASE  in required    The id of the widget where apply the drawing        keyword COMMANDE  type string    A string of the style: read_data sst       keyword _EXTRA   Used to pass your keywords        uses   common pro        history   Sebastien Masson  smasson lodyc jussieu fr        version     Id: letsdraw pro 163 2006 08 29 12:59:46Z navarro        PRO letsdraw  base  COMMANDE   commande  _extra   ex     compile_opt idl2  strictarrsubs    common   we recuperate the uvalue of base   widget_control base  get_uvalue   top_uvalue   print      help   top_uvalue   struct   help   top_uvalue exextra   struct    if NOT keyword_set commande  then       commande   buildcmd base  _extra ex     if commande 0  EQ   then return   on recupere la uvalue de base    widget_control  base   hourglass    widget_control base  get_uvalue   top_uvalue   print      help   top_uvalue   struct   print       help   top_uvalue exextra   struct    help   top_uvalue extra   struct   print      print  commande   help mixstru top_uvalue exextra top_uvalue extra   struct       we recuperate the id of the graphic associated to the widget of id base     graphid   extractatt top_uvalue   graphid     widget_control  graphid  get_value   win   We select it  we will pass to it all commands concerning the window     wset  win     erase  255                         we clean the window   We make sure that  if we work with a screen coding colors on 24 bits  the specified background color  p background is the one applied       if  d n_colors gt 256 then begin         device  decomposed 1          p background ffffff x         plot 0 0          device  decomposed 0      ENDIF      smallout   long extractatt top_uvalue   smallout     numdessinout   smallout 2 1      tracecadre  smallout   fill        options   extractatt top_uvalue   options        optionsflag   extractatt top_uvalue   optionsflag     portrait    strtrim optionsflag where options EQ  Portrait Landscape  0  1 0           createpro   common                      noerase   1                      key_portrait     portrait                    Commande          filename    myuniquetmpdir    xxx_oneplot pro       inserthistory  base  Commande  beginning of  strtrim smallout 2  1            end of  strtrim smallout 2  1        top_uvalue 1  findline top_uvalue   penvs numdessinout     p     top_uvalue 1  findline top_uvalue   xenvs numdessinout     x     top_uvalue 1  findline top_uvalue   yenvs numdessinout     y     return end"); 
    355 a[353] = new Array("./ToBeReviewed/WIDGET/AUTOUR_de_XXX/loadgrid.html", "loadgrid.pro", "", "     file_comments        categories         param MESHFILEIN         keyword _EXTRA   Used to pass your keywords       returns          uses          restrictions          examples          history          version     Id: loadgrid pro 192 2006 09 22 09:37:08Z smasson        todo   seb     PRO loadgrid  meshfilein  _extra   ex          compile_opt idl2  strictarrsubs    cm_4mesh   ccmeshparameters filename   meshfilein   split the name according to   delimiter   meshfile   strsplit meshfilein     extract    meshfile   strtrim meshfile  2    try to find a  pro file with this name    filepro    find meshfile 0   firstfound   onlypro 0    if this is an idl batch file or a procedure     if filepro NE  NOT FOUND  THEN BEGIN     CASE protype filepro  OF   this is a procedure        proc :listing   file_basename filepro   pro    this is a function  this case is not coded         func :stop   this is an IDL batch file        batch :listing    file_basename filepro   pro      ENDCASE   ENDIF ELSE BEGIN     filenc    find meshfile 0   firstfound   onlync 0      if filenc EQ  NOT FOUND  THEN stop     listing    initncdf      filenc     ENDELSE   add the arguments and keywords if necessary   IF n_elements meshfile  GT 1 AND strmid listing  0  1  NE   THEN BEGIN      FOR i   1  n_elements meshfile 1 DO BEGIN       IF strpos meshfile i    NE  1 THEN str   isnumber meshfile i  ELSE str   createfunc n_elements meshfile i        IF str EQ 0 THEN listing   listing         meshfile i      ELSE listing   listing         meshfile i      ENDFOR   ENDIF    IF strmid listing  0  1  NE   THEN listing   listing     strcalling       meshfilein     _extra   ex     createpro  listing  filename   myuniquetmpdir  for_createpro pro  _extra   ex  return END "); 
    356 a[354] = new Array("./ToBeReviewed/WIDGET/AUTOUR_de_XXX/longclickaction.html", "longclickaction.pro", "", "     file_comments        categories         param EVENT         returns          uses          restrictions          examples          history          version    Id: longclickaction pro 154 2006 08 11 08:06:17Z smasson          todo   seb     PRO longclickaction  event     compile_opt idl2  strictarrsubs     widget_control  event id  get_uvalue   uval   widget_control  event top  get_uvalue   top_uvalue   What is the selected drawing    smallout   extractatt top_uvalue   smallout    smallin   extractatt top_uvalue   smallin    small   smallin   x    convert_coord uval x 0  uval y 0   device   to_normal 0    y    convert_coord uval x 0  uval y 0   device   to_normal 1    numcolonne   n_elements where findgen small 0 small 0  lt x 1   numligne   n_elements where findgen small 1 small 1  lt 1 y 1   numdessin   numcolonne numligne small 0    we put on numdessin as the leader plot   tracecadre  smallin   erase   if total smallin EQ smallout  EQ 3 then        tracecadre  smallout   out   smallin    smallin 0:1  numdessin 1     top_uvalue 1  findline top_uvalue   smallin    smallin   tracecadre  smallin    p    extractatt top_uvalue   penvs numdessin     x    extractatt top_uvalue   xenvs numdessin     y    extractatt top_uvalue   yenvs numdessin      actionid   widget_info event top  find_by_uname    action    type   widget_info actionid   combobox_gettext      Change the domain box:     coor    convert_coord uval x  uval y   device   to_data    x    coor 0  0  coor 0  1    y    coor 1  0  coor 1  1    domainid   widget_info event top  find_by_uname    domain    IF type EQ  pltv  THEN BEGIN      currentfile   extractatt top_uvalue   currentfile      listgrid    extractatt top_uvalue   fileparameters currentfile listgrid     listvar    extractatt top_uvalue   fileparameters currentfile listvar     vlstid   widget_info event top  find_by_uname    varlist      namevar   widget_info vlstid   combobox_gettext      indexvar   where listvar EQ namevar      vargrid   strupcase listgrid indexvar      grille   1  glam  gphi     boxzoom    glam x 0  y 0  glam x 1  y 1  gphi x 0  y 0  gphi x 1  y 1    ENDIF ELSE boxzoom    x  y    Do we have to pass the boxzoom in indexes     currentplot    extractatt top_uvalue   smallin 2 1   options   extractatt top_uvalue   options       flags   extractatt top_uvalue   optionsflag    flags   flags  currentplot    changex    flags where options EQ  Longitude   x index 0  EQ 1   changey    flags where options EQ  Latitude   y index 0  EQ 1   if changex OR changey then begin   We want to find the type of grid which is used     currentfile   extractatt top_uvalue   currentfile      listgrid    extractatt top_uvalue   fileparameters currentfile listgrid     listvar    extractatt top_uvalue   fileparameters currentfile listvar     vlstid   widget_info event top  find_by_uname    varlist      namevar   widget_info vlstid   combobox_gettext      indexvar   where listvar EQ namevar      vargrid   strupcase listgrid indexvar      domdef  boxzoom  gridtype   vargrid     grille   1   1   1   1  nx  ny  nz  firstx  firsty  firstz  lastx  lasty  lastz     if changex then boxzoom 0:1     firstx  lastx      if changey then boxzoom 2:3     firsty  lasty    endif     widget_control  domainid  set_value   boxzoom     case uval press of     1:BEGIN       nodates    type EQ  xt  OR type EQ  yt  OR type EQ  zt  OR type EQ  t        updatewidget  event top   noboxzoom  nodates   nodates  notype   type NE  plt        letsdraw  event top     END     2:BEGIN        IF type EQ  plt  THEN BEGIN           top_uvalue 1  findline top_uvalue   types smallout 2 1     pltz          forcetype    pltz        ENDIF        updatewidget  event top   noboxzoom       letsdraw  event top  forcetype   forcetype     END     4:BEGIN       IF type EQ  plt  THEN BEGIN           top_uvalue 1  findline top_uvalue   types smallout 2 1     pltt          forcetype    pltt        ENDIF        updatewidget  event top   noboxzoom   nodates       letsdraw  event top  forcetype   forcetype     END   endcase     return end"); 
    357 a[355] = new Array("./ToBeReviewed/WIDGET/AUTOUR_de_XXX/read_vermair.html", "read_vermair.pro", "", "     file_comments        categories         param NAME        param DEBUT        param FIN        param NOMEXP        keyword PARENT   same as DIALOG_PARENT de dialog_message pro      keyword BOXZOOM   Vector indicating the geographic zone on which we want to cut the map     If BOXZOOM has :      1 element : The extraction is made on  lon1  lon2  lat1  lat2  0 boxzoom 0      2 elements: The extraction is made on  lon1  lon2  lat1  lat2  boxzoom 0 boxzoom 1      4 elements: The extraction is made on  Boxzoom  0  max gdept  gdepw      5 elements: The extraction is made on  Boxzoom 0:3  0  Boxzoom 4      6 elements: The extraction is made on Boxzoom    Where lon1  lon2 lat1 lat2 are global variables defined at the last domdef       keyword _EXTRA   Used to pass your keywords        returns          uses          restrictions          examples          history          version     Id: read_vermair pro 150 2006 08 09 10:12:54Z navarro        todo   seb      FUNCTION read_vermair  name  debut  fin  nomexp  PARENT   parent  BOXZOOM boxzoom  _EXTRA   ex     compile_opt idl2  strictarrsubs    common       if name EQ  un  then name    vozocrtx     if name EQ  vn  then name    vomecrty     if debut EQ fin then begin       res   lec name debut nomexp  BOXZOOM boxzoom  _EXTRA   ex     ENDIF ELSE res   lect name debut fin  nomexp  BOXZOOM boxzoom  _EXTRA   ex        return   tab:res  grille:vargrid  unite:  experience:varexp  nom:varname  end"); 
    358 a[356] = new Array("./ToBeReviewed/WIDGET/AUTOUR_de_XXX/scanfile.html", "scanfile.pro", "", "     file_comments        categories         param NAMEFILE         keyword GRID        keyword _EXTRA   Used to pass your keywords       returns          uses          restrictions          examples          history          version     Id: scanfile pro 199 2006 12 13 07:47:14Z smasson        todo   seb : I don t know what to do with that            liste des presupposes:         1  le fichier a lire est un fichier netcdf         2  le nom de ce fichier finit         par U nc  V nc  W nc  T nc ou F nc  la lettre avant le         nc designant la grille a laquelle se rapporte la champ          Si tel n est pas la cas  le fichier est attribue a la grille         T          3  ce fichier contient une dimension infinie qui doit etre         celle qui se rapporte au temps et au mois 2 autres dimensions         dont les noms sont  x lon xi_  et  y lat  ou          eta_  ou bien en majuscule          4  il doit exiter ds ce fichier une unique variable n ayant         qu une dimension et etant la dimension temporelle  cette         variable sera prise comme axe des temps  Rq: si plusieurs         variables verifient ces criteres on considere la premiere         variable         5  Cette variable axe des temps doit contenir l attribut          units qui doit etre ecrit suivant la syntaxe:                  seconds since 0001 01 01 00:00:00                    hours since 0001 01 01 00:00:00                    days since 1979 01 01 00:59:59                    months since 1979 01 01 00:59:59                    years since 1979 01 01 00:59:59       je crois que c est tout             GRID UTVWF  to specify the type of grid  Defaut is  1           based on the name of the file if the file ends by          GRID _ TUVFW NC  not case sensible  or  2  T if case  1           is not found      FUNCTION scanfile  namefile  GRID   GRID  _extra   ex     compile_opt idl2  strictarrsubs    common     res    1     filename     fullname   isafile filename   namefile  IODIRECTORY   iodir  _extra   ex      open file     cdfid   ncdf_open fullname      What contains the file      infile   ncdf_inquire cdfid         name of all dimensions     namedim   strarr infile ndims    for dimiq   0  infile ndims 1 do begin     ncdf_diminq  cdfid  dimiq  tmpname  value      namedim dimiq    strlowcase tmpname    ENDFOR   roms file    dimidx   where namedim EQ  xi_rho  OR namedim EQ  xi_u  OR namedim EQ  xi_v  OR namedim EQ  xi_psi    IF dimidx 0  EQ  1 THEN BEGIN   we are looking for a x dimension with a name matching one of the following regular expression:     testname    longitude   lon   x   longitude   lon   x   longitude   lon   x      cnt    1     ii   0     WHILE cnt NE 1 AND ii LT n_elements testname  DO BEGIN       dimidx   where strmatch namedim  testname ii  EQ 1  cnt        ii   ii 1     ENDWHILE     CASE cnt OF       0:begin         dummy   report none of the dimensions name matches one of the following regular expression:                               longitude   lon   x   longitude   lon   x   longitude   lon   x                                  we cannot find the x dimension          stop       END       1:dimidx   dimidx 0        ELSE:begin         dummy   report several  and not one unique  dimensions name matches the following regular expression:                               longitude   lon   x   longitude   lon   x   longitude   lon   x                                  we cannot find the x dimension          stop       ENDELSE     ENDCASE   ENDIF   roms file    dimidy   where namedim EQ  eta_rho  OR namedim EQ  eta_u  OR namedim EQ  eta_v  OR namedim EQ  eta_psi    IF dimidy 0  EQ  1 THEN BEGIN   we are looking for a y dimension with a name matching one of the following regular expression:     testname    latitude   lat   y   latitude   lat   y   eta_   latitude   lat   y      cnt    1     ii   0     WHILE cnt NE 1 AND ii LT n_elements testname  DO BEGIN       dimidy   where strmatch namedim  testname ii  EQ 1  cnt        ii   ii 1     ENDWHILE     CASE cnt OF       0:begin         dummy   report none of the dimensions name matches one of the following regular expression:                               latitude   lat   y   latitude   lat   y   eta_   latitude   lat   y                                  we cannot find the y dimension          stop       END       1:dimidy   dimidy 0        ELSE:begin         dummy   report several  and not one unique  dimensions name matches the following regular expression:                               latitude   lat   y   latitude   lat   y   eta_   latitude   lat   y                                  we cannot find the x dimension          stop       ENDELSE     ENDCASE   ENDIF     name of all variables     we keep only the variables containing at least x  y and time dimension  if existing    namevar   strarr infile nvars    for varid   0  infile nvars 1 do begin     invar   ncdf_varinq cdfid  varid    what contains the variable      if  inter invar dim  dimidx 0  NE  1 AND           inter invar dim  dimidy 0  NE  1 AND           where invar dim EQ infile recdim 0  NE  1 OR infile recdim EQ  1        THEN namevar varid    invar name    ENDFOR   namevar   namevar where namevar NE       find vargrid for each selected variable      listgrid   strarr n_elements namevar    default definitions   IF keyword_set grid  THEN vargrid   strupcase grid  ELSE vargrid    T    look for values of vargrid for each variable   IF finite glamu 0  EQ 1 AND NOT keyword_set grid  THEN BEGIN   for each variable  look if we in one of the case corresponding to ROMS conventions      FOR i   0  n_elements namevar 1 do begin       invar   ncdf_varinq cdfid  namevar i        tmpnm   namedim invar dim    are we in one of the case corresponding to ROMS conventions        CASE 1 OF         tmpnm 2 jpt        END       invar natts EQ 0:BEGIN          dummy   report the variable  invar name  has no attribut C we create a fake calendar           fakecal   1         time   date0fk   lindgen 1 jpt        END       ELSE:BEGIN     we want to know which attributes are attached to the time variable            attnames   strarr invar natts          for attiq   0  invar natts 1 do attnames attiq    ncdf_attname cdfid  varid  attiq          if  where attnames EQ  units 0  EQ  1 then BEGIN           dummy   report Attribut  units  not found for the variable  invar name C we create a fake calendar             fakecal   1           time   date0fk   lindgen 1 jpt          ENDIF ELSE BEGIN    we read the time axis           ncdf_varget  cdfid  varid  time           time   double time            ncdf_attget  cdfid  varid   units  value   time_counter:units    seconds since 0001 01 01 00:00:00      time_counter:units    hours since 0001 01 01 00:00:00      time_counter:units    days since 1979 01 01 00:00:00      time_counter:units    months since 1979 01 01 00:00:00      time_counter:units    years since 1979 01 01 00:00:00              value   strtrim strcompress string value  2            mots   str_sep value                unite   mots 0            unite   strlowcase unite            IF strpos unite   s  strlen unite 1  NE  1 THEN unite   strmid unite  0  strlen unite 1            IF strpos unite   julian_  NE  1 THEN unite   strmid unite  7            err   0           IF unite NE  second  AND unite NE  hour  AND unite NE  day                 AND unite NE  month  AND unite NE  year  THEN BEGIN             dummy   report time units does not start with seconds hours days months years              err   1           ENDIF           IF stregex value      since  0 9 1 4 0 9 1 2 0 9 1 2   boolean  EQ 0 THEN BEGIN             dummy   report attribut units of time has not the good format:     since  0 9 1 4 0 9 1 2 0 9 1 2              err   1           ENDIF           IF err GT 0 THEN BEGIN              fakecal   1             time   date0fk   lindgen 1 jpt            ENDIF ELSE BEGIN              debut   str_sep mots 2        now we try to find the attribut called calendar    the the attribute  calendar  exists    If no  we suppose that the calendar is gregorian calendar               if  where attnames EQ  calendar 0  NE  1 then BEGIN               ncdf_attget  cdfid  varid   calendar  value               value   string value                CASE value OF                  noleap :key_caltype    noleap                   360d :key_caltype    360d                   greg :IF n_elements key_caltype  EQ 0 THEN key_caltype    greg                  ELSE:BEGIN              notused   report Unknown calendar:  value  we use greg calendar                     key_caltype    greg                  END               ENDCASE             ENDIF ELSE BEGIN          notused   report Unknown calendar  we use  key_caltype  calendar                 IF n_elements key_caltype  EQ 0 THEN key_caltype    greg              ENDELSE     BEWARE we have to get back the calendar attribute and ajust time by consequence        We pass time in IDL julian days               case unite of                second :time   julday debut 1  debut 2  debut 0 time 86400 d                hour :time   julday debut 1  debut 2  debut 0 time 24 d                day :time   julday debut 1  debut 2  debut 0 time                month :BEGIN                  if total fix time  NE time  NE 0 then     we switch to days with 30d m                    time   julday debut 1  debut 2  debut 0 round time 30                    ELSE for t   0  n_elements time 1 DO                      time t    julday debut 1 time t  debut 2  debut 0                END                year :BEGIN                 if total fix time  NE time  NE 0 then     we switch to days with 365d y                    time   julday debut 1  debut 2  debut 0 round time 365                    ELSE for t   0  n_elements time 1 do                      time t    julday debut 1  debut 2  debut 0 time t                END             ENDCASE     high frequency calendar: more than one element per day             IF max histogram long time time 0  GT 1 THEN fakecal   1 ELSE fakecal   0             date0fk   date2jul 19000101              IF keyword_set fakecal  THEN time   date0fk lindgen 1 jpt                ELSE time   long time              ENDELSE         ENDELSE       END     ENDCASE   ENDELSE     ncdf_close  cdfid     return   filename:fullname  time_counter:time  listvar:namevar                listgrid:strupcase listgrid  caltype:key_caltype                fakecal:date0fk fakecal  end"); 
    359 a[357] = new Array("./ToBeReviewed/WIDGET/AUTOUR_de_XXX/selectfile.html", "selectfile.pro", "", "     file_comments        categories         param EVENT        returns          uses          restrictions          examples          history          version     Id: selectfile pro 181 2006 09 15 08:24:36Z smasson         todo   seb: documenter EVENT     PRO selectfile_event  event       compile_opt idl2  strictarrsubs    common     widget_control  event id  get_uvalue   eventuvalue   default definition of messenger when selectfile_event is called   directly without calling xmanager   widget_control  event handler  get_uvalue   messenger    messenger    1    IF chkstru eventuvalue   name  EQ 0 THEN return    case eventuvalue name of   cancel button      Global Cancel :BEGIN        widget_control  event handler  get_uvalue   messenger        messenger    1       widget_control  event handler   destroy     END   data file informations      datafilename :BEGIN       widget_control  event id  get_value   filename       filename   isafile filename   filename 0   onlync                              title    data file name   tryfind   fully_qualify_path        if size filename   type  NE 7 then BEGIN          widget_control  event id  set_value             return       ENDIF       widget_control  event id  set_value   filename     END      browse datafilename :BEGIN       filename   isafile onlync  title    data file name   tryfind   fully_qualify_path        if size filename   type  NE 7 then return       widget_control  widget_info event handler  find_by_uname    datafilename                            set_value   filename     END   switch automatic by and mesh definition buttons      gridload :BEGIN       IF event select EQ 1 THEN BEGIN          widget_control  widget_info event handler  find_by_uname    argtxt  set_value             widget_control  widget_info event handler  find_by_uname    kwdtxt  set_value             widget_control  widget_info event handler  find_by_uname    kwd base  sensitive   1         CASE event value OF            via initnetcdf :BEGIN             widget_control  widget_info event handler  find_by_uname    meshload  set_value    initncdf  editable   0             widget_control  widget_info event handler  find_by_uname    arg base  sensitive   0             widget_control  widget_info event handler  find_by_uname    kwdlab  set_value    initncdf keywords:            END            via perso :BEGIN             widget_control  widget_info event handler  find_by_uname    meshload  set_value     editable   1             widget_control  widget_info event handler  find_by_uname    arg base  sensitive   1             widget_control  widget_info event handler  find_by_uname    kwdlab  set_value    keywords of IDL procedure:            END          ENDCASE       ENDIF      END   name of the procedure or batch file      meshload :BEGIN       widget_control  event id  get_value   filename       filename    find filename 0   onlypro   firstfound 0        if filename EQ  NOT FOUND  then begin         widget_control  event id  set_value             return       endif        CASE protype filename  OF   this is a procedure          proc :BEGIN            widget_control  widget_info event handler  find_by_uname    arg base  sensitive   1           widget_control  widget_info event handler  find_by_uname    kwd base  sensitive   1           widget_control  widget_info event handler  find_by_uname    kwdlab  set_value   file_basename filename   pro  keywords:          END   this is a function  this case is not accepted          func :BEGIN            widget_control  event id  set_value               return         END   this is an IDL batch file          batch :BEGIN            widget_control  widget_info event handler  find_by_uname    arg base  sensitive   0           widget_control  widget_info event handler  find_by_uname    kwd base  sensitive   0           widget_control  widget_info event handler  find_by_uname    kwdlab  set_value    no keywords:          END       ENDCASE       widget_control  widget_info event handler  find_by_uname    argtxt  set_value           widget_control  widget_info event handler  find_by_uname    kwdtxt  set_value           widget_control  event id  set_value   file_basename filename   pro      END      browse meshload :BEGIN       filename   isafile iodir   homedir   onlypro  title    to load the grid file        if size filename   type  NE 7 then return       meshload_id   widget_info event handler  find_by_uname    meshload        widget_control  meshload_id  set_value   filename       selectfile_event   ID:meshload_id  TOP:event top  HANDLER:event handler      END    Lets Go  button      Lets Go :BEGIN       widget_control  widget_info event handler  find_by_uname    datafilename                            get_value   datafilename       datafilename   datafilename 0        IF datafilename EQ   THEN return       datafilename   isafile filename   datafilename   tryfind   onlync                                  title    data file name   fully_qualify_path        if size datafilename   type  NE 7 then BEGIN          widget_control  widget_info event handler  find_by_uname    datafilename                              set_value             return       ENDIF        widget_control  widget_info event handler  find_by_uname    gridload                            get_value   gridload       widget_control  widget_info event handler  find_by_uname    argtxt                            get_value   argtxt       argtxt   strtrim argtxt 0  2        IF strpos argtxt    EQ 0 THEN argtxt   strmid argtxt  1        widget_control  widget_info event handler  find_by_uname    kwdtxt                            get_value   kwdtxt       kwdtxt   strtrim kwdtxt 0  2        IF strpos kwdtxt    EQ 0 THEN kwdtxt   strmid kwdtxt  1         CASE gridload 0  OF          via perso :BEGIN           meshload_id   widget_info event handler  find_by_uname    meshload            widget_control  meshload_id  get_value   meshload           meshload   meshload 0            IF meshload EQ   THEN return           meshload    find meshload 0   onlypro   firstfound 0            if meshload EQ  NOT FOUND  then begin             widget_control  meshload_id  set_value                 return           endif          END           via initnetcdf :meshload   datafilename       ENDCASE       IF strlen argtxt  NE 0 THEN meshload   meshload         argtxt       IF strlen kwdtxt  NE 0 THEN meshload   meshload         kwdtxt       widget_control  event handler  get_uvalue   messenger        messenger   create_struct datafilename  datafilename   meshload  meshload        widget_control  event handler   destroy     END    endcase   return end        file_comments        categories         param DATAFILENAME        param IDLFILE        param ARGSPRO         keyword _EXTRA   Used to pass your keywords       returns          uses          restrictions          examples          history          version     Id: selectfile pro 181 2006 09 15 08:24:36Z smasson         todo   seb: documenter les params      FUNCTION selectfile  datafilename  idlfile  argspro  _extra   ex       compile_opt idl2  strictarrsubs    common         We create a pointer in the uvalue to recuperate answers at setted    questions atthe time of the use of this widget  So when the widget    is deleted in the procedure  event pro  the variable on which the    pointer pointed  contained in the uvalue of the widget  is not    deleted and we can recuperate the result      messenger   ptr_new allocate_heap    base   widget_base column  title    selectfile   align_center  uvalue   messenger  _EXTRA   ex    cancel button   dummyid   widget_button base  value    Cancel  uvalue    name: Global Cancel    data file informations   basea   widget_base base   row   align_center    dummyid   widget_label basea  value    Data file name:     database   widget_text basea  value     uvalue    name: datafilename                              uname    datafilename  xsize   45   EDITABLE    dummyid   widget_button basea  value    Browse  uvalue    name: browse datafilename    switch automatic by and mesh definition buttons   baseb   widget_base base   row   align_center    gdldid   cw_bgroup baseb   automatic grid construction with initncdf pro                                     grid construction with other IDL batch or procedure                             exclusive  set_value   0  uvalue    name: gridload                            uname    gridload  button_uvalue    via initnetcdf   via perso    name of the procedure or batch file   basec   widget_base base   row   align_center  uname    pro base    dummyid   widget_label basec  value    IDL batch file of procedure    basemeshload   widget_text basec  value    initncdf  uvalue    name: meshload                              uname    meshload  xsize   45  editable   0    dummyid   widget_button basec  value    Browse  uvalue    name: browse meshload    arguments informations   based   widget_base base   row   align_center  uname    arg base  sensitive   0    dummyid   widget_label based  value    procedure arguments    argbase   widget_text based  value     uvalue    name: argtxt                              uname    argtxt  xsize   45   EDITABLE    keyword informations   basee   widget_base base   row   align_center  uname    kwd base    dummyid   widget_label basee  uname    kwdlab  value         keywords of initncdf:    dummyid   widget_text basee  value                                 uvalue    name: kwdtxt  uname    kwdtxt  xsize   45   EDITABLE     Lets Go  button   basego   widget_button base  value    Lets Go  uvalue    name: Lets Go       IF n_elements datafilename  NE 0 THEN BEGIN      widget_control  database  set_value   datafilename     selectfile_event   ID:database  TOP:base  HANDLER:base    ENDIF    IF n_elements idlfile  NE 0 THEN BEGIN      widget_control  basemeshload  set_value   idlfile     selectfile_event   ID:basemeshload  TOP:base  HANDLER:base      widget_control  basemeshload  get_value   idlfile2     IF idlfile2 0  NE   THEN widget_control  gdldid  set_value   1   ENDIF    IF n_elements argspro  NE 0 THEN widget_control  argbase  set_value   argspro     IF n_elements datafilename  EQ 0 THEN BEGIN      widget_control  base   realize     xmanager   selectfile  base  event_handler    selectfile_event  no_block   0   ENDIF ELSE selectfile_event   ID:basego  TOP:base  HANDLER:base      get back the information from selectfile_event   res    messenger   ptr_free  messenger   if size res   type  NE 8 then return   1    loadgrid  res meshload  _extra   ex    ccreadparameters    funclec_name: read_ncdf                jpidta:jpidta  jpjdta:jpjdta  jpkdta:jpkdta               ixmindta:ixmindta  ixmaxdta:ixmaxdta               iymindta:iymindta  iymaxdta:iymaxdta               izmindta:izmindta  izmaxdta:izmaxdta     res3   scanfile res datafilename  _extra   ex    if size res3   type  NE 8 then return    1    return   fileparameters:res3  readparameters:ccreadparameters  meshparameters:ccmeshparameters   end"); 
    360 a[358] = new Array("./ToBeReviewed/WIDGET/AUTOUR_de_XXX/singleclickaction.html", "singleclickaction.pro", "", "     file_comments        categories         param EVENT         returns          uses          restrictions          examples          history          version    Id: singleclickaction pro 150 2006 08 09 10:12:54Z navarro          todo   seb     PRO singleclickaction  event     compile_opt idl2  strictarrsubs    cm_4mesh  cm_4data  return      widget_control  event id  get_uvalue   uval   widget_control  event top  get_uvalue   top_uvalue   actionid   widget_info event top  find_by_uname    action    type   widget_info actionid   combobox_gettext    IF type NE  plt  THEN return   We activate the right window   widget_control  event id  get_value   win   wset  win   choice of the type of action   case uval press of     1:BEGIN       coor    convert_coord uval x 0  uval y 0   device   to_data        x   coor 0        y   coor 1        help   x   y       oldgrid   vargrid       CASE strupcase vargrid  OF          T :vargrid    F           W :vargrid    F           U :vargrid    V           V :vargrid    U           F :vargrid    T        ENDCASE       grille   1  glam  gphi   1  nx  ny  nz  firstx  firsty  firstz  lastx  lasty  lastz       vargrid   oldgrid   define the corner of the cells in the clockwise direction       IF keyword_set key_periodic  AND nx EQ jpi THEN BEGIN         x1   glam  0:ny 2          y1   gphi  0:ny 2          x2   glam  1:ny 1          y2   gphi  1:ny 1          x3   shift glam  1:ny 1   1  0          y3   shift gphi  1:ny 1   1  0          x4   shift glam  0:ny 2   1  0          y4   shift gphi  0:ny 2   1  0        ENDIF ELSE BEGIN         x1   glam 0:nx 2  0:ny 2          y1   gphi 0:nx 2  0:ny 2          x2   glam 0:nx 2  1:ny 1          y2   gphi 0:nx 2  1:ny 1          x3   glam 1:nx 1  1:ny 1          y3   gphi 1:nx 1  1:ny 1          x4   glam 1:nx 1  0:ny 2          y4   gphi 1:nx 1  0:ny 2        ENDELSE       glam    1                   free memory       gphi    1                   free memory     What is the longitude        WHILE x GT  x range 1  DO x   x 360       WHILE x LT  x range 0  DO x   x 360       IF x GT  x range 1  THEN RETURN       IF y GT  y range 1  THEN RETURN       IF y LT  y range 0  THEN RETURN         cell   inquad x  y  x1  y1  x2  y2  x3  y3  x4  y4                         onsphere   key_onearth            x1    1                   free memory         y1    1                   free memory         x2    1                   free memory         y2    1                   free memory         x3    1                   free memory         y3    1                   free memory         x4    1                   free memory         y4    1                   free memory              IF cell 0  EQ  1 OR n_elements cell  GT 1 THEN RETURN               yy   cell 0 nx 1 key_periodic nx EQ jpi        xx   cell 0  MOD  nx 1 key_periodic nx EQ jpi          CASE strupcase vargrid  OF          T :BEGIN           xx   xx firstx 1           yy   yy firsty 1         END          W :BEGIN           xx   xx firstx 1           yy   yy firsty 1         END          U :BEGIN           xx   xx firstx           yy   yy firsty 1         END          V :BEGIN           xx   xx firstx 1           yy   yy firsty         END          F :BEGIN           xx   xx firstx           yy   yy firsty         END       ENDCASE         bad   where xx GE jpi        IF bad 0  NE  1 THEN BEGIN         xx bad    xx bad jpi         yy bad    yy bad 1       ENDIF       bad   where yy GE jpj        IF bad 0  NE  1 THEN stop         print  glamt xx  yy  gphit xx  yy          cmd    buildcmd event top  boxzoom   boxzoom        END     ELSE:   endcase    RETURN end"); 
    361 a[359] = new Array("./ToBeReviewed/WIDGET/AUTOUR_de_XXX/tracecadre.html", "tracecadre.pro", "", "     file_comments        categories         param SMALL         keyword OUT        keyword ERASE        keyword FILL          returns          uses          restrictions          examples          history          version    Id: tracecadre pro 150 2006 08 09 10:12:54Z navarro          todo   seb     PRO tracecadre  small  out   out  erase   erase  fill   fill     determination of the column and of the line corresponding in input to small     compile_opt idl2  strictarrsubs      numdessin   small 2 1    numligne   numdessin small 0     numcolonne   numdessin numligne small 0    determination of poscadre    largeurcolonne   1 small 0     largeurligne   1 small 1     cadre    numcolonne largeurcolonne 1 numligne 1 largeurligne                   numcolonne 1 largeurcolonne  1 numligne largeurligne     decale   0 001    cadre   cadre decale decale decale decale     reinitplt     p position    0  0  1  1     IF keyword_set fill  then begin       polyfill   cadre 0  cadre 2  cadre 2  cadre 0  cadre 0              cadre 1  cadre 1  cadre 3  cadre 3  cadre 1  color   255   normal    ENDIF ELSE BEGIN       plot   cadre 0  cadre 2  cadre 2  cadre 0  cadre 0              cadre 1  cadre 1  cadre 3  cadre 3  cadre 1             xrange    0  1  yrange    0  1  linestyle   2 keyword_set out              noerase   normal  thick   2  color   0 255 keyword_set erase     ENDELSE      return end"); 
    362 a[360] = new Array("./ToBeReviewed/WIDGET/AUTOUR_de_XXX/updatewidget.html", "updatewidget.pro", "", "     file_comments        categories         param BASE  in required    The id of the widget where apply the drawing        keyword NOBOXZOOM        keyword NODATES        keyword NOTYPE          returns          uses          restrictions          examples          history          version    Id: updatewidget pro 150 2006 08 09 10:12:54Z navarro          todo   seb     PRO updatewidget  base  NOBOXZOOM   noboxzoom  NODATES   nodates  NOTYPE   notype       compile_opt idl2  strictarrsubs      widget_control base  get_uvalue   top_uvalue    smallin   extractatt top_uvalue   smallin     numdessinin   smallin 2 1        widget_control  base  update   0     date1 et date2      if keyword_set nodates  then begin       date1   0       date2   0     ENDIF ELSE BEGIN        dates    extractatt top_uvalue   dates  numdessinin        date1   dates 0    date2   dates 1     ENDELSE     domain      boxzoom    extractatt top_uvalue   domaines  numdessinin     if total boxzoom  EQ 0 then boxzoom    1    if keyword_set noboxzoom  then boxzoom   0     varinfo: filename   namevar      varinfo    extractatt top_uvalue   varinfo  numdessinin     filename   varinfo 0    nomvar   varinfo 1       if filename NE   OR nomvar NE   THEN BEGIN       changefile  base  filename  fieldname   nomvar  BOXZOOM   boxzoom  DATE1   date1  DATE2   date2    ENDIF ELSE BEGIN       if date1 NE 0 then begin          date1id   widget_info base  find_by_uname    calendar1           widget_control  date1id  set_value   date1       endif       if date2 NE 0 then begin          date2id   widget_info base  find_by_uname    calendar2           widget_control  date2id  set_value   date2       endif       if keyword_set boxzoom  then BEGIN           domainid   widget_info base  find_by_uname    domain           widget_control  domainid  set_value   boxzoom       endif    ENDELSE     exextra      if n_elements extractatt top_uvalue   exextra numdessinin  NE 0 then begin       exextra    extractatt top_uvalue   exextra numdessinin        specifieid   widget_info base find_by_uname    specifie        widget_control  specifieid  set_value   exextra    endif     text command      txtcmd    extractatt top_uvalue    txtcmd numdessinin     if txtcmd NE   then begin       txtcmdid   widget_info base  find_by_uname    txtcmd        widget_control  txtcmdid  set_value   txtcmd    endif     graphtype         if NOT keyword_set notype  then BEGIN       graphtype    extractatt top_uvalue   types numdessinin        if graphtype NE   then begin          actionid   widget_info base find_by_uname    action           widget_control  actionid  get_value   action_value          widget_control  actionid  set_combobox_select    where action_value EQ graphtype 0        endif    endif      widget_control  base  update   1        return end"); 
    363 a[361] = new Array("./ToBeReviewed/WIDGET/AUTOUR_de_XXX/xcreateanim.html", "xcreateanim.pro", "", "     file_comments        categories         param EVENT         returns          uses          restrictions          examples          history          version    Id: xcreateanim pro 150 2006 08 09 10:12:54Z navarro          todo   seb     pro xcreateanim_event  event      compile_opt idl2  strictarrsubs    common   We recuperate arguments contained in the widget   if tag_names event   structure_name  NE  WIDGET_BUTTON  then return   widget_control  event id  get_uvalue   uval   if n_elements uval  EQ 0 then return   if uval EQ  cancel  then begin     widget_control  event top   destroy     return   ENDIF   We will write the animation      widget_control  event top  get_uvalue   local_uvalue   widget_control  local_uvalue parent  get_uvalue   top_uvalue     calendar    extractatt top_uvalue   fileparameters local_uvalue indexfile time_counter   key_caltype    extractatt top_uvalue   fileparameters local_uvalue indexfile caltype   fakecal    extractatt top_uvalue   fileparameters local_uvalue indexfile fakecal     widget_control  widget_info event top  find_by_uname    Filename                        get_value   nomfic   nomfic   nomfic 0      widget_control  widget_info event top  find_by_uname    directorie                        get_value   animdir   animdir   animdir 0      widget_control  widget_info event top  find_by_uname    debut                        get_value   vdate1   index1   where calendar eq date2jul vdate1    index1   index1 0     if index1 EQ  1 then return     widget_control  widget_info event handler  find_by_uname    fin                        get_value   vdate2   index2   where calendar eq date2jul vdate2    index2   index2 0     if index2 EQ  1 OR index2 LE index1 then return   We delete the widget before create the file  ps   widget_control  event top   destroy     creation of the routine which will serve us to do the drawing     We recuperate the list of instructions    globalcommand   extractatt top_uvalue   globalcommand    We complete by first and last lines of the program   createpro  globalcommand  filename   myuniquetmpdir    xxx2ps pro                   KWDLIST     NOERASE   noerase  POSTSCRIPT   postscript  DATE1IN   date1in  DATE2IN   date2in     creation of the file       we recuperate the number of octets on which we code the palette    device  get_visual_depth   depth   Picture s size  in number of pixels :   xsize    d x_size   ysize    d y_size     We check that the file s name end by  gif   if strpos nomfic   gif  EQ  1 then nomfic   nomfic gif     current_window    d window   window   free   pixmap  xsize   xsize  ysize   ysize     indication of the number of the picture we are creating   base   widget_base    sliderid   widget_slider base  minimum   1  maximum   index2 index1 1  value   1                                title    image number:     widget_control  base   realize     Beginning of the gif file  Writting of an empty  picture    IF keyword_set fakecal  THEN date   index1 ELSE date   jul2date calendar index1    xxx2ps   noerase  date1in   date  date2in   date       image   tvrd true   depth GT 8    If an 8 bit image was read  reduce the number of colors   if depth le 8 then begin     tvlct  red  green  blue   get     reduce_colors  image  index     red   red index      green   green index      blue   blue index    endif                 if depth gt 8 then     Convert 24 bit image to 8 bit   image   color_quan image  1  red  green  blue  colors   256  get_translation   translation   map_all        write_gif  animdir nomfic  image  red  green  blue   multiple   wdelete   d window     Creation and writting loop in the file      IF index2 GT index1 THEN BEGIN     FOR ind   index1 1  index2 do BEGIN         widget_control  sliderid  set_value   ind index1 1   We move the slider          window   free   pixmap  xsize   xsize  ysize   ysize       IF keyword_set fakecal  THEN date   ind ELSE date   jul2date calendar ind        xxx2ps   noerase  date1   date  date2   date               image   tvrd true   depth GT 8          if depth gt 8 then           image   color_quan image  1  aaa  bbb  ccc  colors   256  translation   translation            write_gif  animdir nomfic  image  red  green  blue   multiple       wdelete   d window     ENDFOR   ENDIF    We put a last white picture   window   free   pixmap  xsize   xsize  ysize   ysize   reinitplt   plot    0    0   nodata   image   tvrd true   depth GT 8      if depth gt 8 then       image   color_quan image  1  aaa  bbb  ccc  colors   256  translation   translation        write_gif  animdir nomfic  image  red  green  blue   multiple   wdelete   d window   File s closing    write_gif  animdir nomfic   close    widget_control  base   destroy    Rerock in  normal  mode   thisOS   strupcase strmid version os_family  0  3      wset  current_window    If we are under x  we try to lauch xanim     if thisOS NE  MAC  AND thisOS NE  WIN  then begin     spawn   which xanim  result     if strpos result 0   xanim  EQ strlen result 0 5 then spawn   xanim  animdir nomfic      endif        return end        file_comments        categories         param PARENT         returns          uses          restrictions          examples          history          version    Id: xcreateanim pro 150 2006 08 09 10:12:54Z navarro          todo   seb     PRO xcreateanim  parent     compile_opt idl2  strictarrsubs    common      widget_control  parent  get_uvalue   top_uvalue     We will make sure that all procedure are not in pltt      procedures   extractatt top_uvalue   nameprocedures     if total procedures EQ  pltt  NE 0 then begin       nothing   report Certains des plots ont un axe se rapportant au temps   C Animation impossible   error        return    ENDIF     We will make sure that all figure have the same calendar      filelist   extractatt top_uvalue    filelist     filenames    extractatt top_uvalue    varinfo 0       filenames   reform filenames     filenames   filenames uniq filenames  sort filenames     if strtrim filenames 0  1  EQ   then filenames   filenames 1:n_elements filenames 1     indexfile    where filelist EQ filenames 0 0     calendar    extractatt top_uvalue   fileparameters indexfile time_counter      key_caltype    extractatt top_uvalue   fileparameters indexfile caltype    fakecal    extractatt top_uvalue   fileparameters indexfile fakecal    if n_elements filenames  GT 1 then begin       for i   1  n_elements filenames 1 do begin          indexfilebis    where filelist EQ filenames i 0           calendarbis    extractatt top_uvalue   fileparameters indexfilebis time_counter          if n_elements calendarbis  NE n_elements calendar   then begin             nothing   report Les diffrents plots n utilisent pas le meme calendrier   C Animation impossible   error              return          ENDIF          if total calendar NE calendarbis  NE 0 then begin             nothing   report Les diffrents plots n utilisent pas le meme calendrier   C Animation impossible   error              return          endif       endfor    endif     It is possible to do an animation       base   widget_base column  title    animation creation  uvalue    parent:parent  indexfile:indexfile        rien   widget_label base  value    animation name     rien   widget_text base value anim_idl gif  uname Filename   editable     rien   widget_label base  value    animation directory     if n_elements animdir  EQ 0 then cd  current   animdir    rien   widget_text base value animdir  uname directorie   editable     rien   widget_label base  value    starting date     rien   cw_calendar base  calendar  calendar 0                            FAKECAL   fakecal  uname    debut  uvalue    name: calendar   frame     rien   widget_label base  value    ending date     rien   cw_calendar base  calendar  calendar n_elements calendar 1                            FAKECAL   fakecal  uname    fin  uvalue    name: calendar   frame     rien   widget_button base value OK  uvalue    ok     rien   widget_button base value Cancel  uvalue    cancel       widget_control base realize    xmanager xcreateanim  base   no_block        return end"); 
    364 a[362] = new Array("./ToBeReviewed/WIDGET/AUTOUR_de_XXX/xxxmenubar_event.html", "xxxmenubar_event.pro", "", "     file_comments        categories         param EVENT         returns          uses          restrictions          examples          history          version     Id: xxxmenubar_event pro 150 2006 08 09 10:12:54Z navarro        todo    seb     PRO xxxmenubar_event  event     compile_opt idl2  strictarrsubs    common     case event value of      Open  :begin        oldmeshparams   ccmeshparameters       newfile   selectfile        if size newfile   type  NE 8 then return       widget_control  event top   hourglass       widget_control  event top  update   0       widget_control  event top  get_uvalue   top_uvalue   We take care of filelist       filelist   extractatt top_uvalue   filelist        filelist    filelist  newfile fileparameters filename        currentfile   n_elements filelist 1   We update the widget       filelistid   widget_info event top  find_by_uname    filelist        widget_control  filelistid  combobox_additem   file_basename newfile fileparameters filename        widget_control  filelistid  set_combobox_select   currentfile   We update filelist and currentfile s elements of the top_value        top_uvalue 1  findline top_uvalue   filelist    filelist       oldfile    top_uvalue 1  findline top_uvalue   currentfile         top_uvalue 1  findline top_uvalue   currentfile    currentfile   We take care of the name of the variable       vlstid   widget_info event top  find_by_uname    varlist    What is the selected field   Do we reselect it         fieldname   widget_info vlstid   combobox_gettext        index   where newfile fileparameters listvar EQ fieldname         widget_control  vlstid  set_value   newfile fileparameters listvar       widget_control  vlstid  set_combobox_select   0   index 0    We take care of the calendar        key_caltype   newfile fileparameters caltype       date1id   widget_info event top  find_by_uname    calendar1        widget_control  date1id  get_value   date1       widget_control  date1id   destroy       jdate1   jul2date date1        if  where newfile fileparameters time_counter EQ jdate1 0  EQ  1         then jdate1   newfile fileparameters time_counter 0        date2id   widget_info event top  find_by_uname    calendar2        widget_control  date2id  get_value   date2       widget_control  date2id   destroy       jdate2   jul2date date2        if  where newfile fileparameters time_counter EQ jdate2 0  EQ  1 then jdate2   jdate1       basecal   widget_info event top  find_by_uname    basecal        fakecal   newfile fileparameters fakecal       rien   cw_calendar basecal  newfile fileparameters time_counter  jdate1  uname    calendar1                               FAKECAL   fakecal  uvalue    name: calendar1   frame        rien   cw_calendar basecal  newfile fileparameters time_counter  jdate2  uname    calendar2                               FAKECAL   fakecal  uvalue    name: calendar2   frame    We update fileparameters  readparameters et meshparameters elements of the top_value       newfileparameters   ptrarr currentfile 1   allocate_heap        FOR i   0  currentfile 1 DO             newfileparameters i     extractatt top_uvalue   fileparameters i         newfileparameters currentfile    newfile fileparameters       ptr_free  extractatt top_uvalue   fileparameters         top_uvalue 1  findline top_uvalue   fileparameters    newfileparameters         newreadparameters   ptrarr currentfile 1   allocate_heap        FOR i   0  currentfile 1 DO             newreadparameters i     extractatt top_uvalue   readparameters i         newreadparameters currentfile    newfile readparameters       ptr_free  extractatt top_uvalue   readparameters         top_uvalue 1  findline top_uvalue   readparameters    newreadparameters         newmeshparameters   ptrarr currentfile 1   allocate_heap        FOR i   0  currentfile 1 DO             newmeshparameters i     extractatt top_uvalue   meshparameters i         newmeshparameters currentfile    newfile meshparameters       ptr_free  extractatt top_uvalue   meshparameters         top_uvalue 1  findline top_uvalue   meshparameters    newmeshparameters   We update the widget        if cmpgrid oldmeshparams  then BEGIN         domainid   widget_info event top  find_by_uname    domain          widget_control  domainid  set_value    1       endif       widget_control  event top  update   1     end      New xxx  :BEGIN       widget_control  event top  get_uvalue   top_uvalue       extra   extractatt top_uvalue   extra        xxx  CALLERWIDID   event top  _extra   extra     end      Quit :begin        widget_control  event top  get_uvalue   top_uvalue       ptr_free  extractatt top_uvalue   exextra        ptr_free  extractatt top_uvalue   fileparameters        ptr_free  extractatt top_uvalue   readparameters        ptr_free  extractatt top_uvalue   meshparameters        ptr_free  top_uvalue       widget_control  event top   destroy  We shut the widget     end      PostScript  :BEGIN       IF lmgr demo  EQ 1 THEN BEGIN         dummy   report impossible to save as postscript in demo mode          return       ENDIF       widget_control  event top  get_uvalue   top_uvalue   We recuperate the list of instructions       globalcommand   extractatt top_uvalue   globalcommand         for i   0  n_elements globalcommand 1 do print  globalcommand i    We complete by first and last lines of the program        createpro  globalcommand  filename   myuniquetmpdir    xxx2ps pro                       KWDLIST     NOERASE   noerase  POSTSCRIPT   postscript                       PORTRAIT   portrait  LANDSCAPE   landscape                       DATE1IN   date1in  DATE2IN   date2in                        POSTSCRIPT     END      Animated gif  :begin        IF float strmid version release 0 3  GE 6 2 THEN xcreateanim  event top     end      Gif  :BEGIN       IF lmgr demo  EQ 1 THEN BEGIN         dummy   report impossible to save as an image in demo mode          return       ENDIF       widget_control  event top  get_uvalue   top_uvalue       smallin   extractatt top_uvalue   smallin        numdessinin   smallin 2 1       smallout   extractatt top_uvalue   smallout        numdessinout   smallout 2 1       tracecadre  smallin   erase       tracecadre  smallout   erase       filename   xquestion dans quelle fichier gif voulez vous sauver  C l ecran de xxx   xxx_image gif        if rstrpos filename   gif  NE strlen filename 4 then filename   filename gif        filename   isafile file   filename  io   imagedir   new        saveimage  filename   quiet     end      IDL procedure :BEGIN       IF lmgr demo  EQ 1 THEN BEGIN         dummy   report impossible to save as a idl program file in demo mode          return       ENDIF   We recuperate the name of the file       filename   xquestion dans quelle procedure IDL voulez vous sauver  C la realisation de ce graph   xxx_figure pro    We complete it by a  pro       if rstrpos filename   pro  NE strlen filename 4 then filename   filename pro        filename   isafile file   filename  io   homedir   new        widget_control  event top  get_uvalue   top_uvalue   portrait or landscape         options   extractatt top_uvalue   options           optionsflag   extractatt top_uvalue   optionsflag        portrait    optionsflag where options EQ  Portrait Landscape  0 0    We read commands to do a plot       globalcommand   extractatt top_uvalue   globalcommand    We complete by first and last lines of the program       thisOS   strupcase strmid version os_family  0  3        CASE thisOS of          MAC :sep    :           WIN :sep             ELSE:sep           ENDCASE       poslastsep   rstrpos filename  sep        proname   strmid filename  poslastsep 1  strlen filename poslastsep 1 4        globalcommand    pro  proname  NOERASE   noerase  POSTSCRIPT   postscript  PORTRAIT   portrait  LANDSCAPE   landscape  DATE1IN   date1in  DATE2IN   date2in  _extra   ex                                                                 globalcommand                                                            return                              end    We write it in a program       putfile  filename  globalcommand     END      RESTORE kwd of xxx :BEGIN       IF lmgr demo  EQ 1 THEN BEGIN         dummy   report impossible to save the widget in demo mode          return       ENDIF   We recuperate the name of the file       filename   xquestion dans quel fichier bianire voulez vous sauver le widget    xxx_widget dat    We complete it by a  dat       if rstrpos filename   dat  NE strlen filename 4 then filename   filename dat        filename   isafile file   filename  io   homedir   new          widget_control  event top  get_uvalue   uvalue       widget_control  extractatt uvalue   graphid  get_value   win       wshow  win       wset  win       image   tvrd true        save  uvalue  image  filename   filename     END      Print to prompt :BEGIN       commande   getfile myuniquetmpdir    xxx_oneplot pro        for i   0   n_elements commande 1 do print  commande i      end     Portrait Landscape  :begin        widget_control  event top  get_uvalue   top_uvalue       options   extractatt top_uvalue   options        index   where options EQ  Portrait Landscape    index   index 0        optionsflag   extractatt top_uvalue   optionsflag        key_portrait   1 optionsflag index  0         top_uvalue 1  findline top_uvalue   optionsflag index      key_portrait   Separated windows or windows stuck to the widget        if widget_info event top  find_by_uname    graph  EQ 0 then BEGIN   We delete the window         graphid   extractatt top_uvalue   graphid          widget_control  widget_info graphid   parent   destroy   We recreate it          basegraph   widget_base title    xxx window   group_leader   event top  uvalue   event top   uname    basegraph          windsize   givewindowsize          graphid   widget_draw basegraph  uname    graph                                    uvalue    name: graph  press:0  click:0  x: 0  0  y: 0  0                                     button_events  retain   2                                   xsize   windsize 0  ysize   windsize 1          widget_control  basegraph   realize         xmanager   xxx  basegraph   no_block   We redraw what their were into it   We recuperate the list of instructions         globalcommand   extractatt top_uvalue   globalcommand    We complete by first and last lines of the program         createpro  globalcommand  filename   myuniquetmpdir    xxx2ps pro                         KWDLIST     NOERASE   noerase  POSTSCRIPT   postscript  PORTRAIT   portrait  LANDSCAPE   landscape                         KWDUSED      noerase  PORTRAIT   portrait    We reattribute the graphic element of the top_value          top_uvalue 1  findline top_uvalue   graphid    graphid       ENDIF ELSE BEGIN         extra   extractatt top_uvalue   extra          xxx  CALLERWIDID   event top   redraw  _extra   extra         widget_control  event top   destroy  We shut the widget       ENDELSE     end      Overlay  :begin        widget_control  event top  get_uvalue   top_uvalue       numdessinin    extractatt top_uvalue   smallin 2 1       options   extractatt top_uvalue   options           flags   extractatt top_uvalue   optionsflag        index   where options EQ  Overlay    We change the flag on Longitude   x index       flag   1 flags index  numdessinin    flag   flag 0    We reattribute it        top_uvalue 1  findline top_uvalue   optionsflag index  numdessinin    flag     end      Vecteur :BEGIN       widget_control  event top  get_uvalue   top_uvalue       numdessinin    extractatt top_uvalue   smallin 2 1       options   extractatt top_uvalue   options           flags   extractatt top_uvalue   optionsflag        index   where options EQ  Vecteur    We change the flag on Longitude   x index       flag   1 flags index  numdessinin    flag   flag 0    We reattribute it        top_uvalue 1  findline top_uvalue   optionsflag index  numdessinin    flag     end      Longitude   x index :BEGIN       widget_control  event top  get_uvalue   top_uvalue       numdessinin    extractatt top_uvalue   smallin 2 1       options   extractatt top_uvalue   options           flags   extractatt top_uvalue   optionsflag        index   where options EQ  Longitude   x index    We change the flag on Longitude   x index       flag   1 flags index  numdessinin    flag   flag 0    We reattribute it        top_uvalue 1  findline top_uvalue   optionsflag index  numdessinin    flag   Now we will change sliders defining the boxzoom       domainid   widget_info event top  find_by_uname    domain        boxzoom    extractatt top_uvalue   domaines  numdessinin    We want to find the type of grid which is used       currentfile   extractatt top_uvalue   currentfile        listgrid    extractatt top_uvalue   fileparameters currentfile listgrid       listvar    extractatt top_uvalue   fileparameters currentfile listvar       vlstid   widget_info event top  find_by_uname    varlist        namevar   widget_info vlstid   combobox_gettext        indexvar   where listvar EQ namevar        vargrid   strupcase listgrid indexvar        if flag EQ 0 then BEGIN     longitudes   We do a domdef to find the lon1 lon2 corresponding to the boxzoom defined on the widget          domdef  boxzoom  gridtype   vargrid   xindex                     yindex    flags where options EQ  Latitude   y index  numdessinin 0          widget_control  domainid  set_value    lon1  lon2  boxzoom 2:3        ENDIF ELSE BEGIN            xindex   now we want to find firstx  lastx corresponding to the boxzoom defined on the widget          domdef  boxzoom  gridtype   vargrid                     yindex    flags where options EQ  Latitude   y index  numdessinin 0          grille   1   1   1   1  nx  ny  nz  firstx  firsty  firstz  lastx  lasty  lastz         widget_control  domainid  set_value    firstx  lastx  boxzoom 2:3        ENDELSE   We update the top_uvalue       widget_control  domainid  get_value   boxzoom        top_uvalue 1  findline top_uvalue   domaines  numdessinin    boxzoom     end      Latitude   y index :begin        widget_control  event top  get_uvalue   top_uvalue       numdessinin    extractatt top_uvalue   smallin 2 1       options   extractatt top_uvalue   options           flags   extractatt top_uvalue   optionsflag        index   where options EQ  Latitude   y index    We change the flag on Latitude   y index       flag   1 flags index  numdessinin    flag   flag 0    We reattribute it        top_uvalue 1  findline top_uvalue   optionsflag index  numdessinin    flag   Now we will change sliders defining the boxzoom       domainid   widget_info event top  find_by_uname    domain        boxzoom    extractatt top_uvalue   domaines  numdessinin    We want to find the type of grid which is used       currentfile   extractatt top_uvalue   currentfile        listgrid    extractatt top_uvalue   fileparameters currentfile listgrid       listvar    extractatt top_uvalue   fileparameters currentfile listvar       vlstid   widget_info event top  find_by_uname    varlist        namevar   widget_info vlstid   combobox_gettext        indexvar   where listvar EQ namevar        vargrid   strupcase listgrid indexvar        if flag EQ 0 then BEGIN     latitudes   We do a domdef to find the lat1 lat2 corresponding to the boxzoom defined on the widget          domdef  boxzoom  gridtype   vargrid   yindex                     xindex    flags where options EQ  Longitude   x index  numdessinin 0          widget_control  domainid  set_value    boxzoom 0:1  lat1  lat2        ENDIF ELSE BEGIN            yindex   now we want to find firsty  lasty corresponding to the boxzoom defined on the widget          domdef  boxzoom  gridtype   vargrid                     xindex    flags where options EQ  Longitude   x index  numdessinin 0          grille   1   1   1   1  nx  ny  nz  firstx  firsty  firstz  lastx  lasty  lastz         widget_control  domainid  set_value    boxzoom 0:1  firsty  lasty        ENDELSE   We update the top_uvalue       widget_control  domainid  get_value   boxzoom        top_uvalue 1  findline top_uvalue   domaines  numdessinin    boxzoom     END   endcase   return end"); 
    365 a[363] = new Array("./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_bgroup.html", "cw_bgroup.pro", "", "     file_comments        categories   Compound widget       param ID        param VALUE   It is the default tick mark value  a floating point number       returns          uses          restrictions          examples          history          version     Id: cw_bgroup pro 163 2006 08 29 12:59:46Z navarro     pro cw_bgroup_setv  id  value   compile_opt hidden  idl2  strictarrsubs    ON_ERROR  2                        return to caller    stash   WIDGET_INFO id   CHILD    WIDGET_CONTROL  stash  GET_UVALUE state   NO_COPY    case state type of     0: message unable to set plain button group value      1: begin       WIDGET_CONTROL  SET_BUTTON 0  state ids state excl_pos        state excl_pos   value       WIDGET_CONTROL   SET_BUTTON  state ids value      end     2: begin       n   n_elements value 1       for i   0  n do begin         state nonexcl_curpos i    value i          WIDGET_CONTROL  state ids i  SET_BUTTON value i        endfor     end   endcase    WIDGET_CONTROL  stash  SET_UVALUE state   NO_COPY end         file_comments   Compound widget      categories         param ID        param VALUE   It is the default tick mark value  a floating point number       returns          uses          restrictions          examples          history          version     Id: cw_bgroup pro 163 2006 08 29 12:59:46Z navarro     function cw_bgroup_getv  id  value    compile_opt hidden  idl2  strictarrsubs   ON_ERROR  2                        return to caller    stash   WIDGET_INFO id   CHILD    WIDGET_CONTROL  stash  GET_UVALUE state   NO_COPY    case state type of     0: message   unable to get plain button group value       1: ret   state excl_pos     1: ret   state ret_arr state excl_pos       2: ret   state nonexcl_curpos     2: BEGIN        index   where state nonexcl_curpos NE 0        if index 0  EQ  1 then begin         if size state ret_arr   type  EQ 7 then ret     ELSE ret    1       ENDIF ELSE ret   state ret_arr index      END   endcase      WIDGET_CONTROL  stash  SET_UVALUE state   NO_COPY    return  ret  end         file_comments   Compound widget      categories         param EV        returns          uses          restrictions          examples          history          version     Id: cw_bgroup pro 163 2006 08 29 12:59:46Z navarro     function cw_bgroup_event  ev   compile_opt hidden  idl2  strictarrsubs   WIDGET_CONTROL  ev handler  GET_UVALUE stash   WIDGET_CONTROL  stash  GET_UVALUE state   NO_COPY   WIDGET_CONTROL  ev id  get_uvalue uvalue    ret   1            Assume we return a struct   case state type of     0:     1: if  ev select eq 1  then begin       state excl_pos   uvalue     ENDIF else begin       if  state no_release ne 0  then ret   0     ENDELSE     2: begin         Keep track of the current state       state nonexcl_curpos uvalue    ev select           if  state no_release ne 0  and  ev select eq 0  then ret   0     end   endcase    if ret then begin      Return a struct        ret     ID:state base  TOP:ev top  HANDLER:0L  SELECT:ev select               VALUE:state ret_arr uvalue          efun   state efun       WIDGET_CONTROL  stash  SET_UVALUE state   NO_COPY       if efun ne   then return  CALL_FUNCTION efun  ret          else return  ret   endif else begin       Trash the event       WIDGET_CONTROL  stash  SET_UVALUE state   NO_COPY       return  0   endelse end            file_comments   CW_BGROUP is a compound widget that simplifies creating   a base of buttons  It handles the details of creating the   proper base  standard  exclusive  or non exclusive  and filling   in the desired buttons  Events for the individual buttons are   handled transparently  and a CW_BGROUP event returned  This   event can return any one of the following:          The Index of the button within the base           The widget ID of the button           The name of the button           An arbitrary value taken from an array of User values       categories   Compound widget      param PARENT  in required    The ID of the parent widget        param NAMES  type string array    A string array  containing one string per button    giving the name of each button       keyword BUTTON_UVALUE  type array    An array of user values to be associated with   each button and returned in the event structure        keyword COLUMN   Buttons will be arranged in the number of columns   specified by this keyword        keyword EVENT_FUNCT   The name of an optional user supplied event function   for buttons  This function is called with the return   value structure whenever a button is pressed  and   follows the conventions for user written event functions        keyword EXCLUSIVE   Buttons will be placed in an exclusive base  with   only one button allowed to be selected at a time        keyword FONT   The name of the font to be used for the button   titles  If this keyword is not specified  the default   font is used        keyword FRAME   Specifies the width of the frame to be drawn around the base        keyword IDS   A named variable into which the button IDs will be   stored  as a longword vector        keyword LABEL_LEFT   Creates a text label to the left of the buttons        keyword LABEL_TOP   Creates a text label above the buttons        keyword MAP   If set  the base will be mapped when the widget   is realized  the default        keyword NONEXCLUSIVE   Buttons will be placed in an non exclusive base    The buttons will be independent        keyword NO_RELEASE   If set  button release events will not be returned        keyword RETURN_ID   If set  the VALUE field of returned events will be   the widget ID of the button        keyword RETURN_INDEX   If set  the VALUE field of returned events will be   the zero based index of the button within the base    THIS IS THE DEFAULT        keyword RETURN_NAME   If set  the VALUE field of returned events will be   the name of the button within the base        keyword ROW   Buttons will be arranged in the number of rows   specified by this keyword        keyword SCROLL   If set  the base will include scroll bars to allow   viewing a large base through a smaller viewport        keyword SET_VALUE   The initial value of the buttons  This is equivalent   to the later statement:     WIDGET_CONTROL  widget  set_value value      keyword SPACE   The space  in pixels  to be left around the edges   of a row or column major base  This keyword is   ignored if EXCLUSIVE or NONEXCLUSIVE are specified        keyword UVALUE   The user value to be associated with the widget        keyword UNAME   The user name to be associated with the widget        keyword XOFFSET   The X offset of the widget relative to its parent        keyword XPAD   The horizontal space  in pixels  between children   of a row or column major base  Ignored if EXCLUSIVE   or NONEXCLUSIVE are specified        keyword XSIZE   The width of the base     keyword X_SCROLL_SIZE   The width of the viewport if SCROLL is specified        keyword YOFFSET   The Y offset of the widget relative to its parent        keyword YPAD   The vertical space  in pixels  between children of   a row or column major base  Ignored if EXCLUSIVE   or NONEXCLUSIVE are specified        keyword YSIZE   The height of the base        keyword Y_SCROLL_SIZE   The height of the viewport if SCROLL is specified       returns   The ID of the created widget is returned       restrictions   This widget generates event structures with the following definition:           event     ID:0L  TOP:0L  HANDLER:0L  SELECT:0  VALUE:0       The SELECT field is passed through from the button event  VALUE is   either the INDEX  ID  NAME  or BUTTON_UVALUE of the button    depending on how the widget was created       restrictions   Only buttons with textual names are handled by this widget    Bitmaps are not understood       history   15 June 1992  AB   7 April 1993  AB  Removed state caching    6 Oct  1994  KDB  Font keyword is not applied to the label    10 FEB 1995  DJC  fixed bad bug in event procedure  getting                           id of stash widget    11 April 1995  AB Removed Motif special cases      Copyright  c  1992 2005  Research Systems  Inc   All rights reserved      Unauthorized reproduction prohibited       version    Id: cw_bgroup pro 163 2006 08 29 12:59:46Z navarro            function cw_bgroup  parent  names        BUTTON_UVALUE   button_uvalue  COLUMN column  EVENT_FUNCT   efun        EXCLUSIVE excl  FONT font  FRAME frame  IDS ids  LABEL_TOP label_top        LABEL_LEFT label_left  MAP map        NONEXCLUSIVE nonexcl  NO_RELEASE no_release  RETURN_ID return_id        RETURN_INDEX return_index  RETURN_NAME return_name        ROW row  SCROLL scroll  SET_VALUE sval  SPACE space        TAB_MODE tab_mode  UVALUE uvalue        XOFFSET xoffset  XPAD xpad  XSIZE xsize  X_SCROLL_SIZE x_scroll_size      YOFFSET yoffset  YPAD ypad  YSIZE ysize  Y_SCROLL_SIZE y_scroll_size        UNAME uname     IF  N_PARAMS  ne 2  THEN MESSAGE   Incorrect number of arguments     ON_ERROR  2                        return to caller      Set default values for the keywords   version   WIDGET_INFO version    if  version toolkit eq  OLIT  then def_space_pad   4 else def_space_pad   3   IF  N_ELEMENTS column  eq 0       then column   0   IF  N_ELEMENTS excl  eq 0         then excl   0   IF  N_ELEMENTS frame  eq 0        then frame   0   IF  N_ELEMENTS map  eq 0      then map 1   IF  N_ELEMENTS nonexcl  eq 0      then nonexcl   0   IF  N_ELEMENTS no_release  eq 0   then no_release   0   IF  N_ELEMENTS row  eq 0      then row   0   IF  N_ELEMENTS scroll  eq 0       then scroll   0   IF  N_ELEMENTS space  eq 0        then space   def_space_pad   IF  N_ELEMENTS uname  eq 0       then uname    CW_BGROUP_UNAME    IF  N_ELEMENTS uvalue  eq 0       then uvalue   0   IF  N_ELEMENTS xoffset  eq 0      then xoffset 0   IF  N_ELEMENTS xpad  eq 0         then xpad   def_space_pad   IF  N_ELEMENTS xsize  eq 0        then xsize   0   IF  N_ELEMENTS x_scroll_size  eq 0    then x_scroll_size   0   IF  N_ELEMENTS yoffset  eq 0      then yoffset 0   IF  N_ELEMENTS ypad  eq 0         then ypad   def_space_pad   IF  N_ELEMENTS ysize  eq 0        then ysize   0   IF  N_ELEMENTS y_scroll_size  eq 0    then y_scroll_size   0       top_base   0L   if  n_elements label_top  ne 0  then begin     next_base   WIDGET_BASE parent  XOFFSET xoffset  YOFFSET yoffset   COLUMN      if keyword_set font then          junk   WIDGET_LABEL next_base  value label_top font font        else    junk   WIDGET_LABEL next_base  value label_top      top_base   next_base   endif else next_base   parent    if  n_elements label_left  ne 0  then begin     next_base   WIDGET_BASE next_base  XOFFSET xoffset  YOFFSET yoffset   ROW      if keyword_set font then          junk   WIDGET_LABEL next_base  value label_left  font font        else junk   WIDGET_LABEL next_base  value label_left      if  top_base eq 0L  then top_base   next_base   endif     We need some kind of outer base to hold the users UVALUE   if  top_base eq 0L  then begin     top_base   WIDGET_BASE parent  XOFFSET xoffset  YOFFSET yoffset      next_base   top_base   endif   If  top_base EQ next_base  THEN        next_base   WIDGET_BASE top_base  Xpad 1  Ypad 1  Space 1       Set top level base attributes   WIDGET_CONTROL  top_base  MAP map        FUNC_GET_VALUE CW_BGROUP_GETV  PRO_SET_VALUE CW_BGROUP_SETV        SET_UVALUE uvalue  SET_UNAME uname      Tabbing   if  n_elements tab_mode  ne 0  then begin     WIDGET_CONTROL  top_base  TAB_MODE tab_mode     WIDGET_CONTROL  next_base  TAB_MODE tab_mode   end      The actual button holding base   base   WIDGET_BASE next_base  COLUMN column  EXCLUSIVE excl  FRAME frame        NONEXCLUSIVE nonexcl  ROW row  SCROLL scroll  SPACE space        XPAD xpad  XSIZE xsize  X_SCROLL_SIZE x_scroll_size        YPAD ypad  YSIZE ysize  Y_SCROLL_SIZE y_scroll_size        EVENT_FUNC CW_BGROUP_EVENT        UVALUE WIDGET_INFO top_base   child      n   n_elements names    ids   lonarr n    for i   0  n 1 do begin     if  n_elements font  eq 0  then begin       ids i    WIDGET_BUTTON base  value names i  UVALUE i          UNAME uname _BUTTON STRTRIM i 2      endif else begin       ids i    WIDGET_BUTTON base  value names i  FONT font          UVALUE i  UNAME uname _BUTTON STRTRIM i 2      endelse   endfor      Keep the state info in the real  inner  base UVALUE      Pick an event value type:     0   Return ID     1   Return INDEX     2   Return NAME   ret_type   1   if KEYWORD_SET RETURN_ID  then ret_type   0   if KEYWORD_SET RETURN_NAME  then ret_type   2   if KEYWORD_SET BUTTON_UVALUE  then ret_type   3     case ret_type of       0: ret_arr   ids       1: ret_arr   indgen n        2: ret_arr   names       3: ret_arr   button_uvalue     endcase   type   0   if  excl ne 0  then type   1    if  nonexcl ne 0  then type   2   if n_elements efun  le 0 then efun       state     type:type         0 Standard  1 Exclusive  2 Non exclusive         base: top_base        cw_bgroup base          ret_arr:ret_arr       Vector of event values         efun : efun       Name of event fcn         nonexcl_curpos:intarr n      If non exclus  tracks state         excl_pos:0                If exclusive  current button         ids:ids               Ids of buttons         no_release:no_release     WIDGET_CONTROL  WIDGET_INFO top_base   CHILD  SET_UVALUE state   NO_COPY    if  n_elements sval  ne 0  then CW_BGROUP_SETV  top_base  sval    return  top_base END"); 
    366 a[364] = new Array("./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_calendar.html", "cw_calendar.pro", "", "  IDL  testwid julday 1 1 1980 lindgen 100 5     PRO testwid_event  event       ComboboxId   widget_info event top find_by_uname    c est lui       widget_control  event id  get_uvalue uval      if n_elements uval  EQ 0 then return      case uval of          done :widget_control  event top   destroy          set :BEGIN             widget_control  event id  get_value   value            widget_control  ComboboxId  set_value   value         END          get :BEGIN             widget_control  ComboboxId  get_value   value            help   value   struct         END         ELSE:      endcase      return   end   PRO testwid  calendar  date0  _extra   ex      base widget_base COLUMN    print   base  base      nothing   widget_label base  value    beginning of the test           nothing   cw_calendar base calendar  date0  _extra   ex  uname    c est lui  uvalue    c est lui      print   cw_calendar ID   nothing          nothing   widget_label base  value    end of the test        nothing   widget_text base  value   string calendar 0  uvalue    set   editable        nothing   widget_button base  value    get  uvalue    get        nothing   widget_button base  value    done  uvalue    done       widget_control  base   REALIZE      xmanager testwid  base      return   END          file_comments        categories   Compound widget       param ID        param VALUE   It is the default tick mark value  a floating point number       returns          uses          restrictions          examples          history          version     Id: cw_calendar pro 157 2006 08 21 09:01:50Z navarro       PRO cw_calendar_set_value  id  value     compile_opt strictarr  strictarrsubs       cm_4cal   get back the calendar and its related informations   winfo_id   widget_info id  find_by_uname    infocal    widget_control  winfo_id  get_uvalue   infowid   key_caltype   infowid caltype      high freqeuncy calendar   IF keyword_set infowid fakecal  THEN BEGIN     value2   date2jul long value    infowid fakecal     IF value2 LT n_elements infowid calendar  AND value2 GE 0 THEN BEGIN         stepid   widget_info id  find_by_uname    step        widget_control  stepid  set_value    combobox_select:value2        infowid date   jul2date value2   infowid fakecal        widget_control  winfo_id  set_uvalue   infowid     ENDIF   ENDIF ELSE BEGIN        value   long value 0    make sure the value correspond     value   jul2date date2jul value    define year month day     year   value 10000l     month    value MOD 10000L 100L     day   value MOD 100L   check that the date exists in the calendar   if  where infowid calendar EQ julday month  day  year 0  EQ   1 then return   update the value of infocal     infowid date   value     widget_control  winfo_id  set_uvalue   infowid   update the combobox if needed      possiblecase    day   month   year      for name   2  0   1 do BEGIN   call set_cal_combobox with out   2 to specify that the call is coming   from cw_calendar_set_value       if widget_info id  find_by_uname   possiblecase name  NE 0 then            set_cal_combobox   handler:id  out:2  possiblecase name  value     ENDFOR   ENDELSE     return end        file_comments        categories   Compound widget       param ID        returns          uses          restrictions          examples          history          version     Id: cw_calendar pro 157 2006 08 21 09:01:50Z navarro     FUNCTION cw_calendar_get_value  id     compile_opt strictarr  strictarrsubs      winfo_id   widget_info id  find_by_uname    infocal    widget_control  winfo_id  get_uvalue   infowid   return  infowid date END        file_comments        categories   Compound widget       param ID        param WINFOID        returns          uses          restrictions          examples          history          version     Id: cw_calendar pro 157 2006 08 21 09:01:50Z navarro     FUNCTION get_cal_value  id  winfoid      compile_opt strictarr  strictarrsubs      winfo_id   widget_info id  find_by_uname    infocal    widget_control  winfo_id  get_uvalue   infowid   oldate   infowid date  day    wid_id   widget_info id  find_by_uname    day    if wid_id NE 0 then BEGIN     widget_control  wid_id  get_value   wid_value     date   long wid_value combobox_gettext    ENDIF ELSE date   oldate MOD 100L  month    wid_id   widget_info id  find_by_uname    month    if wid_id NE 0 then BEGIN     widget_control  wid_id  get_value   wid_value     allmonths   string format    C CMoA  31 indgen 12      month    where allmonths EQ wid_value combobox_gettext 0    1      date   date   100L   long month    ENDIF ELSE date   date    oldate MOD 10000L 100L 100L  year    wid_id   widget_info id  find_by_uname    year    widget_control  wid_id  get_value   wid_value   date   date   10000L   long wid_value combobox_gettext      IF arg_present winfoid  NE 0 THEN BEGIN     winfoid   winfo_id     infowid date   date     return  infowid   ENDIF ELSE return  date end     redefine the value and index position of the combobox      file_comments        categories   Compound widget       param EVENT        param CASENAME        param DATE0        returns          uses          restrictions          examples          history          version     Id: cw_calendar pro 157 2006 08 21 09:01:50Z navarro     PRO set_cal_combobox  event  casename  date0     compile_opt strictarr  strictarrsubs      casename: Which widget shall we move:  day   month  or  year      wid_id   widget_info event handler  find_by_uname   casename    we get back the calendar    winfo_id   widget_info event handler  find_by_uname    infocal    widget_control  winfo_id  get_uvalue   infowid   caldat  infowid calendar  monthcal  daycal  yearcal     and the current date   IF n_elements date0  EQ 0 then date0   get_cal_value event handler    year0   date0 10000L   month0    date0 MOD 10000L 100L   day0   date0 MOD 100L   index of days months years according to date0   case casename of      day :BEGIN    list of days corresponding to month0 and year0       index   where monthcal EQ month0 AND yearcal EQ year0        current   daycal index      END      month :BEGIN    list of months corresponding to year0       index   where yearcal EQ year0        current   monthcal index    keep only the uniq values       indexbis   uniq current        index   index indexbis        current   current indexbis      END      year :BEGIN    keep only the uniq years       index   uniq yearcal        current   yearcal index      END   ENDCASE   we update the uvalue of the widget   widget_control  wid_id  set_uvalue    name:casename    for event out   0  we store the previous position of the combobox to use   it as the default position    IF event out EQ 0 THEN widget_control  wid_id  get_value   oldselect   we redefine the new list   if casename EQ  month  then begin     widget_control  wid_id  set_value   string format    C CMoA  31 current 1    ENDIF ELSE BEGIN      widget_control  wid_id  set_value   strtrim current  1    ENDELSE   specify the index position within the new list of values    widget_control  wid_id  get_value   combobox   CASE event out OF    1: we put to the biggest position      1:selected   combobox combobox_number   1   0: same as the previous position is the best choice      0:selected   oldselect combobox_index    combobox combobox_number   1    1: we put to the smallest position     1:selected   0   2: a new date has been specified      2:BEGIN        case casename of          day :selected    where current EQ day0 0           month :selected    where current EQ month0 0           year :selected    where current EQ year0 0        ENDCASE     END   ENDCASE   widget_control  wid_id  set_value    combobox_select:selected    update the date    infowid date   get_cal_value event handler    widget_control  winfo_id  set_uvalue   infowid   return end     move cyclicly the calendar to the   value 0 if event out 1 or combobox_number 1 if event out 1      file_comments        categories   Compound widget       param EVENT        param CASENAME        returns          uses          restrictions          examples          history          version     Id: cw_calendar pro 157 2006 08 21 09:01:50Z navarro     PRO move  event  casename     compile_opt strictarr  strictarrsubs       possiblecase    day   month   year   impossiblecase     id   widget_info event handler  find_by_uname   casename     widget_control  id  get_value   wvalue   we try to move but we are already at the beginning end of the combobox   wvalue combobox_index EQ  wvalue combobox_number 1  and event out EQ 1   wvalue combobox_index EQ 0 and event out EQ  1  move is not called when out eq 0     whichcase    where possiblecase EQ casename 0     if wvalue combobox_index EQ  wvalue combobox_number 1 event out EQ 1  THEN BEGIN       if widget_info event handler  find_by_uname   possiblecase whichcase 1  EQ 0 then begin   it is impossible to move the  next  combobox           widget_control  id  get_value   widvalue   we set to  widvalue combobox_number 1  when event out EQ  1   and to 0 when event out EQ 1          selected    widvalue combobox_number 1 event out EQ  1           widget_control  id  set_value    combobox_select:selected    we call move for the next combobox       ENDIF ELSE move  event  possiblecase whichcase 1    it is possible to move from   1    ENDIF ELSE widget_control  id  set_value    combobox_select:wvalue combobox_index event out     set_cal_combobox  event  possiblecase whichcase 1     return end        file_comments        categories   Compound widget       param EVENT        returns          uses          restrictions          examples          history          version     Id: cw_calendar pro 157 2006 08 21 09:01:50Z navarro     FUNCTION cw_calendar_event  event    cm_4cal   compile_opt strictarr  strictarrsubs      winfo_id   widget_info event handler  find_by_uname    infocal    widget_control  winfo_id  get_uvalue   infowid   key_caltype   infowid caltype     widget_control  event id  get_uvalue   uval   high frequency calendar   IF uval name EQ  step  THEN BEGIN      infowid date   jul2date event index   infowid fakecal    ENDIF ELSE BEGIN       possiblecase    day   month   year   impossiblecase      whichcase    where possiblecase EQ uval name 0      if event out NE 0 then BEGIN   we use the   button and we want to go out of the combobox:   to index    1  event out 1  or to index   combobox_number  event out 1    we try to move the combobox just right  with name: possiblecase whichcase 1        if widget_info event handler  find_by_uname   possiblecase whichcase 1  EQ 0 then BEGIN   this widget do not exist we set cyclicly the current widget to the   value 0 if event out 1 or combobox_number 1 if event out 1         widget_control  event id  get_value   widvalue         selected    widvalue combobox_number 1 event out EQ  1          widget_control  event id  set_value    combobox_select:selected        ENDIF ELSE move  event  possiblecase whichcase 1      ENDIF   if we changed month year  we need to update the day  and month  list     if uval name NE  day  then begin       event out   0       for name   whichcase 1  0   1 do BEGIN         if widget_info event handler  find_by_uname   possiblecase name  NE 0 then              set_cal_combobox  event  possiblecase name        endfor     ENDIF   we update the date     infowid   get_cal_value event handler  winfo_id    ENDELSE      widget_control  winfo_id  set_uvalue   infowid   return   CW_CALENDAR  ID:event handler  TOP:event top  HANDLER:0L                VALUE:infowid date  FAKECAL: infowid fakecal  end          file_comments        categories   Compound widget       param PARENT  in required    The widget ID of the parent widget       param CALENDAR        param JDATE0         keyword CALTYPE          keyword FAKECAL         keyword UVALUE         keyword UNAME         keyword _EXTRA   Used to pass your keywords       returns          uses          restrictions          examples          history          version     Id: cw_calendar pro 157 2006 08 21 09:01:50Z navarro        todo   seb      FUNCTION cw_calendar  parent  calendar  jdate0  CALTYPE   CALTYPE  FAKECAL   fakecal  UVALUE   uvalue  UNAME   uname  _extra   ex    cm_4cal     compile_opt strictarr  strictarrsubs      if keyword_set caltype  then key_caltype   caltype   months days years found in the calendar   caldat  calendar  monthcal  daycal  yearcal  hourcal  mincal  scdcal   starting date   if n_elements jdate0  EQ 0 then jdate0   calendar 0    if  where calendar EQ jdate0 0  EQ  1 then jdate0   calendar 0      caldat  jdate0  month0  day0  year0   test the type of calendar   if n_elements calendar  GT 1 then BEGIN   each day have the same value     if n_elements uniq daycal  sort daycal  EQ 1 then monthly   1   each month and each day have the same value     if keyword_set monthly  AND n_elements uniq monthcal  sort monthcal  EQ 1 then yearly   1   endif     if NOT keyword_set uvalue  then uvalue    dummy:    if NOT keyword_set uname  then uname       base0   widget_base parent   ROW                           EVENT_FUNC    cw_calendar_event                            FUNC_GET_VALUE    cw_calendar_get_value                            PRO_SET_VALUE    cw_calendar_set_value                            UVALUE   uvalue  UNAME   uname  space   0  _extra   ex       if n_elements fakecal  eq 0 then fakecal   0   base   widget_base base0  space   0  uname    infocal                           uvalue    calendar:calendar  date:jul2date jdate0  fakecal:fakecal  caltype: key_caltype      IF keyword_set fakecal  THEN BEGIN      cmbbid   cw_combobox_pm base  UVALUE    name: step  UNAME    step                                  value   strtrim indgen n_elements calendar  1      widget_control  cmbbid  set_value    combobox_select: where calendar EQ jdate0 0    ENDIF ELSE BEGIN        vallen   widget_info base  string_size    m   day      if NOT keyword_set monthly   then begin       dayindex   where monthcal EQ month0 AND yearcal EQ year0        currentday   daycal dayindex        currentday   strtrim currentday  1        cmbbid   cw_combobox_pm base  UVALUE    name: day  UNAME    day  value   currentday        widget_control  cmbbid  set_value    combobox_select: where long currentday  EQ day0 0      endif  month      if NOT keyword_set yearly   then BEGIN       monthindex   where yearcal EQ year0        currentmonth   long monthcal monthindex    we suppress the repeted months       monthindexbis   uniq currentmonth  sort currentmonth        monthindex   monthindex monthindexbis        currentmonth   currentmonth monthindexbis        xoff    34   2 vallen 0 1 keyword_set monthly        cmbbid   cw_combobox_pm base  UVALUE    name: month  UNAME    month  value   string format    C CMoA  31 currentmonth 1  xoffset   xoff        widget_control  cmbbid  set_value    combobox_select: where long currentmonth  EQ month0 0      endif  year      yearindex   uniq yearcal  sort yearcal      currentyear   strtrim yearcal yearindex  1      xoff    34   2 vallen 0 1 keyword_set monthly     33   3 vallen 0 1 keyword_set yearly      cmbbid   cw_combobox_pm base  UVALUE    name: year  UNAME    year  value   currentyear  xoffset   xoff      widget_control  cmbbid  set_value    combobox_select: where long currentyear  EQ year0 0      ENDELSE     return  base end"); 
    367 a[365] = new Array("./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_combobox_pm.html", "cw_combobox_pm.pro", "", "  testwid  value strtrim indgen 10 2    PRO testwid_event  event       help  event   STRUCT      ComboboxId   widget_info event top find_by_uname    c est lui       widget_control  event id  get_uvalue uval      if n_elements uval  EQ 0 then return      case uval of          done :widget_control  event top   destroy          dynamic_resize :BEGIN             widget_control  event id  get_value   value            widget_control  ComboboxId  set_value    dynamic_resize:value          END          combobox_select :BEGIN             widget_control  event id  get_value   value            widget_control  ComboboxId  set_value    combobox_select:value          END          value :BEGIN             widget_control  event id  get_value   value            widget_control  ComboboxId  set_value   value         END          get :BEGIN             widget_control  ComboboxId  get_value   value            help   value   struct         END         ELSE:      endcase      return   end   PRO testwid  _extra   ex      base widget_base COLUMN    print   base  base      nothing   widget_label base  value    beginning of the test           nothing   cw_combobox_pm base  _extra   ex  uname    c est lui  uvalue    c est lui    print   cw_combobox_pm ID   nothing          nothing   widget_label base  value    end of the test       nothing   widget_text base  value    0  uvalue    dynamic_resize   editable       nothing   widget_text base  value    10  uvalue    combobox_select   editable       nothing   widget_text base  value    5  uvalue    value   editable       nothing   widget_button base  value    get  uvalue    get       nothing   widget_button base  value    done  uvalue    done       widget_control  base   REALIZE      xmanager testwid  base      return   end        file_comments        categories   Compound widget       param ID        param VALUE   It is the default tick mark value  a floating point number       returns          uses          restrictions          examples          history          version     Id: cw_combobox_pm pro 157 2006 08 21 09:01:50Z navarro     PRO cw_combobox_pm_set_value  id  value     compile_opt idl2  strictarrsubs      ComboboxId   widget_info id find_by_uname    Combobox     if size value   type  eq 8 then BEGIN   this is a structure       tagnames   tag_names value        for tag   0  n_tags value 1 do begin          case strtrim strlowcase tagnames tag  2  of              dynamic_resize :widget_control  ComboboxId  dynamic_resize   value dynamic_resize   for compatibility              droplist_select :widget_control  ComboboxId  set_combobox_select   value droplist_select              combobox_select :widget_control  ComboboxId  set_combobox_select   value combobox_select              value :widget_control  ComboboxId  set_value   value value             ELSE:ras   report wrong tag name in argument  value  of cw_combobox_pm_set_value           endcase       endfor    ENDIF ELSE widget_control  ComboboxId  set_value   value    return end        file_comments        categories   Compound widget       param ID        returns          uses          restrictions          examples          history          version     Id: cw_combobox_pm pro 157 2006 08 21 09:01:50Z navarro     FUNCTION cw_combobox_pm_get_value  id     compile_opt idl2  strictarrsubs      ComboboxId   widget_info id find_by_uname    Combobox     widget_control  ComboboxId  get_value   cmbbval    cmbbtxt   widget_info ComboboxId   combobox_gettext     cmbbnumb   widget_info ComboboxId   combobox_number     index    where cmbbval EQ cmbbtxt 0     return   combobox_number:cmbbnumb  combobox_gettext:cmbbtxt                 combobox_index:index  combobox_value:cmbbval                 dynamic_resize:widget_info ComboboxId   dynamic_resize  end          file_comments        categories   Compound widget       param EVENT        returns          uses          restrictions          examples          history          version     Id: cw_combobox_pm pro 157 2006 08 21 09:01:50Z navarro     FUNCTION cw_combobox_pm_event  event     compile_opt idl2  strictarrsubs      widget_control  event id  get_uvalue uval      if uval EQ  Combobox  then       return   CW_COMBOBOX_PM  ID:event handler  TOP:event top  HANDLER:0L                  INDEX:event index  STR:event str  OUT:0       ComboboxId   widget_info event handler find_by_uname    Combobox     widget_control  ComboboxId  get_value   cmbbval    cmbbtxt   widget_info ComboboxId   combobox_gettext     cmbbnumb   widget_info ComboboxId   combobox_number     index    where cmbbval EQ cmbbtxt 0     out   0    case uval OF        plus :BEGIN          if index LT  cmbbnumb   1  then BEGIN             index   index   1            widget_control  ComboboxId  set_combobox_select   index          ENDIF ELSE out   1       END        minus :BEGIN          if index GT 0 then BEGIN             index   index   1            widget_control  ComboboxId  set_combobox_select   index          ENDIF ELSE out    1       END    endcase    return   CW_COMBOBOX_PM  ID:event handler  TOP:event top  HANDLER:0L                       INDEX:index  STR:cmbbtxt  OUT:out  end              file_comments   Like WIDGET_COMBOBOX but here  their are 2 buttons   and   to move the widget from   1      categories   Compound widget       param PARENT  in required    The widget ID of the parent widget       keyword COLUMN   Buttons will be arranged in the number of columns   specified by this keyword        keyword ROW   Buttons will be arranged in the number of rows   specified by this keyword        keyword UVALUE   The user value to be associated with the widget        keyword UNAME   The user name to be associated with the widget        keyword VALUE        keyword _EXTRA   Used to pass your keywords      returns   The returned value of this function is the widget ID of the   newly created animation widget       restrictions         Widget Events Returned by Combobox Widgets       Pressing the mouse button while the mouse cursor is over an     element of a combobox widget causes the widget to change the label     on the combobox button and to generate an event  The appearance of     any previously selected element is restored to normal at the same     time  The event structure returned by the WIDGET_EVENT function is     defined by the following statement:         CW_COMBOBOX_PM  ID:0L  TOP:0L  HANDLER:0L  INDEX:0L  OUT:0         The first three fields are the standard fields found in every     widget event      INDEX returns the index of the selected item  This can be used to     index the array of names originally used to set the widget s     value     OUT:It is an integer which can take 3 values:          1 : If we press   when the index is already at the max         Comment: In this case  the index stay at the max          1: If we press   when the index is already at the min         Comment: In this case  the index stay at the min         0 : In other cases       Keywords to WIDGET_CONTROL       A number of keywords to the WIDGET_CONTROL procedure affect the     behavior of cw_slider_pm widget: GET_VALUE and SET_VALUE          1  GET_VALUE     widget_control wid_id get_value resultat     Send back  in the result variable  a structure of 3 elements whose      names are inspired by keywords we can pass at widget_control when     we use WIDGET_COMBOBOX:              COMBOBOX_NUMBER: the number of elements currently              contained in the specified combobox widget               COMBOBOX_SELECT: the zero based number of the              currently selected element  i e  the currently displayed              element  in the specified combobox widget               DYNAMIC_RESIZE: a True value  1  if the widget specified              by Widget_ID is a button  combobox  or label widget that              has had its DYNAMIC_RESIZE attribute set  Otherwise               False  0  is returned          2  SET_VALUE     widget_control wid_id set_value impose     Allows to modify the state of the combobox like we can do it for      WIDGET_COMBOBOX  May impose:          a  The contents of the list widget  string or string array          b  A structure which can have for elements  from 1 to 3 :               DYNAMIC_RESIZE:Set this keyword to activate  if set to 1               or deactivate  if set to 0  dynamic resizing of the              specified CW_COMBOBOX_PM widget  see the documentation              for the DYNAMIC_RESIZE keyword to WIDGET_COMBOBOX              procedure for more information about dynamic widget              resizing               COMBOBOX_SELECT:Set this keyword to return the zero based              number of the currently selected element  i e  the              currently displayed element  in the specified combobox              widget               VALUE: The contents of the list widget  string or string              array       examples   See the program provided above  testwid and the associated procedure  testwid_event       history   Sebastien Masson  smasson lodyc jussieu fr                         6 9 1999      version    Id: cw_combobox_pm pro 157 2006 08 21 09:01:50Z navarro             FUNCTION cw_combobox_pm  parent  VALUE   value  UVALUE   uvalue  UNAME   uname  ROW   row  COLUMN   column  _extra   ex     compile_opt idl2  strictarrsubs       IF  N_PARAMS  NE 1  THEN MESSAGE   Incorrect number of arguments     ON_ERROR  2                   return to caller   cheking for row and column keywords    row   keyword_set row 1 keyword_set column      column   keyword_set column 1 keyword_set row keyword_set column  EQ row      if NOT keyword_set uvalue  then uvalue        if NOT keyword_set uname  then uname          base   widget_base parent  space   0                           EVENT_FUNC    cw_combobox_pm_event                            FUNC_GET_VALUE cw_combobox_pm_get_value                            PRO_SET_VALUE cw_combobox_pm_set_value                            UVALUE   uvalue  UNAME   uname  _extra   ex          vallen   widget_info base  string_size    m     vallen   35    vallen 0 1 max strlen value     if keyword_set row  THEN BEGIN       nothing   widget_button base  value     uvalue    minus  xoffset   0                                  yoffset   5  xsize   15  ysize   15       nothing   widget_combobox base  VALUE   value  UVALUE    Combobox  UNAME    Combobox                                     xoffset   13  yoffset   0  xsize   vallen       nothing   widget_button base  value     uvalue    plus                                   xoffset   vallen 11  yoffset   5                                  xsize   15  ysize   15     ENDIF ELSE BEGIN       nothing   widget_combobox base  VALUE   value  UVALUE    Combobox  UNAME    Combobox                                     xoffset   0  yoffset   0  xsize   vallen       nothing   widget_button base  value     uvalue    minus                                   xoffset   vallen 2 15                                  yoffset   24  xsize   15  ysize   15       nothing   widget_button base  value     uvalue    plus                                   xoffset   vallen 2                                  yoffset   24  xsize   15  ysize   15     ENDELSE        widget_control base realize      return  base end"); 
    368 a[366] = new Array("./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_domain.html", "cw_domain.pro", "", "  IDL  testwid   PRO testwid_event  event     help   event   struct      Id   widget_info event top find_by_uname    c est lui       widget_control  event id  get_uvalue uval      if n_elements uval  EQ 0 then return      case uval of          done :widget_control  event top   destroy          set :BEGIN            widget_control  event id  get_value   value   value   value 0             nothing   execute boxzoom  value             widget_control  Id  set_value   boxzoom         END          get :BEGIN             widget_control  Id  get_value   value            print   value         END         ELSE:      endcase      return   end   PRO testwid  _extra   ex      base widget_base COLUMN       print   base  base      nothing   widget_label base  value    beginning of the test           nothing   cw_domain base _extra   ex  uname    c est lui  uvalue    c est lui       print   cw_domain ID   nothing          nothing   widget_label base  value    end of the test       nothing   widget_text base  value    40  100   10  10  uvalue    set   editable       nothing   widget_button base  value    get  uvalue    get       nothing   widget_button base  value    done  uvalue    done       widget_control  base   REALIZE      xmanager testwid  base      return   end            file_comments        categories   Compound widget       param ID        param VALUE   It is the default tick mark value  a floating point number       returns          uses          restrictions          examples          history          version     Id: cw_domain pro 172 2006 09 11 07:11:26Z smasson     pro cw_domain_set_value  id  value     compile_opt idl2  strictarrsubs    cm_4mesh      topid   findtopid id     widget_control  topid  get_uvalue   top_uvalue     make sure that we have the good grid stored in the cm_4mesh common parameters     currentfile   extractatt top_uvalue   currentfile     currentgrid    extractatt top_uvalue   meshparameters currentfile     change   changegrid currentgrid      What is the type of boxzoom      currentplot    extractatt top_uvalue   smallin 2 1    options   extractatt top_uvalue   options        flags   extractatt top_uvalue   optionsflag     flags   flags  currentplot     IF  flags where options EQ  Longitude   x index 0  EQ 0 THEN       xtype    geographic  ELSE xtype    index     IF  flags where options EQ  Latitude   y index 0  EQ 0 THEN       ytype    geographic  ELSE ytype    index      How to complete the boxzoom      IF xtype EQ   geographic  then begin       lonn1   lon1       lonn2   lon2       xtitle    lon     ENDIF ELSE BEGIN       lonn1   firstxt       lonn2   lastxt       xtitle    x ind     ENDELSE    IF ytype EQ   geographic  then begin       latt1   lat1       latt2   lat2       ytitle    lat     ENDIF ELSE BEGIN       latt1   firstyt       latt2   lastyt       ytitle    y ind     ENDELSE      vertf1   floor min gdepw 0  gdept 0     vertf2   ceil max gdepw 0  gdept 0       Case N_Elements Value  OF       0:boxzoom    lonn1  lonn2  latt1  latt2  vertf1  vertf2        1:BEGIN           if value EQ  1 then boxzoom    lonn1  lonn2  latt1  latt2  vertf1  vertf2             ELSE boxzoom lonn1  lonn2  latt1  latt2  0 value 0        END       2:boxzoom lonn1  lonn2  latt1  latt2  value 0 value 1        4:boxzoom Value        5:boxzoom Value 0:3  0  Value 4        6:boxzoom   Value       Else:BEGIN           rien   report Wrong Definition of Boxzoom        END    ENDCASE      boxzoom 0    floor boxzoom 0     boxzoom 1    ceil boxzoom 1     boxzoom 2    floor boxzoom 2     boxzoom 3    ceil boxzoom 3     if n_elements boxzoom GE 5  then begin       boxzoom 4    floor boxzoom 4        boxzoom 5    ceil boxzoom 5     endif        widget_control widget_info id find_by_uname    lon1  get_uvalue   uvalue    strict   uvalue strict     Longitudes     Possible min and max    if xtype EQ  geographic  then BEGIN       min   floor min glamt glamf  max   max        max   ceil max     ENDIF ELSE BEGIN        min   0       max   jpi 1    ENDELSE   widgets s id    lon1id   widget_info id find_by_uname    lon1     lon2id   widget_info id find_by_uname    lon2    Do we have to change the type of x axis: longitude index    lonbase   widget_info id find_by_uname    lonbase     widget_control  lonbase   get_uvalue   lonbase_uvalue    if lonbase_uvalue name NE xtype then BEGIN       widget_control  lonbase  update   0   We break everything       widget_control  lon1id   destroy       widget_control  lon2id   destroy   We reconstruct       lon1id   cw_slider_pm lonbase value min   boxzoom 0   boxzoom 0 keyword_set strict    boxzoom 1   boxzoom 0 keyword_set strict        widget_control  lonbase  set_uvalue    name:xtype        widget_control  lonbase  update   1    ENDIF ELSE BEGIN   The new value  they will have       cursorvalue1   min   boxzoom 0   boxzoom 0 strict    boxzoom 1   boxzoom 2   boxzoom 2 keyword_set strict    boxzoom 3   boxzoom 2 keyword_set strict        widget_control  latbase  set_uvalue    name:ytype        widget_control  latbase  update   1    ENDIF ELSE BEGIN       cursorvalue1   min   boxzoom 2   boxzoom 2 strict    boxzoom 3    indice2 1       if indice1 EQ indice2 then BEGIN       if  where gdep1 GE boxzoom 4  AND gdep2 LE boxzoom 5 0   EQ  1 then begin          indice1   0    indice1 dthlv1_uval grid_t EQ 1           indice2   indice1       endif       boxzoom 4    gdep1 indice1        boxzoom 5    boxzoom 4 1    endif   Now  values and indexes are proprely defined    So we can apply them    widget_control  dthlv1id  set_value    combobox_select:indice1     widget_control  dthlv2id  set_value    combobox_select:indice2    control mins and maxs of sliders     if indice1 EQ 0 then min1   0 ELSE min1   gdep2 indice1 1     max1    min1 1    gdep1 indice2     widget_control  depth1id  set_value    slider_min:min1  slider_max:max1  value:boxzoom 4     min2   gdep2 indice1     if indice2 EQ jpk 1 then BEGIN        max2   max gdept  gdepw        max2   strtrim string max2 format e8 0  1        max2   float 1 strmid max2  1 float max2     ENDIF ELSE max2   gdep1 indice2 1     widget_control  depth2id  set_value    slider_min:min2  slider_max:max2  value:boxzoom 5       return end        file_comments        categories   Compound widget       param ID        returns          uses          restrictions          examples          history          version     Id: cw_domain pro 172 2006 09 11 07:11:26Z smasson     FUNCTION cw_domain_get_value  id     compile_opt idl2  strictarrsubs      box   fltarr 6     possiblecase    lon1   lon2   lat1   lat2   depth1   depth2     for i   0  5 do begin       widget_control  widget_info id  find_by_uname   possiblecase i             get_value   value       box i    value value     ENDFOR    return  box end        file_comments        categories   Compound widget       param EVENT        returns          uses          restrictions          examples          history          version     Id: cw_domain pro 172 2006 09 11 07:11:26Z smasson     FUNCTION cw_domain_event  event     compile_opt idl2  strictarrsubs    common   help    struct  event    if  where tag_names event  EQ  OUT 0  NE  1 then if event out NE 0 then return    1    widget_control  event id  get_uvalue   uval    case uval name of        lon1 :widget_control widget_info event handler find_by_uname    lon2             set_value    slider_min:event value uval strict         lon2 :widget_control widget_info event handler find_by_uname    lon1             set_value    slider_max:event value uval strict         lat1 :widget_control widget_info event handler find_by_uname    lat2             set_value    slider_min:event value uval strict         lat2 :widget_control widget_info event handler find_by_uname    lat1             set_value    slider_max:event value uval strict         unzoom :BEGIN          id   widget_info event handler find_by_uname    lon1           widget_control  id  get_value   value          widget_control  id  set_value    slider_min:value slider_min_max 0           widget_control  id  set_value   value slider_min_max 0           id   widget_info event handler find_by_uname    lat1           widget_control  id  get_value   value          widget_control  id  set_value    slider_min:value slider_min_max 0           widget_control  id  set_value   value slider_min_max 0           id   widget_info event handler find_by_uname    lon2           widget_control  id  get_value   value          widget_control  id  set_value    slider_max:value slider_min_max 1           widget_control  id  set_value   value slider_min_max 1           id   widget_info event handler find_by_uname    lat2           widget_control  id  get_value   value          widget_control  id  set_value    slider_max:value slider_min_max 1           widget_control  id  set_value   value slider_min_max 1        END        dthlv1 :BEGIN   ids           depth1id   widget_info event handler find_by_uname    depth1           depth2id   widget_info event handler find_by_uname    depth2           dthlv2id   widget_info event handler find_by_uname    dthlv2    Do we have to change dthlv2            widget_control  event id  get_value   dthlv1_value          gdep1   fix dthlv1_value combobox_value           widget_control  dthlv2id  get_value   dthlv2_value          gdep2   fix dthlv2_value combobox_value           if dthlv2_value combobox_index LT event index then BEGIN   We redefine the dthlv2id s value             widget_control  dthlv2id  set_value    combobox_select:event index    So we redefine the value and the max of the slider 2             if event index EQ jpk 1 then BEGIN                 max   max gdept  gdepw                 max   strtrim string max format e8 0  1                 max   float 1 strmid max  1 float max              ENDIF ELSE max   gdep2 event index 1 1             widget_control  depth2id                  set_value    slider_max:max  value:gdep2 event index    So we redefine the max of the slider 1             widget_control  depth1id  set_value    slider_max:gdep1 event index           END    We redefine the value and the min of the slider depth1           if event index EQ 0 then min   0 ELSE min   gdep1 event index 1 1          widget_control  depth1id  set_value    slider_min:min  value:gdep1 event index    S we change the value of the min of the slider depth 2          widget_control  depth2id  set_value    slider_min:gdep1 event index 1        END        dthlv2 :BEGIN   ids           depth1id   widget_info event handler find_by_uname    depth1           depth2id   widget_info event handler find_by_uname    depth2           dthlv1id   widget_info event handler find_by_uname    dthlv1    Do we have to change dthlv1            widget_control  dthlv1id  get_value   dthlv1_value          gdep1   fix dthlv1_value combobox_value           widget_control  event id  get_value   dthlv2_value          gdep2   fix dthlv2_value combobox_value           if dthlv1_value combobox_index GT event index then BEGIN   We redfine the value of dthlv1id             widget_control  dthlv1id  set_value    combobox_select:event index    So we redefine the value and the min of the slider 1             if event index EQ 0 then min   0 ELSE min   gdep2 event index 1              widget_control  depth1id                  set_value    slider_min:min  value:gdep1 event index    Se we redefine the min of the slider 2             widget_control  depth2id  set_value    slider_min:gdep2 event index           END    We redefine the value and the max of the slider depth 2          if event index EQ jpk 1 then BEGIN              max   max gdept  gdepw              max   strtrim string max format e8 0  1              max   float 1 strmid max  1 float max           ENDIF ELSE max   gdep2 event index 1 1          widget_control  depth2id  set_value    slider_max:max  value:gdep2 event index    So we change the value of the max of the slider depth 1          widget_control  depth1id  set_value    slider_max:gdep2 event index 1        END        depth1 :BEGIN   ids           depth2id   widget_info event handler find_by_uname    depth2           dthlv1id   widget_info event handler find_by_uname    dthlv1    Do we have to change dthlv1            widget_control  dthlv1id  get_value   dthlv1_value          gdep1   fix dthlv1_value combobox_value           rien   where gdep1 LT event value  indice           indice   indice   indice 1           if indice NE dthlv2_value combobox_index then begin   We change the min of depth1             widget_control  depth1id  set_value    slider_max:gdep2 indice 1    We redefine the value of dthlv2id             widget_control  dthlv2id  set_value    combobox_select:indice    So we redefine the min of the slider 2             if indice EQ jpk 1 then BEGIN                 max   max gdept  gdepw                 max   strtrim string max format e8 0  1                 max   float 1 strmid max  1 float max              ENDIF ELSE max   gdep2 indice 1 1             widget_control  event id  set_value    slider_max:max           endif       END       ELSE:    ENDCASE      slidesliceid   widget_info event top  find_by_uname    slide_slice       if slidesliceid NE 0 then widget_control  slidesliceid  set_value   1    return ID:event handler  TOP:event top  HANDLER:0L                BOX:cw_domain_get_value event handler  end        file_comments        categories   Compound widget       param PARENT  in required    The widget ID of the parent widget        keyword UVALUE   The user value to be associated with the widget        keyword UNAME   The user name to be associated with the widget        keyword STRICT        keyword UNZOOM        keyword BOXZOOM   Vector indicating the geographic zone on which we want to cut the map     If BOXZOOM has :      1 element : The extraction is made on  lon1  lon2  lat1  lat2  0 boxzoom 0      2 elements: The extraction is made on  lon1  lon2  lat1  lat2  boxzoom 0 boxzoom 1      4 elements: The extraction is made on  Boxzoom  0  max gdept  gdepw      5 elements: The extraction is made on  Boxzoom 0:3  0  Boxzoom 4      6 elements: The extraction is made on Boxzoom    Where lon1  lon2 lat1 lat2 are global variables defined at the last domdef       keyword _EXTRA   Used to pass your keywords       returns          uses          restrictions          examples          history          version     Id: cw_domain pro 172 2006 09 11 07:11:26Z smasson        todo   seb: Documenter      FUNCTION cw_domain  parent  BOXZOOM   boxzoom  STRICT   strict  UVALUE   uvalue  UNAME   uname  UNZOOM   unzoom  _extra   ex       compile_opt idl2  strictarrsubs    cm_4mesh  cm_4data     Definition of the boxzoom   Case N_Elements Boxzoom  OF     0:boxzoom    lon1  lon2  lat1  lat2                      min gdepw 0  gdept 0  max gdepw 0  gdept 0        1:boxzoom    lon1  lon2  lat1  lat2  0  boxzoom 0      2:boxzoom    lon1  lon2  lat1  lat2  boxzoom 0  boxzoom 1      4:boxzoom    Boxzoom  vert1  vert2      5:boxzoom    Boxzoom 0:3  0  Boxzoom 4      6:     Else: return  report Mauvaise Definition de Boxzoom    ENDCASE   IF total Boxzoom  EQ 0 THEN        boxzoom    lon1  lon2  lat1  lat2  min gdepw 0  gdept 0  max gdepw 0  gdept 0      boxzoom 0    floor boxzoom 0    boxzoom 1    ceil boxzoom 1    boxzoom 2    floor boxzoom 2    boxzoom 3    ceil boxzoom 3    boxzoom 4    floor boxzoom 4    boxzoom 5    ceil boxzoom 5      if NOT keyword_set uvalue  then uvalue       if NOT keyword_set uname  then uname       base   widget_base parent  row   2  space   0                          EVENT_FUNC    cw_domain_event                           FUNC_GET_VALUE    cw_domain_get_value                           PRO_SET_VALUE    cw_domain_set_value                           UVALUE   uvalue  UNAME   uname  _extra   ex         baseh   widget_base base  column   1 keyword_set unzoom  space   0      baseh1   widget_base baseh  row   2  space   0   longitude    min   floor min glamt  glamf  max   max    max   ceil max    IF max min GT 360 AND keyword_set key_periodic  THEN max   min 360   lonbase   widget_base baseh1  column   2  space   0  uname    lonbase  uvalue    name: geographic    lon1id   cw_slider_pm lonbase  value   min   boxzoom 0   boxzoom 0 keyword_set strict    boxzoom 1   boxzoom 0 keyword_set strict   latitude    min   floor min gphit  gphif  max   max    max   ceil max    latbase   widget_base baseh1  column   2  space   0  uname    latbase  uvalue    name: geographic    lat1id   cw_slider_pm latbase  value   min   boxzoom 2   boxzoom 2 keyword_set strict    boxzoom 3   boxzoom 2 keyword_set strict   unzoom    if keyword_set unzoom  then rien   widget_button baseh  value    unzoom  uvalue    name: unzoom  xsize   60  ysize   110   depth    basez   widget_base base  column   3  space   0   base_align_center      basezdrp   widget_base basez  row   2  space   0      if strupcase vargrid  EQ  W  then gdep   gdepw ELSE gdep   gdept   gdep1   floor gdep    gdep2   ceil gdep      same   where gdep2 gdep1 EQ 0      if same 0  NE  1 then gdep2 same    gdep2 same   1   sgdep1   strtrim gdep1  1    sgdep2   strtrim gdep2  1      dephtid   cw_combobox_pm basezdrp  value    sgdep1  uvalue    name: dthlv1  grid_t:strupcase vargrid  NE  W  uname    dthlv1    rien   where gdep1 LT boxzoom 4  indice1    indice1   indice1   indice2 1    widget_control  dephtid  set_value    combobox_select:indice2          basedepthslid   widget_base base  column   2  space   0    strminlen   max strlen strtrim round gdept  gdepw  1      if indice1 EQ 0 then min1   0 ELSE min1   gdep2 indice1 1    max1    min1 1    gdep1 indice2    rien   cw_slider_pm basez  value   min1   boxzoom 4   boxzoom 4    boxzoom 5    max2                           uvalue    name: depth2  minimum   min2  maximum    max2                           uname    depth2  title    z2  strminlen   strminlen        return  base end"); 
    369 a[367] = new Array("./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_droplist_pm.html", "cw_droplist_pm.pro", "", "  PRO testwid_event  event       help  event   STRUCT      DroplistId   widget_info event top find_by_uname    c est lui       widget_control  event id  get_uvalue uval      if n_elements uval  EQ 0 then return      case uval of          done :widget_control  event top   destroy          dynamic_resize :BEGIN             widget_control  event id  get_value   value            widget_control  DroplistId  set_value    dynamic_resize:value          END          droplist_select :BEGIN             widget_control  event id  get_value   value            widget_control  DroplistId  set_value    droplist_select:value          END          value :BEGIN             widget_control  event id  get_value   value            widget_control  DroplistId  set_value   value         END          get :BEGIN             widget_control  DroplistId  get_value   value            help   value   struct         END         ELSE:      endcase      return   end   PRO testwid  _extra   ex      base widget_base COLUMN    print   base  base      nothing   widget_label base  value    beginning of the test           nothing   cw_droplist_pm base  _extra   ex  uname    c est lui  uvalue    c est lui    print   cw_droplist_pm ID   nothing          nothing   widget_label base  value    end of the test       nothing   widget_text base  value    0  uvalue    dynamic_resize   editable       nothing   widget_text base  value    10  uvalue    droplist_select   editable       nothing   widget_text base  value    5  uvalue    value   editable       nothing   widget_button base  value    get  uvalue    get       nothing   widget_button base  value    done  uvalue    done       widget_control  base   REALIZE      xmanager testwid  base      return   end             file_comments        categories   Compound widget       param ID        param VALUE   It is the default tick mark value  a floating point number       returns          uses          restrictions          examples          history          version     Id: cw_droplist_pm pro 157 2006 08 21 09:01:50Z navarro     PRO cw_droplist_pm_set_value  id  value     compile_opt idl2  strictarrsubs      DroplistId   widget_info id find_by_uname    Droplist     if size value   type  eq 8 then BEGIN   this is a structure       tagnames   tag_names value        for tag   0  n_tags value 1 do begin          case strtrim strlowcase tagnames tag  2  of              dynamic_resize :widget_control  DroplistId  dynamic_resize   value dynamic_resize              droplist_select :widget_control  DroplistId  set_droplist_select   value droplist_select              value :widget_control  DroplistId  set_value   value value             ELSE:ras   report mauvais nom de l argument de la structure ds cw_droplist_pm_set_value           endcase       endfor    ENDIF ELSE widget_control  DroplistId  set_value   value    return end        file_comments   Compound widget      categories   Compound widget       param ID      returns          uses          restrictions          examples          history          version     Id: cw_droplist_pm pro 157 2006 08 21 09:01:50Z navarro     FUNCTION cw_droplist_pm_get_value  id     compile_opt idl2  strictarrsubs      DroplistId   widget_info id find_by_uname    Droplist     return   droplist_number:widget_info DroplistId   droplist_number                  droplist_select:widget_info DroplistId   droplist_select                  dynamic_resize:widget_info DroplistId   dynamic_resize  end        file_comments   Compound widget      categories   Compound widget       param EVENT        returns          uses          restrictions          examples          history          version     Id: cw_droplist_pm pro 157 2006 08 21 09:01:50Z navarro     FUNCTION cw_droplist_pm_event  event     compile_opt idl2  strictarrsubs      widget_control  event id  get_uvalue uval      if uval EQ  Droplist  then       return   CW_DROPLIST_PM  ID:event handler  TOP:event top  HANDLER:0L                  INDEX:event index  OUT:0       DroplistId   widget_info event handler find_by_uname    Droplist     index   widget_info DroplistId   droplist_select     case uval OF        plus :BEGIN          indexmax   widget_info DroplistId   droplist_number 1          if index NE indexmax then widget_control  DroplistId set_droplist_select   index 1          return   CW_DROPLIST_PM  ID:event handler  TOP:event top  HANDLER:0L                       INDEX: index 1    index 1  OUT: long index EQ 0        END    endcase end                file_comments   Like WIDGET_DROPLIST but here  their are 2 buttons   and   to move the widget from   1      categories   Compound widget       param PARENT  in required    The widget ID of the parent widget       keyword COLUMN   Buttons will be arranged in the number of columns   specified by this keyword        keyword ROW   Buttons will be arranged in the number of rows   specified by this keyword        keyword UVALUE   The user value to be associated with the widget        keyword UNAME   The user name to be associated with the widget        keyword _EXTRA   Used to pass your keywords      returns   The returned value of this function is the widget ID of the   newly created animation widget       restrictions         Widget Events Returned by Droplist Widgets       Pressing the mouse button while the mouse cursor is over an     element of a droplist widget causes the widget to change the label     on the droplist button and to generate an event  The appearance of     any previously selected element is restored to normal at the same     time  The event structure returned by the WIDGET_EVENT function is     defined by the following statement:         CW_DROPLIST_PM  ID:0L  TOP:0L  HANDLER:0L  INDEX:0L  OUT:0         The first three fields are the standard fields found in every     widget event      INDEX returns the index of the selected item  This can be used to     index the array of names originally used to set the widget s     value     OUT:It is an integer which can take 3 values:          1 : If we press   when the index is already at the max         Comment: In this case  the index stay at the max          1: If we press   when the index is already at the min         Comment: In this case  the index stay at the min         0 : In other cases       Keywords to WIDGET_CONTROL       A number of keywords to the WIDGET_CONTROL procedure affect the     behavior of cw_slider_pm widget: GET_VALUE and SET_VALUE          1  GET_VALUE     widget_control wid_id get_value resultat     Send back  in the result variable  a structure of 3 elements whose      names are inspired by keywords we can pass at widget_control when     we use WIDGET_COMBOBOX:              DROPLIST_NUMBER: the number of elements currently              contained in the specified droplist widget               DROPLIST_SELECT: the zero based number of the              currently selected element  i e  the currently displayed              element  in the specified droplist widget               DYNAMIC_RESIZE: a True value  1  if the widget specified              by Widget_ID is a button  droplist  or label widget that              has had its DYNAMIC_RESIZE attribute set  Otherwise               False  0  is returned          2  SET_VALUE     widget_control wid_id set_value impose     permet de modifier l etat de la droplist comme on peut le faire     pour WIDGET_DROPLIST Impose peut etre:         a  The contents of the list widget  string or string array          b  A structure which can have for elements  from 1 to 3 :               DYNAMIC_RESIZE:Set this keyword to activate  if set to 1               or deactivate  if set to 0  dynamic resizing of the              specified CW_DROPLIST_PM widget  see the documentation              for the DYNAMIC_RESIZE keyword to WIDGET_DROPLIST              procedure for more information about dynamic widget              resizing               DROPLIST_SELECT:Set this keyword to return the zero based              number of the currently selected element  i e  the              currently displayed element  in the specified droplist              widget               VALUE: The contents of the list widget  string or string              array       examples   See the program provided above  testwid and the associated procedure  testwid_event       history   Sebastien Masson  smasson lodyc jussieu fr                         6 9 1999      version    Id: cw_droplist_pm pro 157 2006 08 21 09:01:50Z navarro             FUNCTION cw_droplist_pm  parent UVALUE   uvalue  UNAME   uname  ROW   row  COLUMN   column  _extra   ex     compile_opt idl2  strictarrsubs       IF  N_PARAMS  NE 1  THEN MESSAGE   Incorrect number of arguments     ON_ERROR  2                   return to caller   cheking for row and column keywords    row   keyword_set row 1 keyword_set column      column   keyword_set column 1 keyword_set row keyword_set column  EQ row      if NOT keyword_set uvalue  then uvalue        if NOT keyword_set uname  then uname          base   widget_base parent  space   1  xpad   1  ypad   1  ROW   row  COLUMN   column                            EVENT_FUNC    cw_droplist_pm_event                            FUNC_GET_VALUE cw_droplist_pm_get_value                            PRO_SET_VALUE cw_droplist_pm_set_value                            UVALUE   uvalue  UNAME   uname  _extra   ex          if keyword_set row  THEN nothing   widget_button base value    uvalue   minus     nothing   widget_droplist base  UVALUE    Droplist  UNAME    Droplist  _extra   ex     if keyword_set column  then begin       base1   widget_base base   row   align_center  space   1  xpad   1  ypad   1        nothing   widget_button base1 value    uvalue   minus  xsize   20  ysize   20        nothing   widget_button base1 value    uvalue   plus  xsize   20  ysize   20     ENDIF ELSE nothing   widget_button base value    uvalue   plus        widget_control base realize      return  base end"); 
    370 a[368] = new Array("./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_pagelayout.html", "cw_pagelayout.pro", "", "       file_comments        categories   Compound widget       param EVENT        returns          uses          restrictions          examples          history          version     Id: cw_pagelayout pro 157 2006 08 21 09:01:50Z navarro       FUNCTION cw_pagelayout_event  event     compile_opt idl2  strictarrsubs       widget_control  event id  get_uvalue uval    widget_control  event top  get_uvalue top_uvalue      smallin   extractatt top_uvalue   smallin     numdessinin   smallin 2 1    smallout   extractatt top_uvalue   smallout       if uval name EQ  undo  then begin       return ID:event handler  TOP:event top  HANDLER:0L     ENDIF ELSE BEGIN     common   If we do not change the number of columns  we send       if uval name EQ  column  then          if event index 1 EQ smallin 0  THEN          return ID:event handler  TOP:event top  HANDLER:0L    If we do not change the number of lines  we send       if uval name EQ  row  then          if event index 1 EQ smallin 1  THEN          return ID:event handler  TOP:event top  HANDLER:0L      We erase the page        graphid   widget_info event top find_by_uname    graph        graphid   extractatt top_uvalue   graphid        widget_control graphid get_value win       wset  win       erase  255       case uval name of           clear :           column :BEGIN              smallin    event index 1  smallin 1  1              smallout    event index 1  smallout 1  1           END           row :BEGIN             smallin    smallin 0  event index 1  1              smallout    smallout 0  event index 1  1           END       endcase       nbredessin   smallin 0 smallin 1               We put all back to 0 for postscripts       createhistory  event top  smallin                  options   extractatt top_uvalue   options           flags   extractatt top_uvalue   optionsflag        flag   flags  numdessinin               update and reset all values of the top_uvalue           top_uvalue 1  findline top_uvalue   smallin    smallin        top_uvalue 1  findline top_uvalue   smallout    smallout          top_uvalue 1  findline top_uvalue   penvs    replicate p  nbredessin         top_uvalue 1  findline top_uvalue   xenvs    replicate x  nbredessin         top_uvalue 1  findline top_uvalue   yenvs    replicate y  nbredessin           top_uvalue 1  findline top_uvalue   nameprocedures    strarr nbredessin         top_uvalue 1  findline top_uvalue   types    strarr nbredessin         top_uvalue 1  findline top_uvalue   varinfo    strarr 2  nbredessin         top_uvalue 1  findline top_uvalue   domaines    fltarr 6  nbredessin         top_uvalue 1  findline top_uvalue   dates    lonarr 2  nbredessin         top_uvalue 1  findline top_uvalue   txtcmd    strarr nbredessin         top_uvalue 1  findline top_uvalue   optionsflag    flag replicate 1  nbredessin          ptr_free  extractatt top_uvalue   exextra         top_uvalue 1  findline top_uvalue   exextra    ptrarr nbredessin   allocate_heap          top_uvalue 1  findline top_uvalue            ENDELSE      return ID:event handler  TOP:event top  HANDLER:0L  end        file_comments        categories   Compound widget       param PARENT  in required    The widget ID of the parent widget       param SMALL         keyword COLUMN   Buttons will be arranged in the number of columns   specified by this keyword        keyword ROW   Buttons will be arranged in the number of rows   specified by this keyword        keyword UVALUE   The user value to be associated with the widget        keyword UNAME   The user name to be associated with the widget       keyword _EXTRA   Used to pass your keywords      keyword UNZOOM          returns          uses          restrictions          examples          history          version    Id: cw_pagelayout pro 157 2006 08 21 09:01:50Z navarro          todo    seb: documenter      FUNCTION cw_pagelayout  parent  small  UVALUE   uvalue  UNAME   uname  UNZOOM   unzoom  COLUMN   column  ROW   row  _extra   ex       compile_opt idl2  strictarrsubs     row   keyword_set row 1 keyword_set column      if NOT keyword_set uvalue  then uvalue       if NOT keyword_set uname  then uname       base   widget_base parent                          EVENT_FUNC    cw_pagelayout_event                           FUNC_GET_VALUE    cw_pagelayout_get_value                           PRO_SET_VALUE    cw_pagelayout_set_value                           UVALUE   uvalue  UNAME   uname  space   0  _extra   ex         IF n_elements small  eq 0 then small    1  1  1      dummy   widget_label base  value    cln  yoffset   3    id   widget_combobox base  value   strtrim indgen 9 1  1  uvalue    name: column                             uname    column  xoffset   20  xsize   40    widget_control  id  set_combobox_select   small 0 1     IF keyword_set row  THEN BEGIN      xoff   60     yoff   0   ENDIF ELSE BEGIN      xoff   0     yoff   20   ENDELSE    dummy   widget_label base  value    row  xoffset   xoff  yoffset   yoff 3    id   widget_combobox base  value   strtrim indgen 9 1  1  uvalue    name: row                             uname    row  xoffset   xoff 20  xsize   40  yoffset   yoff    widget_control  id  set_combobox_select   small 1 1       return  base end  "); 
    371 a[369] = new Array("./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_slide_slice.html", "cw_slide_slice.pro", "", "     file_comments        categories   Compound widget       param ID        param VALUE   It is the default tick mark value  a floating point number       returns          uses          restrictions          examples          history          version     Id: cw_slide_slice pro 157 2006 08 21 09:01:50Z navarro     pro cw_slide_slice_set_value  id  value     compile_opt idl2  strictarrsubs    common    topid   findtopid id     domainid   widget_info topid  find_by_uname    domain     widget_control  domainid  get_value   boxzoom    if boxzoom 1 boxzoom 0  LT boxzoom 3 boxzoom 2  then type    y  ELSE type    x     thickid    widget_info topid  find_by_uname    thickness     widget_control  thickid  get_uvalue   thicknessuval    widget_control  thickid  get_value   thickness    thickness   thicknessuval choix thickness droplist_select     sliderid   widget_info topid  find_by_uname    slider     if type EQ  y  then BEGIN       mini   floor min glamt  glamf  max   maxi        maxi   ceil maxi thickness       widget_control  sliderid  set_value    slider_min:mini  slider_max:maxi  value:boxzoom 0  maxi                               value   mini   boxzoom 0   maxi                               value   mini   boxzoom 2    maxi   column  uname    slider                                uvalue    name: slider     ENDELSE    index   where thicknessval EQ thickness    index   index 0     if index EQ  1 then BEGIN        index   20       thicknessval 20    strtrim thickness  1        widget_control  droplistid  set_value   thicknessval       widget_control  droplistid  set_uvalue  name: thickness  choix:thicknessval     endif    widget_control  droplistid  set_value    droplist_select:index          if type EQ  xt  then begin         mini   floor min glamt glamf  max   maxi          maxi   ceil maxi       ENDIF ELSE BEGIN          mini   floor min gphit gphif  max   maxi          maxi   ceil maxi       ENDELSE          return  base end"); 
    372 a[370] = new Array("./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_slider_pm.html", "cw_slider_pm.pro", "", "  PRO testwid_event  event       help  event   STRUCT      SliderBarId   widget_info event top find_by_uname    c est lui       widget_control  event id  get_uvalue uval      if n_elements uval  EQ 0 then return      case uval of          done :widget_control  event top   destroy          slider_min :BEGIN             widget_control  event id  get_value   value            widget_control  SliderBarId  set_value    slider_min:value          END          slider_max :BEGIN             widget_control  event id  get_value   value            widget_control  SliderBarId  set_value    slider_max:value          END          slider_value :BEGIN             widget_control  event id  get_value   value            widget_control  SliderBarId  set_value   value         END          get :BEGIN             widget_control  SliderBarId  get_value   value            help   value   struct            print  value slider_min_max         END         ELSE:      endcase      return   end   PRO testwid  _extra   ex      base widget_base COLUMN    print   base  base      nothing   widget_label base  value    beginning of the test           nothing   cw_slider_pm base  _extra   ex  uname    c est lui  uvalue    c est lui    print   cw_slider_pm ID   nothing          nothing   widget_label base  value    end of the test       nothing   widget_text base  value    0  uvalue    slider_min   editable       nothing   widget_text base  value    10  uvalue    slider_max   editable       nothing   widget_text base  value    5  uvalue    slider_value   editable       nothing   widget_button base  value    get  uvalue    get       nothing   widget_button base  value    done  uvalue    done       widget_control  base   REALIZE      xmanager testwid  base      return   end        file_comments        categories   Compound widget      param VALUE   It is the default tick mark value  a floating point number       returns          uses          restrictions          examples          history          version     Id: cw_slider_pm pro 163 2006 08 29 12:59:46Z navarro     FUNCTION decvalue  value     compile_opt idl2  strictarrsubs     a   float value 0    return  strtrim string floor a    0 1 indgen 10  format    f15 1  2  end        file_comments        categories   Compound widget      param VALUE   It is the default tick mark value  a floating point number       returns          uses          restrictions          examples          history          version     Id: cw_slider_pm pro 163 2006 08 29 12:59:46Z navarro     FUNCTION decind  value     compile_opt idl2  strictarrsubs     a   float value 0    return  round 10 a   floor a      computation accuracy end        file_comments        categories   Compound widget       param ID        param VALUE   It is the default tick mark value  a floating point number       returns          uses          restrictions          examples          history          version     Id: cw_slider_pm pro 163 2006 08 29 12:59:46Z navarro     PRO cw_slider_pm_set_value  id  value     compile_opt idl2  strictarrsubs     sbid   widget_info id  find_by_uname    SliderBar    dcid   widget_info id  find_by_uname    decimal    minmax   widget_info sbid   SLIDER_MIN_MAX    if size value   type  eq 8 then BEGIN   this is a structure     tagnames   tag_names value      for tag   0  n_tags value 1 do begin       case strtrim strlowcase tagnames tag  2  of          slider_min :BEGIN            IF float value slider_min 0  LT minmax 1  THEN BEGIN              minmax 0    value slider_min 0              widget_control  sbid  set_slider_min   floor float value slider_min 0              valuedc   float widget_info dcid   combobox_gettext              IF valuedc LT value slider_min THEN BEGIN               widget_control  sbid  set_value   floor float value slider_min 0                widget_control  dcid  set_value   decvalue value slider_min                widget_control  dcid  set_combobox_select   decind value slider_min              ENDIF             ENDIF          end          slider_max :BEGIN            IF float value slider_max 0  GT minmax 0  THEN BEGIN              minmax 1    value slider_max 0              widget_control  sbid  set_slider_max   ceil float value slider_max 0              valuedc   float widget_info dcid   combobox_gettext              IF valuedc GT value slider_max THEN BEGIN               widget_control  sbid  set_value   ceil float value slider_max 0                widget_control  dcid  set_value   decvalue value slider_max                widget_control  dcid  set_combobox_select   decind value slider_max              ENDIF             ENDIF          end          value :IF float value value 0  GE minmax 0              AND float value value 0  LE minmax 1  THEN value2   float value value 0          ELSE:ras   report wrong tag name in argument  value  of cw_slider_pm_set_value        endcase     endfor   ENDIF ELSE BEGIN      IF float value 0  GE minmax 0          AND float value 0  LE minmax 1  THEN value2   float value 0    ENDELSE   IF n_elements value2  NE 0 THEN BEGIN      widget_control  sbid  set_value   fix value2      widget_control  dcid  set_value   decvalue value2      widget_control  dcid  set_combobox_select   decind value2    ENDIF    return end        file_comments        categories   Compound widget        param ID        returns          uses          restrictions          examples          history          version     Id: cw_slider_pm pro 163 2006 08 29 12:59:46Z navarro     FUNCTION cw_slider_pm_get_value  id     compile_opt idl2  strictarrsubs     sbid   widget_info id  find_by_uname    SliderBar    dcid   widget_info id  find_by_uname    decimal    minmax   widget_info sbid   SLIDER_MIN_MAX    value   float widget_info dcid   combobox_gettext     return   value:value  slider_min_max:minmax  end        file_comments        categories   Compound widget       param EVENT         returns          uses          restrictions          examples          history          version     Id: cw_slider_pm pro 163 2006 08 29 12:59:46Z navarro     FUNCTION cw_slider_pm_event  event     compile_opt idl2  strictarrsubs     widget_control  event id  get_uvalue   uval     sbid   widget_info event handler  find_by_uname    SliderBar    dcid   widget_info event handler  find_by_uname    decimal    minmax   widget_info sbid   SLIDER_MIN_MAX    IF uval EQ  decimal  THEN value   float event str      ELSE value   float widget_info dcid   combobox_gettext    out   0   defaut case   case uval OF      plus : if  value   1  LE minmax 1  then value2   value   1 ELSE out   1      minus :if  value   1  GE minmax 0  then value2   value   1 ELSE out    1      SliderBar :if  event value   value   floor value  LE minmax 1  THEN value2   event value   value   floor value       decimal :BEGIN        CASE 1 OF         value GT minmax 1 : value2   minmax 1          value LT minmax 0 : value2   minmax 0          ELSE:       ENDCASE     END     ELSE:   ENDCASE   IF n_elements value2  NE 0  THEN BEGIN     value   value2     widget_control  sbid  set_value   floor value      widget_control  dcid  set_value   decvalue value      widget_control  dcid  set_combobox_select   decind value    ENDIF   return   CW_SLIDER_PM  ID:event handler  TOP:event top  HANDLER:0L                VALUE:value  OUT:OUT  end                file_comments   Like WIDGET_SLIDER but here  their are 2 buttons   and   to move the widget from   1      categories   Compound widget       param PARENT  in required    The widget ID of the parent widget       keyword UVALUE   The user value to be associated with the widget        keyword UNAME   The user name to be associated with the widget        keyword VALUE        keyword MAXIMUM          keyword MINIMUM         keyword STRMINLEN        keyword _EXTRA   Used to pass your keywords      returns   The returned value of this function is the widget ID of the   newly created animation widget       restrictions      Widget Events Returned by the CW_SLIDER_PM Widget      Slider widgets generate events when the mouse is used to change    their value  The event structure returned by the WIDGET_EVENT    function is defined by the following statement:       CW_SLIDER_PM  ID:0L  TOP:0L  HANDLER:0L  VALUE:0L  DRAG:0  OUT:0       ID is the widget ID of the button generating the event  TOP is the    widget ID of the top level widget containing ID     HANDLER contains the widget ID of the widget associated with the    handler routine     VALUE returns the new value of the slider     DRAG returns integer 1 if the slider event was generated as part of    a drag operation  or zero if the event was generated when the user    had finished positioning the slider  Note that the slider widget    only generates events during the drag operation if the DRAG keyword    is set  and if the application is running under Motif  When the    DRAG keyword is set  the DRAG field can be used to avoid    computationally expensive operations until the user releases the    slider     OUT:It is an integer which can take 3 values:          1 : If we press   when the index is already at the max         Comment: In this case  the index stay at the max          1: If we press   when the index is already at the min         Comment: In this case  the index stay at the min         0 : In other cases       Keywords to WIDGET_CONTROL       A number of keywords to the WIDGET_CONTROL procedure affect the     behavior of cw_slider_pm widget: GET_VALUE and SET_VALUE          1  GET_VALUE     widget_control wid_id get_value resultat     Send back in the result variable a structure of 2 elements whose name      are inspired from keywords we can pass at      widget_control when we use WIDGET_SLIDER:              VALUE:the value setting of the widget              SLIDER_MIN_MAX: a 2 elements array: The minimum and the              maximum value of the range encompassed by the slider         2  SET_VALUE     widget_control wid_id set_value impose     Allows to modify the state of the combobox like we can do it for      WIDGET_COMBOBOX  May impose:           a  a integer: give the new position of the slider          b  A structure which can have for elements  from 1 to 3 :               VALUE: an integer which give the new position of the slider              SLIDER_MIN:Set to a new minimum value for the specified              slider widget               SLIDER_MAX:Set to a new minimum value for the specified              slider widget         examples   See the program provided above  testwid and the associated procedure  testwid_event       history   Sebastien Masson  smasson lodyc jussieu fr                         5 9 1999      version    Id: cw_slider_pm pro 163 2006 08 29 12:59:46Z navarro        todo   seb: documenter           FUNCTION cw_slider_pm  parent  MAXIMUM   maximum  MINIMUM   minimum                            STRMINLEN   strminlen  VALUE   value  UVALUE   uvalue                            UNAME   uname  title   title  _extra   ex     compile_opt idl2  strictarrsubs      IF  N_PARAMS  NE 1  THEN MESSAGE   Incorrect number of arguments    ON_ERROR  2                    return to caller     if n_elements minimum  NE 0 then minimum   floor minimum  ELSE minimum   0   if n_elements maximum  NE 0 then maximum   ceil maximum  ELSE maximum   100   if NOT keyword_set title  then title              cheking exclusive keywords   column    keyword_set column 1 keyword_set row keyword_set vertical   xsize   lenstr   max strlen strtrim minimum  maximum  1    if keyword_set strminlen  then lenstr   strminlen   lenstr    xsize   35   mlen lenstr 1 3 lenstr lt 4    xsize   35   mlen lenstr 2    dummyid   widget_combobox base  value   decvalue minimum                                  UVALUE    decimal  UNAME    decimal                                  xoffset   xoff  yoffset   2  xsize   xsize     dummyid   widget_slider base  MAXIMUM   maximum  MINIMUM   minimum  UVALUE    SliderBar                                UNAME    SliderBar   suppress_value   drag                               yoffset   30  xsize   xoff   xsize      if keyword_set value  then cw_slider_pm_set_value  base  value     return  base end"); 
    373 a[371] = new Array("./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_specifie.html", "cw_specifie.pro", "", "       file_comments        categories   Compound widget       param ID        param VALUE   It is the default tick mark value  a floating point number       returns          uses          restrictions          examples          history          version     Id: cw_specifie pro 157 2006 08 21 09:01:50Z navarro       PRO cw_specifie_set_value  id  value     compile_opt idl2  strictarrsubs    cm_general    if size value   type  NE 8 then return    widget_control  widget_info id find_by_uname min  set_value   strtrim value min  2     widget_control  widget_info id find_by_uname max  set_value   strtrim value max  2     widget_control  widget_info id find_by_uname int  set_value   strtrim value inter  2     widget_control  widget_info id find_by_uname palnum  set_value   strtrim value lct  2     autres   extractstru value   min   max   inter   lct   nothing   xindex   yindex     if size autres   type  EQ 8 then BEGIN        autresid   widget_info id find_by_uname autres        widget_control  widget_info id  find_by_uname    autres  get_value   autresautres       autresautres   autresautres 0        if strtrim autresautres  2  NE   then begin         autresautres   createfunc get_extra    autresautres                                           filename   myuniquetmpdir  for_createfunc pro          autres   mixstru autres  autresautres        endif       autres   strkeywd autres        widget_control  widget_info id find_by_uname autres  set_value   autres    endif    return end        file_comments        categories   Compound widget       param ID        returns          uses          restrictions          examples          history          version     Id: cw_specifie pro 157 2006 08 21 09:01:50Z navarro       FUNCTION cw_specifie_get_value  id     compile_opt idl2  strictarrsubs    cm_general    widget_control  widget_info id find_by_uname min  get_value   min    min   float min 0     widget_control  widget_info id find_by_uname max  get_value   max    max   float max 0     widget_control  widget_info id find_by_uname int  get_value   int    int   float int 0     widget_control  widget_info id find_by_uname palnum  get_value   palnum    palnum   long palnum 0     widget_control  widget_info id find_by_uname autres  get_value   autres    autres   autres 0       exextra    min:min  max:max  inter:int  lct:palnum     if strtrim autres  2  NE   then         exextra   createfunc get_extra autres  _extra   exextra                                 kwdlist    exextra   exextra  exextra   exextra                                filename   myuniquetmpdir  for_createfunc pro       return  exextra end        file_comments        categories   Compound widget       param EVENT        returns          uses          restrictions          examples          history          version     Id: cw_specifie pro 157 2006 08 21 09:01:50Z navarro       FUNCTION cw_specifie_event  event     on recuper les ID des differents widgets          compile_opt idl2  strictarrsubs     widget_control  event id  get_uvalue   uval   widget_control  event top  get_uvalue   top_uvalue   smallin   extractatt top_uvalue   smallin    numdessinin   smallin 2 1   smallout   extractatt top_uvalue   smallout    numdessinout   smallout 2 1     case uval of      default :BEGIN      We find the name of the variable:        vlstid   widget_info event top  find_by_uname    varlist        fieldname   widget_info vlstid   combobox_gettext          exextra   definedefaultextra fieldname        widget_control  widget_info event handler  find_by_uname    min  set_value   strtrim exextra min  1        widget_control  widget_info event handler  find_by_uname    max  set_value   strtrim exextra max  1        widget_control  widget_info event handler  find_by_uname    int  set_value   strtrim exextra inter  1        widget_control  widget_info event handler  find_by_uname    palnum  set_value   strtrim exextra lct  1        widget_control  widget_info event handler  find_by_uname    autres  set_value         END      palcol :BEGIN        ind   fix strmid event value  0  strpos event value          widget_control  widget_info event handler  find_by_uname    palnum  set_value   strtrim ind  1      END     ELSE:   endcase   return   ID:event handler  TOP:event top  HANDLER:0L  OK:uval EQ  ok  end          file_comments        categories   Compound widget       param PARENT  in required    The widget ID of the parent widget       keyword COLUMN   Buttons will be arranged in the number of columns   specified by this keyword        keyword ROW   Buttons will be arranged in the number of rows   specified by this keyword        keyword UVALUE   The user value to be associated with the widget        keyword UNAME   The user name to be associated with the widget       keyword FRAME        keyword FORXXX         keyword _EXTRA   Used to pass your keywords         returns          uses          restrictions          examples          history          version     ID       todo   seb: documenter      FUNCTION cw_specifie  parent  ROW   row  COLUMN   column  UVALUE   uvalue  UNAME   uname  FRAME   frame  FORXXX   forxxx  _extra   ex   cheking exclusive keywords     compile_opt idl2  strictarrsubs      column   keyword_set column 1 keyword_set row     row   keyword_set row 1 keyword_set column   keyword_set row  EQ column        if NOT keyword_set uvalue  then uvalue        if NOT keyword_set uname  then uname        base   widget_base parent  space   0   frame                           EVENT_FUNC    cw_specifie_event                            FUNC_GET_VALUE cw_specifie_get_value                            PRO_SET_VALUE cw_specifie_set_value                            UVALUE   uvalue  UNAME   uname  _extra   ex       base1     base1   widget_base base     rien   widget_label base1  value    Min  xoffset    85  yoffset   15     rien   widget_label base1  value    Max  xoffset   145  yoffset   15     rien   widget_label base1  value    Int  xoffset   210  yoffset   15       lct  get_name   nomcouleur    nbrligne   30    nbrlist   n_elements nomcouleur nbrligne    nomcouleur   strtrim sindgen n_elements nomcouleur  1   nomcouleur    nomcouleur    0 nomcouleur    nomcouleur    1 Color  nomcouleur     if nbrlist GT 1 then for i   1 nbrlist do       nomcouleur    nomcouleur 0:nbrligne i 1 i   1    nomcouleur nbrligne i i:n_elements nomcouleur 1     rien   cw_pdmenu base1  nomcouleur   RETURN_NAME   uvalue    palcol  uname    palcol  xoffset   250  yoffset   0    base2    base2   widget_base base  column   4 keyword_set forxxx  yoffset   30     if keyword_set forxxx  then rien   widget_button base2 value Default  uvalue    default   frame  tooltip    see  find definedefaultextra 0     rien   widget_text base2  value      editable  xsize   7  uname    min  uvalue    min     rien   widget_text base2  value      editable  xsize   7  uname    max  uvalue    max     rien   widget_text base2  value      editable  xsize   7  uname    int  uvalue    int     if keyword_set forxxx  then colvalue     ELSE colvalue    39     rien   widget_text base2  value   colvalue   editable  xsize   2  uname    palnum  uvalue    palnum       widget text containig other keywords pass into top_uvalue exextra   Does it remain some  If yes  we have to put them as string        rien   widget_text base  value         editable  uname    autres  uvalue    autres  xsize   54  ysize   3  yoffset   65   wrap   no_newline       if keyword_set forxxx  then cw_specifie_set_value  base  definedefaultextra rien_du_tout        return  base end "); 
    374 a[372] = new Array("./ToBeReviewed/WIDGET/findtopid.html", "findtopid.pro", "", "             file_comments   Find  from an Id of widget  the Id of the widget which is     the top level base   i e  it has no parent      categories   widget       param WIDGET_ID   This argument should be the widget ID of the   widget for which information is desired       returns   The Id of the widget which is  the top level base       history   Sebastien Masson  smasson lodyc jussieu fr                         22 9 1999      version    Id: findtopid pro 157 2006 08 21 09:01:50Z navarro             FUNCTION findtopid   WIDGET_ID     compile_opt idl2  strictarrsubs      id   long WIDGET_ID       exist   widget_info id   managed       if exist EQ 0 then return    1    topid   id    topid2   id    while topid2 NE 0 do begin       topid   topid2       topid2   widget_info topid2   parent     endwhile    return   long topid  end"); 
    375 a[373] = new Array("./ToBeReviewed/WIDGET/slec.html", "slec.pro", "", "     file_comments        categories         param NAME        param DEBUT        param FIN        param NOMEXP         keyword PARENT  in required    The widget ID of the parent widget       keyword BOXZOOM   Vector indicating the geographic zone on which we want to cut the map     If BOXZOOM has :      1 element : The extraction is made on  lon1  lon2  lat1  lat2  0 boxzoom 0      2 elements: The extraction is made on  lon1  lon2  lat1  lat2  boxzoom 0 boxzoom 1      4 elements: The extraction is made on  Boxzoom  0  max gdept  gdepw      5 elements: The extraction is made on  Boxzoom 0:3  0  Boxzoom 4      6 elements: The extraction is made on Boxzoom    Where lon1  lon2 lat1 lat2 are global variables defined at the last domdef       keyword _EXTRA   Used to pass your keywords          returns          uses          restrictions          examples          history          version     Id: slec pro 150 2006 08 09 10:12:54Z navarro        todo   Seb: documenter     FUNCTION slec name debut fin  nomexp  PARENT   parent  BOXZOOM boxzoom  _EXTRA   ex     include common     compile_opt idl2  strictarrsubs    cm_4data   IF NOT keyword_set key_forgetold  THEN BEGIN  updatenew  updatekwd   ENDIF       case n_params  of       1:tab   nlec name  PARENT   parent  BOXZOOM boxzoom  _EXTRA   ex        2:tab   nlec name debut  PARENT   parent  BOXZOOM boxzoom  _EXTRA   ex        3:tab   nlec name debut fin  PARENT   parent  BOXZOOM boxzoom  _EXTRA   ex        4:tab   nlec name debut fin  nomexp  PARENT   parent  BOXZOOM boxzoom  _EXTRA   ex     endcase      return   tab:tab  grille:vargrid  unite:varunit  experience:varexp  nom:varname  end"); 
    376 a[374] = new Array("./ToBeReviewed/WIDGET/xnotice.html", "xnotice.pro", "", "             file_comments   Create a widget with some text at the middle of the window      categories   Information       param TEXT  in required type string vector or scalar    it is a string or a vector of string  If it is a scalar  we    look for the line separator  C to create a text with several lines       keyword CHKWIDGET   Force to verify that they are some active widget to create a widget     otherwise print at the prompt      returns   The identity of the created widget      restrictions    It do not call xmanager   It do not create any event     We have to delete this widget manuelly:   widget_control  widgetid   destroy      examples      IDL  id xnotice ca marche  C ou pas       IDL  widget_control  id   destroy      history   Sebastien Masson  smasson lodyc jussieu fr                         2000 3 17      version    Id: xnotice pro 163 2006 08 29 12:59:46Z navarro             FUNCTION xnotice  text  CHKWIDGET   chkwidget     We separate the text in different lines  separated by  C  if it is not done yet    n est pas deja fait      compile_opt idl2  strictarrsubs      if n_elements text  EQ 1 then text   str_sep text   C   trim       if keyword_set chkwidget  then makewid    widget_info managed 0 ELSE makewid   1      if makewid EQ 0 then BEGIN       for i   0   n_elements text 1 do print  text i        noticebase   0    endif      noticebase   widget_base column  title    information   align_center     screensize   get_screen_size     widget_control  noticebase  tlb_set_xoffset   screensize 0 2 2  tlb_set_yoffset   screensize 1 2 2    nothing   widget_label noticebase  value          for i   0   n_elements text 1 do nothing   widget_label noticebase  value   text i     nothing   widget_label noticebase  value          widget_control noticebase realize      return  noticebase end"); 
    377 a[375] = new Array("./ToBeReviewed/WIDGET/xquestion.html", "xquestion.pro", "", "     file_comments        categories         param EVENT        returns          uses          restrictions          examples          history          version     Id: xquestion pro 163 2006 08 29 12:59:46Z navarro       pro xquestion_event  event     compile_opt idl2  strictarrsubs     we get the answer    widget_control  widget_info event top  find_by_uname    text          get_value   answer   answer   answer 0    now we give the answer to xquestion pro by using the pointer uvalue    widget_control  event top  get_uvalue   ptranswer     ptranswer   answer   we destroy the widget    widget_control  event top   destroy    return end                file_comments   A small widget who ask a question and give an answer      WARNING: For a binary question with yes no answer use     DIALOG_MESSAGE       categories   Widget      param QUESTION   A scalar string or a array of string  If this   argument is set to :          an array of strings: each array element is          displayed as a separate line of text           a scalar string: we are looking for the  separate line          character   C       param PROPOSEDANSWER  type string    A string proposing a answer        keyword CHKWIDGET   Active this keyword if you want that xquestion   check if managed widget are present  If not  xquestion do not   open a widget but print the question in the IDL window        keyword _EXTRA   Used to pass your keywords       returns   answer: a string      restrictions   The function does not return to its caller until the user   press  Enter  key in the widget       examples   IDL  help  xquestion Postscript name        STRING       toto ps       history   Sebastien Masson  smasson lodyc jussieu fr                         13 10 1999      version    Id: xquestion pro 163 2006 08 29 12:59:46Z navarro             FUNCTION xquestion  question  proposedanswer  CHKWIDGET   chkwidget  _extra   ex       compile_opt idl2  strictarrsubs     is separate line a scalar  we must cut it into pieces      if n_elements question  EQ 1 then question   str_sep question   C   trim    is a widget necessary     if keyword_set chkwidget  then BEGIN       if  widget_info managed 0  EQ 0 then BEGIN          if n_elements proposedanswer  EQ 0 then BEGIN              proposedanswer                 answer                 complete              ENDIF ELSE BEGIN              answer   proposedanswer             complete    default answer is  proposedanswer             ENDELSE          if n_elements question  GT 1 THEN             for i   0  n_elements question 2 do print question i            read  question n_elements question 1   complete   answer          if keyword_set answer  EQ 0 then answer   proposedanswer          return  answer       endif    endif   definition of the widget    BaseId   widget_base column  title    Question  _extra   ex     screensize   get_screen_size     widget_control  BaseId  tlb_set_xoffset   screensize 0 2 2  tlb_set_yoffset   screensize 1 2 2    for i   0   n_elements question 1 DO trash   widget_label BaseId  value   question i   align_left     if n_elements proposedanswer  EQ 0 then answer     ELSE answer   proposedanswer    trash   widget_text BaseId  value   answer   editable  _extra   ex  uname    text     trash   widget_button BaseId  value    ok     ptranswer   ptr_new allocate_heap     widget_control  BaseId  set_uvalue   ptranswer   we realize the widget and wait for an answer    widget_control BaseId realize    xmanager xquestion BaseId   we get the answer    answer    ptranswer   we freeing the pointer    ptr_free  ptranswer      return  answer end"); 
    378 a[376] = new Array("./ToBeReviewed/WIDGET/xx.html", "xx.pro", "", "     file_comments        categories         keyword JOUR          keyword MESHFILENAME          keyword LISTVAR          keyword LISTGRID          keyword FUNCLEC_NAME           keyword CALENDAR          keyword _EXTRA   Used to pass your keywords          uses          restrictions          examples          history          version     Id: xx pro 157 2006 08 21 09:01:50Z navarro        todo   seb documenter       PRO xx   JOUR   jour  MESHFILENAME   meshfilename   LISTVAR   listvar  LISTGRID   listgrid  FUNCLEC_NAME   funclec_name  CALENDAR   calendar  _extra   ex     compile_opt idl2  strictarrsubs    common        Name of the part to be changed       Name of the reading function    if NOT keyword_set funclec_name  then funclec_name    slec     varexp    INF    list of variables    if NOT keyword_set listvar  then listvar    tn sn un vn   taux   tauy hdep20 hdep28 hdep15 hturb hpycn htoth emp qn qs   smltot11   smltot12   smltot13   smltot14   smltot15   smltot16   tmltot11   tmltot12   tmltot13   tmltot14   tmltot15   tmltot16    list of grids to which variables refer to     if NOT keyword_set listgrid  then BEGIN        listgrid   replicate T  n_elements listvar        listgrid 2  4     U        listgrid 3  5     V     ENDIF   calendar to be used  in IDL julian days            if NOT keyword_set calendar  then BEGIN            if keyword_set jour  then calendar   calendriertotem julian_day  ELSE calendar   calendriertotem julian_day   mensuel         ENDIF   Name of the file refering to the mask    if NOT keyword_set meshfilename  then meshfilename    usr1 com smasson IDL INIT inittotem pro        meshparameters   whichgrid meshfilename    parameters specifing how the field must be read    readparameters   funclec_name: funclec_name                         jpidta: jpidta  jpjdta: jpjdta  jpkdta: jpkdta                         ixmindta: ixmindta  ixmaxdta: ixmaxdta                         iymindta: iymindta  iymaxdta: iymaxdta                         izmindta: izmindta  izmaxdta: izmaxdta           End of the part to be change            fileparameters    filename:  many                            time_counter: calendar                          listvar: listvar                          listgrid: strupcase listgrid       multistructure    fileparameters: temporary fileparameters                    readparameters: temporary readparameters                    meshparameters: temporary meshparameters       xxx  multistructure   temporary multistructure  _extra   ex     return end"); 
    379 a[377] = new Array("./ToBeReviewed/WIDGET/xxx.html", "xxx.pro", "", "     file_comments   see Mini Guide for Basic Commands in the XXX Program      categories         param EVENT        returns          uses          restrictions          examples          history          version     Id: xxx pro 192 2006 09 22 09:37:08Z smasson     PRO xxx_event  event       compile_opt idl2  strictarrsubs    common          widget_info event top find_by_uname       What is the type of evenment       if event id EQ 622 then help   event    struct    widget_control  event id  get_uvalue uval    if  tag_names event   structure_name 0  EQ  WIDGET_TRACKING  then uval    name: ActiverFenetre     if keyword_set uval  EQ 0 then return  help   event   struct  help  uval    struct   case on the type of evenment    widget_control  event top  get_uvalue   top_uvalue   If we activate the keyword separate at the call of xxx    if size top_uvalue   type  EQ 3 then begin       event top   top_uvalue       widget_control  event top  get_uvalue   top_uvalue    endif   we delete the small widget created by notice pro if it exists    noticebase   extractatt top_uvalue   noticebase     if noticebase NE 0 then BEGIN       widget_control  noticebase   destroy        top_uvalue 1  findline top_uvalue   noticebase    0l    endif      options   extractatt top_uvalue   options     case uval name OF        menubar :xxxmenubar_event  event        ok :nouveaudessin   1        specifie :        action :        calendar1 :BEGIN          date2id   widget_info event top  find_by_uname    calendar2           widget_control  date2id  get_value   date2          if event value GT date2 then widget_control  date2id  set_value   event value       END        calendar2 :BEGIN          date1id   widget_info event top  find_by_uname    calendar1           widget_control  date1id  get_value   date1          if event value LT date1 then widget_control  date1id  set_value   event value       END        domain :        varlist :BEGIN          currentfile    extractatt top_uvalue   currentfile           listvar    extractatt top_uvalue   fileparameters currentfile listvar          name   listvar event index           changefield  event top  name       END        txtcmd :        filelist :BEGIN          changefile  event top  event index       END        ActiverFenetre :BEGIN          if event enter EQ 1 AND  d name NE  PS  then BEGIN              graphid   widget_info event top find_by_uname    graph              graphid   extractatt top_uvalue   graphid              widget_control graphid get_value win             wset  win             widget_control event top get_uvalue top_uvalue             numdessinin    extractatt top_uvalue   smallin 2 1              p    extractatt top_uvalue   penvs numdessinin               x    extractatt top_uvalue   xenvs numdessinin               y    extractatt top_uvalue   yenvs numdessinin           endif       END        graph :BEGIN          quelclick   identifyclick event           case quelclick type of              inutile :return              long :longclickaction  event              single :singleclickaction  event              double :doubleclickaction  event          endcase       END    endcase    if keyword_set nouveaudessin  then letsdraw  event top    return end                    file_comments   A maximum of possibilities with a minimum of clics      categories   Widget       param DATAFILENAME        param IDLFILE        param ARGSPRO        keyword SEPARATE   To separate the button part and the drawing part in 2 windows    Useful for small screens  but be careful to do not saturate the    video memory of some antiquated Tx       keyword RESTORE    toto dat  or toto dat is a file created at the time of a precedent    use of xxx thanks to the command  Widget  of the menu  save as        keyword _EXTRA   Used to pass your keywords      keyword CALLERWIDID        keyword REDRAW         keyword SEPARATE        keyword UVALUE    The user value to be associated with the widget       uses   common pro      history   Sebastien Masson  smasson lodyc jussieu fr       version    Id: xxx pro 192 2006 09 22 09:37:08Z smasson        todo   seb: documenter le reste des keywords                 PRO xxx  datafilename  idlfile  argspro  CALLERWIDID   CallerWidId              REDRAW   redraw  SEPARATE   separate  UVALUE   uvalue              RESTORE   restore  _EXTRA   ex       compile_opt idl2  strictarrsubs    all_cm     reinitialize the  p   x   y   z variables     reinitplt     we get back the uvalue of the widget that called xxx to create a new widget   if keyword_set restore  then BEGIN     restore   isafile filename   restore  iodir   homedir  _extra   ex      if size restore   type  NE 7 then restore   0 ELSE BEGIN        restore  isafile file   restore  iodir   homedir  _extra   ex        newgrid    extractatt uvalue   meshparameters 0        change   changegrid newgrid      ENDELSE    endif   if n_elements CallerWidId  NE 0 THEN        widget_control  CallerWidId  get_uvalue   uvalue ELSE CallerWidId   0       list of files we want to look at     if keyword_set uvalue  then BEGIN      currentfile   extractatt uvalue   currentfile      filelist   extractatt uvalue   filelist      fileparameters   extractatt uvalue   fileparameters      readparameters   extractatt uvalue   readparameters      meshparameters   extractatt uvalue   meshparameters    ENDIF ELSE BEGIN     newfile   selectfile datafilename  idlfile  argspro  _extra   ex      if size newfile   type  NE 8 then return     fileparameters   ptrarr 1   allocate_heap       fileparameters 0    newfile fileparameters     readparameters   ptrarr 1   allocate_heap       readparameters 0    newfile readparameters     meshparameters   ptrarr 1   allocate_heap       meshparameters 0    newfile meshparameters     currentfile   0     filelist   newfile fileparameters filename   ENDELSE     if keyword_set uvalue  THEN BEGIN      smallin   extractatt uvalue   smallin      smallout   extractatt uvalue   smallout    ENDIF ELSE BEGIN      smallin    1  1  1      smallout    1  1  1    ENDELSE    nbredessin   smallin 0 smallin 1    numdessinin   smallin 2 1   warning flg definition must be consistent with cw_pdmenu argument   see also flag definition in cw_pagelayout   if keyword_set uvalue  then BEGIN      flag   extractatt uvalue   optionsflag      key_portrait   flag 0  numdessinin    ENDIF ELSE flag    key_portrait  0  0  0  0 replicate 1  nbredessin         We start the widget definition         widget and screen size   scrsize   get_screen_size 0 95   windsize   givewindowsize    xxxsize    windsize 0     1 keyword_set separate    350  windsize 1        The top base     IF xxxsize 0  LE scrsize 0  AND xxxsize 1  LE scrsize 1  THEN BEGIN      base   widget_base title    xxx  GROUP_LEADER   group   tracking_events                            uname    base  space   0    ENDIF ELSE BEGIN      base   widget_base title    xxx  GROUP_LEADER   group   tracking_events                            uname    base  space   0                            xsize   xxxsize 0  ysize   xxxsize 1                             x_scroll_size    xxxsize 0   selectact    ENDIF ELSE selectfile   0      menu options     xoff   xoff   110   if keyword_set uvalue  then begin     options   extractatt uvalue   options    ENDIF ELSE options    Portrait Landscape   Overlay   Vecteur                               Longitude   x index   Latitude   y index      desc      1 File                 0 Open                   0 New xxx                   2 Quit                 1 Save as                   0 PostScript                   0 Animated gif                   0 Gif                   0 IDL procedure                 0 RESTORE kwd of xxx                 2 Print to prompt                 1 Flag options     descsuite   options    if n_elements descsuite  GE 2 then       descsuite 0:n_elements descsuite 2     0 descsuite 0:n_elements descsuite 2     descsuite n_elements descsuite 1     2 descsuite n_elements descsuite 1     desc    desc  descsuite       menu   cw_pdmenu base  desc   RETURN_NAME  uname    menubar  uvalue    name: menubar                          xoffset   xoff  yoffset   yoff       Ok button     yoff   yoff   37   xoff   5   boutton  OK    baseok   widget_button base  value     OK   uvalue    name: ok  uname    ok button                                frame  xoffset   xoff  yoffset   yoff       Page Layout     page layout   xoff   xoff   65   dummyid   cw_pagelayout base  smallin   row   frame  xoffset   xoff  yoffset   yoff        List of Variables     xoff   xoff   140   currentlistvar    fileparameters currentfile listvar   vlstid   widget_combobox base  value   currentlistvar  uvalue    name: varlist                                 uname    varlist  xoffset   xoff  yoffset   yoff 1    if keyword_set uvalue  then BEGIN     selectvar    extractatt uvalue   varinfo 1  numdessinin      selectvar    where currentlistvar EQ selectvar 0      widget_control  vlstid  set_combobox_select   0   selectvar    ENDIF ELSE selectvar   0     List of files     yoff   yoff   35   flstid   widget_combobox base  value   file_basename filelist  uname    filelist                                 xsize   345  yoffset   yoff  uvalue    name: filelist    if keyword_set uvalue  then BEGIN     selectfile    extractatt uvalue   varinfo 0  numdessinin      selectfile    where file_basename filelist  EQ selectfile 0      widget_control  flstid  set_combobox_select   0   selectfile    ENDIF ELSE selectfile   0     Text for computation     yoff   yoff   32   computation done on the files    if keyword_set uvalue  then txtvalue    extractatt uvalue   txtcmd numdessinin      ELSE txtvalue       varexp       dummyid   widget_text base  value   txtvalue  uvalue    name: txtcmd  uname    txtcmd                               editable  yoffset   yoff  xsize   54   frame      Calendar     yoff   yoff   40   currentcalendar    fileparameters currentfile time_counter   key_caltype    fileparameters currentfile caltype   fakecal    fileparameters currentfile fakecal   if keyword_set uvalue  then begin     dates    extractatt uvalue   dates  numdessinin      date1   date2jul dates 0      date2   date2jul dates 1    ENDIF   basecalid   widget_base base  column   2  space   0  yoffset   yoff  uname    basecal    dummyid   cw_calendar basecalid  currentcalendar  date1  FAKECAL   fakecal  uname    calendar1  uvalue    name: calendar1   frame    dummyid   cw_calendar basecalid  currentcalendar  date2  FAKECAL   fakecal  uname    calendar2  uvalue    name: calendar2   frame      Domain      yoff   yoff   60   vargrid   strupcase fileparameters currentfile listgrid selectvar    IF vargrid EQ  W  then zgrid    W  ELSE zgrid    T    if keyword_set uvalue  then boxzoom    extractatt uvalue   domaines  numdessinin    dummyid   cw_domain base  uname    domain  uvalue    name: domain   unzoom   frame                           boxzoom   boxzoom  yoffset   yoff  xoffset   15      Plots specifications     yoff   yoff   230   speid   cw_specifie base  uname    specifie  uvalue    name: specifie   frame   column                            forxxx  yoffset   yoff    if keyword_set uvalue  then BEGIN     exextra    extractatt uvalue   exextra numdessinin      IF n_elements exextra  NE 0 THEN widget_control  speid  set_value   exextra   ENDIF     drawing part     if keyword_set separate  then        basegraph   widget_base title    xxx window   group_leader   base  uvalue   base      ELSE basegraph   base      graphid   widget_draw basegraph  uname    graph   button_events  retain   2                             uvalue    name: graph  press:0  click:0  x: 0  0  y: 0  0                              xoffset   350 1 keyword_set separate                              xsize   windsize 0  ysize   windsize 1    tooltip    toto      realize the widget     widget_control  base   realize   if keyword_set separate  then begin     widget_control  basegraph   realize     xmanager   xxx  basegraph   no_block   endif      if keyword_set uvalue  then BEGIN     We recopy the pointer uvalue in top_uvalue    Beware  we have to redefine completely top_value from variables    pointed by uvalue  Otherwise  if we simply do top_value   uvalue     when we delete by uvalue and variables on which it point  we    also delete variables on which point top_value      case 1 of       keyword_set redraw :BEGIN         top_uvalue   uvalue         widget_control  base  set_uvalue   top_uvalue   we find homedir         homedir   isadirectory io   homedir  title    Bad definition of homedir    We recuperae the list of instructions         globalcommand   extractatt top_uvalue   globalcommand    We complete by first and last lines of the program         createpro  globalcommand  filename   myuniquetmpdir    xxx2ps pro                         KWDLIST     NOERASE   noerase  POSTSCRIPT   postscript                         PORTRAIT   portrait  LANDSCAPE   landscape                          noerase       END       keyword_set restore :begin         top_uvalue   uvalue         widget_control  base  set_uvalue   top_uvalue         widget_control  graphid  get_value   win         wshow  win         wset  win         tv  image   true   widgets s state         updatewidget  base          END       ELSE:BEGIN         top_uvalue   ptrarr 2  29   allocate_heap          FOR i    0  28 do  top_uvalue 0  i     uvalue 0  i          FOR i    0  14 do  top_uvalue 1  i     uvalue 1  i          FOR i   18  27 do  top_uvalue 1  i     uvalue 1  i          numfile   n_elements extractatt uvalue   filelist            top_uvalue 1  15    ptrarr numfile   allocate_heap           top_uvalue 1  16    ptrarr numfile   allocate_heap           top_uvalue 1  17    ptrarr numfile   allocate_heap          for i   0  numfile 1 do begin            top_uvalue 1  15 i     uvalue 1  15 i              top_uvalue 1  16 i     uvalue 1  16 i              top_uvalue 1  17 i     uvalue 1  17 i           endfor          top_uvalue 1  28    ptrarr nbredessin   allocate_heap          for i   0  nbredessin 1 do  top_uvalue 1  28 i     uvalue 1  28 i           widget_control  base  set_uvalue   top_uvalue   Copy the screen of the widget of uvalue in top_value s one         if keyword_set CallerWidId   then begin           widget_control  extractatt uvalue   graphid  get_value   win           wshow  win           wset  win           image   tvrd true            widget_control  graphid  get_value   win           wshow  win           wset  win           tv  image   true         ENDIF       END     endcase      top_uvalue 1  findline top_uvalue   graphid    graphid   ENDIF ELSE BEGIN   Otherwise we will define all elements we will hook at the widget    thanks to the top_value which is a pointer array with 2    columns: names and variables     We initialize all these elements    Variables concerning the widget in its generality      if NOT keyword_set ex   then ex    nothing:0    variables se rapportant aux differents fichiers que l on peut lire   variables specifiques a chaque dessin                creation of the pointer we will hook at the widget      top_uvalue   ptrarr 2  29   allocate_heap    variables refering to the widget      top_uvalue 0  0     options     top_uvalue 1  0    options      top_uvalue 0  1     smallin     top_uvalue 1  1    smallin      top_uvalue 0  2     smallout     top_uvalue 1  2    smallout      top_uvalue 0  3     graphid     top_uvalue 1  3    graphid      top_uvalue 0  4     alreadyvector     top_uvalue 1  4     1      top_uvalue 0  5     alreadyover     top_uvalue 1  5     1      top_uvalue 0  6     alreadyread     top_uvalue 1  6     1      top_uvalue 0  7     currentreadcmd     top_uvalue 1  7           top_uvalue 0  8     globalcommand     top_uvalue 1  8           top_uvalue 0  9     globaloldcommand     top_uvalue 1  9           top_uvalue 0  10     no more used     top_uvalue 1  10    9999      top_uvalue 0  11     noticebase     top_uvalue 1  11    0l      top_uvalue 0  12     extra     top_uvalue 1  12    ex   variables refering to different files we can read      top_uvalue 0  13     currentfile     top_uvalue 1  13    currentfile      top_uvalue 0  14     filelist     top_uvalue 1  14    filelist      top_uvalue 0  15     fileparameters     top_uvalue 1  15    fileparameters      top_uvalue 0  16     readparameters     top_uvalue 1  16    readparameters      top_uvalue 0  17     meshparameters     top_uvalue 1  17    meshparameters   variables refering to different drawing we can do      top_uvalue 0  18     penvs     top_uvalue 1  18    replicate p  nbredessin       top_uvalue 0  19     xenvs     top_uvalue 1  19    replicate x  nbredessin       top_uvalue 0  20     yenvs     top_uvalue 1  20    replicate y  nbredessin       top_uvalue 0  21     nameprocedures     top_uvalue 1  21    strarr nbredessin       top_uvalue 0  22     types     top_uvalue 1  22    strarr nbredessin       top_uvalue 0  23     varinfo     top_uvalue 1  23    strarr 2  nbredessin           top_uvalue 0  24     domaines     top_uvalue 1  24    fltarr 6  nbredessin       top_uvalue 0  25     dates     top_uvalue 1  25    lonarr 2  nbredessin       top_uvalue 0  26     txtcmd     top_uvalue 1  26    strarr nbredessin       top_uvalue 0  27     optionsflag     top_uvalue 1  27    flag      top_uvalue 0  28     exextra     top_uvalue 1  28    ptrarr nbredessin   allocate_heap        widget_control  base  set_uvalue   top_uvalue     createhistory  base  smallin     ENDELSE      xmanager   xxx  base   no_block        return end"); 
    380 a[378] = new Array("./Utilities/createfunc.html", "createfunc.pro", "", "           file_comments   write an IDL function  compile it and execute it    useful to avoid the use of execute      param command  in required     a scalar string defining the result to be given back by the function      see examples       keyword FILENAMEIN  in   default for_createfunc pro    name of the function to be created       keyword KWDLIST  in     a vector string  to specify a list of keywords that must be included in the    function definition     Warning: the string must start with a      for example: KWDLIST     TOTO   toto       keyword _EXTRA    used to pass your keywords to the created function       restrictions     arguments can be given only through keywords      ends the function name with  pro  if needed       examples   IDL  print  createfunc 3 2  filename test    IDL  print  createfunc 3 two  filename    test      IDL                             kwdlist  two   two  two   2       history Sebastien Masson  smasson lodyc jussieu fr                         May 2005      version  Id: createfunc pro 136 2006 07 10 15:20:19Z pinsard             FUNCTION createfunc  command  FILENAMEIN   filenamein                    KWDLIST   kwdlist  _EXTRA   ex     compile_opt idl2  hidden  strictarrsubs     IF n_elements command  NE 1 THEN stop   define filename if needed   if NOT keyword_set filenamein  then filename    for_createfunc pro      ELSE filename   filenamein   get the name of the function  not the name of the file containing the function     shortfilename    file_basename filename   pro    check if the directory exists    dirname   isadirectory file_dirname filename                                title    Redefine  shortfilename pro directory     IF size dirname   type  NE 7 THEN return   1      filename   dirname   shortfilename    pro    create the file    if NOT keyword_set kwdlist  then kwdlist        kwdlist   kwdlist     _EXTRA   ex     IF strmid kwdlist  0  1  NE   THEN kwdlist          kwdlist    putfile  filename   function     shortfilename   kwdlist                             compile_opt idl2  hidden  strictarrsubs                              res       command                             return  res                              end    go in dirname directory    cd  dirname  current   old_dir   compile it    resolve_routine  shortfilename   is_function    cd  old_dir   execute it    res   call_function shortfilename  _EXTRA   ex       return  res end"); 
    381 a[379] = new Array("./Utilities/createpro.html", "createpro.pro", "", "           file_comments   write an idl procedure  compile it and execute it       param command  in required type string array    a string array defining the procedure to be created     each element will be a line of the created procedure       keyword FILENAMEIN  in   default for_createpro pro    name of the procedure to be created       keyword KWDLIST  in     a vector string     to specify a list of keywords that must be included in the procedure    definition     Warning: the string must start with a      for example: KWDLIST     TOTO   toto       keyword KWDUSED    obsolete  please pass directly your keywords through _EXTRA      keyword _EXTRA    used to pass your keywords to the created procedure       restrictions     is not working with functions  use createfunc instead      arguments can be given only through keywords      ends the procedure name with  pro  if needed       examples   IDL  createpro   print OK  filename test    IDL  createpro   if keyword_set ok  then print OK  else print   No      IDL      filename    test  kwdlist   ok   ok    IDL  createpro   if keyword_set ok  then print OK  else print   No      IDL      filename    test  kwdlist     ok   ok   ok      history Sebastien Masson  smasson lodyc jussieu fr    cleaning   new keywords: October 2005   Feb  2006: supress keyword  kwdused  and use call_procedure instead of execute      version  Id: createpro pro 163 2006 08 29 12:59:46Z navarro           PRO createpro  command  FILENAMEIN   filenamein                    KWDLIST   kwdlist  KWDUSED   kwdused  _EXTRA   ex     compile_opt idl2  hidden  strictarrsubs     IF keyword_set kwdused  THEN BEGIN     dummy   report keyword KWDUSED has been suppressed                           please pass directly your keywords through _extra                           see examples in createpro header      return   ENDIF   define filename if needed   if NOT keyword_set filenamein  then filename    for_createpro pro      ELSE filename   filenamein   get the name of the procedure  not the name of the file containing the procedure     shortfilename    file_basename filename   pro    check if the directory exists    dirname   isadirectory file_dirname filename                                title    Redefine  shortfilename pro directory     IF size dirname   type  NE 7 THEN return      filename   dirname   shortfilename    pro    create the file    if NOT keyword_set kwdlist  then kwdlist        kwdlist   kwdlist     _extra   ex     kwdlist   strtrim kwdlist  2     IF strmid kwdlist  0  1  NE   THEN kwdlist          kwdlist    for i   0  n_elements command 1 do print  command i     putfile  filename   pro     shortfilename   kwdlist                             compile_opt idl2  hidden  strictarrsubs  command   return   end    go in dirname directory    cd  dirname  current   old_dir   compile it    resolve_routine  shortfilename    cd  old_dir   execute it    call_procedure  shortfilename  _extra   ex      return end"); 
    382 a[380] = new Array("./Utilities/def_myuniquetmpdir.html", "def_myuniquetmpdir.pro", "", "     file_comments   if needed  define and create myuniquetmpdir    common variable from cm_general  and add it to  path      categories    Utilities      examples   IDL  def_myuniquetmpdir      uses cm_general      history Sebastien Masson  smasson lodyc jussieu fr                         June 2005      version  Id: def_myuniquetmpdir pro 157 2006 08 21 09:01:50Z navarro       PRO def_myuniquetmpdir     compile_opt idl2  strictarrsubs    cm_general    IF n_elements myuniquetmpdir  EQ 0 THEN BEGIN   define a new and unique directory in getenv IDL_TMPDIR  by using systime 1    look for the login if we use  unix  system     IF  d name EQ  X  THEN spawn   whoami  login   noshell ELSE login    idl      myuniquetmpdir   file_search getenv IDL_TMPDIR   mark_directory      myuniquetmpdir   myuniquetmpdir 0    login 0                            strtrim long systime 1  1        create it     file_mkdir  myuniquetmpdir   add it to  path      path    path   :    expand_path myuniquetmpdir    ENDIF      return end"); 
    383 a[381] = new Array("./Utilities/demomode_compatibility.html", "demomode_compatibility.pro", "", "     categories Utilities    uses cm_general    version  Id: demomode_compatibility pro 157 2006 08 21 09:01:50Z navarro     PRO demomode_compatibility     compile_opt idl2  strictarrsubs       cm_general     1  remove all cm_demomode_used pro found in  path   to_rm   find cm_demomode_used    IF to_rm 0  NE  NOT FOUND  THEN file_delete  to_rm     2  copy oldcm_full _empty  to myuniquetmpdir oldcm_used pro    select which file should be copied to oldcm_used pro   IF lmgr demo  EQ 1 THEN BEGIN      democm   find cm_demomode       file_copy  democm  myuniquetmpdir    cm_demomode_used pro   overwrite   ENDIF ELSE BEGIN   create an empty file    close the journal if already open     IF  journal NE 0 THEN journal   open a new one     journal  myuniquetmpdir    cm_demomode_used pro    close it   it will be empty      journal   ENDELSE    return END"); 
    384 a[382] = new Array("./Utilities/find.html", "find.pro", "", "           file_comments   based on file_search  but it is possible to specify   a set of possibles names and a different set of   possibles directories names    By default look for files included in  path     all file_search keywords can be used       categories find a file      param FILEIN  in required     A scalar or array variable of string type  containing   file names to match  Input names specifications may contain   wildcard characters  enabling them to match multiple files    see file_search for more informations  By default and if   necessary  find is looking for filename and also for filename   completed with  pro       keyword FIRSTFOUND    activate this keyword to stop looking for the file as soon as we found one       keyword IODIRECTORY  default path     A scalar or array variable of string type  containing   directories names where we are looking for the file    Different directories can be separated by   path_sep search_path   :  on unix type machine  as it is done   to define  path    Note that if filename s dirname is different from   this   keyword is not taken into account       keyword LOOKALLDIR    activate to look for the file  with a recursive search if needed    in   iodir  homedir   path   the DATA:TestsData directory if it exists       keyword NOPRO    activate to avoid the automatic search of filename completed with  pro       keyword ONLYPRO    force to look only at file ending with  pro      keyword ONLYNC    force to look only at file ending with  nc      keyword RECURSIVE    performs recursive searching of directory hierarchies    In a recursive search  find looks recursively for any and all   subdirectories in the file hierarchy rooted at the IODIRECTORY argument       keyword REPERTOIRE    obsolete  keep for compatibility  use directory keyword      keyword UNIQUE    activate to make sure that each element of the output vector is unique       keyword TRYFIND    if the file was not found and this keyword is activated  find will call   itself with the keywords  LOOKALLDIR and  FIRSTFOUND to try to find   the file we are looking for  Note that if the file was found at the   first try this keyword as no effect  which is not the case with LOOKALLDIR        keyword _EXTRA    used to pass your keywords      returns    A scalar or array variable of string type  containing the   name  with the full path of the matching files  If no files   exist with names matching the input arguments  find returns   the scalar string :  NOT FOUND       examples     IDL  print  find loadct       usr local rsi idl_6 0 lib utilities xloadct pro      usr local rsi idl_6 0 lib loadct pro   IDL  print  find loadct  iodir dir recursive       usr local rsi idl_6 0 lib loadct pro      usr local rsi idl_6 0 lib utilities xloadct pro   IDL  print  find loadct pro       usr local rsi idl_6 0 lib utilities xloadct pro      usr local rsi idl_6 0 lib loadct pro   IDL  print  find loadct nopro      NOT FOUND   IDL  print  find loadct  iodir    usr local rsi idl_6 0 lib       usr local rsi idl_6 0 lib loadct pro   IDL  print  find loadct  iodir    usr local rsi idl_6 0 lib   test_write      NOT FOUND   IDL  print  find loadct  iodir    usr local rsi idl_6 0 lib   recursive       usr local rsi idl_6 0 lib loadct pro      usr local rsi idl_6 0 lib utilities xloadct pro   IDL  print  find mesh  iodirectory    iodir   path       Users sebastie DATA ORCA2 meshmaskORCA2closea nc      Users sebastie IDL meshmaskclosesea pro      Users sebastie IDL meshmaskclosesea pro       Users sebastie SAXO_RD Obsolete meshlec pro      usr local rsi idl_6 0 lib mesh_obj pro      history Sebastien Masson  smasson lodyc jussieu fr                          28 4 1999                         6 7 1999: compatibility mac and windows   June 2005: Sebastien Masson: cleaning  use for file_  functions      version  Id: find pro 163 2006 08 29 12:59:46Z navarro           FUNCTION find  filein  IODIRECTORY   iodirectory  RECURSIVE   recursive                    REPERTOIRE   repertoire  NOPRO   nopro  ONLYPRO   onlypro                    ONLYNC   onlync  UNIQUE   unique  FIRSTFOUND   firstfound                    LOOKALLDIR   LOOKALLDIR  TRYFIND   tryfind  _extra   ex   define where we look for the file     compile_opt idl2  strictarrsubs     CASE 1 OF     keyword_set lookalldir :BEGIN  cm_general       dirnames     iodir  homedir   path        tstdtadir  file_dirname find find   onlypro   mark_directory        tstdtadir    file_search tstdtadir DATA TestsData 0        IF tstdtadir NE   THEN dirnames    tstdtadir  dirnames      END     keyword_set iodirectory : dirnames   iodirectory     keyword_set repertoire : dirnames   repertoire     ELSE: dirnames      path    ENDCASE   tmp   dirnames   dirnames    dummy    FOR i   0  n_elements tmp 1 DO       dirnames    dirnames  strsplit tmp i  path_sep search_path   extract    dirnames   dirnames 1:      fileout    dummy    FOR i   0  n_elements filein 1 DO BEGIN     dir   file_dirname filein i      base   file_basename filein i    try to complete the file name with  pro or  nc if needed      CASE 1 OF       keyword_set onlypro :BEGIN         promiss   strpos base   pro   reverse_search          promiss   promiss    strlen base    4          bad   where promiss NE 0 OR strlen base  LE 4  cnt          IF cnt NE 0 THEN base bad    base bad     pro        end       keyword_set onlync :BEGIN         ncmiss   strpos base   nc   reverse_search          ncmiss   ncmiss    strlen base    3          bad   where ncmiss NE 0 OR strlen base  LE 3  cnt          IF cnt NE 0 THEN base bad    base bad     nc        END       ELSE:if strmid base  0  1   reverse_offset  NE             AND NOT keyword_set nopro  THEN base   base    pro      ENDCASE   use dirnames only if dir eq       IF dir EQ    THEN BEGIN       if keyword_set recursive  THEN           found   file_search dirnames  base  _extra   ex            ELSE found   file_search dirnames       base  _extra   ex      ENDIF ELSE found   file_search dir       base  _extra   ex      IF found 0  NE   THEN BEGIN       IF keyword_set firstfound  THEN BEGIN         IF keyword_set unique  THEN return  found uniq found  sort found            ELSE return  found       ENDIF       fileout    fileout  found      ENDIF   ENDFOR    IF n_elements fileout  EQ 1 THEN fileout    NOT FOUND      ELSE fileout   fileout 1:      IF n_elements fileout  GT 1 THEN BEGIN     IF keyword_set unique  THEN fileout   fileout uniq fileout  sort fileout    ENDIF ELSE fileout   fileout 0      IF keyword_set lookalldir  AND fileout 0  EQ  NOT FOUND         AND NOT keyword_set recursive  THEN           filout   find file_basename filein 0   lookalldir                            recursive  _extra   ex      IF keyword_set tryfind  AND fileout 0  EQ  NOT FOUND  THEN BEGIN     fileout   find file_basename filein 0   lookalldir   firstfound  _extra   ex      fileout   fileout 0    ENDIF     RETURN  fileout END"); 
    385 a[383] = new Array("./Utilities/fitintobox.html", "fitintobox.pro", "", "              file_comments    Check that the input array has size and dimensions   compatible with the domain that was defined with the previous call   of domdef       categories    Compatibility       param sz  in required         param nx  in required       param ny  in required       param nz  in required       param jpi  in required       param jpj  in required       param jpk  in required        param jpt  in required       returns  1      history Sebastien Masson  smasson lodyc jussieu fr             10 juin 2000             June 2005: S  Masson rewrite all       version  Id: fitintobox pro 163 2006 08 29 12:59:46Z navarro        hidden           FUNCTION err_mess  sz  jpi  nx  jpj  ny  jpk  nz  jpt     compile_opt idl2  strictarrsubs     IF n_elements sz EQ 1  THEN       RETURN  report Error:                          the vector size     tostr sz      is incompatible                         with the the domain dimensions                          jpi nx  jpj ny  jpk nz  jpt                            strtrim jpi  1        strtrim nx  1                              strtrim jpj  1        strtrim ny  1                              strtrim jpk  1        strtrim nz  1                              strtrim jpt  1       simple    RETURN  report Error:                          the array dimensions     tostr sz      are incompatible                         with the the domain dimensions                                          jpi nx  jpj ny  jpk nz  jpt                            strtrim jpi  1        strtrim nx  1                              strtrim jpj  1        strtrim ny  1                              strtrim jpk  1        strtrim nz  1                              strtrim jpt  1       simple  END          categories    Compatibility      param field  in required type array or struct    an array or a structure that can be read by the function                   litchamp pro       param nx  in optional default define by grille pro       param ny  in optional default define by grille pro       param nz  in optional default define by grille pro       param firstx  in optional default define by grille pro       param firsty  in optional default define by grille pro       param firstz  in optional default define by grille pro       param lastx  in optional default define by grille pro       param lasty  in optional default define by grille pro       param lastz  in optional default define by grille pro       keyword WDEPTH    To specify that we are at W level      returns    an array with dimensions matching the domain   or  1 if there is an error       uses cm_4mesh    uses cm_4cal      examples    IDL  help  fitintobox findgen jpi jpj        FLOAT       Array 41  3    IDL  help  fitintobox findgen jpi jpj 78    Error:    the array dimensions  180 148 78  are incompatible   with the the domain dimensions     jpi nx  jpj ny  jpk nz  jpt     180 41  148 3  31 31  1        INT                1      history Sebastien Masson  smasson lodyc jussieu fr             10 juin 2000             June 2005: S  Masson rewrite all       version  Id: fitintobox pro 163 2006 08 29 12:59:46Z navarro       FUNCTION fitintobox  field  nx  ny  nz  firstx  firsty                          firstz  lastx  lasty  lastz  WDEPTH   wdepth     include commons     compile_opt idl2  strictarrsubs    cm_4mesh  cm_4cal   IF NOT keyword_set key_forgetold  THEN BEGIN  updatenew   ENDIF     arr   litchamp field    IF n_params  EQ 1 THEN grille   1   1   1   1  nx  ny  nz         firstx  firsty  firstz  lastx  lasty  lastz  WDEPTH   wdepth       case according the number of dimensions of the array       sz   size arr    case sz 0  of       0:BEGIN                       scalar         return  report Error: scalar value       strtrim arr  1   simple      END       1:BEGIN                       1D arrays         CASE 1 OF   x arrays         sz 1  EQ jpi                                                   :arr    temporary arr firstx:lastx                                          sz 1  EQ  nx                                                   :                                                         y arrays         sz 1  EQ jpj                                                   :arr    temporary arr               firsty:lasty                            sz 1  EQ  ny                                                   :                                                         z arrays         sz 1  EQ jpk                                                   :arr    temporary arr                             firstz:lastz              sz 1  EQ  nz                                                   :                                                         t arrays         sz 1  EQ jpt                                                   :         ELSE:return  err_mess sz 1  jpi  nx  jpj  ny  jpk  nz  jpt         ENDCASE     END       2:BEGIN                       2D arrays         CASE 1 OF   xy arrays         sz 1  EQ jpi AND sz 2  EQ jpj                                  :arr    temporary arr firstx:lastx  firsty:lasty                            sz 1  EQ jpi AND sz 2  EQ  ny                                  :arr    temporary arr firstx:lastx                                         sz 1  EQ  nx AND sz 2  EQ jpj                                  :arr    temporary arr              firsty:lasty                           sz 1  EQ  nx AND sz 2  EQ  ny                                  :arr    temporary arr                                               x y z arrays         sz 1  EQ jpi AND ny EQ 1      AND sz 2  EQ jpk                 :arr    temporary arr firstx:lastx  firstz:lastz              sz 1  EQ jpi AND ny EQ 1      AND sz 2  EQ  nz                 :arr    temporary arr firstx:lastx                           sz 1  EQ  nx AND ny EQ 1      AND sz 2  EQ jpk                 :arr    temporary arr              firstz:lastz             sz 1  EQ  nx AND ny EQ 1      AND sz 2  EQ  nz                 :    x yz arrays         nx EQ 1      AND sz 1  EQ jpj AND sz 2  EQ jpk                 :arr    temporary arr               firsty:lasty  firstz:lastz              nx EQ 1      AND sz 1  EQ jpj AND sz 2  EQ  nz                 :arr    temporary arr               firsty:lasty                           nx EQ 1      AND sz 1  EQ  ny AND sz 2  EQ jpk                 :arr    temporary arr                            firstz:lastz             nx EQ 1      AND sz 1  EQ  ny AND sz 2  EQ  nz                 :   xt arrays         sz 1  EQ jpi                                   AND sz 2  EQ jpt:arr    temporary arr firstx:lastx                                         sz 1  EQ  nx                                   AND sz 2  EQ jpt:   yt arrays                          sz 1  EQ jpj                  AND sz 2  EQ jpt:arr    temporary arr               firsty:lasty                                           sz 1  EQ  ny                  AND sz 2  EQ jpt:   zt arrays                                           sz 1  EQ jpk AND sz 2  EQ jpt:arr    temporary arr                             firstz:lastz                                               sz 1  EQ  nz AND sz 2  EQ jpt:         ELSE:return  err_mess sz 1:2  jpi  nx  jpj  ny  jpk  nz  jpt        ENDCASE     END       3:BEGIN                       3D arrays         CASE 1 OF   xyz arrays         sz 1  EQ jpi AND sz 2  EQ jpj AND sz 3  EQ jpk                 :arr    temporary arr firstx:lastx  firsty:lasty  firstz:lastz              sz 1  EQ jpi AND sz 2  EQ  ny AND sz 3  EQ jpk                 :arr    temporary arr firstx:lastx               firstz:lastz             sz 1  EQ  nx AND sz 2  EQ jpj AND sz 3  EQ jpk                 :arr    temporary arr              firsty:lasty  firstz:lastz             sz 1  EQ  nx AND sz 2  EQ  ny AND sz 3  EQ jpk                 :arr    temporary arr                           firstz:lastz             sz 1  EQ jpi AND sz 2  EQ jpj AND sz 3  EQ  nz                 :arr    temporary arr firstx:lastx  firsty:lasty                            sz 1  EQ jpi AND sz 2  EQ  ny AND sz 3  EQ  nz                 :arr    temporary arr firstx:lastx                                        sz 1  EQ  nx AND sz 2  EQ jpj AND sz 3  EQ  nz                 :arr    temporary arr              firsty:lasty                           sz 1  EQ  nx AND sz 2  EQ  ny AND sz 3  EQ  nz                 :   xyt arrays         sz 1  EQ jpi AND sz 2  EQ jpj                  AND sz 3  EQ jpt:arr    temporary arr firstx:lastx  firsty:lasty                           sz 1  EQ jpi AND sz 2  EQ  ny                  AND sz 3  EQ jpt:arr    temporary arr firstx:lastx                                       sz 1  EQ  nx AND sz 2  EQ jpj                  AND sz 3  EQ jpt:arr    temporary arr              firsty:lasty                          sz 1  EQ  nx AND sz 2  EQ  ny                  AND sz 3  EQ jpt:    x yzt arrays         nx EQ 1      AND sz 1  EQ jpj AND sz 2  EQ jpk AND sz 3  EQ jpt:arr    temporary arr               firsty:lasty  firstz:lastz             nx EQ 1      AND sz 1  EQ jpj AND sz 2  EQ  nz AND sz 3  EQ jpt:arr    temporary arr               firsty:lasty                         nx EQ 1      AND sz 1  EQ  ny AND sz 2  EQ jpk AND sz 3  EQ jpt:arr    temporary arr                            firstz:lastz            nx EQ 1      AND sz 1  EQ  ny AND sz 2  EQ  nz AND sz 3  EQ jpt:   x y zt arrays         sz 1  EQ jpi AND ny EQ 1      AND sz 2  EQ jpk AND sz 3  EQ jpt:arr    temporary arr firstx:lastx                firstz:lastz             sz 1  EQ jpi AND ny EQ 1      AND sz 2  EQ  nz AND sz 3  EQ jpt:arr    temporary arr firstx:lastx                                       sz 1  EQ  nx AND ny EQ 1      AND sz 2  EQ jpk AND sz 3  EQ jpt:arr    temporary arr                            firstz:lastz            sz 1  EQ  nx AND ny EQ 1      AND sz 2  EQ  nz AND sz 3  EQ jpt:         ELSE:return  err_mess sz 1:3  jpi  nx  jpj  ny  jpk  nz  jpt        ENDCASE     END       4:BEGIN                       4D arrays         CASE 1 OF   xyzt arrays         sz 1  EQ jpi AND sz 2  EQ jpj AND sz 3  EQ jpk AND sz 4  EQ jpt:arr    temporary arr firstx:lastx  firsty:lasty  firstz:lastz             sz 1  EQ jpi AND sz 2  EQ  ny AND sz 3  EQ jpk AND sz 4  EQ jpt:arr    temporary arr firstx:lastx               firstz:lastz            sz 1  EQ  nx AND sz 2  EQ jpj AND sz 3  EQ jpk AND sz 4  EQ jpt:arr    temporary arr              firsty:lasty  firstz:lastz            sz 1  EQ  nx AND sz 2  EQ  ny AND sz 3  EQ jpk AND sz 4  EQ jpt:arr    temporary arr                           firstz:lastz            sz 1  EQ jpi AND sz 2  EQ jpj AND sz 3  EQ  nz AND sz 4  EQ jpt:arr    temporary arr firstx:lastx  firsty:lasty                          sz 1  EQ jpi AND sz 2  EQ  ny AND sz 3  EQ  nz AND sz 4  EQ jpt:arr    temporary arr firstx:lastx                                      sz 1  EQ  nx AND sz 2  EQ jpj AND sz 3  EQ  nz AND sz 4  EQ jpt:arr    temporary arr              firsty:lasty                         sz 1  EQ  nx AND sz 2  EQ  ny AND sz 3  EQ  nz AND sz 4  EQ jpt:         ELSE:return  err_mess sz 1:4  jpi  nx  jpj  ny  jpk  nz  jpt        ENDCASE     END     ELSE:return  report Error: fitintobox is managing arrays with a maximum of 4 dimensions   simple    ENDCASE    return  arr end"); 
    386 a[384] = new Array("./Utilities/isadirectory.html", "isadirectory.pro", "", "           file_comments   check if a directory exists and make sure that it ends   with the directory separator mark       categories io      param DIRECTORYIN  in optional     a proposed directory  If neither dirname   input parameter of IODIRECTORY keyword are defined    the ask the user to choose a directory       keyword IODIRECTORY    a proposed directory      keyword TITLE    the title of the window      keyword _EXTRA    used to pass your keywords      file_comments    all dialog_pickfile keywords  like filter  can be used       returns    the directory name      examples     IDL  print   dir       usr local rsi idl_6 0   IDL  print  isadirectory dir        usr local rsi idl_6 0    IDL  print  isadirectory dir notgood       history Sebastien Masson  smasson lodyc jussieu fr                         June 28  2000   June 2005: Sebastien Masson: cleaning  use for file_  functions      version  Id: isadirectory pro 163 2006 08 29 12:59:46Z navarro           FUNCTION isadirectory  directoryin  TITLE   title  IODIRECTORY   iodirectory  _extra   ex       compile_opt idl2  strictarrsubs     CASE 1 OF      size directoryin   type 0  EQ 7:directory   directoryin     keyword_set iodirectory :directory   iodirectory     ELSE:directory    directory that is not existing    ENDCASE   testfile   file_test directory   directory    if directory doesn t exist  we ask the user to provide a directory name   IF total testfile  NE n_elements directory  THEN BEGIN     IF NOT keyword_set title  THEN title    choose a directory      FOR i   0  n_elements directory 1 DO BEGIN       IF testfile i  EQ 0 THEN BEGIN         directory i    dialog_pickfile directory  title   title                                             must_exist  _extra   ex          if directory i  EQ   THEN RETURN  report check find directory canceled        ENDIF     ENDFOR   ENDIF     directory   file_search directory   mark_directory    IF n_elements directory  EQ 1 THEN RETURN  directory 0      ELSE RETURN  directory   END"); 
    387 a[385] = new Array("./Utilities/isafile.html", "isafile.pro", "", "           file_comments   same as find pro except that as long as the file is  NOT FOUND    isafile calls dialog_pickfile  to ask the user to select a file       categories io      param FILEIN  in optional     a proposed name  If neither filein input parameter of filename keyword are    defined  the ask the user to choose a file       keyword FILENAME    a proposed filename       keyword IODIRECTORY    a directory where we look for the file  this   keyword is taken into account only if the dirname   of filein or filename is        keyword NEW    to specify that filename is a new file and that we should check only its    path      keyword ONLYPRO    force to look only at file ending with  pro      keyword ONLYNC    force to look only at file ending with  nc      keyword RECURSIVE    performs recursive searching of directory hierarchies    In a recursive search  find looks recursively for any and all   subdirectories in the file hierarchy rooted at the IODIRECTORY argument       keyword _EXTRA    used to pass your keywords      file_comments    all find  file_search and dialog_pickfile keywords  like title  can be used      returns    the filename with its path      examples     IDL  print  isafile Users sebastie SAXO_RD Commons cm_4mesh pro      Users sebastie SAXO_RD Commons cm_4mesh pro   IDL  print  isafile cm_4mesh pro  iodir    Users sebastie SAXO_RD Commons      Users sebastie SAXO_RD Commons cm_4mesh pro   IDL  print  isafile cm_4mesh pro  iodir    path      Users sebastie SAXO_RD Commons cm_4mesh pro   IDL  print  isafile cm_4mesh pro  iodir    Users sebastie SAXO_RD   recursive      Users sebastie SAXO_RD Commons cm_4mesh pro   IDL  print  isafile cm_4mesh pro  iodir   getenv HOME   recursive      Users sebastie SAXO_RD Commons cm_4mesh pro   IDL  print  isafile fake_file pro       history Sebastien Masson  smasson lodyc jussieu fr                         11 2 2000   June 2005: Sebastien Masson: cleaning  use for file_  functions      version  Id: isafile pro 163 2006 08 29 12:59:46Z navarro           FUNCTION isafile  filein  FILENAME   filename  IODIRECTORY   iodirectory                       NEW   new  RECURSIVE   RECURSIVE  ONLYPRO   onlypro                       ONLYNC   onlync  _extra   ex       compile_opt idl2  strictarrsubs     CASE 1 OF      size filein   type 0  EQ 7:fileout   filein     keyword_set filename :fileout   filename 0      ELSE:fileout    file that is not existing    ENDCASE   if size fileout   type  NE 7 THEN return   1     CASE 1 OF     keyword_set onlypro : filter    pro      keyword_set onlync : filter    nc      else: filter       ENDCASE     basename   file_basename fileout    dirname   file_dirname fileout    should we redefine dirname    if keyword_set iodirectory  AND dirname EQ   then dirname   iodirectory     if keyword_set new  then return  dirname   path_sep    basename     fileout   find basename  iodirectory   dirname                      recursive   recursive   unique   firstfound  ONLYPRO   onlypro                      ONLYNC   onlync  _extra   ex    WHILE fileout 0  EQ  NOT FOUND  DO BEGIN     fileout   dialog_pickfile path   dirname 0  filter   filter  _extra   ex      if fileout EQ   THEN RETURN  report check find file canceled    check again everything      basename   file_basename fileout      dirname   file_dirname fileout    check if the name of the dirname is ok     dirname   isadirectory dirname  title    choose a directory for the file                                  basename    if we cancel the check     IF size dirname   type  NE 7 THEN return  report check find file canceled      fileout   find basename  iodirectory   dirname                        recursive   recursive   unique   firstfound  ONLYPRO   onlypro                        ONLYNC   onlync  _extra   ex    ENDWHILE     RETURN  fileout END"); 
    388 a[386] = new Array("./Utilities/linearequation.html", "linearequation.pro", "", "             file_comments    Calculate a linear equation of the type ax by c 0   thanks to coordinates of 2 points    comment: we can have a table with pairs of points       categories    Utilities       param POINT1  in required     This is the first point of the  straight line s  whose we want to calculate    equation s       param POINT2  in required     This is the second point of the  straight line s  whose we want to calculate   equation s      There is 2 possibilities:        1  point is a complex or a table of complex  where each element is the coordinates of the point         2  point is a table of real of dimension 2 number_of_straight_line            For each row of the table  we have coordinates of the point       returns    abc is a table of dimension 3  number_of_straight_line     where for each line of the table we obtain the 3 parameters   a  b and c of the linear equation ax by c 0      examples    IDL  abc linearequation complex 1 2 3 4    IDL  print  abc 0 1 abc 1 2 abc 2    0 00000      history Sebastien Masson  smasson lodyc jussieu fr             10 juin 2000      version  Id: linearequation pro 163 2006 08 29 12:59:46Z navarro             FUNCTION linearequation  point1  point2     compile_opt idl2  strictarrsubs       if size point1   type  EQ 6 OR size point1   type  EQ 9 then begin       x1   float point1        y1   imaginary point1     ENDIF ELSE BEGIN       x1   float reform point1 0          y1   float reform point1 1       ENDELSE     if size point2   type  EQ 6 OR size point2   type  EQ 9 then begin       x2   float point2        y2   imaginary point2     ENDIF ELSE BEGIN       x2   float reform point2 0          y2   float reform point2 1       ENDELSE     vertical   where x1 EQ x2     novertical   where x1 NE x2     abc   fltarr 3  n_elements x1       IF novertical 0  NE  1 then BEGIN   y mx p       nele   n_elements novertical         m    y2 novertical y1 novertical x2 novertical x1 novertical        p    x2 novertical y1 novertical y2 novertical x1 novertical x2 novertical x1 novertical        abc  novertical     reform m  1  nele  replicate 1  1  nele  reform p  1  nele     ENDIF    IF vertical 0  NE  1 then BEGIN   x ny p       nele   n_elements vertical         n    x2 vertical x1 vertical y2 vertical y1 vertical        p    y2 vertical x1 vertical x2 vertical y1 vertical y2 vertical y1 vertical        abc  vertical     replicate 1  1  nele  reform n  1  nele  reform p  1  nele     ENDIF     return  abc end"); 
    389 a[387] = new Array("./Utilities/lineintersection.html", "lineintersection.pro", "", "             file_comments    Calculate coordinates of the intersection between 2 straight lines    or of a succession of 2 straight lines       categories    Utilities       param ABC1  in required type 3d array    is the first array of dimension 3  number_of_pairs_of_straight_lines     whose each line contain the 3 parameters a b and c of the first linear    equation of the type ax by c 0      param ABC2  in required type 3d array    is second array of dimension 3  number_of_pairs_of_straight_lines     whose each line contain the 3 parameters a b and c of the second linear    equation of the type ax by c 0      keyword FLOAT    To return the output as a array of real numbers instead of vectors of    complex  by default       returns    2 possibilities:        1  by default: it is a vector of complex whose each element is the coordinates                        of the intersection point of a pair of straight lines         2  if FLOAT is activated  it is a array of reels of dimension 2             number_of_pairs_of_straight_lines whose each row is the coordinates            of the intersection point of a pair of straight line       restrictions    If the 2 straight line are parallel  we return coordinates     values f_nan values f_nan       restrictions    Beware of the precision of the machine which make    that calculated coordinates may not exactly verify    equations of the pair of straight lines       examples    IDL  abc1 linearequation complex 1 2 3 4    IDL  abc2 linearequation complex 1 2 8 15    IDL  print  lineintersection abc1  abc2           1 00000       2 00000    IDL  print  lineintersection abc1  abc2 float    1 00000      2 00000      history Sebastien Masson  smasson lodyc jussieu fr             10 juin 2000      version  Id: lineintersection pro 163 2006 08 29 12:59:46Z navarro             FUNCTION lineintersection  abc1  abc2  FLOAT   float       compile_opt idl2  strictarrsubs      a1   float reform abc1 0       b1   float reform abc1 1       c1   float reform abc1 2       a2   float reform abc2 0       b2   float reform abc2 1       c2   float reform abc2 2         determinant   a1 b2 a2 b1    nan   where determinant EQ 0     if nan 0  NE  1 THEN determinant    values f_nan      x    b1 c2 c1 b2 determinant    y    c1 a2 a1 c2 determinant      if keyword_set float  then begin       npts   n_elements x         res    reform x  1  npts   over  reform y  1  npts   over     ENDIF ELSE res   complex x  y     return  res end"); 
    390 a[388] = new Array("./Utilities/mergeonline_help.html", "mergeonline_help.pro", "", "     file_comments   Have one unique online help for IDL and SAXO      categories   Documentation      restrictions   Needs at least version 6 2       history   Sept 2006: Sebastien Masson  smasson lodyc jussieu fr       version    Id: mergeonline_help pro 197 2006 10 26 10:45:17Z smasson     PRO mergeonline_help     compile_opt idl2  strictarrsubs     is the IDL version at least 6 2     idlversion   float strmid version release  0  3    IF idlversion LT 6 2 THEN BEGIN     print   Warning: You need at least IDL 6 2 to use SAXO IDL merged online help      return   ENDIF     check directories      get the environment variable  HOME   home   getenv HOME    is it defined    IF home EQ   THEN return   is  HOME a writable directory    home    file_search home   test_directory   test_write   mark_directory 0    IF home EQ   THEN return    is  dir    help online_help a directory     homeidl    dir    help online_help    homeidl    file_search homeidl   test_directory   mark_directory 0    IF homeidl EQ   THEN return    is  HOME assistant a directory   if not  create it   homeassist   home    assistant    IF file_test homeassist   directory  EQ 0 THEN file_mkdir  homeassist   is  HOME assistant a writable directory    homeassist    file_search homeassist   test_directory   test_write   mark_directory 0    IF homeassist EQ   THEN return   is  HOME assistant src a directory   if not  create it    homesrc   homeassist    src    IF file_test homesrc   directory  EQ 0 THEN file_mkdir  homesrc   is  HOME assistant src a writable directory    homesrc    file_search homesrc   test_directory   test_write   mark_directory 0    IF homesrc EQ   THEN return    homesaxo   file_dirname find buildinit pro 0   mark_directory     Documentation idldoc_assistant_output    IF file_test homesaxo    idldoc lib adp  EQ 0 THEN BEGIN     print   Error when looking for the file   homesaxo    idldoc lib adp      return   ENDIF     check existance and version of the file that need to be created      do idl adp and home html already exists    IF file_test homesrc    home html  AND file_test homesrc    idl adp         AND file_test homesrc    aboutsaxo txt  THEN BEGIN   is the revision version of homesrc idl adp  the same of homesaxo    idldoc lib adp      is  Id found in homesrc idl adp      idladp   getfile homesrc idl adp      line   strmatch idladp   Id      line    where line EQ 1 0      IF line NE  1 THEN BEGIN       new   idladp line    is  Id  found in homesaxo    idldoc lib adp        saxoadp   getfile homesaxo    idldoc lib adp        line   strmatch saxoadp   Id        line    where line EQ 1 0        IF line NE  1 THEN BEGIN         old   saxoadp line    are the 2 revision tags the same          IF array_equal old  new  THEN BEGIN   is IDL version the same of homesrc    home html              homehtml   getfile homesrc home html            line   strmatch homehtml   IDL   string idlversion  format    f3 1                line    where line EQ 1 0            IF line NE  1 THEN  BEGIN              help_path   homesrc             print   Use SAXO IDL merged online help              return           ENDIF         ENDIF       ENDIF     ENDIF   ENDIF     build homesrc    idl adp        modify the original idl adp     idladp   getfile homeidl idl adp    extract part from  to    line1   strmatch idladp      line1    where line1 EQ 1 0    line2   strmatch idladp      line2    where line2 EQ 1 0    1L   idladp   idladp line1:line2    put the complete path of the references   idladp   strsed idladp   ref   ref homeidl      modify the original idldoc lib adp     saxoadp   getfile homesaxo    idldoc lib adp    extract part from    line1   strmatch saxoadp      line1    where line1 EQ 1 0    1   saxoadp   saxoadp line1:    put the complete path of the references   saxoadp   strsed saxoadp   ref   ref homesaxo      merge idl adp and idldoc lib adp  add an header and write it in a new file     header                                                                    SAXO   IDL      version release     Help                         SAXO   IDL      version release     Help                             homesrc    home html                         About SAXO                             homesrc    aboutsaxo txt                             homeidl       newadp    temporary header  temporary idladp  temporary saxoadp      putfile  homesrc    idl adp  temporary newadp      build homesrc    home html      homehtml   getfile homeidl home html    put the complete path of the references   homehtml   strsed homehtml   ref   ref homeidl    find the first line containing     line   strmatch homehtml      line    where line EQ 1 0    insert one line after this line   homehtml    homehtml 0:line                        160 160 SAXO Directory                    homehtml line 1:    find the last line containing     line   strmatch homehtml      line    where line EQ 1  cnt cnt 1    insert one line after this line   homehtml    homehtml 0:line                        160 160 SAXO Home Page                     homehtml line 1:     put the complete path of the images   homehtml   strsed homehtml   src   src homeidl    except for SAXOIDL_OnlineHelp_title png   homehtml   strsed homehtml   src IDL_OnlineHelp_Title gif   src    homesaxo    xmldoc images SAXOIDL_OnlineHelp_title png      putfile  homesrc    home html  temporary homehtml      build homesrc    aboutsaxo txt      about   getfile homesaxo    overview    remove the lines containing     lines   strmatch about      about   about where lines EQ 0    add some informattions:   about    about     More informations on   http: forge ipsl jussieu fr saxo         putfile  homesrc    aboutsaxo txt  temporary about      print   Merge of SAXO and IDL online help done     help_path   homesrc     RETURN END"); 
    391 a[389] = new Array("./Utilities/protype.html", "protype.pro", "", "           file_comments   test is a  pro  file corresponds to an IDL procedure  function or batch file       categories    Utilities      param FILE  in     A scalar of string type  the name of the  pro  file to be tested   if necessary  the input name is completed with  pro    and its path found in  path      returns    A scalar of string type:  proc   func  or  batch       examples     IDL  print  protype protype         func   IDL  print  protype protype pro         func   IDL  print  protype init         batch   IDL  print  protype plt         proc      history Sebastien Masson  smasson lodyc jussieu fr                          Feb 2006      version  Id: protype pro 163 2006 08 29 12:59:46Z navarro           FUNCTION protype  file       compile_opt idl2  strictarrsubs     filepro    find file 0   onlypro   firstfound 0    if filepro EQ  NOT FOUND  then return   1   name   file_basename filepro   pro      allines   getfile filepro    CASE 1 OF   this is a procedure     max stregex allines     pro     name   fold_case   boolean :RETURN   proc    this is a function     max stregex allines     function     name   fold_case   boolean :RETURN   func    this is an IDL batch file     ELSE:RETURN   batch    ENDCASE     RETURN   1 END"); 
    392 a[390] = new Array("./Utilities/pwd.html", "pwd.pro", "", "             file_comments    print the current directory      categories like unix function       history Sebastien Masson  smasson lodyc jussieu fr       version  Id: pwd pro 136 2006 07 10 15:20:19Z pinsard             PRO pwd     compile_opt idl2  strictarrsubs      cd  current   pwd    print  pwd    return end"); 
    393 a[391] = new Array("./Utilities/report.html", "report.pro", "", "             file_comments    Like dialog_message pro if there is already some widget    active or like message pro if there is not any widget active     To ask a question whose answer is not yes no use xquestion       param TEXT  in required     one string or one vector of string  Si le string ne   comporte qu un element  on cherche les eventuels characteres de   retour a la ligne:  C  If text is set to an array of strings  each   array element is displayed as a separate line of text       keyword SIMPLE    activate to print only the message without the name   and the line of the routine  defined by calling routine_name       keyword _EXTRA    used to pass keywords from dialog_message pro and message pro      keyword PARENT    same as DIALOG_PARENT de dialog_message pro      keyword QUESTION  default Warning    Set this keyword to create a  Question  dialog       keyword DEFAULT_NO  default Yes    Set this keyword to make the  No  button the default selection for     Question  dialog        keyword SIMPLE    Activate to print the error message without printing  the routine name with    its full path       returns     1 if the keyword QUESTION is not activated   If the keyword is activated  return 1 for yes and 0 for no        examples    If there is not any widget activated:     IDL  help  report toto tata       MAIN : toto tata       INT                1   IDL  help  report does it works  question    does it works   y n  default answer is y        BYTE           1   IDL  help  report question1:  C does it works  question    question1:   does it works   y n  default answer is y        BYTE           1     If widgets are already activated  it is the same thing but with widgets       history Sebastien Masson  smasson lodyc jussieu fr                         21 10 1999      version  Id: report pro 163 2006 08 29 12:59:46Z navarro             FUNCTION report  text  DEFAULT_NO   default_no  PARENT   parent  QUESTION   question  SIMPLE   simple  _extra   ex     compile_opt idl2  strictarrsubs     res    1                          we separate the text in different lines  separated by  C  if it is not already done     if n_elements text  EQ 1 then text   str_sep text   C   trim    there is some widgets activated  it is easy  we call dialog_massage    if  widget_info managed 0  NE 0 then BEGIN       res   dialog_message text  dialog_parent   parent  QUESTION   question                                title   routine_name 1  DEFAULT_NO   default_no  _extra   ex        if keyword_set question  THEN res   res EQ  Yes  ELSE res    1    ENDIF ELSE BEGIN   there is not any widget activated   do we ask a question         if keyword_set question  then BEGIN   what i sthe answer by default            if keyword_set default_no  then answer    n  ELSE answer    y           default_answer   answer          if n_elements text  GT 1 THEN             for i   0  n_elements text 2 do print text i            read  text n_elements text 1  y n  default answer is  default_answer    answer          answer   strlowcase answer      if the answer is not appropriated          while answer NE   and answer NE  y  and answer NE  n  do begin             read  text n_elements text 1  y n  default answer is  default_answer    answer             answer   strlowcase answer           ENDWHILE                   we adjust res in function of th answer          case answer of              :res   default_answer EQ  y               y :res   1              n :res   0          endcase       endif ELSE BEGIN   If we do not ask any question  we just make a print         IF keyword_set simple  THEN prefix     ELSE prefix      routine_name 1 :            if n_elements text  GT 1 THEN             for i   0  n_elements text 2 do print  prefix text i            print  prefix text n_elements text 1        ENDELSE    ENDELSE     return   res end"); 
    394 a[392] = new Array("./Utilities/routine_name.html", "routine_name.pro", "", "             file_comments   Give us the name of the routine  procedure or function  where we are       categories    Utilities      param PILINGNUM  in optional    A whole number which give us how many level we have to reascend   in the piling up of routines and subroutines to find the looked for routine       returns   a string giving either the full name of the routine  with the path  or    MAIN       restrictions   This function use the keyword OUTPUT in help pro and it is specified   in the on line help that the return syntax of this word can change in   function of the version of the code  This version works with IDL 5 2       examples   IDL  print  routine_name      usr1 com smasson IDL_RD UTILITAIRE report pro    IDL  print  routine_name 1      usr1 com smasson IDL_RD PLOTS DIVERS determineminmax pro    IDL  print  routine_name 2      usr1 com smasson IDL_RD PLOTS DESSINE plt pro    IDL  print  routine_name 3      MAIN     IDL  print  routine_name 4      MAIN       history Sebastien Masson  smasson lodyc jussieu fr                         21 10 1999      version  Id: routine_name pro 163 2006 08 29 12:59:46Z navarro             FUNCTION routine_name   pilingnum       compile_opt idl2  strictarrsubs     help    traceback  output   name   name   strtrim name  1          we remove blanks at the beginning of lines and                                 we put elements of the vector stuck ones with                                 each others to make an unique string    allnames       for i   0  n_elements name 1 do allnames   allnames name i      name   str_sep allnames      we cut it out again    name   strtrim name  2        we remouve blanks in front of and behind   name   strcompress name         we compress blanks   we do not hold back the two first elements who are a blanck  and the line concerning   routine_name    name   name 2: n_elements name 1    we choose the line which concern us    if NOT keyword_set pilingnum  then pilingnum   0   if pilingnum GE n_elements name  then return    MAIN    name   name pilingnum    if strpos name   MAIN  NE  1 then return    MAIN    name   str_sep name        if n_elements name  LT 3  then name   name 0  ELSE name    L name 1   name 2      return  name end"); 
    395 a[393] = new Array("./Utilities/testvar.html", "testvar.pro", "", "             file_comments    A kind of keyword_set but when the value exist  it send it back      categories    Utilities      keyword VAR    any kind of      returns    0 if the variable does not exist       examples    IDL  print  testvar var toto    0   IDL  print  testvar var toto    toto      history Sebastien Masson  smasson lodyc jussieu fr                         14 12 1999      version  Id: testvar pro 163 2006 08 29 12:59:46Z navarro             FUNCTION testvar  var   var     compile_opt idl2  strictarrsubs      if keyword_set var  then return  var ELSE return   0 end"); 
    396 a[394] = new Array("./Utilities/text_box.html", "text_box.pro", "", "       file_comments    This procedure writes a short text message within a box shaped   area in a graphics window   The message may be split at word   boundaries into several lines  and the character size and   orientation may be adjusted for the text to fit within the box          param TEXT  in required     ASCII text string containing the message       keyword POS     4 element vector specifying the box position and size   pos 0 pos 1  specify the lower left corner coordinate   pos 2 pos 3  specify the upper right corner coordinate   data window normalized coordinates are use      keyword FG_COLOR  default 0    color of box and legend titles      keyword BG_COLOR    background color  Setting BG_COLOR erases the area                  covered by the text box  filling it with color BG_COLOR                  prior to writing the text   If both BG_COLOR and  p color                 are zero then the background color is reset to 255 to                 gaurantee a readability                      keyword RIGHT    if set  right justify text      keyword CENTER    if set  center the text      keyword VERT_SPACE  default 1 5    vertical spacing of lines in units of character height      keyword _EXTRA    used to pass your keyword      keyword BOX    activate to show the box on graphics window       history  Paul Ricchiazzi                            7Jul93             Institute for Computational Earth System Science             University of California  Santa Barbara      version  Id: text_box pro 163 2006 08 29 12:59:46Z navarro       PRO text_box text pos pos fg_color fg_color bg_color bg_color                 center center right right box box vert_space vert_space  _EXTRA   ex       compile_opt idl2  strictarrsubs           ON_ERROR  2      Check the number of parameters    justify 1 if keyword_set right  ne 0 then justify 1 if keyword_set center  ne 0 then justify 0 if keyword_set vert_space  eq 0 then vert_space  1 5 IF n_elements text  eq 0 then message   must specify text  nnx x window d x_vsize nny y window d y_vsize nnx 0  1 d x_vsize nny 0  1 d y_vsize   if n_elements pos  eq 0 then begin    box_cursor xx1 yy1 nx ny   xx2 xx1 nx   yy2 yy1 ny   pos xx1 nnx 0 nnx 1 nnx 0 yy1 nny 0 nny 1 nny 0          xx2 nnx 0 nnx 1 nnx 0 yy2 nny 0 nny 1 nny 0    posstring string form a 4 f5 2 a              pos pos 0 pos 1 pos 2 pos 3    print strcompress posstring remove_all       endif else begin      xx1   nnx 0 pos 0 nnx 1 nnx 0    xx2   nnx 0 pos 2 nnx 1 nnx 0    yy1   nny 0 pos 1 nny 1 nnx 0    yy2   nny 0 pos 3 nny 1 nnx 0   endelse      calculate the height and width of the box in characters      width     xx2   xx1     d x_ch_size   height    yy2   yy1     d y_ch_size      decompose the message into words      words   str_sep text      print f 20a words   nwords n_elements words    wordlen lenstr words d x_vsize   blanklen lenstr   d x_vsize   maxcharsize xx2 xx1 4 blanklen max wordlen    charsize 1     lpnt intarr nwords    nomore 0   ntries 0   repeat begin     ntries ntries 1     if ntries gt 20 then message Can not fit message into box      ychsiz vert_space d y_ch_size charsize     wlen wordlen charsize     blen blanklen charsize     n_lines fix yy2 yy1 ychsiz 1     sum 0     ilines 0     print f 8a8 charsz i ilines n_lines lpnt wlen sum xwdth      for i 0 nwords 1 do begin       sum sum wlen i blen       if sum 3 blen gt xx2 xx1 then begin         ilines ilines 1         sum wlen i blen       endif       lpnt i ilines                       print f f8 2 4i8 3f8 2 charsize i ilines n_lines lpnt i                    wlen i blen sum 3 blen xx2 xx1     endfor             case 1 of       ilines 1 lt n_lines: if charsize 1 1 gt maxcharsize then             vert_space yy2 yy1 n_lines 1 d y_ch_size charsize              else charsize charsize 1 1       ilines 1 eq n_lines: nomore 1       ilines 1 gt n_lines: charsize charsize 9     endcase endrep until nomore   lines strarr n_lines  maxlen 0  for i 0 n_lines 1 do begin   ii where lpnt eq i nc    maxlen total wlen ii nc blen maxlen   lines i string f 200a words ii      print i words ii    print i lines i  endfor      align 5 1 justify       case justify of      1:xx   xx1 5 xx2 xx1 maxlen       0:xx   0 5 xx1   xx2       1:xx   xx2 5 xx2 xx1 maxlen    endcase    dy d y_ch_size charsize vert_space   yy yy2 0 5 dy    xbox xx1 xx2 xx2 xx1 xx1    ybox yy1 yy1 yy2 yy2 yy1    if n_elements bg_color  ne 0 then begin     if  p color eq 0 and bg_color eq 0 then bgc 255 else bgc bg_color     polyfill xbox ybox color bgc device   endif    if n_elements fg_color  eq 0 then color   0 else color fg_color    for i_line   0 n_lines 1 do begin     yy   yy dy     print xx yy lines i_line charsize     xyouts  xx  yy  lines i_line   device  charsize charsize          alignment align  color color  font 1  _extra   ex   endfor   if keyword_set box  then plots xbox ybox color color device   return end "); 
    397 a[395] = new Array("./Utilities/undefine.html", "undefine.pro", "", "             file_comments    erase a variable   same thing that delvar but usable in a program and usable    for one variable simultaneously      categories    Utilities         param VARNAME  in required     The name of the variable we want erase      examples   IDL  a 1   IDL  undefine a     Compiled module: UNDEFINE    IDL  help  a   A               UNDEFINED         history trouve sur la page web de D Fanning    http: www dfanning com :  QUESTION: How do I make an IDL variable have a type  undefined    ANSWER: At the main IDL level you can use the IDL procedure DELVAR to  delete an IDL variable and make it undefined  Inside of procedures  and functions  I use this little program named UNDEFINE that I got  from Andrew Cool at the DSTO High Frequency Radar Division in  Adelaide  Australia       version  Id: undefine pro 163 2006 08 29 12:59:46Z navarro                PRO undefine  varname       compile_opt idl2  strictarrsubs      tempvar   SIZE TEMPORARY varname     END "); 
    398 a[396] = new Array("./Utilities/xfile.html", "xfile.pro", "", "             file_comments    display in a widget an ASCII file    It is the same thing that xdisplayfile but here  we use it    to display the content of a procedure or of a function     even if it is not in the current directory  thanks to the path       categories    Utilities      param FILENAME  in required     It is the name of the procedure or of the function    we want to display  with or without  pro at the end       keyword _EXTRA    used to pass your keywords      examples xfile plt       history Sebastien Masson  smasson lodyc jussieu fr                          7 1 99                         6 7 1999: compatibility mac and windows      version  Id: xfile pro 163 2006 08 29 12:59:46Z navarro             PRO xfile  filename  _extra   ex     compile_opt idl2  strictarrsubs   pfile   strlowcase filename      we have to find the full name        if strpos pfile pro  lt 0 then pfile pfile pro      thisOS   strupcase strmid version os_family  0  3     CASE thisOS of        MAC :BEGIN   sep    :    pathsep       end        WIN :BEGIN   sep       pathsep       end       ELSE: BEGIN   sep       pathsep    :    end    ENDCASE    cd  current   current    if strpos pfile sep  lt 0 then BEGIN       if rstrpos current sep  NE strlen current 1 then current   current sep       multipath   str_sep path pathsep        if rstrpos multipath 0 sep  NE strlen multipath 0 1 then multipath   multipath  sep       pfile    current  multipath  pfile    ENDIF    i   0    repeat begin       res   findfile pfile i         i   i 1    endrep until res 0  NE   OR i EQ n_elements pfile      if res 0  NE    then BEGIN   we open the file in a widget    xdisplayfile  pfile i 1  _extra   ex    ENDIF ELSE ras   report le fichier demande n existe pas         return end"); 
    399 a[397] = new Array("./Utilities/xhelp.html", "xhelp.pro", "", "       file_comments    Display an IDL procedure header using widgets and the widget manager       categories   Widget      param FILENAME  in required     A scalar string that contains the filename of the file to display      If FILENAME does not include a complete path specification  xhelp will    search for the file in the current working directory and then each of the   directories listed in  PATH environment variable   The    pro  file suffix will be appended if it is not supplied       keyword _EXTRA    used to pass your keywords      restrictions    Triggers the XMANAGER if it is not already in use       examples    Open a file and create a widget to display its contents       history Written By Steve Richards  December 1990  Graceful error recovery  DMS  Feb  1992          Modified to extract  pro documentation headers  PJR ESRG mar94         Paul Ricchiazzi                            jun93         Institute for Computational Earth System Science         University of California  Santa Barbara    7 1 99 : legeres mofification par Sebastien Masson : utilisation de    xdisplayfile  de findfile et de _extra     6 7 1999: compatibility mac and windows      version  Id: xhelp pro 163 2006 08 29 12:59:46Z navarro       PRO xhelp  filename  _extra ex     compile_opt idl2  strictarrsubs      Are we sure filename is a string     cquoidonc   size filename   type     if cquoidonc NE 7 then begin       ras   report Input parameter must be a string and not a  size filename   tname        return    endif   We have to find the full name     pfile FILENAME    if strpos pfile pro  lt 0 then pfile pfile pro      thisOS   strupcase strmid version os_family  0  3     CASE thisOS of        MAC :BEGIN   sep    :    pathsep       end        WIN :BEGIN   sep       pathsep       end       ELSE: BEGIN   sep       pathsep    :    end    ENDCASE    cd  current   current    if strpos pfile sep  lt 0 then BEGIN       if rstrpos current sep  NE strlen current 1 then current   current sep       multipath   str_sep path pathsep        if rstrpos multipath 0 sep  NE strlen multipath 0 1 then multipath   multipath  sep       pfile    current  multipath  pfile    ENDIF   We test each possible name to find where the file is     nfile n_elements pfile     n   0    repeat begin       res   findfile pfile n         n   n 1    endrep until res 0  NE   OR n EQ n_elements pfile      if res 0  NE   then BEGIN       openr  unit pfile n 1   get_lun   opening of the file   we select the heading piece            a   strarr 1000            Maximum   of lines       xsize 0       i   0       c           readon 0       while not eof unit  do begin          readf unit c          if strpos c  eq 0 then readon 0          if readon then BEGIN             dum where byte c  eq 9b ntab    count tab characters             xsize xsize    strlen c 8 ntab              a i    strmid c 1 200              i   i   1          endif          if strpos c  eq 0 then readon 1       endwhile       if i EQ 0 then            ras   report le programme a etait mal ecrit  il n y a pas d en tete  utiliser xfile pro  ELSE BEGIN           a   a 0:i 1    we wrote the a s content in a widget          xdisplayfile toto text   a title pfile n 1  _extra   ex       ENDELSE        FREE_LUN  unit          free the file unit     ENDIF ELSE ras   report le fichier demande n existe pas      return end "); 
    400 a[398] = new Array("./buildinit.html", "buildinit.pro", "", "     file_comments        categories        param PARENT  in required    The ID of the parent widget       keyword COLUMN    Buttons will be arranged in the number of columns specified by this keyword       keyword ROW   Buttons will be arranged in the number of rows specified by this keyword       keyword EVENT_FUNC   The name of an optional user supplied event function for buttons     This function is called with the return value structure whenever a    button is pressed  and follows the conventions for user written event functions       keyword FLOATING        keyword INTEGER        keyword LONG        keyword STRING        keyword FONT   The name of the font to be used for the button titles  If this keyword    is not specified  the default font is used       keyword FRAME   Specifies the width of the frame to be drawn around the base       keyword TITLE   The title of the window      keyword UVALUE   The user value to be associated with the widget       keyword VALUE        keyword RETURN_EVENTS        keyword ALL_EVENTS        keyword FIELDFONT        keyword NOEDIT        keyword TEXT_FRAME        keyword XSIZE   The width of the base        keyword YSIZE   The height of the base       keyword UNAME   The user name to be associated with the widget       returns        uses        restrictions:        examples        history        version    Id: buildinit pro 163 2006 08 29 12:59:46Z navarro               slightly modified version of cw_field  FUNCTION cw_field2  Parent  COLUMN Column  ROW Row        EVENT_FUNC   efun        FLOATING Float  INTEGER Int  LONG Long  STRING String        FONT LabelFont  FRAME Frame  TITLE Title  UVALUE UValue  VALUE TextValueIn        RETURN_EVENTS ReturnEvents  ALL_EVENTS AllUpdates        FIELDFONT FieldFont  NOEDIT NoEdit  TEXT_FRAME Text_Frame        XSIZE XSize  YSIZE YSize  UNAME uname     FLOOR vmin  CEILING vmax      compile_opt idl2  strictarrsubs     resolve_routine   cw_field   compile_full_file   is_function         Examine our keyword list and set default values         for keywords that are not explicitly set       Column        KEYWORD_SET Column      Row           1   Column     AllEvents         1   KEYWORD_SET NoEdit         Enum Update   None  All  CRonly       Update        0     IF KEYWORD_SET AllUpdates  THEN Update    1     IF KEYWORD_SET ReturnEvents  THEN Update      2      IF N_ELEMENTS efun  LE 0 THEN efun         IF N_ELEMENTS Title  EQ 0 THEN Title Input Field:      TextValue    N_ELEMENTS TextValueIn  gt 0    TextValueIn :         Convert non string values to strings      if  SIZE TextValue   TNAME  ne  STRING  then           TextValue   STRTRIM TextValue 2      IF N_ELEMENTS YSize  EQ 0 THEN YSize 1     IF N_ELEMENTS uname  EQ 0 THEN uname CW_FIELD_UNAME       Type      0   string is default     IF KEYWORD_SET Float  THEN  Type      1     IF KEYWORD_SET Int  THEN    Type      2     IF KEYWORD_SET Long  THEN   Type      3          Don t allow multiline non string widgets     if  Type ne 0  then           YSize 1     YSize   YSize   1          Build Widget      Base      WIDGET_BASE Parent  ROW Row  COLUMN Column  UVALUE UValue                EVENT_FUNC CW_FIELD_EVENT                PRO_SET_VALUE CW_FIELD_SET                FUNC_GET_VALUE CW_FIELD_GET                FRAME Frame  UNAME uname       FOR i   0  n_elements title 1 DO         Label     WIDGET_LABEL Base  VALUE   Title i  FONT   LabelFont                                 UNAME   uname _LABEL   align_left      Text      WIDGET_TEXT Base  VALUE   TextValue                XSIZE XSize  YSIZE YSize  FONT FieldFont                ALL_EVENTS AllEvents                EDITABLE AllEvents AND TYPE EQ 0                FRAME Text_Frame                 UNAME uname _TEXT                 NO_ECHO AllEvents AND  TYPE NE 0         Save our internal state in the first child widget     State                 efun: efun                TextId:Text               Title:Title               Update:Update             Type:Type                   WIDGET_CONTROL  WIDGET_INFO Base   CHILD  SET_UVALUE State   NO_COPY     RETURN  Base   END              file_comments        categories         param EVENT        returns          uses          restrictions          examples          history          version     Id: buildinit pro 163 2006 08 29 12:59:46Z navarro     PRO printerdef_event  event   get back the ids of the cw_field widgets     compile_opt idl2  strictarrsubs     widget_control  event id  get_uvalue   cwids   IF size cwids   n_dimensions  EQ 1 THEN cwids   reform cwids  3  1  help  cwids   dims   size cwids   dimensions  help   dims print   dims   results   strarr dims    FOR i   0  dims 1 1 DO BEGIN     widget_control  cwids 0  i  get_value   res   results 0  i    res     widget_control  cwids 1  i  get_value   res   results 1  i    res     widget_control  cwids 2  i  get_value   res   results 2  i    res   ENDFOR   nothing   where results EQ   count    IF count NE 0 THEN BEGIN     nothing   dialog_message Some of the text box are still empty  dialog_parent   event top   information      return   ENDIF   now we give the result to buildinit pro by using the pointer uvalue    widget_control  event top  get_uvalue   ptresult     ptresult   temporary results    we destroy the widget    widget_control  event top   destroy   RETURN END              file_comments        categories         param EVENT        returns          uses          restrictions          examples          history          version     Id: buildinit pro 163 2006 08 29 12:59:46Z navarro     PRO papsize_event  event   get back the ids of the cw_field widgets     compile_opt idl2  strictarrsubs     widget_control  event id  get_uvalue   uvalue   IF uvalue 0  NE  ok  THEN return   idist   widget_info event top  find_by_uname    list    id   widget_info idist   list_select    widget_control  idist  get_uvalue   selected   selected   selected id    selected   strsplit selected   extract    now we give the result to buildinit pro by using the pointer uvalue    widget_control  event top  get_uvalue   ptresult     ptresult    float selected 3  float selected 4    we destroy the widget    widget_control  event top   destroy   RETURN END              file_comments        categories         param EVENT        returns          uses          restrictions          examples          history          version     Id: buildinit pro 163 2006 08 29 12:59:46Z navarro     PRO xask_event  event   now we give the answer to buildinit pro by using the pointer uvalue     compile_opt idl2  strictarrsubs      widget_control  event top  get_uvalue   ptranswer     ptranswer   event value   we destroy the widget    widget_control  event top   destroy   RETURN END              file_comments        categories         keyword _EXTRA   Used to pass your keywords      returns          uses          restrictions          examples          history          version     Id: buildinit pro 163 2006 08 29 12:59:46Z navarro     FUNCTION xask  _extra   ex     compile_opt idl2  strictarrsubs     base   widget_base     field   cw_field2 base   frame   return_events   column  _extra   ex     ptranswer   ptr_new allocate_heap    we realize the widget and wait for an answer   widget_control  base   realize  set_uvalue   ptranswer   xmanager   xask  base   we get the answer   answer    ptranswer   we freeing the pointer   ptr_free  ptranswer   RETURN  answer END              file_comments        categories        keyword TITLE   The title of the window      keyword NOMARK         keyword NOWRITE        returns          uses          restrictions          examples          history          version     Id: buildinit pro 163 2006 08 29 12:59:46Z navarro     FUNCTION getdir  title   title  nomark   nomark  nowrite   nowrite     compile_opt idl2  strictarrsubs        REPEAT BEGIN     dir   dialog_pickfile directory   must_exist  title   title    make sure dir is ok  check read write access and directory separator mark     dir   file_search dir   test_directory   test_read                           test_write   1   keyword_set nowrite                            mark_directory   1   keyword_set nomark      dir   dir 0    ENDREP UNTIL dir NE      RETURN  dir END              file_comments        categories        returns          uses          restrictions          examples          history          version     Id: buildinit pro 163 2006 08 29 12:59:46Z navarro     PRO buildinit       compile_opt idl2  strictarrsubs     IF fix strmid version release  0  1  LT 6 THEN BEGIN      print                                print                        ERROR       print                                print   This version of SAXO needs at least IDL version 6 0      print                                print                        ERROR       print                                return   ENDIF   IF lmgr demo  EQ 1 THEN BEGIN     print   impossible to use buildinit in demo mode      return   ENDIF     init                     This is the initialisation file                  it defines the  path and the defaut values of some of the common variables                                  this is supposed to speed up IDL                                  a   fltarr 1000 1000 100                  a   0                                  path definition                      define  myIDL  directory   myIDL   getdir title    Select the home directory  my IDL   nomark    define  SAXO  directory   saxodir   getdir title    Select SAXO directory   nomark   nowrite    define the  path   init    init   path   expand_path     myIDL                            :    expand_path     saxodir                            :    expand_path     dir      should we keep the compatibility with the old version      yes   dialog_message shall we keep the compatibility                               with the old version    question   default_no    yes   strlowcase yes       init    init                                 compatibility with the old version                                 keep_compatibility      strtrim fix yes EQ  yes  2       define all the commons     init    init                                 define all the commons                                 all_cm      define default directories     init    init                                 define default directories                                 homedir   isadirectory myIDL  title    Select the default HOME directory    iodir   getdir title    Select the default IO directory    init    init                iodir   isadirectory iodir  title    Select the default IO directory    psdir   getdir title    Select the default postscripts directory    init    init                psdir   isadirectory psdir  title    Select the default postscripts directory    imagedir   getdir title    Select the default images directory    init    init                imagedir   isadirectory imagedir  title    Select the default images directory    animdir   getdir title    Select the default animations directory    init    init                animdir   isadirectory animdir  title    Select the default animations directory      number of printer     ptnumb   xask title    Number of accessible printers  value   0   long      define all the printer parameters      init    init                                 define printer parameters                        IF ptnumb NE 0 THEN BEGIN     base   widget_base column   frame       cwids   lonarr 3  ptnumb      FOR i   0  ptnumb 1 DO BEGIN       subbase   widget_base base   row        cwids 0  i    cw_field subbase   string                                  Title    printer_human_names strtrim i  2             cwids 1  i    cw_field subbase   string                                  Title    printer_machine_names strtrim i  2             cwids 2  i    cw_field subbase   string  value    lpr  P                                   Title    print_command strtrim i  2           ENDFOR     trash   widget_button base  value    ok  uvalue   cwids      ptresult   ptr_new allocate_heap    we realize the widget and wait for an answer     widget_control  base   realize  set_uvalue   ptresult     xmanager   printerdef  base       init    init                  printer_human_names   strarr strtrim ptnumb  2                   printer_machine_names   strarr strtrim ptnumb  2                   print_command   strarr strtrim ptnumb  2      FOR i   0  ptnumb 1 DO BEGIN       init    init                    printer_human_names strtrim i  2                         ptresult 0  i                     printer_machine_names strtrim i  2                         ptresult 1  i                     print_command strtrim i  2                         ptresult 2  i      ENDFOR   we freeing the pointer     ptr_free  ptresult   ENDIF ELSE BEGIN     init    init                  printer_human_names                      printer_machine_names                      print_command       ENDELSE      Colors     init    init                                 colors                                  device  decomposed   0                 device  retain   2      default color tables     loadct  get_names   names    ntables   40   title                                                                      Choose the default color table                                                                        the following lines come from loadct procedure    nlines    ntables   2    3  of lines to print   nend   nlines    nlines 3    ntables    for i   0  nend 1 do           Print each line     title    title                  string format    i2   a17  3x  i2   a17  3x  i2   a17                            i  names i  i nlines  names i nlines                            i 2 nlines  xask title   title  value   39   long   xask title   title  value   0   long    2   init    init                archive_ps    strtrim archive_ps  2                                                  end of the part that should be modified by the users                                                  if needed  keep compatibility with the old version                                 updateold                       filename   xask title    name of the init file   written in homedir:     myIDL     value    init pro   string    journal  myIDL       filename   FOR i   0  n_elements init 1 DO journal  init i    journal    RETURN END"); 
     58a[56] = new Array("./Interpolation/extrapolate.html", "extrapolate.pro", "", "     file_comments   extrapolate data  zinput  where maskinput eq 0 by filling step by    step the coastline points with the mean value of the 8 neighbourgs    weighted by their mask value       categories    Interpolation      param zinput  in required type 2d array    data to be extrapolate      param maskinput  in required type 2d array or  1    a 2D array  the land sea mask of the output data  1 on ocean  0 on land    put  1 if input data are not masked      param nb_iteration  in optional type integer scalar default 10 E20    Maximum number if iterations done in the extrapolation process  If there   is no more masked values we exit extrapolate before reaching nb_iteration    to be sure to fill everything  you can use a very large value       keyword x_periodic  type scalar  0 or 1 default 0    put 1 to specify that the data are periodic along x axis      keyword MINVAL  type scalar default not used    to specify a minimum value to the extrapolated values      keyword MAXVAL  type scalar default not used    to specify a maximum value to the extrapolated values      keyword GE0  type scalar 0 or 1 default 0    put 1 to force the extrapolated values to be larger than 0  same as using minval 0       returns  type 2d array    the extrapolated array      examples   IDL  a extrapolate dist jpi jpj tmask 0 x_periodic    IDL  tvplus  a   IDL  tvplus  a 1 tmask 0    get the coastline:   IDL  a extrapolate tmask 0 tmask 0 1 x_periodic    IDL  tvplus  a tmask 0       history    Originaly written by G  Roulet    Sebastien Masson  smasson lodyc jussieu fr       version  Id: extrapolate pro 202 2007 01 12 11:00:06Z smasson       FUNCTION extrapolate  zinput  maskinput  nb_iteration  x_periodic   x_periodic                           MINVAL   minval  MAXVAL   maxval  GE0   ge0     compile_opt idl2  strictarrsubs     check the number of iteration used in the extrapolation    IF n_elements nb_iteration  EQ 0 THEN nb_iteration   10 E20   IF nb_iteration EQ 0 THEN return  zinput   nx    size zinput 1    ny    size zinput 2    take care of the boundary conditions      for the x direction  we put 2 additional columns at the left and   right side of the array    for the y direction  we put 2 additional lines at the bottom and   top side of the array    These changes allow us to use shift function without taking care of   the x and y periodicity      ztmp   bytarr nx 2  ny 2    IF n_elements maskinput  EQ 1 AND maskinput 0  EQ  1 THEN maskinput   replicate 1b  nx  ny    IF n_elements maskinput  NE nx ny THEN BEGIN      print   input grid mask do not have the good size      return   1   ENDIF   ztmp 1:nx  1:ny    byte maskinput    msk   temporary ztmp      ztmp   replicate 1 e20  nx 2  ny 2    ztmp 1:nx  1:ny    zinput   if keyword_set x_periodic  then begin     ztmp 0  1:ny    zinput nx 1        ztmp nx 1  1:ny    zinput 0      ENDIF   remove NaN points if there is some    nan   where finite ztmp  EQ 0  cnt_nan    IF cnt_nan NE 0 THEN ztmp temporary nan    1 e20   z   temporary ztmp    nx2   nx 2   ny2   ny 2       extrapolation     sqrtinv   1 sqrt 2      cnt   1   When we look for the coast line  we don t want to select the   borderlines of the array    we force the value of the mask for   those lines    msk 0      1b   msk nx 1      1b   msk  0    1b   msk  ny 1    1b   find the land points   land   where msk EQ 0  cnt_land      WHILE cnt LE nb_iteration AND cnt_land NE 0 DO BEGIN     find the coast line points      Once the land points list has been found  we change back the the   mask values for the boundary conditions      msk 0      0b     msk nx 1      0b     msk  0    0b     msk  ny 1    0b     if keyword_set x_periodic  then begin       msk 0      msk nx          msk nx 1      msk 1        endif     we compute the weighted number of sea neighbourgs    those 4 neighbours have a weight of 1:                         those 4 neighbours have a weight of 1 sqrt 2 :                                 As we make sure that none of the land points are located on the   border of the array  we can compute the weight without shift    faster        weight   msk land 1 msk land 1 msk land nx2 msk land nx2                  sqrtinv msk land nx2 1 msk land nx2 1                            msk land nx2 1 msk land nx2 1    list all the points that have sea neighbourgs     ok   where weight GT 0    the coastline points     coast   land ok    their weighted number of sea neighbourgs      weight   weight temporary ok      fill the coastine points       z   temporary z msk       zcoast   z 1 coast z 1 coast z nx2 coast z nx2 coast                  1 sqrt 2 z nx2 1 coast z nx2 1 coast                               z nx2 1 coast z nx2 1 coast        IF keyword_set ge0  THEN zcoast   0    temporary zcoast      IF n_elements minval  NE 0 THEN zcoast   minval   temporary zcoast      IF n_elements maxval  NE 0 THEN zcoast   temporary zcoast   we force the value of the mask for   those lines      msk 0      1b     msk nx 1      1b     msk  0    1b     msk  ny 1    1b   find the land points     land   where msk EQ 0  cnt_land      ENDWHILE     we return the original size of the array       return  z 1:nx  1:ny  END "); 
     59a[57] = new Array("./Interpolation/extrapsmooth.html", "extrapsmooth.pro", "", "     file_comments   similar to extrapolate but could to the job in a better way because the   extrapolated values are smoothed  takes more time than extrapolate    extrapolate data where maskinput eq 0 by filling   step by step the coastline points with the mean value of the 8 neighbourgs         categories   Interpolation      param in  in required type 2d array    data to be extrapolate      param maskinput  in required type 2d array or  1    a 2D array  the land sea mask of the output data  1 on ocean  0 on land    put  1 if input data are not masked      keyword MINVAL  type scalar default not used    to specify a minimum value to the extrapolated values      keyword MAXVAL  type scalar default not used    to specify a maximum value to the extrapolated values      keyword GE0  type scalar 0 or 1 default 0    put 1 to force the extrapolated values to be larger than 0  same as using minval 0       returns   the extrapolated array with no more masked values      restrictions   You cannot specify the number of iterations done in the extrapolation process      examples   IDL  a extrapsmooth dist jpi jpj tmask 0 x_periodic    IDL  tvplus  a   compare to extrapolate result:   IDL  b extrapolate dist jpi jpj tmask 0 x_periodic    IDL  tvplus  b  window   1      history    January 2007: Sebastien Masson  smasson lodyc jussieu fr       version    Id: extrapsmooth pro 202 2007 01 12 11:00:06Z smasson     FUNCTION extrapsmooth  in  mskin  x_periodic   x_periodic  MINVAL   minval  MAXVAL   maxval  GE0   ge0       compile_opt strictarr  strictarrsubs      sz   size reform in      IF sz 0  NE 2 THEN BEGIN      print   Input arrays must have 2 dimensions      return   1   ENDIF   nx   sz 1    ny   sz 2    IF n_elements mskin  EQ 1 AND mskin 0  EQ  1 THEN mskin   replicate 1b  nx  ny    IF n_elements mskin  NE nx ny THEN BEGIN      print   input grid mask do not have the good size      return   1   ENDIF     out   reform in    whmsk   where mskin EQ 0  nbr    IF nbr NE 0 THEN out temporary whmsk     values f_nan   add values on each side of the array to avoid bondary effects   nx2   nx 2   ny2   ny 2   add   replicate values f_nan  nx  ny2    out    add   temporary out   add    IF keyword_set x_periodic   THEN BEGIN     add1   out 0:nx2        add2   out nx nx2:nx 1        out    add2   temporary out  add1    ENDIF ELSE BEGIN      add   replicate values f_nan  nx2  ny 2 ny2      out    add   temporary out  add    ENDELSE     msk0   where finite out  EQ 0    nnan   total finite out   nan    i   1   WHILE nnan NE 0 DO BEGIN     tmp   smooth out  2 i   1   nan        find only the changed values that where on land     new   where finite out  EQ 0 AND finite tmp  EQ 1  nnew      IF nnew EQ 0 then nnan   0 ELSE BEGIN       IF keyword_set ge0  THEN tmp   0    temporary tmp        IF n_elements minval  NE 0 THEN tmp   minval   temporary tmp        IF n_elements maxval  NE 0 THEN tmp   temporary tmp   temporary out    IF n_elements minval  NE 0 THEN out   minval   temporary out    IF n_elements maxval  NE 0 THEN out   temporary out    maxval   get back to the original domain   out    temporary out nx2:nx nx2 1  ny2:ny ny2 1    put back the non maskqed values   whmsk   where mskin NE 0    out whmsk    in whmsk      return  out END"); 
     60a[58] = new Array("./Interpolation/fromirr.html", "fromirr.pro", "", "       file_comments   interpolate data from an irregular 2D grid to any 2D grid      Only 1 method available   bilinear      categories    Interpolation      param method  in required type string    a string defining the interpolation method  must be  bilinear       param datain  in required type 2d array    a 2D array the input data to interpolate      param lonin  in optional type 2d array    a 2D array defining the longitude of the input data      param latin  in optional type 2d array    a 2D array defining the latitude of the input data       param mskin  in optional type 2d array or  1    a 2D array  the land sea mask of the input data  1 on ocean  0 on land    put  1 if input data are not masked      param lonout  in optional type 1d or 2d array    1D or 2D array defining the longitude of the output data       param latout  in optional type 1d or 2d array    1D or 2D array defining the latitude of the output data       param mskout  in required type 2d array or  1    a 2D array  the land sea mask of the output data  1 on ocean  0 on land    put  1 if output data are not masked      keyword WEIG  type 2d array     see ADDR       keyword ADDR  type 2d array    2D arrays  weig and addr are the weight and addresses used to   perform the interpolation:            dataout   total weig datain addr  1             dataout   reform dataout  jpio  jpjo   over    Those keywords can be set to named variables  that are undefined or equal to 0  into which the   values will be copied when the current routine exits  Next  they can be used to perform   the interpolation without computing again those 2 parameters  This greatly   speed up the interpolation  In that case  lonin  latin  lonout and latout are not necessary       returns   2D array the interpolated data      restrictions   We supposed the data are located on a sphere  with a periodicity along   the longitude    Note that the input data can contain the same cells several times    like ORCA grid near the north pole boundary       examples     IDL  tncep   fromirr bilinear  topa  glamt  gphit  tmask 0  lonout  latout  mskout       or     IDL  t1ncep   fromirr bilinear  topa  glamt  gphit  tmask 0  lonout  latout  mskout                                  WEIG   a  ADDR   b    IDL  help  a  b   IDL  t2ncep   fromirr bilinear  topa  WEIG   a  ADDR   b       history    June 2006: Sebastien Masson  smasson lodyc jussieu fr       version  Id: fromirr pro 202 2007 01 12 11:00:06Z smasson             FUNCTION fromirr  method  datain  lonin  latin  mskin  lonout  latout  mskout                       WEIG   weig  ADDR   addr     compile_opt strictarr  strictarrsubs       atmospheric grid parameters       alon   lonin     alat   latin     get_gridparams  alon  alat  jpia  jpja  2   double     Oceanic grid parameters       olon   lonout     olat   latout     get_gridparams  olon  olat  jpio  jpjo  2   double     Compute weight and address     IF NOT  keyword_set weig  AND keyword_set addr  THEN BEGIN     CASE method OF        bilinear :compute_fromirr_bilinear_weigaddr  alon  alat  mskin  olon  olat  mskout  weig  addr       ELSE:BEGIN         print    unknown interpolation method  we stop          stop       ENDELSE     ENDCASE   ENDIF     to the interpolation     dataout   total weig datain addr  1    dataout   reform dataout  jpio  jpjo   over      RETURN  dataout END"); 
     61a[59] = new Array("./Interpolation/fromreg.html", "fromreg.pro", "", "       file_comments   interpolate data from a  regular rectangular grid  to any grid      2 methods available: bilinear and imoms3     A  regular rectangular grid  is defined as a grid for which each longitudes lines have     the same latitude and each latitudes columns have the same longitude       categories    Interpolation      param method  in required type string    a string defining the interpolation method    must be  bilinear  or  imoms3       param datain  in required type 2d array    a 2D array the input data to interpolate      param lonin  in optional type 1d or 2d array    1D or 2D array defining the longitude of the input data      param latin  in optional type 1d or 2d array    1D or 2D array defining the latitude of the input data      param lonout  in optional type 1d or 2d array    1D or 2D array defining the longitude of the output data      param latout  in required type 1d or 2d array    1D or 2D array defining the latitude of the output data      keyword WEIG  type 2d array     see ADDR       keyword ADDR  type 2d array    2D arrays  weig and addr are the weight and addresses used to   perform the interpolation:            dataout   total weig datain addr  1             dataout   reform dataout  jpio  jpjo   over    Those keywords can be set to named variables  that are undefined or equal to 0  into which the   values will be copied when the current routine exits  Next  they can be used to perform   the interpolation without computing again those 2 parameters  In that   case  lonin  latin  lonout and latout are not necessary       keyword NONORTHERNLINE   activate if you don t want to take into account the northern line   of the input data when performing the interpolation       keyword NOSOUTHERNLINE   activate if you don t want to take into account the southern line   of the input data when performing the interpolation       returns   2D array the interpolated data      restrictions   We supposed the data are located on a sphere  with a periodicity along the   longitude       examples     IDL  topa   fromreg bilinear  tncep  xncep  yncep  glamt  gphit       or     IDL  t1opa   fromreg bilinear  t1ncep  xncep  yncep  glamt  gphit  WEIG   a  ADDR   b    IDL  help  a  b   IDL  t2opa   fromreg bilinear  t2ncep  xncep  WEIG   a  ADDR   b       history    November 2005: Sebastien Masson  smasson lodyc jussieu fr       version  Id: fromreg pro 163 2006 08 29 12:59:46Z navarro             FUNCTION fromreg  method  datain  lonin  latin  lonout  latout                       WEIG   weig  ADDR   addr                       NONORTHERNLINE   nonorthernline                       NOSOUTHERNLINE   nosouthernline     compile_opt idl2  strictarrsubs       atmospheric grid parameters       alon   lonin     alat   latin     get_gridparams  alon  alat  jpia  jpja  1   double     Oceanic grid parameters       olon   lonout     olat   latout     get_gridparams  olon  olat  jpio  jpjo  2   double     Compute weight and address     IF NOT  keyword_set weig  AND keyword_set addr  THEN BEGIN     CASE method OF        bilinear :compute_fromreg_bilinear_weigaddr  alon  alat  olon  olat  weig  addr  NONORTHERNLINE   nonorthernline  NOSOUTHERNLINE   nosouthernline        imoms3 :  compute_fromreg_imoms3_weigaddr    alon  alat  olon  olat  weig  addr  NONORTHERNLINE   nonorthernline  NOSOUTHERNLINE   nosouthernline       ELSE:BEGIN         print    unknown interpolation method  we stop          stop       ENDELSE     ENDCASE   ENDIF     dataout   total weig datain addr  1    dataout   reform dataout  jpio  jpjo   over      RETURN  dataout END"); 
     62a[60] = new Array("./Interpolation/get_gridparams.html", "get_gridparams.pro", "", "       file_comments   1  extract from a NetCDF file the longitude  latitude  and their dimensions   and make sure it is 1D or 2D arrays     or   2  given longitude and latitude arrays get their dimensions and make   sure they are 1D or 2D arrays      categories    Interpolation      examples     1    IDL  get_gridparams  file  lonname  latname  lon  lat  jpi  jpj  n_dimensions     or     2    IDL  get_gridparams  lon  lat  jpi  jpj  n_dimensions     1     param in1  in required    Case 1: the name of the netcdf file   Case 2: 1d or 2D arrays defining longitudes and latitudes    Out: the variable that will contain the longitudes      param in2  in required    Case 1: the name of the variable that contains the longitude in the NetCDF file   Case 2: 1d or 2D arrays defining longitudes and latitudes            Note that these arrays are also outputs and can therefore be modified    Out: the variable that will contain the latitudes      param in3  in required    Case 1: the name of the variable that contains the latitude in the NetCDF file   Case 2: the number of points in the longitudinal direction       param in4  out    Case 1: the number of points in the longitudinal direction   Case 2: the number of points in the latitudinal direction      param in5  out    Case 1: the number of points in the latitudinal direction   Case 2: 1 or 2 to specify if lon and lat should be 1D  jpi or jpj    arrays or 2D arrays  jpi jpj  Note that of  n_dimensions   1  then the   grid must be regular  each longitudes must be the same for all latitudes   and each latitudes should be the same for all longitudes       param in6  out    the variable that will contain the longitudes      param in7  out    the variable that will contain the latitudes      param in8  out    1 or 2 to specify if lon and lat should be 1D  jpi or jpj       keyword DOUBLE   use double precision to perform the computation      examples     1  IDL  ncdf_get_gridparams   coordinates_ORCA_R05 nc   glamt   gphit                   olon  olat  jpio  jpjo  2     2  IDL  ncdf_get_gridparams  olon  olat  jpio  jpjo  2      history    November 2005: Sebastien Masson  smasson lodyc jussieu fr       version  Id: get_gridparams pro 163 2006 08 29 12:59:46Z navarro               PRO get_gridparams  in1    in2    in3      in4  in5  in6  in7  in8  DOUBLE   double                    file  lonname  latname  lon  lat  jpi  jpj  n_dimensions                     lon    lat    jpi      jpj  n_dimensions       compile_opt idl2  strictarrsubs     CASE n_params  OF     8:BEGIN   get longitude and latitude       IF file_test in1  EQ 0 THEN BEGIN         print   file     in1     does not exist          stop       ENDIF       cdfido   ncdf_open in1        ncdf_varget  cdfido  in2  lon       ncdf_varget  cdfido  in3  lat       ncdf_close  cdfido       n_dimensions   in8     END     5:BEGIN       lon   temporary in1        lat   temporary in2        n_dimensions   in5     END     ELSE:BEGIN       print   Bad nimber of input parameters        stop     end   ENDCASE     sizelon   size lon    sizelat   size lat    CASE 1 OF     lon and lat are 1D arrays       sizelon 0  EQ 1 AND sizelat 0  EQ 1:BEGIN   get jpi and jpj       jpi   sizelon 1        jpj   sizelat 1    make sure that lon and lat have the good number of dimensions       CASE n_dimensions OF         1:         2:BEGIN   make lon and lat 2D arrays           lon   temporary lon    replicate 1  jpj            lat   replicate 1  jpi    temporary lat          END         ELSE:stop       ENDCASE     END     lon is 2D array and lat is 1D array       sizelon 0  EQ 2 AND sizelat 0  EQ 1:BEGIN   get jpi and jpj       jpi   sizelon 1        jpj   sizelon 2        IF jpj NE n_elements lat  THEN stop   make sure that lon and lat have the good number of dimensions       CASE n_dimensions OF         1:BEGIN           IF array_equal lon  lon  0    replicate 1  jpj  NE 1 THEN BEGIN             print   Longitudes are not the same for all latitudes  imposible to extract a 1D array of the longitudes              stop           ENDIF           lon   lon  0          END         2:lat   replicate 1  jpi    temporary lat          ELSE:stop       ENDCASE     END     lon is 1D array and lat is 2D array       sizelon 0  EQ 1 AND sizelat 0  EQ 2:BEGIN   get jpi and jpj       jpi   sizelat 1        jpj   sizelat 2        IF jpi NE n_elements lon  THEN stop   make sure that lon and lat have the good number of dimensions       CASE n_dimensions OF         1:BEGIN           IF array_equal lat  replicate 1  jpi    lat 0    NE 1 THEN BEGIN             print   Latitudes are not the same for all longitudes  imposible to extract a 1D array of the latitudes              stop           ENDIF           lat   reform lat 0            END         2:lon   temporary lon    replicate 1  jpj          ELSE:stop       ENDCASE     END     lon and lat are 2D arrays       sizelon 0  EQ 2 AND sizelat 0  EQ 2:BEGIN   get jpi and jpj       IF array_equal sizelon 1:2  sizelat 1:2  NE 1 THEN stop       jpi   sizelon 1        jpj   sizelon 2    make sure that lon and lat have the good number of dimensions       CASE n_dimensions OF         1:BEGIN           IF array_equal lon  lon  0    replicate 1  jpj  NE 1 THEN BEGIN             print   Longitudes are not the same for all latitudes  imposible to extract a 1D array of the longitudes              stop           ENDIF           lon   lon  0            IF array_equal lat  replicate 1  jpi    reform lat 0    NE 1 THEN BEGIN             print   Latitudes are not the same for all longitudes  imposible to extract a 1D array of the latitudes              stop           ENDIF         lat   reform lat 0            END         2:         ELSE:stop       ENDCASE     END     lon and lat are not 1D and or 2D arrays       ELSE:stop   ENDCASE       double keyword     if keyword_set double  then BEGIN     lon   double temporary lon      lat   double temporary lat    ENDIF     give back the right outparameters       CASE n_params  OF     8:BEGIN       in4   temporary lon        in5   temporary lat        in6   temporary jpi        in7   temporary jpj      END     5:BEGIN       in1   temporary lon        in2   temporary lat        in3   temporary jpi        in4   temporary jpj      END   ENDCASE    return END"); 
     63a[61] = new Array("./Interpolation/imoms3.html", "imoms3.pro", "", "         param xin  in required       version  Id: imoms3 pro 134 2006 07 07 10:19:08Z navarro       FUNCTION imoms3  xin     compile_opt idl2  strictarrsubs      x   abs xin    y   fltarr n_elements x     test1   where x LT 1    IF test1 0  NE  1 THEN BEGIN     xtmp   x test1      y test1    0 5 xtmp xtmp xtmp  xtmp xtmp  0 5 xtmp   1   ENDIF   test1   where x LT 2 AND x GE 1    IF test1 0  NE  1 THEN BEGIN     xtmp   x test1      y test1     1 6 xtmp xtmp xtmp   xtmp xtmp    11 6 xtmp   1   ENDIF    RETURN  y END"); 
     64a[62] = new Array("./Interpolation/inquad.html", "inquad.pro", "", "     file_comments   to find if an  x y  point is in a quadrilateral  x1 x2 x3 x4       categories    Grid      param x  in required     param y  in required    the coordinates of the point we want to know where it is    Must be a scalar if  ONSPHERE activated else can be scalar or array       param x1  in required     param y1  in required     param x2  in required     param y2  in required     param x3  in required     param y3  in required     param x4  in required     param y4  in required    the coordinates of the quadrilateral given in the CLOCKWISE order    Scalar or array       keyword DOUBLE   use double precision to perform the computation      keyword ONSPHERE   to specify that the quadrilateral are on a sphere and   that their coordinates are longitude latitude coordinates  In this   case  est west periodicity  poles singularity and other pbs   related to longitude latitude coordinates are managed   automatically       keyword ZOOMRADIUS  default 4    the zoom  circle centered on the  x y  with a radius of   zoomradius degree where we look for the the quadrilateral which   contains the  x y  point  used for the satellite projection   when  ONSPHERE is activated    4 seems to be the minimum which can be used    Can be increase if the cell size is larger than 5 degrees       keyword NOPRINT   to suppress the print messages       keyword NEWCOORD      returns   a n element vector  Where n is the number of elements of   x  res i j means that the point number i is located in the   quadrilateral number j with  0  x   1 1  2  6  7  3    IDL  y   1 1  3  3  4  7    IDL  x1   1 0 4 2    IDL  y1   1 1 4 8    IDL  x2   1 1 6 4    IDL  y2   1 5 6 8    IDL  x3   1 3 8 4    IDL  y3   1 4 4 6    IDL  x4   1 2 6 2    IDL  y4   1 0 2 6    IDL  splot   0 10   0 10  xstyle   1  ystyle   1 nodata   IDL  for i 0 2 do oplot   x4 i x1 i x2 i x3 i x4 i y4 i y1 i y2 i y3 i y4 i    IDL  oplot  x  y  color   20  psym   1  thick   2   IDL  print  inquad x  y  x1  y1  x2  y2  x3  y3  x4  y4      On a sphere see clickincell pro       history        Sebastien Masson  smasson lodyc jussieu fr         August 2003        Based on Convert_clic_ij pro written by Gurvan Madec      version  Id: inquad pro 163 2006 08 29 12:59:46Z navarro       FUNCTION inquad  x  y  x1  y1  x2  y2  x3  y3  x4  y4  ONSPHERE   onsphere   DOUBLE   double  ZOOMRADIUS   zoomradius  NOPRINT   noprint  NEWCOORD   newcoord     compile_opt idl2  strictarrsubs     ntofind   n_elements x    nquad   n_elements x2      IF keyword_set onsphere  THEN BEGIN   save the inputs parameters     xin   x     yin   y     x1in   x1     y1in   y1     x2in   x2     y2in   y2     x3in   x3     y3in   y3     x4in   x4     y4in   y4   for map_set     x   x MOD 360     x1   x1 MOD 360     x2   x2 MOD 360     x3   x3 MOD 360     x4   x4 MOD 360   save  map     save    map: map  x: x  y: y  z: z  p: p    do a satellite projection     IF NOT keyword_set zoomradius  THEN zoomradius   4     map_set  y 0  x 0  0   satellite  sat_p    1 zoomradius 20 6371 229  0  0   noerase   iso   noborder   use normal coordinates to reject cells which are out of the projection      tmp    convert_coord x  y   DATA   TO_NORMAL  DOUBLE   double      tmp1   convert_coord x1  y1   DATA   TO_NORMAL  DOUBLE   double      tmp2   convert_coord x2  y2   DATA   TO_NORMAL  DOUBLE   double      tmp3   convert_coord x3  y3   DATA   TO_NORMAL  DOUBLE   double      tmp4   convert_coord x4  y4   DATA   TO_NORMAL  DOUBLE   double    remove cell which have one corner with coordinates equal to NaN     test   finite tmp1 0   tmp1 1   tmp2 0   tmp2 1                         tmp3 0   tmp3 1   tmp4 0   tmp4 1        good   where temporary test  EQ 1        IF good 0  EQ  1 THEN BEGIN       IF NOT keyword_set noprint  THEN print   The point is out of the cells    restore the input parameters       x   temporary xin        y   temporary yin        x1   temporary x1in        y1   temporary y1in        x2   temporary x2in        y2   temporary y2in        x3   temporary x3in        y3   temporary y3in        x4   temporary x4in        y4   temporary y4in    restore old  map         map   save map        x   save x        y   save y        z   save z        p   save p       RETURN    1     ENDIF       x    tmp 0      y    tmp 1      x1   tmp1 0  good      y1   tmp1 1  good      x2   tmp2 0  good      y2   tmp2 1  good      x3   tmp3 0  good      y3   tmp3 1  good      x4   tmp4 0  good      y4   tmp4 1  good        tmp1    1   tmp2    1   tmp3    1   tmp4    1   remove cells which are obviously bad     test    x1 GT x AND x2 GT x AND x3 GT x AND x4 GT x          OR  x1 LT x AND x2 LT x AND x3 LT x AND x4 LT x          OR  y1 GT y AND y2 GT y AND y3 GT y AND y4 GT y          OR  y1 LT y AND y2 LT y AND y3 LT y AND y4 LT y      good2   where temporary test  EQ 0        IF good2 0  EQ  1 THEN BEGIN       IF NOT keyword_set noprint  THEN print   The point is out of the cells    restore the input parameters       x   temporary xin        y   temporary yin        x1   temporary x1in        y1   temporary y1in        x2   temporary x2in        y2   temporary y2in        x3   temporary x3in        y3   temporary y3in        x4   temporary x4in        y4   temporary y4in    restore old  map         map   save map        x   save x        y   save y        z   save z        p   save p       RETURN    1     ENDIF       nquad   n_elements good2      x1   x1 good2      y1   y1 good2      x2   x2 good2      y2   y2 good2      x3   x3 good2      y3   y3 good2      x4   x4 good2      y4   y4 good2    ENDIF       the point is inside the quadrilateral if test eq 1   with test equal to:       test    x x1 y2 y1  GE  x2 x1 y y1             x x2 y3 y2  GT  x3 x2 y y2             x x3 y4 y3  GT  x4 x3 y y3             x x4 y1 y4  GE  x1 x4 y y4      computation of test without any do loop for ntofind points  x y  and   nquad quadilateral x1 x2 x3 x4 y1 y2 y3 y4    test dimensions are  ntofind  nquad    column i of test corresponds to the intersection of point i with all   quadirlateral    row j of test corresponds to all the points localized in cell j   test        x x1     x replicate 1  nquad replicate 1  ntofind x1       y2 y1     replicate 1  ntofind y2 y1      GE  x2 x1    GE  replicate 1  ntofind x2 x1       y y1     y replicate 1  nquad replicate 1  ntofind y1      test   temporary test       x x2     x replicate 1  nquad replicate 1  ntofind x2       y3 y2     replicate 1  ntofind y3 y2      GE  x3 x2    GE  replicate 1  ntofind x3 x2       y y2     y replicate 1  nquad replicate 1  ntofind y2      test   temporary test       x x3     x replicate 1  nquad replicate 1  ntofind x3       y4 y3     replicate 1  ntofind y4 y3      GE  x4 x3    GE  replicate 1  ntofind x4 x3       y y3     y replicate 1  nquad replicate 1  ntofind y3      test   temporary test       x x4     x replicate 1  nquad replicate 1  ntofind x4       y1 y4     replicate 1  ntofind y1 y4      GE  x1 x4    GE  replicate 1  ntofind x1 x4       y y4     y replicate 1  nquad replicate 1  ntofind y4      check test if ntofind gt 1   if ntofind gt 1  each point must be localised in one uniq cell    IF ntofind GT 1 THEN BEGIN   each column of test must have only 1 position equal to one     chtest   total test  2    points out of the cells     IF  where chtest EQ 0 0  NE  1 THEN BEGIN       IF NOT keyword_set noprint  THEN print   Points number  strjoin strtrim where chtest EQ 0  1      are out of the grid        stop     ENDIF   points in more than one cell     IF  where chtest GT 1 0  NE  1 THEN BEGIN       IF NOT keyword_set noprint  THEN print   Points number  strjoin strtrim where chtest GT 1  1      are in more than one cell        stop     ENDIF   ENDIF   find the points for which test eq 1   found   where temporary test  EQ 1    if ntofind eq 1  the point may be localised in more than one grid   cell ou may also be out of the cells   IF ntofind EQ 1 THEN BEGIN     CASE 1 OF       found 0  EQ  1:BEGIN         IF NOT keyword_set noprint  THEN print   The point is out of the cells          IF keyword_set onsphere  THEN BEGIN   restore old  map             map   save map            x   save x            y   save y            z   save z            p   save p         ENDIF         return    1       END       n_elements found  GT ntofind:BEGIN         IF NOT keyword_set noprint  THEN print   The point is in more than one cell        END       ELSE:     ENDCASE   ENDIF ELSE BEGIN   if ntofind GT 1  found must be sorted   i position of found  this corresponds to one x y point     forsort   found MOD ntofind   j position of found  this corresponds to cell in which is one x y   point     found   temporary found ntofind   found must be sorted according to forsort     found   found sort forsort    ENDELSE     IF keyword_set onsphere  THEN BEGIN     IF arg_present newcoord  THEN BEGIN       found   found 0        newcoord    x1 found  y1 found                         x2 found  y2 found                         x3 found  y3 found                         x4 found  y4 found                         x  y      ENDIF       found   good good2 found    restore the input parameters     x   temporary xin      y   temporary yin      x1   temporary x1in      y1   temporary y1in      x2   temporary x2in      y2   temporary y2in      x3   temporary x3in      y3   temporary y3in      x4   temporary x4in      y4   temporary y4in    restore old  map       map   save map      x   save x      y   save y      z   save z      p   save p   ENDIF     RETURN  found END"); 
     65a[63] = new Array("./Interpolation/inrecgrid.html", "inrecgrid.pro", "", "       file_comments   given   a list of points   x y  position           the x and y limits of a rectangular grid   find in which cell is located each given point       categories    Without loop      param x1d  in required type 1d array    the x position on the points      param y1d  in required type 1d array    the y position on the points      param left  in required type 1d monotonically increasing array    the position of the  left  border of each cell       param bottom  in required type 1d monotonically increasing array    the position of the  bottom  border of each cell       keyword OUTPUT2D   to get the output as a 2d array  2 n_elements x1d    with res 0  the x index according to the 1d array defined by   left and res 1  the y index according to the 1d array defined by bottom       keyword CHECKOUT      rbgrid ubgrid  specify the right and upper boundaries of   the grid and check if some points are out       returns   the index on the cell according to the 2d array defined by left and bottom       examples     IDL  a indgen 5    IDL  b indgen 7    IDL  r inrecgrid 0 25 3 25 2 4 25 2 8 1 4 a b    IDL  print  r              20          13           7   IDL  r inrecgrid 0 25 3 25 2 4 25 2 8 1 4 a a 1 b b 1 output2d    IDL  print  r          0 00000      4 00000          3 00000      2 00000          2 00000      1 00000      history   S  Masson  smasson lodyc jussieu fr    July 3rd  2002   October 3rd  2003: use value_locate      version  Id: inrecgrid pro 163 2006 08 29 12:59:46Z navarro       FUNCTION inrecgrid  x1d  y1d  left  bottom  OUTPUT2D   output2d  CHECKOUT   checkout     compile_opt idl2  strictarrsubs     ncellx   n_elements left    ncelly   n_elements bottom      xpos   value_locate left  x1d    ypos   value_locate bottom  y1d      IF n_elements checkout  EQ 2 THEN BEGIN     out   where x1d GT checkout 0      IF out 0  NE  1 THEN xpos out     1     out   where y1d GT checkout 1      IF out 0  NE  1 THEN ypos out     1   ENDIF     IF keyword_set output2d  THEN return   transpose xpos  transpose ypos      IF NOT keyword_set checkout  THEN RETURN  xpos ncellx ypos     res   xpos ncellx ypos   out   where xpos EQ  1 OR ypos EQ  1    IF out 0  NE  1 THEN res out     1     RETURN  res  END"); 
     66a[64] = new Array("./Interpolation/ll_narcs_distances.html", "ll_narcs_distances.pro", "", "       file_comments   This function returns the longitude and latitude  lon  lat  of   a point a given arc distance  pi  Lon_lat0    1 0  2 0  Initial point specified in radians   IDL  Arc_Dist   2 0  Arc distance in radians   IDL  Az   1 0  Azimuth in radians   IDL  Result   LL_ARC_DISTANCE Lon_lat0  Arc_Dist  Az    IDL  PRINT  Result         2 91415     0 622234     IDL  lon0    10  20  100    IDL  lat0    0   10  45    IDL  lon1    10  60  280    IDL  lat1    0  10  45    IDL  dist   map_npoints lon0  lat0  lon1  lat1  azimuth   azi   two_by_two    IDL  earthradius   6378206 4d0   IDL  res   ll_narcs_distances lon0  lat0  dist earthradius  azi   degrees    IDL  print  reform res 0            10 000000       60 000000       280 00000   IDL  print  reform res 1                1 1999280e 15       10 000000       45 000000      history         Based on the IDL function ll_arc_distance pro v 1 11 2003 02 03   Sebastien Masson  smasson lodyc jussieu fr                     August 2005      version  Id: ll_narcs_distances pro 163 2006 08 29 12:59:46Z navarro         FUNCTION ll_narcs_distances  lon0  lat0  arc_dist  az  DEGREES   degs     compile_opt idl2  strictarrsubs       IF n_elements lon0  NE n_elements lat0        OR n_elements lon0  NE n_elements arc_dist        OR n_elements lon0  NE n_elements az  THEN return   1    cdist   cos arc_dist        Arc_Dist is always in radians    sdist   sin arc_dist     if keyword_set degs  then s    dpi 180 0 else s   1 0d0    ll   lat0    s               To radians   sinll1   sin ll    cosll1   cos ll    azs   az    s   phi   asin sinll1   cdist   cosll1   sdist   cos azs    ll   lon0    s               To radians   lam   ll   atan sdist   sin azs                      cosll1   cdist   sinll1   sdist   cos azs     zero   where arc_dist eq 0  count    IF count NE 0 THEN BEGIN     lam zero    lon0 zero      phi zero    lat0 zero    ENDIF    if keyword_set degs  then return  transpose lam   phi    s     ELSE return  transpose lam   phi   end"); 
     67a[65] = new Array("./Interpolation/map_npoints.html", "map_npoints.pro", "", "       file_comments   Return the distance in meter between all np0 points P0 and all   np1 points P1 on a sphere  If keyword  TWO_BY_TWO is given then   returns the distances between number n of P0 points and number   n of P1 points  in that case  np0 and np1 must be equal    Same as map_2points with the meter parameter but for n points   without do loop       categories Maps      param Lon0  in required     param Lat0  in required    np0 elements vector  longitudes and latitudes of np0 points P0      param Lon1  in required     param Lat1  in required    np1 elements vector  longitude and latitude of np1 points P1      keyword AZIMUTH   A named variable that will receive the azimuth of the great   circle connecting the two points  P0 to P1      keyword MIDDLE   to get the longitude latitude of the middle point between P0 and P1       keyword RADIANS   if set  inputs and angular outputs are in radians  otherwise degrees       keyword RADIUS  default 6378206 4d0    If given  return the distance between the two points calculated using the   given radius    Default value is the Earth radius       keyword TWO_BY_TWO   If given then Map_nPoints returns the distances between number n of   P0 points and number n of P1 points   In that case  np0 and np1 must be equal       returns   An  np0 np1  array giving the distance in meter between np0   points P0 and np1 points P1  Element  i j  of the output is the   distance between element P0 i  and P1 j    If keyword  TWO_BY_TWO is given then Map_nPoints returns   an np element vector giving the distance in meter between P0 i    and P1 i   in that case  we have np0   np1   np    if  MIDDLE see this keyword     examples   IDL  print      IDL  map_npoints 105 15 1 40 02 1 0 07 100 50 51 30 20 0    7551369 3 5600334 8   12864354  10921254    14919237  5455558 8     IDL  lon0    10  20  100    IDL  lat0    0   10  45    IDL  lon1    10  60  280    IDL  lat1    0  10  45    IDL  dist   map_npoints lon0  lat0  lon1  lat1  AZIMUTH   azi    IDL  help  dist  azi   DIST DOUBLE   Array 3  3    AZI DOUBLE   Array 3  3    IDL  print  dist 4 lindgen 3  azi 4 lindgen 3    2226414 0 4957944 5 10018863    90 000000 64 494450 4 9615627e 15   IDL  dist   map_npoints lon0  lat0  lon1  lat1  AZIMUTH   azi   TWO_BY_TWO    IDL  help  dist  azi   DIST DOUBLE   Array 3    AZI DOUBLE   Array 3    IDL  print  dist  azi   2226414 0 4957944 5 10018863    90 000000 64 494450 4 9615627e 15   IDL  print  map_2points lon0 0  lat0 0  lon1 0  lat1 0    20 000000 90 000000   IDL  print  map_npoints lon0 0  lat0 0  lon1 0  lat1 0  AZIMUTH azi 6378206 4d0    dtor  azi   20 000000   90 000000     IDL  lon0    10  20  100    IDL  lat0    0   10  45    IDL  lon1    10  60  280    IDL  lat1    0  10  45    IDL  mid   map_npoints lon0  lat0  lon1  lat1   MIDDLE   TWO_BY_TWO    IDL  print  reform mid 0  reform mid 1    0 0000000 40 000000 190 00000   0 0000000  1 5902773e 15 90 000000   IDL  print   map_2points lon0 0  lat0 0  lon1 0  lat1 0  npath   3  1    0 0000000 0 0000000   IDL  print   map_2points lon0 1  lat0 1  lon1 1  lat1 1  npath   3  1    40 000000  1 5902773e 15   IDL  print   map_2points lon0 2  lat0 2  lon1 2  lat1 2  npath   3  1    190 00000 90 000000      history   Based on the IDL function map_2points pro v 1 6 2001 01 15   Sebastien Masson  smasson lodyc jussieu fr    October 2003      version  Id: map_npoints pro 163 2006 08 29 12:59:46Z navarro       Function map_npoints  lon0  lat0  lon1  lat1  AZIMUTH   azimuth      RADIANS   radians  RADIUS   radius  MIDDLE   middle  TWO_BY_TWO   two_by_two   COMPILE_OPT idl2  strictarrsubs   IF  N_PARAMS  LT 4  THEN    MESSAGE   Incorrect number of arguments    np0   n_elements lon0   IF n_elements lat0  NE np0 THEN    MESSAGE   lon0 and lat0 must have the same number of elements   np1   n_elements lon1   IF n_elements lat1  NE np1 THEN    MESSAGE   lon1 and lat1 must have the same number of elements   if keyword_set two_by_two  AND np0 NE np1 then    MESSAGE   When using two_by_two keyword  P0 and P1 must have the same number of elements    mx   MAX ABS lat0  lat1   pi2    dpi 2  IF  mx GT  KEYWORD_SET radians    pi2 : 90  THEN    MESSAGE   Value of Latitude is out of allowed range    k   KEYWORD_SET radians    1 0d0 :  dpi 180 0  Earth equatorial radius  meters  Clarke 1866 ellipsoid  r_sphere   n_elements RADIUS  NE 0   RADIUS : 6378206 4d0    coslt1   cos k lat1   sinlt1   sin k lat1   coslt0   cos k lat0   sinlt0   sin k lat0     IF np0 EQ np1 AND np1 EQ 1 THEN two_by_two   1    if NOT keyword_set two_by_two  THEN BEGIN  coslt1   replicate 1 0d0  np0 temporary coslt1   sinlt1   replicate 1 0d0  np0 temporary sinlt1   coslt0   temporary coslt0 replicate 1 0d0  np1   sinlt0   temporary sinlt0 replicate 1 0d0  np1   ENDIF    if keyword_set two_by_two  THEN BEGIN  cosl0l1   cos k lon1 lon0   sinl0l1   sin k lon1 lon0   ENDIF ELSE BEGIN  cosl0l1   cos k replicate 1 0d0  np0 lon1 lon0 replicate 1 0d0  np1   sinl0l1   sin k replicate 1 0d0  np0 lon1 lon0 replicate 1 0d0  np1   ENDELSE   cosc   sinlt0   sinlt1   coslt0   coslt1   cosl0l1  Cos of angle between pnts   Avoid roundoff problems by clamping cosine range to  1 1   cosc    1 0d0   cosc   1 0d0    if arg_present azimuth  OR keyword_set middle  then begin  sinc   sqrt 1 0d0   cosc cosc   bad   where abs sinc  le 1 0e 7   IF bad 0  NE  1 THEN sinc bad    1  cosaz    coslt0   sinlt1   sinlt0 coslt1 cosl0l1    sinc  sinaz   sinl0l1 coslt1 sinc  IF bad 0  NE  1 THEN BEGIN  sinc bad    0 0d0  sinaz bad    0 0d0  cosaz bad    1 0d0  ENDIF  ENDIF    IF keyword_set middle  then BEGIN   s0   0 5d0   acos cosc      coss   cos s0   sins   sin s0     lats   asin sinlt0   coss   coslt0   sins   cosaz    k  lons   atan sins   sinaz  coslt0   coss   sinlt0   sins   cosaz    k    if keyword_set two_by_two  THEN BEGIN  return  transpose lon0    lons   lats   ENDIF ELSE BEGIN  return     lon0 replicate 1 0d0  np1    lons   lats     ENDELSE    ENDIF    if arg_present azimuth  then begin  azimuth   atan sinaz  cosaz   IF k NE 1 0d0 THEN azimuth   temporary azimuth    k  ENDIF  return  acos cosc    r_sphere   end"); 
     68a[66] = new Array("./Interpolation/neighbor.html", "neighbor.pro", "", "       file_comments   find the closetest point of  P0  within a list of np1 points   P1 Which can be on a sphere      categories Maps      param p0lon  in required    scalar  longitudes of point P0       param p0lat  in required    scalar  latitudes of point P0       param neighlon  in optional       param neighlat  in optional       keyword RADIANS   if set  inputs and angular outputs are in radians  otherwise degrees       keyword DISTANCE   dis  to get back the distances between P0 and the np1 points P1 in the   variable dis       keyword SPHERE to activate if points are located on a sphere       returns   index giving the P1 index  point that is the closest point of  P0       examples   IDL  print  neighbor 105 15 40 02 0 07 100 50 51 30 20 0      IDL  distance dis                     0   IDL  print  dis               105 684      206 125      160 228      history   Sebastien Masson  smasson lodyc jussieu fr                     October 2003      version  Id: neighbor pro 136 2006 07 10 15:20:19Z pinsard       FUNCTION neighbor  p0lon  p0lat  neighlon  neighlat  sphere   sphere  distance   distance  radians   radians     compile_opt idl2  strictarrsubs     somme checks   IF  n_elements p0lon  NE 1 THEN MESSAGE   Sorry p0lon must be a scalar    p0lon   p0lon 0    IF  n_elements p0lat  NE 1 THEN MESSAGE   Sorry p0lat must be a scalar    p0lat   p0lat 0    nneig   n_elements neighlon    IF  n_elements neighlat  NE nneig  THEN       MESSAGE   neighlon and neighlat must have the same number of elements    distance between P0 and the others points   IF keyword_set sphere  THEN BEGIN     IF sphere NE 1 THEN radius   sphere     distance   Map_nPoints p0lon  p0lat  neighlon  neighlat                            radius   radius  radians   radians    ENDIF ELSE BEGIN     distance    neighlon p0lon 2 neighlat p0lat 2     IF arg_present distance  THEN distance   sqrt distance    ENDELSE   RETURN  where distance EQ min distance  END"); 
     69a[67] = new Array("./Interpolation/quadrilateral2square.html", "quadrilateral2square.pro", "", "       file_comments   warm  or map  an arbitrary quadrilateral onto a unit square   according to the 4 point correspondences:          x0 y0     0 0           x1 y1     1 0           x2 y2     1 1           x3 y3     0 1    This is the inverse function of square2quadrilateral pro   The mapping is done using perspective transformation which preserve   lines in all orientations and permit quadrilateral to quadrilateral   mappings  see ref  bellow       categories    Picture  Grid      param x0in  in required     param y0in  in required     param x1in  in required     param y1in  in required     param x2in  in required     param y2in  in required     param x3in  in required     param y3in   in required    the coordinates of the quadrilateral    see above for correspondence with the unit square  Can be   scalar or array   x0 y0   x1 y1   x2 y2  and  x3 y3  are   given in the anticlockwise order       param xxin  in required    the coordinates of the point s  for which we want to do the mapping    Can be scalar or array       param yyin  in required    the coordinates of the point s  for which we want to do the mapping    Can be scalar or array       keyword PERF      returns      2 n  array: the new coordinates  xout  yout  of the  xin yin  point s  after   mapping    If xin is a scalar  then n is equal to the number of elements of x0    If xin is an array   then n is equal to the number of elements of xin       restrictions   I think degenerated quadrilateral  e g  flat of twisted  is not work    This has to be tested       examples     IDL  splot 0 5 0 3 nodata xstyle 1 ystyle 1   IDL  tracegrille  findgen 11 1  findgen 11 1 color indgen 12 20   IDL  xin    findgen 11 1 replicate 1  11    IDL  yin   replicate 1  11 findgen 11 1    IDL  out   square2quadrilateral 2 1 3 0 5 1 2 3  xin  yin    IDL  tracegrille  reform out 0 11 11  reform out 1 11 11 color indgen 12 20     IDL  inorg quadrilateral2square 2 1 3 0 5 1 2 3 out 0 out 1    IDL  tracegrille  reform inorg 0 11 11  reform inorg 1 11 11 color indgen 12 20      history        Sebastien Masson  smasson lodyc jussieu fr         August 2003        Based on  Digital Image Warping  by G  Wolberg        IEEE Computer Society Press  Los Alamitos  California        Chapter 3  see p 52 56        version  Id: quadrilateral2square pro 163 2006 08 29 12:59:46Z navarro             FUNCTION quadrilateral2square  x0in  y0in  x1in  y1in  x2in  y2in  x3in  y3in  xxin  yyin  PERF   perf       compile_opt idl2  strictarrsubs   tempsone   systime 1      Warning  wrong definition of  x2 y2  and  x3 y3  at the bottom of   page 54 of Wolberg s book  see figure 3 7 page 56 for the good   definition      IF keyword_set double  THEN BEGIN     x0   double x0in      x1   double x1in      x2   double x2in      x3   double x3in      y0   double y0in      y1   double y1in      y2   double y2in      y3   double y3in      xin   double xxin      yin   double yyin    ENDIF ELSE BEGIN     x0   float x0in      x1   float x1in      x2   float x2in      x3   float x3in      y0   float y0in      y1   float y1in      y2   float y2in      y3   float y3in      xin   float xxin      yin   float yyin    ENDELSE     get the matrix A     a   square2quadrilateral x0in  y0in  x1in  y1in  x2in  y2in  x3in  y3in      compute the adjoint matrix     IF keyword_set double  THEN adj   dblarr 9  n_elements x0      ELSE adj   fltarr 9  n_elements x0      adj 0      a 4            a 7   a 5      adj 1      a 7   a 2   a 1      adj 2      a 1   a 5   a 4   a 2      adj 3      a 6   a 5   a 3      adj 4      a 0            a 6   a 2      adj 5      a 3   a 2   a 0   a 5      adj 6      a 3   a 7   a 6   a 4      adj 7      a 6   a 1   a 0   a 7      adj 8      a 0   a 4   a 3   a 1        IF n_elements xin  EQ 1 THEN BEGIN     xin   replicate xin  n_elements x0      yin   replicate yin  n_elements x0    ENDIF     compute xprime  yprime and wprime     IF n_elements x0  EQ 1 THEN BEGIN     wpr   1 adj 6 xin   adj 7 yin   adj 8    ENDIF ELSE BEGIN     wpr   1 adj 6   xin   adj 7   yin   adj 8      ENDELSE   xpr   xin wpr   ypr   yin wpr     IF keyword_set double  THEN res   dblarr 2  n_elements xin      ELSE res   fltarr 2  n_elements xin      IF n_elements x0  EQ 1 THEN BEGIN     res 0      xpr adj 0    ypr adj 1   wpr adj 2      res 1      xpr adj 3    ypr adj 4   wpr adj 5    ENDIF ELSE BEGIN     res 0      xpr adj 0      ypr adj 1     wpr adj 2        res 1      xpr adj 3      ypr adj 4     wpr adj 5      ENDELSE     IF keyword_set perf  THEN print   time quadrilateral2square  systime 1 tempsone    RETURN  res END"); 
     70a[68] = new Array("./Interpolation/spl_fstdrv.html", "spl_fstdrv.pro", "", "             file_comments   SPL_FSTDRV returns the values of the first derivative of   the interpolating function at the points X2i  It is a double   precision array      Given the arrays X and Y  which tabulate a function  with the X i    AND Y i  in ascending order  and given an input value X2  the   SPL_INCR function returns an interpolated value for the given values   of X2  The interpolation method is based on cubic spline  corrected   in a way that interpolated value are also in ascending order      examples   IDL  y2    spl_fstdrv x  y  yscd  x2       param x  in required    An n element  at least 2  input vector that specifies the   tabulate points in ascending order       param y  in required    f x    y  An n element input vector that specifies the values   of the tabulated function F Xi  corresponding to Xi       param yscd  in required    The output from SPL_INIT for the specified X and Y       param x2  in required    The input values for which the first derivative values are desired    X can be scalar or an array of values       returns      y2: f x2    y2       history    Sebastien Masson  smasson lodyc jussieu fr : May 2005      version  Id: spl_fstdrv pro 186 2006 09 20 10:50:37Z pinsard             FUNCTION spl_fstdrv  x  y  yscd  x2     compute the first derivative of the spline function     compile_opt idl2  strictarrsubs     nx   n_elements x    ny   n_elements y    x must have at least 2 elements   IF nx LT 2 THEN stop   y must have the same number of elements than x   IF nx NE ny THEN stop   define loc in a way that    if loc i  eq  1   :                 x2 i    x nx 1     else              :    x loc i   extrapolation   use x nx 2  and x nx 1  even if x2 i    x nx 1    extrapolation   loc   0   temporary loc     nx 2    distance between to consecutive x   deltax   x loc 1 x loc    distance between to consecutive y   deltay   y loc 1 y loc    relative distance between x2 i  and x loc i 1    a    x loc 1 x2 deltax   relative distance between x2 i  and x loc i    b   1 0d   a   compute the first derivative on x  see numerical recipes Chap 3 3    yfrst   temporary deltay deltax         1 0d 6 0d    3 0d a a   1 0d    deltax   yscd loc          1 0d 6 0d    3 0d b b   1 0d    deltax   yscd loc 1    beware of the computation precision    force near zero values to be exactly 0 0   zero   where abs yfrst  LT 1 e 10    IF zero 0  NE  1 THEN yfrst zero    0 0d    RETURN  yfrst END "); 
     71a[69] = new Array("./Interpolation/spl_incr.html", "spl_incr.pro", "", "             file_comments     Given the arrays X and Y  which tabulate a function  with the X i    AND Y i  in ascending order  and given an input value X2  the   SPL_INCR function returns an interpolated value for the given values   of X2  The interpolation method is based on cubic spline  corrected   in a way that interpolated values are also monotonically increasing       param x1  in required    An n element  at least 2  input vector that specifies the tabulate points in   a strict ascending order       param y1  in required    f x    y  An n element input vector that specifies the values   of the tabulated function F Xi  corresponding to Xi  As f is   supposed to be monotonically increasing  y values must be   monotonically increasing  y can have equal consecutive values       param x2  in required    The input values for which the interpolated values are   desired  Its values must be strictly monotonically increasing       param der2      param x      returns        y2: f x2    y2  Double precision array      restrictions   It might be possible that y2 i 1 y2 i  has very small negative   values  amplitude smaller than 1 e 6       examples     IDL  n   100L   IDL  x    dindgen n 2   IDL  y   abs randomn 0  n    IDL  y n 2:n 2 1    0    IDL  y n n 3    0    IDL  y n n 6:n n 6 5    0    IDL  y   total y   cumulative   double    IDL  x2   dindgen n 1 2    IDL  n2   n_elements x2    IDL  print  min y 1:n 1 y 0:n 2  LT 0   IDL  y2   spl_incr  x  y  x2    IDL  splot  x  y  xstyle   1  ystyle   1  ysurx 25  petit    1  2  1   land   IDL  oplot  x2  y2  color   100   IDL  c   y2 1:n2 1    y2 0:n2 2    IDL  print  min c  LT 0   IDL  print  min c  max   ma  ma   IDL  splot c xstyle 1 ystyle 1  yrange 01 05  ysurx 25  petit    1  2  2   noerase   IDL  oplot 0  n_elements c   0  0  linestyle   1      history    Sebastien Masson  smasson lodyc jussieu fr : May Dec 2005      version  Id: spl_incr pro 163 2006 08 29 12:59:46Z navarro             FUNCTION pure_concave  x1  x2  y1  y2  der2  x   X n type     compile_opt idl2  strictarrsubs     xx    double x double x1 double x2 double x1    f    double x2 double x1 double y2 double y1    n   der2 temporary f    res   xx n      IF check_math  GT 0 THEN BEGIN         zero   where abs res  LT 1 e 10          IF zero 0  NE  1 THEN res zero    0 0d     END   res   temporary res double y2 double y1 y1      IF array_equal sort res  lindgen n_elements res    NE 1 THEN stop   RETURN  res END       param x1  in required    An n element  at least 2  input vector that specifies the tabulate points in   a strict ascending order       param y1  in required    f x    y  An n element input vector that specifies the values      of the tabulated function F Xi  corresponding to Xi  As f is      supposed to be monotonically increasing  y values must be      monotonically increasing  y can have equal consecutive values       param x2  in required    The input values for which the interpolated values are   desired  Its values must be strictly monotonically increasing       param der2    param x     FUNCTION pure_convex  x1  x2  y1  y2  der2  x   1 1 X n type     compile_opt idl2  strictarrsubs     xx   1 0d    double x double x1 double x2 double x1    f    double x2 double x1 double y2 double y1    n   der2 temporary f    res   xx n      IF check_math  GT 0 THEN BEGIN         zero   where abs res  LT 1 e 10          IF zero 0  NE  1 THEN res zero    0 0d     END   res   1 0d   temporary res    res   temporary res y2 y1 y1      IF array_equal sort res  lindgen n_elements res    NE 1 THEN stop   RETURN  res END       param x    param y    param x2    keyword YP0 The first derivative of the interpolating function at the      point X0  If YP0 is omitted  the second derivative at the      boundary is set to zero  resulting in a  natural spline     keyword YPN_1 The first derivative of the interpolating function at the      point Xn 1  If YPN_1 is omitted  the second derivative at the      boundary is set to zero  resulting in a  natural spline    FUNCTION spl_incr  x  y  x2  YP0   yp0  YPN_1   ypn_1     compile_opt idl2  strictarrsubs       check and initialization         nx   n_elements x    ny   n_elements y    nx2   n_elements x2    x must have at least 2 elements   IF nx LT 2 THEN stop   y must have the same number of elements than x   IF nx NE ny THEN stop   x be monotonically increasing   IF min x 1:nx 1 x 0:nx 2  LE 0 THEN stop   x2 be monotonically increasing   IF N_ELEMENTS X2  GE 2 THEN     IF min x2 1:nx2 1 x2 0:nx2 2   LE 0 THEN stop   y be monotonically increasing   IF min y 1:ny 1 y 0:ny 2  LT 0 THEN stop     first check: check if two consecutive values are equal     bad   where y 1:ny 1 y 0:ny 2  EQ 0  cntbad    IF cntbad NE 0 THEN BEGIN   define the results: y2       y2   dblarr nx2    define xinx2: see help of value_locate    if xinx2 i  eq  1   :                 x bad i    x2 nx2 1     else                : x2 xinx2 i    x2 nx2 1     else                : x2 xinx2 i   we have middle pieces for which   we force yp0   0 0d and ypn_1   0 0d       IF cntbad GT 1 THEN BEGIN   we take care of the piece located wetween bad ib 1  and bad ib          FOR ib   1  cntbad 1 DO BEGIN   if there is x2 values smaller that x bad ib  then the x2 values   located between bad ib 1  and bad ib  are  xinx2 ib 1 1:xinx2 ib            IF xinx2 ib  NE  1 THEN begin             y2 xinx2 ib 1 1   0                y i 1    y i      2  y  reach its minimum value between  x i  and x i 1           0  y i 1    0   y i      we do a first selection by looking for those points      loc   lindgen nx 1    maybebad   where yscd loc  LE 0 0d AND yscd loc 1  GE 0 0d  cntbad      IF cntbad NE 0 THEN BEGIN      mbbloc   loc maybebad       aaa    yscd mbbloc 1 yscd mbbloc 6 0d x mbbloc 1 x mbbloc      bbb   0 5d   yscd mbbloc      ccc   yifrst mbbloc      ddd   y mbbloc      definitive selection:   y  can become negative if and only if  2b 2   4 3a c   0   y  can become negative if and only if    b 2     3a c   0       delta   bbb bbb   3 0d aaa ccc       bad   where delta GT 0  cntbad        IF cntbad NE 0 THEN BEGIN       delta   delta bad        aaa   aaa bad        bbb   bbb bad        ccc   ccc bad        ddd   ddd bad        bad   maybebad bad    define xinx2_1: see help of value_locate    if xinx2_1 i  eq  1   :                   x bad i    x2 nx2 1     else                  : x2 xinx2_1 i    x2 nx2 1     else                  : x2 xinx2_2 i   y bad ib 1  then we cannot applay the method we want to   apply   we use then convex concave case by changing by hand the   value of yinfl and xinfl                   IF yzero GT y bad ib 1  THEN BEGIN                     yinfl   0 5d y bad ib 1 y bad ib                      xinfl   0 5d x bad ib 1 x bad ib                      GOTO  convexconcave                   ENDIF   define xinx2_3: see help of value_locate    if xinx2_3 ib  eq  1   :                x bad ib xzero   x2 nx2 1     else                   : x2 xinx2_3   we use then convex concave case by changing by hand the   value of yinfl and xinfl                   IF yzero lt y bad ib  THEN BEGIN                     yinfl   0 5d y bad ib 1 y bad ib                      xinfl   0 5d x bad ib 1 x bad ib                      GOTO  convexconcave                   ENDIF   define xinx2_3: see help of value_locate    if xinx2_3 ib  eq  1   :                x bad ib xzero   x2 nx2 1     else                   : x2 xinx2_3    x2 nx2 1     else                   : x2 xinx2_3    x bad ib xzero    x2 xinx3_2 1                    xinx2_3   value_locate x2  x bad ib xinfl                     IF xinx2_3 ge xinx2_1 ib 1 THEN BEGIN                     y2 xinx2_1 ib 1:xinx2_3                            pure_convex x bad ib  x bad ib xinfl                                          y bad ib  yinfl                                          yifrst bad ib                                          x2 xinx2_1 ib 1:xinx2_3                     ENDIF                   IF xinx2_2 ib  GE xinx2_3 1 THEN BEGIN                     y2 xinx2_3 1:xinx2_2 ib                            pure_concave x bad ib xinfl  x bad ib 1                                           yinfl  y bad ib 1                                           yifrst bad ib 1                                           x2 xinx2_3 1:xinx2_2 ib                    ENDIF                 END               ENDCASE              END           ENDCASE         ENDIF       ENDFOR      ENDIF   ENDIF     RETURN  y2         END"); 
     72a[70] = new Array("./Interpolation/spl_keep_mean.html", "spl_keep_mean.pro", "", "           file_comments     Given the arrays X and Y  which tabulate a function  with the X i    AND Y i  in ascending order  and given an input value X2  the   SPL_INCR function returns an interpolated value for the given values   of X2  The interpolation method is based on cubic spline  corrected   in a way that integral of the interpolated values is the same as the   integral of the input values    for exemple to build daily data   from monthly mean and keep the monthly mean of the computed daily   data equa to the original values       param x  in required    An n element  at least 2  input vector that specifies the tabulate points in   a strict ascending order       param yin  in required type array    an array with one element less than x  y i  represents the   mean value between x i  and x i 1  if  GE0 is activated  y must   have positive values       param x2  in required    The input values for which the interpolated values are desired    Its values must be strictly monotonically increasing       keyword GE0   to force that y2 is always GE than 0  In that case  y must also be GE than 0       keyword YP0   The first derivative of the interpolating function at the   point X0  If YP0 is omitted  the second derivative at the   boundary is set to zero  resulting in a  natural spline       keyword YPN_1   The first derivative of the interpolating function at the   point Xn 1  If YPN_1 is omitted  the second derivative at the   boundary is set to zero  resulting in a  natural spline       returns   y2: the mean value between two consecutive values of x2  This   array has one element less than y2  y2 has double precision       restrictions   It might be possible that y2 has very small negative values    amplitude smaller than 1 e 6       examples        12 monthly values of precipitations into daily values:     IDL  yr1   1990   IDL  yr2   1992   IDL  nyr   yr2 yr1 1   IDL  n1   12 nyr 1   IDL  x   julday 1 findgen n1  replicate 1  n1      IDL           replicate yr1  n1  fltarr n1    IDL  n2   365 nyr   total leapyr yr1 indgen nyr    1   IDL  x2   julday replicate 1  n2  1 findgen n2      IDL               replicate yr1  n2  fltarr n2    IDL  y   abs randomn 0  n1 1    IDL  y2   spl_keep_mean x  y  x2   ge0     IDL  print  min x  max   ma  ma   IDL  print  min x2  max   ma  ma   IDL  print  vairdate min x  max   ma  ma    IDL  print  total y x 1:n1 1 x 0:n1 2    IDL  print  total y2 x2 1:n2 1 x2 0:n2 2       history    Sebastien Masson  smasson lodyc jussieu fr : May 2005      version  Id: spl_keep_mean pro 163 2006 08 29 12:59:46Z navarro             FUNCTION spl_keep_mean  x  yin  x2  YP0   yp0  YPN_1   ypn_1  GE0   ge0     compile_opt idl2  strictarrsubs       check and initialization         nx   n_elements x    ny   n_elements yin    nx2   n_elements x2    x must have at least 2 elements   IF nx LT 2 THEN stop   x2 must have at least 2 elements   IF nx2 LT 2 THEN stop   x be monotonically increasing   IF min x 1:nx 1 x 0:nx 2  LE 0 THEN stop   x2 be monotonically increasing   IF min x2 1:nx2 1 x2 0:nx2 2   LE 0 THEN stop       compute the integral of y     if spl_keep_mean is called by the user  and not by itself  we must compute   the integral of y  yin must have one element less than x   IF nx NE ny 1 THEN stop   y   double yin double x 1:nx 1 x 0:nx 2    y    0 0d  temporary y    y   total temporary y   cumulative   double        compute the  spline  interpolation       IF keyword_set ge0  THEN BEGIN   if the want that the interpolated values are always   0  we must   have yin   0 0d     IF min yin  LT 0 THEN stop   call spl_incr     y2   spl_incr x  temporary y  x2  yp0   yp0  ypn_1   ypn_1    ENDIF ELSE BEGIN     yscd   spl_init x  y  yp0   yp0  ypn_1   ypn_1   double      y2   spl_interp x  y  temporary yscd  x2   double    ENDELSE                        Compute the derivative of y       yfrst    y2 1:nx2 1 y2 0:nx2 2 x2 1:nx2 1 x2 0:nx2 2    it can happen that we have very small negative values  1 e 6 for ex     yfrst   0 0d   temporary yfrst    RETURN  yfrst         END"); 
     73a[71] = new Array("./Interpolation/square2quadrilateral.html", "square2quadrilateral.pro", "", "       file_comments   warm  or map  a unit square onto an arbitrary quadrilateral   according to the 4 point correspondences:          0 0     x0 y0           1 0     x1 y1           1 1     x2 y2           0 1     x3 y3    The mapping is done using perspective transformation which preserve   lines in all orientations and permit quadrilateral to quadrilateral   mappings  see ref  bellow       categories    Picture  Grid      param x0in  in required     param y0in  in required     param x1in  in required     param y1in  in required     param x2in  in required     param y2in  in required     param x3in  in required     param y3in  in required    the coordinates of the quadrilateral  see above for correspondence with the   unit square    Can be scalar or array     x0 y0   x1 y1   x2 y2  and  x3 y3  are given in the anticlockwise order         param xxin  in optional     param yyin  in optional    the coordinates of the point s  for which we want to do the mapping       returns    2 n  array: the new coordinates  xout  yout  of the  xin yin    point s  after mapping    If xin is a scalar  then n is equal to the number of elements of   x0  If xin is an array   then n is equal to the number of   elements of xin    If xin and yin are omited  square2quadrilateral returns the   matrix A which is used for the inverse transformation       restrictions   I think degenerated quadrilateral  e g  flat of twisted  is not work    This has to be tested       examples     IDL  splot 0 5 0 3 nodata xstyle 1 ystyle 1   IDL  tracegrille  findgen 11 1  findgen 11 1 color indgen 12 20   IDL  xin    findgen 11 1 replicate 1  11    IDL  yin   replicate 1  11 findgen 11 1    IDL  out   square2quadrilateral 2 1 3 0 5 1 2 3  xin  yin    IDL  tracegrille  reform out 0 11 11  reform out 1 11 11 color indgen 12 20      history        Sebastien Masson  smasson lodyc jussieu fr         August 2003        Based on  Digital Image Warping  by G  Wolberg        IEEE Computer Society Press  Los Alamitos  California        Chapter 3  see p 52 56        version  Id: square2quadrilateral pro 163 2006 08 29 12:59:46Z navarro             FUNCTION square2quadrilateral  x0in  y0in  x1in  y1in  x2in  y2in  x3in  y3in  xxin  yyin     Warning  wrong definition of  x2 y2  and  x3 y3  at the bottom of   page 54 of Wolberg s book  see figure 3 7 page 56 for the good   definition        compile_opt idl2  strictarrsubs     IF keyword_set double  THEN BEGIN     x0   double x0in      x1   double x1in      x2   double x2in      x3   double x3in      y0   double y0in      y1   double y1in      y2   double y2in      y3   double y3in      IF arg_present xxin  THEN BEGIN       xin   double xxin        yin   double yyin      ENDIF   ENDIF ELSE BEGIN     x0   float x0in      x1   float x1in      x2   float x2in      x3   float x3in      y0   float y0in      y1   float y1in      y2   float y2in      y3   float y3in      IF arg_present xxin  THEN BEGIN       xin   float xxin        yin   float yyin      ENDIF   ENDELSE     IF keyword_set double  THEN a   dblarr 8  n_elements x0      ELSE a   fltarr 8  n_elements x0      delx3   x0 x1 x2 x3   dely3   y0 y1 y2 y3     affinemap   where delx3 EQ 0 AND dely3 EQ 0    IF affinemap 0  NE  1 THEN BEGIN     xx0   x0 affinemap      xx1   x1 affinemap      xx2   x2 affinemap      yy0   y0 affinemap      yy1   y1 affinemap      yy2   y2 affinemap        a 0  affinemap    xx1 xx0     a 1  affinemap    xx2 xx1     a 2  affinemap    xx0     a 3  affinemap    yy1 yy0     a 4  affinemap    yy2 yy1     a 5  affinemap    yy0     a 6  affinemap    0     a 7  affinemap    0   ENDIF     projectivemap   where delx3 NE 0 OR dely3 NE 0    IF projectivemap 0  NE  1 THEN BEGIN     xx0   x0 projectivemap      xx1   x1 projectivemap      xx2   x2 projectivemap      xx3   x3 projectivemap      yy0   y0 projectivemap      yy1   y1 projectivemap      yy2   y2 projectivemap      yy3   y3 projectivemap        delx1   xx1 xx2     dely1   yy1 yy2     delx2   xx3 xx2     dely2   yy3 yy2     delx3   delx3 projectivemap      dely3   dely3 projectivemap        div   delx1 dely2 dely1 delx2     zero   where div EQ 0      IF zero 0  NE  1 THEN BEGIN       stop     ENDIF     a13    delx3 dely2 dely3 delx2 div     a23    delx1 dely3 dely1 delx3 div       a 0  projectivemap    xx1 xx0 a13 xx1     a 1  projectivemap    xx3 xx0 a23 xx3     a 2  projectivemap    xx0     a 3  projectivemap    yy1 yy0 a13 yy1     a 4  projectivemap    yy3 yy0 a23 yy3     a 5  projectivemap    yy0     a 6  projectivemap    a13     a 7  projectivemap    a23   ENDIF     IF NOT arg_present xxin  THEN return  a     IF n_elements xin  EQ 1 THEN BEGIN     xin   replicate xin  n_elements x0      yin   replicate yin  n_elements x0    ENDIF     IF keyword_set double  THEN res   dblarr 2  n_elements xin      ELSE res   fltarr 2  n_elements xin    IF n_elements x0  EQ 1 THEN BEGIN     div   a 6 xin    a 7 yin    1     zero   where div EQ 0      IF zero 0  NE  1 THEN BEGIN       stop     ENDIF     res 0       a 0 xin    a 1 yin    a 2 div     res 1       a 3 xin    a 4 yin    a 5 div   ENDIF ELSE BEGIN     div   a 6   xin  a 7   yin   1     zero   where div EQ 0      IF zero 0  NE  1 THEN BEGIN       stop     ENDIF     res 0       a 0   xin    a 1   yin    a 2   div     res 1       a 3   xin    a 4   yin    a 5   div   ENDELSE     RETURN  res END"); 
     74a[72] = new Array("./Matrix/cmapply.html", "cmapply.pro", "", "     file_comments   Utility function  adapted from CMPRODUCT      param X        version  Id: cmapply pro 163 2006 08 29 12:59:46Z navarro        todo seb     function cmapply_product  x     compile_opt idl2  strictarrsubs     sz   size x    n   sz 1     while n GT 1 do begin       if  n mod 2  EQ 1 then x 0    x 0    x n 1        n2   floor n 2        x   x 0:n2 1    x n2:        n   n2   endwhile   return  reform x 0   overwrite  end       file_comments   cmapply_redim : Utility function  used to collect collaped dimensions      param newarr        param dimapply        param dimkeep        param nkeep        param totcol        param totkeep        todo seb     pro cmapply_redim  newarr  dimapply  dimkeep  nkeep  totcol  totkeep     compile_opt idl2  strictarrsubs     sz   size newarr      First task: rearrange dimensions so that the dimensions     that are  kept   ie  uncollapsed  are at the back   dimkeep   where histogram dimapply min 1 max sz 0  ne 1  nkeep    if nkeep EQ 0 then return    newarr   transpose temporary newarr   dimapply 1  dimkeep      totcol is the total number of collapsed elements   totcol   sz dimapply 0    for i   1  n_elements dimapply 1 do totcol   totcol   sz dimapply i    totkeep   sz dimkeep 0 1    for i   1  n_elements dimkeep 1 do totkeep   totkeep   sz dimkeep i 1       this new array has two dimensions:         the first  all elements that will be collapsed         the second  all dimensions that will be preserved      the ordering is so that all elements to be collapsed are      adjacent in memory    newarr   reform newarr   totcol  totkeep   overwrite  end    Main function        file_comments   Applies a function to specified dimensions of an array     Description:     CMAPPLY will apply one of a few select functions to specified   dimensions of an array   Unlike some IDL functions  you  do  have   a choice of which dimensions that are to be  collapsed  by this   function   Iterative loops are avoided where possible  for   performance reasons        The possible functions are:              and number of loop iterations:                Performs a sum  as in TOTAL        number of collapsed dimensions       AND     Finds LOGICAL  AND   not bitwise   same       OR      Finds LOGICAL  OR    not bitwise   same               Performs a product                 LOG_2 no  of collapsed elts          MIN     Finds the minimum value            smaller of no  of collapsed       MAX     Finds the maximum value            or output elements         USER    Applies user defined function      no  of output elements         It is possible to perform user defined operations arrays using     CMAPPLY   The OP parameter is set to  USER:FUNCTNAME  where     FUNCTNAME is the name of a user defined function   The user     defined function should be defined such that it accepts a single     parameter  a vector  and returns a single scalar value   Here is a     prototype for the function definition:          FUNCTION FUNCTNAME  x  KEYWORD1 key1              scalar     function of x or keywords             RETURN  scalar        END       The function may accept keywords   Keyword values are passed in to     CMAPPLY through the FUNCTARGS keywords parameter  and passed to     the user function via the _EXTRA mechanism   Thus  while the     definition of the user function is highly constrained in the     number of positional parameters  there is absolute freedom in     passing keyword parameters        It s worth noting however  that the implementation of user defined     functions is not particularly optimized for speed   Users are     encouraged to implement their own array if the number of output     elements is large       categories    Array      param OP  in required type string    The operation to perform  as a string   May be upper or lower case      If a user defined operation is to be passed  then OP is of   the form   USER:FUNCTNAME  where FUNCTNAME is the name of   the user defined function       param ARRAY  in required type array     An array of values to be operated on    Must not be of type STRING  7  or STRUCTURE  8       param dimapply  in optional default 1  ie  first dimension type array    An array of dimensions that are to be  collapsed  where   the the first dimension starts with 1  ie  same convention   as IDL function TOTAL   Whereas TOTAL only allows one   dimension to be added  you can specify multiple dimensions   to CMAPPLY   Order does not matter  since all operations   are associative and transitive   NOTE: the dimensions refer   to the  input  array  not the output array   IDL allows a   maximum of 8 dimensions       keyword DOUBLE  default not set    Set this if you wish the internal computations to be done   in double precision if necessary   If ARRAY is double   precision  real or complex  then DOUBLE 1 is implied       keyword TYPE  default same as input type    Set this to the IDL code of the desired output type  refer   to documentation of SIZE   Internal results will be   rounded to the nearest integer if the output type is an   integer type       keyword FUNCTARGS   If OP is  USER:  then the contents of this keyword   are passed to the user function using the _EXTRA   mechanism   This way you can pass additional data to   your user supplied function  via keywords  without   using common blocks    DEFAULT: undefined  i e  no keywords passed by _EXTRA       returns   An array of the required TYPE  whose elements are the result of   the requested operation   Depending on the operation and number of   elements in the input array  the result may be vulnerable to   overflow or underflow       examples       First example:  Shows how CMAPPLY can be used to total the second dimension of the     array called IN   This is equivalent to OUT   TOTAL IN  2        IDL  IN    INDGEN 5 5      IDL  OUT   CMAPPLY  IN   2      IDL  HELP  OUT     OUT             INT         Array 5        Second example:  Input is assumed to be an 5x100 array of 1 s and     0 s indicating the status of 5 detectors at 100 points in time      The desired output is an array of 100 values  indicating whether     all 5 detectors are on  1  at one time   Use the logical AND     operation        IDL  IN   detector_status               5x100 array     IDL  OUT   CMAPPLY AND  IN   1       collapses 1st dimension     IDL  HELP  OUT     OUT             BYTE        Array 100         note that MIN could also have been used in this particular case      although there would have been more loop iterations        Third example:  Shows sum over first and third dimensions in an     array with dimensions 4x4x4:       IDL  IN   INDGEN 4 4 4      IDL  OUT   CMAPPLY  IN   1 3      IDL  PRINT  OUT          408     472     536     600       Fourth example:  A user function  MEDIAN  is used:       IDL  IN   RANDOMN SEED 10 10 5      IDL  OUT   CMAPPLY USER:MEDIAN  IN  3      IDL  HELP  OUT     OUT             FLOAT       Array 10  10         OUT i j  is the median value of IN i j       history Mar 1998  Written  CM     Changed usage message to not bomb  24 Mar 2000  CM     Significant rewrite for   MIN and MAX  inspired by Todd Clements         FOR loop indices are now type       LONG  copying terms are liberalized  CM  22  Aug 2000     More efficient MAX MIN  inspired by Alex Schuster  CM  25 Jan       2002     Make new MAX MIN actually work with 3d arrays  CM  08 Feb 2002     Add user defined functions  ON_ERROR  CM  09 Feb 2002     Correct bug in MAX MIN initialization of RESULT  CM  05 Dec 2002      Author: Craig B  Markwardt  NASA GSFC Code 662  Greenbelt  MD 20770    craigm lheamail gsfc nasa gov      version  Id: cmapply pro 163 2006 08 29 12:59:46Z navarro       function cmapply  op  array  dimapply  double dbl  type type                      functargs functargs  nocatch nocatch     compile_opt idl2  strictarrsubs      if n_params  LT 2 then begin       message   USAGE: XX   CMAPPLY OP ARRAY 2   info       message          where OP is     AND  OR  MIN  MAX   info       return   1L   endif   if NOT keyword_set nocatch  then       on_error  2     else       on_error  0      Parameter checking     1  the dimensions of the array   sz   size array    if sz 0  EQ 0 then       message   ERROR: ARRAY must be an array       2  The type of the array   if sz sz 0 1  EQ 0 OR sz sz 0 1  EQ 7 OR sz sz 0 1  EQ 8 then       message   ERROR: Cannot apply to UNDEFINED  STRING  or STRUCTURE    if n_elements type  EQ 0 then type   sz sz 0 1       3  The type of the operation   szop   size op    if szop szop 0 1  NE 7 then       message   ERROR: operation OP was not a string       4  The dimensions to apply  default is to apply to first dim    if n_params  EQ 2 then dimapply   1   dimapply     dimapply     dimapply   dimapply sort dimapply      Sort in ascending order   napply   n_elements dimapply       5  Use double precision if requested or if needed   if n_elements dbl  EQ 0 then begin       dbl 0       if type EQ 5 OR type EQ 9 then dbl 1   endif    newop   strupcase op    newarr   array   newarr   reform newarr  sz 1:sz 0   overwrite    case 1 of            Addition        newop EQ  : begin           for i   0L  napply 1 do begin               newarr   total temporary newarr  dimapply i i  double dbl            endfor       end            Multiplication        newop EQ  : begin   Multiplication  by summation of logarithms            cmapply_redim  newarr  dimapply  dimkeep  nkeep  totcol  totkeep           if nkeep EQ 0 then begin               newarr   reform newarr  n_elements newarr  1   overwrite                return   cmapply_product newarr 0            endif            result   cmapply_product newarr            result   reform result  sz dimkeep 1   overwrite            return  result       end            LOGICAL AND or OR        newop EQ  AND  OR  newop EQ  OR : begin           newarr   temporary newarr  NE 0           totelt   1L           for i   0L  napply 1 do begin               newarr   total temporary newarr  dimapply i i                totelt   totelt   sz dimapply i            endfor           if newop EQ  AND  then return   round newarr  EQ totelt            if newop EQ  OR   then return   round newarr  NE 0        end          Operations requiring a little more attention over how to         iterate        newop EQ  MAX  OR  newop EQ  MIN : begin           cmapply_redim  newarr  dimapply  dimkeep  nkeep  totcol  totkeep           if nkeep EQ 0 then begin               if newop EQ  MAX  then return  max newarr                if newop EQ  MIN  then return  min newarr            endif              Next task: create result array           result   make_array totkeep  type type               Now either iterate over the number of output elements  or             the number of collapsed elements  whichever is smaller            if totcol LT totkeep then begin                 Iterate over the number of collapsed elements               result 0    reform newarr 0 totkeep overwrite                case newop of                    MAX : for i   1L  totcol 1 do                       result 0    result   newarr i                     MIN : for i   1L  totcol 1 do                       result 0    result   newarr i                endcase           endif else begin                 Iterate over the number of output elements               case newop of                    MAX : for i   0L  totkeep 1 do result i    max newarr i                     MIN : for i   0L  totkeep 1 do result i    min newarr i                endcase           endelse            result   reform result  sz dimkeep 1   overwrite            return  result       end          User function        strmid newop 0 4  EQ  USER : begin           functname   strmid newop 5            if functname EQ   then               message   ERROR:  newop  is not a valid operation             cmapply_redim  newarr  dimapply  dimkeep  nkeep  totcol  totkeep           if nkeep EQ 0 then begin               if n_elements functargs  GT 0 then                   return  call_function functname  newarr  _EXTRA functargs                return  call_function functname  newarr            endif              Next task: create result array           result   make_array totkeep  type type               Iterate over the number of output elements           if n_elements functargs  GT 0 then begin               for i   0L  totkeep 1 do                   result i    call_function functname  newarr i  _EXTRA functargs            endif else begin               for i   0L  totkeep 1 do                   result i    call_function functname  newarr i            endelse            result   reform result  sz dimkeep 1   overwrite            return  result       end     endcase    newsz   size newarr    if type EQ newsz newsz 0 1  then return  newarr      Cast the result into the desired type  if necessary   castfns    UNDEF   BYTE   FIX   LONG   FLOAT                  DOUBLE   COMPLEX   UNDEF   UNDEF   DCOMPLEX      if type GE 1 AND type LE 3 then       return  call_function castfns type  round newarr      else       return  call_function castfns type  newarr  end"); 
     75a[73] = new Array("./Matrix/cmset_op.html", "cmset_op.pro", "", "     hidden      file_comments   Simplified version of CMSET_OP_UNIQ which sorts  and takes the    first  value  whatever that may mean       todo seb     function cmset_op_uniq  a     compile_opt idl2  strictarrsubs     if n_elements a  LE 1 then return  0L    ii   sort a    b   a ii    wh   where b NE shift b   1L  ct    if ct GT 0 then return  ii wh     return  0L   end        file_comments   Performs an AND  OR  or XOR operation between two sets     Description: SET_OP performs three common operations between two sets  The   three supported functions of OP are:            OP          Meaning         AND    to find the intersection of A and B          OR     to find the union of A and B          XOR    to find the those elements who are members of A or B                but not both        Sets as defined here are one dimensional arrays composed of     numeric or string types  Comparisons of equality between elements     are done using the IDL EQ operator        The complements of either set can be taken as well  by using the     NOT1 and NOT2 keywords  For example  it may be desirable to find     the elements in A but not B  or B but not A  they are different      The following IDL expressions achieve each of those effects:          SET   CMSET_OP A   AND   NOT2  B      A but not B        SET   CMSET_OP NOT1  A   AND  B      B but not A       Note the distinction between NOT1 and NOT2   NOT1 refers to the     first set  A  and NOT2 refers to the second  B   Their ordered     placement in the calling sequence is entirely optional  but the     above ordering makes the logical meaning explicit        NOT1 and NOT2 can only be set for the  AND  operator  and never     simultaneously  This is because the results of an operation with      OR  or  XOR  and any combination of NOTs   or with  AND  and     both NOTs   formally cannot produce a defined result        The implementation depends on the type of operands  For integer     types  a fast technique using HISTOGRAM is used  However  this     algorithm becomes inefficient when the dynamic range in the data     is large  For those cases  and for other data types  a technique     based on SORT  is used  Thus the compute time should scale     roughly as  A B ALOG A B  or better  rather than  A B  for the     brute force approach  For large arrays this is a significant     benefit       categories    Array      param A  in required    The two sets to be operated on  A one dimensional array of   either numeric or string type  A and B must be of the same   type  Empty sets are permitted  and are either represented   as an undefined variable  or by setting EMPTY1 or EMPTY2       param B  in required    See A      param OP0  in required type string    a string  the operation to be performed  Must be one of    AND   OR  or  XOR   lower or mixed case is permitted    Other operations will cause an error message to be produced       keyword NOT1   If set and OP is  AND  then the complement of A  for   NOT1  or B  for NOT2  will be used in the operation    NOT1 and NOT2 cannot be set simultaneously       keyword NOT2   See NOT1      keyword EMPTY1   If set  then A  for EMPTY1  or B  for EMPTY2  are   assumed to be the empty set  The actual values   passed as A or B are then ignored       keyword EMPTY2   See EMPTY1      keyword INDEX   if set  then return a list of indexes instead of the array   values themselves  The  slower  set operations are always   performed in this case      The indexes refer to the  combined  array  A B  To   clarify  in the following call: I   CMSET_OP   INDEX    returned values from 0 to NA 1 refer to A I  and values   from NA to NA NB 1 refer to B I NA       keyword COUNT   upon return  the number of elements in the result set    This is only important when the result set is the empty   set  in which case COUNT is set to zero       returns   The resulting set as a one dimensional array  The set may be   represented by either an array of data values  default  or an   array of indexes  if INDEX is set  Duplicate elements  if any    are removed  and element order may not be preserved      The empty set is represented as a return value of  1L  and COUNT   is set to zero  Note that the only way to recognize the empty set   is to examine COUNT      SEE ALSO:      SET_UTILS PRO by RSI      history Written  CM  23 Feb 2000     Added empty set capability  CM  25 Feb 2000     Documentation clarification  CM 02 Mar 2000     Incompatible but more consistent reworking of EMPTY keywords  CM        04 Mar 2000     Minor documentation clarifications  CM  26 Mar 2000     Corrected bug in empty_arg special case  CM 06 Apr 2000     Add INDEX keyword  CM 31 Jul 2000     Clarify INDEX keyword documentation  CM 06 Sep 2000     Made INDEX keyword always force SLOW_SET_OP  CM 06 Sep 2000     Added CMSET_OP_UNIQ  and ability to select FIRST_UNIQUE or       LAST_UNIQUE values  CM  18 Sep 2000     Removed FIRST_UNIQUE and LAST_UNIQUE  and streamlined       CMSET_OP_UNIQ until problems with SORT can be understood  CM  20       Sep 2000  thanks to Ben Tupper      Still trying to get documentation of INDEX and NOT right  CM  28       Sep 2000  no code changes      Correct bug for AND case  when input sets A and B each only have       one unique value  and the values are equal   CM  04 Mar 2004        thanks to James B  jbattat at cfa dot harvard dot edu      Add support for the cases where the input data types are mixed         but still compatible  also  attempt to return the same data        type that was passed in  CM  05 Feb 2005     Fix bug in type checking  thanks to  marit  CM  10 Dec 2005     Work around a stupidity in the built in IDL HISTOGRAM routine         which tries to  help  you by restricting the MIN MAX to the        range of the input variable  thanks to Will Maddox  CM  16 Jan 2006       Author: Craig B  Markwardt  NASA GSFC Code 662  Greenbelt  MD 20770     craigm lheamail gsfc nasa gov      version  Id: cmset_op pro 163 2006 08 29 12:59:46Z navarro        examples   Utility function  similar to UNIQ  but allowing choice of taking   first or last unique element  or non unique elements    Unfortunately this doesn t work because of implementation dependent   versions of the SORT  function      function cmset_op_uniq  a  first first  non non  count ct  sort sortit     if n_elements a  LE 1 then return  0L     sh    2L keyword_set first 1L 2L keyword_set non 1        if keyword_set sortit  then begin           Sort it manually         ii   sort a    b   a ii          if keyword_set non  then wh   where b EQ shift b  sh  ct            else                     wh   where b NE shift b  sh  ct          if ct GT 0 then return  ii wh      endif else begin           Use the user s values directly         if keyword_set non  then wh   where a EQ shift a  sh  ct            else                     wh   where a NE shift a  sh  ct          if ct GT 0 then return  wh     endelse       if keyword_set first  then return  0L else return  n_elements a 1   end    Simplified version of CMSET_OP_UNIQ which sorts  and takes the    first  value  whatever that may mean        function cmset_op  a  op0  b  not1 not1  not2 not2  count count                  empty1 empty1  empty2 empty2  maxarray ma  index index     compile_opt idl2  strictarrsubs      on_error  2   return on error   count   0L   index0    1L     Histogram technique is used for array sizes  max2       nbins   maxx minn 1       if  maxx minn  GT floor ma 0  then goto  SLOW_SET_OP          Work around a stupidity in the built in IDL HISTOGRAM routine       if  tp1 EQ 2 OR tp2 EQ 2  AND  minn LT  32768 OR maxx GT 32767  then           goto  SLOW_SET_OP          Following operations create a histogram of the integer values        ha   histogram a  min minn  max maxx    1       hb   histogram b  min minn  max maxx    1          Compute NOT cases       if keyword_set not1  then ha   1b   ha       if keyword_set not2  then hb   1b   hb       case op of             Boolean operations            AND : mask   temporary ha  AND temporary hb              OR : mask   temporary ha   OR temporary hb             XOR : mask   temporary ha  XOR temporary hb        endcase        wh   where temporary mask  count        if count EQ 0 then return   1L        result   temporary wh minn        if tp1 NE tp2 then return  result       szr   size result    tpr   szr szr 0 1           Cast to the original type if necessary       if tpr NE tp1 then begin           fresult   make_array n_elements result  type tp1            fresult 0    temporary result            result   temporary fresult        endif        return  result    endelse    return   1L    DEFAULT CASE end        Here is how I did the INDEX stuff with fast histogramming   It       works  but is complicated  so I forced it to go to SLOW_SET_OP        ha   histogram a  min minn  max maxx  reverse ra    1       rr   ra 0:nbins    mask   rr NE rr 1:    ra   ra rr mask 1L mask       hb   histogram b  min minn  max maxx  reverse rb    1       rr   rb 0:nbins    mask   rr NE rr 1:    rb   rb rr mask 1L mask          AND OR XOR NOT masking here         ra   ra wh    rb   rb wh        return  ra ra GE 0     rb n1 ra LT 0    is last  ra  right  "); 
     76a[74] = new Array("./Matrix/different.html", "different.pro", "", "             file_comments    calculate the different elements of 2 matrix of positive whole numbers       categories   Calculation      param a  in required  arrays of positive integers  which need                 not be sorted  Duplicate elements are ignored  as they have no                 effect on the result      param b  in required  see a      returns tableau      restrictions The empty set is denoted by an array with the first element equal to    1       restrictions These functions will not be efficient on sparse sets with wide   ranges  as they trade memory for efficiency  The HISTOGRAM function   is used  which creates arrays of size equal to the range of the   resulting set       examples       a    2 4 6 8      b    6 1 3 2      different a b      4  8            Elements in A but not in B      history http: www dfanning com tips set_operations html      version  Id: different pro 163 2006 08 29 12:59:46Z navarro             FUNCTION different  a  b       compile_opt idl2  strictarrsubs           a and  not b    elements in A but not in B  mina   Min a  Max maxa  minb   Min b  Max maxb  IF  minb GT maxa  OR  maxb LT mina  THEN RETURN  a  No intersection  r   Where Histogram a  Min mina  Max maxa               1 Histogram b  Min mina  Max maxa  count  IF count eq 0 THEN RETURN   1 ELSE RETURN  r   mina END"); 
     77a[75] = new Array("./Matrix/extrac2.html", "extrac2.pro", "", "             file_comments   extraction of subdomains of matrices    Even if the subdomain is  pierced   see the example    By default  IDL can make extractions of subdomain:          IDL  a indgen 5 5         IDL  print  a               0       1       2       3       4               5       6       7       8       9              10      11      12      13      14              15      16      17      18      19              20      21      22      23      24        IDL  print  a 0 2 3               15      17        IDL  print  a 0 2                0       2               5       7              10      12              15      17              20      22   but        IDL  print  a 0 2 3 4               15      22   while        IDL  print  extrac2 a 0 2 3 4               15      17              20      22      categories    Utilities      param array  in required    a 1 2 3 or 4 dim input array      param index1  in required    can have 2 forms:   1 a vector containing indexes of lines we want to keep   2 the string   if we want to keep all lines       param index2  in required    the same thing that index1 but for dim 2       param index3  in required    the same thing that index1 but for dim 3       param index4  in required    the same thing that index1 but for dim 4       returns   a matrix 1 2 3 or 4d extract from input array      restrictions    1 in case of mistake      examples   I have a dim 2 matrix named A  I want extract a small intersection   matrix 2d of the line 2 3 and 7 and of the column 0 and 1:      IDL  res extrac2 A 2 3 7 0 1      other ex:   IDL  print  a   a b c   d e f   g h i   IDL  print  extrac2 a 0 2 0 2    a c   g i      history Sebastien Masson  smasson lodyc jussieu fr                          12 1 1999                         29 4 1999: correction of a bug and complement of the heading      version  Id: extrac2 pro 163 2006 08 29 12:59:46Z navarro             FUNCTION extrac2  array  index1  index2  index3  index4       compile_opt idl2  strictarrsubs      taille   size array      test of the numbre of parameters   and of the nature of the index  for THE case  x       if n_params  NE taille 0 1 THEN       return  report we need as many indexes as the number of dimensions of the input array     IF n_params  GE 5 THEN BEGIN       if size index4 type  EQ 7 then index4   lindgen taille 4          ELSE index4   long index4        nt   n_elements index4     ENDIF    IF n_params  GE 4 THEN BEGIN       if size index3 type  EQ 7 then index3   lindgen taille 3          ELSE index3   long index3        nz   n_elements index3     ENDIF    IF n_params  GE 3 THEN BEGIN       if size index2 type  EQ 7 then index2   lindgen taille 2          ELSE index2   long index2        ny   n_elements index2     ENDIF    IF n_params  GE 2 THEN BEGIN       if size index1 type  EQ 7 then index1   lindgen taille 1          ELSE index1   long index1        nx   n_elements index1     ENDIF      construction of an array of indexes and of results following the size of array     case taille 0  of       1:res   array index1        2:BEGIN          index   index1 replicate 1  ny taille 1 replicate 1  nx index2          res   array index        END       3:BEGIN          index   index1 replicate 1  ny taille 1 replicate 1  nx index2          index   temporary index replicate 1  nz               taille 1 taille 2 replicate 1  nx ny index3          res   array reform index  nx  ny  nz   over        END       4:BEGIN          index   index1 replicate 1  ny taille 1 replicate 1  nx index2          index   temporary index replicate 1  nz               taille 1 taille 2 replicate 1  nx ny index3          index   temporary index replicate 1  nt               taille 1 taille 2 taille 3 replicate 1  nx ny nz index4          res   array reform index  nx  ny  nz  nz   over        END    endcase          return  res end"); 
     78a[76] = new Array("./Matrix/inter.html", "inter.pro", "", "             file_comments    calculate the intersection between 2 matrices of whole numbers      categories    Calculation      param a  in required  arrays of positive integers  which need not to be   sorted  Duplicate elements are ignored  as they have no effect on the   result      param b  in required  see a      returns tableau      restrictions The empty set is denoted by an array with the first element equal to    1       restrictions These functions will not be efficient on sparse sets with wide   ranges  as they trade memory for efficiency  The HISTOGRAM function   is used  which creates arrays of size equal to the range of the   resulting set       examples  a    2 4 6 8      b    6 1 3 2      inter a b      2  6          Common elements       history  http: www dfanning com tips set_operations html      version  Id: inter pro 163 2006 08 29 12:59:46Z navarro              FUNCTION inter  a  b       compile_opt idl2  strictarrsubs      case 1 of       n_elements a  EQ 0:return    1       n_elements b  EQ 0:return    1       n_elements a  EQ 1 AND n_elements b  NE 1:          if  where b EQ a 0 0  EQ  1 then return   1 ELSE return   a 0        n_elements b  EQ 1 AND n_elements a  NE 1:          if  where a EQ b 0 0  EQ  1 then return   1 ELSE return   b 0        n_elements a  EQ 1 AND n_elements b  EQ 1:          if  where a 0  EQ b 0 0  EQ  1 then return   1 ELSE return   a 0        ELSE:    ENDCASE   minab   Min a  Max maxa    Min b  Max maxb   Only need intersection of ranges maxab   maxa   maxb       If either set is empty  or their ranges don t intersect: result   NULL   IF maxab LT minab OR maxab LT 0 THEN RETURN   1 r   Where Histogram a  Min minab  Max maxab               Histogram b  Min minab  Max maxab  count   IF count EQ 0 THEN RETURN   1 ELSE RETURN  r   minab END"); 
     79a[77] = new Array("./Matrix/make_selection.html", "make_selection.pro", "", "      file_comments    Convert an array of selected values to an index          array that identifies the selected values in a list          or data array       categories tools       param NAMES  in required  A list or array of values to choose from       param SELNAMES  in required  A list of selected values      keyword ONLY_VALID Return only indexes of found values  Values not              found are skipped  Default is to return 1 index value for              each SELNAME  which is  1 if SELNAME is not contained in               NAMES  If ONLY_VALID is set  the  1 values will be deleted               and a value of  1 indicates that no SELNAME has been found              at all       keyword REQUIRED Normally  MAKE_SELECTION will return indexes for              all values that are found  simply ignoring the selected              values that are not in the NAMES array  although an error              message is displayed  Set this keyword to return with               1 as soon as a selected value is not found       keyword QUIET Suppress printing of the error message if a              selected value is not found  the error condition will              still be set       returns A  long  array with indexes to reference the selected values          in the NAMES array       restrictions If the NAMES array contains multiple entries of the same value           only the index to the first entry will be returned             A selection can contain multiple instances of the same value           The index array will contain one entry per selected item           See example below       examples names      Alfred Anton Peter John Mary              index   MAKE_SELECTION names Peter Mary              print index               prints  2  4               vals   indgen 20              index   MAKE_SELECTION vals 9 5 8 7 7 8 9              print index               prints  9   1  8  7  7  8  9               index   MAKE_SELECTION vals 9 5 8 7 7 8 9 ONLY_VALID              print index               prints  9  8  7  7  8  9               index   MAKE_SELECTION vals 9 5 8 7 7 8 9 REQUIRED              print index               prints   1      history mgs  28 Aug 1998: VERSION 1 00            mgs  29 Aug 1998:   changed behavior and added ONLY_VALID keyword      version  Id: make_selection pro 163 2006 08 29 12:59:46Z navarro         Copyright  C  1998  Martin Schultz  Harvard University   This software is provided as is without any warranty   whatsoever  It may be freely used  copied or distributed   for non commercial purposes  This copyright notice must be   kept with any copy of this software  If this software shall   be used commercially or sold as part of a larger package    please contact the author to arrange payment    Bugs and comments should be directed to mgs io harvard edu   with subject  IDL routine make_selection      function make_selection names selnames                 only_valid only_valid required required                 quiet quiet     compile_opt idl2  strictarrsubs               return an index array with a number for each element in        selnames that is found in names        Set the REQUIRED keyword to return  1 if one element is       not found  otherwise  1 will only be returned  if no        element is found          reset error state to 0     message reset       quiet   keyword_set quiet      result    1L       for i 0 n_elements selnames 1 do begin        test   where names eq selnames i         result     result  test 0            if  test 0  lt 0  then begin            if  keyword_set ONLY_VALID  OR keyword_set REQUIRED  then                 message Selected name not found in names array                           strtrim selnames i 2 CONT NOPRINT quiet            if  keyword_set required  then return 1L        endif     endfor       if  n_elements result  gt 1  then result   result 1:       if  keyword_set only_valid  then begin         ind   where result ge 0          if  ind 0  ge 0  then result   result ind            else result    1L     endif       return result   end"); 
     80a[78] = new Array("./Matrix/union.html", "union.pro", "", "             file_comments    calculate the union between 2 matrices of whole numbers      categories    Calculation      param a  in required  arrays of positive integers  which need                 not be sorted  Duplicate elements are ignored  as they have no                 effect on the result      param b  in required  see a      returns tableau      restrictions The empty set is denoted by an array with the first element equal to    1       restrictions These functions will not be efficient on sparse sets with wide   ranges  as they trade memory for efficiency  The HISTOGRAM function   is used  which creates arrays of size equal to the range of the   resulting set       examples a    2 4 6 8              b    6 1 3 2              union a b      1  2  3  4  6  8     Elements in either set      history  http: www dfanning com tips set_operations html      version  Id: union pro 163 2006 08 29 12:59:46Z navarro             FUNCTION union  a  b     compile_opt idl2  strictarrsubs   IF a 0  LT 0 THEN RETURN  b     A union NULL   a IF b 0  LT 0 THEN RETURN  a     B union NULL   b RETURN  Where Histogram a b  OMin   omin    omin   Return combined set END"); 
     81a[79] = new Array("./Matrix/zero_one.html", "zero_one.pro", "", "           file_comments    Send back a vector or a matrix constituted of 0 and 1 in alternation      categories    Function  Matrix      param n1  in required  number of elements in the first dimension    param n2  in required  number of elements in the second dimension      returns result       history Sebastien Masson  smasson lodyc jussieu fr                          1 12 98      version  Id: zero_one pro 163 2006 08 29 12:59:46Z navarro             function zero_one  n1 n2     compile_opt idl2  strictarrsubs      CASE N_PARAMS  OF       1:return  findgen n1  mod 2       2:BEGIN           if fix n1 2  EQ n1 2  then BEGIN  even number of columns             res   findgen n1 1 n2  mod 2             return  res 0:n1 1             ENDIF ELSE return  findgen n1 n2  mod 2  odd number of columns       END       else: return   report bad number of arguments     endcase             end"); 
     82a[80] = new Array("./Obsolete/common.html", "common.pro", "", ""); 
     83a[81] = new Array("./Obsolete/congridseb.html", "congridseb.pro", "", "           file_comments     Used to avoid a bug in congrid in a old version of IDL   Useless now      old example: based on a old version of IDL  5    IDL  print  congrid 1 2 3 4 5 6 7 8 12 4          1 1 1 2 2 2 3 3 3 3 4 4         1 1 1 2 2 2 3 3 3 3 4 4         5 5 5 6 6 6 7 7 7 7 8 8         5 5 5 6 6 6 7 7 7 7 8 8   IDL  print  rebin 1 2 3 4 5 6 7 8 12 4          1 1 1 2 2 2 3 3 3 4 4 4         3 3 3 4 4 4 5 5 5 6 6 6         5 5 5 6 6 6 7 7 7 8 8 8         5 5 5 6 6 6 7 7 7 8 8 8   IDL  print  congridseb 1 2 3 4 5 6 7 8 12 4          1 1 1 2 2 2 3 3 3 4 4 4         1 1 1 2 2 2 3 3 3 4 4 4         5 5 5 6 6 6 7 7 7 8 8 8         5 5 5 6 6 6 7 7 7 8 8 8      obsolete      param tableau  in required    1 or 2d array      param x  in required    first dimension of the result which must be   a multiple of the first dimension of the input array       param y  in required    second dimension of the result which must be   a multiple of the second dimension of the input array      returns   an array which dimensions are x y      history Sebastien Masson  smasson lodyc jussieu fr                         20 3 98                        18 6 1999 supression d une horrible boucle      version  Id: congridseb pro 157 2006 08 21 09:01:50Z navarro             function congridseb  tableau  x  y     compile_opt idl2  strictarrsubs      CASE N_PARAMS  OF       2: return  congrid tableau  x        3:return  congrid tableau  x  y        else: return  report Bad number or arguments in the call of congridseb     endcase end"); 
     84a[82] = new Array("./Obsolete/cp.html", "cp.pro", "", "           file_comments   copy files   file_copy should be used instead       obsolete      param filenamein  in required       param filenameout  in required       keyword _EXTRA used to pass your keywords      history   June 2005: Sebastien Masson   obsolete routine      version  Id: cp pro 134 2006 07 07 10:19:08Z navarro             PRO cp  filenamein  filenameout  _extra   ex     compile_opt idl2  strictarrsubs  obsolete     file_copy  filenamein  filenameout  _extra   ex   RETURN END"); 
     85a[83] = new Array("./Obsolete/extrait.html", "extrait.pro", "", "             file_comments    extraction of subdomains of matrices     Even if the subdomain is  pierced   see the example    By default  IDL can make extractions of subdomain:          IDL  a indgen 5 5          IDL  print  a                0       1       2       3       4               5       6       7       8       9              10      11      12      13      14              15      16      17      18      19              20      21      22      23      24        IDL  print  a 0 2 3                15      17        IDL  print  a 0 2                  0       2               5       7              10      12              15      17              20      22   but        IDL  print  a 0 2 3 4                15      22   while        IDL  print  extrait a 0 2 3 4                 15      17              20      22       you better use extrac2      obsolete      categories    Utilities      param tab  in required     a 1 2 3 or 4 dim table      param indicex  in required     can have 2 forms:   1 a vector containing indexes of lines we want to keep   2 the string   if we want to keep all lines       param indicey  in required     the same thing that indicex but for dim 2       param indicez  in required     the same thing that indicex but for dim 3        param indicet  in required     the same thing that indicex but for dim 4       returns    a matrix 1 2 3 or 4d extract from tab      restrictions    res 1 in case of mistake       examples    I have a dim 2 matrix named A  I want extract a small intersection    matrix 2d of the line 2 3 and 7 and of the column 0 and 1:           IDL  res extrait A 2 3 7 0 1      other ex:   IDL  print  a    a b c   d e f   g h i   IDL  print  extrait a 0 2 0 2            a c   g i       history Sebastien Masson  smasson lodyc jussieu fr    12 1 1999   29 4 1999: correction of a bug and complement of the heading      version  Id: extrait pro 163 2006 08 29 12:59:46Z navarro             FUNCTION extrait  tab  indicex  indicey  indicez  indicet       compile_opt idl2  strictarrsubs     case n_params  of       0:return  extrac2        1:return  extrac2 tab        2:return  extrac2 tab  indicex        3:return  extrac2 tab  indicex  indicey        4:return  extrac2 tab  indicex  indicey  indicez        5:return  extrac2 tab  indicex  indicey  indicez  indicet    endcase end"); 
     86a[84] = new Array("./Obsolete/ficdate.html", "ficdate.pro", "", "           file_comments   sets s_fichier to name of the vairmer file associated   to the given date in vairmer format   yymmdd        obsolete      param vdate  in  date vairmer ex:930124      param dim  in   so  ou  vo  par defaut so est choisi      param nomexp  in  nom de l experience en trois lettres par defaut prefix      returns le nom du fichier vairmer  depuis iodir       uses common pro      examples   IDL  fic   ficdate 930124       history Jerome Vialard   jv lodyc jussieu fr   1 7 98      version  Id: ficdate pro 134 2006 07 07 10:19:08Z navarro             function ficdate  vdate  dim  nomexp     compile_opt idl2  strictarrsubs  obsolete    common   case n_params  of   1: dim    SO    2: dim strupcase dim    3: begin        prefix nomexp        dim strupcase dim       end endcase       constitution de l adresse ou aller chercher le fichier     date yymmdd   vdate   sets month  year and day to the good value :    rien   juldate vdate    constitution de la date yymmdd    case 1 of      year lt 10:                s_year  0 string format i1 year       year ge 10 and year lt 100:s_year      string format i2 year       year ge 100:BEGIN         year   year 1900         if year LT 10 then s_year  0 string format i1 year             ELSE s_year  string format i2 year       end    endcase    if month lt 10 then s_month 0 string format i1 month                      else s_month     string format i2 month     if day lt 10 then s_day 0 string format i1 day                    else s_day     string format i2 day       case dim of       SO : begin        case 1 of            year eq 0  and  month eq 0  : s_fichier iodir prefix O EX SO             year eq 0  and  month ne 0  and  day eq 0  : s_fichier iodir prefix O SE SO s_month            year ne 0  and  month eq 0  : s_fichier iodir prefix O AN SO s_year            year ne 0  and  day eq 0  :   s_fichier iodir prefix O MO SO s_year s_month           else: s_fichier iodir prefix O SO s_year s_month s_day        endcase      end       VO : begin        case 1 of            year eq 0  and  month eq 0  : s_fichier iodir prefix O EX VO             year eq 0  and  month ne 0  and  day eq 0  : s_fichier iodir prefix O SE VO s_month            year ne 0  and  month eq 0  : s_fichier iodir prefix O AN VO s_year            year ne 0  and  day eq 0  : s_fichier iodir prefix O MO VO s_year s_month           else: s_fichier iodir prefix O VO s_year s_month s_day        endcase      end      else: return  report le fichier doit etre VO ou SO     endcase       print        print  adresse du fichier:  fichier      return  s_fichier   end  "); 
     87a[85] = new Array("./Obsolete/fictype.html", "fictype.pro", "", "           file_comments   gives fictype  DA   MO   AN   SE   EX  corresponding   to the given date in vairmer format   yymmdd        param vdate  in required       param dim unused      uses common pro      examples   IDL  fictype   fictype 930124       history Jerome Vialard   jv lodyc jussieu fr    2 7 98      version  Id: fictype pro 134 2006 07 07 10:19:08Z navarro             function fictype  vdate  dim     compile_opt idl2  strictarrsubs  obsolete    common       constitution de l adresse ou aller chercher le fichier     date yymmdd   vdate    jul   juldate vdate       case 1 of        year eq 0  and  month eq 0  : return   EX         year eq 0  and  month ne 0  and  day eq 0  : return   SE         year ne 0  and  month eq 0  : return   AN         year ne 0  and  day eq 0    : return   MO        else                         : return   DA     endcase        fini:      return   1 end  "); 
     88a[86] = new Array("./Obsolete/imprime.html", "imprime.pro", "", "           file_comments   use printps instead       obsolete      param filename  in required       keyword TRANS      keyword NB      uses printps      history   June 2005: Sebastien Masson  english version      version  Id: imprime pro 134 2006 07 07 10:19:08Z navarro             PRO imprime  filename  TRANS   trans  NB   nb     this is working only with unix linux osX machines     compile_opt idl2  strictarrsubs  obsolete     thisOS   strupcase strmid version os_family  0  3    CASE thisOS OF      MAC :return      WIN :return     ELSE:   ENDCASE     call printps     CASE N_PARAMS  OF     0:printps     1:printps  filename     ELSE: BEGIN       ras   report imprime accept only one element: psfilename        return     END   ENDCASE     return END  "); 
     89a[87] = new Array("./Obsolete/jourdsmois.html", "jourdsmois.pro", "", "           file_comments   used daysinmonth instead       obsolete      param mois  in optional       param annee  in optional       history Sebastien Masson  smasson lodyc jussieu fr    June 2005: Sebastien Masson  english version      version  Id: jourdsmois pro 134 2006 07 07 10:19:08Z navarro             function jourdsmois  mois  annee     compile_opt idl2  strictarrsubs  obsolete    case n_params  OF   0:return  daysinmonth    1:return  daysinmonth mois    2:return  daysinmonth mois  annee  endcase  end"); 
     90a[88] = new Array("./Obsolete/juldate.html", "juldate.pro", "", "           file_comments    gives julian date equivalent of a date in vairmer     yymmdd or yyyymmdd   format   sets month  day and year to the corresp values     you better use date2jul      obsolete      categories    Calendar      param vvdate  in  date de la forme yymmdd ou yyyymmdd      keyword _EXTRA used to pass your keywords      uses common pro vraidate      returns date en jour julien     l annee 0 n existant pas  qd year est nulle on calcule le       jour julien de l annee  1      COMPATIBLE AVEC L AN 2000  : une date de la forme yymmdd est      convertit sous la forme yyyymmdd a l aide de vraidate      Attention  les variables globales year  month day sont attribuees      examples   IDL  date   juldate 930124       history Jerome Vialard   jv lodyc jussieu fr    2 7 98      version  Id: juldate pro 157 2006 08 21 09:01:50Z navarro             function juldate  vvdate  _EXTRA   ex     compile_opt idl2  strictarrsubs  obsolete   vdate   vvdate vdate   vraidate vdate  _EXTRA   ex   common      year vdate 10000    month vdate 100   year 100    day abs vdate   year 10000   month 100     month   abs month       mm   month   dd   day   yy   year      ndate   n_elements vdate     if total mm EQ 0  EQ ndate then mm    6    if total dd EQ 0  EQ ndate then dd    15    if total yy EQ 0  EQ ndate THEN yy     1      return  julday mm dd yy  _EXTRA   ex       return   1 end  "); 
     91a[89] = new Array("./Obsolete/lec.html", "lec.pro", "", "           file_comments   lit les fichiers Vairmer en sort:   un tableau 2d ou 3d en fonction de nomchamp qui est le nom   du champ a extaire  2d s il commence par SO et 3d s il commence par VO    cette fonction modifie aussi les variables globales:   varname: trois lettres: nom de l experience   vargrid: nom de la grille   vardate: date  yy yymmdd   varexp: nom Vairmer du champ a tarcer      obsolete      categories    Graphics  Reading      examples   IDL  resultat lec nom_Vairmer date nom_experience       param nomchamp  in required  2 choix possibles:               1  nom de champ Vairmer  chaine de 8 caracteres en majuscule ou   minuscule commencant par vo ou so  Dans cette methode on saute directement   d en tete en en tete jusqu a trouver le bon fichier                2  chaine de characteres commencant par vo ou so suivit du   numero de champ a aller chercher  par ex  vo5  Cette methode est un peu   plus rapide car elle va directement chercher le fichier qui nous interesse       param date  in optional  nombres de 6 ou 8 chiffres  anneemoisjour  par ex:19980507       param nomexp  in optional  trois lettres designant le nom de l experience        keyword ANOM  in  type du fichier vairmer par rapport auquel on doit calculer               l anomalie  EX AN SE MO       keyword ECRIT  in  permet d imprimer tous les noms vairmer que contient le fichier    ds ce cas en input on met seulement  vo  ou  so  la fonction retourne le   nombre de fichiers lus       keyword BOITE      keyword EXPANOM  in  si on calcule l anom par rapport a une exper         differente      keyword FILENAME string pour passer directement le nom du champ sans         utiliser les inputs: nom_Vairmer date nom_experience  Rq si         ces inputs sont qd meme donnes ils ne sont pas modifies par         filename       keyword GRID lorsque ce mot clef est active  lec retourne la liste         des types de grilles  T  U  auxquelles se rapportent les         variables  ds ce cas en input on met seulement  vo  ou  so       keyword NAME lorsque ce mot clef est active  lec retourne la liste         des noms des variables  ds ce cas en input on met seulement          vo  ou  so       keyword TOUT  oblige lec a lire le champ sur tout le domaine qui a         etait selectionne pour la cession en cours  jpi jpj jpk       returns un tableau 2 ou 3d  sans le mot cle  TOUT  sa taille est   celle du sous domaine definit par domdef  nx ny nz  avec  TOUT le   champ a la taille du  domaine qui a etait selectionne pour la   cession en cours  jpi jpj jpk    pour les sous domaines cf:          http: www ipsl jussieu fr smlod sousdomaine html   Retourne  1 en cas d erreur       uses common pro isnumber pro fivardate pro      history Sebastien Masson  smasson lodyc jussieu fr   26 5 98                         Jerome Vialard : adaptation au format vairmer                                          keyword anom et expanom  1 7 98                         Sebastien Masson  masque des terres   14 8 98                         Sebastien Masson  decoupe pour les sous domaines   2 99      version  Id: lec pro 157 2006 08 21 09:01:50Z navarro             function lec  nomchamp date nomexp ECRIT ecrit ANOM anom  BOITE   boite EXPANOM expanom  TOUT   tout  GRID   grid  NAME   name  filename   FILENAME     compile_opt idl2  strictarrsubs  obsolete    common    tempsun   systime 1            pour key_performance    z    1      if keyword_set filename  then BEGIN       CASE strupcase strmid version os_family  0  3  of           MAC :sep    :            WIN :sep              ELSE:sep           ENDCASE       fname   strmid filename  rstrpos filename  sep 1        if n_elements nomchamp  EQ 0 then nomchamp   strmid fname 6  2        if n_elements date  EQ 0 then date   long strmid fname 8        if n_elements nomexp  EQ 0 then nomexp   strmid fname 0  3     endif      nomchamp strupcase nomchamp     dim string format a2 nomchamp   print   nom de l experience:  nomchamp     specification de la date et de l experience      case n_params  OF       0:BEGIN          if keyword_set filename  then begin             rien juldate date              prefix nomexp          ENDIF ELSE return  report Donnez un argument en entree ou utilisez le mot clef FILENAME        END       1:date long day long month 100 long year 10000       2:rien juldate date        3:begin          rien juldate date           prefix nomexp       end    endcase     verification de la dim du fichier      if dim ne  SO  and dim ne  VO  then return  report le nom du champ doit commencer par VO ou SO        constitution de l adresse ou aller chercher le fichier      s_fichier ficdate date dim      ouverture du fichier a l adresse s_fichier      openr  numlec  s_fichier   get_lun ERROR err   swap_if_little_endian    if err ne 0 then begin    print err_string       return   1    endif  taille en octet du fichier    infofichier fstat numlec      definition de la taille du fichier a aller chercher: jpidta jpjdta jpkdta       if n_elements jpidta  EQ 0 THEN BEGIN       if n_elements ixmindta  EQ 0 OR n_elements ixmaxdta  EQ 0 then          jpidta   jpiglo else jpidta   ixmaxdta ixmindta 1    endif    if n_elements jpjdta  EQ 0 THEN BEGIN       if n_elements iymindta  EQ 0 OR n_elements iymaxdta  EQ 0 then          jpjdta   jpjglo else jpjdta   iymaxdta iymindta 1    endif    if n_elements jpkdta  EQ 0 THEN BEGIN       if n_elements izmindta  EQ 0 OR n_elements izmaxdta  EQ 0 then          jpkdta   jpkglo else jpkdta   izmaxdta izmindta 1    endif     lecture des champs directement vers le champ ou l en tete que l on recherche   il faut savoir que:    le fortran ajoute au debut et a la fin de chaque write 4 octets de controle    les reels du model sont codes sur 4 octets    un charactere fait 1 octet    4 chaines de 8 characteres un tableau de reels 4 trucs de controle  pour les   2 write :    if dim eq  VO  then       taillebloc 4 8 long jpidta jpjdta jpkdta 4 4 4 else       taillebloc 4 8 long jpidta jpjdta 4 4 4     choix du type de lecture      typelec strmid nomchamp 2 strlen nomchamp     test isnumber typelec numerochamp     if test eq 0 then begin     1  LECTURE DIRECTE D EN TETE en EN TETE         numerochamp 1     lecture des noms de champ         resname           resgrid           while numerochamp taillebloc le infofichier size do begin          offset numerochamp 1 taillebloc 4          a assoc numlec bytarr 8 nozero  offset           varname string a 0           if keyword_set ecrit  OR keyword_set name  OR keyword_set grid              then begin             vargrid a 1              vargrid string vargrid 7              vardate strtrim long string a 2  2              varexp strtrim a 3  2              if keyword_set ecrit  THEN                print  numerochamp   varname   vargrid   vardate   varexp             resname    resname  varname              resgrid    resgrid  vargrid           endif          if nomchamp eq varname then begin             vargrid a 1              vargrid string vargrid 7              vardate strtrim long string a 2  2              varexp strtrim a 3  2              goto sortieboucle          endif          numerochamp numerochamp 1       ENDWHILE       free_lun numlec       close  numlec       case 1 of          keyword_set ecrit :return  numerochamp 1          keyword_set name :return  resname 1:numerochamp 1           keyword_set grid :            return  strmid resgrid 1:numerochamp 1 0    strlen resgrid 0 2           ELSE:return  report Ce nom Vairmer de champ n existe pas ds le fichier:  infofichier name        endcase    endif else begin     2  LECTURE DIRECTEMENT DU CHAMP QUE L ON VEUT       test pour savoir si numero de champ est accessible         if taillebloc numerochamp gt infofichier size then          return  report Ce numero de champ n exite pas  Le fichier  infofichier name  ne contient que  infofichier size taillebloc  champs      lecture de l en tete numero numerochamp         offset numerochamp 1 taillebloc 4       a assoc numlec bytarr 8 nozero  offset        varname string a 0        vargrid a 1        vargrid string vargrid 7        vardate string a 2        varexp string a 3     endelse sortieboucle:     lecture du champ lui meme      offset numerochamp 1 taillebloc 8 4 8 4    if dim eq  VO  then       a assoc numlec fltarr jpidta jpjdta jpkdta nozero  offset  else       a assoc numlec fltarr jpidta jpjdta nozero  offset     z a 0      on initialise les ixmindta  iymindta  au besoin      if n_elements ixmindta  EQ 0 OR n_elements ixmaxdta  EQ 0 then BEGIN       ixmindta   0       ixmaxdta   jpidta 1    endif    if n_elements iymindta  EQ 0 OR n_elements iymaxdta  EQ 0 then BEGIN       iymindta   0       iymaxdta   jpjdta 1    endif    if n_elements izmin  EQ 0 OR n_elements izmax  EQ 0 then BEGIN       izmindta   0       izmaxdta   jpkdta 1    endif     on reduit z selon les valeurs de ixmindta  iymindta         if dim EQ  SO  then z   z ixminmesh ixmindta:ixmaxmesh ixmindta                                 iyminmesh iymindta:iymaxmesh iymindta       ELSE z   z ixminmesh ixmindta:ixmaxmesh ixmindta                   iyminmesh iymindta:iymaxmesh iymindta  izminmesh izmindta:izmaxmesh izmindta      on shift z si key_shift est defininit      if n_elements key_shift  NE 0 THEN BEGIN       if dim EQ  SO  then z   shift z key_shift  0          ELSE z   shift z key_shift  0  0     endif      si  TOUT n est pas active  on coupe z pour q il soit a la taille    du zoom: nx ny nz      if NOT keyword_set tout  then BEGIN     changement de domaine         if keyword_set boite  then BEGIN          Case 1 Of             N_Elements Boite  Eq 1:bte lon1  lon2  lat1  lat2  0 boite 0              N_Elements Boite  Eq 2:bte lon1  lon2  lat1  lat2  boite 0 boite 1              N_Elements Boite  Eq 4:bte Boite  prof1  prof2              N_Elements Boite  Eq 5:bte Boite 0:3  0  Boite 4              N_Elements Boite  Eq 6:bte Boite             Else: return  report Mauvaise Definition de Boite           endcase          oldboite    lon1  lon2  lat1  lat2  prof1  prof2           domdef  bte GRILLE vargrid       ENDIF         grille mask glam gphi gdep nx ny nz premierx premiery premierz dernierx derniery dernierz       if nx EQ 1 OR ny EQ 1 OR nz EQ 1 then mask   reform mask  nx  ny  nz   over        if dim EQ  SO  then z   z premierx:dernierx  premiery:derniery           ELSE z   z premierx:dernierx  premiery:derniery  premierz:dernierz     ENDIF ELSE BEGIN       case vargrid OF             on recupere le mask en entier ds le cas ou  TOUT           U :mask   umask        n est pas active et on le choisit en fontion           T :mask   tmask          de la valeur de vargrid           W :mask   tmask           V :mask   vmask            F :mask   fmask        ENDCASE    ENDELSE     calcul d une anomalie si le keyword anom est active      if keyword_set anom  then begin       case anom of           EX  : adate   0           AN  : adate   floor date 10000 10000           SE  : adate   floor date   floor date 10000 10000 100   100           MO  : adate   floor date 100 100           DA  : adate   date   floor date 10000 10000              : adate   date   floor date 10000 10000          else : return  report Anom doit etre egal a EX AN SE MO DA         endcase       if keyword_set expanom  then nomexpa   expanom         else nomexpa   nomexp       if keyword_set bavard  THEN print  nomchamp     adate     nomexpa       z   z   lec nomchamp adate nomexpa  TOUT   tout     endif     on masque les terres par valmask      IF n_elements valmask  EQ 0 THEN valmask   1e20    if dim EQ  SO  then BEGIN       terre   where mask 0  EQ 0        if terre 0  NE  1 then z terre    valmask    ENDIF ELSE BEGIN       terre   where mask 0  EQ 0        if terre 0  NE  1 then z where mask EQ 0    valmask    ENDELSE      free_lun numlec    close  numlec      if n_elements oldboite  NE 0 then domdef   oldboite    IF keyword_set key_performance  EQ 1 THEN print   temps lec  systime 1 tempsun      return reform z   end "); 
     92a[90] = new Array("./Obsolete/lect.html", "lect.pro", "", "             file_comments   lit les fichiers Vairmer de date1 a date2 et en sort un tableau   1D  2D ou 3D qui peut etre reutilise pour une courbe   hov   animation   cette fonction modifie aussi les variables globales:   varname: huit lettres: nom Vairmer du champ a tracer   vargrid:1 lettre : nom de la grille   varexp: trois lettres :nom de l experience      obsolete      categories    Graphics  Reading      examples   IDL  resultat lec nom_Vairmer date1 date2 nomexp direc BOITE boite       param nomchamp  in required    nom de champ Vairmer  chaine de 8 caracteres commencant par VO ou SO      param date1  in required    date de depart de la serie temporelle a extraire      param date2  in required    date de fin de la serie temporelle a extraire      param nomexp  in required   default prefix    nom de l experience a lire      param direc  in required     x   y   z   xy   xz   yz   xyz   xt   yt   zt   xyt   xzt     yzt   xyzt  directions selon lesquelles effectuer les moyennes    si rien n est donne on n effectue pas de moyenne       keyword BOITE  in    boite sur laquelle integrer  par defaut tout le domaine       keyword ANOM  in    type de fichiers  SE AN  a relire pour calc une  anomalie      keyword EXPANOM  in    experience pour laquelle on veut calculer une anomalie   par defaut la meme que nomexp      uses common vraidate juldate      history Jerome Vialard  jv lodyc jussieu fr    2 7 98      version  Id: lect pro 157 2006 08 21 09:01:50Z navarro                                1      2      3    4      5 function lect  nomchamp date1 date2 nomexp direc BOITE boite                   ANOM anom EXPANOM expanom  REPEAT repeat     compile_opt idl2  strictarrsubs  obsolete    common    tempsun   systime 1            pour key_performance      nomchamp   strupcase nomchamp     date1 vraidate date1     date2 vraidate date2       dim string format a2 nomchamp        specification de la date et de l experience        if fictype date1  ne fictype date2  then       return  report Les deux dates doivent correspondre au meme type de fic vairmer     fictyp   fictype date1      creation du nom du fichier      if n_elements nomexp  EQ 0 then nomexp   prefix    ficname iodir nomchamp strcompress date1 remove_all     ficname ficname  fictyp strcompress date2 remove_all nomexp    if  keyword_set anom  then ficname ficname  anom    if  keyword_set expanom  then ficname ficname  expanom    case n_elements boite  of       4 : box   strcompress string format i4 _ i4 _ i4 _ i4 boite                                 remove_all        6 : box   strcompress string format i4 _ i4 _ i4 _ i4 _ i4 _ i4 boite remove_all        else: box  strcompress string format i4 _ i4 _ i4 _ i4 _ i4 _ i4 lon1 lon2 lat1 lat2 prof1 prof2 remove_all     ENDCASE    if n_elements direc  EQ 0 then direc        ficname ficname box direc hovdat      Est ce que le fichier de hovmoller existe         structure du fichier :   jpt  valeur de la dim temporelle  dimtableau  dimension du tableau    dimttab 0  dimttab 1     valeur des dim     time  axe des tps  ttab  tableau a lire    def du domaine  lon1 lon2    prof1 prof2       get_lun  numlec    openr  numlec  ficname   get_lun ERROR err   swap_if_little_endian    if  err eq 0  then begin       jpt   long 1        dimtableau   long 1        readu  numlec  jpt dimtableau       case dimtableau of          1 : begin             n1   long 1              readu  numlec n1             ttab   fltarr n1           end          2 : begin             n1   long 1              n2   long 1              readu  numlec n1 n2             ttab   fltarr n1 n2           end          3 : begin             n1   long 1              n2   long 1              n3   long 1              readu  numlec n1 n2 n3             ttab   fltarr n1 n2 n3           end       endcase       time   lonarr jpt    lecture axe des tps et du tableau       readu  numlec time  ttab       newboite   fltarr 6    lecture du domaine       readu  numlec newboite       domdef  newboite   lecture info complementaire : nom du champs  de l experience       varname aaaaaaaa        readu  numlec  varname       vargrid a        readu  numlec  vargrid       varexp aaa        readu  numlec  varexp         close  numlec       free_lun  numlec       return  ttab    ENDIF    close  numlec    free_lun  numlec     changement de domaine      if keyword_set boite  then BEGIN       Case 1 Of          N_Elements Boite  Eq 1:bte lon1  lon2  lat1  lat2  0 boite 0           N_Elements Boite  Eq 2:bte lon1  lon2  lat1  lat2  boite 0 boite 1           N_Elements Boite  Eq 4:bte Boite  prof1  prof2           N_Elements Boite  Eq 5:bte Boite 0:3  0  Boite 4           N_Elements Boite  Eq 6:bte Boite          Else: return  report Mauvaise Definition de Boite        endcase       oldboite    lon1  lon2  lat1  lat2  prof1  prof2        domdef  bte    ENDIF       Boucle de lecture des fichiers      case fictyp of        DA  : dec   0         MO  : dec   14         SE  : dec   14         AN  : dec   182     endcase  initialisation des variables associees au tps    time   lonarr jptmax     jpt   0    vdat   date1   debut de la boucle    while  vdat le date2  do begin     lecture du fichier a la date vdat  vairmer          tab   lec nomchamp vdat nomexp ANOM anom EXPANOM expanom      attribution du mask et des tableaux de longitude et latitude          if jpt EQ 0 THEN grille  mask  glam  gphi  gdep  nx  ny nz premierx premiery premierz dernierx  derniery  dernierz         if  n_elements tab  eq 1 and tab 0  eq  1  then begin          goto  incrdate       endif else begin          jpt   jpt   1          if  jpt gt jptmax  then return  report lect : augmenter jptmax        endelse     Moyenne du champs tab         IF n_params  EQ 5 THEN if direc NE   then BEGIN          if nx EQ 1 OR ny EQ 1 OR nz EQ 1 THEN BEGIN             if string format a2 nomchamp  EQ  SO  then tab   reform tab  nx  ny   over                ELSE tab   reform tab  nx  ny  nz   over           ENDIF          tab   moyenne tab direc        endif       if  jpt eq 1  then begin          ttab   tab       endif else BEGIN          ttab   colle ttab  tab   size tab 0 1         endelse       time jpt 1    juldate vdat dec     Incrementation de la date         incrdate :       case fictyp of           DA  : caldat juldate vdat 1 month day year           MO  : begin             caldat julday month 1 year jourdsmois month day year             day 0          end           SE  : month month 1           AN  : year year 1       endcase       Fin de boucle de lecture des fichiers         vdat long 10000 year long 100 month day    ENDWHILE    if ttab 0  EQ  1 then return  report Aucun fichier n a ete lu        Ecriture du fichier      get_lun  numlec    openw  numlec  ficname   get_lun   swap_if_little_endian    taille   size ttab     writeu  numlec  long jpt long taille 0     case taille 0  of       1 : writeu  numlec long taille 1        2 : writeu  numlec long taille 1 long taille 2        3 : writeu  numlec long taille 1 long taille 2 long taille 3     endcase    writeu  numlec long time 0:jpt 1  ttab    writeu  numlec float lon1  lon2  lat1  lat2  prof1  prof2    ecriture info complementaire : nom du champs  de l experience    writeu  numlec  strmid varname 0 8     writeu  numlec  strmid vargrid 0 1     writeu  numlec  strmid varexp 0 3       close  numlec    free_lun  numlec    if keyword_set repeat  then begin     jpt   jpt   repeat     if  jpt gt jptmax  then begin       print   lect : augmenter jptmax        goto  fini     endif     tabadd   ttab     ti  endif      if n_elements oldboite  NE 0 then domdef   oldboite      close   all      IF keyword_set key_performance  THEN print   temps lect  systime 1 tempsun      return  ttab  end    "); 
     93a[91] = new Array("./Obsolete/meshlec.html", "meshlec.pro", "", "             file_comments    lecture du mask des sorties d OPA  les sources se trouvent ds les   repertoires sur maia du type:    nom_exp RESTARTS      obsolete      examples   IDL  meshmask  nomfich       param nomfich  in required  string  c est le nom du fichier a lire  Par defaut  c est meshmask       keyword GLAMBOUNDARY  in  un vecteur de 2 elements specifaint le min et le   max qui doivent etre imposes en longitude  obligatoire si le   tableau depasse 360 degres       keyword pasblabla  in  pour suprimer les blablas      keyword DOUBLE  in  pour forcer a lire les tableaux en double          precision  ce Mot clef est maintenant active          automatiquement       keyword GETDIMENSIONS      uses common pro      restrictions    La definition de ixminmesh ixmaxmesh iyminmesh iymaxmesh     izminmesh izmaxmesh doit etre faite avant l entree dans cette    routine  pour attribuer automatiquement ces valeurs au maximum    possible les mettre toutes a  1 et meshlec les calculera       history Sebastien Masson  smasson lodyc jussieu fr        Marina Levy : lecture en double precision  cas calcul sur shine       version  Id: meshlec pro 134 2006 07 07 10:19:08Z navarro             pro meshlec  nomfich  PASBLABLA   pasblabla DOUBLE   double  GLAMBOUNDARY   glamboundary  GETDIMENSIONS   GETDIMENSIONS     compile_opt idl2  strictarrsubs  obsolete    common    tempsun   systime 1            pour key_performance        jpiglo        0L    jpjglo        0L    jpkglo        0L    tab       aaaaa       definition du domaine de la grille surlequel sont    effectuees les sorties les indices des tableaux commencant    a 1: cf le fichier wrivr2 F ds WKOPA sur le cray     LECTURE DU MASK trouve ds les fichiers restart                 constitution de l adresse s_fichier et       ouverture du fichier a l adresse s_fichier       IF n_params  EQ 0 then nomfich    meshmask     s_fichier   isafile file   nomfich  iodir   iodir     if not keyword_set pasblabla  then print         if not keyword_set pasblabla  then print adresse du fichier:  s_fichier     openr  numlec  s_fichier   get_lun   f77_unformatted   swap_if_little_endian    filepamameters   fstat numlec          lecture      readu  numlec  jpiglo  jpjglo  jpkglo    if not keyword_set pasblabla  then print   taille de la grille d origine:  jpiglo   jpjglo   jpkglo      if keyword_set getdimensions  then begin       free_lun numlec       close  numlec       return    endif      on determine si le fichier a ete ecrit en double precision on non     sizenumber   8l    sizefile8   4l 3l 4l 4l        4l 4l jpiglo jpjglo sizenumber 4l         4l 4l jpiglo jpjglo sizenumber 4l         4l 4l jpiglo jpjglo sizenumber 4l         4l 4l jpiglo jpjglo sizenumber 4l         4l 4l jpiglo jpjglo jpkglo sizenumber 4l         1l 4l jpiglo jpjglo sizenumber 4l         4l 4l jpkglo sizenumber 4l     if filepamameters size GE sizefile8 THEN double   1      sizenumber   4l      sizefile4   4l 3l 4l 4l          4l 4l jpiglo jpjglo sizenumber 4l           4l 4l jpiglo jpjglo sizenumber 4l           4l 4l jpiglo jpjglo sizenumber 4l           4l 4l jpiglo jpjglo sizenumber 4l           4l 4l jpiglo jpjglo jpkglo sizenumber 4l           1l 4l jpiglo jpjglo sizenumber 4l           4l 4l jpkglo sizenumber 4l    print  filepamameters size   sizefile4   sizefile8      case filepamameters size of         sizefile8:double   1         sizefile4:double   0         ELSE:BEGIN            nothing   report The OPA Mesh file as not the good size             free_lun numlec            close  numlec            return         END      endcase        if n_elements ixminmesh  EQ 0 THEN ixminmesh   0    if n_elements ixmaxmesh  EQ 0 then ixmaxmesh   jpiglo 1    if ixminmesh EQ  1 THEN ixminmesh   0    IF ixmaxmesh EQ  1 then ixmaxmesh   jpiglo 1    if n_elements iyminmesh  EQ 0 THEN iyminmesh   0    IF n_elements iymaxmesh  EQ 0 then iymaxmesh   jpjglo 1    if iyminmesh EQ  1 THEN iyminmesh   0    IF iymaxmesh EQ  1 then iymaxmesh   jpjglo 1    if n_elements izminmesh  EQ 0 THEN izminmesh   0    IF n_elements izmaxmesh  EQ 0 then izmaxmesh   jpkglo 1    if izminmesh EQ  1 THEN izminmesh   0    IF izmaxmesh EQ  1 then izmaxmesh   jpkglo 1         jpi      long ixmaxmesh ixminmesh 1     jpj      long iymaxmesh iyminmesh 1     jpk      long izmaxmesh izminmesh 1      doit on reellement lire la grille       meshparameters    jpiglo:jpiglo  jpjglo:jpjglo  jpkglo:jpkglo                          jpi:jpi  jpj:jpj  jpk:jpk                          ixminmesh:ixminmesh  ixmaxmesh:ixmaxmesh                          iyminmesh:iyminmesh  iymaxmesh:iymaxmesh                          izminmesh:izminmesh  izmaxmesh:izmaxmesh                          key_shift:key_shift         noticebase xnotice Lecture du fichier  C  s_fichier C         IF NOT keyword_set double  THEN BEGIN       z3d      fltarr jpiglo  jpjglo  jpkglo        z2d      fltarr jpiglo  jpjglo        z1d      fltarr jpkglo     ENDIF ELSE BEGIN       z3d      dblarr jpiglo  jpjglo  jpkglo        z2d      dblarr jpiglo  jpjglo        z1d      dblarr jpkglo     ENDELSE     if not keyword_set pasblabla  then print         readu  numlec  tab z2d    GLAMT float z2d ixminmesh:ixmaxmesh iyminmesh:iymaxmesh     if not keyword_set pasblabla  then print   tableau:  tab  exemple de valeur GLAMT 25 31 :  GLAMT 25 31     readu  numlec  tab z2d    GLAMU float z2d ixminmesh:ixmaxmesh iyminmesh:iymaxmesh     if not keyword_set pasblabla  then print   tableau:  tab  exemple de valeur GLAMU 25 31 :  GLAMU 25 31     readu  numlec  tab z2d    GLAMV float z2d ixminmesh:ixmaxmesh iyminmesh:iymaxmesh     if not keyword_set pasblabla  then print   tableau:  tab  exemple de valeur GLAMV 25 31 :  GLAMV 25 31     readu  numlec  tab z2d    GLAMF float z2d ixminmesh:ixmaxmesh iyminmesh:iymaxmesh     if not keyword_set pasblabla  then print   tableau:  tab  exemple de valeur GLAMF 25 31 :  z2d 25 31      if not keyword_set pasblabla  then print         readu  numlec  tab  z2d    GPHIT float z2d ixminmesh:ixmaxmesh iyminmesh:iymaxmesh     if not keyword_set pasblabla  then print   tableau:  tab  exemple de valeur GPHIT 25 31 :  GPHIT 25 31     readu  numlec  tab  z2d    GPHIU float z2d ixminmesh:ixmaxmesh iyminmesh:iymaxmesh     if not keyword_set pasblabla  then print   tableau:  tab  exemple de valeur GPHIU 25 31 :  GPHIU 25 31     readu  numlec  tab  z2d    GPHIV float z2d ixminmesh:ixmaxmesh iyminmesh:iymaxmesh     if not keyword_set pasblabla  then print   tableau:  tab  exemple de valeur GPHIV 25 31 :  GPHIV 25 31     readu  numlec  tab  z2d    GPHIF float z2d ixminmesh:ixmaxmesh iyminmesh:iymaxmesh     if not keyword_set pasblabla  then print   tableau:  tab  exemple de valeur GPHIF 25 31 :  z2d 25 31      if not keyword_set pasblabla  then print         readu  numlec  tab  z2d    E1T float z2d ixminmesh:ixmaxmesh iyminmesh:iymaxmesh     if not keyword_set pasblabla  then print   tableau:  tab  exemple de valeur E1T 25 5 :  z2d 25 5     readu  numlec  tab  z2d    E1U float z2d ixminmesh:ixmaxmesh iyminmesh:iymaxmesh     if not keyword_set pasblabla  then print   tableau:  tab  exemple de valeur E1U 25 5 :  z2d 25 5     readu  numlec  tab  z2d    E1V float z2d ixminmesh:ixmaxmesh iyminmesh:iymaxmesh     if not keyword_set pasblabla  then print   tableau:  tab  exemple de valeur E1V 25 5 :  z2d 25 5     readu  numlec  tab  z2d    E1F float z2d ixminmesh:ixmaxmesh iyminmesh:iymaxmesh     if not keyword_set pasblabla  then print   tableau:  tab  exemple de valeur E1F 25 5 :  z2d 25 5      if not keyword_set pasblabla  then print         readu  numlec  tab  z2d    E2T float z2d ixminmesh:ixmaxmesh iyminmesh:iymaxmesh     if not keyword_set pasblabla  then print   tableau:  tab  exemple de valeur E2T 25 5 :  z2d 25 5     readu  numlec  tab  z2d    E2U float z2d ixminmesh:ixmaxmesh iyminmesh:iymaxmesh     if not keyword_set pasblabla  then print   tableau:  tab  exemple de valeur E2U 25 5 :  z2d 25 5     readu  numlec  tab  z2d    E2V float z2d ixminmesh:ixmaxmesh iyminmesh:iymaxmesh     if not keyword_set pasblabla  then print   tableau:  tab  exemple de valeur E2V 25 5 :  z2d 25 5     readu  numlec  tab  z2d    E2F float z2d ixminmesh:ixmaxmesh iyminmesh:iymaxmesh     if not keyword_set pasblabla  then print   tableau:  tab  exemple de valeur E2F 25 5 :  z2d 25 5      if not keyword_set pasblabla  then print         readu  numlec  tab  z3d    TMASK byte z3d ixminmesh:ixmaxmesh iyminmesh:iymaxmesh izminmesh:izmaxmesh     if not keyword_set pasblabla  then print   tableau:  tab  exemple de valeur TMASK 25 5 0 :  TMASK 25 5 0     readu  numlec  tab  z3d    UMASKred byte z3d ixmaxmesh iyminmesh:iymaxmesh izminmesh:izmaxmesh     umaskred   reform umaskred     if not keyword_set pasblabla  then print   tableau:  tab  exemple de valeur UMASK 25 5 0 :  z3d 25 5 0     readu  numlec  tab  z3d    VMASKred byte z3d ixminmesh:ixmaxmesh iymaxmesh izminmesh:izmaxmesh     vmaskred   reform vmaskred     if not keyword_set pasblabla  then print   tableau:  tab  exemple de valeur VMASK 25 5 0 :  z3d 25 5 0     readu  numlec  tab  z3d    fmaskredy byte z3d ixmaxmesh iyminmesh:iymaxmesh izminmesh:izmaxmesh     coast   where fmaskredy NE 0 and fmaskredy NE 1     IF coast 0  NE  1 THEN fmaskredy coast    0b    fmaskredx byte z3d ixminmesh:ixmaxmesh iymaxmesh izminmesh:izmaxmesh     coast   where fmaskredx NE 0 and fmaskredx NE 1     IF coast 0  NE  1 THEN fmaskredx coast    0b    fmaskredx   reform fmaskredx     fmaskredy   reform fmaskredy     if not keyword_set pasblabla  then print   tableau:  tab  exemple de valeur FMASK 25 5 0 :  z3d 25 5 0       if not keyword_set pasblabla  then print         readu  numlec  tab  z2d  FF z2d ixminmesh:ixmaxmesh iyminmesh:iymaxmesh     if not keyword_set pasblabla  then print   tableau:  tab  exemple de valeur FF 25 5 :  z2d 25 5     readu  numlec  tab  z1d    GDEPT float z1d izminmesh:izmaxmesh     if not keyword_set pasblabla  then print   tableau:  tab  exemple de valeur GDEPT 1 :  GDEPT 1     readu  numlec  tab  z1d    GDEPW float z1d izminmesh:izmaxmesh     if not keyword_set pasblabla  then print   tableau:  tab  exemple de valeur GDEPW 1 :  GDEPW 1     readu  numlec  tab  z1d    E3T float z1d izminmesh:izmaxmesh     if not keyword_set pasblabla  then print   tableau:  tab  exemple de valeur E3T 3 :  E3T 3     readu  numlec  tab  z1d    E3W float z1d izminmesh:izmaxmesh     if not keyword_set pasblabla  then print   tableau:  tab  exemple de valeur E3W 3 :  E3W 3       free_lun numlec    close  numlec       bornes de glam qui ne doivent pas depasser 360 degres         minglam   min glamt  max   maxglam       if maxglam minglam GE 360 AND NOT keyword_set glamboundary  then         nothing   execute glamboundary    xquestion What are the longitudes boundary   180 180 chkwidget       if keyword_set glamboundary  then begin       if glamboundary 0  NE glamboundary 1  then begin          glamt   glamt MOD 360          smaller   where glamt LT glamboundary 0           if smaller 0  NE  1 then glamt smaller    glamt smaller 360          bigger   where glamt GE glamboundary 1           if bigger 0  NE  1 then glamt bigger    glamt bigger 360          glamu   glamu MOD 360          smaller   where glamu LT glamboundary 0           if smaller 0  NE  1 then glamu smaller    glamu smaller 360          bigger   where glamu GE glamboundary 1           if bigger 0  NE  1 then glamu bigger    glamu bigger 360          glamv   glamv MOD 360          smaller   where glamv LT glamboundary 0           if smaller 0  NE  1 then glamv smaller    glamv smaller 360          bigger   where glamv GE glamboundary 1           if bigger 0  NE  1 then glamv bigger    glamv bigger 360          glamf   glamf MOD 360          smaller   where glamf LT glamboundary 0           if smaller 0  NE  1 then glamf smaller    glamf smaller 360          bigger   where glamf GE glamboundary 1           if bigger 0  NE  1 then glamf bigger    glamf bigger 360       endif    endif     shift en x      if keyword_set key_shift  AND jpi NE 1 then begin       glamt   shift glamt key_shift   0        gphit   shift gphit key_shift   0        e1t   shift e1t  key_shift  0        e2t   shift e2t key_shift   0        glamu   shift glamu  key_shift  0        gphiu   shift gphiu  key_shift  0        e1u   shift e1u key_shift   0        e2u   shift e2u  key_shift  0        glamv   shift glamv  key_shift  0        gphiv   shift gphiv  key_shift  0        e1v   shift e1v key_shift   0        e2v   shift e2v  key_shift  0        glamf   shift glamf  key_shift  0        gphif   shift gphif  key_shift  0        e1f   shift e1f  key_shift   0        e2f   shift e2f  key_shift  0        if jpk EQ 1 then begin          tmask   shift tmask  key_shift  0           vmaskred   shift vmaskred  key_shift           fmaskredx   shift fmaskredx  key_shift        ENDIF ELSE BEGIN          tmask   shift tmask  key_shift  0 0           vmaskred   shift vmaskred  key_shift  0           fmaskredx   shift fmaskredx  key_shift  0        ENDELSE    endif      key_yreverse   0    key_zreverse   0    key_partialstep   0    key_stride    1  1  1     key_gridtype    c       if not keyword_set pasblabla  then print lecture  nomfich  finie     widget_control  noticebase  bad_id   toto   destroy    if keyword_set key_performance  THEN print   temps meshlec  systime 1 tempsun     return end    "); 
     94a[92] = new Array("./Obsolete/ncdf_meshlec.html", "ncdf_meshlec.pro", "", "           file_comments    use ncdf_meshread instead       obsolete      param filename      keyword _EXTRA used to pass your keywords      history   Aug  2005  Sebastien Masson: switch to ncdf_meshread      version  Id: ncdf_meshlec pro 134 2006 07 07 10:19:08Z navarro             PRO ncdf_meshlec  filename  _EXTRA   ex       compile_opt idl2  strictarrsubs  obsolete     CASE n_params  OF     0:ncdf_meshread  _EXTRA   ex     1:ncdf_meshread  filename  _EXTRA   ex   ENDCASE     return END"); 
     95a[93] = new Array("./Obsolete/nlec.html", "nlec.pro", "", "           file_comments    lit les fichiers Net Cdf de l experience TOTEM ECMWF qui sont sur   maia:  u rech eee reee217 TOTEM REF OUTPUTS      obsolete      param name  in required  nom du tableau contenant le champ que l on veut  le   trouver avec ncdflec fichier var      param debut  in  nombres de 6 ou 8 chiffres  anneemoisjour  par ex:19980507     param fin  in  nombres de 6 ou 8 chiffres  anneemoisjour  par ex:19980507     param nomexperience  in optional  trois lettres designant le nom de l experience        keyword BOITE boite sur laquelle integrer  par defaut tt le domaine       keyword DIREC  x   y   z   xy   xz   yz   xyz  directions selon lesquelles               effectuer les moyennes  si rien n est donne on n effectue pas de moyenne       keyword GRILLE impose la grille a laquelle est rapporte le champ  rq permet   d aller plus vite ds la lecture      keyword TOUT oblige a lire le tableau entier en non pas celui reduit a domdef    keyword STRUCTURE    keyword SEUILMIN    keyword SEUILMAX    keyword NAN      keyword _EXTRA used to pass your keywords      uses common pro vraidate juldate  nlec5j nlecserie      history Sebastien Masson  smasson lodyc jussieu fr      14 8 98      version  Id: nlec pro 134 2006 07 07 10:19:08Z navarro          REF 07 790101 grid T nc  REF 07 790101 grid U nc  REF 07 790101 grid V nc  REF 07 790101 grid W nc     function nlec name debut fin nomexperience BOITE boite DIREC direc GRILLE grille TOUT tout                   STRUCTURE   structure  SEUILMIN   seuilmin  SEUILMAX   seuilmax  NAN   nan                   _EXTRA   ex     compile_opt idl2  strictarrsubs  obsolete    common      tempsun   systime 1            pour key_performance    nom strlowcase name      specification de la date et de l experience      case n_params  of       1:BEGIN          year year 1900 year ne 0 and year ne  1 and year lt 100           date   day 100 month 10000 year       end       2:BEGIN          if size debut   tname  EQ  STRING  then begin             prefix   strupcase debut              year year 1900 year ne 0 and year ne  1 and year lt 100              date   day 100 month 10000 year          ENDIF ELSE BEGIN             date   debut             rien juldate date           ENDELSE       end       3:begin          date   debut          rien juldate date           if size fin   tname  EQ  STRING  then begin             prefix   strupcase fin           ENDIF ELSE BEGIN             date2 vraidate fin              year2 date2 10000             month2 date2 100   year2 100             day2 date2   year2 10000   month2 100          ENDELSE       end       4:BEGIN          date   debut          rien juldate date            if size nomexperience   tname  EQ  STRING  then begin             prefix   strupcase nomexperience              date2   fin          ENDIF ELSE BEGIN             prefix   strupcase fin              date2   nomexperience          ENDELSE          date2 vraidate date2           year2 date2 10000          month2 date2 100   year2 100          day2 date2   year2 10000   month2 100       end    endcase    date   long date     if n_elements date2  NE 0 then date2   long date2     if n_elements date2  NE 0 then if date2 eq date then tempvar   SIZE TEMPORARY date2      verification de la coherence des dates      if n_elements date2  ne 0 then begin       if  day    EQ 0 AND day2  NE 0  OR  month EQ 0 AND month2 NE 0  OR           year   EQ 0 AND year2 NE 0  or  day2  EQ 0 AND day    NE 0  OR           month2 EQ 0 AND month NE 0  OR  year2 EQ 0 AND year   NE 0  then          return   report verifier la coherence des dates        if date2 le date then return  report date2 doit etre posterieure a date     endif     case sur le type de fichiers que l on veut lire    determination ds chaque cas de numsortie et nbretps      if day NE 0 then begin         SORTIES A 5 JOURS     numsortie   testjour:       numsortie 1 julday month day year julday 1 1 year 5 0        if numsortie ne floor numsortie  then begin          if n_elements date2  ne 0 then begin             caldat julday month day 1 year month day year             goto  testjour          endif          return    1       ENDIF       numsortie   long numsortie      determination du nombre de pas de tps a extraire pour la serie temporelle   entiere: nbretps         if n_elements date2  ne 0 then begin          testjour2:          numsortie2 1 julday month2 day2 year2 julday 1 1 year2 5           if numsortie2 ne floor numsortie2  then begin             caldat julday month2 day2 1 year2 month2 day2 year2             goto  testjour2          endif          if year eq year2 then nbretps numsortie2 numsortie 1 else             nbretps 73 numsortie 1 year2 year 1 73 numsortie2          numsortie2   long numsortie2        endif else nbretps 1       nbretps   long nbretps      si on fait une serie temporelle on cherche a lire plutot un fichier   contenant deja une serie temporelle par contre pour une sortie   unique on cherche d abord a lire un fichier contenant toutes les variables          IF n_elements date2  ne 0 THEN BEGIN          serie:          IF n_elements dejaserie  eq 1 then return   1          datejul   5 numsortie 1 julday 1  1  year           if n_elements date2  ne 0 then date2jul   5 numsortie2 1 julday 1  1  year2             ELSE date2jul   datejul          res   nlecserie nom  datejul  date2jul BOITE boite GRILLE grille TOUT tout  _EXTRA   ex           IF res 0  EQ  1 THEN BEGIN             dejaserie   1             GOTO   passerie          ENDIF       ENDIF ELSE BEGIN          passerie:          IF n_elements dejapasserie  eq 1 then return   1          res     nlec5j  nom  numsortie    nbretps BOITE boite GRILLE grille TOUT tout  _EXTRA   ex           IF res 0  EQ  1 THEN BEGIN             dejapasserie   1             GOTO   serie          ENDIF       endelse    ENDIF ELSE BEGIN       CASE 1 of          month NE 0 AND year NE 0:BEGIN   SORTIES MENSUELLES             numsortie79    year 1979 12 month             if n_elements date2  ne 0 then nbretps   month2 month 1 12 year2 year                ELSE nbretps   1             res   nlecmois nom numsortie79 nbretps  BOITE boite GRILLE grille TOUT tout  _EXTRA   ex           end          month EQ 0 AND year NE 0:BEGIN   SORTIES ANNUELLES             numsortie79    year 1978              if n_elements date2  ne 0 then nbretps   year2 year 1               ELSE nbretps   1             res   nlecan nom numsortie79 nbretps  BOITE boite GRILLE grille TOUT tout  _EXTRA   ex           end          month NE 0 AND year EQ 0:BEGIN   SORTIES SAISONNIERES             numsortie79   month             if n_elements date2  ne 0 then nbretps   month2 month 1               ELSE nbretps   1             res   nlecsaison nom numsortie79 nbretps  BOITE boite GRILLE grille TOUT tout  _EXTRA   ex           end          month EQ 0 AND year EQ 0:BEGIN   SORTIES CLIMATOLOGIQUE             numsortie79   13             nbretps   1             res   nlecsaison nom numsortie79 nbretps  BOITE boite GRILLE grille TOUT tout  _EXTRA   ex           end       endcase    endelse      seuil      if n_elements seuilmin  NE 0 then BEGIN       if n_elements valmask  EQ 0 then valmask   1e20       terre   where res GT valmask 10        res   seuilmin   res       if terre 0  NE  1 then res terre    valmask       undefine  terre    endif    if n_elements seuilmax  NE 0 then begin       if n_elements valmask  EQ 0 then valmask   1e20       terre   where res GT valmask 10        res   res   seuilmax       if terre 0  NE  1 then res terre    valmask       undefine  terre    endif     points a metre a nan      if n_elements nan  NE 0 then BEGIN       if n_elements valmask  EQ 0 then valmask   1e20       if abs valmask  LT 1e6 then terre   where abs res  GT abs valmask 10          ELSE terre   where res EQ valmask        if abs nan  LT 1e6 then notan   where res EQ nan          ELSE notan   where abs res  GT abs nan        if notan 0  NE  1 then res notan     values f_nan       notan   notan 0  NE  1       if terre 0  NE  1 then res terre    valmask       undefine  terre    endif     ajustement de niveau pour les tableau 2d simples      if jpt EQ 1 then begin       taille   size res        IF taille 0  EQ 2 THEN niveau   1    endif     moyenne eventuelle      IF keyword_set direc  THEN BEGIN       IF jpt EQ 1 THEN res   moyenne res direc BOITE boite  nan   notan          ELSE res   grossemoyenne res direc BOITE boite  nan   notan     ENDIF     mise en placer des parametres pour le trace        if keyword_set boite  then legende_pltt   boite ELSE legende_pltt    lon1  lon2  lat1  lat2        IF n_elements res  NE 1 THEN res   reform res over     IF NOT keyword_set direc  THEN domdef  lon1  lon2  lat1  lat2  prof1  prof2  _extra   ex  grille   vargrid      ELSE if direc eq  t  then domdef  lon1  lon2  lat1  lat2  prof1  prof2  _extra   ex  grille   vargrid      if keyword_set structure  then res    tab:res  grille:vargrid  unite:varunit  experience:varexp  nom:varname       if keyword_set key_performance  THEN print   temps nlec  systime 1 tempsun    time   time 2l    return res     end"); 
     96a[94] = new Array("./Obsolete/nlec5j.html", "nlec5j.pro", "", "           file_comments    lit les fichiers Net Cdf de l experience TOTEM ECMWF qui   contiennent les sorties a 5j regroupees par type de grille par   paquets de 6 mois    sur maia:  u rech eee reee217 TOTEM REF OUTPUTS      obsolete      categories    Reading      examples   IDL  res nlec5j  nom  numsortie  nbretps       param nom  in required  nom du tableau contenant le champ que l on veut  le   trouver avec ncdflec fichier var      param numsortie  in required    le numero du pas de temps que l on veut sortir du   fichier  compte a partir de 1  a partir de year      param nbretps  in required  nombre de pas de temps a extraire      keyword BOITE boite sur laquelle integrer  par defaut tt le domaine       keyword GRILLE impose la grille a laquelle est rapporte le champ  rq permet   d aller plus vite ds la lecture      keyword TOUT oblige a lire le tableau entier en non pas celui reduit a domdef      keyword _EXTRA used to pass your keywords     returns tableau 2d  qd on ne demande pas de serie  ou 3d ou 4d ds le cas dune serie      uses common pro      restrictions appele par nlec      history Sebastien Masson  smasson lodyc jussieu fr         version  Id: nlec5j pro 157 2006 08 21 09:01:50Z navarro             function nlec5j  nom  numsortie  nbretps BOITE   boite  GRILLE grille TOUT tout  _EXTRA   ex     compile_opt idl2  strictarrsubs  obsolete    common      res 1    anneedepart 1979     gestion du nom du fichier      if numsortie le 36 then BEGIN       mmdd 0101        numsort numsortie    ENDIF  else BEGIN       if leapyr year  then mmdd 0629  else mmdd 0630        numsort numsortie 36    endelse    case 1 of       year lt 10:                 s_year  0 string format i1 year        year lt 100 and year ge 10 :s_year      string format i2 year        year ge 100:                s_year      string format i2 year 1900 year LT 2000     endcase    numfich year anneedepart 2 7 mmdd ne  0101     s_date s_year mmdd    if numfich lt 10 then numfich 0 string format i1 numfich       else numfich     string format i2 numfich      gestion du nom de la grille en testant les differentes possibilites   et ouverture du fichier      if keyword_set grille  then begin       vargrid grille       nomfich prefix numfich s_date grid vargrid nc        IF  version OS_FAMILY EQ  unix  THEN spawn   file  iodir nomfich     dev null        cdfid ncdf_open iodir nomfich        varcontient ncdf_varinq cdfid nom     endif else begin   liste des fichiers pouvant convenir       quelsfichiers   findfile iodir prefix numfich s_date grid        IF quelsfichiers 0  EQ   THEN BEGIN   liste vide          if keyword_set bavard  then             ras   report LES FICHIERS:  iodir prefix numfich s_date grid  n existe pas           return    1       ENDIF       for i 0 n_elements quelsfichiers 1 do begin          IF  version OS_FAMILY EQ  unix  THEN spawn   file  quelsfichiers i     dev null           cdfid ncdf_open quelsfichiers i           contient ncdf_inquire cdfid           for varid 0 contient nvars 1 do BEGIN   ds les fichiers existants on             varcontient ncdf_varinq cdfid varid    cherche le nom des variables             if varcontient name eq nom then BEGIN                vargrid strmid quelsfichiers i strpos quelsfichiers i grid 5 1   nom de grille                goto  grilletrouvee             ENDIF          endfor          ncdf_close cdfid       endfor       if keyword_set bavard  then          ras   report La variable  nom  n existe pas ds les fichiers iodir prefix numfich s_date grid        return    1    endelse grilletrouvee:     lecture de certains attributs      ncdf_attget cdfid nom title value    varname string value     ncdf_attget cdfid nom units value    varunit string value     if rstrpos varname  eq  1 then varname varname   varunit     if month lt 10 then s_month 0 string format i1 month       else s_month     string format i2 month     if day lt 10 then s_day 0 string format i1 day       else s_day     string format i2 day     vardate s_year s_month s_day    ncdf_attget cdfid file_name value global    varexp string value 0: where value EQ  byte 0 0 1        extraction du tableau qui nous interesse       determination du domaine geographique      if keyword_set tout  then begin       nx jpi       ny jpj       nz jpk       premierx   0       premiery   0       premierz   0    endif else BEGIN     redefinition eventuelle du domaine ajuste a boite  a 6 elements      on recupere la dim du no9uveau domaine         if keyword_set boite  then BEGIN          Case  N_Elements Boite  Of             1:Domdef  lon1  lon2  lat1  lat2  0 boite 0 GRILLE vargrid  _EXTRA   ex             2:Domdef  lon1  lon2  lat1  lat2  boite 0 boite 1 GRILLE vargrid  _EXTRA   ex             4:Domdef   Boite  prof1  prof2 GRILLE vargrid  _EXTRA   ex             5:Domdef   Boite 0:3  0  Boite 4 GRILLE vargrid  _EXTRA   ex             6:Domdef  Boite GRILLE vargrid  _EXTRA   ex             Else: return  report Mauvaise Definition de Boite           endcase       ENDIF       grille  mask  glam  gphi  gdep  nx  ny nz premierx premiery  premierz  dernierx  derniery  dernierz    ENDELSE     determination du nombre de pas de tps a extraire ds ce fichier      if nbretps gt 36 1 mmdd ne  0101 numsort 1 then nt 36 1 mmdd ne  0101 numsort 1      else nt nbretps        if varcontient ndims eq 3 then       ncdf_varget cdfid nom res offset premierx premiery numsort 1 count nx ny nt       else       ncdf_varget cdfid nom res offset premierx premiery  premierz numsort 1 count nx ny nz nt      rappel en boucle de nlec si il faut ouvrir de nouveaux fichiers   pour constituer la serie temporelle      if nbretps gt 36 1 mmdd ne  0101 numsort 1 then begin       if mmdd ne  0101  then year   year 1       if varcontient ndims eq 3 then          res    res                   nlec5j nom 1 36 mmdd eq  0101 nbretps nt tout tout GRILLE vargrid BOITE boite          ELSE BEGIN        res res                 nlec5j nom 1 36 mmdd eq  0101 nbretps nt tout tout GRILLE vargrid  BOITE boite         res reform res nx ny nz nbretps   over      ENDELSE       ncdf_varget cdfid time_counter temps  offset    numsort 1 count nt        time    long temps julday 1  5  1979  time        jpt nt jpt    endif else BEGIN       ncdf_varget cdfid time_counter temps  offset    numsort 1 count nt        time   long temps julday 1  5  1979        jpt nt    endelse      ncdf_close cdfid    return res     end"); 
     97a[95] = new Array("./Obsolete/nlecan.html", "nlecan.pro", "", "           file_comments   lit les moyennes annuelles   sur maia:  u rech eee reee217 TOTEM REF OUTPUTS      obsolete    categories    Reading      examples   IDL  res nlecan nom  numsortie79  nbretps       param nom  in required  nom du tableau contenant le champ que l on veut  le   trouver avec ncdflec fichier var      param numsortie79  in required  le numero du pas de temps que l on veut sortir du   fichier  compte a partir de 1  a partir de 79      param nbretps  in required  nombre de pas de temps a extraire      keyword BOITE  boite sur laquelle integrer  par defaut tt le domaine       keyword GRILLE impose la grille a laquelle est rapporte le champ  rq permet   d aller plus vite ds la lecture      keyword TOUT oblige a lire le tableau entier en non pas celui reduit a domdef      keyword _EXTRA used to pass your keywords      returns tableau 2d  qd la serie ne fait que 1 pas de temps  ou   3d  valable ds 1 premier tps que pour les tableaux 2d       uses common pro      restrictions appele par nlec      history Sebastien Masson  smasson lodyc jussieu fr       version  Id: nlecan pro 157 2006 08 21 09:01:50Z navarro            REF moyenne annuelle grid T nc   function nlecan  nom  numsortie79  nbretps BOITE   boite GRILLE grille TOUT tout  _EXTRA   ex     compile_opt idl2  strictarrsubs  obsolete    common        res 1    anneedepart 1979     gestion du nom de la grille en testant les differentes possibilites   et ouverture du fichier      if keyword_set grille  then begin       vargrid grille       nomfich prefix moyenne annuelle grid vargrid nc        IF  version OS_FAMILY EQ  unix  THEN spawn   file  iodir nomfich     dev null        cdfid ncdf_open iodir nomfich        varcontient ncdf_varinq cdfid nom     endif else begin   liste des fichiers pouvant convenir       quelsfichiers   findfile iodir prefix moyenne annuelle grid        IF quelsfichiers 0  EQ   THEN     liste vide          return   report LES FICHIERS:  iodir prefix moyenne annuelle grid  n existe pas        for i 0 n_elements quelsfichiers 1 do begin          IF  version OS_FAMILY EQ  unix  THEN spawn   file  quelsfichiers i     dev null           cdfid ncdf_open quelsfichiers i           contient ncdf_inquire cdfid           for varid 0 contient nvars 1 do BEGIN     ds les fichiers existants on             varcontient ncdf_varinq cdfid varid    cherche le nom des variables             if varcontient name eq nom then BEGIN                vargrid strmid quelsfichiers i strpos quelsfichiers i grid 5 1   nom de grille                goto  grilletrouvee             ENDIF          endfor          ncdf_close cdfid       endfor       return  report La variable  nom  n existe pas ds les fichiers iodir prefix moyenne annuelle grid     endelse grilletrouvee:     lecture de certains attributs et de l axe des temps      ncdf_attget cdfid nom title value    varname string value     ncdf_attget cdfid nom units value    varunit string value     if rstrpos varname  eq  1 then varname varname   varunit     varexp prefix     lecture de l axe des temps      ncdf_varget cdfid time_counter time  offset    numsortie79 1 count nbretps     time   long time julday 12  31  1978     jpt nbretps    IF jpt EQ 1 THEN BEGIN       caldat  time 0  month  day  year       case 1 of          year lt 10:                 s_year  0 string format i1 year           year lt 100 and year ge 10 :s_year      string format i2 year           year ge 100:                s_year      string format i2 year 1900        endcase       vardate annee:  s_year    endif       extraction du tableau qui nous interesse         determination du domaine geographique      if keyword_set tout  then begin       nx jpi       ny jpj       nz jpk       glam 1        gphi 1        gdep 1        premierx   0       premiery   0       premierz   0    endif else BEGIN     redefinition eventuelle du domaine ajuste a boite  a 6 elements      on recupere la dim du no9uveau domaine         if keyword_set boite  then BEGIN          Case N_Elements Boite  Of             1:Domdef  lon1  lon2  lat1  lat2  0 boite 0 GRILLE vargrid  _EXTRA   ex             2:Domdef  lon1  lon2  lat1  lat2  boite 0 boite 1 GRILLE vargrid  _EXTRA   ex             4:Domdef   Boite prof1  prof2 GRILLE vargrid  _EXTRA   ex             5:Domdef   Boite 0:3  0  Boite 4 GRILLE vargrid  _EXTRA   ex             6:Domdef  Boite GRILLE vargrid  _EXTRA   ex             Else:return  report Mauvaise Definition de Boite           endcase       ENDIF       grille  mask  glam  gphi  gdep  nx  ny nz premierx premiery  premierz    ENDELSE      if varcontient ndims eq 3 then       ncdf_varget cdfid nom res offset premierx premiery numsortie79 1         count nx ny nbretps  else       ncdf_varget cdfid nom res offset premierx premiery  premierz numsortie79 1         count nx ny nz nbretps       ncdf_close cdfid    return res     end"); 
     98a[96] = new Array("./Obsolete/nlecmois.html", "nlecmois.pro", "", "             file_comments   lit les fichiers Net Cdf  de moyenne mensuel  de   l experience TOTEM ECMWF qui sont sur   maia:  u rech eee reee217 TOTEM REF OUTPUTS      obsolete      keyword BOITE boite sur laquelle integrer  par defaut tt le domaine       keyword GRILLE impose la grille a laquelle est rapporte le champ  rq permet   d aller plus vite ds la lecture      keyword TOUT oblige a lire le tableau entier en non pas celui reduit a domdef      keyword _EXTRA used to pass your keywords      uses common pro      history Sebastien Masson  smasson lodyc jussieu fr       version  Id: nlecmois pro 134 2006 07 07 10:19:08Z navarro            REF moyenne mensuelle 79 81 grid T nc   function nlecmois nom numsortie79 nbretps  BOITE boite GRILLE grille TOUT tout  _EXTRA   ex     compile_opt idl2  strictarrsubs  obsolete    common      res  1     annee du nom du 1er fichier      annee   floor floor numsortie79 1 12 3 3 79     gestion du nom de la grille en testant les differentes possibilites   et ouverture du fichier      if keyword_set grille  then begin       vargrid grille       nomfich prefix moyenne mensuelle strtrim annee  1 strtrim annee 2  1 grid vargrid nc        IF  version OS_FAMILY EQ  unix  THEN spawn   file  iodir nomfich     dev null        cdfid ncdf_open iodir nomfich        varcontient ncdf_varinq cdfid nom     endif else begin   liste des fichiers pouvant convenir       quelsfichiers   findfile iodir prefix moyenne mensuelle strtrim annee  1 strtrim annee 2  1 grid        IF quelsfichiers 0  EQ   THEN     liste vide          return  report LES FICHIERS:  iodir prefix moyenne mensuelle strtrim annee  1 strtrim annee 2  1 grid  n existe pas        for i 0 n_elements quelsfichiers 1 do begin          IF  version OS_FAMILY EQ  unix  THEN spawn   file  quelsfichiers i     dev null           cdfid ncdf_open quelsfichiers i           contient ncdf_inquire cdfid           for varid 0 contient nvars 1 do BEGIN   ds les fichiers existants on             varcontient ncdf_varinq cdfid varid    cherche le nom des variables             if varcontient name eq nom then BEGIN                vargrid strmid quelsfichiers i strpos quelsfichiers i grid 5 1   nom de grille                goto  grilletrouvee             ENDIF          endfor          ncdf_close cdfid       endfor       return  report La variable  nom  n existe pas ds les fichiers iodir prefix moyenne mensuelle strtrim annee  1 strtrim annee 2  1 grid     endelse grilletrouvee:     lecture de certains attributs et de l axe des temps      ncdf_attget cdfid nom title value    varname string value     ncdf_attget cdfid nom units value    varunit string value     if rstrpos varname  eq  1 then varname varname   varunit     varexp prefix     determination du domaine geographique      if keyword_set tout  then begin       nx jpi       ny jpj       nz jpk       premierx 0       premiery 0       premierz 0    endif else BEGIN     redefinition eventuelle du domaine ajuste a boite  a 6 elements      on recupere la dim du no9uveau domaine         if keyword_set boite  then BEGIN          Case N_Elements Boite  Of             1:Domdef  lon1  lon2  lat1  lat2  0 boite 0 GRILLE vargrid  _EXTRA   ex             2:Domdef  lon1  lon2  lat1  lat2  boite 0 boite 1 GRILLE vargrid  _EXTRA   ex             4:Domdef   Boite  prof1  prof2 GRILLE vargrid  _EXTRA   ex             5:Domdef   Boite 0:3  0  Boite 4 GRILLE vargrid  _EXTRA   ex             6:Domdef  Boite GRILLE vargrid  _EXTRA   ex             Else:return   report Mauvaise Definition de Boite           endcase       ENDIF       grille  mask  glam  gphi  gdep  nx  ny nz premierx premiery  premierz    ENDELSE     determination du nombre de pas de tps a extraire ds ce fichier      numsortie   numsortie79 12 annee 79     if nbretps numsortie 1 gt 36 then nt 36 numsortie 1      else nt nbretps    numsortie   numsortie79 12 annee 79        if varcontient ndims eq 3 then       ncdf_varget cdfid nom res offset premierx premiery numsortie 1 count nx ny nt  else       ncdf_varget cdfid nom res offset premierx premiery premierz numsortie 1 count nx ny nz nt      rappel en boucle de nlec si il faut ouvrir de nouveaux fichiers   pour constituer la serie temporelle      if nbretps gt 36 numsortie 1 then begin       if varcontient ndims eq 3 then          res    res                   nlecmois nom numsortie79 nt nbretps nt tout tout GRILLE vargrid BOITE boite          else BEGIN          res res                   nlecmois nom numsortie79 nt nbretps nt tout tout GRILLE vargrid BOITE boite            res reform res nx ny nz nbretps   over        ENDELSE       ncdf_varget cdfid time_counter temps  offset    numsortie 1 count nt        time    long temps julday 12  31  1978  time        jpt nt jpt    endif else BEGIN       ncdf_varget cdfid time_counter temps  offset    numsortie 1 count nt        time   long temps julday 12  31  1978        jpt nt    endelse      ncdf_close cdfid    IF n_elements time  EQ 1 THEN BEGIN       caldat  time  m  d  y       if m lt 10 then m 0 string format i1 m          else m     string format i2 m        if n_elements langage  EQ 0 then langage    non definit        if langage EQ  gb  then vardate   strtrim y  1   string format C CMoA 31 m 1          ELSE vardate   string format C CMoA 31 m 1   strtrim y  1     endif      return res     end"); 
     99a[97] = new Array("./Obsolete/nlecsaison.html", "nlecsaison.pro", "", "           file_comments   lit les moyennes annuelles   sur maia:  u rech eee reee217 TOTEM REF OUTPUTS      obsolete      categories    Reading      examples   IDL  res nlecsaison nom  numsortie79  nbretps       param nom  in required  nom du tableau contenant le champ que l on veut  le   trouver avec ncdflec fichier var      param numsortie79  in required  le numero du pas de temps que l on veut sortir du   fichier  compte a partir de 1  a partir de 79      param nbretps  in required  nombre de pas de temps a extraire      keyword BOITE boite sur laquelle integrer  par defaut tt le domaine       keyword GRILLE impose la grille a laquelle est rapporte le champ  rq permet   d aller plus vite ds la lecture      keyword TOUT oblige a lire le tableau entier en non pas celui reduit a domdef      keyword _EXTRA used to pass your keywords      returns tableau 2d  qd la serie ne fait que 1 pas de temps  ou   3d  valable ds 1 premier tps que pour les tableaux 2d       uses common pro      restrictions appele par nlec      history Sebastien Masson  smasson lodyc jussieu fr         version  Id: nlecsaison pro 157 2006 08 21 09:01:50Z navarro          REF saisonnier climato grid T nc     function nlecsaison  nom  numsortie79  nbretps BOITE   boite  GRILLE grille TOUT tout  _EXTRA   ex     compile_opt idl2  strictarrsubs  obsolete    common        res 1    anneedepart 1979     gestion du nom de la grille en testant les differentes possibilites   et ouverture du fichier      if keyword_set grille  then begin       vargrid grille       nomfich prefix saisonnier climato grid vargrid nc        IF  version OS_FAMILY EQ  unix  THEN spawn   file  iodir nomfich     dev null        cdfid ncdf_open iodir nomfich        varcontient ncdf_varinq cdfid nom     endif else begin   liste des fichiers pouvant convenir       quelsfichiers   findfile iodir prefix saisonnier climato grid        IF quelsfichiers 0  EQ   THEN     liste vide          return  report LES FICHIERS:  iodir prefix saisonnier climato grid  n existe pas        for i 0 n_elements quelsfichiers 1 do begin          IF  version OS_FAMILY EQ  unix  THEN spawn   file  quelsfichiers i     dev null           cdfid ncdf_open quelsfichiers i           contient ncdf_inquire cdfid           for varid 0 contient nvars 1 do BEGIN     ds les fichiers existants on             varcontient ncdf_varinq cdfid varid    cherche le nom des variables             if varcontient name eq nom then BEGIN                vargrid strmid quelsfichiers i strpos quelsfichiers i grid 5 1   nom de grille                goto  grilletrouvee             ENDIF          endfor          ncdf_close cdfid       endfor       return  report La variable  nom  n existe pas ds les fichiers iodir prefix saisonnier climato grid     endelse grilletrouvee:     lecture de certains attributs et de l axe des temps      ncdf_attget cdfid nom title value    varname string value     ncdf_attget cdfid nom units value    varunit string value     if rstrpos varname  eq  1 then varname varname   varunit     varexp prefix     lecture de l axe des temps      ncdf_varget cdfid time_counter time  offset    numsortie79 1 count nbretps     time   long time julday 12  31  1978     jpt nbretps    IF jpt EQ 1 THEN BEGIN       IF numsortie79 EQ 13 THEN vardate CLIMATOLOGIE  prefix         ELSE begin          vardate climato mensuelle  strtrim numsortie79 1        endelse    endif       extraction du tableau qui nous interesse         determination du domaine geographique      if keyword_set tout  then begin       nx jpi       ny jpj       nz jpk       glam 1        gphi 1        gdep 1        premierx   0       premiery   0       premierz   0    endif else BEGIN     redefinition eventuelle du domaine ajuste a boite  a 6 elements      on recupere la dim du no9uveau domaine         if keyword_set boite  then BEGIN          CASE N_Elements Boite  Of             1:Domdef  lon1  lon2  lat1  lat2  0 boite 0 GRILLE vargrid  _EXTRA   ex             2:Domdef  lon1  lon2  lat1  lat2  boite 0 boite 1 GRILLE vargrid  _EXTRA   ex             4:Domdef   Boite  prof1  prof2 GRILLE vargrid  _EXTRA   ex             5:Domdef   Boite 0:3  0  Boite 4 GRILLE vargrid  _EXTRA   ex             6:Domdef  Boite GRILLE vargrid  _EXTRA   ex             Else:return  report Mauvaise Definition de Boite           endcase       ENDIF       grille  mask  glam  gphi  gdep  nx  ny nz premierx premiery premierz    ENDELSE      if varcontient ndims eq 3 then       ncdf_varget cdfid nom res        offset premierx premiery numsortie79 1 count nx ny nbretps  else       ncdf_varget cdfid nom res        offset premierx premiery premierz numsortie79 1 count nx ny nz nbretps       ncdf_close cdfid    return res     end"); 
     100a[98] = new Array("./Obsolete/nlecserie.html", "nlecserie.pro", "", "           file_comments   lit les series temporelles se rapportant a une variable   sur maia:  u rech eee reee217 TOTEM REF OUTPUTS      obsolete      categories    Reading      examples   IDL  res nlecserie nom  date1  date2       param nom  in required  nom du tableau contenant le champ que l on veut  le   trouver avec ncdflec fichier var      param date1  in required      param date2  in required     les dates vermairs qui delimitent la serie temporelle      keyword BOITE boite sur laquelle integrer  par defaut tt le domaine       keyword GRILLE impose la grille a laquelle est rapporte le champ  rq permet   d aller plus vite ds la lecture      keyword TOUT oblige a lire le tableau entier en non pas celui reduit a domdef      keyword _EXTRA used to pass your keywords      returns tableau 2d  qd la serie ne fait que 1 pas de temps  ou   3d  valable ds 1 premier tps que pour les tableaux 2d       uses common pro      restrictions appele par nlec      history Sebastien Masson  smasson lodyc jussieu fr       version  Id: nlecserie pro 157 2006 08 21 09:01:50Z navarro            REF sss grid T nc   function nlecserie  nom  date1  date2 BOITE   boite  GRILLE grille TOUT tout  _EXTRA   ex     compile_opt idl2  strictarrsubs  obsolete    common        res 1    anneedepart 1979     gestion du nom de la grille   et ouverture du fichier     liste des fichiers pouvant convenir    quelsfichiers   findfile iodir prefix nom grid     IF quelsfichiers 0  EQ   THEN BEGIN   liste vide        print   LES FICHIERS:  iodir prefix nom grid  n existe pas        return    1    ENDIF ELSE BEGIN       vargrid strmid quelsfichiers 0 strpos quelsfichiers 0 grid 5 1   nom de grille       IF  version OS_FAMILY EQ  unix  THEN spawn   file  quelsfichiers 0     dev null        cdfid ncdf_open quelsfichiers 0     ENDELSE     lecture de certains attributs et de l axe des temps      ncdf_attget cdfid nom title value    varname string value     ncdf_attget cdfid nom units value    varunit string value     if rstrpos varname  eq  1 then varname varname   varunit     ncdf_attget cdfid file_name value global    varexp string value     varexp strmid varexp  0  strpos varexp        lecture de l axe des temps en entier on ja reperer la place des   dates debut et fin pour faire l extraction temporelle      ncdf_varget cdfid time_counter time    time   long time julday 1  5  1979      debut   where time EQ juldate date1      fin   where time EQ juldate date2     debut   where time EQ date1     fin   where time EQ date2     if debut 0  EQ  1 then         return  report l axe des temps ne contient pas la date de debut  strtrim date1  1     if fin 0  EQ  1 then         return  report l axe des temps ne contient pas la date de fin  strtrim date2  1     time   time debut 0 :fin 0     jpt fin 0 debut 0 1    IF jpt EQ 1 THEN BEGIN       caldat  time 0  month  day  year       case 1 of          year lt 10:                 s_year  0 string format i1 year           year lt 100 and year ge 10 :s_year      string format i2 year           year ge 100:                s_year      string format i2 year 1900        endcase       if month lt 10 then s_month 0 string format i1 month          else s_month     string format i2 month        if day lt 10 then s_day 0 string format i1 day          else s_day     string format i2 day        vardate s_year s_month s_day    endif       extraction du tableau qui nous interesse         determination du domaine geographique      if keyword_set tout  then begin       nx jpi       ny jpj       nz jpk       premierx   0       premiery   0       premierz   0    endif else BEGIN     redefinition eventuelle du domaine ajuste a boite  a 6 elements      on recupere la dim du no9uveau domaine         if keyword_set boite  then BEGIN          Case N_Elements Boite  Of             1:Domdef  lon1  lon2  lat1  lat2  0 boite 0 GRILLE vargrid  _EXTRA   ex             2:Domdef  lon1  lon2  lat1  lat2  boite 0 boite 1 GRILLE vargrid  _EXTRA   ex             4:Domdef   Boite  prof1  prof2 GRILLE vargrid  _EXTRA   ex             5:Domdef   Boite 0:3  0  Boite 4 GRILLE vargrid  _EXTRA   ex             6:Domdef  Boite GRILLE vargrid  _EXTRA   ex             Else:return  report Mauvaise Definition de Boite           endcase       ENDIF       grille  mask  glam  gphi  gdep  nx  ny nz premierx premiery    ENDELSE      ncdf_varget cdfid nom res        offset premierx premiery debut 0         count nx ny fin 0 debut 0 1       ncdf_close cdfid    return res     end"); 
     101a[99] = new Array("./Obsolete/strrepl.html", "strrepl.pro", "", "         file_comments    replace one  or more  character s string s  in a string     OBSOLETE   you should better use strsed pro      categories   String      param STR  in required    the string to be changed      param ARG2  in required    position of the character s  to be replaced or a string to be changed in STR       param RCHAR  in required    replacement character string      returns   another string      restrictions    Known shortcoming: if index is an array  it must contain all   valid elements  only the first entry is checked       examples            Convert one letter into upper case            abc    abcdefghijklmnopqrstuvwxyz           print strrepl abc strpos abc m M               prints  abcdefghijklMnopqrstuvwxyz                 Use with strwhere function          a    abcabcabc           print strrepl a strwhere a a               prints   bc bc bc bc bc            IDL  print  strrepl a bc eeee          a eeee a eeee a eeee          IDL  print  strrepl a b 0000          a0000ca0000ca0000         IDL  print  strrepl a toto 0000          abcabcabc      history          mgs  02 Jun 1998: VERSION 1 00          sebastien Masson  smlod ipsl jussieu fr       version    Id: strrepl pro 192 2006 09 22 09:37:08Z smasson         Copyright  C  1998  Martin Schultz  Harvard University   This software is provided as is without any warranty   whatsoever  It may be freely used  copied or distributed   for non commercial purposes  This copyright notice must be   kept with any copy of this software  If this software shall   be used commercially or sold as part of a larger package    please contact the author to arrange payment    Bugs and comments should be directed to mgs io harvard edu   with subject  IDL routine strrepl      function strrepl str arg2 rchar     compile_opt idl2  strictarrsubs  obsolete          if  n_elements str  eq 0  then return                                        convert strign and replace character to byte    BStr   byte str     new   byte rchar     if size arg2   type  EQ 7 then begin       old   byte arg2        index   strpos str  arg2        pos   index       while strpos str  arg2  pos 1  NE  1 do BEGIN          pos   strpos str  arg2  pos 1           index    index  pos        ENDWHILE   make sure index is in range       if  index 0  lt 0 OR index 0  ge n_elements BStr  THEN return Str    ENDIF ELSE BEGIN       index   arg2       if  index 0  lt 0 OR index 0  ge n_elements BStr  then return Str       old   BStr index 0     ENDELSE                                   replace indexed characters in string    nelenew   n_elements new     neleold   n_elements old     nindex   n_elements index     if nelenew neleold NE 1 then begin       if index 0  EQ 0 then          BStr    NEW   BStr index 0 neleold: n_elements BStr 1    ELSE          BStr    BStr 0:index 0 1  NEW   BStr index 0 neleold: n_elements BStr 1          if nindex EQ 1 then return string BStr        if nindex GT 2 then          for i   1  nindex 2 do          BStr    BStr 0:index i i nelenew neleold 1  NEW                    BStr index i i nelenew neleold neleold: n_elements BStr 1          BStr    BStr 0:index n_elements index 1 nindex 1 nelenew neleold 1  NEW      ENDIF ELSE BStr index    NEW                                   return result as string    return string BStr      end"); 
     102a[100] = new Array("./Obsolete/vairdate.html", "vairdate.pro", "", "             file_comments   gives vairmer date equivalent of a date in julian format   sets month  day and year to the corresp values     you better use jul2date      obsolete      examples   IDL  vdate   vairdate 1755087       param jdate  in required  date en jours juliens      keyword MENSUEL a activer si on veut pour  que les dates dont le jour est      15 deviennent avec un jour egale a 0  par ex:      19990115       19990100      keyword ANNUEL a activer si on veut pour  que les dates dont le mois est      6 et dont le jour est 1 deviennent avec un mois et jour egale a      0  par ex:      19990601       19990000      keyword _EXTRA used to pass your keywords      returns vdate date vairmer     plus year  month et day      uses  common        history  Jerome Vialard   jv lodyc jussieu fr      2 7 98                  13 9 1999  Sebastien Masson  smasson lodyc jussieu fr                          ANNUEL MENSUEL _EXTRA et possibilite                         d utiliser vairdate avec des scalaire ou des                         tableaux      version  Id: vairdate pro 134 2006 07 07 10:19:08Z navarro             function vairdate  jdate   ANNUEL   annuel  MENSUEL   mensuel  _EXTRA   ex     compile_opt idl2  strictarrsubs  obsolete    common      caldat  jdate  month  day  year  _EXTRA   ex    index   where year eq  1     if index 0  NE  1 then year index    0    if keyword_set mensuel  THEN BEGIN       index   where day EQ 15        if index 0  NE  1 then day index    0    endif    if keyword_set annuel  THEN BEGIN       index   where day EQ 1 AND month EQ 6        if index 0  NE  1 then BEGIN          day index    0          month index    0       endif    endif      return  10000L year 100L month day   end  "); 
     103a[101] = new Array("./Obsolete/vraidate.html", "vraidate.pro", "", "           file_comments   donne la date en long      obsolete      param date  in required  une date du type yyyymmdd      keyword GRADS if  1 le year le 49 then year   2000 year                 if 50 le year le 99 then year   1900 year      keyword _EXTRA used to pass your keywords      returns une date vairmer du type yyyymmdd   si year est nulle ou egale a  1 ne change rien      examples   IDL  res vraidate date    IDL  vraidate 980703    donne 19980703 qui est un long      history Sebastien Masson  smasson lodyc jussieu fr      3 7 98   remove automatic change from year 1 to 1901  Aug 2004      version  Id: vraidate pro 134 2006 07 07 10:19:08Z navarro             function vraidate  date  GRADS   grads  _EXTRA   ex       compile_opt idl2  strictarrsubs  obsolete     IF NOT keyword_set GRADS  THEN return  long date      date   long date    annee   date 10000   return  date 19000000L annee GE 50 and date lt 1000000 20000000L annee LT 50 and date lt 1000000    end"); 
     104a[102] = new Array("./Obsolete/zeroun.html", "zeroun.pro", "", "           file_comments    Send back a vector or a matrix constituate of 0 and 1 in alternation     you better use zero_one      obsolete      categories    Function  Matrix      param n1  in required  number of elements in the first dimension    param n2  in required  numbre of elements in the second dimension      returns resultat       history Sebastien Masson  smasson lodyc jussieu fr                          1 12 98      version  Id: zeroun pro 157 2006 08 21 09:01:50Z navarro             function zeroun  n1 n2     compile_opt idl2  strictarrsubs     case n_params  of       0:return  zero_one        1:return  zero_one n1        2:return  zero_one n1  n2    endcase  end"); 
     105a[103] = new Array("./Picture/image_viewer.html", "image_viewer.pro", "", "       file_comments   The purpose of this program is to provide an interactive tool that can be used   to view JPEG  BMP  GIF  PNG  and TIFF picture files   Images are loaded into   memory  so the initial file access may take a while  but once each picture has   been opened they can all be viewed in a very rapid fashion       categories    Visualization  Widget      param EVENT  in required       restrictions   While this program is running in an IDL session it will change the current   working directory  enables disables color decomposition  and sets  QUIET 1     ORDER 0     P BACKGROUND 0   These settings are returned to their initial   settings before the program was initiated once it is terminated       restrictions   This program is supported in IDL version 5 5 and newer   In order to open   GIF files or TIFF files with LZW compression the copy of IDL being used must   be licensed with these features   IDL only supports BMP files in the standard   Windows format and does not support OS2 bitmaps       history    Written by: AEB  1 02       version    Id: image_viewer pro 163 2006 08 29 12:59:46Z navarro    _  PRO image_viewer_open_files event  THIS PROCEDURE IS CALLED WHEN A USER SELECTS  File   Open Picture Files  FROM THE MAIN MENU  error handling:     compile_opt idl2  strictarrsubs    ERROR_STATE CODE 0 CATCH error if error NE 0 then begin   HELP LAST_MESSAGE OUTPUT traceback   messageStr Error Caught : traceback    dummy DIALOG_MESSAGE messageStr ERROR     if status report dialog is still active  destroy it:   if SIZE tlb TYPE  NE 0 then WIDGET_CONTROL tlb DESTROY   RETURN endif  obtain state structure for top level base from its UVALUE: WIDGET_CONTROL event top GET_UVALUE pState  prompt user to select files with native file selection dialog: if  pState gifFlag EQ 1 then filter JPG jpg JPEG jpeg JPE jpe     JFIF jfif GIF gif BMP bmp TIF tif TIFF tiff     PNG png  else     filter JPG jpg JPEG jpeg JPE jpe JFIF jfif BMP bmp     TIF tif TIFF tiff PNG png  files DIALOG_PICKFILE TITLE Select picture files to open MULTIPLE_FILES                        FILTER filter GET_PATH path   if user hit  Cancel  then return to previous program level: if  files 0  EQ   then RETURN  change current working directory to location of selected files: CD path nFiles N_ELEMENTS files   pState nFiles nFiles  pState increment 100 nFiles files files SORT files   create status report dialog: xCenter pState screenSize 0 2 yCenter pState screenSize 1 2 tlb2 WIDGET_BASE TITLE Status Report COLUMN ALIGN_CENTER TLB_FRAME_ATTR 19 MODAL                   GROUP_LEADER pState tlb    spacer WIDGET_LABEL tlb2 VALUE      label1 WIDGET_LABEL tlb2 VALUE LOADING SELECTED IMAGE FILES INTO MEMORY    spacer WIDGET_LABEL tlb2 VALUE      label2 WIDGET_LABEL tlb2 VALUE  PLEASE WAIT     spacer WIDGET_LABEL tlb2 VALUE      statusBase WIDGET_BASE tlb2 ROW FRAME BASE_ALIGN_CENTER ALIGN_CENTER EVENT_PRO image_viewer_timer      cancelBut WIDGET_BUTTON statusBase VALUE Cancel EVENT_PRO image_viewer_cancel      progressLabel WIDGET_LABEL statusBase Value  Progress :  0       statusSlider WIDGET_SLIDER statusBase SENSITIVE 0 TITLE   XSIZE 200      percentLabel WIDGET_LABEL statusBase VALUE  100   geom WIDGET_INFO tlb2 GEOMETRY  xHalfSize geom Scr_XSize 2 yHalfSize geom Scr_YSize 2 WIDGET_CONTROL tlb2 XOFFSET xCenter xHalfSize YOFFSET yCenter yHalfSize WIDGET_CONTROL tlb2 REALIZE  pState statusBase statusBase  pState statusSlider statusSlider WIDGET_CONTROL tlb2 SET_UVALUE pState  reset settings of GUI: WIDGET_CONTROL pState fileText SET_VALUE  WIDGET_CONTROL pState imageDraw GET_VALUE drawID WSET drawID TVLCT 0 0 0 0 ERASE  re create thumbnails base with appropriate size for number of images selected: nRows   CEIL  nFiles   3 0  WIDGET_CONTROL pState thumbBase DESTROY  pState thumbBase WIDGET_BASE pState controlsBase COLUMN ALIGN_TOP FRAME XSIZE 260                                  YSIZE nRows 89 SCROLL X_SCROLL_SIZE 260 Y_SCROLL_SIZE 650   initialize pointer array to reference image data: numImages N_ELEMENTS pState images  if numImages NE 0 then PTR_FREE pState images  pState images PTRARR nFiles ALLOCATE_HEAP   pState files files  loop through each file:  pState timer 1B WIDGET_CONTROL statusBase TIMER 0 01 END            param event  in required    PRO image_viewer_open_folder event  THIS PROCEDURE IS CALLED WHEN A USER SELECTS  File   Open All In Folder  FROM THE MAIN MENU  error handling:     compile_opt idl2  strictarrsubs    ERROR_STATE CODE 0 CATCH error if error NE 0 then begin   HELP LAST_MESSAGE OUTPUT traceback   messageStr Error Caught : traceback    dummy DIALOG_MESSAGE messageStr ERROR     if status report dialog is still active  destroy it:   if SIZE tlb TYPE  NE 0 then WIDGET_CONTROL tlb DESTROY   RETURN endif  obtain state structure for top level base from its UVALUE: WIDGET_CONTROL event top GET_UVALUE pState  prompt user to select files with native file selection dialog: folder DIALOG_PICKFILE TITLE Select folder that contains picture files DIRECTORY   if user hit  Cancel  then return to previous program level: if folder EQ   then RETURN  change current working directory to location of selected files: CD folder if  pState gifFlag EQ 1 then filter JPG JPEG JPE JFIF GIF BMP     TIF TIFF PNG  else     filter JPG JPEG JPE JFIF BMP TIF TIFF PNG  files FILE_SEARCH filter COUNT nFiles FOLD_CASE FULLY_QUALIFY_PATH NOSORT  if nFiles EQ 0 then begin   dummy DIALOG_MESSAGE No valid picture files were found in the selected folder  INFO    RETURN endif  pState nFiles nFiles  pState increment 100 nFiles files files SORT files   create status report dialog: xCenter pState screenSize 0 2 yCenter pState screenSize 1 2 tlb2 WIDGET_BASE TITLE Status Report COLUMN ALIGN_CENTER TLB_FRAME_ATTR 19 MODAL                   GROUP_LEADER pState tlb    spacer WIDGET_LABEL tlb2 VALUE      label1 WIDGET_LABEL tlb2 VALUE LOADING SELECTED IMAGE FILES INTO MEMORY    spacer WIDGET_LABEL tlb2 VALUE      label2 WIDGET_LABEL tlb2 VALUE  PLEASE WAIT     spacer WIDGET_LABEL tlb2 VALUE      statusBase WIDGET_BASE tlb2 ROW FRAME BASE_ALIGN_CENTER ALIGN_CENTER EVENT_PRO image_viewer_timer      cancelBut WIDGET_BUTTON statusBase VALUE Cancel EVENT_PRO image_viewer_cancel      progressLabel WIDGET_LABEL statusBase Value  Progress :  0       statusSlider WIDGET_SLIDER statusBase SENSITIVE 0 TITLE   XSIZE 200      percentLabel WIDGET_LABEL statusBase VALUE  100   geom WIDGET_INFO tlb2 GEOMETRY  xHalfSize geom Scr_XSize 2 yHalfSize geom Scr_YSize 2 WIDGET_CONTROL tlb2 XOFFSET xCenter xHalfSize YOFFSET yCenter yHalfSize WIDGET_CONTROL tlb2 REALIZE  pState statusBase statusBase  pState statusSlider statusSlider WIDGET_CONTROL tlb2 SET_UVALUE pState  reset settings of GUI: WIDGET_CONTROL pState fileText SET_VALUE  WIDGET_CONTROL pState imageDraw GET_VALUE drawID WSET drawID TVLCT 0 0 0 0 ERASE  re create thumbnails base with appropriate size for number of images selected: nRows   CEIL  nFiles   3 0  WIDGET_CONTROL pState thumbBase DESTROY  pState thumbBase WIDGET_BASE pState controlsBase COLUMN ALIGN_TOP FRAME XSIZE 260                                  YSIZE nRows 89 SCROLL X_SCROLL_SIZE 260 Y_SCROLL_SIZE 650   initialize pointer array to reference image data: numImages N_ELEMENTS pState images  if numImages NE 0 then PTR_FREE pState images  pState images PTRARR nFiles ALLOCATE_HEAP   pState files files  loop through each file:  pState timer 1B WIDGET_CONTROL statusBase TIMER 0 01 END            param event  in required    PRO image_viewer_cancel event  obtain state structure for top level base from its UVALUE:     compile_opt idl2  strictarrsubs   WIDGET_CONTROL event top GET_UVALUE pState  shut off timer:  pState timer 0B END            param event  in required    PRO image_viewer_timer event  obtain state structure for top level base from its UVALUE:     compile_opt idl2  strictarrsubs   WIDGET_CONTROL event top GET_UVALUE pState if  pState timer EQ 1 then begin  continue processing files:   if  pState currFile LE  pState nFiles 1 then begin     i pState currFile     extension STRUPCASE STRMID pState files i STRPOS pState files i REVERSE_SEARCH 1      if extension EQ  JPG  or extension EQ  JPEG  or extension EQ  JPE  or extension EQ  JFIF  then begin       result QUERY_JPEG pState files i info        if result NE 1 then begin         dummy DIALOG_MESSAGE Selected file: pState files i                                 does not appear to be a valid JPEG file  ERROR          if  i MOD 3  EQ 0 then  pState rowBase WIDGET_BASE pState thumbBase ROW ALIGN_LEFT          if  pState currFile EQ  pState nFiles 1 then begin            last file   terminate timer:            pState timer 0B            pState currFile 0L           WIDGET_CONTROL event top DESTROY         endif else begin            increment file number and update progress slider:            pState currFile pState currFile 1           progressValue   ROUND i 1 pState increment   Exit  FROM THE MAIN MENU  terminate the program by destroying the top level base  widgetID always stored in event top :     compile_opt idl2  strictarrsubs   WIDGET_CONTROL event top DESTROY END            param event  in required    PRO image_viewer_help event  THIS PROCEDURE IS CALLED WHEN A USER SELECTS  Help   Help on IMAGE_VIEWER   FROM THE MAIN MENU  display a simple message:     compile_opt idl2  strictarrsubs   messageStr IMAGE_VIEWER written by AEB  2002               The purpose of this program is to provide an interactive tool that can be used               to view JPEG  BMP  GIF  PNG  and TIFF picture files   In order to provide rapid               viewing capabilities the images are loaded into memory  which can cause the               initial file access to take a bit of time while the pictures are opened and               thumbnails are created  dummy DIALOG_MESSAGE messageStr info  END            param event  in required    PRO image_viewer_thumbs event  THIS PROCEDURE IS CALLED WHEN A USER CLICKS ON ONE OF THE THUMBNAIL PICTURES  error handling:     compile_opt idl2  strictarrsubs    ERROR_STATE CODE 0 CATCH error if error NE 0 then begin   HELP LAST_MESSAGE OUTPUT traceback   messageStr Error Caught : traceback    dummy DIALOG_MESSAGE messageStr ERROR    RETURN endif if event press EQ 1 then begin   WIDGET_CONTROL HOURGLASS    obtain state structure for top level base from its UVALUE:   WIDGET_CONTROL event top GET_UVALUE pState   WIDGET_CONTROL pState imageDraw GET_VALUE drawID   WSET drawID   TVLCT 0 0 0 0   ERASE    obtain current image data:   WIDGET_CONTROL event id GET_UVALUE fileID   imageStruct pState images fileID 1    xOffset ROUND 710 imageStruct xSize 2    yOffset ROUND 650 imageStruct ySize 2    if  pState colorMode EQ  PSEUDO  then begin     TVLCT imageStruct red imageStruct green imageStruct blue     TV TEMPORARY imageStruct image xOffset yOffset   endif else begin  pState colorMode EQ  TRUE :     if imageStruct imageColorMode EQ  PSEUDO  then begin       DEVICE DECOMPOSED 0       TVLCT imageStruct red imageStruct green imageStruct blue       TV TEMPORARY imageStruct image xOffset yOffset     endif else begin  imageStruct imageColorMode EQ  TRUE :       DEVICE DECOMPOSED 1       TV TEMPORARY imageStruct image xOffset yOffset TRUE 1     endelse   endelse   WIDGET_CONTROL pState fileText SET_VALUE pState files fileID 1  endif END            param widgetID  in required    PRO image_viewer_cleanup widgetID  THIS PROCEDURE IS CALLED WHEN THE PROGRAM IS TERMINATED AND XMANAGER REGISTERS A CLEANUP:  obtain state structure for top level base from its uvalue:     compile_opt idl2  strictarrsubs   WIDGET_CONTROL widgetID GET_UVALUE pState  test for validity of state structure pointer: if PTR_VALID pState  then begin    reset original settings:    QUIET pState quietInit    ORDER pState orderInit    P BACKGROUND pState backInit   CD pState currentDir   DEVICE DECOMPOSED pState dc   TVLCT pState r pState g pState b    cleanup heap memory:   PTR_FREE TEMPORARY pState files    numImages N_ELEMENTS pState images    if numImages NE 0 then PTR_FREE pState images   PTR_FREE TEMPORARY pState images    PTR_FREE TEMPORARY pState  endif END            param event  in required    PRO image_viewer_event event  THIS PROCEDURE IS CALLED WHEN A USER RESIZES THE TOP LEVEL BASE  error handling:     compile_opt idl2  strictarrsubs    ERROR_STATE CODE 0 CATCH error if error NE 0 then begin   HELP LAST_MESSAGE OUTPUT traceback   messageStr Error Caught : traceback    dummy DIALOG_MESSAGE messageStr ERROR    RETURN endif  obtain state structure for top level base from its UVALUE: WIDGET_CONTROL event top GET_UVALUE pState  reset widget size: WIDGET_CONTROL event top XSIZE pState tlbWidth YSIZE pState tlbHeight XOFFSET 0 YOFFSET 0 END       PRO image_viewer  error handling:     compile_opt idl2  strictarrsubs    ERROR_STATE CODE 0 CATCH error if error NE 0 then begin   HELP LAST_MESSAGE OUTPUT traceback   messageStr Error Caught : traceback    dummy DIALOG_MESSAGE messageStr ERROR     QUIET quietInit    ORDER orderInit    P BACKGROUND backInit   CD currentDir   RETURN endif  ignore beta and development build versions of IDL because string to float conversion will fail: betaTest STRPOS STRLOWCASE VERSION RELEASE beta  buildTest STRPOS STRLOWCASE VERSION RELEASE build   check to make sure the version of IDL running is 5 5 or newer: if betaTest EQ  1 and buildTest EQ  1 then begin   if FLOAT VERSION RELEASE  LT 5 5 then begin     dummy dialog_message IMAGE_VIEWER is only supported in IDL version 5 5 or newer ERROR      RETURN   endif endif  check to make sure there is adequate real estate: DEVICE GET_SCREEN_SIZE screenSize if  LONG screenSize 0 screenSize 1  LT 786432 then begin   messageStr IMAGE_VIEWER requires the computer monitor  Display  to be                 configured in  1024 x 768  mode or better    dummy DIALOG_MESSAGE messageStr    RETURN endif  check in auxiliary license: result LMGR idl_tifflzw VERSION 1 0  result LMGR idl_gif VERSION 1 0  gifFlag 1B if result NE 1 then begin   messageStr The ability to read GIF  and TIFF LZW compressed  images requires                 an auxiliary license in order to conform with the patent rights of the                 Unisys Corporation   IMAGE_VIEWER was unable to find the required                 license in this installation   Consequently  the ability to read GIF files                 will be disabled    dummy DIALOG_MESSAGE messageStr    gifFlag 0B endif  warn users of color flashing if monitor in PseudoColor mode: if  D N_COLORS LE 256 then begin   messageStr The computer monitor  Display  is currently configured in 8 bit  256 Colors                 PseudoColor mode   Due to the dynamic  read write  nature of the colormap                 system for this visual  when a colortable is loaded for an image it affects                 all visible graphics windows  including the thumbnails of other images   This                 can lead to a phenomenon known as  color flashing                 If possible  it is recommended that you exit this program  reconfigure your                 monitor in 24 bit  TrueColor  mode or better  and restart IMAGE_VIEWER    dummy DIALOG_MESSAGE messageStr  endif  obtain the current working directory: CD CURRENT currentDir if STRUPCASE VERSION OS_FAMILY  EQ  WINDOWS  then begin   executeStr cd  USERPROFILE My Documents My Pictures    cd    SPAWN executeStr pathInit HIDE   pathInit pathInit 0    result FILE_TEST pathInit READ    if result EQ 1 then begin     CD pathInit   endif else begin     result FILE_TEST C: My Documents My Pictures READ      if result EQ 1 then begin       CD C: My Documents My Pictures      endif else begin       result FILE_TEST C: READ        if result EQ 1 then CD C:      endelse   endelse endif  suppress informational messaging: quietInit QUIET  QUIET 1  make sure color decomposition is disabled: DEVICE GET_DECOMPOSED dc if  D N_COLORS GT 256 then colorMode TRUE  else colorMode PSEUDO   obtain the current color table: TVLCT r g b GET LOADCT 0 SILENT  force  ORDER 0: orderInit ORDER  ORDER 0  force  P BACKGROUND 0: backInit P BACKGROUND  P BACKGROUND 0  create GUI: tlb WIDGET_BASE TITLE Image Viewer ROW MBAR menuBar TLB_SIZE_EVENTS XOFFSET 0 YOFFSET 0    fileMenu WIDGET_BUTTON menuBar VALUE File MENU      fileBttn1 WIDGET_BUTTON fileMenu VALUE Open Picture Files EVENT_PRO image_viewer_open_files      fileBttn2 WIDGET_BUTTON fileMenu VALUE Open All In Folder EVENT_PRO image_viewer_open_folder      fileBttn3 WIDGET_BUTTON fileMenu VALUE Exit EVENT_PRO image_viewer_exit    helpMenu WIDGET_BUTTON menuBar VALUE Help MENU      helpBttn1 WIDGET_BUTTON helpMenu VALUE Help on IMAGE_VIEWER EVENT_PRO image_viewer_help    controlsBase WIDGET_BASE tlb COLUMN FRAME ALIGN_TOP      labelBase WIDGET_BASE controlsBase COLUMN SCR_XSIZE 280        thumbLabel WIDGET_LABEL labelBase ALIGN_CENTER VALUE CLICK ON THUMBNAIL TO VIEW IMAGE      thumbBase WIDGET_BASE controlsBase COLUMN ALIGN_TOP FRAME XSIZE 260 YSIZE 700                             SCROLL X_SCROLL_SIZE 260 Y_SCROLL_SIZE 650    imageBase WIDGET_BASE tlb COLUMN FRAME ALIGN_TOP      fileBase WIDGET_BASE imageBase ROW ALIGN_CENTER        fileLabel WIDGET_LABEL fileBase VALUE Current Image File           fileText WIDGET_TEXT fileBase XSIZE 75 YSIZE 1      imageDraw WIDGET_DRAW imageBase XSIZE 710 YSIZE 650 RETAIN 2   display the GUI on the computer monitor: WIDGET_CONTROL tlb REALIZE  obtain the top level base geometry: tlbGeom WIDGET_INFO tlb GEOMETRY  tlbWidth tlbGeom xsize tlbHeight tlbGeom ysize if tlbWidth EQ 0 or tlbHeight EQ 0 then begin   WIDGET_CONTROL tlb TLB_GET_SIZE tlbSize   tlbWidth tlbSize 0    tlbHeight tlbSize 1  endif  create state structure to store information needed by the other event handling procedures: pState PTR_NEW files:PTR_NEW ALLOCATE_HEAP                  images:PTR_NEW ALLOCATE_HEAP                  screenSize:screenSize quietInit:quietInit orderInit:orderInit tlb:tlb statusBase:0L                  controlsBase:controlsBase thumbBase:thumbBase fileText:fileText timer:0B nFiles:0L                  currentDir:currentDir imageDraw:imageDraw dc:dc r:r g:g b:b gifFlag:gifFlag statusSlider:0L                  backInit:backInit colorMode:colorMode tlbWidth:tlbWidth tlbHeight:tlbHeight currFile:0L                  rowBase:0L increment:0 0   store this state structure in the uvalue of the top level base  so it can be obtained by other program units: WIDGET_CONTROL tlb SET_UVALUE pState  register the GUI with the XMANAGER event handler routine: XMANAGER image_viewer tlb CLEANUP image_viewer_cleanup  END  "); 
     106a[104] = new Array("./Picture/imdisp.html", "imdisp.pro", "", "       hidden   FUNCTION imdisp_getpos  ASPECT  POSITION POSITION  MARGIN MARGIN     compile_opt idl2  strictarrsubs      Compute a position vector given an aspect ratio  called by IMDISP_IMSIZE     Check arguments if  n_params  ne 1  then message   Usage: RESULT   IMDISP_GETPOS ASPECT  if  n_elements aspect  eq 0  then message   ASPECT is undefined     Check keywords if  n_elements position  eq 0  then position    0 0  0 0  1 0  1 0  if  n_elements margin  eq 0  then margin   0 1    Get range limited aspect ratio and margin input values aspect_val    float aspect 0    0 01   0 0   0L y0   round position 1     d y_vsize    0L    Compute size of image  device units  xsize   round position 2    position 0     d x_vsize    2L ysize   round position 3    position 1     d y_vsize    2L    Recompute the image position based on actual image size position   fltarr 4  position 0    x0   float d x_vsize  position 1    y0   float d y_vsize  position 2     x0   xsize    float d x_vsize  position 3     y0   ysize    float d y_vsize   END          file_comments      Display an image on the current graphics device       IMDISP is an advanced replacement for TV and TVSCL           Supports WIN  MAC  X  CGM  PCL  PRINTER  PS  and Z graphics devices         Image is automatically byte scaled  can be disabled         Custom byte scaling of Pseudo color images via the RANGE keyword         Pseudo  indexed  color and True color images are handled automatically         8 bit and 24 bit graphics devices  are handled automatically         Decomposed color settings are handled automatically         Image is automatically sized to fit the display  can be disabled         The  P MULTI system variable is honored for multiple image display         Image can be positioned via the POSITION keyword         Color table splitting via the BOTTOM and NCOLORS keywords         Image aspect ratio customization via the ASPECT keyword         Resized images can be resampled  default  or interpolated         Top down image display via the ORDER keyword  ORDER is ignored         Selectable display channel  R G B  via the CHANNEL keyword         Background can be set to a specified color via the BACKGROUND keyword         Screen can be erased prior to image display via the ERASE keyword         Plot axes can be drawn on the image via the AXIS keyword         Photographic negative images can be displayed via the NEGATIVE keyword       categories   Picture      param IMAGE  in required    Array containing image data    Pseudo  indexed  color images must have 2 dimensions    True color images must have 3 dimensions  in either    3  NX  NY   NX  3  NY  or  NX  NY  3  form       keyword RANGE  type vector default min and max array values    For Pseudo Color images only  a vector with two elements   specifying the minimum and maximum values of the image   array to be considered when the image is byte scaled   This keyword is ignored for True Color images    or if the NOSCALE keyword is set       keyword BOTTOM  default 0    Bottom value in the color table to be used   for the byte scaled image    This keyword is ignored if the NOSCALE keyword is set       keyword NCOLORS  default D TABLE_SIZE   BOTTOM    Number of colors in the color table to be used   for the byte scaled image   This keyword is ignored if the NOSCALE keyword is set       keyword MARGIN  default 0 1 or 0 025 if  P MULTI is set to display multiple images    A scalar value specifying the margin to be maintained   around the image in normal coordinates      keyword INTERP  default nearest neighbor sampling    If set  the resized image will be interpolated using   bilinear interpolation      keyword DITHER  default no dithering    If set  true color images will be dithered when displayed   on an 8 bit graphics device      keyword ASPECT  default maintain native aspect ratio    A scalar value specifying the aspect ratio  height width    for the displayed image      keyword POSITION  default   0 0 0 0 1 0 1 0    On input  a 4 element vector specifying the position   of the displayed image in the form  X0 Y0 X1 Y1  in   in normal coordinates   See the examples below to display an image where only the   offset and size are known  e g  MAP_IMAGE output       keyword OUT_POS   On output  a 4 element vector specifying the position   actually used to display the image       keyword NOSCALE  default to byte scale the image    If set  the image will not be byte scaled       keyword NORESIZE  default To resize the image to fit the display    If set  the image will not be resized       keyword ORDER  default To display the image from the bottom up    If set  the image is displayed from the top down   Note that the system variable  ORDER is always ignored       keyword USEPOS  default To honor ASPECT and MARGIN when POSITION vector is supplied    If set  the image will be sized to exactly fit a supplied   POSITION vector  over riding ASPECT and MARGIN       keyword CHANNEL   Display channel  Red  Green  or Blue  to be written    0   All channels  the default    1   Red channel   2   Green channel   3   Blue channel   This keyword is only recognized by graphics devices which   support 24 bit decomposed color  WIN  MAC  X  It is ignored   by all other graphics devices  However True color  RGB    images can be displayed on any device supported by IMDISP       keyword BACKGROUND   If set to a positive integer  the background will be filled   with the color defined by BACKGROUND       keyword ERASE   If set  the screen contents will be erased  Note that if    P MULTI is set to display multiple images  the screen is   always erased when the first image is displayed       keyword AXIS   If set  plot axes will be drawn on the image  The default   x and y axis ranges are determined by the size of the image    When the AXIS keyword is set  IMDISP accepts any keywords   supported by PLOT  e g  TITLE  COLOR  CHARSIZE etc       keyword NEGATIVE   If set  a photographic negative of the image is displayed    The values of BOTTOM and NCOLORS are honored  This keyword   allows True color images scanned from color negatives to be   displayed  It also allows Pseudo color images to be displayed   as negatives without reversing the color table  This keyword   is ignored if the NOSCALE keyword is set       restrictions   The image is displayed on the current graphics device       restrictions   Requires IDL 5 0 or higher  square bracket array syntax       examples     Load test data     openr  lun  filepath ctscan dat  subdir examples data   get_lun  ctscan   bytarr 256  256   readu  lun  ctscan  free_lun  lun  openr  lun  filepath hurric dat  subdir examples data   get_lun  hurric   bytarr 440  330   readu  lun  hurric  free_lun  lun  read_jpeg  filepath rose jpg  subdir examples data  rose  help  ctscan  hurric  rose     Display single images    p multi   0  loadct  0  imdisp  hurric   erase  wait  3 0  imdisp  rose   interp   erase  wait  3 0     Display multiple images without color table splitting    works on 24 bit displays only  top 2 images are garbled on 8 bit displays     p multi    0  1  3  0  0   loadct  0  imdisp  ctscan  margin 0 02  loadct  13  imdisp  hurric  margin 0 02  imdisp  rose  margin 0 02  wait  3 0     Display multiple images with color table splitting    works on 8 bit or 24 bit displays     p multi    0  1  3  0  0   loadct  0  ncolors 64  bottom 0  imdisp  ctscan  margin 0 02  ncolors 64  bottom 0  loadct  13  ncolors 64  bottom 64  imdisp  hurric  margin 0 02  ncolors 64  bottom 64  imdisp  rose  margin 0 02  ncolors 64  bottom 128  wait  3 0     Display an image at a specific position  over riding aspect and margin    p multi   0  loadct  0  imdisp  hurric  position 0 0  0 0  1 0  0 5   usepos   erase  wait  3 0     Display an image with axis overlay    p multi   0  loadct  0  imdisp  rose   axis   erase  wait  3 0     Display an image with contour plot overlay    p multi   0  loadct  0  imdisp  hurric  out_pos out_pos   erase  contour  smooth hurric  10   edge   noerase  position out_pos       xstyle 1  ystyle 1  levels findgen 5 40 0   follow  wait  3 0     Display a small image with correct resizing    p multi   0  loadct  0  data    dist 8 1:7  1:7   imdisp  data   erase  wait  3 0  imdisp  data   interp  wait  3 0     Display a true color image without and with interpolation    p multi   0  imdisp  rose   erase  wait  3 0  imdisp  rose   interp  wait  3 0     Display a true color image as a photographic negative    imdisp  rose   negative   erase  wait  3 0     Display a true color image on PostScript output    note that color table is handled automatically     current_device    d name  set_plot   PS   device   color  bits_per_pixel 8  filename imdisp_true ps   imdisp  rose   axis  title PostScript True Color Output   device   close  set_plot  current_device     Display a pseudo color image on PostScript output    current_device    d name  set_plot   PS   device   color  bits_per_pixel 8  filename imdisp_pseudo ps   loadct  0  imdisp  hurric   axis  title PostScript Pseudo Color Output   device   close  set_plot  current_device     Display an image where only the offset and size are known     Read world elevation data  file   filepath worldelv dat  subdir examples data   openr  lun  file   get_lun  data   bytarr 360  360   readu  lun  data  free_lun  lun   Reorganize array so it spans 180W to 180E  world   data  world 0:179      data 180:     world 180:      data 0:179      Create remapped image  map_set   orthographic   isotropic   noborder  remap   map_image world  x0  y0  xsize  ysize  compress 1    Convert offset and size to position vector  pos   fltarr 4   pos 0    x0   float d x_vsize   pos 1    y0   float d y_vsize   pos 2     x0   xsize    float d x_vsize   pos 3     y0   ysize    float d y_vsize    Display the image  loadct  0  imdisp  remap  pos pos   usepos  map_continents  map_grid      history Liam Gumley ssec wisc edu   http: cimss ssec wisc edu gumley     Copyright  C  1999  2000 Liam E  Gumley     This program is free software  you can redistribute it and or   modify it under the terms of the GNU General Public License   as published by the Free Software Foundation  either version 2   of the License  or  at your option  any later version      This program is distributed in the hope that it will be useful    but WITHOUT ANY WARRANTY  without even the implied warranty of   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE   See the   GNU General Public License for more details      You should have received a copy of the GNU General Public License   along with this program  if not  write to the Free Software   Foundation  Inc  59 Temple Place   Suite 330  Boston  MA  02111 1307  USA       version  Id: imdisp pro 163 2006 08 29 12:59:46Z navarro         PRO imdisp  IMAGE  RANGE RANGE  BOTTOM BOTTOM  NCOLORS NCOLORS      MARGIN MARGIN  INTERP INTERP  DITHER DITHER  ASPECT ASPECT      POSITION POSITION  OUT_POS OUT_POS  NOSCALE NOSCALE  NORESIZE NORESIZE      ORDER ORDER  USEPOS USEPOS  CHANNEL CHANNEL      BACKGROUND BACKGROUND  ERASE ERASE      AXIS AXIS  NEGATIVE NEGATIVE  _EXTRA EXTRA_KEYWORDS     compile_opt idl2  strictarrsubs    rcs_id    Id: imdisp pro 163 2006 08 29 12:59:46Z navarro        CHECK INPUT      Check arguments if  n_params  ne 1  then message   Usage: IMDISP  IMAGE  if  n_elements image  eq 0  then message   Argument IMAGE is undefined  if  max p multi  eq 0  then begin   if  n_elements margin  eq 0  then begin     if  n_elements position  eq 4  then margin   0 0 else margin   0 1   endif endif else begin   if  n_elements margin  eq 0  then margin   0 025 endelse if  n_elements order  eq 0  then order   0 if  n_elements channel  eq 0  then channel   0    Check position vector if  n_elements position  gt 0  then begin   if  n_elements position  ne 4  then       message   POSITION must be a 4 element vector of the form  X0  Y0  X1  Y1    if  position 0  lt 0 0  then message   POSITION 0  must be GE 0 0    if  position 1  lt 0 0  then message   POSITION 1  must be GE 0 0    if  position 2  gt 1 0  then message   POSITION 2  must be LE 1 0    if  position 3  gt 1 0  then message   POSITION 3  must be LE 1 0    if  position 0  ge position 2  then       message   POSITION 0  must be LT POSITION 2    if  position 1  ge position 3  then       message   POSITION 1  must be LT POSITION 3  endif    Check the image dimensions result   size image  ndims   result 0  if  ndims lt 2  or  ndims gt 3  then     message   IMAGE must be a Pseudo Color  2D  or True Color  3D  image array  dims   result 1:ndims     Check that 3D image array is in valid true color format true   0 if  ndims eq 3  then begin   index   where dims eq 3L  count    if  count eq 0  then       message   True Color dimensions must be  3 NX NY   NX 3 NY  or  NX NY 3    true   1   truedim   index 0  endif    Check scaling range for pseudo color images if  true eq 0  then begin   if  n_elements range  eq 0  then begin     min_value   min image  max max_value      range    min_value  max_value    endif   if  n_elements range  ne 2  then       message   RANGE keyword must be a 2 element vector  endif else begin   if  n_elements range  gt 0  then       message   RANGE keyword is not used for True Color images   continue endelse    Check for supported graphics devices names    WIN   MAC   X   CGM   PCL   PRINTER   PS   Z  result   where d name eq names  count  if  count eq 0  then message   Graphics device is not supported     Get color table information if  d flags and 256  ne 0  and  d window lt 0  then begin   window   free   pixmap   wdelete   d window endif if  n_elements bottom  eq 0  then bottom   0 if  n_elements ncolors  eq 0  then ncolors    d table_size   bottom    Get IDL version number version   float version release     Check for IDL 5 2 or higher if printer device is selected if  version lt 5 2  and  d name eq  PRINTER  then     message   IDL 5 2 or higher is required for PRINTER device support       GET RED  GREEN  AND BLUE COMPONENTS OF TRUE COLOR IMAGE    if  true eq 1  then begin     case truedim of       0 : begin             red   image 0                  grn   image 1                  blu   image 2            end       1 : begin             red   image  0                grn   image  1                blu   image  2          end       2 : begin             red   image    0              grn   image    1              blu   image    2        end   endcase   red   reform red   overwrite    grn   reform grn   overwrite    blu   reform blu   overwrite  endif      COMPUTE POSITION FOR IMAGE      Save first element of  p multi multi_first    p multi 0     Establish image position if not defined if  n_elements position  eq 0  then begin   if  max p multi  eq 0  then begin     position    0 0  0 0  1 0  1 0    endif else begin     plot   0   nodata  xstyle 4  ystyle 4  xmargin 0  0  ymargin 0  0      position    x window 0   y window 0   x window 1   y window 1    endelse endif    Erase and fill the background if required if  multi_first eq 0  then begin   if keyword_set erase  then erase   if  n_elements background  gt 0  then begin     polyfill   0 01   1 01   1 01   0 01   0 01           0 01   0 01   1 01   1 01   0 01   normal  color background 0    endif endif    Compute image aspect ratio if not defined if  n_elements aspect  eq 0  then begin   case true of     0 : result   size image      1 : result   size red    endcase   dims   result 1:2    aspect   float dims 1    float dims 0  endif    Save image xrange and yrange for axis overlays xrange    0  dims 0  yrange    0  dims 1  if  order eq 1  then yrange   reverse yrange     Set the aspect ratio and margin to fill the position window if requested if keyword_set usepos  then begin   xpos_size   float d x_vsize     position 2    position 0    ypos_size   float d y_vsize     position 3    position 1    aspect_value   ypos_size   xpos_size   margin_value   0 0 endif else begin   aspect_value   aspect   margin_value   margin endelse    Compute size of displayed image and save output position pos   position case true of   0 : imdisp_imsize  image  x0  y0  xsize  ysize  position pos            aspect aspect_value  margin margin_value   1 : imdisp_imsize    red  x0  y0  xsize  ysize  position pos            aspect aspect_value  margin margin_value endcase out_pos   pos      BYTE SCALE THE IMAGE IF REQUIRED      Choose whether to scale the image or not if  keyword_set noscale  eq 0  then begin      Scale the image   case true of     0 : scaled   imdisp_imscale image  bottom bottom  ncolors ncolors              range range  negative keyword_set negative      1 : begin           scaled_dims    size red 1:2            scaled   bytarr scaled_dims 0  scaled_dims 1  3            scaled 0  0  0    imdisp_imscale red  bottom 0  ncolors 256                negative keyword_set negative            scaled 0  0  1    imdisp_imscale grn  bottom 0  ncolors 256                negative keyword_set negative            scaled 0  0  2    imdisp_imscale blu  bottom 0  ncolors 256                negative keyword_set negative          end   endcase  endif else begin      Don t scale the image   case true of     0 : scaled   image     1 : begin           scaled_dims    size red 1:2            scaled   replicate red 0  scaled_dims 0  scaled_dims 1  3            scaled 0  0  0    red           scaled 0  0  1    grn           scaled 0  0  2    blu         end   endcase  endelse      DISPLAY IMAGE ON PRINTER DEVICE    if  d name eq  PRINTER  then begin      Display the image   case true of     0 : begin           device   index_color           tv  scaled  x0  y0  xsize xsize  ysize ysize  order order         end     1 : begin           device   true_color           tv  scaled  x0  y0  xsize xsize  ysize ysize  order order  true 3         end   endcase      Draw axes if required   if keyword_set axis  then       plot   0   nodata   noerase  position out_pos          xrange xrange  xstyle 1  yrange yrange  ystyle 1          _extra extra_keywords      Return to caller   return  endif      DISPLAY IMAGE ON GRAPHICS DEVICES WHICH HAVE SCALEABLE PIXELS    if  d flags and 1  ne 0  then begin      Display the image   case true of     0 : tv  scaled  x0  y0  xsize xsize  ysize ysize  order order     1 : begin           tvlct  r  g  b   get           loadct  0   silent           tv  scaled  x0  y0  xsize xsize  ysize ysize  order order  true 3           tvlct  r  g  b         end   endcase      Draw axes if required   if keyword_set axis  then       plot   0   nodata   noerase  position out_pos          xrange xrange  xstyle 1  yrange yrange  ystyle 1          _extra extra_keywords      Return to caller   return  endif      RESIZE THE IMAGE      Resize the image if  keyword_set noresize  eq 0  then begin   if  true eq 0  then begin     resized   imdisp_imregrid scaled  xsize  ysize  interp keyword_set interp    endif else begin     resized   replicate scaled 0  xsize  ysize  3      resized 0  0  0    imdisp_imregrid reform scaled    0  xsize  ysize          interp keyword_set interp      resized 0  0  1    imdisp_imregrid reform scaled    1  xsize  ysize          interp keyword_set interp      resized 0  0  2    imdisp_imregrid reform scaled    2  xsize  ysize          interp keyword_set interp    endelse endif else begin   resized   temporary scaled    x0   0   y0   0 endelse      GET BIT DEPTH FOR THIS DISPLAY      If this device supports windows  make sure a window has been opened if  d flags and 256  ne 0 then begin   if  d window lt 0  then begin     window   free   pixmap     wdelete   d window   endif endif    Set default display depth depth   8    Get actual bit depth on supported displays if  d name eq  WIN  or  d name eq  MAC  or  d name eq  X  then begin   if  version ge 5 1  then begin     device  get_visual_depth depth   endif else begin     if  d n_colors gt 256  then depth   24   endelse endif      SELECT DECOMPOSED COLOR MODE  ON OR OFF  FOR 24 BIT DISPLAYS    if  d name eq  WIN  or  d name eq  MAC  or  d name eq  X  then begin   if  depth gt 8  then begin     if  version ge 5 2  then device  get_decomposed entry_decomposed else         entry_decomposed   0     if  true eq 1  or  channel gt 0  then device  decomposed 1 else         device  decomposed 0   endif endif      DISPLAY THE IMAGE      If the display is 8 bit and the image is true color    convert image from true color to indexed color if  depth le 8  and  true eq 1  then begin   resized   color_quan temporary resized  3  r  g  b        colors ncolors  dither keyword_set dither    byte bottom    tvlct  r  g  b  bottom   true   0 endif    Set channel value for supported devices if  d name eq  WIN  or  d name eq  MAC  or  d name eq  X  then begin   channel_value   channel endif else begin   channel_value   0 endelse    Display the image case true of   0 : tv  resized  x0  y0  order order  channel channel_value   1 : tv  resized  x0  y0  order order  true 3 endcase      RESTORE THE DECOMPOSED COLOR MODE FOR 24 BIT DISPLAYS    if  d name eq  WIN  or  d name eq  MAC  or  d name eq  X  and      depth gt 8  then begin   device  decomposed entry_decomposed   if  d name eq  MAC  then tv   0   1   1 endif      DRAW AXES IF REQUIRED    if keyword_set axis  then     plot   0   nodata   noerase  position out_pos        xrange xrange  xstyle 1  yrange yrange  ystyle 1        _extra extra_keywords  END"); 
     107a[105] = new Array("./Picture/saveimage.html", "saveimage.pro", "", "       file_comments   Save the current graphics window to an output file  GIF by default         The output formats supported are:      GIF   8 bit with color table       BMP   8 bit with color table       PNG   8 bit with color table       PICT  8 bit with color table       JPEG 24 bit true color       TIFF 24 bit true color         Any conversions necessary to convert 8 bit or 24 bit images onscreen to      8 bit or 24 bit output files are done automatically       categories Input Output       param FILE  in required default format GIF    Name of the output file      keyword BMP   Set this keyword to create BMP format  8 bit with color table       keyword PNG   Set this keyword to create PNG format  8 bit with color table       keyword PICT   Set this keyword to create PICT format  8 bit with color table       keyword JPEG   Set this keyword to create JPEG format  24 bit true color       keyword TIFF   Set this keyword to create TIFF format  24 bit true color       keyword QUALITY  default 75    If set to a named variable  specifies the quality for   JPEG output  Ranges from 0  terrible  to   100  excellent  Smaller quality values yield higher   compression ratios and smaller output files       keyword DITHER  default no dithering    If set  dither the output image when creating 8 bit output   which is read from a 24 bit display       keyword CUBE  default to use statistical method    If set  use the color cube method to quantize colors when   creating 8 bit output which is read from a 24 bit display    This may improve the accuracy of colors in the output image     especially white       keyword QUIET  default to print an information message    Set this keyword to suppress the information message       restrictions   The output file is overwritten if it exists       restrictions   requires IDL 5 0 or higher  square bracket array syntax       examples     IDL  openr  lun  filepath hurric dat  subdir examples data   get_lun   IDL  image   bytarr 440  330    IDL  readu  lun  image   IDL  free_lun  lun   IDL  loadct  13   IDL  tvscl  image   IDL  saveimage   hurric gif       history Liam Gumley ssec wisc edu   http: cimss ssec wisc edu gumley     This program is free software  you can redistribute it and or   modify it under the terms of the GNU General Public License   as published by the Free Software Foundation  either version 2   of the License  or  at your option  any later version      This program is distributed in the hope that it will be useful    but WITHOUT ANY WARRANTY  without even the implied warranty of   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE   See the   GNU General Public License for more details      You should have received a copy of the GNU General Public License   along with this program  if not  write to the Free Software   Foundation  Inc  59 Temple Place   Suite 330  Boston  MA  02111 1307  USA       version  Id: saveimage pro 163 2006 08 29 12:59:46Z navarro       PRO saveimage  FILE  BMP BMP  PNG PNG  PICT PICT  JPEG JPEG  TIFF TIFF      QUALITY QUALITY  DITHER DITHER  CUBE CUBE  QUIET QUIET  MULTIPLE   multiple     compile_opt idl2  strictarrsubs    rcs_id    Id: saveimage pro 163 2006 08 29 12:59:46Z navarro        CHECK INPUT      Check arguments if  n_params  ne 1  then message   Usage: SAVEIMAGE  FILE  if  n_elements file  eq 0  then message   Argument FILE is undefined  if  n_elements file  gt 1  then message   Argument FILE must be a scalar string     Check keywords output    GIF  if keyword_set bmp   then output    BMP  if keyword_Set png   then output    PNG  if keyword_set pict  then output    PICT  if keyword_set jpeg  then output    JPEG  if keyword_set tiff  then output    TIFF  if  n_elements quality  eq 0  then quality   75    Check for TVRD capable device if  d flags and 128  eq 0 then message   Unsupported graphics device     Check for open window if  d flags and 256  ne 0 then begin   if  d window lt 0  then message   No graphics windows are open  endif    Get display depth depth   8 if  d n_colors gt 256  then depth   24      GET CONTENTS OF GRAPHICS WINDOW      Handle window devices  other than the Z buffer  if  d flags and 256  ne 0 then begin      Copy the contents of the current display to a pixmap   current_window    d window   xsize    d x_size   ysize    d y_size   window   free   pixmap  xsize xsize  ysize ysize  retain 2   device  copy 0  0  xsize  ysize  0  0  current_window       Set decomposed color mode for 24 bit displays   version   float version release    if  depth gt 8  then begin     if  version gt 5 1  then device  get_decomposed entry_decomposed     device  decomposed 1   endif  endif    Read the pixmap contents into an array if  depth gt 8  then begin   image   tvrd order 0  true 1  endif else begin   image   tvrd order 0  endelse    Handle window devices  other than the Z buffer  if  d flags and 256  ne 0 then begin      Restore decomposed color mode for 24 bit displays   if  depth gt 8  then begin     if  version gt 5 1  then begin       device  decomposed entry_decomposed     endif else begin       device  decomposed 0       if  keyword_set quiet  eq 0  then           print   Decomposed color was turned off      endelse   endif      Delete the pixmap   wdelete   d window   wset  current_window  endif    Get the current color table tvlct  r  g  b   get    If an 8 bit image was read  reduce the number of colors if  depth le 8  then begin   reduce_colors  image  index   r   r index    g   g index    b   b index  endif      WRITE OUTPUT FILE    case 1 of      Save the image in 8 bit output format    output eq  GIF   or  output eq  BMP  or      output eq  PICT  or  output eq  PNG  : begin      if  depth gt 8  then begin          Convert 24 bit image to 8 bit       case keyword_set cube  of         0 : image   color_quan image  1  r  g  b  colors 256                  dither keyword_set dither          1 : image   color_quan image  1  r  g  b  cube 6        endcase          Sort the color table from darkest to brightest       table_sum   total long r   long g   long b  2        table_index   sort table_sum        image_index   sort table_index        r   r table_index        g   g table_index        b   b table_index        oldimage   image       image    image_index temporary oldimage       endif        Save the image     case output of        GIF   : write_gif   file  image  r  g  b  MULTIPLE   multiple        BMP   : write_bmp   file  image  r  g  b        PNG   : write_png   file  image  r  g  b        PICT  : write_pict  file  image  r  g  b     endcase    end      Save the image in 24 bit output format    output eq  JPEG  or  output eq  TIFF  : begin        Convert 8 bit image to 24 bit     if  depth le 8  then begin       info   size image        nx   info 1        ny   info 2        true   bytarr 3  nx  ny        true 0        r image        true 1        g image        true 2        b image        image   temporary true      endif        If TIFF format output  reverse image top to bottom     if  output eq  TIFF  then image   reverse temporary image  3         Write the image     case output of        JPEG  : write_jpeg  file  image  true 1  quality quality        TIFF  : write_tiff  file  image  1     endcase    end  endcase    Print information for the user if  keyword_set quiet  eq 0  then     print  file  output  format Created  a  in  a  format   END"); 
     108a[106] = new Array("./Picture/showimage.html", "showimage.pro", "", "       file_comments   Show the contents of a graphics file in the current window         The input formats supported are:      GIF   8 bit with color table       BMP   8 bit with color table or 24 bit true color       PICT  8 bit with color table       TIFF  8 bit with color table or 24 bit true color       JPEG 24 bit true color      Any conversions necessary to translate 8 bit or 24 bit files   to 8 bit or 24 bit images on screen are done automatically       categories Input Output       param FILE  in required    Name of the output file  format is identified automatically       keyword DITHER  default no dithering    Set this keyword to dither the input image when displaying   24 bit images on an 8 bit display       keyword CURRENT   Set this keyword to display the image in the current window    default is to create a new window sized to fit the image       restrictions   The color table is modified       restrictions   Requires IDL 5 2 or higher  image QUERY functions       examples   IDL  showimage  filepath rose jpg  subdir examples data       history Liam Gumley ssec wisc edu   http: cimss ssec wisc edu gumley     This program is free software  you can redistribute it and or   modify it under the terms of the GNU General Public License   as published by the Free Software Foundation  either version 2   of the License  or  at your option  any later version      This program is distributed in the hope that it will be useful    but WITHOUT ANY WARRANTY  without even the implied warranty of   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE   See the   GNU General Public License for more details      You should have received a copy of the GNU General Public License   along with this program  if not  write to the Free Software   Foundation  Inc  59 Temple Place   Suite 330  Boston  MA  02111 1307  USA       version  Id: showimage pro 186 2006 09 20 10:50:37Z pinsard       PRO showimage  FILE  DITHER DITHER  CURRENT CURRENT     compile_opt idl2  strictarrsubs   rcs_id    Id: showimage pro 186 2006 09 20 10:50:37Z pinsard        CHECK INPUT      Check IDL version  if float version release  lt 5 2 then begin   message   IDL 5 2 or higher is required   continue   return endif    Check input arguments  case 1 of   n_params  ne 1           : error    Usage: SHOWIMAGE  FILE    n_elements file  eq 0     : error    Argument FILE is undefined    n_elements file  gt 1     : error    Argument FILE must be a scalar string     findfile file 0  eq   : error    Argument FILE was not found    else                      : error     endcase  if error ne   then begin   message  error   continue   return endif      CHECK THE GRAPHICS DEVICE      Check for device supporting windows and tvrd   if  d flags and 256  eq 0  or  d flags and 128  eq 0  then begin   error   string d name  format Graphics device  a  is not supported    message  error   continue   return endif    Make sure a window has been opened in this session and get visual depth  if  d window lt 0 then begin   window   free   pixmap  xsize 20  ysize 20   wdelete   d window endif device  get_visual_depth depth    If 8 bit display is low on colors  print a message  if  depth eq 8  and  d table_size  lt 64 then message       Display has less than 64 colors  image quality may degrade   continue      IDENTIFY FILE AND READ IMAGE      Identify the file format  result   query_gif file  info  if result eq 0 then result   query_bmp file  info  if result eq 0 then result   query_pict file  info  if result eq 0 then result   query_tiff file  info  if result eq 0 then result   query_jpeg file  info  if result eq 0 then begin   message   File format not recognized   continue   return endif    Fix the channel information for GIF images  if info type eq  GIF  then info channels   1    Read the image  case info type of     GIF  : read_gif  file  image  r  g  b     BMP  : begin     if info channels eq 1 then begin       image   read_bmp file  r  g  b      endif else begin       image   read_bmp file        image   reverse temporary image  1      endelse   end     PICT  : read_pict  file  image  r  g  b     TIFF  : begin     if info channels eq 1 then begin       image   read_tiff file  r  g  b  order order        image   reverse temporary image  2      endif else begin       image   read_tiff file  order order        image   reverse temporary image  3      endelse   end     JPEG  : read_jpeg  file  image  endcase    If an 8 bit image was read  reduce the number of colors  if info channels eq 1 then begin   reduce_colors  image  index   r   r index    g   g index    b   b index  endif    Get image size  dims   size image   dimensions  if n_elements dims  eq 2 then begin   nx   dims 0    ny   dims 1  endif else begin   nx   dims 1    ny   dims 2  endelse      CREATE A WINDOW      Create a draw widget sized to fit the image  if not keyword_set current  then begin      Set default window size    scroll   0   xsize   nx   ysize   ny   draw_xsize   nx   draw_ysize   ny      Adjust the window size if the image is too large    device  get_screen_size screen   screen_xsize   screen 0    screen_ysize   screen 1    if  nx gt screen_xsize  then begin     xsize   0 9   screen_xsize     scroll   1   endif   if  ny gt screen_ysize  then begin     ysize   0 9   screen_ysize     scroll   1   endif      Create the draw widget    base   widget_base title file    draw   widget_draw base  scroll scroll    widget_control  draw  xsize xsize  ysize ysize        draw_xsize draw_xsize  draw_ysize draw_ysize  endif      HANDLE IDL 8 BIT MODE    if depth eq 8 then begin      If the color table of an 8 bit image is larger than     the current display table  convert the image to 24 bit    if  info channels eq 1  and  n_elements r  gt  d table_size  then begin        Convert to 24 bit      dims   size image   dimensions      nx   dims 0      ny   dims 1      true   bytarr 3  nx  ny      true 0        r image      true 1        g image      true 2        b image      image   temporary true         Reset the number of channels      info channels   3    endif      If image is 24 bit  convert to 8 bit    if info channels eq 3 then begin        Convert 24 bit image to 8 bit      image   color_quan image  1  r  g  b  colors d table_size          dither keyword_set dither         Sort the color table from darkest to brightest      table_sum   total long r   long g   long b  2      table_index   sort table_sum      image_index   sort table_index      r   r table_index      g   g table_index      b   b table_index      oldimage   image     image    image_index temporary oldimage         Reset the number of channels      info channels   1    endif  endif      DISPLAY THE IMAGE      Realize the draw widget  if not keyword_set current  then widget_control  base   realize    Save current decomposed mode and display order  device  get_decomposed current_decomposed current_order    order    Set image to display from bottom up   order   0    Display the image  if info channels eq 1 then begin    device  decomposed 0   tvlct  r  g  b   tv  image  endif else begin    device  decomposed 1   tv  image  true 1  endelse    Restore decomposed mode and display order  device  decomposed current_decomposed  order   current_order  END"); 
     109a[107] = new Array("./Postscript/closeps.html", "closeps.pro", "", "           file_comments   Close the Postscript mode     when archive_ps ne 0  we add the name and the date at the bottom left corner   of the postscript page    If the postscript is called idl ps we change its name to number ps    number automatically found to be 1 larger that any of the existing ps file       keyword INFOWIDGET   A long integer giving the id of the information widget  created by openps    that we have to destroy at the end of closeps  when the postscript is done       uses cm_4ps      history Sebastien Masson  smasson lodyc jussieu fr                          21 12 98   June 2005: Sebastien Masson  english version with new commons      version  Id: closeps pro 136 2006 07 10 15:20:19Z pinsard             PRO closeps  INFOWIDGET   infowidget       compile_opt idl2  strictarrsubs      IF lmgr demo  EQ 1 THEN return     include commons  cm_4ps   IF NOT keyword_set key_forgetold  THEN BEGIN  updatenew   ENDIF     IF  d name NE  PS  THEN GOTO  last_part     if archive_ps   0 we will add its name and the date at the bottom   left corner of the page  in case if the postscript will be archived   in printps      IF keyword_set archive_ps  THEN BEGIN     we get the name of the latest created postscript         psdir   isadirectory psdir  title    Select psdir       nameps   file_search psdir ps                                 test_regular   test_write   nosort       dates    file_info nameps mtime      lastdate    reverse sort temporary dates 0       nameps   nameps lastdate       nameps   file_basename nameps   ps    If this name is idl ps then we change it to the number ps      IF nameps EQ  idl  then BEGIN   get the name of all the  ps or  ps gz files available in psdir        allps   file_search psdir ps ps gz pdf   test_regular   nosort         allps   file_basename file_basename allps gz ps         allps   file_basename allps pdf    find which of these names corresponds to numbers    get ascii codes of the names        testnumb   byte allps    longest name        maxstrlen    size testnumb   dimensions 0    ascii codes can be 0 or between byte 0  and byte 9         testnumb   testnumb EQ 0 OR                      testnumb GE  byte 0 0  AND testnumb LE  byte 9 0         testnumb   where total testnumb  1  EQ maxstrlen  count         IF count NE 0 THEN BEGIN   get the largest number          psnumber   fix allps testnumb           psnumber    psnumber reverse sort psnumber 0    1        ENDIF ELSE psnumber   0        nameps   strtrim psnumber  2       ENDIF     we annotate the postscript        date   byte systime 0       we get the date      xyouts   d x_px_cm   d y_px_cm                  nameps   string date 4:10 string date 20:23                    device  charsize    75    ENDIF     close the postscript mode    device   close   last_part:      thisOS   strupcase strmid version os_family  0  3     CASE thisOS of       MAC : SET_PLOT  thisOS       WIN : SET_PLOT  thisOS      ELSE: SET_PLOT   X     ENDCASE    def_myuniquetmpdir    colorfile   myuniquetmpdir    original_colors dat     IF file_test colorfile   regular  THEN BEGIN      restore  colorfile      file_delete  colorfile   quiet   reload the original colors      tvlct  red  green  blue    ENDIF     p font    1   force background color to the last color  white      p BACKGROUND d n_colors 1    255     p color 0    if  d n_colors gt 256 then  p background ffffff x      if keyword_set infowidget  then       widget_control  long infowidget  bad_id   toto   destroy      return end"); 
     110a[108] = new Array("./Postscript/openps.html", "openps.pro", "", "             file_comments   switch to postscript mode and define it      param namepsin  in optional    name of the postscript file    Extension  ps  is added if missing  It will be stored in the psdir directory       keyword FILENAME   to define the name of the postscript file through a keyword rather than with    nameps input argument  in this case the keyword can be pass through   different routines via _EXTRA keyword       keyword INFOWIDGET   If INFOWIDGET is present  it specifies a named variable into which the id of    the widget giving information about the postscript creation is stored as a    long integer    This id is needed by closeps to kill    the information widget       keyword KEEP_PFONT   activate to suppress the modification of  p font    by default we force   p font   0  to make smaller postscripts       keyword PORTRAIT      keyword LANDSCAPE      keyword KEEPPFONT   same as keep_pfont      keyword LIGHTNESS   a scalar used to change the Lightness of the color palette to be able to   adjust according to the printer we use  the media  paper or slide      1 to get darker colors      keyword _EXTRA   used to pass any keyword to device procedure       uses cm_4ps      history Sebastien Masson  smasson lodyc jussieu fr    21 12 98   1 2 98: ajout de nameps en input   1 9 1999: ajout du mot cle FILENAME et du widget   June 2005: Sebastien Masson  cleaning  english version with new commons      version  Id: openps pro 186 2006 09 20 10:50:37Z pinsard             pro openps  namepsin  FILENAME   filename  INFOWIDGET   infowidget                 KEEPPFONT   keeppfont  KEEP_PFONT   keep_pfont                 PORTRAIT   portrait  LANDSCAPE   landscape                 LIGHTNESS   Lightness _extra   ex       compile_opt idl2  strictarrsubs      IF lmgr demo  EQ 1 THEN BEGIN       dummy   report impossible to create a PS in demo mode        return    ENDIF     include commons  cm_4ps IF NOT keyword_set key_forgetold  THEN BEGIN  updatenew ENDIF     close the postscript device if we are already in postscript mode    IF  d name EQ  PS  THEN device   close   switch to postscript mode    set_plot ps      if we use  keyword Lightness   save the actual color palette in a temporary file    to be restored when calling closeps      IF n_elements Lightness  NE 0 THEN BEGIN      IF Lightness NE 1 THEN BEGIN        tvlct  red  green  blue   get        def_myuniquetmpdir        save  red  green  blue  filename   myuniquetmpdir    original_colors dat         palit  Lightness  red  green  blue      ENDIF    ENDIF     we define the name of the file      CASE 1 OF      n_params  EQ 1:nameps   namepsin      keyword_set filename : nameps   filename      ELSE:nameps   xquestion Name of the postscript file   idl ps   chkwid     ENDCASE   make sure that nameps ends with  ps     nameps   file_dirname nameps   mark_directory                  file_basename nameps   ps     ps    add path  psdir  and check that nameps is ok    nameps   isafile nameps  iodir   psdir   new      we define xsize  ysize  xoffset et  yoffset      IF n_elements portrait  NE 0 OR n_elements landscape  NE 0 THEN        key_portrait   keyword_set portrait     1   keyword_set landscape      if key_portrait EQ 1 then begin       xs   min page_size        ys   max page_size        xoff   0        yoff   0     ENDIF ELSE BEGIN       xs   max page_size        ys   min page_size        xoff   0        yoff   max page_size     ENDELSE     We define the device of the postscript mode      device   color   palatino  filename   strcompress nameps   remove_all                 LANDSCAPE   1   key_portrait  PORTRAIT   key_portrait                xsize   xs  ysize   ys  xoffset   xoff  yoffset   yoff                bits_per_pixel   8  language_level   2  _extra   ex   to make smaller postcripts    IF NOT  keyword_set keeppfont  OR keyword_set keep_pfont       THEN  p font   0   show some informations    IF arg_present infowidget  THEN       infowidget   xnotice Postcript file is currently processed       RETURN END            "); 
     111a[109] = new Array("./Postscript/printps.html", "printps.pro", "", "             file_comments     archiving possibilities       if archive_ps  common variable of cm_4ps  ne 0 then the postscript   can be saved for archiving if it is printed or if the button    archive ps  is pressed  if it is printed and archive_ps   1 then   the archiving is done automatically whereas we ask if the postscript   file must be archived or not    If the postscript name is  idl ps   default name  then this name will   be changed to number ps  number automatically found to be 1 larger   that any of the existing ps file       categories    Postscripts      param event      restrictions     1  this is working only with unix linux osX machines     2  definition of the printing command     the printing command is defined by the common variable  print_command    in cm_4ps  This command must be defined build in a way that it the   instruction:       print_command i printer_machine_names i   file ps   or       print_command printer_machine_names i   file ps   is working  default definition is  lpr  P         history Sebastien Masson  smasson lodyc jussieu fr   21 12 98                         25 8 19999 utilisation des widgets                         8 9 1999 utilisation de cw_bgroup   June 2005: Sebastien Masson: cleaning  English version with new commons      version  Id: printps pro 157 2006 08 21 09:01:50Z navarro             PRO printps_event  event     include commons     compile_opt idl2  strictarrsubs    cm_4ps   IF NOT keyword_set key_forgetold  THEN BEGIN  updatenew   ENDIF     What kind of event do we have     widget_control  event id  get_uvalue   uval   case on the event   CASE uval name OF     visualize case : postscript visualization        visualize :BEGIN   paper orientation       if key_portrait EQ 1 then ori    portrait  ELSE ori    seascape    paper format       CASE round 10 total page_size  OF         round 10 83 9611   118 816  : papsize    a0          round 10 59 4078   83 9611  : papsize    a1          round 10 41 9806   59 4078  : papsize    a2          round 10 29 7039   41 9806  : papsize    a3          round 10 20 9903   29 7039  : papsize    a4          round 10 14 8519   20 9903  : papsize    a5          round 10 10 4775   14 8519  : papsize    a6          round 10 7 40833   10 4775  : papsize    a7          round 10 5 22111   7 40833  : papsize    a8          round 10 3 70417   5 22111  : papsize    a9          round 10 2 61056   3 70417  : papsize    a10          round 10 100 048   141 393  : papsize    b0          round 10 70 6967   100 048  : papsize    b1          round 10 50 0239   70 6967  : papsize    b2          round 10 35 3483   50 0239  : papsize    b3          round 10 25 0119   35 3483  : papsize    b4          round 10 17 6742   25 0119  : papsize    b5          round 10 22 86   30 48  : papsize    archA          round 10 30 48   45 72  : papsize    archB          round 10 45 72   60 96  : papsize    archC          round 10 60 96   91 44  : papsize    archD          round 10 91 44   121 92  : papsize    archE          round 10 21 59   33 02  : papsize    flsa          round 10 21 59   33 02  : papsize    flse          round 10 13 97   21 59  : papsize    halfletter          round 10 19 05   25 4  : papsize    note          round 10 21 59   27 94  : papsize    letter          round 10 21 59   35 56  : papsize    legal          round 10 27 94   43 18  : papsize    11x17          round 10 43 18   27 94  : papsize    ledger          ELSE:papsize    a4        ENDCASE   call the viewers       CASE event value OF          Ghostview :spawn   ghostview  papsize   quiet  ori   uval nameps          Ghostscript :spawn   gs  sPAPERSIZE papsize   q  uval nameps          Kghostview :spawn   kghostview  uval nameps       ENDCASE       return     END     print case: print and archive the file if needed        print :BEGIN   printer selection       printer   printer_machine_names event value    print       CASE n_elements print_command  OF         0:ptcmd    lpr  P          1:ptcmd   print_command 0          n_elements printer_machine_names :ptcmd   print_command event value          ELSE:BEGIN           ng   report bad definition of print_command  common variable of cm_4ps   C we did not print the postscript file   simple            return         END       ENDCASE       spawn  ptcmd   printer         uval nameps     printing informations          spawn   lpq  P imprimante   l  info     display them         xdisplayfile   nothing  text   info                           title    Printing Info  file_basename uval nameps                            height   n_elements info   printps      history Sebastien Masson  smasson lodyc jussieu fr   21 12 98                         25 8 19999 utilisation des widgets                         8 9 1999 utilisation de cw_bgroup   June 2005: Sebastien Masson: cleaning  English version with new commons      version  Id: printps pro 157 2006 08 21 09:01:50Z navarro           PRO printps  psfilename     this is working only with unix linux osX machines     compile_opt idl2  strictarrsubs     thisOS   strupcase strmid version os_family  0  3    CASE thisOS OF      MAC :return      WIN :return     ELSE:   ENDCASE     include commons  cm_4ps   IF NOT keyword_set key_forgetold  THEN BEGIN  updatenew   ENDIF     we get the name of the latest created postscript      psdir   isadirectory psdir  title    Select psdir    CASE N_PARAMS  OF     0: BEGIN       nameps   file_search psdir ps   test_regular   nosort        IF nameps 0  EQ   THEN BEGIN         ras   report no postsrcipt file  ending with  ps  found in :     psdir          RETURN       ENDIF       dates    file_info nameps mtime       lastdate    reverse sort temporary dates 0        nameps   nameps lastdate      END     1: nameps   psfilename     ELSE: BEGIN       ras   report printps accept only one element: psfilename        RETURN     END   ENDCASE     we check if the file is exist in psdir  if necessary we complete   its name with  ps and or  gz     nameps   find nameps ps gz  iodir   psdir   nopro    IF nameps EQ  NOT FOUND  THEN BEGIN     ng   report file  nameps ps gz  does not exist       return   ENDIF   gzipped   strpos nameps   gz    if the file is gzipped we call gunzip et change its name   IF gzipped NE  1 THEN BEGIN     spawn   gunzip     nameps     nameps   strmid nameps  0  gzipped    endif     build the widget     base   widget_base row  title    Postscript file:                            file_basename nameps    ps viewers grouped button   psviewers    no psviewers found    IF file_which getenv PATH   ghostview  NE   THEN       psviewers    psviewers   Ghostview    IF file_which getenv PATH   gs  NE   THEN       psviewers    psviewers   Ghostscript    IF file_which getenv PATH   kghostview  NE   THEN       psviewers    psviewers   Kghostview    if at least one of viewer was found we define these buttons   IF n_elements psviewers  GT 1 THEN BEGIN     psviewers   psviewers 1:      notused   cw_bgroup base  psviewers   frame  label_top    Visualize                              uvalue    name: visualize  nameps:nameps                               column   return_name    ENDIF   printers list grouped buttons   are the common variables printer_human_names and printer_human_names   defined in a proper way    CASE 1 OF     n_elements printer_human_names  eq 0:         noting   report the cm_4ps variable printer_human_names is not defined   CWe could not propose any printer   simple      n_elements printer_human_names  NE n_elements printer_machine_names :         noting   report the cm_4ps variables printer_human_names and  Cprinter_machine_names do not have the same number of arguments   CWe could not propose any printer   simple      printer_human_names 0  EQ  :     ELSE:notused           cw_bgroup base  printer_human_names   frame   column                     label_top    Select printer                      uvalue    name: print  nameps:nameps  gzip:gzipped NE  1    ENDCASE    archive ps  button  can be created only if archive_ps ne 0   IF keyword_set archive_ps  THEN       notused   widget_button base  value    archive ps                                  uvalue    name: archive  nameps:nameps                                             gzip:gzipped NE  1    quit button   notused   widget_button base  value    quit                                uvalue    name: quit  nameps:nameps                                           gzip:gzipped NE  1      widget_control  base   realize     xmanager   printps  base   no_block     return end"); 
     112a[110] = new Array("./ReadWrite/idl-NetCDF/ncdf_listdims.html", "ncdf_listdims.pro", "", "     file_comments        categories        param NCID        restrictions        examples          history        version    Id: ncdf_listdims pro 157 2006 08 21 09:01:50Z navarro       FUNCTION ncdf_listdims ncid     compile_opt idl2  strictarrsubs    n ncdf_inquire ncid ndims  names strarr n   for i 0 n 1 do begin     ncdf_diminq ncid i name size     names i name endfor  return names  end"); 
     113a[111] = new Array("./ReadWrite/idl-NetCDF/ncdf_listvars.html", "ncdf_listvars.pro", "", "     file_comments        categories        param NCID         returns        restrictions        examples          history        version    Id: ncdf_listvars pro 157 2006 08 21 09:01:50Z navarro       FUNCTION ncdf_listvars ncid     compile_opt idl2  strictarrsubs    n ncdf_inquire ncid nvars  names strarr n   for i 0 n 1 do begin     names i ncdf_varinq ncid i name endfor  return names  end"); 
     114a[112] = new Array("./ReadWrite/idl-NetCDF/ncdf_quickread/ncdf_quickread.html", "ncdf_quickread.pro", "", ""); 
     115a[113] = new Array("./ReadWrite/idl-NetCDF/ncdf_quickread/ncdf_quickread_helper.html", "ncdf_quickread_helper.pro", "", "      ncdf_quickread_helper pro   This file contains IDL functions to read netCDF                                data files into IDL variables       Adapted from CDF2IDL pro      This file contains the following functions and procedures:       functions:          ncdf_quickread_getfile   strips the directory and optionally  any                                    suffixes from the path file          ncdf_quickread_getdir   returns the directory from the full path file          ncdf_quickread_validatename   validates the name that will be used                                        as a netCDF variable       procedures:          ncdf_quickread_helper1   construct commands which when executed at                                   the top level will read netCDF variables                                   into IDL      History:    Date       Name          Action               06 Jun 97  S  Rupert     Created     09 Jun 97  S  Rupert     Fully tested     10 Jun 97  S  Rupert     Modified keyword usage     03 Feb 98  S  Rupert     Added additional error checking  and warning to                             output script      17 Feb 98  S  Rupert     Corrected validation routine to handle instance                             of name strating with a number and containing a                             dash     05 Jul 00  A M Iwi       Added keyword PREFIX  on CDF2IDL   Supplied string                             gets prepended to all variable names     19 Jun 01  A M Iwi       Added keyword REFORM on CDF2IDL   REFORM function                             is used to remove dimensions of size 1     02 Oct 03  A M Iwi       Change into helper routine for ncdf_quickread    11 Aug 04  A M Iwi       Add  fields  option to read only certain fields                              Also  only stringify attributes of type CHAR         file_comments   This function returns the filename name from the full path       categories        param FULLPATH   full directory file path      keyword SUFFIX   include input suffix in output file name      returns   file   filename      restrictions        examples   Call: file   ncdf_quickread_getfile fullpath        history        version    Id: ncdf_quickread_helper pro 163 2006 08 29 12:59:46Z navarro     function ncdf_quickread_getfile  fullpath  suffix suffix on_error 2 compile_opt hidden   Retrieve the postion at which the first   character occurs from   the end of the string  dirlen   rstrpos fullpath       Retrieve the full length of the original string  len   strlen fullpath     Retrieve the filename  fullfile   strmid fullpath  dirlen 1  len     Retrieve the position at which the first   character occurs from   the end of the string  len    1 if not keyword_set suffix  then len   rstrpos fullfile    if  len EQ  1  then len   strlen fullfile     Retrieve the file  file   strmid fullfile  0  len     Return the file name  return  file    End function  end       file_comments   This function returns the directory name from the full path       categories        param FULLPATH   full directory file path      returns   directory path      restrictions        examples   Call: dir   ncdf_quickread_getdir fullpath        history        version    Id: ncdf_quickread_helper pro 163 2006 08 29 12:59:46Z navarro      function ncdf_quickread_getdir  fullpath on_error 2 compile_opt hidden   Retrieve the postion at which the first   character occurs from   the end of the string  len   rstrpos fullpath       Retrieve the filename  if  len EQ  1  then dir       else dir   strmid fullpath  0  len 1     Return the file name  return  dir    End function  end       file_comments   This routine ensures that the given name does not start with a number    nor contain a dash   IDL cannot accept a variable starting with a    number or containing a dash   If the name starts with a number  an    underscore is prepended to the name  and if it contains a dash  the    dash is replaced with an underscore         categories        param VARNAME   The name of the variable to be read         returns        restrictions        examples          history        version    Id: ncdf_quickread_helper pro 163 2006 08 29 12:59:46Z navarro      function ncdf_quickread_validatename  varname on_error 2 compile_opt hidden    Initialize the name  name   varname    If the name starts with a number  prepend it with an underscore  if  strpos varname   0  EQ 0  then name   strcompress _ varname  if  strpos varname   1  EQ 0  then name   strcompress _ varname  if  strpos varname   2  EQ 0  then name   strcompress _ varname  if  strpos varname   3  EQ 0  then name   strcompress _ varname  if  strpos varname   4  EQ 0  then name   strcompress _ varname  if  strpos varname   5  EQ 0  then name   strcompress _ varname  if  strpos varname   6  EQ 0  then name   strcompress _ varname  if  strpos varname   7  EQ 0  then name   strcompress _ varname  if  strpos varname   8  EQ 0  then name   strcompress _ varname  if  strpos varname   9  EQ 0  then name   strcompress _ varname     If the name contains a dash replace it with an underscore   if  strpos name    NE  1  then begin    pieces   str_sep name       n_pieces   n_elements pieces     name   pieces 0     for i 1 n_pieces 1 do begin       name   strcompress name _ pieces i     endfor endif    Return the file name  return  name    End function  end      file_comments   This procedure creates a script to read the data in a given netCDF   file into IDL   The default output file is the name of the netCDF   file with idl replacing any existing suffix   The default output is   variable data only       categories        param INFILE   full path to netCDF file of interest      keyword VERBOSE     Set this keyword to return an error message in case of an error       keyword PREFIX   see changelog above       keyword FIELDS        keyword REFORM   see changelog above        returns   array of commands to run at top level      restrictions        examples          history        version    Id: ncdf_quickread_helper pro 163 2006 08 29 12:59:46Z navarro       function ncdf_quickread_helper  infile  verbose verbose                                     prefix prefix  fields fields                                    reform reform on_error 2 compile_opt hidden        Ensure that the netCDF format is supported on the current platform  if not ncdf_exists  then message       The Network Common Data Format is not supported on this platform     Open the netcdf file for reading  ncid   NCDF_OPEN strcompress infile   remove_all  if  ncid EQ  1  then message     The file  infile  could not be opened  please check the path     Retrieve general information about this netCDF file  ncidinfo   NCDF_INQUIRE ncid     command to write file header commands __ncid   NCDF_OPEN infile   subset 0 if n_elements fields  ne 0 then begin   if  fields ne   then begin       subset 1       subfields strsplit fields extract    endif endif    Place the desired variables in local arrays  for i 0  ncidinfo Nvars 1 do begin     vardata   NCDF_VARINQ ncid  i     if not subset then begin        wanted 1    endif else begin        match   where subfields eq vardata Name  nmatch         wanted nmatch ne 0     endelse    if wanted then begin        varname   ncdf_quickread_validatename vardata Name          if keyword_set prefix  then varname prefix varname        commands                   commands NCDF_VARGET  __ncid   strcompress string i   varname         if keyword_set reform  and vardata ndims ge 2            then commands commands varname reform varname         if  keyword_set verbose  then begin            for j 0  vardata Natts 1 do begin                att   NCDF_ATTNAME ncid  i  j                 attname   strcompress varname _ strcompress att REMOVE_ALL                 commands                           commands NCDF_ATTGET  __ncid   strcompress string i                              att   attname                 attinfo   ncdf_attinq ncid  i  att                 if attinfo datatype eq  CHAR  then                    commands commands attname    STRING attname             endfor        endif    endif endfor  if  keyword_set verbose  then begin    for i 0  ncidinfo Ngatts 1 do begin      name   NCDF_ATTNAME ncid   GLOBAL  i       attname   ncdf_quickread_validatename name       if keyword_set prefix  then attname prefix attname      commands          commands NCDF_ATTGET  __ncid   GLOBAL   name   attname       attinfo   ncdf_attinq ncid   global  name       if attinfo datatype eq  CHAR  then          commands commands attname    STRING attname    endfor endif  ncdf_close ncid commands commands NCDF_CLOSE  __ncid     Return commands to the caller  return commands    End procedure  end"); 
     116a[114] = new Array("./ReadWrite/idl-NetCDF/ncdf_quickwrite/ncdf_quickwrite.html", "ncdf_quickwrite.pro", "", ""); 
     117a[115] = new Array("./ReadWrite/idl-NetCDF/ncdf_quickwrite/ncdf_quickwrite_helper1.html", "ncdf_quickwrite_helper1.pro", "", "     file_comments        categories        param NCVARSTRING        param NCDFSTRUCT        param STRUCTNAME         returns        restrictions        examples          history        version    Id: ncdf_quickwrite_helper1 pro 157 2006 08 21 09:01:50Z navarro       pro ncdf_quickwrite_helper1 ncvarstring ncdfstruct structname     Parses the variable string so as to create the main structure        on_error 2 compile_opt hidden ncdfstruct ncommands: 1     split string  to extract IDL global attribute variable name bits strsplit ncvarstring extract  case n_elements bits  of     1: begin           no attributes         globattflag 0B         globattnameidl      end     2: begin         globattflag 1B         globattnameidl bits 1      end     else: begin         message Parse error: more than one   sign in  ncvarstring               noname     end endcase allvarspec bits 0    vars strsplit strcompress allvarspec remove_all extract  nvar n_elements vars   varnames strarr nvar  varnamesidl strarr nvar   nvardims intarr nvar  vardims ptrarr nvar   varattflags bytarr nvar  varattnamesidl strarr nvar      at start  no dimensions known ndim 0 dimnames  dimunlim 1  for ivar 0 nvar 1 do begin          varandattspec vars ivar             split into IDL attribute variable name and full variable specification     bits strsplit varandattspec : extract      case n_elements bits  of         1:   no variable attributes         2: begin             varattflags ivar 1B             varattnamesidl ivar bits 1          end         else: begin             message Parse error: more than one  :  sign in  varandattspec                   noname         end     endcase     fullvarspec bits 0                  split full variable specification       into variable specification and IDL variable name            bits strsplit fullvarspec extract      case n_elements bits  of         1: varnameidl    fill this in later         2: varnameidl bits 1          else: begin             message Parse error: more than one   sign in  fullvarspec                   noname         end     endcase          varspec bits 0             split variable specification into name and dimension specification               bits strsplit varspec extract      varname bits 0      case n_elements bits  of         1: begin               scalar             nvardims ivar 0         end         2: begin             dimspec bits 1                test for and strip trailing               len strlen dimspec              if strmid dimspec len 1 1  ne   then begin                 message Parse error: dimension specification  dimspec                        for variable  varname  should end with                        noname             endif             dimspec strmid dimspec 0 len 1                           if dimspec eq   then begin                   dimensions not specified   assume 1d array with                    same name for dimension as for variable                 vardimnames varname              endif else if dimspec eq   then begin                   dimensions not specified but   given   as above                    again assume same name for dimension as for variable                     but with    parsed below as meaning UNLIMITED                  vardimnames varname              endif else begin                 vardimnames strsplit dimspec extract              endelse                            now for each dimension name  see if it already exists                and if not then add it as a new name                          nvardim n_elements vardimnames              nvardims ivar nvardim                          thisvardims intarr nvardim                           for i 0 nvardim 1 do begin                                  dimname vardimnames i                                     first see if dimname has leading                     if so  strip it  but record the fact that UNLIMITED                   is wanted                 unlimited    strmid dimname 0 1  eq                   if unlimited then dimname strmid dimname 1                                   if ndim gt 0 then begin                     match where dimnames eq dimname nmatch                      case nmatch of                         0: begin                               no match   append to array                             dimnames dimnames dimname                              vardim ndim                             ndim ndim 1                         end                         1: begin                               match found   point to it                             vardim match 0                          end                         else: stop Duplicate match: BUG in NCDF_QUICK_HELPER1                      endcase                 endif else begin                       no dimensions known   this is the first                     ndim 1                     dimnames dimname                      vardim 0    for completeness                  endelse                                  if unlimited then begin                     if  dimunlim ge 0                            and dimunlim ne vardim  then begin                         message NCDF dimensions  dimnames dimunlim                                       and  dimnames vardim                                       cannot both be of UNLIMITED size                               noname                                             endif                     dimunlim vardim                 endif                                  thisvardims i vardim                              endfor                         vardims ivar ptr_new thisvardims                      end         else: message Parse error: variable specification  varspec                             has stray  noname     endcase          if varnameidl eq   then varnameidl varname          varnames ivar varname     varnamesidl ivar varnameidl endfor        now construct some commands  which  when executed at the top level  will   put IDL variable size information into the structure   commands  structname varsizes string indgen nvar                ptr_new size varnamesidl        now some more commands  to tell the main level to copy the attributes   into a heap location where the next helper routine will see them   if globattflag then     commands commands structname globatts ptr_new globattnameidl   for ivar 0 nvar 1 do begin     if varattflags ivar  then begin         commands commands                      structname varatts string ivar                       ptr_new varattnamesidl ivar      endif       endfor      second argument comes back with a structure which contains all the   information  and also some variables to be used by next helper routine    ncdfstruct ncommands:          n_elements commands                commands:           ptr_new commands                    nvar:               nvar                                varnames:           varnames                            varids:             intarr nvar                         nvardims:           nvardims                            vardims:            vardims                             varnamesidl:        varnamesidl                         varsizes:           ptrarr nvar                         varatts:            ptrarr 1 nvar                       varattflags:        varattflags                         varattnamesidl:     varattnamesidl                      globatts:           ptr_new                            globattflag:        globattflag                         globattnameidl:     globattnameidl                      ndim:               ndim                                dimnames:           dimnames                            dimids:             intarr ndim 1                       dimunlim:           dimunlim                            fileid:             0   end"); 
     118a[116] = new Array("./ReadWrite/idl-NetCDF/ncdf_quickwrite/ncdf_quickwrite_helper2.html", "ncdf_quickwrite_helper2.pro", "", "    HELPER2   Constructs the commands which are actually needed to write the NetCDF file         this file contains:  STR  ncdf_quickwrite_typename  ncdf_quickwrite_helper2  compile_opt hidden      _STR   like STRING  but with no whitespace      we use this function enough to give it a short name  but the underscore   is to make it unlikely to conflict with a user s function       file_comments        categories        param STRING   String to be split  Contains text after in  out token on output          returns        restrictions        examples          history        version    Id: ncdf_quickwrite_helper2 pro 163 2006 08 29 12:59:46Z navarro       function _str string return strcompress string remove_all  end         file_comments        categories        param NUM        param NAME type string    It is a string giving the name of the file to be opened  If NAME does not contain   the separating character of directories   under unix for example  the file   will be looked for in the current directory          returns        restrictions        examples          history        version    Id: ncdf_quickwrite_helper2 pro 163 2006 08 29 12:59:46Z navarro       function ncdf_quickwrite_typename num name on_error 2     translate type number returned from  size  function into name usable by   ncdf routines     if not valid type  throw an error  and use  name  in informational   message if set     case num of            usable types     1: type byte      2: type short      3: type long      4: type float      5: type double                 other types: set to something appropriate      7: type char    string     12: type long    unsigned     13: type long    unsigned long     14: type float    64 bit integer     15: type float    64 bit integer          else: begin         if num eq 0 then gripe undefined            else gripe not of valid type for a NetCDF file                   if n_params  eq 1 then name Data item                   message name  is  gripe noname              end      endcase  return type  end         file_comments        categories        param NCFILENAME        param S   The string to be searched      param SNAME         returns        restrictions        examples          history        version    Id: ncdf_quickwrite_helper2 pro 163 2006 08 29 12:59:46Z navarro        pro ncdf_quickwrite_helper2 ncfilename s sname   on_error 2 compile_opt hidden    NB main structure is called  s    we use it so much that anything longer   could get tedious      start with no commands   in fact  1  is an error condition s ncommands 1   free commands written by helper1 from heap ptr_free s commands  dimsize lonarr s ndim   1     1  stops error if all fields scalar  types strarr s nvar      first of all  work out dimension sizes     for ivar 0 s nvar 1 do begin          nvardim s nvardims ivar           sizeinfo s varsizes ivar           ntype sizeinfo sizeinfo 0 1           types ivar          ncdf_quickwrite_typename ntype IDL expression  s varnamesidl ivar                                 for NCDF variable  s varnames ivar           if nvardim ne sizeinfo 0  then          message NCDF variable  s varnames ivar  is defined with                    _str s nvardims ivar  dimension s                      but corresponding                       IDL expression  s varnamesidl ivar  has                    _str sizeinfo 0  dimension s noname          if nvardim ne 0 then begin   not scalar                  for ivardim 0 nvardim 1 do begin                          idim s vardims ivar ivardim              wanted sizeinfo 1 ivardim              previous dimsize idim                           if previous ne 0 and previous ne wanted then                 message NCDF dimension  s dimnames idim                             is multiply used  but with conflicting sizes:                            _str previous  and  _str wanted                   noname                          dimsize idim wanted                      endfor              endif          endfor      make commands to write the file       to open the file if n_elements ncfilename  eq 0 then ncfilename idl nc  if strmid ncfilename 0 1  eq   then begin     ncfilename1 strmid ncfilename 1      clobstr clobber  endif else begin     ncfilename1 ncfilename     clobstr  endelse commands sname fileid ncdf_create ncfilename1 clobstr     to do the dimensions for idim 0 s ndim 1 do begin          if idim eq s dimunlim then sizestr unlimited        else sizestr _str dimsize idim           commands commands                  sname dimids _str idim ncdf_dimdef sname                   fileid s dimnames idim sizestr  endfor    to do the variables for ivar 0 s nvar 1 do begin          if s nvardims ivar  eq 0 then dimstr        else dimstr sname dimids strjoin _str s vardims ivar           commands commands                  sname varids _str ivar ncdf_vardef sname                   fileid s varnames ivar                  dimstr types ivar  endfor    to do the global attributes  if s globattflag then begin          tags tag_names s globatts      ntags n_elements tags           for itag 0 ntags 1 do begin         sizeinfo size s globatts itag          type ncdf_quickwrite_typename sizeinfo sizeinfo 0 1                   commands commands                       ncdf_attput sname fileid global                       strlowcase tags itag                        s globattnameidl tags itag type      endfor      endif          to do the variable attributes  for ivar 0 s nvar 1 do begin     if s varattflags ivar  then begin              tags tag_names s varatts ivar          ntags n_elements tags               for itag 0 ntags 1 do begin             sizeinfo size s varatts ivar itag              type ncdf_quickwrite_typename sizeinfo sizeinfo 0 1                           commands commands                           ncdf_attput sname fileid                           sname varids _str ivar                           strlowcase tags itag s varattnamesidl ivar                           tags itag type          endfor     endif       endfor    to end the definition section commands commands ncdf_control sname fileid endef     to write the data for ivar 0 s nvar 1 do begin     commands commands                   ncdf_varput sname fileid sname varids _str ivar                   s varnamesidl ivar    endfor    close the file commands commands ncdf_close sname fileid      make commands available to main level s ncommands n_elements commands  s commands ptr_new commands   end "); 
     119a[117] = new Array("./ReadWrite/idl-NetCDF/ncdf_quickwrite/ncdf_quickwrite_helper3.html", "ncdf_quickwrite_helper3.pro", "", "     file_comments        categories        param S   The string to be searched         returns        restrictions        examples          history        version    Id: ncdf_quickwrite_helper3 pro 157 2006 08 21 09:01:50Z navarro       pro ncdf_quickwrite_helper3 s     Frees the variables in heap memory      on_error 2 compile_opt hidden    s is our ncdf structure  ptr_free s globatts ptr_free s varatts ptr_free s commands ptr_free s vardims ptr_free s varsizes ptr_free s varatts  end"); 
     120a[118] = new Array("./ReadWrite/idl-NetCDF/ncdf_quickwrite/ncdf_quickwrite_verbose.html", "ncdf_quickwrite_verbose.pro", "", ""); 
     121a[119] = new Array("./ReadWrite/idl-NetCDF/ncdf_read.html", "ncdf_read.pro", "", "     file_comments        categories        param FILENAME   The filename      param INFO   General info      param DINFO   Dimension info       param VINFO   Variable info      param GATTS   Global attributes      param VATTS   Variable attributes      param DATA   Data         returns        restrictions        examples          history        version    Id: ncdf_read pro 157 2006 08 21 09:01:50Z navarro       PRO ncdf_read filename info dinfo vinfo gatts vatts data                                                                                              general info                                 data        dimension info                     variable attributes         variable info         global attributes         read a NetCDF file         NB The data is read into a rather nasty combination of structures  arrays       and pointers  which is  unfortunately  necessary in order to cope with      the full generality of the data format   Here is the sort of syntax you      might use to get at elements of the returned data   cumbersome because      IDL doesn t support C type  a b  shorthand for  a b            INFO NDIMS          INFO NVARS          INFO NGATTS          INFO RECDIM            DINFO idim NAME          DINFO idim SIZE            VINFO ivar NAME          VINFO ivar NAME          VINFO ivar DATATYPE          VINFO ivar NDIMS          VINFO ivar NATTS          VINFO ivar DIM ivdim            GATTS NAME          GATTS DATATYPE          GATTS LENGTH          GATTS VALUES   or maybe   STRING GATTS VALUES            VATTS ivar iatt NAME          VATTS ivar iatt DATATYPE          VATTS ivar iatt LENGTH          VATTS ivar iatt VALUES   or maybe           STRING VATTS ivar iatt VALUES            DATA ivar   or maybe   DATA ivar idim1 idim2 idim3          compile_opt idl2  strictarrsubs       open file  id ncdf_open filename      info  info ncdf_inquire id      dimension info  dinfo replicate name: size:0L info ndims  for idim 0 info ndims 1 do begin     ncdf_diminq id idim name size   dinfo idim name name   dinfo idim size size endfor     variable info  vinfo replicate  name:                      datatype:                      ndims:0l  natts:0l                      dim:lonarr info ndims                     info nvars   for ivar 0 info nvars 1 do begin     var ncdf_varinq id ivar      vinfo ivar name var name     vinfo ivar datatype var datatype     vinfo ivar ndims var ndims     vinfo ivar natts var natts     vinfo ivar dim var dim endfor     global attributes  if info ngatts gt 0 then begin     gatts replicate name:                         datatype:                         length:0L                         values:ptr_new                        info ngatts      for iatt 0 info ngatts 1 do begin         name ncdf_attname id iatt global          gatts iatt name name         att ncdf_attinq id name global          gatts iatt length att length         gatts iatt datatype att datatype         ncdf_attget id name vals global         gatts iatt values ptr_new vals      endfor endif else begin       arbitary scalar value       an empty list would be sensible but IDL doesn t support it     gatts 1 endelse      variable attributes  vatts replicate ptr_new info nvars  for ivar 0 info nvars 1 do begin     if vinfo ivar natts gt 0 then begin         vatts ivar ptr_new replicate name:                                           datatype:                                           length:0L                                           values:ptr_new                                          vinfo ivar natts          for iatt 0 vinfo ivar natts 1 do begin             name ncdf_attname id ivar iatt               vatts ivar iatt name name             att ncdf_attinq id ivar name               vatts ivar iatt length att length              vatts ivar iatt datatype att datatype             ncdf_attget id ivar name vals              vatts ivar iatt values ptr_new vals          endfor     endif else begin         vatts ivar ptr_new 1            Pointer to arbitrary scalar   analogous to case of lack of           global attributes above   We could put a  here           instead  but try to be friendlier to code that might try           to dereference it      endelse endfor     data  data replicate ptr_new info nvars  for ivar 0 info nvars 1 do begin     ncdf_varget id ivar val     data ivar ptr_new val  endfor   end"); 
     122a[120] = new Array("./ReadWrite/idl-NetCDF/ncdf_struct.html", "ncdf_struct.pro", "", "     file_comments        categories        param FILENAME   The file s name       keyword NODATA        keyword NOATTRIBUTES         returns        restrictions        examples          history        version    Id: ncdf_struct pro 157 2006 08 21 09:01:50Z navarro       FUNCTION ncdf_struct filename nodata nodata noattributes noattributes     Read entire netcdf file into a structure       Structure contains metadata  actual array contents are on heap  with   pointers contained in the structure   Heap variables not created if    nodata  specified      Use ncdf_struct_free to free heap memory       Some data is duplicated for ease of access  in particular if there is   a variable name matching a dimension name  then a pointer to the variable   contents is accessible via the substructures corresponding to the dimension   and every other variable that uses it      Alan Iwi 27 6 02       compile_opt idl2  strictarrsubs    id ncdf_open filename   g ncdf_inquire id  ndim g ndims nvar g nvars natt g ngatts  if ndim gt 0 then begin     dnames strarr ndim      dsizes lonarr ndim      for idim 0 ndim 1 do begin         ncdf_diminq id idim dname dsize         dnames idim dname         dsizes idim dsize     endfor endif  if natt gt 0 and not keyword_set noattributes  then begin     anames strarr natt      for iatt 0 natt 1 do begin         aname ncdf_attname id global iatt          ainq ncdf_attinq id global aname          ncdf_attget id global aname aval         if  ainq datatype eq  CHAR  then aval string aval          if iatt eq 0 then begin             atts create_struct aname aval          endif else begin             atts create_struct atts aname aval          endelse         anames iatt aname     endfor     g create_struct g gatts atts gattnames anames  endif  if nvar gt 0 then begin     vnames strarr nvar      for ivar 0 nvar 1 do begin         v ncdf_varinq id ivar                   vname v name         vndim v ndims         vnatt v natts         vname v name                  if vnatt gt 0 and not keyword_set noattributes  then begin             vanames strarr vnatt              for iatt 0 vnatt 1 do begin                 aname ncdf_attname id ivar iatt                  ainq ncdf_attinq id ivar aname                  ncdf_attget id ivar aname aval                 if  ainq datatype eq  CHAR  then aval string aval                  if iatt eq 0 then begin                     atts create_struct aname aval                  endif else begin                     atts create_struct atts aname aval                  endelse                 vanames iatt aname             endfor             v create_struct v atts atts attnames anames          endif                  vdnames dnames v dim          vdsizes dsizes v dim          v create_struct v dimnames vdnames dimsizes vdsizes                   if not keyword_set nodata  then begin             ncdf_varget id ivar vdata             v create_struct v data ptr_new vdata                                 dimdata replicate ptr_new vndim          endif                  if ivar eq 0 then begin             vars create_struct vname v          endif else begin             vars create_struct vars vname v          endelse                  vnames ivar vname         endfor endif  if ndim gt 0 then begin     for idim 0 ndim 1 do begin         dname dnames idim          d name:dname size:dsizes idim                   if not keyword_set nodata  and nvar gt 0 then begin             matchvar 1             for ivar 0 nvar 1 do begin                 if vnames ivar  eq dname then matchvar ivar             endfor             if matchvar ne  1 then                  d create_struct d data vars matchvar data          endif                  if idim eq 0 then begin             dims create_struct dname d          endif else begin             dims create_struct dims dname d          endelse              endfor     g create_struct g dims dims dimnames dnames dimsizes dsizes  endif  if nvar gt 0 then begin     if not keyword_set nodata  then begin         for ivar 0 nvar 1 do begin             for idim 0 vars ivar ndims 1 do begin                 vars ivar dimdata idim dims vars ivar dim idim data             endfor         endfor     endif     g create_struct g vars vars varnames vnames  endif       ncdf_close id  return g  end"); 
     123a[121] = new Array("./ReadWrite/idl-NetCDF/ncdf_struct_free.html", "ncdf_struct_free.pro", "", "     file_comments        categories        param S   The string to be searched         returns        restrictions        examples          history        version    Id: ncdf_struct_free pro 157 2006 08 21 09:01:50Z navarro       PRO ncdf_struct_free s     compile_opt idl2  strictarrsubs        free heap memory associated with struct returned by ncdf_struct    for i 0 s nvars 1 do ptr_free s vars i data  end"); 
     124a[122] = new Array("./ReadWrite/ncdf_timeget.html", "ncdf_timeget.pro", "", "           file_comments   get the time axis from a netcdf_file and transforms it in   Julian days of IDL       categories    Reading      param CDFID  in required    the ID of the ncdf_file  which is already open      param TIMEID  in required    the ID or the name of the variable which describe the calendar      keyword YYYYMMDD   active to obtain the date as a long integer with   the format YearYearYearYearMonthMonthDayDay      keyword _EXTRA   the keyword parameters of ncdf_varget      returns   a long array of IDL Julian days      restrictions   the calendar variable must have the units attribute   following the syntax bellow:     time_counter:units    seconds since 0001 01 01 00:00:00      time_counter:units    hours since 0001 01 01 00:00:00      time_counter:units    days since 1979 01 01 00:00:00      time_counter:units    months since 1979 01 01 00:00:00      time_counter:units    years since 1979 01 01 00:00:00         history Sebastien Masson  smasson lodyc jussieu fr                         June 2001    version  Id: ncdf_timeget pro 163 2006 08 29 12:59:46Z navarro           FUNCTION ncdf_timeget  cdfid  timeid  YYYYMMDD   yyyymmdd  _EXTRA   ex     compile_opt idl2  strictarrsubs       insidetime ncdf_varinq cdfid timeid     if insidetime natts NE 0 then begin       attnames   strarr insidetime natts        for attiq 0 insidetime natts 1 do attnames attiq strlowcase ncdf_attname cdfid timeid attiq     ENDIF ELSE return  report the variable  timeid  must have the units attribut    reading of the time axis    ncdf_varget  cdfid  timeid  time  _extra   ex     time_counter:units    seconds since 0001 01 01 00:00:00      time_counter:units    hours since 0001 01 01 00:00:00      time_counter:units    days since 1979 01 01 00:00:00      time_counter:units    months since 1979 01 01 00:00:00      time_counter:units    years since 1979 01 01 00:00:00         if  where attnames EQ  units 0  NE  1 then begin       ncdf_attget cdfid timeid units value       value   strtrim strcompress string value  2        words   str_sep value            unite   words 0        start   str_sep words 2          case strlowcase unite  of           seconds :time   julday start 1  start 2  start 0 time long 24 3600            hours :time   julday start 1  start 2  start 0 time long 24            days :time   julday start 1  start 2  start 0 time           months :BEGIN             for t   0  n_elements time 1  do begin                time t    julday start 1 time t  start 2  start 0              endfor          END           years :BEGIN             for t   0  n_elements time 1  do begin                time t    julday start 1  start 2  start 0 time t              endfor          END          ELSE:return  report bad syntax of the units attribut of the variable  timeid        ENDCASE    ENDIF ELSE return  report the variable  timeid  must have the units attribut     if keyword_set yyyymmdd  then time   jul2date time     return  time end"); 
     125a[123] = new Array("./ReadWrite/read_grads.html", "read_grads.pro", "", "           file_comments   reading grads file  except  data type station  or  grib    from the grads control file even if there is multiple data files       categories    Reading      param VAR  in required    the variable name      param DATE1  in required    date of the beginning  yyyymmdd if TIMESTEP is not activate       param DATE2  in optional    last date  Optional  if not specified date2 date1      keyword FILENAME   the grads control file name:  xxxx ctl       keyword TIMESTEP   to specify that the dates are time steps instead of true calendar        NOT yet available        keyword BOX  type A 4 or 6 elements 1d array   lon1 lon2 lat1 lat2  depth1  depth2    It specifies the area where data must be read      keyword EVERYTHING        keyword NOSTRUCT        keyword _EXTRA   Used to pass your keywords      returns   an array      uses    common      restriction   define all the grid parameters  defined in common pro    associated to the data       restrictions   this function call the procedure scanfile that use the   unix commands grep and sed      examples   IDL  a read_grads sst 19900101 19900131 filename outputs ctl    IDL  plt  a      history    Sebastien Masson  smasson lodyc jussieu fr       version    Id: read_grads pro 163 2006 08 29 12:59:46Z navarro              FUNCTION read_grads  var  date1  date2  FILENAME   filename  BOX box  TIMESTEP   timestep  EVERYTHING   everything  NOSTRUCT   nostruct  _EXTRA   ex       compile_opt idl2  strictarrsubs    cm_4mesh  cm_4data  cm_4cal   IF NOT keyword_set key_forgetold  THEN BEGIN  updatenew   ENDIF     we find the filename       filename   isafile FILENAME   filename  IODIRECTORY   iodir  _EXTRA   ex     if size filename   type  NE 7 then       return  report read_ncdf cancelled      we scan the control file called filename      scanctl  filename  filesname  jpt1file  varsname  varslev  swapbytes  bigendian  littleendian  f77sequential  fileheader  theader  xyheader  VARFMT   varfmt  _EXTRA   ex    if n_elements varfmt  EQ 0 then varfmt    float        check date1 and date2 and found the starting index  t1  and the   ending index  t2  that corresponds to the time series specified by   date1 and date2 for the time axis defined in the  ctl file         if n_elements date1  EQ 0 then begin       t0   0       t1   0    ENDIF    if n_elements date2  EQ 0 then date2   date1    if keyword_set timestep  then BEGIN       if date1 GT date2 then begin          print   date2 must be larger than date1           return   1       endif       t1   0   long date1   long date2   date2jul date2   grads        if jdate1 GT jdate2 then begin          print   date2 must be larger than date1           return   1       endif       t1    where time GE jdate1 0        tmp   where time LE jdate2  t2        t2   t2 1    ENDELSE    if t2 LT t1 then begin       print   There is no date between date1 and date2        return   1    endif    jpt2read   t2 t1 1       index of the variable        varid   where strlowcase varsname  EQ strlowcase var     varid   varid 0     if varid EQ  1 then begin       print  var  not found in the variable list of  filename       return    1    ENDIF    varname   var    if varslev varid  EQ 1 then res   fltarr jpi  jpj  jpt2read   nozero       ELSE res   fltarr jpi  jpj  varslev varid  jpt2read   nozero        find the first file to be read according to the file list  the   number of time step in each file and t1 and t2        indf2read   t1 jpt1file    startread   t1 indf2read jpt1file    alreadyread   0 readagain:    jpt2read1file   min jpt1file startread  jpt2read     f2read   filesname indf2read        opening       check the existence of the file    f2read   isafile filename   f2read  iodirectory   iodir  _EXTRA   ex    if the file is stored on tape    if  version os_family EQ  unix  then spawn   file  f2read     dev null    open the file    openr  unit  f2read   get_lun  error err         swap_if_little_endian   bigendian         swap_if_big_endian   littleendian         swap_endian   swapbytes    if err ne 0 then begin       print err_string       return   1    endif      case varfmt of        byte :fmtsz   1l        uint :fmtsz   2l        int :fmtsz   2l        long :fmtsz   4l        float :fmtsz   4l    endcase     check its size    addf77sec   long 4 2 f77sequential     xyblocsize   xyheader   addf77sec xyheader NE 0    jpi jpj fmtsz  addf77sec    nxybloc   long total varslev     filesize    fileheader   addf77sec fileheader NE 0         theader addf77sec theader NE 0    nxybloc xyblocsize jpt1file    infof2read fstat unit     if infof2read size NE filesize then begin       print   According to  filename  the file size must be  strtrim filesize  1  instead of  strtrim infof2read size  1        print   jpi:  strtrim jpi  2        print   jpj:  strtrim jpj  2        print   jpt:  strtrim jpt  2        print   format size in byte:  strtrim fmtsz  2        print   number of xy arrays:  strtrim nxybloc  2        return   1    endif       reading         loop on the time steps to be read in one file    for i   0  jpt2read1file 1 do begin   computing the offset       offset    fileheader   addf77sec fileheader NE 0            theader addf77sec theader NE 0    nxybloc xyblocsize startread i            theader addf77sec theader NE 0        if varid NE 0 THEN          offset   offset   long total varslev 0:varid 1 xyblocsize   if there is only one level       IF varslev varid  EQ 1 then begin          case varfmt of              byte :a assoc unit  bytarr jpi jpj nozero  offset 4 f77sequential               uint :a assoc unit uintarr jpi jpj nozero  offset 4 f77sequential               int :a assoc unit   intarr jpi jpj nozero  offset 4 f77sequential               long :a assoc unit  lonarr jpi jpj nozero  offset 4 f77sequential               float :a assoc unit fltarr jpi jpj nozero  offset 4 f77sequential           endcase          res    i alreadyread a 0        ENDIF ELSE BEGIN   more than 1 level to be read          if f77sequential then BEGIN   sequential access             case varfmt of                 byte :a assoc unit  bytarr jpi jpj 8  varslev varid nozero  offset                  uint :a assoc unit uintarr jpi jpj 4  varslev varid nozero  offset                  int :a assoc unit   intarr jpi jpj 4  varslev varid nozero  offset                  long :a assoc unit  lonarr jpi jpj 2  varslev varid nozero  offset                  float :a assoc unit fltarr jpi jpj 2  varslev varid nozero  offset              endcase             tmp   a 0              case varfmt OF   we cut the headers and tailers of f77 write                 byte : tmp   tmp 4:jpi jpj 3                    uint : tmp   tmp 2:jpi jpj 1                    int :  tmp   tmp 2:jpi jpj 1                    long : tmp   tmp 1:jpi jpj 0                    float :tmp   tmp 1:jpi jpj 0                endcase             if keyword_set key_zreverse  then res      i alreadyread reverse reform tmp   jpi  jpj  varslev varid   over  3  ELSE res      i alreadyread reform tmp   jpi  jpj  varslev varid   over           ENDIF ELSE BEGIN    direct acces             case varfmt of                 byte :a assoc unit  bytarr jpi jpj varslev varid nozero offset                  uint :a assoc unit uintarr jpi jpj varslev varid nozero offset                  int :a assoc unit   intarr jpi jpj varslev varid nozero offset                  long :a assoc unit  lonarr jpi jpj varslev varid nozero offset                  float :a assoc unit fltarr jpi jpj varslev varid nozero offset              endcase             if keyword_set key_zreverse  then res      i alreadyread reverse a 0  3  ELSE res      i alreadyread a 0           ENDELSE       ENDELSE    endfor     close the file    free_lun unit    close unit       do we need to read a new file to complete the time series          if jpt2read1file NE jpt2read then BEGIN       indf2read   indf2read 1       startread   0       alreadyread   alreadyread jpt2read1file       jpt2read   jpt2read jpt2read1file       GOTO  readagain    ENDIF       post processing        if keyword_set key_yreverse  then res   reverse res  2     if keyword_set key_shift  then begin       case  size res 0  of          2:res   shift res  key_shift  0           3:res   shift res  key_shift  0  0           4:res   shift res  key_shift  0  0  0        endcase    endif       mask     IF varslev varid  EQ 1 then begin        if abs valmask  LE 1e5 then notgood   where res    0  EQ valmask           ELSE notgood   where abs res    0  GE abs valmask 10         if notgood 0  NE  1 then tmask notgood    0b     ENDIF ELSE BEGIN        if abs valmask  LE 1e5 then notgood   where res      0  EQ valmask           ELSE notgood   where abs res      0  GE abs valmask 10         if notgood 0  NE  1 then tmask notgood    0b     ENDELSE    if abs valmask  LE 1e5 then notgood   where res EQ valmask       ELSE notgood   where abs res  GE abs valmask 10     if notgood 0  NE  1 THEN res notgood     values f_nan     valmask   1e20     if abs valmask  LE 1e5 then notgood   where res EQ valmask        ELSE notgood   where abs res  GE abs valmask 10      if notgood 0  NE  1 THEN res notgood    1e20     valmask   1e20    triangles_list   triangule      subdomain extraction      time arguments      time   time t1:t2     jpt   t2 t1 1    if keyword_set timestep  then vardate   strtrim time 0  2       ELSE vardate   date2string vairdate time 0        updateold       return  res end"); 
     126a[124] = new Array("./ReadWrite/read_oasis.html", "read_oasis.pro", "", "           file_comments   read the f77 unformatted files used in Oasis  version  a read_oasis grids_orca_t106 a106 lon 320 160    IDL  m read_oasis masks_orca_t106 or1t msk 182 149 i4      see also IDL  scanoasis grids_orca_t106       history Sebastien Masson  smasson lodyc jussieu fr                         July 01  2002    version  Id: read_oasis pro 163 2006 08 29 12:59:46Z navarro             FUNCTION read_oasis  filename  varname  jpi  jpj  I2   I2  I4   i4  I8   i8  R4   r4     compile_opt idl2  strictarrsubs       openr  unit  filename   f77_unformatted   get_lun   swap_if_little_endian         error err    if err ne 0 then begin       print err_string       return   1    endif     char8    12345678     readu  unit  char8     print  char8    found   char8 EQ varname     WHILE NOT EOF unit  AND found NE 1 DO BEGIN       readu  unit       if EOF unit  then begin          print  varname  not found in  filename          return   1       endif       readu  unit  char8        print  char8       found   char8 EQ varname    ENDWHILE    case 1 of       keyword_set i2 :res   intarr jpi  jpj        keyword_set i4 :res   lonarr jpi  jpj        keyword_set i8 :res   lon64arr jpi  jpj        keyword_set r4 :res   fltarr jpi  jpj        ELSE:res   dblarr jpi  jpj     endcase     readu  unit  res     free_lun unit     return  res end"); 
     127a[125] = new Array("./ReadWrite/readbat.html", "readbat.pro", "", "           file_comments   reading the bathymetry ASCII file of OPA      categories   For OPA      param FILENAME  in required type string    It contains the filename       keyword ZERO to put 0 on land instead of negatives values for the islands       returns a 2d array      history Sebastien Masson  smasson lodyc jussieu fr                         May 31  2002      based on batlec2 pro  written by Maurice Imbard  March 17  1998      version  Id: readbat pro 163 2006 08 29 12:59:46Z navarro       FUNCTION readbat  filename  ZERO   zero     compile_opt idl2  strictarrsubs              lecture de la bathymetrie         iname_file   findfile filename     if iname_file 0  EQ   then begin       print   Bad file name        return   1    ENDIF ELSE iname_file   iname_file 0     openr  iunit  iname_file   get_lun     readf  iunit  FORMAT    16x 2i8  iim  ijm     iim   long iim      ijm   long ijm     tmp        readf  iunit  tmp    tmp   strsplit tmp   extract     iim   long tmp n_elements tmp 2     ijm   long tmp n_elements tmp 1    print  iim  ijm    ifreq   40L    ifin    iim ifreq 1    irest   iim ifin 1 ifreq   print  ifin irest ifreq    zbati    intarr ifreq     zbati2   intarr irest     zbat      intarr iim ijm       readf  iunit  FORMAT        readf  iunit  FORMAT        il1   0    FOR jn   1  ifin 1 DO BEGIN       readf  iunit  FORMAT           readf  iunit  FORMAT           il2   min  iim 1  il1 ifreq 1          readf  iunit  FORMAT           readf  iunit  FORMAT           readf  iunit  FORMAT           il3   il2 jn 1 ifreq       iformat   string  il3 2   i3       print jn il1 il2 il3 ifreq 1       FOR jj    ijm 1  0   1  DO BEGIN          readf  iunit  FORMAT   iformat  ij  zbati          zbat il1:il2  jj    zbati       ENDFOR       il1   il1   ifreq    ENDFOR    readf  iunit  FORMAT        readf  iunit  FORMAT        il2   min  iim 1  il1 ifreq 1       readf  iunit  FORMAT        readf  iunit  FORMAT        readf  iunit  FORMAT        il3   il2 ifin 1 ifreq    iformat   string  il3 2   i3       print  irest 1 il1 il2 il3    FOR jj    ijm 1  0   1  DO BEGIN       readf  iunit  FORMAT   iformat  ij  zbati2       zbat il1:il2  jj    zbati2    ENDFOR    close  iunit    free_lun  iunit         if keyword_set zero  then zbat   0   zbat    return  zbat end"); 
     128a[126] = new Array("./ReadWrite/readoldopadistcoast.html", "readoldopadistcoast.pro", "", "           file_comments   read the old binary direct access file that contains the   distance to the coast in OPA    based on the OPA subroutines dtacof and parctl      categories    For OPA      param UNIT        param PARAMS          param NUM         returns     a structure that contains two elements: tdistcoast  the   distance for the t points  and fdiscoast  the distance for the   f points       history Sebastien Masson  smasson lodyc jussieu fr                         June  2002    version  Id: readoldopadistcoast pro 157 2006 08 21 09:01:50Z navarro            FUNCTION read3fromopa  unit  params  num     compile_opt idl2  strictarrsubs      offset params reclen params jpk num 1L     a assoc unit dblarr params jpiglo params jpjglo params jpk nozero offset     b   a 0     return  b end       file_comments        categories   For OPA      param FILENAME  in required    Filename  with the whole path if necessary       param JPIGLO  in required         param JPJGLO  in required         param JPK  in required    Dimensions of the opa grid      keyword IBLOC  default 4096L    Ibloc size       keyword JPBYT  default 8L    Jpbyt size       keyword NUMREC  default 19L jpk    Number of records in the file       history   Sebastien Masson  smasson lodyc jussieu fr                         June  2002      version    Id: readoldopadistcoast pro 157 2006 08 21 09:01:50Z navarro     FUNCTION readoldopadistcoast  filename  jpiglo  jpjglo  jpk  IBLOC   ibloc  JPBYT   jpbyt  NUMREC   numrec       compile_opt idl2  strictarrsubs      iname_file   findfile filename     if iname_file 0  EQ   then begin       print   Bad file name        return   1    ENDIF ELSE iname_file   iname_file 0    open the file    openr numcost   iname_file   get_lun   swap_if_little_endian   check the size of the file    filepamameters   fstat numcost    default parameter definition for ORCA2    IF keyword_set ibloc  THEN ibloc   long ibloc  ELSE ibloc   4096L    jpiglo   long jpiglo     jpjglo   long jpjglo     jpk   long jpk     IF keyword_set jpbyt  THEN jpbyt   long jpbyt  ELSE jpbyt   8L   record length computation    reclen   ibloc jpiglo jpjglo jpbyt 1  ibloc 1    number of records    IF keyword_set numrec  THEN numrec   long numrec  ELSE numrec   3L jpk   difference between the record length and the size of the contened   array     toomuch   reclen jpiglo jpjglo jpbyt   expected size computation    size   numrec reclen toomuch    if size NE filepamameters size then begin       print   The size of the file is not the expected one        print   Check your file or the values of ibloc  jpiglo        print   jpjglo  jpk  jpbyt  numrec in this program        return   1    endif   first record: six 64 bit integer to read    default definition    iimlu   long64 999     ijmlu   long64 999     ikmlu   long64 999    read    readu  numcost  iimlu  ijmlu  ikmlu    if iimlu NE jpiglo then begin       print   iimlu    strtrim iimlu  1  differs from jpiglo  strtrim jpiglo  1        return   1    endif    if ijmlu NE jpjglo then begin       print   ijmlu    strtrim ijmlu  1  differs from jpjglo  strtrim jpjglo  1        return   1    endif    if ikmlu NE jpk then begin       print   ikmlu    strtrim ikmlu  1  differs from jpk  strtrim jpk  1        return   1    endif   other records    params    jpiglo:jpiglo  jpjglo:jpjglo  jpk:jpk  reclen:reclen     tdistcoast   read3fromopa numcost  params  2     fdistcoast   read3fromopa numcost  params  3       close  numcost    free_lun  numcost     return   tdistcoast:tdistcoast  fdistcoast:fdistcoast  end"); 
     129a[127] = new Array("./ReadWrite/readoldoparestart.html", "readoldoparestart.pro", "", "             categories   For OPA      param UNIT        param PARAMS          param NUM         restrictions    bug for etab and etan written on the same record       history Sebastien Masson  smasson lodyc jussieu fr                         June 2002    version  Id: readoldoparestart pro 163 2006 08 29 12:59:46Z navarro             FUNCTION read2fromopa  unit  params  num     compile_opt idl2  strictarrsubs      offset params reclen params jpk num 1L     a assoc unit dblarr params jpiglo params jpjglo nozero offset     return  a 0  end      categories   For OPA      param UNIT        param PARAMS          param NUM         history Sebastien Masson  smasson lodyc jussieu fr                         June 2002   FUNCTION read3fromopa  unit  params  num     compile_opt idl2  strictarrsubs      offset params reclen params jpk num 1L     a assoc unit dblarr params jpiglo params jpjglo params jpk nozero offset     return  a 0  end       file_comments   read the old restart files of OPA  before NetCDF    based on the OPA subroutine dtrlec included at the end of the file       categories    For OPA      param FILENAME  in required    with the whole path if necessary      param JPIGLO  in required           param JPJGLO  in required           param JPK  in required    dimensions of the opa grid      keyword IBLOC  default 4096L     Ibloc size       keyword JPBYT  default 8L    Jpbyt size       keyword NUMREC  default 19L jpk     Number of records in the file       keyword UB          keyword VB          keyword TB          keyword SB          keyword ROTB          keyword HDIVB          keyword UN          keyword VN          keyword TN          keyword SN          keyword ROTN          keyword HDIVN          keyword GCX          keyword GCXB          keyword ETAB          keyword ETAN          keyword BSFB          keyword BSFN          keyword BSFD          keyword EN   the variable we want to read       returns    According to the given keywords        restrictions    Bug for etab and etan written on the same record       history    Sebastien Masson  smasson lodyc jussieu fr                         June 2002       version    Id: readoldoparestart pro 163 2006 08 29 12:59:46Z navarro      PRO readoldoparestart  filename  jpiglo  jpjglo  jpk  IBLOC   ibloc  JPBYT   jpbyt  NUMREC   numrec  ub   ub  vb   vb  tb   tb  sb   sb  rotb   rotb  hdivb   hdivb  un   un  vn   vn  tn   tn  sn   sn  rotn   rotn  hdivn   hdivn  gcx   gcx  gcxb   gcxb  etab   etab  etan   etan  bsfb   bsfb  bsfn   bsfn  bsfd   bsfd  en   en       compile_opt idl2  strictarrsubs      iname_file   findfile filename     if iname_file 0  EQ   then begin       print   Bad file name        return    ENDIF ELSE iname_file   iname_file 0    open the file    openr numrst   iname_file   get_lun   swap_if_little_endian   check the size of the file    filepamameters   fstat numrst    parameter definition    IF keyword_set ibloc  THEN ibloc   long ibloc  ELSE ibloc   4096L    jpiglo   long jpiglo     jpjglo   long jpjglo     jpk   long jpk     IF keyword_set jpbyt  THEN jpbyt   long jpbyt  ELSE jpbyt   8L   record length computation    reclen   ibloc jpiglo jpjglo jpbyt 1  ibloc 1     IF keyword_set numrec  THEN numrec   long numrec  ELSE numrec   19L jpk    toomuch   reclen jpiglo jpjglo jpbyt   expected size computation    size   numrec reclen toomuch    if size NE filepamameters size then begin       print   The size of the file is not the expected one        print   Check your file or the values of ibloc  jpiglo        print   jpjglo  jpk  jpbyt  numrec in this program        return    endif   first record: six 64 bit integer to read    default definition    ino1   long64 9999     it1   long64 9999     isor1   long64 9999     ipcg1   long64 9999     itke1   long64 9999     idast1   long64 9999    read    readu  numrst  ino1  it1  isor1  ipcg1  itke1  idast1    print  ino1  it1  isor1  ipcg1  itke1  idast1   other records    params    jpiglo:jpiglo  jpjglo:jpjglo  jpk:jpk  reclen:reclen         CALL read3 numrst ub    2      IF arg_present ub  THEN ub   read3fromopa numrst  params  2         CALL read3 numrst vb    3      IF arg_present vb  THEN vb   read3fromopa numrst  params  3         CALL read3 numrst tb    5      IF arg_present tb  THEN tb   read3fromopa numrst  params  5         CALL read3 numrst sb    6      IF arg_present sb  THEN sb   read3fromopa numrst  params  6         CALL read3 numrst rotb  7      IF arg_present rotb  THEN rotb   read3fromopa numrst  params  7         CALL read3 numrst hdivb 8      IF arg_present hdivb  THEN hdivb   read3fromopa numrst  params  8         CALL read3 numrst un    9      IF arg_present un  THEN un   read3fromopa numrst  params  9         CALL read3 numrst vn    10     IF arg_present vn  THEN vn   read3fromopa numrst  params  10         CALL read3 numrst tn    12     IF arg_present tn  THEN tn   read3fromopa numrst  params  12         CALL read3 numrst sn    13     IF arg_present sn  THEN sn   read3fromopa numrst  params  13         CALL read3 numrst rotn  14     IF arg_present rotn  THEN rotn   read3fromopa numrst  params  14         CALL read3 numrst hdivn 15     IF arg_present hdivn  THEN hdivn   read3fromopa numrst  params  15   C  C   Read elliptic solver arrays  C        CALL read2 numrst gcx  jpk 17     IF arg_present gcx  THEN gcx   read2fromopa numrst  params  17         CALL read2 numrst gcxb jpk 18     IF arg_present gcxb  THEN gcxb   read2fromopa numrst  params  18   C  ifdef key_freesurf_cstvol  C  C   free surface formulation  eta   C        CALL read2 numrst etab  jpk 4      IF arg_present etab  THEN etab   read2fromopa numrst  params  4         CALL read2 numrst etan  jpk 4      IF arg_present etan  THEN etan   read2fromopa numrst  params  4     else  C  C   Rigid lid formulation  bsf   C        CALL read2 numrst bsfb  jpk 4      IF arg_present bsfb  THEN bsfb   read2fromopa numrst  params  4         CALL read2 numrst bsfn  jpk 11     IF arg_present bsfn  THEN bsfn   read2fromopa numrst  params  11         CALL read2 numrst bsfd  jpk 16     IF arg_present bsfd  THEN bsfd    read2fromopa numrst  params  16   endif  ifdef key_zdftke            CALL read3 numrst en 19     IF arg_present en  THEN en   read3fromopa numrst  params  19        close  numrst    free_lun  numrst     return end     CDIR  LIST        SUBROUTINE dtrlec  CCC   CCC  CCC                       ROUTINE dtrlec  CCC                        CCC  CCC  Purpose :  CCC     CCC     Read files for restart  CCC  CC   Method :  CC      CC      Read the previous fields on the file numrst  CC      the first record indicates previous characteristics  CC      after control with the present run  we read :  CC        prognostic variables on the second record  CC        elliptic solver arrays  CC  barotropic stream function arrays  default option   CC   or free surface arrays  key_freesurf_cstvol  defined   CC        tke arrays  key_zdftke  defined   CC      for this last three records   the previous characteristics  CC      could be different with those used in the present run   CC  CC   Input :  CC      CC      common  CC             comrst           : restart parameter  CC             comctl           : parameters for the control  CC  CC   Output :  CC      CC      common  CC             combef           : previous fields  before   CC             comnow           : present fields  now   CC             combsf           : barotropic stream function  CC             comspg           : surface pressure  CC             comsol           : diagonal preconditioned conjugate  CC  CC   Modifications :  CC      CC      original  : 91 03    CC      additions : 92 01  M  Imbard   CC                : 92 06 correction restart file  M  Imbard   CC                : 98 02  M  Guyon  FETI method  CC      addition  : 98 05  G  Roullet  free surface  CC   CC parameters and commons  CC    CDIR  NOLIST  include  parameter h   include  common h   CDIR  LIST  CC   CC local declarations  CC          INTEGER ji  jj  jk  jl        INTEGER ino0  it0  ipcg0  isor0  itke0        INTEGER ino1  it1  isor1  ipcg1  itke1  idast1  CC   CC statement functions  CC    CDIR  NOLIST  include  stafun h   CDIR  LIST  CCC   CCC  OPA8  LODYC  1997   CCC   C  C  C 0  Initialisations  C    C        ino0    no        it0     nit000        ipcg0   0        isor0   0        itke0   0        isor0   nsolv 1        ipcg0   2 nsolv  ifdef key_zdftke        itke0   1  endif  C FETI method        IF  nsolv  EQ  3  THEN            isor0 2            ipcg0 2        ENDIF  C        IF lwp  THEN            WRITE numout                 WRITE numout      dtrlec:  beginning of restart             WRITE numout                 WRITE numout    the present run :             WRITE numout      job number :   no            WRITE numout      with nit000 :   nit000            WRITE numout      with pcg option ipcg0 :   ipcg0            WRITE numout      with sor option isor0 :   isor0            WRITE numout      with FETI solver option ipcg0   isor0 :                  ipcg0     isor0            WRITE numout      with tke option itke0 :   itke0        ENDIF  C  C 1  Read numrst  C    C  C   First record  C        READ numrst REC 1  ino1  it1  isor1  ipcg1  itke1  idast1  C        IF lwp  THEN            WRITE numout                 WRITE numout    READ numrst with              WRITE numout      job number :   ino1            WRITE numout      with time step it :   it1            WRITE numout      with pcg option ipcg1 :   ipcg1            WRITE numout      with sor option isor1 :   isor1            WRITE numout      with tke option itke1 :   itke1            WRITE numout      with FETI solver option ipcg1   isor1 :                  ipcg1   isor1            WRITE numout             ENDIF  C  C   Control of date  C        IF    it0 it1 NE 1  AND  abs nrstdt EQ 1   THEN            IF lwp  THEN                WRITE numout      : problem with nit000 for the                       restart                 WRITE numout                                                                           WRITE numout    we stop  verify the file                 WRITE numout    or rerun with the value  0 for the                 WRITE numout    control of time parameter  nrstdt                 WRITE numout                 ENDIF            STOP  dtrlec         ENDIF        IF   nrstdt EQ 1   ndate0   idast1  C  C   Read prognostic variables  C        CALL read3 numrst ub    2          CALL read3 numrst vb    3          CALL read3 numrst tb    5          CALL read3 numrst sb    6          CALL read3 numrst rotb  7          CALL read3 numrst hdivb 8          CALL read3 numrst un    9          CALL read3 numrst vn    10         CALL read3 numrst tn    12         CALL read3 numrst sn    13         CALL read3 numrst rotn  14         CALL read3 numrst hdivn 15   C  C   Read elliptic solver arrays  C        CALL read2 numrst gcx  jpk 17         CALL read2 numrst gcxb jpk 18   C  ifdef key_freesurf_cstvol  C  C   free surface formulation  eta   C        CALL read2 numrst etab  jpk 4          CALL read2 numrst etan  jpk 4      else  C  C   Rigid lid formulation  bsf   C        CALL read2 numrst bsfb  jpk 4          CALL read2 numrst bsfn  jpk 11         CALL read2 numrst bsfd  jpk 16   endif  C  ifdef key_zdftke  C  C   Read tke arrays  C        IF itke1 eq 1  THEN            CALL read3 numrst en 19         ELSE            IF lwp  THEN                WRITE numout      : the previous restart file                       didnt used  tke scheme                 WRITE numout                                  ENDIF            nrstdt 2        ENDIF  endif  C  C        RETURN        END"); 
     130a[128] = new Array("./ReadWrite/scanctl.html", "scanctl.pro", "", "     file_comments   GLAMBOUNDARY 2 elements vector   lon1 lon2  the longitude   boundaries that should be used to visualize the data     lon2   lon1    lon2   lon1 le 360   key_shift will be defined according to GLAMBOUNDARY       version  Id: scanctl pro 136 2006 07 10 15:20:19Z pinsard     PRO scanctl  filename  filesname  jpt1file  varsname  varslev  swapbytes  bigendian  littleendian  f77sequential  fileheader  theader  xyheader  VARFMT   varfmt  _EXTRA   ex     compile_opt idl2  strictarrsubs    common     time1   systime 1              for key_performance      DTYPE      spawn   grep  i  DTYPE   filename  notgood    if keyword_set notgood  then begin       print   This program is not adapted to data type station or grib  Sorry        stop    endif     UNDEF  define valmask      spawn   grep  i  UNDEF   filename  valmask    valmask   strtrim valmask  2     valmask   strsplit valmask 0 extract     valmask   float valmask 1      Headers      spawn   grep  i  FILEHEADER   filename  fileheader    fileheader   strtrim fileheader  2     if keyword_set fileheader  then BEGIN       fileheader   strsplit fileheader 0 extract        fileheader   long fileheader 1     ENDIF ELSE fileheader   0L    spawn   grep  i  THEADER   filename  theader    theader   strtrim theader  2     if keyword_set theader  then BEGIN       theader   strsplit theader 0 extract        theader   long theader 1     ENDIF ELSE theader   0L    spawn   grep  i  XYHEADER   filename  xyheader    xyheader   strtrim xyheader  2     if keyword_set xyheader  then BEGIN       xyheader   strsplit xyheader 0 extract        xyheader   long xyheader 1     ENDIF ELSE xyheader   0L       find the x axis        spawn   sed  n  e  d   e  Xx Dd Ee Ff Yy Dd Ee Ff p   filename  xdef    if xdef 0  EQ   then BEGIN       print   Bad definition of xdef or ydef        stop    ENDIF    xdef   xdef 0:n_elements xdef 2     if n_elements xdef  NE 1 then begin       xdef    byte xdef  replicate byte   1 n_elements xdef        xdef   xdef where xdef NE 0        xdef   string xdef     endif    xdef   strtrim xdef 0  2     xdef   strsplit xdef extract     jpi   long xdef 1     case strupcase xdef 2  of        LINEAR :xaxis   float xdef 3 findgen jpi float xdef 4         LEVELS :xaxis   float xdef 3:n_elements xdef 1     ENDCASE       find the y axis        spawn   sed  n  e  d   e  Yy Dd Ee Ff Zz Dd Ee Ff p   filename  ydef    if ydef 0  EQ   then BEGIN       print   Bad definition of ydef or zdef        stop    ENDIF    ydef   ydef 0:n_elements ydef 2     if n_elements ydef  NE 1 then begin       ydef    byte ydef  replicate byte   1 n_elements ydef        ydef   ydef where ydef NE 0        ydef   string ydef     endif    ydef   strtrim ydef 0  2     ydef   strsplit ydef extract     jpj   long ydef 1     case strupcase ydef 2  of        LINEAR :yaxis   float ydef 3 findgen jpj float ydef 4         LEVELS :yaxis   float ydef 3:n_elements ydef 1      GAUST62 :BEGIN   print   Not yet coded    stop   END     GAUSR15 :BEGIN   print   Not yet coded    stop   END     GAUSR20 :BEGIN   print   Not yet coded    stop   END     GAUSR30 :BEGIN   print   Not yet coded    stop   END     GAUSR40 :BEGIN   print   Not yet coded    stop   END    ELSE:BEGIN   print   Not yet coded    stop   END    endcase       find the z axis        spawn   sed  n  e  d   e  Zz Dd Ee Ff Tt Dd Ee Ff p   filename  zdef    if zdef 0  EQ   then BEGIN       print   Bad definition of zdef or tdef        stop    ENDIF    zdef   zdef 0:n_elements zdef 2     if n_elements zdef  NE 1 then begin       zdef    byte zdef  replicate byte   1 n_elements zdef        zdef   zdef where zdef NE 0        zdef   string zdef     endif    zdef   strtrim zdef 0  2     zdef   strsplit zdef extract     jpk   long zdef 1     case strupcase zdef 2  of        LINEAR :zaxis   float zdef 3 findgen jpk float zdef 4         LEVELS :zaxis   float zdef 3:n_elements zdef 1     ENDCASE       compute the grid        computegrid  xaxis   xaxis  yaxis   yaxis  zaxis   zaxis  _EXTRA   ex    domdef       find the time axis        spawn   grep  i  TDEF   filename  timedef    timedef   strupcase strtrim timedef  2     timedef   strsplit timedef 0 extract     jpt   long timedef 1      initial date: y0  m0  d0  h0  mn0                 Julian day of IDL: julday m0  d0  y0  h0  mn0  00       t0   timedef 3     monthsname   string format C CMOA 31 indgen 12     case 1 OF   h h :mmZd d mmmyy yy        strpos t0   :  NE  1:BEGIN          pp   strpos t0   :           h0   long strmid t0  0  pp           mn0   long strmid t0  pp 1  2           pp   strpos t0   Z           dd   byte strmid t0  pp 2  1  LT byte A           d0   long strmid t0  pp 1  1 dd           m0    where monthsname EQ strmid t0  pp 2 dd  3 0 1          y0   long strmid t0  pp 5 dd        END   m m Zd d mmmyy yy        strpos t0   Z  NE  1:BEGIN          h0   0 12          pp   strpos t0   Z           mn0   long strmid t0  0  pp           dd   byte strmid t0  pp 2  1  LT byte A           d0   long strmid t0  pp 1  1 dd           m0    where monthsname EQ strmid t0  pp 2 dd  3 0 1          y0   long strmid t0  pp 5 dd        END   d d mmmyy yy         byte strmid t0  0  1  LT byte A 0 :BEGIN          h0   0 12          mn0   0          dd   byte strmid t0  1  1  LT byte A           d0   long strmid t0  0  1 dd           m0    where monthsname EQ strmid t0  1 dd  3 0 1          y0   long strmid t0  4 dd        END   mmmyy yy        ELSE:BEGIN          h0   0 12          mn0   0          d0   1          m0    where monthsname EQ strmid t0  0  3 0 1          y0   long strmid t0  3        END    ENDCASE   if y0 is a two digit integer   between 1950 and 2049    case 1 of       y0 LE 49:y0   2000 y0       y0 LE 99:y0   1900 y0       ELSE:    ENDCASE     increment date and definition of the calendar with IDL Julian days      tstep   timedef 4     tsval   long strmid tstep 0  strlen tstep 2     case strlowcase strmid tstep  1   reverse  of        mn :time   julday m0  d0  y0  h0  mn0 lindgen jpt tsval  0         hr :time   julday m0  d0  y0  h0 lindgen jpt tsval  mn0  0         dy :time   julday m0  d0 lindgen jpt tsval  y0  h0  mn0  0         mo :time   julday m0 lindgen jpt tsval  d0  y0  h0  mn0  0         yr :time   julday m0  d0  y0 lindgen jpt tsval  h0  mn0  0     ENDCASE                          shit the calendar to correspond to the time step     case strlowcase strmid tstep  1   reverse  of        dy :time   long time         mo :time   long time 14L        yr :time   long time 365L 2       ELSE:    endcase     OPTIONS      spawn   grep  i  OPTIONS   filename  options    options   strtrim options  2     options   strlowcase options 0     key_yreverse   strpos options   yrev  NE  1    key_zreverse   strpos options   zrev  EQ  1    multifiles   strpos options   template  NE  1    f77sequential   strpos options   sequential  NE  1    swapbytes   strpos options   byteswapped  NE  1    bigendian   strpos options   big_endian  NE  1    littleendian   strpos options   little_endian  NE  1    cray   strpos options   cray_32bit_ieee  NE  1 IF cray THEN BEGIN   print   cray_32bit_ieee  Not yet coded    stop   ENDIF    cal365   strpos options   365_day_calendar  NE  1 IF cal365 THEN BEGIN   print   365_day_calenda  Not yet coded    stop   ENDIF       building the filesname        spawn   grep  i  DSET   filename  files    files   strtrim files 0  2     files   strsplit files extract     if n_elements files  NE 2 then begin       print   Bad definition of the filename  There should be 2 elements:        print   DEST and 1 filename  that may define many files        stop    endif    files   files 1      files   strmid files 0  strpos files 0     reverse_search 1     filesname   files    if keyword_set multifiles  then begin   minutes       if  stregex files i n2 0  NE  1 then begin          filetsep    mn           mnend   long mn0 jpt 1           tmp   strarr hend h0 1           for i   0  n_elements tmp 1 do tmp i    strjoin strsplit filesname i n2 extract regex  string mn0 i  format    i2 2           filesname   strjoin tmp          endif   hours       if  stregex files i hf 123 0  NE  1 then begin          filetsep    hr           case strlowcase strmid tstep  1   reverse  of              mn :hend   long h0 jpt mn0 1 1 60               hr :hend   long h0 jpt 1           endcase          tmp   strarr hend h0 1           case 1 of             stregex files i h1  NE  1:for i   0  n_elements tmp 1 do tmp i    strjoin strsplit filesname i h1 extract regex  strtrim h0 i  1              stregex files i h2  NE  1:for i   0  n_elements tmp 1 do tmp i    strjoin strsplit filesname i h2 extract regex  string h0 i  format    i2 2              stregex files f2  NE  1:for i   0  n_elements tmp 1 do tmp i    strjoin strsplit filesname f2 extract regex  string h0 i  format    i3 2              stregex files i hf 3  NE  1:for i   0  n_elements tmp 1 do tmp i    strjoin strsplit filesname i hf 3 extract regex  string h0 i  format    i3 3           endcase          filesname   strjoin tmp          endif   days       if  stregex files i d 12 0  NE  1 then begin          filetsep    dy           case strlowcase strmid tstep  1   reverse  of              mn :dend   long d0 jpt mn0 1 1 1440               hr :dend   long d0 jpt h0 1 1 24               dy :dend   long d0 jpt 1           endcase          tmp   strarr dend d0 1           case 1 of             stregex files i d1  NE  1:for i   0  n_elements tmp 1 do tmp i    strjoin strsplit filesname i d1 extract regex  strtrim d0 i  1              stregex files i d2  NE  1:for i   0  n_elements tmp 1 do tmp i    strjoin strsplit filesname i d2 extract regex  string d0 i  format    i2 2           endcase          filesname   strjoin tmp          endif   months       if  stregex files i m 12c 0  NE  1 then begin          filetsep    mo           tmp   strarr 12           case 1 of             stregex files i m1  NE  1:for i   1  12 do tmp i 1    strjoin strsplit filesname i m1 extract regex  strtrim i  1              stregex files i m2  NE  1:for i   1  12 do tmp i 1    strjoin strsplit filesname i m2 extract regex  string i  format    i2 2              stregex files i mc  NE  1:for i   1  12 do tmp i 1    strjoin strsplit filesname i mc extract regex  monthsname i 1           endcase          filesname   strjoin tmp          endif   years       if  stregex files i y 24 0  NE  1 then begin          case strlowcase strmid tstep  1   reverse  of              dy :yend   long y0 jpt d0 1 1 365               mo :yend   long y0 jpt m0 1 1 12               yr :yend   long y0 jpt 1              ELSE:yend   y0          endcase          tmp   strarr yend y0 1           case 1 of             stregex files i y2  NE  1:for i   0  n_elements tmp 1 do tmp i    strjoin strsplit filesname i y2 extract regex  string y0 i 100 y0 i 100  format    i2 2              stregex files i y4  NE  1:for i   0  n_elements tmp 1  do tmp i    strjoin strsplit filesname i y 4 extract regex  string y0 i  format    i4 4           endcase          filesname   strjoin tmp          endif       filesname   strsplit filesname     extract      time step unit of each file:         case 1 of           stregex files i n2 0  NE  1:filetsep    mn            stregex files i hf 123 0  NE  1:filetsep    hr            stregex files i d 12 0  NE  1:filetsep    dy            stregex files i m 12c 0  NE  1: filetsep    mo            stregex files i y 24 0  NE  1:filetsep    yr        ENDCASE     number of time steps for each files         case strlowcase strmid tstep  1   reverse  of           mn :BEGIN             case filetsep of                 yr :jpt1file   60L 24L 365L                 mo :jpt1file   60L 24L 30L                 dy :jpt1file   60L 24L                 hr :jpt1file   60L                 mn :jpt1file   1L             endcase          END           hr :BEGIN             case filetsep of                 yr :jpt1file   24L 365L                 mo :jpt1file   24L 30L                 dy :jpt1file   24L                 hr :jpt1file   1L             endcase          END           dy :BEGIN             case filetsep of                 yr :jpt1file   365L                 mo :jpt1file   30L                 dy :jpt1file   1L             endcase          END           mo :BEGIN             case filetsep of                 yr :jpt1file   12L                 mo :jpt1file   1L             endcase          END           yr :jpt1file   1L       endcase     number of files         nof   ceil jpt 1 jpt1file        filesname   filesname 0:nof 1     ENDIF ELSE BEGIN       nof   1       jpt1file   jpt    ENDELSE   first character      if stregex files  GE 0 THEN BEGIN       iodir   strmid filename 0 strpos filename reverse_search 1        for i   0  nof 1 do filesname i    iodir strmid filesname i  1     ENDIF       extracting the variables        spawn   grep  i  VARS   filename  nvars    nvars   strtrim nvars  2     nvars   strsplit nvars 0 extract     nvars   long nvars 1     spawn   sed  n  e  d   e  Vv Aa Rr Ss Ee Nn Dd Vv Aa Rr Ss p   filename  varlist    if n_elements varlist  LE 2  then begin       print   No lines between vars and endvars        stop    endif    varlist   varlist 1:n_elements varlist 2     if n_elements varlist  NE nvars  then begin       print   Number of variables indicated by VARS  strtrim nvars  1  differs from number of lines  without   at the beginning  located between VARS and ENDVARS:  strtrim n_elements varlist  1        stop    ENDIF    varsname   strarr nvars     varsdes   strarr nvars     varslev   lonarr nvars     for i   0  nvars 1 do BEGIN       varlist i    strtrim varlist i  2        tmp   strsplit varlist i extract        if strmid tmp 2  0  2  EQ  1  then BEGIN          case long strmid tmp 2  3  2  of             10:BEGIN                print   Special data formats  units    1 10  Not yet coded                 stop             END             20:BEGIN                print   Special data formats  units    1 20  Not yet coded                 stop             END             30:BEGIN                print   Special data formats  units    1 30  Not yet coded                 stop             END             40:BEGIN                case long strmid tmp 2  6  of                   1:varfmt    byte                    2:varfmt    uint                     2:varfmt    int                    4:varfmt    long                    ELSE:BEGIN                      print   Bad definition of the special data formats:                        print long strmid tmp 2 6  should be equal to 1  2   2 or 4                       stop                   END                endcase             END             ELSE:BEGIN                print   Special data formats  units    1    Not yet coded                 stop             END          endcase       endif       varsname i    tmp 0        varsdes i    strjoin tmp 3:n_elements tmp 1            varslev i    long tmp 1     ENDFOR    varslev   1   varslev       ccmeshparameters filename   filename    ccmeshparameters filename    Grads       IF keyword_set key_performance  EQ 1 THEN print   time scanctl  systime 1 time1     return end     "); 
     131a[129] = new Array("./ReadWrite/scanoasis.html", "scanoasis.pro", "", "           file_comments   scan an Oasis file  version  scanoasis grids_orca_t106       history Sebastien Masson  smasson lodyc jussieu fr                               July 01  2002    version  Id: scanoasis pro 163 2006 08 29 12:59:46Z navarro            PRO scanoasis  filename     compile_opt idl2  strictarrsubs       openr  unit filename    F77_UNFORMATTED   GET_LUN   SWAP_IF_LITTLE_ENDIAN         error err    if err ne 0 then begin       print err_string       return    endif     char8    12345678     WHILE NOT EOF unit  DO BEGIN       readu  unit  char8       print   char8       readu  unit    ENDWHILE     free_lun unit    return end"); 
     132a[130] = new Array("./ReadWrite/write_oasis.html", "write_oasis.pro", "", "             file_comments   write an Oasis file  version   2 5       param FILENAME  in required     the filename      param VARNAME  in required     the name of the variable to be written      param Z2D  in required     the variable  2D array  to be written      keyword I2    keyword I4    keyword I8    keyword R4   to change the default format  R8  of the data to be written       keyword APPEND    to open the file with the file pointer at the end of the file  ready for    data to be appended       restrictions    varname is automatically written as a  character 8    by default z2d is written as an R8 array      history Sebastien Masson  smasson lodyc jussieu fr                         July 01  2002    version  Id: write_oasis pro 163 2006 08 29 12:59:46Z navarro             PRO write_oasis  filename  varname  z2d  I2   i2  I4   i4  I8   i8  R4   r4  APPEND   append     compile_opt idl2  strictarrsubs      openw  unit  filename    F77_UNFORMATTED   GET_LUN   SWAP_IF_LITTLE_ENDIAN         error err  APPEND   append    if err ne 0 then begin       print err_string       return    endif        writeu  unit  string varname  format a8     case 1 of       keyword_set i2 :writeu  unit  fix z2d        keyword_set i4 :writeu  unit  long z2d        keyword_set i8 :writeu  unit  long64 z2d        keyword_set r4 :writeu  unit  float z2d        ELSE:writeu  unit  double z2d     endcase     free_lun unit    return end"); 
     133a[131] = new Array("./ReadWrite/writebat.html", "writebat.pro", "", "             file_comments   write the bathymetry ASCII file of OPA      categories    For OPA      param ZBAT  in required     the bathymetry  a 2d array      param FILENAME  in required type string    It contains the filename      history Sebastien Masson  smasson lodyc jussieu fr                         Sept 30  2003      based on batsav2 pro  written by Maurice Imbard  March 17  1998      version  Id: writebat pro 163 2006 08 29 12:59:46Z navarro     PRO writebat  zbat  filename     compile_opt idl2  strictarrsubs     basic checks   IF n_params  NE 2 THEN BEGIN     print   bad number of arguments in the call of writebat      return   ENDIF   IF size filename   type  NE 7 THEN BEGIN     print   the filename should be a string      return   ENDIF   sbat   size zbat    IF sbat 0  NE 2 THEN BEGIN     print   bathymetry array should be 2d array      return   ENDIF     jpi2   sbat 1    jpj2   sbat 2    parameters def   ifreq    40   ifin     jpi2 ifreq 1   irest    jpi2 ifin 1 ifreq   zbati    intarr ifreq    zbati2   intarr irest    i0       intarr ifreq 5    i1       intarr max 1  irest 5      openw  iunit  filename   get_lun     fill the file     printf  iunit  FORMAT    1x  bathy IDL      2i8  jpi2  jpj2   printf  iunit  FORMAT       il1   0   FOR jn   1  ifin 1 DO BEGIN     printf  iunit  FORMAT         il2   min  jpi2 1  il1 ifreq 1        i0 0    il1 1     FOR jj   1  ifreq 5 1 DO BEGIN       i0 jj    i0 jj 1 5     END     printf  iunit  FORMAT    3x 13 i3 12x  i0     printf  iunit  FORMAT         il3   il2 jn 1 ifreq     iformat   string  il3 2   i3      FOR jj    jpj2 1  0   1  DO BEGIN       zbati 0:il3    zbat il1:il2  jj        printf  iunit  FORMAT   iformat  jj 1  zbati     END     il1   il1   ifreq   END   printf  iunit  FORMAT       il2   min  jpi2 1  il1 ifreq 1      i1 0    il1 1   FOR jj   1  irest 5 1 DO BEGIN     i1 jj    i1 jj 1 5   END   printf  iunit  FORMAT    3x 13 i3 12x  i1   printf  iunit  FORMAT       il3   il2 ifin 1 ifreq   iformat   string  il3 2   i3    FOR jj    jpj2 1  0   1  DO BEGIN     zbati2 0:irest 1    0     zbati2 0:il3    zbat il1:il2  jj      printf  iunit  FORMAT   iformat  jj 1  zbati2   END     end     close  iunit   free_lun  iunit     return end"); 
     134a[132] = new Array("./Tests/TestsOld/tst_basic_old.html", "tst_basic_old.pro", "", "     file_comments   figure 1: basics plots   plot and contours      history   Sebastien Masson may 2005      version  Id: tst_basic_old pro 189 2006 09 21 13:55:54Z pinsard     PRO tst_basic_old     1  plot     compile_opt idl2  strictarrsubs     n   10   y   findgen n    basic plot   splot  y  petit    2  2  1   portrait   improved plot by using plot and  graphic keywords    splot  y  petit    2  2  2   noerase  yrange    0   n 1 2  title    x and x 2    oplot  y 2  color   100  linestyle   2  thick   3     2  contour     z   dist n    basic plot   scontour  z   fill  nlevels   15  petit    2  2  3   noerase   improved plot by using contour and  graphic keywords    ind   findgen 2 n 2 n    scontour  z  levels   n ind  c_orientation   180 ind  c_spacing    2 ind                 petit    2  2  4   noerase   contour  z   overplot  c_label   rebin 1  0  2  n  levels   n ind                c_charthick   2  c_charsize   1 5  c_colors   250 ind   return end"); 
     135a[133] = new Array("./Tests/TestsOld/tst_initlev_index_old.html", "tst_initlev_index_old.pro", "", ""); 
     136a[134] = new Array("./Tests/TestsOld/tst_initlev_index_stride_old.html", "tst_initlev_index_stride_old.pro", "", ""); 
     137a[135] = new Array("./Tests/TestsOld/tst_initlev_old.html", "tst_initlev_old.pro", "", ""); 
     138a[136] = new Array("./Tests/TestsOld/tst_initlev_stride_old.html", "tst_initlev_stride_old.pro", "", ""); 
     139a[137] = new Array("./Tests/TestsOld/tst_initorca05_index_old.html", "tst_initorca05_index_old.pro", "", ""); 
     140a[138] = new Array("./Tests/TestsOld/tst_initorca05_index_stride_old.html", "tst_initorca05_index_stride_old.pro", "", ""); 
     141a[139] = new Array("./Tests/TestsOld/tst_initorca05_old.html", "tst_initorca05_old.pro", "", ""); 
     142a[140] = new Array("./Tests/TestsOld/tst_initorca05_short_old.html", "tst_initorca05_short_old.pro", "", ""); 
     143a[141] = new Array("./Tests/TestsOld/tst_initorca05_short_stride_old.html", "tst_initorca05_short_stride_old.pro", "", ""); 
     144a[142] = new Array("./Tests/TestsOld/tst_initorca05_stride_old.html", "tst_initorca05_stride_old.pro", "", ""); 
     145a[143] = new Array("./Tests/TestsOld/tst_initorca2_index_old.html", "tst_initorca2_index_old.pro", "", ""); 
     146a[144] = new Array("./Tests/TestsOld/tst_initorca2_index_stride_old.html", "tst_initorca2_index_stride_old.pro", "", ""); 
     147a[145] = new Array("./Tests/TestsOld/tst_initorca2_old.html", "tst_initorca2_old.pro", "", ""); 
     148a[146] = new Array("./Tests/TestsOld/tst_initorca2_short_old.html", "tst_initorca2_short_old.pro", "", ""); 
     149a[147] = new Array("./Tests/TestsOld/tst_initorca2_short_stride_old.html", "tst_initorca2_short_stride_old.pro", "", ""); 
     150a[148] = new Array("./Tests/TestsOld/tst_initorca2_stride_old.html", "tst_initorca2_stride_old.pro", "", ""); 
     151a[149] = new Array("./Tests/TestsOld/tst_plt_old.html", "tst_plt_old.pro", "", "     file_comments        categories          keyword IMAGE      history   Sebastien Masson      version     Id: tst_plt_old pro 189 2006 09 21 13:55:54Z pinsard     PRO tst_plt_old  IMAGE   image   commons     compile_opt idl2  strictarrsubs    common     figure 2: regular grid     CASE jpi key_stride 0 jpj key_stride 1  OF     180 148:file    Levitus98_1m_01_12_Temperature_Pot_ORCA2 nc      360 180:file    Levitus98_1m_01_12_Temperature_Pot_1x1 nc      720 510:file    Levitus98_1m_01_12_Temperature_Pot_ORCA05 nc    ENDCASE   file   isafile file  title    Where is  file     lookalldir    IF size file   type  NE 7 THEN return     dummy       cnt   1     domdef   domdef  gdept 0  gdept 0  grille    T    temp   read_ncdf votemper  00101  00131  file   file      plt  temp   landscape   if keyword_set image  then saveimage   tst_plt_ image _ string cnt  format i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1     plt  temp   2  31  int    5   nocontour  format    i3    if keyword_set image  then saveimage   tst_plt_ image _ string cnt  format i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1     plt  temp   2  31  int   1   color_c   if keyword_set image  then saveimage   tst_plt_ image _ string cnt  format i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1     plt  temp   2  31  int   1   nocouleur  c_thick   1  cont_thick   2   if keyword_set image  then saveimage   tst_plt_ image _ string cnt  format i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1     plt  temp  cell_fill   1    jpi EQ 180    we must use cell_fill   2 for ORCA2   if keyword_set image  then saveimage   tst_plt_ image _ string cnt  format i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1   zoom   IF key_onearth THEN box    40  375   20  20      ELSE box    jpi 4  3 jpi 4  jpj 4  3 jpj 4    plt  temp  boite   box   landscape   if keyword_set image  then saveimage   tst_plt_ image _ string cnt  format i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1    projections   IF key_onearth THEN BEGIN       plt  temp  boite    20  380  60  90   stereo  map    90  0  0   portrait     if keyword_set image  then saveimage   tst_plt_ image _ string cnt  format i2 2 png   png       ELSE read  dummy   prompt    press return for the next plot      cnt   cnt   1       plt  temp  boite    20  380   90  50   ortho  map    90  180  0   portrait     if keyword_set image  then saveimage   tst_plt_ image _ string cnt  format i2 2 png   png       ELSE read  dummy   prompt    press return for the next plot      cnt   cnt   1       plt  temp   ortho  map    0  0  21   portrait   carte     if keyword_set image  then saveimage   tst_plt_ image _ string cnt  format i2 2 png   png       ELSE read  dummy   prompt    press return for the next plot      cnt   cnt   1     ENDIF    deep plot   domdef  150  150     warning message   domdef  gdept jpk 2  gdept jpk 2  grille    T    temp   read_ncdf votemper  00101  00131  file   file    plt  temp  carte   2 key_onearth   land   if keyword_set image  then saveimage   tst_plt_ image _ string cnt  format i2 2 png   png   cnt   cnt   1     return end"); 
     152a[150] = new Array("./Tests/TestsOld/tst_pltt_old.html", "tst_pltt_old.pro", "", "     file_comments        categories        keyword IMAGE      history   Sebastien Masson      version    Id: tst_pltt_old pro 189 2006 09 21 13:55:54Z pinsard     PRO tst_pltt_old  IMAGE   image   commons     compile_opt idl2  strictarrsubs    common  common     figure 2: regular grid     CASE jpi key_stride 0 jpj key_stride 1  OF     180 148:file    Levitus98_1m_01_12_Temperature_Pot_ORCA2 nc      360 180:file    Levitus98_1m_01_12_Temperature_Pot_1x1 nc      720 510:file    Levitus98_1m_01_12_Temperature_Pot_ORCA05 nc    ENDCASE   file   isafile file  title    Where is  file     lookalldir    IF size file   type  NE 7 THEN return     dummy       cnt   1      1 1 xt plot     IF key_onearth THEN domdef  20  380   1  1  0  gdept 0      ELSE domdef  min glamt  max glamf  jpj 2 1  jpj 2 1  0  gdept 0      temp   read_ncdf votemper  00101  01231  file   file    IF key_forgetold THEN help  temp arr ELSE help  temp tab   help  jpt  time   pltt  temp   if keyword_set image  then saveimage   tst_pltt_ image _ string cnt  format    i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1     pltt  temp   nocontour   if keyword_set image  then saveimage   tst_pltt_ image _ string cnt  format    i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1     pltt  temp   color_c   if keyword_set image  then saveimage   tst_pltt_ image _ string cnt  format    i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1     pltt  temp   nocouleur   if keyword_set image  then saveimage   tst_pltt_ image _ string cnt  format    i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1     equatorial plot     IF key_onearth THEN BEGIN     a   abs gphit 0        yind   where a EQ min a      domdef  20  380  yind 0  yind n_elements yind 1            gdept 10    jpk 1  gdept 10    jpk 1  grille    T   yindex   ENDIF ELSE BEGIN     domdef  min glamt  max glamf  jpj 2  jpj 2           gdept 10    jpk 1  gdept 10    jpk 1  grille    T   yindex   ENDELSE   temp   read_ncdf votemper  00101  01231  file   file    IF key_forgetold THEN help  temp arr ELSE help  temp tab   pltt  temp   if keyword_set image  then saveimage   tst_pltt_ image _ string cnt  format    i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1     yt plot along the column that contain the largest latitude     IF key_onearth THEN BEGIN     ind   where gphit EQ max gphit      ind   ind 0  MOD jpi     domdef  ind  ind   90  90  gdept 0  gdept 0  grille    T   xindex   ENDIF ELSE BEGIN     domdef  jpi 2  jpi 2  min gphit  max gphif  gdept 0  gdept 0  grille    T   xindex   ENDELSE    temp   read_ncdf votemper  00101  01231  file   file    IF key_forgetold THEN help  temp arr ELSE help  temp tab   pltt  temp    if keyword_set image  then saveimage   tst_pltt_ image _ string cnt  format    i2 2 png   png   cnt   cnt   1    return end"); 
     153a[151] = new Array("./Tests/TestsOld/tst_pltz_old.html", "tst_pltz_old.pro", "", "     file_comments        categories        keyword IMAGE      history   Sebastien Masson      version    Id: tst_pltz_old pro 189 2006 09 21 13:55:54Z pinsard     PRO tst_pltz_old  IMAGE   image   commons     compile_opt idl2  strictarrsubs    common     IF jpk EQ 1 THEN return     dummy       cnt   1     CASE jpi key_stride 0 jpj key_stride 1  OF     180 148:file    Levitus98_1m_01_12_Temperature_Pot_ORCA2 nc      360 180:file    Levitus98_1m_01_12_Temperature_Pot_1x1 nc      720 510:file    Levitus98_1m_01_12_Temperature_Pot_ORCA05 nc    ENDCASE   file   isafile file  title    Where is  file     lookalldir    IF size file   type  NE 7 THEN return     IF key_onearth THEN domdef  20  380   1  1  0  max gdept      ELSE domdef  min glamt  max glamf  jpj 2 1  jpj 2 1  0  max gdept      temp   read_ncdf votemper  00101  00131  file   file    IF key_forgetold THEN help  temp arr ELSE help  temp tab     pltz  temp   portrait   if keyword_set image  then saveimage   tst_pltz_ image _ string cnt  format    i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1     pltz  temp   portrait   nocontour   if keyword_set image  then saveimage   tst_pltz_ image _ string cnt  format    i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1     pltz  temp   portrait   color_c   if keyword_set image  then saveimage   tst_pltz_ image _ string cnt  format    i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1     pltz  temp   portrait   nocouleur   if keyword_set image  then saveimage   tst_pltz_ image _ string cnt  format    i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1     pltz  temp  boite    6000    if keyword_set image  then saveimage   tst_pltz_ image _ string cnt  format    i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1                                     pltz  temp  boite    6000  zoom   1000   if keyword_set image  then saveimage   tst_pltz_ image _ string cnt  format    i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1     pltz  temp  boite    6000  zoom   1000  ysurx   2   if keyword_set image  then saveimage   tst_pltz_ image _ string cnt  format    i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1     pltz  temp  boite    6000  zoom   1000  ysurx   2  hzsurht    5   if keyword_set image  then saveimage   tst_pltz_ image _ string cnt  format    i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1     yt plot along the column that contain the largest latitude     IF key_onearth THEN BEGIN     ind   where gphit EQ max gphit      ind   ind 0  MOD jpi     domdef  ind  ind   90  90  0  max gdept  grille    T   xindex   ENDIF ELSE BEGIN     domdef  jpi 2  jpi 2  min gphit  max gphif  0  max gdept  grille    T   xindex   ENDELSE    temp   read_ncdf votemper  00101  01231  file   file    pltz  temp  boite    6000  zoom   1000  ysurx   2  hzsurht    5   if keyword_set image  then saveimage   tst_pltz_ image _ string cnt  format    i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1     oblique sections      IF key_onearth THEN endpoints    110   45  290  45      ELSE endpoints    jpi 6  jpj 3  5 jpi 6  2 jpj 3    domdef  endpoints   endpoints  type    pltz    temp   read_ncdf votemper  00101  00131  file   file    pltz  temp  endpoints   endpoints   if keyword_set image  then saveimage   tst_pltz_ image _ string cnt  format    i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1     false oblique sections      IF key_onearth THEN endpoints    180   70  180  90      ELSE endpoints    jpi 2 0 25   0 25  jpi 2 0 25   jpj    domdef  6000  endpoints   endpoints  type    pltz    temp   read_ncdf votemper  00101  00131  file   file    pltz  temp  endpoints   endpoints  boite    6000              zoom   1000  ysurx   2  hzsurht    5      showbuild   if keyword_set image  then saveimage   tst_pltz_ image _ string cnt  format    i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1     comparison between real section and false oblique sections     IF  where gphit EQ 0 0  NE  1 THEN BEGIN     IF key_onearth THEN box    20  380  0  0  0  6000        ELSE box    0  jpi 1  jpj 2  jpj 2  0  6000      domdef  box  grille    T      temp   read_ncdf votemper  00101  00131  file   file      pltz  temp  boite    6000   portrait  petit    1  2  1                zoom   500  hzsurht    5      IF key_onearth THEN endpoints    20  0  380  0        ELSE endpoints    0  jpj 2  jpi 1  jpj 2      domdef  6000  endpoints   endpoints  type    pltz  grille    T      temp   read_ncdf votemper  00101  00131  file   file      pltz  temp  endpoints   endpoints  boite    6000                zoom   500  hzsurht    5               petit    1  2  2   noerase      if keyword_set image  then saveimage   tst_pltz_ image _ string cnt  format    i2 2 png   png     cnt   cnt   1   ENDIF    return end"); 
     154a[152] = new Array("./Tests/tst_basic.html", "tst_basic.pro", "", "     file_comments   figure 1: basics plots   plot and contours      history   Sebastien Masson may 2005      version  Id: tst_basic pro 131 2006 07 06 14:52:56Z pinsard     PRO tst_basic     1  plot     compile_opt idl2  strictarrsubs     n   10   y   findgen n    basic plot   splot  y  small    2  2  1   portrait   improved plot by using plot and  graphic keywords    splot  y  small    2  2  2   noerase  yrange    0   n 1 2  title    x and x 2    oplot  y 2  color   100  linestyle   2  thick   3     2  contour     z   dist n    basic plot   scontour  z   fill  nlevels   15  small    2  2  3   noerase   improved plot by using contour and  graphic keywords    ind   findgen 2 n 2 n    scontour  z  levels   n ind  c_orientation   180 ind  c_spacing    2 ind                 small    2  2  4   noerase   contour  z   overplot  c_label   rebin 1  0  2  n  levels   n ind                c_charthick   2  c_charsize   1 5  c_colors   250 ind   return end"); 
     155a[153] = new Array("./Tests/tst_initlev.html", "tst_initlev.pro", "", ""); 
     156a[154] = new Array("./Tests/tst_initlev_index.html", "tst_initlev_index.pro", "", ""); 
     157a[155] = new Array("./Tests/tst_initlev_index_stride.html", "tst_initlev_index_stride.pro", "", ""); 
     158a[156] = new Array("./Tests/tst_initlev_stride.html", "tst_initlev_stride.pro", "", ""); 
     159a[157] = new Array("./Tests/tst_initorca05.html", "tst_initorca05.pro", "", ""); 
     160a[158] = new Array("./Tests/tst_initorca05_index.html", "tst_initorca05_index.pro", "", ""); 
     161a[159] = new Array("./Tests/tst_initorca05_index_stride.html", "tst_initorca05_index_stride.pro", "", ""); 
     162a[160] = new Array("./Tests/tst_initorca05_short.html", "tst_initorca05_short.pro", "", ""); 
     163a[161] = new Array("./Tests/tst_initorca05_short_stride.html", "tst_initorca05_short_stride.pro", "", ""); 
     164a[162] = new Array("./Tests/tst_initorca05_stride.html", "tst_initorca05_stride.pro", "", ""); 
     165a[163] = new Array("./Tests/tst_initorca2.html", "tst_initorca2.pro", "", ""); 
     166a[164] = new Array("./Tests/tst_initorca2_index.html", "tst_initorca2_index.pro", "", ""); 
     167a[165] = new Array("./Tests/tst_initorca2_index_stride.html", "tst_initorca2_index_stride.pro", "", ""); 
     168a[166] = new Array("./Tests/tst_initorca2_short.html", "tst_initorca2_short.pro", "", ""); 
     169a[167] = new Array("./Tests/tst_initorca2_short_stride.html", "tst_initorca2_short_stride.pro", "", ""); 
     170a[168] = new Array("./Tests/tst_initorca2_stride.html", "tst_initorca2_stride.pro", "", ""); 
     171a[169] = new Array("./Tests/tst_plt.html", "tst_plt.pro", "", "     file_comments        categories          keyword IMAGE      history   Sebastien Masson      version     Id: tst_plt pro 157 2006 08 21 09:01:50Z navarro     PRO tst_plt  IMAGE   image   commons     compile_opt idl2  strictarrsubs    cm_4mesh     figure 2: regular grid     CASE jpi key_stride 0 jpj key_stride 1  OF     180 148:file    Levitus98_1m_01_12_Temperature_Pot_ORCA2 nc      360 180:file    Levitus98_1m_01_12_Temperature_Pot_1x1 nc      720 510:file    Levitus98_1m_01_12_Temperature_Pot_ORCA05 nc    ENDCASE   file   isafile file  title    Where is  file     lookalldir    IF size file   type  NE 7 THEN return     dummy       cnt   1     domdef   domdef  gdept 0  gdept 0  gridtype    T    temp   read_ncdf votemper  00101  00131  file   file      plt  temp   landscape   if keyword_set image  then saveimage   tst_plt_ image _ string cnt  format i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1     plt  temp   2  31  int    5   nocontour  format    i3    if keyword_set image  then saveimage   tst_plt_ image _ string cnt  format i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1     plt  temp   2  31  int   1   color_c   if keyword_set image  then saveimage   tst_plt_ image _ string cnt  format i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1     plt  temp   2  31  int   1   nofill  c_thick   1  coast_thick   2   if keyword_set image  then saveimage   tst_plt_ image _ string cnt  format i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1     plt  temp  cell_fill   1    jpi EQ 180    we must use cell_fill   2 for ORCA2   if keyword_set image  then saveimage   tst_plt_ image _ string cnt  format i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1   zoom   IF key_onearth THEN box    40  375   20  20      ELSE box    jpi 4  3 jpi 4  jpj 4  3 jpj 4    plt  temp  boxzoom   box   landscape   if keyword_set image  then saveimage   tst_plt_ image _ string cnt  format i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1    projections   IF key_onearth THEN BEGIN       plt  temp  boxzoom    20  380  60  90   stereo  map    90  0  0   portrait     if keyword_set image  then saveimage   tst_plt_ image _ string cnt  format i2 2 png   png       ELSE read  dummy   prompt    press return for the next plot      cnt   cnt   1       plt  temp  boxzoom    20  380   90  50   ortho  map    90  180  0   portrait     if keyword_set image  then saveimage   tst_plt_ image _ string cnt  format i2 2 png   png       ELSE read  dummy   prompt    press return for the next plot      cnt   cnt   1       plt  temp   ortho  map    0  0  21   portrait   realcont     if keyword_set image  then saveimage   tst_plt_ image _ string cnt  format i2 2 png   png       ELSE read  dummy   prompt    press return for the next plot      cnt   cnt   1     ENDIF    deep plot   domdef  150  150     warning message   domdef  gdept jpk 2  gdept jpk 2  gridtype    T    temp   read_ncdf votemper  00101  00131  file   file    plt  temp  realcont   2 key_onearth   land   if keyword_set image  then saveimage   tst_plt_ image _ string cnt  format i2 2 png   png   cnt   cnt   1     return end"); 
     172a[170] = new Array("./Tests/tst_pltt.html", "tst_pltt.pro", "", "     file_comments        categories        keyword IMAGE      history   Sebastien Masson      version    Id: tst_pltt pro 157 2006 08 21 09:01:50Z navarro     PRO tst_pltt  IMAGE   image   commons     compile_opt idl2  strictarrsubs    cm_4mesh  cm_4cal     figure 2: regular grid     CASE jpi key_stride 0 jpj key_stride 1  OF     180 148:file    Levitus98_1m_01_12_Temperature_Pot_ORCA2 nc      360 180:file    Levitus98_1m_01_12_Temperature_Pot_1x1 nc      720 510:file    Levitus98_1m_01_12_Temperature_Pot_ORCA05 nc    ENDCASE   file   isafile file  title    Where is  file     lookalldir    IF size file   type  NE 7 THEN return     dummy       cnt   1      1 1 xt plot     IF key_onearth THEN domdef  20  380   1  1  0  gdept 0      ELSE domdef  min glamt  max glamf  jpj 2 1  jpj 2 1  0  gdept 0      temp   read_ncdf votemper  00101  01231  file   file    IF key_forgetold THEN help  temp arr ELSE help  temp tab   help  jpt  time   pltt  temp   if keyword_set image  then saveimage   tst_pltt_ image _ string cnt  format    i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1     pltt  temp   nocontour   if keyword_set image  then saveimage   tst_pltt_ image _ string cnt  format    i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1     pltt  temp   color_c   if keyword_set image  then saveimage   tst_pltt_ image _ string cnt  format    i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1     pltt  temp   nofill   if keyword_set image  then saveimage   tst_pltt_ image _ string cnt  format    i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1     equatorial plot     IF key_onearth THEN BEGIN     a   abs gphit 0        yind   where a EQ min a      domdef  20  380  yind 0  yind n_elements yind 1            gdept 10    jpk 1  gdept 10    jpk 1  gridtype    T   yindex   ENDIF ELSE BEGIN     domdef  min glamt  max glamf  jpj 2  jpj 2           gdept 10    jpk 1  gdept 10    jpk 1  gridtype    T   yindex   ENDELSE   temp   read_ncdf votemper  00101  01231  file   file    IF key_forgetold THEN help  temp arr ELSE help  temp tab   pltt  temp   if keyword_set image  then saveimage   tst_pltt_ image _ string cnt  format    i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1     yt plot along the column that contain the largest latitude     IF key_onearth THEN BEGIN     ind   where gphit EQ max gphit      ind   ind 0  MOD jpi     domdef  ind  ind   90  90  gdept 0  gdept 0  gridtype    T   xindex   ENDIF ELSE BEGIN     domdef  jpi 2  jpi 2  min gphit  max gphif  gdept 0  gdept 0  gridtype    T   xindex   ENDELSE    temp   read_ncdf votemper  00101  01231  file   file    IF key_forgetold THEN help  temp arr ELSE help  temp tab   pltt  temp    if keyword_set image  then saveimage   tst_pltt_ image _ string cnt  format    i2 2 png   png   cnt   cnt   1    return end"); 
     173a[171] = new Array("./Tests/tst_pltz.html", "tst_pltz.pro", "", "     file_comments        categories        keyword IMAGE      history   Sebastien Masson      version    Id: tst_pltz pro 157 2006 08 21 09:01:50Z navarro     PRO tst_pltz  IMAGE   image   commons     compile_opt idl2  strictarrsubs    cm_4mesh     IF jpk EQ 1 THEN return     dummy       cnt   1     CASE jpi key_stride 0 jpj key_stride 1  OF     180 148:file    Levitus98_1m_01_12_Temperature_Pot_ORCA2 nc      360 180:file    Levitus98_1m_01_12_Temperature_Pot_1x1 nc      720 510:file    Levitus98_1m_01_12_Temperature_Pot_ORCA05 nc    ENDCASE   file   isafile file  title    Where is  file     lookalldir    IF size file   type  NE 7 THEN return     IF key_onearth THEN domdef  20  380   1  1  0  max gdept      ELSE domdef  min glamt  max glamf  jpj 2 1  jpj 2 1  0  max gdept      temp   read_ncdf votemper  00101  00131  file   file    IF key_forgetold THEN help  temp arr ELSE help  temp tab     pltz  temp   portrait   if keyword_set image  then saveimage   tst_pltz_ image _ string cnt  format    i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1     pltz  temp   portrait   nocontour   if keyword_set image  then saveimage   tst_pltz_ image _ string cnt  format    i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1     pltz  temp   portrait   color_c   if keyword_set image  then saveimage   tst_pltz_ image _ string cnt  format    i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1     pltz  temp   portrait   nofill   if keyword_set image  then saveimage   tst_pltz_ image _ string cnt  format    i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1     pltz  temp  boxzoom    6000    if keyword_set image  then saveimage   tst_pltz_ image _ string cnt  format    i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1                                     pltz  temp  boxzoom    6000  zoom   1000   if keyword_set image  then saveimage   tst_pltz_ image _ string cnt  format    i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1     pltz  temp  boxzoom    6000  zoom   1000  yxaspect   2   if keyword_set image  then saveimage   tst_pltz_ image _ string cnt  format    i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1     pltz  temp  boxzoom    6000  zoom   1000  yxaspect   2  zratio    5   if keyword_set image  then saveimage   tst_pltz_ image _ string cnt  format    i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1     yt plot along the column that contain the largest latitude     IF key_onearth THEN BEGIN     ind   where gphit EQ max gphit      ind   ind 0  MOD jpi     domdef  ind  ind   90  90  0  max gdept  gridtype    T   xindex   ENDIF ELSE BEGIN     domdef  jpi 2  jpi 2  min gphit  max gphif  0  max gdept  gridtype    T   xindex   ENDELSE    temp   read_ncdf votemper  00101  01231  file   file    pltz  temp  boxzoom    6000  zoom   1000  yxaspect   2  zratio    5   if keyword_set image  then saveimage   tst_pltz_ image _ string cnt  format    i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1     oblique sections      IF key_onearth THEN endpoints    110   45  290  45      ELSE endpoints    jpi 6  jpj 3  5 jpi 6  2 jpj 3    domdef  endpoints   endpoints  type    pltz    temp   read_ncdf votemper  00101  00131  file   file    pltz  temp  endpoints   endpoints   if keyword_set image  then saveimage   tst_pltz_ image _ string cnt  format    i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1     false oblique sections      IF key_onearth THEN endpoints    180   70  180  90      ELSE endpoints    jpi 2 0 25   0 25  jpi 2 0 25   jpj    domdef  6000  endpoints   endpoints  type    pltz    temp   read_ncdf votemper  00101  00131  file   file    pltz  temp  endpoints   endpoints  boxzoom    6000              zoom   1000  yxaspect   2  zratio    5      showbuild   if keyword_set image  then saveimage   tst_pltz_ image _ string cnt  format    i2 2 png   png     ELSE read  dummy   prompt    press return for the next plot    cnt   cnt   1     comparison between real section and false oblique sections     IF  where gphit EQ 0 0  NE  1 THEN BEGIN     IF key_onearth THEN box    20  380  0  0  0  6000        ELSE box    0  jpi 1  jpj 2  jpj 2  0  6000      domdef  box  gridtype    T      temp   read_ncdf votemper  00101  00131  file   file      pltz  temp  boxzoom    6000   portrait  small    1  2  1                zoom   500  zratio    5      IF key_onearth THEN endpoints    20  0  380  0        ELSE endpoints    0  jpj 2  jpi 1  jpj 2      domdef  6000  endpoints   endpoints  type    pltz  gridtype    T      temp   read_ncdf votemper  00101  00131  file   file      pltz  temp  endpoints   endpoints  boxzoom    6000                zoom   500  zratio    5               small    1  2  2   noerase      if keyword_set image  then saveimage   tst_pltz_ image _ string cnt  format    i2 2 png   png     cnt   cnt   1   ENDIF    return end"); 
     174a[172] = new Array("./Textoidl/matchdelim.html", "matchdelim.pro", "", "     file_comments   Match open close delimiters in a string       categories   Text  String      param INSTRING  in required type string    a string containing an open delimiter  e g    in which you    want to find the matching closing delimiter  e g         param OPENPOS  in optional    Set to a named variable to receive the   position of the first opening delimiter       keyword OPEN_DELIM  default    A single character containing the opening   delimiter  e g         keyword CLOSE_DELIM  default    A single character containing the closing    delimiter  e g         returns        uses        restrictions   Any pair of  nonidentical  characters can be used as delimiters       examples   matchdelim one two three  returns 9  the character just before  three       history    Log: matchdelim pro v     Revision 1 3  1996 06 14 20:00:27  mcraig   Updated Copyright info      Revision 1 2  1996 05 09 00:22:17  mcraig   Removed restriction that open delim must be first char   Added argument   to allow for return of position of open delim      Revision 1 1  1996 01 31 18:41:06  mcraig   Initial revision      Copyright  C  1996 The Regents of the University of California  All   Rights Reserved   Written by Matthew W  Craig    See the file COPYRIGHT for restrictions on distrubting this code    This code comes with absolutely NO warranty  see DISCLAIMER for details       version    Id: matchdelim pro 163 2006 08 29 12:59:46Z navarro       FUNCTION matchdelim  InString  OpenPos                         OPEN_DELIM OpenDelim                         CLOSE_DELIM CloseDelim                         HELP Help     compile_opt idl2  strictarrsubs      Return to caller if error      On_error  2      IF  n_params  LT 1  OR keyword_set Help  THEN BEGIN         offset                 print  offset Match open close delimiters in a string          print  offset position   matchdelim  strn   openpos          print  offset Inputs:          print  offset offset strn          a string containing an open                 in          print  offset offset                delimiter  e g    in which you           print  offset offset                want to find the matching closing            print  offset offset                delimiter  e g            print  offset Keywords:          print  offset offset OPEN_DELIM    A single character containing the opening   in          print  offset offset                delimiter  e g     Default is           print  offset offset CLOSE_DELIM   A single character containing the closing   in          print  offset offset                delimiter  e g     Default is           print  offset Outputs:          print  offset offset position   returns the position in strn of the            out          print  offset offset             closing delimiter   1 if no closing found          print  offset offset openpos    Set to a named variable to receive the         out          print  offset offset             position of the first opening delimiter          print  offset offset             Optional          print  offset Example:          print  offset offset matchdelim a one two three  returns 10  the character just          print  offset offset   before  three             print  offset offset             a matchdelim aaa bbb ccc ddd eee f OP CL          print  offset offset   returns a 12  just before ddd  f 3              just before bbb            return   1     ENDIF     Set default delimiters      IF n_elements OpenDelim  EQ 0 THEN OpenDelim          IF n_elements CloseDelim  EQ 0 THEN CloseDelim         Make sure InString has more than 1 character      length   strlen InString       IF  length LE 1  THEN return 1    Return if no open delimiter     OpenPos   strpos  InString  OpenDelim       IF  OpenPos EQ  1  THEN BEGIN          print   Error: No opening delimiter          return   1     ENDIF         Convert strings to array of integers to speed processing      OpenDelim   fix byte OpenDelim 0      CloseDelim   fix byte CloseDelim 0      TmpStr   fix byte strmid  InString  OpenPos  length    Leave the  1  in here   This forces conversion from BYTE to INTEGER    necessary because there are no negative BYTEs      TmpStr    TmpStr EQ OpenDelim                   1 TmpStr EQ CloseDelim      length   n_elements TmpStr      Initialize count of number of delimiters   We ve found one  the   first opener      BraceCnt   1     i 0     WHILE  BraceCnt GT 0  AND  i LT length 1  DO BEGIN          i   i 1         BraceCnt   BraceCnt   TmpStr i      ENDWHILE           i   i   OpenPos     IF  BraceCnt GT 0  THEN i    1     return  i END      "); 
     175a[173] = new Array("./Textoidl/nexttok.html", "nexttok.pro", "", "      NAME:         NEXTTOK   PURPOSE:         Find the next occurance of any of a set of characters in a         string and return the character which occurs next    CATEGORY:         text strings   CALLING SEQUENCE:         tok   nexttok  strn  tokens     INPUTS:         strn     string to be searched for sub superscripts    in         tokens   string containing characters to be found      in   KEYWORD PARAMETERS:         POSITION   Set to a named variable to get position     out                     of next token  or  1 if none found           HELP      Print useful message and exit    OUTPUTS:         tok      Contains the character among tokens which     out                   occurs next in strn  or null   if none found    COMMON BLOCKS:   SIDE EFFECTS:   NOTES:   EXAMPLE:         nexttok   x 2   N_j 3   _  position pos   returns   and sets         pos to 1    MODIFICATION HISTORY:          Id: nexttok pro 134 2006 07 07 10:19:08Z navarro            Log: nexttok pro v           Revision 1 4  2004 06 15 17:25:54  mcraig         Fixed bug in regular expression  changed array notation to square brackets           Revision 1 3  1996 06 14 20:00:27  mcraig         Updated Copyright info            Revision 1 2  1996 05 09 00:22:17  mcraig         Generalized so that the next occurence of any of a set of characters will         be returned            Revision 1 1  1996 01 31 18:41:06  mcraig         Initial revision     RELEASE:          Name: Rel_2_1_2       COPYRIGHT:    Copyright  C  1996 The Regents of the University of California  All    Rights Reserved   Written by Matthew W  Craig     See the file COPYRIGHT for restrictions on distrubting this code     This code comes with absolutely NO warranty  see DISCLAIMER for details    FUNCTION nexttok  strn  tokens                      POSITION position                      HELP Help     compile_opt idl2  strictarrsubs       Return to caller on error      On_error  2     Help those in need of it      IF  n_params  NE 2  OR keyword_set Help  THEN BEGIN          offset                 print  offset Find the next occurance of any of a set of characters in a          print  offset string and return the character which occurs next    CALLING SEQUENCE:         print  offset tok   nexttok  strn  tokens     INPUTS:         print  offset Inputs:          print  offset offset strn     string to be searched for sub superscripts    in          print  offset offset tokens   string containing characters to be found      in    KEYWORD PARAMETERS:         print  offset Keywords:          print  offset offset POSITION   Set to a named variable to get position     out          print  offset offset             of next token  or  1 if none found          print  offset offset HELP      Print useful message and exit    OUTPUTS:         print  offset Outputs:          print  offset offset tok     Contains the character among tokens which      out          print  offset offset          occurs next in strn  or null   if none found    EXAMPLE:         print  offset Example:          print  offset offset nexttok   x 2   N_j 3   _  position pos   returns   and sets          print  offset offset pos to 1          return        ENDIF       TmpStr   byte strn      TmpTok   byte tokens      NumToks   n_elements TmpTok        MatchIdx   0L     Matches   0L     FOR j 0  NumToks 1 DO BEGIN          TmpMatch   where TmpStr EQ TmpTok j   TmpCnt          IF  TmpCnt GT 0  THEN BEGIN             MatchIdx    MatchIdx  Replicate j  TmpCnt              Matches    Matches  TmpMatch          ENDIF      ENDFOR       IF n_elements MatchIdx  EQ 1 THEN BEGIN          Position    1         return        ENDIF       MatchIdx   MatchIdx 1:      Matches   Matches 1:       SortInd   sort Matches       Position   Matches SortInd 0       Tok   string TmpTok MatchIdx SortInd 0           return  Tok END   "); 
     176a[174] = new Array("./Textoidl/showtex.html", "showtex.pro", "", "      NAME:         SHOWTEX   PURPOSE:         Display TeX sequence translation table on current graphics device    CATEGORY:         text strings   CALLING SEQUENCE:         showtex   INPUTS:   KEYWORD PARAMETERS:          HELP   print out info on use of the function                  and exit          FONT    Set to 0 to use hardware font   1 to use vector                   Note that the only hardware font supported is                  Postscript   OUTPUTS:   COMMON BLOCKS:   SIDE EFFECTS:         Plot is created    NOTES:         Hardware fonts are supported only for device PS  PostScript    EXAMPLE:   MODIFICATION HISTORY:          Id: showtex pro 163 2006 08 29 12:59:46Z navarro            Log: showtex pro v           Revision 1 4  2004 06 15 17:25:54  mcraig         Fixed bug in regular expression  changed array notation to square brackets           Revision 1 3  1996 06 14 20:00:27  mcraig         Updated Copyright info            Revision 1 2  1996 05 09 00:22:17  mcraig         Added error handling and updated built in help            Revision 1 1  1996 02 08 18:55:12  mcraig         Initial revision     RELEASE:          Name: Rel_2_1_2       COPYRIGHT:    Copyright  C  1996 The Regents of the University of California  All    Rights Reserved   Written by Matthew W  Craig     See the file COPYRIGHT for restrictions on distrubting this code     This code comes with absolutely NO warranty  see DISCLAIMER for details      PRO showtex  FONT fnt  HELP help     compile_opt idl2  strictarrsubs      Return to caller on error      On_error  2    Print help if needed      IF keyword_set help  THEN BEGIN         print       Display TeX sequence translation table on current graphics device          print       showtex          print       Keywords:          print           HELP       print this message and return          print          FONT        set to 0 to use hardware fonts for current device          print                       1 to use vector fonts  DEFAULT          print       NOTES:    The only hardware font supported is PostScript          print                 The FONT keyword overrides the font selected in  p font          return     ENDIF         We begin by deciding on the font   PostScript   0 means use vector      PostScript   0     PlotTitle    Vector Fonts      IF n_elements fnt  EQ 0 THEN BEGIN   get font from  p font         IF  P font NE  1 THEN BEGIN   User wants hardware font              PostScript   1             PlotTitle    PostScript Fonts          ENDIF      ENDIF ELSE BEGIN              get font from FONT keyword         IF fnt NE  1 THEN BEGIN             PostScript   1             PlotTitle    PostScript Fonts          ENDIF     ENDELSE         Bomb out if user wants hardware font for non PostScript device      IF  PostScript EQ 1  AND  strupcase D name  NE  PS  THEN BEGIN                                                    Device isn t postscript                                                  and user wants hardware                                                 font   Not good          print   Warning: No translation for device:    D name         return     ENDIF       Set  P font to value indicated by FONT keyword  saving surrent   setting to reset at end      OldPFont    p font      p font   PostScript   1      erase     seq   textoidl tex      DisplayString   seq          textoidl seq       nseq   n_elements seq      nrows   nseq 5   1            Five sequences per row      dx    9 5      dy    9 nrows     y 95     xyouts 5 y PlotTitle align 5 norm size 2 5     count 0     FOR i   1L  nrows DO BEGIN         y  y   dy         x    1         FOR j   1  5 DO BEGIN             IF  count LT nseq   THEN xyouts  x  y  DisplayString count  align    5   norm             count   count 1             x   x   dx         ENDFOR     ENDFOR    Restore old  P font       p font   OldPFont END"); 
     177a[175] = new Array("./Textoidl/str_token.html", "str_token.pro", "", "      NAME:         STR_TOKEN   PURPOSE:         Retrieve portion of string up to token    CATEGORY:         text strings   CALLING SEQUENCE:         new   str_token  old  token     INPUTS:         old     String to be split   Contains text after    in  out                  token on output          token   Token to use in splitting old               in   KEYWORD PARAMETERS:          TRIM   set to remove leading blanks from old                   before returning           HELP   print useful message and exit    OUTPUTS:         new     portion of string up to token               out         old     portion of old after token                  out  in   COMMON BLOCKS:   SIDE EFFECTS:         Input parameter old is modified    NOTES:         Token may be one or more characters          If token is not found  returns old and sets old to     EXAMPLE:         If old is  foo44 bar  then str_token  old   44    would return          foo  and upon return  old will be left with   bar   If  TRIM         were set  old would be  bar  on return            If old xyz  then new str_token old a  would return with         new xyz  and old    THANKS:         To D  Linder who wrote GETTOK  part of the goddard library          upon which this is based    MODIFICATION HISTORY:          Id: str_token pro 163 2006 08 29 12:59:46Z navarro            Log: str_token pro v           Revision 1 1  2000 06 14 19:09:22  mcraig         Changed name of strtok str_token to avoid conflict in IDL 5 3            Revision 1 3  1996 06 14 20:00:27  mcraig         Updated Copyright info            Revision 1 2  1996 05 09 00:22:17  mcraig         Added built in help            Revision 1 1  1996 01 31 18:47:37  mcraig         Initial revision     RELEASE:          Name: Rel_2_1_2       COPYRIGHT:    Copyright  C  1996 The Regents of the University of California  All    Rights Reserved   Written by Matthew W  Craig     See the file COPYRIGHT for restrictions on distrubting this code     This code comes with absolutely NO warranty  see DISCLAIMER for details    FUNCTION str_token  string  token                     TRIM trim  HELP Help     compile_opt idl2  strictarrsubs      Back to the caller if error occurs      On_error  2      IF  n_params  NE 2  OR keyword_set Help  THEN BEGIN          offset                 print  offset Retrieve portion of string up to token          print  offset new   str_token  old  token           print  offset Inputs:          print  offset offset old     String to be split   Contains text after    in  out          print  offset offset          token on output          print  offset offset token   Token to use in splitting old               in          print  offset Keywords:          print  offset offset TRIM   set to remove leading blanks from old           print  offset offset          before returning          print  offset offset HELP   print useful message and exit          print  offset Outputs:          print  offset offset new     portion of string up to token               out          print  offset offset old     portion of old after token                  out  in          print  offset Side effects:          print  offset offset Input parameter old is modified          print  offset Notes:          print  offset offset Token may be one or more characters          print  offset offset If token is not found  returns old and sets old to           print  offset Examples:          print  offset offset If old is  foo44 bar  then str_token  old   44    would return          print  offset offset    foo  and upon return  old will be left with   bar   If  TRIM          print  offset offset   were set  old would be  bar  on return            print  offset offset If old xyz  then new str_token old a  would return with          print  offset offset   new xyz  and old          return   1     ENDIF       pos   strpos string  token       IF  pos GE 0  THEN BEGIN         front   strmid string  0  pos           string   strmid string  pos   strlen token  strlen string          IF keyword_set trim  THEN string   strtrim string  1          return  front     ENDIF          front   string     string         return  front      END "); 
     178a[176] = new Array("./Textoidl/strcnt.html", "strcnt.pro", "", "     file_comments   Count number of occurrences of a substring in a string       categories   Text  String      param STRN  in required type string    The string in which to count occurences       param SUBSTRN  in required type string    The substring to count occurrences of       param STARTPOS  in required    The position at which to begin the search    If not supplied  start at beginning of string       keyword HELP   Print useful message and return       returns   Number of occurances of substring in string       restrictions   Overlapping occurances are not counted separately   For   example  counting occurances of  bb  in  blah bbb  returns one   occurance        history          Log: strcnt pro v           Revision 1 3  1996 06 14 20:00:27  mcraig         Updated Copyright info            Revision 1 2  1996 05 09 00:22:17  mcraig         Added fast processing using BYTE arrays if we are counting occurences of         a single character   Added error handling            Revision 1 1  1996 01 31 18:47:37  mcraig         Initial revision      Copyright  C  1996 The Regents of the University of California  All    Rights Reserved   Written by Matthew W  Craig     See the file COPYRIGHT for restrictions on distrubting this code     This code comes with absolutely NO warranty  see DISCLAIMER for details       version    Id: strcnt pro 163 2006 08 29 12:59:46Z navarro     FUNCTION strcnt  strn  substrn  startpos                     HELP Help     compile_opt idl2  strictarrsubs      Return to caller if error      On_error  2    Help user  if needed      IF  n_params  LT 2  OR keyword_set Help  THEN BEGIN         offset                 print  offset Count number of occurrences of a substring in a string          print  offset num   strcnt strn  substring   pos          print  offset Inputs:          print offset offset string      The string in which to count occurences      in          print offset offset substring   The substring to count occurrences of        in          print offset offset pos         the position at which to begin the search     in          print offset offset              If not supplied  start at beginning of          print offset offset              string          print  offset Keywords:          print offset offset HELP       Print useful message and return          print  offset Outputs:          print offset offset num         Number of occurances of substring in string  out          return   1     ENDIF       IF n_params  EQ 2 THEN startpos   0     return if we weren t really given a substring to search for          IF strlen substrn  EQ 0 THEN BEGIN          print   Error: Can t count occurances of null string          return   1     ENDIF          or if we were told to start at the end of the string      tmpstrn   strmid strn  startpos  strlen strn      IF strlen tmpstrn  EQ 0 THEN return  0    If looking for occurences of single character  process using BYTE   array      IF strlen substrn  EQ 1 THEN BEGIN         tmpstrn   byte TmpStrn          count   n_elements where TmpStrn EQ  byte substrn 0       ENDIF ELSE BEGIN          count   0L         pos   rstrpos tmpstrn  substrn          WHILE pos GE 0 DO BEGIN             count   count   1             pos   rstrpos tmpstrn  substrn  pos          ENDWHILE     ENDELSE       return  count END         "); 
     179a[177] = new Array("./Textoidl/strtrans.html", "strtrans.pro", "", "      NAME:         STRTRANS   PURPOSE:         Translate all occurences of one substring to another    CATEGORY:         text strings   CALLING SEQUENCE:         new   strtrans oldstr from to ned    INPUTS:         oldstr   string on which to operate               in                   May be an array          from     substrings to be translated  May be      in                   an array          to       what strings in from should be           in                   translated to  May be an array    KEYWORD PARAMETERS:          HELP    Set this to print useful message and                    exit    OUTPUTS:         new      Translated string  Array if oldstr is    out                             an array          ned      number of substitutions performed in     out                   oldstr   Array if oldstr is an array    COMMON BLOCKS:   SIDE EFFECTS:   NOTES:           Any of old  from  and to can be arrays              from and to must have the same number of elements    EXAMPLE:         inp Many bad chars in_here          from _          to                    out   strtrans inp from to ned          Will produce out Many bad chars in here  and set ned to 4    MODIFICATION HISTORY:          Id: strtrans pro 134 2006 07 07 10:19:08Z navarro            Log: strtrans pro v           Revision 1 7  2004 06 15 17:25:54  mcraig         Fixed bug in regular expression  changed array notation to square brackets           Revision 1 6  2004 01 11 01:49:00  mcraig         Changed format of one array to newer   style to avoidf conflict with function name in astro library            Revision 1 5  2001 11 23 21:14:35  mcraig         Added keywords  EXTRACT   PRESERVE_NULL   REGEX to call to         strsplit  This comes very close to reproducing the behavior of the         obsolete routine str_sep            Revision 1 4  2001 11 21 19:13:23  mcraig         Changed str_sep to strsplit  The former is now considered obsolete by RSI            Revision 1 3  1996 06 14 20:00:27  mcraig         Updated Copyright info            Revision 1 2  1996 05 09 00:22:17  mcraig         Sped up significantly by using str_sep to handle the translation   No longer         relies on routines fromother user libraries            Revision 1 1  1996 01 31 18:47:37  mcraig         Initial revision     RELEASE:          Name: Rel_2_1_2       COPYRIGHT:    Copyright  C  1996 The Regents of the University of California  All    Rights Reserved   Written by Matthew W  Craig     See the file COPYRIGHT for restrictions on distrubting this code     This code comes with absolutely NO warranty  see DISCLAIMER for details      FUNCTION strtrans  InputString  from  to  ned                        HELP Help     compile_opt idl2  strictarrsubs      Bomb out to caller if error      On_error  2    Offer help if we don t have at least InputString  from  and to  or   if the user asks for it      IF  n_params  LT 3  OR keyword_set help  THEN BEGIN         offset                 print  offset Translate all occurences of one substring to another          print  offset new   strtrans oldstr from to ned          print  offset Inputs:          print  offset offset oldstr   string on which to operate               in          print  offset offset           May be an array          print  offset offset from     substrings to be translated  May be      in          print  offset offset           an array          print  offset offset to       what strings in from should be           in          print  offset offset           translated to  May be an array          print  offset Outputs:          print  offset offset new      Translated string  Array if oldstr is    out          print  offset offset           an array          print  offset offset ned      number of substitutions performed in     out          print  offset offset           oldstr   Array if oldstr is an array          print  offset Notes:          print  offset offset  Any of old  from  and to can be arrays             print  offset offset  from and to must have the same number of elements          return   1     ENDIF           strn   InputString     Check that From To have same number of elements   RETURN if they don t      NFrom   n_elements from      NTo   n_elements to      IF  NFrom EQ 0  OR  NTo EQ 0  THEN return  strn     IF NFrom NE NTo THEN BEGIN         print Error: Number of elements in from to unequal          return 1     ENDIF     Make sure there are no null strings in From   RETURN if there are         FromLen   strlen From      IF  total FromLen EQ 0  GT 0  THEN BEGIN         print   Error: elements of From must have nonzero length          return   1     ENDIF       NStrings   n_elements strn      ned   lonarr NStrings      tmpned   0L    Say strn a b c  from  and to   Then the approach here is to   first split strn at all occurances of   then recombine the pieces   with   inserted instead   Do this for all elements of strn  and   all elements of from      FOR i   0L  NStrings 1 DO BEGIN         ned i    0L         FOR j 0L  NFrom 1 DO BEGIN             SepStr   strsplit strn i  from j                                   EXTRACT   REGEX   PRESERVE_NULL              NSubs   n_elements SepStr    1             strn i    SepStr 0              FOR k 1L  NSubs DO strn i    strn i    To j    SepStr k              ned i     ned i    NSubs         ENDFOR      ENDFOR      return  strn END "); 
     180a[178] = new Array("./Textoidl/sub_sup_idl.html", "sub_sup_idl.pro", "", "      NAME:         SUB_SUP_IDL   PURPOSE:         Return the proper IDL font positioning command for TeX         sub superscripts     CATEGORY:   CALLING SEQUENCE:         fnt   sub_sup_idl  strn     INPUTS:         strn   Either   or  _  the TeX super subscript       in                 characters   KEYWORD PARAMETERS:          FORCE_UD   Set this to use  U D instead of  E I for                      sub superscripts     OUTPUTS:         fnt   Either  U  or  E  for superscripts               out                or  D  or  I  for subscripts    COMMON BLOCKS:   SIDE EFFECTS:   NOTES:   EXAMPLE:   LIBRARY FUNCTIONS CALLED:             MODIFICATION HISTORY:          Id: sub_sup_idl pro 134 2006 07 07 10:19:08Z navarro            Log: sub_sup_idl pro v           Revision 1 1  1996 01 31 18:47:37  mcraig         Initial revision     RELEASE:          Name: Rel_2_1_2     FUNCTION Sub_sup_idl  token   FORCE_UD   force_ud     compile_opt idl2  strictarrsubs    IF keyword_set force_ud  THEN BEGIN      IF  token EQ   THEN return   U       IF  token EQ  _  THEN return   D      return    ENDIF ELSE BEGIN     IF  token EQ   THEN return   E       IF  token EQ  _  THEN return   I      return    ENDELSE  END  "); 
     181a[179] = new Array("./Textoidl/textable.html", "textable.pro", "", "     file_comments   Returns a translation table from TeX to IDL       categories   Text  String      keyword POSTSCRIPT   If set  return postscript translation   table rather than vector fonts table    Default is translations for vector fonts       keyword HELP   Print help and exit       keyword VECTOR        returns   a 2D text array   table 0  contains the words to be translated away  table 1    contains the words to translate them to       restrictions   To find out what TeX sequences are available  look at table 0       history          Log: textable pro v           Revision 1 8  2004 06 15 17:25:54  mcraig         Fixed bug in regular expression  changed array notation to square brackets           Revision 1 7  1996 07 22 23:56:08  mcraig         Added  vartheta            Revision 1 6  1996 07 12 21:31:42  mcraig         Fixed  varphi in vector font  added  circ            Revision 1 5  1996 06 14 20:00:27  mcraig         Updated Copyright info            Revision 1 4  1996 05 09 00:22:17  mcraig         Added command to return to previous font after switching to Greek or         symbol font            Revision 1 3  1996 02 08 19:49:35  mcraig         Removed control sequence  perp because the postscript code for it is             Revision 1 2  1996 02 08 18:53:38  mcraig         Added translations for PostScript fonts  and added several new TeX         control sequences            Revision 1 1  1996 01 31 18:47:37  mcraig         Initial revision      Copyright  C  1996 The Regents of the University of California  All    Rights Reserved   Written by Matthew W  Craig     See the file COPYRIGHT for restrictions on distrubting this code     This code comes with absolutely NO warranty  see DISCLAIMER for details       version    Id: textable pro 163 2006 08 29 12:59:46Z navarro     FUNCTION textable  POSTSCRIPT ps  VECTOR vec   HELP Help     compile_opt idl2  strictarrsubs      Return to caller if error      On_error  2    Print help if necessary      IF keyword_set Help   THEN BEGIN         offset                 print  offset Returns a translation table from TeX to IDL          print  offset table   textable          print  offset Keywords:          print  offset offset POSTSCRIPT   If set  return postscript translation          print  offset offset                table rather than vector fonts table          print  offset offset                Default is translations for vector          print  offset offset                fonts          print  offset offset HELP         Print help and exit          print  offset Outputs:          print  offset offset table   a 2D text array   table 0  contains          out          print  offset offset          the words to be translated away  table 1          print  offset offset          contains the words to translate them to          print  offset Notes:          print  offset offset To find out what TeX sequences are available  look at          print  offset offset table 0      ENDIF       VECFONT 1                     index of vector font in translation table     PSFONT 2  index of postscript font in trans table     IF keyword_set ps  THEN FontSelection PSFONT ELSE FontSelection VECFONT     Set IDL font sequence needed to switch to Greek letters      GreekFont   strarr 3      GreekFont VECFONT     7      GreekFont PSFONT     M      Set IDL font sequence needed to switch to special symbol font      SymbolFont   strarr 3      SymbolFont VECFONT     M      SymbolFont PSFONT     M      Set IDL font sequence needed to switch back to initial font      PreviousFont   strarr 3      PreviousFont VECFONT     X      PreviousFont PSFONT     X    lowercase Greek         Note there is some trickery involved in getting  varphi      to work in the vector fonts  because it is actually      a member of the symbol font set  not the Greek font      set   Go figure   Solution is just to make the vector      character a switch to symbol  the proper character from      that font  and a switch back out of symbol   Same comment holds      for  vartheta           TeX SEQUENCE       VECTOR       POSTSCRIPT     LowercaseGreek        alpha       a             a           beta        b             b           gamma       c             g           delta       d             d           epsilon     e             e           zeta        f             z           eta   g       h           theta   h       q           iota   i       i           kappa   j       k           lambda   k       l           mu   l       m           nu   m       n           xi   n    S  Rx         pi   p       p           rho   q       r           sigma   r       s           tau   s       t           upsilon   t       u           phi   u       f           chi   v       c           psi   w       y           omega   x       w           varpi   p       v           varepsilon   e             e           varphi                SymbolFont VECFONT P PreviousFont VECFONT                                                   j           vartheta                SymbolFont VECFONT t PreviousFont VECFONT                                                   J                                 Uppercase Greek             TeX SEQUENCE        VECTOR          POSTSCRIPT     UppercaseGreek        Gamma   C              G               Delta   D              D               Theta   H              Q               Lambda   K              L               Xi   N            S  RX             Pi   P              P               Sigma   R              S               Upsilon   T       string byte 161        Phi   U              F               Psi   W              Y               Omega   X              W                   Special symbols       NOTES   You must leave  infty before  in in the translatation             table to avoid having the  in part of  infty translated             away                            DO NOT blindly add the control sequence  perp   Its             PostScript code is   which leads to thing being             interpreted as superscripts which shouldn t be             TeX SEQUENCE        VECTOR          POSTSCRIPT     Symbols        aleph        string byte 192        ast                              cap   3      string byte 199        cdot        string byte 215        cup   1      string byte 200        exists   E                            infty        string byte 165        in   e      string byte 206        equiv   :      string byte 186        pm        string byte 177        div        string byte 184        subset   0      string byte 204        superset   2      string byte 201        leftarrow   4      string byte 172        downarrow   5      string byte 175        rightarrow   6      string byte 174        uparrow   7      string byte 173        neq        string byte 185        propto        string byte 181        sim   A      string byte 126        partial   D      string byte 182        nabla   G      string byte 209        angle   a      string byte 208        times   X      string byte 180        geq   b      string byte 179        leq   l      string byte 163               string byte 162        prime        string byte 162        circ        string byte 176                              LowercaseGreek 1            GreekFont FontSelection            LowercaseGreek FontSelection            PreviousFont FontSelection      UppercaseGreek 1            GreekFont FontSelection          UppercaseGreek FontSelection            PreviousFont FontSelection      Symbols 1            SymbolFont FontSelection            Symbols FontSelection            PreviousFont FontSelection       TranslationTable    LowercaseGreek UppercaseGreek Symbols      return TranslationTable 0:1   END  "); 
     182a[180] = new Array("./Textoidl/textoidl.html", "textoidl.pro", "", "     file_comments   Convert a valid TeX string to a valid IDL string for plot labels       categories   Text  String      param INPUTSTRING  in required    TeX string to be converted   Will not be modified   old may be a string array       keyword FONT   Set to 0 to use hardware font   1 to use    vector   Note that the only hardware font    supported is PostScript       keyword TEX_SEQUENCES   return the available TeX sequences      keyword HELP   print out info on use of the function and exit       restrictions           Use the procedure SHOWTEX to get a list of the available TeX           control sequences              The only hardware font for which translation is available is           PostScript             The only device for which hardware font            translation is available is PostScript            The FONT keyword overrides the font selected            by  p font       examples         out   TeXtoIDL Gamma 2   5N_ ed          The string out may be used in XYOUTS or other IDL text         display routines   It will be an uppercase Gamma  with an         exponent of 2  then a plus sign  then an N with the subscript         ed       history          Log: textoidl pro v           Revision 1 7  2004 06 15 17:25:54  mcraig         Fixed bug in regular expression  changed array notation to square brackets           Revision 1 6  2004 01 11 01:49:00  mcraig         Changed format of one array to newer   style to avoidf conflict with function name in astro library            Revision 1 5  2001 11 23 21:10:55  mcraig         Added backslash   to tex sequences in translation table to protect them during regexp search in strsplit            Revision 1 4  1996 06 14 20:00:27  mcraig         Updated Copyright info            Revision 1 3  1996 05 09 00:22:17  mcraig         Added error handling  cleaned up documentation            Revision 1 2  1996 02 08 18:52:50  mcraig         Added ability to use hardware fonts for PostScript device            Revision 1 1  1996 01 31 18:47:37  mcraig         Initial revision      Copyright  C  1996 The Regents of the University of California  All    Rights Reserved   Written by Matthew W  Craig     See the file COPYRIGHT for restrictions on distrubting this code     This code comes with absolutely NO warranty  see DISCLAIMER for details       version    Id: textoidl pro 163 2006 08 29 12:59:46Z navarro       FUNCTION textoidl  InputString                       FONT fnt                       HELP hlp                       TEX_SEQUENCES tex_seq     compile_opt idl2  strictarrsubs       Return to caller if there is an error      On_error  2    We begin by deciding on the font   PostScript   0 means use vector      PostScript   0     IF n_elements fnt  EQ 0 THEN BEGIN       get font from  p font         IF  p font NE  1 THEN BEGIN          User wants hardware font              PostScript 1         ENDIF     ENDIF ELSE BEGIN                         get font from FONT keyword         IF fnt NE  1 THEN PostScript   1     ENDELSE     Bomb out if user wants non PostScript hardware font      IF  PostScript EQ 1  AND  d name NE  PS  THEN BEGIN                                                    Device isn t postscript                                                  and user wants hardware                                                 font   Not good          print Warning: No translation for device:  d name         return InputString                    ENDIF           IF keyword_set  tex_seq  THEN BEGIN         table textable          return table 0      ENDIF       IF keyword_set hlp  OR  n_params  EQ 0  THEN BEGIN         print      Convert a TeX string to an IDL string          print      new   TeXtoIDL old          print        old   TeX string to translate                  in          print        new   resulting IDL string                     out          print      Keywords:          print         FONT       set to  1 to translate for vector fonts           print                     DEFAULT     Set to 0 to translate for          print                    hardware font          print          TEX_SEQUENCES   return the available TeX sequences          print          HELP      print this message and exit          print      NOTES:            print           Use SHOWTEX to obtain a list of the available          print           TeX control sequences          print           old may be a string array   If so  new is too          print           The only device for which hardware font          print           translation is available is PostScript          print           The FONT keyword overrides the font selected          print           by  p font          return   1     ENDIF        PostScript has been set to 1 if PostScript fonts are desired      strn   InputString     table   textable POSTSCRIPT PostScript           Greek sub superscripts need to be protected by putting braces     around them if they are unbraced   This will have the result the     it will be difficult to use   as a sub superscript   Get over it       V2 11 Must include the   in from of translation table TeX     sequences to ensure that strsplit properly treats the   in the     TeX sequence  Since strsplit is doing a regexp replace  and   is     special in regexps  need to escape it      strn    strtrans strn   table 0     table 0        strn    strtrans strn   _ table 0     _ table 0        First we translate Greek letters and the like   This makes guessing    alignment of sub superscripts easier  as all special characters will then    be one character long       V2 11 Must include the   in from of translation table TeX     sequences to ensure that strsplit properly treats the   in the     TeX sequence  Since strsplit is doing a regexp replace  and   is     special in regexps  need to escape it      strn   strtrans strn   table 0    table 1          FOR i   0L  n_elements strn 1 DO BEGIN          strn i    translate_sub_super strn i    Take care of sub superscripts     ENDFOR       return strn END "); 
     183a[181] = new Array("./Textoidl/translate_sub_super.html", "translate_sub_super.pro", "", "     file_comments   Return the proper IDL font positioning command for TeX   sub superscripts        categories   Text  String      param TOKEN   Either   or  _  the TeX super subscript characters      keyword FORCE_UD   Set this to use  U D instead of  E I for sub superscripts       returns   Either  U  or  E  for superscripts  or  D  or  I  for subscripts       uses        restrictions   Make sure sub_sup_idl stays before translate_sub_super   At least   for now  when IDL encounters a function and automatically compiles   it  it only compiles the functions in the file up to the named   function   So even if sub_sup_idl was declared with   FORWARD_FUNCTION in translate_sub_super  it would not properly   compile       The file translate_sub_super pro contains two functions    translate_sub_super  and sub_sup_idl   The former is the   generic routine for processing TeX sub superscripts  the   latter is used only by translate_sub_super and has no general   utility   Hence it lives here   You will see documentation for   translate_sub_super second if you use DOC_LIBRARY      Used only by translate_sub_super   Should be kept in same   file        examples        history          Log: translate_sub_super pro v           Revision 1 5  2000 06 14 19:09:22  mcraig         Changed name of strtok str_token to avoid conflict in IDL 5 3            Revision 1 4  1996 06 14 20:00:27  mcraig         Updated Copyright info            Revision 1 3  1996 05 09 00:22:17  mcraig         Changed some function calls to reflect changes in those functions  moved         some code out of the main loop that didn t need to be there  added         documentation            Revision 1 1  1996 01 31 18:47:37  mcraig         Initial revision      Copyright  C  1996 The Regents of the University of California  All    Rights Reserved   Written by Matthew W  Craig     See the file COPYRIGHT for restrictions on distrubting this code     This code comes with absolutely NO warranty  see DISCLAIMER for details       version    Id: translate_sub_super pro 163 2006 08 29 12:59:46Z navarro     FUNCTION sub_sup_idl  token   FORCE_UD   force_ud     compile_opt idl2  strictarrsubs      provide help if needed      IF  n_params  NE 1  OR keyword_set Help  THEN BEGIN         offset                 print  offset Return the proper IDL font positioning command for TeX          print  offset sub superscripts            print  offset fnt   sub_sup_idl  strn           print  offset Inputs:          print  offset offset strn        Either   or  _  the TeX super subscript       in          print  offset offset              characters          print  offset Keywords:          print  offset offset FORCE_UD   Set this to use  U D instead of  E I for          print  offset offset              sub superscripts           print  offset offset HELP       Set to print useful message and exit          print  offset Outputs:          print  offset offset fnt         Either  U  or  E  for superscripts              out          print  offset offset              or  D  or  I  for subscripts          return   1     ENDIF       IF keyword_set force_ud  THEN BEGIN          IF  token EQ   THEN return   U           IF  token EQ  _  THEN return   D          return        ENDIF ELSE BEGIN         IF  token EQ   THEN return   E           IF  token EQ  _  THEN return   I          return        ENDELSE      END        NAME:         TRANSLATE_SUB_SUPER   PURPOSE:         Translate TeX sub superscripts to IDL sub superscripts    CATEGORY:         text strings   CALLING SEQUENCE:         new   translate_sub_super  old     INPUTS:         old         string to be translated from TeX to IDL    in   KEYWORD PARAMETERS:          RECURSED   set if this function is being called                       recursively                             HELP       Set to print useful message and exit    OUTPUTS:         new         string old converted from TeX to IDL       out   COMMON BLOCKS:   SIDE EFFECTS:   NOTES:           For best results  when both a sub and superscript are used            place the shorter of the two first  e g   N a _ bbbb  is           better than  N_ bbbb a            Single character sub super scripts do not need to be           protected by braces            Sub superscripts may be nested  e g   N N_1 N    EXAMPLE:         out   translate_sub_super   N 2_ big            Then out N U2 N Dbig N  which looks like it should on the         display     LIBRARY FUNCTIONS CALLED:         str_token        Text string  mcraig          sub_sup_idl   contained in this file   MODIFICATION HISTORY:          Id: translate_sub_super pro 163 2006 08 29 12:59:46Z navarro            Log: translate_sub_super pro v           Revision 1 5  2000 06 14 19:09:22  mcraig         Changed name of strtok str_token to avoid conflict in IDL 5 3            Revision 1 4  1996 06 14 20:00:27  mcraig         Updated Copyright info            Revision 1 3  1996 05 09 00:22:17  mcraig         Changed some function calls to reflect changes in those functions  moved         some code out of the main loop that didn t need to be there  added         documentation            Revision 1 2  1996 02 08 18:54:20  mcraig         Changed default sub superscript size to be  D U rather than  I E to         improve readability of plat annotations            Revision 1 1  1996 01 31 18:47:37  mcraig         Initial revision     RELEASE:          Name: Rel_2_1_2       COPYRIGHT:    Copyright  C  1996 The Regents of the University of California  All    Rights Reserved   Written by Matthew W  Craig     See the file COPYRIGHT for restrictions on distrubting this code     This code comes with absolutely NO warranty  see DISCLAIMER for details    FUNCTION translate_sub_super  InputString                                  RECURSED recursed                                  HELP Help     compile_opt idl2  strictarrsubs      Return to caller if error      On_error  2    Offer help if needed and or desired     IF  n_params  NE 1  OR keyword_set help  THEN BEGIN         offset                 print  offset Translate TeX sub superscripts to IDL sub superscripts          print  offset new   translate_sub_super  old           print  offset Inputs:          print  offset offset old         string to be translated from TeX to IDL    in          print  offset Keywords:          print  offset offset RECURSED   set if this function is being called           print  offset offset              recursively                             print  offset offset HELP       Set to print useful message and exit          print  offset Outputs:          print  offset offset new         string old converted from TeX to IDL       out          print  offset Notes:          print  offset offset  For best results  when both a sub and superscript are used          print  offset offset   place the shorter of the two first  e g   N a _ bbbb  is          print  offset offset   better than  N_ bbbb a          print  offset offset  Single character sub super scripts do not need to be          print  offset offset   protected by braces          print  offset offset  Sub superscripts may be nested  e g   N N_1 N          return   1     ENDIF      To allow for nested scripts  use  E I instead of  U D for scripts    when called recursively      IF  NOT keyword_set recursed  THEN         ud   1       ELSE         ud   0     Return to the normal level after making sub superscript unless we    are recursed  which indicates we are processing a nested script      IF keyword_set recursed  THEN fontRestore     ELSE fontRestore    N      Initialize vars for processing scripts      SpcByte    byte   0      We need the BYTE value for a space below      strn   InputString     pos   0     StorePos         RecallPos         OldToken          LenLastScript   0    Grab next sub superscript   Token will be either   or  _    RETURN if no scripts      Token   nexttok strn    _  pos   pos      if pos EQ  1 then return  InputString  nothing to process       FntChange    sub_sup_idl Token     Our approach will be to grab the input string up to the next   or    _  then process the script we ve found      NewString str_token strn Token       WHILE  strlen strn  GT  0 DO  BEGIN    Grab first char of sub superscript          Script   strmid strn  0  1          EndOfScript   0          Position of end of this script          IF  Script EQ   THEN BEGIN     Scripts of more than 1 char              EndOfScript   matchdelim strn                    Script   translate_sub_super strmid strn  1  EndOfScript 1                                              recursed           ENDIF        Grab rest of string _after_ the end of the script                  strn   strmid strn  EndOfScript 1                          strlen strn EndOfScript 1         Find the next script and prepare for processing it          FntChange   sub_sup_idl Token  FORCE_UD   ud          OldToken   Token         Token   nexttok strn   _  POS   pos         If the input is  n 2_j  we want the  2  to be directly above       the  j  rather than having the  j  below and to the right of       the 2   In other words  we want the first below  not the second                 2               2               N               N                J                J       To accomplish this  we need to save the position at which we       begin writing the 2 with a  S  and restore that position with a        R after writing the 2   The first section in the IF block below       handles the  J  above  the thing after the first script   We       don t care if there is another script following   We also padd       the second script with spaces if it is shorter than the first to       make sure that whatever comes out after the scripts starts in       the proper place   The worry is that without the spaces  the       input  N looong _ s    1  will end up with the   starting right       the  s  ends          IF  StorePos EQ  S  THEN BEGIN             StorePos                 RecallPos           calculate the difference in length between this script and the        previous stacked one  removing font change commands  crudely by       guessing that the number of characters this takes is twice the       number of exclamation points   The    1 below is a kludge   I       don t know why  but I need one extra space              NumSpaces   LenLastScript    strlen script    2 strcnt Script              NumSpaces    NumSpaces   1    0             IF NumSpaces GT 0 THEN                 Script   Script   string  replicate SpcByte  NumSpaces            ENDIF ELSE BEGIN             IF  Token NE OldToken  AND  pos EQ 0  THEN BEGIN               The next script immediately folows this one   Arrange to               save the position of the current script so that both begin               with the same horizontal position                  StorePos    S                  RecallPos    R                  LenLastScript   strlen Script    2 strcnt Script              ENDIF         ENDELSE       Continue building the IDL string  adding on our just processed script          NewString   NewString   StorePos   FntChange   Script   RecallPos               FontRestore          IF   pos NE  1   THEN BEGIN       more left to process                  NewString   NewString                   str_token strn  Token             ENDIF ELSE BEGIN                  we are done             NewString   NewString   strn             strn             ENDELSE     ENDWHILE           return  NewString END    "); 
     184a[182] = new Array("./ToBeReviewed/CALCULS/depth2floatlevel.html", "depth2floatlevel.pro", "", "           file_comments   Rather comparable to depth2level but here  the calculated level is in float     For example  the level 5 4 correspond to a depth equal    to gdep 5 4 gdep 6 gdep 5       categories    Without loop      param TAB  in required    2d depth array  or a structure respecting litchamp criterion       keyword NOMASK   To do not mask land points      returns   An 2d array of float containing levels s values       uses   common pro      restrictions   Accept values at  values f_nan and mask land points at valmask       examples      IDL  a jpk 1 1 jpi jpj findgen jpi jpj       IDL  plt  1e6 a floatlevel2depth depth2floatlevel a nocontour       champ nul a 1e 6 pres      history    Sebastien Masson  smasson lodyc jussieu fr                         15 06 2000       version    Id: depth2floatlevel pro 163 2006 08 29 12:59:46Z navarro             FUNCTION depth2floatlevel  tab  NOMASK   nomask     compile_opt idl2  strictarrsubs      tempsun   systime 1            for key_performance  common      depthin   litchamp tab       levelup   depth2level depthin   UPPER   nomask     depthup   level2depth levelup   nomask       levellow   depth2level depthin   lower   nomask     depthlow   level2depth levellow   nomask    calculate the distance depthlow depthup and management of the case    of this distance is null or eqal to  values f_nan    divi   depthlow depthup    nan   where finite divi  EQ 0     if nan 0  NE  1 then divi nan    0    nan   where divi EQ 0     if nan 0  NE  1 then divi nan     values f_nan   calculation of the result    res   levelup depthin depthup divi   We mask land point at valmask    if NOT keyword_set nomask  then begin       grille mask       if n_elements valmask  EQ 0 then valmask   1e20       terre   where temporary mask    0  EQ 0        if terre 0  NE  1 then res terre    valmask    endif      if keyword_set key_performance  THEN print   temps depth2floatlevel  systime 1 tempsun       return  res end"); 
     185a[183] = new Array("./ToBeReviewed/CALCULS/depth2level.html", "depth2level.pro", "", "             file_comments    Allows to pass from a 2d depth array to a corresponding 2d level array       categories   Without loop      param TAB  type 2d array    2d depth array  or a structure respecting litchamp critrions       keyword UPPER    activated by default  We select the level just above the depth      keyword LOWER   We select the level just below the depth       keyword CLOSER    We select the depth s closer level       keyword NOMASK    To do not mask land points      returns    It is a 2d array containing level s values       uses   common pro      restrictions    For depths out of gdep s values  the value  values f_nan is sent back    if the depth is superior to this one of the bottom  we send back jpk 1 in    the upper case  and  values f_nan in the lower case       history   Sebastien Masson  smasson lodyc jussieu fr                          17 6 1999                         15 6 2000 accepte  values f_nan      version    Id: depth2level pro 163 2006 08 29 12:59:46Z navarro           FUNCTION depth2level  tab  LOWER   lower  UPPER   upper  CLOSER   closer                           NOMASK   nomask  _extra   ex     compile_opt idl2  strictarrsubs      tempsun   systime 1            for key_performance  common      upper   1    if keyword_set lower  THEN upper   0     Reading of the input field and recuperation of the used subdomain s size      in   litchamp tab     grille mask 1 1 gdep nx ny nz firstx firsty firstz lastx lasty lastz     Verification of the coherence between array s size and the defined by domdef domain      IF ny EQ 1 THEN in   reform in  nx  ny   over     taille   size in     if taille 0  NE 2 then return  report le champ en entree doit contenir un tableau 2d     case 1 of       taille 1  eq jpi and taille 2  eq jpj:in in firstx:lastx  firsty:lasty        taille 1  eq  nx and taille 2  eq  ny:       else:return  report Probleme d adequation entre les tailles du domaine et celle du champ     endcase         delete points at  values f_nan    notanumber   where finite in   nan  EQ 1     if notanumber 0  NE  1 then in notanumber    0     We transform the 2d deth value in a 2d array of levels corresponding to depthes     We go on array who have the size of 3d arrays    prof replicate 1 nx ny gdep firstz:lastz      in   in replicate 1  nz       mask01    prof  LT in     mask01   reform mask01  nx  ny  nz     levels   total mask01  3     notvalid   where levels EQ nz     if keyword_set upper  then begin       levels   levels 1       notvalid   where levels EQ  1     ENDIF ELSE notvalid   where levels EQ nz     IF notvalid 0  NE  1 THEN levels notvalid     values f_nan    If closer is activated    if keyword_set closer  then begin       test      litchamp tab level2depth levels                      level2depth   levels 1 jpk 1   litchamp tab          test   test    0 test    1        changer   where test GE 0        if changer 0  NE  1 then levels changer     levels changer 1     jpk 1     endif     We put back points at  values f_nan    if notanumber 0  NE  1 then levels notanumber     values f_nan   We mask land points at valmask    if NOT keyword_set nomask  then begin       if n_elements valmask  EQ 0 then valmask   1e20       terre   where mask    0  EQ 0        if terre 0  NE  1 then levels terre    valmask    endif          if keyword_set key_performance  THEN print   temps depth2level  systime 1 tempsun     return  levels end"); 
     186a[184] = new Array("./ToBeReviewed/CALCULS/depth2mask.html", "depth2mask.pro", "", "             file_comments    Allows to pass from a 2d depth sill array to a 3d array of mask    with one of levels above the sill depth and 0s below       categories   Without loop      param TAB  type 3d array    2d sill depth array  or a structure respecting litchamp critrions       keyword _EXTRA   used to pass your keywords       returns   It is a 3d array containing the mas associated to the 2d sill depth array      uses   common pro      history   Sebastien Masson  smasson lodyc jussieu fr                          17 6 1999      version    Id: depth2mask pro 163 2006 08 29 12:59:46Z navarro             FUNCTION depth2mask  tab  _extra   ex       compile_opt idl2  strictarrsubs      tempsun   systime 1            For key_performance  common     We transform the 2d deth value in a 2d array of levels corresponding to depthes      niveaux   depth2level tab  _extra   ex     IF niveaux 0  EQ  1 THEN return    1     We transform the 2d array in a 3d array of mask      mask   level2mask niveaux       if keyword_set key_performance  NE 0 THEN print   temps depth2mask  systime 1 tempsun     return  mask end"); 
     187a[185] = new Array("./ToBeReviewed/CALCULS/determ2.html", "determ2.pro", "", "      file_comments   computes the determinant of n 2 by 2 arrays   Z2DS is an 2 2 n array      categories    Without loop       param A  in required    n element array   Defined as z2ds 0  0      z1d00      param B  in required    n element array   Defined as z2ds 0  1      z1d01      param C  in required    n element array   Defined as z2ds 1  0      z1d10      param D  in required    n element array   Defined as z2ds 1  1      z1d11      returns    n elements array  the determinent of each 2 2 arrrays      examples   a findgen 2 2 5    print  determ2 a    FOR i 0 4 DO print  determ a i    IDL solution      history             S  Masson  smasson lodyc jussieu fr              July 11th  2002      version    Id: determ2 pro 157 2006 08 21 09:01:50Z navarro       FUNCTION determ2  a  b  c  d     compile_opt idl2  strictarrsubs     CASE n_params  OF     1:res   a 0  0   a 1  1   a 0  1   a 1  0        4:res   a d c b      ELSE:stop   ENDCASE    RETURN  res END"); 
     188a[186] = new Array("./ToBeReviewed/CALCULS/determ3.html", "determ3.pro", "", "       file_comments   computes the determinant of n 3 by 3 arrays    Z2DS is an 3 3 n array      categories   Without loop      param IN00  in required    It is an n element array   defined by in00   z2ds 0  0         param IN01  in required    It is an n element array   defined by in01   z2ds 0  1         param IN02  in required    It is an n element array   defined by in02   z2ds 0  2         param IN10  in required    It is an n element array   defined by in10   z2ds 1  0           param IN11  in required    It is an n element array   defined by in11   z2ds 1  1           param IN12  in required    It is an n element array   defined by in12   z2ds 1  2           param IN20  in required    It is an n element array   defined by in20   z2ds 2  0           param IN21  in required    It is an n element array   defined by in21   z2ds 2  1           param IN22  in required    It is an n element array   defined by in22   z2ds 2  2         returns    n elements array  the determinant of each 3 3 arrays      examples   a findgen 3 3 5    print  determ3 a 2    FOR i 0 4 DO print  determ a i 2    IDL solution      history             S  Masson  smasson lodyc jussieu fr              July 11th  2002      version    Id: determ3 pro 163 2006 08 29 12:59:46Z navarro       FUNCTION determ3  in00  in01  in02  in10  in11  in12  in20  in21  in22     compile_opt idl2  strictarrsubs     IF n_params  EQ 1 THEN BEGIN     in00save   temporary in00      in00   in00save 0  0        in01   in00save 0  1        in02   in00save 0  2        in10   in00save 1  0        in11   in00save 1  1        in12   in00save 1  2        in20   in00save 2  0        in21   in00save 2  1        in22   in00save 2  2      ENDIF    a01    determ2 in10  in20                       in12  in22     a11   determ2 in00  in20                      in02  in22     a21    determ2 in00  in10                       in02  in12     res   in01 a01 in11 a11 in21 a21    IF n_params  EQ 1 THEN in00   temporary in00save     RETURN  res END"); 
     189a[187] = new Array("./ToBeReviewed/CALCULS/floatlevel2depth.html", "floatlevel2depth.pro", "", "             file_comments    Rather comparable to level2depth  It is the invert function of depth2floatlevel      categories   Without loop      param TAB   2d array of sill levels  or a structure respecting litchamp criterions       keyword NOMASK   To do not mask land points      returns   2d array containing depthes      uses   common pro      examples      IDL  a gdept jpk 1 1 jpi jpj findgen jpi jpj       IDL  plt  1e6 a floatlevel2depth depth2floatlevel a nocontour       null field at 1e 6 pres      history   Sebastien Masson  smasson lodyc jussieu fr                         15 6 2000      version    Id: floatlevel2depth pro 163 2006 08 29 12:59:46Z navarro             FUNCTION floatlevel2depth  tab  NOMASK   nomask     compile_opt idl2  strictarrsubs      tempsun   systime 1            To key_performance  common      flevelin   litchamp tab    We delete points at  values f_nan    notanumber   where finite flevelin   nan  EQ 1     if notanumber 0  NE  1 then flevelin notanumber    0   We sill  delete land points at valmask for example     flevelin   0   flevelin    jpk 1    We caculate the depth     depthup   level2depth floor flevelin   nomask     depthlow  level2depth ceil flevelin   nomask     weight   flevelin floor flevelin     res   depthup weight depthlow depthup    We put back points at  values f_nan    if notanumber 0  NE  1 then res notanumber     values f_nan   We mask land points at valmask    if NOT keyword_set nomask  then begin       grille mask       if n_elements valmask  EQ 0 then valmask   1e20       terre   where temporary mask    0  EQ 0        if terre 0  NE  1 then res terre    valmask    endif      if keyword_set key_performance  THEN print   temps floatlevel2depth  systime 1 tempsun       return  res end"); 
     190a[188] = new Array("./ToBeReviewed/CALCULS/fsfzpt.html", "fsfzpt.pro", "", "     file_comments        categories        param PFS        param PFP        returns        uses        restrictions        examples        history        version    Id: fsfzpt pro 163 2006 08 29 12:59:46Z navarro       Ice freezing point        fsfzpt: freezing point of seawater in degrees celsius         units : salinity        pfs        ipss 78                  pressure        pfp      decibars                 temperature     fszfpt   degrees celsius                 freezing pt  reference : unesco tech  papers in the marine science no 28 1978                 eigth report jpots                 annex 6 freezing point of seawater F J Millero pp 29 35  checkvalue: fsfzpt 2 588567 deg c for s 40 0 p 500 decibars      todo seb     FUNCTION fsfzpt  pfs  pfp     compile_opt idl2  strictarrsubs     RETURN     0 0575   1 710523e 3   sqrt pfs    2 154996e 4   pfs      pfs   7 53e 4   pfp END"); 
     191a[189] = new Array("./ToBeReviewed/CALCULS/grossemoyenne.html", "grossemoyenne.pro", "", "             file_comments     averages a 3  or 4 d time series field over a selected   geographical area or along the time axis  For one ore more   selected axes  x  y  z  t       categories      param TAB  in required    3 or 4d field      param DIREC  in required     x   y   z   t   xy   xz   yz   xyz   xt   yt   zt     xyt   xzt   yzt  or  xyzt        keyword BOXZOOM      xmin xmax ymin ymax  zmin zmax  to more details  see domdef   boxzoom can have 5 forms:     vert2   vert1  vert2 lon1  lon2  lat1  lat2       lon1  lon2  lat1  lat2  vert2 lon1  lon2  lat1  lat2  vert1 vert2                    keyword NAN    not a number  we activate it if we want to average without considerate some masked values of TAB    If masked values of TAB are values consecrated by IDL values f_nan  wr just have to put NAN    If masked values of TAB are valued a  a must be different of 1  corresponding to nan      values f_nan and of 0  which desactivate nan  We have to put NAN a     Comment: In output  rsult points which are NAN will be valued a or  values f_nan                   keyword NODOMDEF   We activate it if we do not want to pass in domdef even if the keyword boxzoom    is present  like when grossemoyenne is called via checkfield       keyword INTEGRATION    To make an integral rather than an average      keyword SPATIALFIRST    when performing at the same time   spatial and temporal mean  grossemoyenne is assuming   that the mask is not changing with the time  In   consequence  grossemoyenne performs temporal mean   first and then call moyenne  Activate  SPATIALFIRST if   you want to perform the spatial mean before the   temporal mean  Note that if NAN is activated  then   SPATIALFIRST is activated automatically       keyword TEMPORALFIRST    to force to perform first temporal   mean even if nan is activated  see SPATIALFIRST   explanations          keyword WDEPTH    to specify that the field is at W depth instead of T    depth  automatically activated if vargrid eq  W        uses   result:un tableau    common   domdef      restrictions Put values corresponding to land at 1 e20      history    Jerome Vialard  jv lodyc jussieu fr   2 7 98                         Sebastien Masson  smasson lodyc jussieu fr    adaptation array containing a temporal dimension                          14 8 98                         15 1 98                         12 3 99 adaptation for NAN and utilization of TEMPORARY      version    Id: grossemoyenne pro 163 2006 08 29 12:59:46Z navarro      function grossemoyenne  tab  direc  BOXZOOM   boxzoom  INTEGRATION   integration                             NAN   nan  NODOMDEF   nodomdef  WDEPTH   wdepth                             SPATIALFIRST   spatialfirst  TEMPORALFIRST   temporalfirst                             _extra   ex       compile_opt idl2  strictarrsubs    cm_4mesh  cm_4data  cm_4cal   IF NOT keyword_set key_forgetold  THEN BEGIN  updatenew  updatekwd   ENDIF     tempsun   systime 1             For key_performance    I  preliminaries     dirt   0   dirx   0   diry   0   dirz   0   dim     aa      I 1  Directions s  we follow to integrate     if   strpos direc   t  ge 0   then dirt   1   if   strpos direc   x  ge 0   then dirx   1   if   strpos direc   y  ge 0   then diry   1   if   strpos direc   z  ge 0   then dirz   1   IF keyword_set NAN  AND  dirx EQ 1 OR diry EQ 1 OR dirz EQ 1        THEN spatialfirst   1   IF keyword_set temporalfirst  THEN spatialfirst   0     I 2  verification of the input array s size     taille   size tab    case 1 of     taille 0  eq 1 :return   report Le tableau n a qu une dimension  cas non traite      taille 0  eq 2 :return   report Le tableau n a qu deux dimension  cas non traite      taille 0  eq 3 :BEGIN        dim    3d        if dirx eq 0 and diry eq 0 and dirt eq 0 then return  tab     END     taille 0  eq 4 :BEGIN        dim    4d        if dirx eq 0 and diry eq 0 and dirz eq 0 and dirt eq 0 then return  tab     END     else : return  report Le tableau d entree doit etre a 3 ou 4 dimensions s il ne contient pas de dim temporelle utiliser moyenne    endcase       I 3  Obtainment of scale s factors and of the mask on the subdomain concernedby the average    Redefinition of the domain ajusted at boxzoom  at 6 elements    This will allowed us to calculate only in the domain concerned by the average    Domdef  followed by grid give us all arrays of the grid on the subdomain      if keyword_set boxzoom  then BEGIN      Case 1 Of       N_Elements Boxzoom  Eq 1: bte    lon1  lon2  lat1  lat2  0  boxzoom 0        N_Elements Boxzoom  Eq 2: bte    lon1  lon2  lat1  lat2  boxzoom 0  boxzoom 1        N_Elements Boxzoom  Eq 4: bte    Boxzoom  vert1  vert2        N_Elements Boxzoom  Eq 5: bte    Boxzoom 0:3  0  Boxzoom 4        N_Elements Boxzoom  Eq 6: bte   Boxzoom       Else: return  report Wrong Definition of Boxzoom      endcase     if NOT keyword_set nodomdef  then BEGIN        savedbox   1b       saveboxparam   boxparam4grmoyenne dat        domdef  bte  GRIDTYPE   vargrid  _extra   ex     ENDIF    ENDIF      attribution of the mask and of longitude and latitude arrays      grille  mask  glam  gphi  gdep  nx  ny  nz  firstx  firsty  firstz  lastx  lasty  lastz  e1  e2  e3  WDEPTH   wdepth     I 4  if dirt equal 1  we make the temporal average and we send it in moyenne     if dirt EQ 1 AND NOT keyword_set spatialfirst  then begin     if dim EQ 3d then BEGIN        case 1 of         taille 1  eq jpi and taille 2  eq jpj and taille 3  eq jpt:             res   tab firstx:firstx nx 1                         firsty:firsty ny 1            taille 1  EQ  nx and taille 2  eq  ny and taille 3  eq jpt:res   tab         else:BEGIN            if keyword_set savedbox  THEN restoreboxparam   boxparam4grmoyenne dat            return  report Probleme d adequation entre les tailles du domaine nx ny jpt  strtrim nx  1 strtrim ny  1 strtrim jpt  1  et du tableau  strtrim taille 1  1 strtrim taille 2  1 strtrim taille 3  1          END       ENDCASE       if keyword_set integration  then begin         res   total res  3  nan   nan        ENDIF ELSE BEGIN         if keyword_set nan  then BEGIN           divi   finite res            divi   total temporary divi  3            notanum   where divi EQ 0            res   total res  3  nan   keyword_set nan   1   divi            if notanum 0  NE  1 then res temporary notanum     values f_nan         ENDIF ELSE res   total res  3 1 taille 3         ENDELSE     ENDIF ELSE BEGIN       case 1 of         taille 1  eq jpi and taille 2  eq jpj and taille 3  eq jpk and taille 4  eq jpt:             res   tab firstx:lastx  firsty:lasty  firstz:lastz            taille 1  eq jpi and taille 2  eq jpj and taille 3  eq nz and taille 4  eq jpt:             res   tab firstx:lastx  firsty:lasty              taille 1  EQ  nx and taille 2  eq  ny and taille 3  eq nz and taille 4  eq jpt:res   tab         taille 1  EQ  nx and taille 2  eq  ny and taille 3  eq jpk and taille 4  eq jpt:             res   tab    firstz:lastz            else:BEGIN             if keyword_set savedbox  THEN restoreboxparam   boxparam4grmoyenne dat            return  report Probleme d adequation entre les tailles du domaine nx ny nz jpt                               strtrim nx  1 strtrim ny  1 strtrim nz  1                              strtrim jpt  1  et du tableau  strtrim taille 1  1                              strtrim taille 2  1 strtrim taille 3  1                              strtrim taille 4  1          END         endcase       if keyword_set integration  then begin         res   total res  4  nan   nan        ENDIF ELSE BEGIN         if keyword_set nan  then begin           divi   finite res            divi   total temporary divi  4            notanum   where divi EQ 0            res   total res  4   nan 1   divi            if notanum 0  NE  1 then res temporary notanum     values f_nan         ENDIF ELSE res   total res  4 1 taille 4        ENDELSE     ENDELSE     if keyword_set savedbox  THEN restoreboxparam   boxparam4grmoyenne dat          return   moyenne temporary res  direc  BOXZOOM   boxzoom  NAN   nan  INTEGRATION   integration  NODOMDEF   nodomdef  WDEPTH   wdepth  _extra   ex    ENDIF ELSE res   tab   IF jpt EQ 1 THEN BEGIN     if keyword_set savedbox  THEN restoreboxparam   boxparam4grmoyenne dat          return  moyenne reform res   over  direc  BOXZOOM   boxzoom  NAN   nan  INTEGRATION   integration  NODOMDEF   nodomdef  WDEPTH   wdepth  _extra   ex    END       II  Case 2d arrays series  tab3d        if  dim eq  3d  then begin       II 1  verification of the coherence of the array s size to average   Verification of the coherence between the array s size and the domain defined by domdef   The input array must have either the total domain s size  jpi jpj jpt  or this    one of the reduced domain  nx ny jpt        case 1 of       taille 1  eq jpi and taille 2  eq jpj and taille 3  eq jpt:           res   tab firstx:firstx nx 1                       firsty:firsty ny 1          taille 1  EQ  nx and taille 2  eq  ny and taille 3  eq jpt:res   tab       else:BEGIN          if keyword_set savedbox  THEN restoreboxparam   boxparam4grmoyenne dat          return  report Probleme d adequation entre les tailles du domaine nx ny jpt  strtrim nx  1 strtrim ny  1 strtrim jpt  1  et du tableau  strtrim taille 1  1 strtrim taille 2  1 strtrim taille 3  1        enD     endcase     if keyword_set nan  NE 0 then BEGIN        if nan NE 1 then BEGIN      If nan is not  values f_nan    we put it at  values f_nan         if abs nan  LT 1e6 then notanumber   where res EQ nan            ELSE notanumber   where abs res  GT abs nan 10          if notanumber 0  NE  1 then res temporary notanumber     values f_nan       ENDIF     ENDIF     Comment : WE HAVE TO BE CAREFUL ABOUT CASES WHERE THE DIMENSION TO AVERAGE   1     AND MAKE SURE THAT IT EXIST  THAT IS WHY WE USE reform nx ny  WHICH CAN    LOOK USELESS AT THE BEGINNING       if nx EQ 1 OR ny EQ 1 then BEGIN        res   reform res  nx  ny  jpt   over        e1    reform e1  nx  ny   over        e2    reform e2  nx  ny   over      endif     if nx EQ 1 OR ny EQ 1 OR nz EQ 1 THEN         mask    reform mask  nx  ny  nz   over      II 3  Different types of average       if keyword_set nan  NE 0 then msknan   finite res  ELSE msknan    1     mask   mask    0      case 1 of        dirx eq 1  and  diry eq 0  : begin         e   temporary e1 temporary mask          echelle    temporary e replicate 1  jpt          echelle   reform echelle  nx  ny  jpt   over          if keyword_set integration  then divi   1 ELSE BEGIN            IF msknan 0  NE  1 THEN divi   total echelle msknan  1              ELSE divi   total echelle  1          ENDELSE         res   total temporary res echelle  1  nan   nan divi   1          if msknan 0  NE  1 then BEGIN           echelle   temporary echelle  NE 0           testnan   temporary msknan echelle           testnan   total temporary testnan  1                 total temporary echelle  1  EQ 0          endif       end        dirx eq 0  and  diry eq 1  : begin         e   temporary e2 temporary mask          if nx EQ 1 OR ny EQ 1 then e   reform e  nx  ny   over          echelle    temporary e replicate 1  jpt          echelle   reform echelle  nx  ny  jpt   over          if keyword_set integration  then divi   1 ELSE BEGIN            IF msknan 0  NE  1 THEN divi   total echelle msknan  2              ELSE divi   total echelle  2          ENDELSE          res   total temporary res echelle  2  nan   nan divi   1          if msknan 0  NE  1 then begin           echelle   temporary echelle  NE 0           testnan   temporary msknan echelle           testnan   total temporary testnan  2                 total temporary echelle  2  EQ 0          endif       end        dirx eq 1  and  diry eq 1  : begin         echelle    temporary e1 temporary e2 temporary mask replicate 1  jpt          echelle   reform echelle  nx  ny  jpt   over          if keyword_set integration  then divi   1 ELSE BEGIN            IF msknan 0  NE  1 THEN divi   total total echelle msknan  1  1              ELSE divi   total total echelle  1  1          ENDELSE         res   total temporary total temporary res echelle  1  nan   nan  1  nan   nan divi   1          if msknan 0  NE  1 then begin           echelle   temporary echelle  NE 0           testnan   temporary msknan echelle           testnan   total total temporary testnan  1  1                 total total temporary echelle  1  1  EQ 0          endif       end     endcase   endif       III  Case 3d arrays series  tab4d      if  dim eq  4d  then begin     III 1  Verification of the coherence of the array to average size    Verification of the coherence between the array s size and the domain    defind by domdef    The input array must have either the total domain size  jpi jpj jpk jpt     or this one of the reduced domain  nx ny ny jpt        case 1 of       taille 1  eq jpi and taille 2  eq jpj and taille 3  eq jpk and taille 4  eq jpt:           res   tab firstx:lastx  firsty:lasty  firstz:lastz          taille 1  eq jpi and taille 2  eq jpj and taille 3  eq nz and taille 4  eq jpt:           res   tab firstx:lastx  firsty:lasty            taille 1  EQ  nx and taille 2  eq  ny and taille 3  eq nz and taille 4  eq jpt:res   tab       taille 1  EQ  nx and taille 2  eq  ny and taille 3  eq jpk and taille 4  eq jpt:           res   tab    firstz:lastz          else:BEGIN          if keyword_set savedbox  THEN restoreboxparam   boxparam4grmoyenne dat          return  report Probleme d adequation entre les tailles du domaine nx ny nz jpt                             strtrim nx  1 strtrim ny  1 strtrim nz  1                            strtrim jpt  1  et du tableau  strtrim taille 1  1                            strtrim taille 2  1 strtrim taille 3  1                            strtrim taille 4  1        END     endcase     if nx EQ 1 OR ny EQ 1 OR nz EQ 1 OR jpt EQ 1 then res   reform res  nx  ny  nz  jpt   over      if keyword_set nan  NE 0 then BEGIN        if nan NE 1 then BEGIN      if nan is not  values f_nan    we put it at  values f_nan         if abs nan  LT 1e6 then notanumber   where res EQ nan            ELSE notanumber   where abs res  GT abs nan 10          if notanumber 0  NE  1 then res temporary notanumber     values f_nan       ENDIF     ENDIF     Comment : WE HAVE TO BE CAREFUL ABOUT CASES WHERE THE DIMENSION TO AVERAGE   1     AND MAKE SURE THAT IT EXIST  THAT IS WHY WE USE reform nx ny  WHICH CAN    LOOK USELESS AT THE BEGINNING       if nx EQ 1 OR ny EQ 1 OR nz EQ 1 then BEGIN        res   reform res  nx  ny  nz  jpt   over        mask    reform mask  nx  ny  nz   over      ENDIF     IF keyword_set key_partialstep  THEN BEGIN   the top of the ocean floor is       IF vargrid EQ  T  OR vargrid EQ  W  THEN bottom   total mask  3          ELSE bottom   total tmask firstx:lastx  firsty:lasty  firstz:lastz  3     we suppress columns with only ocean or land        good   where bottom NE 0 AND bottom NE nz    the bottom of the ocean in 3D index is:       bottom   lindgen nx ny temporary bottom 1L nx ny       IF good 0  NE  1 THEN bottom   bottom good          ELSE bottom    1     ENDIF ELSE bottom    1     III 2  different average types       IF keyword_set nan  NE 0 THEN msknan   finite res  ELSE msknan    1     case 1 of        dirx eq 1  and  diry eq 0  and  dirz eq 0  : BEGIN         e13    temporary e1 replicate 1  nz          e13   reform e13  nx  ny  nz   over          echelle    temporary e13 temporary mask replicate 1  jpt          echelle   reform echelle  nx  ny  nz  jpt   over          IF keyword_set key_partialstep  AND bottom 0  NE  1             AND nx NE 1 THEN BEGIN           IF msknan 0  EQ  1 THEN BEGIN              msknan   replicate 1b  nx  ny  nz  jpt              nan   1           ENDIF           bottom   bottom replicate 1  jpt      4D bottom                replicate 1  n_elements bottom nx ny nz lindgen jpt            msknan bottom    0           res temporary bottom     values f_nan         ENDIF         if keyword_set integration  then divi   1 ELSE begin            IF msknan 0  NE  1 THEN divi   total echelle msknan  1              ELSE divi   total echelle  1          endelse         res   temporary res echelle         res   total temporary res  1  nan   nan divi   1          if msknan 0  NE  1 then begin           echelle   temporary echelle  NE 0           testnan   temporary msknan echelle           testnan   total temporary testnan  1                 total temporary echelle  1  EQ 0          endif       end        dirx eq 0  and  diry eq 1  and  dirz eq 0  : begin         e23   temporary e2 replicate 1  nz          e23   reform e23  nx  ny  nz   over          echelle    temporary e23 temporary mask replicate 1  jpt          echelle   reform echelle  nx  ny  nz  jpt   over          IF keyword_set key_partialstep  AND bottom 0  NE  1             AND ny NE 1 THEN BEGIN           IF msknan 0  EQ  1 THEN BEGIN              msknan   replicate 1b  nx  ny  nz              nan   1           endif           bottom   bottom replicate 1  jpt      4D bottom                replicate 1  n_elements bottom nx ny nz lindgen jpt            msknan bottom    0           res temporary bottom     values f_nan         ENDIF         if keyword_set integration  then divi   1 ELSE begin            IF msknan 0  NE  1 THEN divi   total echelle msknan  2              ELSE divi   total echelle  2          endelse         res   total temporary res echelle  2  nan   nan divi   1          if msknan 0  NE  1 then begin           echelle   temporary echelle  NE 0           testnan   temporary msknan echelle           testnan   total temporary testnan  2                 total temporary echelle  2  EQ 0          endif       end        dirx eq 0  and  diry eq 0  and  dirz eq 1  : begin         e33   replicate 1  1 nx ny e3         e33   reform e33  nx  ny  nz   over          IF keyword_set key_partialstep  AND bottom 0  NE  1 THEN BEGIN           IF keyword_set wdepth  THEN               e33 bottom     e3w_ps firstx:lastx  firsty:lasty temporary good              ELSE e33 bottom     e3t_ps firstx:lastx  firsty:lasty temporary good          ENDIF         echelle    temporary e33 temporary mask replicate 1  jpt          echelle   reform echelle  nx  ny  nz  jpt   over          if keyword_set integration  then divi   1 ELSE begin            IF msknan 0  NE  1 THEN divi   total echelle msknan  3              ELSE divi   total echelle  3          endelse         res   total temporary res echelle  3  nan   nan divi   1          if msknan 0  NE  1 then begin           echelle   temporary echelle  NE 0           testnan   temporary msknan echelle           testnan   total temporary testnan  3                 total temporary echelle  3  EQ 0          endif       end        dirx eq 1  and  diry eq 1  and  dirz eq 0  : begin         e13   e1 replicate 1  nz          e13   reform e13  nx  ny  nz   over          e23   e2 replicate 1  nz          e23   reform e23  nx  ny  nz   over          echelle    temporary e13 temporary e23 temporary mask replicate 1  jpt          echelle   reform echelle  nx  ny  nz  jpt   over          IF keyword_set key_partialstep  AND bottom 0  NE  1             AND nx ny NE 1 THEN BEGIN           IF msknan 0  EQ  1 THEN BEGIN              msknan   replicate 1b  nx  ny  nz              nan   1           endif           bottom   bottom replicate 1  jpt      4D bottom                replicate 1  n_elements bottom nx ny nz lindgen jpt            msknan bottom    0           res temporary bottom     values f_nan         ENDIF         if keyword_set integration  then divi   1 ELSE begin            IF msknan 0  NE  1 THEN divi   total total echelle msknan  1  1              ELSE divi   total total echelle  1  1          endelse         res   total total temporary res echelle  1  nan   nan  1  nan   nan divi   1          if msknan 0  NE  1 then begin           echelle   temporary echelle  NE 0           testnan   temporary msknan echelle           testnan   total total temporary testnan  1  1                 total total temporary echelle  1  1  EQ 0          endif       end        dirx eq 1  and  diry eq 0  and  dirz eq 1  : begin         e133   e1 e3         IF keyword_set key_partialstep  AND bottom 0  NE  1 THEN BEGIN           IF keyword_set wdepth  THEN               e133 bottom     e1 e3w_ps firstx:lastx  firsty:lasty temporary good              ELSE e133 bottom     e1 e3t_ps firstx:lastx  firsty:lasty temporary good          ENDIF         echelle    temporary e133 temporary mask replicate 1  jpt          echelle   reform echelle  nx  ny  nz  jpt   over          if keyword_set integration  then divi   1 ELSE begin            IF msknan 0  NE  1 THEN divi   total total echelle msknan  1  2              ELSE divi   total total echelle  1  2          endelse         res   total total temporary res echelle  1  nan   nan  2  nan   nan divi   1          if msknan 0  NE  1 then begin           echelle   temporary echelle  NE 0           testnan   temporary msknan echelle           testnan   total total temporary testnan  1  2                 total total temporary echelle  1  2  EQ 0          endif       end        dirx eq 0  and  diry eq 1  and  dirz eq 1  : begin         e233   e2 e3         IF keyword_set key_partialstep  AND bottom 0  NE  1 THEN BEGIN           IF keyword_set wdepth  THEN               e233 bottom     e2 e3w_ps firstx:lastx  firsty:lasty temporary good              ELSE e233 bottom     e2 e3t_ps firstx:lastx  firsty:lasty temporary good          ENDIF         echelle    temporary e233 temporary mask replicate 1  jpt          echelle   reform echelle  nx  ny  nz  jpt   over          if keyword_set integration  then divi   1 ELSE begin            IF msknan 0  NE  1 THEN divi   total total echelle msknan  2  2              ELSE divi   total total echelle  2  2          endelse         res   total total temporary res echelle  2  nan   nan  2  nan   nan divi   1          if msknan 0  NE  1 then begin           echelle   temporary echelle  NE 0           testnan   temporary msknan echelle           testnan   total total temporary testnan  2  2                 total total temporary echelle  2  2  EQ 0          endif       end        dirx eq 1  and  diry eq 1  and  dirz eq 1  : begin         e1233    e1 e2 e3         IF keyword_set key_partialstep  AND bottom 0  NE  1 THEN BEGIN           IF keyword_set wdepth  THEN               e1233 bottom     e1 e2 e3w_ps firstx:lastx  firsty:lasty temporary good              ELSE e1233 bottom     e1 e2 e3t_ps firstx:lastx  firsty:lasty temporary good          ENDIF         echelle    temporary e1233 temporary mask replicate 1  jpt          echelle   reform echelle  nx  ny  nz  jpt   over          if keyword_set integration  then divi   1 ELSE begin            IF msknan 0  NE  1 THEN divi   total total total echelle msknan  1  1  1              ELSE divi   total total total echelle  1  1  1          endelse         res   total total total temporary res echelle  1  nan   nan  1  nan   nan  1  nan   nan divi   1          if msknan 0  NE  1 then begin           echelle   temporary echelle  NE 0           testnan   temporary msknan echelle           testnan   total total total temporary testnan  1  1  1                 total total total temporary echelle  1  1  1  EQ 0          endif       end     endcase   endif     if dirt EQ 1 AND keyword_set spatialfirst  then BEGIN     IF  reverse size res   dimension 0  NE jpt THEN BEGIN       print   the last dimension of res is not equal to jpt:  strtrim jpt  2        if keyword_set savedbox  THEN restoreboxparam   boxparam4grmoyenne dat        return   1     ENDIF     tdim   size res   n_dimensions      if keyword_set integration  then res   total res  tdim  nan   nan        ELSE BEGIN        if keyword_set nan  then BEGIN          testnan   testnan  divi      ENDELSE    ENDIF      IV   finishing       IV 1  We mask land by a value equal to 1 e 20     valmask   1e 20   terre   where divi EQ 0    IF terre 0  NE  1 THEN BEGIN      res temporary terre    1e 20   ENDIF      IV 2  We replace  when nan equal 1   values f_nan by nan     if keyword_set nan  NE 0 then BEGIN      puttonan   where temporary testnan  EQ 0      if puttonan 0  NE  1 then res temporary puttonan     values f_nan     if nan NE 1 then BEGIN        notanumber   where finite res  eq 0        if notanumber 0  NE  1 then res temporary notanumber    nan     ENDIF   ENDIF     IV 3  We replace in the domain whch was defined at the entry of average     if keyword_set savedbox  THEN restoreboxparam   boxparam4grmoyenne dat      if keyword_set key_performance  THEN print   temps grossemoyenne  systime 1 tempsun    return  res     end"); 
     192a[190] = new Array("./ToBeReviewed/CALCULS/hdyn.html", "hdyn.pro", "", "             file_comments   Calculate the height by rapport to a reference state for a depth reference     See keywords for different possibilities  By default  the state reference    is rho 1020 and the depth reference is gdepw ka  with ka the first W level    directly above 1000 m        categories   Calculation      param TABSN  in required    array representing the salinity      param TABTN  in required    array representing the temperature Has the same size than SN      keyword GILL We activate this key if we want to calculate the dynamic height    like in the GILL page 215  which means by rapport to a reference state which    vary in depth and which is determined by a reference temperature tref at 0 C    and a reference salinity sref at 35psu      keyword LEVEL   It is the same reference level to take  This level is defined like    that gdepw level  is the reference depth       keyword SREF    Give a value to this keyword to change the reference salinity used in the    calculation when GILL  is activated           keyword TREF   Give a value to this keyword to change the reference temperature used in the    calculation when GILL  is activated        keyword PROFREF   Give a depth to this keyword which will be considered as the reference depth     in this case  LEVEL has not any effect  the calculation will be effectuated    until this depth effecting an interpolation between the the last W level above    PROFREF and PROFREF       keyword SURFACE_LEVEL  default 0    It is the level where we wan to calculate the dynamic height       returns   An array of the same size of sn and tn representing the dynamic height calculated    from a reference depth nd by rapport to a reference state       uses    common pro      restrictions   Points for which we can not calculate the dynamic height  whose the batymetry    is less deep than the reference depth  are put at the value  values f_nan      restrictions   approximation: The pressure in decibars is equal to the depth in meters  the pressure increase of 1bar all 10m       history   Sebastien Masson  smasson lodyc jussieu fr       version    Id: hdyn pro 163 2006 08 29 12:59:46Z navarro             FUNCTION hdyn   tabsn  tabtn  TREF   tref   SREF   sref  PROFREF   profref  LEVEL   level  GILL   gill  SURFACE_LEVEL   surface_level     compile_opt idl2  strictarrsubs      tempsun   systime 1            for key_performance  common     if NOT keyword_set surface_level  then surface_level   0   useful if GILL is activated    if NOT keyword_set tref  then tref   0     if NOT keyword_set sref  then sref   35    If needed  we determinate the reference depth and the W level situated directly above     if keyword_set profref  then begin       rien   where gdepw LE profref  level        level   level 1       za   gdepw level     ENDIF ELSE BEGIN        if NOT keyword_set level  then BEGIN           rien   where gdepw LE 1000  level           level   level 1       ENDIF       profref   gdepw level        za   profref    ENDELSE     tailles   size tabsn     taillet   size tabtn     if total tailles 0:tailles 0  NE taillet 0:taillet 0  NE 0 then       return   report Les tableaux sn et tn doivent avoir la meme taille     if tailles 3  NE jpk then return  report La dim verticale des tableaux sn et tn doit etre egalre a jpk     nx   nxt    ny   nyt    case  size tabsn 0  OF       3:BEGIN           case 1 of             tailles 1  eq jpi and tailles 2  eq jpj: BEGIN                sn   tabsn firstxt:lastxt  firstyt:lastyt                   tn   tabtn firstxt:lastxt  firstyt:lastyt                end             tailles 1  eq  nx and tailles 2  eq  ny:BEGIN                 sn   tabsn                tn   tabtn             end             else:return  report Probleme d adequation entre les tailles du domaine et de la boite           ENDCASE          if keyword_set gill  then             rhonref   rhon replicate sref nx  ny  jpk replicate tref nx  ny  jpk   insitu             ELSE rhonref   1020           vol rhonref rhon sn tn   insitu rhonref          e33d   replicate 1  nx ny e3t          e33d   reform e33d  nx  ny  jpk   over           terre   where tmask firstxt:lastxt  firstyt:lastyt    EQ 0           if terre 0  NE  1 then vol terre     values f_nan          case level of             0:hdyn  100 profref gdepw 0 vol    0              1:hdyn  100 vol e33d    0 profref gdepw 1 vol    1              ELSE:hdyn  100 total   vol e33d    surface_level: level 1  3                  profref gdepw level vol    level           endcase       END       4:BEGIN           case 1 of             tailles 1  eq jpi and tailles 2  eq jpj AND tailles 4  EQ jpt: BEGIN                sn   tabsn firstxt:lastxt  firstyt:lastyt                     tn   tabtn firstxt:lastxt  firstyt:lastyt                  end             tailles 1  eq  nx and tailles 2  eq  ny AND tailles 4  EQ jpt:BEGIN                 sn   tabsn                tn   tabtn             end             else:return  report Probleme d adequation entre les tailles du domaine et de la boite           endcase          if keyword_set gill  then             rhonref   rhon replicate sref nx  ny  jpk  jpt replicate tref nx  ny  jpk  jpt   insitu             ELSE rhonref   1020           vol rhonref rhon sn tn   insitu rhonref          e33d   replicate 1  nx ny e3t          e33d   e33d replicate 1  jpt           e33d   reform e33d  nx  ny  jpk  jpt   over           mask   tmask firstxt:lastxt  firstyt:lastyt             mask   mask replicate 1  jpt           terre   where mask EQ 0           if terre 0  NE  1 then vol terre     values f_nan          case level of             0:hdyn  100 profref gdepw 0 vol    0                1:hdyn  100 vol e33d    0   profref gdepw 1 vol    1                ELSE:hdyn  100 total   vol e33d    surface_level: level 1    3                  profref gdepw level vol    level             endcase       END       ELSE: return   report cas non code     ENDCASE    varunit    cm     varname    Dynamic Height  href strtrim round profref  1 m     IF keyword_set key_performance  THEN print   temps hdyn  systime 1 tempsun      return  hdyn end"); 
     193a[191] = new Array("./ToBeReviewed/CALCULS/level2depth.html", "level2depth.pro", "", "               file_comments   Allows to pass from a 2d level array to a 2d depth array corresponding o these levels      categories   Without loop      param TAB  in required type 2d array    2d level array of sill levels  or a structure respecting litchamp criterions       keyword NOMASK   To do not mask land points       returns    2d array containing depths      uses   common pro      history   Sebastien Masson  smasson lodyc jussieu fr                          17 6 1999                         14 6 2000 accepte  values f_nan      version    Id: level2depth pro 163 2006 08 29 12:59:46Z navarro             FUNCTION level2depth  tab  NOMASK   nomask     compile_opt idl2  strictarrsubs      tempsun   systime 1            To key_performance  common     Reading of the input field  and recovery of the used subdomain s size      niveaux   litchamp tab     grille mask   1   1 gdep nx ny nz firstx firsty firstz lastx lasty lastz     verification of the coherence between array s size and the domain definied by domdef      taille   size niveaux     if taille 0  NE 2 then return  report le champ en entree doit contenir un tableau 2d     case 1 of       taille 1  eq jpi and taille 2  eq jpj:niveaux niveaux firstx:lastx  firsty:lasty        taille 1  eq  nx and taille 2  eq  ny:       else:return  report Probleme d adequation entre les tailles du domaine et celle du champ     endcase       wherenan   where finite niveaux   nan  EQ 1     if wherenan 0  NE  1 then niveaux wherenan    0    niveaux   0   niveaux    jpk 1       gdep   replicate 1  nx ny gdep    niveaux   lindgen nx ny nx ny niveaux    gdep   reform gdep niveaux  nx  ny       if wherenan 0  NE  1 then gdep wherenan     values f_nan    if NOT keyword_set nomask  then begin       if n_elements valmask  EQ 0 then valmask   1e20       terre   where mask    0  EQ 0        if terre 0  NE  1 then gdep terre    valmask    endif      if keyword_set key_performance  THEN print   temps level2depth  systime 1 tempsun     return  gdep end"); 
     194a[192] = new Array("./ToBeReviewed/CALCULS/level2index.html", "level2index.pro", "", "             file_comments    We want  from a 3d matrix  to extract a 2d  x y  array whose each element    has been extract from a level specified by the 2d level array  typically     we want to obtain the salinity along an isopycn we have repered by its level    level2index is a function who give  in function of level  a 2d indexes array    which will allow to extract the 2d array from the 3d array       categories   Without loop      param LEVEL  in required type 2d array    A 2d level array      returns   a 2d indexes array      history   Sebastien Masson  smasson lodyc jussieu fr                         24 11 1999      version    Id: level2index pro 163 2006 08 29 12:59:46Z navarro             FUNCTION level2index  level   An element of 3d array  whose the two first dimensions are nx and ny  whose    coordinates are i  j and k have for index in the same 3d array i   j nx   k nx ny    level given  for  each point of level  we know i  j et k    so we can calculate the index     compile_opt idl2  strictarrsubs      taille   size level     nx   taille 1     ny   taille 2    array k nx ny     tabknxny    nx ny long level         return  lindgen nx  ny tabknxny end"); 
     195a[193] = new Array("./ToBeReviewed/CALCULS/level2mask.html", "level2mask.pro", "", "             file_comments   Allow to pass from a 2d sill level array to the 3d mask array with 1s in    levels above the sill level and 0s below  and on it       categories    Without loop      param TAB  in required type 2d array    2d level array of sill level  or a structure respecting litchamp criterions       returns   It is a 3d array containing the mask associated to the 2d sill level array      uses   common pro      history   Sebastien Masson  smasson lodyc jussieu fr                          17 6 1999   Setp 2004: boundary level have 0 values and not 1  as it was   explained before in the header  see:   print  array_equal niveau  total level2mask niveau 3         version    Id: level2mask pro 163 2006 08 29 12:59:46Z navarro             FUNCTION level2mask  tab       compile_opt idl2  strictarrsubs      tempsun   systime 1            To key_performance  common     Reading of the input field and recovery of the size of the used subdomain      niveaux   litchamp tab     grille maskterre   1   1   1 nx ny nz firstx firsty firstz lastx lasty lastz     verification of the coherence between the array s size and the defined by domdef domain      IF ny EQ 1 THEN niveaux   reform niveaux  nx  ny   over     taille   size niveaux     if taille 0  NE 2 then return  report le champ en entree doit contenir un tableau 2d     case 1 of       taille 1  eq jpi and taille 2  eq jpj:niveaux niveaux firstx:lastx  firsty:lasty        taille 1  eq  nx and taille 2  eq  ny:       else:return  report Probleme d adequation entre les tailles du domaine et celle du champ     endcase       We transform the 2d leval array in 3d mask array      mask   reform  niveaux 1 indgen nz 1  nx  ny  nz      mask   floor temporary mask    1    mask   temporary mask temporary maskterre           if keyword_set key_performance  THEN print   temps level2mask  systime 1 tempsun     return  mask end"); 
     196a[194] = new Array("./ToBeReviewed/CALCULS/moyenne.html", "moyenne.pro", "", "             file_comments     averages a 2  or 3 d field over a selected             geographical area and along one ore more      selected axes  x  y or z       categories      param TAB  in required    2 or 3d field      param DIREC  in required     x   y   z   xy   xz   yz  or  xyz       keyword BOXZOOM      xmin xmax ymin ymax  zmin zmax  to more details  see domdef   boxzoom can have 5 forms:      vert2      vert1  vert2      lon1  lon2  lat1  lat2        lon1  lon2  lat1  lat2  vert2      lon1  lon2  lat1  lat2  vert1 vert2       keyword NAN    not a number  we activate it if we want to average without considerate some masked values of TAB    If masked values of TAB are values consecrated by IDL values f_nan  we just have to put NAN    If masked values of TAB are valued a  a must be different of 1  corresponding to nan      values f_nan and of 0  which desactivate nan  We have to put NAN a     Comment: In output  result points which are NAN will be valued a or  values f_nan                   keyword NODOMDEF   We activate it if we do not want to pass in domdef even if the keyword boxzoom    is present  like when grossemoyenne is called via checkfield       keyword INTEGRATION    To make an integral rather than an average       keyword WDEPTH    to specify that the field is at W depth instead of T    depth  automatically activated if vargrid eq  W                    returns   An array       uses   common   domdef      restrictions Put values corresponding to land at 1 e20      history    Jerome Vialard  jv lodyc jussieu fr   2 7 98                         Sebastien Masson  smasson lodyc jussieu fr                          14 8 98                         15 1 98                         11 3 99 adaptation for NAN                         28 7 99 Averages 1d arrays      version    Id: moyenne pro 163 2006 08 29 12:59:46Z navarro        function moyenne  tab  direc  BOXZOOM   boxzoom  INTEGRATION   integration                       NAN   nan  NODOMDEF   nodomdef  WDEPTH   wdepth                       _extra   ex       compile_opt idl2  strictarrsubs    cm_4mesh  cm_4data  cm_4cal   IF NOT keyword_set key_forgetold  THEN BEGIN  updatenew  updatekwd   ENDIF     tempsun   systime 1             To key_performance    I  preliminaries     dirt   0   dirx   0   diry   0   dirz   0     I 1  Directions s  we follow to integrate     if   strpos direc   t  ge 0   then dirt   1   if   strpos direc   x  ge 0   then dirx   1   if   strpos direc   y  ge 0   then diry   1   if   strpos direc   z  ge 0   then dirz   1   if  dirx eq 0 and diry eq 0 and dirz eq 0  then return  tab     I 2  verification of the input array s size     taille   size tab    case 1 of     taille 0  eq 1 :dim    1d      taille 0  eq 2 :BEGIN       dim    2d        if dirx eq 0 and diry eq 0 then return  tab     END     taille 0  eq 3 :BEGIN       dim    3d        if dirx eq 0 and diry eq 0 and dirz eq 0 then return  tab     END     else : return  report Le tableau d entree doit etre a 2 ou 3 dimensions s il contient une dim temporelle utiliser grossemoyenne    endcase       I 3  Obtainment of scale s factors and of the mask on the subdomain concernedby the average    Redefinition of the domain ajusted at boxzoom  at 6 elements    This will allowed us to calculate only in the domain concerned by the average    Domdef  followed by grid give us all arrays of the grid on the subdomain      if keyword_set boxzoom  then BEGIN      Case 1 Of       N_Elements Boxzoom  Eq 1:bte    lon1  lon2  lat1  lat2  0  boxzoom 0        N_Elements Boxzoom  Eq 2:bte    lon1  lon2  lat1  lat2  boxzoom 0  boxzoom 1        N_Elements Boxzoom  Eq 4:bte    Boxzoom  vert1  vert2        N_Elements Boxzoom  Eq 5:bte    Boxzoom 0:3  0  Boxzoom 4        N_Elements Boxzoom  Eq 6:bte   Boxzoom       Else: return  report Mauvaise Definition de Boxzoom      endcase     if NOT keyword_set nodomdef  then BEGIN        savedbox   1b       saveboxparam   boxparam4moyenne dat        domdef  bte  GRIDTYPE   vargrid  _extra   ex     ENDIF    ENDIF      attribution of the mask and of longitude and latitude arrays      IF vargrid EQ  W  THEN wdepth   1   grille  mask  glam  gphi  gdep  nx  ny  nz  firstx  firsty  firstz  lastx  lasty  lastz  e1  e2  e3  WDEPTH   wdepth       II  Case of the 1d array       if dim EQ  1d  then BEGIN     if n_elements tab  NE nx ny AND n_elements tab  NE nx ny nz then BEGIN       if keyword_set savedbox  THEN restoreboxparam   boxparam4moyenne dat        return  report Probleme d adequation entre les tailles du domaine et de la boxzoom      ENDIF     case 1 of       nx EQ 1 AND ny EQ 1:BEGIN  vector following z         case n_elements tab  of           jpk:res   tab firstz:lastz            nz:res   tab           ELSE:BEGIN              if keyword_set savedbox  THEN restoreboxparam   boxparam4moyenne dat              return  report Probleme d adequation entre les tailles du domaine et de la boxzoom            END         ENDCASE         if dirz EQ 1 then BEGIN            dim    3d             taille   size reform res  nx  ny  nz          ENDIF ELSE BEGIN           if keyword_set savedbox  THEN restoreboxparam   boxparam4moyenne dat            return  res         ENDELSE        END       ny EQ 1:BEGIN              vector following x         case n_elements tab  of           jpi:res   tab firstx:lastx            nx:res   tab           ELSE:BEGIN              if keyword_set savedbox  THEN restoreboxparam   boxparam4moyenne dat              return  report Probleme d adequation entre les tailles du domaine et de la boxzoom            END         ENDCASE         if dirx EQ 1 then BEGIN            dim    2d             taille   size reform res  nx  ny          ENDIF ELSE BEGIN            if keyword_set savedbox  THEN restoreboxparam   boxparam4moyenne dat            return  res         ENDELSE       END       nx EQ 1:BEGIN              vector following y         case n_elements tab  of           jpj:res   tab firsty:lasty            ny:res   tab           ELSE:BEGIN              if keyword_set savedbox  THEN restoreboxparam   boxparam4moyenne dat              return  report Probleme d adequation entre les tailles du domaine et de la boxzoom            END         ENDCASE         if diry EQ 1 then BEGIN           dim    2d            taille   size reform res  nx  ny          ENDIF ELSE BEGIN            if keyword_set savedbox  THEN restoreboxparam   boxparam4moyenne dat            return  res         ENDELSE        END     endcase   endif       II  Case of the 2d array       if  dim eq  2d  then begin       II 1  verification of the coherence of the array s size to average   Verification of the coherence between the array s size and the domain defined by domdef   The input array must have either the total domain s size  jpi jpj  or this    one of the reduced domain  nx ny        case 1 of       taille 1  eq jpi and taille 2  eq jpj:           res   tab firstx:lastx  firsty:lasty        taille 1  eq  nx and taille 2  eq  ny:res   tab       else:BEGIN          if keyword_set savedbox  THEN restoreboxparam   boxparam4moyenne dat          return  report Probleme d adequation entre les tailles du domaine nx ny  strtrim nx  1 strtrim ny  1  et du tableau  strtrim taille 1  1 strtrim taille 2  1        END     ENDCASE     if keyword_set nan  NE 0 then BEGIN        if nan NE 1 then BEGIN      If nan is not  values f_nan    we put it at  values f_nan         if abs nan  LT 1e6 then notanumber   where res EQ nan            ELSE notanumber   where abs res  GT abs nan 10          if notanumber 0  NE  1 then res temporary notanumber     values f_nan       ENDIF     ENDIF     Comment : WE HAVE TO BE CAREFUL ABOUT CASES WHERE THE DIMENSION TO AVERAGE   1     AND MAKE SURE THAT IT EXIST  THAT IS WHY WE USE reform nx ny  WHICH CAN    LOOK USELESS AT THE BEGINNING       if nx EQ 1 OR ny EQ 1 then BEGIN        res   reform res  nx  ny   over        e1    reform e1  nx  ny   over        e2    reform e2  nx  ny   over      endif     if nx EQ 1 OR ny EQ 1 OR nz EQ 1 THEN         mask    reform mask  nx  ny  nz   over      II 3  Different types of average       mask   mask    0      if keyword_set nan  NE 0 then msknan   finite res  ELSE msknan    1     case 1 of        dirx eq 1  and  diry eq 0  : begin         e   e1 mask         if keyword_set integration  then divi   1           else begin            divi   e           IF msknan 0  NE  1 THEN divi   temporary divi msknan           if ny EQ 1 then divi   reform divi  nx  ny   over            divi   total divi  1          endelse         res   res e         if ny EQ 1 then res   reform res  nx  ny   over          res   total res  1  nan   nan divi   1          if msknan 0  NE  1 then begin           testnan    msknan mask           if ny EQ 1 then testnan   reform testnan  nx  ny   over            testnan   total testnan  1 total mask  1  EQ 0          endif       end        dirx eq 0  and  diry eq 1  : begin         e   e2 mask         if keyword_set integration  then divi   1           else begin            divi   e           IF msknan 0  NE  1 THEN divi   temporary divi msknan           if ny EQ 1 then divi   reform divi  nx  ny   over            divi   total divi  2          endelse         res   res e         if ny EQ 1 then res   reform res  nx  ny   over          res   total res  2  nan   nan divi   1          if msknan 0  NE  1 then begin           testnan    msknan mask           if ny EQ 1 then testnan    reform testnan  nx  ny   over            testnan   total testnan  2 total mask  2  EQ 0          endif       end        dirx eq 1  and  diry eq 1  : begin         if keyword_set integration  then divi   1 else BEGIN            IF msknan 0  NE  1 THEN divi   total e1 e2 mask msknan              ELSE divi   total e1 e2 mask          ENDELSE          res   total res e1 e2 mask  nan   nan divi   1          if msknan 0  NE  1 then begin           testnan    msknan mask           testnan   total testnan total mask  EQ 0          endif       end     endcase   endif       III  Case 3d arrays series  tab4d        if  dim eq  3d  then begin     III 1  Verification of the coherence of the array to average size    Verification of the coherence between the array s size and the domain    defind by domdef    The input array must have either the total domain size  jpi jpj jpk     or this one of the reduced domain  nx ny ny        case 1 of       taille 1  eq jpi and taille 2  eq jpj and taille 3  eq jpk:           res   tab firstx:lastx  firsty:lasty  firstz:lastz        taille 1  eq jpi and taille 2  eq jpj and taille 3  eq nz:           res   tab firstx:lastx  firsty:lasty          taille 1  EQ  nx and taille 2  eq  ny and taille 3  eq nz :res   tab       taille 1  EQ  nx and taille 2  eq  ny and taille 3  eq jpk :           res   tab    firstz:lastz        else:BEGIN          if keyword_set savedbox  THEN restoreboxparam   boxparam4moyenne dat          return  report Probleme d adequation entre les tailles du domaine nx ny nz  strtrim nx  1 strtrim ny  1 strtrim nz  1  et du tableau  strtrim taille 1  1 strtrim taille 2  1 strtrim taille 3  1        END     endcase     if keyword_set nan  NE 0 then BEGIN        if nan NE 1 then BEGIN      if nan is not  values f_nan    we put it at  values f_nan         if abs nan  LT 1e6 then notanumber   where res EQ nan            ELSE notanumber   where abs res  GT abs nan 10          if notanumber 0  NE  1 then res temporary notanumber     values f_nan       ENDIF     ENDIF     Comment : WE HAVE TO BE CAREFUL ABOUT CASES WHERE THE DIMENSION TO AVERAGE   1     AND MAKE SURE THAT IT EXIST  THAT IS WHY WE USE reform nx ny  WHICH CAN    LOOK USELESS AT THE BEGINNING       if nx EQ 1 OR ny EQ 1 OR nz EQ 1 then BEGIN        res   reform res  nx  ny  nz   over        e1    reform e1  nx  ny   over        e2    reform e2  nx  ny   over      endif     if nx EQ 1 OR ny EQ 1 OR nz EQ 1 THEN         mask    reform mask  nx  ny  nz   over      IF keyword_set key_partialstep  THEN BEGIN   the top of the ocean floor is       IF vargrid EQ  T  OR vargrid EQ  W  THEN bottom   total mask  3          ELSE bottom   total tmask firstx:lastx  firsty:lasty  firstz:lastz  3     we suppress columns with only ocean or land        good   where bottom NE 0 AND bottom NE nz    the bottom of the ocean in 3D index is:       bottom   lindgen nx ny temporary bottom 1L nx ny       IF good 0  NE  1 THEN bottom   bottom good          ELSE bottom    1     ENDIF ELSE bottom    1     III 2  different average types       if keyword_set nan  NE 0 then msknan   finite res  ELSE msknan    1     case 1 of        dirx eq 1  and  diry eq 0  and  dirz eq 0  : begin         e13   e1 replicate 1  nz          e13   reform e13  nx  ny  nz   over          IF keyword_set key_partialstep  AND bottom 0  NE  1             AND nx NE 1 THEN BEGIN           IF msknan 0  EQ  1 THEN BEGIN              msknan   replicate 1b  nx  ny  nz              nan   1           endif           msknan bottom    0           res bottom     values f_nan         ENDIF         if keyword_set integration  then divi   1 else begin           divi   e13 mask           IF msknan 0  NE  1 THEN divi   temporary divi msknan           if nz EQ 1 then divi   reform divi  nx  ny  nz   over            divi   total divi  1          ENDELSE         res   res e13 mask         if nz EQ 1 then res   reform res  nx  ny  nz   over          res   total res  1  nan   nan divi   1          e13   1         if msknan 0  NE  1 then begin           testnan    msknan mask           if nz EQ 1 then testnan    reform testnan  nx  ny  nz   over            testnan   total testnan  1 total mask  1  EQ 0          endif       end        dirx eq 0  and  diry eq 1  and  dirz eq 0  : begin         e23   e2 replicate 1  nz          e23   reform e23  nx  ny  nz   over          IF keyword_set key_partialstep  AND bottom 0  NE  1             AND ny NE 1 THEN BEGIN           IF msknan 0  EQ  1 THEN BEGIN              msknan   replicate 1b  nx  ny  nz              nan   1           endif           msknan bottom    0           res bottom     values f_nan         ENDIF         if keyword_set integration  then divi   1 else begin           divi   e23 mask           IF msknan 0  NE  1 THEN divi   temporary divi msknan           if nz EQ 1 then divi   reform divi  nx  ny  nz   over            divi   total divi  2          ENDELSE         res   res e23 mask         if nz EQ 1 then res   reform res  nx  ny  nz   over          res   total res  2  nan   nan divi   1          e23   1         if msknan 0  NE  1 then begin           testnan    msknan mask           if nz EQ 1 then testnan   reform testnan  nx  ny  nz   over            testnan   total testnan  2 total mask  2  EQ 0          endif       end        dirx eq 0  and  diry eq 0  and  dirz eq 1  : begin         e33   replicate 1  1 nx ny e3         e33   reform e33  nx  ny  nz   over          IF keyword_set key_partialstep  AND bottom 0  NE  1 THEN BEGIN           IF keyword_set wdepth  THEN               e33 bottom     e3w_ps firstx:lastx  firsty:lasty temporary good              ELSE e33 bottom     e3t_ps firstx:lastx  firsty:lasty temporary good          ENDIF         if keyword_set integration  then divi   1 else begin           divi   e33 mask           if msknan 0  NE  1 then divi   temporary divi msknan           if nz EQ 1 then divi   reform divi  nx  ny  nz   over            divi   total divi  3          ENDELSE         res   res e33 mask         if nz EQ 1 then res   reform res  nx  ny  nz   over          res   total res  3  nan   nan divi   1          e33   1         if msknan 0  NE  1 then begin           testnan    msknan mask           if nz EQ 1 then testnan    reform testnan  nx  ny  nz   over            testnan   total testnan  3 total mask  3  EQ 0          endif       end        dirx eq 1  and  diry eq 1  and  dirz eq 0  : begin         e123    e1 e2 replicate 1  nz          e123   reform e123  nx  ny  nz   over          IF keyword_set key_partialstep  AND bottom 0  NE  1             AND nx ny NE 1 THEN BEGIN           IF msknan 0  EQ  1 THEN BEGIN              msknan   replicate 1b  nx  ny  nz              nan   1           endif           msknan bottom    0           res bottom     values f_nan         ENDIF         if keyword_set integration  then divi   1 else BEGIN            divi   e123 mask           IF msknan 0  NE  1 THEN divi   temporary divi msknan           if nz EQ 1 then divi   reform divi  nx  ny  nz   over            divi   total total divi  1  1          ENDELSE         res   res e123 mask         if nz EQ 1 then res   reform res  nx  ny  nz   over          res   total total res  1  nan   nan  1  nan   nan     divi   1          e123   1         if msknan 0  NE  1 then begin           testnan    msknan mask           if nz EQ 1 then testnan    reform testnan  nx  ny  nz   over            testnan   total total testnan  1  1 total total mask  1  1  EQ 0          endif       end        dirx eq 1  and  diry eq 0  and  dirz eq 1  : begin         e133   e1 e3         e133   reform e133  nx  ny  nz   over          IF keyword_set key_partialstep  AND bottom 0  NE  1 THEN BEGIN           IF keyword_set wdepth  THEN               e133 bottom     e1 e3w_ps firstx:lastx  firsty:lasty temporary good              ELSE e133 bottom     e1 e3t_ps firstx:lastx  firsty:lasty temporary good          ENDIF         if keyword_set integration  then divi   1 else BEGIN            divi   e133 mask           if msknan 0  NE  1 then divi   temporary divi msknan           if nz EQ 1 then divi   reform divi  nx  ny  nz   over            divi   total total divi  1  2          ENDELSE         res   res e133 mask         if nz EQ 1 then res   reform res  nx  ny  nz   over          res   total total res  1  nan   nan  2  nan   nan     divi   1          e133   1         if msknan 0  NE  1 then begin           testnan    msknan mask           if nz EQ 1 then testnan    reform testnan  nx  ny  nz   over            testnan   total total testnan  1  2 total total mask  1  2  EQ 0          endif       end        dirx eq 0  and  diry eq 1  and  dirz eq 1  : begin         e233   e2 e3         e233   reform e233  nx  ny  nz   over          IF keyword_set key_partialstep  AND bottom 0  NE  1 THEN BEGIN           IF keyword_set wdepth  THEN               e233 bottom     e2 e3w_ps firstx:lastx  firsty:lasty temporary good              ELSE e233 bottom     e2 e3t_ps firstx:lastx  firsty:lasty temporary good          ENDIF         if keyword_set integration  then divi   1 else BEGIN            divi   e233 mask           if msknan 0  NE  1 then divi   temporary divi msknan           if nz EQ 1 then divi   reform divi  nx  ny  nz   over            divi   total total divi  2  2          ENDELSE         res   res e233 mask         if nz EQ 1 then res   reform res  nx  ny  nz   over          res   total total res  2  nan   nan  2  nan   nan     divi   1          e233   1         if msknan 0  NE  1 then begin           testnan    msknan mask           if nz EQ 1 then testnan    reform testnan  nx  ny  nz   over            testnan   total total testnan  2  2 total total mask  2  2  EQ 0          endif       end        dirx eq 1  and  diry eq 1  and  dirz eq 1  : begin         e1233    e1 e2 e3         e1233   reform e1233  nx  ny  nz   over          IF keyword_set key_partialstep  AND bottom 0  NE  1 THEN BEGIN           IF keyword_set wdepth  THEN               e1233 bottom     e1 e2 e3w_ps firstx:lastx  firsty:lasty temporary good              ELSE e1233 bottom     e1 e2 e3t_ps firstx:lastx  firsty:lasty temporary good          ENDIF         if keyword_set integration  then divi   1 else BEGIN            if msknan 0  NE  1 then divi   total e1233 mask msknan              ELSE divi   total e1233 mask          ENDELSE         res   total res e1233 mask  nan   nan     divi   1          e1233   1         if msknan 0  NE  1 then begin           testnan    msknan mask           testnan   total testnan total mask  EQ 0          endif       end     endcase   endif      IV   finishing       IV 1  We mask land by a value equal to 1 e 20     valmask   1e 20   terre   where divi EQ 0    IF terre 0  NE  1 THEN BEGIN     res terre    1e 20   ENDIF       IV 2  We replace  when nan equal 1   values f_nan by nan     if keyword_set nan  NE 0 then BEGIN      puttonan   where testnan EQ 0      if puttonan 0  NE  1 then res puttonan     values f_nan     if nan NE 1 then BEGIN        notanumber   where finite res  eq 0        if notanumber 0  NE  1 then res notanumber    nan     ENDIF   ENDIF     IV 3  We replace in the domain whch was defined at the entry of average     if keyword_set savedbox  THEN restoreboxparam   boxparam4moyenne dat      if keyword_set key_performance  THEN print   temps moyenne  systime 1 tempsun    return  res     end"); 
     197a[195] = new Array("./ToBeReviewed/CALCULS/norme.html", "norme.pro", "", "             file_comments    calculate the norm of a field of vectors  then make a possible average      Comment 1: The field of vector can be  2d:xy  3d: xyz or xyt    4d: xyzt     Comment 2:   The calculation of the norm is made before the possible spatial or    temporal average because the average of the norm is not equal to the    norm of averages       categories   Calculation      param COMPOSANTEU  in required    an 2d  3d or 4d array      param COMPOSANTEV  in required    an 2d  3d or 4d array      keyword BOXZOOM   boxzoom on which do the average  by default the domain selected    by the last domdef done       keyword DIREC    t   x   y   z   xys   xz   yz   xyz   xt   yt   zt   xyt           xzt   yzt   xyzt  Direction on which do averages       returns   Array to trace with plt  pltz or pltt       uses   common pro      restrictions    The norm is calculated on points TTo do this calculation  we average    field U and Von points T before calculate the norme  At the edge of    coast and of domain  we can not calculate fields U and V at points T     that is why these points are at value  values f_nan        When we calculate on a reduce geographic domain  field U and V have not    necessarily the same number of point  In this case  we recut U and V to    keep only common points  We profit of this to redo a domdef which redefine    a geographic domain on which fields U and V are extracted on same points      restrictions   To know what type of array we work with  we  test its size and dates    gave by time 0  and time jpt 1  to know if thee is a temporal dimension     Before to start norme  make sure that time and jpt are defined how    they have to        examples   To calculate the average of the norme of streams on all the domain    between 0 et 50:        IDL  res norme un vn boxzoom 0 50 dir xyz       history   Sebastien Masson  smasson lodyc jussieu fr                          9 6 1999      version    Id: norme pro 163 2006 08 29 12:59:46Z navarro             FUNCTION norme  composanteu  composantev  BOXZOOM   boxzoom  DIREC   direc  _extra   ex       compile_opt idl2  strictarrsubs    cm_4mesh  cm_4data  cm_4cal   IF NOT keyword_set key_forgetold  THEN BEGIN  updatenew  updatekwd   ENDIF      tempsun   systime 1            To key_performance      IF finite glamu 0 finite gphiu 0 finite glamv 0 finite gphiv 0  EQ 0 THEN        return  report This version of norme is based on Arakawa C grid                            U and V grids must therefore be defined        if keyword_set boxzoom  then BEGIN      Case 1 Of       N_Elements Boxzoom  Eq 1:bte    lon1  lon2  lat1  lat2  0  boxzoom 0        N_Elements Boxzoom  Eq 2:bte    lon1  lon2  lat1  lat2  boxzoom 0  boxzoom 1        N_Elements Boxzoom  Eq 4:bte    Boxzoom  vert1  vert2        N_Elements Boxzoom  Eq 5:bte    Boxzoom 0:3  0  Boxzoom 4        N_Elements Boxzoom  Eq 6:bte   Boxzoom       Else: return  report Mauvaise Definition de Boxzoom      ENDCASE     domdef  boxzoom   ENDIF       if NOT keyword_set direc  then direc   0   construction of u and v at points T    u   litchamp composanteu     v   litchamp composantev     date1   time 0     if n_elements jpt  EQ 0 then date2   date1 ELSE date2   time jpt 1      if  size u 0  NE  size v 0  then return    1     vargrid T     varname    norme      valmask   1e20      grilleu   litchamp composanteu   grid     if grilleu EQ   then grilleu    U     grillev   litchamp composantev   grid     if grillev EQ   then grillev    V     IF grilleu EQ  V  AND grillev EQ  U  THEN inverse   1    IF grilleu EQ  T  AND grillev EQ  T  THEN BEGIN        interpolle    0        return  report cas non code mais facile a faire     ENDIF ELSE interpolle   1    if keyword_set inverse  then begin       rien   u       u   v       v   rien    endif       We find common points between u and v      indicexu    lindgen jpi firstxu:firstxu nxu 1     indicexv    lindgen jpi firstxv:firstxv nxv 1     indicex   inter indicexu  indicexv     indiceyu    lindgen jpj firstyu:firstyu nyu 1     indiceyv    lindgen jpj firstyv:firstyv nyv 1     indicey   inter indiceyu  indiceyv     nx   n_elements indicex      ny   n_elements indicey       case 1 of      xyz            size u 0  EQ 3 AND date1 EQ date2 :BEGIN             indice2d   lindgen jpi  jpj           indice2d   indice2d indicex 0 :indicex 0 nx 1 indicey 0 :indicey 0 ny 1           indice3d   lindgen jpi  jpj  jpk           indice3d   indice3d indicex 0 :indicex 0 nx 1 indicey 0 :indicey 0 ny 1 firstzt:lastzt      extraction of u and v on the appropriated domain            case 1 of              size u 1  EQ nxu AND  size u 2  EQ nyu AND                 size v 1  EQ nxv AND  size v 2  EQ nyv:BEGIN                 case  size u 3  OF                   nzt:BEGIN                       if nxu NE nx then                         if indicex 0  EQ firstxu then u   u 0:nx 1  ELSE u   u 1: nx                          IF nxv NE nx THEN                         if indicex 0  EQ firstxv then v   v 0:nx 1  ELSE v   v 1: nx                         IF nyu NE ny THEN                         if indicey 0  EQ firstyu then u   u 0:ny 1  ELSE u   u  1: ny                        IF nyv NE ny THEN                         if indicey 0  EQ firstyv then v   v 0:ny 1  ELSE v   v  1: ny                    end                   jpk:BEGIN                       if nxu NE nx then                         if indicex 0  EQ firstxu then u   u 0:nx 1   firstzt:lastzt  ELSE u   u 1: nx   firstzt:lastzt                        IF nxv NE nx THEN                         if indicex 0  EQ firstxv then v   v 0:nx 1   firstzt:lastzt  ELSE v   v 1: nx   firstzt:lastzt                       IF nyu NE ny THEN                         if indicey 0  EQ firstyu then u   u  0:ny 1 firstzt:lastzt  ELSE u   u  1: ny firstzt:lastzt                        IF nyv NE ny THEN                         if indicey 0  EQ firstyv then v   v  0:ny 1 firstzt:lastzt  ELSE v   v  1: ny firstzt:lastzt                    end                   ELSE: return  report problemes d adequation entre la taille du domaine et la taille des matrices necessaires a tracer des vecteurs                 endcase             END              size u 1  EQ jpi AND  size u 2  EQ jpj AND  size u 3  EQ jpk AND                 size v 1  EQ jpi AND  size v 2  EQ jpj AND  size u 3  EQ jpk :BEGIN                 u   u indice3d                 v   v indice3d              END             ELSE: return  report problemes d adequation entre la taille du domaine et la taille des matrices necessaires a tracer des vecteurs           endcase     We reshape u and v to make sure that no dimension has been erased            if nzt EQ 1 then begin             u   reform u  nx  ny  nzt   over              v   reform v  nx  ny  nzt   over           endif     construction of u and v at points T            a u 0           u u shift u 1 0 0 2           if NOT keyword_set key_periodic  OR nx NE jpi then u 0 a          a v 0           v v shift v 0 1 0 2           if NOT keyword_set key_periodic  OR nx NE jpi then v 0 a     attribution of the mask and of logitude and latitude arrays            mask   tmask indice3d           if nzt EQ 1 then mask   reform mask  nx  ny  nzt   over             if n_elements valmask  EQ 0 THEN valmask   1e20          landu   where u GE valmask 10           if landu 0  NE  1 then u landu    0          landv   where v GE valmask 10           if landv 0  NE  1 then v landv    0          res sqrt u 2 v 2           if NOT keyword_set key_periodic  OR nx NE jpi then res 0   values f_nan          res 0   values f_nan          mask   where mask eq 0           IF mask 0  NE  1 THEN res mask    valmask   All kind of average          domdef   glamt indice2d 0  0   glamu indice2d nx 1  0 gphit indice2d 0  0   gphiv indice2d 0  ny 1  vert1  vert2   meme          if keyword_set direc  then res   moyenne res direc nan  boxzoom   boxzoom   nodomdef          END      xyt           date1 NE date2 AND  size u 0  EQ 3 :BEGIN           indice2d   lindgen jpi  jpj           indice2d   indice2d indicex 0 :indicex 0 nx 1 indicey 0 :indicey 0 ny 1      extraction of u and v on the appropriated domain            case 1 of              size u 1  EQ nxu AND  size u 2  EQ nyu AND                 size v 1  EQ nxv AND  size v 2  EQ nyv:BEGIN                 if nxu NE nx then                   if indicex 0  EQ firstxu then u   u 0:nx 1      ELSE u   u 1: nx                      IF nxv NE nx THEN                   if indicex 0  EQ firstxv then v   v 0:nx 1      ELSE v   v 1: nx                     IF nyu NE ny THEN                   if indicey 0  EQ firstyu then u   u  0:ny 1    ELSE u   u  1: ny                    IF nyv NE ny THEN                   if indicey 0  EQ firstyv then v   v  0:ny 1    ELSE v   v  1: ny                END              size u 1  EQ jpi AND  size u 2  EQ jpj AND                 size v 1  EQ jpi AND  size v 2  EQ jpj:BEGIN                 u   u indicex 0 :indicex 0 nx 1 indicey 0 :indicey 0 ny 1                   v   v indicex 0 :indicex 0 nx 1 indicey 0 :indicey 0 ny 1                END             ELSE:return  report problemes d adequation entre la taille du domaine et la taille des matrices necessaires a tracer des vecteurs           endcase     construction of u and v at points T            a u 0           u u shift u 1 0 0 2           if NOT keyword_set key_periodic  OR nx NE jpi then u 0 a          a v 0           v v shift v 0 1 0 2           if NOT keyword_set key_periodic  OR nx NE jpi then v 0 a     attribution of the mask and of longitude and latitude arrays    We recover the complete grid to establish a big mask extent in the four    direction to cover pointsfor which a land point has been    considerated  make a small drawing             mask   tmask indice2d jpi jpj firstzt           if ny EQ 1 then mask   reform mask  nx  ny   over      construction of land containing all points to mask            if n_elements valmask  EQ 0 THEN valmask   1e20          landu   where u GE valmask 10           if landu 0  NE  1 then u landu    0          landv   where v GE valmask 10           if landv 0  NE  1 then v landv    0          res sqrt u 2 v 2           if NOT keyword_set key_periodic  OR nx NE jpi then res 0   values f_nan          res 0   values f_nan          mask   where mask eq 0           IF mask 0  NE  1 THEN BEGIN              coeftps   lindgen jpt nx ny             coeftps   replicate 1  n_elements mask coeftps             mask    temporary mask replicate 1  jpt              mask  temporary mask    temporary coeftps              res temporary mask    valmask          ENDIF   moyennes en tous genres          domdef   glamt indice2d 0  0   glamu indice2d nx 1  0 gphit indice2d 0  0   gphiv indice2d 0  ny 1  vert1  vert2   meme          if keyword_set direc  then res   grossemoyenne res direc nan  boxzoom   boxzoom   nodomdef        END      xyzt           date1 NE date2 AND  size u 0  EQ 4:BEGIN           indice2d   lindgen jpi  jpj           indice2d   indice2d indicex 0 :indicex 0 nx 1 indicey 0 :indicey 0 ny 1           indice3d   lindgen jpi  jpj  jpk           indice3d   indice3d indicex 0 :indicex 0 nx 1 indicey 0 :indicey 0 ny 1 firstzt:lastzt      extraction of u and v on the appropriated domain            case 1 of              size u 1  EQ nxu AND  size u 2  EQ nyu AND                 size v 1  EQ nxv AND  size v 2  EQ nyv:BEGIN                 case  size u 3  OF                   nzt:BEGIN                       if nxu NE nx then                         if indicex 0  EQ firstxu then u   u 0:nx 1  ELSE u   u 1: nx                          IF nxv NE nx THEN                         if indicex 0  EQ firstxv then v   v 0:nx 1  ELSE v   v 1: nx                         IF nyu NE ny THEN                         if indicey 0  EQ firstyu then u   u 0:ny 1  ELSE u   u  1: ny                        IF nyv NE ny THEN                         if indicey 0  EQ firstyv then v   v 0:ny 1  ELSE v   v  1: ny                    end                   jpk:BEGIN                       if nxu NE nx then                         if indicex 0  EQ firstxu then u   u 0:nx 1   firstzt:lastzt  ELSE u   u 1: nx   firstzt:lastzt                        IF nxv NE nx THEN                         if indicex 0  EQ firstxv then v   v 0:nx 1   firstzt:lastzt  ELSE v   v 1: nx   firstzt:lastzt                       IF nyu NE ny THEN                         if indicey 0  EQ firstyu then u   u  0:ny 1 firstzt:lastzt  ELSE u   u  1: ny firstzt:lastzt                        IF nyv NE ny THEN                         if indicey 0  EQ firstyv then v   v  0:ny 1 firstzt:lastzt  ELSE v   v  1: ny firstzt:lastzt                    end                   ELSE: return  report problemes d adequation entre la taille du domaine et la taille des matrices necessaires a tracer des vecteurs                 endcase             END              size u 1  EQ jpi AND  size u 2  EQ jpj AND  size u 3  EQ jpk AND                 size v 1  EQ jpi AND  size v 2  EQ jpj AND  size u 3  EQ jpk :BEGIN                 u   u indicex 0 :indicex 0 nx 1 indicey 0 :indicey 0 ny 1 firstzt:lastzt                   v   v indicex 0 :indicex 0 nx 1 indicey 0 :indicey 0 ny 1 firstzt:lastzt                END             ELSE: return  report problemes d adequation entre la taille du domaine et la taille des matrices necessaires a tracer des vecteurs           endcase     construction of u and v at points T            a u 0           u u shift u 1 0 0 0 2           if NOT keyword_set key_periodic  OR nx NE jpi then u 0 a          a v 0           v v shift v 0 1 0 0 2           if NOT keyword_set key_periodic  OR nx NE jpi then v 0 a     attribution of the mask and of logitude and latitude arrays            mask   tmask indice3d           if nzt EQ 1 then mask   reform mask  nx  ny  nzt   over             if n_elements valmask  EQ 0 THEN valmask   1e20          landu   where u GE valmask 10           if landu 0  NE  1 then u landu    0          landv   where v GE valmask 10           if landv 0  NE  1 then v landv    0          res sqrt u 2 v 2           if NOT keyword_set key_periodic  OR nx NE jpi then res 0     values f_nan          res 0     values f_nan          mask   where mask eq 0           IF mask 0  NE  1 THEN BEGIN              coeftps   lindgen jpt nx ny nzt             coeftps   replicate 1  n_elements mask coeftps             mask    temporary mask replicate 1  jpt              mask  temporary mask    temporary coeftps              res temporary mask    valmask          ENDIF   All kind of average          domdef   glamt indice2d 0  0   glamu indice2d nx 1  0 gphit indice2d 0  0   gphiv indice2d 0  ny 1  vert1  vert2   meme          if keyword_set direc  then res   grossemoyenne res direc nan  boxzoom   boxzoom   nodomdef        END      xy           ELSE:BEGIN                 xy          indice2d   lindgen jpi  jpj           indice2d   indice2d indicex 0 :indicex 0 nx 1 indicey 0 :indicey 0 ny 1      extraction of u and v on the appropriated domain            case 1 of              size u 1  EQ nxu AND  size u 2  EQ nyu AND                 size v 1  EQ nxv AND  size v 2  EQ nyv:BEGIN                 if nxu NE nx then                   if indicex 0  EQ firstxu then u   u 0:nx 1    ELSE u   u 1: nx                    IF nxv NE nx THEN                   if indicex 0  EQ firstxv then v   v 0:nx 1    ELSE v   v 1: nx                   IF nyu NE ny THEN                   if indicey 0  EQ firstyu then u   u  0:ny 1  ELSE u   u  1: ny                  IF nyv NE ny THEN                   if indicey 0  EQ firstyv then v   v  0:ny 1  ELSE v   v  1: ny              END              size u 1  EQ jpi AND  size u 2  EQ jpj AND                 size v 1  EQ jpi AND  size v 2  EQ jpj:BEGIN                 u   u indice2d                 v   v indice2d              END             ELSE:return  report problemes d adequation entre la taille du domaine et la taille des matrices necessaires a tracer des vecteurs           endcase     We reshape u and v to make sure that no dimension has been erased            if ny EQ 1 then begin             u   reform u  nx  ny   over              v   reform v  nx  ny   over           endif     construction of u and v at points T            a u 0           u u shift u 1 0 2           if NOT keyword_set key_periodic  OR nx NE jpi then u 0 a          a v 0           v v shift v 0 1 2           if NOT keyword_set key_periodic  OR nx NE jpi then v 0 a     attribution of the mask and of longitude and latitude arrays    We recover the complete grid to establish a big mask extent in the four    direction to cover pointsfor which a land point has been    considerated  make a small drawing             mask   tmask indice2d jpi jpj firstzt           if nyt EQ 1 THEN mask   reform mask  nx  ny   over      construction of land containing all points to mask            if n_elements valmask  EQ 0 THEN valmask   1e20          landu   where u GE valmask 10           if landu 0  NE  1 then u landu    0          landv   where v GE valmask 10           if landv 0  NE  1 then v landv    0          res sqrt u 2 v 2           if NOT keyword_set key_periodic  OR nx NE jpi then res 0 values f_nan          res 0 values f_nan          mask   where mask eq 0           IF mask 0  NE  1 THEN res mask    valmask   All kind of average          domdef   glamt indice2d 0  0   glamu indice2d nx 1  0 gphit indice2d 0  0   gphiv indice2d 0  ny 1  vert1  vert2   meme          if keyword_set direc  then res   moyenne res direc nan  boxzoom   boxzoom   nodomdef        END      endcase      if keyword_set key_performance  THEN print   temps norme  systime 1 tempsun     return  res end"); 
     198a[196] = new Array("./ToBeReviewed/CALCULS/projectondepth.html", "projectondepth.pro", "", "             file_comments   Allows to project a 3d field following a depth array       categories   Without loop      param ARRAYIN  type 3d array    It is a 3d array whose 3rd dimension must be equal to jpk       param DEPTHIN  type 2d array    It is a 2d array indicating for each point n  at which depth to project             returns   A 2d array which is the projection of the 3d array following depths indicated by depthin      uses   common pro      restrictions    points at  values f_nan impossible calculation  Land points masked at valmask       examples   we build a possible depths array     IDL  a gdept jpk 1 1 jpi jpj findgen jpi jpj    We build an array to project on these depths  For the test    we build a 3d array whose each vector following z is the depth       IDL  arraytest replicate 1 jpi jpj gdept     IDL  arraytest reform arraytest jpi jpj jpk   over    We test the projection of the depth array on the depth      IDL  plt  1e6 a projectondepth arraytest a nocontour      null field at 1e 6 pres       verifcation projecting the temperature of 20 C for example       history   Sebastien Masson  smasson lodyc jussieu fr                         15 6 2000      version    Id: projectondepth pro 163 2006 08 29 12:59:46Z navarro             FUNCTION projectondepth  arrayin  depthin     compile_opt idl2  strictarrsubs      tempsun   systime 1            To key_performance  common      depth   litchamp depthin     array   litchamp arrayin    Small verifications    tailledepth   size depth     taillearray   size array     if tailledepth 0  NE 2 THEN return  report Depth array must have 2 dimensions     if taillearray 0  NE 3 THEN return  report Array in must have 3 dimensions    verification of the coherence between array s size and the domain     grille  mask   1   1   1 nx ny nz firstx firsty firstz lastx lasty lastz    case 1 of       tailledepth 1  eq jpi and tailledepth 2  eq jpj:depth depth firstx:lastx  firsty:lasty        tailledepth 1  eq  nx and tailledepth 2  eq  ny:       else:return  report Probleme d adequation entre les tailles du domaine et celle du tableau de profondeur     endcase    case 1 OF       taillearray 3  NE jpk:return  report Le tableau 3d doit avoir sa 3eme dimension egale a jpk        taillearray 1  eq jpi and taillearray 2  eq jpj:array array firstx:lastx  firsty:lasty          taillearray 1  eq  nx and taillearray 2  eq  ny:       else:return  report Probleme d adequation entre les tailles du domaine et celle du tableau de profondeur     endcase     c est parti      flevel   depth2floatlevel depth    we delete points at  values f_nan    notanumber   where finite flevel   nan  EQ 1     if notanumber 0  NE  1 then flevel notanumber    0   we sill  delete land points at valmask for example     flevel   0   flevel    jpk 1       indexup   level2index floor flevel     indexlow   nx ny indexup    out   where indexlow GE nx ny jpk 1     if out 0  NE  1 then indexlow out    indexlow out nx ny      weight   flevel floor flevel     res   array indexup     res   res weight array indexlow res      We put back points at  values f_nan    if notanumber 0  NE  1 then res notanumber     values f_nan    if out 0  NE  1 then res out     values f_nan   We mask land points at valmask    if n_elements valmask  EQ 0 then valmask   1e20    terre   where temporary mask    0  EQ 0     if terre 0  NE  1 then res terre    valmask      if keyword_set key_performance  THEN print   temps projectondepth  systime 1 tempsun     return  res end"); 
     199a[197] = new Array("./ToBeReviewed/CALCULS/remplit.html", "remplit.pro", "", "     file_comments        categories        param ZINPUT        keyword NAN        keyword NITER        keyword BASIQUE        keyword MASK        keyword FILLXDIR         keyword FILLYDIR        keyword FILLVAL        keyword _EXTRA   Used to pass your keywords      returns        uses        restrictions        examples        history        version    Id: remplit pro 163 2006 08 29 12:59:46Z navarro             Extrapole zinout jpi jpj  sur les continents en utilisant les 4     plus proches voisins masques oceaniquement et construit un nouveau     masque     contenant l ancien masque oceanique PLUSles points extrapoles      Reitere le processus niter fois      C est pas clair  essayez                   Nan: to fill the point which have the value       values f_nan  Whitout this keyword  these point are not filling      and stays at  values f_nan         todo seb     FUNCTION remplit  zinput  NAN   nan  NITER   niter  BASIQUE   basique  mask   mask  FILLXDIR   fillxdir  FILLYDIR   fillydir  FILLVAL   fillval  _extra   ex     compile_opt idl2  strictarrsubs    common   tempsun   systime 1             pour key_performance   les points non remplis sont masques a valmask   IF n_elements niter  EQ 0 THEN niter   1   IF niter EQ 0 THEN return  zinput   z   zinput   if n_elements key_gridtype  EQ 0 then key_gridtype    c    if keyword_set basique  then begin     oldkey_gridtype   key_gridtype     key_gridtype    c      nx    size zinput 1      ny    size zinput 2      if NOT keyword_set mask  then mmmask   basique ELSE mmmask   mask     if  key_gridtype eq  e  then begin       case vargrid of          T :glam   glamt firstxt:lastxt  firstyt:lastyt           U :glam   glamu firstxu:lastxu  firstyu:lastyu        endcase     endif   ENDIF ELSE grille  mmmask  glam  gphi  gdep  nx  ny  nz  _extra   ex   if keyword_set mask  then mmmask   mask     if  size mmmask 0  EQ 3 THEN mmmask   mmmask    0      if n_elements mmmask  EQ 1 then mmmask   replicate 1b  nx  ny    if keyword_set nan  then begin     nanpoint   where finite z  EQ 0      if nanpoint 0  NE  1 then begin       mmmask nanpoint    0b       z nanpoint    0     endif   ENDIF   mmmask   byte mmmask      on ajoute un cadre de zero a z  mask  e1  e2   comme ca apres on peut faire des shifts ds tous les sens sans se   soucier des bords du domaine      tempdeux   systime 1            pour key_performance  2   nx2   nx 2   case key_gridtype of      c :BEGIN       ztmp   bytarr nx 2  ny 2        ztmp 1:nx  1:ny    mmmask       mmmask   temporary ztmp        ztmp   fltarr nx 2  ny 2        ztmp 1:nx  1:ny    z       if keyword_set key_periodic  AND nx EQ jpi then begin         ztmp 0  1:ny    z jpi 1            ztmp nx 1  1:ny    z 0          endif       z   temporary ztmp      END      e :BEGIN       ztmp   bytarr nx 2  ny 4        ztmp 1:nx  2:ny 1    mmmask       mmmask   temporary ztmp        ztmp   fltarr nx 2  ny 4        ztmp 1:nx  2:ny 1    z       if keyword_set key_periodic  AND nx EQ jpi then begin         ztmp 0  2:ny 1    z jpi 1            ztmp nx 1  2:ny 1    z 0          endif       z   temporary ztmp      END   endcase   IF testvar var   key_performance  EQ 2 THEN       print   temps remplit: on ajoute un cadre de zero   systime 1 tempdeux       iteration        FOR n   1  niter DO BEGIN    on trouve les points coast     tempdeux   systime 1          pour key_performance  2   les points du bord du cadre ne doivent pas etre selectionnes comme   la coast     case key_gridtype of        c :BEGIN         mmmask 0      1b         mmmask nx 1      1b         mmmask  0    1b         mmmask  ny 1    1b       END        e :BEGIN         mmmask 0      1b         mmmask nx 1      1b         mmmask  0:1    1b         mmmask  ny 2:ny 3    1b       END     endcase   liste des points terre restant     IF keyword_set fillxdir  THEN BEGIN   we stop if all the lines  that contains data  have been filled       test   total mmmask 1:nx    1        IF total test EQ 0 test EQ nx  EQ ny 2 THEN GOTO  fini     ENDIF     IF keyword_set fillydir  THEN BEGIN   we stop if all the columns  that contains data  have been filled       test   total mmmask  1:ny  2        IF total test EQ 0 test EQ ny  EQ nx 2 THEN GOTO  fini     ENDIF     land   where mmmask EQ 0      if land 0  EQ  1 then GOTO  fini   les points du bord du cadre doivent maintenant etre dans la terre     case key_gridtype of        c :BEGIN         mmmask 0      0b         mmmask nx 1      0b         mmmask  0    0b         mmmask  ny 1    0b       END        e :BEGIN         mmmask 0      0b         mmmask nx 1      0b         mmmask  0:1    0b         mmmask  ny 2:ny 3    0b       END     endcase     if keyword_set key_periodic  AND nx EQ jpi then begin       mmmask 0      mmmask nx          mmmask nx 1      mmmask 1        endif   liste des voisins mer     case key_gridtype of        c :BEGIN         CASE 1 OF           keyword_set fillxdir :weight   mmmask 1 land mmmask 1 land            keyword_set fillydir :weight   mmmask nx2 land mmmask nx2 land            ELSE:weight   mmmask 1 land mmmask 1 land mmmask nx2 land mmmask nx2 land                 1 sqrt 2 mmmask nx2 1 land mmmask nx2 1 land                              mmmask nx2 1 land mmmask nx2 1 land          ENDCASE       END        e :BEGIN         shifted   glam 0  0  LT glam 0  1          oddeven    land nx2 1 shifted  MOD 2         weight   mmmask 1 land mmmask 1 land               mmmask 2 nx2 land mmmask 2 nx2 land               sqrt 2 mmmask nx2 oddeven land mmmask nx2 1 oddeven land                         mmmask nx2 oddeven land mmmask nx2 1 oddeven land        END     endcase      ok   where weight GT 0      weight   weight ok      coast   land temporary ok        IF testvar var   key_performance  EQ 2 THEN         print   temps remplit: trouver la coast   systime 1 tempdeux     remplissage des points coast       tempdeux   systime 1          pour key_performance  2   on masque z     z   temporary z mmmask       case key_gridtype of        c :BEGIN         CASE 1 OF           keyword_set fillxdir :zcoast   z 1 coast z 1 coast            keyword_set fillydir :zcoast   z nx2 coast z nx2 coast            ELSE:zcoast   z 1 coast z 1 coast z nx2 coast z nx2 coast                 1 sqrt 2 z nx2 1 coast z nx2 1 coast                              z nx2 1 coast z nx2 1 coast          ENDCASE       END        e :BEGIN         oddeven    coast nx2 1 shifted  MOD 2         zcoast   z 1 coast z 1 coast z 2 nx2 coast z 2 nx2 coast               sqrt 2 z nx2 oddeven coast z nx2 1 oddeven coast                         z nx2 oddeven coast z nx2 1 oddeven coast        END     endcase           z coast     temporary zcoast  temporary weight    we update the the boundary conditions of z     if keyword_set key_periodic  AND nx EQ jpi then begin       z 0      z nx          z nx 1      z 1        endif     IV  on reduit le masque       mmmask  temporary coast    1       IF testvar var   key_performance  EQ 2 THEN         print   temps remplit: une iteration   systime 1 tempdeux   ENDFOR  fini:     on masque les valeurs sur les lands restantes     IF n_elements valmask  EQ 0 then valmask   1e20   IF n_elements fillval  EQ 0 THEN fillval   valmask   z   temporary z mmmask   fillval 1b mmmask      on redecoupe le tableau pour retirer le cadre      case key_gridtype of      c :BEGIN       z   z 1:nx  1:ny      END      e :BEGIN       z   z 1:nx  2:ny 1      END   endcase     if keyword_set basique  then key_gridtype   oldkey_gridtype     if keyword_set key_performance  THEN print   temps remplit  systime 1 tempsun    return  z END  "); 
     200a[198] = new Array("./ToBeReviewed/CALCULS/rhon.html", "rhon.pro", "", "     file_comments        categories        param SN        param TN        keyword INSITU        keyword SIGMA_N        returns        uses        restrictions        examples        history        version    Id: rhon pro 163 2006 08 29 12:59:46Z navarro               Calcul de la fonction d etat  issue de eos F            Creation : 1997   G  Roullet      adaptation pour les tableaux z zt xyz xyzt      par seb            todo seb     FUNCTION rhon  sn  tn  INSITU   insitu  SIGMA_N   sigma_n     compile_opt idl2  strictarrsubs    common    tempsun   systime 1            pour key_performance       sn    1e5   double sn   double tn    1e5         IF keyword_set sigma_n  then insitu   1     taille   size sn     case taille 0  of       0:BEGIN                    z          zrhop 0d          jkmax   1       END        1:BEGIN                    z          zrhop dblarr taille 1           jkmax   taille 1        END        2:BEGIN                    xy  jpt 1  ou zt          zrhop dblarr taille 1 taille 2           if jpt EQ 1 then jkmax   1 ELSE jkmax   taille 1        END        3:BEGIN                    xyz  jpt 1  ou xyt          zrhop dblarr taille 1 taille 2 taille 3           if jpt EQ 1 then jkmax   taille 3  ELSE jkmax   1       END        4:BEGIN                    xyzt          zrhop dblarr taille 1 taille 2 taille 3 taille 4             jkmax   taille 3        END     endcase          FOR jk   0  jkmax 1 DO BEGIN        case taille 0  of          0:BEGIN                 z             ztt   tn             zs   sn          END           1:BEGIN                 z             ztt   tn jk              zs   sn jk            END           2:BEGIN                 xy  jpt 1  ou zt             if jpt EQ 1 then begin                ztt   tn                zs   sn             ENDIF ELSE BEGIN                ztt   tn jk                   zs   sn jk                 ENDELSE          END           3:BEGIN                 xyz  jpt 1  ou xyt             if jpt EQ 1 then begin                ztt   tn    jk                 zs   sn   jk               endif ELSE BEGIN                ztt   tn                zs   sn             ENDELSE          END           4:BEGIN                 xyzt             ztt   tn    jk                zs   sn   jk              END        endcase       if n_elements sigma_n  NE 0 then zh   1000 sigma_n ELSE zh   gdept jk        square root salinity       zsr  sqrt abs zs        compute density pure water at atm pressure       zr1 6 536332e 9 ztt 1 120083e 6 ztt 1 001685e 4 ztt 9 095290e 3 ztt 6 793952e 2 ztt 999 842594       seawater density atm pressure       zr2   5 3875e 9 ztt 8 2467e 7 ztt 7 6438e 5 ztt 4 0899e 3 ztt 0 824493       zr3   1 6546e 6 ztt 1 0227e 4 ztt 5 72466e 3       zr4  4 8314e 4         potential density  reference to the surface        case taille 0  of          0: zrhop       zr4 zs   zr3 zsr   zr2 zs   zr1          1: zrhop jk   zr4 zs   zr3 zsr   zr2 zs   zr1          2:BEGIN              if jpt EQ 1 then zrhop    zr4 zs   zr3 zsr   zr2 zs   zr1               ELSE zrhop jk     zr4 zs   zr3 zsr   zr2 zs   zr1          END          3:BEGIN              if jpt EQ 1 then zrhop   jk   zr4 zs   zr3 zsr   zr2 zs   zr1                ELSE zrhop    zr4 zs   zr3 zsr   zr2 zs   zr1          END          4: zrhop   jk     zr4 zs   zr3 zsr   zr2 zs   zr1       endcase        IF n_elements insitu  EQ 1 THEN BEGIN        add the compression terms          ze    3 508914e 8 ztt 1 248266e 8 ztt 2 595994e 6          zbw    1 296821e 6 ztt 5 782165e 9 ztt 1 045941e 4          zb   zbw   ze   zs            zd    2 042967e 2          zc    7 267926e 5 ztt 2 598241e 3 ztt 0 1571896          zaw    5 939910e 6 ztt 2 512549e 3 ztt 0 1028859 ztt  4 721788          za     zd zsr   zc zs   zaw            zb1   0 1909078 ztt 7 390729 ztt 55 87545          za1   2 326469e 3 ztt 1 553190 ztt 65 00517 ztt 1044 077          zkw   1 361629e 4 ztt 1 852732e 2 ztt 30 41638 ztt 2098 925 ztt 190925 6          zk0   zb1 zsr   za1 zs   zkw         masked in situ density          case taille 0  of             0: zrhop   zrhop    1 0 zh zk0 zh za zh zb              1: zrhop jk    zrhop jk     1 0 zh zk0 zh za zh zb              2:BEGIN                 if jpt EQ 1 then zrhop   zrhop    1 0 zh zk0 zh za zh zb                   ELSE zrhop jk      zrhop jk       1 0 zh zk0 zh za zh zb              END             3:BEGIN                 if jpt EQ 1 then zrhop   jk    zrhop   jk     1 0 zh zk0 zh za zh zb                   ELSE zrhop   zrhop    1 0 zh zk0 zh za zh zb              END             4: zrhop   jk      zrhop   jk       1 0 zh zk0 zh za zh zb           endcase                 ENDIF     ENDFOR         terre   where tn GE 1e6     if terre 0  NE  1 then zrhop terre    valmask     if keyword_set key_performance  THEN print   temps rhon  systime 1 tempsun          return  zrhop END   "); 
     201a[199] = new Array("./ToBeReviewed/CALENDRIER/def_month.html", "def_month.pro", "", "     file_comments        categories        param TIMAVE        param DATE        returns        uses        restrictions        examples        history        version    Id: def_month pro 163 2006 08 29 12:59:46Z navarro        todo seb   FUNCTION def_month  timave  date     translate month number in string       compile_opt idl2  strictarrsubs      IF strpos date   _  GT  1 THEN date   strmid date  0  strpos date   _     CASE strmid timave  0  2  OF         1m : BEGIN          CASE strmid date  strlen date 2  2  OF               01 : mn    January               02 : mn    February               03 : mn    March               04 : mn    April               05 : mn    May               06 : mn    June               07 : mn    July               08 : mn    August               09 : mn    September               10 : mn    October               11 : mn    November               12 : mn    December              ELSE: mn              ENDCASE        END         3m : BEGIN          CASE strmid date  strlen date 2  2  OF               01 : mn    DJF               02 : mn    MMA               03 : mn    JJA               04 : mn    SON              ELSE: mn              ENDCASE        END        ELSE:    ENDCASE       return  mn END "); 
     202a[200] = new Array("./ToBeReviewed/COULEURS/palit.html", "palit.pro", "", "     file_comments    Clarify the current palette playing with brightness      param COEF  in required  The rule of attenuation of colors divide by 2 the brightness by default      param RED       param GREEN      param BLUE      todo Seb: compl ter param red green blue   PRO palit  coef  red  green  blue     compile_opt idl2  strictarrsubs      IF n_elements coef  EQ 0 THEN coef   0 5    IF n_elements red  EQ 0 THEN tvlct  red  green  blue   get    color_convert  red  green  blue  h  l  s   rgb_hls    l   1 coef 1 l       Black must stay really black     Each palette starts by Black and ends by white      l 0    0     tvlct  h  l  s   hls    return END"); 
     203a[201] = new Array("./ToBeReviewed/GRILLE/changegrid.html", "changegrid.pro", "", "     file_comments        categories        param NEWGRID        returns        uses        restrictions        examples        history        version    Id: changegrid pro 163 2006 08 29 12:59:46Z navarro          todo seb     function changegrid  newgrid       compile_opt idl2  strictarrsubs    cm_4mesh        if cmpgrid newgrid  EQ 0 then return  0     update the common paramaters      ccmeshparameters   newgrid     ixminmesh   newgrid ixminmesh    ixmaxmesh   newgrid ixmaxmesh    iyminmesh   newgrid iyminmesh    iymaxmesh   newgrid iymaxmesh    izminmesh   newgrid izminmesh    izmaxmesh   newgrid izmaxmesh     read the new file      loadgrid  newgrid filename     IF NOT keyword_set key_forgetold  THEN BEGIN     updateold   ENDIF      return  1 end"); 
     204a[202] = new Array("./ToBeReviewed/GRILLE/cmpgrid.html", "cmpgrid.pro", "", "     file_comments        categories        param NEWGRID        returns        uses        restrictions        examples        history        version    Id: cmpgrid pro 163 2006 08 29 12:59:46Z navarro          todo seb     FUNCTION cmpgrid  newgrid       compile_opt idl2  strictarrsubs    common       newgrid must be a structure      if size newgrid   type  NE 8 then return  0     does ccmeshparameters exist        if n_elements ccmeshparameters  EQ 0 then return  1     we compare the structure which caracterise the grid whith   ccmeshparameters      case 1 of       ccmeshparameters jpiglo NE newgrid jpiglo:       ccmeshparameters jpjglo NE newgrid jpjglo:       ccmeshparameters jpkglo NE newgrid jpkglo:       ccmeshparameters jpi NE newgrid jpi:       ccmeshparameters jpj NE newgrid jpj:       ccmeshparameters jpk NE newgrid jpk:       total ccmeshparameters glaminfo   newgrid glaminfo  NE 0:       total ccmeshparameters gphiinfo   newgrid gphiinfo  NE 0:       ccmeshparameters ixminmesh NE newgrid ixminmesh:       ccmeshparameters ixmaxmesh NE newgrid ixmaxmesh:       ccmeshparameters iyminmesh NE newgrid iyminmesh:       ccmeshparameters iymaxmesh NE newgrid iymaxmesh:       ccmeshparameters izminmesh NE newgrid izminmesh:       ccmeshparameters izmaxmesh NE newgrid izmaxmesh:       ccmeshparameters key_shift NE newgrid key_shift:       ccmeshparameters key_periodic NE newgrid key_periodic:       array_equal ccmeshparameters key_stride  newgrid key_stride  EQ 0:       ccmeshparameters key_gridtype NE newgrid key_gridtype:       ccmeshparameters key_yreverse NE newgrid key_yreverse:       ccmeshparameters key_zreverse NE newgrid key_zreverse:       ccmeshparameters key_partialstep NE newgrid key_partialstep:       ccmeshparameters key_onearth NE newgrid key_onearth:       ELSE:return  0    endcase     return  1 end"); 
     205a[203] = new Array("./ToBeReviewed/GRILLE/decoupeterre.html", "decoupeterre.pro", "", "             file_comments   Similar to grille  Here  when vargrid is not  T  or  W  we have to   recuperate Tmask  glamt  gphit and the array of triangulation on the   considered sub domain for the drawing  The specificity of decoupeterre   in comparaison with grille  is that we take  if possible  a sub domain   just a little bit bigger than the one defined by domdef in order to be   sure that the mask we draw will cover over all the drawing       categories   Utilities      param MASK        param GLAM        param GPHI        param GDEP        keyword TYPE        keyword INDICEZOOM        keyword COINMONTE        keyword COINDESCEND        keyword REALSECTION        keyword USETRI        keyword _EXTRA   Used to pass your keywords      keyword TRI    This keyword serve to obtain  thanks to grille  the triangulation which   refer to the grid but only on the part of the zoom  This of triangulation   is passed in the variable we have equate at TRI    For example: grille tri triangulation_reduite    This keyword is used in plt pro      keyword WDEPTH   To specify that the field is at W depth instead of T    depth  automatically activated if vargrid eq  W       uses   common pro      history   Sebastien Masson  smasson lodyc jussieu fr                          24 2 99      version    Id: decoupeterre pro 163 2006 08 29 12:59:46Z navarro        todo seb : manque tous les param et plein de keywords                  PRO decoupeterre  mask  glam  gphi  gdep  TYPE   type  TRI   tri  INDICEZOOM   indicezoom  COINMONTE   coinmonte  COINDESCEND   coindescend  WDEPTH   wdepth  REALSECTION   realsection  USETRI   usetri  _extra   ex       compile_opt idl2  strictarrsubs    cm_4mesh  cm_4data   IF NOT keyword_set key_forgetold  THEN BEGIN  updatenew   ENDIF     tempsun   systime 1             For key_performance     if vargrid EQ  W  then wdepth   1       horizontal parameters     if possible extent the domain according to the grid type   default case   case vargrid of      U :BEGIN       firstx   0    min firstxt  firstxu 1        lastx    max lastxt  lastxu 1    min firstyt  firstyu 1        lasty    max lastyt  lastyu 1    min firstxt  firstxv 1        lastx    max lastxt  lastxv 1    min firstyt  firstyv 1        lasty    max lastyt  lastyv 1    min firstxt  firstxf 1        lastx    max lastxt  lastxf 1    min firstyt  firstyf 1        lasty    max lastyt  lastyf 1    firstx 1 :lastx  firsty:lasty            ELSE glam   glamu 0    firstx 1 :lastx  firsty:lasty        ENDELSE     END      yz :BEGIN       if keyword_set realsection  EQ 0 then begin         if vargrid EQ  U  OR vargrid EQ  F  then             gphi   gphiu firstx:lastx  firsty:lasty        ENDIF ELSE BEGIN            to drawsectionbottom           if vargrid EQ  U  OR vargrid EQ  F  OR finite gphiv 0  EQ 0 then             gphi   gphif firstx:lastx  0    firsty 1 :lasty            ELSE gphi   gphiv firstx:lastx  0    firsty 1 :lasty        ENDELSE     END     ELSE:   ENDCASE     vertical boundaries     if keyword_set wdepth   then begin     firstz   0    min firstzt  firstzw 1      lastz    max lastzt  lastzw 1     jpk 1    ENDIF ELSE BEGIN     firstz   firstzt     lastz   lastzt   ENDELSE    nz   lastz firstz 1     mask     case type of      xy :BEGIN       mask   tmask firstx:lastx  firsty:lasty  firstz        profond   firstz NE 0     END   for the verical section  we have to choose the right mask according   to the grid point and to the direction of the section      xz :BEGIN       if vargrid EQ  V  OR vargrid EQ  F  then begin         mask    vmask firstx:lastx  firstyv:lastyv  firstz:lastz        ENDIF ELSE mask   tmask firstx:lastx  firsty:lasty  firstz:lastz      END      yz :BEGIN       if vargrid EQ  U  OR vargrid EQ  F  then begin         mask    umask firstxu:lastxu  firsty:lasty  firstz:lastz        ENDIF ELSE mask   tmask firstx:lastx  firsty:lasty  firstz:lastz      END     ELSE:mask   tmask firstx:lastx  firsty:lasty  firstz:lastz    endcase     vertical axis     when we do a real section we directly plot the gdepw    in drawsectionbottom pro  instead of contouring the mask at 0 5 at   gdept   IF keyword_set realsection  EQ 0 then gdep   gdept firstz:lastz      ELSE BEGIN       if lastz EQ jpk 1 then     we add some fictive very deep level that will not be used but that is   necessary to avoid array size bugs in draw bottom section        gdep    gdepw firstz 1:lastz  2 gdept jpk 1         ELSE gdep   gdepw firstz 1:lastz 1       gdep   gdepw firstz:lastz    special case when we are using the partial steps in the vertical   section that are only 1 point wide    in that case  the z axis is a 2d array and we modify the depth of   the last level ocean with hdepw that is the real depth of the bottom      CASE 1 OF       keyword_set key_partialstep  and type EQ  xz            AND ny EQ 1 AND keyword_set realsection :BEGIN         bottom   total mask  3          good   where bottom NE 0 AND bottom NE nz 1          bottom   lindgen nx bottom nx         IF good 0  NE  1 THEN BEGIN           bottom   bottom good            gdep   replicate 1  nx gdep           truegdep   hdepw firstx:lastx  firsty:lasty            gdep bottom    truegdep good          ENDIF       END       keyword_set key_partialstep  and type EQ  yz            AND nx EQ 1 AND keyword_set realsection :BEGIN          bottom   total mask  3          good   where bottom NE 0 AND bottom NE nz 1          bottom   lindgen ny bottom ny         IF good 0  NE  1 THEN BEGIN           bottom   bottom good            gdep   replicate 1  ny gdep           truegdep   hdepw firstx:lastx  firsty:lasty            gdep bottom    truegdep good          ENDIF       END       ELSE:     ENDCASE   ENDELSE     Triangulation vector when TRI is activated      IF arg_present TRI  then       if triangles_list 0  EQ  1 OR usetri LT 1 then tri    1 ELSE BEGIN   If we are tracing a deep level  we redo the triangulation     if keyword_set profond  then begin       tri   triangule mask  coinmonte   coinmonte  coindescend   coindescend  _extra   ex        indicezoom    lindgen jpi  jpj firstx:lastx  firsty:lasty    ENDIF ELSE BEGIN    Otherwise  we recuperate the part of triangulation that interest us and we number them well        if nx EQ jpi AND ny EQ jpj then tri   triangles_list ELSE BEGIN          msk   bytarr jpi  jpj          msk firstx:lastx  firsty:lasty    1         ind   where  msk triangles_list 0    EQ 1                        AND msk triangles_list 1    EQ 1                        AND msk triangles_list 2    EQ 1           tri   triangles_list  ind firstx firsty jpi          y   tri jpi         x   tri y jpi         tri   x y nx       ENDELSE     ENDELSE   ENDELSE     if keyword_set key_performance  THEN print   temps decoupeterre  systime 1 tempsun      return end "); 
     206a[204] = new Array("./ToBeReviewed/GRILLE/domdef.html", "domdef.pro", "", "             file_comments    Allows to extract a sub domain of study by providing parameters    needed for drawings  see outputs       categories      param Z1  in optional    For a 3d domain whose the horizontal part cover all glam       param Z2  in optional    For a 3d domain whose the horizontal part cover all gphi      param X1  in optional    Define the minimum longitude   All levels are selected       param X2  in optional    Define the maximum longitude   All levels are selected       param Y1  in optional    Define the minimum latitude   All levels are selected       param Y2  in optional    Define the maximum latitude   All levels are selected       keyword ENDPOINTS  type vector    A four elements vector  x1 y1 x2 y2  used to specify   that domdef must define the box used to make a plot  pltz  pltt    plt1d  done strictly along the line  that can have any direction    starting at  x1  y1  ending at  x2  y2  When defining endpoints    you must also define TYPE which define the type of plots    pltz   xt   yt   zt   x   y   z   t  will used   ENDPOINTS keywords      keyword FINDALWAYS   Force to redefine a box even when none point is find in the box     In this case  we select all the grid       keyword GRIDTYPE  type string or vector    It is a string or a vector of strings containing the grids s name     Only determined by  T U V W F  for which the calculation    must be done      For example:  T  or  T U       keyword MEMEINDICES   It is possible that points t u v and F correspond to a same geographic   box which do not concern the same array indexes  This is sometimes a   problem  or at least serious complications  in programs where several   type of grid intervene  see norme  curl  Activate MEMEINDICE to   force domdef to take same indexes  those of the grid T  for all other   grids       keyword INDEX    We activate it if we want that all elements passed in input of domdef    refer to indexes of glam  gphi and gdep arrays rather than to values    of these arrays       keyword XINDEX    We activate it if we want that all elements passed in input of domdef    and concerning the X dimension refer to indexes of glam arrays rather    than to values of these arrays       keyword YINDEX    We activate it if we want that all elements passed in input of domdef    and concerning the X dimension refer to indexes of gphi arrays rather    than to values of these arrays        keyword ZINDEX    We activate it if we want that all elements passed in input of domdef    and concerning the X dimension refer to indexes of gdep arrays rather    than to values of these arrays       uses   common pro        history   Sebastien Masson  smasson lodyc jussieu fr   8 2 98   rewrite everything  debug and spee up Sebastien Masson April 2005      version    Id: domdef pro 163 2006 08 29 12:59:46Z navarro        todo seb: output pas clair  pas d input required          pro domdef  x1  x2  y1  y2  z1  z2  FINDALWAYS   findalways                 GRIDTYPE   gridtype  MEMEINDICES   memeindices                 XINDEX   xindex  YINDEX   yindex  ZINDEX   zindex                 ENDPOINTS   endpoints  TYPE   type                 INDEX   index  _extra   ex     include commons     compile_opt idl2  strictarrsubs    cm_4mesh   IF NOT keyword_set key_forgetold  THEN BEGIN  updatenew  updatekwd   ENDIF     tempsun   systime 1             For key_performance     CASE N_PARAMS  OF     0:     1:     2:     4:     6:     ELSE:BEGIN       ras   report Bad number of parameter in the call of domdef        RETURN     END   ENDCASE     IF keyword_set endpoints  THEN BEGIN     IF NOT keyword_set type  THEN BEGIN        dummy   report If domdef is used do find the box associated                             to endpoints  you must also specify type keyword        return     ENDIF      CASE N_PARAMS  OF       0:       1:boxzoom    x1        2:boxzoom    x1  x2        4:boxzoom    x1  x2  y1  y2        6:boxzoom    x1  x2  y1  y2  z1  z2      ENDCASE     section  BOXZOOM   boxzoom  ENDPOINTS   endpoints  TYPE   type   ONLYBOX     return   ENDIF         recall domdef when there is only one input parameter       IF N_PARAMS  EQ 1 THEN BEGIN     CASE n_elements x1  OF       2:domdef  x1 0  x1 1  FINDALWAYS   findalways  GRIDTYPE   gridtype  MEMEINDICES   memeindices  XINDEX   xindex  YINDEX   yindex  ZINDEX   zindex  INDEX   index  _extra   ex       4:domdef  x1 0  x1 1  x1 2  x1 3  FINDALWAYS   findalways  GRIDTYPE   gridtype  MEMEINDICES   memeindices  XINDEX   xindex  YINDEX   yindex  ZINDEX   zindex  INDEX   index  _extra   ex       6:domdef  x1 0  x1 1  x1 2  x1 3  x1 4  x1 5  FINDALWAYS   findalways  GRIDTYPE   gridtype  MEMEINDICES   memeindices  XINDEX   xindex  YINDEX   yindex  ZINDEX   zindex  INDEX   index  _extra   ex       ELSE:BEGIN         ras   report Bad number of elements in x1          RETURN       END     ENDCASE     RETURN     ENDIF     default definitions and checks     IF NOT keyword_set gridtype  THEN gridtype    T   U   V   W   F      ELSE gridtype   strupcase gridtype    IF keyword_set memeindices  THEN gridtype    T  gridtype    IF finite glamu 0  eq 0 THEN gridtype   gridtype where gridtype NE  U    IF finite glamv 0  eq 0 THEN gridtype   gridtype where gridtype NE  V    default definitions   lon1t   99999    lon2t    99999    lat1t   99999    lat2t    99999    lon1u   99999    lon2u    99999    lat1u   99999    lat2u    99999    lon1v   99999    lon2v    99999    lat1v   99999    lat2v    99999    lon1f   99999    lon2f    99999    lat1f   99999    lat2f    99999    vert1t   99999    vert2t    99999    vert1w   99999    vert2w    99999      IF jpj EQ 1 THEN BEGIN      IF  where gridtype eq  T 0  NE  1 OR  where gridtype EQ  W 0  NE  1 THEN BEGIN       glamt   reform glamt  jpi  jpj   over        gphit   reform gphit  jpi  jpj   over      ENDIF      IF  where gridtype eq  U 0  NE  1 THEN BEGIN       glamu   reform glamu  jpi  jpj   over        gphiu   reform gphiu  jpi  jpj   over      ENDIF       IF  where gridtype eq  V 0  NE  1 THEN BEGIN       glamv   reform glamv  jpi  jpj   over        gphiv   reform gphiv  jpi  jpj   over      ENDIF       IF  where gridtype eq  F 0  NE  1 THEN BEGIN       glamf   reform glamf  jpi  jpj   over        gphif   reform gphif  jpi  jpj   over      ENDIF     ENDIF     IF N_PARAMS  EQ 2 THEN GOTO  vertical         define all horizontal parameters     lon1 et lon2   lat1 et lat2   firstx tuvf  lastx tuvf  nx tuvf      check if the grid is defined for U and V points  If not  take care   of the cases gridtype eq  U  or  V      errstatus   0   IF  finite glamu 0 gphiu 0  EQ 0 OR n_elements glamu  EQ 0 OR n_elements gphiu  EQ 0  AND  where gridtype eq  U 0  NE  1 THEN BEGIN     firstxu    values f_nan     lastxu    values f_nan     nxu    values f_nan     okgrid   where gridtype NE  U  count      IF count NE 0 THEN gridtype   gridtype okgrid        ELSE errstatus   report U grid is undefined  Impossible to call domdef with vargid    U    ENDIF     IF  finite glamv 0 gphiv 0  EQ 0 OR n_elements glamv  EQ 0 OR n_elements gphiv  EQ 0  AND  where gridtype eq  V 0  NE  1 THEN BEGIN     firstxv    values f_nan     lastxv    values f_nan     nxv    values f_nan     okgrid   where gridtype NE  V  count      IF count NE 0 THEN gridtype   gridtype okgrid        ELSE errstatus   report V grid is undefined  Impossible to call domdef with vargid    V    ENDIF   IF errstatus EQ  1 THEN return       horizontal domain defined with lon1  lon2  lat1 and lat2       IF N_PARAMS  EQ 0       OR    N_PARAMS  EQ 4 OR N_PARAMS  EQ 6             AND NOT keyword_set xindex  AND NOT keyword_set yindex  AND NOT keyword_set index    THEN BEGIN     IF N_PARAMS  EQ 0 THEN BEGIN   find lon1 and lon2 the longitudinal boudaries of the full domain       IF  where gridtype eq  T 0  NE  1 THEN lon1t   min glamt  max   lon2t        IF  where gridtype eq  W 0  NE  1 AND  where gridtype eq  T 0  EQ  1 THEN lon1t   min glamt  max   lon2t        IF  where gridtype eq  U 0  NE  1 THEN lon1u   min glamu  max   lon2u        IF  where gridtype eq  V 0  NE  1 THEN lon1v   min glamv  max   lon2v        IF  where gridtype eq  F 0  NE  1 THEN lon1f   min glamf  max   lon2f        lon1   min lon1t  lon1u  lon1v  lon1f        lon2   max lon2t  lon2u  lon2v  lon2f    find lat1 and lat2 the latitudinal boudaries of the full domain       IF  where gridtype eq  T 0  NE  1 THEN lat1t   min gphit  max   lat2t        IF  where gridtype eq  W 0  NE  1 AND  where gridtype eq  T 0  EQ  1 THEN lat1t   min gphit  max   lat2t        IF  where gridtype eq  U 0  NE  1 THEN lat1u   min gphiu  max   lat2u        IF  where gridtype eq  V 0  NE  1 THEN lat1v   min gphiv  max   lat2v        IF  where gridtype eq  F 0  NE  1 THEN lat1f   min gphif  max   lat2f        lat1   min lat1t  lat1u  lat1v  lat1f        lat2   max lat2t  lat2u  lat2v  lat2f      ENDIF ELSE BEGIN        lon1   min x1  x2  max   lon2        lat1   min y1  y2  max   lat2      ENDELSE   find firstxt  firstxt  nxt and nyt according to lon1  lon2  lat1 and lat2     IF  where gridtype eq  T 0  NE  1 OR  where gridtype EQ  W 0  NE  1 THEN BEGIN       dom   where   glamt GE lon1  AND  glamt LE lon2                       AND  gphit GE lat1  AND  gphit LE lat2          IF  dom 0  EQ  1  THEN BEGIN         IF keyword_set findalways  THEN BEGIN           print   WARNING  empty T points box  we get the neighnors to define a new box            neig1   neighbor lon1  lat1  glamt  gphit  sphere   keyword_set key_onearth    keyword_set key_irregular            neig2   neighbor lon2  lat2  glamt  gphit  sphere   keyword_set key_onearth    keyword_set key_irregular            CASE N_PARAMS  OF             4:domdef  min glamt neig1  max glamt neig2  min gphit neig1  max gphit neig2  GRIDTYPE   gridtype  MEMEINDICES   memeindices  ZINDEX   zindex  _extra   ex             6:domdef  min glamt neig1  max glamt neig2  min gphit neig1  max gphit neig2  z1  z2  GRIDTYPE   gridtype  MEMEINDICES   memeindices  ZINDEX   zindex  _extra   ex           ENDCASE           RETURN         ENDIF ELSE BEGIN           ras   report WARNING  The box does not contain any T points            firstxt    1   lastxt    1   nxt   0           firstyt    1   lastyt    1   nyt   0         ENDELSE       ENDIF ELSE BEGIN         jyt   dom   jpi         ixt   temporary dom  MOD jpi         firstxt   min temporary ixt  max   lastxt          firstyt   min temporary jyt  max   lastyt          nxt   lastxt   firstxt   1         nyt   lastyt   firstyt   1       ENDELSE     ENDIF   find firstxu  firstxu  firstyu  firstyu  nxu and nyu   according to lon1  lon2  lat1 and lat2     IF  where gridtype eq  U 0  NE  1 THEN BEGIN       IF keyword_set memeindices  THEN BEGIN         firstxu   firstxt   lastxu   lastxt   nxu   nxt         firstyu   firstyt   lastyu   lastyt   nyu   nyt       ENDIF ELSE BEGIN         dom   where   glamu GE lon1  AND  glamu LE lon2                         AND  gphiu GE lat1  AND  gphiu LE lat2            IF  dom 0  EQ  1  THEN BEGIN           IF keyword_set findalways  THEN BEGIN   if t grid parameters alreday defined  we use them               CASE 1 OF                where gridtype eq  T 0  NE  1 OR  where gridtype EQ  W 0  NE  1:BEGIN                 print   WARNING  empty U points box  we use the same index as T points                  firstxu   firstxt   lastxu   lastxt   nxu   nxt                 firstyu   firstyt   lastyu   lastyt   nyu   nyt               END               ELSE:BEGIN                 print   WARNING  empty U points box  we get the neighnors to define a new box                  neig1   neighbor lon1  lat1  glamu  gphiu  sphere   keyword_set key_onearth    keyword_set key_irregular                  neig2   neighbor lon2  lat2  glamu  gphiu  sphere   keyword_set key_onearth    keyword_set key_irregular                  CASE N_PARAMS  OF                   4:domdef  min glamu neig1  max glamu neig2  min gphiu neig1  max gphiu neig2  GRIDTYPE   gridtype  MEMEINDICES   memeindices  ZINDEX   zindex  _extra   ex                   6:domdef  min glamu neig1  max glamu neig2  min gphiu neig1  max gphiu neig2  z1  z2  GRIDTYPE   gridtype  MEMEINDICES   memeindices  ZINDEX   zindex  _extra   ex                 ENDCASE                 RETURN               END             ENDCASE           ENDIF ELSE BEGIN             ras   report WARNING  The box does not contain any U points              firstxu    1   lastxu    1   nxu   0             firstyu    1   lastyu    1   nyu   0           ENDELSE         ENDIF ELSE BEGIN           jyu   dom   jpi           ixu   temporary dom  MOD jpi           firstxu   min temporary ixu  max   lastxu            firstyu   min temporary jyu  max   lastyu            nxu   lastxu   firstxu   1           nyu   lastyu   firstyu   1         ENDELSE       ENDELSE     ENDIF   find firstxv  firstxv  firstyv  firstyv  nxv and nyv    according to lon1  lon2  lat1 and lat2     IF  where gridtype eq  V 0  NE  1 THEN BEGIN       IF keyword_set memeindices  THEN BEGIN         firstxv   firstxt   lastxv   lastxt   nxv   nxt         firstyv   firstyt   lastyv   lastyt   nyv   nyt       ENDIF ELSE BEGIN         dom   where   glamv GE lon1  AND  glamv LE lon2                         AND  gphiv GE lat1  AND  gphiv LE lat2            IF  dom 0  EQ  1  THEN BEGIN           IF keyword_set findalways  THEN BEGIN             CASE 1 OF                where gridtype eq  T 0  NE  1 OR  where gridtype EQ  W 0  NE  1:BEGIN                 print   WARNING  empty V points box  we use the same index as T points                  firstxv   firstxt   lastxv   lastxt   nxv   nxt                 firstyv   firstyt   lastyv   lastyt   nyv   nyt               END                 where gridtype eq  U 0  NE  1:BEGIN                 print   WARNING  empty V points box  we use the same index as U points                  firstxv   firstxu   lastxv   lastxu   nxv   nxu                 firstyv   firstyu   lastyv   lastyu   nyv   nyu               END                ELSE:BEGIN                 print   WARNING  empty V points box  we get the neighnors to define a new box                  neig1   neighbor lon1  lat1  glamv  gphiv  sphere   keyword_set key_onearth    keyword_set key_irregular                  neig2   neighbor lon2  lat2  glamv  gphiv  sphere   keyword_set key_onearth    keyword_set key_irregular                  CASE N_PARAMS  OF                   4:domdef  min glamv neig1  max glamv neig2  min gphiv neig1  max gphiv neig2  GRIDTYPE   gridtype  MEMEINDICES   memeindices  ZINDEX   zindex  _extra   ex                   6:domdef  min glamv neig1  max glamv neig2  min gphiv neig1  max gphiv neig2  z1  z2  GRIDTYPE   gridtype  MEMEINDICES   memeindices  ZINDEX   zindex  _extra   ex                 ENDCASE                 RETURN               END             ENDCASE           ENDIF ELSE BEGIN             ras   report WARNING  The box does not contain any V points              firstxv    1   lastxv    1   nxv   0             firstyv    1   lastyv    1   nyv   0           ENDELSE         ENDIF ELSE BEGIN           jyv   dom   jpi           ixv   temporary dom  MOD jpi           firstxv   min temporary ixv  max   lastxv            firstyv   min temporary jyv  max   lastyv            nxv   lastxv   firstxv   1           nyv   lastyv   firstyv   1         ENDELSE       ENDELSE     ENDIF   find firstxf  firstxf  firstyf  firstyf  nxf and nyf   according to lon1  lon2  lat1 and lat2     IF  where gridtype eq  F 0  NE  1 THEN BEGIN       IF keyword_set memeindices  THEN BEGIN         firstxf   firstxt   lastxf   lastxt   nxf   nxt         firstyf   firstyt   lastyf   lastyt   nyf   nyt       ENDIF ELSE BEGIN         dom   where   glamf GE lon1  AND  glamf LE lon2                         AND  gphif GE lat1  AND  gphif LE lat2            IF  dom 0  EQ  1  THEN BEGIN           IF keyword_set findalways  THEN BEGIN             CASE 1 OF                where gridtype eq  T 0  NE  1 OR  where gridtype EQ  W 0  NE  1:BEGIN                 print   WARNING  empty F points box  we use the same index as T points                  firstxf   firstxt   lastxf   lastxt   nxf   nxt                 firstyf   firstyt   lastyf   lastyt   nyf   nyt               END                 where gridtype eq  U 0  NE  1:BEGIN                 print   WARNING  empty F points box  we use the same index as U points                  firstxf   firstxu   lastxf   lastxu   nxf   nxu                 firstyf   firstyu   lastyf   lastyu   nyf   nyu               END                 where gridtype eq  V 0  NE  1:BEGIN                 print   WARNING  empty F points box  we use the same index as V points                  firstxf   firstxv   lastxf   lastxv   nxf   nxv                 firstyf   firstyv   lastyf   lastyv   nyf   nyv               END                ELSE:BEGIN                 print   WARNING  empty F points box  we get the neighnors to define a new box                  neig1   neighbor lon1  lat1  glamf  gphif  sphere   keyword_set key_onearth    keyword_set key_irregular                  neig2   neighbor lon2  lat2  glamf  gphif  sphere   keyword_set key_onearth    keyword_set key_irregular                  CASE N_PARAMS  OF                   4:domdef  min glamf neig1  max glamf neig2  min gphif neig1  max gphif neig2  GRIDTYPE   gridtype  MEMEINDICES   memeindices  ZINDEX   zindex  _extra   ex                   6:domdef  min glamf neig1  max glamf neig2  min gphif neig1  max gphif neig2  z1  z2  GRIDTYPE   gridtype  MEMEINDICES   memeindices  ZINDEX   zindex  _extra   ex                 ENDCASE                 RETURN               END             ENDCASE             ENDIF ELSE BEGIN             ras   report WARNING  The box does not contain any F points              firstxf    1   lastxf    1   nxf   0             firstyf    1   lastyf    1   nyf   0           ENDELSE         ENDIF ELSE BEGIN           jyf   dom   jpi           ixf   temporary dom  MOD jpi           firstxf   min temporary ixf  max   lastxf            firstyf   min temporary jyf  max   lastyf            nxf   lastxf   firstxf   1           nyf   lastyf   firstyf   1         ENDELSE       ENDELSE     ENDIF     ENDIF ELSE BEGIN     CASE 1 OF       horizontal domain defined with the X and Y indexes            keyword_set xindex  AND keyword_set yindex  OR keyword_set index :BEGIN         fstx   min x1  x2  max   lstx          fsty   min y1  y2  max   lsty          IF fstx LT 0 OR lstx GE jpi THEN BEGIN           ras   report Bad definition of X1 or X2            return         ENDIF         IF fsty LT 0 OR lsty GE jpj THEN BEGIN           ras   report Bad definition of Y1 or Y2            return         ENDIF         nx   lstx   fstx   1         ny   lsty   fsty   1   find lon1t  lon2t  lat1t  lat2t  firstxt  firstxt  nxt and nyt   according to x1  x2  y1  y2         IF  where gridtype eq  T 0  NE  1 OR  where gridtype eq  W 0  NE  1 THEN BEGIN           lon1t   min glamt fstx:lstx  fsty:lsty  max   lon2t            lat1t   min gphit fstx:lstx  fsty:lsty  max   lat2t            firstxt   fstx   lastxt   lstx           firstyt   fsty   lastyt   lsty           nxt   nx   nyt   ny         ENDIF   find lon1u  lon2u  lat1u  lat2u  firstxu  firstxu  nxu and nyu   according to x1  x2  y1  y2         IF  where gridtype eq  U 0  NE  1 THEN BEGIN           lon1u   min glamu fstx:lstx  fsty:lsty  max   lon2u            lat1u   min gphiu fstx:lstx  fsty:lsty  max   lat2u            firstxu   fstx   lastxu   lstx           firstyu   fsty   lastyu   lsty           nxu   nx   nyu   ny         ENDIF   find lon1v  lon2v  lat1v  lat2v  firstxv  firstxv  nxv and nyv   according to x1  x2  y1  y2         IF  where gridtype eq  V 0  NE  1 THEN BEGIN           lon1v   min glamv fstx:lstx  fsty:lsty  max   lon2v            lat1v   min gphiv fstx:lstx  fsty:lsty  max   lat2v            firstxv   fstx   lastxv   lstx           firstyv   fsty   lastyv   lsty           nxv   nx   nyv   ny         ENDIF            find lon1f  lon2f  lat1f  lat2f  firstxf  firstxf  nxf and nyf   according to x1  x2  y1  y2         IF  where gridtype eq  F 0  NE  1 THEN BEGIN           lon1f   min glamf fstx:lstx  fsty:lsty  max   lon2f            lat1f   min gphif fstx:lstx  fsty:lsty  max   lat2f            firstxf   fstx   lastxf   lstx           firstyf   fsty   lastyf   lsty           nxf   nx   nyf   ny         ENDIF         lon1   min lon1t  lon1u  lon1v  lon1f          lon2   max lon2t  lon2u  lon2v  lon2f          lat1   min lat1t  lat1u  lat1v  lat1f          lat2   max lat2t  lat2u  lat2v  lat2f        END       horizontal domain defined with the X index and lat1 lat2           keyword_set xindex :BEGIN         fstx   min x1  x2  max   lstx          IF fstx LT 0 OR lstx GE jpi THEN BEGIN           ras   report Bad definition of X1 or X2            return         ENDIF         nx   lstx   fstx   1         lat1   min y1  y2  max   lat2    find lon1t  lon2t  firstxt  firstxt  firstyt  firstyt  nxt   and nyt according to x1  x2  lat1 and lat2         IF  where gridtype eq  T 0  NE  1 OR  where gridtype EQ  W 0  NE  1 THEN BEGIN           firstxt   fstx   lastxt   lstx   nxt   nx           dom   where   gphit fstx:lstx    GE lat1  AND  gphit fstx:lstx    LE lat2              IF  dom 0  EQ  1  THEN BEGIN             IF keyword_set findalways  THEN BEGIN               print   WARNING  empty T points box  we get the neighnors to define a new box                neig1   neighbor lon1  lat1  glamt fstx:lstx    gphit fstx:lstx    sphere   keyword_set key_onearth    keyword_set key_irregular                neig2   neighbor lon2  lat2  glamt fstx:lstx    gphit fstx:lstx    sphere   keyword_set key_onearth    keyword_set key_irregular                CASE N_PARAMS  OF                 4:domdef  fstx  lstx  min gphit fstx:lstx   neig1  max gphit fstx:lstx   neig2  GRIDTYPE   gridtype  MEMEINDICES   memeindices   XINDEX  ZINDEX   zindex  _extra   ex                 6:domdef  fstx  lstx  min gphit fstx:lstx   neig1  max gphit fstx:lstx   neig2  z1  z2  GRIDTYPE   gridtype  MEMEINDICES   memeindices   XINDEX  ZINDEX   zindex  _extra   ex               ENDCASE               RETURN             ENDIF ELSE BEGIN               ras   report WARNING  The box does not contain any T points                firstyt    1   lastyt    1   nyt   0             ENDELSE           ENDIF ELSE BEGIN             jyt   temporary dom    nx             firstyt   min temporary jyt  max   lastyt              nyt   lastyt   firstyt   1           ENDELSE           IF nyt NE 0 THEN lon1t   min glamt firstxt:lastxt  firstyt:lastyt  max   lon2t          ENDIF   find lon1u  lon2u  firstxu  firstxu  firstyu  firstyu  nxu   and nyu according to x1  x2  lat1 and lat2         IF  where gridtype eq  U 0  NE  1 THEN BEGIN           firstxu   fstx   lastxu   lstx   nxu   nx           IF keyword_set memeindices  THEN BEGIN             firstyu   firstyt   lastyu   lastyt   nyu   nyt           ENDIF ELSE BEGIN             dom   where   gphiu fstx:lstx    GE lat1  AND  gphiu fstx:lstx    LE lat2                IF  dom 0  EQ  1  THEN BEGIN               IF keyword_set findalways  THEN BEGIN                 CASE 1 OF                    where gridtype eq  T 0  NE  1 OR  where gridtype EQ  W 0  NE  1:BEGIN                     print   WARNING  empty U points box  we use the same index as T points                      firstyu   firstyt   lastyu   lastyt   nyu   nyt                   END                    ELSE:BEGIN                     print   WARNING  empty U points box  we get the neighnors to define a new box                      neig1   neighbor lon1  lat1  glamu fstx:lstx    gphiu fstx:lstx    sphere   keyword_set key_onearth    keyword_set key_irregular                      neig2   neighbor lon2  lat2  glamu fstx:lstx    gphiu fstx:lstx    sphere   keyword_set key_onearth    keyword_set key_irregular                      CASE N_PARAMS  OF                       4:domdef  fstx  lstx  min gphiu fstx:lstx   neig1  max gphiu fstx:lstx   neig2  GRIDTYPE   gridtype  MEMEINDICES   memeindices   XINDEX  ZINDEX   zindex  _extra   ex                       6:domdef  fstx  lstx  min gphiu fstx:lstx   neig1  max gphiu fstx:lstx   neig2  z1  z2  GRIDTYPE   gridtype  MEMEINDICES   memeindices   XINDEX  ZINDEX   zindex  _extra   ex                     ENDCASE                     RETURN                   END                 ENDCASE                ENDIF ELSE BEGIN                 ras   report WARNING  The box does not contain any U points                  firstyu    1   lastyu    1   nyu   0               ENDELSE             ENDIF ELSE BEGIN               jyu   temporary dom    nx               firstyu   min temporary jyu  max   lastyu                nyu   lastyu   firstyu   1             ENDELSE           ENDELSE           IF nyu NE 0 THEN lon1u   min glamu firstxu:lastxu  firstyu:lastyu  max   lon2u          ENDIF   find lon1v  lon2v  firstxv  firstxv  firstyv  firstyv  nxv   and nyv according to x1  x2  lat1 and lat2         IF  where gridtype eq  V 0  NE  1 THEN BEGIN           firstxv   fstx   lastxv   lstx   nxv   nx           IF keyword_set memeindices  THEN BEGIN             firstyv   firstyt   lastyv   lastyt   nyv   nyt           ENDIF ELSE BEGIN             dom   where   gphiv fstx:lstx    GE lat1  AND  gphiv fstx:lstx    LE lat2                IF  dom 0  EQ  1  THEN BEGIN               IF keyword_set findalways  THEN BEGIN                 CASE 1 OF                    where gridtype eq  T 0  NE  1 OR  where gridtype EQ  W 0  NE  1:BEGIN                     print   WARNING  empty V points box  we use the same index as T points                      firstyv   firstyt   lastyv   lastyt   nyv   nyt                   END                     where gridtype eq  U 0  NE  1:BEGIN                     print   WARNING  empty V points box  we use the same index as U points                      firstyv   firstyu   lastyv   lastyu   nyv   nyu                   END                    ELSE:BEGIN                     print   WARNING  empty V points box  we get the neighnors to define a new box                      neig1   neighbor lon1  lat1  glamv fstx:lstx    gphiv fstx:lstx    sphere   keyword_set key_onearth    keyword_set key_irregular                      neig2   neighbor lon2  lat2  glamv fstx:lstx    gphiv fstx:lstx    sphere   keyword_set key_onearth    keyword_set key_irregular                      CASE N_PARAMS  OF                       4:domdef  fstx  lstx  min gphiv fstx:lstx   neig1  max gphiv fstx:lstx   neig2  GRIDTYPE   gridtype  MEMEINDICES   memeindices   XINDEX  ZINDEX   zindex  _extra   ex                       6:domdef  fstx  lstx  min gphiv fstx:lstx   neig1  max gphiv fstx:lstx   neig2  z1  z2  GRIDTYPE   gridtype  MEMEINDICES   memeindices   XINDEX  ZINDEX   zindex  _extra   ex                     ENDCASE                     RETURN                   END                  ENDCASE                ENDIF ELSE BEGIN                 ras   report WARNING  The box does not contain any V points                  firstyv    1   lastyv    1   nyv   0               ENDELSE             ENDIF ELSE BEGIN               jyv   temporary dom    nx               firstyv   min temporary jyv  max   lastyv                nyv   lastyv   firstyv   1             ENDELSE           ENDELSE           IF nyv NE 0 THEN lon1v   min glamv firstxv:lastxv  firstyv:lastyv  max   lon2v          ENDIF   find lon1f  lon2f  firstxf  firstxf  firstyf  firstyf  nxf   and nyf according to x1  x2  lat1 and lat2         IF  where gridtype eq  F 0  NE  1 THEN BEGIN           firstxf   fstx   lastxf   lstx   nxf   nx           IF keyword_set memeindices  THEN BEGIN             firstyf   firstyt   lastyf   lastyt   nyf   nyt           ENDIF ELSE BEGIN             dom   where   gphif fstx:lstx    GE lat1  AND  gphif fstx:lstx    LE lat2                IF  dom 0  EQ  1  THEN BEGIN               IF keyword_set findalways  THEN BEGIN                 CASE 1 OF                    where gridtype eq  T 0  NE  1 OR  where gridtype EQ  W 0  NE  1:BEGIN                     print   WARNING  empty F points box  we use the same index as T points                      firstyf   firstyt   lastyf   lastyt   nyf   nyt                   END                     where gridtype eq  U 0  NE  1:BEGIN                     print   WARNING  empty F points box  we use the same index as U points                      firstyf   firstyu   lastyf   lastyu   nyf   nyu                   END                     where gridtype eq  V 0  NE  1:BEGIN                     print   WARNING  empty F points box  we use the same index as V points                      firstyf   firstyv   lastyf   lastyv   nyf   nyv                   END                    ELSE:BEGIN                     print   WARNING  empty F points box  we get the neighnors to define a new box                      neig1   neighbor lon1  lat1  glamf fstx:lstx    gphif fstx:lstx    sphere   keyword_set key_onearth    keyword_set key_irregular                      neig2   neighbor lon2  lat2  glamf fstx:lstx    gphif fstx:lstx    sphere   keyword_set key_onearth    keyword_set key_irregular                      CASE N_PARAMS  OF                       4:domdef  fstx  lstx  min gphif fstx:lstx   neig1  max gphif fstx:lstx   neig2  GRIDTYPE   gridtype  MEMEINDICES   memeindices   XINDEX  ZINDEX   zindex  _extra   ex                       6:domdef  fstx  lstx  min gphif fstx:lstx   neig1  max gphif fstx:lstx   neig2  z1  z2  GRIDTYPE   gridtype  MEMEINDICES   memeindices   XINDEX  ZINDEX   zindex  _extra   ex                     ENDCASE                     RETURN                   END                 ENDCASE                ENDIF ELSE BEGIN                 ras   report WARNING  The box does not contain any F points                  firstyf    1   lastyf    1   nyf   0               ENDELSE             ENDIF ELSE BEGIN               jyf   temporary dom    nx               firstyf   min temporary jyf  max   lastyf                nyf   lastyf   firstyf   1             ENDELSE           ENDELSE           IF nyf NE 0 THEN lon1f   min glamf firstxf:lastxf  firstyf:lastyf  max   lon2f          ENDIF         lon1   min lon1t  lon1u  lon1v  lon1f          lon2   max lon2t  lon2u  lon2v  lon2f        END       horizontal domain defined with the Y index and lon1 lon2           keyword_set yindex :BEGIN         fsty   min y1  y2  max   lsty          IF fsty LT 0 OR lsty GE jpj THEN BEGIN           ras   report Bad definition of Y1 or Y2            return         ENDIF         ny   lsty   fsty   1         lon1   min x1  x2  max   lon2    find lat1t  lat2t  firstxt  firstxt  firstyt  firstyt  nxt   and nyt according to x1  x2  lon1 and lon2         IF  where gridtype eq  T 0  NE  1 OR  where gridtype EQ  W 0  NE  1 THEN BEGIN           firstyt   fsty   lastyt   lsty   nyt   ny           dom   where   glamt  fsty:lsty  GE lon1  AND  glamt  fsty:lsty  LE lon2              IF  dom 0  EQ  1  THEN BEGIN             IF keyword_set findalways  THEN BEGIN               print   WARNING  empty T points box  we get the neighnors to define a new box                neig1   neighbor lon1  lat1  glamt  fsty:lsty  gphit  fsty:lsty  sphere   keyword_set key_onearth    keyword_set key_irregular                neig2   neighbor lon2  lat2  glamt  fsty:lsty  gphit  fsty:lsty  sphere   keyword_set key_onearth    keyword_set key_irregular                CASE N_PARAMS  OF                 4:domdef  min glamt  fsty:lsty neig1  max glamt  fsty:lsty neig2  fsty  lsty  GRIDTYPE   gridtype  MEMEINDICES   memeindices   YINDEX  ZINDEX   zindex  _extra   ex                 6:domdef  min glamt  fsty:lsty neig1  max glamt  fsty:lsty neig2  fsty  lsty  z1  z2  GRIDTYPE   gridtype  MEMEINDICES   memeindices   YINDEX  ZINDEX   zindex  _extra   ex               ENDCASE               RETURN             ENDIF ELSE BEGIN               ras   report WARNING  The box does not contain any T points                firstxt    1   lastxt    1   nxt   0             ENDELSE           ENDIF ELSE BEGIN             jxt   temporary dom  MOD jpi             firstxt   min temporary jxt  max   lastxt              nxt   lastxt   firstxt   1           ENDELSE           IF nxt NE 0 THEN lat1t   min gphit firstxt:lastxt  firstyt:lastyt  max   lat2t          ENDIF   find lat1u  lat2u  firstxu  firstxu  firstyu  firstyu  nxu   and nyu according to x1  x2  lon1 and lon2         IF  where gridtype eq  U 0  NE  1 THEN BEGIN           firstyu   fsty   lastyu   lsty   nyu   ny           IF keyword_set memeindices  THEN BEGIN             firstxu   firstyt   lastxu   lastyt   nxu   nxt           ENDIF ELSE BEGIN             dom   where   glamu  fsty:lsty  GE lon1  AND  glamu  fsty:lsty  LE lon2                IF  dom 0  EQ  1  THEN BEGIN               IF keyword_set findalways  THEN BEGIN                 CASE 1 OF                    where gridtype eq  T 0  NE  1 OR  where gridtype EQ  W 0  NE  1:BEGIN                     print   WARNING  empty U points box  we use the same index as T points                      firstxu   firstxt   lastxu   lastxt   nxu   nxt                   END                    ELSE:BEGIN                     print   WARNING  empty U points box  we get the neighnors to define a new box                      neig1   neighbor lon1  lat1  glamu  fsty:lsty  gphiu  fsty:lsty  sphere   keyword_set key_onearth    keyword_set key_irregular                      neig2   neighbor lon2  lat2  glamu  fsty:lsty  gphiu  fsty:lsty  sphere   keyword_set key_onearth    keyword_set key_irregular                      CASE N_PARAMS  OF                       4:domdef  min glamu  fsty:lsty neig1  max glamu  fsty:lsty neig2  fsty  lsty  GRIDTYPE   gridtype  MEMEINDICES   memeindices   YINDEX  ZINDEX   zindex  _extra   ex                       6:domdef  min glamu  fsty:lsty neig1  max glamu  fsty:lsty neig2  fsty  lsty  z1  z2  GRIDTYPE   gridtype  MEMEINDICES   memeindices   YINDEX  ZINDEX   zindex  _extra   ex                     ENDCASE                     RETURN                   END                 ENDCASE                ENDIF ELSE BEGIN                 ras   report WARNING  The box does not contain any U points                  firstxu    1   lastxu    1   nxu   0               ENDELSE             ENDIF ELSE BEGIN               jxu   temporary dom  MOD jpi               firstxu   min temporary jxu  max   lastxu                nxu   lastxu   firstxu   1             ENDELSE           ENDELSE           IF nxu NE 0 THEN lat1u   min gphiu firstxu:lastxu  firstyu:lastyu  max   lat2u          ENDIF   find lat1v  lat2v  firstxv  firstxv  firstyv  firstyv  nxv   and nyv according to x1  x2  lon1 and lon2         IF  where gridtype eq  V 0  NE  1 THEN BEGIN           firstyv   fsty   lastyv   lsty   nyv   ny           IF keyword_set memeindices  THEN BEGIN             firstxv   firstyt   lastxv   lastyt   nxv   nxt           ENDIF ELSE BEGIN             dom   where   glamv  fsty:lsty  GE lon1  AND  glamv  fsty:lsty  LE lon2                IF  dom 0  EQ  1  THEN BEGIN               IF keyword_set findalways  THEN BEGIN                 CASE 1 OF                    where gridtype eq  T 0  NE  1 OR  where gridtype EQ  W 0  NE  1:BEGIN                     print   WARNING  empty V points box  we use the same index as T points                      firstxv   firstxt   lastxv   lastxt   nxv   nxt                   END                     where gridtype eq  U 0  NE  1:BEGIN                     print   WARNING  empty V points box  we use the same index as U points                      firstxv   firstxu   lastxv   lastxu   nxv   nxu                   END                    ELSE:BEGIN                     print   WARNING  empty V points box  we get the neighnors to define a new box                      neig1   neighbor lon1  lat1  glamv  fsty:lsty  gphiv  fsty:lsty  sphere   keyword_set key_onearth    keyword_set key_irregular                      neig2   neighbor lon2  lat2  glamv  fsty:lsty  gphiv  fsty:lsty  sphere   keyword_set key_onearth    keyword_set key_irregular                      CASE N_PARAMS  OF                       4:domdef  min glamv  fsty:lsty neig1  max glamv  fsty:lsty neig2  fsty  lsty  GRIDTYPE   gridtype  MEMEINDICES   memeindices   YINDEX  ZINDEX   zindex  _extra   ex                       6:domdef  min glamv  fsty:lsty neig1  max glamv  fsty:lsty neig2  fsty  lsty  z1  z2  GRIDTYPE   gridtype  MEMEINDICES   memeindices   YINDEX  ZINDEX   zindex  _extra   ex                     ENDCASE                     RETURN                   END                  ENDCASE                ENDIF ELSE BEGIN                 ras   report WARNING  The box does not contain any V points                  firstxv    1   lastxv    1   nxv   0               ENDELSE             ENDIF ELSE BEGIN               jxv   temporary dom  MOD jpi               firstxv   min temporary jxv  max   lastxv                nxv   lastxv   firstxv   1             ENDELSE           ENDELSE           IF nxv NE 0 THEN lat1v   min gphiv firstxv:lastxv  firstyv:lastyv  max   lat2v          ENDIF   find lat1f  lat2f  firstxf  firstxf  firstyf  firstyf  nxf   and nyf according to x1  x2  lon1 and lon2         IF  where gridtype eq  F 0  NE  1 THEN BEGIN           firstyf   fsty   lastyf   lsty   nyf   ny           IF keyword_set memeindices  THEN BEGIN             firstxf   firstyt   lastxf   lastyt   nxf   nxt           ENDIF ELSE BEGIN             dom   where   glamf  fsty:lsty  GE lon1  AND  glamf  fsty:lsty  LE lon2                IF  dom 0  EQ  1  THEN BEGIN               IF keyword_set findalways  THEN BEGIN                 CASE 1 OF                    where gridtype eq  T 0  NE  1 OR  where gridtype EQ  W 0  NE  1:BEGIN                     print   WARNING  empty F points box  we use the same index as T points                      firstxf   firstxt   lastxf   lastxt   nxf   nxt                   END                     where gridtype eq  U 0  NE  1:BEGIN                     print   WARNING  empty F points box  we use the same index as U points                      firstxf   firstxu   lastxf   lastxu   nxf   nxu                   END                     where gridtype eq  V 0  NE  1:BEGIN                     print   WARNING  empty F points box  we use the same index as V points                      firstxf   firstxv   lastxf   lastxv   nxf   nxv                   END                    ELSE:BEGIN                     print   WARNING  empty F points box  we get the neighnors to define a new box                      neig1   neighbor lon1  lat1  glamf  fsty:lsty  gphif  fsty:lsty  sphere   keyword_set key_onearth    keyword_set key_irregular                      neig2   neighbor lon2  lat2  glamf  fsty:lsty  gphif  fsty:lsty  sphere   keyword_set key_onearth    keyword_set key_irregular                      CASE N_PARAMS  OF                       4:domdef  min glamf  fsty:lsty neig1  max glamf  fsty:lsty neig2  fsty  lsty  GRIDTYPE   gridtype  MEMEINDICES   memeindices   YINDEX  ZINDEX   zindex  _extra   ex                       6:domdef  min glamf  fsty:lsty neig1  max glamf  fsty:lsty neig2  fsty  lsty  z1  z2  GRIDTYPE   gridtype  MEMEINDICES   memeindices   YINDEX  ZINDEX   zindex  _extra   ex                     ENDCASE                     RETURN                   END                  ENDCASE                ENDIF ELSE BEGIN                 ras   report WARNING  The box does not contain any F points                  firstxf    1   lastyf    1   nxf   0               ENDELSE             ENDIF ELSE BEGIN               jxf   temporary dom  MOD jpi               firstxf   min temporary jxf  max   lastxf                nxf   lastxf   firstxf   1             ENDELSE           ENDELSE           IF nxf NE 0 THEN lat1f   min gphif firstxf:lastxf  firstyf:lastyf  max   lat2f          ENDIF         lat1   min lat1t  lat1u  lat1v  lat1f          lat2   max lat2t  lat2u  lat2v  lat2f        END     ENDCASE   ENDELSE      The extracted domain is it regular or not       CASE 1 OF      where gridtype eq  T 0  NE  1 OR  where gridtype eq  W 0  NE  1  AND nxt NE 0 AND nyt NE 0:BEGIN   to get faster  we first test the most basic cases befor testing the   full array        CASE 0 OF         array_equal glamt firstxt:lastxt  firstyt  glamt firstxt:lastxt  lastyt :key_irregular   1b         array_equal gphit firstxt  firstyt:lastyt  gphit lastxt  firstyt:lastyt :key_irregular   1b         array_equal glamt firstxt:lastxt  firstyt:lastyt                          glamt firstxt:lastxt  firstyt replicate 1  nyt :key_irregular   1b         array_equal gphit firstxt:lastxt  firstyt:lastyt                          replicate 1  nxt gphit firstxt  firstyt:lastyt :key_irregular   1b         ELSE:key_irregular   0b       ENDCASE     END      where gridtype eq  U 0  NE  1 AND nxu NE 0 AND nyu NE 0:BEGIN       CASE 0 OF         array_equal glamu firstxu:lastxu  firstyu  glamu firstxu:lastxu  lastyu :key_irregular   1b         array_equal gphiu firstxu  firstyu:lastyu  gphiu lastxu  firstyu:lastyu :key_irregular   1b         array_equal glamu firstxu:lastxu  firstyu:lastyu                          glamu firstxu:lastxu  firstyu replicate 1  nyu :key_irregular   1b         array_equal gphiu firstxu:lastxu  firstyu:lastyu                          replicate 1  nxu gphiu firstxu  firstyu:lastyu :key_irregular   1b         ELSE:key_irregular   0b       ENDCASE     END      where gridtype eq  V 0  NE  1 AND nxv NE 0 AND nyv NE 0:BEGIN       CASE 0 OF         array_equal glamv firstxv:lastxv  firstyv  glamv firstxv:lastxv  lastyv :key_irregular   1b         array_equal gphiv firstxv  firstyv:lastyv  gphiv lastxv  firstyv:lastyv :key_irregular   1b         array_equal glamv firstxv:lastxv  firstyv:lastyv                          glamv firstxv:lastxv  firstyv replicate 1  nyv :key_irregular   1b         array_equal gphiv firstxv:lastxv  firstyv:lastyv                          replicate 1  nxv gphiv firstxv  firstyv:lastyv :key_irregular   1b         ELSE:key_irregular   0b       ENDCASE     END      where gridtype eq  F 0  NE  1 AND nxf NE 0 AND nyf NE 0:BEGIN       CASE 0 OF         array_equal glamf firstxf:lastxf  firstyf  glamf firstxf:lastxf  lastyf :key_irregular   1b         array_equal gphif firstxf  firstyf:lastyf  gphif lastxf  firstyf:lastyf :key_irregular   1b         array_equal glamf firstxf:lastxf  firstyf:lastyf                          glamf firstxf:lastxf  firstyf replicate 1  nyf :key_irregular   1b         array_equal gphif firstxf:lastxf  firstyf:lastyf                          replicate 1  nxf gphif firstxf  firstyf:lastyf :key_irregular   1b         ELSE:key_irregular   0b       ENDCASE     END     ELSE:   ENDCASE         define all vertical parameters     vert1  vert2   firstz tw  lastz tw  nz tw          vertical:       vertical domain defined with vert1  vert2     IF NOT  keyword_set zindex  OR keyword_set index  THEN BEGIN   define vert1 et vert2     CASE N_PARAMS  OF       2:vert1   min x1  x2  max   vert2        6:vert1   min z1  z2  max   vert2        ELSE:BEGIN         IF  inter byte gridtype  byte T   U   V   F 0  NE  1 THEN             vert1t   min gdept  max   vert2t          IF  where gridtype eq  W 0  NE  1 AND n_elements gdepw  NE 0 THEN             vert1w   min gdepw  max   vert2w          vert1   min vert1t  vert1w          vert2   max vert2t  vert2w        END     ENDCASE   define firstzt  firstzt  nzt     IF  inter byte gridtype  byte T   U   V   F 0  NE  1 THEN BEGIN       domz   where gdept ge vert1 and gdept le vert2  nzt        IF nzt NE 0 THEN BEGIN         firstzt   domz 0          lastzt   domz nzt 1        ENDIF ELSE BEGIN          ras   report WARNING  The box does not contain any T level          firstzt    1         lastzt    1       ENDELSE      ENDIF   define firstzw  firstzw  nzw     IF  where gridtype eq  W 0  NE  1 AND n_elements gdepw  NE 0 THEN BEGIN       IF keyword_set memeindices  THEN BEGIN         firstzw   firstzt         lastzw   lastzt         nzw   nzt       ENDIF ELSE BEGIN          domz   where gdepw ge vert1 and gdepw le vert2  nzw          IF nzw NE 0 THEN BEGIN           firstzw   domz 0            lastzw   domz nzw 1          ENDIF ELSE BEGIN            ras   report WARNING  The box does not contain any W level            firstzw    1           lastzw    1         ENDELSE        ENDELSE      ENDIF     vertical domain defined with the Z index     ENDIF ELSE BEGIN      CASE N_PARAMS  OF       2:fstz   min x1  x2  max   lstz        4:return       6:fstz   min z1  z2  max   lstz      ENDCASE     IF fstz LT 0 OR lstz GE jpk THEN BEGIN       ras   report Bad definition of X1  X2  Z1 or Z2        return     ENDIF     nz   lstz   fstz   1   find vert1t  vert2t  firstzt  firstzt  nzt   according to  x1  x2  or  z1  z2      IF  where gridtype eq  T 0  NE  1 THEN BEGIN       vert1t   min gdept fstz:lstz  max   vert2t        firstzt   fstz   lastzt   lstz   nzt   nz     ENDIF         find vert1w  vert2w  firstzw  firstzw  nzw   according to  x1  x2  or  z1  z2      IF  where gridtype eq  W 0  NE  1 AND n_elements gdepw  NE 0 THEN BEGIN       vert1w   min gdepw fstz:lstz  max   vert2w        firstzw   fstz   lastzw   lstz   nzw   nz     ENDIF           vert1   min vert1t  vert1w      vert2   max vert2t  vert2w    ENDELSE       IF NOT keyword_set key_forgetold  THEN BEGIN  updateold   ENDIF      if keyword_set key_performance  THEN print   temps domdef  systime 1 tempsun         return end"); 
     207a[205] = new Array("./ToBeReviewed/GRILLE/f2v.html", "f2v.pro", "", "             file_comments   Allows to pass a field referring to the grid F on the grid V     thanks to the average:    res   0 5 res   shift res  1  0           categories    Grid      param TEMP  in required    A 2  3 or 4d array      returns   res  a 2  3 or 4d array      uses   common pro      restrictions    Force parameters of the zoom on the grid V to be the same as    those on the grid T       restrictions    Points which can not be calculated are put at the value NaN    consecrated by IDL:  values f_nan      history   From Marina Levy s programs   Sebastien Masson  smasson lodyc jussieu fr :   Validation  5 6 2000      version    Id: f2v pro 163 2006 08 29 12:59:46Z navarro             FUNCTION f2v  temp       compile_opt idl2  strictarrsubs    cm_4mesh  cm_4data  cm_4cal   IF NOT keyword_set key_forgetold  THEN BEGIN  updatenew   ENDIF      res   temp  We force nxt nxf  etc      firstxv   firstxf    lastxv   lastxf    firstyv   firstyf    lastyv   lastyf    nxv   nxf    nyv   nyf    vargrid    V     if NOT keyword_set valmask  then valmask   1e20    lon1   glamv firstxv  0     lon2   glamf lastxf  0     case on tha array s size and application    taille   size temp     CASE taille 0  OF        1: res    1       2: BEGIN           case 1 of             taille 1  eq nxf and taille 2  eq nyf:             taille 1  eq jpi and taille 2  eq jpj:                res res firstxf:lastxf  firstyf:lastyf              else:                return  report Probleme d adequation entre les tailles du domaine et de la boite           endcase          mask    fmask firstxf:lastxf  firstyf:lastyf  0           terre   where mask EQ 0            IF terre 0  NE  1 THEN res terre     values f_nan          res   0 5 res   shift res  1  0           if NOT  keyword_set key_periodic  AND nxf EQ jpi  then res 0       values f_nan          mask    vmask firstxf:lastxf  firstyf:lastyf  0           terre   where mask EQ 0            IF terre 0  NE  1 THEN res terre    valmask       END       3: BEGIN           case 1 of             taille 1  eq nxf and taille 2  eq nyf AND taille 3  EQ nzt:             taille 1  eq nxf and taille 2  eq nyf AND taille 3  EQ jpk:                res res    firstzt:lastzt              taille 1  eq nxf and taille 2  eq nyf AND taille 3  EQ jpt:             taille 1  eq jpi and taille 2  eq jpj AND taille 3  EQ jpk:                res res firstxf:lastxf  firstyf:lastyf  firstzt:lastzt              taille 1  eq jpi and taille 2  eq jpj AND taille 3  EQ jpt:                res res firstxf:lastxf  firstyf:lastyf                else:                return  report Probleme d adequation entre les tailles du domaine et de la boite           ENDCASE          if taille 3  EQ jpt then begin             mask    fmask firstxf:lastxf  firstyf:lastyf  lastzt nzt NE jpk              mask   temporary mask replicate 1  jpt              mask   reform mask  nxf  nyf  jpt   over           ENDIF ELSE mask    fmask firstxf:lastxf  firstyf:lastyf  firstzt:lastzt           terre   where temporary mask  EQ 0            IF terre 0  NE  1 THEN res temporary terre     values f_nan          res   0 5 res   shift res  1  0  0           if NOT  keyword_set key_periodic  AND nxf EQ jpi  then res 0         values f_nan          if taille 3  EQ jpt then BEGIN             mask   tmask firstxf:lastxf  firstyf:lastyf  lastzt nzt NE jpk              mask   temporary mask replicate 1  jpt              mask   reform mask  nxf  nyf  jpt   over           ENDIF ELSE mask    vmask firstxf:lastxf  firstyf:lastyf  firstzt:lastzt           terre   where temporary mask  EQ 0            IF terre 0  NE  1 THEN res temporary terre    valmask       END       4: BEGIN           case 1 of             taille 1  eq nxf and taille 2  eq nyf AND taille 3  EQ nzt AND taille 4  EQ jpt:             taille 1  eq nxf and taille 2  eq nyf AND taille 3  EQ jpk AND taille 4  EQ jpt:                res res    firstzt:lastzt                taille 1  eq jpi and taille 2  eq jpj AND taille 3  EQ jpk AND taille 4  EQ jpt:                res res firstxf:lastxf  firstyf:lastyf  firstzt:lastzt                else:                return  report Probleme d adequation entre les tailles du domaine et de la boite           ENDCASE          mask    fmask firstxf:lastxf  firstyf:lastyf  firstzt:lastzt           mask   temporary mask replicate 1  jpt           mask   reform mask  nxf  nyf  nzt  jpt   over           terre   where temporary mask  EQ 0            IF terre 0  NE  1 THEN res temporary terre     values f_nan          res   0 5 res   shift res  1  0  0  0           if NOT  keyword_set key_periodic  AND nxf EQ jpi  then res 0           values f_nan          mask    vmask firstxf:lastxf  firstyf:lastyf  firstzt:lastzt           mask   temporary mask replicate 1  jpt           mask   reform mask  nxf  nyf  nzt  jpt   over           terre   where temporary mask  EQ 0            IF terre 0  NE  1 THEN res temporary terre    valmask       END    endcase     IF NOT keyword_set key_forgetold  THEN BEGIN     updateold    ENDIF         return  res END "); 
     208a[206] = new Array("./ToBeReviewed/GRILLE/fmask.html", "fmask.pro", "", "             file_comments   calculate fmask  Economize memory  we do not need to keep fmask anymore       categories   Utilities      returns   A 3d array corresponding to fmask       examples   Used like if fmask was a known array by substituing fmask by  fmask    For example: Instaed of write fmask domainef  we have to write  fmask domainef       history   Sebastien Masson  smasson lodyc jussieu fr                          11 12 98      version    Id: fmask pro 157 2006 08 21 09:01:50Z navarro             FUNCTION fmask       compile_opt idl2  strictarrsubs    cm_4mesh   IF NOT keyword_set key_forgetold  THEN BEGIN  updatenew   ENDIF     tempsun   systime 1             For key_performance      CASE size tmask   n_dimensions  OF     2:res   tmask shift tmask   1  0 shift tmask  0   1 shift tmask   1   1      3:res   tmask shift tmask   1  0  0 shift tmask  0   1  0 shift tmask   1   1  0    ENDCASE     if NOT keyword_set key_periodic  then res jpi 1        fmaskredy   res  jpj 1      fmaskredx     if keyword_set key_performance  THEN print   temps fmask  systime 1 tempsun       return  res end"); 
     209a[207] = new Array("./ToBeReviewed/GRILLE/grille.html", "grille.pro", "", "             file_comments   Choose the grid which must be used to do the graph in function of   vargrid and send back corresponding parameters calculated in   domdef pro and reduced at the domain defined by domdef  contrarily   to grandegrille pro    BEWARE  The choice of the grid is made from the value of the    global variable vargrid  which can be equal to  T   U   V   W  ou  F       categories      keyword TRI    This keyword serve to obtain  thanks to grille  the triangulation which   refer to the grid but only on the part of the zoom  This of triangulation   is passed in the variable we have equate at TRI    For example: grille tri triangulation_reduite    This keyword is used in plt pro      keyword WDEPTH   To specify that the field is at W depth instead of T    depth  automatically activated if vargrid eq  W        keyword FORPLT   In plt  we want that land points  glam and gphi  be equal to glamt and    gphit regardless of the grid       keyword NOTRI   Useful only when TRI is activated  In this case  grill send back  1 in the    variable tri even if the variable of the common triangles_list is defined    and different of 1       keyword _EXTRA    Used to pass your keywords      keyword TOUT      param MASK  out optional    For the definition  see domdef and the management of subdomains on the web        param  GLAM  out optional    For the definition  see domdef and the management of subdomains on the web        param  GPHI  out optional    For the definition  see domdef and the management of subdomains on the web        param  GDEP  out optional    For the definition  see domdef and the management of subdomains on the web        param  NX  out optional    For the definition  see domdef and the management of subdomains on the web        param  NY  out optional    For the definition  see domdef and the management of subdomains on the web        param  NZ  out optional    For the definition  see domdef and the management of subdomains on the web        param  FIRSTX  out optional    For the definition  see domdef and the management of subdomains on the web        param  FIRSTY  out optional    For the definition  see domdef and the management of subdomains on the web        param  FIRSTZ  out optional    For the definition  see domdef and the management of subdomains on the web                param LASTX  out optional    For the definition  see domdef and the management of subdomains on the web        param  LASTY  out optional    For the definition  see domdef and the management of subdomains on the web        param  LASTZ  out optional    For the definition  see domdef and the management of subdomains on the web        param  E1  out optional    For the definition  see domdef and the management of subdomains on the web       param  E2  out optional    For the definition  see domdef and the management of subdomains on the web        param  E3  out optional    For the definition  see domdef and the management of subdomains on the web       uses   cm_4mesh    cm_4data      restrictions    Use the variable vargrid      restrictions   Vargrid must be  T   W   U   V  or  F       history    Sebastien Masson  smasson lodyc jussieu fr   12 2 1999                         10 11 1999  forplt      version    Id: grille pro 172 2006 09 11 07:11:26Z smasson         todo Comment ecrire la remarque sur les inputs             pro grille  mask  glam  gphi  gdep  nx  ny  nz  firstx  firsty  firstz  lastx  lasty  lastz  e1  e2  e3  TRI   tri  NOTRI   notri  TOUT   tout  FORPLT   forplt  TYPE   type  WDEPTH   wdepth  _EXTRA   ex     include commons     compile_opt idl2  strictarrsubs    cm_4mesh  cm_4data  cm_4cal   for jpt   IF NOT keyword_set key_forgetold  THEN BEGIN  updatenew   ENDIF     tempsun   systime 1             For key_performance     vargrid   strupcase strmid vargrid 0 reverse_offset      if vargrid eq  W  then wdepth   1   if keyword_set tout  then begin     savedbox   1b     saveboxparam   boxparam4grille dat      domdef  gridtype   vargrid  _EXTRA   ex   endif   tempdeux   systime 1            For key_performance  2       IF keyword_set wdepth  THEN BEGIN     firstz   firstzw      lastz   lastzw     nz   nzw   ENDIF ELSE BEGIN     firstz   firstzt     lastz   lastzt     nz   nzt   ENDELSE       CASE 1 OF      grid T and W       vargrid eq  T  OR vargrid eq  W  : begin  scalars       nx   nxt       ny   nyt       firstx   firstxt       firsty   firstyt       lastx   lastxt       lasty   lastyt  2d vectors       IF arg_present glam  THEN glam   glamt firstx:lastx  firsty:lasty        IF arg_present gphi  THEN gphi   gphit firstx:lastx  firsty:lasty        IF arg_present e1  THEN e1   e1t firstx:lastx  firsty:lasty        IF arg_present e2  THEN e2   e2t firstx:lastx  firsty:lasty   3d vectors        IF keyword_set forplt  THEN mask   tmask firstx:lastx  firsty:lasty  firstz          ELSE IF arg_present mask  THEN mask   tmask firstx:lastx  firsty:lasty  firstz:lastz      end     grid U       vargrid eq  U : begin  scalars       nx   nxu       ny   nyu       firstx   firstxu       firsty   firstyu       lastx   lastxu       lasty   lastyu  2d vectors       IF arg_present glam  THEN glam   glamu firstx:lastx  firsty:lasty        IF arg_present gphi  THEN gphi   gphiu firstx:lastx  firsty:lasty        if keyword_set forplt  then BEGIN         mask   1b tmask firstx:lastx  firsty:lasty  firstz          eastboarder   mask shift mask  1  0 mask         westboarder   mask shift mask   1  0 mask         if key_periodic NE 1 OR nx NE jpi then westboarder nx 1      0b         tmp1   shift eastboarder  0  1          tmp1  0    0b         tmp2   shift eastboarder  0   1          tmp2  ny 1    0b         add    temporary tmp1 temporary tmp2 1b eastboarder 1b temporary westboarder          eastboarder   temporary eastboarder temporary add          tmp1    mask shift mask  0   1 shift mask  0  1  NE 1b         tmp1  ny 1    1b         tmp1  0    1b         tmp2    mask shift mask   1  0 shift mask  1  0  NE 1b         if key_periodic NE 1 OR nx NE jpi then begin           tmp2 nx 1      1b           tmp2 0      0b         endif         no1   temporary tmp1 temporary tmp2          tmp   temporary eastboarder temporary no1 mask         mask 0:nx 2      0b          tmp   temporary tmp temporary mask          tmp   where tmp GE 1          if tmp 0  NE  1 then begin           glam tmp     glamt firstx:lastx  firsty:lasty tmp            gphi tmp     gphit firstx:lastx  firsty:lasty tmp          endif       ENDIF       IF arg_present e1  THEN e1    e1u firstx:lastx  firsty:lasty        IF arg_present e2  THEN e2    e2u firstx:lastx  firsty:lasty   3d vectors       IF keyword_set forplt  THEN mask    umask firstx:lastx  firsty:lasty  firstz          ELSE IF arg_present mask  THEN mask    umask firstx:lastx  firsty:lasty  firstz:lastz      end     grid V       vargrid eq  OPAPTDHV  or vargrid eq  OPAPT3DV          or vargrid eq  V : begin  scalars       nx   nxv       ny   nyv       firstx   firstxv       firsty   firstyv       lastx   lastxv       lasty   lastyv  2d vectors       IF arg_present glam  THEN glam   glamv firstx:lastx  firsty:lasty        IF arg_present gphi  THEN gphi   gphiv firstx:lastx  firsty:lasty        if keyword_set forplt  then BEGIN          mask   1b tmask firstx:lastx  firsty:lasty  firstz          northboarder   mask shift mask  0  1 mask         southboarder   mask shift mask  0   1 mask         southboarder  ny 1    0b         tmp1   shift northboarder   1  0          if key_periodic NE 1 OR nx NE jpi then tmp1 nx 1      0b         tmp2   shift northboarder  1  0          if key_periodic NE 1 OR nx NE jpi then tmp2 0      0b         add    temporary tmp1 temporary tmp2 1b northboarder 1b southboarder          northboarder   temporary northboarder temporary add          tmp1    mask shift mask  0   1 shift mask  0  1  NE 1b         tmp1  ny 1    1b         tmp1  0    0b         tmp2    mask shift mask   1  0 shift mask  1  0  NE 1b         if key_periodic NE 1 OR nx NE jpi then begin           tmp2 nx 1      1b           tmp2 0      1b         endif         no1   temporary tmp1 temporary tmp2          tmp   temporary northboarder mask temporary no1          mask  0:ny 2    0b         tmp   temporary tmp temporary mask          tmp   where tmp GE 1          if tmp 0  NE  1 then begin           glam tmp     glamt firstx:lastx  firsty:lasty tmp            gphi tmp     gphit firstx:lastx  firsty:lasty tmp          endif       ENDIF       IF arg_present e1  THEN e1    e1v firstx:lastx  firsty:lasty        IF arg_present e2  THEN e2    e2v firstx:lastx  firsty:lasty   3d vecteurs       IF keyword_set forplt  THEN mask    vmask firstx:lastx  firsty:lasty  firstz          ELSE IF arg_present mask  THEN mask    vmask firstx:lastx  firsty:lasty  firstz:lastz      end     grid F       vargrid eq  OPAPTDHF  or vargrid eq  OPAPT3DF           or vargrid eq  F : begin  scalars       nx   nxf       ny   nyf       firstx   firstxf       firsty   firstyf       lastx   lastxf       lasty   lastyf  2d vectors       IF arg_present glam  THEN glam   glamf firstx:lastx  firsty:lasty        IF arg_present gphi  THEN gphi   gphif firstx:lastx  firsty:lasty        if keyword_set forplt  then BEGIN          mask   1b tmask firstx:lastx  firsty:lasty  firstz          eastboarder   mask shift mask  1  0 mask         westboarder   mask shift mask   1  0 mask         westboarder nx 1      0b         northboarder   mask shift mask  0  1 mask         southboarder   mask shift mask  0   1 mask         southboarder  ny 1    0b         tmp1   shift northboarder   1  0          if key_periodic NE 1 OR nx NE jpi then tmp1 nx 1      0b         tmp2   shift northboarder  1  0          if key_periodic NE 1 OR nx NE jpi then tmp2 0      0b         add    temporary tmp1 temporary tmp2 1b northboarder 1b southboarder          northboarder   temporary northboarder temporary add          tmp1   shift eastboarder  0  1          tmp1  0    0b         tmp2   shift eastboarder  0   1          tmp2  ny 1    0b         add    temporary tmp1 temporary tmp2 1b eastboarder 1b temporary westboarder          eastboarder   temporary eastboarder temporary add          tmp1    mask shift mask  0   1 shift mask  0  1  NE 1b         tmp1  ny 1    1b         tmp1  0    1b         tmp2    mask shift mask   1  0 shift mask  1  0  NE 1b         if key_periodic NE 1 OR nx NE jpi then begin           tmp2 nx 1      1b           tmp2 0      1b         endif         no1   temporary tmp1 temporary tmp2          tmp    temporary northboarder temporary eastboarder mask temporary no1          mask 0:nx 2      0b          mask  0:ny 2    0b          tmp   temporary tmp temporary mask          tmp   where tmp GE 1          if tmp 0  NE  1 then begin           glam tmp     glamt firstx:lastx  firsty:lasty tmp            gphi tmp     gphit firstx:lastx  firsty:lasty tmp          endif       ENDIF       IF arg_present e1  THEN e1    e1f firstx:lastx  firsty:lasty        IF arg_present e2  THEN e2    e2f firstx:lastx  firsty:lasty   3d vectors        IF keyword_set forplt  THEN mask    fmask firstx:lastx  firsty:lasty  firstz          ELSE IF arg_present mask  THEN mask    fmask firstx:lastx  firsty:lasty  firstz:lastz      END       ELSE:BEGIN        ras   report Wrong definition of vargrid    vargrid  Only T  U  V  W or F are acceptable        stop     END   ENDCASE   IF testvar var   key_performance  EQ 2 THEN       print   temps grille: attribution des scalaires  vecteurs et tableaux   systime 1 tempdeux           Variables refering to the vertical dimension             tempdeux   systime 1            For key_performance  2   if keyword_set wdepth  then begin     gdep   gdepw firstz:lastz      e3   e3w firstz:lastz    endif else begin     gdep   gdept firstz:lastz      e3   e3t firstz:lastz    ENDELSE   for the vertical sections with partial steps   IF keyword_set type  AND keyword_set key_partialstep  THEN BEGIN     CASE 1 OF       type EQ  xz  AND ny EQ 1:BEGIN         bottom   total tmask firstx:lastx  firsty:lasty  firstz:lastz  3          good   where bottom NE 0 AND bottom NE nz keyword_set wdepth          bottom   lindgen nx bottom 1l keyword_set wdepth nx         IF good 0  NE  1 THEN BEGIN           bottom   bottom good            IF lastz EQ jpk 1 THEN gdep nz 1    max hdepw            gdep   replicate 1  nx gdep           if keyword_set wdepth  THEN               truegdep   hdepw firstx:lastx  firsty:lasty              ELSE truegdep   hdept firstx:lastx  firsty:lasty            gdep bottom    truegdep good          ENDIF       END       type EQ  yz  AND nx EQ 1:BEGIN         bottom   total tmask firstx:lastx  firsty:lasty  firstz:lastz  3          good   where bottom NE 0 AND bottom NE nz keyword_set wdepth          bottom   lindgen ny bottom 1l keyword_set wdepth ny         IF good 0  NE  1 THEN BEGIN           bottom   bottom good            IF lastz EQ jpk 1 THEN gdep nz 1    max hdepw            gdep   replicate 1  ny gdep           if keyword_set wdepth  THEN               truegdep   hdepw firstx:lastx  firsty:lasty              ELSE truegdep   hdept firstx:lastx  firsty:lasty            gdep bottom    truegdep good          ENDIF       END       ELSE:     ENDCASE   ENDIF   for the vertical sections with roms   IF keyword_set type  AND n_elements romszinfos  NE 0 THEN BEGIN     romsdp   romsdepth      IF romsdp 0  NE  1 THEN BEGIN        IF jpt EQ 1 THEN BEGIN         CASE type OF            z :gdep   moyenne temporary romsdp   xy             xz :gdep   moyenne temporary romsdp   y             yz :gdep   moyenne temporary romsdp   x             zt :gdep   moyenne temporary romsdp   xy            ELSE:         ENDCASE       ENDIF ELSE BEGIN          CASE type OF            z :gdep   moyenne temporary romsdp   xyt             xz :gdep   grossemoyenne temporary romsdp   yt             yz :gdep   grossemoyenne temporary romsdp   xt             zt :gdep   grossemoyenne temporary romsdp   xy            ELSE:         ENDCASE       ENDELSE       IF size gdep   n_dimensions  EQ 2 THEN            gdep   remplit gdep  niter   32000  mask   gdep LT 1 E19   basique   fillxdir      ENDIF   ENDIF     IF testvar var   key_performance  EQ 2 THEN       print   temps grille: Variables se rapportant a la dimension verticale   systime 1 tempdeux     Triangulation vector when TRI is activated      if arg_present TRI  then       if triangles_list 0  EQ  1 OR keyword_set notri  then tri    1 ELSE BEGIN      tempdeux   systime 1          pour key_performance  2     msk   bytarr jpi  jpj      msk firstx:lastx  firsty:lasty    1     ind   where  msk triangles_list 0   msk triangles_list 1   msk triangles_list 2    EQ 1       tri   triangles_list  ind firstx firsty jpi      y   tri jpi     x   tri y jpi     tri   x y nx     IF testvar var   key_performance  EQ 2 THEN         print   temps grille: decoupage de la triangulation   systime 1 tempdeux   ENDELSE     To make sure there is not any degenerated dimension  1         mask reform mask   over       glam reform glam   over       gphi reform gphi   over       gdep reform gdep   over       e1 reform e1   over       e2 reform e2   over       e3 reform e3   over     if keyword_set savedbox  THEN restoreboxparam   boxparam4grille dat    if keyword_set key_performance  THEN print   temps grille  systime 1 tempsun       IF NOT keyword_set key_forgetold  THEN BEGIN  updateold   ENDIF      return  end       "); 
     210a[208] = new Array("./ToBeReviewed/GRILLE/t2v.html", "t2v.pro", "", "             file_comments   Allows to pass a field referring to the grid T on the grid V     thanks to the average res   0 5 res   shift res  0   1        categories    Grid      param TEMP  in required    A 2  3 or 4d array      returns   res  a 2  3 or 4d array      uses   common pro      restrictions    Force parameters of the zoom on the grid V to be the same as    those on the grid T       restrictions    Points which can not be calculated are put at the value NaN    consecrated by IDL:  values f_nan      history   From Marina Levy s programs   Sebastien Masson  smasson lodyc jussieu fr :   Validation  5 6 2000      version    Id: t2v pro 163 2006 08 29 12:59:46Z navarro             FUNCTION t2v  temp       compile_opt idl2  strictarrsubs    cm_4mesh  cm_4data  cm_4cal   IF NOT keyword_set key_forgetold  THEN BEGIN  updatenew   ENDIF      res   temp   We force nxt nxv  etc      firstxv   firstxt    lastxv   lastxt    firstyv   firstyt    lastyv   lastyt    nxv   nxt    nyv   nyt    vargrid    V     if NOT keyword_set valmask  then valmask   1e20    lat1   gphit 0  firstyt     lat2   gphiv 0  lastyv     case on tha array s size and application    taille   size temp     CASE taille 0  OF        1: res    1       2: BEGIN           case 1 of             taille 1  eq nxt and taille 2  eq nyt:             taille 1  eq jpi and taille 2  eq jpj:                res res firstxt:lastxt  firstyt:lastyt              else:                return  report Probleme d adequation entre les tailles du domaine et de la boite           endcase          mask   tmask firstxt:lastxt  firstyt:lastyt  0           terre   where mask EQ 0            IF terre 0  NE  1 THEN res terre     values f_nan          res   0 5 res   shift res  0   1           res  nyt 1     values f_nan          mask    vmask firstxt:lastxt  firstyt:lastyt  0           terre   where mask EQ 0            IF terre 0  NE  1 THEN res terre    valmask       END       3: BEGIN           case 1 of             taille 1  eq nxt and taille 2  eq nyt AND taille 3  EQ nzt:             taille 1  eq nxt and taille 2  eq nyt AND taille 3  EQ jpk:                res res    firstzt:lastzt              taille 1  eq nxt and taille 2  eq nyt AND taille 3  EQ jpt:             taille 1  eq jpi and taille 2  eq jpj AND taille 3  EQ jpk:                res res firstxt:lastxt  firstyt:lastyt  firstzt:lastzt              taille 1  eq jpi and taille 2  eq jpj AND taille 3  EQ jpt:                res res firstxt:lastxt  firstyt:lastyt                else:                return  report Probleme d adequation entre les tailles du domaine et de la boite           ENDCASE          if taille 3  EQ jpt then begin             mask   tmask firstxt:lastxt  firstyt:lastyt  lastzt nzt NE jpk              mask   temporary mask replicate 1  jpt              mask   reform mask  nxt  nyt  jpt   over           ENDIF ELSE mask   tmask firstxt:lastxt  firstyt:lastyt  firstzt:lastzt           terre   where temporary mask  EQ 0            IF terre 0  NE  1 THEN res temporary terre     values f_nan          res   0 5 res   shift res  0   1  0           res  nyt 1       values f_nan          if taille 3  EQ jpt then BEGIN             mask    vmask firstxt:lastxt  firstyt:lastyt  lastzt nzt NE jpk              mask   temporary mask replicate 1  jpt              mask   reform mask  nxt  nyt  jpt   over           ENDIF ELSE mask    vmask firstxt:lastxt  firstyt:lastyt  firstzt:lastzt           terre   where temporary mask  EQ 0            IF terre 0  NE  1 THEN res temporary terre    valmask       END       4: BEGIN           case 1 of             taille 1  eq nxt and taille 2  eq nyt AND taille 3  EQ nzt AND taille 4  EQ jpt:             taille 1  eq nxt and taille 2  eq nyt AND taille 3  EQ jpk AND taille 4  EQ jpt:                res res    firstzt:lastzt                taille 1  eq jpi and taille 2  eq jpj AND taille 3  EQ jpk AND taille 4  EQ jpt:                res res firstxt:lastxt  firstyt:lastyt  firstzt:lastzt                else:                return  report Probleme d adequation entre les tailles du domaine et de la boite           ENDCASE          mask   tmask firstxt:lastxt  firstyt:lastyt  firstzt:lastzt           mask   temporary mask replicate 1  jpt           mask   reform mask  nxt  nyt  nzt  jpt   over           terre   where temporary mask  EQ 0            IF terre 0  NE  1 THEN res temporary terre     values f_nan          res   0 5 res   shift res  0   1  0  0           res  nyt 1         values f_nan          mask    vmask firstxt:lastxt  firstyt:lastyt  firstzt:lastzt           mask   temporary mask replicate 1  jpt           mask   reform mask  nxt  nyt  nzt  jpt   over           terre   where temporary mask  EQ 0            IF terre 0  NE  1 THEN res temporary terre    valmask       END     ENDCASE    IF NOT keyword_set key_forgetold  THEN BEGIN     updateold   ENDIF      return  res END "); 
     211a[209] = new Array("./ToBeReviewed/GRILLE/tracegrille.html", "tracegrille.pro", "", "             file_comments   Draw the grid      categories       param GLAMIN  in required    The 1d or 2d array in longitude of points of the grid If GLAM GLAMIN    is not specified  it trace the grid specified by vargrid  on the    domain defined by domdef       param GPHIIN  in required    The 1d or 2d array in latitude of points of the grid If GPHI GPHIIN    is not specified  it trace the grid specified by vargrid  on the    domain defined by domdef       keyword XSTRIDE  type integer     It specify that we want to trace only one line of    constant i every xstride points      keyword YSTRIDE  type integer    It specify that we want to trace only one line of    constant j every xstride points      keyword OCEAN    To trace the grid only on ocean points        keyword EARTH   To trace the grid only on land points       keyword RMOUT   Select to remove all cell having one corner out of the   plot boundaries  x range   y range       keyword _EXTRA   Used to pass your keywords        uses   common pro       examples         IDL  plt indgen jpi jpj nocontour nofill       IDL  vargrid T        IDL  tracegrille ocean color 20       IDL  tracegrille earth color 80        history   Sebastien Masson  smasson lodyc jussieu fr       version    Id: tracegrille pro 163 2006 08 29 12:59:46Z navarro                               PRO tracegrille  glamin  gphiin  OCEAN   ocean  EARTH   earth                      XSTRIDE   xstride  YSTRIDE   ystride  RMOUT   rmout                      _extra   extra       compile_opt idl2  strictarrsubs    cm_4mesh  cm_4data   IF NOT keyword_set key_forgetold  THEN BEGIN  updatenew   ENDIF     tempsun   systime 1             For key_performance   to avoid warning message   oldexcept    except    except   0   if n_elements key_gridtype  EQ 0 then key_gridtype    c      if n_elements glamin    n_elements gphiin  EQ 0 then BEGIN     grille  mask  glam  gphi  gdep  nx  ny  nz  firstx  firsty  firstz  lastx  lasty  lastz     IF keyword_set ocean  AND key_gridtype EQ  c  THEN BEGIN   we reduce the mask to take into account the point located ON the coastline        CASE vargrid OF          U :BEGIN           mask   tmask firstx:lastx  firsty:lasty            IF NOT keyword_set key_periodic  OR nx NE jpi               THEN tmpx   mask nx 1              mask    mask shift mask   1  0    1           IF NOT keyword_set key_periodic  OR nx NE jpi               THEN mask nx 1      temporary tmpx          END          V :BEGIN           mask   tmask firstx:lastx  firsty:lasty            tmpy   mask  ny 1            mask    mask shift mask  0   1    1           mask  ny 1    temporary tmpy          END          F :BEGIN           mask   tmask firstx:lastx  firsty:lasty            IF NOT keyword_set key_periodic  OR nx NE jpi               THEN tmpx   mask nx 1              tmpy   mask  ny 1            mask    mask shift mask   1  0 shift mask  0   1 shift mask   1   1    1           mask  ny 1    temporary tmpy            IF NOT keyword_set key_periodic  OR nx NE jpi               THEN mask nx 1      temporary tmpx          END         ELSE:       ENDCASE     ENDIF   ENDIF ELSE BEGIN     glam   glamin     gphi   gphiin     IF  size glam 0  EQ 1 AND  size gphi 0  EQ 1 THEN BEGIN       nx   n_elements glam         ny   n_elements gphi         glam   glam replicate 1  ny        gphi   replicate 1  nx gphi     ENDIF ELSE BEGIN       nx    size glam 1        ny    size glam 2      ENDELSE   ENDELSE   if n_elements mask  EQ 0 then mask   replicate 1b  nx  ny    if  size mask 0  EQ 3 then mask   mask    0      IF keyword_set RMOUT  THEN BEGIN     out   where glam GT max x range  OR glam LT min x range                    OR gphi GT max y range  OR gphi LT min y range      IF out 0  NE  1 THEN BEGIN       glam out     values f_nan       gphi out     values f_nan     ENDIF   ENDIF     IF keyword_set ocean  then BEGIN     earth   where mask EQ 0      if earth 0  NE  1 then begin       glam earth     values f_nan       gphi earth     values f_nan     ENDIF     earth   0   ENDIF     IF keyword_set earth  THEN BEGIN     ocean   where mask EQ 1      if ocean 0  NE  1 then begin       glam ocean     values f_nan       gphi ocean     values f_nan     ENDIF     ocean   0   ENDIF     if NOT keyword_set xstride  then xstride   1   if NOT keyword_set ystride  then ystride   1   case key_gridtype of      c :BEGIN       for i   0  ny 1  ystride do begin         plots   glam  i  gphi  i  _extra   extra       endfor       for i   0  nx 1  xstride do begin         plots   glam i    gphi i    _extra   extra       endfor     END      e :BEGIN       shifted   glam 0  0  LT glam 0  1        glam2   glam glam 1 glam 0 2        if shifted then begin         for i   0  ny 2 do BEGIN           xx    transpose glam  i   glam2  i            yy    transpose gphi  i   gphi  i 1            plots  xx 0:2 nx 2  yy 0:2 nx 2  _extra   extra         ENDFOR       ENDIF ELSE BEGIN         for i   1  ny 1 do BEGIN           xx    transpose glam  i   glam2  i            yy    transpose gphi  i   gphi  i 1            plots  xx 0:2 nx 2  yy 0:2 nx 2  _extra   extra         ENDFOR       ENDELSE       for i   1   ny 1 2 do           plots   glam 0  2 i 1  glam 0  2 i               gphi 0  2 i 1  gphi 0  2 i  _extra   extra       for i   0   ny 2 2 do           plots   glam nx 1  2 i  glam nx 1  2 i 1               gphi nx 1  2 i  gphi nx 1  2 i 1  _extra   extra     END   endcase    if keyword_set key_performance  THEN print   temps trace grille  systime 1 tempsun     except   oldexcept    return end"); 
     212a[210] = new Array("./ToBeReviewed/GRILLE/u2t.html", "u2t.pro", "", "             file_comments   Allows to pass a field referring to the grid U on the grid T     thanks to the average:    res   0 5 res   shift res  1  0           categories    Grid      param TEMP  in required    A 2  3 or 4d array      returns   res  a 2  3 or 4d array      uses   common pro      restrictions    Force parameters of the zoom on the grid V to be the same as    those on the grid T       restrictions    Points which can not be calculated are put at the value NaN    consecrated by IDL:  values f_nan      history   From Marina Levy s programs   Sebastien Masson  smasson lodyc jussieu fr :   Validation  5 6 2000      version    Id: u2t pro 163 2006 08 29 12:59:46Z navarro             FUNCTION u2t  temp       compile_opt idl2  strictarrsubs    cm_4mesh  cm_4data  cm_4cal   IF NOT keyword_set key_forgetold  THEN BEGIN  updatenew   ENDIF      res   temp  on force nxt nxu  etc      firstxt   firstxu    lastxt   lastxu    firstyt   firstyu    lastyt   lastyu    nxt   nxu    nyt   nyu    vargrid    T     if NOT keyword_set valmask  then valmask   1e20    lon1   glamt firstxt  0     lon2   glamu lastxu  0      case on tha array s size and application    taille   size temp     CASE taille 0  OF        1: res    1       2: BEGIN           case 1 of             taille 1  eq nxu and taille 2  eq nyu:             taille 1  eq jpi and taille 2  eq jpj:                res res firstxu:lastxu  firstyu:lastyu              else:                return  report Probleme d adequation entre les tailles du domaine et de la boite           endcase          mask    umask firstxu:lastxu  firstyu:lastyu  0           terre   where mask EQ 0            IF terre 0  NE  1 THEN res terre     values f_nan          res   0 5 res   shift res  1  0           if NOT  keyword_set key_periodic  AND nxu EQ jpi  then res 0       values f_nan          mask   tmask firstxu:lastxu  firstyu:lastyu  0           terre   where mask EQ 0            IF terre 0  NE  1 THEN res terre    valmask       END       3: BEGIN           case 1 of             taille 1  eq nxu and taille 2  eq nyu AND taille 3  EQ nzt:             taille 1  eq nxu and taille 2  eq nyu AND taille 3  EQ jpk:                res res    firstzt:lastzt              taille 1  eq nxu and taille 2  eq nyu AND taille 3  EQ jpt:             taille 1  eq jpi and taille 2  eq jpj AND taille 3  EQ jpk:                res res firstxu:lastxu  firstyu:lastyu  firstzt:lastzt              taille 1  eq jpi and taille 2  eq jpj AND taille 3  EQ jpt:                res res firstxu:lastxu  firstyu:lastyu                else:                return  report Probleme d adequation entre les tailles du domaine et de la boite           ENDCASE          if taille 3  EQ jpt then begin             mask    umask firstxu:lastxu  firstyu:lastyu  lastzt nzt NE jpk              mask   temporary mask replicate 1  jpt              mask   reform mask  nxu  nyu  jpt   over           ENDIF ELSE mask    umask firstxu:lastxu  firstyu:lastyu  firstzt:lastzt           terre   where temporary mask  EQ 0            IF terre 0  NE  1 THEN res temporary terre     values f_nan          res   0 5 res   shift res  1  0  0           if NOT  keyword_set key_periodic  AND nxu EQ jpi  then res 0         values f_nan          if taille 3  EQ jpt then BEGIN             mask   tmask firstxu:lastxu  firstyu:lastyu  lastzt nzt NE jpk              mask   temporary mask replicate 1  jpt              mask   reform mask  nxu  nyu  jpt   over           ENDIF ELSE mask   tmask firstxu:lastxu  firstyu:lastyu  firstzt:lastzt           terre   where temporary mask  EQ 0            IF terre 0  NE  1 THEN res temporary terre    valmask       END       4: BEGIN           case 1 of             taille 1  eq nxu and taille 2  eq nyu AND taille 3  EQ nzt AND taille 4  EQ jpt:             taille 1  eq nxu and taille 2  eq nyu AND taille 3  EQ jpk AND taille 4  EQ jpt:                res res    firstzt:lastzt                taille 1  eq jpi and taille 2  eq jpj AND taille 3  EQ jpk AND taille 4  EQ jpt:                res res firstxu:lastxu  firstyu:lastyu  firstzt:lastzt                else:                return  report Probleme d adequation entre les tailles du domaine et de la boite           ENDCASE          mask    umask firstxu:lastxu  firstyu:lastyu  firstzt:lastzt           mask   temporary mask replicate 1  jpt           mask   reform mask  nxu  nyu  nzt  jpt   over           terre   where temporary mask  EQ 0            IF terre 0  NE  1 THEN res temporary terre     values f_nan          res   0 5 res   shift res  1  0  0  0           if NOT  keyword_set key_periodic  AND nxu EQ jpi  then res 0           values f_nan          mask   tmask firstxu:lastxu  firstyu:lastyu  firstzt:lastzt           mask   temporary mask replicate 1  jpt           mask   reform mask  nxu  nyu  nzt  jpt   over           terre   where temporary mask  EQ 0            IF terre 0  NE  1 THEN res temporary terre    valmask       END    endcase    IF NOT keyword_set key_forgetold  THEN BEGIN     updateold   ENDIF        return  res END "); 
     213a[211] = new Array("./ToBeReviewed/GRILLE/umask.html", "umask.pro", "", "             file_comments   calculate umask  Economize memory  we do not need to keep umask anymore       categories   Utilities       returns   A 3d array corresponding to umask        uses   common pro      examples   Used like if umask was a known array by substituing umask by  umask    For example: Instaed of write umask domainef  we have to write  umask domainef      MODIFICATION HISTORY: Sebastien Masson  smasson lodyc jussieu fr                          11 12 98                          6 99 introduction of the key_shift                         20 9 99 cas jpk 1  Thanks to  jpblod ipsl jussieu fr       version    Id: umask pro 157 2006 08 21 09:01:50Z navarro             FUNCTION umask       compile_opt idl2  strictarrsubs    cm_4mesh   IF NOT keyword_set key_forgetold  THEN BEGIN  updatenew   ENDIF     tempsun   systime 1             For key_performance     CASE size tmask   n_dimensions  OF     2:res   tmask shift tmask   1  0      3:res   tmask shift tmask   1  0  0    ENDCASE        if NOT keyword_set key_periodic  then res jpi 1        umaskred   if keyword_set key_performance  THEN print   temps umask  systime 1 tempsun      return  res end"); 
     214a[212] = new Array("./ToBeReviewed/GRILLE/v2t.html", "v2t.pro", "", "             file_comments   Allows to pass a field referring to the grid V on the grid T     thanks to the average:    res   0 5 res   shift res  1  0           categories    Grid      param TEMP  in required    A 2  3 or 4d array      returns   res  a 2  3 or 4d array      uses   common pro      restrictions    Force parameters of the zoom on the grid V to be the same as    those on the grid T       restrictions    Points which can not be calculated are put at the value NaN    consecrated by IDL:  values f_nan      history   From Marina Levy s programs   Sebastien Masson  smasson lodyc jussieu fr :   Validation  5 6 2000      version    Id: v2t pro 163 2006 08 29 12:59:46Z navarro        todo seb: nom du input            FUNCTION v2t  temp       compile_opt idl2  strictarrsubs    cm_4mesh  cm_4data  cm_4cal   IF NOT keyword_set key_forgetold  THEN BEGIN  updatenew   ENDIF      res   temp  We force nxt nxv  etc      firstxt   firstxv    lastxt   lastxv    firstyt   firstyv    lastyt   lastyv    nxt   nxv    nyt   nyv    vargrid    T     if NOT keyword_set valmask  then valmask   1e20    lat1   gphit 0  firstyt     lat2   gphiv 0  lastyv     case on tha array s size and application    taille   size temp     CASE taille 0  OF        1: res    1       2: BEGIN           case 1 of             taille 1  eq nxv and taille 2  eq nyv:             taille 1  eq jpi and taille 2  eq jpj:                res res firstxv:lastxv  firstyv:lastyv              else:                return  report Probleme d adequation entre les tailles du domaine et de la boite           endcase          mask    vmask firstxv:lastxv  firstyv:lastyv  0           terre   where mask EQ 0            IF terre 0  NE  1 THEN res terre     values f_nan          res   0 5 res   shift res  0   1           res  0     values f_nan          mask   tmask firstxv:lastxv  firstyv:lastyv  0           terre   where mask EQ 0            IF terre 0  NE  1 THEN res terre    valmask       END       3: BEGIN           case 1 of             taille 1  eq nxv and taille 2  eq nyv AND taille 3  EQ nzt:             taille 1  eq nxv and taille 2  eq nyv AND taille 3  EQ jpk:                res res    firstzt:lastzt              taille 1  eq nxv and taille 2  eq nyv AND taille 3  EQ jpt:             taille 1  eq jpi and taille 2  eq jpj AND taille 3  EQ jpk:                res res firstxv:lastxv  firstyv:lastyv  firstzt:lastzt              taille 1  eq jpi and taille 2  eq jpj AND taille 3  EQ jpt:                res res firstxv:lastxv  firstyv:lastyv                else:                return  report Probleme d adequation entre les tailles du domaine et de la boite           ENDCASE          if taille 3  EQ jpt then begin             mask    vmask firstxv:lastxv  firstyv:lastyv  lastzt nzt NE jpk              mask   temporary mask replicate 1  jpt              mask   reform mask  nxv  nyv  jpt   over           ENDIF ELSE mask    vmask firstxv:lastxv  firstyv:lastyv  firstzt:lastzt           terre   where temporary mask  EQ 0            IF terre 0  NE  1 THEN res temporary terre     values f_nan          res   0 5 res   shift res  0   1  0           res  0       values f_nan          if taille 3  EQ jpt then BEGIN             mask   tmask firstxv:lastxv  firstyv:lastyv  lastzt nzt NE jpk              mask   temporary mask replicate 1  jpt              mask   reform mask  nxv  nyv  jpt   over           ENDIF ELSE mask   tmask firstxv:lastxv  firstyv:lastyv  firstzt:lastzt           terre   where temporary mask  EQ 0            IF terre 0  NE  1 THEN res temporary terre    valmask       END       4: BEGIN           case 1 of             taille 1  eq nxv and taille 2  eq nyv AND taille 3  EQ nzt AND taille 4  EQ jpt:             taille 1  eq nxv and taille 2  eq nyv AND taille 3  EQ jpk AND taille 4  EQ jpt:                res res    firstzt:lastzt                taille 1  eq jpi and taille 2  eq jpj AND taille 3  EQ jpk AND taille 4  EQ jpt:                res res firstxv:lastxv  firstyv:lastyv  firstzt:lastzt                else:                return  report Probleme d adequation entre les tailles du domaine et de la boite           ENDCASE          mask    vmask firstxv:lastxv  firstyv:lastyv  firstzt:lastzt           mask   temporary mask replicate 1  jpt           mask   reform mask  nxv  nyv  nzt  jpt   over           terre   where temporary mask  EQ 0            IF terre 0  NE  1 THEN res temporary terre     values f_nan          res   0 5 res   shift res  0   1  0  0           res  0         values f_nan          mask   tmask firstxv:lastxv  firstyv:lastyv  firstzt:lastzt           mask   temporary mask replicate 1  jpt           mask   reform mask  nxv  nyv  nzt  jpt   over           terre   where temporary mask  EQ 0            IF terre 0  NE  1 THEN res temporary terre    valmask       END    endcase     IF NOT keyword_set key_forgetold  THEN BEGIN     updateold    ENDIF       return  res END "); 
     215a[213] = new Array("./ToBeReviewed/GRILLE/vmask.html", "vmask.pro", "", "             file_comments   calculate fmask  Economize memory  we do not need to keep vmask anymore       categories   Utilities      returns   A 3d array corresponding to vmask       examples   Used like if vmask was a known array by substituing vmask by  vmask    For example: Instaed of write vmask domainef  we have to write  vmask domainef       history   Sebastien Masson  smasson lodyc jussieu fr                          11 12 98                         20 9 99 cas jpk 1  merci jpblod ipsl jussieu fr       version    Id: vmask pro 157 2006 08 21 09:01:50Z navarro             FUNCTION vmask     compile_opt idl2  strictarrsubs    common   tempsun   systime 1             For key_performance     CASE size tmask   n_dimensions  OF     2:res   tmask shift tmask  0   1      3:res   tmask shift tmask  0   1  0    ENDCASE     res  jpj 1      vmaskred   if keyword_set key_performance  THEN print   temps vmask  systime 1 tempsun      return  res end"); 
     216a[214] = new Array("./ToBeReviewed/HOPE/completetype.html", "completetype.pro", "", "     file_comments        categories        param TYPEIN        returns        uses        restrictions        examples        history        version    Id: completetype pro 163 2006 08 29 12:59:46Z navarro        todo seb     function completetype  typein     compile_opt idl2  strictarrsubs      type typein    case type of        x :type type yzt         y :type type xzt         z :type type zyt         t :type type xyz         xy :type type zt         xz :type type yt         yz :type type xt         xt :type type yz         yt :type type xz         zt :type type xy         xyz :type type t         xyt :type type z         yzt :type type x         xyzt :    endcase    return  type  end  "); 
     217a[215] = new Array("./ToBeReviewed/HOPE/computehopegrid.html", "computehopegrid.pro", "", "             file_comments      categories   Grid       param XAXIS      param YAXIS      param ZAXIS      param LINETYPE      keyword FORTHEMASK      keyword WPOINT      keyword FIRSTS      keyword LASTS      keyword PTTYPE      uses   common pro      history   Sebastien Masson  smasson lodyc jussieu fr                         2001 06      version    Id: computehopegrid pro 157 2006 08 21 09:01:50Z navarro        todo seb           PRO computehopegrid  xaxis  yaxis  zaxis  linetype  FORTHEMASK   forthemask  WPOINT   wpoint  FIRSTS   firsts  LASTS   lasts  PTTYPE   pttype       compile_opt idl2  strictarrsubs    cm_4mesh  cm_4data   IF NOT keyword_set key_forgetold  THEN BEGIN  updatenew   ENDIF        if not  keyword_set scalar keyword_set vector  then scalar 1      jpiglo   n_elements xaxis     jpjglo   n_elements yaxis     jpkglo   n_elements zaxis       jpi   jpiglo    jpj   jpjglo    jpk   jpkglo      if NOT keyword_set firsts  then firsts    0  0  0     if NOT keyword_set lasts  then lasts    jpi 1  jpj 1  jpk 1      depermination of the grid type and of the point type      if keyword_set pttype  then vargrid   pttype    if linetype EQ  odd even  then key_gridtype    e  ELSE key_gridtype    c      computation of the horizontal grid      if key_gridtype EQ  e  then begin       if vargrid EQ  T  then begin          glamt xaxis          glamt   glamt replicate 1  jpj           xstep glamt 1 0 glamt 0 0 2           glamt 2 lindgen jpj 2 glamt 2 lindgen jpj 2 xstep          glamu glamt xstep       ENDIF ELSE BEGIN          glamu xaxis          glamu   glamu replicate 1  jpj           xstep glamu 1 0 glamu 0 0 2           glamu 2 lindgen jpj 2 glamu 2 lindgen jpj 2 xstep          glamt glamu xstep       ENDELSE  zoom       glamt   glamt firsts 0 :lasts 0  firsts 1 :lasts 1        glamu   glamu firsts 0 :lasts 0  firsts 1 :lasts 1        jpiglo   lasts 0 firsts 0 1       jpi   jpiglo       jpjglo   lasts 1 firsts 1 1       jpj   jpjglo       glamv   glamu       glamf   glamu       gphit   yaxis firsts 1 :lasts 1        gphit   replicate 1  jpi gphit       gphif   gphit       gphiu   gphit       gphiv   gphif    ENDIF ELSE BEGIN       if vargrid eq  T  then begin          glamt xaxis          glamt   glamt replicate 1  jpj           glamu glamt glamt 1 0 glamt 0 0 2        ENDIF ELSE BEGIN          glamu xaxis          glamu   glamu replicate 1  jpj           xstep glamu 1 0 glamu 0 0 2           glamt glamu glamu 1 0 glamu 0 0 2        ENDELSE  zoom       glamt   glamt firsts 0 :lasts 0  firsts 1 :lasts 1        glamu   glamu firsts 0 :lasts 0  firsts 1 :lasts 1        jpiglo   lasts 0 firsts 0 1       jpi   jpiglo       jpjglo   lasts 1 firsts 1 1       jpj   jpjglo       glamv   glamt       glamf   glamu       gphit   yaxis firsts 1 :lasts 1        gphit   replicate 1  jpi gphit       gphiu   gphit       if jpj GT 1 then begin          gphiv   gphit gphit 0  1 gphit 0  0 2           gphif   gphit gphit 0  1 gphit 0  0 2        ENDIF ELSE BEGIN           gphiv   gphit          gphif   gphit       ENDELSE    ENDELSE     computation of the vertical grid      if keyword_set wpoint  then begin       gdepw   zaxis       if jpk ne 1 then begin          gdept shift gdepw   1 gdepw 2           gdept jpk 1 gdepw jpk 1 5 gdepw jpk 1 gdepw jpk 2        endif else gdept zaxis    endif else begin       gdept   zaxis       if jpk ne 1 then begin          gdepw shift gdept  1 gdept 2           gdepw 0 0       endif else gdepw   zaxis    endelse     computation of the vertical scale factors      if jpk ne 1 then begin       e3t   abs shift gdepw 1 gdepw        e3t jpk 1    abs gdept jpk 1 gdepw jpk 1        e3w   abs gdept shift gdept 1        e3w 0    abs gdept 0 gdepw 0     endif else begin       e3t 1       e3w 1    endelse   zoom    gdept   gdept firsts 2 :lasts 2     gdepw   gdepw firsts 2 :lasts 2     e3t   e3t firsts 2 :lasts 2     e3w   e3w firsts 2 :lasts 2     jpkglo   lasts 2 firsts 2 1    jpk   jpkglo     computation of the horizontal scale factors      e1t   replicate 1b jpi jpj     e2t   replicate 1b jpi jpj     e1u   e1t    e2u   e2t    e1v   e1t    e2v   e2t    e1f   e1t    e2f   e2t     mask       tmask   replicate 1b  jpi  jpj  jpk     if keyword_set forthemask  then BEGIN       land where forthemask ge valmask 10        if land 0  ne  1 then tmask land    0b    endif    umaskred   replicate 1  jpj  jpk     vmaskred   replicate 1  jpi  jpk     fmaskredy   replicate 1  jpj  jpk     fmaskredx   replicate 1  jpi  jpk      updateold    domdef    if keyword_set firsts  AND keyword_set lasts  then BEGIN       if vargrid EQ  T  then BEGIN          if jpj GT 1 then begin             lon1   min glamt 0   0  1              lon2   max glamt jpi 1   0  1           endif ELSE BEGIN             lon1   min glamt 0  0              lon2   max glamt jpi 1   0           ENDELSE       ENDIF ELSE BEGIN          if jpj GT 1 then begin             lon1   min glamu 0   0  1              lon2   max glamu jpi 1   0  1           endif ELSE BEGIN             lon1   min glamu 0  0              lon2   max glamu jpi 1  0           ENDELSE       ENDELSE       lat1   min gphit 0  0  gphit 0  jpj 1        lat2   max gphit 0  0  gphit 0  jpj 1        domdef  lon1  lon2  lat1  lat2  gdepw 0  gdept jpk 1  gridtype   vargrid    ENDIF      ixminmesh   0l    ixmaxmesh   long jpi 1     iyminmesh   0l    iymaxmesh   long jpj 1     izminmesh   0l    izmaxmesh   long jpk 1      for the triangulation      key_periodic   glamt 0  EQ  glamt jpi 1 glamt 1 glamt 0  MOD 360     if jpi gt 4 AND jpj GT 4 then begin       triangles_list   triangule shifted   glamt 0  0  LT glamt 0  1        twin_corners_up 1       twin_corners_dn 1    ENDIF ELSE BEGIN       triangles_list 1       twin_corners_up 1       twin_corners_dn 1    ENDELSE     IF NOT keyword_set key_forgetold  THEN BEGIN     updateold   ENDIF       return end  "); 
     218a[216] = new Array("./ToBeReviewed/HOPE/createhopestruct.html", "createhopestruct.pro", "", "     file_comments        categories        param EVENT        returns        uses        restrictions        examples        history        version    Id: createhopestruct pro 163 2006 08 29 12:59:46Z navarro        todo seb     FUNCTION createhopestruct  event     compile_opt idl2  strictarrsubs      widget_control  event top  get_uvalue top_uvalue   find the selected variable    selected    top_uvalue 1  findline top_uvalue   selected    get the variable id    varid top_uvalue 1  findline top_uvalue   datavarid selected    get the section type    type    top_uvalue 1  findline top_uvalue   sectype selected    get its dimension    dimsvar top_uvalue 1  findline top_uvalue   dimvar selected     tosort sortdim completetype type     dimsvar dimsvar tosort    get the specified spatial domain and build reading parameters    linetype  top_uvalue 1  findline top_uvalue   linetype selected     case linetype of        odd :domainid   widget_info event top find_by_uname    basedomainodd         even :domainid   widget_info event top find_by_uname    basedomaineven         odd even :domainid   widget_info event top find_by_uname    basedomainodd even     endcase    allaxes top_uvalue 1  findline top_uvalue   dimlist     xaxis allaxes dimsvar 0     xlimits    top_uvalue 1  findline top_uvalue   xlimits     if NOT keyword_set xlimits  then begin       xid widget_info domainid find_by_uname    xinterval        widget_control  xid  get_value xint    endif ELSE xint   xaxis where xaxis GE xlimits 0  AND xaxis LE xlimits 1     yaxis allaxes dimsvar 1     yaxis   reverse yaxis          latitudes from the south to the north    ylimits    top_uvalue 1  findline top_uvalue   ylimits     if NOT keyword_set ylimits  then begin       yid widget_info domainid find_by_uname    yinterval        widget_control  yid  get_value yint    endif ELSE yint   yaxis where yaxis GE ylimits 0  AND yaxis LE ylimits 1     zaxis allaxes dimsvar 2     zlimits    top_uvalue 1  findline top_uvalue   zlimits     if NOT keyword_set zlimits  then begin       zid widget_info domainid find_by_uname    zinterval        widget_control  zid  get_value zint    endif ELSE zint   zaxis where zaxis GE zlimits 0  AND zaxis LE zlimits 1    time axis and time interval    time allaxes dimsvar 3     yyyymmdd   vairdate time     tlimits    top_uvalue 1  findline top_uvalue   tlimits     if NOT keyword_set tlimits  then BEGIN       date1id   widget_info event top  find_by_uname    date1        widget_control  date1id  get_value   date1       date2id   widget_info event top  find_by_uname    date2        widget_control  date2id  get_value   date2       tlimits    date1  date2     ENDIF    tint   time where yyyymmdd GE tlimits 0  AND yyyymmdd LE tlimits 1       limits of the domain      nxt   n_elements xint     nyt   n_elements yint     nzt   n_elements zint     jpt   n_elements tint        firstx    where xaxis GE xint 0 0     firsty    where yaxis GE yint 0 0     lasty   firsty nyt 1    firstz    where zaxis GE zint 0 0     firstt    where time GE tint 0 0      read the array      cdfid ncdf_open top_uvalue 1  findline top_uvalue   filename     offset firstx n_elements yaxis lasty 1 firstz firstt     count nxt nyt nzt jpt     tosortinv sortdim completetype type inv    sort the offset and count for the case of the array is not written   as a xyzt array but for example as a yzxt array     offset offset tosortinv     count count tosortinv    call to ncdf_varget    ncdf_varget  cdfid  varid  array  offset offset  count count     force to keep the dimension equal to 1    if count 3  eq 1 then array reform array count 0 count 1 count 2 count 3 over     if not  array_equal tosort  lindgen 4  then array transpose temporary array tosort     count nxt nyt nzt jpt     if jpt eq 1 then array reform array count 0 count 1 count 2 count 3 over     array reverse array  2   over    if there is no longitude zoom  shift the array to obtain longitude   between 20 and 380    if nxt EQ 128 OR nxt EQ 256 then begin       key_shift    where xaxis GE 20 0        xaxis   shift temporary xaxis  key_shift        xaxis where xaxis LT 20    xaxis where xaxis LT 20 360       array   shift temporary array  key_shift  0  0  0     ENDIF ELSE key_shift   0   get some informations about the array    insidevar ncdf_varinq cdfid varid     if insidevar natts NE 0 then begin       attnames   strarr insidevar natts        for attiq 0 insidevar natts 1 do attnames attiq strlowcase ncdf_attname cdfid varid attiq    get the name       if  where attnames EQ  long_name 0  EQ  1 then value             ELSE ncdf_attget cdfid varid long_name value       varname   strtrim string value  2    get the units       if  where attnames EQ  units 0  EQ  1 then value             ELSE ncdf_attget cdfid varid units value       varunit   strtrim string value  2    get the  missing_value        if  where attnames EQ  missing_value 0  EQ  1 then valmask   1e20         ELSE ncdf_attget cdfid varid missing_value  valmask    ENDIF ELSE BEGIN        varunit           valmask   1e20       varname        ENDELSE    varexp         build arguments to use computehopegrid and put it together in a structure    firsts    firstx firsty firstz     lasts    firstx nxt 1 firsty nyt 1 firstz nzt 1     vargrid    top_uvalue 1  findline top_uvalue   pointtype selected     hopegrid    xaxis:xaxis  yaxis:yaxis  zaxis:zaxis  firsts:firsts  lasts:lasts  type:type  linetype:linetype  pttype:vargrid     hopestru    array:array  unit:varunit  name:varname  date:time firstt:firstt jpt 1  grid:vargrid  hopegrid:hopegrid    we close the netcdf file before living     ncdf_close   cdfid    return  hopestru end"); 
     219a[217] = new Array("./ToBeReviewed/HOPE/cw_selectinterval.html", "cw_selectinterval.pro", "", "       todo seb       PRO testwid_event  event         compile_opt idl2  strictarrsubs          widget_control  event id  get_uvalue uval      if n_elements uval  EQ 0 then return      case uval of          done :widget_control  event top   destroy          get :BEGIN            id   widget_info event top find_by_uname    discret             widget_control  id  get_value   value1            help  value1            print   value1  value1            id   widget_info event top find_by_uname    continus             widget_control  id  get_value   value2            help  value2            print   value2  value2         END         ELSE:      endcase      return   end   PRO testwid  _extra   ex         compile_opt idl2  strictarrsubs          base widget_base COLUMN       nothing   widget_label base  value    beginning of the test           nothing   cw_selectinterval base  10 indgen 5  _extra   ex  uname    discret  uvalue    discret       print  nothing      nothing   cw_selectinterval base  indgen 20  _extra   ex  uname    continus  uvalue    continus       print  nothing          nothing   widget_button base  value    get  uvalue    get       nothing   widget_button base  value    done  uvalue    done       widget_control  base   REALIZE      xmanager testwid  base   no_block      return   end            file_comments           categories   Compound widget       param ID          returns          restrictions          examples        history         version    Id: cw_selectinterval pro 163 2006 08 29 12:59:46Z navarro     function cw_selectinterval_get_value  id     compile_opt idl2  strictarrsubs      bgroupid widget_info id  find_by_uname    bgroup    the widget is a set of button    if bgroupid ne 0 then begin       widget_control  bgroupid  get_value   selected       widget_control  bgroupid  get_uvalue   vecteur       vecteur   vecteur vecteur    endif else begin   the widget is 2 sliders       Minid   Widget_Info Id  Find_by_uname    min        widget_control  minid  get_value   minval       minval   minval value       maxid   widget_info id  find_by_uname    max        widget_control  maxid  get_value   maxval       maxval   maxval value       widget_control  minid  get_uvalue   vecteur       vecteur   vecteur vecteur       selected   where vecteur ge minval and vecteur le maxval     ENDELSE   if selected 0  eq  1 then return   1 else return  vecteur selected  END        file_comments           categories   Compound widget       param EVENT          returns          restrictions          examples        history         version    Id: cw_selectinterval pro 163 2006 08 29 12:59:46Z navarro      function cw_selectinterval_event  event     compile_opt idl2  strictarrsubs      widget_control  event id  get_uvalue uval    case uval name of        min :begin                 change the value if the minimum for the slider called max          maxid widget_info event handler  find_by_uname    max           widget_control  maxid  set_value SLIDER_MIN:event value 1        end        max :begin                 change the value if the maximum for the slider called min          minid widget_info event handler  find_by_uname    min           widget_control  minid  set_value SLIDER_MAX:event value 1        end        bgroup :    endcase    return   ID:event handler  TOP:event top  HANDLER:0L  END         file_comments           categories   Compound widget        param PARENT    The widget ID of the parent widget        param VECTEUR  type vector    A vector whose the first element must be the smallest one and the last    must be the biggest one        keyword _EXTRA   Used to pass your keywords       returns          restrictions          examples        history         version    Id: cw_selectinterval pro 163 2006 08 29 12:59:46Z navarro     function cw_selectinterval  parent  vecteur  _extra   ex     compile_opt idl2  strictarrsubs       base   widget_base parent                           EVENT_FUNC    cw_selectinterval_event                            FUNC_GET_VALUE cw_selectinterval_get_value                            PRO_SET_VALUE cw_selectinterval_set_value                             ROW  _extra   ex     if n_elements vecteur  le 10 then begin       nothing   CW_BGROUP base  strtrim vecteur 1 nonexclusive row  uvalue    name: bgroup  vecteur:vecteur  uname bgroup        buttvalue bytarr n_elements nothing        buttvalue 0 1       widget_control  nothing  set_value buttvalue    endif else begin       min min floor vecteur        max max ceil vecteur        nothing cw_slider_pm base  value   min  min min  max max 1  uvalue    name: min  vecteur:vecteur  uname min        nothing cw_slider_pm base  value   max  min min 1  max max  uvalue    name: max  uname max     endelse    return  base end"); 
     220a[218] = new Array("./ToBeReviewed/HOPE/domainpart.html", "domainpart.pro", "", "     file_comments        categories        param TOP_UVALUE        param BASEDOMAIN        param SELECTED        keyword DESTROY        returns        uses        restrictions        examples        history        version    Id: domainpart pro 163 2006 08 29 12:59:46Z navarro        todo seb     pro domainpart  top_uvalue  basedomain  selected  DESTROY   destroy     compile_opt idl2  strictarrsubs       if keyword_set destroy  then BEGIN         id   widget_info basedomain find_by_uname    title          IF id NE 0 THEN widget_control  id   destroy       id   widget_info basedomain find_by_uname    oddsecchoice        IF id NE 0 THEN widget_control  id   destroy       id   widget_info basedomain find_by_uname    evensecchoice        IF id NE 0 THEN widget_control  id   destroy       id   widget_info basedomain find_by_uname    odd evensecchoice        IF id NE 0 THEN widget_control  id   destroy       id   widget_info basedomain find_by_uname    basex        IF id NE 0 THEN widget_control  id   destroy       id   widget_info basedomain find_by_uname    basey        IF id NE 0 THEN widget_control  id   destroy       id   widget_info basedomain find_by_uname    basez        IF id NE 0 THEN widget_control  id   destroy       return    endif     we get the size of the dimenstion id of this section      dimvar    top_uvalue 1  findline top_uvalue   dimvar     selecteddim   dimvar  selected     typedim    top_uvalue 1  findline top_uvalue   typedim     sorteddim   selecteddim sortdim typedim selecteddim     dimlist    top_uvalue 1  findline top_uvalue   dimlist       longitude part      basex widget_info basedomain find_by_uname    basex     IF basex NE 0 THEN widget_control  basex   destroy    basex widget_base basedomain row  uname basex     nothing widget_text basex value longitude  xsize   10     nothing cw_selectinterval basex dimlist sorteddim 0 uname xinterval uvalue name: xinterval       latitude part      basey widget_info basedomain find_by_uname    basey     IF basey NE 0 THEN widget_control  basey   destroy    basey widget_base basedomain row  uname basey     nothing widget_text basey value latitude  xsize   10     nothing cw_selectinterval basey reverse dimlist sorteddim 1  uname yinterval uvalue name: yinterval       depth part      basez widget_info basedomain find_by_uname    basez     IF basez NE 0 THEN widget_control  basez   destroy    basez widget_base basedomain row  uname basez     nothing widget_text basez value depth  xsize   10     nothing cw_selectinterval basez dimlist sorteddim 2 uname zinterval uvalue name: zinterval    end  "); 
     221a[219] = new Array("./ToBeReviewed/HOPE/findlineandpointtype.html", "findlineandpointtype.pro", "", "     file_comments        categories        param SECTYPE        param XAXIS        param YAXIS        param IODIR        returns        uses        restrictions        examples        history        version    Id: findlineandpointtype pro 163 2006 08 29 12:59:46Z navarro        todo seb     FUNCTION findlineandpointtype  sectype  xaxis  yaxis  iodir   the file  HOPE_lonlat nc  is used in this function  This file must   be localized in iodir   netcdf HOPE_lonlat     dimensions:           latTlow   242             lonTlowodd   128             latThigh   390             lonThighodd   256     variables:           float latTlow latTlow                      latTlow:units    degrees_north              float lonTlowodd lonTlowodd                      lonTlowodd:units    degrees_east                      lonTlowodd:point_spacing    even                      lonTlowodd:modulo                   float latThigh latThigh                      latThigh:units    degrees_north              float lonThighodd lonThighodd                      lonThighodd:units    degrees_east                      lonThighodd:point_spacing    even                      lonThighodd:modulo                 compile_opt idl2  strictarrsubs      jpi   n_elements xaxis     jpj   n_elements yaxis      depermination of the grid type and of the point type     low resolution grid: jpi 128  jpj 121   x 2  jpk 20                     0        1 4         2 8       4 2        5 6      odd                    T          u          T          u  93 3      even        T          u          T          u             92 2      odd                    T          u          T          u  91 1      even        T          u          T          u             90 0       high resolution grid: jpi 256  jpj 195   x 2  jpk 29                     0        0 7         1 4        2 1        2 8             odd                    T          u          T          u  91 6      even        T          u          T          u             91 0      odd                    T          u          T          u  90 5      even        T          u          T          u             90 0        x0   floor xaxis 0 10 10     y0   floor yaxis 0 10 10     case sectype of        xy :BEGIN          if  jpi NE 128 and jpi NE 256              OR  jpj NE 121 AND jpj NE 121 2 AND jpj NE 195 AND jpj NE 195 2  then begin             print    CASE NOT coded              stop          ENDIF          case 1 of             jpj EQ 195: BEGIN                case X0 OF                   0:BEGIN                      line    even                       vargrid    T                    END                   0 7:BEGIN                      case y0 OF                         91 6:BEGIN                            line    odd                             vargrid    T                          END                         91 0:BEGIN                            line    even                             vargrid    U                          END                         ELSE:BEGIN                            print    CASE NOT coded                             stop                         END                      endcase                   END                   1 4:BEGIN                      line    odd                       vargrid    U                    END                endcase             END             jpj EQ 121:BEGIN                case x0 OF                   0:BEGIN                      line    even                       vargrid    T                    END                   1 4:BEGIN                      case y0 OF                         93 3:BEGIN                            line    odd                             vargrid    T                          END                         92 2:BEGIN                            line    even                             vargrid    U                          END                         ELSE:BEGIN                            print    CASE NOT coded                             stop                         END                      endcase                   END                   2 8:BEGIN                      line    odd                       vargrid    U                    END                endcase             END             jpj EQ 195 2:BEGIN                line    odd even                 case x0 OF                   0 7:vargrid    T                    1 4:vargrid    U                    ELSE:BEGIN                      print    CASE NOT coded                       stop                   END                endcase             END             jpj EQ 121 2:BEGIN                line    odd even                 case x0 OF                   1 4:vargrid    T                    2 8:vargrid    U                    ELSE:BEGIN                      print    CASE NOT coded                       stop                   END                endcase             END             ELSE:BEGIN                print    CASE NOT coded                 stop             END          endcase       END        xz :BEGIN          if  jpi NE 128 and jpi NE 256  then begin             print    CASE NOT coded              stop          ENDIF          case X0 OF             0:BEGIN                line    even                 vargrid    T              END             0 7:BEGIN                id   ncdf_open iodir HOPE_lonlat nc                 ncdf_varget  id   latThigh  lat                test    where lat EQ yaxis 0 0                 if test EQ  1 then begin                   print    CASE NOT coded                    stop                endif                IF  test MOD 2  EQ 1 THEN BEGIN                   line    even                    vargrid    U                 ENDIF ELSE BEGIN                   line    odd                    vargrid    T                 ENDELSE                ncdf_close  id             END             1 4:BEGIN                if jpi EQ 128 then begin                   id   ncdf_open iodir HOPE_lonlat nc                    ncdf_varget  id   latTlow  lat                   test    where lat EQ yaxis 0 0                    if test EQ  1 then begin                      print    CASE NOT coded                       stop                   endif                   IF  test MOD 2  EQ 1 THEN BEGIN                      line    even                       vargrid    U                    ENDIF ELSE BEGIN                      line    odd                       vargrid    T                    ENDELSE                   ncdf_close  id                ENDIF ELSE BEGIN                   line    odd                    vargrid    U                 ENDELSE             END             2 8:BEGIN                line    odd                 vargrid    U              END          endcase       END        yz :BEGIN          if  jpj NE 121 AND jpj NE 195  then begin             print    CASE NOT coded              stop          ENDIF          id   ncdf_open iodir HOPE_lonlat nc           case y0 of             93 3:BEGIN                line    odd                 ncdf_varget  id   lonTlowodd  lonTodd                xstep    lonTodd 1 lonTodd 0 2                 case 1 OF                    where lonTodd EQ xaxis 0 0  NE  1:vargrid    T                     where lonTodd xstep EQ xaxis 0 0  NE  1:vargrid    U                    ELSE:BEGIN                      print    CASE NOT coded                       stop                   END                endcase             END             92 2:BEGIN                line    even                 ncdf_varget  id   lonTlowodd  lonTodd                xstep    lonTodd 1 lonTodd 0 2                 case 1 OF                    where lonTodd EQ xaxis 0 0  NE  1:vargrid    U                     where lonTodd xstep EQ xaxis 0 0  NE  1:vargrid    T                    ELSE:BEGIN                      print    CASE NOT coded                       stop                   END                endcase             END             91 6:BEGIN                line    odd                 ncdf_varget  id   lonThighodd  lonTodd                xstep    lonTodd 1 lonTodd 0 2                 case 1 OF                    where lonTodd EQ xaxis 0 0  NE  1:vargrid    T                     where lonTodd xstep EQ xaxis 0 0  NE  1:vargrid    U                    ELSE:BEGIN                      print    CASE NOT coded                       stop                   END                endcase             END             91 0:BEGIN                line    even                 ncdf_varget  id   lonThighodd  lonTodd                xstep    lonTodd 1 lonTodd 0 2                 case 1 OF                    where lonTodd EQ xaxis 0 0  NE  1:vargrid    U                     where lonTodd xstep EQ xaxis 0 0  NE  1:vargrid    T                    ELSE:BEGIN                      print    CASE NOT coded                       stop                   END                endcase             END             ELSE:BEGIN                print    CASE NOT coded                 stop             END          endcase          ncdf_close  id       END       else:BEGIN          print   case not coded           stop       END    endcase     return   linetype:line  pointtype:vargrid  end"); 
     222a[220] = new Array("./ToBeReviewed/HOPE/read_hope.html", "read_hope.pro", "", "     file_comments        categories        param EVENT         returns        restrictions        examples          history        version    Id: read_hope pro 163 2006 08 29 12:59:46Z navarro         pro read_hope_event  event     compile_opt idl2  strictarrsubs      widget_control  event id  get_uvalue uval    widget_control  event top  get_uvalue top_uvalue    case uval name OF          cancel :begin   close the file          cdfid top_uvalue 1  findline top_uvalue   cdfid           ncdf_close  cdfid   clear the pointer          for i 0 n_elements top_uvalue 1 do ptr_free  top_uvalue i    kill the widget          widget_control event top destroy       end          type choice :begin   find the new type of selected section          typeindex widget_info event id droplist_select           selectedtype top_uvalue 1  findline top_uvalue   type choice typeindex    find the available variables for this type of section          sectype    top_uvalue 1  findline top_uvalue   sectype           goodvar   where sectype EQ selectedtype           namevar    top_uvalue 1  findline top_uvalue   namevar           goodnamevar   namevar goodvar    find the selected var name          varchoiceid   widget_info event top find_by_uname    var choice           varindex   widget_info varchoiceid droplist_select           varchoice    top_uvalue 1  findline top_uvalue   var choice           selectedvarname varchoice varindex    do we change the variable           if  where goodnamevar EQ selectedvarname 0  EQ  1 then begin             selectedvarname   goodnamevar 0              varindex    where varchoice EQ selectedvarname 0              widget_control  varchoiceid  set_droplist_select   varindex          ENDIF   displays the different domains          selected   goodvar where goodnamevar EQ selectedvarname           rh_alldomains  event top  selected       end          var choice :BEGIN   find the new variable          varindex widget_info event id droplist_select           selectedvar top_uvalue 1  findline top_uvalue   var choice varindex    find the available variables for this type of section          namevar    top_uvalue 1  findline top_uvalue   namevar           goodvar   where namevar EQ selectedvar           sectype    top_uvalue 1  findline top_uvalue   sectype           goodtype   sectype goodvar    find the selected type of section          typechoiceid   widget_info event top find_by_uname    type choice           typeindex   widget_info typechoiceid droplist_select           typechoice    top_uvalue 1  findline top_uvalue   type choice           selectedtype typechoice typeindex    do we change the type of section            if  where goodtype EQ selectedtype 0  EQ  1 then begin             selectedtype   goodtype 0              typeindex    where typechoice EQ selectedtype 0              widget_control  typechoiceid  set_droplist_select   typeindex          ENDIF   displays the different domains          selected   goodvar where goodtype EQ selectedtype           rh_alldomains  event top  selected       END          plot :BEGIN   plot the array          res   createhopestruct event    type of section          selected    top_uvalue 1  findline top_uvalue   selected           type    top_uvalue 1  findline top_uvalue   sectype selected    get the informations of cw_specifie          specifieid widget_info event top find_by_uname    specifie           widget_control  specifieid  get_value   specifie          specifie   struct2string specifie direct2string           case type of              x :command    plt1d res x specifie              y :command    plt1d res y specifie              z :command    plt1d res z specifie              t :command    pltt res t   specifie              xy :command    plt  res specifie              xz :command    pltz  res xz specifie              yz :command    pltz  res yz specifie              xt :command    pltt res xt specifie              yt :command    pltt res yt specifie              zt :command    pltt res zt specifie              xyz :              xyt :              yzt :              xyzt :          ENDCASE          test   execute command           if test EQ 0 then stop       end          linechoice :BEGIN          if event select EQ 1 then begin             sensitive   bytarr 3              sensitive where odd   even   odd even  eq event value    1             basedomainodd widget_info event top find_by_uname    basedomainodd              widget_control  basedomainodd  sensitive   sensitive 0              basedomaineven widget_info event top find_by_uname    basedomaineven              widget_control  basedomaineven  sensitive   sensitive 1              basedomainoddeven widget_info event top find_by_uname    basedomainodd even              widget_control  basedomainoddeven  sensitive   sensitive 2              case  where sensitive EQ 1 0  of                0:BEGIN                   widget_control  basedomainodd  get_uvalue   oddsecchoice                   oddsecchoiceid widget_info event top find_by_uname    oddsecchoice                    if oddsecchoiceid NE 0 then                      index   widget_info oddsecchoiceid   droplist_select                      ELSE index   0                    top_uvalue 1  findline top_uvalue   selected    oddsecchoice index                 END                1:BEGIN                   widget_control  basedomaineven  get_uvalue   evensecchoice                   evensecchoiceid widget_info event top find_by_uname    evensecchoice                    if evensecchoiceid NE 0 then                      index   widget_info evensecchoiceid   droplist_select                      ELSE index   0                    top_uvalue 1  findline top_uvalue   selected    evensecchoice index                 END                2:BEGIN                   widget_control  basedomainodd  get_uvalue   oddevensecchoice                   oddevensecchoiceid widget_info event top find_by_uname    odd evensecchoice                    if oddevensecchoiceid NE 0 then                      index   widget_info oddevensecchoiceid   droplist_select                      ELSE index   0                    top_uvalue 1  findline top_uvalue   selected    oddevensecchoice index                 END             endcase          endif       END          oddsecchoice :BEGIN          widget_control  event top  update 0          basedomainodd widget_info event top find_by_uname    basedomainodd           widget_control  basedomainodd  get_uvalue   oddsecchoice          domainpart  top_uvalue  basedomainodd  oddsecchoice event index            top_uvalue 1  findline top_uvalue   selected    oddsecchoice event index           widget_control  event top  update 1       END          evensecchoice :BEGIN          widget_control  event top  update 0          basedomaineven widget_info event top find_by_uname    basedomaineven           widget_control  basedomaineven  get_uvalue   evensecchoice          domainpart  top_uvalue  basedomaineven  evensecchoice event index            top_uvalue 1  findline top_uvalue   selected    evensecchoice event index           widget_control  event top  update 1       END          odd evensecchoice :BEGIN          widget_control  event top  update 0          basedomainoddeven widget_info event top find_by_uname    basedomainodd even           widget_control  basedomainoddeven  get_uvalue   oddevensecchoice          domainpart  top_uvalue  basedomainoddeven  oddevensecchoice event index            top_uvalue 1  findline top_uvalue   selected    oddevensecchoice event index           widget_control  event top  update 1       END          date1 :BEGIN          date2id   widget_info event top  find_by_uname    date2           widget_control  date2id  get_value   date2          if event value GT date2 then widget_control  date2id  set_value   event value       END          date2 :BEGIN          date1id   widget_info event top  find_by_uname    date1           widget_control  date1id  get_value   date1          if event value LT date1 then widget_control  date1id  set_value   event value       END         else:    endcase    return end                file_comments   Read the Hope grid file converted in NetCdf by xconv      categories   Reading      param TYPEIN  in required type string    A string specifying from which type of section the 4D   array based:  xy   xz   yz       param VARNAMEIN  in required type string    A string the name of the variable to be read  in   lower or upper case       keyword FILENAME  type string    The name of the file to be read      keyword XLIMITS  type vector    A two elements vector  lonmin  lonmax    the boundary of the longitudes  from 0 to 360       keyword YLIMITS  type vector    A two elements vector  latmin  latmax    the boundary of the latitudes  from  90 to 90       keyword ZLIMITS  type vector    A two elements vector  depthmin  depthmax    the boundary of the depth      keyword TLIMITS  type vector    A two elements vector  date1  date2    the boundary of the calendar with date1 and date2   folowing the syntax yyyymmdd      keyword ODDPT   Activate to read only the sections located on ODD   points       keyword EVENPT   Activate to read only the sections located on even   points       keyword ODDEVENPT   Activate to read only the sections located on   both even and odd points  horizontal sections       keyword _EXTRA   Used to pass your keywords      returns    1 if typein and varnamein are undefine  this is the widget   version      A structure which but be read by litchamp pro and is   necessary to complete the grid associated to the data  see   the example       uses   common pro  useful only for the definition of iodir       restrictions    x   y   z   t   xt   yt  and  zt  section not coded  xconv   must be able to works with this kind of function    The grid file has no zoom possibilities on horizontal dimensions       restrictions     When typein and varnamein are defined  the method to find the   good variable is:    1  find the variables which are available on this type of   sections with this name    2  if ODDPT  EVENPT or ODDEVENPT are specified  consider only   these types of sections    3  For an XY section the chosen variable is the one which has   the most level in the vertical domain specified by ZLIMITS        For an XZ section the chosen variable is the one which has   the most points in the latitude domain specified by YLIMITS        For an YZ section the chosen variable is the one which has   the most points in the longitude domain specified by XLIMITS         examples         IDL  a read_hope xy ocpt filename CLIM_CNT_1993 1998 nc        IDL  help  a struct         Structure   6 tags  length 1860176  refs 1:          ARRAY           FLOAT     Array 128  242  15           UNIT            STRING     deg C           NAME            STRING     Ocean potential temperature           DATE            FLOAT     Array 1           GRID            STRING     T           HOPEGRID        STRUCT       Array 1        IDL  help  a hopegrid struct         Structure   8 tags  length 1588  refs 2:          XAXIS           FLOAT     Array 128           YAXIS           FLOAT     Array 242           ZAXIS           FLOAT     Array 15           FIRSTS          LONG      Array 3           LASTS           LONG      Array 3           TYPE            STRING     xy           LINETYPE        STRING     odd even           PTTYPE          STRING     T        IDL  help  litchamp a            FLOAT       Array 128  242  15       history   Sebastien Masson  smasson lodyc jussieu fr                         June 2001      version    Id: read_hope pro 163 2006 08 29 12:59:46Z navarro             FUNCTION read_hope  typein  varnamein  FILENAME   filename  XLIMITS   xlimits  YLIMITS   ylimits   ZLIMITS   zlimits  TLIMITS   tlimits  ODDPT   oddpt  ODDEVENPT   oddevenpt  EVENPT   evenpt  _extra   ex     compile_opt idl2  strictarrsubs    common                           usefull only for the definition of iodir    if n_elements filename  EQ 0 then filename   isafile iodirectory   iodir  _extra   ex    IF size filename   type  NE 7 THEN return   1   filename   isafile filename   filename  iodirectory   iodir  _extra   ex      cdfid   ncdf_open filename          id of the netcdf file    wathinside   ncdf_inquire cdfid     structure with global informations       dimensions      namedim   strarr wathinside ndims     name of the dimensions   typedim   strarr wathinside ndims     type of the dimensions  x y z t    sizedim   lonarr wathinside ndims     size of each dimension   loop on the dimensions to get the names and sizes   for dimiq   0  wathinside ndims 1 do begin     ncdf_diminq  cdfid  dimiq  name  value     namedim dimiq    name     case 1 of        STRCMP name   lon  3   FOLD_CASE :typedim dimiq     x        STRCMP name   lat  3   FOLD_CASE :typedim dimiq     y        STRCMP name   z  1   FOLD_CASE :typedim dimiq     z        STRCMP name   t  1   FOLD_CASE :typedim dimiq     t        ELSE:BEGIN         ncdf_close  cdfid         return  report Unknown name of dimension        END     endcase     sizedim dimiq    value   endfor   dimlist: structure which contains the name and the value of each   dimension   we suppose that there is always a variable which has the    same name that the dimension and which gives the values of   this dimension   ncdf_varget  cdfid  namedim 0  value   dimlist   create_struct namedim 0  value    for dimiq   1  wathinside ndims 1 do begin     ncdf_varget  cdfid  namedim dimiq  value  get the value     dimlist   create_struct dimlist  namedim dimiq  value    endfor       variables      namevar   strarr wathinside nvars      names of the variables   ndimsvar   lonarr wathinside nvars     number of dim for each variable   dimvar   replicate 1  wathinside ndims  wathinside nvars    dims of each variables   loop over the variable ids to fill namevar  ndimsvar and dimvar   for varid   0  wathinside nvars 1 do begin     res   ncdf_varinq cdfid  varid      namevar varid    res name     namevar varid    strjoin strsplit namevar varid   _ 0 99   EXTRACT   REGEX      ndimsvar varid    res ndims     dimvar 0:res ndims 1  varid    res dim   ENDFOR   we cut dimvar to select only the interessant part   dimvar   dimvar 0:max ndimsvar 1      selection of the data variables which are diffrent from the   dimension variables   we suppose that that data variables are 4D array  with sometime   dimensions equal to 1  they must be different from dimension   variables which have only 1 dimension   datavarid   where ndimsvar eq 4    numberofvar   n_elements datavarid    namevar   namevar datavarid    ndimsvar   ndimsvar datavarid    dimvar   dimvar  datavarid      sectype   strarr numberofvar    the type of section for each variable : xy   xz   yz    linetype   strarr numberofvar    the line of the points : odd  even or odd even   pointtype   strarr numberofvar    the type of variable : scalar  T  or vector  U    for i   0  numberofvar 1 do begin     dimofthevar   dimvar  i      sectype i    typedim dimofthevar 0 typedim dimofthevar 1      xaxisid   dimofthevar where typedim dimofthevar  EQ  x      yaxisid   dimofthevar where typedim dimofthevar  EQ  y      lineandpt   findlineandpointtype sectype i  dimlist xaxisid 0  dimlist yaxisid 0  iodir      linetype i    lineandpt linetype     pointtype i    lineandpt pointtype   endfor                  definition of the widget               base   widget_base column        first base:       droplist to select the type of section      droplist to select the variable      button to select type of line : odd  even or odd even       base1   widget_base base   row   frame    typechoice   sectype uniq sectype  sort sectype    if n_elements typechoice  GT 1 then typechoice   typechoice sortdim typechoice    base11   widget_droplist base1  title    Type of section  value   typechoice  uvalue    name: type choice  uname    type choice    if n_elements typein  NE 0 then BEGIN     selectedtype   strmid typein  0  2      widget_control  base11  set_droplist_select                         0L    where typechoice EQ selectedtype 0    ENDIF ELSE selectedtype   typechoice 0       varchoice   namevar uniq namevar  sort namevar    base12   widget_droplist base1  title    Available data  value   varchoice  uvalue    name: var choice  uname    var choice    if n_elements varnamein  NE 0 THEN BEGIN     selectedname   varnamein     widget_control  base12  set_droplist_select                         0L    where strlowcase varchoice  EQ strlowcase varnamein 0    ENDIF ELSE selectedname   varchoice 0      base13   widget_base base1   row  uname    linechoicebase        base 2: base to select the domain of the odd points     base2   widget_base base   column  uname    basedomainodd   frame        base 3: base to select the domain of the even points     base3   widget_base base   column  uname    basedomaineven   frame        base 4: base to select the domain of the odd even points     base4   widget_base base   column  uname    basedomainodd even   frame        base 5: calendar     base5   widget_base base   row  uname    baset   frame    timename   strlowcase tag_names dimlist wathinside recdim    read the time axis in julina days   time   ncdf_timeget cdfid  timename    update the dimlist structure   dimlist wathinside recdim    time   base51   cw_calendar base5  time  uname    date1  uvalue    name: date1    base52   cw_calendar base5  time  uname    date2  uvalue    name: date2         base 6: base to select the min  max    and others keywords     base6   cw_specifie base   column  uname    specifie  uvalue    name: specifie         base 7: last base with the action buttons     base7   widget_base base   row  uname    finalaction    base71   widget_button base7  value    Plot  uvalue    name: plot    base72   widget_button base7  value    Cancel  uvalue    name: cancel        determination of the selected variable         goodname   0   where strlowcase namevar  EQ strlowcase selectedname    goodtype   0   where sectype EQ selectedtype    selected   inter goodname  goodtype    if selected 0  EQ  1 then BEGIN     widget_control  base   destroy     ncdf_close  cdfid     return  report impossible combinaison : type of section  selectedtype  variable name  selectedname    ENDIF   if n_elements typein  NE 0 then BEGIN     if NOT keyword_set xlimits  then xlimits    1e9  1e9      if NOT keyword_set ylimits  then ylimits    1e9  1e9      if NOT keyword_set zlimits  then zlimits    1e9  1e9      if NOT keyword_set tlimits  then tlimits    1e9  1e9    ENDIF   if n_elements typein  NE 0 AND n_elements selected  NE 1 then BEGIN     if keyword_set oddpt  then selected   inter selected  where linetype EQ  odd      if keyword_set evenpt  then selected   inter selected  where linetype EQ  even      if keyword_set oddevenpt  then selected   inter selected  where linetype EQ  odd even      if selected 0  EQ  1 then BEGIN       widget_control  base   destroy       ncdf_close  cdfid       return  report impossible combinaison : type of section  selectedtype  variable name  selectedname  and line type       endif     if n_elements selected  NE 1 then begin       case selectedtype of          xy :BEGIN   choice on the vertical axis   choice based on the variable which has the most available levels   between the zlimits            if NOT keyword_set zlimits  then begin             print   case not coded              stop           ENDIF           number   lonarr n_elements selected            for i   0  n_elements selected 1 do begin             zdim   dimvar 2  selected i              zaxis   dimlist zdim              nothing   where zaxis GE zlimits 0  AND zaxis LE zlimits 1  count              number i    count           ENDFOR           selected   selected where number EQ max number            if n_elements selected  NE 1 then begin             print   case not coded              stop           endif         END          xz :BEGIN   choice on the latitude axis           if NOT keyword_set ylimits  then begin             print   case not coded              stop           ENDIF           number   lonarr n_elements selected            for i   0  n_elements selected 1 do begin             ydim   dimvar 2  selected i              yaxis   dimlist ydim              nothing   where yaxis GE ylimits 0  AND yaxis LE ylimits 1  count              number i    count           ENDFOR           selected   selected where number EQ max number            if n_elements selected  NE 1 then begin             print   case not coded              stop           endif         END          yz :BEGIN   choice on the longitude axis           if NOT keyword_set xlimits  then begin             print   case not coded              stop           ENDIF           number   lonarr n_elements selected            for i   0  n_elements selected 1 do begin             xdim   dimvar 2  selected i              xaxis   dimlist xdim              nothing   where xaxis GE xlimits 0  AND xaxis LE xlimits 1  count              number i    count           ENDFOR           selected   selected where number EQ max number            if n_elements selected  NE 1 then begin             print   case not coded              stop           endif         END       endcase     endif   ENDIF       definition of the uvalue of the base which allows to share the   variables between programs         top_uvalue   ptrarr 2  18   allocate_heap     top_uvalue 0  0     type choice     top_uvalue 1  0    temporary typechoice     top_uvalue 0  1     var choice     top_uvalue 1  1    temporary varchoice     top_uvalue 0  2     namevar     top_uvalue 1  2    temporary namevar     top_uvalue 0  3     dimvar     top_uvalue 1  3    temporary dimvar     top_uvalue 0  4     sectype     top_uvalue 1  4    temporary sectype     top_uvalue 0  5     linetype     top_uvalue 1  5    temporary linetype     top_uvalue 0  6     pointtype     top_uvalue 1  6    temporary pointtype     top_uvalue 0  7     dimlist     top_uvalue 1  7    temporary dimlist     top_uvalue 0  8     typedim     top_uvalue 1  8    temporary typedim     top_uvalue 0  9     sizedim     top_uvalue 1  9    temporary sizedim     top_uvalue 0  10     cdfid     top_uvalue 1  10    cdfid    top_uvalue 0  11     datavarid     top_uvalue 1  11    datavarid    top_uvalue 0  12     selected     top_uvalue 1  12    selected    top_uvalue 0  13     filename     top_uvalue 1  13    filename    top_uvalue 0  14     xlimits     top_uvalue 1  14    testvar var   xlimits     top_uvalue 0  15     ylimits     top_uvalue 1  15    testvar var   ylimits     top_uvalue 0  16     zlimits     top_uvalue 1  16    testvar var   zlimits     top_uvalue 0  17     tlimits     top_uvalue 1  17    testvar var   tlimits      widget_control  base  set_uvalue   top_uvalue   rh_alldomains  base  selected    if n_params  EQ 0 then BEGIN   we use the widget     widget_control  base   REALIZE     xmanager   read_hope  base   no_block     return    1   ENDIF   get the output   output   createhopestruct top:base    clear the pointer   for i   0  n_elements top_uvalue 1 do ptr_free  top_uvalue i    close the file   ncdf_close  cdfid   return  output end"); 
     223a[221] = new Array("./ToBeReviewed/HOPE/rh_alldomains.html", "rh_alldomains.pro", "", "     file_comments        categories        param TOPID        param SELECTED        returns        uses        restrictions        examples        history        version    Id: rh_alldomains pro 163 2006 08 29 12:59:46Z navarro        todo seb     PRO rh_alldomains  topid  selected     compile_opt idl2  strictarrsubs       widget_control  topid  get_uvalue top_uvalue    widget_control  topid  update 0      selectedline top_uvalue 1  findline top_uvalue   linetype selected      we get the size of the dimenstion id of this section      dimvar    top_uvalue 1  findline top_uvalue   dimvar     typedim    top_uvalue 1  findline top_uvalue   typedim     dimlist    top_uvalue 1  findline top_uvalue   dimlist     sizedim    top_uvalue 1  findline top_uvalue   sizedim      buttons to select type of line : odd  even or odd even      linechoicebase widget_info topid find_by_uname    linechoicebase     id   widget_info linechoicebase find_by_uname    linechoice     IF id NE 0 THEN widget_control  id   destroy    choice        if  where selectedline EQ  odd 0  NE  1 then choice    choice   odd     if  where selectedline EQ  even 0  NE  1 then choice    choice   even     if  where selectedline EQ  odd even 0  NE  1 then choice    choice   odd even     choice   choice 1:n_elements choice 1     nothing   cw_bgroup linechoicebase choice   row exclusive   return_name  uname    linechoice  uvalue    name: linechoice     widget_control  nothing  set_value   0    sensitive   bytarr 3     sensitive where odd   even   odd even  eq choice 0    1      odd points domain      basedomainodd widget_info topid find_by_uname    basedomainodd     id   widget_info basedomainodd find_by_uname    title     IF id NE 0 THEN widget_control  id   destroy    oddsecchoice   where selectedline EQ  odd     if oddsecchoice 0  NE  1 then BEGIN       oddsecchoice   selected oddsecchoice        nothing widget_label basedomainodd  value    Domain of the odd points  uname    title        IF n_elements oddsecchoice  GT 1 THEN BEGIN          selecteddim   dimvar  oddsecchoice           sorteddim   selecteddim          FOR i   0  n_elements oddsecchoice 1 DO             sorteddim  i    selecteddim sortdim typedim selecteddim  i  i           zdim   sorteddim 2             sizedims   sizedim zdim           sortedzdim   sort sizedims           sizedims   sizedims sortedzdim           oddsecchoice   oddsecchoice sortedzdim           nothing widget_droplist basedomainodd title    number of levels  value   strtrim sizedims  2  uvalue    name: oddsecchoice  uname oddsecchoice        ENDIF        domainpart  top_uvalue  basedomainodd  oddsecchoice 0        widget_control  basedomainodd  set_uvalue   oddsecchoice    ENDIF ELSE BEGIN        nothing widget_label basedomainodd  value       uname    title        domainpart  top_uvalue  basedomainodd   destroy       widget_control  basedomainodd  set_uvalue    1    ENDELSE    widget_control  basedomainodd  sensitive   sensitive 0       even points domain      basedomaineven widget_info topid find_by_uname    basedomaineven     id   widget_info basedomaineven find_by_uname    title     IF id NE 0 THEN widget_control  id   destroy    evensecchoice   where selectedline EQ  even     if evensecchoice 0  NE  1 then BEGIN       evensecchoice   selected evensecchoice        nothing widget_label basedomaineven  value    Domain of the even points  uname    title        IF n_elements evensecchoice  GT 1 THEN BEGIN          selecteddim   dimvar  evensecchoice           sorteddim   selecteddim          FOR i   0  n_elements evensecchoice 1 DO             sorteddim  i    selecteddim sortdim typedim selecteddim  i  i           zdim   sorteddim 2             sizedims   sizedim zdim           sortedzdim   sort sizedims           sizedims   sizedims sortedzdim           evensecchoice   evensecchoice sortedzdim           nothing widget_droplist basedomaineven title    number of levels  value   strtrim sizedims  2  uvalue    name: evensecchoice  uname evensecchoice        ENDIF        domainpart  top_uvalue  basedomaineven  evensecchoice 0        widget_control  basedomaineven  set_uvalue   evensecchoice    ENDIF ELSE BEGIN       domainpart  top_uvalue  basedomaineven   destroy       nothing widget_label basedomaineven  value       uname    title        widget_control  basedomaineven  set_uvalue    1    ENDELSE    widget_control  basedomaineven  sensitive   sensitive 1       odd even points domain      basedomainoddeven widget_info topid find_by_uname    basedomainodd even     id   widget_info basedomainoddeven find_by_uname    title     IF id NE 0 THEN widget_control  id   destroy    oddevensecchoice   where selectedline EQ  odd even     if oddevensecchoice 0  NE  1 then BEGIN       oddevensecchoice   selected oddevensecchoice        nothing widget_label basedomainoddeven  value    Domain of the odd even points  uname    title        IF n_elements oddevensecchoice  GT 1 THEN BEGIN          selecteddim   dimvar  oddevensecchoice           sorteddim   selecteddim          FOR i   0  n_elements oddevensecchoice 1 DO             sorteddim  i    selecteddim sortdim typedim selecteddim  i  i           zdim   sorteddim 2             sizedims   sizedim zdim           sortedzdim   sort sizedims           sizedims   sizedims sortedzdim           oddevensecchoice   oddevensecchoice sortedzdim           nothing widget_droplist basedomainoddeven title    number of levels  value   strtrim sizedims  2  uvalue    name: odd evensecchoice  uname odd evensecchoice        ENDIF        domainpart  top_uvalue  basedomainoddeven  oddevensecchoice 0        widget_control  basedomainoddeven  set_uvalue   oddevensecchoice    ENDIF ELSE BEGIN       domainpart  top_uvalue  basedomainoddeven   destroy       nothing widget_label basedomainoddeven  value       uname    title        widget_control  basedomainoddeven  set_uvalue    1    ENDELSE    widget_control  basedomainoddeven  sensitive   sensitive 2       case  where sensitive EQ 1 0  of       0: top_uvalue 1  findline top_uvalue   selected    oddsecchoice 0        1: top_uvalue 1  findline top_uvalue   selected    evensecchoice 0        2: top_uvalue 1  findline top_uvalue   selected    oddevensecchoice 0     endcase      widget_control  topid  update 1    return end"); 
     224a[222] = new Array("./ToBeReviewed/HOPE/sortdim.html", "sortdim.pro", "", "     file_comments        categories        param DIMS        keyword INVERSE        returns        uses        restrictions        examples        history        version    Id: sortdim pro 163 2006 08 29 12:59:46Z navarro        todo seb       function sortdim  dims  inverse inverse       IDL  a x y t z       IDL  b a sortdim a       IDL  print  a      x y t z     IDL  print  b      x y z t     IDL  print  b sortdim a inv       x y t z     IDL  a xytz      IDL  print  sortdim a                 0           1           3           2           compile_opt idl2  strictarrsubs      tosort   dims    if n_elements tosort  eq 1 then       tosort   string reform byte tosort 1 strlen tosort 0     tosort   strrepl tosort strwhere tosort x a     tosort   strrepl tosort strwhere tosort y b     tosort   strrepl tosort strwhere tosort z c     tosort   strrepl tosort strwhere tosort t d     tosort   uniq tosort sort tosort     if keyword_set inverse  then tosort sort tosort     return  tosort  end   "); 
     225a[223] = new Array("./ToBeReviewed/HOPE/xrh.html", "xrh.pro", "", "     file_comments        categories        keyword _EXTRA   Used to pass your keywords      returns        uses        restrictions        examples        history        version    Id: xrh pro 163 2006 08 29 12:59:46Z navarro        todo seb       procedure to call read_hope in the widget mode PRO xrh  _extra   ex     compile_opt idl2  strictarrsubs      a   read_hope _extra   ex     return end"); 
     226a[224] = new Array("./ToBeReviewed/IMAGE/animgif.html", "animgif.pro", "", "             file_comments    Build a gif animation      categories    Animated drawings       param NOMFIC  in required     It is the name of the gif file containing the animation             Comment: this file is placed in the directory defined by iodir       uses    common pro      restrictions    We use the Z buffer to go faster                 So  if it failed in animgif  you have to do:                IDL  device   close                IDL  set_plot   x                 IDL  retall      restrictions    If we want to delete the  common                  we have to define manually the picture s size                   variables xsize and ysize  just as iodir       history    Guillaume Roullet  grlod ipsl jussieu fr             Sebastien Masson  smasson lodyc jussieu fr             30 4 1999      version     Id: animgif pro 157 2006 08 21 09:01:50Z navarro             PRO animgif  nomfic     compile_opt idl2  strictarrsubs    common      It recuperates the color palette and put it in red  green  blue       tvlct   rouge vert bleu get      It completes the current palette on 256 colors       red    rouge  replicate 255  256 n_elements rouge      green    vert  replicate 255  256 n_elements rouge      blue    bleu  replicate 255  256 n_elements rouge       It rocks on the z device  allowing to create the picture without display it     thisOS    VERSION OS_FAMILY    thisOS   STRMID thisOS  0  3     thisOS   STRUPCASE thisOS     set_plot   z    size of the picture  in pixel :    xsize   30 min page_size  max   ma key_portrait   ma 1 key_portrait     ysize   30 min page_size  max   ma 1 key_portrait    ma key_portrait     device  set_resolution    xsize  ysize      Beginning of the gif file  Writing of an empty picture        reinitplt    plot   0   0   nodata    write_gif iodir nomfic tvrd red  green  blue   multiple         Beggining of the part we want to change        Loop of picture s creation       calen   TIMEGEN 366  START JULDAY 1 1 2000      debut   where calen EQ 19810105     debut   where calen EQ 19790105     debut   debut 0     if debut EQ  1 then begin       device   close       CASE thisOS of           MAC : SET_PLOT  thisOS           WIN : SET_PLOT  thisOS          ELSE: SET_PLOT   X        ENDCASE       stop    endif     for i   0  73 15 1 do begin     for i   0  3 2 1 do begin     for i   0  73 2 1 do begin       print   Image numero :  strtrim i  2        date   calen debut i        erase  255       plt  nlec sst  date   ATF  19  29  int    5   noerase        plt  nlec sss  date   ATF  label   2   noerase        plt  nlec htoth  date   RE3 nlec hpycn  date   RE3  10  60  int   5   inv   noerase        domdef  290 340 5 15         plt  norme nlec unsurf  date   RE3  nlec vnsurf  date   RE3  0  1 2  int    1   noerase         Writing of the picture in the file  gif          write_gif iodir nomfic tvrd red  green  blue   multiple    ENDFOR      End of the part we want to change        Closing of the file     write_gif iodir nomfic close    Rerock on terminal X mode      device   close    CASE thisOS of        MAC : SET_PLOT  thisOS        WIN : SET_PLOT  thisOS       ELSE: SET_PLOT   X     ENDCASE      return end"); 
     227a[225] = new Array("./ToBeReviewed/INIT/initncdf.html", "initncdf.pro", "", "             file_comments   Initfile for Netcdf file  define all the grid parameters through   an appropriate call to computegid      categories   Grid       param NCFILEIN  in required type scalar string    A string giving the name of the NetCdf file      keyword INVMASK  default 0 type scalar: 0 or 1    Inverse the land sea mask  that should have 0 1 values for land sea : mask   1 mask      keyword MASKNAME  type string    A string giving the name of the variable in the file    that contains the land sea mask      keyword MISSING_VALUE  type scalar    To define  or redefine if the attribute is   already existing  the missing values used with USEASMASK   keyword      keyword START1  default 0 type scalar: 0 or 1    Index the axis from 1 instead of 0 when using    xyindex and or zindex      keyword USEASMASK  type scalar string    A string giving the name of the variable in the file    that will be used to build the land sea mask  In this case the   mask is based on the first record  if record dimension   exists  The mask is build according to :      1 the keyword missing_value if existing      2 the attribute  missing_value  if existing      3 NaN values if existing      keyword XAXISNAME  default x   longitude   nav_lon   lon   lon_rho  or  NbLongitudes type scalar string    A string giving the name of the variable in the file    that contains the  xyz axis              keyword YAXISNAME  default y   latitude   nav_lat lat   lat_rho  or  NbLatitudes type scalar string    A string giving the name of the variable in the file    that contains the  xyz axis        keyword ZAXISNAME  default z   level   lev   depth type scalar string    A string giving the name of the variable in the file    that contains the  xyz axis        keyword XYINDEX  default 0 type scalar: 0 or 1    To define the x y axis with index instead of using   the values contained in X YAXISNAME     x yaxis   keyword_set start1    findgen jpi jpj     this forces key_onearth   0      keyword ZINDEX  default 0 type scalar: 0 or 1    To define the z axis with index instead of using   the values contained in ZAXISNAME     zaxis   keyword_set start1    findgen jpk         keyword _EXTRA   Used to pass keywords to computegrid      uses   common pro      restrictions   Change the grid parameters  see computegrid       restrictions   the file must contain an x and an y axis   1 ou 2 dimentional array       examples    IDL  initncdf toto nc glam 180 180       history   Sebastien Masson  smasson lodyc jussieu fr                         8 May 2002      version    Id: initncdf pro 192 2006 09 22 09:37:08Z smasson             PRO initncdf  ncfilein  XAXISNAME   xaxisname  YAXISNAME   yaxisname                   ZAXISNAME   zaxisname  MASKNAME   maskname                   INVMASK   invmask  USEASMASK   useasmask                   MISSING_VALUE   missing_value  START1   start1                   XYINDEX   xyindex  ZINDEX   zindex                   _EXTRA   ex       compile_opt idl2  strictarrsubs    common     check the name of the file   ncfile   isafile FILENAME   ncfilein  IODIRECTORY   iodir  _extra   ex    if size ncfile   type  NE 7 then BEGIN     print   initncdf cancelled      return   endif   if the file is stored on tape   if  version os_family EQ  unix  then spawn   file  ncfile     dev null       open the file   cdfid   ncdf_open ncfile    what is inside the file   inside   ncdf_inquire cdfid      name of the variables   namevar   strarr inside nvars    for varid   0  inside nvars 1 do begin     invar   ncdf_varinq cdfid  varid      namevar varid    strlowcase invar name    ENDFOR     find the xaxis   if keyword_set xaxisname  then xaxisname   strlowcase xaxisname  ELSE xaxisname    x    xvarid    where namevar EQ xaxisname OR namevar EQ  longitude                      OR namevar EQ  nav_lon  OR namevar EQ  lon                      OR namevar EQ  lon_rho  OR namevar EQ  nblongitudes 0    if xvarid EQ  1 then begin     print   the xaxis was not found  check the use of XAXISNAME keyword      stop   endif   romsgrid   strmid namevar xvarid  0  4  EQ  lon_    get the size of xaxis   xinq   ncdf_varinq cdfid  xvarid    ncdf_diminq  cdfid  xinq dim 0  blabla  jpifromx   should we read or compute the xaxis    IF NOT keyword_set xyindex  THEN BEGIN   read the xaxis     ncdf_varget  cdfid  xvarid  xaxis   make sure of the shape of xaxis     IF xinq ndims GE 2 THEN BEGIN       ncdf_diminq  cdfid  xinq dim 1  blabla  jpjfromx       xaxis   reform xaxis  jpifromx  jpjfromx   over      ENDIF   ENDIF ELSE xaxis   keyword_set start1    findgen jpifromx      find the yaxis   if keyword_set yaxisname  then yaxisname   strlowcase yaxisname  ELSE yaxisname    y    yvarid    where namevar EQ yaxisname OR namevar EQ  latitude                      OR namevar EQ  nav_lat  OR namevar EQ  lat                      OR namevar EQ  lat_rho  OR namevar EQ  nblatitudes 0    yvarid   yvarid 0    if yvarid EQ  1 then begin     print   the yaxis was not found  check the use of YAXISNAME keyword      stop   endif   get the size of yaxis and check it is ok with the values found for x   yinq   ncdf_varinq cdfid  yvarid    IF xinq ndims GE 2 THEN BEGIN     ncdf_diminq  cdfid  yinq dim 0  blabla  jpifromy     ncdf_diminq  cdfid  yinq dim 1  blabla  jpjfromy     IF jpifromy NE jpifromx THEN BEGIN        print   xaxis and y axis do not have the same x dimension      ENDIF   ENDIF ELSE ncdf_diminq  cdfid  yinq dim 0  blabla  jpjfromy   IF n_elements jpjfromx  NE 0 THEN BEGIN     IF jpjfromy NE jpjfromx THEN BEGIN        print   xaxis and y axis do not have the same y dimension      ENDIF       ENDIF   should we read or compute the xaxis    IF NOT keyword_set xyindex  THEN BEGIN   read the yaxis     ncdf_varget  cdfid  yvarid  yaxis   make sure of the shape of xaxis     IF xinq ndims GE 2 THEN yaxis   reform yaxis  jpifromy  jpjfromy   over    ENDIF ELSE yaxis   keyword_set start1    findgen jpjfromy      find the zaxis   IF keyword_set romsgrid  THEN BEGIN     FOR i   0  inside ndims 1 DO BEGIN        ncdf_diminq  cdfid  i  name  size       CASE strlowcase name  OF          s_rho :zaxis   reverse indgen size           s_u :zaxis   reverse indgen size           s_v :zaxis   reverse indgen size           s_psi :zaxis   reverse indgen size           s_w :zaxis   reverse indgen size 1          ELSE:       ENDCASE     ENDFOR      IF  where namevar EQ  h 0  NE  1 THEN BEGIN       ncdf_varget  cdfid   h  romsh     ENDIF ELSE romsh    1   ENDIF ELSE BEGIN      if keyword_set zaxisname  then zaxisname   strlowcase zaxisname  ELSE zaxisname    z      zvarid    where namevar EQ  nav_lev  or namevar EQ zaxisname OR namevar EQ  level  OR namevar EQ  lev  OR strmid namevar  0  5  EQ  depth 0      if zvarid EQ  1 AND inside ndims GT 3 then begin       print   initncdf: the zaxis was not found  check the the use of ZAXISNAME keyword if you whant to find one        stop     endif   read the zaxis     if zvarid NE  1 THEN ncdf_varget  cdfid  zvarid  zaxis   ENDELSE    IF keyword_set zindex  AND keyword_set zaxis  THEN        zaxis   keyword_set start1    findgen n_elements zaxis      mask   IF NOT  keyword_set maskname  OR keyword_set useasmask  AND keyword_set romsgrid  THEN maskname    mask_rho    CASE 1 OF     keyword_set maskname :BEGIN       mskid    where namevar EQ strlowcase maskname 0        if mskid NE  1 THEN BEGIN          mskinq   ncdf_varinq cdfid  mskid    is the mask variable containing the record dimension          withrcd    where mskinq dim EQ inside recdim 0          IF withrcd NE  1 THEN BEGIN   in order to read only the first record             we need to get the size of each dimension           count   replicate 1L  mskinq ndims            FOR d   0  mskinq ndims  1 DO BEGIN             IF d NE withrcd THEN BEGIN               ncdf_diminq  cdfid  mskinq dim d  name  size               count d    size             ENDIF           ENDFOR   read the variable for the first record                     ncdf_varget  cdfid  mskid  tmask  count   count         ENDIF ELSE ncdf_varget  cdfid  mskid  tmask   check if we need to applay add_offset and scale factor                  FOR a   0  mskinq natts 1 DO BEGIN           attname   ncdf_attname cdfid  mskid  a                 CASE strlowcase attname  OF              add_offset :ncdf_attget  cdfid  mskid  attname  add_offset              scale_factor :ncdf_attget  cdfid  mskid  attname  scale_factor             ELSE:           ENDCASE         ENDFOR         IF n_elements scale_factor  NE 0 THEN tmask   tmask scale_factor         IF n_elements add_offset  NE 0 THEN tmask   tmask add_offset         if keyword_set invmask  then tmask   1 tmask         tmask   byte round tmask        ENDIF ELSE tmask    1            END       keyword_set useasmask :BEGIN       mskid    where namevar EQ strlowcase useasmask 0        if mskid NE  1 THEN BEGIN          mskinq   ncdf_varinq cdfid  mskid    is the mask variable containing the record dimension          withrcd    where mskinq dim EQ inside recdim 0          IF withrcd NE  1 THEN BEGIN   in order to read only the first record             we need to get the size of each dimension           count   replicate 1L  mskinq ndims            FOR d   0  mskinq ndims  1 DO BEGIN             IF d NE withrcd THEN BEGIN               ncdf_diminq  cdfid  mskinq dim d  name  size               count d    size             ENDIF           ENDFOR   read the variable for the first record                  ncdf_varget  cdfid  mskid  tmask  count   count         ENDIF ELSE ncdf_varget  cdfid  mskid  tmask   check if we need to applay add_offset and scale factor                FOR a   0  mskinq natts 1 DO BEGIN           attname   ncdf_attname cdfid  mskid  a                 CASE strlowcase attname  OF              add_offset :ncdf_attget  cdfid  mskid  attname  add_offset              scale_factor :ncdf_attget  cdfid  mskid  attname  scale_factor              missing_value :IF n_elements missing_value  EQ 0 THEN                  ncdf_attget  cdfid  mskid  attname  missing_value             ELSE:           ENDCASE         ENDFOR         IF n_elements scale_factor  NE 0 THEN tmask   tmask scale_factor         IF n_elements add_offset  NE 0 THEN tmask   tmask add_offset         IF n_elements missing_value  NE 0 THEN BEGIN   we have to take care of the float accuracy           CASE 1 OF             missing_value GE 1 e6:tmask   tmask LT  missing_value 10              missing_value LE  1 e6:tmask   tmask GT  missing_value 10              abs missing_value  LE 1 e 6:tmask   abs tmask  GT 1 e 6             ELSE:tmask   tmask NE missing_value           ENDCASE           if keyword_set invmask  then tmask   1 tmask         ENDIF ELSE BEGIN           tmask   finite tmask            IF min tmask  EQ 1 THEN BEGIN             print   missing or nan values not found              tmask    1                     ENDIF         ENDELSE       ENDIF ELSE tmask    1            END       ELSE:tmask     1   ENDCASE     ncdf_close  cdfid     compute the grid   if NOT keyword_set zaxis  then BEGIN      computegrid  xaxis   xaxis  yaxis   yaxis                      mask   tmask  onearth   1b   keyword_set xyindex  ROMSH   romsh  _EXTRA   ex    ENDIF ELSE BEGIN      computegrid  xaxis   xaxis  yaxis   yaxis  zaxis   zaxis                      mask   tmask  onearth   1b   keyword_set xyindex  ROMSH   romsh  _EXTRA   ex   ENDELSE    IF n_elements time  EQ 0 THEN time   0   jpt   n_elements time        return end"); 
     228a[226] = new Array("./ToBeReviewed/INIT/initncdfxxx.html", "initncdfxxx.pro", "", ""); 
     229a[227] = new Array("./ToBeReviewed/INIT/initorca05.html", "initorca05.pro", "", ""); 
     230a[228] = new Array("./ToBeReviewed/INIT/initorca2.html", "initorca2.pro", "", ""); 
     231a[229] = new Array("./ToBeReviewed/INIT/initorca2full.html", "initorca2full.pro", "", ""); 
     232a[230] = new Array("./ToBeReviewed/LECTURE/GRIB/bit2int.html", "bit2int.pro", "", "     file_comments        categories        param BITIN        keyword CHECKNEG        returns        uses        restrictions        examples        history        version    Id: bit2int pro 163 2006 08 29 12:59:46Z navarro        todo   seb     FUNCTION bit2int  bitin  checkneg   checkneg     compile_opt idl2  strictarrsubs      res   0L   n   n_elements bitin 1   IF keyword_set checkneg  THEN BEGIN     IF bitin 0  EQ 1 THEN BEGIN       bitin 0    0       neg    1     ENDIF ELSE neg   1   ENDIF ELSE neg   1   FOR i   0  n  DO res   res 2L i bitin n i     RETURN  neg res END"); 
     233a[231] = new Array("./ToBeReviewed/LECTURE/GRIB/read_grib.html", "read_grib.pro", "", "     file_comments           categories          param VARCODE         param DATE1  in optional    Date of the beginning  yyyymmdd if TIMESTEP is not activate       param DATE2  in optional    Last date  Optional  if not specified date2 date1       keyword FILE type array or string    A single filename or an array of filenames to be retrieved        returns          restrictions          examples        history         version    Id: read_grib pro 163 2006 08 29 12:59:46Z navarro     function read_grib  varcode  date1  date2  file   file     compile_opt idl2  strictarrsubs    common   http: www wmo ch web www WDM Guides Guide binary 2 html      gribfile       d1fes2 raid6 SINTEX common ES10 d 00 atm 5d ES10 d 00_5d_00911201_00911230 grib    IF keyword_set file  THEN gribfile   isafile file   file   iodir   iodir  ELSE gribfile    d1fes2 raid6 SINTEX common ES10 atm 5d ZOOM_IND ES10_5d_00210101_00301230 grib      openr  num  gribfile   GET_LUN  ERROR   err   SWAP_IF_LITTLE_ENDIAN   if err ne 0 then begin     print   err_string     return   1   ENDIF     recstart   scan_grib_recstart num         messize   scan_grib_messize num  recstart       addoff   lonarr n_elements recstart       FOR i   1L  n_elements recstart 1 DO          addoff i    recstart i recstart i 1 messize i 1           nbits   scan_grib_nbits num  recstart       print nbits uniq nbits sort nbits      codes   scan_grib_code num  recstart    nbcodes    uniq codes  sort codes      dates   scan_grib_date num  recstart    nbdates   uniq dates  sort dates      goodvar   where codes EQ varcode    IF goodvar 0  EQ  1 THEN BEGIN     print   no var code  strtrim varcode  2  in the file      return   1   ENDIF     recstart   recstart goodvar    dates   dates goodvar      gooddate   where dates GE date1 AND dates LE date2    IF gooddate 0  EQ  1 THEN BEGIN     print   no dates between  strtrim date1  2  and  strtrim date2  2  in the file      return   1   ENDIF   recstart   recstart gooddate    dates   dates gooddate    key_caltype    360d    time   date2jul dates    jpt   n_elements time    IF jpt EQ 1 THEN vardate   strtrim dates 0  2  ELSE vardate   strtrim dates 0  2     strtrim dates jpt 1  2     varname   vargrid    T     varexp    varunit     grib_pds   read_grib_pds num  recstart 0    grid parameters   IF grib_pds gdsnotomitted THEN BEGIN     grib_gds   read_grib_gds num  recstart 0    min  max of the latitude with a precision of 10 2     lat1   fix 100 grib_gds la1 100      lat2   fix 100 grib_gds la2 100        CASE grib_gds gridtype OF   Latitude Longitude Grid       0:BEGIN          computegrid  grib_gds lo1  grib_gds la1  grib_gds di   grib_gds dj               grib_gds ni  grib_gds nj        END   Gaussian Latitude Longitude Grid       4:BEGIN   find the latitude axis         CASE 1 OF   n48           grib_gds n EQ 48 AND lat1 EQ 88 57 AND lat2 EQ  88 57:              gphit   n48gaussian    n80            grib_gds n EQ 80 AND lat1 EQ 89 14 AND lat2 EQ  89 14:               gphit   n80gaussian    n128            grib_gds n EQ 128 AND lat1 EQ 89 46 AND lat2 EQ  89 46:               gphit   n128gaussian    n160            grib_gds n EQ 160 AND lat1 EQ 89 57 AND lat2 EQ  89 57:               gphit   n160gaussian    n256            grib_gds n EQ 256 AND lat1 EQ 89 73 AND lat2 EQ  89 73:               gphit   n256gaussian    part of one of the gaussian grids defined above            ELSE:BEGIN              cnt   0              REPEAT BEGIN                CASE cnt OF                  0:gphit   n48gaussian                   1:gphit   n80gaussian                   2:gphit   n128gaussian                   3:gphit   n160gaussian                   4:gphit   n256gaussian                   5:BEGIN                    gphit   n80gaussian                     lat1   29 71                    lat2    19 62                  END                  ELSE:stop                ENDCASE                nfix   fix gphit 100 100                 nlat1    where nfix EQ lat1 0                 nlat2    where nfix EQ lat2 0                 IF nlat1 NE  1 AND  nlat2 NE  1                    AND nlat2 nlat1 1 EQ grib_gds nj                    THEN gphit   gphit nlat1:nlat2  ELSE gphit    1                cnt   cnt 1              ENDREP UNTIL gphit 0  NE  1            END          ENDCASE          computegrid  grib_gds lo1   1  grib_gds di   1  grib_gds ni   1  YAXIS   gphit        END   Mercator Projection Grid        gridtype EQ 1:   Gnomonic Projection Grid        gridtype EQ 2:   Lambert Conformal  secant or tangent  conical or bipolar  normal or   oblique  Projection Grid          gridtype EQ 3:   Polar Stereographic Projection Grid        gridtype EQ 5:   Oblique Lambert conformal  secant or tangent  conical or bipolar    projection        gridtype EQ 13:   Spherical Harmonic Coefficients        gridtype EQ 50:   Space view perspective or orthographic grid        gridtype EQ 90:   reserved   see Manual on Codes        ELSE:      ENDCASE    ENDIF ELSE stop      res   fltarr grib_gds ni  grib_gds nj  n_elements recstart     FOR i   0  n_elements recstart 1 DO BEGIN      res    i    read_grib_bds num  recstart i  grib_gds ni  grib_gds nj     ENDFOR      free_lun  num      IF keyword_set key_yreverse  THEN res   reverse res  2      RETURN  res  END"); 
     234a[232] = new Array("./ToBeReviewed/LECTURE/GRIB/read_grib_bds.html", "read_grib_bds.pro", "", "     file_comments           categories          param NUM         param RECSTART        param NI          param NJ          returns          restrictions          examples        history         version    Id: read_grib_bds pro 157 2006 08 21 09:01:50Z navarro     FUNCTION read_grib_bds  num  recstart  ni  nj       compile_opt idl2  strictarrsubs     offset   recstart 8   a   assoc num  bytarr 1   nozero  offset 1    sizepds   bit2int binary a 1  binary a 2  binary a 3    flag   binary a 8    gdsnotomitted   flag 0    bmsnotomitted   flag 1    ddd    bit2int binary a 27  binary a 28   checkneg      offset   offset sizepds     IF gdsnotomitted THEN BEGIN     a   assoc num  bytarr 1   nozero  offset 1      sizedds   bit2int binary a 1  binary a 2  binary a 3      offset   offset sizedds   ENDIF     IF bmsnotomitted THEN BEGIN     a   assoc num  bytarr 1   nozero  offset 1      sizebms   bit2int binary a 1  binary a 2  binary a 3      offset   offset sizebms   ENDIF     a   assoc num  bytarr 1   nozero  offset 1      sizebds   bit2int binary a 1  binary a 2  binary a 3                                       flags   binary a 4    BIT VALUE MEANING   1   0     Grid point data       1     Spherical Harmonic Coefficients   2   0     Simple packing        1     Second order  Complex  Packing    3   0     Original data were floating point values       1     Original data were integer values   4   0     No additional flags at octet 14       1     Octet 14 contains flag bits 5   12   5         Reserved  set to 0    6   0     Single datum at each grid point       1     Matrix of values at each grid point   7   0     No secondary bit maps       1     Secondary bit maps present   8   0     Second order values have constant width       1     Second order values have different widths   9 12      Reserved  set to 0      eee   bit2int binary a 5  binary a 6   checkneg      aaa   bit2int binary a 7   checkneg    bbb   bit2int binary a 8  binary a 9  binary a 10    IF aaa LT 0 THEN rrr    2 24    bbb   16 aaa 64      ELSE rrr   2 24    bbb   16 aaa 64      nbits    a 11 0    CASE 1 OF     flags 0  EQ 0 AND flags 1  EQ 0:BEGIN       CASE nbits OF         8 :a   assoc num  bytarr ni  nj   nozero  offset 1 12          16:a   assoc num  uintarr ni  nj   nozero  offset 1 12          32:a   assoc num  ulonarr ni  nj   nozero  offset 1 12          64:a   assoc num  ulon64arr ni  nj   nozero  offset 1 12          ELSE:       ENDCASE     END   ENDCASE    RETURN   rrr a 0 2 eee 10 ddd  END"); 
     235a[233] = new Array("./ToBeReviewed/LECTURE/GRIB/read_grib_end.html", "read_grib_end.pro", "", "     file_comments           categories          param NUM         param OFFSET         returns          restrictions          examples        history         version    Id: read_grib_end pro 157 2006 08 21 09:01:50Z navarro     PRO read_grib_end   num  offset     compile_opt idl2  strictarrsubs      a   assoc num  bytarr 4   nozero  offset    endcode   string a 0    IF endcode NE  7777  THEN stop    RETURN END"); 
     236a[234] = new Array("./ToBeReviewed/LECTURE/GRIB/read_grib_gds.html", "read_grib_gds.pro", "", "     file_comments           categories          param NUM         param RECSTART         returns          restrictions          examples        history         version    Id: read_grib_gds pro 157 2006 08 21 09:01:50Z navarro     FUNCTION read_grib_gds  num  recstart       compile_opt idl2  strictarrsubs     offset   recstart 8   a   assoc num  bytarr 1   nozero  offset 1    sizepds   bit2int binary a 1  binary a 2  binary a 3      offset   recstart 8 sizepds   a   assoc num  bytarr 1   nozero  offset 1      sizegds   bit2int binary a 1  binary a 2  binary a 3       nv    a 4 0    pv    a 5 0      gridtype    a 6 0      CASE 1 OF   Latitude Longitude Grid   Gaussian Latitude Longitude Grid     gridtype EQ 0 OR gridtype EQ 4:BEGIN       ni   bit2int binary a 7  binary a 8        nj   bit2int binary a 9  binary a 10          la1   bit2int binary a 11  binary a 12  binary a 13   checkneg 1000        lo1   bit2int binary a 14  binary a 15  binary a 16   checkneg 1000          resflags   binary a 17          la2   bit2int binary a 18  binary a 19  binary a 20   checkneg 1000        lo2   bit2int binary a 21  binary a 22  binary a 23   checkneg 1000          di   bit2int binary a 24  binary a 25 1000        IF di EQ 65 5350 THEN di    1         IF gridtype EQ 0 THEN BEGIN         dj   bit2int binary a 26  binary a 27 1000          IF dj EQ 65 5350 THEN dj    1       ENDIF ELSE BEGIN         n   bit2int binary a 26  binary a 27        ENDELSE         scanflags   binary a 28          res    size:sizegds  gridtype:gridtype  ni:ni  nj:nj  la1:la1  la2:la2  lo1:lo1  lo2:lo2  di:di        IF gridtype EQ 0 THEN res   create_struct res   dj  dj          ELSE res   create_struct res   n  n        RETURN  res     END   Mercator Projection Grid     gridtype EQ 1:   Gnomonic Projection Grid     gridtype EQ 2:   Lambert Conformal  secant or tangent  conical or bipolar  normal or   oblique  Projection Grid       gridtype EQ 3:   Polar Stereographic Projection Grid     gridtype EQ 5:   Oblique Lambert conformal  secant or tangent  conical or bipolar    projection     gridtype EQ 13:   Spherical Harmonic Coefficients     gridtype EQ 50:   Space view perspective or orthographic grid     gridtype EQ 90:   reserved   see Manual on Codes     ELSE:   ENDCASE     RETURN   1 END"); 
     237a[235] = new Array("./ToBeReviewed/LECTURE/GRIB/read_grib_is.html", "read_grib_is.pro", "", "     file_comments           categories          param NUM         param OFFSET         returns          restrictions          examples        history         version    Id: read_grib_is pro 157 2006 08 21 09:01:50Z navarro     FUNCTION read_grib_is  num  offset     compile_opt idl2  strictarrsubs      infofile   fstat num     a   assoc num  bytarr 4   nozero  offset    typefile   string a 0    IF  typefile NE  GRIB  THEN stop        a   assoc num  bytarr 1   nozero  offset 4    sizerecord   bit2int binary a 0  binary a 1  binary a 2        a   assoc num  bytarr 1   nozero  offset 7    gribed   a 0    IF gribed NE 1 THEN stop     RETURN   typefile:typefile  sizerecord:sizerecord  gribed:gribed 0  END"); 
     238a[236] = new Array("./ToBeReviewed/LECTURE/GRIB/read_grib_pds.html", "read_grib_pds.pro", "", "     file_comments           categories          param NUM         param RECSTART         returns          restrictions          examples        history         version    Id: read_grib_pds pro 157 2006 08 21 09:01:50Z navarro     FUNCTION read_grib_pds  num  recstart       compile_opt idl2  strictarrsubs     offset   recstart 8   a   assoc num  bytarr 1   nozero  offset 1      sizepds   bit2int binary a 1  binary a 2  binary a 3        paramtableversion    a 4 0        centerid    a 5 0        procid    a 6 0        gridid    a 7 0      flag   binary a 8    gdsnotomitted   flag 0    bmsnotomitted   flag 1      paramunitid    a 9 0      levtype    a 10 0      levalue1    a 11 0    levalue2    a 12 0      year    a 13 0    month    a 14 0    day    a 15 0    hour    a 16 0    minute    a 17 0    timeunit    a 18 0    p1    a 19 0    p2    a 20 0    timerange    a 21 0    n1    a 22 0    n2    a 23 0    nbmiss    a 24 0    century    a 25 0      subcenterid    a 26 0      d    bit2int binary a 27  binary a 28   checkneg        RETURN   size:sizepds  gdsnotomitted:gdsnotomitted  bmsnotomitted:bmsnotomitted  d:d  END"); 
     239a[237] = new Array("./ToBeReviewed/LECTURE/GRIB/read_gribtable.html", "read_gribtable.pro", "", "     file_comments   Read contents of a gribtable  Gribtables are located   in the gribtables subdirectory of HIPHOP      categories        param TABLENAME  in required    The full path name of a gribtable file      keyword PARMTABL        keyword CENTER        keyword SUBCENTER        keyword TABLNUM        returns        uses        restrictions        examples   tablename ectab_128       history   Dominik Brunner  Apr 2000      version    Id: read_gribtable pro 163 2006 08 29 12:59:46Z navarro     PRO read_gribtable tablename parmtabl parmtabl center center                     subcenter subcenter tablnum tablnum     compile_opt idl2  strictarrsubs      ON_ERROR 2  parmtabl StrArr 3 256  center 1 subcenter 1 tablnum 1   First Subscript  3  is  name description units    Second   256  is defined size of a parameter table  IF n_elements tablename  EQ 0 THEN return  openr lun tablename get  line    read first line which  eventually  contains information   about center  subcenter and table number readf lun line parts STR_SEP line :  IF n_elements parts  GT 3 THEN BEGIN   center fix parts 1    subcenter fix parts 2    tablnum fix parts 3  ENDIF ELSE BEGIN   IF n_elements parts  GE 3 THEN parmtabl 0:1 fix parts 0 parts 1:2      ELSE IF n_elements parts  EQ 2 THEN parmtabl 0 fix parts 0 parts 1  ENDELSE    loop over remaining lines REPEAT BEGIN   readf lun line   parts STR_SEP line :    IF n_elements parts  GE 3 THEN parmtabl 0:1 fix parts 0 parts 1:2      ELSE IF n_elements parts  EQ 2 THEN parmtabl 0 fix parts 0 parts 1  END UNTIL EOF lun   free_lun lun    fill up missing varible names index WHERE parmtabl 0  EQ  count  IF count GT 0 THEN parmtabl 0 index var strcompress index rem   END"); 
     240a[238] = new Array("./ToBeReviewed/LECTURE/GRIB/scan_grib_code.html", "scan_grib_code.pro", "", "     file_comments           categories          param NUM         param RECSTART         returns          restrictions          examples        history         version    Id: scan_grib_code pro 157 2006 08 21 09:01:50Z navarro     FUNCTION scan_grib_code  num  recstart       compile_opt idl2  strictarrsubs     nrec    n_elements recstart    codes   bytarr nrec      FOR i   0L nrec 1 DO BEGIN     offset   recstart i      a   assoc num  bytarr 1   nozero  offset 8 9 1      codes i    a 0    ENDFOR     RETURN  codes END"); 
     241a[239] = new Array("./ToBeReviewed/LECTURE/GRIB/scan_grib_date.html", "scan_grib_date.pro", "", "     file_comments           categories          param NUM         param RECSTART         returns          restrictions          examples        history         version    Id: scan_grib_date pro 157 2006 08 21 09:01:50Z navarro     FUNCTION scan_grib_date  num  recstart       compile_opt idl2  strictarrsubs     nrec    n_elements recstart    dates   lonarr nrec      FOR i   0L nrec 1 DO BEGIN     offset   recstart i      a   assoc num  bytarr 1   nozero  offset 8 1      dates i     a 13 100L a 25 1 10000L a 14 100L a 15    ENDFOR     RETURN  dates END"); 
     242a[240] = new Array("./ToBeReviewed/LECTURE/GRIB/scan_grib_messize.html", "scan_grib_messize.pro", "", "     file_comments           categories          param NUM         param RECSTART         returns          restrictions          examples        history         version    Id: scan_grib_messize pro 157 2006 08 21 09:01:50Z navarro     FUNCTION scan_grib_messize  num  recstart       compile_opt idl2  strictarrsubs     nrec    n_elements recstart    messize   lonarr nrec      FOR i   0L nrec 1 DO BEGIN     offset   recstart i      a   assoc num  bytarr 1   nozero  offset 4      messize i    bit2int binary a 0  binary a 1  binary a 2    ENDFOR     RETURN  messize END"); 
     243a[241] = new Array("./ToBeReviewed/LECTURE/GRIB/scan_grib_nbits.html", "scan_grib_nbits.pro", "", "     file_comments           categories          param NUM         param RECSTART         returns          restrictions          examples        history         version    Id: scan_grib_nbits pro 157 2006 08 21 09:01:50Z navarro     FUNCTION scan_grib_nbits  num  recstart     compile_opt idl2  strictarrsubs        nrec    n_elements recstart    nbits   bytarr nrec      FOR i   0L  nrec 1 DO BEGIN     offset   recstart i 8     a   assoc num  bytarr 1   nozero  offset 1      sizepds   bit2int binary a 1  binary a 2  binary a 3      flag   binary a 8      gdsnotomitted   flag 0      bmsnotomitted   flag 1      ddd    bit2int binary a 27  binary a 28   checkneg        offset   offset sizepds       IF gdsnotomitted THEN BEGIN       a   assoc num  bytarr 1   nozero  offset 1        sizedds   bit2int binary a 1  binary a 2  binary a 3        offset   offset sizedds     ENDIF       IF bmsnotomitted THEN BEGIN       a   assoc num  bytarr 1   nozero  offset 1        sizebms   bit2int binary a 1  binary a 2  binary a 3        offset   offset sizebms     ENDIF      a   assoc num  bytarr 1   nozero  offset 1      nbits i    a 11     ENDFOR     RETURN  nbits END"); 
     244a[242] = new Array("./ToBeReviewed/LECTURE/GRIB/scan_grib_recstart.html", "scan_grib_recstart.pro", "", "     file_comments           categories          param NUM          returns          restrictions          examples        history         version    Id: scan_grib_recstart pro 157 2006 08 21 09:01:50Z navarro     FUNCTION scan_grib_recstart  num     compile_opt idl2  strictarrsubs      infofile   fstat num    minimum size of one record   minisize   8L 28L 4L 4L   maxoffset   infofile size minisize     start   0L   offset   0L   previousrecsize   0L    WHILE offset LT maxoffset DO BEGIN   Every record must begin with  GRIB    However  their is no rule to define the space between 2 records     1  we try space   previousrecsize MOD 8  because for echam outputs    the total size of the records is rounded to modulo 8     addoff   8    previousrecsize MOD 8      offset   offset addoff     IF offset GE maxoffset THEN GOTO  out     a   assoc num  bytarr 4   nozero  offset      typefile   string a 0      IF typefile NE  GRIB  THEN offset   offset addoff    2  we try space   previousrecsize MOD 120  because for ecmwf   outputs  the total size of the records is rounded to modulo 120     addoff   120    previousrecsize MOD 120      IF typefile NE  GRIB  THEN BEGIN       offset   offset addoff       IF offset GE maxoffset THEN GOTO  out       a   assoc num  bytarr 4   nozero  offset        typefile   string a 0        IF typefile NE  GRIB  THEN offset   offset addoff     ENDIF    3  we try space   0     IF typefile NE  GRIB  THEN BEGIN       a   assoc num  bytarr 4   nozero  offset        typefile   string a 0      ENDIF    4  we try any value for space     IF typefile NE  GRIB  THEN BEGIN       REPEAT BEGIN         CASE 1 OF           array_equal a 0 3    byte G    :offset   offset 3           array_equal a 0 2:3  byte GR   :offset   offset 2           array_equal a 0 1:3  byte GRI :offset   offset 1           else:offset   offset 4         ENDCASE         IF offset GE maxoffset THEN GOTO  out         a   assoc num  bytarr 4   nozero  offset          typefile   string a 0        ENDREP UNTIL typefile EQ  GRIB      ENDIF       start    start  offset            a   assoc num  bytarr 1   nozero  offset 4      recsize   bit2int binary a 0  binary a 1  binary a 2      offset   offset recsize     previousrecsize   recsize     ENDWHILE   out:     RETURN  start 1:n_elements start 1   END"); 
     245a[243] = new Array("./ToBeReviewed/LECTURE/binary.html", "binary.pro", "", "     file_comments   Returns the binary representation of a number of any numerical type        param NUMBER  in required    scalar or array of numbers  any numerical type        Returns   Byte array with binary representation of numbers        Examples     Binary representation of 11b:       IDL  print  binary 11b        0 0 0 0 1 0 1 1     Binary representation of pi  x86: Little endian IEEE representation :       IDL  print  format z9 8 5x 4 1x 8i1  long pi 0  binary pi         40490fdb      01000000 01001001 00001111 11011011  x86 Linux         0fdb4149      00001111 11011011 01000001 01001001  Alpha OpenVMS        IDL  print  format 8 1x 8i0  binary dpi         01000000 00001001 00100001 11111011 01010100 01000100 00101101 00011000     Some first tests before type double was added:       print  format 2a6 4x 2z9 8 4x 8z3 2             version arch   version os  long dpi 0 2  byte dpi 0 8          x86 linux     54442d18 400921fb     18 2d 44 54 fb 21 09 40       sparc sunos     400921fb 54442d18     40 09 21 fb 54 44 2d 18       alpha   vms     0fda4149 68c0a221     49 41 da 0f 21 a2 c0 68        Beginning with IDL 5 1  Alpha VMS uses IEEE representation as well        history:      19 Dec 1997  Originally a news posting by David Fanning                           Re: bits from bytes       20 Dec 1997   Complete  rewrite: eliminate loops       22 Dec 1997  Bit shift instead of exponentiation  return byte        array  handle input arrays         Think about double and complex types       22 Sep 1998  Complete rewrite: reduce every numerical type to        single bytes  Check that big and little endian machines        return exactly the same results  if IEEE       7 May 2003     Added newish data types  unsigned and long64   BT      version    Id: binary pro 142 2006 07 21 12:47:49Z navarro       function binary  number     compile_opt idl2  strictarrsubs     s   size number    type   s s 0    1    n_no   s s 0    2    Numerical types:  will have to be completed if IDL adds double long      1: byte              1 byte unsigned integer    2: integer           2 byte   signed integer    3: long              4 byte   signed integer    4: floating point    4 byte  single precision    5: double precision  8 byte  double precision    6: complex         2x4 byte  single precision    9: double complex  2x8 byte  double precision    12: uInt       2 byte  unsigned integer    13: uLong      4 byte  unsigned integer    14: Long64        8 byte  signed integer    15: uLong64       8 byte  unsigned integer    Non numerical types:   0: undefined  7: string  8: structure  10: pointer  11: object reference    nbyt    0  1  2  4  4  8  8  0  0  16  0  0    number of bytes per type   code    0  1  2  3  4  5  6  7  8  9  10  11  12  13  14  15    nbyt    0  1  2  4  4  8  8  0  0  16  0  0   2   4   8   8    ntyp   nbyt type    if ntyp eq 0 then message   Invalid argument  must be numerical type    bits    128  64  32  16   8   4   2   1      ishft 1b  7 indgen 8    For correct array handling and byte comparison   number  and  bits  require   same dimensions   numvalue and bitvalue   bitvalue    bits  intarr ntyp    intarr n_no    little_endian    byte 1  0  1 0    In case of complex type and little endian machine  swap the two float values   before the complete second dimension is reversed at returning    if  type eq 6 or type eq 9  and little_endian then     type complex     numvalue   reform byte number  0  1  ntyp 2  2  n_no                         intarr 8     1 0    8  ntyp  n_no      else numvalue    byte number  0  1  ntyp  n_no intarr 8        On little endian machines  the second dimension of the return value must   be reversed    if little_endian AND type NE 1 then       return  reverse numvalue and bitvalue  ne 0  2  else       return           numvalue and bitvalue  ne 0 end"); 
     246a[244] = new Array("./ToBeReviewed/LECTURE/changeread.html", "changeread.pro", "", "     file_comments        categories        param NEWREAD        returns        uses        restrictions        examples        history        version    Id: changeread pro 163 2006 08 29 12:59:46Z navarro        todo seb     FUNCTION changeread  newread       compile_opt idl2  strictarrsubs    common       newread must be two structures      if size newread   type  NE 8 then return  0     we compare the two structure which caracterise the read        case 1 of       ccreadparameters funclec_name NE newread funclec_name:       ccreadparameters jpidta NE newread jpidta:       ccreadparameters jpjdta NE newread jpjdta:       ccreadparameters jpkdta NE newread jpkdta:       ccreadparameters ixmindta NE newread ixmindta:       ccreadparameters ixmaxdta NE newread ixmaxdta:       ccreadparameters iymindta NE newread iymindta:       ccreadparameters iymaxdta NE newread iymaxdta:       ccreadparameters izmindta NE newread izmindta:       ccreadparameters izmaxdta NE newread izmaxdta:       ELSE:return  0    endcase     update the common paramaters      ccreadparameters   newread    jpidta   newread jpidta    jpjdta   newread jpjdta    jpkdta   newread jpkdta    ixmindta   newread ixmindta    ixmaxdta   newread ixmaxdta    iymindta   newread iymindta    iymaxdta   newread iymaxdta    izmindta   newread izmindta    izmaxdta   newread izmaxdta      return  1 end"); 
     247a[245] = new Array("./ToBeReviewed/LECTURE/inverse_binary.html", "inverse_binary.pro", "", "       file_comments   Inverse function of the binary pro function   given a   input array of 0 1  return its corresponding byte integer long   representation      categories      param BINNUMB  in required    Must be a binary type array containing only 0 and 1    According to binary pro outputs  binnum array must have the   following dimensions values:  8  t  d1  d2    t gives the output type: t   1   byte                               t   2   integer                               t   4   long           d1  d2  are the output dimensions        returns    A byte integer long array with  d1  d2  dimensions      restrictions   The binary number can represent only byte integer long      examples         IDL  a indgen 5        IDL  b binary a        IDL  help  b       B               BYTE        Array 8  2  5        IDL  print  b          0   0   0   0   0   0   0   0          0   0   0   0   0   0   0   0                 0   0   0   0   0   0   0   0          0   0   0   0   0   0   0   1                 0   0   0   0   0   0   0   0          0   0   0   0   0   0   1   0                 0   0   0   0   0   0   0   0          0   0   0   0   0   0   1   1                 0   0   0   0   0   0   0   0          0   0   0   0   0   1   0   0       IDL  help  inverse_binary b            INT         Array 5        IDL  print  inverse_binary b               0       1       2       3       4      history        Sebastien Masson  smasson jamstec go jp         July 2004      version    Id: inverse_binary pro 157 2006 08 21 09:01:50Z navarro           FUNCTION inverse_binary  binnumb       compile_opt idl2  strictarrsubs     s   size binnumb   dimensions    IF n_elements s  EQ 1 THEN numbofbit   8 ELSE numbofbit   8 s 1    nvalues   n_elements binnumb numbofbit   bn   reform long binnumb  numbofbit  nvalues      CASE numbofbit OF     8:res   byte total temporary bn 2b reverse indgen numbofbit replicate 1b  nvalues  1  1      16:res   fix total temporary bn 2 reverse indgen numbofbit replicate 1  nvalues  1  1   double      32:res   long total temporary bn 2L reverse indgen numbofbit replicate 1L  nvalues  1  1   double    ENDCASE     CASE n_elements s  OF     1:res   res 0      2:res   res 0      3:     ELSE:res   reform res  s 2:n_elements s 1   over    ENDCASE     return  res end"); 
     248a[246] = new Array("./ToBeReviewed/LECTURE/litchamp.html", "litchamp.pro", "", "             file_comments   Allows to read an array or a structure corresponding to a field    If we have in input:       an array  litchamp send back the array       a structure  litchamp send back the first element of the structure      which must be the field in an array      Litchamp profit of this to look other elements of the structure et     update if needed global variables which refer to the field:     vargrid  varname  varunit  vardate  varexp   valmask et time       categories   Graphics      param STRUCT  in required type array or struct type array or structure     If STRUCT is a structure  it must follow following rules:           the first element is the array containing the field            other elements are strings containing informations on the field except          for the one about the date  This one can be either a string to designate          a particular date  ex:  August 1999  or a vector of julian days  of IDL           corresponding  to the calendar to be associated with the field if it is a          temporal series            the order of elements  except the first  has not any importance             the other elements  except the first  are optional            they are recognize by the first letter of their names:               g  to update vargrid               u  to update varunit               e  to update varexp               d  to update vardate               n  to update varname               m  to update valmask      keyword GRID   We activate this keyword if we want litchamp to send back the variable    associated with the element of the structure starting by  g  if it exist    and   if it does not       keyword UNIT   We activate this keyword if we want litchamp to send back the variable    associated with the element of the structure starting by  u  if it exist    and   if it does not       keyword EXP   We activate this keyword if we want litchamp to send back the variable    associated with the element of the structure starting by  u  if it exist    and   if it does not       keyword DATE   We activate this keyword if we want litchamp to send back the variable    associated with the element of the structure starting by  d  if it exist    and   if it does not       keyword NAME   We activate this keyword if we want litchamp to send back the variable    associated with the element of the structure starting by  n  if it exist    and   if it does not       keyword LEVEL   We activate this keyword if we want litchamp to send back the variable    associated with the element of the structure starting by  l  if it exist    and  1 if it does not        keyword MASK   We activate this keyword if we want litchamp to send back the variable    associated with the element of the structure starting by  m  if it exist    and  1 if it does not       returns   It is the array containing the field       uses   common pro      restrictions   Update if needed global variables vargrid    varname  varunit  vardate  varexp  valmask and time       examples             IDL  print  vargrid    varname    varunit    vardate    varexp           T        0         IDL  help  litchamp a:indgen 5  u: C  name: toto              INT         Array 5       IDL  print  vargrid    varname    varunit    vardate    varexp            T  toto  C  0         IDL  help  litchamp a:indgen 5  da: 1999              INT         Array 5       IDL  print  vargrid    varname    varunit    vardate    varexp           T  toto  C  1999            history   Sebastien Masson  smasson lodyc jussieu fr                          28 5 1999      version    Id: litchamp pro 163 2006 08 29 12:59:46Z navarro             FUNCTION litchamp  struct  GRID   grid  NAME   name  UNIT   unit  EXP   exp  DATE   date                        LEVEL   level  MASK   mask     compile_opt idl2  strictarrsubs    common     if size struct   type  ne 8 then BEGIN   so contour is not a structure        if keyword_set grid  then return          if keyword_set name  then return          if keyword_set unit  then return          if keyword_set exp   then return          if keyword_set date   then return          if keyword_set level   then return   1       if keyword_set mask   then return   1       return   struct               ENDIF        IF n_tags struct  EQ 1 then BEGIN   The structure has only one element        if keyword_set grid  then return          if keyword_set name  then return          if keyword_set unit  then return          if keyword_set exp   then return          if keyword_set date   then return          if keyword_set level   then return   1       if keyword_set mask   then return   1       return   struct 0     ENDIF        nomelements   tag_names struct     for i   1  n_tags struct 1 do begin       case strlowcase strmid nomelements i  0  1  of           g :BEGIN             if keyword_set grid  then return  strupcase struct i              vargrid   strupcase struct i           END           n :BEGIN             if keyword_set name  then return  struct i              varname   struct i           END           u :BEGIN             if keyword_set unit  then return  struct i              varunit   struct i           END           e :BEGIN             if keyword_set exp  then return  struct i              varexp   struct i           END           m :BEGIN             if keyword_set mask  then return  struct i              valmask   struct i           END           d :BEGIN              if size struct i type  EQ 7 THEN BEGIN                 vardate   struct i              ENDIF ELSE BEGIN                time   struct i                 jpt   n_elements time                 if jpt EQ 1 then vardate    strtrim vairdate struct i 0  2                 ELSE vardate    strtrim vairdate struct i 0  2                         strtrim vairdate struct i jpt 1  2               ENDELSE             if keyword_set date  then return  vardate          END           h :BEGIN             computehopegrid   struct i xaxis   struct i yaxis                   struct i zaxis   struct i linetype                  FIRSTS    struct i firsts  LASTS    struct i lasts                  FORTHEMASK   struct 0  pttype    struct i pttype          END          ELSE:BEGIN              ras   report Le nom  nomelements i  ne correspont a aucun element reconnu de la structure  cf  IDL  xhelp   litchamp           end       endcase    endfor      if keyword_set grid  then return       if keyword_set name  then return       if keyword_set unit  then return       if keyword_set exp   then return       if keyword_set date   then return       if keyword_set level   then return   1    if keyword_set mask   then return   1     return   struct 0  end"); 
     249a[247] = new Array("./ToBeReviewed/LECTURE/ncdf_lec.html", "ncdf_lec.pro", "", "             file_comments   Give informations on a file net cdf and allows to recuperate    variables which are write in       categories   Reading      param NOM  in required    Name of a file net cdf situated in the directory stipulated by iodir       keyword ATT    global  or at the name of a variable  Allows to see all attributes    joined at a variable      keyword DIM   Give the list of dimensions       keyword VAR         1   var: Gove the list of dimensions          2  var nom de variable : in this case the function send back the variable       keyword IODIR   String containing the directory containing the file to be read      keyword _EXTRA   Allows to pass keywords defined by IDL to functions NETCDF   particularly OFFSET    and COUNT in ncdf_varget       returns    1  except if var nom de variable  then the function send back the variable       restrictions   Variables s names of the program are similar to these used by the IDL manual     scientific data formats       history   Sebastien Masson  smasson lodyc jussieu fr                          4 1 98      version    Id: ncdf_lec pro 163 2006 08 29 12:59:46Z navarro         function ncdf_lec nom ATT att DIM dim VAR var  IODIR   iodir  _extra   ex     compile_opt idl2  strictarrsubs      res    1      if NOT keyword_set IODIR  then iodir        if not keyword_set att  or keyword_set dim  or keyword_set var  then BEGIN       att   1       dim   1       var   1        commande ncdump  c  iodir nom        spawn commande        goto fini    endif     opening of the file name       cdfid ncdf_open iodir nom      Wht does the file contain       wathinside ncdf_inquire cdfid      print in the file   iodir nom  there are:     if keyword_set dim  then begin        print nombre de dimensions:  strtrim wathinside ndims 1        print numero de la dimension dont la valeur est infini:  strtrim wathinside recdim 1     endif    if keyword_set var  then       if size var   type  NE 7 then print nombre de variables  : strtrim wathinside nvars 1     if keyword_set att  then begin       if strlowcase att  ne  global  then goto nonglobal       print nombre de attributs globaux : strtrim wathinside ngatts 1     endif     Global attributes      if keyword_set att  then begin       print          print ATTRIBUTS GLOBAUX        for attiq 0 wathinside ngatts 1 do begin          name ncdf_attname cdfid attiq global   attribute s name          ncdf_attget cdfid name value global  attribute s value          print name :  string value        endfor    endif nonglobal:     Display of different dimensions       if keyword_set dim  then begin        print          print DIMENSIONS     endif    nomdim    strarr wathinside ndims     tailledim lonarr wathinside ndims     for dimiq 0 wathinside ndims 1 do begin       ncdf_diminq cdfid dimiq name value   dimension s name and value       nomdim dimiq name       tailledim dimiq value       if keyword_set dim  then begin           print dimension numero  strtrim dimiq 1  nom:  nomdim dimiq                valeur:    strtrim tailledim dimiq 1        endif    endfor     Display of different variables         if keyword_set att  or keyword_set var  then begin    var s value  string or 1    help  var  output   nature    if  strpos nature   STRING 0  NE  1 then nature    string  ELSE nature    1    If we just have to read the variable     if nature EQ  string  then begin       ncdf_varget  cdfid  var  res  _extra   ex       GOTO  sortie    ENDIF    If it is to have pieces of information     if not keyword_set att  then att rien        print          for varid 0 wathinside nvars 1 do begin          varcontent ncdf_varinq cdfid varid    What does variable contain           if strlowcase att  eq strlowcase varcontent name  or keyword_set var              then begin             print variable numero:  strtrim varid 1  nom: varcontent name                  type:   varcontent datatype  dimensions: nomdim varcontent dim              if strlowcase att  eq strlowcase varcontent name  then begin                for attiq 0 varcontent natts 1 do begin                   name ncdf_attname cdfid varid attiq                    ncdf_attget cdfid varid name value                   print       strtrim attiq   name :  strtrim string value 1                 endfor                goto  sortie             endif          endif       endfor    endif   sortie:    ncdf_close cdfid     fini:     return  res end"); 
     250a[248] = new Array("./ToBeReviewed/LECTURE/read_ftp.html", "read_ftp.pro", "", "     file_comments           categories          param U         param CMD        param RES          keyword OUT        keyword COUNT   Upon return  the number of elements in the result set     This is only important when the result set is the empty   set  in which case COUNT is set to zero        restrictions          examples        history         version    Id: read_ftp pro 157 2006 08 21 09:01:50Z navarro      pro ftp_post  u  cmd  res  out out  count count   compile_opt idl2   if  cmd ne   then begin     printf  u  cmd  format a      comment out the following line to disable debug info     print   cmd   endif   if  size out type  eq 0  then out 2      catch  err   if  err ne 0  then return   line    count 0   while arg_present res  do begin     readf  u  line     if count eq 0 then res line else res res line      count count 1     comment out the following line to disable debug info     print    READ_FTP   ftp: ftp rsinc com pub gzip README GZIP  DATA data     IDL  help  data            DATA            BYTE        Array 2134      IDL  print  string data                README file: Research Systems Anonymous FTP site  ftp rsinc com                      pub directory                     gzip directory                 2  Retrieve some files from podaac jpl nasa gov and store the files      in the current working directory:        IDL  files   string lindgen 10 50 format MGB370 3 3d gz       IDL  READ_FTP   podaac jpl nasa gov  files          IDL         pub sea_surface_height topex_poseidon mgdrb data MGB_370   FILE      IDL  spawn dir MGB log_output       Volume in drive C is Local Disk       Volume Serial Number is 34CE 24DF         Directory of C: test test0307        07 28 2003  11:58a             362 167 MGB370 050 gz      07 28 2003  11:58a             333 005 MGB370 051 gz      07 28 2003  11:58a             310 287 MGB370 052 gz      07 28 2003  11:58a             358 771 MGB370 053 gz      07 28 2003  11:59a             387 282 MGB370 054 gz      07 28 2003  11:59a             361 633 MGB370 055 gz      07 28 2003  11:59a             383 075 MGB370 056 gz      07 28 2003  11:59a             365 844 MGB370 057 gz      07 28 2003  11:59a             383 918 MGB370 058 gz      07 28 2003  12:00p             372 712 MGB370 059 gz                    10 File s       3 618 694 bytes      These compressed files can cosequently be opened with OPENR and the      COMPRESSED keyword       history      version    Id: read_ftp pro 157 2006 08 21 09:01:50Z navarro        todo    seb: que fait on de  syntax  au debut du header    give examples with date in year 0  should not exists but may happen       pro read_ftp  site  files  dir  port  data data  file file  user user                  pass pass  ptr ptr   compile_opt idl2   if n_elements port  eq 0 then port ftp    if n_elements files  eq 0 then begin     if strcmp site ftp: 6  then host strmid site 6  else host site     pos strpos host      dir strmid host pos      host strmid host 0 pos      pos strpos dir reverse_search      files strmid dir pos 1      dir strmid dir 0 pos    endif else host site   if  size user type  eq 0  then user anonymous    if  size pass type  eq 0  then pass test test com                                      socket  u  host  port  connect_timeout 5  read_timeout 5   get_lun   ftp_post  u    res   ftp_post  u   USER  user  res  out 3      ftp_post  u   PASS  pass  res   ftp_post  u   TYPE I  res   if  size dir type  ne 0  then ftp_post  u   CWD  dir  res   if keyword_set file  or arg_present data  then begin     bufsize 512     buffer bytarr bufsize      n n_elements files      if arg_present data  then dat ptrarr n      for i 0  n 1 do begin       ftp_post  u   SIZE  files i  res  out 213         sz long64 strmid res n_elements res 1 4        if arg_present data  then dat i ptr_new bytarr sz        ftp_post  u   PASV  res       ftp_parse_pasv  res  host  port       ftp_post  u   RETR  files i  res  out 1          socket  v  host  port  connect_timeout 5  read_timeout 5              get_lun   rawio       tc 0ll       if keyword_set file  then openw w files i get_lun       while  tc lt sz  do begin         if  sz tc lt bufsize  then begin           bufsize sz tc           buffer bytarr bufsize          endif         readu  v  buffer  transfer_count dtc         if arg_present data  then               dat i tc dtc eq bufsize buffer:buffer 0:dtc 1          if keyword_set file  then              writeu w dtc eq bufsize buffer:buffer 0:dtc 1          tc tc dtc       endwhile       free_lun  v       if keyword_set file  then free_lun  w       ftp_post  u    res     endfor     if arg_present data  then begin        if  n gt 1 or keyword_set ptr  then data dat          else data temporary dat 0       endif   endif   ftp_post  u   QUIT  res   free_lun  u end"); 
     251a[249] = new Array("./ToBeReviewed/LECTURE/read_ncdf.html", "read_ncdf.pro", "", "     file_comments   Reading function for the file net_cdf    This program is less universal than ncdf_lec  it appeal to declared    variables in common pro  but it is very easier to be used  It considerate   the declaration of the different zooms which have been defined    ixminmesh premierx  the declaration of the variable key_shift    To put it in a nutshell  the result of read_ncdf can be directly used in plt    This is also this program which is used by default in our reading widgets         categories   Reading       param NAME  in required type string    It define the field to be read       param BEGINNING  in required    Relative with the time axis    These can be      2 date of the  type yyyymmdd and in this case  we select dates     which are included between these two dates       2 indexes which define between which and which time step we have     to extract the temporal dimension       param ENDING   in required    Relative with the time axis    See BEGINNING        param COMPATIBILITY  in optional    Useless  defined for compatibility        keyword BOXZOOM    Contain the boxzoom on which we have to do the reading        keyword CALLITSELF  default 0 type scalar: 0 or 1    For ROMS outputs  Use by read_ncdf itself to access auxilliary data  h and zeta        keyword FILENAME  required type string    It contains he file s name        keyword INIT  default 0 type scalar: 0 or 1    To call automatically initncdf  filename and thus   redefine all the grid parameters       keyword GRID    UTVWF  to specify the type of grid  Default is  1    based on the name of the file if the file ends by   GRID _ TUVFW NC  not case sensible  or  2  T if case  1    is not found        keyword TIMESTEP  default 0 type scalar: 0 or 1    Specify that BEGINNING and ENDING refer to indexes of the time axis and not to dates      keyword TOUT  default 0 type scalar: 0 or 1    We activate it if we want to read the file on the whole domain without    considerate the sub domain defined by the boxzoom or    lon1 lon2 lat1 lat2 vert1 vert2        keyword NOSTRUCT  default 0 type scalar: 0 or 1    We activate it if we do not want that read_ncdf send back a structure    but only the array referring to the field        keyword TIMEVAR  type string    It define the name of the variable that   contains the time axis  This keyword can be useful if there   is no unlimited dimension or if the time axis selected by default    the first 1D array with unlimited dimension  is not the good one       keyword ZETAFILENAME  default FILENAME type string    For ROMS outputs  The filename of the file where zeta vriable should be read      keyword ZETAZERO  default 0 type scalar: 0 or 1    For ROMS outputs  To define zeta to 0  instead of reading it      keyword _EXTRA   Used to pass your keywords       returns   Structure readable by litchamp pro or an array if NOSTRUCT is activated        uses   common pro       restrictions   The field must have a temporal dimension        history   Sebastien Masson  smasson lodyc jussieu fr                         15 10 1999        version    Id: read_ncdf pro 199 2006 12 13 07:47:14Z smasson             FUNCTION read_ncdf  name  beginning  ending  compatibility  BOXZOOM   boxzoom  FILENAME   filename                         PARENTIN   parentin  TIMESTEP   timestep  TIMEVAR   timevar                         TOUT   tout  NOSTRUCT   nostruct  CONT_NOFILL   CONT_NOFILL  INIT   init                         GRID   grid  FBASE2TBASE   fbase2tbase  CALLITSELF   callitself                         ZETAFILENAME   zetafilename  ZETAZERO   zetazero                         _EXTRA   ex       compile_opt idl2  strictarrsubs    cm_4mesh  cm_4data  cm_4cal   IF NOT keyword_set key_forgetold  THEN BEGIN  updatenew  updatekwd   ENDIF     we find the filename       print filename    is parent a valid widget     if keyword_set parentin  then BEGIN     parent   long parentin      parent   parent widget_info parent   managed    ENDIF   filename   isafile filename   filename  IODIRECTORY   iodir  _EXTRA   ex      Opening of the name file     if size filename   type  NE 7 then       return  report read_ncdf cancelled    IF  version OS_FAMILY EQ  unix  THEN spawn   file  filename     dev null    cdfid   ncdf_open filename    contient   ncdf_inquire cdfid      we check if the variable name exists in the file      if ncdf_varid cdfid  name  EQ  1 then BEGIN     ncdf_close  cdfid     return  report variable  name   C not found in the file  filename    ENDIF   varcontient   ncdf_varinq cdfid  name    IF varcontient ndims LT 2 THEN return  report read_ncdf cannot read scalar or 1D data    look for the dimension names   dimnames   strarr varcontient ndims    FOR i   0  varcontient ndims 1 DO BEGIN     ncdf_diminq  cdfid  varcontient dim i  tmp  dimsize     dimnames i    tmp   ENDFOR      shall we redefine the grid parameters     if keyword_set init  THEN initncdf  filename  _extra   ex     check the time axis and the debut and ending dates     if n_elements beginning  EQ 0 then begin     beginning   0     timestep   1   endif   if keyword_set timestep  then begin     firsttps   beginning 0      if n_elements ending  NE 0 then lasttps   ending 0  ELSE lasttps   firsttps     jpt   lasttps firsttps 1     IF NOT keyword_set callitself  then time   julday 1  1  1    lindgen jpt    ENDIF ELSE BEGIN     if keyword_set parent  then BEGIN       widget_control  parent  get_uvalue   top_uvalue       filelist   extractatt top_uvalue   filelist        IF filelist 0  EQ  many   THEN filelist   filename       currentfile    where filelist EQ filename 0        time    extractatt top_uvalue   fileparameters currentfile time_counter       date1   date2jul beginning 0        if n_elements ending  NE 0 then date2   date2jul ending 0  ELSE date2   date1       firsttps   where time EQ date1    firsttps   firsttps 0        lasttps   where time EQ date2    lasttps   lasttps 0      ENDIF ELSE BEGIN       IF keyword_set timevar  THEN BEGIN          timeid   ncdf_varid cdfid  timevar          IF timeid EQ  1 THEN BEGIN           ncdf_close  cdfid           return  report the file  filename  as no variable     timevar                                 C Use the TIMESTEP keyword          endif         timecontient   ncdf_varinq cdfid  timeid          contient recdim   timecontient dim 0        ENDIF ELSE BEGIN    we find the infinite dimension         timedim   contient recdim         if timedim EQ  1 then BEGIN           ncdf_close  cdfid           return  report the file  filename  as no infinite dimension   C Use TIMESTEP or TIMEVAR keyword          endif   we find the FIRST time axis               timeid   0         repeat BEGIN         As long as we have not find a variable having only one dimension: the infinite one           timecontient   ncdf_varinq cdfid  timeid    that the variable contain            timeid   timeid 1         endrep until  n_elements timecontient dim  EQ 1                         AND timecontient dim 0  EQ contient recdim              OR timeid EQ contient nvars 1           if timeid EQ contient nvars 1 then BEGIN           ncdf_close  cdfid           return  report the file  filename  as no time axis variable   C Use the TIMESTEP keyword          endif         timeid   timeid 1       ENDELSE    we must found the time origin of the julian calendar used in the   time axis     does the attribut units an dcalendar exist for the variable time axis        if timecontient natts EQ 0 then BEGIN         ncdf_close  cdfid         return  report the variable  timecontient name  has no attribut C Use the TIMESTEP keyword or add the attribut  units  to the variable        endif       attnames   strarr timecontient natts        for attiq   0  timecontient natts 1 do attnames attiq    ncdf_attname cdfid  timeid  attiq        if  where attnames EQ  units 0  EQ  1 then BEGIN         ncdf_close  cdfid         return  report Attribut  units  not found for the variable  timecontient name   C Use the TIMESTEP keyword        ENDIF     now we try to find the attribut called calendar    the attribute  calendar  exists    If no  we suppose that the calendar is gregorian calendar         if  where attnames EQ  calendar 0  NE  1 then BEGIN         ncdf_attget  cdfid  timeid   calendar  value         value   string value          CASE value OF            noleap :key_caltype    noleap             360d :key_caltype    360d             greg :IF n_elements key_caltype  EQ 0 THEN key_caltype    greg            ELSE:BEGIN              notused   report Unknown calendar:  value  we use greg calendar               key_caltype    greg            END         ENDCASE       ENDIF ELSE BEGIN          notused   report Unknown calendar  we use  key_caltype  calendar           IF n_elements key_caltype  EQ 0 THEN key_caltype    greg        ENDELSE     now we take acre of units attribut       ncdf_attget  cdfid  timeid   units  value     time_counter:units    seconds since 0001 01 01 00:00:00      time_counter:units    hours since 0001 01 01 00:00:00      time_counter:units    days since 1979 01 01 00:00:00      time_counter:units    months since 1979 01 01 00:00:00      time_counter:units    years since 1979 01 01 00:00:00        we decript the  units  attribut to find the time origin       value   strtrim strcompress string value  2        mots   str_sep value            unite   mots 0        unite   strlowcase unite        IF strpos unite   s  strlen unite 1  NE  1 THEN unite   strmid unite  0  strlen unite 1        IF strpos unite   julian_  NE  1 THEN unite   strmid unite  7        IF unite NE  second  AND unite NE  hour  AND unite NE  day             AND unite NE  month  AND unite NE  year  THEN BEGIN         ncdf_close  cdfid         return  report time units does not start with seconds hours days months years        ENDIF       IF stregex value      since  0 9 1 4 0 9 1 2 0 9 1 2   boolean  EQ 0 THEN BEGIN         ncdf_close  cdfid         return  report attribut units of time has not the good format:     since  0 9 1 4 0 9 1 2 0 9 1 2        ENDIF       depart   str_sep mots 2          ncdf_varget  cdfid  timeid  time       time   double time        case unite of          second :time   julday depart 1  depart 2  depart 0 time 86400 d          hour :time   julday depart 1  depart 2  depart 0 time 24 d          day :time   julday depart 1  depart 2  depart 0 time          month :BEGIN            if total fix time  NE time  NE 0 then     we switch to days with 30d m             time   julday depart 1  depart 2  depart 0 round time 30                ELSE for t   0  n_elements time 1 DO               time t    julday depart 1 time t  depart 2  depart 0          END          year :BEGIN           if total fix time  NE time  NE 0 then     we switch to days with 365d y             time   julday depart 1  depart 2  depart 0 round time 365                ELSE for t   0  n_elements time 1 do               time t    julday depart 1  depart 2  depart 0 time t          END         ELSE:BEGIN           ncdf_close  cdfid           return  report The  units  attribute of the time axis must be something like:  C  seconds since 0001 01 01    C  days since 1979 01 01    C  months since 1979 01 01    C  years since 1979 01 01           end       ENDCASE       date1   date2jul beginning 0        if n_elements ending  NE 0 then date2   date2jul ending 0  ELSE date2   date1       time   double time        firsttps   where time GE date1    firsttps   firsttps 0        if firsttps EQ  1 THEN BEGIN         ncdf_close  cdfid         return  report date 1:  strtrim jul2date date1  1  is not found in the time axis        ENDIF       lasttps   where time LE date2        if lasttps 0  EQ  1 THEN BEGIN         ncdf_close  cdfid         return  report the time axis has no date before date 2:  strtrim jul2date date2  1        endif       lasttps   lasttps n_elements lasttps 1        if lasttps LT firsttps then BEGIN         ncdf_close  cdfid         return  report the time axis has no dates between date1 and  date 2:  strtrim jul2date date1  1   strtrim jul2date date2  1        endif     ENDELSE     time   time firsttps:lasttps      jpt   lasttps firsttps 1   ENDELSE     Name of the grid on which the field refer to      IF keyword_set grid  THEN vargrid   strupcase grid  ELSE BEGIN     vargrid    T                  default definition     IF finite glamu 0  EQ 1 THEN BEGIN   are we in one of the case corresponding to ROMS conventions        CASE 1 OF         dimnames 2  long key_stride    key_shift   long testvar var   key_shift      IF n_elements key_yreverse  EQ 0 THEN key_yreverse   0   IF keyword_set key_yreverse  THEN BEGIN     tmp   jpj 1 firsty     firsty   jpj 1 lasty     lasty   tmp   ENDIF     IF n_elements key_zreverse  EQ 0 THEN key_zreverse   0   IF keyword_set key_zreverse  THEN BEGIN     tmp   jpk 1 firstz     firstz   jpk 1 lastz     lastz   tmp   ENDIF     IF keyword_set fbase2tbase  THEN BEGIN     case strupcase vargrid  of        U :BEGIN         IF NOT keyword_set key_periodic  THEN BEGIN           firstx   firstx 1           lastx   lastx 1         ENDIF       END        V :BEGIN         firsty   firsty 1         lasty   lasty 1       END        F :BEGIN         firsty   firsty 1         lasty   lasty 1         IF NOT keyword_set key_periodic  THEN BEGIN           firstx   firstx 1           lastx   lastx 1         ENDIF       END       ELSE:     endcase   ENDIF     IF keyword_set fbase2tbase  AND keyword_set key_periodic        AND  strupcase vargrid  EQ  U  OR strupcase vargrid  EQ  F  THEN key_shift    key_shift 1        read_ncdf_varget         IF keyword_set fbase2tbase  AND keyword_set key_periodic        AND  strupcase vargrid  EQ  U  OR strupcase vargrid  EQ  F  THEN key_shift    key_shift 1     We define global variable joined with the variable      varname   IF NOT keyword_set callitself  THEN varname   name   varunit   if varcontient natts NE 0 then begin     attnames   strarr varcontient natts      for attiq   0  varcontient natts 1 do attnames attiq    ncdf_attname cdfid  name  attiq      lowattnames   strlowcase attnames        found    where lowattnames EQ  units 0      IF found NE  1 then ncdf_attget  cdfid  name  attnames found  value ELSE value         IF NOT keyword_set callitself  THEN varunit   strtrim string value  2        found    where lowattnames EQ  add_offset 0      if found NE  1 then ncdf_attget  cdfid  name  attnames found  add_offset ELSE add_offset   0        found    where lowattnames EQ  scale_factor 0      if found NE  1 then ncdf_attget  cdfid  name  attnames found  scale_factor ELSE scale_factor   1        missing_value    no      found    where lowattnames EQ  _fillvalue 0      if found NE  1 then ncdf_attget  cdfid  name  attnames found  missing_value     found    where lowattnames EQ  missing_value 0      if found NE  1 then ncdf_attget  cdfid  name  attnames found  missing_value     ENDIF ELSE BEGIN      IF NOT keyword_set callitself  THEN varunit         add_offset   0      scale_factor   1      missing_value    no    ENDELSE   vardate   We make a legible date in function of the specified language    year   long beginning 0 10000   month    long beginning 0 100  MOD 100   day    long beginning 0  MOD 100    vardate   string format    C CMoA  31 month 1   strtrim day  1   strtrim year  1    varexp   file_basename filename     we apply reverse   if keyword_set key_yreverse  AND ny NE 1 THEN        res   reverse reform res  nx  ny  nz  jpt   overwrite   2    if keyword_set key_zreverse  AND nz NE 1        AND varcontient ndims    where varcontient dim EQ contient recdim 0  NE  1  EQ 3 THEN           res   reverse reform res  nx  ny  nz  jpt   overwrite   3    We apply the value valmask on land points    if NOT keyword_set cont_nofill  then begin     valmask   1e20     case 1 of       varcontient ndims eq 2:BEGIN  xy array         mask   mask    0          earth   where mask EQ 0        END       varcontient ndims eq 3 AND  where varcontient dim EQ contient recdim 0  EQ  1:BEGIN  xyz array         earth   where mask EQ 0        END       varcontient ndims eq 3 AND  where varcontient dim EQ contient recdim 0  NE  1:BEGIN  xyt array         mask   mask    0          earth   where mask EQ 0          if earth 0  NE  1 then BEGIN           earth   earth replicate 1  jpt replicate nx ny  n_elements earth lindgen jpt          END       END       varcontient ndims eq 4:BEGIN  xyzt array         earth   where mask EQ 0          if earth 0  NE  1 then BEGIN           earth   earth replicate 1  jpt replicate nx ny nz  n_elements earth lindgen jpt          END       END     endcase   ENDIF ELSE earth    1   we look for  missing_value   IF size missing_value   type  NE 7 then BEGIN     IF size missing_value   type  EQ 1 THEN BEGIN        IF isnumber string missing_value  tmp  EQ 1 THEN missing_value   tmp     ENDIF       if missing_value NE valmask then begin     if abs missing_value  LT 1e6 then missing   where res EQ missing_value        ELSE missing   where abs res  gt abs missing_value 10       ENDIF ELSE missing    1   ENDIF ELSE missing    1   we apply add_offset  scale_factor and missing_value    if scale_factor NE 1 then res   temporary res scale_factor   if add_offset NE 0 then res   temporary res add_offset   if missing 0  NE  1 then res temporary missing     values f_nan   if earth 0  NE  1 then res temporary earth    1 e20     if it is roms outputs  we need to get additionals infos    IF NOT keyword_set callitself  THEN BEGIN     IF strmid dimnames 0  0  3  EQ  xi_  AND strmid dimnames 1  0  4  EQ  eta_  THEN BEGIN       ncdf_attget  cdfid   theta_s  theta_s   global       ncdf_attget  cdfid   theta_b  theta_b   global       ncdf_attget  cdfid   hc  hc   global   look for all variables names       allvarnames   strarr contient nvars        FOR i   0  contient nvars 1 DO BEGIN         tmp   ncdf_varinq  cdfid  i          allvarnames i    tmp name       ENDFOR       CASE 1 OF         keyword_set zetazero :zeta   fltarr nx  ny  jpt          keyword_set zetafilename :               zeta   read_ncdf zeta  firsttps  lasttps  FILENAME   zetafilename                                  TIMESTEP   NOSTRUCT  CONT_NOFILL   CONT_NOFILL                                 GRID   vargrid   CALLITSELF  _EXTRA   ex           where allvarnames EQ  zeta 0  NE  1:              zeta   read_ncdf zeta  firsttps  lasttps  FILENAME   filename                                  TIMESTEP   NOSTRUCT  CONT_NOFILL   CONT_NOFILL                                 GRID   vargrid   CALLITSELF  _EXTRA   ex          ELSE:return  report The variable zeta was not found in the file  please use the keyword ZETAFILENAME to specify the name of a file containing zeta or use  keyword ZETAZERO to define zeta to 0        ENDCASE       romszinfos    h:romszinfos h  zeta:temporary zeta  theta_s:theta_s  theta_b:theta_b  hc:hc      ENDIF ELSE romszinfos    h: 1  zeta: 1  theta_s: 1  theta_b: 1  hc: 1    ENDIF     ncdf_close  cdfid    IF keyword_set savedbox  THEN restoreboxparam   boxparam4rdncdf dat     IF keyword_set nostruct  THEN return  res   IF keyword_set key_forgetold  THEN BEGIN     return   arr:temporary res  grid:vargrid  unit:varunit  experiment:varexp  name:varname     ENDIF ELSE BEGIN      return   tab:temporary res  grille:vargrid  unite:varunit  experience:varexp  nom:varname    ENDELSE  END      "); 
     252a[250] = new Array("./ToBeReviewed/LECTURE/read_ncdf_varget.html", "read_ncdf_varget.pro", "", ""); 
     253a[251] = new Array("./ToBeReviewed/LECTURE/xncdf_lec.html", "xncdf_lec.pro", "", "             file_comments   Reading of a Net Cdf file with widgets         categories    Widget      param NAME  in optional type string     It give the name of the file to be opened  If NAME    does not contain the separating character of directories   under    unix for example  the file will be looked for in the current directory       keyword IODIR  type string    It contains the directory where to go look for the file to be read    If NAME does not contain the separating character of directories   under    unix for example  the file will be called iodir nom_fichier       keyword COUNT  type vector    An optional vector containing the counts to be used in   reading Value  COUNT is a 1 based vector with an element for   each dimension of the data to be written The default matches   the size of the variable so that all data is written out       keyword GROUP   The widget ID of the widget that calls XNCDF_LEC  When   this ID is specified  a death of the caller results in a death   of XNCDF_LEC        keyword OFFSET  type vector default 0  0    An optional vector containing the starting position   for the read  The default start position is  0  0         keyword SHIFT  type vector default 0  0    A vector of integers  specifying for each dimension how much we have to shift it     By default  it is  0 0  See the function shift for more explanations  BEWARE     the shift is done on the biggest array before a possible reduction determined    by OFFSET and COUNT  On the other hand  it is done after the possible extraction    created by the STRIDE       keyword STRIDE  type vector default 1  1    An optional vector containing the strides  or sampling   intervals  between accessed values of the netCDF variable  The   default stride vector is that for a contiguous read   1  1       returns    2 different cases:         1  None attribute has been selected  In this case  res is the array we         wanted to read          2  Some attributes has been selected  In this case  res is a structure          whose the first element having the name of the variable is the values          array and the other arguments are the select arguments       uses   wididbase  infovariable  resultat  motcle      examples   help  xncdf_lec       history   Sebastien Masson  smasson lodyc jussieu fr                         24 8 1999      version    Id: xncdf_lec pro 163 2006 08 29 12:59:46Z navarro           FUNCTION xncdf_lec  name  ATT   att  COUNT   count  GROUP   group  OFFSET   offset  IODIR   iodir  SHIFT   shift   STRIDE   stride  VAR   var     compile_opt idl2  strictarrsubs      COMMON wididbase  base    COMMON infovariable  cdfid  listename  contient  nomdim  tailledim  varid  varcontient    COMMON resultat  res    COMMON motcle  mcatt  mccount  mcoffset  mciodir  mcshift  mcstride  mcvar     Trick for using keywords  we pass by variables declarated in a common       res    1    if keyword_set att  then mcatt   att ELSE mcatt   0    if keyword_set count  then mccount  count  ELSE mccount   0    if keyword_set offset  then mcoffset   offset ELSE mcoffset   0    if keyword_set shift  then mcshift   shift ELSE mcshift   0    if keyword_set stride  then mcstride   stride ELSE mcstride   0    if keyword_set var  then mcvar   var ELSE mcvar   0     choice of the file s name     What type of machine is used    thisOS   strupcase strmid version os_family  0  3     CASE thisOS of        MAC :sep    :         WIN :sep           ELSE: sep        ENDCASE   If IODIR is not defined  we initialize it at the current directory    if NOT keyword_set iodir  then cd   current   iodir    mciodir   iodir   We complete IODIR with a separating character if needed     IF rstrpos iodir  sep  NE strlen iodir 1 THEN iodir   iodir sep     if n_elements name  EQ 0 then BEGIN   If NAME is not defined  we find one thanks to the program dialog_pickfile        name   dialog_pickfile filter   iodir nc         if name 0  EQ   then return    1  If we do not have find anything  we go out   We complete NAME by IODIR if NAME does not contain any directory separating character     ENDIF ELSE if strpos name  sep  EQ  1 then name   iodir name    test   findfile name            Does the name looked for correspond to a file     while test 0  EQ   OR n_elements test  GT 1 do BEGIN   We look for one as long as it correspond to nothing        test   test 0        name   dialog_pickfile filter   iodir nc        if name EQ   then return    1       test   findfile name     endwhile     Opening of the file name       cdfid ncdf_open name     contient ncdf_inquire cdfid      What does this file contain      Opening of the base window as columns    if n_elements group  EQ 0 then base   widget_base column  title Fichier:  name   align_left       ELSE base   widget_base column  title Fichier:  name   align_left  GROUP_LEADER   group    Opening of base sub windows       base 1 title having the file s name      base1   widget_base base   column   align_center     rien   widget_label base1  value    Net Cdf filename   align_center      rien   widget_text base1  value   name   align_center  uvalue 1   editable   File s name we can change    rien   widget_label base1  value         We jump a line     base 2 General informations on the file      base2   widget_base base   column      Informations on global attributes      if contient ngatts NE  1 then begin       rien   widget_label base2  value    Nombre de attributs globaux:   strtrim contient ngatts 1   align_left        for attiq 0 contient ngatts 1 do BEGIN   Loop on  the number of global attributes          name ncdf_attname cdfid attiq global   Attribute s name          ncdf_attget cdfid name value global  Attribute s value          rien   widget_text base2  value   name :  strtrim string value 1  xsize   60   scroll   wrap   align_right        endfor       rien   widget_label base2  value          endif      Informations on dimensions      rien   widget_label base2  value    Nombre de dimensions:  strtrim contient ndims 1   align_left     if contient recdim NE  1 then begin    Loop on  the number of global attributes       ncdf_diminq cdfid contient recdim name value   Name and value of the dimension       rien   widget_label base2  value    name de la dimension infinie:  name   align_left     endif      nomdim    strarr contient ndims    Vector containing dimensions s name    tailledim lonarr contient ndims    Vector containing dimensions s value    for dimiq 0 contient ndims 1 do begin   Loop on the number of dimensions       ncdf_diminq cdfid dimiq name value   Name and value of the dimension       nomdim dimiq name       tailledim dimiq value       rien   widget_label base2  value   name  de taille:  strtrim value 1   align_right     ENDFOR    rien   widget_label base2  value         We jump a line     base 3 choice of the variable      base3   widget_base base   column     rien   widget_label base3  value    Nombre de variables:  strtrim contient nvars 1   align_left     base31   widget_base base3   row   align_center   Creation of a listename containing the name of all file s variables    listename   strarr contient nvars     for varid 0 contient nvars 1 do begin       varcontient ncdf_varinq cdfid varid    that the variable contain       listename varid    varcontient name    endfor    rien  widget_label base31  value    variable    Creation of a button with a pop up menu     base311 widget_droplist base31 value listename  uvalue 2     rien   widget_label base3  value         base 4 button done      base4   widget_base base   row     base42 widget_button base4 value done  uvalue 3   align_right   Execution of the base window and of sub windows    widget_control base realize      xmanager xncdf_lec base          return  res end     La lecture de ce programme se fait de bas en haut:     1  xncdf_lec       2  xncdf_lec_event           3  wid_var                wid_var_event        file_comments   Procedure called by xmanager when we press on a button of a second widget created by wid_var        param EVENT  in required    A structure caracterizing the type of event which arrive to a widget number1 2      uses   wididbase resultat infovariable indicewid motcle       version    Id: xncdf_lec pro 163 2006 08 29 12:59:46Z navarro           pro wid_var_event   event     compile_opt idl2  strictarrsubs      COMMON wididbase  base    COMMON resultat  res    COMMON infovariable  cdfid  listename  contient  nomdim  tailledim  varid  varcontient    COMMON indicewid_var  widbase1  widbase2111  widbase212  widbase213  selectatt    COMMON motcle  mcatt  mccount  mcoffset  mciodir  mcshift  mcstride  mcvar     What is the type of event     widget_control  event id  get_uvalue uval    tailledimvar   tailledim varcontient dim     if n_elements uval  EQ 0 then return   case on the type of event     case uval OF       1:BEGIN                     We change values in the array   We check that values put in the array are not totally false           widget_control  widbase1  get_value   table   Is it the good type of argument    If the type is wrong  we automatically change it by default values           if event x GT  size table 1  then return          if event y GT  size table 2  then return          if size table event x  event y   type  GE 6             OR size table event x  event y   type  EQ 0 then BEGIN              if event x EQ 1 then                widget_control  widbase1  use_table_select    1  event y 1  event y                   set_value   tailledimvar event y                ELSE widget_control  widbase1                  use_table_select    event x  event y  event x  event y  set_value   0          endif   Argument with a wrong name value           table   fix table           case event x of             0:BEGIN               We touched the offset                if table 0  event y  LT 0 then BEGIN                   table 0  event y    0                   widget_control  widbase1  use_table_select    0  event y  0  event y                         set_value   0               endif   If it exceed the dimension of the array  we put it at the max and the cont at 1                 if table 0  event y  GT tailledimvar event y table 3  event y  then begin                   widget_control  widbase1  use_table_select    0  event y 1  event y                         set_value    tailledimvar event y table 3  event y  1                ENDIF ELSE BEGIN   If  with the new offset  the cont is too big  we reduce it  until it goes well                    if table 1  event y  GT                       tailledimvar event y table 3  event y table 0  event y  then begin                      widget_control  widbase1  use_table_select    1  event y  1  event y                            set_value    tailledimvar event y table 3  event y table 0  event y                    endif                ENDELSE             END             1:BEGIN              We touched the cont                 if table 1  event y  LT 1 then BEGIN                   table 1  event y    1                   widget_control  widbase1  use_table_select    1  event y  1  event y                         set_value   1                endif   If it is too big  we reduce it  until it goes well                 if table 1  event y  GT                    tailledimvar event y table 3  event y table 0  event y  then BEGIN                   widget_control  widbase1  use_table_select    1  event y  1  event y                         set_value    tailledimvar event y table 3  event y table 0  event y                 endif             END             2:BEGIN              We touched the shift                 widget_control  widbase1  use_table_select    2  event y  2  event y                      set_value   table 2  event y  MOD  tailledimvar event y table 3  event y              END             3:BEGIN              We touched the stride                 if table 3  event y  LT 1 then BEGIN                   table 3  event y    1                   widget_control  widbase1  use_table_select    3  event y  3  event y                         set_value   1                endif                if table 3  event y  EQ 0 then    It must not be null                  widget_control  widbase1  use_table_select    3  event y  3  event y                      set_value   1   It must not be too big                 if table 3  event y  GT tailledimvar event y  then                   widget_control  widbase1  use_table_select    0  event y 3  event y                      set_value    0  1  0  tailledimvar event y                   ELSE BEGIN                   if table 1  event y  GT                       tailledimvar event y table 3  event y table 0  event y  then begin                      widget_control  widbase1  use_table_select    1  event y  1  event y                            set_value    tailledimvar event y table 3  event y table 0  event y                    endif                ENDELSE             END             ELSE:          endcase       END       2111:BEGIN                 We touched buttons yes no   We update the vector selectatt at 0 or 1 for the concerned attribute  number event id           selectatt where widbase2111 EQ event id    event select       end       31:BEGIN                   We pressed on  get           widget_control  widbase1  get_value   table          table   fix table           mcshift   where table 2    NE 0           mcoffset   table 0             mccount   table 1             mcstride   table 3             if mcshift 0  NE  1 then BEGIN   There are some shifts    We read the wholeness of dimensions for which ones there is a shift              mcoffset mcshift    0             mccount mcshift    tailledimvar mcshift    We do not activate stride when there is no need because it makes write something weird on the screen              if total mcstride  EQ n_elements mcstride  then                ncdf_varget  cdfid  varid  res  OFFSET   mcoffset  COUNT   mccount               ELSE                ncdf_varget  cdfid  varid  res  OFFSET   mcoffset  COUNT   mccount  STRIDE   mcstride   To do the shift             mcshift   table 2                mcoffset   table 0                mccount   table 1      We define the command allowing to do a shift              commande    res shift res              for dim   0  varcontient ndims 1 do commande   commande string table 2 dim              commande   commande              rien   execute commande    We redefine the command allowing to cut dimensions which has not been cut yet  ones we shift              commande    res res    initialization of the command             for dim   0  varcontient ndims 1 do BEGIN                 if mcshift dim  EQ 0 then commande   commande                   ELSE commande commande string mcoffset dim : string mccount dim mcoffset dim 1              ENDFOR             commande   strmid commande  0  strlen commande 1              rien   execute commande    Case without shift  we read directly the good part of the array           ENDIF ELSE BEGIN             if total mcstride  EQ n_elements mcstride  then                ncdf_varget  cdfid  varid  res  OFFSET   mcoffset  COUNT   mccount               ELSE                ncdf_varget  cdfid  varid  res  OFFSET   mcoffset  COUNT   mccount  STRIDE   mcstride          ENDELSE   Do we have to constitute a structure with selected attributes           if total selectatt  NE 0 then BEGIN   There are selected attributes             res   create_struct varcontient name  res    We create the structure             selectatt   where selectatt EQ 1    We find selected attributes             for attid   0   n_elements selectatt 1 do BEGIN   for which we take                widget_control  widbase212 selectatt attid  get_value   attname   the name                widget_control  widbase213 selectatt attid  get_value   attvalue   the value               res   create_struct res  attname 0  attvalue 0    We concatenate the structure             endfor          endif          widget_control  event top   destroy  We shut the second widget           widget_control  base   destroy  We shut the first widget           ncdf_close cdfid       END       32:                        Case of the display of a held  with xdisplayfile        33:widget_control  event top   destroy  We shut the second widget        ELSE:    endcase    return end            file_comments   This procedure manage the second created whiget when we call xncdf_lec     This widget concern the reading of the variable       param WIDID_PERE  type scalar in required    It contains the identity of the father widget which was    created by xncdf_lec and which has allowed to select the variable to be read      OUTPUTS: indirectement res  le tableau ou la structure resultat       uses    resultat infovariable indicewid_var motcle      version    Id: xncdf_lec pro 163 2006 08 29 12:59:46Z navarro           PRO wid_var  widid_pere     compile_opt idl2  strictarrsubs      COMMON resultat  res    COMMON infovariable  cdfid  listename  contient  nomdim  tailledim  varid  varcontient    COMMON indicewid_var  widbase1  widbase2111  widbase212  widbase213  selectatt    COMMON motcle  mcatt  mccount  mcoffset  mciodir  mcshift  mcstride  mcvar    res    1     Opening of the base window as columns     widbase   widget_base column  title variable:  varcontient name   align_center  group_leader   widid_pere      Opening of the base subwindow      widbase1 array of offsets      rien   widget_label widbase  value         We jump a line   Definition of labels of lines of the array    rowlab   string tailledim varcontient dim     for i   0   n_elements rowlab 1 do rowlab i    strtrim rowlab i  1     rowlab   nomdim varcontient dim replicate :   n_elements varcontient dim rowlab   Definition of array s initial values    valinit   lonarr 4  n_elements varcontient dim    column 0 : offsets    if keyword_set mcoffset  AND n_elements mcoffset  EQ varcontient ndims THEN       valinit 0 mcoffset ELSE valinit 0      0   colomn 1 : counts    if keyword_set mccount  AND n_elements mccount  EQ varcontient ndims THEN        valinit 1 mccount ELSE valinit 1      tailledim varcontient dim    column 2 : shifts    if keyword_set mcshift  AND n_elements mcshift  EQ varcontient ndims THEN       valinit 2 mcshift ELSE valinit 2      0   column 3 : strides    if keyword_set mcstride  AND n_elements mcstride  EQ varcontient ndims THEN       valinit 3 mcstride ELSE valinit 3      1   test of initial values of the array    valinit   fix valinit     valinit 3      1   valinit 3     valinit 0     valinit 1       tailledim varcontient dim valinit 3   valinit 0       valinit 2      valinit 2    MOD  tailledim varcontient dim valinit 3      test of shifts   declaration of the array    widbase1   widget_table widbase  row_labels   rowlab  value   valinit   editable                                column_labels    Offset   Count   Shift   Stride  uvalue   1    un petit blabla    rien   widget_label widbase  value    ATTENTION: Faire des  return  pour que les valeurs   align_center     rien   widget_label widbase  value    du tableau ou des textes soient bien prises en compte   align_center      widbase2 choice of attributes      rien   widget_label widbase  value         We jump a line    widbase2   widget_base widbase   column    To each attribute  we created a widget  widbase21  containing in line a button    yes no  widbase211  and two wigdet text  widbase212  widbase213  comprising the    name and the value of the attribute     widbase21   lonarr varcontient natts     widbase211   lonarr varcontient natts     widbase2111   lonarr varcontient natts    Vector which will serve to know which yes no are selected  see  wid_var_event    selectatt   lonarr varcontient natts     selectatt    0    widbase212   lonarr varcontient natts     widbase213   lonarr varcontient natts     for attid   0  varcontient natts 1 do BEGIN  Lop on the number of attribute        widbase21 attid    widget_base widbase2   row        name ncdf_attname cdfid varid attid        ncdf_attget cdfid varid name value       widbase211 attid    widget_base widbase21 attid   nonexclusive        widbase2111 attid     widget_button widbase211 attid  value       uvalue   2111        widbase212 attid    widget_text widbase21 attid  value   name   editable        widbase213 attid    widget_text widbase21 attid  value strtrim string value 1   editable     endfor     widbase3 buttons of the bottom       widbase3   widget_base widbase   row align_center     widbase31 widget_button widbase3 value GET  uvalue 31     widbase32 widget_button widbase3 value Help  uvalue 32     widbase33 widget_button widbase3 value DONE  uvalue 33     execution of the base window and of sub window       widget_control widbase realize      xmanager wid_var widbase    return end               file_comments   Procedure called by xmanager when we press a button of the first widget    created by par xncdf_lec       param EVENT   A structure caracterising the event type which arrive at the widget number 1       uses   resultat  infovariable  motcle      version    Id: xncdf_lec pro 163 2006 08 29 12:59:46Z navarro           PRO xncdf_lec_event  event     compile_opt idl2  strictarrsubs      COMMON resultat  res    COMMON infovariable  cdfid  listename  contient  nomdim  tailledim  varid  varcontient    COMMON motcle  mcatt  mccount  mcoffset  mciodir  mcshift  mcstride  mcvar   What is the type of event     widget_control  event id  get_uvalue uval   case on the type of event     case uval of       1:BEGIN                     We want to read an other file          widget_control  event id  get_value   nom   We recuperate the name           widget_control  event top   destroy  We shut the widget           ncdf_close cdfid        We shut the wrong file which has been opened   We call back xncdf_lec          res   xncdf_lec nom 0  ATT   mcatt  COUNT   mccount  OFFSET   mcoffset  IODIR   mciodir                              SHIFT   mcshift   STRIDE   mcstride  VAR   mcvar            return       END       2:BEGIN                     A variable is selected           varid   event index      We recuperat its number in the file Netcdf          varcontient   ncdf_varinq cdfid varid           wid_var  event top       We call the program which launch the second widget  See sooner        END       3:BEGIN                     button done          widget_control  event top   destroy   We delete the widget          ncdf_close cdfid         We shut the file        END       ELSE:    endcase    return end"); 
     254a[252] = new Array("./ToBeReviewed/MATRICE/colle.html", "colle.pro", "", "     file_comments    This concatenation function exist in IDL so long    as we do not try to stick with a dimension superior or equal at 4         categories    Utilities      param a0  in required       param a1  in required       param a2  in required       param a3  in required       param a4  in required       param a5  in required       param a6  in required       param a7  in required       param a8  in required       param a9  in required       param a10  in required       param a11  in required       param a12  in required       param a13  in required       param a14  in required       param a15  in required       param a16  in required       param a17  in required       param a18  in required       param a19  in required       param a20  in required       keyword SAUVE   force to save the pointer array and arrays to be stuck      returns res matrice resultat      examples IDL  print  colle replicate 1 2 2 2 indgen 2 2 2 2                      1       1                  1       1                  0       1                  2       3                    1       1                  1       1                  4       5                  6       7      history Sebastien Masson  smasson lodyc jussieu fr                          13 1 98      version  Id: colle pro 163 2006 08 29 12:59:46Z navarro       FUNCTION colle  a0  a1  a2  a3  a4  a5  a6  a7  a8  a9  a10  a11  a12  a13  a14  a15  a16  a17  a18  a19  a20  SAUVE   sauve     compile_opt idl2  strictarrsubs      res    1     We put in place ptrtab and direc in function of input arguments      case 1 of       n_params  EQ 2:BEGIN       case where we directly give the pointer array          ptrtab   a0          direc   a1          if NOT keyword_set sauve  then undefine  a0   on recuperate the number of array to be pasted           nbretab    size ptrtab 1        end       n_params  GT 2:BEGIN   on recuperate the number of array to be pasted           nbretab   n_params 1          bidon   execute direc   a strtrim n_params 1  2    We write the pointer array whose each element point on an array           ptrtab ptrarr nbretab allocate_heap           for n   0 nbretab 1 do begin             bidon   execute ptrtab n a strtrim n  2              if NOT keyword_set sauve  then bidon   execute undefine  a strtrim n  2           endfor          sauve   0       end       ELSE:    endcase     case on the direct s value       case direc of       1:BEGIN                     we paste following the dimension 1          res    ptrtab 0           if NOT keyword_set sauve  then ptr_free  ptrtab 0           FOR n   1 nbretab 1 DO BEGIN             res    temporary res   ptrtab n              if NOT keyword_set sauve  then ptr_free  ptrtab n           ENDFOR        END        2:BEGIN                     we paste following the dimension 2          res    ptrtab 0           if NOT keyword_set sauve  then ptr_free  ptrtab 0           FOR n   1 nbretab 1 DO BEGIN             res    temporary res   ptrtab n              if NOT keyword_set sauve  then ptr_free  ptrtab n           ENDFOR        END        3:BEGIN                     we paste following the dimension 3          res    ptrtab 0           if NOT keyword_set sauve  then ptr_free  ptrtab 0           FOR n   1 nbretab 1 DO BEGIN             res    temporary res   ptrtab n              if NOT keyword_set sauve  then ptr_free  ptrtab n           ENDFOR        END       ELSE:BEGIN    We transpose res in order to put the dimension to be pasted number 1   To this  we contain the permuter vector which give the place that dimension    in the transposed matrix must take          siz    size ptrtab 0 0           if siz LT direc then              ptrtab 0    reform ptrtab 0   size ptrtab 0 1:siz  replicate 1  direc siz   over           permute   indgen size ptrtab 0 0           permute 0    direc 1          permute direc 1    0          res   transpose ptrtab 0  permute           if NOT keyword_set sauve  then ptr_free  ptrtab 0           FOR n   1 nbretab 1 DO BEGIN   we paste following the dimension 1on colle suivant la dimension 1             if  size ptrtab n 0  LT direc then                 ptrtab n    reform ptrtab n   size ptrtab n 1:siz  replicate 1  direc siz                          res    temporary res  transpose ptrtab n  permute              if NOT keyword_set sauve  then ptr_free  ptrtab n           ENDFOR          res   transpose temporary res  permute        END    ENDCASE       if NOT keyword_set sauve  then undefine  ptrtab sortie:    return   res      END     "); 
     255a[253] = new Array("./ToBeReviewed/PLOTS/DESSINE/bar_plot.html", "bar_plot.pro", "", "        file_comments    Create a bar graph  or overplot on an existing one       categories    Graphics      param Values  in required   type vector    A vector containing the values to be represented by the bars    Each element in VALUES corresponds to a single bar in the   output       keyword BASELINES  type vector    A vector  the same size as VALUES  that contains the   base value associated with each bar   If not specified    a base value of zero is used for all bars       keyword COLORS  type vector    A vector  the same size as VALUES  containing the color index   to be used for each bar   If not specified  the colors are   selected based on spacing the color indexes as widely as   possible within the available colors  specified by D N_COLORS       keyword BARNAMES  type string    A string array  containing one string label per bar    If the bars are vertical  the labels are placed beneath   them   If horizontal  rotated  bars are specified  the labels   are placed to the left of the bars       keyword TITLE  type string    A string containing the main title to for the bar plot       keyword XTITLE  type string    A string containing the title for the X axis       keyword YTITLE  type string    A string containing the title for the Y axis       keyword BASERANGE  type float    A floating point scalar in the range 0 0 to 1 0  that   determines the fraction of the total available plotting area    in the direction perpendicular to the bars  to be used    If not specified  the full available area is used       keyword BARWIDTH  type float    A floating point value that specifies the width of the bars   in units of  nominal bar width   The nominal bar width is   computed so that all the bars  and the space between them    set by default to 20  of the width of the bars  will fill the   available space  optionally controlled with the BASERANGE   keyword       keyword BARSPACE  type scalar    A scalar that specifies  in units of  nominal bar width    the spacing between bars   For example  if BARSPACE is 1 0    then all bars will have one bar width of space between them    If not specified  the bars are spaced apart by 20  of the bar   width       keyword BAROFFSET  default BARSPACE type scalar    A scalar that specifies the offset to be applied to the   first bar  in units of  nominal bar width   This keyword   allows  for example  different groups of bars to be overplotted   on the same graph       keyword OUTLINE    If set  this keyword specifies that an outline should be   drawn around each bar       keyword OVERPLOT    If set  this keyword specifies that the bar plot should be   overplotted on an existing graph       keyword BACKGROUND  default The normal IDL background color is used type scalar    A scalar that specifies the color index to be used for   the background color       keyword ROTATE    If set  this keyword indicates that horizontal rather than   vertical bars should be drawn   The bases of horizontal bars   are on the left   Y  axis and the bars extend to the right       examples By using the overplotting capability  it is relatively easy to create  stacked bar charts  or different groups of bars on the same graph     For example  if ARRAY is a two dimensional array of 5 columns and 8  rows  it is natural to make a plot with 5 bars  each of which is a  stacked  composite of 8 sections   First  create a 2D COLORS array   equal in size to ARRAY  that has identical color index values across  each row to ensure that the same item is represented by the same color  in all bars     With ARRAYS and COLORS defined  the following code fragment  illustrates the creation of stacked bars  note that the number of rows  and columns is arbitrary :    Y RANGE    0 ymax    Scale range to accommodate the total bar lengths   BASE   INTARR NROWS   FOR I   0  NROWS 1 DO BEGIN     BAR_PLOT  ARRAY I  COLORS COLORS I  BASELINES BASE                  BARWIDTH 0 75  BARSPACE 0 25  OVER I GT 0      BASE   BASE   ARRAY I   ENDFOR    To plot each row of ARRAY as a clustered group of bars within the same  graph  use the BASERANGE keyword to restrict the available plotting  region for each set of bars   The sample code fragment below  illustrates this method:    FOR I   0  NROWS 1 DO       BAR_PLOT  ARRAY I  COLORS COLORVECT  BARWIDTH 0 8 BARSPACE 0 2          BAROFFSET I 1 0 BARSPACE NCOLS  OVER I GT 0  BASERANGE 0 19    where NCOLS is the number of columns in ARRAY  and COLORVECT is a  vector containing the color indices to be used for each group of  bars    In this example  each group uses the same set of colors  but  this could easily be changed       history August 1990  T J  Armitage  RSI  initial programming   Replacement  for PLOTBAR and OPLOTBAR routines written by William Thompson     September 1990  Steve Richards  RSI  changed defaults to improve the  appearance of the bar plots in the default mode  Included  spacing the bars slightly       Id: bar_plot pro 163 2006 08 29 12:59:46Z navarro       pro bar_plot values baselines baselines colors colors barnames barnames              title title xtitle xtitle ytitle ytitle baserange baserange              barwidth barwidth barspace barspace baroffset baroffset              outline outline overplot overplot background background              rotate rotate  _EXTRA   ex     compile_opt idl2  strictarrsubs   if  n_params d  eq 0  then begin   Print call   return if no parameters   print bar_test values baselines baselines colors colors barnames barnames    print  title title xtitle xtitle ytitle ytitle baserange baserange      print  barwidth barwidth barspace barspace baroffset baroffset      print  outline outline overplot overplot background background      print  rotate rotate    return endif  nbars n_elements values  Determine number of bars   Baselines  bars extend from baselines through values  default 0 if not keyword_set baselines  then baselines intarr nbars    Default colors spaced evenly in current color table if not keyword_set colors  then      colors fix d n_colors float nbars indgen nbars 0 5    Labels for the individual bars  none by default if not keyword_set barnames  then barnames strarr nbars      Main title if not keyword_set title  then title    Centered title under X axis if not keyword_set xtitle  then xtitle    Title for Y axis if not keyword_set ytitle  then ytitle    Fraction  0 1  of full X range to use if not keyword_set baserange  then baserange 1 0   Space betw  bars  taken from nominal bar widths  default is none If not keyword_set barspace  then barspace 0 2   Bar width scaling factor  relative to nominal if not keyword_set barwidth  then barwidth 1 0   barspace   barspace   nbars   Initial X offset  in scaled bar widths  default is none if not keyword_set baroffset  then baroffset barspace barwidth   Outline of bars  default is none outline   keyword_set outline    Overplot  do not erase the existing display  default is to create new plot overplot   keyword_set overplot    Background color index  defaults to 0  usually black  if not specified if not keyword_set background  then background 0   Rotate  make horizontal bars  default is vertical bars rotate   keyword_set rotate   mnB   MIN baselines  MAX mxB   NAN  mnV   MIN values  MAX mxV   NAN  range mnB  mxV        Maximum of bases   values  if  rotate  then begin     Horizontal bars    if  x range 0  eq 0  and  x range 1  eq 0      Determine range for X axis       then xrange range         else xrange x range     Or  use range specified    if  y range 0  eq 0  and  y range 1  eq 0      Plot will calculate       then                                           defaults for X  but not         yrange    0  n_elements values              for Ys  so fill in here        else           yrange y range     Axis perpend  to bars    yticks 1     Suppress ticks in plot    ytickname strarr 2       xticks 0    xtickname strarr 1  endif else begin     Vertical bars    if  y range 0  eq 0  and  y range 1  eq 0      Determine range for Y axis       then yrange range         else yrange y range                 Or  use range specified    xrange x range     Axis perpend  to bars    xticks 1     Suppress ticks in plot    xtickname strarr 2       yticks 0    ytickname strarr 1  endelse if  overplot eq 0  then      Create new plot  no data plot values nodata title title xtitle xtitle ytitle ytitle       noerase overplot xrange xrange yrange yrange xticks xticks       xtickname xtickname yticks yticks ytickname ytickname       xstyle 1 ystyle 1 data background background  _EXTRA   ex if  rotate  then begin     Horizontal bars    base_win y window     Window range in Y    scal_fact x s     Scaling factors    tick_scal_fact y s     Tick scaling factors endif else begin     Vertical bars    base_win x window     Window range in X    scal_fact y s     Scaling factors    tick_scal_fact x s     Tick scaling factors endelse winrange baserange base_win 1 base_win 0     Normal  window range barsize barwidth winrange nbars     Normal  bar width winoffset base_win 0 baroffset barsize     Normal  first offset bases scal_fact 0 scal_fact 1 baselines     Baselines  in normal coor  normal scal_fact 0 scal_fact 1 values     Values  in normal coor  barstart indgen nbars barsize barspace winrange nbars   Coor  at left edges tickv winoffset barstart 0 5 barsize     Tick coor   centered  for i 0 nbars 1 do begin     Draw the bars    width winoffset barstart i barstart i         Compute bar width       barstart i barsize barstart i barsize     length bases i normal i normal i bases i    Compute bar length    if  rotate  then begin     Horizontal bars       x length     X axis is  length  axis       y width     Y axis is  width  axis    endif else begin     Vertical bars       x width     X axis is  width  axis       y length     Y axis is  length  axis    endelse    polyfill x y color colors i normal     Polyfill with color    if  outline  then plots x y normal     Outline using  p color endfor  tickv tickv tick_scal_fact 0 tick_scal_fact 1    Locations of the ticks if  rotate  then      Label the bars  Y axis    axis yaxis 0 ystyle 1 yticks nbars 1 ytickv tickv ytickname barnames      yticklen 0 0   else      Label the bars  X axis    axis xaxis 0 xstyle 1 xticks nbars 1 xtickv tickv xtickname barnames      xticklen 0 0 return end"); 
     256a[254] = new Array("./ToBeReviewed/PLOTS/DESSINE/plt.html", "plt.pro", "", "             file_comments    Draw horizontal graph  map  with CONTOUR procedure      categories    Graphics      param TAB1  in required     The field whose we want to make the horizontal map can be:           1  an array  if needed  its mean along the z and t direction           will be automatically performed            2  a structure respecting all criterions specified by           litchamp pro  cf  IDL  xhelp litchamp         param PARAM2  in optional default min of tab1  on ocean points     Min value we want to consider in the contour s drawing            Note: Could also be the type of plot that can be only  xy  for plt      param PARAM3  in optional default max of tab1  on ocean points     Max value we want to consider in the contour s drawing            Note: if param2 is defined as  xy  then param3 is used to define the min  see param2       param PARAM4  in optional default xy     Type of plot  can be only  xy  for plt            Note: if param2 is defined as  xy  then param4 is used to define the max  see param3       keyword BOXZOOM  type vector    Vector indicating the geographic zone on which we want to cut the map      If BOXZOOM has :   1 element : The extraction is made on  lon1  lon2  lat1  lat2  0 boxzoom 0    2 elements: The extraction is made on  lon1  lon2  lat1  lat2  boxzoom 0 boxzoom 1    4 elements: The extraction is made on  Boxzoom  0  max gdept  gdepw    5 elements: The extraction is made on  Boxzoom 0:3  0  Boxzoom 4    6 elements: The extraction is made on Boxzoom     Where lon1  lon2 lat1 lat2 are global variables defined at the last domdef       keyword REALCONT    Allow to draw continents defined in IDL  REALCONT can have 2 form:              REALCONT: we draw continents in place of the mask             REALCONT 2 we draw continent s contour over the mask  this allows                         to see if the mask correspond at real continents       keyword CONTINTERVALLE    When CONTOUR is activated  it is the value between 2 isolines    traced by a trait  So it can be different from the one specified by INTERVALLE which     in this case  does not control colored isolines in color anymore  If there is noone    specified min  we choose a contour min which goes well with the specified interval     If this keyword is not specified  we trace 20 isolines from the min to the max        keyword CONTLABEL  type integer    It is an integer n  When CONTOUR is activated  if n   is different of 0  choose the label type corresponding to n cases for    the traced by a traitisolines  To specify the type of label of the    colored contour  use LABEL      keyword CONTMAX  default The max of the array passed in the keyword CONTOUR  on ocean points    When CONTOUR is activated  max value we want to consider in the isoline    traced by a trait s line      keyword CONTMIN  default The min of the array passed in the keyword CONTOUR  on ocean points    When CONTOUR is activated  min value we want to consider in the isoline    traced by a trait s line       keyword CONTNLEVEL  default 20    When  CONTOUR is activated  it is the number of contours   traced by a trait for drawing  active if   CONTLABEL 0       keyword CONTOUR    If we want to trace contours of a different field than the one    whose we have the colored drawing  by example E P in color and QSR in contours     It must be a field respecting same characteristics than the argument number one of plt       keyword GRIDTYPE  U T V W  or  F  to specify possibly the grid on which the field is joined    Comment: In this case  we should use a structure like field       keyword INTERVALLE    Value of an internal between to isoline  If there is none specified min     we choose a min contour which goes well with the specified interval  If this keyword is not    specified  we trace 20 isoline from the min to the max  Comment: When CONTOUR is activated     INTERVALLE only specify the interval between 2 colored isoline  To specify the interval    between 2 isolines traced by a trait  use CONTINTERVALLE       keyword INV    Invert the color vector used to color the graph                   without use the black  the white and the used palette        keyword LABEL  type integer    It is an integer n  If n different of 0  it choose the label s type    corresponding to cases n  cf label pro   Comment: When CONTOUR is activated  it only specify the label s type for colored isolines     For these one traced by a trait  use CONTLABEL       keyword MAP  default Cylindrical projection    We use it when we want to do a projection    This keyword can be of two types:       MAP P0lat P0lon Rot  For the description of these 3 values  see the online help of MAP_SET         MAP: In this case  map is automatically calculated have the value:             map    0   lon1 lon2 2  0    Comment: A good way to choose the type of the projection we want to do is to have a look at IDL demo:   IDL  demo   Then choose earth sciences and  mapping    Comment2: By default it is a cylindrical projection which is effectuated  with or without the keyword map     If we want an other projection  MAP must be activated and we have to add the keyword:  nom_projection    For example  for a polar projection centered on the south pole:   IDL  domdef 180 180 90 45   IDL  plt  tab   stereo map 90 0 0       keyword LABMAP  default labmap 1    Corresponds to label keywords of map_set       keyword MAXIN    to specify the max value we want to plot with a keyword instead of with the   input parameter max  If max is defined by both  parameter and keyword  the   keyword is retained       keyword MININ    to specify the min value we want to plot with a keyword instead of with the   input parameter min  If min is defined by both  parameter and keyword  the   keyword is retained       keyword NLEVEL  default 20    Number of contour to draw by default  20  active if   LABEL 0 or is not specified       keyword NOTRI    To force not to use the triangulation  Beware  in this case  the    drawing only works if the grid is undeformed  It means that each point of a longitude    give one latitude and each point of a latitude give one longitude  except if we use    the keyword CELL_FILL 2     Comment: if the field contain points  values f_nan  then we even do a triangulation       keyword OVERPLOT    To make a plot over an other one     Comment: Contrarily to the use of CONTOUR or VECTEUR  the use of this keyword    does not the caption and or the color bar       keyword STRICTFILL    Activate this keyword to that the filling of contours be    precisely done between the min and the max specified letting values inferior at the    specified min and values superior at the specified max in white       keyword STYLE  default style 0    Contour s style to adopt to draw isolines       keyword VECTEUR  type struct    It is a structure composed by 2 elements containing the 2 fields U   and V of values of the zonal and meridian component of the vector of the fields   to draw  These fields can be an array or a structure          For example: vecteur matriceu:lec unsurface matricev:lec vnsurface          Comment: name of elements of vectors are inconsequential          vecteur u:lec unsurface v:lec vnsurface  is also appropriated       keyword _EXTRA   used to pass your keywords       keyword CONT_NOFILL          Activate it not to fill the point mask to let them transparent     Comment: Nevertheless  we trace mask s contour        keyword USETRI   To force using triangulation        keyword MASKFILL        keyword DUPLICATE      keyword DECIMATETRI      uses   common pro      history    Sebastien Masson  smasson lodyc jussieu fr    7 1999   Sebastien Masson 08 02 2000 checkfield and   notri keyword  or triangule    1          version    Id: plt pro 171 2006 09 07 14:11:11Z smasson         todo seb    Changer param  tab1 keyword  REMPLI   UNLABSUR   UNSUR2     UNVECTSUR  quelques trucs dans la routine          pro plt  tab1  param2  param3  param4  REALCONT   realcont  CONTOUR   contour              INTERVALLE   intervalle  INV   inv  GRIDTYPE   gridtype  BOXZOOM   boxzoom              CONTINTERVALLE   contintervalle  LABEL   label  CONTLABEL   contlabel              STYLE   style  CONTMAX   contmax  CONTMIN   contmin  NLEVEL   nlevel  CONTNLEVEL   contnlevel              VECTEUR   vecteur  MAP   map  MININ   minin  MAXIN   maxin              CONT_NOFILL   cont_nofill              USETRI   usetri  NOTRI   notri  MASKFILL   maskfill              DUPLICATE   duplicate  STRICTFILL   strictfill  OVERPLOT   overplot              DECIMATETRI   decimatetri   LABMAP   labmap  _extra   ex     include common     compile_opt idl2  strictarrsubs    cm_4mesh  cm_4data   IF NOT keyword_set key_forgetold  THEN BEGIN  updatenew  updatekwd   ENDIF     tempsun   systime 1             To key_performance       I  preparation of the graphic environment and small verifications        I1  verification of the grid s type associated to tab1      if keyword_set gridtype  then vargrid   gridtype   if keyword_set vecteur  AND  NOT keyword_set gridtype  then BEGIN     vargrid   litchamp tab1   grid      if vargrid eq   then BEGIN       vargrid   xquestion What is the grid associated to the data to contour   T   chkwidget        vargrid   strupcase vargrid      endif   ENDIF     I2  Reading of the field and checkup      if keyword_set boxzoom  AND n_elements contour  ne 4  then BEGIN     savedbox   1b     saveboxparam   boxparam4plt dat    END   if n_elements param2  NE 0 then type   param2   if n_elements param3  NE 0 then min   param3   if n_elements param4  NE 0 then max   param4   if n_elements minin  NE 0 then min   minin    if n_elements maxin  NE 0 then max   maxin   checktypeminmax   plt  TYPE   type  MIN   min  MAX   max  _extra   ex   z2d   checkfield tab1   plt  TYPE   type  BOXZOOM   boxzoom  DIREC   direc  VECTEUR   vecteur  _extra   ex     if z2d 0  EQ  1 then BEGIN      IF keyword_set savedbox  THEN restoreboxparam   boxparam4plt dat      return   ENDIF   IF n_elements usetri  EQ 0 THEN BEGIN   do we have holes in the triangulation      holeintri   n_elements triangles_list 3 LT  jpi 1 keyword_set key_periodic jpj 1 2     the triangulation must be used to draw the field    do we have a triangulation      wehavetri   triangles_list 0  NE  1     the triangulation must be used to draw the continents   if we make a map  are we periodic and nx jpi       CASE strupcase vargrid  OF        T :nx   nxt        W :nx   nxt        U :nx   nxu        V :nx   nxv        F :nx   nxf     ENDCASE     mapperio   keyword_set map keyword_set key_periodic nx eq jpi       usetri    wehavetri wehavetri holeintri mapperio keyword_set key_irregular    2 notri    ENDIF     I3  reinitialization   p x y    Comment: We do not reinitializate when we call bck plt in loop to use contour      if n_elements contour  ne 4 AND NOT keyword_set overplot  then reinitplt   z   invert     I4  attribution of the mask and of longitude and latitude arrays      IF  strupcase vargrid  EQ  W  THEN profond   firstzw NE 0     ELSE profond   firstzt NE 0    do we need to extract now the triangulation that will be use for   contouring the field    if keyword_set profond        OR  usetri EQ 0 AND  vargrid EQ  T  OR vargrid EQ  W        OR  usetri NE 2 AND  vargrid NE  T  AND vargrid NE  W  THEN BEGIN     grille  mask  glam  gphi  gdep  nx  ny  nz           firstx  firsty  firstz  lastx           lasty  lastz   forplt  _extra   ex   ENDIF ELSE BEGIN     grille  mask  glam  gphi  gdep  nx  ny  nz           firstx  firsty  firstz  lastx  lasty           lastz  TRI   trifield   forplt  _extra   ex   ENDELSE     I5 determination of the mi:min and of the ma:max of z2d in the same way    as max: max and min: min for the drawing      masknan   finite z2d    nan   total masknan  NE n_elements z2d     Do we need to do an autoscale     autoscale   testvar var   min  EQ testvar var   max  AND NOT keyword_set intervalle    determineminmax  z2d  mask  mi  ma  glam  gphi  MININ   min  MAXIN   max         nan   nan  INTERVALLE   intervalle  usetri   usetri  _extra   ex   if z2d 0  EQ  1 THEN GOTO  sortie   We do an autoscale if needed    if autoscale then autoscale  min  max  intervalle       II  We put the drawing in its place on the window or the page    and possible opening of the window or of the page      if n_elements contour  NE 4 AND NOT keyword_set overplot  THEN       placedessin   plt  posfenetre  posbar         CONTOUR   contour  VECTEUR   vecteur  MAP   map  DIREC   direc  _extra   ex       III  Covering of the drawing  labels style axis            III1  Choice of labels     if keyword_set intervalle  AND NOT keyword_set label  then label   1   if keyword_set label  eq 0 then cas   0 else cas   label   label  cas  min  max  ncontour  level_z2d  colnumb  NLEVEL   nlevel         INTERVALLE   intervalle  strictfill   strictfill     III2  Choice of style     if not keyword_set style  then style   0   style  style  level_z2d  linestyle  thick   if keyword_set inv  then colnumb   reverse colnumb      III3  Definition of axis     if NOT keyword_set overplot  THEN axe   xy  _EXTRA   ex         IV  Drawing         extrapolation of field on lands and setup of min  max values     if keyword_set nan  then begin     z2d where masknan EQ 0    max   ENDIF ELSE masknan   1   filling the mask values   we fill only masknan or we fill mask masknan    IF keyword_set nan  AND keyword_set cont_nofill  THEN       z2d   remplit z2d  nite   1 vargrid NE  T  AND vargrid NE  W                        mask   masknan  _extra   ex       ELSE z2d   remplit z2d  nite    1    vargrid NE  T  AND vargrid NE  W                                         keyword_set nan                           1 keyword_set cont_nofill                           1 n_elements maskfill  NE 0                      mask   mask masknan  _extra   ex    IF keyword_set strictfill  EQ 0 AND n_elements maskfill  EQ 0 then       z2d   min   z2d    max   if n_elements maskfill  NE 0 then BEGIN     z2d   temporary z2d mask masknan     if maskfill NE 0 then z2d   temporary z2d    maskfill 1 mask masknan    ENDIF     check mask and triangulation according to the grid type and NaN      If we make a drawing at depth  we must redefine a triangulation    on the zoom because the land sea mask at depth may differ from   the one at the surface    As this triangulation will be used to draw the land sea mask with   the good shape  we use tmask to compute it even if the data are not   located on the T grid   if  keyword_set profond  OR keyword_set cont_nofill        AND  usetri GE 1 AND  vargrid EQ  T  OR vargrid EQ  W             OR  usetri EQ 2 AND  vargrid NE  T  AND vargrid NE  W  then BEGIN     trifield   triangule tmask firstx:lastx  firsty:lasty  firstz                               coinmonte   coinmontemask                              coindescend   coindescendmask                              keep_cont   cont_nofill  _extra   ex      indicezoommask    lindgen jpi  jpj firstx:lastx  firsty:lasty    ENDIF   triangulation for nan mask   if keyword_set nan  then BEGIN     trinan   triangule masknan   keep_cont  coinmonte   coinmontenan                            coindescend   coindescendnan      indicezoomnan    lindgen jpi  jpj firstx:lastx  firsty:lasty    ENDIF    IF n_elements twin_corners_up  EQ 0 THEN coinmontemask    1 ELSE coinmontemask   twin_corners_up    IF n_elements twin_corners_dn  EQ 0 THEN coindescendmask     1 ELSE coindescendmask   twin_corners_dn   if vargrid EQ  T  OR vargrid EQ  W  then BEGIN      glammsk   glam     gphimsk   gphi   ENDIF ELSE begin   decoupe terre: To draw the coast in a clean way  we try to take additionally    points to draw the land  Like that  we do not see gap between T and U V F grid    It is what decoupeterre do  We also redefine trimsk      maskorg   mask     decoupeterre  mask  glammsk  gphimsk  type    xy          TRI   trimsk  usetri   usetri  indicezoom   indicezoommask           coinmonte   coinmontemask  coindescend   coindescendmask           _EXTRA   ex   ENDELSE     IV1  Choice of type of drawing      typetrace    classique    if keyword_set map  AND key_onearth then BEGIN    Call of  mapset when we want to do projections      IF n_elements map  NE 3 THEN map    0   lon1 lon2 2  MOD 360  0      typetrace    projection      map_lat   map 0      map_lon   map 1      map_rot   map 2      if chkstru ex   TITLE  then begin       maptitre   ex title        ex title         endif     map_set  map_lat  map_lon  map_rot  _extra   ex  position   posfenetre   iso           limit    lat1  lon1  lat2  lon2   noborder     if n_elements maptitre  ne 0 then ex title   maptitre     if n_elements trifield  GE 2 then trifield   ciseauxtri trifield  glam  gphi  _EXTRA   ex      if n_elements trimsk  GE 2 then trimsk   ciseauxtri trimsk  glammsk  gphimsk  _EXTRA   ex      if n_elements trinan  GE 2 then BEGIN        trinan   ciseauxtri trinan  glam  gphi  _EXTRA   ex        if trinan 0  EQ  1 then undefine  trinan     endif   ENDIF ELSE BEGIN   To axes of coordinates be considerated      if  x type EQ 0 AND n_elements contour  LE 4 then         plot   0   0   nodata  xstyle   5  ystyle   5  title     subtitle      noerase      if keyword_set key_periodic  then BEGIN   In this case  triangulation is closed in x and cover all the sphere     We have to cut it at the level where we cut the sphere to make the drawing        if n_elements trifield  GE 2 then trifield   ciseauxtri trifield  glam  gphi  _EXTRA   ex        if n_elements trimsk  GE 2 then trimsk   ciseauxtri trimsk  glammsk  gphimsk  _EXTRA   ex        if n_elements trinan  GE 2 then trinan   ciseauxtri trinan  glam  gphi  _EXTRA   ex      ENDIF   endelse     IV2  Contours and coloring     if keyword_set duplicate   then BEGIN   pour marina uniquement ATTENTION C EST TRES MAL CODE     lon   glam  0      decalage   max lon min lon lon shift lon  1 n_elements lon 1       x range 1     x range 1 duplicate 1 decalage     for i   1  duplicate 1 do BEGIN       z2d    z2d  z2d        gphi    gphi  gphi        mask    mask  mask        gphimsk    gphimsk  gphimsk        glam    glam  glam i decalage        glammsk    glammsk  glammsk      ENDFOR   endif   save  glam  gphi  trifield  file    tri dat    if keyword_set decimatetri  then BEGIN     tempsdeux   systime 1         To key_performance     IF n_elements trimsk  EQ 0 THEN trimsk   trifield     Verts   transpose temporary glam   temporary gphi                              temporary z2d      Conn    replicate 3  1  n_elements trifield 3  trifield      Result   mesh_decimate temporary verts   temporary Conn                                 Connout  vertices   Vertsout                                percent_vertices   decimatetri      connout   reform connout  4   n_elements connout 4   over       trifield    temporary connout 1:3        glam   reform Vertsout 0        gphi   reform Vertsout 1        z2d   reform Vertsout 2        undefine  Vertsout     print   temps decimatetri  systime 1 tempsdeux    ENDIF   pltbase  z2d  glam  gphi         mask  glammsk  gphimsk  trichamp   trifield  trimsk   trimsk   forplt         level_z2d  colnumb  contour   contour  usetri   usetri  realcont   realcont         overplot   keyword_set overplot keyword_set map          c_linestyle   linestyle  c_labels   1 indgen n_elements level_z2d  MOD 2          c_thick   thick  cont_nofill   cont_nofill  nan   nan         coinmontemask   coinmontemask  coindescendmask   coindescendmask         coinmontenan   coinmontenan  coindescendnan   coindescendnan         indicezoommask   indicezoommask  indicezoomnan   indicezoomnan         maskorg   maskorg  masknan   masknan  trinan   trinan  _extra   ex     IV3  Recall of plt in loop when contour is activated      if n_elements contour  eq 4 then BEGIN   c est la 2eme fois que je passe ds pltt     contour    mietma: mi  ma  unit:varunit  inter:intervalle    je renvoie le min  le max et l unite     return   endif   if keyword_set contour  THEN BEGIN      pourlegende    1  1  1  1      oldattributs   saveatt      oldcolnumb   colnumb     plt  contour  contmin  contmax  CONTOUR   pourlegende   NOERASE           USETRI   usetri           INTERVALLE   contintervalle  LABEL   contlabel  STYLE   style           NLEVEL   contnlevel  DUPLICATE   duplicate  STRICTFILL   strictfill           MASKFILL   maskfill  _extra   ex     restoreatt  oldattributs     colnumb   oldcolnumb   ENDIF       V  Small functions           V1  Possible add of vectors in double exposure      if keyword_set vecteur  then BEGIN      oldattributs   saveatt      ajoutvect  vecteur  vectlegende  _extra   ex     restoreatt  oldattributs   ENDIF     if keyword_set overplot  then GOTO  fini     V2  Trace the line of change of date  the equator and the greenwich meridian        if NOT keyword_set map  AND key_onearth then meridienparallele   xy      V3  To trace IDL s continents     if keyword_set realcont  then BEGIN   si noease est passe de _extra  on s assure qu il est a 1     if chkstru ex   NOERASE  then begin       oldnoerase   ex noerase       ex noerase   1     ENDIF     if chkstru ex   coast_thick  then mlinethick   ex coast_thick ELSE mlinethick   1     if chkstru ex   coast_color  then mcolor   ex coast_color ELSE mcolor   0     IF NOT keyword_set map  THEN         map_set  0   lon1 lon2 2  MOD 360  0  position   posfenetre            limit    lat1  lon1  lat2  lon2   NOERASE   noborder  color   0           _extra   ex     if realcont NE 2 AND NOT keyword_set cont_nofill  then BEGIN       if chkstru ex   cont_color  then cntcol   ex coast_color         ELSE cntcol    d n_colors   1     255       map_continents   fill_continents  color   cntcol  _extra   ex   noerase     ENDIF     map_continents   continents  color   mcolor  MLINETHICK   mlinethick   noerase  _extra   ex     if chkstru ex   NOERASE  THEN  ex noerase   oldnoerase   ENDIF     V4  caption   display of these      legende  mi  ma   xy  CONTOUR   pourlegende  VECTLEGENDE   vectlegende  INTERVALLE   intervalle  DIREC   direc  _EXTRA   ex   if n_elements ex  NE 0 then BEGIN    To keep frame s axes in black     if  where tag_names ex  EQ  COLOR 0  NE  1 then ex COLOR   coast_color   endif     case typetrace of      classique :         plot   0   0   nodata   noerase  color   0  xstyle   1  ystyle   1  _extra   ex      projection : BEGIN        if chkstru ex   NOERASE  then begin         oldnoerase   ex noerase         ex noerase   1       endif       if chkstru ex   SUBTITLE  then  p subtitle   ex SUBTITLE       if n_elements maptitre  ne 0 then ex title   maptitre       map_set  map_lat  map_lon  map_rot  _extra   ex   iso  limit    lat1  lon1  lat2  lon2             NOERASE   noborder  title    p title  color   0           map_proj_info  numproj   current           map_proj_info  numproj  name   nomproj           if nomproj EQ  Mercator  OR nomproj EQ  Cylindrical  OR nomproj EQ  LambertConic             OR nomproj EQ  Gnomic  OR nomproj EQ  AlbersEqualAreaConic               OR nomproj EQ  TransverseMercator  OR nomproj EQ  MillerCylindrical               OR nomproj EQ  LambertConicEllipsoid  then map_grid  box_axes 1 latdel 10 londel 10             ELSE map_grid  charsize   0 75   label latalign   1 lonalign             1 latdel   10 londel   30       IF n_elements labmap  EQ 0 THEN labmap   1       map_grid  charsize   0 75  label   labmap  latalign   1  lonalign   1  latdel   10  londel   30  color   0  _extra   ex       if chkstru ex   NOERASE  THEN  ex noerase   oldnoerase     end   endcase     V5  Colorbar      colnumb   colnumb 0:ncontour 1 keyword_set strictfill    barrecouleur  colnumb  min   max   ncontour keyword_set strictfill 2                     position   posbar  _extra   ex       VI  Possible print      fini:   terminedessin  _extra   ex     sortie:   if keyword_set savedbox  THEN restoreboxparam   boxparam4plt dat    if keyword_set key_performance  NE 0 THEN print   temps plt  systime 1 tempsun        return end  "); 
     257a[255] = new Array("./ToBeReviewed/PLOTS/DESSINE/plt1d.html", "plt1d.pro", "", "         file_comments   Trace 1d graphs: x y z  or t but in this case  we recall directly pltt       categories   Graphics      param TAB  in required     The field whose we want to make the hovmoller map can be 2 kind of thing:  1  An array which can be:              2d  3d or 4d:  array xy  xyz  xyt or xyzt  In this case  the array will pass             in moyenne or grossemoyenne to be averaged and become  an array 1d                1d:Nevertheless  the type must be specified in order to we know which trace             it is about  To have a correct caption  respecify the  extraction zone via BOXZOOM          2  a structure respecting all criterions specified by litchamp pro              See IDL  xhelp litchamp  The array contained in the structure             respecting criterions of case 1        param PARAM2  in required     Min value we want to consider in the contour s drawing    Note: could also be the type of plot: x y z         param PARAM3  in optional default min max of tab  on ocean points     Max value we want to consider in the contour s drawing    Note: if param2 is defined as  x y z  then param3 is used to define the min  see param2       param PARAM4  in optional default max of tab  on ocean points     Type of plot  can be only  x y z  for plt1d    Note: if param2 is defined as  xy  then param4 is used to define the max  see param3       keyword BOXZOOM   Vector indicating the geographic zone  3d  on which the extraction of the field must    be done to do the hovmoeller     If BOXZOOM has :   1 element : The extraction is made on  lon1  lon2  lat1  lat2  0 boxzoom 0    2 elements: The extraction is made on  lon1  lon2  lat1  lat2  boxzoom 0 boxzoom 1    4 elements: The extraction is made on  Boxzoom  vert1  vert2    5 elements: The extraction is made on  Boxzoom 0:3  0  Boxzoom 4    6 elements: The extraction is made on Boxzoom     Where lon1  lon2 lat1 lat2 vert1 vert2 are global variables defined at the last domdef       keyword COL1d     OBSOLETE Color number when we make a trace 1d by default  0 It is better to use the    keyword COLOR used by plot       keyword ENDPOINTS    keyword specifying that we want to make a vertical cut in diagonal  Then coordinated of extremities    of these one are defined by the 4 elements of the vector ENDPOINTS:  x1 y1 x2 y2  which are    coordinates       keyword MAXIN    Allows to specify the max value we want to consider in the drawing of contour    helping by the keyword instead of the argument max  If the argument and the keyword are    specified in the same time  it is the value specified by the keyword which is retained       keyword MININ    Allows to specify the min value we want to consider in the drawing of contour    helping by the keyword instead of the argument min  If the argument and the keyword are    specified in the same time  it is the value specified by the keyword which is retained       keyword OV1D   Allow the double exposure of an 1d curve to a precedent 1d trace       keyword REVERSE_X    To invert the x axis  so as the drawing       keyword REVERSE_Y    To invert the y axis  so as the drawing       keyword SIN    Activate this keyword if we want the x axis to be traced in sinus of the    latitude when we make a drawing f y       keyword STY1D     OBSOLETE    Number of the style used when we make a 1d drawing  We should better use the    keyword LINESTYLE which is tho one of the plot  Beware  this keyword is still    useful if we want to d bars instead of curves  put sty1d bar       keyword TYPEIN   allows to specify the type of hovmoller we want to do                xt yt zt t      with help of a keyword rather than the argument type  If the argument and the    keyword are specified in the same time  it is the value specified by the    keyword which is retained       keyword _EXTRA    used to pass your keywords      history    creation 24 6 99 Eric Guilyardi     a partir routine pltt de Sebastien Masson    8 7 1999 Sebastien Masson  smasson lodyc jussieu fr     inspection des travaux finis   8 2 2000 Sebastien Masson: checkfield      version     Id: plt1d pro 172 2006 09 11 07:11:26Z smasson             pro plt1d  tab  param2  param3  param4  BOXZOOM   boxzoom  SIN   sin                MININ   minin  MAXIN   maxin  TYPEIN   typein  ENDPOINTS   endpoints                COL1D   col1d  STY1D   sty1d  OV1D   ov1d  X   x  Y   y  Z   z  TT   tt                REVERSE_X   reverse_x  REVERSE_Y   reverse_y  SWITCHXY   switchxy                _extra   ex     include common     compile_opt idl2  strictarrsubs    cm_4mesh  cm_4data   IF NOT keyword_set key_forgetold  THEN BEGIN  updatenew  updatekwd   ENDIF     tempsun   systime 1             pour key_performance     1st part: initialization small calculations          verification of the type s value       if n_elements param2  NE 0 then type   param2   if n_elements param3  NE 0 then min   param3   if n_elements param4  NE 0 then max   param4   if n_elements minin  NE 0 then min   minin   if n_elements maxin  NE 0 then max   maxin   if keyword_set tt  then typein    t    if keyword_set typein  then BEGIN      if size type   type  NE 7 AND size type   type  NE 0 then begin       if n_elements min  NE 0 then max   min       min   type     endif     type   typein   endif     checktypeminmax   plt1d  TYPE   type  MIN   min  MAX   max  ENDPOINTS   endpoints         XX   keyword_set x  YY   keyword_set y  ZZ   keyword_set z     if type EQ  t  then BEGIN     pltt  tab  type  min  max  BOXZOOM   boxzoom  SIN   sin  TYPEIN   typein           COL1D   col1d  STY1D   sty1d  OV1D   ov1d  ENDPOINTS   endpoints  _extra   ex     return   endif     I2  reinitialization   p x y    Comment: We do not reinitializate when we call back plt1d     if NOT keyword_set ov1d  then reinitplt     I1  Reading of the field      if  keyword_set boxzoom  OR keyword_set endpoints  THEN BEGIN      savedbox   1b      saveboxparam   boxparam4plt1d dat     ENDIF     if keyword_set endpoints  then begin     section  tab  z1d  glam  gphi  ENDPOINTS   endpoints  TYPE   type           BOXZOOM   boxzoom  DIREC   direc     nx   n_elements glam       ny   nx     if strupcase vargrid  EQ  W  then begin       z   gdepw firstzw:lastzw        nz   nzw     ENDIF ELSE BEGIN       z   gdept firstzt:lastzt        nz   nzt     ENDELSE   ENDIF ELSE BEGIN      z1d   checkfield tab   plt1d  TYPE   type  BOXZOOM   boxzoom                          direc   direc  _extra   ex      grille  mask  glam  gphi  gdep  nx  ny  nz  type   type   ENDELSE   if z1d 0  EQ  1 then BEGIN      IF keyword_set savedbox  THEN restoreboxparam   boxparam4plt1d dat      return endif   We build the mask  For this  the array must be hidden  Automaticaly done at valmask    value if we pass in moyenne or grossemoyenne    mask   fltarr n_elements z1d    if n_elements valmask  EQ 0 then valmask   1e20   nan   total finite z1d   nan     1   if keyword_set nan  then begin     notanum   where finite z1d  EQ 0      z1d notanum    0     mask where z1d LT valmask 10    1     z1d notanum     values f_nan   ENDIF ELSE mask where z1d LT valmask 10    1     determination of the min and of the max after the average     nan   total finite z1d   nan    1   determineminmax  z1d  mask  mi  ma  MININ   min  MAXIN   max  nan   nan  INTERVALLE   intervalle  _extra   ex   if z1d 0  EQ  1 THEN return       if NOT keyword_set ov1d  THEN placedessin   autre  posfenetre  posbar  contour   contour  DIREC   direc  endpoints   endpoints  _extra   ex       2nd part: Drawing       definition of the abscisse and ordinate vectors    The triangulation is defined in order to the drawing be done from the    left bottom to the right up  So the matrix have to be shown like this     from which some transpose and reverse       case type of      y : begin       yy   z1d       IF  size gphi 0  EQ 1 then xx   gphi ELSE BEGIN          IF keyword_set key_irregular  THEN BEGIN            cln    where gphi EQ max gphi 0            xx   reform gphi cln MOD nx            ENDIF ELSE xx   reform gphi 0          ENDELSE       if keyword_set sin  then xx   sin pi 180 xx        min0   lat1   max0   lat2     END      x :begin       yy   z1d       xx   glam  0        min0   lon1   max0   lon2     END       z :begin       yy   reverse gdep  1        xx   reverse z1d  1        min0   0   max0   0       case n_elements boxzoom  of         0: y range    vert1  vert2          1: y range    0  boxzoom          2: y range   boxzoom         4: y range    vert1  vert2          5: y range    0  boxzoom 4          6: y range   boxzoom 4:5        endcase       if NOT keyword_set ov1d  then  y range   reverse y range      END    ENDCASE          definition of axes        if keyword_set integrationtps  then axe  type  time 0  time jpt 1  SIN   sin  _extra   ex        ELSE axe  type  SIN   sin   if NOT keyword_set ov1d  then axe  type  SIN   sin       drawing       if type EQ  z  then begin     idx   where xx NE valmask      if NOT keyword_set ov1d  then BEGIN        if min EQ mi then  x range    min abs max min 5  max abs max min 5          ELSE  x range    min  max      ENDIF   ENDIF ELSE BEGIN      idx   where yy NE valmask      if NOT keyword_set ov1d  then BEGIN        if min EQ mi then  y range    min abs max min 5  max abs max min 5          ELSE  y range    min  max      ENDIF   ENDELSE      if NOT keyword_set ov1d  then BEGIN      legende  mi  ma  type  CONTOUR   contour  DIREC   direc  ENDPOINTS   endpoints  _EXTRA   ex     ENDIF   IF keyword_set switchxy   THEN BEGIN     tmp   xx     xx   yy     yy   temporary tmp      if NOT keyword_set ov1d  then BEGIN        tmp    x        x    y        y   temporary tmp      ENDIF   ENDIF   if NOT keyword_set ov1d  then BEGIN      if keyword_set reverse_x  then  x range   reverse x range      if keyword_set reverse_y  then  y range   reverse y range    ENDIF     xx   xx idx    yy   yy idx    if  not keyword_set col1d  then col1d   0   if keyword_set sty1d  then BEGIN  If we want to make bars     IF strlowcase strtrim sty1d  EQ  bar  then begin        y range    y range 0 y range 1 y range 0 05   y range 1         bar_plot  yy  background    d n_colors 1    255             baselines   replicate y range 0  n_elements yy  barnames                 colors      replicate col1d  n_elements yy   outline       if n_elements ex  NE 0 then BEGIN    To have a black frame         if  where tag_names ex  EQ  COLOR 0  NE  1 then ex COLOR   0       ENDIF       plot   0   0   noerase   nodata  _extra   ex       GOTO  fini     ENDIF    ENDIF     if NOT keyword_set ov1d  then BEGIN        plot  xx  yy  color   col1d  linestyle   sty1d  thick   2  title     subtitle     _extra   ex     if n_elements ex  NE 0 then BEGIN    To have a 0 colored frame and trace a line at y 0       if  where tag_names ex  EQ  COLOR 0  NE  1 then ex COLOR   0       if  where tag_names ex  EQ  LINESTYLE 0  NE  1 then ex LINESTYLE   0       if  where tag_names ex  EQ  THICK 0  NE  1 then ex THICK   0     ENDIF     plot   x range   0  0   noerase   nodata           xstyle   1 4 keyword_set endpoints  AND                          type EQ  x  AND lat1 NE lat2  OR  type EQ  y  AND lon1 NE lon2            ystyle   1  _extra   ex   Add of an axis in the case where we use endpoints     if keyword_set endpoints  then addaxe  endpoints  type  posfenetre  _EXTRA   ex   Trace a line at x 0     plot   0  0   y range   noerase   nodata  title     subtitle     _extra   ex   ENDIF ELSE oplot  xx  yy  color   col1d  linestyle   sty1d  thick   2  _extra   ex       3rd part: Possible print      fini:   terminedessin  _extra   ex   if keyword_set savedbox  THEN restoreboxparam   boxparam4plt1d dat      if n_elements key_performance  NE 0 then       IF key_performance EQ 1 THEN print   temps plt1d  systime 1 tempsun          return end  "); 
     258a[256] = new Array("./ToBeReviewed/PLOTS/DESSINE/pltbase.html", "pltbase.pro", "", "             file_comments   Overlayer contour to trace a field which can be mask     Elementary brick of plt  pltz et pltt       categories    Graphics      param Z2D  in required    The table to trace      param X  in required    Axis  Vector or array of the same size that z2d  This is the coordinate of z2d on x       param Y  in required    Axis  Vector or array of the same size that z2d  This is the coordinate of z2d on y       param MASK  in required type array    It is the array who mask z2d  with 0s on points we want to mask and 1s on others     If z2d is not masked  put this argument equal to 1       param XM  in required    Axis of the mask  Vector or array of the same size that mask     This is the coordinate of mask on x       param YM  in required    Axis of the mask  Vector or array of the same size that mask     This is the coordinate of mask on y       param LEVELS  in optional type vector    Vectors which contain levels needed at the contour     If it is not given  we take 20 levels between the min and the max         param COLORS  in optional type vector    Vectors which contain colors needed at the contour     If it is not given  we take 20 levels between the min and the max       keyword COLORTRICHAMP    The color we want to use to draw the triangulation which is used to make contours of the field       keyword COLORTRIMASK    The color we want to use to draw the triangulation which is used to make contours of the mask       keyword COLOR_C    To draw the contour in color instead of in black   with filling in color       keyword CONT_NOFILL    Activate it not to fill the point mask to let them transparent     Comment: Nevertheless  we trace mask s contour       keyword CONT_COLOR  default   d n_colors   1  white    The color of the continent       keyword DESSTRICHAMP    To draw the triangulation which is used to make field s contours        keyword DESSTRIMASK    To draw the triangulation which is used to make mask s contours        keyword FORPLT    To activate if we want that the drawing of coast be realized by tracecote rather than tracemask       keyword I_COLORS  type vector    It is a vector specifying the colors to use to trace contours     It is the same thing that c_colors which act on contours       keyword MORE  default 10    Number to give to avoid style s bugs:      Out of range subscript encountered:        Execution halted at:  PLTBASE           151               If the bug still exist  increase the value of more      The explanation and the justification of this method do not have scientific bases yet       keyword NOFILL   To make just isolines       keyword NOCONTOUR   To make just colors       keyword UNSUR2   To trace one isoline on two       keyword UNLABSUR  type integer    I specify we only label one contour on two       keyword CONTOUR    To be used since plt  pltz or pltt   Have a look on these routines       keyword _EXTRA    Used to pass your keywords      uses   common pro      restrictions   In the case of z2d  x and y are arrays of same size  we hate to put them as vectors: z2d  x  y       history    Sebastien Masson  smasson lodyc jussieu fr        8 2 2000 check if the tri array is not equal to    1  allow contour with out using a triangulation        version    Id: pltbase pro 171 2006 09 07 14:11:11Z smasson        todo seb L 172   173           PRO pltbase  z2d  x  y  mask  xm  ym  levels  colors  UNSUR2   unsur2  CONTOUR   contour                  NOCONTOUR   nocontour  NOFILL   nofill                  TRICHAMP   trichamp  TRIMSK   trimsk                  REALCONT   realcont  NAN   nan  usetri   usetri                  COLORTRICHAMP   colortrichamp  COLORTRIMASK   colortrimask                  COLORTRINAN   colortrinan                  COLORPOINTS   colorpoints  DRAWPOINTS   drawpoints                  TH_TRICHAMP   th_trichamp  TH_TRIMASK   th_trimask                  DESSTRICHAMP   desstrichamp  DESSTRIMASK   desstrimask                  DESSTRINAN   desstrinan  COLOR_C   color_c                  I_COLORS   i_colors   CONT_COLOR   CONT_COLOR                  CONT_NOFILL   cont_nofill  UNLABSUR   unlabsur                  COINMONTEMASK   coinmontemask  COINDESCENDMASK   coindescendmask                  COINMONTENAN   coinmontenan  COINDESCENDNAN   coindescendnan                  INDICEZOOMMASK   indicezoommask  INDICEZOOMNAN   indicezoomnan                  MASKORG   maskorg  MASKNAN   masknan  TRINAN   trinan                  FORPLT   forplt  REALSECTION   realsection                  MORE   more  EXCHANGE_XY   exchange_xy                  _EXTRA   ex       compile_opt idl2  strictarrsubs    cm_4mesh   IF NOT keyword_set key_forgetold  THEN BEGIN  updatenew  updatekwd   ENDIF       Explanation concerning contour  This keyword is activated when we trace a    colored contour different from the one with black trait    If it is activated  case n_elements contour  NE 0  we pass 2 time in pltbase:     1  We trace colors then we leave  it is the case:           n_elements contour  NE 0 AND n_elements contour  NE 4      2  We trace contours in traits then continents  it is the case:            n_elements contour  NE 0 AND n_elements contour  EQ 4        tempsun   systime 1             To key_performance   if n_elements mask  EQ 0 then mask   1b   if n_elements masknan  EQ 0 then masknan   1b   IF total mask  EQ n_elements z2d  THEN mask   1b     If levels and colors aren t given     if n_params  EQ 4 then        label  0  min z2d mask  max z2d mask  ncontour  levels  colors   attention bidouille inexplicable pour que tout se passe bien avec les   postcript ds pltz    if n_elements contour  LE 4 AND  x type EQ 0 THEN       plot   0   0  xstyle   5  ystyle   5   nodata   noerase  title     subtitle         Is cell_fill is a part of _extra  we desactive it if it is nt equal to 2     IF chkstru ex   CELL_FILL  THEN BEGIN      cell_fill   ex CELL_FILL     if ex CELL_FILL NE 2 then ex CELL_FILL   0   ENDIF ELSE cell_fill   0            I  Filling of contours in palette colors      if NOT keyword_set more  then more   10   if NOT keyword_set nofill  AND NOT keyword_set color_c  then begin     if n_elements contour  NE 4 THEN BEGIN        if usetri EQ 2 then BEGIN         IF size x   n_dimensions  EQ 1 THEN x   x replicate 1   size z2d 2          IF size y   n_dimensions  EQ 1 THEN y   replicate 1   size z2d 1 y         contour   z2d  fltarr more   x  fltarr more                 y  fltarr more  levels   levels  c_color   colors                noerase   fill  TRIANGULATION   trichamp  _extra   ex         ENDIF ELSE BEGIN         IF size x   n_dimensions  EQ 2 THEN x   x  0          IF size y   n_dimensions  EQ 2 THEN y   reform y 0            contour  z2d  x  y  levels   levels  c_color   colors   noerase                fill  _extra   ex        ENDELSE     ENDIF   ENDIF   if n_elements contour  NE 0 AND n_elements contour  NE 4 THEN GOTO  fini    IF chkstru ex   C_ORIENTATION  THEN ex   extractstru ex   C_ORIENTATION    IF chkstru ex   C_SPACING  THEN ex   extractstru ex   C_SPACING    IF chkstru ex   C_COLORS  THEN ex   extractstru ex   C_COLORS      II  Drawing of contours in traits     if n_elements contour  EQ 4 OR n_elements contour  EQ 0 THEN BEGIN     we put the masked values to NaN       IF  n_elements mask  GT 1 OR n_elements masknan  GT 1          AND NOT keyword_set cont_nofill  THEN BEGIN        IF keyword_set maskorg  THEN tonan   maskorg masknan ELSE tonan   mask masknan        tonan   where remplit tonan  nite   1  mask   tonan                                  basique  fillval   0                                 fillxdir   keyword_set realsection  EQ 0  count        IF count NE 0 THEN z2d temporary tonan     values f_nan     ENDIF        We do not pass if we have to make differents contours    In the case of unsur2 is activated  we reduce levels     if NOT keyword_set nocontour  then begin       IF keyword_set unsur2  THEN levels   levels where zeroun n_elements levels    eq 1    Is unlabsur activated   Does C_LABEL passed via _EXTRA        if keyword_set unlabsur  THEN IF chkstru ex   C_LABELS  THEN           ex C_LABELS   1 indgen n_elements ex C_LABELS  MOD unlabsur    1      Not to fill when cell_fill is imposed        IF chkstru ex   CELL_FILL  THEN ex CELL_FILL   0         CASE 1 OF         keyword_set color_c :c_colors   colors         keyword_set i_colors :c_colors   i_colors         ELSE:       ENDCASE         IF usetri EQ 2 THEN BEGIN          IF size x   n_dimensions  EQ 1 THEN x   x replicate 1   size z2d 2          IF size y   n_dimensions  EQ 1 THEN y   replicate 1   size z2d 1 y         contour   z2d  fltarr more   x  fltarr more                 y  fltarr more  levels   levels               overplot   1 keyword_set nofill  noerase   keyword_set nofill                c_colors   c_colors  TRIANGULATION   trichamp  _extra   ex       ENDIF ELSE BEGIN         IF size x   n_dimensions  EQ 2 THEN x   x  0          IF size y   n_dimensions  EQ 2 THEN y   reform y 0            contour  z2d  x  y  levels   levels               overplot   1 keyword_set nofill  noerase   keyword_set nofill                c_colors   c_colors  _extra   ex       ENDELSE     ENDIF     III  Filling of colored continents        IF chkstru ex   CELL_FILL  THEN ex CELL_FILL   cell_fill   1     IF chkstru ex   LEVELS  THEN ex   extractstru ex   LEVELS      IF chkstru ex   NODATA  THEN ex   extractstru ex   NODATA      IF NOT keyword_set cont_color  THEN cont_color    d n_colors 1     255         If there is points at NaN    We trace points in white at NaN bafore drawing coasts with a trait        if keyword_set trinan  THEN BEGIN       IF size x   n_dimensions  EQ 1 THEN x   x replicate 1   size masknan 2        IF size y   n_dimensions  EQ 1 THEN y   replicate 1   size masknan 1 y       contour   1b masknan  fltarr more   x  fltarr more               y  fltarr more  levels   0 5   overplot   fill             c_colors   cont_color  TRIANGULATION   trinan  _extra   ex       IF keyword_set forplt  THEN           completecointerre  COINMONTE   coinmontenan             COINDESCEND   coindescendnan  INDICEZOOM   indicezoomnan             CONT_COLOR   cont_color  _EXTRA   ex         ELSE fillcornermask  x  0  y 0    COINMONTE   coinmontenan             COINDESCEND   coindescendnan  CONT_COLOR   cont_color  _extra   ex     ENDIF     Filling of continents       if keyword_set realcont  then if realcont EQ 1 then mask   1b     if n_elements mask  NE 1 then BEGIN   If mask 1 we gap it          if NOT keyword_set cont_nofill  then BEGIN     mask filling           case 1 of           keyword_set realsection :drawsectionbottom  mask  xm  ym                 CONT_NOFILL   cont_nofill  CONT_COLOR   cont_color  _EXTRA   ex           usetri GE 1:BEGIN             if n_elements trimsk  eq 0 then trimsk   trichamp             IF size xm   N_DIMENSIONS  EQ 1 THEN xm   xm replicate 1   size mask 2              IF size ym   N_DIMENSIONS  EQ 1 THEN ym   replicate 1   size mask 1 ym             contour   1b mask  fltarr more   xm  fltarr more                     ym  fltarr more  LEVELS   0 5   OVERPLOT   FILL                   C_COLORS   cont_color  TRIANGULATION   trimsk  _extra   ex             IF keyword_set forplt  THEN                 completecointerre  COINMONTE   coinmontemask                   COINDESCEND   coindescendmask  INDICEZOOM   indicezoommask                   CONT_COLOR   cont_color  _EXTRA   ex               ELSE fillcornermask  xm  0  ym 0    COINMONTE   coinmontemask                   COINDESCEND   coindescendmask  CONT_COLOR   cont_color  _extra   ex           END           ELSE:BEGIN              IF size xm   n_dimensions  EQ 2 THEN xm   xm  0              IF size ym   n_dimensions  EQ 2 THEN ym   reform ym 0                contour  1b mask  xm  ym  LEVELS   0 5   OVERPLOT                    FILL  C_COLORS   cont_color  _EXTRA   ex           END         ENDCASE       ENDIF                       NOT keyword_set cont_nofill      IV  Trace coast in traits         case 1 of         keyword_set realsection  AND NOT keyword_set cont_nofill :               keyword_set realsection  AND keyword_set cont_nofill :             drawsectionbottom  mask  xm  ym               CONT_NOFILL   cont_nofill  _extra   ex          keyword_set forplt  AND  map projection GT 0 OR key_irregular              OR keyword_set nan :tracecote  _extra   ex         ELSE:tracemask  mask  xm  ym  _extra   ex       endcase                         ENDIF                         n_elements mask  NE 1   ENDIF     draw the triangulations     if keyword_set desstrichamp  then       dessinetri  trichamp  x  y  color   colortrichamp  thick   th_trichamp   if keyword_set desstrimask  then       dessinetri  trimsk  xm  ym  color   colortrimask  thick   th_trimask   if keyword_set desstrinan  then       dessinetri  trinan  x  y  color   colortrinan   if keyword_set drawpoints  then       tracegrille  x  y  color   colorpoints     fini:   IF keyword_set key_performance  THEN print   temps pltbase  systime 1 tempsun     return end"); 
     259a[257] = new Array("./ToBeReviewed/PLOTS/DESSINE/pltsc.html", "pltsc.pro", "", "     file_comments        categories        param TAB1        param TAB2        param MIN1        param MAX1        param MIN2        param MAX2        param VARNAME2        keyword BOXZOOM   Vector indicating the geographic zone on which we want to cut the map      If BOXZOOM has :   1 element : The extraction is made on  lon1  lon2  lat1  lat2  0 boxzoom 0    2 elements: The extraction is made on  lon1  lon2  lat1  lat2  boxzoom 0 boxzoom 1    4 elements: The extraction is made on  Boxzoom  0  max gdept  gdepw    5 elements: The extraction is made on  Boxzoom 0:3  0  Boxzoom 4    6 elements: The extraction is made on Boxzoom      keyword COL1D        keyword STY1D        keyword OV1D        keyword _EXTRA   Used to pass your keywords      returns        uses        restrictions        examples        history        version    Id: pltsc pro 163 2006 08 29 12:59:46Z navarro        todo seb       PRO  pltsc tab1 tab2  min1  max1  min2  max2  varname2  BOXZOOM   boxzoom               COL1D col1d STY1D sty1d OV1D ov1d  _extra   ex   scatter plot  inspired from plt1d        compile_opt idl2  strictarrsubs        include common  cm_4mesh  cm_4data   IF NOT keyword_set key_forgetold  THEN BEGIN  updatenew  updatekwd   ENDIF      Comment: We do not reinitializate when we call back pltsc    if NOT keyword_set ov1d  then reinitplt      reduce data xyzt domain     if keyword_set boxzoom  then BEGIN       Case 1 Of        N_Elements Boxzoom  Eq 1:bte    lon1  lon2  lat1  lat2  0  boxzoom 0         N_Elements Boxzoom  Eq 2:bte    lon1  lon2  lat1  lat2  boxzoom 0  boxzoom 1         N_Elements Boxzoom  Eq 4:bte    Boxzoom  vert1  vert2         N_Elements Boxzoom  Eq 5:bte    Boxzoom 0:3  0  Boxzoom 4         N_Elements Boxzoom  Eq 6:bte   Boxzoom        Else: Begin          ras   report Wrong Definition of Boxzoom            return        End      endcase      savedbox   1b      saveboxparam   boxparam4pltsc dat       domdef  bte  GRIDTYPE   vargrid    ENDIF    extract indexes to plot     indexm   where tab1 LE valmask 10     tab1   tab1 indexm     tab2   tab2 indexm      npts    size indexm 1     deal with  min and max of plot    IF finite min1  EQ 0 THEN min1   min tab1     IF finite max1  EQ 0 THEN max1   max tab1     IF finite min2  EQ 0 THEN min2   min tab2     IF finite max2  EQ 0 THEN max2   max tab2         init plot if not overlay        IF NOT keyword_set ov1d  THEN placedessin   yfx  posfenetre  posbar        contour   contour  _extra   ex    yy   tab1    xx   tab2    axis range     x range    min2 abs max2 min2 5 max2 abs max2 min2 5      y range    min1 abs max1 min1 5 max1 abs max1 min1 5      IF  NOT keyword_set sty1d  THEN sty1d   0    IF  NOT keyword_set col1d  THEN col1d   0    IF  NOT keyword_set ov1d  THEN  BEGIN        legende  min1  max1   yfx  VARNAME2   varname2  NPTS   npts  _EXTRA   ex          plot xx yy  background   255  psym   sty1d 1  color col1d  thick 2            title     subtitle    _extra   ex        if n_elements ex  NE 0 then BEGIN    To have a 0 colored frame and trace a line at y 0          if  where tag_names ex  EQ  COLOR 0  NE  1 then ex COLOR   0          if  where tag_names ex  EQ  LINESTYLE 0  NE  1 then ex LINESTYLE  0        ENDIF        plot   x range   0  0   noerase   nodata  xstyle   1  ystyle   1  _extra   ex   trace a line at x 0       plot   0  0   y range   noerase   nodata  title     subtitle     _extra   ex    ENDIF ELSE oplot xx yy color col1d linestyle sty1d thick 2  _extra   ex       3rd part: Possible print     fini:    terminedessin  _extra   ex   if keyword_set savedbox  THEN restoreboxparam   boxparam4pltsc dat       if n_elements key_performance  NE 0 then       IF key_performance EQ 1 THEN print   temps plt1d  systime 1 tempsun           return end  "); 
     260a[258] = new Array("./ToBeReviewed/PLOTS/DESSINE/pltt.html", "pltt.pro", "", "         file_comments    Trace hovmoller graphs: xt yt zt t      categories Graphics      param TAB  in required     The field whose we want to make the hovmoller map can be 2 kind of thing:  1  An array which can be:              3d or 4d: array   xt yt zt t  The last component is the time  In this case  the array will               pass in grossemoyenne to be averaged and become an 1d or 2d array               2d: If the array is already 2d  it is not modified  beware  lands must               be masked at the value valmask  and nevertheless type must be specified               to we know of which trace it is about               To have a correct caption  respecify the  extraction zone via BOXZOOM               1d: only for traces of the  t  type  Nevertheless  type must be specified               to we know of which trace it is about               To have a correct caption  respecify the  extraction zone via BOXZOOM          2  a structure respecting all criterions specified by litchamp pro              See IDL  xhelp litchamp  The array contained in the structure             respecting criterions of case 1         PARAM:          MAX: valeur maximum que l on veut prendre en compte dans le trace   des contours  Par defaut on prend le max de tableau  sur les pts mer     MIN: valeur minimum que l on veut prendre en compte dans le trace   des contours  Par defaut on prend le min de tableau  sur les pts   mer            DATMIN: c est la borne inf de l axe temporel  c est un         longinteger de la forme yyyymmdd  ou bien yymmdd            DATMAX: c est la borne max de l axe temporel  c est un         longinteger de la forme yyyymmdd  ou bien yymmdd       keyword BOXZOOM   Vector indicating the geographic zone  3d  on which the extraction of the field must    be done to do the hovmoeller     If BOXZOOM has :   1 element : The extraction is made on  lon1  lon2  lat1  lat2  0 boxzoom 0    2 elements: The extraction is made on  lon1  lon2  lat1  lat2  boxzoom 0 boxzoom 1    4 elements: The extraction is made on  Boxzoom  vert1  vert2    5 elements: The extraction is made on  Boxzoom 0:3  0  Boxzoom 4    6 elements: The extraction is made on Boxzoom     Where lon1  lon2 lat1 lat2 vert1 vert2 are global variables defined at the last domdef       keyword CONTINTERVALLE    When CONTOUR is activated  it is the value between 2 isolines    traced by a trait  So it can be different from the one specified by INTERVALLE which     in this case  does not control colored isolines in color anymore  If there is noone    specified min  we choose a contour min which goes well with the specified interval     If this keyword is not specified  we trace 20 isolines from the min to the max        keyword CONTLABEL  type integer    When CONTOUR is activated  if n   is different of 0  choose the label type corresponding to n cases for    the traced by a traitisolines  To specify the type of label of the    colored contour  use LABEL      keyword CONTMAX  default we take the max of the array passed in the keyword CONTOUR  on ocean points    When CONTOUR is activated  max value we want to consider in the isoline    traced by a trait s line        keyword CONTMIN  default we take the min of the array passed in the keyword CONTOUR  on ocean points    When CONTOUR is activated  min value we want to consider in the isoline    traced by a trait s line        keyword CONTNLEVEL  default 20    When  CONTOUR is activated  it is the number of contours   traced by a trait for drawing  active if   CONTLABEL 0       keyword CONTOUR    If we want to trace contours of a different field than the one    whose we have the colored drawing  by example E P in color and QSR in contours     It must be a field respecting same characteristics than the argument number one of pltt       keyword ENDPOINTS    keyword specifying that we want to make a vertical cut in diagonal  Then coordinated of extremities    of these one are defined by the 4 elements of the vector ENDPOINTS:  x1 y1 x2 y2  which are    coordinates        keyword EXCHANGE_XY   Allows to invert axes        keyword FILTER   Apply a slippery average of width FILTER       keyword INTERVALLE    Value of an internal between to isoline  If there is none specified min     we choose a min contour which goes well with the specified interval  If this keyword is not    specified  we trace 20 isoline from the min to the max  Comment: When CONTOUR is activated     INTERVALLE only specify the interval between 2 colored isoline  To specify the interval    between 2 isolines traced by a trait  use CONTINTERVALLE       keyword INV    Invert the color vector used to color the graph                   without use the black  the white and the used palette        keyword LABEL  type integer    If n different of 0  it choose the label s type    corresponding to cases n  cf label pro   Comment: When CONTOUR is activated  it only specify the label s type for colored isolines     For these one traced by a trait  use CONTLABEL        keyword COL1d    OBSOLETE Color number when we make a trace 1d by default  0 It is better to use the    keyword COLOR used by plot       keyword MAXIN    to specify the max value we want to plot with a keyword instead of with the   input parameter max  If max is defined by both  parameter and keyword  the   keyword is retained       keyword MININ    to specify the min value we want to plot with a keyword instead of with the   input parameter min  If min is defined by both  parameter and keyword  the   keyword is retained       keyword NLEVEL  default 20    Number of contour to draw by default  20  active if   LABEL 0 or is not specified       keyword CONTNLEVEL  default 20    When  CONTOUR is activated  it is the number of contours   traced by a trait for drawing  active if   CONTLABEL 0       keyword OV1D    Allows to overprint a 1d curve over a precedent 1d drawing       keyword OVERPLOT    To make a plot over an other one     Comment: Contrarily to the use of CONTOUR or VECTEUR  the use of this keyword    does not the caption and or the color bar       keyword STRICTFILL    Activate this keyword to that the filling of contours be    precisely done between the min and the max specified letting values inferior at the    specified min and values superior at the specified max in white       keyword STYLE  default style 0    Contour s style to adopt to draw isolines      keyword STY1D     OBSOLETE    Number of the style used when we make a 1d drawing  We should better use the    keyword LINESTYLE which is tho one of the plot  Beware  this keyword is still    useful if we want to d bars instead of curves  put sty1d bar       keyword TREND_TYPE   Modify field by calling trends pro      keyword TYPEIN   allows to specify the type of hovmoller we want to do                xt yt zt t      with help of a keyword rather than the argument type  If the argument and the    keyword are specified in the same time  it is the value specified by the    keyword which is retained       keyword _EXTRA   Used to pass your keywords      uses   common pro      history    Sebastien Masson  smasson lodyc jussieu fr   27 5 98                         Jerome Vialard  adapting plt to hovmoller drawing                          2 7 98                         Sebastien Masson 14 8 98  continents barres                          15 1 98   Adaptation for arrays 3 and 4d to the average be done in pltt rather than during the reading                          Sebastien Masson 14 8 98                          7 1999                          Eric Guilyardi 29 7 99 FILTER  TREND_TYPE                          REPEAT_C                          Sebastien Masson 08 02 2000 checkfield and                         usetri keyword        version     Id: pltt pro 192 2006 09 22 09:37:08Z smasson        todo seb: L 24   36  L 426   427  L  492   493         pro pltt tab giventype givenmin givenmax datmin datmax BOXZOOM   boxzoom  CONTOUR contour             ENDPOINTS endpoints INTERVALLE intervalle INV inv              CONTINTERVALLE contintervalle LABEL label CONTLABEL contlabel             STYLE style  CONTMAX contmax             CONTMIN contmin NLEVEL nlevel CONTNLEVEL contnlevel             COL1D col1d STY1D sty1d  MININ   minin  MAXIN   maxin             OV1D ov1d  FILTER   filter  TREND_TYPE   trend_type             REPEAT_C   repeat_c  TYPEIN   typein  XT   XT  YT   YT  ZT   zt              TT   tt  STRICTFILL   strictfill  OVERPLOT   overplot              EXCHANGE_XY   exchange_xy              _extra   ex     include common     compile_opt idl2  strictarrsubs    cm_4mesh  cm_4data  cm_4cal   IF NOT keyword_set key_forgetold  THEN BEGIN  updatenew  updatekwd   ENDIF        tempsun   systime 1            For key_performance     I2  reinitialization   p x y    Comment: we do not reinitializate when we call back plt in loop to use contour       if n_elements contour  ne 4 AND NOT keyword_set overplot        AND NOT keyword_set ov1d  then reinitplt     I1  Reading of the field       if  keyword_set boxzoom  OR keyword_set endpoints         AND n_elements contour  ne 4 THEN BEGIN      savedbox   1b      saveboxparam   boxparam4pltt dat     ENDIF    if n_elements giventype  NE 0 then type   giventype    if n_elements givenmin  NE 0 then min   givenmin    if n_elements givenmax  NE 0 then max   givenmax    if n_elements minin  NE 0 then min   minin    if n_elements maxin  NE 0 then max   maxin    if keyword_set typein  then BEGIN        if size type   type  NE 7 AND size type   type  NE 0 then begin          if n_elements min  NE 0 then max   min          min   type       endif       type   typein     ENDIF      checktypeminmax   pltt  TYPE   type  MIN   min  MAX   max          XT   XT  YT   YT  ZT   zt  TT   tt  ENDPOINTS   endpoints  _extra   ex      if keyword_set endpoints  then begin       section  tab  z2d  glam  gphi  ENDPOINTS   endpoints  TYPE   type             BOXZOOM   boxzoom  DIREC   direc       nx   n_elements glam         ny   nx       if strupcase vargrid  EQ  W  then begin          z   gdepw firstzw:lastzw           nz   nzw       ENDIF ELSE BEGIN          z   gdept firstzt:lastzt           nz   nzt       ENDELSE    ENDIF ELSE BEGIN        z2d   checkfield tab   pltt  TYPE   type  BOXZOOM   boxzoom                            direc   direc  _extra   ex        if z2d 0  EQ  1 then BEGIN          IF keyword_set savedbox  THEN restoreboxparam   boxparam4pltt dat          return       endif       grille  mask  glam  gphi  gdep  nx  ny  nz  type   type    ENDELSE     Calculation of trend anomaly following TREND_TYPE       IF NOT keyword_set trend_type  THEN trend_type   0     IF trend_type GT 0 THEN z2d   trends z2d  trend_type  type       Filtering of fields in the  t  case         IF type EQ  t  AND keyword_set filter  THEN BEGIN        print       Applying a running mean filter of width  string filter  format    I3        z2d   smooth z2d  filter        z2d 0:filter 2 1    0        z2d size z2d 1 filter 2 1: size z2d 1 1    0     ENDIF       Repetition of the temporal series       IF NOT keyword_set repeat_c  THEN repeat_c   1     temps   time 0:jpt 1     IF repeat_c GT 1 THEN BEGIN       taille size z2d        CASE taille 0  OF          1: z2d   reform z2d replicate 1  repeat_c  taille 1 repeat_c           2: BEGIN             z2d   z2d replicate 1  repeat_c              z2d   reform z2d  taille 1  taille 2 repeat_c   over           END           ELSE:        ENDCASE       temps    temps   lindgen jpt REPEAT_c 1 1 temps 1 temps 0 temps jpt 1     ENDIF       Selection of graphic s type        taille size z2d     case taille 0  of       2 : typdes 2d        1 : begin          z1d z2d          typdes 1d           if keyword_set OV1D  then begin             yy   z2d             if n_elements datmin  NE 0 then tempsmin   date2jul datmin                ELSE tempsmin   temps 0    on shift l axe du temps pour des questions de precision sur les   dates du calendier julien en long qui sont passes en float ds les axes             xx   temps tempsmin              x range x range tempsmin              x tickv x tickv tempsmin   We do a false plot to apply these changes              plot 0   0 noerase xstyle 5  ystyle   5  title     subtitle     ytitle     xtitle                 goto  trace1d          endif       end   endcase   We build the mask  For that  the table must be masked  automaticaly done at the    value valmask if we pass in moyenne or grossemoyenne     nan   total finite z2d nan   z2d  not very nice when xgridstyle 2    same if xticklen 0 5  not very nice in the middle    so we draw   the top  right  axis by hand using axis          if n_elements ex  NE 0 then BEGIN    pour avoir un cadre de la couleur noire         if  where tag_names ex  EQ  COLOR 0  NE  1 then ex COLOR   0       ENDIF         plot   0   0   nodata   noerase  _extra   ex             xstyle   1 4 keyword_set endpoints  AND type EQ  xt  AND lat1 NE lat2 8 type EQ  yt  OR type EQ  zt              ystyle   1 4 keyword_set endpoints  AND type EQ  yt 8 type EQ  xt    call axis for the missing axis        IF type EQ  xt  AND NOT keyword_set endpoints  THEN BEGIN         if n_elements ex  NE 0 then              if  where tag_names ex  EQ  YTICKNAME 0  NE  1 then             ex YTICKNAME   replicate    n_elements ex YTICKNAME          axis  yaxis   1  ystyle   1  yticklen   0               ytickname   replicate     y ticks 1  _extra   ex       ENDIF       IF  type EQ  yt  OR type EQ  zt  AND NOT keyword_set endpoints  THEN BEGIN         if n_elements ex  NE 0 then              if  where tag_names ex  EQ  XTICKNAME 0  NE  1 then             ex XTICKNAME   replicate    n_elements ex XTICKNAME         axis  xaxis   1  xstyle   1  xticklen   0             xtickname   replicate     x ticks 1  _extra   ex       ENDIF   ajout d un axe ds le cas ou l on utilise endpoints       if keyword_set endpoints  then addaxe  endpoints  type  posfenetre  _EXTRA   ex     color bar         colnumb   colnumb 0:ncontour 1 keyword_set strictfill        barrecouleur  colnumb  min   max   ncontour keyword_set strictfill 2                         position   posbar  _extra   ex      endif     1d   trace1d:    if  typdes eq  1d  then begin       if  not keyword_set col1d  then col1d   0       if keyword_set sty1d  then BEGIN  if we want to make bars          IF strlowcase strtrim sty1d  EQ  bar  then begin              y range    y range 0 y range 1 y range 0 05 y range 1               bar_plot  yy  background    d n_colors 1   not very nice when xgridstyle 2  same if   xticklen 0 5  not very nice in the middle       so we draw the top axis by hand using axis           if n_elements ex  NE 0 then BEGIN    To have a black frame             if  where tag_names ex  EQ  COLOR 0  NE  1 then ex COLOR   0          ENDIF          plot   0   0   nodata   noerase                xstyle   1 8 1 keyword_set exchange_xy                 ystyle   1 8 keyword_set exchange_xy  _extra   ex   call axis for the missing axis           if n_elements ex  NE 0 then BEGIN    force tickname to blank array             if  where tag_names ex  EQ  YTICKNAME 0  NE  1 AND keyword_set exchange_xy  then ex YTICKNAME   replicate    n_elements ex YTICKNAME              if  where tag_names ex  EQ  XTICKNAME 0  NE  1 AND NOT keyword_set exchange_xy  then ex XTICKNAME   replicate    n_elements ex XTICKNAME           ENDIF          if keyword_set exchange_xy  then  axis  yaxis   1  ystyle   1                yticklen   0  ytickname   replicate     y ticks 1  _extra   ex            ELSE axis  xaxis   1  xstyle   1  xticklen   0                xtickname   replicate     x ticks 1  _extra   ex        ENDIF ELSE oplot  xx  yy  color   col1d  linestyle   sty1d  thick   2  _extra   ex    endif fini:     we reput time axis in IDL julian days and not in julian days count from tempsmin       if type EQ  xt  then BEGIN         y range y range tempsmin         y tickv y tickv tempsmin    ENDIF ELSE BEGIN         x range x range tempsmin        x tickv x tickv tempsmin    ENDELSE   We do a false plot to these values are considerated    plot   0   0   nodata   noerase  xstyle   5  ystyle   5          title     subtitle     ytitle     xtitle           3rd part: possible print        terminedessin  _extra   ex    if keyword_set savedbox  THEN restoreboxparam   boxparam4pltt dat       if n_elements key_performance  NE 0 then       IF key_performance EQ 1 THEN print   temps pltt  systime 1 tempsun           return end  "); 
     261a[259] = new Array("./ToBeReviewed/PLOTS/DESSINE/pltv.html", "pltv.pro", "", "       file_comments   Draw 2d plots with TV procedure      categories find a file   graphic      param DATA  in required     The field we want to display can be:      1  an array  If the array is not a 2D array  its mean along         the z and t direction will be automatically performed          as it is done in plt       2  a structure respecting all criterions specified by         litchamp pro  cf  IDL  xhelp litchamp       param MIN  in optional default min of DATA  on non masked points        param MAX  in optional default max of DATA  on non masked points        keyword BOTTOM  default 0    The lowest color index of the colors to be used      keyword BOXZOOM    Vector indicating the geographic zone on which we want to cut the map      If BOXZOOM has :   1 element : The extraction is made on  lon1  lon2  lat1  lat2  0 boxzoom 0    2 elements: The extraction is made on  lon1  lon2  lat1  lat2  boxzoom 0 boxzoom 1    4 elements: The extraction is made on  Boxzoom  0  max gdept  gdepw    5 elements: The extraction is made on  Boxzoom 0:3  0  Boxzoom 4    6 elements: The extraction is made on Boxzoom     Where lon1  lon2  lat1  lat2 are global variables defined at the last domdef       keyword C_NAN  default d n_colors  1 e6  the test to find the masked value is ge   abs mask 10  This is necessary to avoid the rounding errors      keyword NCOLORS  default d n_colors  tvplus  dist 100       history   Aug 2006: Sebastien Masson  smasson lodyc jussieu fr       version    Id: pltv pro 181 2006 09 15 08:24:36Z smasson          PRO pltv  data  min  max  BOTTOM   bottom  BOXZOOM   boxzoom               C_MASK   c_mask  C_NAN   c_nan  MININ   minin  MAXIN   maxin               MASKVAL   maskval  NCOLORS   ncolors  NOINTERP   nointerp               _EXTRA   ex     compile_opt idl2  strictarrsubs      cm_general   for key_performance     tempsun   systime 1             for key_performance       I2  Reading of the field and checkup      IF n_elements minin  NE 0 THEN min   minin    IF n_elements maxin  NE 0 THEN max   maxin   IF size data   type  NE 8 THEN z2d   reform float data  ELSE z2d   data   IF size z2d   n_dimensions  NE 2 then BEGIN     if keyword_set boxzoom  then BEGIN       savedbox   1b       saveboxparam   boxparam4pltv dat      ENDIF     z2d   checkfield temporary z2d   plt  TYPE    xy  direc   direc  BOXZOOM   boxzoom       if z2d 0  EQ  1 then BEGIN        IF keyword_set savedbox  THEN restoreboxparam   boxparam4pltv dat        return     ENDIF   ENDIF   dtasize   size z2d   dimensions      def of ncolmax  bottom  topcol et ncolors     ncolmax    d n_colors  temporary z2d   c_nan  c_mask    ncolmax   1  ELSE cmask    ncolmax  1      z2d maskind    cmask   ENDIF    z2d   round temporary z2d     use byte type to save memory   z2d   byte temporary z2d            if NOT keyword_set overplot  then reinitplt   z   invert   placedessin   plt  posplot  posbar  _extra   ex     3  Drawing       xsize    p position 2     p position 0     ysize    p position 3     p position 1     IF  d name EQ  X  THEN BEGIN       xsize   ceil xsize    d x_size       ysize   ceil ysize    d y_size       z2d   congrid z2d  xsize  ysize     ENDIF        tv  z2d   p position 0   p position 1             xsize   xsize  ysize   ysize             normal  _EXTRA   ex       caption   display of these       axe   pltv  dtasize  _EXTRA   ex    legende  truemin  truemax   plt  DIREC   direc                 INTERVALLE   float max min topcol bottom                  _extra   ex    plot   0   0   noerase   nodata  xstyle   1  ystyle   1     IF keyword_set masked  THEN tracemask  msk  indgen dtasize 0  indgen dtasize 1      color bar      barrecouleur  0  min   max  10  bottom   bottom  position   posbar  ncolors    topcol bottom 1  _extra   ex   4  End of drawing     terminedessin  _extra ex      if keyword_set savedbox  THEN restoreboxparam   boxparam4pltv dat    if keyword_set key_performance  NE 0 THEN print   time pltv  systime 1 tempsun       return end"); 
     262a[260] = new Array("./ToBeReviewed/PLOTS/DESSINE/pltz.html", "pltz.pro", "", "             file_comments    Trace vertical graphs       categories    Graphics      param TAB    The field whose we want to make a vertical cut can be 2 kind of thing:           1  An 2d or 3d array             If the field is 2d  indicate  with the keyword BOXZOOM  geographic delineations of the boxzoom             If the field is 3d  we extract the section on we average possibly before to do the plot            2   a structure respecting all criterions specified by litchamp pro              See IDL  xhelp litchamp  The array contained in the structure must be 2 or 3d  See case 1      ces arguments ne sont pas obligatoires:      MAX: valeur maximum que l on veut prendre en compte dans le trace   des contours  Par defaut on prend le max de tab1  sur les pts mer     MIN: valeur minimum que l on veut prendre en compte dans le trace   des contours  Par defaut on prend le min de tab1  sur les pts mer       keyword BOXZOOM    Vector indicating the geographic zone on which we want to cut the map      If BOXZOOM has :   1 element : The extraction is made on  lon1  lon2  lat1  lat2  0 boxzoom 0    2 elements: The extraction is made on  lon1  lon2  lat1  lat2  boxzoom 0 boxzoom 1    4 elements: The extraction is made on  Boxzoom  0  max gdept  gdepw    5 elements: The extraction is made on  Boxzoom 0:3  0  Boxzoom 4    6 elements: The extraction is made on Boxzoom     Where lon1  lon2 lat1 lat2 are global variables defined at the last domdef       keyword CONTINTERVALLE    When CONTOUR is activated  it is the value between 2 isolines    traced by a trait  So it can be different from the one specified by INTERVALLE which     in this case  does not control colored isolines in color anymore  If there is noone    specified min  we choose a contour min which goes well with the specified interval     If this keyword is not specified  we trace 20 isolines from the min to the max        keyword CONTLABEL  type integer    When CONTOUR is activated  if n   is different of 0  choose the label type corresponding to n cases for    the traced by a traitisolines  To specify the type of label of the    colored contour  use LABEL      keyword CONTMAX  default max of the keyword CONTOUR  on ocean points    When CONTOUR is activated  max value we want to consider in the isoline    traced by a trait s line       keyword CONTMIN  default min of the keyword CONTOUR  on ocean points    When CONTOUR is activated  min value we want to consider in the isoline    traced by a trait s line        keyword CONTNLEVEL  default 20    When  CONTOUR is activated  it is the number of contours   traced by a trait for drawing  active if   CONTLABEL 0       keyword CONTOUR    If we want to trace contours of a different field than the one    whose we have the colored drawing  by example E P in color and QSR in contours     It must be a field respecting same characteristics than the argument number one of plt       keyword ENDPOINTS    keyword specifying that we want to make a vertical cut in diagonal  Then coordinated of extremities    of these one are defined by the 4 elements of the vector ENDPOINTS:  x1 y1 x2 y2  which are    coordinates        keyword INTERVALLE    Value of an internal between to isoline  If there is none specified min     we choose a min contour which goes well with the specified interval  If this keyword is not    specified  we trace 20 isoline from the min to the max  Comment: When CONTOUR is activated     INTERVALLE only specify the interval between 2 colored isoline  To specify the interval    between 2 isolines traced by a trait  use CONTINTERVALLE       keyword INV    Invert the color vector used to color the graph                   without use the black  the white and the used palette       keyword ZRATIO  default 2 3    When the drawing has a zoomed part  it is the size rapport between the zoomed part     hz  zoom height  and the whole drawing  ht  total height       keyword LABEL  default 0 type integer    It choose the label s type corresponding to cases in label pro    Comment: When CONTOUR is activated  it only specify the label s type for colored isolines     For these one traced by a trait  use CONTLABEL        keyword MAXIN    to specify the max value we want to plot with a keyword instead of with the   input parameter max  If max is defined by both  parameter and keyword  the   keyword is retained       keyword MININ    to specify the min value we want to plot with a keyword instead of with the   input parameter min  If min is defined by both  parameter and keyword  the   keyword is retained       keyword NLEVEL  default 20    Number of contour to draw by default  20  active if   LABEL 0 or is not specified        keyword NOTRI    To force not to use the triangulation  Beware  in this case  the    drawing only works if the grid is undeformed  It means that each point of a longitude    give one latitude and each point of a latitude give one longitude  except if we use    the keyword CELL_FILL 2     Comment: if the field contain points  values f_nan  then we even do a triangulation       keyword OVERPLOT    To make a plot over an other one     Comment: Contrarily to the use of CONTOUR or VECTEUR  the use of this keyword    does not the caption and or the color bar       keyword SIN    Activate this keyword if we want the x axis to be traced in sinus of the    latitude when we make a drawing f y       keyword STRICTFILL    Activate this keyword to that the filling of contours be    precisely done between the min and the max specified letting values inferior at the    specified min and values superior at the specified max in white       keyword STYLE  default style 0    Contour s style to adopt to draw isolines      keyword WDEPTH    To specify that the field is at W depth instead of T    depth  automatically activated if vargrid eq  W       keyword XZ   Force to make a cut following xz      keyword YZ   Force to make a cut following yz      keyword ZOOM   default 200m or max depth if it is inferior at 200m    Depth where i can make our maximum zoom       uses   common pro      history    Sebastien Masson  smasson lodyc jussieu fr    7 1999   Sebastien Masson 08 02 2000 checkfield and   notri keyword       version    Id: pltz pro 172 2006 09 11 07:11:26Z smasson        todo seb L 20   26  L 215   221           pro pltz  tab  giventype  givenmin  givenmax  BOXZOOM   boxzoom  CONTOUR   contour               ENDPOINTS   endpoints  INTERVALLE   intervalle  INV   inv  ZRATIO   zratio               CONTINTERVALLE   contintervalle  LABEL   label  CONTLABEL   contlabel               STYLE   style  CONTMAX   contmax  SIN   sin  TYPEIN   typein               CONTMIN   contmin  NLEVEL   nlevel  CONTNLEVEL   contnlevel               NOTRI   notri  USETRI   usetri  FILLXDIR   fillxdir               ZOOM   zoom  XZ   xz  YZ   yz  MININ   minin  MAXIN   maxin               STRICTFILL   strictfill  OVERPLOT   overplot  MASKFILL   maskfill               WDEPTH   wdepth  REALSECTION   realsection               _EXTRA   ex     include common     compile_opt idl2  strictarrsubs    cm_4mesh  cm_4data  cm_4ps   IF NOT keyword_set key_forgetold  THEN BEGIN  updatenew  updatekwd   ENDIF     tempsun   systime 1             For key_performance       1st part: initialization small calculations      Comment: we do not reinitializate when we call back plt in loop to use contour    if n_elements contour  ne 4 AND NOT keyword_set overplot  then reinitplt     if n_elements contour  ne 4 THEN saveboxparam   boxparam4pltz dat       Reading of the field      if n_elements giventype  NE 0 then type   giventype   if n_elements givenmin  NE 0 then min   givenmin   if n_elements givenmax  NE 0 then max   givenmax   if n_elements minin  NE 0 then min   minin   if n_elements maxin  NE 0 then max   maxin   if n_elements realsection  EQ 0 then realsection   1   IF n_elements usetri  EQ 0 THEN BEGIN     IF n_elements notri  NE 0 THEN usetri   2 notri ELSE usetri   1   ENDIF   no need of triangulation   IF usetri EQ 1 AND keyword_set realsection  THEN usetri   0   did we specify the type     if keyword_set typein  then BEGIN      if size type   type  NE 7 AND size type   type  NE 0 then begin       if n_elements min  NE 0 then max   min       min   type     endif     type   typein   ENDIF      checktypeminmax   pltz  TYPE   type  MIN   min  MAX   max         XZ   xz  YZ   yz  ENDPOINTS   endpoints  _extra   ex     if keyword_set endpoints  then begin     section  tab  z2d  glam  gphi  ENDPOINTS   endpoints  TYPE   type          BOXZOOM   boxzoom  DIREC   direc  WDEPTH   wdepth  _extra   ex     if z2d 0  EQ  1 AND n_elements contour  ne 4 then BEGIN        restoreboxparam   boxparam4pltz dat        return     ENDIF     nx   n_elements glam       ny   nx     if strupcase vargrid  EQ  W  then begin       gdep   gdepw firstzw:lastzw        nz   nzw     ENDIF ELSE BEGIN       gdep   gdept firstzt:lastzt        nz   nzt     ENDELSE     mask   z2d LE valmask 10    ENDIF ELSE BEGIN     z2d   checkfield tab   pltz  TYPE   type  BOXZOOM   boxzoom                          DIREC   direc  WDEPTH   wdepth  _extra   ex      if z2d 0  EQ  1 AND n_elements contour  ne 4 then BEGIN        restoreboxparam   boxparam4pltz dat        return     ENDIF     IF realsection EQ 1 THEN grille  mask  glam  gphi  gdep  nx  ny  nz  type   type  WDEPTH   wdepth       ELSE grille  mask  glam  gphi  gdep  nx  ny  nz  WDEPTH   wdepth   ENDELSE   IF size gdep   n_dimensions  EQ 2 THEN usetri   2     profmax    y range 0    profmin    y range 1    if not keyword_set zoom  then zoom   200   zoom   zoom 0    IF zoom LT profmin THEN zoom   profmax   if zoom GE vert2 then zoom   profmax   construction of the mask and of the axis   axis4pltz  type  mask  glam  gphi  gdep  XXAXIS   xxaxis  ZZAXIS   zzaxis  SIN   sin  ZRATIO   zratio  ZOOM   zoom  PROFMAX   profmax  PROFMIN   profmin  _extra   ex   to draw from bottom to top  avoid using cell_fill    z2d   reverse z2d  2      Determination of the mi:min and of the ma:max of z2d in the same way    as max: max and min: min for the drawing      nan   total finite z2d   nan   z2d    max   if n_elements maskfill  NE 0 then BEGIN     z2d   z2d mask masknan     if maskfill NE 0 then z2d   temporary z2d    maskfill 1b mask masknan    ENDIF     check the mask and the triangulation according to the grid type and    nan values  find the coordinates of the mask        if  where mask EQ 0 0  EQ  1 AND NOT keyword_set nan  then notri   1     if keyword_set notri  then trifield    1       ELSE trifield   triangule mask basic    if  usetri GE 1 AND  vargrid EQ  T  OR vargrid EQ  W        OR  usetri EQ 2 AND  vargrid NE  T  AND vargrid NE  W  THEN       trifield   triangule mask   basic      IF NOT keyword_set endpoints   THEN BEGIN     if keyword_set nan  then trinan   triangule masknan   basic  coinmonte   coinmontenan  coindescend   coindescendnan      maskorg   mask     decoupeterre  mask  glammsk  gphimsk  gdepmsk  type   type  WDEPTH   wdepth  REALSECTION   realsection     axis4pltz  type  mask  glammsk  gphimsk  gdepmsk  XXAXIS   xmask  ZZAXIS   zmask  SIN   sin  ZRATIO   zratio  ZOOM   zoom  PROFMAX   profmax  PROFMIN   profmin  _extra   ex   ENDIF ELSE BEGIN     xmask   xxaxis     zmask   zzaxis   ENDELSE      if  usetri GE 1 AND  vargrid NE  T  AND vargrid NE  W  THEN BEGIN      IF keyword_set realsection  THEN trimsk   triangule mask   basic        ELSE trimsk   triangule mask   basic  coinmonte   coinmontemask                                 coindescend   coindescendmask    ENDIF          dessin en lui meme     IF n_elements romszinfos  EQ 1 THEN BEGIN   add one line at bottom to have nicer plot  colors go until the ocean bottom      IF n_elements romszinfos h  NE 1 THEN BEGIN       CASE type OF          xz :romsh   moyenne romszinfos h   y           yz :romsh   moyenne romszinfos h   x        ENDCASE       IF nzt EQ jpk THEN BEGIN         z2d    z2d   z2d  jpk 1          zzaxis    zzaxis   romsh        ENDIF     ENDIF   ENDIF   pltbase  z2d  xxaxis  zzaxis  mask  xmask  zmask         level_z2d  colnumb  overplot   overplot         contour   contour  trichamp   trifield  trimsk   trimsk          c_linestyle   linestyle         c_labels   1 indgen n_elements level_z2d  MOD 2          c_thick   thick  unsur2   unsur2         maskorg   maskorg  masknan   masknan  trinan   trinan         coinmontenan   coinmontenan  coindescendnan   coindescendnan         coinmontemask   coinmontemask  coindescendmask   coindescendmask         REALSECTION   realsection  USETRI   usetri  _extra   ex     recall of pltz in loop when contour is activated     if n_elements contour  eq 4 then BEGIN   It is the second time I pass in pltt     contour    mietma: mi  ma  unit:varunit  inter:intervalle    I send back the min  the max and the unity     return   endif   if keyword_set contour  THEN BEGIN      pourlegende    1  1  1  1      oldattributs   saveatt      oldcolnumb   colnumb     pltz  contour  contmin  contmax  CONTOUR   pourlegende  ZRATIO   zratio           INTERVALLE   contintervalle  LABEL   contlabel  STYLE   style   noerase            NLEVEL   contnlevel  ZOOM   zoom  BOXZOOM   boxzoom  ENDPOINTS   endpoints           STRICTFILL   strictfill  REALSECTION   realsection  MASKFILL   maskfill           USETRI   usetri  WDEPTH   wdepth  _extra   ex     restoreatt  oldattributs     colnumb   oldcolnumb   ENDIF       3rd part: drawing of the frame  caption  colorbar      if keyword_set overplot  then BEGIN       y range     zoom  profmin    We get back on physic coordinates     plot   0   0   nodata   noerase  title     subtitle     xstyle   5  ystyle   5     GOTO  fini   endif     Caption   dysplay of them     legende  mi  ma  type  CONTOUR   pourlegende  INTERVALLE   intervalle  DIREC   direc  endpoints   endpoints  _EXTRA   ex   if type eq  yz  then xaxe    lataxe  else xaxe    lonaxe    if keyword_set sin  OR NOT key_onearth then xaxe       Frame applied by default   plot   xxaxis 0  xxaxis n_elements xxaxis 1   zratio   zratio   noerase         xstyle   1 4 keyword_set endpoints  AND  type EQ  xz  AND lat1 NE lat2  OR  type EQ  yz  AND lon1 NE lon2          xtickformat   xaxe  _extra   ex   Add of an axis in the case of we use endpoints   if keyword_set endpoints  then addaxe  endpoints  type  posfenetre  _EXTRA   ex     Y axis in 1 or 2 part     if n_elements ex  NE 0 then BEGIN    To do not put title anymore     if  where tag_names ex  EQ  TITLE 0  NE  1 then ex TITLE         To do not put subtitle anymore     if  where tag_names ex  EQ  SUBTITLE 0  NE  1 then ex SUBTITLE         To have just one ytitle     if  where tag_names ex  EQ  YTITLE 0  NE  1 then BEGIN        ytitle   ex YTITLE       ex YTITLE           endif   ENDIF   htotal   posfenetre 3 posfenetre 1    hzoom   1 zratio htotal   if zoom LT profmax then       plot   0   0   nodata   noerase  ystyle   1  yrange    profmax  zoom 0 001          position   posfenetre 0  0  0   hzoom  _extra   ex  title     subtitle     ytitle          y range     zoom  profmin      We get back in physic coordinates    plot   0   0   nodata   noerase  ystyle   1  _extra   ex         title     subtitle     ytitle     position   posfenetre 0  htotal hzoom  0  0      to write the ytitle      if  d name EQ  PS  then       xs    max page_size  min   mi 1 key_portrait    mi key_portrait d x_px_cm     ELSE xs    d x_size   if n_elements ytitle  NE 0 then  y title   ytitle   charsize   chkstru ex   ycharsize   extract    if charsize EQ  1 then charsize    p charsize   IF chkstru ex   charsize  THEN ex charsize   charsize   if chkstru ex   ytitle   extract  NE   then       decalage   string format    e10 3  profmax    decalage   float strmid decalage  strpos decalage   e 1    posy   posfenetre 1 1 htotal 2   posx   posfenetre 0 decalage 3 d x_ch_size charsize xs   xyouts  posx  posy   y title   normal  orientation   90  color   0  ALIGNMENT    5  charsize   charsize  _extra   ex      colorbar     colnumb   colnumb 0:ncontour 1 keyword_set strictfill    barrecouleur  colnumb  min   max   ncontour keyword_set strictfill 2                     position   posbar  _extra   ex       4th part: possible print     fini:   terminedessin  _extra   ex         sortie:   restoreboxparam   boxparam4pltz dat      if keyword_set key_performance  NE 0 THEN print   temps pltz  systime 1 tempsun    return end   "); 
     263a[261] = new Array("./ToBeReviewed/PLOTS/DESSINE/sbar_plot.html", "sbar_plot.pro", "", "             file_comments    Same thing that bar_plot but compatible with the whole environment  common pro included       categories Graphics      keyword COLORS  type vector    A vector  the same size as VALUES  containing the color index   to be used for each bar   If not specified  the colors are   selected based on spacing the color indices as widely as   possible within the available colors  specified by D N_COLORS       keyword COLORS  type integer    I gives color of all colorbars   contrarily to colors    which is a vector giving the color of each colorbar       keyword NOREINITPLT   We active it if we do not want environment variables  p   x   y   z    to be reinitializated by the procedure reinitplt      keyword _EXTRA   used to pass your keyword      uses   common pro      restrictions    If NOREINITPLT is not activated  all environment    variables  p   x   y   z are reinitializted by the procedure reinitplt      examples        IDL  sbar_plot  indgen 10 small    2 2 2 rempli        IDL  sbar_plot  indgen 10 small    2 2 3 noerase        IDL   ps      history   Sebastien Masson  smasson lodyc jussieu fr                         10 10 1999      version    Id: sbar_plot pro 163 2006 08 29 12:59:46Z navarro              PRO sbar_plot  Values  COLORS   colors  NOREINITPLT   noreinitplt  _extra   ex      compile_opt idl2  strictarrsubs    common   1  I reinitialize the graphic environment  variables  x   y et  p :     if NOT keyword_set NOREINITPLT  then reinitplt  _extra   ex    2  I place the drawing on the screen like on the postscript     IF chkstru ex   overplot EQ 0 THEN placedessin   autre  _extra   ex   3  Drawing     if n_elements COLORS  NE 0 then BEGIN       if n_elements COLORS  EQ n_elements Values  then col   colors          ELSE col   replicate colors 0  n_elements Values     ENDIF ELSE col   congrid indgen d n_colors   256  n_elements Values       bar_plot  Values  background    p background  colors   col                  xstyle   1  ystyle   1  _extra   ex   4  End of drawing     terminedessin  _extra ex      return end"); 
     264a[262] = new Array("./ToBeReviewed/PLOTS/DESSINE/scontour.html", "scontour.pro", "", "             File_comments   Same thing that contour but compatible with the whole environment  common pro included       categories    Graphics      keyword NOREINITPLT   We active it if we do not want environment variables  p   x   y   z    to be reinitilalizated by the procedure reinitplt       keyword _EXTRA   used to pass your keywords      uses   common pro      examples        IDL  z   dist 100          IDL  scontour  z  nlevels 10 small 1 2 1 xstyle 1 ystyle 1        IDL   ps      history Sebastien Masson  smasson lodyc jussieu fr                         10 10 1999       version    Id: scontour pro 163 2006 08 29 12:59:46Z navarro             PRO scontour  x  y  z  NOREINITPLT   noreinitplt  _EXTRA   ex     compile_opt idl2  strictarrsubs    common   1  I reinitializate the graphic environment  variables  x   y et  p :    if NOT keyword_set NOREINITPLT  then reinitplt  _extra   ex    2  i put the drawing on the screen like on the postcript    if ex contains norease and c_orientation keywords we force ex noerase   0   IF chkstru ex   overplot  EQ 0 THEN placedessin   autre  _extra   ex   fiddle when noerase is used with c_orentation    call contour with  nodata to get the graphic environment  then force   noerase   0 and overplot   1   IF size ex   type  EQ 8 THEN BEGIN   check if noerase is used with c_orentation     alltags   strlowcase tag_names ex      dummy   where alltags EQ  noerase  count1      dummy   where alltags EQ  c_orientation  count2      IF count1 count2 NE 0 THEN BEGIN        case n_params  OF         1:contour  x   nodata  _EXTRA   ex         2:contour  x  y   nodata  _EXTRA   ex         3:contour  x  y  z   nodata  _EXTRA   ex       endcase       ex noerase   0       ex   get_extra overplot  _extra   ex        noerase_orientation   1     ENDIF    ENDIF    3  je fais mon joli dessin    case n_params  OF     1:contour  x  xstyle   1  ystyle   1  _EXTRA   ex     2:contour  x  y  xstyle   1  ystyle   1  _EXTRA   ex     3:contour  x  y  z  xstyle   1  ystyle   1  _EXTRA   ex   ENDCASE   fiddle when noerase is used with c_orentation  draw the contour axis   IF keyword_set noerase_orientation   THEN BEGIN     ex noerase   1     ex overplot   0     case n_params  OF       1:contour  x  xstyle   1  ystyle   1   nodata  _EXTRA   ex       2:contour  x  y  xstyle   1  ystyle   1   nodata  _EXTRA   ex       3:contour  x  y  z  xstyle   1  ystyle   1   nodata  _EXTRA   ex     ENDCASE   ENDIF   4  End of drawing   terminedessin  _extra   ex     return end"); 
     265a[263] = new Array("./ToBeReviewed/PLOTS/DESSINE/splot.html", "splot.pro", "", "            file_comments    Same thing that plot but compatible with the whole environment  common pro included       categories    Graphics      keyword NOREINITPLT   We active it if we do not want environment variables  p   x   y   z    to be reinitilalizated by the procedure reinitplt       keyword _EXTRA   used to pass your keywords      uses   common pro      restrictions    If NOREINITPLT is not activated  all environment    variables  p   x   y   z are reinitializted by the procedure reinitplt      examples        IDL  splot  indgen 10 ystyle 1 small 1 2 1 portrait        IDL  splot   indgen 10 ystyle 1 small 1 2 2 noerase        IDL   ps      history   Sebastien Masson  smasson lodyc jussieu fr                         18 10 1999      version    Id: splot pro 163 2006 08 29 12:59:46Z navarro             PRO splot   x  y  NOREINITPLT   noreinitplt  _EXTRA   ex     compile_opt idl2  strictarrsubs    common   1  I reinitializate the graphic environment  les variables  x   y et  p :     if NOT keyword_set NOREINITPLT  then reinitplt  _extra   ex    2  i put the drawing on the screen like on the postcript     placedessin   autre  _extra   ex   3  Drawing    if n_elements y  EQ 0 then plot   x  xstyle   1  ystyle   1  _EXTRA   ex      ELSE plot   x  y  xstyle   1  ystyle   1  _EXTRA   ex   4  End of drawing     terminedessin  _extra ex       return end"); 
     266a[264] = new Array("./ToBeReviewed/PLOTS/DESSINE/tvplus.html", "tvplus.pro", "", "             file_comments   Enhanced version of tvscl      categories quick exploration of 2D arrays      INPUTS:       param Z2D  in required    2D array to visualize      param CELLSIZE  in optional    This is the size  in pixel  of the square   representing 1 array element  By default  this size is computed   automatically in order that the size of the plotting window do   not exceed the screen size  If the user specify a large value   of cellsize that forces tvplus to create a window larger than   the screen  a  scrolling window  will be displayed instead of a   regular window  Unfortunately the nice functionnalities of tvplus   are not coded for  scrolling window  case       keyword BOTTOM  default 1    The lowest color index of the colors to be used      keyword C_NAN  default d n_colors  1 e6  the test to find the masked value is ge   abs mask 10  This is necessary to avoid the rounding errors      keyword MIN   Scalar used to specify the min value to be drawn       keyword MAX   Scalar used to specify the max value to be drawn       keyword NCOLORS  default d n_colors  tvplus  dist 100       history   Sebastien Masson  smasson lodyc jussieu fr                          18 12 98   Aug 2005: quick cleaning   english      version    Id: tvplus pro 163 2006 08 29 12:59:46Z navarro             PRO tvplus  z2d  cellsize  BOTTOM   bottom  C_MASK   c_mask  C_NAN   c_nan  WINDOW   window                 MIN   min  MAX   max  MASK   mask  OFFSET   offset  NOUSEINFOS   NOUSEINFOS                 NCOLORS   ncolors  NOINTERP   nointerp  _EXTRA   ex       compile_opt idl2  strictarrsubs     IF n_elements z2d  EQ 0 THEN return   arr   reform float z2d      check the size of the input array      if  size arr 0  NE 2 then begin     ras   report Input array must have only 2 dimensions and not   strtrim size arr   n_dimensions  1      return   endif     def of ncolmax  bottom  topcol et ncolors     ncolmax    d n_colors  arr     truemin   min   ENDIF ELSE truemin   min arr    if n_elements max  NE 0 then BEGIN      arr   arr  floor x cellsize   floor y cellsize   floor x cellsize   floor y cellsize   floor x2 cellsize   floor y2 cellsize     size arr 2 cellsize 1          x     x  x2    x    x sort x          y     y  y2    y    y sort y          IF keyword_set OFFSET  THEN offset    x 0  y 0 offset ELSE offset    x 0  y 0          tvplus  z2d x 0 :x 1  y 0 :y 1    WINDOW   window  MIN   min  MAX   max                     MASK   mask  C_MASK   c_mask  C_NAN   c_nan   NOUSEINFOS  OFFSET   OFFSET                     NCOLORS   ncolors  NOINTERP   nointerp  BOTTOM   bottom  _EXTRA   ex         return       END       ELSE:     endcase   ENDWHILE      x   xenvsauve    y   yenvsauve    p   penvsauve    x range   1 0  nx cellsize 5 offset 0     y range   1 0  ny cellsize 5 offset 1      return end"); 
     267a[265] = new Array("./ToBeReviewed/PLOTS/DIVERS/addaxe.html", "addaxe.pro", "", "             file_comments   Add an axis when we do an oblique section in pltz  pltt   or plt1d      categories   Graphics      param ENDPOINTS  in required    Coordinate of extremities of the section       param TYPE  in required type string    A string of two characters specifying the type of plot we do      param POSFENETRE  in required type vector    The vector  p position corresponding to the frame position of    the drawing part of the plot       uses   common pro      history   Sebastien Masson  smasson lodyc jussieu fr       version    Id: addaxe pro 163 2006 08 29 12:59:46Z navarro             PRO addaxe  endpoints  type  posfenetre  _EXTRA   ex     compile_opt idl2  strictarrsubs    common      IF strpos type   x  NE  1 THEN BEGIN       IF endpoints 1  EQ endpoints 3  THEN return       IF key_onearth THEN BEGIN          formeaxe0    lonaxe          formeaxe1    lataxe          titreaxe    latitude        ENDIF ELSE BEGIN          formeaxe0             formeaxe1             titreaxe    j index        ENDELSE       range    endpoints 1  endpoints 3        if endpoints 2  LT endpoints 0  THEN range   reverse range     ENDIF ELSE BEGIN       IF endpoints 0  EQ endpoints 2  THEN return       IF key_onearth THEN BEGIN          formeaxe0    lataxe          formeaxe1    lonaxe          titreaxe    longitude        ENDIF ELSE BEGIN          formeaxe0             formeaxe1             titreaxe    i index        ENDELSE       range    endpoints 0  endpoints 2        if endpoints 3  LT endpoints 1  THEN range   reverse range     ENDELSE    if type EQ  yt  then BEGIN       axis yaxis 0 ytickformat formeaxe0 color 0 ystyle   1  _EXTRA   ex       axis yaxis 1 ytickformat formeaxe1 color 0 ystyle   1 ytitle titreaxe  yrange   range  _EXTRA   ex    ENDIF ELSE BEGIN       axis xaxis 0 xtickformat formeaxe0 color 0 xstyle   1 _EXTRA   ex       axis xaxis 1 xtickformat formeaxe1 color 0 xstyle   1 xtitle titreaxe  xrange   range  _EXTRA   ex    ENDELSE       return end"); 
     268a[266] = new Array("./ToBeReviewed/PLOTS/DIVERS/autoscale.html", "autoscale.pro", "", "             file_comments    We give a min and a max  and the procedure send back    the good contour interval and labels s value       categories    Graphics      param MIN  in required    A reel number specifying above what value we want to trace a contour      param MAX  in required    A reel number specifying below what value we want to trace a contour      param CI   out type real    It is a reel number giving the contour interval  Use it in CONTOUR with the keyword LEVEL       restrictions   CI is a multiple of the unity in unity log of 10    It force the number of contour to be even       history   G  Roullet   aout 99  gr lodyc jussieu fr       version    Id: autoscale pro 163 2006 08 29 12:59:46Z navarro             PRO autoscale  min  max  ci      Estimation of a first CI  notice the presence of the floor  Inferior round    This CI is a multiple of the unity in unity log of 10        compile_opt idl2  strictarrsubs       ci    max min 20      ci   10 floor alog10 ci       n   0     ci0   ci       coef    2  2 5  5  10      We test differents CI  contour intervals  i e  1  2  2 5  5 and 10   until the number of contour is inferior to 30        WHILE ceil max min ci  GE 30 DO BEGIN            ci   ci0 coef n            n   n 1     ENDWHILE       min   floor min ci 2 ci 2     max   ceil max ci 2 ci 2          nlevels   round max min ci            We force the number of contour to be even       IF nlevels MOD 2 EQ 1 THEN BEGIN            nlevels   nlevels 1           max   max ci     END    END     "); 
     269a[267] = new Array("./ToBeReviewed/PLOTS/DIVERS/axis4pltz.html", "axis4pltz.pro", "", "             file_comments   compute the mask and the axis for a vertical section      param MASK  in required     3d mask              param GLAM  in required    2d longitude        param GPHI  in required    2d latitude      param Z  in required    1d depth      keyword XXAXIS    to get the xaxis we need to use in pltbase            keyword ZZAXIS    to get the yaxis we need to use in pltbase      keyword SIN    Activate this keyword if we want the x axis to be traced in sinus of the    latitude when we make a drawing f y       keyword ZRATIO  default 2 3    When the drawing has a zoomed part  it is the size rapport between the zoomed part     hz  zoom height  and the whole drawing  ht  total height       keyword _EXTRA   used to pass your keywords       Others: see pltz         history   Sebastien Masson  smasson lodyc jussieu fr                         June 24  2002      version    Id: axis4pltz pro 172 2006 09 11 07:11:26Z smasson              PRO axis4pltz  type  mask  glam  gphi  z  XXAXIS   xxaxis  ZZAXIS   zzaxis  SIN   sin  ZRATIO   zratio  ZOOM   zoom  PROFMAX   profmax  PROFMIN   profmin  _extra   ex     include common     compile_opt idl2  strictarrsubs    cm_4mesh   IF NOT keyword_set key_forgetold  THEN BEGIN  updatekwd   ENDIF        define the mask used for this section     if mask 0  NE  1 AND  size mask 0  NE 2 then begin     if type EQ  xz  then mask   total mask  2    1       ELSE mask   total mask  1    1   endif     define xxaxis and yyaxis the axis used for this section     nx    size glam 1    CASE  size gphi 0  OF     1:ny    size gphi 1      2:ny    size gphi 2    ENDCASE   CASE  size z 0  OF     1:nz    size z 1      2:nz    size z 2    ENDCASE     if type eq  yz  then BEGIN      IF  size gphi 0  EQ 1 then xxaxis   gphi ELSE BEGIN        IF keyword_set key_irregular  THEN BEGIN          cln    where gphi EQ max gphi 0          xxaxis   reform gphi cln MOD nx          ENDIF ELSE xxaxis   reform gphi 0        ENDELSE     if keyword_set sin  then xxaxis   sin pi 180 xxaxis    ENDIF ELSE BEGIN     xxaxis   glam  0    ENDELSE    zzaxis   z     We project the z axis in  0 1      if not keyword_set zratio  then zratio   2 3   if zoom ge profmax then zratio   1    if zoom LT profmax then begin     mp   projsegment profmin  zoom   0  zratio   mp      small   where zzaxis LE zoom      IF small 0  NE  1 THEN zzaxis small    mp 0 zzaxis small mp 1      mp   projsegment zoom  profmax   zratio  1   mp      big   where zzaxis GE zoom      IF big 0  NE  1 THEN zzaxis big    mp 0 zzaxis big mp 1    ENDIF ELSE BEGIN     mp   projsegment profmin  profmax   0  1   mp      zzaxis   mp 0 zzaxis mp 1    ENDELSE    to draw from bottom to top  avoid using cell_fill    CASE size zzaxis   n_dimensions  OF     1:zzaxis   reverse zzaxis       2:zzaxis   reverse zzaxis  2     ENDCASE   if mask 0  NE  1 then mask   reverse mask  2     return end"); 
     270a[268] = new Array("./ToBeReviewed/PLOTS/DIVERS/barrecouleur.html", "barrecouleur.pro", "", "             file_comments   Overlayeur of colorbar      categories   Utilities      param COLNUMB        param CLBINF        param CLBSUP        param CLBDIV        keyword NOCOLORBAR         keyword CB_TITLE         keyword NOFILL         keyword COLOR_c         keyword MIN   Scalar used to specify the min value to be drawn       keyword MAX   Scalar used to specify the max value to be drawn       keyword DIVISIONS         keyword CB_SUBTITLE         keyword POST         keyword _EXTRA   Used to pass your keywords      restrictions pass all argument we want thanks to _extra      history   Sebastien Masson  smasson lodyc jussieu fr                          23 12 98      version    Id: barrecouleur pro 163 2006 08 29 12:59:46Z navarro        todo seb: mettre les keyword et les param         PRO barrecouleur  colnumb  clbinf  clbsup  clbdiv                       NOCOLORBAR   nocolorbar  CB_TITLE   cb_title                       NOFILL   nofill  COLOR_c   color_c                       MIN   min  MAX   max  divisions   divisions                       CB_SUBTITLE   cb_subtitle  POST   post  _extra   ex       compile_opt idl2  strictarrsubs    cm_general   IF NOT keyword_set key_forgetold  THEN BEGIN  updatekwd   ENDIF     if keyword_set min  then clbinf   min   if keyword_set max  then clbsup   min   if keyword_set divisions  THEN  clbdiv   divisions   nocolorbar   keyword_set nocolorbar    keyword_set nofill                     keyword_set color_c          def_myuniquetmpdir     IF lmgr demo  EQ 1 THEN BEGIN   if we are in demo mode  we cannot save the parameters in a temporary file   cm_demomode_used        colorbarparam    colnumb:colnumb  clbinf:clbinf                           clbsup:clbsup  clbdiv:clbdiv     ENDIF ELSE BEGIN       save  colnumb  clbinf  clbsup  clbdiv               file   myuniquetmpdir    4colorbar dat     ENDELSE      if keyword_set nocolorbar  then return       ancienx    x    ancieny    y    ancienp    p    reinitplt     x style   1     y style   1        colorbar  cb_color   0  cb_charsize   ancienp charsize            pscolor   keyword_set post  division   clbdiv            min   clbinf  max   clbsup            cb_title   cb_title  discret   colnumb  _extra   ex       x  ancienx     y  ancieny     p  ancienp      return end"); 
     271a[269] = new Array("./ToBeReviewed/PLOTS/DIVERS/checkfield.html", "checkfield.pro", "", "     file_comments           categories          param TYPE  in required type string    A string of two characters specifying the type of plot we do      param N1  in required type integer    Number of elements in the first dimension      param N2  in required type integer    Number of elements in the second dimension      param NAME  in optional type string    It gives the name of the file to be opened  If NAME   does not contain the separating character of directories   under   unix for example  the file will be looked for in the current directory       returns          restrictions          examples        history         version    Id: checkfield pro 163 2006 08 29 12:59:46Z navarro     FUNCTION err_1d  type  n1  name  n2     compile_opt idl2  strictarrsubs     return  report Error in     type     type plot with a 1D input array:                         the number of elements of the input vector  strtrim n1  1                           is not equal to     name      strtrim n2  1   simple  END        file_comments           categories          param TYPE  in required type string    A string of two characters specifying the type of plot we do      param SZ  in optional default defined by grille pro         param NX  in optional default defined by grille pro         param NY  in optional default defined by grille pro          param NZ          returns          restrictions          examples        history         version    Id: checkfield pro 163 2006 08 29 12:59:46Z navarro     FUNCTION err_2d  type  sz  nx  ny  nz     compile_opt idl2  strictarrsubs      cm_4mesh    cm_4cal   return  report Error in     type     type plot with a 2D input array:                         the array dimensions     tostr sz 1:2      are incompatible                         with the the domain dimensions                          jpi nx  jpj ny  jpk nz  jpt                            strtrim jpi  1        strtrim nx  1                              strtrim jpj  1        strtrim ny  1                              strtrim jpk  1        strtrim nz  1                              strtrim jpt  1       simple  END        file_comments           categories          param TYPE  in required type string    A string of two characters specifying the type of plot we do      param SZ  in optional default defined by grille pro         param NX  in optional default defined by grille pro         param NY  in optional default defined by grille pro          param NZ          returns          restrictions          examples        history         version    Id: checkfield pro 163 2006 08 29 12:59:46Z navarro     FUNCTION err_3d  type  sz  nx  ny  nz     compile_opt idl2  strictarrsubs      cm_4mesh    cm_4cal   return  report Error in     type     type plot with a 3D input array:                         the array dimensions     tostr sz 1:3      are incompatible                         with the the domain dimensions                          jpi nx  jpj ny  jpk nz  jpt                            strtrim jpi  1        strtrim nx  1                              strtrim jpj  1        strtrim ny  1                              strtrim jpk  1        strtrim nz  1                              strtrim jpt  1       simple  END              file_comments   In input of plt  pltz  pltt and plt1d  it check that the field give    a size compatible with the domain and  if needed  average to give us    a 2d array if we make a plot of the type:  xy   xz   xt   yz   yt       zt  or a 1d array if we make a plot of the type:  x   y   z   t       categories   Graphics       param FIELD  in required type field    It respect litchamp pro s criterions  See IDL xhelp litchamp       param PROCEDURE  in required          keyword TYPE        keyword NOQUESTION        keyword BOXZOOM  type vector    Vector indicating the geographic zone on which we want to cut the map      If BOXZOOM has :   1 element : The extraction is made on  lon1  lon2  lat1  lat2  0 boxzoom 0    2 elements: The extraction is made on  lon1  lon2  lat1  lat2  boxzoom 0 boxzoom 1    4 elements: The extraction is made on  Boxzoom  0  max gdept  gdepw    5 elements: The extraction is made on  Boxzoom 0:3  0  Boxzoom 4    6 elements: The extraction is made on Boxzoom     Where lon1  lon2 lat1 lat2 are global variables defined at the last domdef       keyword WDEPTH   to specify that the field is at W depth instead of T    depth  automatically activated if vargrid eq  W        keyword VECTEUR type vetcor    It is a structure composed by 2 elements containing the 2 fields U   and V of values of the zonal and meridian component of the vector of the fields   to draw  These fields can be an array or a structure          For example: vecteur matriceu:lec unsurface matricev:lec vnsurface          Comment: name of elements of vectors are inconsequential          vecteur u:lec unsurface v:lec vnsurface  is also appropriated       keyword _EXTRA   used to pass your keywords      keyword DIREC           uses    common pro      history   Sebastien Masson  smasson lodyc jussieu fr                         08 02 2000      version    Id: checkfield pro 163 2006 08 29 12:59:46Z navarro        todo seb: mettre les param              FUNCTION checkfield  field  procedure  TYPE   type  BOXZOOM   boxzoom  DIREC   direc  NOQUESTION   noquestion  VECTEUR   vecteur  WDEPTH   wdepth  _EXTRA   ex       compile_opt idl2  strictarrsubs     include commons  cm_4mesh  cm_4cal  cm_4data   IF NOT keyword_set key_forgetold  THEN BEGIN  updatenew  updatekwd   ENDIF     I1  Reading of the field     if n_elements field  EQ 0 then return  report field undefined    arr   litchamp field    first check   IF n_elements arr  EQ 1 THEN BEGIN     if arr EQ  1 then         return  report Error: input array    1  Maybe the reading did ont perform well   simple        ELSE return  report Error: input array is a scalar   simple         ENDIF   nan   total finite arr   nan    firstzw 1        lastzw    lastzw 1    firstzt 1        lastzt    lastzt 1     jpk 1        nzt   lastzt   firstzt   1     ENDELSE      updateold   ENDIF   make the automatic definition of type for pltz if type is not specified    IF type EQ  z  AND procedure EQ  pltz  THEN       if  lon2 lon1  gt  lat2 lat1  then type    xz  else type    yz    make the automatic definition of type for pltt if type is not specified    IF type EQ  unkownpltt  AND procedure EQ  pltt  THEN       if  lon2 lon1  gt  lat2 lat1  then type    xt  else type    yt      verification of the input array size and the value of the type     grille   1   1   1   1  nx  ny  nz  firstx  firsty         firstz  lastx  lasty  lastz  WDEPTH   wdepth     basic checks     CASE 1 OF     nx EQ 1: IF strpos type   x  NE  1 THEN return  report Error: impossible to make a     type     type plot with nx   1    simple      ny EQ 1: IF strpos type   y  NE  1 THEN return  report Error: impossible to make a     type     type plot with ny   1    simple      nz EQ 1: IF strpos type   z  NE  1 THEN return  report Error: impossible to make a     type     type plot with nz   1    simple      jpt EQ 1: IF strpos type   t  NE  1 THEN return  report Error: impossible to make a     type     type plot with jpt   1    simple      ELSE:   ENDCASE     is the size of the array compatible with teh domain      arr   fitintobox temporary arr  nx  ny  nz  firstx  firsty         firstz  lastx  lasty  lastz      sz   size arr    case sz 0  of       0:return  arr       1:BEGIN       nele   n_elements arr        case type of          t :if jpt NE nele THEN return  err_1d type  nele   jpt  jpt           x :IF  nx NE nele THEN return  err_1d type  nele    nx   nx           y :IF  ny NE nele THEN return  err_1d type  nele    ny   ny           z :IF  nz NE nele THEN return  err_1d type  nele    nz   nx          ELSE:return  report Error:                                    Impossible to make a  type  plot with a 1D array   simple        ENDCASE     END        2:BEGIN       case type of          x :BEGIN           case 1 of             sz 1  EQ nx AND sz 2  EQ ny:direc    y    xy array             sz 1  EQ nx AND ny EQ 1 AND sz 2  EQ nz:direc    z    x y z array             sz 1  EQ nx AND sz 2  EQ jpt:direc    t    xt array             ELSE:return  err_2d type  sz  nx  ny  nz            endcase         end          y :BEGIN           case 1 of             sz 1  EQ nx AND sz 2  EQ ny:direc    x    xy array             nx EQ 1 AND sz 1  EQ ny AND sz 2  EQ nz:direc    z     x yz array             sz 1  EQ ny AND sz 2  EQ jpt:direc    t    yt array             ELSE:return  err_2d type  sz  nx  ny  nz            endcase         END          z :BEGIN           case 1 of             sz 1  EQ nx AND ny EQ 1 AND sz 2  EQ nz:direc    x    x y z array             nx EQ 1 AND sz 1  EQ ny AND sz 2  EQ nz:direc    y     x yz array             sz 1  EQ nz AND sz 2  EQ jpt:direc    t    zt array             ELSE:return  err_2d type  sz  nx  ny  nz            endcase         END          t :BEGIN           case 1 OF             sz 1  EQ nx AND sz 2  EQ jpt:direc    x    xt array             nx EQ 1 AND sz 1  EQ ny AND sz 2  EQ jpt:direc    y     x yt array             nx EQ 1 AND ny EQ 1 AND sz 1  EQ nz AND sz 2  EQ jpt:direc    z     x y zt array             ELSE:return  err_2d type  sz  nx  ny  nz            ENDCASE         END          xy :IF sz 1  NE nx OR sz 2  ne  ny THEN return  err_2d type  sz  nx  ny  nz    xy array          xz :IF sz 1  NE nx OR sz 2  ne  nz THEN return  err_2d type  sz  nx  ny  nz    xz array          yz :IF sz 1  NE ny OR sz 2  NE  nz THEN return  err_2d type  sz  nx  ny  nz    yz array          xt :IF sz 1  NE nx OR sz 2  NE jpt THEN return  err_2d type  sz  nx  ny  nz    xt array          yt :IF sz 1  NE ny OR sz 2  NE jpt THEN return  err_2d type  sz  nx  ny  nz    yt array          zt :IF sz 1  NE nz OR sz 2  NE jpt THEN return  err_2d type  sz  nx  ny  nz    zt array       ENDCASE     END        3:BEGIN       case type of          x :BEGIN           case 1 of             sz 1  EQ nx AND sz 2  EQ ny AND sz 3  EQ nz:direc    yz    xyz array             sz 1  EQ nx AND ny EQ 1 AND sz 2  EQ nz AND sz 3  EQ jpt:direc    zt    x y zt array             sz 1  EQ nx AND sz 2  EQ ny AND sz 3  EQ jpt:direc    yt    xyt array             ELSE:return  err_3d type  sz  nx  ny  nz            endcase         END          y :BEGIN           case 1 of             sz 1  EQ nx AND sz 2  EQ ny AND sz 3  EQ nz:direc    xz    xyz array             nx EQ 1 AND sz 1  EQ ny AND sz 2  EQ nz AND sz 3  EQ jpt:direc    zt     x yzt array             sz 1  EQ nx AND sz 2  EQ ny AND sz 3  EQ jpt:direc    xt    xyt array             ELSE:return  err_3d type  sz  nx  ny  nz            endcase         END          z :BEGIN           case 1 of             sz 1  EQ nx AND sz 2  EQ ny AND sz 3  EQ nz:direc    xy    xyz array             nx EQ 1 AND sz 1  EQ ny AND sz 2  EQ nz AND sz 3  EQ jpt:direc    yt     x yzt array             sz 1  EQ nx AND ny EQ 1 AND sz 2  EQ nz AND sz 3  EQ jpt:direc    xt    x y zt array             ELSE:return  err_3d type  sz  nx  ny  nz            endcase         END          t :BEGIN           case 1 of             sz 1  EQ nx AND sz 2  EQ ny AND sz 3  EQ jpt:direc    xy    xyt array             nx EQ 1 AND sz 1  EQ ny AND sz 2  EQ nz AND sz 3  EQ jpt:direc    yz     x yzt array             sz 1  EQ nx AND ny EQ 1 AND sz 2  EQ nz AND sz 3  EQ jpt:direc    xz    x y zt array             ELSE:return  err_3d type  sz  nx  ny  nz            endcase         END          xy :BEGIN           case 1 OF             sz 1  EQ nx AND sz 2  EQ ny AND sz 3  EQ  nz:direc    z    xyz array             sz 1  EQ nx AND sz 2  EQ ny AND sz 3  EQ jpt:direc    t    xyt array             ELSE:return  err_3d type  sz  nx  ny  nz            endcase         END          xz :BEGIN           case 1 of             sz 1  EQ nx AND sz 2  EQ ny AND sz 3  EQ  nz:direc    y    xyz array             sz 1  EQ nx AND ny EQ 1 AND sz 2  EQ nz AND sz 3  EQ jpt:direc    t    x y zt             ELSE:return  err_3d type  sz  nx  ny  nz            endcase         END          yz :BEGIN           case 1 of             sz 1  EQ nx AND sz 2  EQ ny AND sz 3  EQ  nz:direc    x    xyz array             nx EQ 1 AND sz 1  EQ ny AND sz 2  EQ nz AND sz 3  EQ jpt:direc    t     x yzt             ELSE:return  err_3d type  sz  nx  ny  nz             endcase         END          xt :BEGIN           case 1 of             sz 1  EQ nx AND sz 2  EQ ny AND sz 3  EQ jpt:direc    y    xyt array             sz 1  EQ nx AND ny EQ 1 AND sz 2  EQ nz AND sz 3  EQ jpt:direc    z    x y zt array             ELSE:return  err_3d type  sz  nx  ny  nz             endcase         END          yt :BEGIN           case 1 of             sz 1  EQ nx AND sz 2  EQ ny AND sz 3  EQ jpt:direc    x    xyt array             nx EQ 1 AND sz 1  EQ ny AND sz 2  EQ nz AND sz 3  EQ jpt:direc    z     x yzt array             ELSE:return  err_3d type  sz  nx  ny  nz             endcase         END          zt :BEGIN           case 1 of             sz 1  EQ nx AND ny EQ 1 AND sz 2  EQ nz AND sz 3  EQ jpt:direc    x    x y zt array             nx EQ 1 AND sz 1  EQ ny AND sz 2  EQ nz AND sz 3  EQ jpt:direc    y     x yzt array             ELSE:return  err_3d type  sz  nx  ny  nz             ENDCASE         END        ENDCASE      END        4:BEGIN        CASE type OF          x :direc    yzt           y :direc    xzt           z :direc    xyt           t :direc    xyz           xy :direc    zt           xz :direc    yt           yz :direc    xt           xt :direc    yz           yt :direc    xz           zt :direc    xy        ENDCASE      END   ENDCASE     IF keyword_set direc  THEN BEGIN     IF strpos direc   t  NE  1 OR strpos type   t  NE  1 THEN         arr   grossemoyenne temporary arr  direc  boxzoom   localbox                               NAN   nan   NODOMDEF  WDEPTH   wdepth  _extra   ex        ELSE arr   moyenne temporary arr  direc  boxzoom   localbox                            NAN   nan   NODOMDEF  WDEPTH   wdepth  _extra   ex    ENDIF           RETURN  arr END"); 
     272a[270] = new Array("./ToBeReviewed/PLOTS/DIVERS/checktypeminmax.html", "checktypeminmax.pro", "", "     file_comments        categories        param PROCEDURE        keyword TYPE        keyword MIN        keyword MAX        keyword XY        keyword XZ        keyword YZ        keyword XT        keyword YT        keyword ZT        keyword TT        keyword XX        keyword YY        keyword ZZ        keyword XINDEX        keyword YINDEX        keyword ENDPOINTS        keyword _EXTRA   Used to pass your keywords      returns        uses   common pro      restrictions        examples        history   Sebastien Masson  smasson lodyc jussieu fr       version    Id: checktypeminmax pro 199 2006 12 13 07:47:14Z smasson        todo seb       PRO checktypeminmax  procedure  TYPE   type  MIN   min  MAX   max  XY   xy                          XZ   xz  YZ   yz  XT   XT  YT   YT  ZT   zt                          TT   tt  XX   xx  YY   yy  ZZ   zz                          XINDEX   xindex  YINDEX   yindex                          ENDPOINTS   endpoints  _extra   ex   compile_opt idl2  strictarrsubs    common      case size type   type  of       0:       7:       ELSE:BEGIN          vraimin   type          case size min   type  of             0:BEGIN                 min   vraimin                type   0             END             7:BEGIN                 type   min                min   vraimin             end             ELSE:BEGIN                case size max   type  of                   0:BEGIN                      max   min                      min   vraimin                      type   0                   END                   7:BEGIN                       type   max                      max   min                      min   vraimin                   end                   ELSE:BEGIN                      rien   report Probleme dans la definition des arguments en entree de                                         procedure   chkwidget                       return                   end                endcase             end          endcase       end    endcase      if keyword_set xy  then type    xy     if keyword_set xz  then type    xz     if keyword_set yz  then type    yz     if keyword_set xt  then type    xt     if keyword_set yt  then type    yt     if keyword_set zt  then type    zt     if keyword_set tt  then type    t     if keyword_set xx  then type    x     if keyword_set yy  then type    y     if keyword_set zz  then type    z       if keyword_set type  then begin      if type EQ  plt  then type          if type EQ  pltz  then type          if type EQ  pltt  then type          if type EQ  plt1d  then type        endif     determination du type de plot que l on veut faire      if NOT keyword_set type  then BEGIN       case procedure of          plt :type    xy           pltz :BEGIN           if keyword_set endpoints  then BEGIN              lon1   min endpoints 0  endpoints 2  max   lon2              lat1   min endpoints 1  endpoints 3  max   lat2              if  lon2 lon1  gt  lat2 lat1  then type    xz  else type    yz            ENDIF ELSE type    z          END          pltt :BEGIN           if keyword_set endpoints  then BEGIN              lon1   min endpoints 0  endpoints 2  max   lon2              lat1   min endpoints 1  endpoints 3  max   lat2              lat2   max endpoints 1  endpoints 3              if  lon2 lon1  gt  lat2 lat1  then type    xt  else type    yt            ENDIF ELSE type    unkownpltt          END          plt1d :BEGIN           if keyword_set endpoints  then BEGIN              lon1   min endpoints 0  endpoints 2  max   lon2              lat1   min endpoints 1  endpoints 3  max   lat2              if  lon2 lon1  gt  lat2 lat1  then type    x  else type    y            ENDIF ELSE BEGIN             type                 WHILE type NE  x  AND type NE  y  AND type NE  z  AND type NE  t  DO BEGIN               type   xquestion What kind of plot do you want to do  x y z ou t                                       chkwidget                type   strlowcase type              endwhile           ENDELSE         END       endcase     ENDIF      WHILE type NE  xy  AND type NE  xz  AND type NE  yz          AND type NE  xt  AND type NE  yt  AND type NE  zt          AND type NE  t  AND type NE  x  AND type NE  y          AND type NE  z  AND type NE  unkownpltt  DO BEGIN       type   xquestion What kind of plot do you want to do  xy xz yz xt yt zt t x y z                                 chkwidget        type   strlowcase type      ENDWHILE               return   end"); 
     273a[271] = new Array("./ToBeReviewed/PLOTS/DIVERS/determineminmax.html", "determineminmax.pro", "", "             file_comments   Determine the min and the max of a mask array      categories    Plotting      param TAB  in required    The array whose we determine the min and the max      param MASK  in required    The mask array       keyword MININ  type scalar    If it is not defined  it takes the value of VRAIMIN      keyword MAXIN  type scalar    If it is not defined  it takes the value of VRAIMAX      keyword ZEROMIDDLE    Force the middle of the colorbar to be equal   to 0  force max max abs min max  and min max        keyword _EXTRA   used to pass your keywords      keyword USETRI   To force using triangulation        param VRAIMIN  out    The min of the array      param VRAIMAX  out    The max of the array      uses   Common pro      restrictions   Look if the field is constant on the sea      history   Sebastien Masson  smasson lodyc jussieu fr                          11 12 98      version    Id: determineminmax pro 163 2006 08 29 12:59:46Z navarro        todo seb: manque les param glam et gphi           PRO determineminmax  tab  mask  vraimin  vraimax  glam  gphi  MAXIN   maxin  MININ   minin  INTERVALLE   intervalle  usetri   usetri  ZEROMIDDLE   zeromiddle  _extra   ex     compile_opt idl2  strictarrsubs    common       Type o fthe vertical grid:   if vargrid EQ  W  then nz   nzw ELSE nz   nzt   liste des points mer   if  size mask 0  EQ 3 then mer   mask    0      ELSE mer   mask   If key_irregular eq 1  we mask also points which are not in the geographic    domain defined by lon1 lon2 lat1 lat2   if keyword_set key_irregular  AND n_elements glam  NE 0 AND n_elements gphi  NE 0 then begin     dom     where glam LT lon1 OR glam GT lon2 OR gphi LT lat1 OR gphi GT lat2      if dom 0  NE  1 then mer dom    0   endif     mer   where mer eq 1      if mer 0  eq  1 then begin     ras   report Il n y a que de la terre sur le dessin      vraimax   0     vraimin   0     maxin   vraimax 1     minin   vraimin 1     usetri   0     return   endif   ma and mi : max and min on ocean points   vraimax   max tab mer  min   vraimin  _extra   ex    sameminmax   testvar var   minin  EQ testvar var   maxin     if n_elements maxin  EQ 0 OR sameminmax then maxin   vraimax   if n_elements minin  EQ 0 OR sameminmax then BEGIN      if keyword_set intervalle  then minin   floor vraimin intervalle intervalle       ELSE minin   vraimin   endif   if vraimin eq vraimax then BEGIN     IF size vraimin   type  EQ 1 THEN vraimin   fix vraimin      question    Warning: constant filed  same value everywhere :     strtrim vraimin  2     Shall we make the plot      answer   report question   default_no   question      if answer then begin       maxin   vraimax 1       minin   vraimin 1     endif ELSE tab    1   ENDIF   IF keyword_set zeromiddle  THEN BEGIN       maxin   max abs minin  maxin        minin    maxin   ENDIF     return end"); 
     274a[272] = new Array("./ToBeReviewed/PLOTS/DIVERS/givewindowsize.html", "givewindowsize.pro", "", "     file_comments        categories        returns        uses        restrictions        examples        history        version    Id: givewindowsize pro 163 2006 08 29 12:59:46Z navarro        todo seb   FUNCTION givewindowsize      include commons     compile_opt idl2  strictarrsubs    cm_4ps IF NOT keyword_set key_forgetold  THEN BEGIN  updatenew ENDIF        dimensions   get_screen_size RESOLUTION resolution     coef   floor 1 resolution 0     if NOT keyword_set windowsize_scale  then BEGIN      windowsize_scale   1       IF NOT keyword_set key_forgetold  THEN BEGIN       updateold      ENDIF     ENDIF     coef   windowsize_scale   coef       mipgsz   min page_size  max   mapgsz        xsize   coef    mipgsz key_portrait   mapgsz 1 key_portrait      ysize   coef    mipgsz 1 key_portrait    mapgsz key_portrait       return   xsize  ysize  end"); 
     275a[273] = new Array("./ToBeReviewed/PLOTS/DIVERS/meridienparallele.html", "meridienparallele.pro", "", "             file_comments   Trace some meridians or parallel      categories   Graphics      param COUPE    The type of drawing we treat      uses   common pro      history   Sebastien Masson  smasson lodyc jussieu fr                          11 12 98      version    Id: meridienparallele pro 163 2006 08 29 12:59:46Z navarro             PRO meridienparallele  coupe     compile_opt idl2  strictarrsubs    common      case coupe of        xy :BEGIN           if lon1 lt 180 and lon2 gt 180 then             plot   180 180 lat1 lat2 noerase color 0          if lon1 lt 0 and lon2 gt 0 then             plot   0 0 lat1 lat2 noerase color 0          if lon1 lt 360 and lon2 gt 360 then             plot   360 360 lat1 lat2 noerase color 0          if lat1 lt 0 and lat2 gt 0 then             plot   lon1 lon2 0 0 noerase color 0       END     endcase     return end"); 
     276a[274] = new Array("./ToBeReviewed/PLOTS/DIVERS/placecolor.html", "placecolor.pro", "", "             file_comments   allows to trace the independently from a graph   By default  trace a color bar of the same type than the one present in plt   and pltz  If max  min and divisions are not stipulated  then max sup min inf   and divisions div       categories   Graphics      param POS   Vector composed by 4 elements giving coordinates of the left bottom    corner and of the right up one  in cm  in which we want to do the color bar      keyword _extra   used to pass your keywords      uses   common pro      restrictions   Only usable for Postscripts effectuated with plein2dessin      history   Sebastien Masson  smasson lodyc jussieu fr   7 5 98      version    Id: placecolor pro 163 2006 08 29 12:59:46Z navarro             pro placecolor  pos  _extra   ex     include commons     compile_opt idl2  strictarrsubs    cm_4ps    IF NOT keyword_set key_forgetold  THEN BEGIN  updatenew    ENDIF        xsave    x    ysave    y    psave    p      reinitplt   z   invert    pos 1 pos    mipgsz   min page_size  max   mapgsz     if key_portrait eq 1 then begin       pos 0 pos 0 mipgsz         pos 1 pos 1 mapgsz           pos 2 pos 2 mipgsz        pos 3 pos 3 mapgsz        endif else begin       pos 0 pos 0 mapgsz           pos 1 pos 1 mipgsz           pos 2 pos 2 mapgsz           pos 3 pos 3 mipgsz        ENDELSE      def_myuniquetmpdir      IF lmgr demo  EQ 1 THEN BEGIN   if we are in demo mode  we cannot save the parameters in a temporary file   cm_demomode_used         colnumb   colorbarparam colnumb       clbinf   colorbarparam clbinf        clbsup   colorbarparam clbsup       clbdiv   colorbarparam clbdiv      ENDIF ELSE BEGIN       file   myuniquetmpdir    4colorbar dat        IF file_test file  THEN BEGIN          restore  file                  if size ex   type  EQ 8 then BEGIN              if  where tag_names ex  EQ  MIN 0  NE  1 then clbinf   ex MIN             if  where tag_names ex  EQ  MAX 0  NE  1 then clbsup   ex MAX             if  where tag_names ex  EQ  DIVISIONS 0  NE  1 then clbdiv   ex DIVISIONS          ENDIF            COLORBAR  COLOR   0  DIVISIONS   clbdiv  DISCRET   colnumb               cb_color   0  POSITION   pos  MAX   clbsup               MIN   clbinf  cb_charsize    p charsize               _extra   ex       ENDIF    ENDELSE       x   xsave     y   ysave     p   psave      return end"); 
     277a[275] = new Array("./ToBeReviewed/PLOTS/DIVERS/placedessin.html", "placedessin.pro", "", "             file_comments    Putting into place of the drawing  opening of the window or of the PS      categories    Utilities      param TYPEDESSIN  type string    It specify what procedure is called by PLACEDESSIN:  plt   pltz  or  pltt       keyword LANDSCAPE    Force the page or the window on the screen to be in lengthened position       keyword LCT  type integer    It designate the number of the palette of color we want to use for the plot        keyword MAP    We use it when we want to do a projection    This keyword can be of two types:       MAP P0lat P0lon Rot  For the description of these 3 values  see the online help of MAP_SET         MAP: In this case  map is automatically calculated have the value:             map    0   lon1 lon2 2  0    Comment: A good way to choose the type of the projection we want to do is to have a look at IDL demo:   IDL  demo   Then choose earth sciences and  mapping    Comment2: By default it is a cylindrical projection which is effectuated  with or without the keyword map     If we want an other projection  MAP must be activated and we have to add the keyword:  nom_projection    For example  for a polar projection centered on the south pole:   IDL  domdef 180 180 90 45   IDL  plt  tab   stereo map 90 0 0       keyword NOCOLORBAR    We active it if we do not want the colorbar      keyword NOFILL    We active it if we only want contours in black and white with a white background       keyword NOERASE    We active it to make a drawing without creating a new frame       keyword SMALL    Vector composed of 3 or 4 elements  applied to make a drawing on a    small portion of a page or screen  It delimit the zone where the drawing will be done        If there is 4 elements:   then is constituted of coordinates  expressed in cm located from the up and    left corner of the page or the window  in portrait like in landscape  of the bottom    and left corner and of the up and right corner of the drawing zone        If there is 3 elements:   in this case  we divide the page or the screen in small 0  columns and in small 1  lines    the drawing made in the box numbered small 2  The numerotation starting up and left by    the number 1 and then  following the writing direction    By default  we make the largest drawing we can do  conserving the aspect rapport     except when REMPLI is activated        keyword PORTRAIT    Force the page or the window to be in standing position       keyword POST    Make a postscript  Only works if we made one drawing on the page    If we make several drawing  use  ps       keyword REMPLI    Force the drawing to occupy the whole space defined by small       keyword WINDOW    Number of the window on which we want to do the graph  Allow to open several windows     By default  we open  IDL0       keyword CB_TITLE    The colorbar s title      keyword CONTOUR    If we want to trace contours of a different field than the one    whose we have the colored drawing  by example E P in color and QSR in contours     It must be a field respecting same characteristics than the argument number one of plt       keyword ENDPOINTS    keyword specifying that we want to make a vertical cut in diagonal  Then coordinated of extremities    of these one are defined by the 4 elements of the vector ENDPOINTS:  x1 y1 x2 y2  which are    coordinates        keyword VECTEUR  type vector    It is a structure composed by 2 elements containing the 2 fields U   and V of values of the zonal and meridian component of the vector of the fields   to draw  These fields can be an array or a structure          For example: vecteur matriceu:lec unsurface matricev:lec vnsurface          Comment: name of elements of vectors are inconsequential          vecteur u:lec unsurface v:lec vnsurface  is also appropriated       keyword DIREC    t   x   y   z   xys   xz   yz   xyz   xt   yt   zt   xyt           xzt   yzt   xyzt  Direction on which do averages       keyword _EXTRA   Used to pass your keywords       keyword COLOR_C    To draw the contour in color instead of in black   with filling in color       param POSFENETRE  out type vector    It is a vector composed by 4 elements containing the position of the frame    containing captions and the graph in normalized coordinates     Comment: To position the drawing  we have to do  p position posfenetre    after the call of the caliber      param POSBAR  out type vector    Like POSFENETRE but for the color bar     Same comment to position the color bar   p position posbar      uses   common pro      history   Sebastien Masson  smasson lodyc jussieu fr                          26 4 1999      version    Id: placedessin pro 163 2006 08 29 12:59:46Z navarro             PRO placedessin  typedessin  posfenetre  posbar  BARMARGES   barmarges                      NOCOLORBAR   nocolorbar  NOFILL   nofill  COLOR_c   color_c                      CONTOUR   contour                      VECTEUR   vecteur  PORTRAIT   portrait  LANDSCAPE   landscape                      SMALL   small  MARGES   marges  MAP   map                      REMPLI   REMPLI  POST   post  WINDOW   window                      ENDPOINTS   endpoints  TYPE   type  BASICMARGES   basicmarges                      NOERASE   noerase  LCT   lct  DIREC   direc  CB_TITLE   cb_title  _extra   ex     include common     compile_opt idl2  strictarrsubs    cm_4ps  cm_4mesh   IF NOT keyword_set key_forgetold  THEN BEGIN  updatekwd   ENDIF     1  Determination of the size of margins  unity number of lines or columns    to the left  to the right  up and down    BEWARE in margebar  the last element is the right up corner    instead of the up margin     if n_elements typedessin  EQ 0 then typedessin    autre    if keyword_set basicmarges  then begin     marge   1 6  2  4  3      if keyword_set marges  THEN marge   marge marges     margebar   1 marge 0 1  marge 1 1   marge 2 8   marge 2 6      if keyword_set barmarges  then margebar   margebar barmarges   ENDIF ELSE BEGIN      nocolorbar   keyword_set nocolorbar    keyword_set nofill    keyword_set color_c        case typedessin of        plt :marge   1 6  2  4  3         pltt :marge   1 6 4 type EQ  xt  2  4  4         pltz :marge   1 6  2  4  3        else:marge   1 6  2  4  3      ENDCASE     if keyword_set marges  THEN marge   marge marges     if NOT keyword_set barmarges  then barmarges   replicate 0  4      barmarges 3     barmarges 3      margebar   1 marge 0 1  marge 1 1  2  4 barmarges     marge   marge 0  0  4  0 keyword_set cb_title      IF keyword_set direc  THEN         marge   marge 0  0  2  0 strlowcase direc  NE  t      marge   marge 0  0  2  0 keyword_set contour      marge   marge 0  0  2  0 keyword_set vecteur      if n_elements lon1  NE 0 and n_elements lon2  NE 0         and n_elements lat1  NE 0 and n_elements lat2  NE 0 then begin       if keyword_set type  then           marge   marge 0  3 type EQ  yt  AND lon1 NE lon2  0                            2 type NE  yt  AND lat1 NE lat2 keyword_set endpoints          ELSE marge   marge 0  0  0  2 lat1 NE lat2 keyword_set endpoints      endif     marge   marge 0  0  2 margebar 3  0 1 keyword_set nocolorbar    ENDELSE     Portrait or landscape     IF NOT keyword_set noerase  THEN BEGIN      CASE 1 OF       n_elements portrait  NE 0:key_portrait   portrait       n_elements landscape  NE 0:key_portrait   1 landscape       ELSE:     ENDCASE   ENDIF      What type of aspect rapport  it will be crushed if YXASPECT exist      case typedessin of      plt :yaspect   1 lat2 lat1 lon2 lon1       pltt :yaspect   1       pltz :yaspect    5     ELSE:yaspect   1    endcase     2  calculation of  p position   see calibre pro        IF NOT keyword_set small  then small    1  1  1      if keyword_set map  then rempli   1     calibre  yaspect  marge  margebar  small  posfenetre  posbar  REMPLI   rempli  _extra   ex      p position   posfenetre     3  opening of the graphic window or of the postscript     case 1 of   case of the first drawing on a postcript     keyword_set post  AND  d name ne  PS :openps  _extra   ex   case of the first drawing on a screen     keyword_set post  EQ 0 AND keyword_set noerase  EQ 0         AND  d name ne  PS  AND  d name ne  Z :BEGIN       if not keyword_set window  then window   0   For the using of  ps oups et de  vzoom       if lmgr demo  EQ 0 then BEGIN   Are we in the demo mode          if  journal NE 0 then journal   We close te journal if it is open         homedir   isadirectory io   homedir  title    Bad definition of homedir          def_myuniquetmpdir         journal  myuniquetmpdir idlsave pro    We open a new one         help   recall_commands  output   listecommande   We recuperate the last command         listecommande   strmid strcompress listecommande 1  2          journal  listecommande   We write it in the journal       ENDIF       windsize   givewindowsize        window  window  xsize   windsize 0  ysize   windsize 1   retain   2  _extra   ex   When we used colors which are coded on 24bit  we can not stipulate the background color    of a window thanks to  p background  so we have to to this:            if  d n_colors gt 256 then begin               device  decomposed 1                p background ffffff x               plot 0 0   nodata  xstyle   4  ystyle   4               device  decomposed 0            endif     END     ELSE:   endcase     if n_elements lct  NE 0 then lct  lct  _extra   ex      return end"); 
     278a[276] = new Array("./ToBeReviewed/PLOTS/DIVERS/projsegment.html", "projsegment.pro", "", "             file_comments   project linearly a segment  a vector whose boundaries are  a b  on    a vector whose boundaries are  c d       categories   Calculation      param VECTEUR  type vector    A vector whose the first element must be the smallest one and the last must be the biggest one       param BORNES    New boundaries of the vector       keyword MP   Activate this keyword to the function send back this a vector of 2    elements which are the m and p of the linear projection y mx p used    to pass from the  a b  segment to the  c d  segment       returns    A vector whose new boundaries are specified by BORNES       examples          IDL  a indgen 9       IDL  print  a             0       1       2       3       4       5       6       7       8     IDL  print  projsegment a 0 80              0      10      20      30      40      50      60      70      80     IDL  print  projsegment a 0 80               0      10      20      30      40      50      60      70      80     IDL  print  projsegment a 80 0               80      70      60      50      40      30      20      10      0      history   Sebastien Masson  smasson lodyc jussieu fr                          24 6 1999      version    Id: projsegment pro 163 2006 08 29 12:59:46Z navarro             FUNCTION projsegment  vecteur  bornes  MP   mp       compile_opt idl2  strictarrsubs      a1   float vecteur 0     b1   float vecteur n_elements vecteur 1     a2   float bornes 0     b2  float  bornes 1     if a1 EQ b1 then return   1    m    b2 a2 b1 a1     p   a2 m a1      if keyword_set mp  then return   m  p  ELSE return  m vecteur p   end"); 
     279a[277] = new Array("./ToBeReviewed/PLOTS/DIVERS/restoreatt.html", "restoreatt.pro", "", "             file_comments   Allows to reattribuate global variables associated with a field    when we give a structure created by saveatt pro by example       categories    Utilities      param STRUCT  in required    a structure like the one who read litchamp            See IDL  xhelp litchamp       uses   common pro      restrictions   Change the value if global variables attribute of a field: vargrid     varname  varunit  vardate  varexp   valmask and time       history   Sebastien Masson  smasson lodyc jussieu fr                          15 6 1999      version    Id: restoreatt pro 163 2006 08 29 12:59:46Z navarro             PRO restoreatt  struct     compile_opt idl2  strictarrsubs    common      nomelements   tag_names struct     for i   0  n_tags struct 1 do begin       case strlowcase strmid nomelements i  0  1  of           g :vargrid   strupcase struct i            n :varname   struct i            u :varunit   struct i            e :varexp   struct i            m :valmask   struct i            d :BEGIN              if size struct i type  EQ 7 THEN BEGIN                 vardate   struct i              ENDIF ELSE BEGIN                vardate     time series                 time   struct i              ENDELSE          end          ELSE:BEGIN              ras   report Le nom  nomelements i  ne correspont a aucun element reconnu de la structure   C cf  IDL  xhelp   litchamp           end       endcase    endfor      return end"); 
     280a[278] = new Array("./ToBeReviewed/PLOTS/DIVERS/rotation.html", "rotation.pro", "", "       file_comments   Rotate two vectors by a specified amount           param X  in required    original data point pairs      param Y  in required    original data point pairs                 param DEG  in required    degrees to rotate           param NX  out    rotated point pairs        param NY  out    rotated point pairs           history   Jeff Bennett  U of Colorado      version    Id: rotation pro 163 2006 08 29 12:59:46Z navarro        PRO rotation X Y DEG NX NY     compile_opt idl2  strictarrsubs   ang deg dtor   convert to polar coordinates for rotation r   sqrt x x   y y  theta   r 0   get angle in for loop so that zero radii will be left as zero angle for i   0 n_elements r 1 do   if r i  ne 0 then theta i    atan y i x i    range from  pi to  pi    add rotation angle theta   theta   ang    convert back to rectangular coordinates  now rotated nx   r   cos theta  ny   r   sin theta    return end"); 
     281a[279] = new Array("./ToBeReviewed/PLOTS/DIVERS/saveatt.html", "saveatt.pro", "", "             file_comments   Allows to put in a structure attributes which can be associated with a variable       categories   Utilities      returns    A structure of the form:            n:varname g:vargrid d:vardate e:varexp u:varunit m:valmask l:niveau       uses   common pro      history   Sebastien Masson  smasson lodyc jussieu fr                          15 6 1999      version    Id: saveatt pro 157 2006 08 21 09:01:50Z navarro             FUNCTION saveatt     compile_opt idl2  strictarrsubs    common    return   n:varname g:vargrid d:vardate e:varexp u:varunit m:valmask  end"); 
     282a[280] = new Array("./ToBeReviewed/PLOTS/DIVERS/terminedessin.html", "terminedessin.pro", "", "             file_comments   End the drawing if needed when it is a postscript       categories   Utilities  Graphics      keyword POST    Make a postscript  Only works if we made one drawing on the page    If we make several drawing  use  ps       keyword SMALL  type vector     Vector composed of 3 or 4 elements  applied to make a drawing on a    small portion of a page or screen  It delimit the zone where the drawing will be done        If there is 4 elements:   then is constituted of coordinates  expressed in cm located from the up and    left corner of the page or the window  in portrait like in landscape  of the bottom    and left corner and of the up and right corner of the drawing zone        If there is 3 elements:   in this case  we divide the page or the screen in small 0  columns and in small 1  lines    the drawing made in the box numbered small 2  The numerotation starting up and left by    the number 1 and then  following the writing direction    By default  we make the largest drawing we can do  conserving the aspect rapport     except when REMPLI is activated       keyword _EXTRA    Used to pass your keywords      uses   common pro      history   Sebastien Masson  smasson lodyc jussieu fr                          3 6 1999      version    Id: terminedessin pro 163 2006 08 29 12:59:46Z navarro             PRO terminedessin  POST   post  SMALL   small  _extra   ex       compile_opt idl2  strictarrsubs    cm_4ps   IF NOT keyword_set key_forgetold  THEN BEGIN  updatenew  updatekwd   ENDIF      if keyword_set post  then BEGIN       if keyword_set small  then         if total small  NE            page_margins 2 page_margins 0 total page_size              page_margins 1 page_margins 3  then return       closeps       printps    endif    return end"); 
     283a[281] = new Array("./ToBeReviewed/PLOTS/LABEL/label.html", "label.pro", "", "             file_comments   Allows to choose the type of the label we want to use at the time of a contour       categories   Graphics      param CAS  in required    Number of the type of the label we want to trace      param MIN  in required     Smallest value for the drawing of the contour       param MAX  in required    Biggest value for the drawing of the contour       keyword INTERVALLE  default 20    Value of an interval between two isolines  By default  it is calculated to    draw 20 isolines  In all cases  this keyword must be returned have a nice   caption  If levels do not contain regular intervals  put it at  1       keyword NLEVEL  default 20    Number of contour to be drawn  Active if LABEL 0 or is not specified       param NCONTOUR  out    Number of contour to be drawn        param LEVEL_Z2D  out    Vector containing values of contours we draw       param COLNUMB  out    Vector containing the number of colors which will serve to fill contours       uses   common pro      history    Sebastien Masson  smasson lodyc jussieu fr   7 5 98      version     Id: label pro 163 2006 08 29 12:59:46Z navarro             pro label  cas  min  max  ncontour  level_z2d  colnumb  NLEVEL   nlevel              INTERVALLE intervalle  STRICTFILL   strictfill     compile_opt idl2  strictarrsubs    common    if  d name EQ  PS  OR  d name EQ  Z  then BEGIN       old_dname    d name       thisOS    VERSION OS_FAMILY       thisOS   STRMID thisOS  0  3        thisOS   STRUPCASE thisOS        CASE thisOS of           MAC : SET_PLOT  thisOS           WIN : SET_PLOT  thisOS          ELSE: SET_PLOT   X        ENDCASE        p BACKGROUND d n_colors 1   ncontour          level_z2d    min    max min findgen Ncontour Ncontour           colnumb      ncoul findgen Ncontour Ncontour ncoul 2 ncontour           intervalle   level_z2d 1 level_z2d 0        end       1: begin   a certain number of label from the min to the nearest possible to the   max with a constant step by interval          ncontour    fix max min intervalle           ncontour   1   ncontour          level_z2d   min   intervalle findgen Ncontour            colnumb     ncoul findgen Ncontour Ncontour ncoul 2 ncontour           max level_z2d Ncontour 1 intervalle       end   label to do same sss than dessier        2: begin          lct  63  file    palette tbl           level_z2d     20  25  30  31  32  33  33 5  34 25 findgen 16           ncontour 23          colnumb      findgen 23 1          masx   37 75          intervalle    1          return       end       3: begin   Readinf of intervals   palette in the file GMT           label_gmt  min  max  intervalle  ncoul  ncontour  level_z2d  colnumb        end       else: begin          ras   report Le numero de label demande n existe pas        end    ENDCASE    if keyword_set strictfill  then begin       ncontour   ncontour 1       level_z2d    level_z2d  max        colnumb    colnumb  ncoul 1     endif    return end"); 
     284a[282] = new Array("./ToBeReviewed/PLOTS/LABEL/label_date.html", "label_date.pro", "", "    Copyright  c  1993 1998  Research Systems  Inc   All rights reserved   Unauthorized reproduction prohibited          file_comments   This function labels axes with dates and times       categories   Plotting      param AXIS  in required       param INDEX  in required       param X  in required       keyword DATE_FORMAT   a format string which may contain the following:    M for month  3 character abbr     N for month  2 digit abbr     D for day of month     Y for 4 digit year     Z for last two digits of year     For time:    H for Hours  2 digits     I for Minutes  2 digits     S for Seconds  2 digits      is      Other characters are passed directly thru    For example   M  D   Y  prints DEC 11  1993    M  2Y  yields DEC 93    D M  yields 11 DEC    D N Y  yields 11 12 1993    M C Y  yields DEC on the top line  1993 on   the bottom  C is the new line graphic command       keyword MONTHS   The names of the months  a twelve element string array    If omitted  use Jan  Feb    Dec       keyword OFFSET   An optional starting offset of the plot    Unfortunately  single precision floating point is not accurate   enough to properly represent Julian times   This offset  which   may be double precision  contains an offset that is added to   all x values  before conversion to Julian date and time       uses   LABEL_DATE_COM       restrictions   Only one date axis may be simultaneously active       examples   For example  to plot from Jan 1  1993  to July 12  1994:   Start_date   julday 1  1  1993    End_date   julday 7  12  1994    Dummy   LABEL_DATE DATE_FORMAT N D    Simple mm dd   x   findgen end_date 1   start_date    start_date  Time axis   PLOT  x  sqrt x  XTICKFORMAT    LABEL_DATE  XSTYLE 1    Plot with X axis style set to exact      Example with times:  For example  to plot from 3PM  Jan 1  1993  to 5AM  Jan 3   1993:  Start_date   Julday 1 1 1993     Also starting offset  Start_time    3 12 24           Starting_time less offset  End_time    Julday 1 3 1993    Start_date    5 24   Ending          date time   offset  note that the order of operations is                   important to avoid loss of precision   Dummy   LABEL_DATE DATE_FORMAT D  M C H: I     offset Start_date         MMM NN  HH:MM format  x   findgen 20     End_time   Start_time    19   start_time  Time axis  PLOT  x  sqrt x  XTICKFORMAT    LABEL_DATE  XSTYLE 1      history  DMS  RSI April  1993 Written   DMS  RSI March  1997 Added Time format      Copyright  c  1993 1998  Research Systems  Inc   All rights reserved   Unauthorized reproduction prohibited       version    Id: label_date pro 163 2006 08 29 12:59:46Z navarro         FUNCTION label_date  axis  index  x  DATE_FORMAT   format  MONTHS   months                  OFFSET  offs  _EXTRA   ex     compile_opt idl2  strictarrsubs   COMMON label_date_com  fmt  month_chr  offset  if keyword_set format  then begin  Save format string      if n_elements offs  ne 0 then offset   double offs  else offset   0 0d0     if keyword_set months  then month_chr   months       else month_chr    Jan Feb Mar   Apr   May   Jun   Jul                           Aug   Sep   Oct   Nov   Dec      fmt   format     return  0 endif  if n_elements month_chr  ne 12 or n_elements fmt  le 0     or n_elements offset  eq 0 then     message  Not initialized   x1   x   offset caldat  long x1  month  day  year  _EXTRA   ex Get the calendar date from julian frac   x1   long x1              time of day  from 0 to 1   n   strlen fmt  out      for i 0  n 1 do begin            Each format character      c   strmid fmt  i  1         The character      if c eq   then begin         i   i   1         c   strmid fmt  i  1     The function         case c of format character               M  : out   out   month_chr month 1               N  : out   out   string format i2 2  month               D  : out   out   string format i2 2  day               Y  : out   out   string format i4  year               Z  : out   out   string format i2 2  year  mod 100               H  : out   out   string format i2 2  floor 24 frac               I  : out   out   string format i2 2  floor 1440   frac mod 60               S  : out   out   string format i2 2  86400L   frac mod 60                : out   out                 else : message   Illegal character in date format string:  fmt         endcase     endif else out   out   c endfor return  out end"); 
     285a[283] = new Array("./ToBeReviewed/PLOTS/LABEL/label_gmt.html", "label_gmt.pro", "", "     file_comments    Apply GMT palette into IDL color intervals system       categories          param MIN  in required    A reel number specifying above what value we want to trace a contour      param MAX  in required    A reel number specifying below what value we want to trace a contour       param INTERVALLE          param NCOUL          param NCONTOUR  out    Number of contour to be drawn       param LEVEL_Z2D  in required    Vector containing values of isolignes to be traced       param COUL         restrictions          examples        history         version    Id: label_gmt pro 157 2006 08 21 09:01:50Z navarro     PRO label_gmt  min  max  intervalle  ncoul  ncontour  level_z2d  coul     compile_opt idl2  strictarrsubs    common  com_eg     IF pal_type NE  2dom  THEN BEGIN      color defined in lec_pal_gmt pro        ncontour   ncont_gmt       level_z2d   levels_gmt       coul   coul_gmt       max   max_gmt       intervalle     1     ENDIF ELSE BEGIN           grey_shade palette  case 1 in label        IF finite min  EQ 0 THEN read    Grey shade needs a min max :  min  max       ncontour    fix max min intervalle        level_z2d   min   intervalle findgen Ncontour         max level_z2d Ncontour 1 intervalle        print        Number of contour intervals  plotting min   max   ncontour  min  max       print               color index        IF idx_pal EQ 0 THEN BEGIN              build palette          red   lonarr 99           red    255          red 50:98    long 100 float grey_shade 100 255            IF field origin EQ  diff  THEN BEGIN                      difference plot : lighter below first negative interval             red 51:98    long 100 float grey_shade_2 100 255              red 1:48    long 100 float grey_shade 100 255              red 50    255           ENDIF              first color black            last   white          red    0  red           red 99    255            gray scale          green   red          blue   red           tvlct  red  green  blue        ENDIF           mid_index   max where level_z2d LE fldatt mid        coul   findgen Ncontour 49 mid_index  2     ENDELSE    END "); 
     286a[284] = new Array("./ToBeReviewed/PLOTS/LABEL/lataxe.html", "lataxe.pro", "", "             file_comments   function called by  XYZ TICKFORMAT  see the help to see how to use it  to label axes in latitude       categories   Graphics       param AXIS    It is the axis number: 0 for X axis  1 for Y axis  2 for Z axis       param INDEX   It is the tick mark index which starts at 0       param VALUE   It is the default tick mark value  a floating point number       returns   A string  used automatically to label      history   Sebastien Masson  smasson lodyc jussieu fr                                                    14 10 1999 format of labels      version    Id: lataxe pro 157 2006 08 21 09:01:50Z navarro             FUNCTION lataxe  axis  index  value     We put back value in the segment  0 180      compile_opt idl2  strictarrsubs      lat value mod 360    if lat lt 0 then lat lat 360    if lat gt 180 then lat lat 180   format of labels:    case 1 of       lat EQ round lat :fmt    i4        10 lat EQ round 10 lat :fmt    f6 1        ELSE:fmt    f7 2     endcase   we write the label    if lat le 90 and lat ne 0 then nom string lat      format fmt N     if lat gt 90              then nom string 180 lat  format fmt S     if lat eq  0              then nom string lat      format fmt       return  nom end "); 
     287a[285] = new Array("./ToBeReviewed/PLOTS/LABEL/lonaxe.html", "lonaxe.pro", "", "             file_comments   function called by  XYZ TICKFORMAT  see the help to see how to use it  to label axes in longitude       categories   Graphics       param AXIS    It is the axis number: 0 for X axis  1 for Y axis  2 for Z axis       param INDEX   It is the tick mark index which starts at 0       param VALUE   It is the default tick mark value  a floating point number       returns   A string  used automatically to label      history   Sebastien Masson  smasson lodyc jussieu fr                                                    14 10 1999 format of labels      version    Id: lonaxe pro 157 2006 08 21 09:01:50Z navarro             FUNCTION lonaxe  axis  index  value     We put back value in the segment  0 360      compile_opt idl2  strictarrsubs      lon value mod 360    if lon lt 0 then lon lon 360   format of labels:    case 1 of       lon EQ round lon :fmt    i4        10 lon EQ round 10 lon :fmt    f6 1        ELSE:fmt    f7 2     endcase   we write the label    if lon lt 180 then nom string lon      format fmt E     if lon gt 180 then nom string 360 lon  format fmt W     if lon eq 180 then nom string lon      format fmt       return  nom end "); 
     288a[286] = new Array("./ToBeReviewed/PLOTS/VECTEUR/ajoutvect.html", "ajoutvect.pro", "", "             file_comments   Overprint vectors in a field traced by plt       categories   Graphics      param VECTEUR  in required type vector    It is a structure with 2 elements containing we 2 matrices U and V of    values of the zonal and meridian component of the field of vectors to    be traced         For ex:         vecteur matriceu:lec unsurface matricev:lec vnsurface          rq:the name of elements of  vector does not have any importance          vecteur u:lec unsurface v:lec vnsurface  goes well too       keyword UNVECTSUR  type scalar or array    It is a scalar n or an array with 2 elements  n1 n2    In the first case  we will trace a vector on n following x and y    In the second case  we will trace a vector on n1 following x and a    vector n2 following n2     Comments: To trace all vectors following y and one vector on two    following x  put unvectsur 2 1       keyword VECTMIN  in required    Minimum norme of vectors to be traced       keyword VECTMAX  in required    Maximum norme of vectors to be traced       keyword _EXTRA   Used to pass your keywords       uses   common pro       history   Sebastien Masson  smasson lodyc jussieu fr   10 3 1999                         11 6 1999 compatibilite avec NAN et la lecture                         des structures       version    Id: ajoutvect pro 163 2006 08 29 12:59:46Z navarro               pro ajoutvect vecteur  vectlegende  UNVECTSUR unvectsur VECTMIN vectmin  VECTMAX vectmax  _EXTRA   ex     compile_opt idl2  strictarrsubs    common    tempsun   systime 1            For key_performance        u   litchamp vecteur 0     u   checkfield u   plt  TYPE    xy   NOQUESTION     v   litchamp vecteur 1     v   checkfield v   plt  TYPE    xy   NOQUESTION        We recuperate possible informations on fields      grilleu   litchamp vecteur 0   grid     if grilleu EQ   then grilleu    U     grillev   litchamp vecteur 1   grid     if grillev EQ   then grillev    V      IF grilleu EQ  V  AND grillev EQ  U  THEN inverse   1    IF grilleu EQ grillev THEN interpolle    0 ELSE interpolle   1    if keyword_set inverse  then begin       rien   u       u   v       v   rien    endif     We find common points between u and v      if interpolle then begin       indicexu    lindgen jpi firstxu:firstxu nxu 1        indicexv    lindgen jpi firstxv:firstxv nxv 1        indicex   inter indicexu  indicexv        indiceyu    lindgen jpj firstyu:firstyu nyu 1        indiceyv    lindgen jpj firstyv:firstyv nyv 1        indicey   inter indiceyu  indiceyv        nx   n_elements indicex         ny   n_elements indicey        indice2d   lindgen jpi  jpj        indice2d   indice2d indicex 0 :indicex 0 nx 1 indicey 0 :indicey 0 ny 1      extraction of u and v on the appropriated domain         case 1 of           size u 0  NE 2 OR  size v 0  NE 2: return           size u 1  EQ nxu AND  size u 2  EQ nyu AND              size v 1  EQ nxv AND  size v 2  EQ nyv:BEGIN              if nxu NE nx then                if indicex 0  EQ firstxu then u   u 0:nx 1    ELSE u   u 1: nx                 IF nxv NE nx THEN                if indicex 0  EQ firstxv then v   v 0:nx 1    ELSE v   v 1: nx                IF nyu NE ny THEN                if indicey 0  EQ firstyu then u   u  0:ny 1  ELSE u   u  1: ny               IF nyv NE ny THEN                if indicey 0  EQ firstyv then v   v  0:ny 1  ELSE v   v  1: ny           END           size u 1  EQ jpi AND  size u 2  EQ jpj AND              size v 1  EQ jpi AND  size v 2  EQ jpj:BEGIN              u   u indice2d              v   v indice2d           END          ELSE:BEGIN              ras   report problemes d adequation entre la taille du domaine et la taille des matrices necessaires a tracer des vecteurs              return          end       endcase     We reshape u and v to make sure that none dimension has been erased          if ny EQ 1 then begin          u   reform u  nx  ny           v   reform v  nx  ny        endif     construction of u and v at points T         a u 0        u u shift u 1 0 2        if NOT keyword_set key_periodic  OR nx NE jpi then u 0 a       a v 0        v v shift v 0 1 2        if NOT keyword_set key_periodic  OR nx NE jpi then v 0 a     attribution of the mask and of longitude and latitude arrays    We recuperate the complete grid to establish a big mask extensive    in the four directions to cover points for which a land point has    been considerated  do a small drawing          vargrid T        msku    umask indice2d jpi jpj firstzt        mskv    vmask indice2d jpi jpj firstzt        glam   glamt indice2d        gphi   gphit indice2d        if ny EQ 1 then begin          msku   reform msku  nx  ny           mskv   reform mskv  nx  ny             glam   reform glam  nx  ny             gphi   reform gphi  nx  ny        endif     We mask u and v et v the long of coasts  the place where we    can not calculate the average       extention of the mask       u   u msku shift msku 1 0        v   v mskv shift mskv 0 1     ENDIF ELSE BEGIN        u   u tmask firstxt:lastxt firstyt:lastyt firstzt        v   v tmask firstxt:lastxt firstyt:lastyt firstzt        indice2d   lindgen jpi  jpj        indice2d   indice2d firstxt:lastxt  firstyt:lastyt        nx   nxt       ny   nyt    endelse    tabnorme sqrt u 2 v 2     nan   where finite u   nan  EQ 1     if nan 0  NE  1 then u nan    1e5    nan   where finite v   nan  EQ 1     if nan 0  NE  1 then v nan    1e5    if keyword_set vectmin  then BEGIN        toosmall where tabnorme lt vectmin        if toosmall 0  NE  1 then begin          u toosmall    1e5          v toosmall    1e5       ENDIF    endif    if keyword_set vectmax  then BEGIN       toobig where tabnorme gt vectmax        if toobig 0  NE  1 then begin          u toobig    1e5          v toobig    1e5       ENDIF    ENDIF     Put back of a big value on all points for which we can do the calculation       if interpolle then t2   msku shift msku 1 0 mskv shift mskv 0 1       ELSE t2   tmask firstxt:lastxt firstyt:lastyt firstzt     if NOT keyword_set key_periodic  OR nx NE jpi then t2 0   0     t2 0 0     terre where t2 eq 0     if terre 0  ne  1 then begin       u terre 1e5       v terre 1e5    ENDIF     trace only one vector one two      if keyword_set unvectsur  then BEGIN     indx is a vector containing number of columns to be selected    indy is a vector containing number of lines to be selected        if n_elements unvectsur  EQ 1 then begin          indx   where lindgen nx  MOD unvectsur 0  eq 0           indy   where lindgen ny  MOD unvectsur 0  eq 0        ENDIF ELSE BEGIN           indx   where lindgen nx  MOD unvectsur 0  eq 0           indy   where lindgen ny  MOD unvectsur 1  eq 0       ENDELSE   From indx and indy  we will construct an array which will give indexes   of intersections points of columns specified by indx        indicereduit   indx replicate 1 n_elements indy nx replicate 1 n_elements indx indy   We reduce arrays which will be passed to vecteur        u   u indicereduit        v   v indicereduit        tabnorme   tabnorme indicereduit       endif           if keyword_set inverse  then begin       rien   u       u   v       v   rien    endif     Drawing of vectors       vecteur  u  v  tabnorme  indice2d  indicereduit  missing 1e5  _extra   ex     We complete the caption       if terre 0  ne  1 then mini   min tabnorme where t2 eq 1  max   maxi   nan       ELSE mini   min tabnorme  max   maxi   nan         if litchamp vecteur 0   u  NE   then       vectlegende    minmax: mini  maxi  unite:litchamp vecteur 0   u       ELSE vectlegende    minmax: mini  maxi  unite:varunit    sortie:    if keyword_set key_performance  NE 0 THEN print   temps ajoutvect  systime 1 tempsun     return end  "); 
     289a[287] = new Array("./ToBeReviewed/PLOTS/VECTEUR/vecteur.html", "vecteur.pro", "", "     file_comments           categories          param ANGLE         returns          restrictions          examples        history         version    Id: vecteur pro 163 2006 08 29 12:59:46Z navarro     FUNCTION cv_cm2normal  angle     Give the length in normal coordinates of a trait oriented of an angle   by rapport at the x axis and which must do 1 cm on the drawing    Angle can be an array           compile_opt idl2  strictarrsubs    common   What is the length in normal coordinates of a trait which will do 1 cm   on the paper an which is parallel to x    mipgsz   min page_size  max   mapgsz     sizexfeuille   mipgsz key_portrait mapgsz 1 key_portrait     sizeyfeuille   mapgsz key_portrait mipgsz 1 key_portrait     cm_en_normal   1 sizexfeuille     If the aspect rapport of the window is not equal to 1  the length in   normalized coordinates of  a trait of 1 cm vary following the polar   angle of this trait       aspect   sizexfeuille sizeyfeuille    cm_en_normal   cm_en_normal sqrt  1  aspect 2 1 sin angle 2        return  cm_en_normal END        file_comments           categories          param U        param V        param W         restrictions          examples        history         version    Id: vecteur pro 163 2006 08 29 12:59:46Z navarro     PRO normalise  u  v  w     normalize the vector       compile_opt idl2  strictarrsubs      IF n_elements w  NE 0 THEN BEGIN        norme   sqrt u 2 v 2 w 2        ind   where norme NE 0        u ind    u ind norme ind        v ind    v ind norme ind        w ind    w ind norme ind     ENDIF ELSE BEGIN       norme   sqrt u 2 v 2        ind   where norme NE 0        u ind    u ind norme ind        v ind    v ind norme ind     ENDELSE  END              file_comments   Trace vectors  even if they are on a deformed grid  on any projection    In this way  all vectors have a comparable norme on the drawing  to be   clear  a vector which measure 1 cm measure it  no matter the projection   and is position on the sphere       categories    Graphics       param COMPOSANTEU  in required    It is the u component of the vector to be traced  This 2d array has the    same dimension that reduitindice2d  see further        param COMPOSANTEV  in required    It is the v component of the vector to be traced  This 2d array has the    same dimension that reduitindice2d  see further        param NORMEVECTEUR        param INDICE2D   in required    It in an index allowing to to pass from an jpi or jpj array to the zoom    on which we do the drawing       param REDUITINDICE2D  in required    It is an index allowing to pass from an array defined by indice2d to the    array for which we really have vectors to be traced  to be clear  it is    for example when we trace only one vector on two       keyword CMREF  default between  5 and 1 5 cm    The length in cm that must measure the arrow normed normeref  By default     it is adjusted to other drawing and included between  5 and 1 5 cm       keyword MISSING   The value of a missing value  Do not use this keyword  Fixed at 1e5 by    ajoutvect pro            keyword NORMEREF    The norme of the reference arrow       keyword VECTCOLOR  default 0    The color of the arrow  Black by default  color 0        keyword VECTTHICK  default 1    The thick of the arrow        keyword VECTREFPOS   Vector composed of 2 elements specifying the position on DATA coordinates    from the beginning of the reference vector  By default at the right bottom    of the drawing       keyword VECTREFFORMAT   The format to be used to specify the norme of the reference vector       keyword NOVECTREF   To delete the display of the reference vector        keyword _EXTRA   Used to pass your keywords       uses    common pro      history    Creation : 13 02 98 G  Roullet  grlod lodyc jussieu fr     Modification : 14 01 99 realise la transformation    spheriquecartesien G  Roullet                   12 03 99 verification de la routine G  Roullet    8 11 1999:    G  Roullet et Sebastien Masson  smasson lodyc jussieu fr     adaptation pour les zoom  reverification traitement separe de la    direction et de la norme des vecteurs  mots cles NORMEREF et CMREF       version    Id: vecteur pro 163 2006 08 29 12:59:46Z navarro              PRO vecteur  composanteu  composantev  normevecteur  indice2d  reduitindice2d                  CMREF   cmref  MISSING   missing  NORMEREF   normeref                  VECTCOLOR   vectcolor  VECTTHICK   vectthick  VECTREFPOS   vectrefpos                  VECTREFFORMAT   vectrefformat  NOVECTREF   novectref  _extra   extra     compile_opt idl2  strictarrsubs    common    tempsun   systime 1            For key_performance        taille   size composanteu     nx   taille 1     ny   taille 2     if n_elements reduitindice2d  EQ 0 then reduitindice2d   lindgen nx  ny     zu   composanteu    zv   composantev    norme   normevecteur    taille   size indice2d     nxgd   taille 1     nygd   taille 2       msk   replicate 1  nx  ny     if keyword_set missing  then terre   where abs zu  GE missing 10  ELSE terre    1    if terre 0  NE  1  then BEGIN        msk terre    0       zu terre    0       zv terre    0       norme terre    0    ENDIF     Stage 1:      Given that the directions and the sense that the vector has on the sphere     we have to try to determinate this direction and the sense that the vector    will have on the screen once it will have been projected      In theory: on the sphere  a vector in a given point has for direction the    tangent at the circle passing by the center of the Earth and by the vector     So  find the direction once the projection is done  it is find the tangent   to the curve representing the projection of the circle on the 2d plan at the    point representing the projection of the starting point of the shere on the    2d plan       In practice we do no know the definition of the curve given by the projection    of a circle so find its tangente in a point      What we do:   In a 3d cartesian reference          a  We find coorinates of the point T  starting of the arrow  situed          on the sphere          b  To each point T  we determine local directions defined by the grid         on this point and on which coordinates  u v  of the vector refer to          These local directions are defined by gradients of glam and gphi  Once         we have obtain these directions  we considare them like orthogonal and         by norming them  we build an orthonormal reference  nu nv  on which         coordinates  u v  of the vector refer to  In the starting 3d cartesian         reference  the vector is defined by:         V u nu v nv          where V  nu and nv are 3d vectors and u and v are scalars          c  To approximate the tangente to the circle by the chord defined by         the beginning and the ending of the arrow  we will normalize V  and         then divide it by 100          d  This allows us to determine coordinates of extremities of the chord         in the 3d cartesian reference  We pass them in spherical coordinates in         order to recuperate latitude and longitude position of these points on         the sphere          e  We pass coordinates of these points in normalized coordinates  then         in polar coordinates in order to find the angle and the direction they         dertermine on the drawing        Stage 1  a        coordinates of the point T  beginning of the arrow  in spherical coordinates     glam   glamt indice2d reduitindice2d     gphi   gphit indice2d reduitindice2d      Coordinates of the point T  beginning of the arrow  in the cartesian reference    For the sphere  we use a sphere with a radius of 1       radius   replicate 1 nx ny     coord_sphe   transpose   glam   gphi   radius       r   cv_coord from_sphere coord_sphe to_rect degrees       x0   reform r 0    nx  ny     y0   reform r 1    nx  ny     z0   reform r 2    nx  ny      Stage 1  b      Construction of a vector nu  resp  nv  vectr normed carried by the axis of   points u i j  and u i 1 j   resp v i j  and v i j 1  which define  for each   point on the sphere  local directions associated with u and v  These vectors   define a local orthonormal reference     These vectors are built in a cartesian reference  cv_coord  We have choose a    unity radius of the Earth  unit      definition of nu    radius   replicate 1 nxgd nygd     IF finite glamu 0 gphiu 0  NE 0 THEN        coord_sphe   transpose   glamu indice2d   gphiu indice2d   radius         ELSE coord_sphe   transpose   glamf indice2d   gphit indice2d   radius       r   cv_coord from_sphere coord_sphe to_rect degrees    coordinates of points of the grid u in cartesian     ux   reform r 0    nxgd  nygd     uy   reform r 1    nxgd  nygd     uz   reform r 2    nxgd  nygd    calculation of nu     nux   ux shift ux  1  0     nuy   uy shift uy  1  0     nuz   uz shift uz  1  0    conditions at extremities     if NOT keyword_set key_periodic  OR nxgd NE jpi then begin       nux 0      nux 1          nuy 0      nuy 1          nuz 0      nuz 1       ENDIF   reduction of the grid    nux   nux reduitindice2d     nuy   nuy reduitindice2d     nuz   nuz reduitindice2d    definition of nv    IF finite glamv 0 gphiv 0  NE 0 THEN      coord_sphe   transpose   glamv indice2d   gphiv indice2d   radius         ELSE coord_sphe   transpose   glamt indice2d   gphif indice2d   radius                       r   cv_coord from_sphere coord_sphe to_rect degrees    coordinates of points of the grid in cartesian     vx   reform r 0    nxgd  nygd     vy   reform r 1    nxgd  nygd     vz   reform r 2    nxgd  nygd    calcul of nv     nvx   vx shift vx  0  1     nvy   vy shift vy  0  1     nvz   vz shift vz  0  1    conditions at extremities    nvx  0    nvx  1     nvy  0    nvy  1     nvz  0    nvz  1    reduction of the grid    nvx   nvx reduitindice2d     nvy   nvy reduitindice2d     nvz   nvz reduitindice2d      normalization      normalise  nux  nuy  nuz    normalise  nvx  nvy  nvz     Stage 1  c      coordinates of the vector V in the cartesian reference      direcx   zu nux   zv nvx    direcy   zu nuy   zv nvy    direcz   zu nuz   zv nvz   normalization of the vector V    normalise  direcx  direcy  direcz   on divide by 100    direcx   direcx 100     direcy   direcy 100     direcz   direcz 100      Stege 1  d    coordinates of the point of the arrow in the cartesian reference      x1   x0   direcx    y1   y0   direcy    z1   z0   direcz    coordinates of the point of the arrow in spherical coordinates      coord_rect   transpose   x1   y1   z1       r   cv_coord from_rect coord_rect to_sphere degrees     glam1   reform r 0    nx  ny     gphi1   reform r 1    nx  ny       modification of glams  Everything take place at the level of the line   of changing of date  BEWARE  do not cut arrow which goes out of the   window    test: If it goes out of the frame  but  thanks to   360  it come in    we modify it      ind   where glam1 LT  x range 0  AND glam1 360  LE  x range 1     if ind 0  NE  1 then glam1 ind    glam1 ind 360     ind   where glam1 GT  x range 1  AND glam1 360  GE  x range 0     if ind 0  NE  1 then glam1 ind    glam1 ind 360      ind   where glam LT  x range 0  AND glam 360  LE  x range 1     if ind 0  NE  1 then glam ind    glam ind 360     ind   where glam  GT  x range 1  AND glam 360  GE  x range 0     if ind 0  NE  1 then glam ind    glam ind 360        Stage 1  e       r   convert_coord glam gphi data to_normal      x0   r 0                      normal coordinates of the beginning of the array     y0   r 1                              r   convert_coord glam1 gphi1 data to_normal      x1   r 0                      normal coordinates of the ending of the array  Before scaling     y1   r 1                           tests to avoid that arrows be drawing out of the domain       out   where x0 LT  p position 0  OR x0 GT  p position 2                    OR y0 LT  p position 1  OR y0 GT  p position 3     if out 0  NE  1 THEN x0 out     values f_nan     Following projections  there may are points at NaN when we pass in normal coordinates     We delete these points       nan   finite x0 y0 x1 y1     number   where nan EQ 1     x0   x0 number    x1   x1 number     y0   y0 number    y1   y1 number     msk   msk number     norme   norme number      We define the vector direction in the normalize reference       dirx   x1 x0    diry   y1 y0    We pass in polar coordinates to recuperate the angle which wasb the goal of all the first stage        dirpol   cv_coord from_rect   transpose   dirx   diry     to_polar     dirpol   msk dirpol 0        Stage 2     Now we take care of the norme      Automatic putting at the scale       if NOT keyword_set cmref  then BEGIN        mipgsz   min page_size  max   mapgsz        sizexfeuille   mipgsz key_portrait mapgsz 1 key_portrait        sizexfeuille   10 sizexfeuille       cmref   5   floor sizexfeuille 10    15       cmref   cmref 10     ENDIF    if NOT keyword_set normeref  then BEGIN       value   max norme        puissance10   10 floor alog10 value        normeref   puissance10 floor value puissance10     endif    cm   1 normeref cmref     We modify the array norme to an element having the value cm be represented    by a trait of lenght 1 cm on the paper  Norme contain the norme of vectors    we want to draw       norme   1 1 cm norme cv_cm2normal dirpol        Stage 3   Now that we have the angle and the norme  we recuperate coordinates in    rectangular and we draw arrows       r   cv_coord from_polar   transpose   dirpol   norme     to_rect     composantex   r 0       composantey   r 1         x1   x0 composantex    y1   y0 composantey     Drawing      if NOT KEYWORD_SET vectcolor  then vectcolor   0     points   where msk EQ 1     IF points 0  NE  1 THEN arrow  x0 points  y0 points  x1 points  y1 points   norm         hsize    2  COLOR   vectcolor  THICK   vectthick      Draw an arrow at the right bottom of the drawing as a caption       if NOT keyword_set novectref  then BEGIN       dx   cmref cv_cm2normal 0    Lenght of the vector of reference in normalzed coordinates        if keyword_set vectrefformat  then          normelegende   strtrim string normeref  format   vectrefformat  1            ELSE normelegende   strtrim normeref  1            if keyword_set vectrefpos  then begin          r   convert_coord vectrefpos data   to_normal           x0   r 0           y0   r 1        ENDIF ELSE BEGIN          x0    x window 1 dx          r   convert_coord d x_ch_size   d y_ch_size   device   to_normal           dy   3 r 1 p charsize          y0    y window 0 dy       ENDELSE        arrow  x0  y0  x0 dx  y0   norm  hsize    2  color   0       xyouts  x0  y0  normelegende   norm  align   1  charsize    p charsize  color   0     endif         if keyword_set key_performance  NE 0 THEN print   temps vecteur  systime 1 tempsun         return END     "); 
     290a[288] = new Array("./ToBeReviewed/PLOTS/VECTEUR/velovect.html", "velovect.pro", "", "          file_comments   Produce a two dimensional velocity field plot      A directed arrow is drawn at each point showing the direction and    magnitude of the field                      categories   Plotting  two dimensional         param U  in required    The X component of the two dimensional field      U must be a two dimensional array       param V  in required    The Y component of the two dimensional field   Y must have   the same dimensions as X   The vector at point  i j  has a    magnitude of:    U i j 2   V i j 2 0 5     and a direction of:    ATAN2 V i j U i j       param X  in optional type vector    Optional abscissa values   X must be a vector with a length    equal to the first dimension of U and V       param Y  in optional type vector    Optional ordinate values   Y must be a vector with a length   equal to the first dimension of U and V       keyword COLOR   The color index used for the plot       keyword DOTS   Set this keyword to 1 to place a dot at each missing point     Set this keyword to 0 or omit it to draw nothing for missing   points   Has effect only if MISSING is specified       keyword LENGTH  default 1 0    Length factor   The default of 1 0 makes the longest  U V    vector the length of a cell       keyword MISSING    Missing data value   Vectors with a LENGTH greater   than MISSING are ignored       keyword OVERPLOT   Set this keyword to make VELOVECT  overplot   That is  the   current graphics screen is not erased  no axes are drawn  and   the previously established scaling remains in effect        keyword CLIP       keyword NOCLIP      keyword _EXTRA   Used to pass your keywords       restrictions    Plotting on the selected device is performed   System   variables concerning plotting are changed    Note:   All other keywords are passed directly to the PLOT procedure  and may be used to set option such as TITLE  POSITION    NOERASE  etc       history  DMS  RSI  Oct  1983   For Sun  DMS  RSI  April  1989   Added TITLE  Oct  1990   Added POSITION  NOERASE  COLOR  Feb 91  RES   August  1993   Vince Patrick  Adv  Visualization Lab  U  of Maryland   fixed errors in math   August  1993  DMS  Added _EXTRA keyword inheritance   January  1994  KDB  Fixed integer math which produced 0 and caused              divide by zero errors   December  1994  MWR  Added _EXTRA inheritance for PLOTS and OPLOT   June  1995  MWR  Removed _EXTRA inheritance for PLOTS and changed   OPLOT to PLOTS          September  1996  GGS  Changed denominator of x_step and y_step vars           February  1998  DLD   Add support for CLIP and NO_CLIP keywords          June  1998  DLD   Add support for OVERPLOT keyword      Copyright  c  1983 1998  Research Systems  Inc   All rights reserved   Unauthorized reproduction prohibited       version    Id: velovect pro 163 2006 08 29 12:59:46Z navarro         PRO velovect U V X Y  Missing   Missing  Length   length  Dots   dots             Color color  CLIP clip  NOCLIP noclip  OVERPLOT overplot  _EXTRA extra     compile_opt idl2  strictarrsubs           on_error 2                       Return to caller if an error occurs         s   size u          t   size v          if s 0  ne 2 then begin  baduv:   message   U and V parameters must be 2D and same size                  endif         if total abs s 0:2 t 0:2  ne 0 then goto baduv           if n_params 0  lt 3 then x   findgen s 1  else                   if n_elements x  ne s 1  then begin badxy:                  message   X and Y arrays have incorrect size                          endif         if n_params 1  lt 4 then y   findgen s 2  else                   if n_elements y  ne s 2  then goto badxy           if n_elements missing  le 0 then missing   1 0e30         if n_elements length  le 0 then length   1 0          mag   sqrt u 2 v 2               magnitude                   Subscripts of good elements         nbad   0                          of missing points         if n_elements missing  gt 0 then begin                 good   where mag lt missing                   if keyword_set dots  then bad   where mag ge missing  nbad          endif else begin                 good   lindgen n_elements mag          endelse          ugood   u good          vgood   v good          x0   min x                       get scaling         x1   max x          y0   min y          y1   max y   x_step x1 x0 s 1 1 0      Convert to float  Integer math  y_step y1 y0 s 2 1 0      could result in divide by 0   maxmag max max abs ugood x_step max abs vgood y_step   sina   length    ugood maxmag   cosa   length    vgood maxmag            if n_elements title  le 0 then title                plot to get axes            if n_elements color  eq 0 then color    p color         if n_elements noclip  eq 0 then noclip   1         x_b0 x0 x_step  x_b1 x1 x_step  y_b0 y0 y_step  y_b1 y1 y_step         if  not keyword_set overplot  then begin           if n_elements position  eq 0 then begin             plot x_b0 x_b1 y_b1 y_b0 nodata xst yst                  color color  _EXTRA   extra           endif else begin             plot x_b0 x_b1 y_b1 y_b0 nodata xst yst                  color color  _EXTRA   extra           endelse         endif         if n_elements clip  eq 0 then               clip    x crange 0 y crange 0 x crange 1 y crange 1            r    3                           len of arrow head         angle   22 5    dtor             Angle of arrowhead         st   r   sin angle               sin 22 5 degs   length of head         ct   r   cos angle            for i 0 n_elements good 1 do begin      Each point                 x0   x good i  mod s 1          get coords of start   end                 dx   sina i                  x1   x0   dx                 y0   y good i    s 1                  dy   cosa i                  y1   y0   dy  xd x_step  yd y_step                 plots x0 x1 x1 ct dx xd st dy yd xd     x1 x1 ct dx xd st dy yd xd                           y0 y1 y1 ct dy yd st dx xd yd     y1 y1 ct dy yd st dx xd yd                          color color clip clip noclip noclip  _EXTRA   extra                 endfor         if nbad gt 0 then                Dots for missing                  PLOTS  x bad mod s 1  y bad   s 1  psym 3  color color                           clip clip noclip noclip  _EXTRA   extra end"); 
     291a[289] = new Array("./ToBeReviewed/PLOTS/axe.html", "axe.pro", "", "             file_comments   Manage axes for the different drawings created by plt    pltz and pltt      categories    Graphics      param COUPE  type string    It designate the type of cut to which the axes we create    must report  For example:  xy xt       param TEMPSMIN  in required    In the case where we do cut containing the time dimension  we have    to specify the beginning of the time s axis in julian days       param TEMPSMAX  in required    In the case where we do cut containing the time dimension  we have    to specify the end of the time s axis in julian days       keyword SIN    activated when we trace in sinus of the latitude      keyword SEPDATE  type string    It separate the different constituents of the date  By default     it is a return to the line when we do a  yt   zt  or a  t     In the other cases  it is a blank        keyword DIGITSYEAR    2 to use  Z format  2 digits  to code years   instead of  Y format  See help of label_date for more   information on  Z and  Y       keyword _EXTRA    used to pass your keywords       uses   common pro      restrictions   It modify  x  and  y       history   Sebastien Masson  smasson lodyc jussieu fr                          11 12 98                         Eric Guilyardi types x y z   amelioration de                         l axe temporel      version    Id: axe pro 163 2006 08 29 12:59:46Z navarro             PRO axe  coupe tempsmin tempsmax  REVERSE_X   reverse_x  REVERSE_Y   reverse_y  SIN   sin  SEPDATE   sepdate  DIGITSYEAR   digitsyear  _EXTRA   ex     compile_opt idl2  strictarrsubs    common    tempsun   systime 1            pour key_performance     Management of ticks of the time axis in the case of TEMPSMIN    and TEMPSMAX are definied      divday   0    if n_params  EQ 3 then BEGIN         if keyword_set sepdate  then sep   sepdate ELSE          if coupe EQ  yt  OR coupe EQ  zt  OR coupe EQ  t  then sep    C  ELSE sep               caldat tempsmin  mmin  dmin  ymin  hmin  mnmin  smin  _EXTRA   ex       caldat tempsmax  mmax  dmax  ymax  hmax  mnmax  smax  _EXTRA   ex   format used for the year  2 or 4 5 digits        IF NOT keyword_set digitsyear  THEN digitsyear   4       IF digitsyear EQ 2 THEN fmtyr    Z  ELSE fmtyr    Y          if ymax EQ ymin then BEGIN          if mmin ne mmax then BEGIN   Same year but several monthes             nticks   mmax mmin 1             ticknom   lonarr nticks              for m   0 nticks 1 do ticknom m    julday m mmin  1  ymin  _EXTRA   ex              tminor   6             datfmt    M sep fmtyr   We check that labels are betwenn TEMPSMIN and TEMPSMAX              ticknom   ticknom where ticknom GE tempsmin AND ticknom LE tempsmax AND ticknom NE  1              nticks   n_elements ticknom    Particular case where we are overlap two monthes             if nticks LE 1 then begin                nticks    dmax jourdsmois mmin  ymin 0 dmin 1 2                ticknom   lonarr nticks                 for d   0 nticks 1 do ticknom d    julday mmin  d 2 dmin  ymin  _EXTRA   ex                 ticknom   ticknom where ticknom GE tempsmin AND ticknom LE tempsmax                                          AND ticknom NE  1                 nticks   n_elements ticknom                 tminor   2                datfmt    D sep M              endif          ENDIF ELSE BEGIN    Same year and same month             IF dmax dmin 1 GT 4 THEN BEGIN   more than 4 days                nticks   dmax dmin 1                ticknom   lonarr nticks                 for d   0 nticks 1 do ticknom d    julday mmin  d dmin  ymin  _EXTRA   ex                 ticknom   ticknom where ticknom GE tempsmin AND ticknom LE tempsmax                                          AND ticknom NE  1                 nticks   n_elements ticknom                 tminor   2                datfmt    D sep M              ENDIF ELSE BEGIN      less than 4 days : divday ticks per day                divday   4                nticks    dmax dmin divday   1                ticknom   fltarr nticks                 for d   0 nticks 1 do                   ticknom d    julday mmin  d divday dmin  ymin  _EXTRA   ex                     d MOD divday float divday                 tminor   2                datfmt    H:00              ENDELSE           ENDELSE        ENDIF ELSE BEGIN    Several years          CASE 1 OF          ymax ymin 1 LE 10: BEGIN   freq   1    tminor   12   datfmt    M sep fmtyr   end          ymax ymin 1 LE 20: BEGIN   freq   2    tminor   6   datfmt    M sep fmtyr   end          ymax ymin 1 LE 50: BEGIN   freq   5    tminor   5   datfmt    M sep fmtyr   end          ymax ymin 1 LE 100: BEGIN   freq   10    tminor   10   datfmt   fmtyr   end          ymax ymin 1 LE 1000: BEGIN   freq   50    tminor   5   datfmt   fmtyr   end          ELSE : BEGIN   freq   100    tminor   50   datfmt    Y    end          ENDCASE           nticks   floor ymax ymin freq 1          IF floor ymin freq  NE  ymin freq THEN             yminf    floor ymin freq 1 freq ELSE              yminf    floor ymin freq freq          ticknom   lonarr nticks           for y   0  nticks 1 do ticknom y    julday 1  1  yminf y freq  _EXTRA   ex    We check that labels are betwenn TEMPSMIN and TEMPSMAX           ticknom   ticknom where ticknom GE tempsmin AND ticknom LE tempsmax AND ticknom NE  1           nticks   n_elements ticknom    Particular case where we are overlap two monthes          if nticks LE 1 then begin             nticks    mmax 12 mmin 1             ticknom   lonarr nticks              for m   0 nticks 1 do ticknom m    julday m mmin  1  ymin  _EXTRA   ex              ticknom   ticknom where ticknom GE tempsmin AND ticknom LE tempsmax AND ticknom NE  1              nticks   n_elements ticknom              tminor   6             datfmt    M sep fmtyr    Particular case where we are overlap two monthes            if nticks LE 1 then begin                nticks    dmax jourdsmois mmin  ymin 0 dmin 1 2                ticknom   lonarr nticks                 for d   0 nticks 1 do ticknom d    julday mmin  d 2 dmin  ymin  _EXTRA   ex                 ticknom   ticknom where ticknom GE tempsmin AND ticknom LE tempsmax                                          AND ticknom NE  1                 nticks   n_elements ticknom                 tminor   2                datfmt    D sep M              endif          endif       ENDELSE        toto   label_date 0  0  0  DATE_FORMAT   datfmt  _EXTRA   ex        if chkstru ex   DATE_FORMAT  then ex DATE_FORMAT        ENDIF      Definition of axes parameters case by case      case coupe of        pltv :BEGIN          dtasize   tempsmin           x range    0 5  dtasize 0    0 5            y range    0 5  dtasize 1    0 5            if keyword_set reverse_x  then  x range reverse x range           if keyword_set reverse_y  then  y range reverse y range            x title    nx            y title    ny        END        xy :BEGIN           if keyword_set reverse_x  then  x range lon2 lon1  ELSE  x range lon1 lon2           if keyword_set reverse_y  then  y range lat2 lat1  ELSE  y range lat1 lat2           IF key_onearth THEN  x tickformat lonaxe           IF key_onearth THEN  y tickformat lataxe        END        yz :BEGIN           if keyword_set reverse_x  then  x range lat2 lat1  ELSE  x range lat1 lat2           if keyword_set reverse_y  then  y range 0   1  ELSE  y range    1  0           if keyword_set sin  then BEGIN   number of ticks by default             plot   0   0   noerase   nodata  xtick_get   xaxe   We increase this number to it be around 10              ticks   n_elements xaxe 1             ticks   ticks 1  2  4  8              ticks   ticks sort abs ticks 10 0    We recuperate the x axis for this new number of ticks             plot   0   0 xticks   ticks   noerase   nodata  xtick_get   xaxe              x ticks   ticks              x tickv   sin pi 180 xaxe              tickname   strarr ticks 1              for i   0 ticks do tickname i    lataxe 0  0  xaxe i               x tickname   tickname              x range   sin pi 180 x range           endif       end        xz :BEGIN           if keyword_set reverse_x  then  x range lon2 lon1  ELSE  x range lon1 lon2           if keyword_set reverse_y  then  y range 0   1  ELSE  y range    1  0        end        xt  : begin          if keyword_set reverse_x  then  x range    lon2 lon1  ELSE  x range lon1 lon2           if keyword_set reverse_y  then  y range tempsmax  tempsmin tempsmin            ELSE  y range tempsmin tempsmax tempsmin          IF key_onearth THEN  x tickformat lonaxe             result   LABEL_DATE DATE_FORMAT    M sep fmtyr              y tickformat LABEL_DATE            y tickname   LABEL_DATE 1  0 ticknom _EXTRA   ex             y ticklen 1            y gridstyle 2           y ticks nticks 1           y tickv ticknom tempsmin           y minor tminor          IF divday GT 0 THEN  y title    Time from  strtrim dmin 1                 def_month 1m  strtrim mmin  1   strtrim ymin 1        end        yt  : begin          if keyword_set reverse_x  then  x range    tempsmax tempsmin tempsmin            ELSE  x range tempsmin tempsmax tempsmin          if keyword_set reverse_y  then  y range lat2  lat1  ELSE  y range lat1 lat2           IF key_onearth THEN  y tickformat lataxe            x tickname   LABEL_DATE 0  0 ticknom _EXTRA   ex             x ticklen 1            x gridstyle 2           x ticks nticks 1           x tickv ticknom tempsmin           x minor tminor          IF divday GT 0 THEN  y title    Time from  strtrim dmin 1                 def_month 1m  strtrim mmin  1   strtrim ymin 1        end        zt  : begin          if keyword_set reverse_x  then  x range    tempsmax tempsmin tempsmin            ELSE  x range tempsmin tempsmax tempsmin          if vargrid EQ  W  then gdep gdepw 0:nzw 1  ELSE gdep gdept 0:nzt 1             x tickname   LABEL_DATE 0  0 ticknom _EXTRA   ex             x ticklen 1            x gridstyle 2           x ticks nticks 1           x tickv ticknom tempsmin           x minor tminor          IF divday GT 0 THEN  y title    Time from  strtrim dmin 1                 def_month 1m  strtrim mmin  1   strtrim ymin 1        end        t  : BEGIN          if keyword_set reverse_x  then  x range    tempsmax tempsmin tempsmin            ELSE  x range tempsmin tempsmax tempsmin           x tickname   LABEL_DATE 0  0 ticknom _EXTRA   ex             x ticklen 1            x gridstyle 2           x ticks nticks 1           x tickv ticknom tempsmin           x minor tminor          IF divday GT 0 THEN  y title    Time from  strtrim dmin 1                 def_month 1m  strtrim mmin  1   strtrim ymin 1        end        x  : begin           x range lon1 lon2           IF key_onearth THEN  x tickformat lonaxe        END        y  : begin          if keyword_set sin  then BEGIN   Number of ticks by default             plot   0   0   nodata   noerase  xstyle   5  ystyle   5  xtick_get   xaxe   We increase this number to it be around 10              ticks   n_elements xaxe 1             ticks   ticks 1  2  4  8              ticks   ticks sort abs ticks 10 0    We recuperate the x axis for this new number of ticks             plot   0   0 xticks   ticks nodata noerase xstyle 5 ystyle 5 xtick_get xaxe              x ticks   ticks              x tickv   sin pi 180 xaxe              tickname   strarr ticks 1              for i   0 ticks do tickname i    lataxe 0  0  xaxe i               x tickname   tickname              x range   sin pi 180 x range           ENDIF ELSE  x range lat1 lat2           IF key_onearth THEN  x tickformat lataxe        END        z  : begin            if vargrid EQ  W  then gdep gdepw 0:nzw 1  ELSE gdep gdept 0:nzt 1              if keyword_set reverse_y  then  y range gdep 0  gdep n_elements gdep 1               ELSE  y range gdep n_elements gdep 1  gdep 0        END     endcase    if keyword_set key_performance  THEN print   temps axe  systime 1 tempsun     return end"); 
     292a[290] = new Array("./ToBeReviewed/PLOTS/legende.html", "legende.pro", "", "             file_comments   Provide caption      categories   Graphics      param MI  in required    The min of the drawing       param MA  in required    The max of the plot      param COUPE  type string    Character containing two letters giving the type of the cut   for example:  xz       keyword CONTOUR    If we want to trace contours of a different field than the one    whose we have the colored drawing  by example E P in color and QSR in contours     It must be a field respecting same characteristics than the argument number one of plt       keyword ENDPOINTS   Used when we do vertical cuts in diagonal       keyword _EXTRA   used to pass your keywords       uses   common pro      restrictions   The use of the global variable language allows to change the language and the caption easily       history    Sebastien Masson  smasson lodyc jussieu fr   14 8 98                         Eric Guilyardi  ericg lodyc jussieu fr  GB version  11 6 99      version    Id: legende pro 163 2006 08 29 12:59:46Z navarro             pro legende  mi  ma  coupe  CONTOUR   contour  ENDPOINTS   endpoints  DIREC   direc                  VECTLEGENDE   vectlegende                  INTERVALLE   intervalle  TYPE_YZ   type_yz  VARNAME2   varname2                  NPTS   npts  _EXTRA   ex     compile_opt idl2  strictarrsubs    common   tempsun   systime 1             pour key_performance     grille   1   1   1  gdep  nx  ny  nz     English legends     fmt_mm    f12 2    fmt_bt    f7 1    colorf       contourf    Contour plot    vecteurf    Vector norm      expf       datef           fieldf           depthf           endpointsf    Diag  Section    zonalf       IF key_onearth THEN latintf    latitudes in   ELSE latintf    j index in     timintf    time in     onf           depthf2    Depth  m    Meridf    Zonal Mean      IF key_onearth THEN lonintf    longitudes in   ELSE lonintf    i in     hovxt    XT plot       diaghovxt    Diag  XT plot       depintf    depths in     timef    Time    hovyt    YT plot       diaghovyt    Diag  YT plot       hovzt    ZT plot       hovt       IF key_onearth THEN lontitle    Longitude  ELSE lontitle    i index    IF key_onearth THEN lattitle    Latitude  ELSE lattitle    j index       vertz   depthf2   legniv     m    IF keyword_set TYPE_YZ  THEN BEGIN     IF type_yz EQ  hPa  THEN vertz    hPa       IF type_yz EQ  hPa  THEN legniv     hPa     ENDIF      Start legende       definition and possible complement of  p subtitle     if n_elements varunit  ne 0 then unite    varunit  else unite        p subtitle   colorf unite : Min   strtrim string format   fmt_mm  mi  2                    Max   strtrim string format   fmt_mm  ma  2    if keyword_set intervalle  then BEGIN     if intervalle NE  1 then           p subtitle    p subtitle  Int   strtrim string format   fmt_mm  intervalle  2    endif   if size contour   type  EQ 8 then BEGIN   it is a structure      unite    contour 1       p subtitle    p subtitle C  contourf unite                      : Min   strtrim string format   fmt_mm  contour 0 0  2                      Max   strtrim string format   fmt_mm  contour 0 1  2      if contour inter NE  1  then           p subtitle    p subtitle  Int   strtrim string format   fmt_mm  contour inter  2    ENDIF   if size vectlegende   type  EQ 8  then begin     unite    vectlegende 1       p subtitle    p subtitle C  vecteurf unite                      : Min   strtrim string format   fmt_mm  vectlegende 0 0  2                      Max   strtrim string format   fmt_mm  vectlegende 0 1  2    endif     Shapping of subdomain  s dimensions       la1   strtrim string format   fmt_bt  lat1  2    la2   strtrim string format   fmt_bt  lat2  2    lo1   strtrim string format   fmt_bt  lon1  2    lo2   strtrim string format   fmt_bt  lon2  2    pr1   strtrim string format   fmt_bt  vert1  2    pr2   strtrim string format   fmt_bt  vert2  2      Management of the date       if n_elements vardate  EQ 0 then vardate       if NOT keyword_set direc  then direc       if strpos direc   t  NE  1 then begin     svardate   strtrim vairdate time 0  1     strtrim vairdate time jpt 1  1    ENDIF ELSE svardate   vardate     case on the caes where the caption is applied        case coupe of      xy :begin                 if strupcase vargrid  EQ  W  then firstz   firstzw         ELSE firstz   firstzt       if strpos direc   z  EQ  1 AND firstz NE 0  then BEGIN         prof   strtrim round gdep 0  1           p title   expf varexp datef svardate fieldf varname depthf prof legniv       ENDIF ELSE  p title   expf varexp datef svardate fieldf varname        x title   lontitle        y title   lattitle     end       xz :begin       IF keyword_set npts  THEN n   strtrim npts  1  ELSE n   strtrim ny  1        IF long n  LE 3 THEN zonalf    Section           if keyword_set endpoints  AND lat1 NE lat2 then             p title   endpointsf varexp datef svardate fieldf varname ELSE                p title   zonalf varexp datef svardate fieldf varname        x title   lontitle       if keyword_set endpoints  AND lat1 EQ lat2 then BEGIN          IF key_onearth THEN  x title    x title  at  strtrim lataxe 0  0  lat1  1  ELSE  x title    x title  at j index  strtrim lat1  1        ENDIF        y title   depthf2     end       yz :begin       IF keyword_set npts  THEN n   strtrim npts  1  ELSE n   strtrim nx  1        IF long n  LE 3 THEN meridf           if keyword_set endpoints  AND lon1 NE lon2 then             p title   endpointsf varexp datef svardate fieldf varname ELSE                p title   meridf varexp datef svardate fieldf varname        y title   vertz        x title   lattitle       if keyword_set endpoints  AND lon1 EQ lon2 then BEGIN          IF key_onearth THEN  x title    x title  at  strtrim lonaxe 0  0  lon1  1  ELSE  x title    x title  at i index  strtrim lon1  1        ENDIF     end       xt :begin           IF keyword_set npts  THEN n   strtrim npts  1        if keyword_set endpoints  AND lat1 NE lat2 then             p title   diaghovxt varexp fieldf varname ELSE                p title        hovxt varexp fieldf varname       IF  time size time 0 1    time 0  GE 10 THEN  y title   timef        x title   lontitle       if keyword_set endpoints  AND lat1 EQ lat2 then BEGIN          IF key_onearth THEN  x title    x title  at  strtrim lataxe 0  0  lat1  1  ELSE  x title    x title  at j index  strtrim lat1  1        ENDIF     end       yt :begin           IF keyword_set npts  THEN n   strtrim npts  1         if keyword_set endpoints  AND lon1 NE lon2 then             p title   diaghovyt varexp fieldf varname ELSE                p title        hovyt varexp fieldf varname       IF  time size time 0 1    time 0  GE 10 THEN  x title   timef        y title   lattitle       if keyword_set endpoints  AND lon1 EQ lon2 then BEGIN          IF key_onearth THEN  x title    x title  at  strtrim lonaxe 0  0  lon1  1  ELSE  x title    x title  at i index  strtrim lon1  1        ENDIF     end       zt :begin           IF keyword_set npts  THEN n   strtrim npts  1  ELSE n strtrim nx ny  1         p title   hovzt varexp fieldf varname        y title   depthf2       IF  time size time 0 1    time 0  GE 10 THEN  x title   timef     end      t :begin           IF keyword_set npts  THEN n   strtrim npts  1  ELSE BEGIN               if keyword_set integration3d  then n strtrim nx ny nz  1  ELSE n strtrim nx ny  1            ENDELSE         p title   hovt varexp fieldf varname        y title   varname       IF  time size time 0 1    time 0  GE 10 THEN  x title   timef     end      x :begin                       IF keyword_set npts  THEN n   strtrim npts  1  ELSE n strtrim ny nz  1        if keyword_set endpoints  AND lat1 NE lat2 then             p title   endpointsf varexp datef svardate fieldf varname ELSE                p title               varexp datef svardate fieldf varname        x title   lontitle       if keyword_set endpoints  AND lat1 EQ lat2 then BEGIN          IF key_onearth THEN  x title    x title  at  strtrim lataxe 0  0  lat1  1  ELSE  x title    x title  at j index  strtrim lat1  1        ENDIF        y title   varname     end      y :begin                       IF keyword_set npts  THEN n   strtrim npts  1  ELSE n strtrim nx nz  1        if keyword_set endpoints  AND lon1 NE lon2 then             p title   endpointsf varexp datef svardate fieldf varname ELSE                p title               varexp datef svardate fieldf varname        x title   lattitle       if keyword_set endpoints  AND lon1 EQ lon2 then BEGIN          IF key_onearth THEN  x title    x title  at  strtrim lonaxe 0  0  lon1  1  ELSE  x title    x title  at i index  strtrim lon1  1        ENDIF        y title   varname     end      z :begin       IF keyword_set npts  THEN n   strtrim npts  1  ELSE n   strtrim nx ny  1         p title   varexp datef svardate fieldf varname        y title   depthf2        x title   varname     end      yfx : BEGIN       IF keyword_set npts  THEN n   strtrim npts  1  ELSE n   strtrim nx ny nz  1         p title   varexp datef svardate varunit        x title   varname2        y title   varname     END      else:   ENDCASE   if keyword_set direc  then BEGIN     if strpos direc   x  NE  1 then           p subtitle   lonintf lo1   lo2 onf strtrim nx  1  points    C   p subtitle     if strpos direc   y  NE  1 then BEGIN       if strpos p subtitle    EQ  1 then             p subtitle   latintf la1   la2 onf strtrim ny  1  points    C p subtitle         ELSE  p subtitle   latintf la1   la2 onf strtrim ny  1  points    p subtitle     ENDIF     if strpos direc   z  NE  1 AND  nz NE 1 OR coupe NE  xy  then BEGIN        if strpos p subtitle    EQ  1 then             p subtitle   depintf pr1   pr2 onf strtrim nz  1  points    C p subtitle         ELSE  p subtitle   depintf pr1   pr2 onf strtrim nz  1  points    p subtitle     ENDIF   ENDIF   if keyword_set endpoints  AND coupe NE  yt  AND lat1 NE lat2 then  p title    p title C C       if keyword_set key_performance  THEN print   temps legende  systime 1 tempsun    return end"); 
     293a[291] = new Array("./ToBeReviewed/PLOTS/plotsym.html", "plotsym.pro", "", "       file_comments   function to make plotting symbols much easier        categories   Graphics      Keyword circle    circle symbol       Keyword TRIANGLE   triangle symbol       Keyword DIAMOND    diamond symbol       Keyword BOX   box symbol       Keyword LINE   line symbol       Keyword SCALE   scales the symbol       Keyword ANGLE   angle the symbol should be rotated       Keyword _EXTRA   extra keywords for usersym   These are thick  color and fill      history   Written by:   Ronn Kling   Ronn Kling Consulting   7038 Westmoreland Dr    Warrenton  VA 20187   klingrl juno com   copyright 1999  all rights reserved      version    Id: plotsym pro 163 2006 08 29 12:59:46Z navarro         function plotsym  circle circle  triangle triangle  diamond diamond                      angle angle  box box  line line  scale scale                      _extra extra     compile_opt idl2  strictarrsubs   if not keyword_set scale  then scale 1 0 if not keyword_set angle  then angle 0 0  if keyword_set circle  then begin   theta   findgen 30 29 360  endif else if keyword_set triangle  then begin   theta    30 90 210   30  endif else if keyword_set diamond  then begin   theta    0 90 180 270 0  endif else if keyword_set box  then begin   theta    315 45 135 225 315  endif else if keyword_set line  then begin   theta    180 0  endif  theta   theta   angle x   cos theta    dtor    scale y   sin theta    dtor    scale  usersym  x y  _extra extra return 8 end"); 
     294a[292] = new Array("./ToBeReviewed/PLOTS/reinitplt.html", "reinitplt.pro", "", "             file_comments   This procedure will reinitialize all or a selection    of the system plot variables      categories   Utilities         keyword X   clear the appropriate variable      keyword Y   clear the appropriate variable        keyword Z    clear the appropriate variable       keyword P   clear the appropriate variable      keyword ALL    Clear all  this is equivalent to  x y z p      keyword INVERT   Invert the logic  Clear all unselected variables    Therefore  clearplt all invert  does nothing       uses   common pro       restrictions   The system plot variables are changed       history   Written by: Trevor Harris  Physics Dept  University of Adelaide   July  1990      Sebastien Masson 7 5 98      version    Id: reinitplt pro 163 2006 08 29 12:59:46Z navarro             pro reinitplt  all all x x y y z z p p  invert invert       compile_opt idl2  strictarrsubs    clearx   0  cleary   0  clearz   0  clearp   0  if  keyword_set x  then clearx   1  if  keyword_set y  then cleary   1  if  keyword_set z  then clearz   1  if  keyword_set p  then clearp   1  if  keyword_set all                or  not keyword_set x  and not keyword_set y  and                   not keyword_set z  and not keyword_set p  then begin      clearx   1  cleary   1  clearz   1  clearp   1  endif   if  keyword_set invert  then begin  clearx   not clearx  cleary   not cleary  clearz   not clearz  clearp   not clearp  endif   if  clearx  then begin                  x charsize 0                  x GRIDSTYLE 0                  X MARGIN 10 3             X MINOR 0                  X OMARGIN 0 0                   x region 0           X RANGE 0                  x STYLE 5                   x tick 1                  x TICKFORMAT                   x TICKLEN 0                  x tickname                   x ticks 0                  X TICKV 0 X TICKV 1   x title                   x TYPE 0  endif  if  cleary  then begin                  y charsize 0                  y GRIDSTYLE 0                  Y MARGIN 10 3             Y MINOR 0                  Y OMARGIN 0 0                   y region 0           Y RANGE 0                  y STYLE 5                   y tick 1                  y TICKFORMAT                   y TICKLEN 0                  y tickname                   y ticks 0                  Y TICKV 0 Y TICKV 1   y title                   y TYPE 0  endif  if  clearz  then begin                  z charsize 0                  z GRIDSTYLE 0                  Z MARGIN 10 3             Z MINOR 0                  Z OMARGIN 0 0                   z region 0           Z RANGE 0                  z STYLE 1                   z tick 1                  z TICKFORMAT                   z TICKLEN 0                  z tickname                   z ticks 0                  Z TICKV 0 Z TICKV 1   z title                   z TYPE 0  endif  if  clearp  then begin  p BACKGROUND d n_colors 1    255  p CHARSIZE 1   p CHARTHICK 0   p LINESTYLE 0   p MULTI replicate 0 5   p NOERASE 0   p POSITION 0   p region 0                   p title   p subtitle   p ticklen 0 02                  p thick 0 1                  p color 0  endif  return  end      "); 
     295a[293] = new Array("./ToBeReviewed/PLOTS/style.html", "style.pro", "", "             file_comments    Choose the way to trace isolines       categories   Graphics      param LABSTYLE  in required    Number to which the style of drawing choosen refer to       param LEVEL_Z2D  in required    Vector containing values of isolignes to be traced       param LINESTYLE  out    Vector used to define the isocontour s style         Comment: remember:  Index Linestyle   0 Solid   1 Dotted   2 Dashed   3 Dash Dot   4 Dash Dot Dot Dot   5 Long Dashes        param THICK  out    Vector defining the thick of the isoline       history   Sebastien Masson  smasson lodyc jussieu fr       version    Id: style pro 163 2006 08 29 12:59:46Z navarro             pro style labstyle level_z2d linestyle thick     compile_opt idl2  strictarrsubs      case labstyle of       0: begin  series: Two thin continuous lines  one boldface continuous line          thick 1 1 2           linestyle 0           return       end       1: begin  series: Before the middle of levels: thin dash  Then thin continuous trait    If the middle of the drawing is drawn  it is in boldface continuous trait           impair n_elements level_z2d 2 fix n_elements level_z2d 2           a replicate 0 fix n_elements level_z2d 2           b replicate 1 fix n_elements level_z2d 2           c replicate 2 fix n_elements level_z2d 2                    if impair then begin             thick b 2 b              linestyle c 0 a           endif else begin             thick 0              linestyle c a           endelse          return       end       2: begin  series: Before the sill  defined by answering to a question : thin dash    Then thin continuous trait  If the sill is drawn  it is in boldface continuous trait           seuil xquestion Quelle est la limite tirets trait continu   0           seuil   float seuil           rien where level_z2d lt seuil n           a replicate 0 n_elements level_z2d n           c replicate 2 n                    if seuil eq level_z2d n  then begin             thick replicate 1 n 2 replicate 1 n_elements level_z2d 1 n              linestyle c a           endif else begin             thick 0              linestyle c a           endelse          return       end       3: begin          n   n_elements level_z2d           seuil   level_z2d 1 n 2            thick   intarr n           thick indgen n 4 4    1          thick indgen n 4 4 1    1          thick indgen n 4 4 2    2          thick indgen n 4 4 3    1           linestyle   intarr n           linestyle indgen n 4 4    3          linestyle indgen n 4 4 1    0          linestyle indgen n 4 4 2    0          linestyle indgen n 4 4 3    0           labels   intarr n           labels indgen n 2 2    1          labels n 2    0           return       end       4: begin   Boldface continuous trait           seuil   1 e 6          thick replicate 5   n_elements level_z2d           linestyle 0           rien where abs level_z2d max abs level_z2d  LT seuil           if rien 0  NE  1 then thick rien 0    3       end       else: begin          ras   report Le numero de labstyle demande n existe pas           stop       end    endcase    return end"); 
     296a[294] = new Array("./ToBeReviewed/PLOTS/symbols.html", "symbols.pro", "", "       file_comments   Create custom plotting symbols       param NSYM  in required                      1   open circle                  2   filled circle                  3   arrow pointing right                  4   arrow pointing left                  5   arrow pointing up                  6   arrow pointing down                  7   arrow pointing up and left  45 degrees    8   arrow pointing down and left   9   arrow pointing down and right    10   arrow pointing up and right    11 through 18 are bold versions of 3 through 10   19   horizontal line   20   box   21   diamond   22   triangle   30   filled box   31   filled diamond   32   filled triangle       param SCALE  in required    size of symbols        keyword COLOR   color of symbols      restrictions   The desired symbol is stored in the user buffer and    will be plotted if  P PSYM   8       history   Jeff Bennett  U of Colorado  198       version    Id: symbols pro 142 2006 07 21 12:47:49Z navarro       pro symbols nsym scale color col     compile_opt idl2  strictarrsubs   on_error 2 fill   0 case 1 of       nsym le 2 :   begin                          circles                        for large scales increase number of points for res                        if scale ge 4 then a   findgen 25  else                         a   findgen 13                        a   a    3 14159   6         0   12 or 24  pi 6                       xarr   cos a                        yarr   sin a                        if nsym eq 2 then fill   1                     end       nsym ge 3 nsym le 18 :   begin            arrow heads                       xarr   fltarr 5                        yarr   xarr                       xarr 1    10                        xarr 2    6                        yarr 2    2                         nsyms greater than 10 should be filled arrows                       if nsym gt 10 then begin                          xarr 3    6                            xarr 4    10                           yarr 3     2                           fill   1                       endif else begin                          xarr 3    10                           xarr 4    6                           yarr 4     2                        endelse                       case 1 of                           nsym eq 3 : dummy   0b                           nsym eq 4 : xarr    1 xarr                           nsym eq 11 nsym eq 12 : begin                             xarr   extrac xarr 0 11                              yarr   extrac yarr 0 11                              yarr 6    0 5                             xarr 7    6                             yarr 7    0 5                             xarr 8    6                             yarr 8     0 5                             yarr 9     0 5                             if nsym eq 12 then begin                                rotation xarr yarr 180 nx ny                                xarr   nx                                yarr   ny                             endif                                                      end                           nsym eq 5 nsym eq 13 : begin                             temp   xarr                             xarr   yarr                             yarr   temp                                                      end                           nsym eq 6 nsym eq 14 : begin                             temp    1 xarr                             xarr   yarr                             yarr   temp                                                      end                           nsym ge 7 nsym le 10                                nsym ge 15 nsym le 18 : begin                             case 1 of                                   nsym eq 7 nsym eq 15 : deg   45                                   nsym eq 8 nsym eq 16 : deg   135                                   nsym eq 9 nsym eq 17 : deg   225                                   nsym eq 10 nsym eq 18 : deg   315                             endcase                             rotation xarr yarr deg nx ny                             xarr   nx                             yarr   ny                                                   end    end nsym ge 7                       endcase                                    end     nsym between 3 and 18       nsym eq 20 nsym eq 21 nsym eq 30 nsym eq 31 :  begin                       xarr   fltarr 5    3                       yarr   xarr                       xarr 1     3                        xarr 2     3                        yarr 2     3                        yarr 3     3                        if  nsym eq 21 nsym eq 31  then begin                          rotation xarr yarr 45 nx ny                          nx   0 70   nx      shrink the x direction                          xarr   nx                          yarr   ny                       endif                       if nsym ge 30 then fill   1                                    end     nsym 20 21 30 31       nsym eq 22 nsym eq 32 :  begin   side length 6  0 at centroid                       yarr   fltarr 4    6 4                        xarr   fltarr 4    6 2                        xarr 1    6 2                        xarr 2    0                        yarr 2    6 sqrt 3 2    6 4                        if nsym eq 32 then fill   1                                     end      else:                          begin                       xarr   fltarr 2    1                       yarr   xarr   0                        xarr 1     1                                      end endcase   xarr   xarr   scale yarr   yarr   scale    set symbol buffer if keyword_set col  then usersym xarr yarr fill fill color col else     usersym xarr yarr fill fill   return end"); 
     297a[295] = new Array("./ToBeReviewed/POSTSCRIPT/calibre.html", "calibre.pro", "", "           file_comments   From a rapport of aspect and values  in line of character  of different margins     it calculate POSFENETRE and POSBAR which serve to place the drawing and the color    bar thanks to  p position on a leaf or a screen output whose the window has the same    proportion       categories    Graphics         param RAPPORTYX  in required    Scale rapport between the length of the y axis and the x one  For example     for an xy map: RAPPORTYX lat2 lat1 lon2 lon1       param MARGE  in required type vector    Vector made of 4 elements containing the size of the left  right  up and    bottom margin having to surround the graph  All is measured in lines of characters       param MARGEBAR  in required type vector    Vector made of 4 elements containing the size of the left  right and bottom    margin and  BEWARE  the last element is this time the position of the right up    corner  having to surround the color bar  All is measured in lines of characters       param SMALLDRAW  in required type vector    2 possibilities:      It is vector made of 4 elements giving  in portrait or landscape  the position    of the frame in which the drawing must go in  This position is given by coordinates    of the 2 corners of the frame: in the left bottom and the right up  It is always     for a postscript or a screen output  express in cm  the origin being the    left bottom corner       It is a vector made of 3 elements giving the number of column to be done in the    drawing  the number of line and the number of the case the number have to occupy     see matlab  For example  to do 6 drawing in 3 columns and 2 lines and occupy    the 4th case  small 2 3 4       keyword REMPLI   Force the drawing to occupy the biggest possible place defined by    SMALLDRAW without respect the rapport y on x       keyword YXASPECT   Force the rapport y on x to take the value RAPPORTYX YXASPECT     This keyword can be used in 2 cases:     1  YXASPECT 1 : force RAPPORTYX to be respected otherwise  Calibre take the      initiative to change it a little in the case of the aspect rapport of SMALL      is too different of the one of SMALLDRAW       2  YXASPECT n : multiply by n the aspect rapport given by default       For example in plt  RAPPORTYX is calculated to the reference be orthonormal      to have a reference where the y axis is 2 time bigger than the x one  YXASPECT 2       keyword PORTRAIT          Force the page or the window to be in standing position        keyword LANDSCAPE          Force the page or the window on the screen to be in lengthened position        keyword _EXTRA   Used to pass your keywords      param POSFENETRE  type vector    It is a vector made of 4 elements containing the position of the frame    containing captions   the graph in normalized coordinates     Comment: to position the drawing  we have to do  p position POSFENETRE    after the call of calibre       param POSBAR  type vector    See POSFENTRE but for the color bar  Same comment to position the color bar   p position POSBAR      uses   common pro      history   Sebastien Masson  smasson lodyc jussieu fr   11 12 98      version    Id: calibre pro 163 2006 08 29 12:59:46Z navarro           pro calibre  rapportyx  marge  margebar  smalldraw  posfenetre  posbar                  REMPLI   rempli  YXASPECT   yxaspect  PORTRAIT   portrait                  LANDSCAPE   lanscape  _extra   ex       compile_opt idl2  strictarrsubs    cm_4ps   IF NOT keyword_set key_forgetold  THEN BEGIN  updatenew  updatekwd   ENDIF        tempsun   systime 1            For key_performance      if keyword_set portrait  then key_portrait 1    if keyword_set landscape  then key_portrait 0    if keyword_set yxaspect  then begin       rapportyx rapportyx yxaspect        test2 0    endif else begin       yxaspect 1        test2 1     ENDELSE        mipgsz   min page_size  max   mapgsz      choice of Landscape or Portrait      if n_elements key_portrait  eq 0  then begin       if rapportyx ge 1 then key_portrait 1       if rapportyx lt 1 then key_portrait 0    endif     If smalldraw is count like in matlab      if n_elements smalldraw  EQ 3  then begin       if n_elements page_margins  EQ 0 then page_margins    1  1  1  1        smalldraw   long smalldraw        nbrecol   smalldraw 0        nbrelig   smalldraw 1        numero   smalldraw 2 1       numlig   numero nbrecol       numcol   numero numlig nbrecol       bas   mipgsz key_portrait mapgsz 1 key_portrait         cote   mapgsz key_portrait mipgsz 1 key_portrait         poscol   page_margins 0 findgen nbrecol 1 1 bas page_margins 0 page_margins 1 nbrecol        poslig   cote page_margins 3 findgen nbrelig 1 1 cote page_margins 2 page_margins 3 nbrelig        smalldraw    poscol numcol  poslig numlig 1  poscol numcol 1  poslig numlig     endif     determination of the size of characters  p charsize       nombre_de_mots_ds_titre   60      p charsize 1 smalldraw 2 smalldraw 0 d x_px_cm          nombre_de_mots_ds_titre   d y_ch_size     if  p charsize gt 1 then  p charsize 1     transfert of margin in cm      cm 1 d x_px_cm    marge 1  marge    d y_ch_size    p charsize   cm    margebar 1  margebar    d y_ch_size    p charsize   cm     definition of the part of the leaf where we draw      if key_portrait eq 0 then begin       big smalldraw 2 smalldraw 0        small smalldraw 3 smalldraw 1     endif else begin       small smalldraw 2 smalldraw 0        big smalldraw 3 smalldraw 1     endelse    if key_portrait eq 0 then       rapportmax 1 small marge 3 marge 1 big marge 2 marge 0       else rapportmax 1 small marge 2 marge 0 big marge 3 marge 1      If YXASPECT is not specified  we modify the value of RAPPORTYX    to it match better with the leaf s proportions       if rapportyx le rapportmax then begin       if test2 then begin          rap 1 rapportmax rapportyx          if rap ge 5  and rap lt 6  then rapportyx rapportyx 1 5          if rap ge 6  and rap lt 7  then rapportyx rapportyx 2           if rap ge 7  and rap lt 8  then rapportyx rapportyx 2 5          if rap ge 8  then rapportyx rapportyx 3        endif    endif else begin       if test2 then begin          rap 1 rapportmax rapportyx          if rap lt 1 5  and rap ge 1 6  then rapportyx rapportyx 1 5          if rap lt 1 6  and rap ge 1 7  then rapportyx rapportyx 2           if rap lt 1 7  and rap ge 1 8  then rapportyx rapportyx 2 5          if rap lt 1 8  then rapportyx rapportyx 3        endif    endelse     in the case where we do a Landscape:      if key_portrait eq 0 then begin              if keyword_set rempli  then begin          xs big          ys small       endif else begin          if rapportyx le rapportmax then begin             xs big             ys 1 big marge 0 marge 1 rapportyx marge 2 marge 3              if ys gt small then begin                xs 1 small marge 2 marge 3 rapportyx marge 0 marge 1                 ys small             endif          endif else begin             xs 1 small marge 2 marge 3 rapportyx marge 0 marge 1              ys small             if xs gt big then begin                xs big                ys 1 big marge 0 marge 1 rapportyx marge 2 marge 3              endif          endelse       endelse       xoff 1 small ys 2 smalldraw 1        yoff 1 big xs 2 xs mapgsz smalldraw 2        a 1 mapgsz yoff mapgsz       b 1 xoff mipgsz       c a 1 xs mapgsz       d b 1 ys mipgsz    endif       In the case where we do a portrait:      else begin              if keyword_set rempli  then begin          xs small          ys big       endif else begin          if rapportyx le rapportmax then begin             xs small             ys 1 small marge 0 marge 1 rapportyx marge 2 marge 3              if ys gt big then begin                xs 1 big marge 2 marge 3 rapportyx marge 0 marge 1                 ys big             endif          endif else begin             xs 1 big marge 2 marge 3 rapportyx marge 0 marge 1              ys big             if xs gt small then begin                xs small                ys 1 small marge 0 marge 1 rapportyx marge 2 marge 3              endif          endelse       endelse       xoff 1 small xs 2 smalldraw 0        yoff 1 big ys 2 smalldraw 1        a 1 xoff mipgsz       b 1 yoff mapgsz       c a 1 xs mipgsz       d b 1 ys mapgsz       xset   xoff       yset   yoff    endelse      bas mapgsz 1 key_portrait mipgsz key_portrait    cote mipgsz 1 key_portrait mapgsz key_portrait    posfenetre a b c d  marge 0 bas  marge 2 cote                              marge 1 bas marge 3 cote      posbar a b c d  margebar 0 bas  margebar 2 cote                          margebar 1 bas ys margebar 3 cote        if keyword_set key_performance  THEN print   temps calibre  systime 1 tempsun     IF NOT keyword_set key_forgetold  THEN BEGIN     updateold   ENDIF        return end"); 
     298a[296] = new Array("./ToBeReviewed/POSTSCRIPT/chcolps.html", "chcolps.pro", "", "     file_comments           categories          param TABLE          restrictions          examples        history         version    Id: chcolps pro 163 2006 08 29 12:59:46Z navarro     PRO format_colortable_hexa  table     compile_opt idl2  strictarrsubs        tvlct  r  g  b   get      z   strarr 256      y   strarr 256      for k 0 255 do z k 00 strtrim string r k  format    Z 2      for k 0 255 do y k y k strmid z k strlen z k 2 2       for k 0 255 do z k 00 strtrim string g k  format    Z 2      for k 0 255 do y k y k strmid z k strlen z k 2 2       for k 0 255 do z k 00 strtrim string b k  format    Z 2      for k 0 255 do y k y k strmid z k strlen z k 2 2           table    strlowcase y   END        file_comments    Build a bloc of colortable       categories          param TABLEOUT          restrictions          examples        history         version    Id: chcolps pro 163 2006 08 29 12:59:46Z navarro     PRO build_table  tableout         compile_opt idl2  strictarrsubs        format_colortable_hexa  table       tableout   strarr 25       tableout 0     COLORTAB  def       END         file_comments    Modify colors of a postscript file      categories          param N1  in required    Number of elements in the first dimension       param N2  in required    Number of elements in the second dimension       param FILE   A scalar of string type  the name of the  pro  file to be tested    if necessary  the input name is completed with  pro  and its path   found in  path      keyword PALIT1          keyword PALIT2          restrictions          examples        history   G  Roullet 1999      version    Id: chcolps pro 163 2006 08 29 12:59:46Z navarro     PRO chcolps  n1  n2  file  PALIT1   palit1  PALIT2   palit2           recuperate palettes       compile_opt idl2  strictarrsubs       lct  n1     IF keyword_set palit1  THEN palit  palit1     tvlct  red  green  blue   get      lct  n2     IF keyword_set palit2  THEN palit  palit2     tvlct  red1  green1  blue1   get           filein   file     fileout   file new           openr  numin  filein   get_lun     openw  numout  fileout   get_lun     ligne         nl   0     colortab   0     Scan le fichier       WHILE NOT eof numin  DO BEGIN            readf  numin  ligne  format    A            nl   nl 1     Replace setrgbcolor statements             pos   strpos ligne   setrgbcolor            IF pos NE  1 THEN BEGIN                  r   round float strmid ligne  pos 18  6 255                  g   round float strmid ligne  pos 12  6 255                  b   round float strmid ligne  pos 6  6 255                            ind   where r EQ red AND g EQ green AND b EQ blue                  ind   ind 0                  IF ind 0  NE  1 THEN BEGIN                        r1   red1 ind 255                        g1   green1 ind 255                        b1   blue1 ind 255                        color   string r1  g1  b1  format    3 F5 3 : X                        strput  ligne  color  pos 18                 ENDIF ELSE BEGIN                        print   erreur ligne :  nl                       dist   abs r red abs g green abs b blue                        ind    where dist EQ min dist 0                        ind   ind 0                         print   je trouve              long r  g  b                         print   je remplace par    red ind  green ind  blue ind                        r1   red1 ind 255                        g1   green1 ind 255                        b1   blue1 ind 255                        color   string r1  g1  b1  format    3 F5 3 : X                        strput  ligne  color  pos 18                 ENDELSE            ENDIF                 Replace COLORTAB             pos   strpos ligne   COLORTAB            IF pos NE  1 THEN BEGIN                  build_table  table                 n   0                 colortab   1           ENDIF             IF colortab THEN BEGIN                 ligne   table n                  n   n 1                 IF n EQ 24 THEN colortab   0           ENDIF      Ecrit le fichier de sorti             printf  numout  ligne  format    A      ENDWHILE      close  numin     close  numout     free_lun  numin     free_lun  numout      spawn   gs  fileout  END  "); 
     299a[297] = new Array("./ToBeReviewed/POSTSCRIPT/ps.html", "ps.pro", "", ""); 
     300a[298] = new Array("./ToBeReviewed/STATISTICS/a_correlate2d.html", "a_correlate2d.pro", "", "       file_comments         categories   Statistics      param X  in required    An 2 dimension Array  nx ny       param LAG  in required    2 element vector  in the intervals  nx 2   nx 2 ny 2   ny 2    of type integer that specifies the absolute distance s  between    indexed elements of X       keyword ZERO2NAN      keyword DOUBLE   If set to a non zero value  computations are done in double precision arithmetic       history   28 2 2000 Sebastien Masson  smasson lodyc jussieu fr    Based on the A_CORRELATE procedure of IDL      version    Id: a_correlate2d pro 163 2006 08 29 12:59:46Z navarro        FUNCTION auto_cov2d  X  Lag  Double   Double  zero2nan   zero2nan     compile_opt idl2  strictarrsubs      XDim   SIZE X   dimensions     nx   XDim 0     ny   XDim 1   Sample autocovariance function    Xmean   TOTAL X  Double   Double     1 nx ny       res   TOTAL   X 0:nx 1 lag 0  0:ny 1 lag 1    Xmean                       X lag 0 :nx 1  lag 1 :ny 1    Xmean                      Double   Double      if keyword_set zero2nan  AND res EQ 0 then res    values f_nan    RETURN  res  END        file_comments   This function computes the autocorrelation Px K L  or   autocovariance Rx K L  of a sample population X nx ny  as a   function of the lag  K L       categories   Statistics      param X  in required    An 2 dimension Array  nx ny       param LAG  in required    2 element vector  in the intervals  nx 2   nx 2 ny 2   ny 2    of type integer that specifies the absolute distance s  between    indexed elements of X       keyword COVARIANCE   If set to a non zero value  the sample autocovariance is computed       keyword DOUBLE   If set to a non zero value  computations are done in double precision arithmetic       history   28 2 2000 Sebastien Masson  smasson lodyc jussieu fr    Based on the A_CORRELATE procedure of IDL      version    Id: a_correlate2d pro 163 2006 08 29 12:59:46Z navarro         FUNCTION a_correlate2d  X  Lag  Covariance   Covariance  Double   Double     compile_opt idl2  strictarrsubs     Compute the sample autocorrelation or autocovariance of  Xt  Xt l   as a function of the lag  l      ON_ERROR  2     XDim   SIZE X   dimensions     XNDim   SIZE X   n_dimensions     nx   XDim 0     ny   XDim 1     if XNDim NE 2 then       MESSAGE   X array must contain 2 dimensions   Check length     if nx lt 2 then       MESSAGE   first dimension of X array must contain 2 or more elements     if ny lt 2 then       MESSAGE   second dimension of X array must contain 2 or more elements     if n_elements Lag  NE 2 THEN       MESSAGE   Lag array must contain 2 elements       If the DOUBLE keyword is not set then the internal precision and  result are identical to the type of input     if N_ELEMENTS Double  eq 0 then       Double    SIZE X   type  eq 5      if KEYWORD_SET Covariance  eq 0 then begin  Compute Autocorrelation        Auto   Auto_Cov2d X  ABS Lag  Double   Double                Auto_Cov2d X   0L  0L  Double   Double   zero2nan     endif else begin              Compute Autocovariance        Auto   Auto_Cov2d X  ABS Lag  Double   Double    n_elements X      endelse     if Double eq 0 then RETURN  FLOAT Auto  else       RETURN  Auto  END"); 
     301a[299] = new Array("./ToBeReviewed/STATISTICS/a_timecorrelate.html", "a_timecorrelate.pro", "", "     file_comments         categories   Statistics      param X  in required type array    An Array which last dimension is the time dimension so   size n       param M        param NT        keyword ZERO2NAN        keyword DOUBLE   If set to a non zero value  computations are done in   double precision arithmetic       examples        history        version    Id: a_timecorrelate pro 163 2006 08 29 12:59:46Z navarro       FUNCTION timeauto_cov  X  M  nT  Double   Double  zero2nan   zero2nan  Sample autocovariance function     compile_opt idl2  strictarrsubs      TimeDim   size X   n_dimensions     Xmean   TOTAL X  TimeDim  Double   Double    nT    if double then one   1 0d ELSE one   1 0    Xmean   Xmean replicate one  nT   M         case TimeDim of       1:res   TOTAL X 0:nT   M   1L    Xmean     X M:nT   1L    Xmean                        TimeDim  Double   Double        2:res   TOTAL X  0:nT   M   1L    Xmean                           X  M:nT   1L    Xmean                          TimeDim  Double   Double        3:res   TOTAL X    0:nT   M   1L    Xmean                           X    M:nT   1L    Xmean                          TimeDim  Double   Double        4:res   TOTAL X      0:nT   M   1L    Xmean                           X      M:nT   1L    Xmean                          TimeDim  Double   Double     ENDCASE    if keyword_set zero2nan  then begin       zero   where res EQ 0        if zero 0  NE  1 then res zero     values f_nan    endif    RETURN  res  END      file_comments   Same function as A_CORRELATE but accept array  until 4   dimension  for input and do the autocorrelation or the   autocovariance along the time dimension which must be the last   one of the input array      This function computes the autocorrelation Px L  or autocovariance   Rx L  of a sample population X as a function of the lag  L       categories   Statistics      param X  in required type array    An Array which last dimension is the time dimension so   size n       param LAG  in required type scalar or vector    A scalar or n element vector  in the interval  n 2   n 2    of type integer that specifies the absolute distance s  between    indexed elements of X       keyword COVARIANCE   If set to a non zero value  the sample autocovariance   is computed       keyword DOUBLE   If set to a non zero value  computations are done in   double precision arithmetic       examples         Define an n element sample population            x    3 73  3 67  3 77  3 83  4 67  5 87  6 70  6 97  6 40  5 57            Compute the autocorrelation of X for LAG    3  0  1  3  4  8           lag    3  0  1  3  4  8            result   a_correlate x  lag            The result should be:            0 0146185  1 00000  0 810879  0 0146185   0 325279   0 151684       history   24 2 2000 Sebastien Masson  smasson lodyc jussieu fr      Based on the A_CORRELATE procedure of IDL   INTRODUCTION TO STATISTICAL TIME SERIES   Wayne A  Fuller   ISBN 0 471 28715 6      version    Id: a_timecorrelate pro 163 2006 08 29 12:59:46Z navarro        FUNCTION a_timecorrelate  X  Lag  COVARIANCE   Covariance  DOUBLE   Double     compile_opt idl2  strictarrsubs     Compute the sample autocorrelation or autocovariance of  Xt  Xt l   as a function of the lag  l      ON_ERROR  2     XDim   SIZE X   dimensions     XNDim   SIZE X   n_dimensions     nT   XDim XNDim 1                                   Check length     if nT lt 2 then       MESSAGE   Time axis of X array must contain 2 or more elements       If the DOUBLE keyword is not set then the internal precision and  result are identical to the type of input     if N_ELEMENTS Double  eq 0 then       Double    SIZE X   type  eq 5          if n_elements lag  EQ 0 then lag   0    nLag   N_ELEMENTS Lag      if nLag eq 1 then Lag    Lag   Create a 1 element vector      case XNDim of       1:if Double eq 0 then Auto   FLTARR nLag  else Auto   DBLARR nLag        2:if Double eq 0 then Auto   FLTARR XDim 0  nLag  else Auto   DBLARR XDim 0  nLag        3:if Double eq 0 then Auto   FLTARR XDim 0  XDim 1  nLag          else Auto   DBLARR XDim 0  XDim 1  nLag        4:if Double eq 0 then Auto   FLTARR XDim 0  XDim 1  XDim 2  nLag          else Auto   DBLARR XDim 0  XDim 1  XDim 2  nLag     endcase     if KEYWORD_SET Covariance  eq 0 then begin  Compute Autocorrelation        for k   0  nLag 1 do          case XNDim of          1:Auto k    TimeAuto_Cov X  ABS Lag k  nT  Double   Double                TimeAuto_Cov X  0L  nT  Double   Double   zero2nan           2:Auto  k    TimeAuto_Cov X  ABS Lag k  nT  Double   Double                TimeAuto_Cov X  0L  nT  Double   Double   zero2nan           3:Auto    k    TimeAuto_Cov X  ABS Lag k  nT  Double   Double                TimeAuto_Cov X  0L  nT  Double   Double   zero2nan           4:Auto      k    TimeAuto_Cov X  ABS Lag k  nT  Double   Double                TimeAuto_Cov X  0L  nT  Double   Double   zero2nan        endcase    endif else begin              Compute Autocovariance        for k   0  nLag 1 do           case XNDim of          1:Auto k    TimeAuto_Cov X  ABS Lag k  nT  Double   Double    nT          2:Auto  k    TimeAuto_Cov X  ABS Lag k  nT  Double   Double    nT          3:Auto    k    TimeAuto_Cov X  ABS Lag k  nT  Double   Double    nT          4:Auto      k    TimeAuto_Cov X  ABS Lag k  nT  Double   Double    nT       endcase    endelse     if Double eq 0 then RETURN  FLOAT Auto  else       RETURN  Auto  END"); 
     302a[300] = new Array("./ToBeReviewed/STATISTICS/c_timecorrelate.html", "c_timecorrelate.pro", "", "     file_comments         categories   Statistics      param XD        param YD        param M        param NT        param NDIM        keyword ZERO2NAN        keyword DOUBLE   If set to a non zero value  computations are done in   double precision arithmetic       examples        history        version    Id: c_timecorrelate pro 163 2006 08 29 12:59:46Z navarro       FUNCTION timecross_cov  Xd  Yd  M  nT  Ndim  Double   Double  ZERO2NAN   zero2nan    Sample cross covariance function     compile_opt hidden      case Ndim OF       1:res   TOTAL Xd 0:nT   M   1L    Yd M:nT   1L                          Double   Double        2:res   TOTAL Xd  0:nT   M   1L    Yd  M:nT   1L                          Ndim  Double   Double        3:res   TOTAL Xd    0:nT   M   1L    Yd    M:nT   1L                          Ndim  Double   Double        4:res   TOTAL Xd      0:nT   M   1L    Yd      M:nT   1L                          Ndim  Double   Double     ENDCASE    if keyword_set zero2nan  then begin       zero   where res EQ 0        if zero 0  NE  1 then res zero     values f_nan    ENDIF      RETURN  res  END      file_comments   This function computes the  time cross correlation  Pxy L  or   the  time cross covariance  between 2 arrays  this is some   kind of c_correlate but for multidimenstionals arrays  as a   function of the lag  L       categories   Statistics      param X  in required type array    An Array which last dimension is the time dimension of   size n  float or double       param Y  in required type array    An Array which last dimension is the time dimension of   size n  float or double       param LAG  in required type scalar or vector    A scalar or n element vector  in the interval  n 2   n 2    of type integer that specifies the absolute distance s  between   indexed elements of X       keyword COVARIANCE   If set to a non zero value  the sample cross    covariance is computed       keyword DOUBLE   If set to a non zero value  computations are done in   double precision arithmetic       examples            Define two n element sample populations            x    3 73  3 67  3 77  3 83  4 67  5 87  6 70  6 97  6 40  5 57            y    2 31  2 76  3 02  3 13  3 72  3 88  3 97  4 39  4 34  3 95            Compute the cross correlation of X and Y for LAG    5  0  1  5  6  7           lag    5  0  1  5  6  7            result   c_timecorrelate x  y  lag            The result should be:            0 428246  0 914755  0 674547   0 405140   0 403100   0 339685       history           01 03 2000 Sebastien Masson  smasson lodyc jussieu fr          Based on the C_CORRELATE procedure of IDL           August 2003 Sebastien Masson          update according to the update made in C_CORRELATE by         W  Biagiotti and available in IDL 5 5           INTRODUCTION TO STATISTICAL TIME SERIES         Wayne A  Fuller         ISBN 0 471 28715 6      version    Id: c_timecorrelate pro 163 2006 08 29 12:59:46Z navarro       FUNCTION c_timecorrelate  X  Y  Lag  Covariance   Covariance  Double   Double   Compute the sample cross correlation or cross covariance of   Xt  Xt l  and  Yt  Yt l  as a function of the lag  l      ON_ERROR  2     xsize   SIZE X     ysize   SIZE Y     nt   float xsize xsize 0     NDim   xsize 0      if total xsize 0:xsize 0  NE ysize 0:ysize 0  NE 0 then       MESSAGE   X and Y arrays must have the same size and the same dimensions    Check length     if nt lt 2 then       MESSAGE   Time dimension of X and Y arrays must contain 2 or more elements       If the DOUBLE keyword is not set then the internal precision and  result are identical to the type of input     if N_ELEMENTS Double  eq 0 then       Double    Xsize Xsize 0 1  eq 5 or ysize ysize 0 1  eq 5      if n_elements lag  EQ 0 then lag   0    nLag   N_ELEMENTS Lag    Deviations    if double then one   1 0d ELSE one   1 0    Ndim   size X   n_dimensions     Xd   TOTAL X  Ndim  Double   Double    nT    Xd   X   Xd replicate one   nT     Yd   TOTAL Y  Ndim  Double   Double    nT    Yd   Y   Yd replicate one   nT      if nLag eq 1 then Lag    Lag   Create a 1 element vector      case NDim of       1:if Double eq 0 then  Cross   FLTARR nLag  else  Cross   DBLARR nLag        2:if Double eq 0 then  Cross   FLTARR Xsize 1  nLag  else  Cross   DBLARR Xsize 1  nLag        3:if Double eq 0 then  Cross   FLTARR Xsize 1  Xsize 2  nLag          else  Cross   DBLARR Xsize 1  Xsize 2  nLag        4:if Double eq 0 then  Cross   FLTARR Xsize 1  Xsize 2  Xsize 3  nLag          else  Cross   DBLARR Xsize 1  Xsize 2  Xsize 3  nLag     endcase     if KEYWORD_SET Covariance  eq 0 then begin  Compute Cross  Crossation        for k   0  nLag 1 do begin          if Lag k  ge 0 then BEGIN              case NDim of                1: Cross k    TimeCross_Cov Xd  Yd  Lag k  nT  Ndim  Double   Double                 2: Cross  k    TimeCross_Cov Xd  Yd  Lag k  nT  Ndim  Double   Double                 3: Cross    k    TimeCross_Cov Xd  Yd  Lag k  nT  Ndim  Double   Double                 4: Cross      k    TimeCross_Cov Xd  Yd  Lag k  nT  Ndim  Double   Double                endcase          ENDIF else BEGIN              case NDim of                1: Cross k    TimeCross_Cov Yd  Xd  ABS Lag k  nT  Ndim  Double   Double                 2: Cross  k    TimeCross_Cov Yd  Xd  ABS Lag k  nT  Ndim  Double   Double                 3: Cross    k    TimeCross_Cov Yd  Xd  ABS Lag k  nT  Ndim  Double   Double                 4: Cross      k    TimeCross_Cov Yd  Xd  ABS Lag k  nT  Ndim  Double   Double               endcase          ENDELSE         ENDFOR        div   sqrt TimeCross_Cov Xd  Xd  0L  nT  Ndim  Double   Double   zero2nan                        TimeCross_Cov Yd  Yd  0L  nT  Ndim  Double   Double   zero2nan         Cross   temporary Cross temporary div replicate one  nLag     endif else begin              Compute Cross Covariance        for k   0  nLag 1 do begin          if Lag k  ge 0 then BEGIN             case NDim of                1: Cross k    TimeCross_Cov Xd  Yd  Lag k  nT  Ndim  Double   Double    nT                2: Cross  k    TimeCross_Cov Xd  Yd  Lag k  nT  Ndim  Double   Double    nT                3: Cross    k    TimeCross_Cov Xd  Yd  Lag k  nT  Ndim  Double   Double    nT                4: Cross      k    TimeCross_Cov Xd  Yd  Lag k  nT  Ndim  Double   Double    nT             ENDCASE          ENDIF else BEGIN              case NDim of                1: Cross k    TimeCross_Cov yd  xd  ABS Lag k  nT  Ndim  Double   Double    nT                2: Cross  k    TimeCross_Cov yd  xd  ABS Lag k  nT  Ndim  Double   Double    nT                3: Cross    k    TimeCross_Cov yd  xd  ABS Lag k  nT  Ndim  Double   Double    nT                4: Cross      k    TimeCross_Cov yd  xd  ABS Lag k  nT  Ndim  Double   Double    nT             ENDCASE          ENDELSE        endfor    endelse     if Double eq 0 then RETURN  FLOAT Cross  else RETURN   Cross  END   "); 
     303a[301] = new Array("./ToBeReviewed/STRING/chkeywd.html", "chkeywd.pro", "", "             file_comments   In a string containing an order to execute with EXECUTE by example     We change the value of one of keywords    More generally  in a string  we look for the character chain:   keywdname      and we change the value of       categories   String  keywords         param STRINGIN  in required type string    it is a string      param KEYWDNAME  in required type string    it is a string designating the name of keyword to look for       param KEYWDVALUE  in required     The new value of the keyword to considerate in STRINGIN      keyword SEPARATOR   To look for the keyword  we look for the first sign   which follow    the position of keywdname  By default  we substitute the string    before the comma  With the keyword SEPARATOR we can modify the cut    of the string  SEPARATOR give a Character before the one we have to    look for the comma which delimit the keyword in the string     see examples       keyword AFTER   To look for the keyword  we look for the first sign   which follow    the position of keywdname  By default  we substitute the string    before the comma  With the keyword AFTER we can modify the cut    of the string  AFTER give a Character after the one we have to    look for the comma which delimit the keyword in the string     see examples       returns    stringout stringin modified if keywdname has been found in stringin      uses    common pro      restrictions   If keywdvalue is an array  it will be convert in a vector       restrictions   Beware  this function has loops  ifs ad cases everywhere  So it can    not be used by big keywords  with a lot of elements which are big    arrays  The input keyword must not contain Complex floatings  structure     Double precision complex  Pointer  Object reference  Unsigned Integer     Unsigned Longword Integer  64 bit Integer or Unsigned 64 bit Integer          examples       IDL  b ok 111  year 1997 1998 1999  age_capitaine 35      IDL  print  b     ok 111  year 1997 1998 1999  age_capitaine 35     IDL  print  chkeywd b ok c est bon      ok c est bon  year 1997 1998 1999  age_capitaine 35     IDL  print  chkeywd b YEAR indgen 5 sep      ok 111  year 0 1 2 3 4  age_capitaine 35     IDL  print  chkeywd b YEAR indgen 5 sep after      ok 111  year 0 1 2 3 4  age_capitaine 35     IDL  b ok 111   year   age_capitaine      IDL  print  chkeywd b year c est bon      ok 111  year c est bon   age_capitaine      history   Sebastien Masson  smasson lodyc jussieu fr                         18 10 1999                        24 11 1999: adaptation for keywords starting by         version    Id: chkeywd pro 163 2006 08 29 12:59:46Z navarro             FUNCTION chkeywd  stringin  keywdname  keywdvalue  SEPARATOR   separator  AFTER   after     compile_opt idl2  strictarrsubs       stringout   stringin    poskeywd   strpos strlowcase stringout  strlowcase keywdname     if poskeywd EQ  1 then return  stringout    while poskeywd NE  1 do BEGIN   change a keyword starting by  toto       if strmid stringout poskeywd 1 1  EQ   then BEGIN          ajoute   keywdname tostr keywdvalue           stringout   strmid stringout  0  poskeywd 1 ajoute strmid stringout poskeywd strlen keywdname             poskeywd   poskeywd strlen ajoute           poskeywd   strpos stringout  keywdname  poskeywd        ENDIF ELSE BEGIN    change a keyword sarting by toto           posegal   strpos stringout    poskeywd           if posegal EQ  1 then return  stringout           if NOT keyword_set separator  then separator              posvirgule   strpos stringout  separator  posegal 1           if keyword_set after  then posvirgule   strpos stringout    posvirgule 1             ELSE posvirgule   rstrpos stringout    posvirgule 1           if posvirgule EQ  1 then posvirgule   strlen stringout             stringout   strmid stringout  0  posegal 1 tostr keywdvalue strmid stringout  posvirgule             poskeywd   strpos stringout  keywdname  posvirgule 1        ENDELSE     endwhile     return   stringout end"); 
     304a[302] = new Array("./ToBeReviewed/STRING/delchr.html", "delchr.pro", "", "         file_comments   Delete all occurrences of a character from a text string        categories      param OLD  in required    original text string        param C  in required    character to delete       keyword HELP      returns   new   resulting string        history         R  Sterner   5 Jul  1988          Johns Hopkins Applied Physics Lab          RES 11 Sep  1989   converted to SUN          R  Sterner  27 Jan  1993   dropped reference to array      Copyright  C  1988  Johns Hopkins University Applied Physics Laboratory   This software may be used  copied  or redistributed as long as it is not   sold and this copyright notice is reproduced on each copy made   This   routine is provided as is without any express or implied warranties   whatsoever   Other limitations apply as described in the file disclaimer txt       version    Id: delchr pro 163 2006 08 29 12:59:46Z navarro            FUNCTION delchr  OLD  C  help hlp     compile_opt idl2  strictarrsubs      if  n_params 0  lt 2  or keyword_set hlp  then begin    print  Delete all occurrences of a character from a text string     print  new   delchr old  char     print    old   original text string      in     print    char   character to delete      in     print    new   resulting string          out     return   1  endif    B   BYTE OLD      convert string to a byte array   CB   BYTE C      convert char to byte   w   where b ne cb 0   if w 0  eq  1 then return        Nothing left   return  string b w      Return new string   END"); 
     305a[303] = new Array("./ToBeReviewed/STRING/getfile.html", "getfile.pro", "", "         file_comments   Read a text file into a string array       param filein  in required    text file name        Keyword ERROR    err  error flag: 0 ok  1 file not opened    2 no lines in file                keyword QUIET    means give no error message                keyword LINES    n  Number of lines to read  def all    Much faster if number of lines is known    Automatic for IDL 5 6 or later                keyword FIND    search the file in the all  path directories  use   find pro       keyword HELP       returns       history         R  Sterner  20 Mar  1990         R  Sterner  1999 Apr 14   Added LINES n keyword          R  Sterner  2003 Aug 29   Automatic lines if IDL 5 6          R  Sterner  2003 Sep 02   Check if file exists first          R  Sterner  2003 Sep 04   Fixed error in number of lines in file          R  Sterner  2003 Oct 10   Fixed error when no lines          R  Sterner  2004 Jan 27   Fixed to work in IDL as old as vers 4            S  Masson  smasson lodyc jussieu fr  4 Feb 2002         search te file in the all  path directories  use find pro          when using  find keyword  Use spawn   cat  for unix os      Copyright  C  1990  Johns Hopkins University Applied Physics Laboratory   This software may be used  copied  or redistributed as long as it is not   sold and this copyright notice is reproduced on each copy made   This   routine is provided as is without any express or implied warranties   whatsoever   Other limitations apply as described in the file disclaimer txt       version    Id: getfile pro 192 2006 09 22 09:37:08Z smasson            function getfile  filein  error err  help hlp  quiet quiet  lines lines  find   find     compile_opt idl2  strictarrsubs      if  n_params 0  lt 1  or keyword_set hlp  then begin    print  Read a text file into a string array     print  s   getfile f     print    f   text file name       in     print    s   string array         out     print  Keywords:     print    ERROR err  error flag: 0 ok  1 file not opened     print      2 no lines in file     print     QUIET means give no error message     print    LINES n  Number of lines to read  def all     print      Much faster if number of lines is known     print      Automatic for IDL 5 6 or later     return   1  endif           if keyword_set find  then begin           file   find filein            file   file 0            if file EQ  NOT FOUND  then begin             print    Error in getfile: File  filein  not fouond              return   1           endif         ENDIF ELSE file   filein                  if  version release 0  ge 5 5  then begin           f   call_function file_search  file  count   c   endif else begin    f   findfile file count c   endelse  if c eq 0 then begin    err   1    return   endif    if n_elements line  eq 0 and  version release 0  ge 5 6  then begin    lines   file_lines file     if lines eq 0 then begin      if not keyword_set quiet  then print  No lines in file       err   2      return 1    endif    minlines   0  endif else minlines 1    get_lun  lun  on_ioerror  err  openr  lun  file    if n_elements lines  ne 0 then begin    s   strarr lines     readf lun s  endif else begin    s          t        while not eof lun  do begin      readf  lun  t      s    s t     endwhile  endelse    close  lun  free_lun  lun  if n_elements s  eq minlines then begin    if not keyword_set quiet  then print  No lines in file     err   2    return 1  endif  if minlines eq 1 then s s 1:     err   0  return  s   err: if  err eq  168 then begin    if not keyword_set quiet  then print  Non standard text file format     free_lun  lun    return  s  endif  if not keyword_set quiet  then print       Error in getfile: File  file  not opened   free_lun  lun  err   1  return   1    end"); 
     306a[304] = new Array("./ToBeReviewed/STRING/getwrd.html", "getwrd.pro", "", "         file_comments   Return the n th word from a text string        categories      param TXTSTR  in required    text string to extract from    The first element is used if txt is an array       param NTH  in required    word number to get  first   0   def       param MTH  in required    optional last word number to get       keyword LOCATION     l   Return word n string location                keyword DELIMITER     d  Set word delimiter  def   space   tab                keyword LAST   means n is offset from last word   So n 0 gives   last word  n 1 gives next to last      If n 2 and m 0 then last 3 words are returned       keyword NOTRIM   suppresses whitespace trimming on ends        keyword NWORDS     n  Returns number of words in string        returns wrd   returned word or words       uses   getwrd_com       restrictions   If a NULL string is given  txt  then the last string   given is used   This saves finding the words again    If m   n wrd will be a string of words from word n to   word m   If no m is given wrd will be a single word    n n wrd will be a string of words from word n to     print       word m   If no m is given wrd will be a single word     print       n 0  Smaller of in and im    im   im   0   to zero     if  in gt lst  and  im gt lst  then return    Out of range     in   in   lst  Larger of in and im    im   im   lst   to be last     ll   loc in  Nth word start     return  strtrim strmid txtstr0 ll loc im loc in len im  2    endif    N   ABS NTH  Allow nth 0   IF N GT NWDS 1 THEN RETURN  out of range  null   ll   loc n  N th word position   IF NTH LT 0 THEN GOTO  NEG  Handle nth 0   IF MTH GT NWDS 1 THEN MTH   NWDS 1  Words to end     if keyword_set notrim  then begin    RETURN  STRMID TXTSTR0 ll LOC MTH LOC NTH LEN MTH   endif else begin    RETURN  strtrim STRMID TXTSTR0 ll LOC MTH LOC NTH LEN MTH  2    endelse   NEG: if keyword_set notrim  then begin    RETURN  STRMID TXTSTR0 ll 9999   endif else begin    RETURN  strtrim STRMID TXTSTR0 ll 9999  2   endelse    END"); 
     307a[305] = new Array("./ToBeReviewed/STRING/isnumber.html", "isnumber.pro", "", "         file_comments   Determine if a text string is a valid number       categories      param TXT0  in required    text string to test       param X  in required       keyword HELP      returns         x   optionaly returned numeric value if valid            i   test flag:                                               0: not a number              1: txt is a long integer              2: txt is a float               1: first word of txt is a long integer               2: first word of txt is a float        history         R  Sterner   15 Oct  1986          Johns Hopkins Applied Physics Lab          R  Sterner  12 Mar  1990   upgraded          Richard Garrett  14 June  1992   fixed bug in returned float value          R  Sterner  1999 Nov 30   Fixed a bug found by Kristian Kjaer  Denmark     Copyright  C  1986  Johns Hopkins University Applied Physics Laboratory   This software may be used  copied  or redistributed as long as it is not   sold and this copyright notice is reproduced on each copy made   This   routine is provided as is without any express or implied warranties   whatsoever   Other limitations apply as described in the file disclaimer txt       version    Id: isnumber pro 142 2006 07 21 12:47:49Z navarro            function isnumber  txt0  x  help hlp     compile_opt idl2  strictarrsubs     if  n_params 0  lt 1  or keyword_set hlp  then begin    print  Determine if a text string is a valid number     print  i   isnumber txt   x     print    txt   text string to test                       in     print    x   optionaly returned numeric value if valid   out     print    i   test flag:                                  out     print        0: not a number     print        1: txt is a long integer     print        2: txt is a float     print         1: first word of txt is a long integer     print         2: first word of txt is a float     return   1  endif    txt   strtrim txt0 2  trim blanks   x   0  define X     if txt eq   then return  0  null string not a number     sn   1  if nwrds txt  gt 1 then begin  get first word if more than one     sn    1    txt   getwrd txt 0   endif      f_flag   0  Floating flag   b   byte txt  Convert to byte array   if b 0  eq 45 then b b 1:  Drop leading       Kristian Kjaer  if b 0  eq 43 then b b 1:  Drop leading       bug fix   w   where b eq 43  cnt  Look for    if cnt gt 1 then return  0  Alow only 1   t   delchr txt  Drop it   w   where b eq 45  cnt  Look for    if cnt gt 1 then return  0  Allow only 1   t   delchr t  Drop it   w   where b eq 46  cnt  Look for    if cnt gt 1 then return  0  Allow only 1   if cnt eq 1 then f_flag   1  If one then floating   t   delchr t  Drop it   w   where b eq 101  cnt  Look for  e   if cnt gt 1 then return  0  Allow only 1   if cnt eq 1 then f_flag   1  If 1 then assume float   t   delchr t e  Drop it   w   where b eq 69  cnt  Look for  E   if cnt gt 1 then return  0  Allow only 1   if cnt eq 1 then f_flag   1  If 1 then assume float   t   delchr t E  Drop it   w   where b eq 100  cnt  Look for  d   if cnt gt 1 then return  0  Allow only 1   if cnt eq 1 then f_flag   1  If 1 then assume float   t   delchr t d  Drop it   w   where b eq 68  cnt  Look for  D   if cnt gt 1 then return  0  Allow only 1   if cnt eq 1 then f_flag   1  If 1 then assume float   t   delchr t D  Drop it     Allow only one  e   E   d  or  D      if total b eq 101 b eq 69 b eq 100 b eq 68  gt 1 then return 0  b   byte t     Allow no alphabetic characters     if total b ge 65  and  b le 122  ne 0 then return  0    c   strmid t 0 1   if  c lt  0  or  c gt  9  then return  0    First char not a digit     x   txt   0 0       Convert to a float   if f_flag eq 1 then return  2 sn       Was floating   if x eq long x  then begin    x   long x     return  sn  endif else begin    return  2 sn  endelse    end"); 
     308a[306] = new Array("./ToBeReviewed/STRING/lenstr.html", "lenstr.pro", "", "    ROUTINE:         lenstr   USEAGE:          result lenstr str      input:    str             a single string or string array       output:    result          length of the string s  in normalized units                    the number of elements of RESULT matches the number of                     elements of STRING       procedure:                    This function returns the physical length of the                    string on the output device  not the number of                    characters   This is done by first switching to  X                     and writing the string s  with XYOUTS in graphics                    mode 5  which disables display to the screen but                    does not interfere with operation of XYOUTS   The                    WIDTH keyword parameter of XYOUTS is used to                    retrieve the physical length of the string s       author:  Paul Ricchiazzi                            7apr93             Institute for Computational Earth System Science             University of California  Santa Barbara      todo seb       function lenstr str     compile_opt idl2  strictarrsubs      dsave d name     thisOS    VERSION OS_FAMILY    thisOS   STRMID thisOS  0  3     thisOS   STRUPCASE thisOS     CASE thisOS of        MAC : SET_PLOT  thisOS        WIN : SET_PLOT  thisOS       ELSE: SET_PLOT   X     ENDCASE     p BACKGROUND d n_colors 1    255     p color 0    if  d n_colors gt 256 then  p background ffffff x     device get_graphics oldg set_graphics 5    if keyword_set charsize  eq 0 then charsize 1    nn n_elements str      case nn of        0:w 0        1:xyouts 0 0 device str width w        else:begin          w fltarr nn           for i 0 nn 1 do begin             xyouts 0 0 device str i width ww             w i ww          endfor       end    endcase     fac1 float d x_ch_size d x_vsize   ratio of char width to device1 width     device set_graphics oldg    set_plot dsave    IF dsave EQ  X  OR dsave EQ  MAC  OR dsave EQ  WIN  then BEGIN        p BACKGROUND d n_colors 1    255        p color 0       if  d n_colors gt 256 then  p background ffffff x    ENDIF     fac2 float d x_ch_size d x_vsize   ratio of char width to device2 width     return w fac2 fac1             string width adjusted for device width end "); 
     309a[307] = new Array("./ToBeReviewed/STRING/nwrds.html", "nwrds.pro", "", "         file_comments   Return the number of words in the given text string        categories      param TXTSTR     text string to examine       keyword DELIMITER     d   Set delimiter character  def   space        keyword HELP      returns   n   number of words found        restrictions   See also getwrd        history         R  Sterner   7 Feb  1985          Johns Hopkins University Applied Physics Laboratory          RES 4 Sep  1989   converted to SUN      Copyright  C  1985  Johns Hopkins University Applied Physics Laboratory   This software may be used  copied  or redistributed as long as it is not   sold and this copyright notice is reproduced on each copy made   This   routine is provided as is without any express or implied warranties   whatsoever   Other limitations apply as described in the file disclaimer txt       version    Id: nwrds pro 142 2006 07 21 12:47:49Z navarro              function nwrds txtstr  help hlp  delimiter delim     compile_opt idl2  strictarrsubs      if  n_params 0  lt 1  or keyword_set hlp  then begin    print  Return the number of words in the given text string     print  n   nwrds txt     print    txt   text string to examine              in     print    n   number of words found                 out     print  Keywords:     print    DELIMITER   d   Set delimiter character  def   space     print  Notes: See also getwrd     return   1  endif    if strlen txtstr  eq 0 then return 0  A null string has 0 words   ddel       Default word delimiter is a space   if n_elements delim  ne 0 then ddel   delim   Use given word delimiter   tst    byte ddel 0  Delimiter as a byte value          tb   byte txtstr                                String to bytes          if ddel eq     then begin                       Check for tabs            w   where tb eq 9B  cnt                       Yes            if cnt gt 0 then tb w    32B                  Convert any to space          endif  x   tb ne tst  Locate words   x    0 x 0  Pad ends with delimiters     y    x shift x 1  eq 1  Look for word beginnings     n   fix total y  Count word beginnings     return  n    end"); 
     310a[308] = new Array("./ToBeReviewed/STRING/putfile.html", "putfile.pro", "", "         file_comments   Write a text file from a string array        categories      param FILE  in required type string      text file name       param S  in required type string or array      string array       keyword ERROR    err  error flag: 0 ok  1 invalid string array        history         R  Sterner  20 Mar  1990         R  Sterner   4 Nov  1992   allowed scalar strings      Copyright  C  1990  Johns Hopkins University Applied Physics Laboratory   This software may be used  copied  or redistributed as long as it is not   sold and this copyright notice is reproduced on each copy made   This   routine is provided as is without any express or implied warranties   whatsoever   Other limitations apply as described in the file disclaimer txt       version    Id: putfile pro 163 2006 08 29 12:59:46Z navarro            pro putfile  file  s  error err  help hlp     compile_opt idl2  strictarrsubs      if  n_params 0  lt 1  or keyword_set hlp  then begin    print  Write a text file from a string array     print  putfile  f  s     print    f   text file name       in     print    s   string array         in     print  Keywords:     print    ERROR err  error flag: 0 ok  1 invalid string array     return  endif           if lmgr demo  then begin            print   you are in Demo mode  It is impossible to write a file             return         endif     if size s   type  ne 7 then begin    print  Error in putfile: argument must be a string array     err   1    return  endif    get_lun  lun  openw  lun  file    for i   0  n_elements s 1 do begin    t   s i     if t eq   then t          printf  lun  t  endfor    close  lun  free_lun  lun  err   0  return    end"); 
     311a[309] = new Array("./ToBeReviewed/STRING/str_size.html", "str_size.pro", "", "       file_comments   The purpose of this function is to return the proper   character size to make a specified string a specified   width in a window  The width is specified in normalized   coordinates  The function is extremely useful for sizing   strings and labels in resizeable graphics windows       categories   Graphics  Widget      param STRING  in required    This is the string that you want to make a specified   target size or width       param TARGETWIDTH  in optional default 0 25    This is the target width of the string in normalized   coordinates in the current graphics window  The character   size of the string  returned as thisCharSize  will be   calculated to get the string width as close as possible to   the target width       keyword INITSIZE  default 1 0      This is the initial size of the string  Default is 1 0       keyword STEP default 0 05    This is the amount the string size will change in each step   of the interactive process of calculating the string size       returns    thisCharSize  This is the size the specified string should be set   to if you want to produce output of the specified target   width  The value is in standard character size units where   1 0 is the standard character size       examples   To make the string  Happy Holidays  take up 30  of the width of   the current graphics window  type this:       XYOUTS  0 5  0 5  ALIGN 0 5   Happy Holidays        CHARSIZE STR_SIZE Happy Holidays  0 3       history   Written by: David Fanning  17 DEC 96    Added a scaling factor to take into account the aspect ratio   of the window in determing the character size  28 Oct 97  DWF      version    Id: str_size pro 163 2006 08 29 12:59:46Z navarro        FUNCTION str_size  string  targetWidth  INITSIZE initsize  STEP step     compile_opt idl2  strictarrsubs    ON_ERROR  1       Check positional parameters   np   N_PARAMS  CASE np OF    0: MESSAGE   One string parameter is required     1: targetWidth   0 25    ELSE: ENDCASE       Check keywords  Assign default values   IF N_ELEMENTS step  EQ 0 THEN step   0 05 IF N_ELEMENTS initsize  EQ 0 THEN initsize   1 0       Calculate a trial width   size   initsize XYOUTS  0 5  0 5  ALIGN 0 5  string  WIDTH thisWidth          CHARSIZE size   NORMAL       Size is perfect   IF thisWidth EQ targetWidth THEN RETURN  size   Float D Y_Size D X_Size       Initial size is too big   IF thisWidth GT targetWidth THEN BEGIN    REPEAT BEGIN      XYOUTS  0 5  0 5  ALIGN 0 5  string  WIDTH thisWidth            CHARSIZE size   NORMAL       size   size   step    ENDREP UNTIL thisWidth LE targetWidth    RETURN  size   Float D Y_Size D X_Size ENDIF       Initial size is too small   IF thisWidth LT targetWidth THEN BEGIN    REPEAT BEGIN      XYOUTS  0 5  0 5  ALIGN 0 5  string  WIDTH thisWidth            CHARSIZE size   NORMAL       size   size   step    ENDREP UNTIL thisWidth GT targetWidth    size   size   step   Need a value slightly smaller than target     RETURN  size   Float D Y_Size D X_Size ENDIF  END"); 
     312a[310] = new Array("./ToBeReviewed/STRING/string2struct.html", "string2struct.pro", "", "     file_comments   This is a really  really cool way to turn keywords into   a structure        categories        keyword _EXTRA   used to pass your keywords      returns        restrictions        examples        history        version    Id: string2struct pro 157 2006 08 21 09:01:50Z navarro     function too_cool _extra extra     compile_opt idl2  strictarrsubs   return extra end         file_comments   Takes an input string set up as keywords and returns an anonymous structure    This is particularly useful for taking keywords entered by a user in a text   field and passing then to other routines       categories   Utilities      param STRVAL  IN REQUIRED    String set up as keywords  Keywords require a little special treatment  Such as   plot findgen 100 _extra stringToStructure title testing       RETURNS    This function returns the string as an anonymous structure  If an   error was found then this function returns a structure with a null field       examples         The code below creates a widget that uses this routine          pro tPlot event         widget_control event top get_uvalue field         widget_control field get_value strVal         extra   stringToStructure strVal          plot findgen 100 _extra extra         wshow         return         end           pro testWid          enter any keyword to plot and see how it works         base   widget_base col          field   cw_field base title test value ax 0 string          void   widget_button base value plot event_pro tPlot          widget_control base realize set_uvalue field         xmanager testWid base no_block         return         end      history         Written by:         RLK  Ronn Kling Consulting          ronn rlkling com         www rlkling com                 May  1999      version    Id: string2struct pro 157 2006 08 21 09:01:50Z navarro        function string2struct strVal     compile_opt idl2  strictarrsubs   r   execute extra   too_cool    strVal 0     if r   0 then user did not enter keywords correctly so  return a structure with a null field  if r eq 0 then begin   print Error in input string    return null:0  endif return extra end "); 
     313a[311] = new Array("./ToBeReviewed/STRING/strkeywd.html", "strkeywd.pro", "", "             file_comments   Translate a structure in a string able to be used to specify keywords    in the calling of a function when we use EXECUTE  see example       categories        param STRUCT   a structure      returns   a string composed like following:   For each element of the structure  we write a part of the string as:             name_of_the_element content_of_the_element       restrictions   If an element of the structure contain an array  it will be convert in a vector       restrictions   Beware  this function has loops  ifs ad cases everywhere  So it can    not be used by big keywords  with a lot of elements which are big    arrays  The input keyword must not contain Complex floatings  structure     Double precision complex  Pointer  Object reference  Unsigned Integer     Unsigned Longword Integer  64 bit Integer or Unsigned 64 bit Integer       examples   We create a structure         IDL  b get_extra ok 111  year 1997 1998 1999  age_capitaine 35          IDL  help  b struct           Structure   3 tags  length 10  refs 1:            AGE_CAPITAINE   INT             35            OK              INT            111            YEAR            INT       Array 3    We put this structure as a string         IDL  a strkeywd b          IDL  print  a         AGE_CAPITAINE 35  OK 111  YEAR 1997 1998 1999    Now we can use the string a to pass keywords in a function thanks to execute          IDL  test execute c get_extra a          IDL  help  c struct           Structure   3 tags  length 10  refs 1:            AGE_CAPITAINE   INT             35            OK              INT            111            YEAR            INT       Array 3       history   Sebastien Masson  smasson lodyc jussieu fr                         11 10 1999      version    Id: strkeywd pro 163 2006 08 29 12:59:46Z navarro             FUNCTION strkeywd  struct     compile_opt idl2  strictarrsubs      if size struct   type  NE 8 then return        tname   tag_names struct     if n_elements tname  EQ 0 then return         on s occupe du premier element      res   strlowcase tname 0 tostr struct 0     if n_elements tname  EQ 1 then return   res     on s occupe des autres elements      for n   1 n_elements tname 1 do res   res   strlowcase tname n tostr struct n       return   res end"); 
     314a[312] = new Array("./ToBeReviewed/STRING/strright.html", "strright.pro", "", "         file_comments   return right subportion from a string      categories   String       param S  in required    the string to be searched      param LASTN  in required default 1    the number of characters to be returned    If NLAST is the strlen STRING  the complete string   is returned       returns   The portion of LASTN characters of S counted from the back       examples   if  strright path  ne   then path   path          history          mgs  19 Nov 1997: VERSION 1 00      version    Id: strright pro 163 2006 08 29 12:59:46Z navarro         Copyright  C  1997  Martin Schultz  Harvard University   This software is provided as is without any warranty   whatsoever  It may be freely used  copied or distributed   for non commercial purposes  This copyright notice must be   kept with any copy of this software  If this software shall   be used commercially or sold as part of a larger package    please contact the author to arrange payment    Bugs and comments should be directed to mgs io harvard edu   with subject  IDL routine strright      function strright s lastn     compile_opt idl2  strictarrsubs         on_error 2     return to caller       if  n_elements s  le 0  then return 1L       l   strlen s        if  n_elements lastn  le 0  then lastn   1     if lastn gt l then lastn   l       result   strmid s l lastn l        return result end"); 
     315a[313] = new Array("./ToBeReviewed/STRING/strsci.html", "strsci.pro", "", "         file_comments   Given a number  returns a string of that          B   number in scientific notation format   e g  A x 10         categories   String      param DATA  in required    A floating point or integer number to be   converted into a power of 10       keyword FORMAT  default f12 2    The format specification used in the string   conversion for the mantissa  i e  the    A  of  A x 10 B         keyword POT_ONLY   Will return only the  power of 10  part of the   string  i e  the  10 B   Default is to return   the entire string  e g   A x 10 B         keyword MANTISSA_ONLY   return only mantissa of the string      keyword SHORT   return 10 0 as  1  and 10 1 as  10       keyword TRIM   don t insert blanks  i e  return Ax10 B       restrictions   This function does not  evaluate  the format statement thoroughly   which can result in somewhat quirky strings  Example:   print strsci 9 999  results in  10 0x10 0 instead of  1 0x10 1      Need a better symbol than the  x  for the multiplier       examples          Result   STRSCI  2000000  format i1             print  result                                                                                6                prints 2 x 10 u6 n  which gets plotted as 2 x 10                     Result   STRSCI   0 0001            print  result                                                                       4                prints  1 00 x 10 u 4 n  which gets plotted as 1 00 x 10            Result   STRSCI  0d0  format f13 8             print  result                           prints  0 00000000         history          bmy  28 May 1998: VERSION 1 00            B               now returns string of the form A x 10          mgs  29 May 1998:               bug fix: now allows negative numbers               keyword MANTISSA_ONLY added               default format changed to f12 2          bmy  02 Jun 1998:               renamed to STRSCI  STRing SCIentific notation           mgs  03 Jun 1998:               added TRIM keyword          mgs  22 Sep 1998:               added SHORT keyword               modified handling of TRIM keyword          mgs  24 Sep 1998:               bug fix with SHORT flag          bmy   mgs  02 Jun 1999:               now can handle DATA 0 0 correctly               updated comments          mgs  03 Jun 1999:                can now also handle values lt 1                 and doesn t choke on arrays      version    Id: strsci pro 163 2006 08 29 12:59:46Z navarro         Copyright  C  1998  1999 Bob Yantosca and Martin Schultz     Harvard University   This software is provided as is without any warranty   whatsoever  It may be freely used  copied or distributed   for non commercial purposes  This copyright notice must be   kept with any copy of this software  If this software shall   be used commercially or sold as part of a larger package    please contact the author to arrange payment    Bugs and comments should be directed to bmy io harvard edu   or mgs io harvard edu with subject  IDL routine strsci      function strsci  Data  Format Format  POT_Only POT_Only                 MANTISSA_ONLY MANTISSA_ONLY SHORT SHORT TRIM TRIM     compile_opt idl2  strictarrsubs              Error checking   Keyword settings          on_error  2     if   n_elements  Data   eq 0   then begin       return       endif     if   not Keyword_Set  Format     then Format      f12 2      POT_Only        keyword_set  POT_Only           MANTISSA_Only   keyword_set  MANTISSA_Only      Short           Keyword_Set  Short              Trim            Keyword_Set  Trim                NDat   n_elements Data     Result   strarr NDat      for i 0 NDat 1 do begin                 If ABS  DATA     0 then we can proceed to take the common log          For DATA   0  place a   sign in front of the number               if   Abs  Data i    ne 0 0   then begin                take the common log and store in LOG10DATA          Log10Data   ALog10  Abs  Data i                       Boolean flag if data   0          sign     Data i  lt 0 0                   Compute the characteristic  int part             Add the 1d 6 to prevent roundoff errors          Characteristic   Fix  Log10Data   1 0d 6            if  Log10Data lt 0  then               Characteristic   Characteristic   1                 Compute the Mantissa  frac part  and take its antilog           Mantissa   Log10Data   Characteristic           Mantissa   10 0 Mantissa           print data i log10data mantissa characteristic format 3f24 14 i8                 String for the coefficient part              The coefficient is just antilog of the Mantissa            Add the minus sign if DATA   0 0          A   StrTrim  String  Mantissa  Format Format   2            if   Sign   then A       A                String for the power of 10 part          B    10 u    strtrim  string  Characteristic   2      n           if   Short   then begin             if   Characteristic eq 0   then B    1              if   Characteristic eq 1   then B    10           endif                composite string          Result i    A     x     B          if   Short AND B eq  1  then Result i    A                         If DATA   0  then we cannot take the common log  so return         zeroes for the result strings   Use the FORMAT string                endif else begin          A        String  0d0  Format Format            B        A          Result i    A           endelse                     Return result to calling program  depending on keyword settings          Eliminate blanks if TRIM keyword is set               if   POT_Only   then            Result i    B       if   MANTISSA_Only   then            Result i    A       if   Trim   then            Result i    StrCompress  Result i   Remove_All            endfor     if  n_elements Result  eq 1  then         Result   Result 0       return  Result  end"); 
     316a[314] = new Array("./ToBeReviewed/STRING/strsed.html", "strsed.pro", "", "         file_comments    replace one  or more  character s string s  in a string array    modern  version of the obsolete strrepl      categories   String      param STR  in required type string array or scalar    the string to be changed      param EXP1  in required type scalar string    a single regular expression  as implemented by the STREGEX function       param EXP2  in required type scalar string    replacement character string      keyword FOLD_CASE   Indicates that the regular expression matching should be done in a case insensitive fashion       returns   string array or scalar      examples        IDL  abc    abcdefghijklmnopqrstuvwxyz       IDL  print  strsed abc   m   M       abcdefghijklMnopqrstuvwxyz      IDL  print  strsed abc   m t   M_T       abcdefghijklM_Tuvwxyz      IDL  a    abcabcabc       IDL  help  strsed abc  a   eee   abc   XXX_           STRING      Array 3       IDL  print  strsed abc  a   eee   abc   XXX_       XXX_defghijklmnopqrstuvwxyz XXX_XXX_XXX_ eee      history   Sept 2006: Sebastien Masson  smasson lodyc jussieu fr       version    Id: strsed pro 192 2006 09 22 09:37:08Z smasson     FUNCTION strsed  str  exp1  exp2  FOLD_CASE   fold_case     compile_opt idl2  strictarrsubs     strout   str   line   stregex strout  exp1    line   where line NE  1  cnt    IF cnt GT 0 THEN BEGIN     FOR i   0L  cnt 1 DO          strout line i    strjoin strsplit strout line i  exp1   extract                                                regex   preserve_null  FOLD_CASE   fold_case  exp2    ENDIF      return  strout END"); 
     317a[315] = new Array("./ToBeReviewed/STRING/strtok.html", "strtok.pro", "", "         file_comments   Retrieve portion of string up to token        categories   String      param STRING  in required    String to be split  Contains text after in  out token on output        param TOKEN  in required    Token to use in splitting old              keyword TRIM    set to remove leading blanks from old before returning       keyword HELP   print useful message and exit        returns   new     portion of string up to token               out   old     portion of old after token                  out  in      restrictions   Input parameter old is modified    Token may be one or more characters    if token is not found  returns old and sets old to         examples         If old is  foo44 bar  then strtok  old   44    would return          foo  and upon return  old will be left with   bar   If  TRIM         were set  old would be  bar  on return            If old xyz  then new strtok old a  would return with         new xyz  and old       history          Log: strtok pro v           Revision 1 3  1996 06 14 20:00:27  mcraig         Updated Copyright info            Revision 1 2  1996 05 09 00:22:17  mcraig         Added built in help            Revision 1 1  1996 01 31 18:47:37  mcraig         Initial revision     Thanks:         To D  Linder who wrote GETTOK  part of the goddard library          upon which this is based      Release:          Name: Rel_1_2       Copyright:    Copyright  C  1996 The Regents of the University of California  All    Rights Reserved   Written by Matthew W  Craig     See the file COPYRIGHT for restrictions on distrubting this code     This code comes with absolutely NO warranty  see DISCLAIMER for details       version    Id: strtok pro 186 2006 09 20 10:50:37Z pinsard       FUNCTION strtok  string  token                     TRIM trim  HELP Help     compile_opt idl2  strictarrsubs      Back to the caller if error occurs      On_error  2      IF  n_params  NE 2  OR keyword_set Help  THEN BEGIN          offset                 print  offset Retrieve portion of string up to token          print  offset new   strtok  old  token           print  offset Inputs:          print  offset offset old     String to be split   Contains text after    in  out          print  offset offset          token on output          print  offset offset token   Token to use in splitting old               in          print  offset Keywords:          print  offset offset TRIM   set to remove leading blanks from old           print  offset offset          before returning          print  offset offset HELP   print useful message and exit          print  offset Outputs:          print  offset offset new     portion of string up to token               out          print  offset offset old     portion of old after token                  out  in          print  offset Side effects:          print  offset offset Input parameter old is modified          print  offset Notes:          print  offset offset Token may be one or more characters          print  offset offset If token is not found  returns old and sets old to           print  offset Examples:          print  offset offset If old is  foo44 bar  then strtok  old   44    would return          print  offset offset    foo  and upon return  old will be left with   bar   If  TRIM          print  offset offset   were set  old would be  bar  on return            print  offset offset If old xyz  then new strtok old a  would return with          print  offset offset   new xyz  and old          return   1     ENDIF       pos   strpos string  token       IF  pos GE 0  THEN BEGIN         front   strmid string  0  pos           string   strmid string  pos   strlen token  strlen string          IF keyword_set trim  THEN string   strtrim string  1          return  front     ENDIF          front   string     string         return  front      END "); 
     318a[316] = new Array("./ToBeReviewed/STRING/strwhere.html", "strwhere.pro", "", "         file_comments   return position  array  for occurrence of a character in a string      categories   String      param STR  in required    the string      param SCHAR  in required    the character to look for      returns COUNT  out optional    The number of matches that were found       The function returns an index array similar to the     result of the where function      examples          ind   strwhere abcabcabc a               returns   0  3  6        history          mgs  02 Jun 1998: VERSION 1 00          bmy  30 Jun 1998:   now returns COUNT  the number                               of matches that are found  this is                              analogous to the WHERE command       version    Id: strwhere pro 163 2006 08 29 12:59:46Z navarro         Copyright  C  1998  Martin Schultz  Harvard University   This software is provided as is without any warranty   whatsoever  It may be freely used  copied or distributed   for non commercial purposes  This copyright notice must be   kept with any copy of this software  If this software shall   be used commercially or sold as part of a larger package    please contact the author to arrange payment    Bugs and comments should be directed to mgs io harvard edu   with subject  IDL routine strwhere      function strwhere str schar Count     compile_opt idl2  strictarrsubs          if  n_elements str  eq 0  then return 1        convert to byte    BStr   byte Str     BSC     byte schar 0         Search for matches    Ind   where  Bstr eq BSC  Count         bmy   return where BStr eq BSC     return  Ind  end    "); 
     319a[317] = new Array("./ToBeReviewed/STRING/tostr.html", "tostr.pro", "", "             file_comments   Convert an input in a string       categories    String      param INPUT  in required    input can not contain or be of the type of:       Complex floating  structure  Double precision complex  Pointer  Object     reference  Unsigned Integer  Unsigned Longword Integer  64 bit     Integer  Unsigned 64 bit Integer       returns   a string      restrictions   If keywdvalue is an array  it will be convert in a vector       restrictions   Beware  this function has loops  ifs ad cases everywhere  So it can    not be used by big keywords  with a lot of elements which are big    arrays        examples      IDL  help  tostr 1 tostr a tostr indgen 4 tostr a jkfjo           STRING       1           STRING       a           STRING       0 1 2 3           STRING       a jkfjo       IDL  print  tostr c est bon c est bon        c est bon c est bon       history   Sebastien Masson  smasson lodyc jussieu fr                         18 10 1999      version    Id: tostr pro 157 2006 08 21 09:01:50Z navarro             FUNCTION tostr  input     compile_opt idl2  strictarrsubs       case 1 of       size input   type  LE 5:BEGIN           if size input   type  EQ 1 then input   long input           if n_elements input  EQ 1 then res   strtrim input  1             ELSE BEGIN              res    strtrim input 0  1              for i   1   n_elements input 1 do res   res strtrim input i  1              res   res           ENDELSE        END       size input   type  eq 7:BEGIN           if n_elements input  EQ 1 then BEGIN             sinput   strrepl input                  res    sinput           ENDIF ELSE BEGIN              res    strrepl input 0                  for i   1   n_elements input 1 do res   res strrepl input i                  res   res           ENDELSE        END       ELSE:BEGIN           ras   report la fonction tostr ne marche pas pour input qui est de type  size input   tname           res           END    ENDCASE     return  res end"); 
     320a[318] = new Array("./ToBeReviewed/STRUCTURE/chkstru.html", "chkstru.pro", "", "       file_comments   check validity of a structure and test if necessary   fields are contained      categories   Utilities      param STRUCTURE  in required type struct    The structure to be tested  If STRUCTURE is   not of type structure  the function will return 0      param FIELDS  in required type string    A string or string array with field names to    be contained in STRUCTURE  CHKSTRU returns 1  true    only if all field names are contained in STRUCTURE    The entries of FIELDS may be upper or lowercase       keyword INDEX  type string    A named variable that will contain the indices of   the required field names in the structure  They can then   be assessed through structure index i    Index will   contain  1 for all fields entries that are not in the   structure       keyword VERBOSE   set this keyword to return an error message    in case of an error       keyword EXTRACT   set this keyword to extract a fields from the   structure    1 is return is fields or structure  are   incorrect       returns   CHKSTRU returns 1 if successful  otherwise 0       examples          test     a:1  b:2  c:3            required    a c           if CHKSTRU test required  then print found a and c           IDL  print  CHKSTRU test b              1          IDL  print  CHKSTRU test b extract                  2      history          mgs  02 Mar 1998: VERSION 1 00          mgs  07 Apr 1998:   second parameter  FIELDS  now optional          12 Jan 2001: EXTRACT keyword by S  Masson  smasson lodyc jussieu fr        version    Id: chkstru pro 163 2006 08 29 12:59:46Z navarro         Copyright  C  1998  Martin Schultz  Harvard University   This software is provided as is without any warranty   whatsoever  It may be freely used  copied or distributed   for non commercial purposes  This copyright notice must be   kept with any copy of this software  If this software shall   be used commercially or sold as part of a larger package    please contact the author to arrange payment    Bugs and comments should be directed to mgs io harvard edu   with subject  IDL routine chkstru      function chkstru structure fields index index verbose verbose  extract   extract     compile_opt idl2  strictarrsubs             default index      index    1          first check number of parameters  must be at least 1       if  n_params  lt 1  then begin          if keyword_set verbose  then                ras   report CHKSTRU:   invalid number of parameters              if keyword_set extract  THEN return 1 ELSE return 0           endif            check if the user really passed a structure        s   size structure       if  s 1 s 0  ne 8  then begin          if keyword_set verbose  then                ras   report CHKSTRU:   No structure passed              if keyword_set extract  THEN return 1 ELSE return 0       endif          only one parameter: then we are finished      if  n_params  eq 1  then return 1            see if required field names are contained in the structure        and return indices of these fields        names   tag_names structure       index   intarr n_elements fields    1     default index to  not found        for i 0 n_elements fields 1 do begin          ind   where names eq strupcase fields i           if  ind 0  lt 0  then begin              if keyword_set verbose  then                   ras   report CHKSTRU:   Cannot find field  fields i               endif else index i    ind 0       endfor            check minimum value of index field:  1 indicates error      if keyword_set extract  then BEGIN         if index 0  NE  1 THEN return  structure index 0  ELSE return   1      ENDIF ELSE return min index  ge 0    end  "); 
     321a[319] = new Array("./ToBeReviewed/STRUCTURE/extractstru.html", "extractstru.pro", "", "           file_comments   extract elements of a structure to constitute a new structure       categories   Utilities      param STRU  in required    A structure      param LISTE  in required type vector    A vector of string including names of STRU to be deleted     by default  or to be kept  if KEEP is activated       keyword KEEP   Specify that the given liste concern elements of STRU to be kept       keyword DELETE   Specify  that the given liste concern elements of STRU to be deleted    This keyword is activated by default       returns   A structure or  1 in case of problem      examples        IDL  extra get_extra ok  year 1999  age_capitaine 35        IDL  help  extra struct        Structure   3 tags  length 6  refs 1:         AGE_CAPITAINE   INT             35         OK              INT              1         YEAR            INT           1999      IDL  help  extractstru extra ok hhuihi YEAR stru        Structure   1 tags  length 2  refs 1:         AGE_CAPITAINE   INT             35      IDL  help  extractstru extra ok hhuihi YEAR keep stru        Structure   2 tags  length 4  refs 1:         OK              INT              1         YEAR            INT           1999      history   Sebastien Masson  smasson lodyc jussieu fr                         8 10 1999      version    Id: extractstru pro 163 2006 08 29 12:59:46Z navarro              FUNCTION extractstru  stru  liste  KEEP   keep  DELETE   delete     compile_opt idl2  strictarrsubs      if size stru   type  NE 8 then return    1    if size liste   type  NE 7 then return    1   cheking for keep and vire keywords    keep   keyword_set keep 1 keyword_set delete     delete   keyword_set delete 1 keyword_set keep   keyword_set delete  EQ keep       tname   tag_names stru     index   make_selection tname  strupcase liste   only_valid   quiet       if keep then BEGIN   We just keep the list       if index 0  EQ  1 then return    1       if n_elements index  EQ n_elements tname  then return  stru       res   create_struct tname index 0  stru index 0        if n_elements index  GT 1 then for i   1  n_elements index 1 do               res   create_struct res  tname index i  stru index i     ENDIF ELSE BEGIN   We delete the list       if n_elements index  EQ n_elements tname  then return    1       if index 0  EQ  1 then return  stru   We take the complementary one of index to obtain indexes we keep        index   different indgen n_elements tname  index        res   create_struct tname index 0  stru index 0        if n_elements index  GT 1 then for i   1  n_elements index 1 do               res   create_struct res  tname index i  stru index i     ENDELSE      return  res end"); 
     322a[320] = new Array("./ToBeReviewed/STRUCTURE/mixstru.html", "mixstru.pro", "", "             file_comments   Concatenate 2 structures together  The difference with CREATE_STRUCT    is  that if the 2 structure have same elements s name  then mixstru    do not break down but choose for the common element the value    specified by the first structure       categories   Structure       param STRU1  in required    Structure which can have same elements s name than    STRU2 but with a different value       param STRU2  in required    Structure which can have same elements s name than    STRU1 but with a different value       returns   A structure      restrictions   If STRU1 or  STRU2 is not a structure  mixstru send back  1      examples              IDL  a get_extra toto ok 123        IDL  b get_extra ok 111  year 1999  age_capitaine 35        IDL  help  a b struct         Structure   2 tags  length 4  refs 1:          OK              INT            123          TOTO            INT              1         Structure   3 tags  length 6  refs 1:          AGE_CAPITAINE   INT             35          OK              INT            111          YEAR            INT           1999       IDL  help  mixstru a b struct         Structure   4 tags  length 8  refs 1:          AGE_CAPITAINE   INT             35          YEAR            INT           1999          OK              INT            123          TOTO            INT              1       IDL  help  mixstru b a struct         Structure   4 tags  length 8  refs 1:          TOTO            INT              1          AGE_CAPITAINE   INT             35          OK              INT            111          YEAR            INT           1999      history   Sebastien Masson  smasson lodyc jussieu fr                         7 10 1999      version    Id: mixstru pro 163 2006 08 29 12:59:46Z navarro             FUNCTION mixstru  stru1  stru2     compile_opt idl2  strictarrsubs    cm_general     IF size stru1   type  EQ 0 AND size stru2   type  EQ 8 THEN return  stru2    IF size stru2   type  EQ 0 AND size stru1   type  EQ 8 THEN return  stru1    if size stru1   type  NE 8 then return    1    if size stru2   type  NE 8 then return    1    tname   tag_names stru2         str        FOR i   0  n_tags stru2 1 DO str   str   tname i    stru2    strtrim i  2          res   createfunc get_extra str _extra   stru1                    kwdlist    stru1   stru1  stru2   stru2                    stru1   stru1  stru2   stru2                   filename   myuniquetmpdir  for_createfunc pro      return  res  end"); 
     323a[321] = new Array("./ToBeReviewed/STRUCTURE/struct2string.html", "struct2string.pro", "", "              file_comments   Convert a structure to an  executable string       categories   Utilities       param STRUCT  in required    A structure      keyword MAX_STRUCT_LENGTH  default 10000l    The maximum length of the structure   permetted to convert the structure to string       keyword DIRECT2STRING   To get a string instead an  executable string       keyword CUT_IN_STRING   Try it      restrictions   Use tostr pro  cf this function header       examples          IDL  print  struct2string d         create_struct NAME X X_SIZE 891 Y_SIZE 630 X_VSIZE          891 Y_VSIZE 630 X_CH_SIZE 6 Y_CH_SIZE 10 X_PX_CM          40 0000 Y_PX_CM 40 0000 N_COLORS 16777216 TABLE_SIZE           256 FILL_DIST 1 WINDOW 32 UNIT 0 FLAGS 328124 ORIGIN          0 0 ZOOM 1 1       history   Sebastien Masson  smasson lodyc jussieu fr                         2000 07 03      version    Id: struct2string pro 163 2006 08 29 12:59:46Z navarro             FUNCTION struct2string  struct  CUT_IN_STRING   cut_in_string  MAX_STRUCT_LENGTH   max_struct_length  DIRECT2STRING   direct2string      compile_opt idl2  strictarrsubs      if size struct   type  NE 8 then return        if NOT keyword_set max_struct_length  then max_struct_length   10000l    if n_tags struct   length  GT max_struct_length then begin       rien   report The structure is too big to be converted to string   C See the MAX_STRUCT_LENGTH keyword        return       endif    names   tag_names struct     case 1 of       keyword_set direct2string :BEGIN          res   names 0 tostr struct 0           if n_tags struct  GT 1 then begin             FOR i   1  n_tags struct 1 do begin                res   res   names i tostr struct i              endfor          endif                 END       keyword_set CUT_IN_STRING :BEGIN          res    create_struct names 0 tostr struct 0           if n_tags struct  GT 1 then begin             FOR i   1  n_tags struct 1 do begin                res    res   create_struct res names i tostr struct i              endfor          endif       END       ELSE:BEGIN          res    create_struct names 0 tostr struct 0           if n_tags struct  GT 1 then begin             FOR i   1  n_tags struct 1 do begin                res   res names i tostr struct i              endfor          endif          res   res        END    endcase    return  res end"); 
     324a[322] = new Array("./ToBeReviewed/STRUCTURE/where_tag.html", "where_tag.pro", "", "     file_comments   Like WHERE but works on structure tag names   Obtain subscripts of elements in structure array for which   a particular Tag has values in a range or matching specified values    Like the WHERE function but for use with structures       categories   Structure      param STRUCT  in required    structure array to search       keyword TAG_NAME   Scalar string specifying Tag Name       keyword TAG_NUMBER   Otherwise give the Tag Number        keyword RANGE     min max  range to search for in Struct       keyword VALUES   One or array of numbers to match for in Struct        keyword ISELECT   Specifies indices to select only part of structure array     use it to recycle subscripts from previous searches        keyword NOPRINT   Suppress informational messages about nothing found       returns   Nfound  out      of occurrences found        restrictions   User  must  specify  1  TAG_NAME or TAG_NUMBER to search  and  2    the VALUES or RANGE to search on       examples         Suppose STR is a structure with tags CAT_NO:indgen 10  and                  NAME:strarr 10    Find the indices where STR CAT_NO is                 between 3 and 5            IDL  print  WHERE_TAG  str  TAG_NAME    CAT_NO  VALUE    3 4 5      or         IDL  print  WHERE_TAG  str  TAG_NUM   0  RANGE    3 5        history         written 1990 Frank Varosi STX   NASA GSFC         Stop printing  Tag  not found  with  NOPRINT  CD Pike 8 Jun 93      version    Id: where_tag pro 163 2006 08 29 12:59:46Z navarro        function where_tag  Struct  Nfound      TAG_NAME Tag_Name                                                 TAG_NUMBER Tag_Num                                                ISELECT ipart  NOPRINT noprint                                            RANGE range  VALUES values  First check required parameters      compile_opt idl2  strictarrsubs            Ntag   N_tags  Struct            if  Ntag LE 1  then begin                 message expecting a Structure Array  try again CONTIN                 return 1             endif          if  N_elements  Tag_Num   NE 1  AND               N_elements  Tag_Name   NE 1  then begin                 message specify TAG_NAME  or TAG_NUMBER  to search CONTIN                 return 1             endif          Tags   Tag_names  Struct            if N_elements  Tag_Name   EQ 1 then begin                 Tag_Name   strupcase  Tag_Name                   Tag_Num   where  Tags EQ Tag_Name                   Tag_Num   Tag_Num 0                  if  Tag_Num LT 0  then begin                  if NOT keyword_set  noprint   then                           message Tag  not found CONTIN                         return 2                     endif            endif          if  Tag_Num LT 0  OR  Tag_Num GE Ntag  then begin                 message Tag      strtrim Tag_Num 2      exceeds Max Tag                                strtrim Ntag 1 2      in structure CONTIN                 return 1             endif          if N_elements  ipart   GT 0 then begin           check if any searching                                                           on a subset of input                  w   where  ipart GE 0  nf                   if  nf LE 0  then return 1                  if  nf LT N_elements  ipart   then ipart   ipart w             endif   Now find out where for RANGE :          if N_elements  range   EQ 2 then begin                  if N_elements  ipart   GT 0 then begin                       w   where   Struct ipart Tag_Num  GE range 0  AND                                    Struct ipart Tag_Num  LE range 1  Nfound                         if  Nfound GT 0  then windex   ipart w  else windex   w                   endif                     else  windex   where   Struct Tag_Num  GE range 0  AND                                            Struct Tag_Num  LE range 1  Nfound                    if  Nfound LE 0  AND  NOT keyword_set  noprint     then begin                         strnums   strtrim  range  2                           string   strnums 0        strnums 1                          message  NO values of  found in the Range     string    CONTIN                    endif  where Values:           endif else if N_elements  values   GE 1 then begin                  Nval   N_elements  values                   vals    values                  Nfound   0                  if N_elements  ipart   GT 0 then begin                      for v 0 Nval 1 do begin                         w   where  Struct ipart Tag_Num  EQ vals v  Nf                           if  Nf GT 0  then begin                                 if  Nfound GT 0  then ww    ww w  else ww   w                            endif                         Nfound   Nfound   Nf                       endfor                      if  Nfound GT 0  then windex   ipart ww sort  ww                                          else windex   w                   endif else begin                      for v 0 Nval 1 do begin                         w   where  Struct Tag_Num  EQ vals v  Nf                           if  Nf GT 0  then begin                                 if  Nfound GT 0  then ww    ww w  else ww   w                            endif                         Nfound   Nfound   Nf                       endfor                      if  Nfound GT 0  then windex   ww sort  ww                                          else windex   w                    endelse                  if  Nfound LE 0  AND  NOT keyword_set  noprint     then begin                         strnums   strtrim  vals  2                           string   strnums 0                          for i 1 Nval 1 do string   string       strnums i                          message  NO values of  found Equaling     string    CONTIN                    endif             endif else begin                  message must specify a RANGE   or VALUES s CONTIN                 windex 1              endelse  return  windex end"); 
     325a[323] = new Array("./ToBeReviewed/TRIANGULATION/ciseauxtri.html", "ciseauxtri.pro", "", "           file_comments    Delete arrays which do not have to be drawn thanks to 2 tests:       1  Corners of the array must be in the window       2  Lengthes of side of triangles expressed in normalized           coordinates must not surpass a sill length        categories      param TRIANG       param GLAM       param GPHI        keyword _EXTRA   Used to pass your keywords       uses   common pro      history   Sebastien Masson  smasson lodyc jussieu fr                          20 2 99      version    Id: ciseauxtri pro 192 2006 09 22 09:37:08Z smasson              FUNCTION ciseauxtri  triang  glam  gphi  _EXTRA   ex       compile_opt idl2  strictarrsubs    cm_4mesh   IF NOT keyword_set key_forgetold  THEN BEGIN  updatenew   ENDIF     IF NOT keyword_set key_periodic  AND NOT keyword_set key_irregular        AND NOT  map projection LE 7 AND  map projection NE 0        AND NOT  map projection EQ 14 OR  map projection EQ 15                OR  map projection EQ 18  THEN return  triang      tempsun   systime 1            For key_performance      taille   size glam     nx   taille 1     ny   taille 2      tempdeux   systime 1           For key_performance  2    z   convert_coord glam gphi data to_normal      x   z 0       y   z 1       tempvar   SIZE TEMPORARY z    delete z    IF testvar var   key_performance  EQ 2 THEN       print   temps ciseauxtri: convert_coord data to_normal  systime 1 tempdeux     Beware  following the projection  some points x or y can become NaN     see points behind the Earth in an orthographic projection     In this case  we have to remove all triangle which contain one of these points       if  map projection LE 7 AND  map projection NE 0        OR  map projection EQ 14 OR  map projection EQ 15 OR  map projection EQ 18 then begin       tempdeux   systime 1        For key_performance  2         test    x y triang        test   finite temporary test   nan        test   total temporary test  1        ind   where temporary test  EQ 0          if ind 0  NE  1 then triang   triang  temporary ind  ELSE return    1       trichanged   1b       IF testvar var   key_performance  EQ 2 THEN          print   temps ciseauxtri: recherche points a NAN  systime 1 tempdeux    endif      seuil   5  indxtriang2       indxtriang   indxmin    nx 1 indxmin EQ 0 AND indxmax EQ  nx 1        ENDIF ELSE indxtriang   indxmin        listrect   nx indytriang indxtriang       IF testvar var   key_performance  EQ 2 THEN          print   temps ciseauxtri: liste des rectangles  systime 1 tempdeux     Now we have this list  we will make sure that we do not have triangles    with only a common summit          test   bytarr nx  ny        test listrect    1       dejavire   1b test         tempdeux   systime 1        For key_performance  2       vire1   0       vire2   0       while  vire1 0  NE  1 OR vire2 0  NE  1  ne 0 do begin          vire1   where   test shift test   1   1                              1 shift test  0   1 1 shift test   1  0  EQ 1           if vire1 0  NE  1 THEN test vire1    0   We delete the rectangle          vire2   where   1 test 1 shift test   1   1                              shift test  0   1 shift test   1  0  EQ 1    We delete the top rectangle  same x index but equal to 1           if vire2 0  NE  1 THEN test vire2 nx    0        ENDWHILE  stop       test   test temporary dejavire          avirer   where temporary test  EQ 0        IF testvar var   key_performance  EQ 2 THEN          print   temps ciseauxtri: determinationdes rectangles a virer  systime 1 tempdeux         if avirer 0  NE  1 then begin       tempdeux   systime 1        For key_performance  2       indnx   n_elements listrect        indny   n_elements avirer        ind   listrect replicate 1l  indny         ind   ind EQ replicate 1  indnx avirer        if indny GT 1 then ind   total ind  2        ind   where ind EQ 0        if ind 0  NE  1 then triang   triang  ind  ELSE return    1       endif       IF testvar var   key_performance  EQ 2 THEN          print   temps ciseauxtri: derniere retouche de la triangulation  systime 1 tempdeux    endif            if keyword_set key_performance  THEN print   temps ciseauxtri  systime 1 tempsun       return   triang end"); 
     326a[324] = new Array("./ToBeReviewed/TRIANGULATION/completecointerre.html", "completecointerre.pro", "", "             file_comments        categories   Graphics      param LONS         param LATS        param SEUIL        keyword _EXTRA   Used to pass your keywords       keyword CONT_COLOR  default d n_colors   1   white    The color of the continent       uses   common pro      history   Sebastien Masson  smasson lodyc jussieu fr                         01 10 1999      version    Id: completecointerre pro 163 2006 08 29 12:59:46Z navarro             PRO draw_corner_triangle  lons  lats  seuil  CONT_COLOR   cont_color  _extra   ex     compile_opt idl2  strictarrsubs    cm_4mesh   the triangle must not be out of the domain   IF min lons  max   maxlon  GE lon1 AND maxlon LE lon2       AND min lats  max   maxlat  GE lat1 AND maxlat LE lat2 then BEGIN   the triangle must not be too big      z   convert_coord lons  lats   data   to_normal       alldist    z 0  2 z 0  0 2    z 1  2 z 1  0 2                     z 0  0 z 0  1 2    z 1  0 z 1  1 2                     z 0  1 z 0  2 2    z 1  1 z 1  2 2      IF max alldist  LT seuil 2 THEN polyfill  lons  lats           color   cont_color  _extra   ex     return   ENDIF  end              file_comments   To color cleanly continents      categories   Graphics      keyword _EXTRA   Used to pass your keywords       keyword CONT_COLOR   The color of the continent  default value is    d n_colors   1   white      keyword COINMONTE  type array    To obtain the array of  ascending land corner     to be treated with completecointerre pro in the variable array    instead of make it pass by the global variable twin_corners_up       keyword COINDESCEND  type array    See COINMONTE      keyword INDICEZOOM   The zoom s index      uses   common pro      history   Sebastien Masson  smasson lodyc jussieu fr                         01 10 1999      version    Id: completecointerre pro 163 2006 08 29 12:59:46Z navarro             PRO completecointerre  COINMONTE   coinmonte  COINDESCEND   coindescend                            CONT_COLOR   cont_color  INDICEZOOM   indicezoom                            _extra   ex     compile_opt idl2  strictarrsubs    common       if NOT keyword_set coinmonte  then return     if NOT keyword_set coindescend  then return     if NOT keyword_set indicezoom  then return   tempsun   systime 1             For key_performance     definitions of vectors coinmont and coindesc     if keyword_set coinmonte  then coinmont   coinmonte     ELSE coinmont   twin_corners_up   if keyword_set coindescend  then coindesc   coindescend     ELSE coindesc   twin_corners_dn   IF NOT keyword_set cont_color  THEN cont_color    d n_colors 1     255     definition of coordinates of points numbered 1 2 3 4 5 6  see figures below      tempdeux   systime 1            For key_performance  2   if coinmont 0  NE  1 OR coindesc 0  NE  1 then BEGIN     if keyword_set indicezoom  then BEGIN   if we use key_stide  the t  u  v and f points are no more related to   the same cell because glamf and gphif has be recomputed to be in the   middle of two t points       IF total key_stride  EQ 3 AND finite glamv 0 gphiv 0  NE 0 THEN BEGIN         long1   glamv indicezoom    lati1   gphiv indicezoom        ENDIF ELSE BEGIN          long1   glamt indicezoom    lati1   gphif indicezoom        ENDELSE       IF total key_stride  EQ 3 AND finite glamu 0 gphiu 0  NE 0 THEN BEGIN         long2   glamu indicezoom    lati2   gphiu indicezoom        ENDIF ELSE BEGIN         long2   glamf indicezoom    lati2   gphit indicezoom        ENDELSE       long3   glamf indicezoom    lati3   gphif indicezoom      ENDIF ELSE BEGIN        IF total key_stride  EQ 3 AND finite glamv 0 gphiv 0  NE 0 THEN BEGIN         long1   glamv   lati1   gphiv       ENDIF ELSE BEGIN          long1   glamt   lati1   gphif       ENDELSE       IF total key_stride  EQ 3 AND finite glamu 0 gphiu 0  NE 0 THEN BEGIN         long2   glamu   lati2   gphiu       ENDIF ELSE BEGIN          long2   glamf   lati2   gphit       ENDELSE       long3   glamf   lati3   gphif     ENDELSE        nx    size long1   dimensions 0      ny    size long1   dimensions 1      seuil   5    min nx  ny 2      seuil   min p position 2 p position 0 seuil                       p position 3 p position 1 seuil      ENDIF     IF testvar var   key_performance  EQ 2 THEN       print   temps completecointerre: positions des points  systime 1 tempdeux       Case land corner in ascent:        2 land points in diagonal ascending with 2 ocean points on the descendant diagonal                          4           t i nx 1    u i nx        t i nx 1 0                                                                         1         3                  5         v i f i v i 1                                                                                 t i 0       2 u i           t i 1 1       if coinmont 0  NE  1 then BEGIN     tempdeux   systime 1          For key_performance  2     for id   0  n_elements coinmont 1 do BEGIN       i   coinmont id        ii   i MOD nx       ij   i nx   bottom triangle       lons    long1 i  long2 i  long3 i        lats    lati1 i  lati2 i  lati3 i        draw_corner_triangle  lons  lats  seuil  CONT_COLOR   cont_color  _extra   ex   upper triangle       IF ii NE nx 1 AND ij NE ny 1 THEN BEGIN         lons    long3 i  long1 i 1  long2 i nx          lats    lati3 i  lati1 i 1  lati2 i nx          draw_corner_triangle  lons  lats  seuil  CONT_COLOR   cont_color  _extra   ex       ENDIF      ENDFOR      IF testvar var   key_performance  EQ 2 THEN         print   temps completecointerre: trace de cointerremonte  systime 1 tempdeux   ENDIF     Case land corner in descent:        2 land points in diagonal descending with 2 ocean points on the ascendant diagonal                           4       t i nx 1    u i nx        t i nx 1 0                                                                                      3                  5         v i f i v i 1            1                                                                                                  t i 0      2 u i           t i 1 1     if coindesc 0  NE  1 then begin     tempdeux   systime 1          For key_performance  2     for id   0  n_elements coindesc 1 do BEGIN       i   coindesc id        ii   i MOD nx       ij   i nx       IF ii NE nx 1 AND ij NE ny 1 THEN BEGIN   left triangle         lons    long1 i  long3 i  long2 i nx          lats    lati1 i  lati3 i  lati2 i nx          draw_corner_triangle  lons  lats  seuil  CONT_COLOR   cont_color  _extra   ex   right triangle         lons    long3 i  long2 i  long1 i 1          lats    lati3 i  lati2 i  lati1 i 1          draw_corner_triangle  lons  lats  seuil  CONT_COLOR   cont_color  _extra   ex       ENDIF     ENDFOR     IF testvar var   key_performance  EQ 2 THEN         print   temps completecointerre: trace de cointerredescend  systime 1 tempdeux   ENDIF      IF keyword_set key_performance  THEN print   temps completecointerre  systime 1 tempsun      return end"); 
     327a[325] = new Array("./ToBeReviewed/TRIANGULATION/definetri.html", "definetri.pro", "", "       file_comments   Define a triangulation array like TRIANGULATE             But in a VERY SIMPLE CASE:   the points are regulary gridded on nx ny array    Find a Delaunay triangulation for this set of points is easy:   Points define  nx 1 ny 1  rectangles which we can cut in 2 triangles     cf  figure above        fixe        ny 1                                                                                                                                            ny 2                                                                                                                                                    1                                                                                                                                         0                          0   1   2        nx 3  nx 2 nx 1         You have 2 ways to cut a rectangle:        1  the upward diagonal       2  the downward diagonal                                                                                                                                                                                                                                  categories   Utilities       param NX  in required    The x dimension array      param NY  in required    The y dimension array      param DOWNWARD  in optional    When downward is undefine all rectangles are cut in using the upward    diagonal     Downward is a vector which contains the rectangles numbers which are cut in    using the downward diagonal    The rectangle number is defined by the index  in a nx ny vector  of the    lower left corner of the rectangle       returns   triangles is a 2d array and its dimensions are 3 and 2 nx 1 ny 1    triangles is defined like in the TRIANGULATE procedure       examples     IDL  triangles definetri 3 3 1 3    triangles will be this kind of triangulation:                                                                                                                                                                       history   sebastien Masson  smlod ipsl jussieu fr                          4 3 1999      version    Id: definetri pro 186 2006 09 20 10:50:37Z pinsard     FUNCTION definetri  nx  ny  downward     compile_opt idl2  strictarrsubs      nx   long nx     ny   long ny     if n_elements downward  NE 0 THEN BEGIN        if n_elements downward  GT  nx 1 ny 1  then begin          print   downward a trop d elements par rapport a nx et ny           return    1       endif       downward   long downward     ENDIF   we define triangles     triangles   lonarr 3  2 nx 1 ny 1      we cut the rectangles with the upward diagonal      if n_elements downward  NE  nx 1 ny 1  then BEGIN   there is some rectangle to cut    we define upward: upward is a vector which contains the rectangles   numbers which are cut in using the upward diagonal    The rectangle number is defined by the index  in a nx ny vector  of   the lower left corner of the rectangle        upward   bytarr nx  ny 1       upward  ny 1    0       upward nx 1      0       if n_elements downward  NE 0 then upward downward    0       upward   where upward EQ 1        n1   n_elements upward       4 corners indexes of a rectangle number i are           i nx  i nx 1                                                                                                                                                                                   i   i 1         trinumber   2 upward upward nx    we define the right triangles       triangles 0  trinumber    upward       triangles 1  trinumber    upward 1       triangles 2  trinumber    upward 1 nx   we define the left triangles       triangles 0  trinumber 1    upward 1 nx       triangles 1  trinumber 1    upward nx       triangles 2  trinumber 1    upward    ENDIF ELSE n1   0     we cut the rectangles with the downward diagonal      if n_elements downward  NE 0 then BEGIN       n2   n_elements downward         trinumber   2 downward downward nx    we define the right triangles       triangles 0  trinumber    downward 1       triangles 1  trinumber    downward nx 1       triangles 2  trinumber    downward nx   we define the left triangles       triangles 0  trinumber 1    downward nx       triangles 1  trinumber 1    downward       triangles 2  trinumber 1    downward 1    endif     return  triangles end"); 
     328a[326] = new Array("./ToBeReviewed/TRIANGULATION/definetri_e.html", "definetri_e.pro", "", "     file_comments        categories        param INDEX   It is the tick mark index which starts at 0       param NX  in required    The x dimension array      param NY  in required    The y dimension array        returns        restrictions          examples          history        version    Id: definetri_e pro 186 2006 09 20 10:50:37Z pinsard      function numtri  index  nx  ny     compile_opt idl2  strictarrsubs       y index nx    x index y nx    numtri    y NE 0 nx 1 2 y 1 1     2 y EQ  ny 1  OR y EQ  ny 1 x     return  numtri end          file_comments   Define a triangulation array like TRIANGULATE but for a   E grid type      categories   Make contours with E grid type       param NX  in required    The x dimension array      param NY  in required    The y dimension array      param SINGULAR  in optional    When singular is undefined all rectangles are cut in using the vertical    diagonal     Singular is a vector which contains the rectangles numbers which are cut in    using the horizontal diagonal    The rectangle number is defined by the index  in a nx ny vector  of the    lower left corner of the rectangle       keyword SHIFTED        returns   Triangles is a 2d array and is dimensions are 3 and  nx 1 ny 1    Triangles is defined like in the TRIANGULATE procedure               history   Sebastien Masson  smlod ipsl jussieu fr                          June 2001      version    Id: definetri_e pro 186 2006 09 20 10:50:37Z pinsard        todo    seb: documenter SHIFTED   FUNCTION definetri_e  nx  ny  singular  SHIFTED   shifted     compile_opt idl2  strictarrsubs      nx   long nx     ny   long ny     triangles   lonarr 3  2 nx 1 ny 1      build the base triangulation with the diamond cut in two triangles   by the vertical diagonal     first line    index   lindgen nx 1     trinumber   index    triangles 0  trinumber    index    triangles 1  trinumber    index 1    triangles 2  trinumber    index nx 1 shifted    last line    index    ny 1 nx lindgen nx 1     trinumber   numtri index  nx  ny     triangles 0  trinumber    index    triangles 1  trinumber    index nx index nx 1 shifted  MOD 2     triangles 2  trinumber    index 1   other lines    if ny GT 2 then begin       index   lindgen nx  ny        index   index 0:nx 2  1:ny 2        index   index        oddeven    index nx 1 shifted  MOD 2       trinumber   numtri index  nx  ny        triangles 0  trinumber    index       triangles 1  trinumber    index nx oddeven       triangles 2  trinumber    index nx oddeven       triangles 0  trinumber 1    index nx oddeven       triangles 1  trinumber 1    index nx oddeven       triangles 2  trinumber 1    index 1    endif     cut the diamond specified by singular in two triangles   by the horizontal diagonal      IF keyword_set singular  then BEGIN       yindex   singular nx       otherline   where yindex NE 0 AND yindex NE  ny 1        if otherline 0  NE  1 then begin          index   singular otherline           oddeven    index nx 1 shifted  MOD 2          trinumber   numtri index  nx  ny           triangles 0  trinumber    index          triangles 1  trinumber    index nx oddeven          triangles 2  trinumber    index 1          triangles 0  trinumber 1    index          triangles 1  trinumber 1    index 1          triangles 2  trinumber 1    index nx oddeven       endif     endif    return  triangles end "); 
     329a[327] = new Array("./ToBeReviewed/TRIANGULATION/dessinetri.html", "dessinetri.pro", "", "             file_comments   Draw the triangulation      categories   Utilities       param TRI  in optional    Array which define the triangulation  provided by triangule pro or triangulate        param X  in optional    The x position of points to which the trangulation refer to     see the x array provided in triangulate       param Y  in optional    The y position of points to which the trangulation refer to     see the y array provided in triangulate       keyword WAIT    x  to call wait x second between each triangle draw       keyword ONEBYONE   To draw the triangles one by one      keyword FILL   To fill the triangles  using polyfill  instead of plotting them      keyword CHANGECOLOR    n  To change the color of each triangle  n colors   will be used and repeted if necessary       uses   common pro      history   Sebastien Masson  smasson lodyc jussieu fr       version    Id: dessinetri pro 163 2006 08 29 12:59:46Z navarro              PRO dessinetri  tri  x  y  WAIT   wait  ONEBYONE   onebyone  FILL   fill  CHANGECOLOR   changecolor  _extra   ex     compile_opt idl2  strictarrsubs    common    tempsun   systime 1             For key_performance    a        if n_params  EQ 3 then BEGIN      CASE size x   n_dimensions size y   n_dimensions  OF        2:BEGIN          nx   n_elements x            ny   n_elements y            glam   x replicate 1  ny           gphi   replicate 1  nx y        END         4:BEGIN          glam   x          gphi   y        END        ELSE:BEGIN          dummy   report x and y inputs of dessinetri must have the same number of dimensions  1 or 2           return        END      ENDCASE    ENDIF ELSE BEGIN        grille mask glam gphi  tri   tri       undefine  mask       tri   ciseauxtri tri  glam  gphi     ENDELSE       IF keyword_set changecolor  THEN BEGIN       oldname    d name       if  d name EQ  PS  OR  d name EQ  Z  then BEGIN           thisos   strupcase strmid version os_family  0  3           CASE thisOS of              MAC : set_plot  thisOS              WIN : set_plot  thisOS             ELSE: set_plot   X           ENDCASE          ncolors d n_colors 1    255          set_plot  oldname        ENDIF ELSE ncolors d n_colors 1    255        color   1 indgen changecolor ncolors changecolor 1       ENDIF ELSE color   0      color   color replicate 1  n_elements tri 3 n_elements color 1        tempdeux   systime 1            For key_performance  2    for i   0L  n_elements tri 3 1 do begin       t    tri  i  tri 0  i        IF keyword_set fill  THEN           polyfill  glam t  gphi t  color   color i  _extra   ex         ELSE plots  glam t  gphi t  color   color i  _extra   ex       IF keyword_set wait  THEN wait  wait       IF keyword_set onebyone  THEN read  a  prompt    press a key     ENDFOR    IF testvar var   key_performance  EQ 2 THEN       print   temps dessinetri: trace des triangles  systime 1 tempdeux      if keyword_set key_performance  THEN print   temps dessinetri  systime 1 tempsun      return end"); 
     330a[328] = new Array("./ToBeReviewed/TRIANGULATION/drawcoast_c.html", "drawcoast_c.pro", "", "     file_comments        categories         param MASK         param XF         param YF         param NX         param NY         keyword COAST_COLOR  default 0    The color of the coastline    Default is black  0       keyword COAST_THICK  default 1    The thick of the trait to trace continents      keyword XSEUIL  default 5    To eliminate segments of coasts which are to big  which link points which can    be close on the sphere but distant on the drawing  We delete all segments    whose the size surpass the size of the window following X XSEUIL     But it can be to big if we do a big zoom or a little one for some    projections  We specify it the keyword thanks to this keyword       keyword YSEUIL   See XSEUIL       keyword _EXTRA   Used to pass our keywords        returns          uses          restrictions          examples          history          version        todo    Seb: remplir le header       PRO drawcoast_c  mask  xf  yf  nx  ny  COAST_COLOR   coast_color  COAST_THICK   coast_thick  YSEUIL   yseuil  XSEUIL   xseuil  _extra   ex     compile_opt idl2  strictarrsubs    cm_4mesh   IF NOT keyword_set key_forgetold  THEN BEGIN  updatenew  updatekwd   ENDIF      tempsun   systime 1            For key_performance       We trace vertical segments:      if NOT keyword_set yseuil  then yseuil   5     min nx  ny 2     distanceseuil    p position 3 p position 1 yseuil   list: list of points i for which we will trace a segment between the point i j 1 and i j    tempdeux   systime 1           For key_performance  2    liste   where mask shift mask   1  0  EQ 1                    AND  xf shift xf  0  1 2 yf shift yf  0  1 2  LE distanceseuil 2     IF liste 0  NE  1 THEN BEGIN   We recuperate lx an dly which are indexes in a 2d array of points given by list       ly   liste nx   lx   temporary liste nx ly       indice   where ly NE 0      We do not take points concerning       if indice 0  NE  1 then begin   the first line because in this case  the point j 1 is undefined           lx   lx indice    ly   ly temporary indice    Loop on concerned points and drawing of the segment    Comment: we use plots instead of plot because plots goes faster           IF testvar var   key_performance  EQ 2 THEN             print   temps tracecote: determiner liste des points concernes par un trait vertical  systime 1 tempdeux          tempdeux   systime 1     For key_performance  2          for pt   0L  n_elements lx 1 do BEGIN              i   lx pt    j   ly pt              plots   xf i  j 1  xf i  j   yf i  j 1  yf i  j                    color   coast_color  thick   coast_thick   normal  _extra   ex          endfor          IF testvar var   key_performance  EQ 2 THEN             print   temps tracecote: trace des traits verticaux  systime 1 tempdeux       endif    ENDIF     For the drawing of horizontal segments   it is the same thing but we have to be careful if it is periodic      If it is periodic  we duplicate the first column and we put it at the end      This is made not for the shift which is periodic by default but for the plots     tempdeux   systime 1           For key_performance  2    if keyword_set key_periodic  AND nx EQ jpi then begin       mask    mask  mask 0          xf    xf  xf 0          yf    yf  yf 0          nx   nx 1    ENDIF    if NOT keyword_set xseuil  then xseuil   5     min nx  ny 2     distanceseuil    p position 2 p position 0 xseuil    liste   where mask shift mask  0   1  EQ 1                    AND  xf shift xf  1  0 2 yf shift yf  1  0 2  LE distanceseuil 2     IF liste 0  NE  1 THEN BEGIN       ly   liste nx   lx   temporary liste nx ly       indice   where ly NE ny 1 AND lx NE 0        if indice 0  NE  1 then begin   We do not take points of the first column and of the last line  because we added artificially           lx   lx indice    ly   ly temporary indice           IF testvar var   key_performance  EQ 2 THEN             print   temps tracecote: determiner liste des points concernes par un trait horizontal  systime 1 tempdeux          tempdeux   systime 1     For key_performance  2          for pt   0L  n_elements lx 1 do BEGIN              i   lx pt    j   ly pt              plots   xf i 1  j  xf i  j   yf i 1  j  yf i  j                    color   coast_color  thick   coast_thick   normal  _extra   ex          endfor          IF testvar var   key_performance  EQ 2 THEN             print   temps tracecote: trace des traits horizontaux  systime 1 tempdeux       endif    endif      if keyword_set key_performance  THEN print   temps drawcoast_c  systime 1 tempsun    return end"); 
     331a[329] = new Array("./ToBeReviewed/TRIANGULATION/drawcoast_e.html", "drawcoast_e.pro", "", "     file_comments        categories         param MASK         param XF         param YF         param NX         param NY         keyword COAST_COLOR  default 0    The color of the coastline    Default is black  0       keyword COAST_THICK  default 1    The thick of the trait to trace continents      keyword XSEUIL  default 5    To eliminate segments of coasts which are to big  which link points which can    be close on the sphere but distant on the drawing  We delete all segments    whose the size surpass the size of the window following X XSEUIL    But it can be to big if we do a big zoom or a little one for some    projections  We specify it the keyword thanks to this keyword       keyword YSEUIL   See XSEUIL      keyword _EXTRA   Used to pass our keywords        returns          uses          restrictions          examples          history          version       todo   Seb: remplir le header       PRO drawcoast_e  mask  xf  yf  nx  ny  COAST_COLOR   coast_color  COAST_THICK   coast_thick  YSEUIL   yseuil  XSEUIL   xseuil  onemore   onemore  _extra   ex       compile_opt idl2  strictarrsubs    cm_4mesh   IF NOT keyword_set key_forgetold  THEN BEGIN  updatenew  updatekwd   ENDIF      tempsun   systime 1            pour key_performance      if keyword_set key_periodic  AND nx EQ jpi then begin       mask    mask  mask 0          xf    xf  xf 0          yf    yf  yf 0          nx   nx 1    ENDIF     we plot the borders of the diamond in this sense :        if NOT keyword_set onemore  then onemore   0    if NOT keyword_set xseuil  then xseuil   5     min nx  ny 2     distanceseuil    p position 2 p position 0 xseuil   liste: liste des points i pourlesquels on va tracer un segment     index   lindgen nx  ny     index   index 0:nx 2  1:ny 1     indexbis   index nx index nx onemore  MOD 2     liste   where mask index 1 mask indexbis  EQ 1                    AND  xf index xf indexbis 2 yf index yf indexbis 2 LE distanceseuil 2     IF liste 0  NE  1 THEN BEGIN       index   index liste        indexbis   indexbis liste        for pt   0  n_elements index 1 do begin          plots   xf index pt  xf indexbis pt   yf index pt  yf indexbis pt                 color   coast_color  thick   coast_thick   normal  _extra   ex       endfor    ENDIF     we plot the borders of the diamond in this sense :        if NOT keyword_set xseuil  then xseuil   5     min nx  ny 2     distanceseuil    p position 2 p position 0 xseuil   liste: liste des points i pourlesquels on va tracer un segment     index   lindgen nx  ny 1     index   index 0:nx 2       indexbis   index nx index nx onemore  MOD 2     liste   where mask index 1 mask indexbis  EQ 1                    AND  xf index xf indexbis 2 yf index yf indexbis 2 LE distanceseuil 2     IF liste 0  NE  1 THEN BEGIN       index   index liste        indexbis   indexbis liste        for pt   0  n_elements index 1 do begin          plots   xf index pt  xf indexbis pt   yf index pt  yf indexbis pt                 color   coast_color  thick   coast_thick   normal  _extra   ex       endfor    ENDIF       if keyword_set key_performance  THEN print   temps drawcoast_e  systime 1 tempsun    return end"); 
     332a[330] = new Array("./ToBeReviewed/TRIANGULATION/drawsectionbottom.html", "drawsectionbottom.pro", "", "             file_comments   Fill and draw the bottom continents for a real section       categories       param MASKIN  in required       param XXAXISIN  in required        param DEPTHSIN  in required       keyword COAST_COLOR  default 0    The color of the coastline    Default is black  0       keyword COAST_THICK  default 1    The thickness of the coastline       keyword CONT_COLOR  default d n_colors   1   xx   zz    max y range      xx   float xx    zz   float zz      filling of the continents   IF NOT keyword_set cont_color  THEN cont_color    d n_colors   1    255     if NOT keyword_set cont_nofill  then         polyfill   min xx   max   maxx  xx  maxx                       min zz   max   mazz  zz  mazz                      color   cont_color    if NOT keyword_set cont_nofill  then        polyfill   min xx  max   maxx  xx  maxx                      y range 0  zz   y range 0  color   cont_color     drawing of the coast  bottom  line    we could have plot directly xx and yy but if countout ne 0  doing   this will draw an non existing bottom line along  y range values   which is not so good    we thus do this ugly for if loops to make sure that we don t draw   these lines but we keep all vertical lines     IF countout NE 0 THEN BEGIN      FOR i   0  countout  1 DO BEGIN        CASE 1 OF          out i  EQ 0:BEGIN    if we start with a out point            xxx    values f_nan            zzz    values f_nan                     END           i EQ 0:BEGIN    i eq 0 but out i  ne 0            xxx    xx 0:out i   values f_nan             zzz    zz 0:out i   values f_nan           END          ELSE:BEGIN   two consecutive out values at the same depth: we just keep    values f_nan values until the next change of depth            IF  out i 1  EQ out i 1  AND  zz out i 1  EQ zz out i  THEN BEGIN               xxx    xxx   values f_nan               zzz    zzz   values f_nan                          ENDIF ELSE BEGIN    we keep everything inbetween the out values  including themselves   for the vertical lines  but we had  values f_nan to remove the horizontal lines              xxx    xxx  xx out i 1 :out i   values f_nan               zzz    zzz  zz out i 1 :out i   values f_nan                          ENDELSE          END        ENDCASE        IF i EQ countout 1 AND out i  NE n_elements xx 1 THEN BEGIN          xxx    xxx  xx out i :           zzz    zzz  zz out i :                      ENDIF      ENDFOR      plots  xxx  zzz  color   coast_color  thick   coast_thick  _extra   ex    ENDIF ELSE plots  xx  zz  color   coast_color  thick   coast_thick  _extra   ex     return end "); 
     333a[331] = new Array("./ToBeReviewed/TRIANGULATION/fillcornermask.html", "fillcornermask.pro", "", "             file_comments   To color cleanly continents      categories   Graphics      keyword _EXTRA   Used to pass your keywords       keyword CONT_COLOR  default d n_colors   1   white    The color of the continent       uses   common pro      history   Sebastien Masson  smasson lodyc jussieu fr                         8 8 2002      version    Id: fillcornermask pro 163 2006 08 29 12:59:46Z navarro             PRO fillcornermask  xin  yin  COINMONTE   coinmonte  COINDESCEND   coindescend                                     CONT_COLOR   cont_color  INDICEZOOM   indicezoom                         _extra   ex     compile_opt idl2  strictarrsubs    common     if NOT keyword_set coinmonte  AND NOT keyword_set coindescend  then return     tempsun   systime 1             For key_performance     IF NOT keyword_set cont_color  THEN cont_color    d n_colors 1     255         definition of coordinates of points numbered 1 2 3 4 5 6  see figures below        x1   reform xin    y1   reform yin    IF  size x1 0  EQ 2 THEN x1   x1   0    IF  size y1 0  EQ 2 THEN y1   y1  0      x2    5 x1 shift x1   1    y2    5 y1 shift y1   1    nx   n_elements x1    ny   n_elements y1           Case land corner in ascent:        2 land points in diagonal ascending with 2 ocean points on the descendant diagonal                          3           t i nx 1    u i nx        t i nx 1 0                                                                            1                            4         v i f i v i 1                                                                                 t i 0       2 u i           t i 1 1       if keyword_set coinmonte  then BEGIN     if coinmonte 0  NE  1 then BEGIN       iup   coinmonte MOD nx       jup   coinmonte nx       for id   0  n_elements coinmonte 1 do BEGIN         i   iup id          j   jup id          IF i NE nx 1 AND j NE ny 1 THEN BEGIN           polyfill   x1 i  x2 i  x2 i  x1 i 1  x1 i                   y2 j  y1 j  y1 j 1  y2 j  y2 j                  color   cont_color  _extra   ex         ENDIF       endfor     endif   endif     Case land corner in descent:        2 land points in diagonal descending with 2 ocean points on the ascendant diagonal                          4       t i nx 1    u i nx        t i nx 1 0                                                                                      3                  5         v i f i v i 1            1                                                                                               t i 0      2 u i           t i 1 1     if keyword_set coindescend  then BEGIN     if coindescend 0  NE  1 then begin       idw   coindescend MOD nx       jdw   coindescend nx       for id   0  n_elements coindescend 1 do BEGIN         i   idw id          j   jdw id          IF i NE nx 1 AND j NE ny 1 THEN BEGIN           polyfill   x1 i  x2 i  x2 i  x1 i 1  x1 i                   y2 j  y1 j 1  y1 j  y2 j  y2 j                  color   cont_color  _extra   ex         ENDIF       endfor     endif   endif      IF keyword_set key_performance  THEN print   temps fillcornermask  systime 1 tempsun      return end"); 
     334a[332] = new Array("./ToBeReviewed/TRIANGULATION/section.html", "section.pro", "", "     file_comments        categories         param FIELD         param RES         param GLAMAXE         param GPHIAXE         keyword ENDPOINTS           keyword BOXZOOM         keyword TYPE         keyword WDEPTH        keyword DIREC        keyword SHOWBUILD        keyword ONLYBOX        keyword _EXTRA    Used to pass your keywords       returns          uses   common pro       restrictions          examples          history   Sebastien Masson  smasson lodyc jussieu fr        version     Id: section pro 186 2006 09 20 10:50:37Z pinsard         PRO section  field  res  glamaxe  gphiaxe  ENDPOINTS   endpoints                  BOXZOOM   boxzoom  TYPE   type  WDEPTH   wdepth                  DIREC   direc  SHOWBUILD   showbuild  ONLYBOX   onlybox                  _extra   ex       include common     compile_opt idl2  strictarrsubs    cm_4mesh  cm_4data  cm_4cal   IF NOT keyword_set key_forgetold  THEN BEGIN  updatenew  updatekwd   ENDIF         definition of boxzoom in function of endpoints  then redefinition of the domain   boxzoom2d    min endpoints 0  endpoints 2  max   ma02  ma02                    min endpoints 1  endpoints 3  max   ma13  ma13      minprof   0    profdefault   200    if n_elements type  EQ 0 then type    nothing    Case N_Elements Boxzoom  OF     0:localbox    boxzoom2d  minprof  profdefault      1:localbox    boxzoom2d  minprof  boxzoom 0      2:localbox    boxzoom2d  boxzoom 0      4:if strpos type   z  NE  1 THEN         localbox    boxzoom2d  minprof  profdefault  ELSE localbox   boxzoom2d     5:localbox    boxzoom2d  minprof  boxzoom 4      6:localbox    boxzoom2d  boxzoom 4:5      Else:BEGIN       print  report Bad definition of the box        stop     END   ENDCASE   nelbox   n_elements localbox      if keyword_set wdepth  then grillechoice    vargrid   W      ELSE grillechoice   vargrid   domdef  localbox  GRIDTYPE   grillechoice   findalways  _extra   ex   grille   1   1   1   1  nx  ny   if less than 10 points where found  we apply domdef over the whole domain      problem  why 10 points as a test value    how can we find a good test value    IF nx   ny LE 10 THEN domdef  GRIDTYPE   grillechoice  _extra   ex   We redefine lon1    in case findalways has been used in domdef   lon1   min endpoints 0  endpoints 2  max   lon2    lat1   min endpoints 1  endpoints 3  max   lat2    we extend the box along the z axis   i that way the plot will be drawn   until its bottom part    if strpos type   z  NE  1 THEN BEGIN   We keep yranges  axis z  before changing the boxzoom       y range    localbox nelbox 1  localbox nelbox 2       if vargrid EQ  W  OR keyword_set wdepth  then BEGIN       firstzw   0    firstzw 1        lastzw    lastzw 1    firstzt 1        lastzt    lastzt 1    firstx   1    lastx    lastx   1    firsty   1    lasty    lasty   1     jpj  1       domdef  firstx  lastx  firsty  lasty  firstz  lastz                index  gridtype   vargrid    IF keyword_set onlybox  THEN return     grille  mask  glam  gphi  gdep  nx  ny  nz               firstx  firsty  firstz  lastx  lasty  lastz      We define the triangulation which will allows us to determinate the section     We recalculate it because it must be defined on the Earth and on oceans    Following the direction of the section  rather longitude or rather latitude     we define the way to triangulate    if strpos type   x  NE  1 then BEGIN      downward    lindgen nx  ny 0:nx 2  0:ny 2      tri   definetri nx  ny   downward     ENDIF ELSE tri   definetri nx  ny    If we have an irregular grid that is periodic  then it is possible that   some of the triangle have a very large size  neighborg points on the   sphere but far away when doing the projection  and should not be   taken into account     IF keyword_set key_irregular  AND keyword_set key_periodic  THEN BEGIN     glamtri   glam tri      glamtri   abs glamtri   shift glamtri  1  0      good   temporary glamtri  LT  10 max glam nx      good   where total temporary good  1  EQ 3      tri    temporary tri  temporary good    ENDIF     Equation of the line on which we do the section      abc   linearequation endpoints 0:1  endpoints 2:3    glamtri   glam tri    gphitri   gphi tri    Which points of the triangulation are above and below the line    if abc 1  NE 0 THEN       test   temporary gphitri  GE  abc 0 abc 1 temporary glamtri abc 2 abc 1      ELSE test   temporary glamtri  GE  abc 1 abc 0 temporary gphitri abc 2 abc 0     zero123   total test  1    to keep: triangles of the triangulation which are over the line    tokeep1   where zero123 EQ 1    tokeep2   where temporary zero123  EQ 2    tokeep    tokeep1  tokeep2     test   test  tokeep    tri   tri  tokeep    Which summit of the triangle is alone in a side of the line    single1   where test  0:n_elements tokeep1 1  EQ 1    single1   single1 single1 3 3   single2   where test  n_elements tokeep1 :n_elements tokeep 1  EQ 0    single2   single2 single2 3 3    undefine  tokeep   undefine  tokeep1   undefine  tokeep2   undefine  test    single    temporary single1  temporary single2    points1 the point  of the triangle  alone in a side of the line    point2 the other point of the triangle in the other side of the line    point1    single  single    point2    single EQ 0  1    single LE 1     undefine   single    ntri    size tri 2    index    lindgen ntri  lindgen ntri     points1   tri point1  index    points2   tri point2  temporary index    points : complex containing couples of points in a side and the other    side of the line  We have to delete duplicates    points   dcomplex points1  points2    points   points uniq points  sort points    symetrique   dcomplex imaginary points  double points    points   points where points shift temporary symetrique  1  NE 0    points1 coordinates of the point of the triangle which is alone in a side of the line    point2 coordinates of the other point of the triangle in the other side of the line    points1   complex glam    double points  gphi    double points    points2   complex glam imaginary points  gphi imaginary points    droites equations of line whose we look for the intersection wit the section    droites   linearequation points1  points2    inter   lineintersection droites  abc replicate 1  n_elements points1         Geographic coordinates of points we look for on the section    glamaxe   float inter    gphiaxe   imaginary inter    We arrange them in the growing order between boundaries of the section    if strpos type   x  NE  1 then BEGIN      sort   sort glamaxe      glamaxe   glamaxe sort      inbox   where glamaxe GE lon1 AND glamaxe LE lon2      glamaxe   glamaxe inbox      sort   sort inbox      gphiaxe   gphiaxe sort    ENDIF ELSE BEGIN     sort   sort gphiaxe      gphiaxe   gphiaxe sort      inbox   where gphiaxe GE lat1 AND gphiaxe LE lat2      gphiaxe   gphiaxe inbox      sort   sort inbox      glamaxe   glamaxe sort    ENDELSE   points   points sort    points1   points1 sort    points2   points2 sort    inter   inter sort    poids   abs points2 inter abs points2 points1       array   litchamp field    array   fitintobox array    if array 0  EQ  1 THEN BEGIN     res    1     return   ENDIF   if n_elements valmask  EQ 0 THEN valmask   1e20   taille   size array    if jpt GT 1 AND taille 0  GE 3 AND strpos type   t  EQ  1 then BEGIN     direc    t      array   grossemoyenne array   t      taille   size array      jpt   1   ENDIF   case 1 of    xy       taille 0  EQ 2:BEGIN       value1   array double points        terre   where value1 GT valmask 10        if terre 0  NE  1 then value1 terre     values f_nan       value2   array imaginary points        terre   where value2 GT valmask 10        if terre 0  NE  1 then value2 terre     values f_nan       res   poids value1 1 poids value2     END    xyz       taille 0  EQ 3 AND jpt EQ 1:BEGIN       npoints   n_elements points         index   double points replicate 1  nz replicate nx ny  npoints lindgen nz        value1   array index        terre   where value1 GT valmask 10        if terre 0  NE  1 then value1 terre     values f_nan       index   imaginary points replicate 1  nz replicate nx ny  npoints lindgen nz        value2   array index        terre   where value2 GT valmask 10        if terre 0  NE  1 then value2 terre     values f_nan       poids   poids replicate 1  nz        res   poids value1 1 poids value2   average following z         if strpos type   z  EQ  1 then begin         nan   where finite res  EQ 0          if vargrid EQ  W  then e3   e3w firstzw:lastzw  ELSE e3   e3t firstzt:lastzt          weight   replicate 1  npoints e3         if nan 0  NE  1 then weight nan     values f_nan         totalweight   total weight  2   nan          zero   where totalweight EQ 0          if zero 0  NE  1 then totalweight zero     values f_nan         res   total res weight  2   nan totalweight         direc    z string byte testvar var   toto        endif     END    xyt       taille 0  EQ 3 AND jpt NE 1:BEGIN       npoints   n_elements points         index   double points replicate 1  jpt replicate nx ny  npoints lindgen jpt        value1   array index        terre   where value1 GT valmask 10        if terre 0  NE  1 then value1 terre     values f_nan       index   imaginary points replicate 1  jpt replicate nx ny  npoints lindgen jpt        value2   array index        terre   where value2 GT valmask 10        if terre 0  NE  1 then value2 terre     values f_nan       poids   poids replicate 1  jpt        res   poids value1 1 poids value2     END    xyzt       taille 0  EQ 4:BEGIN       npoints   n_elements points         index   double points replicate 1  nz jpt replicate nx ny  npoints lindgen nz jpt        index   reform index  npoints  nz  jpt   over        value1   array index        terre   where value1 GT valmask 10        if terre 0  NE  1 then value1 terre     values f_nan       index   imaginary points replicate 1  nz jpt replicate nx ny  npoints lindgen nz jpt        index   reform index  npoints  nz  jpt   over        value2   array index        terre   where value2 GT valmask 10        if terre 0  NE  1 then value2 terre     values f_nan       poids   poids replicate 1  nz jpt        poids   reform poids  npoints  nz  jpt   over        res   poids value1 1 poids value2   average following z         if strpos type   z  EQ  1 then begin         nan   where finite res  EQ 0          if vargrid EQ  W  then e3   e3w firstzw:lastzw  ELSE e3   e3t firstzt:lastzt          weight   replicate 1  npoints e3         weight   weight replicate 1  jpt          weight   reform weight  npoints  nz  jpt   over          if nan 0  NE  1 then weight nan     values f_nan         totalweight   total weight  2   nan          zero   where totalweight EQ 0          if zero 0  NE  1 then totalweight zero     values f_nan         res   total res weight  2   nan totalweight         direc    z string byte testvar var   toto        endif     END   endcase      terre   where finite res  EQ 0    if terre 0  NE  1 then res terre    valmask    if n_elements showbuild  then BEGIN      winsave    window     psave    p     xsave    x     ysave    y     plt  findgen nx  ny   nodata   nofill   rempli  title     subtitle                  coast_thick   2  window   showbuild      p title          p subtitle          plots   endpoints 0  endpoints 2   endpoints 1  endpoints 3  color   50     plots   endpoints 0  endpoints 2   endpoints 1  endpoints 3  color   50  psym   2  thick   2      FOR i   0  n_elements points1 1 DO         plots   float points1 i  float points2 i                    imaginary points1 i  imaginary points2 i  color   150      plots  float points1  imaginary points1  color   150  psym   1     plots  float points2  imaginary points2  color   150  psym   1     plots  float inter  imaginary inter  color   250  psym   1       bug      IF terre 0  NE  1 THEN plots  float terre inter  imaginary terre inter  color   0  psym   1              dummy            read  dummy   prompt    press return to continue      IF  d name EQ  PS  THEN erase ELSE wset  winsave      p   psave      x   xsave      y   ysave   ENDIF     restoreboxparam   boxparam4section dat       return end"); 
     335a[333] = new Array("./ToBeReviewed/TRIANGULATION/tracecote.html", "tracecote.pro", "", "             file_comments   Draw coasts in plt       categories   Graphics      keyword SURFACE_COASTLINE   To draw the surface coast line instead of   the coast line at level firstz tw  Useful only for deep   plots       keyword _EXTRA   used to pass your keywords      uses   common pro      history   Sebastien Masson  smasson lodyc jussieu fr                         30 9 1999      version    Id: tracecote pro 163 2006 08 29 12:59:46Z navarro             PRO tracecote  SURFACE_COASTLINE   surface_coastline  _EXTRA   ex     include commons     compile_opt idl2  strictarrsubs    cm_4data  cm_4mesh   IF NOT keyword_set key_forgetold  THEN BEGIN  updatenew   ENDIF      tempsun   systime 1            For key_performance    if n_elements key_gridtype  EQ 0 then key_gridtype    c      We enlarge a bit the frame defined by firsts  lasts  in order to    recuperate edges of the coast which are in the edging of the domain          tempdeux   systime 1           For key_performance  2    firstx   0    min firstxt  firstxf 1     lastx    max lastxt  lastxf 1    min firstyt  firstyf 1     lasty    max lastyt  lastyf 1     jpj 1     nx   lastx firstx 1    ny   lasty firsty 1   Which vertical level choose     IF keyword_set surface_coastline  THEN firstz   0 ELSE        IF strupcase vargrid  eq  W  THEN firstz   firstzw ELSE firstz   firstzt   Attribution of the mask and of coordinates  delimiting limits of the land  coordinates f     mask   tmask firstx:lastx  firsty:lasty  firstz     xf   glamf firstx:lastx  firsty:lasty     yf   gphif firstx:lastx  firsty:lasty       IF testvar var   key_performance  EQ 2 THEN       print   temps tracecote: determiner mask xf yf  systime 1 tempdeux      if key_gridtype EQ  e  then onemore   xf 0  0  gT xf 0  1    We pass in normalized coordinates to be able to become independant from the projection s    type choosen and from the support on which we do the drawing  screen or postscript     z   convert_coord xf yf data to_normal      xf   reform z 0    nx  ny     yf   reform z 1    nx  ny     tempvar   SIZE TEMPORARY z      Beware  following the projection  some points x or y can become NaN  see point    behind the earth in an orthographic projection      We put points to be eliminated at a very big value so that they will not pass the    test with distanceseuil  see further       if  map projection LE 7 AND  map projection NE 0        OR  map projection EQ 14 OR  map projection EQ 15 OR  map projection EQ 18 then begin       ind   where finite xf yf  EQ 0        IF ind 0  NE  1 THEN BEGIN           xf ind    1e5          yf ind    1e5       ENDIF    ENDIF    ind   where xf LT  p position 0  OR xf GT  p position 2     IF ind 0  NE  1 THEN xf ind    1e5    ind   where yf LT  p position 1  OR yf GT  p position 3     IF ind 0  NE  1 THEN yf ind    1e5    tempvar   SIZE TEMPORARY ind    we delete ind      if n_elements key_gridtype  EQ 0 then key_gridtype    c     case key_gridtype of        c :drawcoast_c  mask  xf  yf  nx  ny  _extra   ex        e :drawcoast_e  mask  xf  yf  nx  ny  onemore   onemore  _extra   ex    endcase    if keyword_set key_performance  THEN print   temps tracecote  systime 1 tempsun    return end"); 
     336a[334] = new Array("./ToBeReviewed/TRIANGULATION/tracemask.html", "tracemask.pro", "", "             file_comments   Draw contours of a mask      categories   Utilities       param MASKENTREE  in required    2d array specifying the mask       param XIN  in required    2d array specifying longitude coordinates        param YIN  in required    2d array specifying latitude coordinates       keyword COAST_COLOR  default 0    The color of the coastline    Default is black  0       keyword COAST_THICK  default 1    The thick of the trait to trace continents      keyword OVERPLOT   To do a plot over an other one       keyword _EXTRA   used to pass your keywords      uses   common pro      history   Sebastien Masson  smasson lodyc jussieu fr       version    Id: tracemask pro 163 2006 08 29 12:59:46Z navarro             PRO tracemask  maskentree  xin  yin  COAST_COLOR   coast_color  COAST_THICK   coast_thick  OVERPLOT   overplot  _extra   ex       compile_opt idl2  strictarrsubs      if keyword_set overplot  then return    cm_general   IF NOT keyword_set key_forgetold  THEN BEGIN  updatekwd   ENDIF       tempsun   systime 1            For key_performance   We avoid edging problems:    tempdeux   systime 1           For key_performance  2    tailleentree   size maskentree     nx   tailleentree 1 1    ny   tailleentree 2 1   we check the input axis   IF n_elements xin  EQ 0 THEN xentree   findgen nx 1  ELSE xentree   xin   IF  size xentree 0  EQ 1 THEN xentree   xentree replicate 1 ny 1    IF n_elements yin  EQ 0 THEN yentree   findgen ny 1  ELSE yentree   yin   IF  size yentree 0  EQ 1 THEN yentree   replicate 1 nx 1 yentree   We enlarge the mask by 1 column to the left an d1 line to the bottom    mask   intarr tailleentree 1 1  tailleentree 2 1     mask 1:tailleentree 1  1:tailleentree 2    maskentree   The 2 first columns are identical     mask 0  1:tailleentree 2    maskentree 0      The 2 first lines are identical     mask 1:tailleentree 1  0    maskentree  0    We calculate the position following x of points which will serve to trace the mask  They are situated between each points of the mask  exept for the last column we can not calculate and so we put at max  x range     xrange    x range sort x range    if REVERSE_X is used    xentree    5 xentree shift xentree   1  0     IF not keyword_set overplot  THEN xentree nx 2      xrange 1       ELSE xentree nx 2      xentree nx 3      we sill    xentree   xrange 0    xentree  yentree   yrange 1     yf   fltarr nx  ny     yf 1:nx 1  1:ny 1    yentree    yf 0  1:ny 1    yentree 0       IF not keyword_set overplot  THEN BEGIN        if yinverse then yf  0    yrange 1  ELSE yf  0    yrange 0     ENDIF ELSE yentree  0    yentree  1       IF testvar var   key_performance  EQ 2 THEN       print   temps tracemask: determination du mask et des ses coordonnes  systime 1 tempdeux     We trace vertical segments:      tempdeux   systime 1           For key_performance  2    liste   where mask shift mask   1  0  EQ 1     IF liste 0  NE  1 THEN BEGIN   We recuperate lx and ly which are indexes in a 2d array of points given by list       ly   liste nx   lx   temporary liste nx ly       indice   where ly NE 0    We do not take points concernining    the first line because in this case  the point j 1 is not defined        if indice 0  NE  1 then begin          lx   lx indice    ly   ly temporary indice           IF testvar var   key_performance  EQ 2 THEN             print   temps tracemask: liste traits verticaux  systime 1 tempdeux          tempdeux   systime 1     For key_performance  2   loop on concerned points and drawing of the segment    comments: we use plots instead of plot because plots is faster           for pt   0L  n_elements lx 1 do BEGIN              i   lx pt    j   ly pt              plots   xf i  j 1  xf i  j   yf i  j 1  yf i  j                    color   coast_color  thick   coast_thick  _extra   ex             if pt LT 5 then begin             endif          endfor          IF testvar var   key_performance  EQ 2 THEN             print   temps tracemask: trace traits verticaux  systime 1 tempdeux       endif    ENDIF     We trace horizontal segments:      tempdeux   systime 1           For key_performance  2    liste   where mask shift mask  0   1  EQ 1     IF liste 0  NE  1 THEN BEGIN       ly   liste nx   lx   temporary liste nx ly       indice   where lx NE 0      We do not take point sof the first column        if indice 0  EQ  1 then return       lx   lx indice    ly   ly temporary indice        IF testvar var   key_performance  EQ 2 THEN          print   temps tracemask: liste traits horizontaux  systime 1 tempdeux       tempdeux   systime 1        For key_performance  2       for pt   0L  n_elements lx 1 do BEGIN           i   lx pt    j   ly pt           plots   xf i 1  j  xf i  j   yf i 1  j  yf i  j                 color   coast_color  thick   coast_thick  _extra   ex       endfor       IF testvar var   key_performance  EQ 2 THEN          print   temps tracemask: trace traits horizontaux  systime 1 tempdeux    endif        if keyword_set key_performance  THEN print   temps tracemask  systime 1 tempsun         return end     "); 
     337a[335] = new Array("./ToBeReviewed/TRIANGULATION/triangule.html", "triangule.pro", "", "     file_comments        categories        param MASKENTREE  in optional type 2d array    It is a 2d array which will serve to mask the field we will trace after with CONTOUR      TRIANGULATION triangule mask    If this argument is not specified  the function use tmask      keyword BASIC   Specify that the mask is on a basic grid  use the triangulation for vertical cuts and hovmoellers       keyword COINMONTE  type array    To obtain the array of  ascending land corner  to be treated with    completecointerre pro in the variable array instead of make it pass by the global    variable twin_corners_up       keyword COINDESCEND  type array    See COINMONTE      keyword _EXTRA   Used to pass your keywords      returns        uses        restrictions        examples        history        version    Id: triangule pro 163 2006 08 29 12:59:46Z navarro        todo   seb       FUNCTION triangule  maskentree  BASIC   basic  COINMONTE   coinmonte  COINDESCEND   coindescend  _extra   ex     compile_opt idl2  strictarrsubs    common     szmsk   size maskentree    IF szmsk 0  EQ 0 THEN BEGIN     nx   jpi     ny   jpj   ENDIF ELSE BEGIN      nx   szmsk 1      ny   szmsk 2    ENDELSE   IF nx EQ 1 OR ny EQ 1 THEN return   1     IF arg_present coinmonte  THEN coinmonte   1   IF arg_present coindescend  THEN coindescend   1      if keyword_set basic  then        return  triangule_c maskentree   BASIC  COINMONTE   coinmonte                              COINDESCEND   coindescend  _extra   ex       if n_elements key_gridtype  EQ 0 then key_gridtype    c     if n_elements maskentree  EQ 0 then maskentree   tmask    0     case key_gridtype of        e :res   triangule_e maskentree  _extra   ex         c :res   triangule_c maskentree  COINMONTE   coinmonte  COINDESCEND   coindescend  _extra   ex     endcase    return  res end"); 
     338a[336] = new Array("./ToBeReviewed/TRIANGULATION/triangule_c.html", "triangule_c.pro", "", "             file_comments   Construct the triangulation array      The idea is: construct a list of triangle which link points between them     This is automatically done by the function TRIANGULATE    Here:   we consider the fact that points are disposed on a grid  regular or not     but not unstructured  that is to say that points are written following a    rectangular matrix  A easy way to do triangles between all points is then:          for each point  i j  of the matrix  except those of the last line and of       the last column  we call rectangle  i j  the rectangle made of the four       points  i j   i 1 j   i j 1   i 1 j 1  To trace all triangle  we just       have to trace the 2 triangles contained in rectangles  i j      We notice that each rectangle  i j  have 2 diagonals  it is true  Make a   drawing to make sure  so there are two possible choice for each rectangle   we want to cut in 2 triangles       It is thanks to this choice that we will be able to trace coast with right   angles  At each angle of coast remarkable by the existence of an unique land   point or of an unique ocean point on one of the four summit of a rectangle  i j    we have to cut the rectangle following the diagonal passing by this point        categories   Graphics      param MASKENTREE  in optional type 2d array    It is a 2d array which will serve to mask the field we will trace after with CONTOUR      TRIANGULATION triangule mask    If this argument is not specified  the function use tmask      keyword BASIC   Specify that the mask is on a basic grid  use the triangulation for vertical cuts and hovmoellers       keyword KEEP_CONT   To keep the triangulation even on the continents      keyword COINMONTE  type array    To obtain the array of  ascending land corner  to be treated with    completecointerre pro in the variable array instead of make it pass by the global    variable twin_corners_up       keyword COINDESCEND  type array    See COINMONTE      returns   res: tableau 2d  3 nbre de triangles    Each line of res represent indexes of points constituting summits of a triangle     See how we trace triangles in definetri pro      uses   common pro   different pro   definetri pro      restrictions   Datas whose we want to do the contour must be disposed in a matrix     On the other hand  in the matrix  the points s arrangement can not be    irregular  If it is  use TRIANGULE       history   Sebastien Masson  smasson lodyc jussieu fr                          26 4 1999      version    Id: triangule_c pro 163 2006 08 29 12:59:46Z navarro        todo   seb L 267 268 je ne pense pas que ce soit ce que tu voulais dire mais    c est la traduction de ce qu il y avait  crit  Correction si besoin          FUNCTION triangule_c  maskentree  COINMONTE   coinmonte  COINDESCEND   coindescend  BASIC   basic  KEEP_CONT   keep_cont   compile_opt idl2  strictarrsubs   tempsun   systime 1               For key_performance    cm_4mesh IF NOT keyword_set key_forgetold  THEN BEGIN  updatenew ENDIF     Is the mask given or do we have to take tmask      msk   maskentree taille   size msk  nx   taille 1  ny   taille 2    IF n_elements keep_cont  EQ 0 THEN keep_cont   1 key_irregular   if keyword_set key_periodic nx EQ jpi      AND NOT keyword_set basic  then BEGIN      msk    msk  msk 0        nx   nx 1 ENDIF     We will find the list of rectangles  i j located by their left    bottom corner  we have to cut folowing a descendant diagonal     We will call this list : pts_downward    pts_downward   0    We construct the test which allow to find this triangle :             shift msk   0   1 shift msk   1   1                                                                                                                                                                                                            msk shift msk   1   0    sum1   msk shift msk   1  0 shift msk   1   1      points which surround the left top point  sum2   msk shift msk  0   1 shift msk   1   1      points which surround the right bottom point    tempdeux   systime 1              For key_performance  2   The left top land point surrounded by ocean points liste   where   4 sum1 1 shift msk  0   1  EQ 1   if liste 0  NE  1 THEN pts_downward    pts_downward liste     The left top ocean point surrounded by land points liste   where   1 sum1 shift msk  0   1  EQ 1  if liste 0  NE  1 THEN pts_downward    pts_downward liste     The right bottom land point surrounded by ocean points liste   where   4 sum2 1 shift msk   1   0  EQ 1  if liste 0  NE  1 THEN pts_downward    pts_downward liste     The right bottom ocean point surrounded by land points liste   where   1 sum2 shift msk   1   0  EQ 1  if liste 0  NE  1 THEN pts_downward    pts_downward liste   undefine  liste   IF testvar var   key_performance  EQ 2 THEN     print   temps triangule: trouver pts_downward  systime 1 tempdeux   if  NOT keyword_set basic  OR keyword_set coinmonte  OR keyword_set coindescend  then begin     tempdeux   systime 1          For key_performance  2  2 land points in ascendant diagonal with 2 ocean points in descendant diagonal      coinmont   where   1 msk 1 shift msk   1   1                           shift msk  0   1 shift msk   1   0  EQ 1        if coinmont 0  NE  1 THEN pts_downward    pts_downward  coinmont        IF testvar var   key_performance  EQ 2 THEN         print   temps triangule: trouver coinmont  systime 1 tempdeux     tempdeux   systime 1          pour key_performance  2       coindesc   where   1 shift msk   0   1 1 shift msk   1  0                            msk shift msk   1   1  EQ 1       2 land points in descendant diagonal with 2 ocean points in ascendant diagonal      IF testvar var   key_performance  EQ 2 THEN         print   temps triangule: trouver coindesc  systime 1 tempdeux   ENDIF   if n_elements pts_downward  EQ 1 then BEGIN      tempdeux   systime 1          For key_performance  2       triang   definetri nx  ny        IF testvar var   key_performance  EQ 2 THEN         print   temps triangule: definetri  systime 1 tempdeux     coinmont    1     coindesc    1 ENDIF ELSE BEGIN      tempdeux   systime 1          For key_performance  2     pts_downward   pts_downward 1:n_elements pts_downward 1      pts_downward   pts_downward uniq pts_downward  sort pts_downward    None rectangle can have an element of the last column or of the    last line as left bottom corner    so we have to remove these points if they has been selected in pts_downward      derniere_colonne    lindgen ny 1 nx 1      derniere_ligne   lindgen nx ny 1 nx      pts_downward  different pts_downward derniere_colonne       pts_downward  different pts_downward derniere_ligne       if  NOT keyword_set basic  OR keyword_set coinmonte  OR keyword_set coindescend  then begin         if coinmont 0  NE  1 then begin             coinmont  different coinmont derniere_colonne               coinmont  different coinmont derniere_ligne           endif         if coindesc 0  NE  1 then begin             coindesc  different coindesc derniere_colonne               coindesc  different coindesc derniere_ligne           endif     ENDIF ELSE BEGIN          coinmont    1         coindesc    1     ENDELSE      IF testvar var   key_performance  EQ 2 THEN         print   temps triangule: menage ds pts_downward coinmont et coindesc  systime 1 tempdeux       tempdeux   systime 1          For key_performance  2     if  pts_downward 0  EQ  1 then triang   definetri nx  ny        ELSE triang   definetri nx  ny  pts_downward      IF testvar var   key_performance  EQ 2 THEN         print   temps triangule: definetri  systime 1 tempdeux ENDELSE      We delete land points which only contain land points          if  NOT keyword_set basic  AND  NOT keyword_set keep_cont  then begin     tempdeux   systime 1          For key_performance  2   We delete rectangles which are entirely in the land      recdsterre   where 1 msk 1 shift msk   1  0 1 shift msk  0   1 1 shift msk   1   1  EQ 1      IF testvar var   key_performance  EQ 2 THEN         print   temps triangule: tous les recdsterre  systime 1 tempdeux    We do an other sort :   We have to do not remove rectangles which only have one common summit    t1   systime 1      indice   intarr nx  ny      trimask   intarr nx  ny      trimask 0:nx 2  0:ny 2    1     IF recdsterre 0  NE  1 then BEGIN          tempdeux   systime 1      For key_performance  2         indice recdsterre    1         if NOT keyword_set basic  then begin             vire1   0             vire2   0             while  vire1 0  NE  1 OR vire2 0  NE  1  ne 0 do begin   Delete rectangles we have to remove from recsterre  in fact those we have    to keep although they ar eentirely in the land                  vire1   where   indice shift indice   1   1                                     1 shift indice  0   1 1 shift indice   1  0 trimask  EQ 1                  if vire1 0  NE  1 THEN BEGIN                      indice vire1    0                 indice vire1 nx 1    0                 endif                                  vire2   where   1 indice 1 shift indice   1   1                                     shift indice  0   1 shift indice   1  0 trimask  EQ 1                  if vire2 0  NE  1 THEN BEGIN                      indice vire2 1    0                 indice vire2 nx    0                 endif             endwhile             IF testvar var   key_performance  EQ 2 THEN                 print   temps triangule: trier les recdsterre  systime 1 tempdeux         endif         indice  ny 1    1       The last column and the last line         indice nx 1      1       can not define any rectangle            tempdeux   systime 1      For key_performance  2         recgarde   where indice EQ 0    We recuperate numbers of triangles we will keep          trigarde   2 recgarde recgarde nx          trigarde   transpose temporary trigarde          trigarde    trigarde  trigarde 1             triang   triang  temporary trigarde          IF testvar var   key_performance  EQ 2 THEN             print   temps triangule: virer les triangle de la liste  systime 1 tempdeux     endif endif   print   temps tri triangles  systime 1 t1      When key_periodic equal 1  triang is a list of indexes s array which    have a surplus column    We have to put it back to the initial matrix by putting indexes of    the last column equal to these of the last column    tempdeux   systime 1              For key_performance  2 if keyword_set key_periodic nx 1 EQ jpi      AND NOT keyword_set basic  then BEGIN      indicey   triang nx     indicex   triang indicey nx     nx   nx 1     liste   where indicex EQ nx      if liste 0  NE  1 then indicex liste    0     triang   indicex nx indicey     nx   nx 1     if coinmont 0  NE  1 then begin         indicey   coinmont nx         indicex   coinmont indicey nx         nx   nx 1         liste   where indicex EQ nx          if liste 0  NE  1 THEN indicex liste    0         coinmont   indicex nx indicey         nx   nx 1     endif     if coindesc 0  NE  1 then begin         indicey   coindesc nx         indicex   coindesc indicey nx         nx   nx 1         liste   where indicex EQ nx          if liste 0  NE  1 THEN indicex liste    0         coindesc   indicex nx indicey         nx   nx 1     endif endif IF testvar var   key_performance  EQ 2 THEN     print   temps triangule: finitions  systime 1 tempdeux    if keyword_set coinmonte  THEN coinmonte   coinmont ELSE twin_corners_up   coinmont if keyword_set coindescend  THEN coindescend   coindesc ELSE twin_corners_dn   coindesc   IF NOT keyword_set key_forgetold  THEN BEGIN     updateold ENDIF   IF keyword_set key_performance  THEN print   temps triangule  systime 1 tempsun   return  triang  END "); 
     339a[337] = new Array("./ToBeReviewed/TRIANGULATION/triangule_e.html", "triangule_e.pro", "", "           file_comments   Build the triangulation for a E grid type      categories   Graphics       param MASKENTREE  in optional type 2d array    It is a 2d array which will serve to mask the field we will trace after with CONTOUR      TRIANGULATION triangule mask    If this argument is not specified  the function use tmask       keyword BASIC   Specify that the mask is on a basic grid  use the triangulation for vertical cuts and hovmoellers        keyword COINMONTE  type array     To obtain the array of  ascending land corner  to be treated with    completecointerre pro in the variable array instead of make it pass by the global    variable twin_corners_up       keyword COINDESCEND  type array    See COINMONTE      keyword SHIFTED       uses   common pro       history   Sebastien Masson  smasson lodyc jussieu fr                         june 2001       version     Id: triangule_e pro 163 2006 08 29 12:59:46Z navarro         todo   seb L 152 153 je ne pense pas que ce soit ce que tu voulais dire mais    c est la traduction de ce qu il y avait  crit  Correction si besoin          FUNCTION triangule_e  maskentree  COINMONTE   coinmonte  COINDESCEND   coindescend                       SHIFTED   shifted  BASIC   basic       compile_opt idl2  strictarrsubs    cm_4mesh   IF NOT keyword_set key_forgetold  THEN BEGIN  updatenew   ENDIF      tempsun   systime 1            For key_performance     Is the mask given or do we have to take tmask         msk   maskentree    sizem   size msk     nx   sizem 1     ny   sizem 2       if keyword_set key_periodic nx EQ jpi        AND NOT keyword_set basic  then BEGIN        msk    msk  msk 0          nx   nx 1    ENDIF     we will find the diamond that must be cut in two triangle using the   horizontal diagonal       index   lindgen nx  ny     index   index 0:nx 2  1:ny 2     if n_elements shifted  EQ 0 then shifted   1    oddeven    index nx 1 shifted  MOD 2    msk1   msk index     msk2   msk index 1     sum   msk index nx oddeven msk index nx oddeven     sum1   msk2 sum    sum2   msk1 sum     horizontal      singularpoint   where msk1 EQ 0 AND sum1 EQ 3  OR  msk1 EQ 1 AND sum1 EQ 0                             OR  msk2 EQ 0 AND sum2 EQ 3  OR  msk2 EQ 1 AND sum2 EQ 0                             OR  sum EQ 0 AND  msk1 msk2  EQ 2       if singularpoint 0  NE  1 then begin       horizontal   index singularpoint        triang   definetri_e nx  ny  horizontal  SHIFTED   shifted     ENDIF ELSE triang   definetri_e nx  ny  SHIFTED   shifted       coinmont   index where sum EQ 2 AND  msk1 msk2  EQ 0       coindesc   index where sum EQ 0 AND  msk1 msk2  EQ 2      we keep only the triangles which are outside the land   but for some reasons we will in fact delete the land diamond        allrecinland   where sum1 msk1 EQ 0       indexallinland   index allrecinland       otherrec    lindgen nx  ny 0:nx 2  1:ny 2       otherrec   different otherrec  indexallinland           index   lindgen nx  ny       index   index 0:nx 3  2:ny 3       out   inter index  indexallinland       IF out 0  NE  1 THEN begin         out   inter out 1  indexallinland          IF out 0  NE  1 THEN begin            out   out 1            oddeven    out nx 1 shifted  MOD 2            out   inter out nx oddeven  otherrec             IF out 0  NE  1 THEN begin               out   inter out 2 nx  otherrec                IF out 0  NE  1 THEN begin                  out   out nx out nx shifted  MOD 2                endif            endif         endif      ENDIF      help   out          index   lindgen nx  ny       index   index 0:nx 3  2:ny 3       out   inter index  otherrec       IF out 0  NE  1 THEN begin         out   inter out 1  otherrec          IF out 0  NE  1 THEN begin            out   out 1            oddeven    out nx 1 shifted  MOD 2            out   inter out nx oddeven  indexallinland             IF out 0  NE  1 THEN begin               out   inter out 2 nx  indexallinland                IF out 0  NE  1 THEN begin                  out   out nx out nx shifted  MOD 2                endif            endif         endif      endif      help   out          IF out 0  EQ  1 THEN out   different indexallinland  out  ELSE out   indexallinland      triout   numtri out  nx  ny       triout    triout  triout 1       goodtri   lindgen 2 nx 1 ny 1       goodtri   different goodtri  triout       triang   triang  temporary goodtri           When key_periodic equal 1  triang is a list of indexes s array which    have a surplus column    We have to put it back to the initial matrix by putting indexes of    the last column equal to these of the last column       tempdeux   systime 1           For key_performance  2    if keyword_set key_periodic nx 1 EQ jpi        AND NOT keyword_set basic  then BEGIN        indicey   triang nx       indicex   triang indicey nx       nx   nx 1       liste   where indicex EQ nx        if liste 0  NE  1 then indicex liste    0       triang   indicex nx indicey       nx   nx 1         if coinmont 0  NE  1 then begin            indicey   coinmont nx            indicex   coinmont indicey nx            nx   nx 1            liste   where indicex EQ nx             if liste 0  NE  1 THEN indicex liste    0            coinmont   indicex nx indicey            nx   nx 1         endif         if coindesc 0  NE  1 then begin            indicey   coindesc nx            indicex   coindesc indicey nx            nx   nx 1            liste   where indicex EQ nx             if liste 0  NE  1 THEN indicex liste    0            coindesc   indicex nx indicey            nx   nx 1         endif    endif    IF testvar var   key_performance  EQ 2 THEN       print   temps triangule: finitions  systime 1 tempdeux        if arg_present coinmonte  THEN coinmonte   coinmont ELSE twin_corners_up   coinmont     if arg_present coindescend  THEN coindescend   coindesc ELSE twin_corners_dn   coindesc     IF NOT keyword_set key_forgetold  THEN BEGIN      updateold    ENDIF        IF keyword_set key_performance  THEN print   temps triangule  systime 1 tempsun      return  triang  END "); 
     340a[338] = new Array("./ToBeReviewed/UTILITAIRE/get_extra.html", "get_extra.pro", "", "     todo    seb       elle fait quoi      elle permet :      soit de creer une variable extra contenant les mots clefs que tu   desires      soit de completer une variable extra avec des mots clefs que tu   rajoutes     imagine :    tu es dans une routine et tu veux passer un mot clef en extra car la   routine que tu appelles ne le connait pas mais la routine suivante oui    tu fais     extra get_extra ok  year 1999  age_capitaine 35      et tu obtiens la bonne variable extra  fait un help extra struc     ou alors  tu completes un extra existant :    extra get_extra _extra extra  name Guillaume     FUNCTION get_extra  _extra   extra     compile_opt idl2  strictarrsubs       return  extra END "); 
     341a[339] = new Array("./ToBeReviewed/UTILITAIRE/oups.html", "oups.pro", "", ""); 
     342a[340] = new Array("./ToBeReviewed/UTILITAIRE/vzoom.html", "vzoom.pro", "", ""); 
     343a[341] = new Array("./ToBeReviewed/WIDGET/AUTOUR_de_XXX/buildcmd.html", "buildcmd.pro", "", "             file_comments   This function send back a string which contain the reading command    and drawing s parameters       param BASE  in required       keyword BOXZOOM   Vector indicating the geographic zone on which we want to cut the map     If BOXZOOM has :      1 element : The extraction is made on  lon1  lon2  lat1  lat2  0 boxzoom 0      2 elements: The extraction is made on  lon1  lon2  lat1  lat2  boxzoom 0 boxzoom 1      4 elements: The extraction is made on  Boxzoom  0  max gdept  gdepw      5 elements: The extraction is made on  Boxzoom 0:3  0  Boxzoom 4      6 elements: The extraction is made on Boxzoom    Where lon1  lon2 lat1 lat2 are global variables defined at the last domdef       keyword FORCETYPE      history   Sebastien Masson  smasson lodyc jussieu fr       version    Id: buildcmd pro 172 2006 09 11 07:11:26Z smasson        todo   seb: documenter le param BASE et le keyword FORCETYPE           FUNCTION buildcmd  base  BOXZOOM   boxzoom  FORCETYPE   forcetype       we get back the ids of the widget parts       compile_opt idl2  strictarrsubs     txtcmdid   widget_info base  find_by_uname    txtcmd    domainid   widget_info base  find_by_uname    domain    actionid   widget_info base  find_by_uname    action      optionid   widget_info base  find_by_uname    option      widget_control  base  get_uvalue   top_uvalue   smallin   extractatt top_uvalue   smallin    numdessinin   smallin 2 1   smallout   extractatt top_uvalue   smallout    numdessinout   smallout 2 1     options   extractatt top_uvalue   options       optionsflag   extractatt top_uvalue   optionsflag    portrait    strtrim optionsflag where options EQ  Portrait Landscape  0  1 0        We determinate which procedure we will call to do the drawing and the type     IF keyword_set forcetype  THEN type   forcetype     ELSE type   widget_info actionid   combobox_gettext    case type of      pltz diag up :procedure    pltz       pltz diag dn :procedure    pltz       pltt diag up :procedure    pltt       pltt diag dn :procedure    pltt       xy :procedure    plt       xz :procedure    pltz       yz :procedure    pltz       xt :procedure    pltt       yt :procedure    pltt       zt :procedure    pltt       x :procedure    plt1d       y :procedure    plt1d       z :procedure    plt1d       t :procedure    pltt      ELSE:procedure   type   endcase      Search of options     options   extractatt top_uvalue   options       optionsflag   extractatt top_uvalue   optionsflag    flags   optionsflag  numdessinin    xindex    flags where options EQ  Longitude   x index 0    yindex    flags where options EQ  Latitude   y index 0    drawvecteur    flags where options EQ  Vecteur 0 procedure eq  plt    drawover    flags where options EQ  Overlay 0      alreadyread   extractatt top_uvalue   alreadyread    alreadyvector   extractatt top_uvalue   alreadyvector    alreadyover   extractatt top_uvalue   alreadyoer    What must we read     case 1 of     alreadyover NE  1:BEGIN       toread   alreadyover 1       readswitch    over      END     alreadyvector NE  1 AND alreadyvector NE  pi:BEGIN       toread   alreadyvector 1       readswitch    vector      END     alreadyread NE  1 AND alreadyread NE  pi AND alreadyread NE 2 pi:BEGIN       toread   alreadyread 1       readswitch    classic      END     else:BEGIN       case 1 of         alreadyvector eq  pi:BEGIN           toread   alreadyover 1           readswitch    over          END         alreadyread EQ  pi:BEGIN           toread   alreadyvector 1           readswitch    vector          END         alreadyread EQ 2 pi:BEGIN           toread   alreadyover 1           readswitch    over          END         ELSE:BEGIN           toread   alreadyread 1           readswitch    classic          END       endcase     END   ENDCASE     widget_control  txtcmdid  get_value   widcmd   widcmd    strtrim widcmd  2    IF widcmd 0  EQ   THEN widcmd    zzz       cutcmd  widcmd 0  toread  numberofread  prefix  nameexp  ending     readcmd   buildreadcmd base   nameexp  procedure  type                              BOXZOOM   boxzoom  complete   readswitch EQ  classic  AND alreadyread EQ  1    we look for the line containing funclec_name   currentfile   extractatt top_uvalue   currentfile    readparameters    extractatt top_uvalue   readparameters currentfile    i   0   while strpos readcmd i  readparameters funclec_name     EQ  1 do i   i 1              case readswitch of      classic :BEGIN       if alreadyread 1 EQ 0 then BEGIN   we start the reading command         readcmd     beginning of reading the field to draw  readcmd          readcmd i 1     field       prefix   readcmd i 1        ENDIF ELSE BEGIN   we complet the reading command         oldrdcmd   extractatt top_uvalue   currentreadcmd          nl   n_elements oldrdcmd           oldrdcmd nl 1    oldrdcmd nl 1                readcmd i    prefix   readcmd i          readcmd    temporary oldrdcmd  temporary readcmd        ENDELSE   exit if we have to read other fields        if alreadyread 1 NE numberofread 1 THEN BEGIN           top_uvalue 1  findline top_uvalue   currentreadcmd    readcmd          top_uvalue 1  findline top_uvalue   alreadyread    alreadyread 1          top_uvalue 1  findline top_uvalue   noticebase    xnotice Select the field number  strtrim alreadyread 3  1          return           ENDIF   we finalize the reading command       IF ending NE   THEN BEGIN          nl   n_elements readcmd           readcmd nl 1    readcmd nl 1                readcmd    temporary readcmd  ending        ENDIF       readcmd    temporary readcmd                        field   create_struct arr:temporary field  grid:vargrid  unit:varunit  experiment:varexp  name:varname                         end of reading the field to draw      we get back _EXTRA:       extra   extractatt top_uvalue   extra        if xindex NE 0 then extra   create_struct extra   xindex  xindex        if yindex NE 0 then extra   create_struct extra   yindex  yindex        exextra   cw_specifie_get_value base        tgnm   strlowcase tag_names exextra        indtmp   where tgnm EQ  box  OR tgnm EQ  boxzoom  cnt        IF cnt EQ 1 THEN BEGIN          boxextra   exextra indtmp 0          exextra   extractstru exextra   box   boxzoom        ENDIF        extra    mixstru exextra  extra        sextra   struct2string extra        readcmd    temporary readcmd   extra    sextra           top_uvalue 1  findline top_uvalue   currentreadcmd    readcmd       case 1 of         drawvecteur:BEGIN   we have to read the vectors            top_uvalue 1  findline top_uvalue   alreadyread     pi            top_uvalue 1  findline top_uvalue   noticebase    xnotice Select the zonal component of vector            return             END         drawover:BEGIN   we have to read the field to overlay             top_uvalue 1  findline top_uvalue   alreadyread    2 pi            top_uvalue 1  findline top_uvalue   noticebase    xnotice Select the field to overlay            return             END   finished  we draw the plot          ELSE: top_uvalue 1  findline top_uvalue   alreadyread     1       endcase     END      vector :BEGIN   for the vectors  there is 2 components  we read u when alreadyvector   is a interger and v when alreadyvector is a interger 0 5       if floor alreadyvector 1 EQ 0 then begin         if floor alreadyvector  EQ alreadyvector then begin           readcmd     beginning of reading the zonal component of vector  readcmd            readcmd i 1     fieldu       prefix   readcmd i 1          ENDIF ELSE BEGIN           readcmd     beginning of reading the meridional component of vector  readcmd            readcmd i 1     fieldv       prefix   readcmd i 1          ENDELSE         readcmd    extractatt top_uvalue   currentreadcmd  temporary readcmd        ENDIF ELSE BEGIN         oldrdcmd   extractatt top_uvalue   currentreadcmd          nl   n_elements oldrdcmd           oldrdcmd nl 1    oldrdcmd nl 1                readcmd i    prefix   readcmd i          readcmd    temporary oldrdcmd  temporary readcmd        ENDELSE         case alreadyvector 1 of         numberofread 1:BEGIN   we finalize the reading command           IF ending NE   THEN BEGIN              nl   n_elements readcmd               readcmd nl 1    readcmd nl 1                    readcmd    temporary readcmd  ending            ENDIF           readcmd    temporary readcmd                            fieldu   create_struct arr:temporary fieldu  grid:vargrid  unit:varunit  experiment:varexp  name:varname                             end of reading the zonal component of vector               top_uvalue 1  findline top_uvalue   currentreadcmd    readcmd   we finished zonal component reading    we know switch to meridional component             top_uvalue 1  findline top_uvalue   alreadyvector     5            top_uvalue 1  findline top_uvalue   noticebase    xnotice Select the meridional component of vector            return             END         numberofread 0 5:BEGIN   we finalize the reading command           IF ending NE   THEN BEGIN              nl   n_elements readcmd               readcmd nl 1    readcmd nl 1                    readcmd    temporary readcmd  ending            ENDIF           readcmd    temporary readcmd                             fieldv   create_struct arr:temporary fieldv  grid:vargrid  unit:varunit  experiment:varexp  name:varname                             end of reading the meridional component of vector      we finished meridional component reading      we get back _EXTRA of the vector and we complet extra already build           extra   extractatt top_uvalue   extra            exextra   cw_specifie_get_value base            extra    mixstru exextra  extra            sextra   struct2string extra            readcmd    readcmd   vectorextra    sextra   extra mixstru extra vectorextra               top_uvalue 1  findline top_uvalue   currentreadcmd    readcmd             if drawover then BEGIN   shall we do an overlay               top_uvalue 1  findline top_uvalue   alreadyvector     pi              top_uvalue 1  findline top_uvalue   noticebase    xnotice Select the field to overlay              return               ENDIF ELSE BEGIN   it is done know               top_uvalue 1  findline top_uvalue   alreadyread     1              top_uvalue 1  findline top_uvalue   alreadyvector     1           ENDELSE         END         ELSE:BEGIN   we still need to read some vector components             top_uvalue 1  findline top_uvalue   currentreadcmd    readcmd            top_uvalue 1  findline top_uvalue   alreadyvector    alreadyvector 1           if floor alreadyvector  EQ alreadyvector then text     zonal               ELSE text     meridional              top_uvalue 1  findline top_uvalue   noticebase    xnotice Select the  strtrim floor alreadyread 3  1 text component of vector            return             END       endcase     END      over :BEGIN       if alreadyover 1 EQ 0 then begin   we start the reading          readcmd     beginning of reading the field to overdraw  readcmd          readcmd i 1     fieldover     prefix  readcmd i 1          readcmd    extractatt top_uvalue   currentreadcmd  temporary readcmd        ENDIF ELSE BEGIN         oldrdcmd   extractatt top_uvalue   currentreadcmd          nl   n_elements oldrdcmd           oldrdcmd nl 1    oldrdcmd nl 1                readcmd i    prefix   readcmd i          readcmd    temporary oldrdcmd  temporary readcmd        ENDELSE         if alreadyover 1 NE numberofread 1 THEN BEGIN    we still need to read some files           top_uvalue 1  findline top_uvalue   currentreadcmd    readcmd          top_uvalue 1  findline top_uvalue   alreadyover    alreadyover 1          top_uvalue 1  findline top_uvalue   noticebase    xnotice Select the field number  strtrim alreadyover 3  1  to overlay          return           ENDIF   we finalize the reading command       IF ending NE   THEN BEGIN          nl   n_elements readcmd           readcmd nl 1    readcmd nl 1                readcmd    temporary readcmd  ending        ENDIF   on finalise la commande de lecture       readcmd    readcmd                       fieldover   create_struct arr:temporary fieldover  grid:vargrid  unit:varunit  experiment:varexp  name:varname                         end of reading the field to overdraw      we get back _EXTRA of over and we complet extra already build       extra   extractatt top_uvalue   extra        exextra   cw_specifie_get_value base        extra    mixstru exextra  extra        sextra   struct2string extra        readcmd    readcmd   overextra    sextra   extra mixstru extra overextra           top_uvalue 1  findline top_uvalue   currentreadcmd    readcmd   we reinitialize        top_uvalue 1  findline top_uvalue   alreadyread     1        top_uvalue 1  findline top_uvalue   alreadyvector     1        top_uvalue 1  findline top_uvalue   alreadyover     1     END   endcase                   determination of the boxzoom s name    if NOT keyword_set boxzoom  then widget_control  domainid  get_value   boxzoom   CASE n_elements boxextra  OF     0:     1:boxzoom 5    boxextra     2:boxzoom 4:5    boxextra     4:boxzoom 0:3    boxextra     5:boxzoom    boxextra 0:3  0  boxextra 4      6:boxzoom   boxextra   ENDCASE   Writting of this one as a string   box    strtrim boxzoom 0  1    for i   1   n_elements boxzoom 1   pmax  1      ENDELSE   endif   box   box    IF strpos type    diag up  NE  1 THEN BEGIN     sendpoints       strtrim boxzoom 0  1          strtrim boxzoom 2  1                            strtrim boxzoom 1  1          strtrim boxzoom 3  1        ENDIF   IF strpos type    diag dn  NE  1 THEN BEGIN     sendpoints       strtrim boxzoom 0  1          strtrim boxzoom 3  1                            strtrim boxzoom 1  1          strtrim boxzoom 2  1        ENDIF     We determinate typein       IF strpos type    diag   NE  1 THEN typein    strmid type  0  4        ELSE typein    type        determination of small     ssmall   tostr smallout      We will define the string which will contain the command to be executed by widgetdessine pro     Cmd    readCmd  procedure    field                       boxzoom    box   findalways  typein typein  small ssmall      IF drawvecteur then Cmd    Cmd         vecteur    u: fieldu v: fieldv      IF drawover then Cmd    Cmd         contour   fieldover     IF n_elements sendpoints  NE 0 then Cmd    Cmd         endpoints       sendpoints         Cmd    Cmd         _extra  mixstru ex  extra  portrait       portrait     NOERASE noerase        print         for i   0  n_elements Cmd 1 do print  Cmd i       print        We complete and or update the structure top_uvalue       top_uvalue 1  findline top_uvalue   nameprocedures numdessinout    procedure    top_uvalue 1  findline top_uvalue   types numdessinout    type    top_uvalue 1  findline top_uvalue   domaines  numdessinout    boxzoom    top_uvalue 1  findline top_uvalue   txtcmd numdessinout    widcmd    top_uvalue 1  findline top_uvalue   optionsflag  numdessinout    flags    top_uvalue 1  findline top_uvalue   exextra numdessinout    extra     return  Cmd end  "); 
     344a[342] = new Array("./ToBeReviewed/WIDGET/AUTOUR_de_XXX/buildreadcmd.html", "buildreadcmd.pro", "", "        param BASE  in required     The id of the widget where apply the drawing       param SNAMEEXP  in required         param PROCEDURE  in required         param TYPE  in required          keyword BOXZOOM   Vector indicating the geographic zone on which we want to cut the map     If BOXZOOM has :      1 element : The extraction is made on  lon1  lon2  lat1  lat2  0 boxzoom 0      2 elements: The extraction is made on  lon1  lon2  lat1  lat2  boxzoom 0 boxzoom 1      4 elements: The extraction is made on  Boxzoom  0  max gdept  gdepw      5 elements: The extraction is made on  Boxzoom 0:3  0  Boxzoom 4      6 elements: The extraction is made on Boxzoom    Where lon1  lon2 lat1 lat2 are global variables defined at the last domdef       keyword COMPLETE          keyword NAMEFIELD        uses   common pro       history   Sebastien Masson  smasson lodyc jussieu fr        version     Id: buildreadcmd pro 172 2006 09 11 07:11:26Z smasson        todo   seb: documenter les param et les keyword qui ne le sont pas      FUNCTION buildreadcmd  base  snameexp  procedure  type  BOXZOOM   boxzoom                            COMPLETE   complete  NAMEFIELD   namefield       compile_opt idl2  strictarrsubs    cm_4cal   for key_caltype     get back widgets IDs     vlstid   widget_info base  find_by_uname    varlist    date1id   widget_info base  find_by_uname    calendar1    date2id   widget_info base  find_by_uname    calendar2    domainid   widget_info base  find_by_uname    domain      optionid   widget_info base  find_by_uname    option      widget_control  base  get_uvalue   top_uvalue   numdessinin    extractatt top_uvalue   smallin 2 1   numdessinout    extractatt top_uvalue   smallout 2 1     name of the file     currentfile   extractatt top_uvalue   currentfile    filelist   extractatt top_uvalue   filelist    filename   filelist currentfile    sfilename    filename      name of the variable     if keyword_set namefield  then namevar   namefield     ELSE namevar   widget_info vlstid   combobox_gettext    snamevar    namevar      get the options     options   extractatt top_uvalue   options       flags   extractatt top_uvalue   optionsflag    flags   flags  numdessinin    xindex    flags where options EQ  Longitude   x index 0    yindex    flags where options EQ  Latitude   y index 0      extra   extractatt top_uvalue   extra    if xindex NE 0 then extra   create_struct extra   xindex  xindex    if yindex NE 0 then extra   create_struct extra   yindex  yindex    exextra   cw_specifie_get_value base    tgnm   strlowcase tag_names exextra    indtmp   where tgnm EQ  box  OR tgnm EQ  boxzoom  cnt    IF cnt EQ 1 THEN boxextra   exextra indtmp 0    exextra   extractstru exextra   min   max   inter   lct   box   boxzoom    if size exextra   type  EQ 8 then extra   mixstru exextra  extra    sextra   struct2string extra      find date1 and date2     key_caltype    extractatt top_uvalue   fileparameters currentfile caltype   widget_control  date1id  get_value   date1   widget_control  date2id  get_value   date2    if procedure EQ  pltt  AND date1 EQ date2 then BEGIN   we redefine the dates to the begining and end of the calendar     calendar    extractatt top_uvalue   fileparameters currentfile time_counter     date1   jul2date calendar 0      date2   jul2date calendar n_elements calendar 1      widget_control  date1id  set_value   date1     widget_control  date2id  set_value   date2   endif     fakecal    extractatt top_uvalue   fileparameters currentfile fakecal   IF keyword_set fakecal  THEN BEGIN     date1   date2jul date1    fakecal     date2   date2jul date2    fakecal   ENDIF   sdate1   strtrim date1  1    sdate2   strtrim date2  1      find boxzoom     if NOT keyword_set boxzoom  then widget_control  domainid  get_value   boxzoom   CASE n_elements boxextra  OF     0:     1:boxzoom 5    boxextra     2:boxzoom 4:5    boxextra     4:boxzoom 0:3    boxextra     5:boxzoom    boxextra 0:3  0  boxextra 4      6:boxzoom   boxextra   ENDCASE   put boxzoom into a string   box    strtrim boxzoom 0  1    for i   1   n_elements boxzoom 1     3 2 strpos type   z  EQ  1  do        box   box   strtrim boxzoom i  1    if strpos type   z  NE  1 then BEGIN        cm_4mesh       min   min gdept  gdepw  boxzoom 4:5  max   max        box   box strtrim floor min  1 strtrim ceil max  1      endif   box   box    IF strpos type    diag up  NE  1 THEN BEGIN     sendpoints       strtrim boxzoom 0  1          strtrim boxzoom 2  1                            strtrim boxzoom 1  1          strtrim boxzoom 3  1        ENDIF   IF strpos type    diag dn  NE  1 THEN BEGIN     sendpoints       strtrim boxzoom 0  1          strtrim boxzoom 3  1                            strtrim boxzoom 1  1          strtrim boxzoom 2  1        ENDIF     find funclec_name  readparameters  meshparameters     readparameters    extractatt top_uvalue   readparameters currentfile    funclec_name   readparameters funclec_name   if keyword_set complete  then begin     sreadparameters   struct2string readparameters      meshparameters    extractatt top_uvalue   meshparameters currentfile      smeshparameters   struct2string meshparameters          We will define the string which will contain the command to be executed for the reading        Cmd     Definition of extra structure:   extra    sextra                  Definition of readparameters structure:   readparameters    sreadparameters                  Do we change of reading :   dummy   changeread readparameters                   Definition of meshparameters structure:   meshparameters    smeshparameters                  Do we change the grid :   dummy   changegrid meshparameters                   Read the data                  if n_elements date1in  ne 0 then date1   date1in else date1       sdate1                 if n_elements date2in  ne 0 then date2   date2in else date2       sdate2                funclec_name snamevar  date1  date2   snameexp                  timestep    strtrim keyword_set fakecal  1  parent    strtrim base  2                          boxzoom    box   findalways                         filename    sfilename        if n_elements sendpoints  NE 0 then          Cmd    Cmd         endpoints       sendpoints     type       type            Cmd    Cmd         _extra   mixstru ex  extra   nostruct       top_uvalue 1  findline top_uvalue   varinfo  numdessinout     filename  namevar       top_uvalue 1  findline top_uvalue   dates  numdessinout     date1  date2    ENDIF ELSE BEGIN     Cmd    funclec_name snamevar   sdate1   sdate2   snameexp                  timestep    strtrim keyword_set fakecal  1  parent    strtrim base  1                          boxzoom    box   findalways                         filename    sfilename        if n_elements sendpoints  NE 0 then          Cmd    Cmd         endpoints       sendpoints     type       type            Cmd    Cmd         _extra   mixstru ex  extra   nostruct    ENDELSE      print   ::::::::::::::::::::::       for i   0  n_elements Cmd 1 do print  Cmd i       print   ::::::::::::::::::::::         return  cmd end"); 
     345a[343] = new Array("./ToBeReviewed/WIDGET/AUTOUR_de_XXX/changefield.html", "changefield.pro", "", "     file_comments        categories         param BASE  in required    The id of the widget where apply the drawing       param NEWFIELDNAME         keyword BOXZOOM   Vector indicating the geographic zone on which we want to cut the map     If BOXZOOM has :      1 element : The extraction is made on  lon1  lon2  lat1  lat2  0 boxzoom 0      2 elements: The extraction is made on  lon1  lon2  lat1  lat2  boxzoom 0 boxzoom 1      4 elements: The extraction is made on  Boxzoom  0  max gdept  gdepw      5 elements: The extraction is made on  Boxzoom 0:3  0  Boxzoom 4      6 elements: The extraction is made on Boxzoom    Where lon1  lon2 lat1 lat2 are global variables defined at the last domdef        returns          uses          restrictions          examples          history          version     Id: changefield pro 150 2006 08 09 10:12:54Z navarro        todo   seb     PRO changefield  base  newfieldname  BOXZOOM   boxzoom       compile_opt idl2  strictarrsubs     widget_control  base  get_uvalue   top_uvalue     Change exextra :   exextra   definedefaultextra newfieldname    specifieid   widget_info base  find_by_uname    specifie    widget_control  specifieid  set_value   exextra   Change the variable   Do we need to change the vertical axis   according to the tye of points  T or W    dthlv1id   widget_info base  find_by_uname    dthlv1    widget_control  dthlv1id  get_uvalue   dthlv1_uval   oldzgridt   dthlv1_uval grid_t   get the type of point   currentfile   extractatt top_uvalue   currentfile    listgrid    extractatt top_uvalue   fileparameters currentfile listgrid   listvar    extractatt top_uvalue   fileparameters currentfile listvar     for i   0   n_elements listvar 1 do print   listvar i    listgrid i    indexvar   where listvar EQ newfieldname    indexvar   0   indexvar 0    zgridt   strupcase listgrid indexvar  NE  W    if we change the type of point   if zgridt NE oldzgridt then BEGIN   update dthlv1_uval grid_t     dthlv1_uval grid_t   zgridt     widget_control  dthlv1id  set_uvalue   dthlv1_uval   update cw_domain     if NOT keyword_set boxzoom  THEN          widget_control  widget_info base  find_by_uname    domain  get_value   boxzoom     widget_control  widget_info base  find_by_uname    domain  set_value   boxzoom   endif     return end"); 
     346a[344] = new Array("./ToBeReviewed/WIDGET/AUTOUR_de_XXX/changefile.html", "changefile.pro", "", "     file_comments        categories         param BASE  in required    The id of the widget where apply the drawing       param NEWFILENAME         keyword BOXZOOM   Vector indicating the geographic zone on which we want to cut the map     If BOXZOOM has :      1 element : The extraction is made on  lon1  lon2  lat1  lat2  0 boxzoom 0      2 elements: The extraction is made on  lon1  lon2  lat1  lat2  boxzoom 0 boxzoom 1      4 elements: The extraction is made on  Boxzoom  0  max gdept  gdepw      5 elements: The extraction is made on  Boxzoom 0:3  0  Boxzoom 4      6 elements: The extraction is made on Boxzoom    Where lon1  lon2 lat1 lat2 are global variables defined at the last domdef        keyword DATE1       keyword DATE2      keyword FIELDNAME          returns          uses          restrictions          examples          history          version     Id: changefile pro 150 2006 08 09 10:12:54Z navarro        todo   seb     PRO changefile  base  newfilename  BOXZOOM   boxzoom  DATE1   date1  DATE2   date2  FIELDNAME   fieldname       compile_opt idl2  strictarrsubs     widget_control  base   hourglass   widget_control  base  get_uvalue   top_uvalue   filelist   extractatt top_uvalue   filelist    IF size newfilename   type  EQ 7 THEN newfile    where filelist EQ newfilename 0      ELSE newfile   newfilename      it is already the index of the new file   if newfile EQ  1 then begin     nothing   report invalid filename      return   endif   oldfile   extractatt top_uvalue   currentfile    oldfilename   filelist oldfile     did we really change the file    if oldfile EQ newfile AND NOT  keyword_set BOXZOOM  OR keyword_set DATE1  OR keyword_set DATE2  OR keyword_set FIELDNAME  then return      widget_control  base  update   0       we update currentfile element of the top_uvalue      top_uvalue 1  findline top_uvalue   currentfile    newfile     Calendar     oldcalendar    extractatt top_uvalue   fileparameters oldfile time_counter   newcalendar    extractatt top_uvalue   fileparameters newfile time_counter   Did we change the calendar    if array_equal oldcalendar  newcalendar  NE 1 then begin  cm_4cal    for key_caltype     key_caltype    extractatt top_uvalue   fileparameters newfile caltype   fake or real calendar      fakecal    extractatt top_uvalue   fileparameters newfile fakecal   Which dates were selected          date1id   widget_info base  find_by_uname    calendar1      if NOT keyword_set date1  then widget_control  date1id  get_value   date1     jdate1   date2jul date1      if  where newcalendar EQ jdate1 0  EQ  1 then jdate1   newcalendar 0      date2id   widget_info base  find_by_uname    calendar2      if NOT keyword_set date2  then widget_control  date2id  get_value   date2     jdate2   date2jul date2      if  where newcalendar EQ jdate2 0  EQ  1 then jdate2   date1     if jdate2 LT jdate1 THEN jdate2   jdate1     widget_control  date1id   destroy     widget_control  date2id   destroy     basecal   widget_info base  find_by_uname    basecal      rien   cw_calendar basecal  newcalendar  jdate1  uname    calendar1                             FAKECAL   fakecal  uvalue    name: calendar1   frame      rien   cw_calendar basecal  newcalendar  jdate2  uname    calendar2                             FAKECAL   fakecal  uvalue    name: calendar2   frame    ENDIF ELSE BEGIN      if keyword_set date1  then begin       date1id   widget_info base  find_by_uname    calendar1        widget_control  date1id  set_value   date1     endif     if keyword_set date2  then begin       date2id   widget_info base  find_by_uname    calendar2        widget_control  date2id  set_value   date2     endif   ENDELSE     Grid parameters and domain     newgrid    extractatt top_uvalue   meshparameters newfile    change   changegrid newgrid    if change OR keyword_set boxzoom  then BEGIN     if NOT keyword_set boxzoom  then boxzoom    1     domainid   widget_info base  find_by_uname    domain      widget_control  domainid  set_value   boxzoom   endif     file name     IF oldfile NE newfile THEN BEGIN      flstid   widget_info base  find_by_uname    filelist      widget_control  flstid  set_combobox_select    newfile   ENDIF      Variables name     vlstid   widget_info base  find_by_uname    varlist    oldfieldname   widget_info vlstid   combobox_gettext    did we really change the liste of variables    oldlistvar    extractatt top_uvalue   fileparameters oldfile listvar   newlistvar    extractatt top_uvalue   fileparameters newfile listvar   if array_equal oldlistvar  newlistvar  NE 1 THEN        widget_control  vlstid  set_value   newlistvar   set the liste of variables to the new variable name   if keyword_set fieldname  then newfieldname   fieldname ELSE newfieldname   oldfieldname   indexvar   where newlistvar EQ newfieldname    indexvar   0   indexvar 0    widget_control  vlstid  set_combobox_select   indexvar   newfieldname   newlistvar indexvar    did we change the name of the variable    if newfieldname NE oldfieldname then BEGIN     changefield  base  newfieldname  BOXZOOM   boxzoom   ENDIF       widget_control  base  update   1     return end"); 
     347a[345] = new Array("./ToBeReviewed/WIDGET/AUTOUR_de_XXX/createhistory.html", "createhistory.pro", "", "     file_comments        categories         param BASE  in required    The id of the widget where apply the drawing       param SMALL   Vector composed of 3 or 4 elements  applied to make a drawing on a small    portion of a page or screen  It delimit the zone where the drawing will    be done  If there is 4 elements: then is constituted of coordinates  expressed    in cm located from the up and left corner of the page or the window  in portrait    like in landscape  of the bottom and left corner and of the up and right corner    of the drawing zone  If there is 3 elements: in this case  we divide the page or    the screen in small 0  columns and in small 1  lines the drawing made in the box    numbered small 2  The numerotation starting up and left by the number 1 and then     following the writing direction  By default  we make the largest drawing we can do     conserving the aspect rapport  except when REMPLI is activated        returns          uses          restrictions          examples          history          version     Id: createhistory pro 163 2006 08 29 12:59:46Z navarro        todo   seb: je ne suis pas sur pour les param    documenter le reste      PRO createhistory  base  small       we save globalcommand in globaloldcommand     compile_opt idl2  strictarrsubs      widget_control base  get_uvalue   top_uvalue    globalcommand   extractatt top_uvalue   globalcommand      top_uvalue 1  findline top_uvalue   globaloldcommand    globalcommand   portrait or landscape      options   extractatt top_uvalue   options        optionsflag   extractatt top_uvalue   optionsflag     portrait    optionsflag where options EQ  Portrait Landscape  0 0    composition du text contennu ds history pro    texte    common                                       if keyword_set postscript  then begin                        noerase   1                       openps  infowidget   infowidget  portrait       strtrim portrait  2                   endif                                        beginning of 1                                      end of 1     if small 0 small 1  GT 1 then begin       for draw   1  small 0 small 1 1  do begin          texte    texte                         beginning of  strtrim draw 1  2                         noerase 1                          end of  strtrim draw 1  2        endfor    ENDIF    texte    texte                  if keyword_set postscript  then begin                       closeps  infowidget   infowidget                       printps                   endif    the new globalcommand     top_uvalue 1  findline top_uvalue   globalcommand    texte      for i   0  n_elements texte 1 do print  texte i       return end"); 
     348a[346] = new Array("./ToBeReviewed/WIDGET/AUTOUR_de_XXX/cutcmd.html", "cutcmd.pro", "", "     file_comments        categories         param WIDCMD        param TOREAD        param NUMBEROFREAD        param PREFIX        param NAMEEXP        param ENDING         returns          uses          restrictions          examples          history          version     Id: cutcmd pro 192 2006 09 22 09:37:08Z smasson         todo   seb     PRO cutcmd  widcmd  toread  numberofread  prefix  nameexp  ending       compile_opt idl2  strictarrsubs     dummy   where byte widcmd  EQ  byte 0  nbdblquote     CASE 1 OF     nbdblquote MOD 2: stop   odd numbers are impossibles      nbdblquote GT 0:     nbdblquote EQ 0:BEGIN   widcmd is an expression of type:   numb1 a   numb2 b     numb   we will change into the form   numb1 a    numb2 b      numb   in order to suits the new method of cutcmd       widcmd   strtrim widcmd  2    we force to start with a   or         case 1 of         strpos widcmd    EQ 0:         strpos widcmd    EQ 0:         ELSE:widcmd       widcmd       ENDCASE       separator   strsplit widcmd     extract   regex        other   strsplit widcmd     extract        IF n_elements separator  NE n_elements other  THEN stop       widcmd           FOR i   0  n_elements other 1 DO BEGIN          IF isnumber other i  LT 1 THEN other i        other i              widcmd   widcmd   separator i    other i        ENDFOR        print  widcmd     END    ENDCASE    cutted   strsplit widcmd     extract    IF strpos widcmd    EQ 0 THEN start   0 ELSE start   1   nameexp   cutted start: :2    numberofread   n_elements nameexp     IF toread GE numberofread then begin     dummy   report toread cannot be larger than numberofread      stop   ENDIF   IF n_elements cutted  EQ 1 THEN other     ELSE other   cutted 1 start: :2    make sure that we have a prefix for each nameexp   IF start EQ 0 THEN other     other      nameexp   nameexp toread    prefix   other toread    IF n_elements other  EQ numberofread   1 THEN ending   other numberofread  ELSE ending        help  prefix  nameexp  ending     return end"); 
     349a[347] = new Array("./ToBeReviewed/WIDGET/AUTOUR_de_XXX/definedefaultextra.html", "definedefaultextra.pro", "", "     file_comments        categories         param NOMVARIABLE         returns          uses          restrictions          examples          history          version    Id: definedefaultextra pro 150 2006 08 09 10:12:54Z navarro          todo   seb     FUNCTION definedefaultextra  nomvariable     compile_opt idl2  strictarrsubs      case strlowcase nomvariable  of          sn :BEGIN            return  get_extra min   31  max   37  inter    2  lct   33 nocontout          END          tn :BEGIN            return  get_extra min   20  max   31  inter    5  lct   39          END          un :BEGIN            return  get_extra min    1  max   1  inter    1  lct   64          END          vn :BEGIN            return  get_extra min    1  max   1  inter    1  lct   64          END       ELSE:    ENDCASE     return  get_extra min     max     inter     lct   39  end"); 
     350a[348] = new Array("./ToBeReviewed/WIDGET/AUTOUR_de_XXX/doubleclickaction.html", "doubleclickaction.pro", "", "     file_comments        categories         param EVENT         returns          uses          restrictions          examples          history          version    Id: doubleclickaction pro 150 2006 08 09 10:12:54Z navarro          todo   seb     PRO doubleclickaction  event       compile_opt idl2  strictarrsubs      widget_control  event id   get_uvalue   uval    widget_control  event top  get_uvalue   top_uvalue   We activate the right window    widget_control  event id  get_value   win    wset  win   What is the selected drawing     smallin   extractatt top_uvalue   smallin     smallout   extractatt top_uvalue   smallout     x    convert_coord uval x 0 uval y 0   device   to_normal 0     y    convert_coord uval x 0 uval y 0   device   to_normal 1     numcolonne   n_elements where findgen smallin 0 smallin 0  lt x 1    numligne   n_elements where findgen smallin 1 smallin 1  lt 1 y 1    numdessin   numcolonne numligne smallin 0 1   Choice of the type of action     case uval press of       1:BEGIN           if top_uvalue smallin 2  NE numdessin then begin          tracecadre  smallin   erase          if total smallin EQ smallout  EQ 3 then             tracecadre  smallout   out          smallin    smallin 0:1  numdessin            top_uvalue 1  findline top_uvalue   smallin    smallin          tracecadre  smallin           p    extractatt top_uvalue   penvs numdessin 1            x    extractatt top_uvalue   xenvs numdessin 1            y    extractatt top_uvalue   yenvs numdessin 1          END       2:BEGIN            if top_uvalue smallout 2  NE numdessin then begin          tracecadre  smallout   erase          if total smallin EQ smallout  EQ 3 then             tracecadre  smallin          smallout    smallin 0:1  numdessin            top_uvalue 1  findline top_uvalue   smallout    smallout          tracecadre  smallout   out           endif       END       4:BEGIN          tracecadre   smallin 0:1  numdessin   fill          inserthistory  event top      beginning of  strtrim numdessin  2                  end of  strtrim numdessin  2    Putting at 0 of attributes of the value concerning the drawing:            numdessin   numdessin 1           top_uvalue 1  findline top_uvalue   varinfo  numdessin                  top_uvalue 1  findline top_uvalue   dates  numdessin     0l  0l            top_uvalue 1  findline top_uvalue   nameprocedures numdessin                top_uvalue 1  findline top_uvalue   types numdessin                top_uvalue 1  findline top_uvalue   domaines  numdessin    fltarr 6            top_uvalue 1  findline top_uvalue   txtcmd numdessin                if numdessin EQ smallin 2  then             tracecadre  smallin          if numdessin EQ smallout 2  then             tracecadre  smallout   out        END        ELSE:    endcase    updatewidget  event top      return end"); 
     351a[349] = new Array("./ToBeReviewed/WIDGET/AUTOUR_de_XXX/extractatt.html", "extractatt.pro", "", "     file_comments        categories         param TOP_UVALUE        param NAME         returns          uses          restrictions          examples          history          version     Id: extractatt pro 150 2006 08 09 10:12:54Z navarro         todo   seb     FUNCTION extractatt  top_uvalue  name     compile_opt idl2  strictarrsubs      taille   size top_uvalue     j    1    repeat BEGIN       j   j 1       if j EQ  size top_uvalue 2  then return   1    endrep until  top_uvalue 0  j  EQ name    return   top_uvalue 1  j  end"); 
     352a[350] = new Array("./ToBeReviewed/WIDGET/AUTOUR_de_XXX/findline.html", "findline.pro", "", "     file_comments        categories         param TOP_UVALUE        param NAME         returns          uses          restrictions          examples          history          version     Id: findline pro 150 2006 08 09 10:12:54Z navarro         todo   seb     FUNCTION findline  top_uvalue  name     compile_opt idl2  strictarrsubs      taille   size top_uvalue     j    1    repeat BEGIN       j   j 1       if j EQ  size top_uvalue 2  then return   1    endrep until  top_uvalue 0  j  EQ name    return  j end"); 
     353a[351] = new Array("./ToBeReviewed/WIDGET/AUTOUR_de_XXX/identifyclick.html", "identifyclick.pro", "", "     file_comments        categories         param EVENT         returns          uses          restrictions          examples          history          version    Id: identifyclick pro 150 2006 08 09 10:12:54Z navarro          todo   seb     FUNCTION identifyclick  event     compile_opt idl2  strictarrsubs      widget_control  event id  get_uvalue uval   no_copy    thisEvent   TAG_NAMES event   Structure     if thisEvent EQ  WIDGET_TIMER  then press   0 ELSE press   event press      d 0 1  t 1 0 d 2 0     long click            d 1 0 t 2 0   normal click                          d 2 1 d 3 0 t 0 0  double click                                              t 3 0 d 0 0  double click    type    inutile     case 1 OF   d 0 0 1er reascending       thisEvent EQ  WIDGET_DRAW  AND uval click EQ 0 AND press EQ 0:   d 0 1 1er click of the series       thisEvent EQ  WIDGET_DRAW  AND uval click EQ 0 AND press ge 1:BEGIN          uval x    event x  0           uval y    event y  0           uval press   press          uval click   1          widget_control  event id  timer    3       END   d 1 0 1er reascending       thisEvent EQ  WIDGET_DRAW  AND uval click EQ 1 AND press EQ 0:uval click   2   d 2 0 End of the long click       thisEvent EQ  WIDGET_DRAW  AND uval click EQ 2 AND press EQ 0:BEGIN          type    long           uval x    uval x 0 event x    uval x   uval x sort uval x           uval y    uval y 0 event y    uval y   uval y sort uval y           uval click   0          uval press   event release       END   d 2 1       thisEvent EQ  WIDGET_DRAW  AND uval click EQ 2 AND press ge 1:BEGIN          type    double           uval press   press          uval click   3       END   d 3 0 reascending and end of the double click       thisEvent EQ  WIDGET_DRAW  AND uval click EQ 3 AND press EQ 0:uval click   0   t 0 0 End of the double click       thisEvent EQ  WIDGET_TIMER  AND uval click EQ 0 AND press EQ 0:   t 1 0 long click       thisEvent EQ  WIDGET_TIMER  AND uval click EQ 1 AND press EQ 0:uval click   2   t 2 0 normal click       thisEvent EQ  WIDGET_TIMER  AND uval click EQ 2 AND press EQ 0:BEGIN           type    single           press   uval press          uval click   0       END   t 3 0 End of the double click       thisEvent EQ  WIDGET_TIMER  AND uval click EQ 3 AND press EQ 0:uval click   0   Imposible case in theory:       ELSE:BEGIN          print  thisEvent  uval click  press          print   Probleme  cas normalement impossible        END    endcase     widget_control  event id  set_uvalue uval   no_copy    return   type:type  end"); 
     354a[352] = new Array("./ToBeReviewed/WIDGET/AUTOUR_de_XXX/inserthistory.html", "inserthistory.pro", "", "     file_comments        categories         param BASE        param TEXT        param LINE1        param LINE2         returns          uses          restrictions          examples          history          version    Id: inserthistory pro 150 2006 08 09 10:12:54Z navarro          todo   seb       PRO inserthistory   base  text  line1  line2     compile_opt idl2  strictarrsubs      widget_control base  get_uvalue   top_uvalue    globalcommand   extractatt top_uvalue   globalcommand      top_uvalue 1  findline top_uvalue   globaloldcommand    globalcommand     for i   0  n_elements globalcommand 1 do print  globalcommand i    we insert text between line1 and line2     index1   where globalcommand EQ line1    index1   index1 0 1     if index1  EQ  1 then begin        rien   report line1  n est pas trouve ds globalcommand         return     endif     index2   where globalcommand EQ line2    index2   index2 0      if index2  EQ  1 then begin        rien   report line2  n est pas trouve ds globalcommand         return     ENDIF   the new text:     globalcommand    globalcommand 0:index1  text  globalcommand index2:n_elements globalcommand 1    the new globalcommand      top_uvalue 1  findline top_uvalue   globalcommand    globalcommand       return end"); 
     355a[353] = new Array("./ToBeReviewed/WIDGET/AUTOUR_de_XXX/letsdraw.html", "letsdraw.pro", "", "     file_comments    It is the procedure launching the drawing     If we do not give the command to it  it call    construitcommande to know what to trace       categories         param BASE  in required    The id of the widget where apply the drawing        keyword COMMANDE  type string    A string of the style: read_data sst       keyword _EXTRA   Used to pass your keywords        uses   common pro        history   Sebastien Masson  smasson lodyc jussieu fr        version     Id: letsdraw pro 163 2006 08 29 12:59:46Z navarro        PRO letsdraw  base  COMMANDE   commande  _extra   ex     compile_opt idl2  strictarrsubs    common   we recuperate the uvalue of base   widget_control base  get_uvalue   top_uvalue   print      help   top_uvalue   struct   help   top_uvalue exextra   struct    if NOT keyword_set commande  then       commande   buildcmd base  _extra ex     if commande 0  EQ   then return   on recupere la uvalue de base    widget_control  base   hourglass    widget_control base  get_uvalue   top_uvalue   print      help   top_uvalue   struct   print       help   top_uvalue exextra   struct    help   top_uvalue extra   struct   print      print  commande   help mixstru top_uvalue exextra top_uvalue extra   struct       we recuperate the id of the graphic associated to the widget of id base     graphid   extractatt top_uvalue   graphid     widget_control  graphid  get_value   win   We select it  we will pass to it all commands concerning the window     wset  win     erase  255                         we clean the window   We make sure that  if we work with a screen coding colors on 24 bits  the specified background color  p background is the one applied       if  d n_colors gt 256 then begin         device  decomposed 1          p background ffffff x         plot 0 0          device  decomposed 0      ENDIF      smallout   long extractatt top_uvalue   smallout     numdessinout   smallout 2 1      tracecadre  smallout   fill        options   extractatt top_uvalue   options        optionsflag   extractatt top_uvalue   optionsflag     portrait    strtrim optionsflag where options EQ  Portrait Landscape  0  1 0           createpro   common                      noerase   1                      key_portrait     portrait                    Commande          filename    myuniquetmpdir    xxx_oneplot pro       inserthistory  base  Commande  beginning of  strtrim smallout 2  1            end of  strtrim smallout 2  1        top_uvalue 1  findline top_uvalue   penvs numdessinout     p     top_uvalue 1  findline top_uvalue   xenvs numdessinout     x     top_uvalue 1  findline top_uvalue   yenvs numdessinout     y     return end"); 
     356a[354] = new Array("./ToBeReviewed/WIDGET/AUTOUR_de_XXX/loadgrid.html", "loadgrid.pro", "", "     file_comments        categories         param MESHFILEIN         keyword _EXTRA   Used to pass your keywords       returns          uses          restrictions          examples          history          version     Id: loadgrid pro 192 2006 09 22 09:37:08Z smasson        todo   seb     PRO loadgrid  meshfilein  _extra   ex          compile_opt idl2  strictarrsubs    cm_4mesh   ccmeshparameters filename   meshfilein   split the name according to   delimiter   meshfile   strsplit meshfilein     extract    meshfile   strtrim meshfile  2    try to find a  pro file with this name    filepro    find meshfile 0   firstfound   onlypro 0    if this is an idl batch file or a procedure     if filepro NE  NOT FOUND  THEN BEGIN     CASE protype filepro  OF   this is a procedure        proc :listing   file_basename filepro   pro    this is a function  this case is not coded         func :stop   this is an IDL batch file        batch :listing    file_basename filepro   pro      ENDCASE   ENDIF ELSE BEGIN     filenc    find meshfile 0   firstfound   onlync 0      if filenc EQ  NOT FOUND  THEN stop     listing    initncdf      filenc     ENDELSE   add the arguments and keywords if necessary   IF n_elements meshfile  GT 1 AND strmid listing  0  1  NE   THEN BEGIN      FOR i   1  n_elements meshfile 1 DO BEGIN       IF strpos meshfile i    NE  1 THEN str   isnumber meshfile i  ELSE str   createfunc n_elements meshfile i        IF str EQ 0 THEN listing   listing         meshfile i      ELSE listing   listing         meshfile i      ENDFOR   ENDIF    IF strmid listing  0  1  NE   THEN listing   listing     strcalling       meshfilein     _extra   ex     createpro  listing  filename   myuniquetmpdir  for_createpro pro  _extra   ex  return END "); 
     357a[355] = new Array("./ToBeReviewed/WIDGET/AUTOUR_de_XXX/longclickaction.html", "longclickaction.pro", "", "     file_comments        categories         param EVENT         returns          uses          restrictions          examples          history          version    Id: longclickaction pro 154 2006 08 11 08:06:17Z smasson          todo   seb     PRO longclickaction  event     compile_opt idl2  strictarrsubs     widget_control  event id  get_uvalue   uval   widget_control  event top  get_uvalue   top_uvalue   What is the selected drawing    smallout   extractatt top_uvalue   smallout    smallin   extractatt top_uvalue   smallin    small   smallin   x    convert_coord uval x 0  uval y 0   device   to_normal 0    y    convert_coord uval x 0  uval y 0   device   to_normal 1    numcolonne   n_elements where findgen small 0 small 0  lt x 1   numligne   n_elements where findgen small 1 small 1  lt 1 y 1   numdessin   numcolonne numligne small 0    we put on numdessin as the leader plot   tracecadre  smallin   erase   if total smallin EQ smallout  EQ 3 then        tracecadre  smallout   out   smallin    smallin 0:1  numdessin 1     top_uvalue 1  findline top_uvalue   smallin    smallin   tracecadre  smallin    p    extractatt top_uvalue   penvs numdessin     x    extractatt top_uvalue   xenvs numdessin     y    extractatt top_uvalue   yenvs numdessin      actionid   widget_info event top  find_by_uname    action    type   widget_info actionid   combobox_gettext      Change the domain box:     coor    convert_coord uval x  uval y   device   to_data    x    coor 0  0  coor 0  1    y    coor 1  0  coor 1  1    domainid   widget_info event top  find_by_uname    domain    IF type EQ  pltv  THEN BEGIN      currentfile   extractatt top_uvalue   currentfile      listgrid    extractatt top_uvalue   fileparameters currentfile listgrid     listvar    extractatt top_uvalue   fileparameters currentfile listvar     vlstid   widget_info event top  find_by_uname    varlist      namevar   widget_info vlstid   combobox_gettext      indexvar   where listvar EQ namevar      vargrid   strupcase listgrid indexvar      grille   1  glam  gphi     boxzoom    glam x 0  y 0  glam x 1  y 1  gphi x 0  y 0  gphi x 1  y 1    ENDIF ELSE boxzoom    x  y    Do we have to pass the boxzoom in indexes     currentplot    extractatt top_uvalue   smallin 2 1   options   extractatt top_uvalue   options       flags   extractatt top_uvalue   optionsflag    flags   flags  currentplot    changex    flags where options EQ  Longitude   x index 0  EQ 1   changey    flags where options EQ  Latitude   y index 0  EQ 1   if changex OR changey then begin   We want to find the type of grid which is used     currentfile   extractatt top_uvalue   currentfile      listgrid    extractatt top_uvalue   fileparameters currentfile listgrid     listvar    extractatt top_uvalue   fileparameters currentfile listvar     vlstid   widget_info event top  find_by_uname    varlist      namevar   widget_info vlstid   combobox_gettext      indexvar   where listvar EQ namevar      vargrid   strupcase listgrid indexvar      domdef  boxzoom  gridtype   vargrid     grille   1   1   1   1  nx  ny  nz  firstx  firsty  firstz  lastx  lasty  lastz     if changex then boxzoom 0:1     firstx  lastx      if changey then boxzoom 2:3     firsty  lasty    endif     widget_control  domainid  set_value   boxzoom     case uval press of     1:BEGIN       nodates    type EQ  xt  OR type EQ  yt  OR type EQ  zt  OR type EQ  t        updatewidget  event top   noboxzoom  nodates   nodates  notype   type NE  plt        letsdraw  event top     END     2:BEGIN        IF type EQ  plt  THEN BEGIN           top_uvalue 1  findline top_uvalue   types smallout 2 1     pltz          forcetype    pltz        ENDIF        updatewidget  event top   noboxzoom       letsdraw  event top  forcetype   forcetype     END     4:BEGIN       IF type EQ  plt  THEN BEGIN           top_uvalue 1  findline top_uvalue   types smallout 2 1     pltt          forcetype    pltt        ENDIF        updatewidget  event top   noboxzoom   nodates       letsdraw  event top  forcetype   forcetype     END   endcase     return end"); 
     358a[356] = new Array("./ToBeReviewed/WIDGET/AUTOUR_de_XXX/read_vermair.html", "read_vermair.pro", "", "     file_comments        categories         param NAME        param DEBUT        param FIN        param NOMEXP        keyword PARENT   same as DIALOG_PARENT de dialog_message pro      keyword BOXZOOM   Vector indicating the geographic zone on which we want to cut the map     If BOXZOOM has :      1 element : The extraction is made on  lon1  lon2  lat1  lat2  0 boxzoom 0      2 elements: The extraction is made on  lon1  lon2  lat1  lat2  boxzoom 0 boxzoom 1      4 elements: The extraction is made on  Boxzoom  0  max gdept  gdepw      5 elements: The extraction is made on  Boxzoom 0:3  0  Boxzoom 4      6 elements: The extraction is made on Boxzoom    Where lon1  lon2 lat1 lat2 are global variables defined at the last domdef       keyword _EXTRA   Used to pass your keywords        returns          uses          restrictions          examples          history          version     Id: read_vermair pro 150 2006 08 09 10:12:54Z navarro        todo   seb      FUNCTION read_vermair  name  debut  fin  nomexp  PARENT   parent  BOXZOOM boxzoom  _EXTRA   ex     compile_opt idl2  strictarrsubs    common       if name EQ  un  then name    vozocrtx     if name EQ  vn  then name    vomecrty     if debut EQ fin then begin       res   lec name debut nomexp  BOXZOOM boxzoom  _EXTRA   ex     ENDIF ELSE res   lect name debut fin  nomexp  BOXZOOM boxzoom  _EXTRA   ex        return   tab:res  grille:vargrid  unite:  experience:varexp  nom:varname  end"); 
     359a[357] = new Array("./ToBeReviewed/WIDGET/AUTOUR_de_XXX/scanfile.html", "scanfile.pro", "", "     file_comments        categories         param NAMEFILE         keyword GRID        keyword _EXTRA   Used to pass your keywords       returns          uses          restrictions          examples          history          version     Id: scanfile pro 199 2006 12 13 07:47:14Z smasson        todo   seb : I don t know what to do with that            liste des presupposes:         1  le fichier a lire est un fichier netcdf         2  le nom de ce fichier finit         par U nc  V nc  W nc  T nc ou F nc  la lettre avant le         nc designant la grille a laquelle se rapporte la champ          Si tel n est pas la cas  le fichier est attribue a la grille         T          3  ce fichier contient une dimension infinie qui doit etre         celle qui se rapporte au temps et au mois 2 autres dimensions         dont les noms sont  x lon xi_  et  y lat  ou          eta_  ou bien en majuscule          4  il doit exiter ds ce fichier une unique variable n ayant         qu une dimension et etant la dimension temporelle  cette         variable sera prise comme axe des temps  Rq: si plusieurs         variables verifient ces criteres on considere la premiere         variable         5  Cette variable axe des temps doit contenir l attribut          units qui doit etre ecrit suivant la syntaxe:                  seconds since 0001 01 01 00:00:00                    hours since 0001 01 01 00:00:00                    days since 1979 01 01 00:59:59                    months since 1979 01 01 00:59:59                    years since 1979 01 01 00:59:59       je crois que c est tout             GRID UTVWF  to specify the type of grid  Defaut is  1           based on the name of the file if the file ends by          GRID _ TUVFW NC  not case sensible  or  2  T if case  1           is not found      FUNCTION scanfile  namefile  GRID   GRID  _extra   ex     compile_opt idl2  strictarrsubs    common     res    1     filename     fullname   isafile filename   namefile  IODIRECTORY   iodir  _extra   ex      open file     cdfid   ncdf_open fullname      What contains the file      infile   ncdf_inquire cdfid         name of all dimensions     namedim   strarr infile ndims    for dimiq   0  infile ndims 1 do begin     ncdf_diminq  cdfid  dimiq  tmpname  value      namedim dimiq    strlowcase tmpname    ENDFOR   roms file    dimidx   where namedim EQ  xi_rho  OR namedim EQ  xi_u  OR namedim EQ  xi_v  OR namedim EQ  xi_psi    IF dimidx 0  EQ  1 THEN BEGIN   we are looking for a x dimension with a name matching one of the following regular expression:     testname    longitude   lon   x   longitude   lon   x   longitude   lon   x      cnt    1     ii   0     WHILE cnt NE 1 AND ii LT n_elements testname  DO BEGIN       dimidx   where strmatch namedim  testname ii  EQ 1  cnt        ii   ii 1     ENDWHILE     CASE cnt OF       0:begin         dummy   report none of the dimensions name matches one of the following regular expression:                               longitude   lon   x   longitude   lon   x   longitude   lon   x                                  we cannot find the x dimension          stop       END       1:dimidx   dimidx 0        ELSE:begin         dummy   report several  and not one unique  dimensions name matches the following regular expression:                               longitude   lon   x   longitude   lon   x   longitude   lon   x                                  we cannot find the x dimension          stop       ENDELSE     ENDCASE   ENDIF   roms file    dimidy   where namedim EQ  eta_rho  OR namedim EQ  eta_u  OR namedim EQ  eta_v  OR namedim EQ  eta_psi    IF dimidy 0  EQ  1 THEN BEGIN   we are looking for a y dimension with a name matching one of the following regular expression:     testname    latitude   lat   y   latitude   lat   y   eta_   latitude   lat   y      cnt    1     ii   0     WHILE cnt NE 1 AND ii LT n_elements testname  DO BEGIN       dimidy   where strmatch namedim  testname ii  EQ 1  cnt        ii   ii 1     ENDWHILE     CASE cnt OF       0:begin         dummy   report none of the dimensions name matches one of the following regular expression:                               latitude   lat   y   latitude   lat   y   eta_   latitude   lat   y                                  we cannot find the y dimension          stop       END       1:dimidy   dimidy 0        ELSE:begin         dummy   report several  and not one unique  dimensions name matches the following regular expression:                               latitude   lat   y   latitude   lat   y   eta_   latitude   lat   y                                  we cannot find the x dimension          stop       ENDELSE     ENDCASE   ENDIF     name of all variables     we keep only the variables containing at least x  y and time dimension  if existing    namevar   strarr infile nvars    for varid   0  infile nvars 1 do begin     invar   ncdf_varinq cdfid  varid    what contains the variable      if  inter invar dim  dimidx 0  NE  1 AND           inter invar dim  dimidy 0  NE  1 AND           where invar dim EQ infile recdim 0  NE  1 OR infile recdim EQ  1        THEN namevar varid    invar name    ENDFOR   namevar   namevar where namevar NE       find vargrid for each selected variable      listgrid   strarr n_elements namevar    default definitions   IF keyword_set grid  THEN vargrid   strupcase grid  ELSE vargrid    T    look for values of vargrid for each variable   IF finite glamu 0  EQ 1 AND NOT keyword_set grid  THEN BEGIN   for each variable  look if we in one of the case corresponding to ROMS conventions      FOR i   0  n_elements namevar 1 do begin       invar   ncdf_varinq cdfid  namevar i        tmpnm   namedim invar dim    are we in one of the case corresponding to ROMS conventions        CASE 1 OF         tmpnm 2 jpt        END       invar natts EQ 0:BEGIN          dummy   report the variable  invar name  has no attribut C we create a fake calendar           fakecal   1         time   date0fk   lindgen 1 jpt        END       ELSE:BEGIN     we want to know which attributes are attached to the time variable            attnames   strarr invar natts          for attiq   0  invar natts 1 do attnames attiq    ncdf_attname cdfid  varid  attiq          if  where attnames EQ  units 0  EQ  1 then BEGIN           dummy   report Attribut  units  not found for the variable  invar name C we create a fake calendar             fakecal   1           time   date0fk   lindgen 1 jpt          ENDIF ELSE BEGIN    we read the time axis           ncdf_varget  cdfid  varid  time           time   double time            ncdf_attget  cdfid  varid   units  value   time_counter:units    seconds since 0001 01 01 00:00:00      time_counter:units    hours since 0001 01 01 00:00:00      time_counter:units    days since 1979 01 01 00:00:00      time_counter:units    months since 1979 01 01 00:00:00      time_counter:units    years since 1979 01 01 00:00:00              value   strtrim strcompress string value  2            mots   str_sep value                unite   mots 0            unite   strlowcase unite            IF strpos unite   s  strlen unite 1  NE  1 THEN unite   strmid unite  0  strlen unite 1            IF strpos unite   julian_  NE  1 THEN unite   strmid unite  7            err   0           IF unite NE  second  AND unite NE  hour  AND unite NE  day                 AND unite NE  month  AND unite NE  year  THEN BEGIN             dummy   report time units does not start with seconds hours days months years              err   1           ENDIF           IF stregex value      since  0 9 1 4 0 9 1 2 0 9 1 2   boolean  EQ 0 THEN BEGIN             dummy   report attribut units of time has not the good format:     since  0 9 1 4 0 9 1 2 0 9 1 2              err   1           ENDIF           IF err GT 0 THEN BEGIN              fakecal   1             time   date0fk   lindgen 1 jpt            ENDIF ELSE BEGIN              debut   str_sep mots 2        now we try to find the attribut called calendar    the the attribute  calendar  exists    If no  we suppose that the calendar is gregorian calendar               if  where attnames EQ  calendar 0  NE  1 then BEGIN               ncdf_attget  cdfid  varid   calendar  value               value   string value                CASE value OF                  noleap :key_caltype    noleap                   360d :key_caltype    360d                   greg :IF n_elements key_caltype  EQ 0 THEN key_caltype    greg                  ELSE:BEGIN              notused   report Unknown calendar:  value  we use greg calendar                     key_caltype    greg                  END               ENDCASE             ENDIF ELSE BEGIN          notused   report Unknown calendar  we use  key_caltype  calendar                 IF n_elements key_caltype  EQ 0 THEN key_caltype    greg              ENDELSE     BEWARE we have to get back the calendar attribute and ajust time by consequence        We pass time in IDL julian days               case unite of                second :time   julday debut 1  debut 2  debut 0 time 86400 d                hour :time   julday debut 1  debut 2  debut 0 time 24 d                day :time   julday debut 1  debut 2  debut 0 time                month :BEGIN                  if total fix time  NE time  NE 0 then     we switch to days with 30d m                    time   julday debut 1  debut 2  debut 0 round time 30                    ELSE for t   0  n_elements time 1 DO                      time t    julday debut 1 time t  debut 2  debut 0                END                year :BEGIN                 if total fix time  NE time  NE 0 then     we switch to days with 365d y                    time   julday debut 1  debut 2  debut 0 round time 365                    ELSE for t   0  n_elements time 1 do                      time t    julday debut 1  debut 2  debut 0 time t                END             ENDCASE     high frequency calendar: more than one element per day             IF max histogram long time time 0  GT 1 THEN fakecal   1 ELSE fakecal   0             date0fk   date2jul 19000101              IF keyword_set fakecal  THEN time   date0fk lindgen 1 jpt                ELSE time   long time              ENDELSE         ENDELSE       END     ENDCASE   ENDELSE     ncdf_close  cdfid     return   filename:fullname  time_counter:time  listvar:namevar                listgrid:strupcase listgrid  caltype:key_caltype                fakecal:date0fk fakecal  end"); 
     360a[358] = new Array("./ToBeReviewed/WIDGET/AUTOUR_de_XXX/selectfile.html", "selectfile.pro", "", "     file_comments        categories         param EVENT        returns          uses          restrictions          examples          history          version     Id: selectfile pro 202 2007 01 12 11:00:06Z smasson         todo   seb: documenter EVENT     PRO selectfile_event  event       compile_opt idl2  strictarrsubs    common     widget_control  event id  get_uvalue   eventuvalue   default definition of messenger when selectfile_event is called   directly without calling xmanager   widget_control  event handler  get_uvalue   messenger    messenger    1    IF chkstru eventuvalue   name  EQ 0 THEN return    case eventuvalue name of   cancel button      Global Cancel :BEGIN        widget_control  event handler  get_uvalue   messenger        messenger    1       widget_control  event handler   destroy     END   data file informations      datafilename :BEGIN       widget_control  event id  get_value   filename       filename   isafile filename   filename 0   onlync  iodirectory    iodir                              title    data file name   tryfind   fully_qualify_path        if size filename   type  NE 7 then BEGIN          widget_control  event id  set_value             return       ENDIF       widget_control  event id  set_value   filename     END      browse datafilename :BEGIN       filename   isafile onlync  title    data file name   tryfind   fully_qualify_path  iodirectory    iodir        if size filename   type  NE 7 then return       widget_control  widget_info event handler  find_by_uname    datafilename                            set_value   filename     END   switch automatic by and mesh definition buttons      gridload :BEGIN       IF event select EQ 1 THEN BEGIN          widget_control  widget_info event handler  find_by_uname    argtxt  set_value             widget_control  widget_info event handler  find_by_uname    kwdtxt  set_value             widget_control  widget_info event handler  find_by_uname    kwd base  sensitive   1         CASE event value OF            via initnetcdf :BEGIN             widget_control  widget_info event handler  find_by_uname    meshload  set_value    initncdf  editable   0             widget_control  widget_info event handler  find_by_uname    arg base  sensitive   0             widget_control  widget_info event handler  find_by_uname    kwdlab  set_value    initncdf keywords:            END            via perso :BEGIN             widget_control  widget_info event handler  find_by_uname    meshload  set_value     editable   1             widget_control  widget_info event handler  find_by_uname    arg base  sensitive   1             widget_control  widget_info event handler  find_by_uname    kwdlab  set_value    keywords of IDL procedure:            END          ENDCASE       ENDIF      END   name of the procedure or batch file      meshload :BEGIN       widget_control  event id  get_value   filename       filename    find filename 0   onlypro   firstfound 0        if filename EQ  NOT FOUND  then begin         widget_control  event id  set_value             return       endif        CASE protype filename  OF   this is a procedure          proc :BEGIN            widget_control  widget_info event handler  find_by_uname    arg base  sensitive   1           widget_control  widget_info event handler  find_by_uname    kwd base  sensitive   1           widget_control  widget_info event handler  find_by_uname    kwdlab  set_value   file_basename filename   pro  keywords:          END   this is a function  this case is not accepted          func :BEGIN            widget_control  event id  set_value               return         END   this is an IDL batch file          batch :BEGIN            widget_control  widget_info event handler  find_by_uname    arg base  sensitive   0           widget_control  widget_info event handler  find_by_uname    kwd base  sensitive   0           widget_control  widget_info event handler  find_by_uname    kwdlab  set_value    no keywords:          END       ENDCASE       widget_control  widget_info event handler  find_by_uname    argtxt  set_value           widget_control  widget_info event handler  find_by_uname    kwdtxt  set_value           widget_control  event id  set_value   file_basename filename   pro      END      browse meshload :BEGIN       filename   isafile iodir   homedir   onlypro  title    to load the grid file        if size filename   type  NE 7 then return       meshload_id   widget_info event handler  find_by_uname    meshload        widget_control  meshload_id  set_value   filename       selectfile_event   ID:meshload_id  TOP:event top  HANDLER:event handler      END    Lets Go  button      Lets Go :BEGIN       widget_control  widget_info event handler  find_by_uname    datafilename                            get_value   datafilename       datafilename   datafilename 0        IF datafilename EQ   THEN return       datafilename   isafile filename   datafilename   tryfind   onlync                                  title    data file name   fully_qualify_path        if size datafilename   type  NE 7 then BEGIN          widget_control  widget_info event handler  find_by_uname    datafilename                              set_value             return       ENDIF        widget_control  widget_info event handler  find_by_uname    gridload                            get_value   gridload       widget_control  widget_info event handler  find_by_uname    argtxt                            get_value   argtxt       argtxt   strtrim argtxt 0  2        IF strpos argtxt    EQ 0 THEN argtxt   strmid argtxt  1        widget_control  widget_info event handler  find_by_uname    kwdtxt                            get_value   kwdtxt       kwdtxt   strtrim kwdtxt 0  2        IF strpos kwdtxt    EQ 0 THEN kwdtxt   strmid kwdtxt  1         CASE gridload 0  OF          via perso :BEGIN           meshload_id   widget_info event handler  find_by_uname    meshload            widget_control  meshload_id  get_value   meshload           meshload   meshload 0            IF meshload EQ   THEN return           meshload    find meshload 0   onlypro   firstfound 0            if meshload EQ  NOT FOUND  then begin             widget_control  meshload_id  set_value                 return           endif          END           via initnetcdf :meshload   datafilename       ENDCASE       IF strlen argtxt  NE 0 THEN meshload   meshload         argtxt       IF strlen kwdtxt  NE 0 THEN meshload   meshload         kwdtxt       widget_control  event handler  get_uvalue   messenger        messenger   create_struct datafilename  datafilename   meshload  meshload        widget_control  event handler   destroy     END    endcase   return end        file_comments        categories         param DATAFILENAME        param IDLFILE        param ARGSPRO         keyword _EXTRA   Used to pass your keywords       returns          uses          restrictions          examples          history          version     Id: selectfile pro 202 2007 01 12 11:00:06Z smasson         todo   seb: documenter les params      FUNCTION selectfile  datafilename  idlfile  argspro  _extra   ex       compile_opt idl2  strictarrsubs    common         We create a pointer in the uvalue to recuperate answers at setted    questions atthe time of the use of this widget  So when the widget    is deleted in the procedure  event pro  the variable on which the    pointer pointed  contained in the uvalue of the widget  is not    deleted and we can recuperate the result      messenger   ptr_new allocate_heap    base   widget_base column  title    selectfile   align_center  uvalue   messenger  _EXTRA   ex    cancel button   dummyid   widget_button base  value    Cancel  uvalue    name: Global Cancel    data file informations   basea   widget_base base   row   align_center    dummyid   widget_label basea  value    Data file name:     database   widget_text basea  value     uvalue    name: datafilename                              uname    datafilename  xsize   45   EDITABLE    dummyid   widget_button basea  value    Browse  uvalue    name: browse datafilename    switch automatic by and mesh definition buttons   baseb   widget_base base   row   align_center    gdldid   cw_bgroup baseb   automatic grid construction with initncdf pro                                     grid construction with other IDL batch or procedure                             exclusive  set_value   0  uvalue    name: gridload                            uname    gridload  button_uvalue    via initnetcdf   via perso    name of the procedure or batch file   basec   widget_base base   row   align_center  uname    pro base    dummyid   widget_label basec  value    IDL batch file of procedure    basemeshload   widget_text basec  value    initncdf  uvalue    name: meshload                              uname    meshload  xsize   45  editable   0    dummyid   widget_button basec  value    Browse  uvalue    name: browse meshload    arguments informations   based   widget_base base   row   align_center  uname    arg base  sensitive   0    dummyid   widget_label based  value    procedure arguments    argbase   widget_text based  value     uvalue    name: argtxt                              uname    argtxt  xsize   45   EDITABLE    keyword informations   basee   widget_base base   row   align_center  uname    kwd base    dummyid   widget_label basee  uname    kwdlab  value         keywords of initncdf:    dummyid   widget_text basee  value                                 uvalue    name: kwdtxt  uname    kwdtxt  xsize   45   EDITABLE     Lets Go  button   basego   widget_button base  value    Lets Go  uvalue    name: Lets Go       IF n_elements datafilename  NE 0 THEN BEGIN      widget_control  database  set_value   datafilename     selectfile_event   ID:database  TOP:base  HANDLER:base    ENDIF    IF n_elements idlfile  NE 0 THEN BEGIN      widget_control  basemeshload  set_value   idlfile     selectfile_event   ID:basemeshload  TOP:base  HANDLER:base      widget_control  basemeshload  get_value   idlfile2     IF idlfile2 0  NE   THEN widget_control  gdldid  set_value   1   ENDIF    IF n_elements argspro  NE 0 THEN widget_control  argbase  set_value   argspro     IF n_elements datafilename  EQ 0 THEN BEGIN      widget_control  base   realize     xmanager   selectfile  base  event_handler    selectfile_event  no_block   0   ENDIF ELSE selectfile_event   ID:basego  TOP:base  HANDLER:base      get back the information from selectfile_event   res    messenger   ptr_free  messenger   if size res   type  NE 8 then return   1    loadgrid  res meshload  _extra   ex    ccreadparameters    funclec_name: read_ncdf                jpidta:jpidta  jpjdta:jpjdta  jpkdta:jpkdta               ixmindta:ixmindta  ixmaxdta:ixmaxdta               iymindta:iymindta  iymaxdta:iymaxdta               izmindta:izmindta  izmaxdta:izmaxdta     res3   scanfile res datafilename  _extra   ex    if size res3   type  NE 8 then return    1    return   fileparameters:res3  readparameters:ccreadparameters  meshparameters:ccmeshparameters   end"); 
     361a[359] = new Array("./ToBeReviewed/WIDGET/AUTOUR_de_XXX/singleclickaction.html", "singleclickaction.pro", "", "     file_comments        categories         param EVENT         returns          uses          restrictions          examples          history          version    Id: singleclickaction pro 150 2006 08 09 10:12:54Z navarro          todo   seb     PRO singleclickaction  event     compile_opt idl2  strictarrsubs    cm_4mesh  cm_4data  return      widget_control  event id  get_uvalue   uval   widget_control  event top  get_uvalue   top_uvalue   actionid   widget_info event top  find_by_uname    action    type   widget_info actionid   combobox_gettext    IF type NE  plt  THEN return   We activate the right window   widget_control  event id  get_value   win   wset  win   choice of the type of action   case uval press of     1:BEGIN       coor    convert_coord uval x 0  uval y 0   device   to_data        x   coor 0        y   coor 1        help   x   y       oldgrid   vargrid       CASE strupcase vargrid  OF          T :vargrid    F           W :vargrid    F           U :vargrid    V           V :vargrid    U           F :vargrid    T        ENDCASE       grille   1  glam  gphi   1  nx  ny  nz  firstx  firsty  firstz  lastx  lasty  lastz       vargrid   oldgrid   define the corner of the cells in the clockwise direction       IF keyword_set key_periodic  AND nx EQ jpi THEN BEGIN         x1   glam  0:ny 2          y1   gphi  0:ny 2          x2   glam  1:ny 1          y2   gphi  1:ny 1          x3   shift glam  1:ny 1   1  0          y3   shift gphi  1:ny 1   1  0          x4   shift glam  0:ny 2   1  0          y4   shift gphi  0:ny 2   1  0        ENDIF ELSE BEGIN         x1   glam 0:nx 2  0:ny 2          y1   gphi 0:nx 2  0:ny 2          x2   glam 0:nx 2  1:ny 1          y2   gphi 0:nx 2  1:ny 1          x3   glam 1:nx 1  1:ny 1          y3   gphi 1:nx 1  1:ny 1          x4   glam 1:nx 1  0:ny 2          y4   gphi 1:nx 1  0:ny 2        ENDELSE       glam    1                   free memory       gphi    1                   free memory     What is the longitude        WHILE x GT  x range 1  DO x   x 360       WHILE x LT  x range 0  DO x   x 360       IF x GT  x range 1  THEN RETURN       IF y GT  y range 1  THEN RETURN       IF y LT  y range 0  THEN RETURN         cell   inquad x  y  x1  y1  x2  y2  x3  y3  x4  y4                         onsphere   key_onearth            x1    1                   free memory         y1    1                   free memory         x2    1                   free memory         y2    1                   free memory         x3    1                   free memory         y3    1                   free memory         x4    1                   free memory         y4    1                   free memory              IF cell 0  EQ  1 OR n_elements cell  GT 1 THEN RETURN               yy   cell 0 nx 1 key_periodic nx EQ jpi        xx   cell 0  MOD  nx 1 key_periodic nx EQ jpi          CASE strupcase vargrid  OF          T :BEGIN           xx   xx firstx 1           yy   yy firsty 1         END          W :BEGIN           xx   xx firstx 1           yy   yy firsty 1         END          U :BEGIN           xx   xx firstx           yy   yy firsty 1         END          V :BEGIN           xx   xx firstx 1           yy   yy firsty         END          F :BEGIN           xx   xx firstx           yy   yy firsty         END       ENDCASE         bad   where xx GE jpi        IF bad 0  NE  1 THEN BEGIN         xx bad    xx bad jpi         yy bad    yy bad 1       ENDIF       bad   where yy GE jpj        IF bad 0  NE  1 THEN stop         print  glamt xx  yy  gphit xx  yy          cmd    buildcmd event top  boxzoom   boxzoom        END     ELSE:   endcase    RETURN end"); 
     362a[360] = new Array("./ToBeReviewed/WIDGET/AUTOUR_de_XXX/tracecadre.html", "tracecadre.pro", "", "     file_comments        categories         param SMALL         keyword OUT        keyword ERASE        keyword FILL          returns          uses          restrictions          examples          history          version    Id: tracecadre pro 150 2006 08 09 10:12:54Z navarro          todo   seb     PRO tracecadre  small  out   out  erase   erase  fill   fill     determination of the column and of the line corresponding in input to small     compile_opt idl2  strictarrsubs      numdessin   small 2 1    numligne   numdessin small 0     numcolonne   numdessin numligne small 0    determination of poscadre    largeurcolonne   1 small 0     largeurligne   1 small 1     cadre    numcolonne largeurcolonne 1 numligne 1 largeurligne                   numcolonne 1 largeurcolonne  1 numligne largeurligne     decale   0 001    cadre   cadre decale decale decale decale     reinitplt     p position    0  0  1  1     IF keyword_set fill  then begin       polyfill   cadre 0  cadre 2  cadre 2  cadre 0  cadre 0              cadre 1  cadre 1  cadre 3  cadre 3  cadre 1  color   255   normal    ENDIF ELSE BEGIN       plot   cadre 0  cadre 2  cadre 2  cadre 0  cadre 0              cadre 1  cadre 1  cadre 3  cadre 3  cadre 1             xrange    0  1  yrange    0  1  linestyle   2 keyword_set out              noerase   normal  thick   2  color   0 255 keyword_set erase     ENDELSE      return end"); 
     363a[361] = new Array("./ToBeReviewed/WIDGET/AUTOUR_de_XXX/updatewidget.html", "updatewidget.pro", "", "     file_comments        categories         param BASE  in required    The id of the widget where apply the drawing        keyword NOBOXZOOM        keyword NODATES        keyword NOTYPE          returns          uses          restrictions          examples          history          version    Id: updatewidget pro 150 2006 08 09 10:12:54Z navarro          todo   seb     PRO updatewidget  base  NOBOXZOOM   noboxzoom  NODATES   nodates  NOTYPE   notype       compile_opt idl2  strictarrsubs      widget_control base  get_uvalue   top_uvalue    smallin   extractatt top_uvalue   smallin     numdessinin   smallin 2 1        widget_control  base  update   0     date1 et date2      if keyword_set nodates  then begin       date1   0       date2   0     ENDIF ELSE BEGIN        dates    extractatt top_uvalue   dates  numdessinin        date1   dates 0    date2   dates 1     ENDELSE     domain      boxzoom    extractatt top_uvalue   domaines  numdessinin     if total boxzoom  EQ 0 then boxzoom    1    if keyword_set noboxzoom  then boxzoom   0     varinfo: filename   namevar      varinfo    extractatt top_uvalue   varinfo  numdessinin     filename   varinfo 0    nomvar   varinfo 1       if filename NE   OR nomvar NE   THEN BEGIN       changefile  base  filename  fieldname   nomvar  BOXZOOM   boxzoom  DATE1   date1  DATE2   date2    ENDIF ELSE BEGIN       if date1 NE 0 then begin          date1id   widget_info base  find_by_uname    calendar1           widget_control  date1id  set_value   date1       endif       if date2 NE 0 then begin          date2id   widget_info base  find_by_uname    calendar2           widget_control  date2id  set_value   date2       endif       if keyword_set boxzoom  then BEGIN           domainid   widget_info base  find_by_uname    domain           widget_control  domainid  set_value   boxzoom       endif    ENDELSE     exextra      if n_elements extractatt top_uvalue   exextra numdessinin  NE 0 then begin       exextra    extractatt top_uvalue   exextra numdessinin        specifieid   widget_info base find_by_uname    specifie        widget_control  specifieid  set_value   exextra    endif     text command      txtcmd    extractatt top_uvalue    txtcmd numdessinin     if txtcmd NE   then begin       txtcmdid   widget_info base  find_by_uname    txtcmd        widget_control  txtcmdid  set_value   txtcmd    endif     graphtype         if NOT keyword_set notype  then BEGIN       graphtype    extractatt top_uvalue   types numdessinin        if graphtype NE   then begin          actionid   widget_info base find_by_uname    action           widget_control  actionid  get_value   action_value          widget_control  actionid  set_combobox_select    where action_value EQ graphtype 0        endif    endif      widget_control  base  update   1        return end"); 
     364a[362] = new Array("./ToBeReviewed/WIDGET/AUTOUR_de_XXX/xcreateanim.html", "xcreateanim.pro", "", "     file_comments        categories         param EVENT         returns          uses          restrictions          examples          history          version    Id: xcreateanim pro 150 2006 08 09 10:12:54Z navarro          todo   seb     pro xcreateanim_event  event      compile_opt idl2  strictarrsubs    common   We recuperate arguments contained in the widget   if tag_names event   structure_name  NE  WIDGET_BUTTON  then return   widget_control  event id  get_uvalue   uval   if n_elements uval  EQ 0 then return   if uval EQ  cancel  then begin     widget_control  event top   destroy     return   ENDIF   We will write the animation      widget_control  event top  get_uvalue   local_uvalue   widget_control  local_uvalue parent  get_uvalue   top_uvalue     calendar    extractatt top_uvalue   fileparameters local_uvalue indexfile time_counter   key_caltype    extractatt top_uvalue   fileparameters local_uvalue indexfile caltype   fakecal    extractatt top_uvalue   fileparameters local_uvalue indexfile fakecal     widget_control  widget_info event top  find_by_uname    Filename                        get_value   nomfic   nomfic   nomfic 0      widget_control  widget_info event top  find_by_uname    directorie                        get_value   animdir   animdir   animdir 0      widget_control  widget_info event top  find_by_uname    debut                        get_value   vdate1   index1   where calendar eq date2jul vdate1    index1   index1 0     if index1 EQ  1 then return     widget_control  widget_info event handler  find_by_uname    fin                        get_value   vdate2   index2   where calendar eq date2jul vdate2    index2   index2 0     if index2 EQ  1 OR index2 LE index1 then return   We delete the widget before create the file  ps   widget_control  event top   destroy     creation of the routine which will serve us to do the drawing     We recuperate the list of instructions    globalcommand   extractatt top_uvalue   globalcommand    We complete by first and last lines of the program   createpro  globalcommand  filename   myuniquetmpdir    xxx2ps pro                   KWDLIST     NOERASE   noerase  POSTSCRIPT   postscript  DATE1IN   date1in  DATE2IN   date2in     creation of the file       we recuperate the number of octets on which we code the palette    device  get_visual_depth   depth   Picture s size  in number of pixels :   xsize    d x_size   ysize    d y_size     We check that the file s name end by  gif   if strpos nomfic   gif  EQ  1 then nomfic   nomfic gif     current_window    d window   window   free   pixmap  xsize   xsize  ysize   ysize     indication of the number of the picture we are creating   base   widget_base    sliderid   widget_slider base  minimum   1  maximum   index2 index1 1  value   1                                title    image number:     widget_control  base   realize     Beginning of the gif file  Writting of an empty  picture    IF keyword_set fakecal  THEN date   index1 ELSE date   jul2date calendar index1    xxx2ps   noerase  date1in   date  date2in   date       image   tvrd true   depth GT 8    If an 8 bit image was read  reduce the number of colors   if depth le 8 then begin     tvlct  red  green  blue   get     reduce_colors  image  index     red   red index      green   green index      blue   blue index    endif                 if depth gt 8 then     Convert 24 bit image to 8 bit   image   color_quan image  1  red  green  blue  colors   256  get_translation   translation   map_all        write_gif  animdir nomfic  image  red  green  blue   multiple   wdelete   d window     Creation and writting loop in the file      IF index2 GT index1 THEN BEGIN     FOR ind   index1 1  index2 do BEGIN         widget_control  sliderid  set_value   ind index1 1   We move the slider          window   free   pixmap  xsize   xsize  ysize   ysize       IF keyword_set fakecal  THEN date   ind ELSE date   jul2date calendar ind        xxx2ps   noerase  date1   date  date2   date               image   tvrd true   depth GT 8          if depth gt 8 then           image   color_quan image  1  aaa  bbb  ccc  colors   256  translation   translation            write_gif  animdir nomfic  image  red  green  blue   multiple       wdelete   d window     ENDFOR   ENDIF    We put a last white picture   window   free   pixmap  xsize   xsize  ysize   ysize   reinitplt   plot    0    0   nodata   image   tvrd true   depth GT 8      if depth gt 8 then       image   color_quan image  1  aaa  bbb  ccc  colors   256  translation   translation        write_gif  animdir nomfic  image  red  green  blue   multiple   wdelete   d window   File s closing    write_gif  animdir nomfic   close    widget_control  base   destroy    Rerock in  normal  mode   thisOS   strupcase strmid version os_family  0  3      wset  current_window    If we are under x  we try to lauch xanim     if thisOS NE  MAC  AND thisOS NE  WIN  then begin     spawn   which xanim  result     if strpos result 0   xanim  EQ strlen result 0 5 then spawn   xanim  animdir nomfic      endif        return end        file_comments        categories         param PARENT         returns          uses          restrictions          examples          history          version    Id: xcreateanim pro 150 2006 08 09 10:12:54Z navarro          todo   seb     PRO xcreateanim  parent     compile_opt idl2  strictarrsubs    common      widget_control  parent  get_uvalue   top_uvalue     We will make sure that all procedure are not in pltt      procedures   extractatt top_uvalue   nameprocedures     if total procedures EQ  pltt  NE 0 then begin       nothing   report Certains des plots ont un axe se rapportant au temps   C Animation impossible   error        return    ENDIF     We will make sure that all figure have the same calendar      filelist   extractatt top_uvalue    filelist     filenames    extractatt top_uvalue    varinfo 0       filenames   reform filenames     filenames   filenames uniq filenames  sort filenames     if strtrim filenames 0  1  EQ   then filenames   filenames 1:n_elements filenames 1     indexfile    where filelist EQ filenames 0 0     calendar    extractatt top_uvalue   fileparameters indexfile time_counter      key_caltype    extractatt top_uvalue   fileparameters indexfile caltype    fakecal    extractatt top_uvalue   fileparameters indexfile fakecal    if n_elements filenames  GT 1 then begin       for i   1  n_elements filenames 1 do begin          indexfilebis    where filelist EQ filenames i 0           calendarbis    extractatt top_uvalue   fileparameters indexfilebis time_counter          if n_elements calendarbis  NE n_elements calendar   then begin             nothing   report Les diffrents plots n utilisent pas le meme calendrier   C Animation impossible   error              return          ENDIF          if total calendar NE calendarbis  NE 0 then begin             nothing   report Les diffrents plots n utilisent pas le meme calendrier   C Animation impossible   error              return          endif       endfor    endif     It is possible to do an animation       base   widget_base column  title    animation creation  uvalue    parent:parent  indexfile:indexfile        rien   widget_label base  value    animation name     rien   widget_text base value anim_idl gif  uname Filename   editable     rien   widget_label base  value    animation directory     if n_elements animdir  EQ 0 then cd  current   animdir    rien   widget_text base value animdir  uname directorie   editable     rien   widget_label base  value    starting date     rien   cw_calendar base  calendar  calendar 0                            FAKECAL   fakecal  uname    debut  uvalue    name: calendar   frame     rien   widget_label base  value    ending date     rien   cw_calendar base  calendar  calendar n_elements calendar 1                            FAKECAL   fakecal  uname    fin  uvalue    name: calendar   frame     rien   widget_button base value OK  uvalue    ok     rien   widget_button base value Cancel  uvalue    cancel       widget_control base realize    xmanager xcreateanim  base   no_block        return end"); 
     365a[363] = new Array("./ToBeReviewed/WIDGET/AUTOUR_de_XXX/xxxmenubar_event.html", "xxxmenubar_event.pro", "", "     file_comments        categories         param EVENT         returns          uses          restrictions          examples          history          version     Id: xxxmenubar_event pro 150 2006 08 09 10:12:54Z navarro        todo    seb     PRO xxxmenubar_event  event     compile_opt idl2  strictarrsubs    common     case event value of      Open  :begin        oldmeshparams   ccmeshparameters       newfile   selectfile        if size newfile   type  NE 8 then return       widget_control  event top   hourglass       widget_control  event top  update   0       widget_control  event top  get_uvalue   top_uvalue   We take care of filelist       filelist   extractatt top_uvalue   filelist        filelist    filelist  newfile fileparameters filename        currentfile   n_elements filelist 1   We update the widget       filelistid   widget_info event top  find_by_uname    filelist        widget_control  filelistid  combobox_additem   file_basename newfile fileparameters filename        widget_control  filelistid  set_combobox_select   currentfile   We update filelist and currentfile s elements of the top_value        top_uvalue 1  findline top_uvalue   filelist    filelist       oldfile    top_uvalue 1  findline top_uvalue   currentfile         top_uvalue 1  findline top_uvalue   currentfile    currentfile   We take care of the name of the variable       vlstid   widget_info event top  find_by_uname    varlist    What is the selected field   Do we reselect it         fieldname   widget_info vlstid   combobox_gettext        index   where newfile fileparameters listvar EQ fieldname         widget_control  vlstid  set_value   newfile fileparameters listvar       widget_control  vlstid  set_combobox_select   0   index 0    We take care of the calendar        key_caltype   newfile fileparameters caltype       date1id   widget_info event top  find_by_uname    calendar1        widget_control  date1id  get_value   date1       widget_control  date1id   destroy       jdate1   jul2date date1        if  where newfile fileparameters time_counter EQ jdate1 0  EQ  1         then jdate1   newfile fileparameters time_counter 0        date2id   widget_info event top  find_by_uname    calendar2        widget_control  date2id  get_value   date2       widget_control  date2id   destroy       jdate2   jul2date date2        if  where newfile fileparameters time_counter EQ jdate2 0  EQ  1 then jdate2   jdate1       basecal   widget_info event top  find_by_uname    basecal        fakecal   newfile fileparameters fakecal       rien   cw_calendar basecal  newfile fileparameters time_counter  jdate1  uname    calendar1                               FAKECAL   fakecal  uvalue    name: calendar1   frame        rien   cw_calendar basecal  newfile fileparameters time_counter  jdate2  uname    calendar2                               FAKECAL   fakecal  uvalue    name: calendar2   frame    We update fileparameters  readparameters et meshparameters elements of the top_value       newfileparameters   ptrarr currentfile 1   allocate_heap        FOR i   0  currentfile 1 DO             newfileparameters i     extractatt top_uvalue   fileparameters i         newfileparameters currentfile    newfile fileparameters       ptr_free  extractatt top_uvalue   fileparameters         top_uvalue 1  findline top_uvalue   fileparameters    newfileparameters         newreadparameters   ptrarr currentfile 1   allocate_heap        FOR i   0  currentfile 1 DO             newreadparameters i     extractatt top_uvalue   readparameters i         newreadparameters currentfile    newfile readparameters       ptr_free  extractatt top_uvalue   readparameters         top_uvalue 1  findline top_uvalue   readparameters    newreadparameters         newmeshparameters   ptrarr currentfile 1   allocate_heap        FOR i   0  currentfile 1 DO             newmeshparameters i     extractatt top_uvalue   meshparameters i         newmeshparameters currentfile    newfile meshparameters       ptr_free  extractatt top_uvalue   meshparameters         top_uvalue 1  findline top_uvalue   meshparameters    newmeshparameters   We update the widget        if cmpgrid oldmeshparams  then BEGIN         domainid   widget_info event top  find_by_uname    domain          widget_control  domainid  set_value    1       endif       widget_control  event top  update   1     end      New xxx  :BEGIN       widget_control  event top  get_uvalue   top_uvalue       extra   extractatt top_uvalue   extra        xxx  CALLERWIDID   event top  _extra   extra     end      Quit :begin        widget_control  event top  get_uvalue   top_uvalue       ptr_free  extractatt top_uvalue   exextra        ptr_free  extractatt top_uvalue   fileparameters        ptr_free  extractatt top_uvalue   readparameters        ptr_free  extractatt top_uvalue   meshparameters        ptr_free  top_uvalue       widget_control  event top   destroy  We shut the widget     end      PostScript  :BEGIN       IF lmgr demo  EQ 1 THEN BEGIN         dummy   report impossible to save as postscript in demo mode          return       ENDIF       widget_control  event top  get_uvalue   top_uvalue   We recuperate the list of instructions       globalcommand   extractatt top_uvalue   globalcommand         for i   0  n_elements globalcommand 1 do print  globalcommand i    We complete by first and last lines of the program        createpro  globalcommand  filename   myuniquetmpdir    xxx2ps pro                       KWDLIST     NOERASE   noerase  POSTSCRIPT   postscript                       PORTRAIT   portrait  LANDSCAPE   landscape                       DATE1IN   date1in  DATE2IN   date2in                        POSTSCRIPT     END      Animated gif  :begin        IF float strmid version release 0 3  GE 6 2 THEN xcreateanim  event top     end      Gif  :BEGIN       IF lmgr demo  EQ 1 THEN BEGIN         dummy   report impossible to save as an image in demo mode          return       ENDIF       widget_control  event top  get_uvalue   top_uvalue       smallin   extractatt top_uvalue   smallin        numdessinin   smallin 2 1       smallout   extractatt top_uvalue   smallout        numdessinout   smallout 2 1       tracecadre  smallin   erase       tracecadre  smallout   erase       filename   xquestion dans quelle fichier gif voulez vous sauver  C l ecran de xxx   xxx_image gif        if rstrpos filename   gif  NE strlen filename 4 then filename   filename gif        filename   isafile file   filename  io   imagedir   new        saveimage  filename   quiet     end      IDL procedure :BEGIN       IF lmgr demo  EQ 1 THEN BEGIN         dummy   report impossible to save as a idl program file in demo mode          return       ENDIF   We recuperate the name of the file       filename   xquestion dans quelle procedure IDL voulez vous sauver  C la realisation de ce graph   xxx_figure pro    We complete it by a  pro       if rstrpos filename   pro  NE strlen filename 4 then filename   filename pro        filename   isafile file   filename  io   homedir   new        widget_control  event top  get_uvalue   top_uvalue   portrait or landscape         options   extractatt top_uvalue   options           optionsflag   extractatt top_uvalue   optionsflag        portrait    optionsflag where options EQ  Portrait Landscape  0 0    We read commands to do a plot       globalcommand   extractatt top_uvalue   globalcommand    We complete by first and last lines of the program       thisOS   strupcase strmid version os_family  0  3        CASE thisOS of          MAC :sep    :           WIN :sep             ELSE:sep           ENDCASE       poslastsep   rstrpos filename  sep        proname   strmid filename  poslastsep 1  strlen filename poslastsep 1 4        globalcommand    pro  proname  NOERASE   noerase  POSTSCRIPT   postscript  PORTRAIT   portrait  LANDSCAPE   landscape  DATE1IN   date1in  DATE2IN   date2in  _extra   ex                                                                 globalcommand                                                            return                              end    We write it in a program       putfile  filename  globalcommand     END      RESTORE kwd of xxx :BEGIN       IF lmgr demo  EQ 1 THEN BEGIN         dummy   report impossible to save the widget in demo mode          return       ENDIF   We recuperate the name of the file       filename   xquestion dans quel fichier bianire voulez vous sauver le widget    xxx_widget dat    We complete it by a  dat       if rstrpos filename   dat  NE strlen filename 4 then filename   filename dat        filename   isafile file   filename  io   homedir   new          widget_control  event top  get_uvalue   uvalue       widget_control  extractatt uvalue   graphid  get_value   win       wshow  win       wset  win       image   tvrd true        save  uvalue  image  filename   filename     END      Print to prompt :BEGIN       commande   getfile myuniquetmpdir    xxx_oneplot pro        for i   0   n_elements commande 1 do print  commande i      end     Portrait Landscape  :begin        widget_control  event top  get_uvalue   top_uvalue       options   extractatt top_uvalue   options        index   where options EQ  Portrait Landscape    index   index 0        optionsflag   extractatt top_uvalue   optionsflag        key_portrait   1 optionsflag index  0         top_uvalue 1  findline top_uvalue   optionsflag index      key_portrait   Separated windows or windows stuck to the widget        if widget_info event top  find_by_uname    graph  EQ 0 then BEGIN   We delete the window         graphid   extractatt top_uvalue   graphid          widget_control  widget_info graphid   parent   destroy   We recreate it          basegraph   widget_base title    xxx window   group_leader   event top  uvalue   event top   uname    basegraph          windsize   givewindowsize          graphid   widget_draw basegraph  uname    graph                                    uvalue    name: graph  press:0  click:0  x: 0  0  y: 0  0                                     button_events  retain   2                                   xsize   windsize 0  ysize   windsize 1          widget_control  basegraph   realize         xmanager   xxx  basegraph   no_block   We redraw what their were into it   We recuperate the list of instructions         globalcommand   extractatt top_uvalue   globalcommand    We complete by first and last lines of the program         createpro  globalcommand  filename   myuniquetmpdir    xxx2ps pro                         KWDLIST     NOERASE   noerase  POSTSCRIPT   postscript  PORTRAIT   portrait  LANDSCAPE   landscape                         KWDUSED      noerase  PORTRAIT   portrait    We reattribute the graphic element of the top_value          top_uvalue 1  findline top_uvalue   graphid    graphid       ENDIF ELSE BEGIN         extra   extractatt top_uvalue   extra          xxx  CALLERWIDID   event top   redraw  _extra   extra         widget_control  event top   destroy  We shut the widget       ENDELSE     end      Overlay  :begin        widget_control  event top  get_uvalue   top_uvalue       numdessinin    extractatt top_uvalue   smallin 2 1       options   extractatt top_uvalue   options           flags   extractatt top_uvalue   optionsflag        index   where options EQ  Overlay    We change the flag on Longitude   x index       flag   1 flags index  numdessinin    flag   flag 0    We reattribute it        top_uvalue 1  findline top_uvalue   optionsflag index  numdessinin    flag     end      Vecteur :BEGIN       widget_control  event top  get_uvalue   top_uvalue       numdessinin    extractatt top_uvalue   smallin 2 1       options   extractatt top_uvalue   options           flags   extractatt top_uvalue   optionsflag        index   where options EQ  Vecteur    We change the flag on Longitude   x index       flag   1 flags index  numdessinin    flag   flag 0    We reattribute it        top_uvalue 1  findline top_uvalue   optionsflag index  numdessinin    flag     end      Longitude   x index :BEGIN       widget_control  event top  get_uvalue   top_uvalue       numdessinin    extractatt top_uvalue   smallin 2 1       options   extractatt top_uvalue   options           flags   extractatt top_uvalue   optionsflag        index   where options EQ  Longitude   x index    We change the flag on Longitude   x index       flag   1 flags index  numdessinin    flag   flag 0    We reattribute it        top_uvalue 1  findline top_uvalue   optionsflag index  numdessinin    flag   Now we will change sliders defining the boxzoom       domainid   widget_info event top  find_by_uname    domain        boxzoom    extractatt top_uvalue   domaines  numdessinin    We want to find the type of grid which is used       currentfile   extractatt top_uvalue   currentfile        listgrid    extractatt top_uvalue   fileparameters currentfile listgrid       listvar    extractatt top_uvalue   fileparameters currentfile listvar       vlstid   widget_info event top  find_by_uname    varlist        namevar   widget_info vlstid   combobox_gettext        indexvar   where listvar EQ namevar        vargrid   strupcase listgrid indexvar        if flag EQ 0 then BEGIN     longitudes   We do a domdef to find the lon1 lon2 corresponding to the boxzoom defined on the widget          domdef  boxzoom  gridtype   vargrid   xindex                     yindex    flags where options EQ  Latitude   y index  numdessinin 0          widget_control  domainid  set_value    lon1  lon2  boxzoom 2:3        ENDIF ELSE BEGIN            xindex   now we want to find firstx  lastx corresponding to the boxzoom defined on the widget          domdef  boxzoom  gridtype   vargrid                     yindex    flags where options EQ  Latitude   y index  numdessinin 0          grille   1   1   1   1  nx  ny  nz  firstx  firsty  firstz  lastx  lasty  lastz         widget_control  domainid  set_value    firstx  lastx  boxzoom 2:3        ENDELSE   We update the top_uvalue       widget_control  domainid  get_value   boxzoom        top_uvalue 1  findline top_uvalue   domaines  numdessinin    boxzoom     end      Latitude   y index :begin        widget_control  event top  get_uvalue   top_uvalue       numdessinin    extractatt top_uvalue   smallin 2 1       options   extractatt top_uvalue   options           flags   extractatt top_uvalue   optionsflag        index   where options EQ  Latitude   y index    We change the flag on Latitude   y index       flag   1 flags index  numdessinin    flag   flag 0    We reattribute it        top_uvalue 1  findline top_uvalue   optionsflag index  numdessinin    flag   Now we will change sliders defining the boxzoom       domainid   widget_info event top  find_by_uname    domain        boxzoom    extractatt top_uvalue   domaines  numdessinin    We want to find the type of grid which is used       currentfile   extractatt top_uvalue   currentfile        listgrid    extractatt top_uvalue   fileparameters currentfile listgrid       listvar    extractatt top_uvalue   fileparameters currentfile listvar       vlstid   widget_info event top  find_by_uname    varlist        namevar   widget_info vlstid   combobox_gettext        indexvar   where listvar EQ namevar        vargrid   strupcase listgrid indexvar        if flag EQ 0 then BEGIN     latitudes   We do a domdef to find the lat1 lat2 corresponding to the boxzoom defined on the widget          domdef  boxzoom  gridtype   vargrid   yindex                     xindex    flags where options EQ  Longitude   x index  numdessinin 0          widget_control  domainid  set_value    boxzoom 0:1  lat1  lat2        ENDIF ELSE BEGIN            yindex   now we want to find firsty  lasty corresponding to the boxzoom defined on the widget          domdef  boxzoom  gridtype   vargrid                     xindex    flags where options EQ  Longitude   x index  numdessinin 0          grille   1   1   1   1  nx  ny  nz  firstx  firsty  firstz  lastx  lasty  lastz         widget_control  domainid  set_value    boxzoom 0:1  firsty  lasty        ENDELSE   We update the top_uvalue       widget_control  domainid  get_value   boxzoom        top_uvalue 1  findline top_uvalue   domaines  numdessinin    boxzoom     END   endcase   return end"); 
     366a[364] = new Array("./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_bgroup.html", "cw_bgroup.pro", "", "     file_comments        categories   Compound widget       param ID        param VALUE   It is the default tick mark value  a floating point number       returns          uses          restrictions          examples          history          version     Id: cw_bgroup pro 163 2006 08 29 12:59:46Z navarro     pro cw_bgroup_setv  id  value   compile_opt hidden  idl2  strictarrsubs    ON_ERROR  2                        return to caller    stash   WIDGET_INFO id   CHILD    WIDGET_CONTROL  stash  GET_UVALUE state   NO_COPY    case state type of     0: message unable to set plain button group value      1: begin       WIDGET_CONTROL  SET_BUTTON 0  state ids state excl_pos        state excl_pos   value       WIDGET_CONTROL   SET_BUTTON  state ids value      end     2: begin       n   n_elements value 1       for i   0  n do begin         state nonexcl_curpos i    value i          WIDGET_CONTROL  state ids i  SET_BUTTON value i        endfor     end   endcase    WIDGET_CONTROL  stash  SET_UVALUE state   NO_COPY end         file_comments   Compound widget      categories         param ID        param VALUE   It is the default tick mark value  a floating point number       returns          uses          restrictions          examples          history          version     Id: cw_bgroup pro 163 2006 08 29 12:59:46Z navarro     function cw_bgroup_getv  id  value    compile_opt hidden  idl2  strictarrsubs   ON_ERROR  2                        return to caller    stash   WIDGET_INFO id   CHILD    WIDGET_CONTROL  stash  GET_UVALUE state   NO_COPY    case state type of     0: message   unable to get plain button group value       1: ret   state excl_pos     1: ret   state ret_arr state excl_pos       2: ret   state nonexcl_curpos     2: BEGIN        index   where state nonexcl_curpos NE 0        if index 0  EQ  1 then begin         if size state ret_arr   type  EQ 7 then ret     ELSE ret    1       ENDIF ELSE ret   state ret_arr index      END   endcase      WIDGET_CONTROL  stash  SET_UVALUE state   NO_COPY    return  ret  end         file_comments   Compound widget      categories         param EV        returns          uses          restrictions          examples          history          version     Id: cw_bgroup pro 163 2006 08 29 12:59:46Z navarro     function cw_bgroup_event  ev   compile_opt hidden  idl2  strictarrsubs   WIDGET_CONTROL  ev handler  GET_UVALUE stash   WIDGET_CONTROL  stash  GET_UVALUE state   NO_COPY   WIDGET_CONTROL  ev id  get_uvalue uvalue    ret   1            Assume we return a struct   case state type of     0:     1: if  ev select eq 1  then begin       state excl_pos   uvalue     ENDIF else begin       if  state no_release ne 0  then ret   0     ENDELSE     2: begin         Keep track of the current state       state nonexcl_curpos uvalue    ev select           if  state no_release ne 0  and  ev select eq 0  then ret   0     end   endcase    if ret then begin      Return a struct        ret     ID:state base  TOP:ev top  HANDLER:0L  SELECT:ev select               VALUE:state ret_arr uvalue          efun   state efun       WIDGET_CONTROL  stash  SET_UVALUE state   NO_COPY       if efun ne   then return  CALL_FUNCTION efun  ret          else return  ret   endif else begin       Trash the event       WIDGET_CONTROL  stash  SET_UVALUE state   NO_COPY       return  0   endelse end            file_comments   CW_BGROUP is a compound widget that simplifies creating   a base of buttons  It handles the details of creating the   proper base  standard  exclusive  or non exclusive  and filling   in the desired buttons  Events for the individual buttons are   handled transparently  and a CW_BGROUP event returned  This   event can return any one of the following:          The Index of the button within the base           The widget ID of the button           The name of the button           An arbitrary value taken from an array of User values       categories   Compound widget      param PARENT  in required    The ID of the parent widget        param NAMES  type string array    A string array  containing one string per button    giving the name of each button       keyword BUTTON_UVALUE  type array    An array of user values to be associated with   each button and returned in the event structure        keyword COLUMN   Buttons will be arranged in the number of columns   specified by this keyword        keyword EVENT_FUNCT   The name of an optional user supplied event function   for buttons  This function is called with the return   value structure whenever a button is pressed  and   follows the conventions for user written event functions        keyword EXCLUSIVE   Buttons will be placed in an exclusive base  with   only one button allowed to be selected at a time        keyword FONT   The name of the font to be used for the button   titles  If this keyword is not specified  the default   font is used        keyword FRAME   Specifies the width of the frame to be drawn around the base        keyword IDS   A named variable into which the button IDs will be   stored  as a longword vector        keyword LABEL_LEFT   Creates a text label to the left of the buttons        keyword LABEL_TOP   Creates a text label above the buttons        keyword MAP   If set  the base will be mapped when the widget   is realized  the default        keyword NONEXCLUSIVE   Buttons will be placed in an non exclusive base    The buttons will be independent        keyword NO_RELEASE   If set  button release events will not be returned        keyword RETURN_ID   If set  the VALUE field of returned events will be   the widget ID of the button        keyword RETURN_INDEX   If set  the VALUE field of returned events will be   the zero based index of the button within the base    THIS IS THE DEFAULT        keyword RETURN_NAME   If set  the VALUE field of returned events will be   the name of the button within the base        keyword ROW   Buttons will be arranged in the number of rows   specified by this keyword        keyword SCROLL   If set  the base will include scroll bars to allow   viewing a large base through a smaller viewport        keyword SET_VALUE   The initial value of the buttons  This is equivalent   to the later statement:     WIDGET_CONTROL  widget  set_value value      keyword SPACE   The space  in pixels  to be left around the edges   of a row or column major base  This keyword is   ignored if EXCLUSIVE or NONEXCLUSIVE are specified        keyword UVALUE   The user value to be associated with the widget        keyword UNAME   The user name to be associated with the widget        keyword XOFFSET   The X offset of the widget relative to its parent        keyword XPAD   The horizontal space  in pixels  between children   of a row or column major base  Ignored if EXCLUSIVE   or NONEXCLUSIVE are specified        keyword XSIZE   The width of the base     keyword X_SCROLL_SIZE   The width of the viewport if SCROLL is specified        keyword YOFFSET   The Y offset of the widget relative to its parent        keyword YPAD   The vertical space  in pixels  between children of   a row or column major base  Ignored if EXCLUSIVE   or NONEXCLUSIVE are specified        keyword YSIZE   The height of the base        keyword Y_SCROLL_SIZE   The height of the viewport if SCROLL is specified       returns   The ID of the created widget is returned       restrictions   This widget generates event structures with the following definition:           event     ID:0L  TOP:0L  HANDLER:0L  SELECT:0  VALUE:0       The SELECT field is passed through from the button event  VALUE is   either the INDEX  ID  NAME  or BUTTON_UVALUE of the button    depending on how the widget was created       restrictions   Only buttons with textual names are handled by this widget    Bitmaps are not understood       history   15 June 1992  AB   7 April 1993  AB  Removed state caching    6 Oct  1994  KDB  Font keyword is not applied to the label    10 FEB 1995  DJC  fixed bad bug in event procedure  getting                           id of stash widget    11 April 1995  AB Removed Motif special cases      Copyright  c  1992 2005  Research Systems  Inc   All rights reserved      Unauthorized reproduction prohibited       version    Id: cw_bgroup pro 163 2006 08 29 12:59:46Z navarro            function cw_bgroup  parent  names        BUTTON_UVALUE   button_uvalue  COLUMN column  EVENT_FUNCT   efun        EXCLUSIVE excl  FONT font  FRAME frame  IDS ids  LABEL_TOP label_top        LABEL_LEFT label_left  MAP map        NONEXCLUSIVE nonexcl  NO_RELEASE no_release  RETURN_ID return_id        RETURN_INDEX return_index  RETURN_NAME return_name        ROW row  SCROLL scroll  SET_VALUE sval  SPACE space        TAB_MODE tab_mode  UVALUE uvalue        XOFFSET xoffset  XPAD xpad  XSIZE xsize  X_SCROLL_SIZE x_scroll_size      YOFFSET yoffset  YPAD ypad  YSIZE ysize  Y_SCROLL_SIZE y_scroll_size        UNAME uname     IF  N_PARAMS  ne 2  THEN MESSAGE   Incorrect number of arguments     ON_ERROR  2                        return to caller      Set default values for the keywords   version   WIDGET_INFO version    if  version toolkit eq  OLIT  then def_space_pad   4 else def_space_pad   3   IF  N_ELEMENTS column  eq 0       then column   0   IF  N_ELEMENTS excl  eq 0         then excl   0   IF  N_ELEMENTS frame  eq 0        then frame   0   IF  N_ELEMENTS map  eq 0      then map 1   IF  N_ELEMENTS nonexcl  eq 0      then nonexcl   0   IF  N_ELEMENTS no_release  eq 0   then no_release   0   IF  N_ELEMENTS row  eq 0      then row   0   IF  N_ELEMENTS scroll  eq 0       then scroll   0   IF  N_ELEMENTS space  eq 0        then space   def_space_pad   IF  N_ELEMENTS uname  eq 0       then uname    CW_BGROUP_UNAME    IF  N_ELEMENTS uvalue  eq 0       then uvalue   0   IF  N_ELEMENTS xoffset  eq 0      then xoffset 0   IF  N_ELEMENTS xpad  eq 0         then xpad   def_space_pad   IF  N_ELEMENTS xsize  eq 0        then xsize   0   IF  N_ELEMENTS x_scroll_size  eq 0    then x_scroll_size   0   IF  N_ELEMENTS yoffset  eq 0      then yoffset 0   IF  N_ELEMENTS ypad  eq 0         then ypad   def_space_pad   IF  N_ELEMENTS ysize  eq 0        then ysize   0   IF  N_ELEMENTS y_scroll_size  eq 0    then y_scroll_size   0       top_base   0L   if  n_elements label_top  ne 0  then begin     next_base   WIDGET_BASE parent  XOFFSET xoffset  YOFFSET yoffset   COLUMN      if keyword_set font then          junk   WIDGET_LABEL next_base  value label_top font font        else    junk   WIDGET_LABEL next_base  value label_top      top_base   next_base   endif else next_base   parent    if  n_elements label_left  ne 0  then begin     next_base   WIDGET_BASE next_base  XOFFSET xoffset  YOFFSET yoffset   ROW      if keyword_set font then          junk   WIDGET_LABEL next_base  value label_left  font font        else junk   WIDGET_LABEL next_base  value label_left      if  top_base eq 0L  then top_base   next_base   endif     We need some kind of outer base to hold the users UVALUE   if  top_base eq 0L  then begin     top_base   WIDGET_BASE parent  XOFFSET xoffset  YOFFSET yoffset      next_base   top_base   endif   If  top_base EQ next_base  THEN        next_base   WIDGET_BASE top_base  Xpad 1  Ypad 1  Space 1       Set top level base attributes   WIDGET_CONTROL  top_base  MAP map        FUNC_GET_VALUE CW_BGROUP_GETV  PRO_SET_VALUE CW_BGROUP_SETV        SET_UVALUE uvalue  SET_UNAME uname      Tabbing   if  n_elements tab_mode  ne 0  then begin     WIDGET_CONTROL  top_base  TAB_MODE tab_mode     WIDGET_CONTROL  next_base  TAB_MODE tab_mode   end      The actual button holding base   base   WIDGET_BASE next_base  COLUMN column  EXCLUSIVE excl  FRAME frame        NONEXCLUSIVE nonexcl  ROW row  SCROLL scroll  SPACE space        XPAD xpad  XSIZE xsize  X_SCROLL_SIZE x_scroll_size        YPAD ypad  YSIZE ysize  Y_SCROLL_SIZE y_scroll_size        EVENT_FUNC CW_BGROUP_EVENT        UVALUE WIDGET_INFO top_base   child      n   n_elements names    ids   lonarr n    for i   0  n 1 do begin     if  n_elements font  eq 0  then begin       ids i    WIDGET_BUTTON base  value names i  UVALUE i          UNAME uname _BUTTON STRTRIM i 2      endif else begin       ids i    WIDGET_BUTTON base  value names i  FONT font          UVALUE i  UNAME uname _BUTTON STRTRIM i 2      endelse   endfor      Keep the state info in the real  inner  base UVALUE      Pick an event value type:     0   Return ID     1   Return INDEX     2   Return NAME   ret_type   1   if KEYWORD_SET RETURN_ID  then ret_type   0   if KEYWORD_SET RETURN_NAME  then ret_type   2   if KEYWORD_SET BUTTON_UVALUE  then ret_type   3     case ret_type of       0: ret_arr   ids       1: ret_arr   indgen n        2: ret_arr   names       3: ret_arr   button_uvalue     endcase   type   0   if  excl ne 0  then type   1    if  nonexcl ne 0  then type   2   if n_elements efun  le 0 then efun       state     type:type         0 Standard  1 Exclusive  2 Non exclusive         base: top_base        cw_bgroup base          ret_arr:ret_arr       Vector of event values         efun : efun       Name of event fcn         nonexcl_curpos:intarr n      If non exclus  tracks state         excl_pos:0                If exclusive  current button         ids:ids               Ids of buttons         no_release:no_release     WIDGET_CONTROL  WIDGET_INFO top_base   CHILD  SET_UVALUE state   NO_COPY    if  n_elements sval  ne 0  then CW_BGROUP_SETV  top_base  sval    return  top_base END"); 
     367a[365] = new Array("./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_calendar.html", "cw_calendar.pro", "", "  IDL  testwid julday 1 1 1980 lindgen 100 5     PRO testwid_event  event       ComboboxId   widget_info event top find_by_uname    c est lui       widget_control  event id  get_uvalue uval      if n_elements uval  EQ 0 then return      case uval of          done :widget_control  event top   destroy          set :BEGIN             widget_control  event id  get_value   value            widget_control  ComboboxId  set_value   value         END          get :BEGIN             widget_control  ComboboxId  get_value   value            help   value   struct         END         ELSE:      endcase      return   end   PRO testwid  calendar  date0  _extra   ex      base widget_base COLUMN    print   base  base      nothing   widget_label base  value    beginning of the test           nothing   cw_calendar base calendar  date0  _extra   ex  uname    c est lui  uvalue    c est lui      print   cw_calendar ID   nothing          nothing   widget_label base  value    end of the test        nothing   widget_text base  value   string calendar 0  uvalue    set   editable        nothing   widget_button base  value    get  uvalue    get        nothing   widget_button base  value    done  uvalue    done       widget_control  base   REALIZE      xmanager testwid  base      return   END          file_comments        categories   Compound widget       param ID        param VALUE   It is the default tick mark value  a floating point number       returns          uses          restrictions          examples          history          version     Id: cw_calendar pro 157 2006 08 21 09:01:50Z navarro       PRO cw_calendar_set_value  id  value     compile_opt strictarr  strictarrsubs       cm_4cal   get back the calendar and its related informations   winfo_id   widget_info id  find_by_uname    infocal    widget_control  winfo_id  get_uvalue   infowid   key_caltype   infowid caltype      high freqeuncy calendar   IF keyword_set infowid fakecal  THEN BEGIN     value2   date2jul long value    infowid fakecal     IF value2 LT n_elements infowid calendar  AND value2 GE 0 THEN BEGIN         stepid   widget_info id  find_by_uname    step        widget_control  stepid  set_value    combobox_select:value2        infowid date   jul2date value2   infowid fakecal        widget_control  winfo_id  set_uvalue   infowid     ENDIF   ENDIF ELSE BEGIN        value   long value 0    make sure the value correspond     value   jul2date date2jul value    define year month day     year   value 10000l     month    value MOD 10000L 100L     day   value MOD 100L   check that the date exists in the calendar   if  where infowid calendar EQ julday month  day  year 0  EQ   1 then return   update the value of infocal     infowid date   value     widget_control  winfo_id  set_uvalue   infowid   update the combobox if needed      possiblecase    day   month   year      for name   2  0   1 do BEGIN   call set_cal_combobox with out   2 to specify that the call is coming   from cw_calendar_set_value       if widget_info id  find_by_uname   possiblecase name  NE 0 then            set_cal_combobox   handler:id  out:2  possiblecase name  value     ENDFOR   ENDELSE     return end        file_comments        categories   Compound widget       param ID        returns          uses          restrictions          examples          history          version     Id: cw_calendar pro 157 2006 08 21 09:01:50Z navarro     FUNCTION cw_calendar_get_value  id     compile_opt strictarr  strictarrsubs      winfo_id   widget_info id  find_by_uname    infocal    widget_control  winfo_id  get_uvalue   infowid   return  infowid date END        file_comments        categories   Compound widget       param ID        param WINFOID        returns          uses          restrictions          examples          history          version     Id: cw_calendar pro 157 2006 08 21 09:01:50Z navarro     FUNCTION get_cal_value  id  winfoid      compile_opt strictarr  strictarrsubs      winfo_id   widget_info id  find_by_uname    infocal    widget_control  winfo_id  get_uvalue   infowid   oldate   infowid date  day    wid_id   widget_info id  find_by_uname    day    if wid_id NE 0 then BEGIN     widget_control  wid_id  get_value   wid_value     date   long wid_value combobox_gettext    ENDIF ELSE date   oldate MOD 100L  month    wid_id   widget_info id  find_by_uname    month    if wid_id NE 0 then BEGIN     widget_control  wid_id  get_value   wid_value     allmonths   string format    C CMoA  31 indgen 12      month    where allmonths EQ wid_value combobox_gettext 0    1      date   date   100L   long month    ENDIF ELSE date   date    oldate MOD 10000L 100L 100L  year    wid_id   widget_info id  find_by_uname    year    widget_control  wid_id  get_value   wid_value   date   date   10000L   long wid_value combobox_gettext      IF arg_present winfoid  NE 0 THEN BEGIN     winfoid   winfo_id     infowid date   date     return  infowid   ENDIF ELSE return  date end     redefine the value and index position of the combobox      file_comments        categories   Compound widget       param EVENT        param CASENAME        param DATE0        returns          uses          restrictions          examples          history          version     Id: cw_calendar pro 157 2006 08 21 09:01:50Z navarro     PRO set_cal_combobox  event  casename  date0     compile_opt strictarr  strictarrsubs      casename: Which widget shall we move:  day   month  or  year      wid_id   widget_info event handler  find_by_uname   casename    we get back the calendar    winfo_id   widget_info event handler  find_by_uname    infocal    widget_control  winfo_id  get_uvalue   infowid   caldat  infowid calendar  monthcal  daycal  yearcal     and the current date   IF n_elements date0  EQ 0 then date0   get_cal_value event handler    year0   date0 10000L   month0    date0 MOD 10000L 100L   day0   date0 MOD 100L   index of days months years according to date0   case casename of      day :BEGIN    list of days corresponding to month0 and year0       index   where monthcal EQ month0 AND yearcal EQ year0        current   daycal index      END      month :BEGIN    list of months corresponding to year0       index   where yearcal EQ year0        current   monthcal index    keep only the uniq values       indexbis   uniq current        index   index indexbis        current   current indexbis      END      year :BEGIN    keep only the uniq years       index   uniq yearcal        current   yearcal index      END   ENDCASE   we update the uvalue of the widget   widget_control  wid_id  set_uvalue    name:casename    for event out   0  we store the previous position of the combobox to use   it as the default position    IF event out EQ 0 THEN widget_control  wid_id  get_value   oldselect   we redefine the new list   if casename EQ  month  then begin     widget_control  wid_id  set_value   string format    C CMoA  31 current 1    ENDIF ELSE BEGIN      widget_control  wid_id  set_value   strtrim current  1    ENDELSE   specify the index position within the new list of values    widget_control  wid_id  get_value   combobox   CASE event out OF    1: we put to the biggest position      1:selected   combobox combobox_number   1   0: same as the previous position is the best choice      0:selected   oldselect combobox_index    combobox combobox_number   1    1: we put to the smallest position     1:selected   0   2: a new date has been specified      2:BEGIN        case casename of          day :selected    where current EQ day0 0           month :selected    where current EQ month0 0           year :selected    where current EQ year0 0        ENDCASE     END   ENDCASE   widget_control  wid_id  set_value    combobox_select:selected    update the date    infowid date   get_cal_value event handler    widget_control  winfo_id  set_uvalue   infowid   return end     move cyclicly the calendar to the   value 0 if event out 1 or combobox_number 1 if event out 1      file_comments        categories   Compound widget       param EVENT        param CASENAME        returns          uses          restrictions          examples          history          version     Id: cw_calendar pro 157 2006 08 21 09:01:50Z navarro     PRO move  event  casename     compile_opt strictarr  strictarrsubs       possiblecase    day   month   year   impossiblecase     id   widget_info event handler  find_by_uname   casename     widget_control  id  get_value   wvalue   we try to move but we are already at the beginning end of the combobox   wvalue combobox_index EQ  wvalue combobox_number 1  and event out EQ 1   wvalue combobox_index EQ 0 and event out EQ  1  move is not called when out eq 0     whichcase    where possiblecase EQ casename 0     if wvalue combobox_index EQ  wvalue combobox_number 1 event out EQ 1  THEN BEGIN       if widget_info event handler  find_by_uname   possiblecase whichcase 1  EQ 0 then begin   it is impossible to move the  next  combobox           widget_control  id  get_value   widvalue   we set to  widvalue combobox_number 1  when event out EQ  1   and to 0 when event out EQ 1          selected    widvalue combobox_number 1 event out EQ  1           widget_control  id  set_value    combobox_select:selected    we call move for the next combobox       ENDIF ELSE move  event  possiblecase whichcase 1    it is possible to move from   1    ENDIF ELSE widget_control  id  set_value    combobox_select:wvalue combobox_index event out     set_cal_combobox  event  possiblecase whichcase 1     return end        file_comments        categories   Compound widget       param EVENT        returns          uses          restrictions          examples          history          version     Id: cw_calendar pro 157 2006 08 21 09:01:50Z navarro     FUNCTION cw_calendar_event  event    cm_4cal   compile_opt strictarr  strictarrsubs      winfo_id   widget_info event handler  find_by_uname    infocal    widget_control  winfo_id  get_uvalue   infowid   key_caltype   infowid caltype     widget_control  event id  get_uvalue   uval   high frequency calendar   IF uval name EQ  step  THEN BEGIN      infowid date   jul2date event index   infowid fakecal    ENDIF ELSE BEGIN       possiblecase    day   month   year   impossiblecase      whichcase    where possiblecase EQ uval name 0      if event out NE 0 then BEGIN   we use the   button and we want to go out of the combobox:   to index    1  event out 1  or to index   combobox_number  event out 1    we try to move the combobox just right  with name: possiblecase whichcase 1        if widget_info event handler  find_by_uname   possiblecase whichcase 1  EQ 0 then BEGIN   this widget do not exist we set cyclicly the current widget to the   value 0 if event out 1 or combobox_number 1 if event out 1         widget_control  event id  get_value   widvalue         selected    widvalue combobox_number 1 event out EQ  1          widget_control  event id  set_value    combobox_select:selected        ENDIF ELSE move  event  possiblecase whichcase 1      ENDIF   if we changed month year  we need to update the day  and month  list     if uval name NE  day  then begin       event out   0       for name   whichcase 1  0   1 do BEGIN         if widget_info event handler  find_by_uname   possiblecase name  NE 0 then              set_cal_combobox  event  possiblecase name        endfor     ENDIF   we update the date     infowid   get_cal_value event handler  winfo_id    ENDELSE      widget_control  winfo_id  set_uvalue   infowid   return   CW_CALENDAR  ID:event handler  TOP:event top  HANDLER:0L                VALUE:infowid date  FAKECAL: infowid fakecal  end          file_comments        categories   Compound widget       param PARENT  in required    The widget ID of the parent widget       param CALENDAR        param JDATE0         keyword CALTYPE          keyword FAKECAL         keyword UVALUE         keyword UNAME         keyword _EXTRA   Used to pass your keywords       returns          uses          restrictions          examples          history          version     Id: cw_calendar pro 157 2006 08 21 09:01:50Z navarro        todo   seb      FUNCTION cw_calendar  parent  calendar  jdate0  CALTYPE   CALTYPE  FAKECAL   fakecal  UVALUE   uvalue  UNAME   uname  _extra   ex    cm_4cal     compile_opt strictarr  strictarrsubs      if keyword_set caltype  then key_caltype   caltype   months days years found in the calendar   caldat  calendar  monthcal  daycal  yearcal  hourcal  mincal  scdcal   starting date   if n_elements jdate0  EQ 0 then jdate0   calendar 0    if  where calendar EQ jdate0 0  EQ  1 then jdate0   calendar 0      caldat  jdate0  month0  day0  year0   test the type of calendar   if n_elements calendar  GT 1 then BEGIN   each day have the same value     if n_elements uniq daycal  sort daycal  EQ 1 then monthly   1   each month and each day have the same value     if keyword_set monthly  AND n_elements uniq monthcal  sort monthcal  EQ 1 then yearly   1   endif     if NOT keyword_set uvalue  then uvalue    dummy:    if NOT keyword_set uname  then uname       base0   widget_base parent   ROW                           EVENT_FUNC    cw_calendar_event                            FUNC_GET_VALUE    cw_calendar_get_value                            PRO_SET_VALUE    cw_calendar_set_value                            UVALUE   uvalue  UNAME   uname  space   0  _extra   ex       if n_elements fakecal  eq 0 then fakecal   0   base   widget_base base0  space   0  uname    infocal                           uvalue    calendar:calendar  date:jul2date jdate0  fakecal:fakecal  caltype: key_caltype      IF keyword_set fakecal  THEN BEGIN      cmbbid   cw_combobox_pm base  UVALUE    name: step  UNAME    step                                  value   strtrim indgen n_elements calendar  1      widget_control  cmbbid  set_value    combobox_select: where calendar EQ jdate0 0    ENDIF ELSE BEGIN        vallen   widget_info base  string_size    m   day      if NOT keyword_set monthly   then begin       dayindex   where monthcal EQ month0 AND yearcal EQ year0        currentday   daycal dayindex        currentday   strtrim currentday  1        cmbbid   cw_combobox_pm base  UVALUE    name: day  UNAME    day  value   currentday        widget_control  cmbbid  set_value    combobox_select: where long currentday  EQ day0 0      endif  month      if NOT keyword_set yearly   then BEGIN       monthindex   where yearcal EQ year0        currentmonth   long monthcal monthindex    we suppress the repeted months       monthindexbis   uniq currentmonth  sort currentmonth        monthindex   monthindex monthindexbis        currentmonth   currentmonth monthindexbis        xoff    34   2 vallen 0 1 keyword_set monthly        cmbbid   cw_combobox_pm base  UVALUE    name: month  UNAME    month  value   string format    C CMoA  31 currentmonth 1  xoffset   xoff        widget_control  cmbbid  set_value    combobox_select: where long currentmonth  EQ month0 0      endif  year      yearindex   uniq yearcal  sort yearcal      currentyear   strtrim yearcal yearindex  1      xoff    34   2 vallen 0 1 keyword_set monthly     33   3 vallen 0 1 keyword_set yearly      cmbbid   cw_combobox_pm base  UVALUE    name: year  UNAME    year  value   currentyear  xoffset   xoff      widget_control  cmbbid  set_value    combobox_select: where long currentyear  EQ year0 0      ENDELSE     return  base end"); 
     368a[366] = new Array("./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_combobox_pm.html", "cw_combobox_pm.pro", "", "  testwid  value strtrim indgen 10 2    PRO testwid_event  event       help  event   STRUCT      ComboboxId   widget_info event top find_by_uname    c est lui       widget_control  event id  get_uvalue uval      if n_elements uval  EQ 0 then return      case uval of          done :widget_control  event top   destroy          dynamic_resize :BEGIN             widget_control  event id  get_value   value            widget_control  ComboboxId  set_value    dynamic_resize:value          END          combobox_select :BEGIN             widget_control  event id  get_value   value            widget_control  ComboboxId  set_value    combobox_select:value          END          value :BEGIN             widget_control  event id  get_value   value            widget_control  ComboboxId  set_value   value         END          get :BEGIN             widget_control  ComboboxId  get_value   value            help   value   struct         END         ELSE:      endcase      return   end   PRO testwid  _extra   ex      base widget_base COLUMN    print   base  base      nothing   widget_label base  value    beginning of the test           nothing   cw_combobox_pm base  _extra   ex  uname    c est lui  uvalue    c est lui    print   cw_combobox_pm ID   nothing          nothing   widget_label base  value    end of the test       nothing   widget_text base  value    0  uvalue    dynamic_resize   editable       nothing   widget_text base  value    10  uvalue    combobox_select   editable       nothing   widget_text base  value    5  uvalue    value   editable       nothing   widget_button base  value    get  uvalue    get       nothing   widget_button base  value    done  uvalue    done       widget_control  base   REALIZE      xmanager testwid  base      return   end        file_comments        categories   Compound widget       param ID        param VALUE   It is the default tick mark value  a floating point number       returns          uses          restrictions          examples          history          version     Id: cw_combobox_pm pro 157 2006 08 21 09:01:50Z navarro     PRO cw_combobox_pm_set_value  id  value     compile_opt idl2  strictarrsubs      ComboboxId   widget_info id find_by_uname    Combobox     if size value   type  eq 8 then BEGIN   this is a structure       tagnames   tag_names value        for tag   0  n_tags value 1 do begin          case strtrim strlowcase tagnames tag  2  of              dynamic_resize :widget_control  ComboboxId  dynamic_resize   value dynamic_resize   for compatibility              droplist_select :widget_control  ComboboxId  set_combobox_select   value droplist_select              combobox_select :widget_control  ComboboxId  set_combobox_select   value combobox_select              value :widget_control  ComboboxId  set_value   value value             ELSE:ras   report wrong tag name in argument  value  of cw_combobox_pm_set_value           endcase       endfor    ENDIF ELSE widget_control  ComboboxId  set_value   value    return end        file_comments        categories   Compound widget       param ID        returns          uses          restrictions          examples          history          version     Id: cw_combobox_pm pro 157 2006 08 21 09:01:50Z navarro     FUNCTION cw_combobox_pm_get_value  id     compile_opt idl2  strictarrsubs      ComboboxId   widget_info id find_by_uname    Combobox     widget_control  ComboboxId  get_value   cmbbval    cmbbtxt   widget_info ComboboxId   combobox_gettext     cmbbnumb   widget_info ComboboxId   combobox_number     index    where cmbbval EQ cmbbtxt 0     return   combobox_number:cmbbnumb  combobox_gettext:cmbbtxt                 combobox_index:index  combobox_value:cmbbval                 dynamic_resize:widget_info ComboboxId   dynamic_resize  end          file_comments        categories   Compound widget       param EVENT        returns          uses          restrictions          examples          history          version     Id: cw_combobox_pm pro 157 2006 08 21 09:01:50Z navarro     FUNCTION cw_combobox_pm_event  event     compile_opt idl2  strictarrsubs      widget_control  event id  get_uvalue uval      if uval EQ  Combobox  then       return   CW_COMBOBOX_PM  ID:event handler  TOP:event top  HANDLER:0L                  INDEX:event index  STR:event str  OUT:0       ComboboxId   widget_info event handler find_by_uname    Combobox     widget_control  ComboboxId  get_value   cmbbval    cmbbtxt   widget_info ComboboxId   combobox_gettext     cmbbnumb   widget_info ComboboxId   combobox_number     index    where cmbbval EQ cmbbtxt 0     out   0    case uval OF        plus :BEGIN          if index LT  cmbbnumb   1  then BEGIN             index   index   1            widget_control  ComboboxId  set_combobox_select   index          ENDIF ELSE out   1       END        minus :BEGIN          if index GT 0 then BEGIN             index   index   1            widget_control  ComboboxId  set_combobox_select   index          ENDIF ELSE out    1       END    endcase    return   CW_COMBOBOX_PM  ID:event handler  TOP:event top  HANDLER:0L                       INDEX:index  STR:cmbbtxt  OUT:out  end              file_comments   Like WIDGET_COMBOBOX but here  their are 2 buttons   and   to move the widget from   1      categories   Compound widget       param PARENT  in required    The widget ID of the parent widget       keyword COLUMN   Buttons will be arranged in the number of columns   specified by this keyword        keyword ROW   Buttons will be arranged in the number of rows   specified by this keyword        keyword UVALUE   The user value to be associated with the widget        keyword UNAME   The user name to be associated with the widget        keyword VALUE        keyword _EXTRA   Used to pass your keywords      returns   The returned value of this function is the widget ID of the   newly created animation widget       restrictions         Widget Events Returned by Combobox Widgets       Pressing the mouse button while the mouse cursor is over an     element of a combobox widget causes the widget to change the label     on the combobox button and to generate an event  The appearance of     any previously selected element is restored to normal at the same     time  The event structure returned by the WIDGET_EVENT function is     defined by the following statement:         CW_COMBOBOX_PM  ID:0L  TOP:0L  HANDLER:0L  INDEX:0L  OUT:0         The first three fields are the standard fields found in every     widget event      INDEX returns the index of the selected item  This can be used to     index the array of names originally used to set the widget s     value     OUT:It is an integer which can take 3 values:          1 : If we press   when the index is already at the max         Comment: In this case  the index stay at the max          1: If we press   when the index is already at the min         Comment: In this case  the index stay at the min         0 : In other cases       Keywords to WIDGET_CONTROL       A number of keywords to the WIDGET_CONTROL procedure affect the     behavior of cw_slider_pm widget: GET_VALUE and SET_VALUE          1  GET_VALUE     widget_control wid_id get_value resultat     Send back  in the result variable  a structure of 3 elements whose      names are inspired by keywords we can pass at widget_control when     we use WIDGET_COMBOBOX:              COMBOBOX_NUMBER: the number of elements currently              contained in the specified combobox widget               COMBOBOX_SELECT: the zero based number of the              currently selected element  i e  the currently displayed              element  in the specified combobox widget               DYNAMIC_RESIZE: a True value  1  if the widget specified              by Widget_ID is a button  combobox  or label widget that              has had its DYNAMIC_RESIZE attribute set  Otherwise               False  0  is returned          2  SET_VALUE     widget_control wid_id set_value impose     Allows to modify the state of the combobox like we can do it for      WIDGET_COMBOBOX  May impose:          a  The contents of the list widget  string or string array          b  A structure which can have for elements  from 1 to 3 :               DYNAMIC_RESIZE:Set this keyword to activate  if set to 1               or deactivate  if set to 0  dynamic resizing of the              specified CW_COMBOBOX_PM widget  see the documentation              for the DYNAMIC_RESIZE keyword to WIDGET_COMBOBOX              procedure for more information about dynamic widget              resizing               COMBOBOX_SELECT:Set this keyword to return the zero based              number of the currently selected element  i e  the              currently displayed element  in the specified combobox              widget               VALUE: The contents of the list widget  string or string              array       examples   See the program provided above  testwid and the associated procedure  testwid_event       history   Sebastien Masson  smasson lodyc jussieu fr                         6 9 1999      version    Id: cw_combobox_pm pro 157 2006 08 21 09:01:50Z navarro             FUNCTION cw_combobox_pm  parent  VALUE   value  UVALUE   uvalue  UNAME   uname  ROW   row  COLUMN   column  _extra   ex     compile_opt idl2  strictarrsubs       IF  N_PARAMS  NE 1  THEN MESSAGE   Incorrect number of arguments     ON_ERROR  2                   return to caller   cheking for row and column keywords    row   keyword_set row 1 keyword_set column      column   keyword_set column 1 keyword_set row keyword_set column  EQ row      if NOT keyword_set uvalue  then uvalue        if NOT keyword_set uname  then uname          base   widget_base parent  space   0                           EVENT_FUNC    cw_combobox_pm_event                            FUNC_GET_VALUE cw_combobox_pm_get_value                            PRO_SET_VALUE cw_combobox_pm_set_value                            UVALUE   uvalue  UNAME   uname  _extra   ex          vallen   widget_info base  string_size    m     vallen   35    vallen 0 1 max strlen value     if keyword_set row  THEN BEGIN       nothing   widget_button base  value     uvalue    minus  xoffset   0                                  yoffset   5  xsize   15  ysize   15       nothing   widget_combobox base  VALUE   value  UVALUE    Combobox  UNAME    Combobox                                     xoffset   13  yoffset   0  xsize   vallen       nothing   widget_button base  value     uvalue    plus                                   xoffset   vallen 11  yoffset   5                                  xsize   15  ysize   15     ENDIF ELSE BEGIN       nothing   widget_combobox base  VALUE   value  UVALUE    Combobox  UNAME    Combobox                                     xoffset   0  yoffset   0  xsize   vallen       nothing   widget_button base  value     uvalue    minus                                   xoffset   vallen 2 15                                  yoffset   24  xsize   15  ysize   15       nothing   widget_button base  value     uvalue    plus                                   xoffset   vallen 2                                  yoffset   24  xsize   15  ysize   15     ENDELSE        widget_control base realize      return  base end"); 
     369a[367] = new Array("./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_domain.html", "cw_domain.pro", "", "  IDL  testwid   PRO testwid_event  event     help   event   struct      Id   widget_info event top find_by_uname    c est lui       widget_control  event id  get_uvalue uval      if n_elements uval  EQ 0 then return      case uval of          done :widget_control  event top   destroy          set :BEGIN            widget_control  event id  get_value   value   value   value 0             nothing   execute boxzoom  value             widget_control  Id  set_value   boxzoom         END          get :BEGIN             widget_control  Id  get_value   value            print   value         END         ELSE:      endcase      return   end   PRO testwid  _extra   ex      base widget_base COLUMN       print   base  base      nothing   widget_label base  value    beginning of the test           nothing   cw_domain base _extra   ex  uname    c est lui  uvalue    c est lui       print   cw_domain ID   nothing          nothing   widget_label base  value    end of the test       nothing   widget_text base  value    40  100   10  10  uvalue    set   editable       nothing   widget_button base  value    get  uvalue    get       nothing   widget_button base  value    done  uvalue    done       widget_control  base   REALIZE      xmanager testwid  base      return   end            file_comments        categories   Compound widget       param ID        param VALUE   It is the default tick mark value  a floating point number       returns          uses          restrictions          examples          history          version     Id: cw_domain pro 172 2006 09 11 07:11:26Z smasson     pro cw_domain_set_value  id  value     compile_opt idl2  strictarrsubs    cm_4mesh      topid   findtopid id     widget_control  topid  get_uvalue   top_uvalue     make sure that we have the good grid stored in the cm_4mesh common parameters     currentfile   extractatt top_uvalue   currentfile     currentgrid    extractatt top_uvalue   meshparameters currentfile     change   changegrid currentgrid      What is the type of boxzoom      currentplot    extractatt top_uvalue   smallin 2 1    options   extractatt top_uvalue   options        flags   extractatt top_uvalue   optionsflag     flags   flags  currentplot     IF  flags where options EQ  Longitude   x index 0  EQ 0 THEN       xtype    geographic  ELSE xtype    index     IF  flags where options EQ  Latitude   y index 0  EQ 0 THEN       ytype    geographic  ELSE ytype    index      How to complete the boxzoom      IF xtype EQ   geographic  then begin       lonn1   lon1       lonn2   lon2       xtitle    lon     ENDIF ELSE BEGIN       lonn1   firstxt       lonn2   lastxt       xtitle    x ind     ENDELSE    IF ytype EQ   geographic  then begin       latt1   lat1       latt2   lat2       ytitle    lat     ENDIF ELSE BEGIN       latt1   firstyt       latt2   lastyt       ytitle    y ind     ENDELSE      vertf1   floor min gdepw 0  gdept 0     vertf2   ceil max gdepw 0  gdept 0       Case N_Elements Value  OF       0:boxzoom    lonn1  lonn2  latt1  latt2  vertf1  vertf2        1:BEGIN           if value EQ  1 then boxzoom    lonn1  lonn2  latt1  latt2  vertf1  vertf2             ELSE boxzoom lonn1  lonn2  latt1  latt2  0 value 0        END       2:boxzoom lonn1  lonn2  latt1  latt2  value 0 value 1        4:boxzoom Value        5:boxzoom Value 0:3  0  Value 4        6:boxzoom   Value       Else:BEGIN           rien   report Wrong Definition of Boxzoom        END    ENDCASE      boxzoom 0    floor boxzoom 0     boxzoom 1    ceil boxzoom 1     boxzoom 2    floor boxzoom 2     boxzoom 3    ceil boxzoom 3     if n_elements boxzoom GE 5  then begin       boxzoom 4    floor boxzoom 4        boxzoom 5    ceil boxzoom 5     endif        widget_control widget_info id find_by_uname    lon1  get_uvalue   uvalue    strict   uvalue strict     Longitudes     Possible min and max    if xtype EQ  geographic  then BEGIN       min   floor min glamt glamf  max   max        max   ceil max     ENDIF ELSE BEGIN        min   0       max   jpi 1    ENDELSE   widgets s id    lon1id   widget_info id find_by_uname    lon1     lon2id   widget_info id find_by_uname    lon2    Do we have to change the type of x axis: longitude index    lonbase   widget_info id find_by_uname    lonbase     widget_control  lonbase   get_uvalue   lonbase_uvalue    if lonbase_uvalue name NE xtype then BEGIN       widget_control  lonbase  update   0   We break everything       widget_control  lon1id   destroy       widget_control  lon2id   destroy   We reconstruct       lon1id   cw_slider_pm lonbase value min   boxzoom 0   boxzoom 0 keyword_set strict    boxzoom 1   boxzoom 0 keyword_set strict        widget_control  lonbase  set_uvalue    name:xtype        widget_control  lonbase  update   1    ENDIF ELSE BEGIN   The new value  they will have       cursorvalue1   min   boxzoom 0   boxzoom 0 strict    boxzoom 1   boxzoom 2   boxzoom 2 keyword_set strict    boxzoom 3   boxzoom 2 keyword_set strict        widget_control  latbase  set_uvalue    name:ytype        widget_control  latbase  update   1    ENDIF ELSE BEGIN       cursorvalue1   min   boxzoom 2   boxzoom 2 strict    boxzoom 3    indice2 1       if indice1 EQ indice2 then BEGIN       if  where gdep1 GE boxzoom 4  AND gdep2 LE boxzoom 5 0   EQ  1 then begin          indice1   0    indice1 dthlv1_uval grid_t EQ 1           indice2   indice1       endif       boxzoom 4    gdep1 indice1        boxzoom 5    boxzoom 4 1    endif   Now  values and indexes are proprely defined    So we can apply them    widget_control  dthlv1id  set_value    combobox_select:indice1     widget_control  dthlv2id  set_value    combobox_select:indice2    control mins and maxs of sliders     if indice1 EQ 0 then min1   0 ELSE min1   gdep2 indice1 1     max1    min1 1    gdep1 indice2     widget_control  depth1id  set_value    slider_min:min1  slider_max:max1  value:boxzoom 4     min2   gdep2 indice1     if indice2 EQ jpk 1 then BEGIN        max2   max gdept  gdepw        max2   strtrim string max2 format e8 0  1        max2   float 1 strmid max2  1 float max2     ENDIF ELSE max2   gdep1 indice2 1     widget_control  depth2id  set_value    slider_min:min2  slider_max:max2  value:boxzoom 5       return end        file_comments        categories   Compound widget       param ID        returns          uses          restrictions          examples          history          version     Id: cw_domain pro 172 2006 09 11 07:11:26Z smasson     FUNCTION cw_domain_get_value  id     compile_opt idl2  strictarrsubs      box   fltarr 6     possiblecase    lon1   lon2   lat1   lat2   depth1   depth2     for i   0  5 do begin       widget_control  widget_info id  find_by_uname   possiblecase i             get_value   value       box i    value value     ENDFOR    return  box end        file_comments        categories   Compound widget       param EVENT        returns          uses          restrictions          examples          history          version     Id: cw_domain pro 172 2006 09 11 07:11:26Z smasson     FUNCTION cw_domain_event  event     compile_opt idl2  strictarrsubs    common   help    struct  event    if  where tag_names event  EQ  OUT 0  NE  1 then if event out NE 0 then return    1    widget_control  event id  get_uvalue   uval    case uval name of        lon1 :widget_control widget_info event handler find_by_uname    lon2             set_value    slider_min:event value uval strict         lon2 :widget_control widget_info event handler find_by_uname    lon1             set_value    slider_max:event value uval strict         lat1 :widget_control widget_info event handler find_by_uname    lat2             set_value    slider_min:event value uval strict         lat2 :widget_control widget_info event handler find_by_uname    lat1             set_value    slider_max:event value uval strict         unzoom :BEGIN          id   widget_info event handler find_by_uname    lon1           widget_control  id  get_value   value          widget_control  id  set_value    slider_min:value slider_min_max 0           widget_control  id  set_value   value slider_min_max 0           id   widget_info event handler find_by_uname    lat1           widget_control  id  get_value   value          widget_control  id  set_value    slider_min:value slider_min_max 0           widget_control  id  set_value   value slider_min_max 0           id   widget_info event handler find_by_uname    lon2           widget_control  id  get_value   value          widget_control  id  set_value    slider_max:value slider_min_max 1           widget_control  id  set_value   value slider_min_max 1           id   widget_info event handler find_by_uname    lat2           widget_control  id  get_value   value          widget_control  id  set_value    slider_max:value slider_min_max 1           widget_control  id  set_value   value slider_min_max 1        END        dthlv1 :BEGIN   ids           depth1id   widget_info event handler find_by_uname    depth1           depth2id   widget_info event handler find_by_uname    depth2           dthlv2id   widget_info event handler find_by_uname    dthlv2    Do we have to change dthlv2            widget_control  event id  get_value   dthlv1_value          gdep1   fix dthlv1_value combobox_value           widget_control  dthlv2id  get_value   dthlv2_value          gdep2   fix dthlv2_value combobox_value           if dthlv2_value combobox_index LT event index then BEGIN   We redefine the dthlv2id s value             widget_control  dthlv2id  set_value    combobox_select:event index    So we redefine the value and the max of the slider 2             if event index EQ jpk 1 then BEGIN                 max   max gdept  gdepw                 max   strtrim string max format e8 0  1                 max   float 1 strmid max  1 float max              ENDIF ELSE max   gdep2 event index 1 1             widget_control  depth2id                  set_value    slider_max:max  value:gdep2 event index    So we redefine the max of the slider 1             widget_control  depth1id  set_value    slider_max:gdep1 event index           END    We redefine the value and the min of the slider depth1           if event index EQ 0 then min   0 ELSE min   gdep1 event index 1 1          widget_control  depth1id  set_value    slider_min:min  value:gdep1 event index    S we change the value of the min of the slider depth 2          widget_control  depth2id  set_value    slider_min:gdep1 event index 1        END        dthlv2 :BEGIN   ids           depth1id   widget_info event handler find_by_uname    depth1           depth2id   widget_info event handler find_by_uname    depth2           dthlv1id   widget_info event handler find_by_uname    dthlv1    Do we have to change dthlv1            widget_control  dthlv1id  get_value   dthlv1_value          gdep1   fix dthlv1_value combobox_value           widget_control  event id  get_value   dthlv2_value          gdep2   fix dthlv2_value combobox_value           if dthlv1_value combobox_index GT event index then BEGIN   We redfine the value of dthlv1id             widget_control  dthlv1id  set_value    combobox_select:event index    So we redefine the value and the min of the slider 1             if event index EQ 0 then min   0 ELSE min   gdep2 event index 1              widget_control  depth1id                  set_value    slider_min:min  value:gdep1 event index    Se we redefine the min of the slider 2             widget_control  depth2id  set_value    slider_min:gdep2 event index           END    We redefine the value and the max of the slider depth 2          if event index EQ jpk 1 then BEGIN              max   max gdept  gdepw              max   strtrim string max format e8 0  1              max   float 1 strmid max  1 float max           ENDIF ELSE max   gdep2 event index 1 1          widget_control  depth2id  set_value    slider_max:max  value:gdep2 event index    So we change the value of the max of the slider depth 1          widget_control  depth1id  set_value    slider_max:gdep2 event index 1        END        depth1 :BEGIN   ids           depth2id   widget_info event handler find_by_uname    depth2           dthlv1id   widget_info event handler find_by_uname    dthlv1    Do we have to change dthlv1            widget_control  dthlv1id  get_value   dthlv1_value          gdep1   fix dthlv1_value combobox_value           rien   where gdep1 LT event value  indice           indice   indice   indice 1           if indice NE dthlv2_value combobox_index then begin   We change the min of depth1             widget_control  depth1id  set_value    slider_max:gdep2 indice 1    We redefine the value of dthlv2id             widget_control  dthlv2id  set_value    combobox_select:indice    So we redefine the min of the slider 2             if indice EQ jpk 1 then BEGIN                 max   max gdept  gdepw                 max   strtrim string max format e8 0  1                 max   float 1 strmid max  1 float max              ENDIF ELSE max   gdep2 indice 1 1             widget_control  event id  set_value    slider_max:max           endif       END       ELSE:    ENDCASE      slidesliceid   widget_info event top  find_by_uname    slide_slice       if slidesliceid NE 0 then widget_control  slidesliceid  set_value   1    return ID:event handler  TOP:event top  HANDLER:0L                BOX:cw_domain_get_value event handler  end        file_comments        categories   Compound widget       param PARENT  in required    The widget ID of the parent widget        keyword UVALUE   The user value to be associated with the widget        keyword UNAME   The user name to be associated with the widget        keyword STRICT        keyword UNZOOM        keyword BOXZOOM   Vector indicating the geographic zone on which we want to cut the map     If BOXZOOM has :      1 element : The extraction is made on  lon1  lon2  lat1  lat2  0 boxzoom 0      2 elements: The extraction is made on  lon1  lon2  lat1  lat2  boxzoom 0 boxzoom 1      4 elements: The extraction is made on  Boxzoom  0  max gdept  gdepw      5 elements: The extraction is made on  Boxzoom 0:3  0  Boxzoom 4      6 elements: The extraction is made on Boxzoom    Where lon1  lon2 lat1 lat2 are global variables defined at the last domdef       keyword _EXTRA   Used to pass your keywords       returns          uses          restrictions          examples          history          version     Id: cw_domain pro 172 2006 09 11 07:11:26Z smasson        todo   seb: Documenter      FUNCTION cw_domain  parent  BOXZOOM   boxzoom  STRICT   strict  UVALUE   uvalue  UNAME   uname  UNZOOM   unzoom  _extra   ex       compile_opt idl2  strictarrsubs    cm_4mesh  cm_4data     Definition of the boxzoom   Case N_Elements Boxzoom  OF     0:boxzoom    lon1  lon2  lat1  lat2                      min gdepw 0  gdept 0  max gdepw 0  gdept 0        1:boxzoom    lon1  lon2  lat1  lat2  0  boxzoom 0      2:boxzoom    lon1  lon2  lat1  lat2  boxzoom 0  boxzoom 1      4:boxzoom    Boxzoom  vert1  vert2      5:boxzoom    Boxzoom 0:3  0  Boxzoom 4      6:     Else: return  report Mauvaise Definition de Boxzoom    ENDCASE   IF total Boxzoom  EQ 0 THEN        boxzoom    lon1  lon2  lat1  lat2  min gdepw 0  gdept 0  max gdepw 0  gdept 0      boxzoom 0    floor boxzoom 0    boxzoom 1    ceil boxzoom 1    boxzoom 2    floor boxzoom 2    boxzoom 3    ceil boxzoom 3    boxzoom 4    floor boxzoom 4    boxzoom 5    ceil boxzoom 5      if NOT keyword_set uvalue  then uvalue       if NOT keyword_set uname  then uname       base   widget_base parent  row   2  space   0                          EVENT_FUNC    cw_domain_event                           FUNC_GET_VALUE    cw_domain_get_value                           PRO_SET_VALUE    cw_domain_set_value                           UVALUE   uvalue  UNAME   uname  _extra   ex         baseh   widget_base base  column   1 keyword_set unzoom  space   0      baseh1   widget_base baseh  row   2  space   0   longitude    min   floor min glamt  glamf  max   max    max   ceil max    IF max min GT 360 AND keyword_set key_periodic  THEN max   min 360   lonbase   widget_base baseh1  column   2  space   0  uname    lonbase  uvalue    name: geographic    lon1id   cw_slider_pm lonbase  value   min   boxzoom 0   boxzoom 0 keyword_set strict    boxzoom 1   boxzoom 0 keyword_set strict   latitude    min   floor min gphit  gphif  max   max    max   ceil max    latbase   widget_base baseh1  column   2  space   0  uname    latbase  uvalue    name: geographic    lat1id   cw_slider_pm latbase  value   min   boxzoom 2   boxzoom 2 keyword_set strict    boxzoom 3   boxzoom 2 keyword_set strict   unzoom    if keyword_set unzoom  then rien   widget_button baseh  value    unzoom  uvalue    name: unzoom  xsize   60  ysize   110   depth    basez   widget_base base  column   3  space   0   base_align_center      basezdrp   widget_base basez  row   2  space   0      if strupcase vargrid  EQ  W  then gdep   gdepw ELSE gdep   gdept   gdep1   floor gdep    gdep2   ceil gdep      same   where gdep2 gdep1 EQ 0      if same 0  NE  1 then gdep2 same    gdep2 same   1   sgdep1   strtrim gdep1  1    sgdep2   strtrim gdep2  1      dephtid   cw_combobox_pm basezdrp  value    sgdep1  uvalue    name: dthlv1  grid_t:strupcase vargrid  NE  W  uname    dthlv1    rien   where gdep1 LT boxzoom 4  indice1    indice1   indice1   indice2 1    widget_control  dephtid  set_value    combobox_select:indice2          basedepthslid   widget_base base  column   2  space   0    strminlen   max strlen strtrim round gdept  gdepw  1      if indice1 EQ 0 then min1   0 ELSE min1   gdep2 indice1 1    max1    min1 1    gdep1 indice2    rien   cw_slider_pm basez  value   min1   boxzoom 4   boxzoom 4    boxzoom 5    max2                           uvalue    name: depth2  minimum   min2  maximum    max2                           uname    depth2  title    z2  strminlen   strminlen        return  base end"); 
     370a[368] = new Array("./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_droplist_pm.html", "cw_droplist_pm.pro", "", "  PRO testwid_event  event       help  event   STRUCT      DroplistId   widget_info event top find_by_uname    c est lui       widget_control  event id  get_uvalue uval      if n_elements uval  EQ 0 then return      case uval of          done :widget_control  event top   destroy          dynamic_resize :BEGIN             widget_control  event id  get_value   value            widget_control  DroplistId  set_value    dynamic_resize:value          END          droplist_select :BEGIN             widget_control  event id  get_value   value            widget_control  DroplistId  set_value    droplist_select:value          END          value :BEGIN             widget_control  event id  get_value   value            widget_control  DroplistId  set_value   value         END          get :BEGIN             widget_control  DroplistId  get_value   value            help   value   struct         END         ELSE:      endcase      return   end   PRO testwid  _extra   ex      base widget_base COLUMN    print   base  base      nothing   widget_label base  value    beginning of the test           nothing   cw_droplist_pm base  _extra   ex  uname    c est lui  uvalue    c est lui    print   cw_droplist_pm ID   nothing          nothing   widget_label base  value    end of the test       nothing   widget_text base  value    0  uvalue    dynamic_resize   editable       nothing   widget_text base  value    10  uvalue    droplist_select   editable       nothing   widget_text base  value    5  uvalue    value   editable       nothing   widget_button base  value    get  uvalue    get       nothing   widget_button base  value    done  uvalue    done       widget_control  base   REALIZE      xmanager testwid  base      return   end             file_comments        categories   Compound widget       param ID        param VALUE   It is the default tick mark value  a floating point number       returns          uses          restrictions          examples          history          version     Id: cw_droplist_pm pro 157 2006 08 21 09:01:50Z navarro     PRO cw_droplist_pm_set_value  id  value     compile_opt idl2  strictarrsubs      DroplistId   widget_info id find_by_uname    Droplist     if size value   type  eq 8 then BEGIN   this is a structure       tagnames   tag_names value        for tag   0  n_tags value 1 do begin          case strtrim strlowcase tagnames tag  2  of              dynamic_resize :widget_control  DroplistId  dynamic_resize   value dynamic_resize              droplist_select :widget_control  DroplistId  set_droplist_select   value droplist_select              value :widget_control  DroplistId  set_value   value value             ELSE:ras   report mauvais nom de l argument de la structure ds cw_droplist_pm_set_value           endcase       endfor    ENDIF ELSE widget_control  DroplistId  set_value   value    return end        file_comments   Compound widget      categories   Compound widget       param ID      returns          uses          restrictions          examples          history          version     Id: cw_droplist_pm pro 157 2006 08 21 09:01:50Z navarro     FUNCTION cw_droplist_pm_get_value  id     compile_opt idl2  strictarrsubs      DroplistId   widget_info id find_by_uname    Droplist     return   droplist_number:widget_info DroplistId   droplist_number                  droplist_select:widget_info DroplistId   droplist_select                  dynamic_resize:widget_info DroplistId   dynamic_resize  end        file_comments   Compound widget      categories   Compound widget       param EVENT        returns          uses          restrictions          examples          history          version     Id: cw_droplist_pm pro 157 2006 08 21 09:01:50Z navarro     FUNCTION cw_droplist_pm_event  event     compile_opt idl2  strictarrsubs      widget_control  event id  get_uvalue uval      if uval EQ  Droplist  then       return   CW_DROPLIST_PM  ID:event handler  TOP:event top  HANDLER:0L                  INDEX:event index  OUT:0       DroplistId   widget_info event handler find_by_uname    Droplist     index   widget_info DroplistId   droplist_select     case uval OF        plus :BEGIN          indexmax   widget_info DroplistId   droplist_number 1          if index NE indexmax then widget_control  DroplistId set_droplist_select   index 1          return   CW_DROPLIST_PM  ID:event handler  TOP:event top  HANDLER:0L                       INDEX: index 1    index 1  OUT: long index EQ 0        END    endcase end                file_comments   Like WIDGET_DROPLIST but here  their are 2 buttons   and   to move the widget from   1      categories   Compound widget       param PARENT  in required    The widget ID of the parent widget       keyword COLUMN   Buttons will be arranged in the number of columns   specified by this keyword        keyword ROW   Buttons will be arranged in the number of rows   specified by this keyword        keyword UVALUE   The user value to be associated with the widget        keyword UNAME   The user name to be associated with the widget        keyword _EXTRA   Used to pass your keywords      returns   The returned value of this function is the widget ID of the   newly created animation widget       restrictions         Widget Events Returned by Droplist Widgets       Pressing the mouse button while the mouse cursor is over an     element of a droplist widget causes the widget to change the label     on the droplist button and to generate an event  The appearance of     any previously selected element is restored to normal at the same     time  The event structure returned by the WIDGET_EVENT function is     defined by the following statement:         CW_DROPLIST_PM  ID:0L  TOP:0L  HANDLER:0L  INDEX:0L  OUT:0         The first three fields are the standard fields found in every     widget event      INDEX returns the index of the selected item  This can be used to     index the array of names originally used to set the widget s     value     OUT:It is an integer which can take 3 values:          1 : If we press   when the index is already at the max         Comment: In this case  the index stay at the max          1: If we press   when the index is already at the min         Comment: In this case  the index stay at the min         0 : In other cases       Keywords to WIDGET_CONTROL       A number of keywords to the WIDGET_CONTROL procedure affect the     behavior of cw_slider_pm widget: GET_VALUE and SET_VALUE          1  GET_VALUE     widget_control wid_id get_value resultat     Send back  in the result variable  a structure of 3 elements whose      names are inspired by keywords we can pass at widget_control when     we use WIDGET_COMBOBOX:              DROPLIST_NUMBER: the number of elements currently              contained in the specified droplist widget               DROPLIST_SELECT: the zero based number of the              currently selected element  i e  the currently displayed              element  in the specified droplist widget               DYNAMIC_RESIZE: a True value  1  if the widget specified              by Widget_ID is a button  droplist  or label widget that              has had its DYNAMIC_RESIZE attribute set  Otherwise               False  0  is returned          2  SET_VALUE     widget_control wid_id set_value impose     permet de modifier l etat de la droplist comme on peut le faire     pour WIDGET_DROPLIST Impose peut etre:         a  The contents of the list widget  string or string array          b  A structure which can have for elements  from 1 to 3 :               DYNAMIC_RESIZE:Set this keyword to activate  if set to 1               or deactivate  if set to 0  dynamic resizing of the              specified CW_DROPLIST_PM widget  see the documentation              for the DYNAMIC_RESIZE keyword to WIDGET_DROPLIST              procedure for more information about dynamic widget              resizing               DROPLIST_SELECT:Set this keyword to return the zero based              number of the currently selected element  i e  the              currently displayed element  in the specified droplist              widget               VALUE: The contents of the list widget  string or string              array       examples   See the program provided above  testwid and the associated procedure  testwid_event       history   Sebastien Masson  smasson lodyc jussieu fr                         6 9 1999      version    Id: cw_droplist_pm pro 157 2006 08 21 09:01:50Z navarro             FUNCTION cw_droplist_pm  parent UVALUE   uvalue  UNAME   uname  ROW   row  COLUMN   column  _extra   ex     compile_opt idl2  strictarrsubs       IF  N_PARAMS  NE 1  THEN MESSAGE   Incorrect number of arguments     ON_ERROR  2                   return to caller   cheking for row and column keywords    row   keyword_set row 1 keyword_set column      column   keyword_set column 1 keyword_set row keyword_set column  EQ row      if NOT keyword_set uvalue  then uvalue        if NOT keyword_set uname  then uname          base   widget_base parent  space   1  xpad   1  ypad   1  ROW   row  COLUMN   column                            EVENT_FUNC    cw_droplist_pm_event                            FUNC_GET_VALUE cw_droplist_pm_get_value                            PRO_SET_VALUE cw_droplist_pm_set_value                            UVALUE   uvalue  UNAME   uname  _extra   ex          if keyword_set row  THEN nothing   widget_button base value    uvalue   minus     nothing   widget_droplist base  UVALUE    Droplist  UNAME    Droplist  _extra   ex     if keyword_set column  then begin       base1   widget_base base   row   align_center  space   1  xpad   1  ypad   1        nothing   widget_button base1 value    uvalue   minus  xsize   20  ysize   20        nothing   widget_button base1 value    uvalue   plus  xsize   20  ysize   20     ENDIF ELSE nothing   widget_button base value    uvalue   plus        widget_control base realize      return  base end"); 
     371a[369] = new Array("./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_pagelayout.html", "cw_pagelayout.pro", "", "       file_comments        categories   Compound widget       param EVENT        returns          uses          restrictions          examples          history          version     Id: cw_pagelayout pro 157 2006 08 21 09:01:50Z navarro       FUNCTION cw_pagelayout_event  event     compile_opt idl2  strictarrsubs       widget_control  event id  get_uvalue uval    widget_control  event top  get_uvalue top_uvalue      smallin   extractatt top_uvalue   smallin     numdessinin   smallin 2 1    smallout   extractatt top_uvalue   smallout       if uval name EQ  undo  then begin       return ID:event handler  TOP:event top  HANDLER:0L     ENDIF ELSE BEGIN     common   If we do not change the number of columns  we send       if uval name EQ  column  then          if event index 1 EQ smallin 0  THEN          return ID:event handler  TOP:event top  HANDLER:0L    If we do not change the number of lines  we send       if uval name EQ  row  then          if event index 1 EQ smallin 1  THEN          return ID:event handler  TOP:event top  HANDLER:0L      We erase the page        graphid   widget_info event top find_by_uname    graph        graphid   extractatt top_uvalue   graphid        widget_control graphid get_value win       wset  win       erase  255       case uval name of           clear :           column :BEGIN              smallin    event index 1  smallin 1  1              smallout    event index 1  smallout 1  1           END           row :BEGIN             smallin    smallin 0  event index 1  1              smallout    smallout 0  event index 1  1           END       endcase       nbredessin   smallin 0 smallin 1               We put all back to 0 for postscripts       createhistory  event top  smallin                  options   extractatt top_uvalue   options           flags   extractatt top_uvalue   optionsflag        flag   flags  numdessinin               update and reset all values of the top_uvalue           top_uvalue 1  findline top_uvalue   smallin    smallin        top_uvalue 1  findline top_uvalue   smallout    smallout          top_uvalue 1  findline top_uvalue   penvs    replicate p  nbredessin         top_uvalue 1  findline top_uvalue   xenvs    replicate x  nbredessin         top_uvalue 1  findline top_uvalue   yenvs    replicate y  nbredessin           top_uvalue 1  findline top_uvalue   nameprocedures    strarr nbredessin         top_uvalue 1  findline top_uvalue   types    strarr nbredessin         top_uvalue 1  findline top_uvalue   varinfo    strarr 2  nbredessin         top_uvalue 1  findline top_uvalue   domaines    fltarr 6  nbredessin         top_uvalue 1  findline top_uvalue   dates    lonarr 2  nbredessin         top_uvalue 1  findline top_uvalue   txtcmd    strarr nbredessin         top_uvalue 1  findline top_uvalue   optionsflag    flag replicate 1  nbredessin          ptr_free  extractatt top_uvalue   exextra         top_uvalue 1  findline top_uvalue   exextra    ptrarr nbredessin   allocate_heap          top_uvalue 1  findline top_uvalue            ENDELSE      return ID:event handler  TOP:event top  HANDLER:0L  end        file_comments        categories   Compound widget       param PARENT  in required    The widget ID of the parent widget       param SMALL         keyword COLUMN   Buttons will be arranged in the number of columns   specified by this keyword        keyword ROW   Buttons will be arranged in the number of rows   specified by this keyword        keyword UVALUE   The user value to be associated with the widget        keyword UNAME   The user name to be associated with the widget       keyword _EXTRA   Used to pass your keywords      keyword UNZOOM          returns          uses          restrictions          examples          history          version    Id: cw_pagelayout pro 157 2006 08 21 09:01:50Z navarro          todo    seb: documenter      FUNCTION cw_pagelayout  parent  small  UVALUE   uvalue  UNAME   uname  UNZOOM   unzoom  COLUMN   column  ROW   row  _extra   ex       compile_opt idl2  strictarrsubs     row   keyword_set row 1 keyword_set column      if NOT keyword_set uvalue  then uvalue       if NOT keyword_set uname  then uname       base   widget_base parent                          EVENT_FUNC    cw_pagelayout_event                           FUNC_GET_VALUE    cw_pagelayout_get_value                           PRO_SET_VALUE    cw_pagelayout_set_value                           UVALUE   uvalue  UNAME   uname  space   0  _extra   ex         IF n_elements small  eq 0 then small    1  1  1      dummy   widget_label base  value    cln  yoffset   3    id   widget_combobox base  value   strtrim indgen 9 1  1  uvalue    name: column                             uname    column  xoffset   20  xsize   40    widget_control  id  set_combobox_select   small 0 1     IF keyword_set row  THEN BEGIN      xoff   60     yoff   0   ENDIF ELSE BEGIN      xoff   0     yoff   20   ENDELSE    dummy   widget_label base  value    row  xoffset   xoff  yoffset   yoff 3    id   widget_combobox base  value   strtrim indgen 9 1  1  uvalue    name: row                             uname    row  xoffset   xoff 20  xsize   40  yoffset   yoff    widget_control  id  set_combobox_select   small 1 1       return  base end  "); 
     372a[370] = new Array("./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_slide_slice.html", "cw_slide_slice.pro", "", "     file_comments        categories   Compound widget       param ID        param VALUE   It is the default tick mark value  a floating point number       returns          uses          restrictions          examples          history          version     Id: cw_slide_slice pro 157 2006 08 21 09:01:50Z navarro     pro cw_slide_slice_set_value  id  value     compile_opt idl2  strictarrsubs    common    topid   findtopid id     domainid   widget_info topid  find_by_uname    domain     widget_control  domainid  get_value   boxzoom    if boxzoom 1 boxzoom 0  LT boxzoom 3 boxzoom 2  then type    y  ELSE type    x     thickid    widget_info topid  find_by_uname    thickness     widget_control  thickid  get_uvalue   thicknessuval    widget_control  thickid  get_value   thickness    thickness   thicknessuval choix thickness droplist_select     sliderid   widget_info topid  find_by_uname    slider     if type EQ  y  then BEGIN       mini   floor min glamt  glamf  max   maxi        maxi   ceil maxi thickness       widget_control  sliderid  set_value    slider_min:mini  slider_max:maxi  value:boxzoom 0  maxi                               value   mini   boxzoom 0   maxi                               value   mini   boxzoom 2    maxi   column  uname    slider                                uvalue    name: slider     ENDELSE    index   where thicknessval EQ thickness    index   index 0     if index EQ  1 then BEGIN        index   20       thicknessval 20    strtrim thickness  1        widget_control  droplistid  set_value   thicknessval       widget_control  droplistid  set_uvalue  name: thickness  choix:thicknessval     endif    widget_control  droplistid  set_value    droplist_select:index          if type EQ  xt  then begin         mini   floor min glamt glamf  max   maxi          maxi   ceil maxi       ENDIF ELSE BEGIN          mini   floor min gphit gphif  max   maxi          maxi   ceil maxi       ENDELSE          return  base end"); 
     373a[371] = new Array("./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_slider_pm.html", "cw_slider_pm.pro", "", "  PRO testwid_event  event       help  event   STRUCT      SliderBarId   widget_info event top find_by_uname    c est lui       widget_control  event id  get_uvalue uval      if n_elements uval  EQ 0 then return      case uval of          done :widget_control  event top   destroy          slider_min :BEGIN             widget_control  event id  get_value   value            widget_control  SliderBarId  set_value    slider_min:value          END          slider_max :BEGIN             widget_control  event id  get_value   value            widget_control  SliderBarId  set_value    slider_max:value          END          slider_value :BEGIN             widget_control  event id  get_value   value            widget_control  SliderBarId  set_value   value         END          get :BEGIN             widget_control  SliderBarId  get_value   value            help   value   struct            print  value slider_min_max         END         ELSE:      endcase      return   end   PRO testwid  _extra   ex      base widget_base COLUMN    print   base  base      nothing   widget_label base  value    beginning of the test           nothing   cw_slider_pm base  _extra   ex  uname    c est lui  uvalue    c est lui    print   cw_slider_pm ID   nothing          nothing   widget_label base  value    end of the test       nothing   widget_text base  value    0  uvalue    slider_min   editable       nothing   widget_text base  value    10  uvalue    slider_max   editable       nothing   widget_text base  value    5  uvalue    slider_value   editable       nothing   widget_button base  value    get  uvalue    get       nothing   widget_button base  value    done  uvalue    done       widget_control  base   REALIZE      xmanager testwid  base      return   end        file_comments        categories   Compound widget      param VALUE   It is the default tick mark value  a floating point number       returns          uses          restrictions          examples          history          version     Id: cw_slider_pm pro 163 2006 08 29 12:59:46Z navarro     FUNCTION decvalue  value     compile_opt idl2  strictarrsubs     a   float value 0    return  strtrim string floor a    0 1 indgen 10  format    f15 1  2  end        file_comments        categories   Compound widget      param VALUE   It is the default tick mark value  a floating point number       returns          uses          restrictions          examples          history          version     Id: cw_slider_pm pro 163 2006 08 29 12:59:46Z navarro     FUNCTION decind  value     compile_opt idl2  strictarrsubs     a   float value 0    return  round 10 a   floor a      computation accuracy end        file_comments        categories   Compound widget       param ID        param VALUE   It is the default tick mark value  a floating point number       returns          uses          restrictions          examples          history          version     Id: cw_slider_pm pro 163 2006 08 29 12:59:46Z navarro     PRO cw_slider_pm_set_value  id  value     compile_opt idl2  strictarrsubs     sbid   widget_info id  find_by_uname    SliderBar    dcid   widget_info id  find_by_uname    decimal    minmax   widget_info sbid   SLIDER_MIN_MAX    if size value   type  eq 8 then BEGIN   this is a structure     tagnames   tag_names value      for tag   0  n_tags value 1 do begin       case strtrim strlowcase tagnames tag  2  of          slider_min :BEGIN            IF float value slider_min 0  LT minmax 1  THEN BEGIN              minmax 0    value slider_min 0              widget_control  sbid  set_slider_min   floor float value slider_min 0              valuedc   float widget_info dcid   combobox_gettext              IF valuedc LT value slider_min THEN BEGIN               widget_control  sbid  set_value   floor float value slider_min 0                widget_control  dcid  set_value   decvalue value slider_min                widget_control  dcid  set_combobox_select   decind value slider_min              ENDIF             ENDIF          end          slider_max :BEGIN            IF float value slider_max 0  GT minmax 0  THEN BEGIN              minmax 1    value slider_max 0              widget_control  sbid  set_slider_max   ceil float value slider_max 0              valuedc   float widget_info dcid   combobox_gettext              IF valuedc GT value slider_max THEN BEGIN               widget_control  sbid  set_value   ceil float value slider_max 0                widget_control  dcid  set_value   decvalue value slider_max                widget_control  dcid  set_combobox_select   decind value slider_max              ENDIF             ENDIF          end          value :IF float value value 0  GE minmax 0              AND float value value 0  LE minmax 1  THEN value2   float value value 0          ELSE:ras   report wrong tag name in argument  value  of cw_slider_pm_set_value        endcase     endfor   ENDIF ELSE BEGIN      IF float value 0  GE minmax 0          AND float value 0  LE minmax 1  THEN value2   float value 0    ENDELSE   IF n_elements value2  NE 0 THEN BEGIN      widget_control  sbid  set_value   fix value2      widget_control  dcid  set_value   decvalue value2      widget_control  dcid  set_combobox_select   decind value2    ENDIF    return end        file_comments        categories   Compound widget        param ID        returns          uses          restrictions          examples          history          version     Id: cw_slider_pm pro 163 2006 08 29 12:59:46Z navarro     FUNCTION cw_slider_pm_get_value  id     compile_opt idl2  strictarrsubs     sbid   widget_info id  find_by_uname    SliderBar    dcid   widget_info id  find_by_uname    decimal    minmax   widget_info sbid   SLIDER_MIN_MAX    value   float widget_info dcid   combobox_gettext     return   value:value  slider_min_max:minmax  end        file_comments        categories   Compound widget       param EVENT         returns          uses          restrictions          examples          history          version     Id: cw_slider_pm pro 163 2006 08 29 12:59:46Z navarro     FUNCTION cw_slider_pm_event  event     compile_opt idl2  strictarrsubs     widget_control  event id  get_uvalue   uval     sbid   widget_info event handler  find_by_uname    SliderBar    dcid   widget_info event handler  find_by_uname    decimal    minmax   widget_info sbid   SLIDER_MIN_MAX    IF uval EQ  decimal  THEN value   float event str      ELSE value   float widget_info dcid   combobox_gettext    out   0   defaut case   case uval OF      plus : if  value   1  LE minmax 1  then value2   value   1 ELSE out   1      minus :if  value   1  GE minmax 0  then value2   value   1 ELSE out    1      SliderBar :if  event value   value   floor value  LE minmax 1  THEN value2   event value   value   floor value       decimal :BEGIN        CASE 1 OF         value GT minmax 1 : value2   minmax 1          value LT minmax 0 : value2   minmax 0          ELSE:       ENDCASE     END     ELSE:   ENDCASE   IF n_elements value2  NE 0  THEN BEGIN     value   value2     widget_control  sbid  set_value   floor value      widget_control  dcid  set_value   decvalue value      widget_control  dcid  set_combobox_select   decind value    ENDIF   return   CW_SLIDER_PM  ID:event handler  TOP:event top  HANDLER:0L                VALUE:value  OUT:OUT  end                file_comments   Like WIDGET_SLIDER but here  their are 2 buttons   and   to move the widget from   1      categories   Compound widget       param PARENT  in required    The widget ID of the parent widget       keyword UVALUE   The user value to be associated with the widget        keyword UNAME   The user name to be associated with the widget        keyword VALUE        keyword MAXIMUM          keyword MINIMUM         keyword STRMINLEN        keyword _EXTRA   Used to pass your keywords      returns   The returned value of this function is the widget ID of the   newly created animation widget       restrictions      Widget Events Returned by the CW_SLIDER_PM Widget      Slider widgets generate events when the mouse is used to change    their value  The event structure returned by the WIDGET_EVENT    function is defined by the following statement:       CW_SLIDER_PM  ID:0L  TOP:0L  HANDLER:0L  VALUE:0L  DRAG:0  OUT:0       ID is the widget ID of the button generating the event  TOP is the    widget ID of the top level widget containing ID     HANDLER contains the widget ID of the widget associated with the    handler routine     VALUE returns the new value of the slider     DRAG returns integer 1 if the slider event was generated as part of    a drag operation  or zero if the event was generated when the user    had finished positioning the slider  Note that the slider widget    only generates events during the drag operation if the DRAG keyword    is set  and if the application is running under Motif  When the    DRAG keyword is set  the DRAG field can be used to avoid    computationally expensive operations until the user releases the    slider     OUT:It is an integer which can take 3 values:          1 : If we press   when the index is already at the max         Comment: In this case  the index stay at the max          1: If we press   when the index is already at the min         Comment: In this case  the index stay at the min         0 : In other cases       Keywords to WIDGET_CONTROL       A number of keywords to the WIDGET_CONTROL procedure affect the     behavior of cw_slider_pm widget: GET_VALUE and SET_VALUE          1  GET_VALUE     widget_control wid_id get_value resultat     Send back in the result variable a structure of 2 elements whose name      are inspired from keywords we can pass at      widget_control when we use WIDGET_SLIDER:              VALUE:the value setting of the widget              SLIDER_MIN_MAX: a 2 elements array: The minimum and the              maximum value of the range encompassed by the slider         2  SET_VALUE     widget_control wid_id set_value impose     Allows to modify the state of the combobox like we can do it for      WIDGET_COMBOBOX  May impose:           a  a integer: give the new position of the slider          b  A structure which can have for elements  from 1 to 3 :               VALUE: an integer which give the new position of the slider              SLIDER_MIN:Set to a new minimum value for the specified              slider widget               SLIDER_MAX:Set to a new minimum value for the specified              slider widget         examples   See the program provided above  testwid and the associated procedure  testwid_event       history   Sebastien Masson  smasson lodyc jussieu fr                         5 9 1999      version    Id: cw_slider_pm pro 163 2006 08 29 12:59:46Z navarro        todo   seb: documenter           FUNCTION cw_slider_pm  parent  MAXIMUM   maximum  MINIMUM   minimum                            STRMINLEN   strminlen  VALUE   value  UVALUE   uvalue                            UNAME   uname  title   title  _extra   ex     compile_opt idl2  strictarrsubs      IF  N_PARAMS  NE 1  THEN MESSAGE   Incorrect number of arguments    ON_ERROR  2                    return to caller     if n_elements minimum  NE 0 then minimum   floor minimum  ELSE minimum   0   if n_elements maximum  NE 0 then maximum   ceil maximum  ELSE maximum   100   if NOT keyword_set title  then title              cheking exclusive keywords   column    keyword_set column 1 keyword_set row keyword_set vertical   xsize   lenstr   max strlen strtrim minimum  maximum  1    if keyword_set strminlen  then lenstr   strminlen   lenstr    xsize   35   mlen lenstr 1 3 lenstr lt 4    xsize   35   mlen lenstr 2    dummyid   widget_combobox base  value   decvalue minimum                                  UVALUE    decimal  UNAME    decimal                                  xoffset   xoff  yoffset   2  xsize   xsize     dummyid   widget_slider base  MAXIMUM   maximum  MINIMUM   minimum  UVALUE    SliderBar                                UNAME    SliderBar   suppress_value   drag                               yoffset   30  xsize   xoff   xsize      if keyword_set value  then cw_slider_pm_set_value  base  value     return  base end"); 
     374a[372] = new Array("./ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_specifie.html", "cw_specifie.pro", "", "       file_comments        categories   Compound widget       param ID        param VALUE   It is the default tick mark value  a floating point number       returns          uses          restrictions          examples          history          version     Id: cw_specifie pro 157 2006 08 21 09:01:50Z navarro       PRO cw_specifie_set_value  id  value     compile_opt idl2  strictarrsubs    cm_general    if size value   type  NE 8 then return    widget_control  widget_info id find_by_uname min  set_value   strtrim value min  2     widget_control  widget_info id find_by_uname max  set_value   strtrim value max  2     widget_control  widget_info id find_by_uname int  set_value   strtrim value inter  2     widget_control  widget_info id find_by_uname palnum  set_value   strtrim value lct  2     autres   extractstru value   min   max   inter   lct   nothing   xindex   yindex     if size autres   type  EQ 8 then BEGIN        autresid   widget_info id find_by_uname autres        widget_control  widget_info id  find_by_uname    autres  get_value   autresautres       autresautres   autresautres 0        if strtrim autresautres  2  NE   then begin         autresautres   createfunc get_extra    autresautres                                           filename   myuniquetmpdir  for_createfunc pro          autres   mixstru autres  autresautres        endif       autres   strkeywd autres        widget_control  widget_info id find_by_uname autres  set_value   autres    endif    return end        file_comments        categories   Compound widget       param ID        returns          uses          restrictions          examples          history          version     Id: cw_specifie pro 157 2006 08 21 09:01:50Z navarro       FUNCTION cw_specifie_get_value  id     compile_opt idl2  strictarrsubs    cm_general    widget_control  widget_info id find_by_uname min  get_value   min    min   float min 0     widget_control  widget_info id find_by_uname max  get_value   max    max   float max 0     widget_control  widget_info id find_by_uname int  get_value   int    int   float int 0     widget_control  widget_info id find_by_uname palnum  get_value   palnum    palnum   long palnum 0     widget_control  widget_info id find_by_uname autres  get_value   autres    autres   autres 0       exextra    min:min  max:max  inter:int  lct:palnum     if strtrim autres  2  NE   then         exextra   createfunc get_extra autres  _extra   exextra                                 kwdlist    exextra   exextra  exextra   exextra                                filename   myuniquetmpdir  for_createfunc pro       return  exextra end        file_comments        categories   Compound widget       param EVENT        returns          uses          restrictions          examples          history          version     Id: cw_specifie pro 157 2006 08 21 09:01:50Z navarro       FUNCTION cw_specifie_event  event     on recuper les ID des differents widgets          compile_opt idl2  strictarrsubs     widget_control  event id  get_uvalue   uval   widget_control  event top  get_uvalue   top_uvalue   smallin   extractatt top_uvalue   smallin    numdessinin   smallin 2 1   smallout   extractatt top_uvalue   smallout    numdessinout   smallout 2 1     case uval of      default :BEGIN      We find the name of the variable:        vlstid   widget_info event top  find_by_uname    varlist        fieldname   widget_info vlstid   combobox_gettext          exextra   definedefaultextra fieldname        widget_control  widget_info event handler  find_by_uname    min  set_value   strtrim exextra min  1        widget_control  widget_info event handler  find_by_uname    max  set_value   strtrim exextra max  1        widget_control  widget_info event handler  find_by_uname    int  set_value   strtrim exextra inter  1        widget_control  widget_info event handler  find_by_uname    palnum  set_value   strtrim exextra lct  1        widget_control  widget_info event handler  find_by_uname    autres  set_value         END      palcol :BEGIN        ind   fix strmid event value  0  strpos event value          widget_control  widget_info event handler  find_by_uname    palnum  set_value   strtrim ind  1      END     ELSE:   endcase   return   ID:event handler  TOP:event top  HANDLER:0L  OK:uval EQ  ok  end          file_comments        categories   Compound widget       param PARENT  in required    The widget ID of the parent widget       keyword COLUMN   Buttons will be arranged in the number of columns   specified by this keyword        keyword ROW   Buttons will be arranged in the number of rows   specified by this keyword        keyword UVALUE   The user value to be associated with the widget        keyword UNAME   The user name to be associated with the widget       keyword FRAME        keyword FORXXX         keyword _EXTRA   Used to pass your keywords         returns          uses          restrictions          examples          history          version     ID       todo   seb: documenter      FUNCTION cw_specifie  parent  ROW   row  COLUMN   column  UVALUE   uvalue  UNAME   uname  FRAME   frame  FORXXX   forxxx  _extra   ex   cheking exclusive keywords     compile_opt idl2  strictarrsubs      column   keyword_set column 1 keyword_set row     row   keyword_set row 1 keyword_set column   keyword_set row  EQ column        if NOT keyword_set uvalue  then uvalue        if NOT keyword_set uname  then uname        base   widget_base parent  space   0   frame                           EVENT_FUNC    cw_specifie_event                            FUNC_GET_VALUE cw_specifie_get_value                            PRO_SET_VALUE cw_specifie_set_value                            UVALUE   uvalue  UNAME   uname  _extra   ex       base1     base1   widget_base base     rien   widget_label base1  value    Min  xoffset    85  yoffset   15     rien   widget_label base1  value    Max  xoffset   145  yoffset   15     rien   widget_label base1  value    Int  xoffset   210  yoffset   15       lct  get_name   nomcouleur    nbrligne   30    nbrlist   n_elements nomcouleur nbrligne    nomcouleur   strtrim sindgen n_elements nomcouleur  1   nomcouleur    nomcouleur    0 nomcouleur    nomcouleur    1 Color  nomcouleur     if nbrlist GT 1 then for i   1 nbrlist do       nomcouleur    nomcouleur 0:nbrligne i 1 i   1    nomcouleur nbrligne i i:n_elements nomcouleur 1     rien   cw_pdmenu base1  nomcouleur   RETURN_NAME   uvalue    palcol  uname    palcol  xoffset   250  yoffset   0    base2    base2   widget_base base  column   4 keyword_set forxxx  yoffset   30     if keyword_set forxxx  then rien   widget_button base2 value Default  uvalue    default   frame  tooltip    see  find definedefaultextra 0     rien   widget_text base2  value      editable  xsize   7  uname    min  uvalue    min     rien   widget_text base2  value      editable  xsize   7  uname    max  uvalue    max     rien   widget_text base2  value      editable  xsize   7  uname    int  uvalue    int     if keyword_set forxxx  then colvalue     ELSE colvalue    39     rien   widget_text base2  value   colvalue   editable  xsize   2  uname    palnum  uvalue    palnum       widget text containig other keywords pass into top_uvalue exextra   Does it remain some  If yes  we have to put them as string        rien   widget_text base  value         editable  uname    autres  uvalue    autres  xsize   54  ysize   3  yoffset   65   wrap   no_newline       if keyword_set forxxx  then cw_specifie_set_value  base  definedefaultextra rien_du_tout        return  base end "); 
     375a[373] = new Array("./ToBeReviewed/WIDGET/findtopid.html", "findtopid.pro", "", "             file_comments   Find  from an Id of widget  the Id of the widget which is     the top level base   i e  it has no parent      categories   widget       param WIDGET_ID   This argument should be the widget ID of the   widget for which information is desired       returns   The Id of the widget which is  the top level base       history   Sebastien Masson  smasson lodyc jussieu fr                         22 9 1999      version    Id: findtopid pro 157 2006 08 21 09:01:50Z navarro             FUNCTION findtopid   WIDGET_ID     compile_opt idl2  strictarrsubs      id   long WIDGET_ID       exist   widget_info id   managed       if exist EQ 0 then return    1    topid   id    topid2   id    while topid2 NE 0 do begin       topid   topid2       topid2   widget_info topid2   parent     endwhile    return   long topid  end"); 
     376a[374] = new Array("./ToBeReviewed/WIDGET/slec.html", "slec.pro", "", "     file_comments        categories         param NAME        param DEBUT        param FIN        param NOMEXP         keyword PARENT  in required    The widget ID of the parent widget       keyword BOXZOOM   Vector indicating the geographic zone on which we want to cut the map     If BOXZOOM has :      1 element : The extraction is made on  lon1  lon2  lat1  lat2  0 boxzoom 0      2 elements: The extraction is made on  lon1  lon2  lat1  lat2  boxzoom 0 boxzoom 1      4 elements: The extraction is made on  Boxzoom  0  max gdept  gdepw      5 elements: The extraction is made on  Boxzoom 0:3  0  Boxzoom 4      6 elements: The extraction is made on Boxzoom    Where lon1  lon2 lat1 lat2 are global variables defined at the last domdef       keyword _EXTRA   Used to pass your keywords          returns          uses          restrictions          examples          history          version     Id: slec pro 150 2006 08 09 10:12:54Z navarro        todo   Seb: documenter     FUNCTION slec name debut fin  nomexp  PARENT   parent  BOXZOOM boxzoom  _EXTRA   ex     include common     compile_opt idl2  strictarrsubs    cm_4data   IF NOT keyword_set key_forgetold  THEN BEGIN  updatenew  updatekwd   ENDIF       case n_params  of       1:tab   nlec name  PARENT   parent  BOXZOOM boxzoom  _EXTRA   ex        2:tab   nlec name debut  PARENT   parent  BOXZOOM boxzoom  _EXTRA   ex        3:tab   nlec name debut fin  PARENT   parent  BOXZOOM boxzoom  _EXTRA   ex        4:tab   nlec name debut fin  nomexp  PARENT   parent  BOXZOOM boxzoom  _EXTRA   ex     endcase      return   tab:tab  grille:vargrid  unite:varunit  experience:varexp  nom:varname  end"); 
     377a[375] = new Array("./ToBeReviewed/WIDGET/xnotice.html", "xnotice.pro", "", "             file_comments   Create a widget with some text at the middle of the window      categories   Information       param TEXT  in required type string vector or scalar    it is a string or a vector of string  If it is a scalar  we    look for the line separator  C to create a text with several lines       keyword CHKWIDGET   Force to verify that they are some active widget to create a widget     otherwise print at the prompt      returns   The identity of the created widget      restrictions    It do not call xmanager   It do not create any event     We have to delete this widget manuelly:   widget_control  widgetid   destroy      examples      IDL  id xnotice ca marche  C ou pas       IDL  widget_control  id   destroy      history   Sebastien Masson  smasson lodyc jussieu fr                         2000 3 17      version    Id: xnotice pro 163 2006 08 29 12:59:46Z navarro             FUNCTION xnotice  text  CHKWIDGET   chkwidget     We separate the text in different lines  separated by  C  if it is not done yet    n est pas deja fait      compile_opt idl2  strictarrsubs      if n_elements text  EQ 1 then text   str_sep text   C   trim       if keyword_set chkwidget  then makewid    widget_info managed 0 ELSE makewid   1      if makewid EQ 0 then BEGIN       for i   0   n_elements text 1 do print  text i        noticebase   0    endif      noticebase   widget_base column  title    information   align_center     screensize   get_screen_size     widget_control  noticebase  tlb_set_xoffset   screensize 0 2 2  tlb_set_yoffset   screensize 1 2 2    nothing   widget_label noticebase  value          for i   0   n_elements text 1 do nothing   widget_label noticebase  value   text i     nothing   widget_label noticebase  value          widget_control noticebase realize      return  noticebase end"); 
     378a[376] = new Array("./ToBeReviewed/WIDGET/xquestion.html", "xquestion.pro", "", "     file_comments        categories         param EVENT        returns          uses          restrictions          examples          history          version     Id: xquestion pro 163 2006 08 29 12:59:46Z navarro       pro xquestion_event  event     compile_opt idl2  strictarrsubs     we get the answer    widget_control  widget_info event top  find_by_uname    text          get_value   answer   answer   answer 0    now we give the answer to xquestion pro by using the pointer uvalue    widget_control  event top  get_uvalue   ptranswer     ptranswer   answer   we destroy the widget    widget_control  event top   destroy    return end                file_comments   A small widget who ask a question and give an answer      WARNING: For a binary question with yes no answer use     DIALOG_MESSAGE       categories   Widget      param QUESTION   A scalar string or a array of string  If this   argument is set to :          an array of strings: each array element is          displayed as a separate line of text           a scalar string: we are looking for the  separate line          character   C       param PROPOSEDANSWER  type string    A string proposing a answer        keyword CHKWIDGET   Active this keyword if you want that xquestion   check if managed widget are present  If not  xquestion do not   open a widget but print the question in the IDL window        keyword _EXTRA   Used to pass your keywords       returns   answer: a string      restrictions   The function does not return to its caller until the user   press  Enter  key in the widget       examples   IDL  help  xquestion Postscript name        STRING       toto ps       history   Sebastien Masson  smasson lodyc jussieu fr                         13 10 1999      version    Id: xquestion pro 163 2006 08 29 12:59:46Z navarro             FUNCTION xquestion  question  proposedanswer  CHKWIDGET   chkwidget  _extra   ex       compile_opt idl2  strictarrsubs     is separate line a scalar  we must cut it into pieces      if n_elements question  EQ 1 then question   str_sep question   C   trim    is a widget necessary     if keyword_set chkwidget  then BEGIN       if  widget_info managed 0  EQ 0 then BEGIN          if n_elements proposedanswer  EQ 0 then BEGIN              proposedanswer                 answer                 complete              ENDIF ELSE BEGIN              answer   proposedanswer             complete    default answer is  proposedanswer             ENDELSE          if n_elements question  GT 1 THEN             for i   0  n_elements question 2 do print question i            read  question n_elements question 1   complete   answer          if keyword_set answer  EQ 0 then answer   proposedanswer          return  answer       endif    endif   definition of the widget    BaseId   widget_base column  title    Question  _extra   ex     screensize   get_screen_size     widget_control  BaseId  tlb_set_xoffset   screensize 0 2 2  tlb_set_yoffset   screensize 1 2 2    for i   0   n_elements question 1 DO trash   widget_label BaseId  value   question i   align_left     if n_elements proposedanswer  EQ 0 then answer     ELSE answer   proposedanswer    trash   widget_text BaseId  value   answer   editable  _extra   ex  uname    text     trash   widget_button BaseId  value    ok     ptranswer   ptr_new allocate_heap     widget_control  BaseId  set_uvalue   ptranswer   we realize the widget and wait for an answer    widget_control BaseId realize    xmanager xquestion BaseId   we get the answer    answer    ptranswer   we freeing the pointer    ptr_free  ptranswer      return  answer end"); 
     379a[377] = new Array("./ToBeReviewed/WIDGET/xx.html", "xx.pro", "", "     file_comments        categories         keyword JOUR          keyword MESHFILENAME          keyword LISTVAR          keyword LISTGRID          keyword FUNCLEC_NAME           keyword CALENDAR          keyword _EXTRA   Used to pass your keywords          uses          restrictions          examples          history          version     Id: xx pro 157 2006 08 21 09:01:50Z navarro        todo   seb documenter       PRO xx   JOUR   jour  MESHFILENAME   meshfilename   LISTVAR   listvar  LISTGRID   listgrid  FUNCLEC_NAME   funclec_name  CALENDAR   calendar  _extra   ex     compile_opt idl2  strictarrsubs    common        Name of the part to be changed       Name of the reading function    if NOT keyword_set funclec_name  then funclec_name    slec     varexp    INF    list of variables    if NOT keyword_set listvar  then listvar    tn sn un vn   taux   tauy hdep20 hdep28 hdep15 hturb hpycn htoth emp qn qs   smltot11   smltot12   smltot13   smltot14   smltot15   smltot16   tmltot11   tmltot12   tmltot13   tmltot14   tmltot15   tmltot16    list of grids to which variables refer to     if NOT keyword_set listgrid  then BEGIN        listgrid   replicate T  n_elements listvar        listgrid 2  4     U        listgrid 3  5     V     ENDIF   calendar to be used  in IDL julian days            if NOT keyword_set calendar  then BEGIN            if keyword_set jour  then calendar   calendriertotem julian_day  ELSE calendar   calendriertotem julian_day   mensuel         ENDIF   Name of the file refering to the mask    if NOT keyword_set meshfilename  then meshfilename    usr1 com smasson IDL INIT inittotem pro        meshparameters   whichgrid meshfilename    parameters specifing how the field must be read    readparameters   funclec_name: funclec_name                         jpidta: jpidta  jpjdta: jpjdta  jpkdta: jpkdta                         ixmindta: ixmindta  ixmaxdta: ixmaxdta                         iymindta: iymindta  iymaxdta: iymaxdta                         izmindta: izmindta  izmaxdta: izmaxdta           End of the part to be change            fileparameters    filename:  many                            time_counter: calendar                          listvar: listvar                          listgrid: strupcase listgrid       multistructure    fileparameters: temporary fileparameters                    readparameters: temporary readparameters                    meshparameters: temporary meshparameters       xxx  multistructure   temporary multistructure  _extra   ex     return end"); 
     380a[378] = new Array("./ToBeReviewed/WIDGET/xxx.html", "xxx.pro", "", "     file_comments   see Mini Guide for Basic Commands in the XXX Program      categories         param EVENT        returns          uses          restrictions          examples          history          version     Id: xxx pro 192 2006 09 22 09:37:08Z smasson     PRO xxx_event  event       compile_opt idl2  strictarrsubs    common          widget_info event top find_by_uname       What is the type of evenment       if event id EQ 622 then help   event    struct    widget_control  event id  get_uvalue uval    if  tag_names event   structure_name 0  EQ  WIDGET_TRACKING  then uval    name: ActiverFenetre     if keyword_set uval  EQ 0 then return  help   event   struct  help  uval    struct   case on the type of evenment    widget_control  event top  get_uvalue   top_uvalue   If we activate the keyword separate at the call of xxx    if size top_uvalue   type  EQ 3 then begin       event top   top_uvalue       widget_control  event top  get_uvalue   top_uvalue    endif   we delete the small widget created by notice pro if it exists    noticebase   extractatt top_uvalue   noticebase     if noticebase NE 0 then BEGIN       widget_control  noticebase   destroy        top_uvalue 1  findline top_uvalue   noticebase    0l    endif      options   extractatt top_uvalue   options     case uval name OF        menubar :xxxmenubar_event  event        ok :nouveaudessin   1        specifie :        action :        calendar1 :BEGIN          date2id   widget_info event top  find_by_uname    calendar2           widget_control  date2id  get_value   date2          if event value GT date2 then widget_control  date2id  set_value   event value       END        calendar2 :BEGIN          date1id   widget_info event top  find_by_uname    calendar1           widget_control  date1id  get_value   date1          if event value LT date1 then widget_control  date1id  set_value   event value       END        domain :        varlist :BEGIN          currentfile    extractatt top_uvalue   currentfile           listvar    extractatt top_uvalue   fileparameters currentfile listvar          name   listvar event index           changefield  event top  name       END        txtcmd :        filelist :BEGIN          changefile  event top  event index       END        ActiverFenetre :BEGIN          if event enter EQ 1 AND  d name NE  PS  then BEGIN              graphid   widget_info event top find_by_uname    graph              graphid   extractatt top_uvalue   graphid              widget_control graphid get_value win             wset  win             widget_control event top get_uvalue top_uvalue             numdessinin    extractatt top_uvalue   smallin 2 1              p    extractatt top_uvalue   penvs numdessinin               x    extractatt top_uvalue   xenvs numdessinin               y    extractatt top_uvalue   yenvs numdessinin           endif       END        graph :BEGIN          quelclick   identifyclick event           case quelclick type of              inutile :return              long :longclickaction  event              single :singleclickaction  event              double :doubleclickaction  event          endcase       END    endcase    if keyword_set nouveaudessin  then letsdraw  event top    return end                    file_comments   A maximum of possibilities with a minimum of clics      categories   Widget       param DATAFILENAME        param IDLFILE        param ARGSPRO        keyword SEPARATE   To separate the button part and the drawing part in 2 windows    Useful for small screens  but be careful to do not saturate the    video memory of some antiquated Tx       keyword RESTORE    toto dat  or toto dat is a file created at the time of a precedent    use of xxx thanks to the command  Widget  of the menu  save as        keyword _EXTRA   Used to pass your keywords      keyword CALLERWIDID        keyword REDRAW         keyword SEPARATE        keyword UVALUE    The user value to be associated with the widget       uses   common pro      history   Sebastien Masson  smasson lodyc jussieu fr       version    Id: xxx pro 192 2006 09 22 09:37:08Z smasson        todo   seb: documenter le reste des keywords                 PRO xxx  datafilename  idlfile  argspro  CALLERWIDID   CallerWidId              REDRAW   redraw  SEPARATE   separate  UVALUE   uvalue              RESTORE   restore  _EXTRA   ex       compile_opt idl2  strictarrsubs    all_cm     reinitialize the  p   x   y   z variables     reinitplt     we get back the uvalue of the widget that called xxx to create a new widget   if keyword_set restore  then BEGIN     restore   isafile filename   restore  iodir   homedir  _extra   ex      if size restore   type  NE 7 then restore   0 ELSE BEGIN        restore  isafile file   restore  iodir   homedir  _extra   ex        newgrid    extractatt uvalue   meshparameters 0        change   changegrid newgrid      ENDELSE    endif   if n_elements CallerWidId  NE 0 THEN        widget_control  CallerWidId  get_uvalue   uvalue ELSE CallerWidId   0       list of files we want to look at     if keyword_set uvalue  then BEGIN      currentfile   extractatt uvalue   currentfile      filelist   extractatt uvalue   filelist      fileparameters   extractatt uvalue   fileparameters      readparameters   extractatt uvalue   readparameters      meshparameters   extractatt uvalue   meshparameters    ENDIF ELSE BEGIN     newfile   selectfile datafilename  idlfile  argspro  _extra   ex      if size newfile   type  NE 8 then return     fileparameters   ptrarr 1   allocate_heap       fileparameters 0    newfile fileparameters     readparameters   ptrarr 1   allocate_heap       readparameters 0    newfile readparameters     meshparameters   ptrarr 1   allocate_heap       meshparameters 0    newfile meshparameters     currentfile   0     filelist   newfile fileparameters filename   ENDELSE     if keyword_set uvalue  THEN BEGIN      smallin   extractatt uvalue   smallin      smallout   extractatt uvalue   smallout    ENDIF ELSE BEGIN      smallin    1  1  1      smallout    1  1  1    ENDELSE    nbredessin   smallin 0 smallin 1    numdessinin   smallin 2 1   warning flg definition must be consistent with cw_pdmenu argument   see also flag definition in cw_pagelayout   if keyword_set uvalue  then BEGIN      flag   extractatt uvalue   optionsflag      key_portrait   flag 0  numdessinin    ENDIF ELSE flag    key_portrait  0  0  0  0 replicate 1  nbredessin         We start the widget definition         widget and screen size   scrsize   get_screen_size 0 95   windsize   givewindowsize    xxxsize    windsize 0     1 keyword_set separate    350  windsize 1        The top base     IF xxxsize 0  LE scrsize 0  AND xxxsize 1  LE scrsize 1  THEN BEGIN      base   widget_base title    xxx  GROUP_LEADER   group   tracking_events                            uname    base  space   0    ENDIF ELSE BEGIN      base   widget_base title    xxx  GROUP_LEADER   group   tracking_events                            uname    base  space   0                            xsize   xxxsize 0  ysize   xxxsize 1                             x_scroll_size    xxxsize 0   selectact    ENDIF ELSE selectfile   0      menu options     xoff   xoff   110   if keyword_set uvalue  then begin     options   extractatt uvalue   options    ENDIF ELSE options    Portrait Landscape   Overlay   Vecteur                               Longitude   x index   Latitude   y index      desc      1 File                 0 Open                   0 New xxx                   2 Quit                 1 Save as                   0 PostScript                   0 Animated gif                   0 Gif                   0 IDL procedure                 0 RESTORE kwd of xxx                 2 Print to prompt                 1 Flag options     descsuite   options    if n_elements descsuite  GE 2 then       descsuite 0:n_elements descsuite 2     0 descsuite 0:n_elements descsuite 2     descsuite n_elements descsuite 1     2 descsuite n_elements descsuite 1     desc    desc  descsuite       menu   cw_pdmenu base  desc   RETURN_NAME  uname    menubar  uvalue    name: menubar                          xoffset   xoff  yoffset   yoff       Ok button     yoff   yoff   37   xoff   5   boutton  OK    baseok   widget_button base  value     OK   uvalue    name: ok  uname    ok button                                frame  xoffset   xoff  yoffset   yoff       Page Layout     page layout   xoff   xoff   65   dummyid   cw_pagelayout base  smallin   row   frame  xoffset   xoff  yoffset   yoff        List of Variables     xoff   xoff   140   currentlistvar    fileparameters currentfile listvar   vlstid   widget_combobox base  value   currentlistvar  uvalue    name: varlist                                 uname    varlist  xoffset   xoff  yoffset   yoff 1    if keyword_set uvalue  then BEGIN     selectvar    extractatt uvalue   varinfo 1  numdessinin      selectvar    where currentlistvar EQ selectvar 0      widget_control  vlstid  set_combobox_select   0   selectvar    ENDIF ELSE selectvar   0     List of files     yoff   yoff   35   flstid   widget_combobox base  value   file_basename filelist  uname    filelist                                 xsize   345  yoffset   yoff  uvalue    name: filelist    if keyword_set uvalue  then BEGIN     selectfile    extractatt uvalue   varinfo 0  numdessinin      selectfile    where file_basename filelist  EQ selectfile 0      widget_control  flstid  set_combobox_select   0   selectfile    ENDIF ELSE selectfile   0     Text for computation     yoff   yoff   32   computation done on the files    if keyword_set uvalue  then txtvalue    extractatt uvalue   txtcmd numdessinin      ELSE txtvalue       varexp       dummyid   widget_text base  value   txtvalue  uvalue    name: txtcmd  uname    txtcmd                               editable  yoffset   yoff  xsize   54   frame      Calendar     yoff   yoff   40   currentcalendar    fileparameters currentfile time_counter   key_caltype    fileparameters currentfile caltype   fakecal    fileparameters currentfile fakecal   if keyword_set uvalue  then begin     dates    extractatt uvalue   dates  numdessinin      date1   date2jul dates 0      date2   date2jul dates 1    ENDIF   basecalid   widget_base base  column   2  space   0  yoffset   yoff  uname    basecal    dummyid   cw_calendar basecalid  currentcalendar  date1  FAKECAL   fakecal  uname    calendar1  uvalue    name: calendar1   frame    dummyid   cw_calendar basecalid  currentcalendar  date2  FAKECAL   fakecal  uname    calendar2  uvalue    name: calendar2   frame      Domain      yoff   yoff   60   vargrid   strupcase fileparameters currentfile listgrid selectvar    IF vargrid EQ  W  then zgrid    W  ELSE zgrid    T    if keyword_set uvalue  then boxzoom    extractatt uvalue   domaines  numdessinin    dummyid   cw_domain base  uname    domain  uvalue    name: domain   unzoom   frame                           boxzoom   boxzoom  yoffset   yoff  xoffset   15      Plots specifications     yoff   yoff   230   speid   cw_specifie base  uname    specifie  uvalue    name: specifie   frame   column                            forxxx  yoffset   yoff    if keyword_set uvalue  then BEGIN     exextra    extractatt uvalue   exextra numdessinin      IF n_elements exextra  NE 0 THEN widget_control  speid  set_value   exextra   ENDIF     drawing part     if keyword_set separate  then        basegraph   widget_base title    xxx window   group_leader   base  uvalue   base      ELSE basegraph   base      graphid   widget_draw basegraph  uname    graph   button_events  retain   2                             uvalue    name: graph  press:0  click:0  x: 0  0  y: 0  0                              xoffset   350 1 keyword_set separate                              xsize   windsize 0  ysize   windsize 1    tooltip    toto      realize the widget     widget_control  base   realize   if keyword_set separate  then begin     widget_control  basegraph   realize     xmanager   xxx  basegraph   no_block   endif      if keyword_set uvalue  then BEGIN     We recopy the pointer uvalue in top_uvalue    Beware  we have to redefine completely top_value from variables    pointed by uvalue  Otherwise  if we simply do top_value   uvalue     when we delete by uvalue and variables on which it point  we    also delete variables on which point top_value      case 1 of       keyword_set redraw :BEGIN         top_uvalue   uvalue         widget_control  base  set_uvalue   top_uvalue   we find homedir         homedir   isadirectory io   homedir  title    Bad definition of homedir    We recuperae the list of instructions         globalcommand   extractatt top_uvalue   globalcommand    We complete by first and last lines of the program         createpro  globalcommand  filename   myuniquetmpdir    xxx2ps pro                         KWDLIST     NOERASE   noerase  POSTSCRIPT   postscript                         PORTRAIT   portrait  LANDSCAPE   landscape                          noerase       END       keyword_set restore :begin         top_uvalue   uvalue         widget_control  base  set_uvalue   top_uvalue         widget_control  graphid  get_value   win         wshow  win         wset  win         tv  image   true   widgets s state         updatewidget  base          END       ELSE:BEGIN         top_uvalue   ptrarr 2  29   allocate_heap          FOR i    0  28 do  top_uvalue 0  i     uvalue 0  i          FOR i    0  14 do  top_uvalue 1  i     uvalue 1  i          FOR i   18  27 do  top_uvalue 1  i     uvalue 1  i          numfile   n_elements extractatt uvalue   filelist            top_uvalue 1  15    ptrarr numfile   allocate_heap           top_uvalue 1  16    ptrarr numfile   allocate_heap           top_uvalue 1  17    ptrarr numfile   allocate_heap          for i   0  numfile 1 do begin            top_uvalue 1  15 i     uvalue 1  15 i              top_uvalue 1  16 i     uvalue 1  16 i              top_uvalue 1  17 i     uvalue 1  17 i           endfor          top_uvalue 1  28    ptrarr nbredessin   allocate_heap          for i   0  nbredessin 1 do  top_uvalue 1  28 i     uvalue 1  28 i           widget_control  base  set_uvalue   top_uvalue   Copy the screen of the widget of uvalue in top_value s one         if keyword_set CallerWidId   then begin           widget_control  extractatt uvalue   graphid  get_value   win           wshow  win           wset  win           image   tvrd true            widget_control  graphid  get_value   win           wshow  win           wset  win           tv  image   true         ENDIF       END     endcase      top_uvalue 1  findline top_uvalue   graphid    graphid   ENDIF ELSE BEGIN   Otherwise we will define all elements we will hook at the widget    thanks to the top_value which is a pointer array with 2    columns: names and variables     We initialize all these elements    Variables concerning the widget in its generality      if NOT keyword_set ex   then ex    nothing:0    variables se rapportant aux differents fichiers que l on peut lire   variables specifiques a chaque dessin                creation of the pointer we will hook at the widget      top_uvalue   ptrarr 2  29   allocate_heap    variables refering to the widget      top_uvalue 0  0     options     top_uvalue 1  0    options      top_uvalue 0  1     smallin     top_uvalue 1  1    smallin      top_uvalue 0  2     smallout     top_uvalue 1  2    smallout      top_uvalue 0  3     graphid     top_uvalue 1  3    graphid      top_uvalue 0  4     alreadyvector     top_uvalue 1  4     1      top_uvalue 0  5     alreadyover     top_uvalue 1  5     1      top_uvalue 0  6     alreadyread     top_uvalue 1  6     1      top_uvalue 0  7     currentreadcmd     top_uvalue 1  7           top_uvalue 0  8     globalcommand     top_uvalue 1  8           top_uvalue 0  9     globaloldcommand     top_uvalue 1  9           top_uvalue 0  10     no more used     top_uvalue 1  10    9999      top_uvalue 0  11     noticebase     top_uvalue 1  11    0l      top_uvalue 0  12     extra     top_uvalue 1  12    ex   variables refering to different files we can read      top_uvalue 0  13     currentfile     top_uvalue 1  13    currentfile      top_uvalue 0  14     filelist     top_uvalue 1  14    filelist      top_uvalue 0  15     fileparameters     top_uvalue 1  15    fileparameters      top_uvalue 0  16     readparameters     top_uvalue 1  16    readparameters      top_uvalue 0  17     meshparameters     top_uvalue 1  17    meshparameters   variables refering to different drawing we can do      top_uvalue 0  18     penvs     top_uvalue 1  18    replicate p  nbredessin       top_uvalue 0  19     xenvs     top_uvalue 1  19    replicate x  nbredessin       top_uvalue 0  20     yenvs     top_uvalue 1  20    replicate y  nbredessin       top_uvalue 0  21     nameprocedures     top_uvalue 1  21    strarr nbredessin       top_uvalue 0  22     types     top_uvalue 1  22    strarr nbredessin       top_uvalue 0  23     varinfo     top_uvalue 1  23    strarr 2  nbredessin           top_uvalue 0  24     domaines     top_uvalue 1  24    fltarr 6  nbredessin       top_uvalue 0  25     dates     top_uvalue 1  25    lonarr 2  nbredessin       top_uvalue 0  26     txtcmd     top_uvalue 1  26    strarr nbredessin       top_uvalue 0  27     optionsflag     top_uvalue 1  27    flag      top_uvalue 0  28     exextra     top_uvalue 1  28    ptrarr nbredessin   allocate_heap        widget_control  base  set_uvalue   top_uvalue     createhistory  base  smallin     ENDELSE      xmanager   xxx  base   no_block        return end"); 
     381a[379] = new Array("./Utilities/createfunc.html", "createfunc.pro", "", "           file_comments   write an IDL function  compile it and execute it    useful to avoid the use of execute      param command  in required     a scalar string defining the result to be given back by the function      see examples       keyword FILENAMEIN  in   default for_createfunc pro    name of the function to be created       keyword KWDLIST  in     a vector string  to specify a list of keywords that must be included in the    function definition     Warning: the string must start with a      for example: KWDLIST     TOTO   toto       keyword _EXTRA    used to pass your keywords to the created function       restrictions     arguments can be given only through keywords      ends the function name with  pro  if needed       examples   IDL  print  createfunc 3 2  filename test    IDL  print  createfunc 3 two  filename    test      IDL                             kwdlist  two   two  two   2       history Sebastien Masson  smasson lodyc jussieu fr                         May 2005      version  Id: createfunc pro 136 2006 07 10 15:20:19Z pinsard             FUNCTION createfunc  command  FILENAMEIN   filenamein                    KWDLIST   kwdlist  _EXTRA   ex     compile_opt idl2  hidden  strictarrsubs     IF n_elements command  NE 1 THEN stop   define filename if needed   if NOT keyword_set filenamein  then filename    for_createfunc pro      ELSE filename   filenamein   get the name of the function  not the name of the file containing the function     shortfilename    file_basename filename   pro    check if the directory exists    dirname   isadirectory file_dirname filename                                title    Redefine  shortfilename pro directory     IF size dirname   type  NE 7 THEN return   1      filename   dirname   shortfilename    pro    create the file    if NOT keyword_set kwdlist  then kwdlist        kwdlist   kwdlist     _EXTRA   ex     IF strmid kwdlist  0  1  NE   THEN kwdlist          kwdlist    putfile  filename   function     shortfilename   kwdlist                             compile_opt idl2  hidden  strictarrsubs                              res       command                             return  res                              end    go in dirname directory    cd  dirname  current   old_dir   compile it    resolve_routine  shortfilename   is_function    cd  old_dir   execute it    res   call_function shortfilename  _EXTRA   ex       return  res end"); 
     382a[380] = new Array("./Utilities/createpro.html", "createpro.pro", "", "           file_comments   write an idl procedure  compile it and execute it       param command  in required type string array    a string array defining the procedure to be created     each element will be a line of the created procedure       keyword FILENAMEIN  in   default for_createpro pro    name of the procedure to be created       keyword KWDLIST  in     a vector string     to specify a list of keywords that must be included in the procedure    definition     Warning: the string must start with a      for example: KWDLIST     TOTO   toto       keyword KWDUSED    obsolete  please pass directly your keywords through _EXTRA      keyword _EXTRA    used to pass your keywords to the created procedure       restrictions     is not working with functions  use createfunc instead      arguments can be given only through keywords      ends the procedure name with  pro  if needed       examples   IDL  createpro   print OK  filename test    IDL  createpro   if keyword_set ok  then print OK  else print   No      IDL      filename    test  kwdlist   ok   ok    IDL  createpro   if keyword_set ok  then print OK  else print   No      IDL      filename    test  kwdlist     ok   ok   ok      history Sebastien Masson  smasson lodyc jussieu fr    cleaning   new keywords: October 2005   Feb  2006: supress keyword  kwdused  and use call_procedure instead of execute      version  Id: createpro pro 163 2006 08 29 12:59:46Z navarro           PRO createpro  command  FILENAMEIN   filenamein                    KWDLIST   kwdlist  KWDUSED   kwdused  _EXTRA   ex     compile_opt idl2  hidden  strictarrsubs     IF keyword_set kwdused  THEN BEGIN     dummy   report keyword KWDUSED has been suppressed                           please pass directly your keywords through _extra                           see examples in createpro header      return   ENDIF   define filename if needed   if NOT keyword_set filenamein  then filename    for_createpro pro      ELSE filename   filenamein   get the name of the procedure  not the name of the file containing the procedure     shortfilename    file_basename filename   pro    check if the directory exists    dirname   isadirectory file_dirname filename                                title    Redefine  shortfilename pro directory     IF size dirname   type  NE 7 THEN return      filename   dirname   shortfilename    pro    create the file    if NOT keyword_set kwdlist  then kwdlist        kwdlist   kwdlist     _extra   ex     kwdlist   strtrim kwdlist  2     IF strmid kwdlist  0  1  NE   THEN kwdlist          kwdlist    for i   0  n_elements command 1 do print  command i     putfile  filename   pro     shortfilename   kwdlist                             compile_opt idl2  hidden  strictarrsubs  command   return   end    go in dirname directory    cd  dirname  current   old_dir   compile it    resolve_routine  shortfilename    cd  old_dir   execute it    call_procedure  shortfilename  _extra   ex      return end"); 
     383a[381] = new Array("./Utilities/def_myuniquetmpdir.html", "def_myuniquetmpdir.pro", "", "     file_comments   if needed  define and create myuniquetmpdir    common variable from cm_general  and add it to  path      categories    Utilities      examples   IDL  def_myuniquetmpdir      uses cm_general      history Sebastien Masson  smasson lodyc jussieu fr                         June 2005      version  Id: def_myuniquetmpdir pro 157 2006 08 21 09:01:50Z navarro       PRO def_myuniquetmpdir     compile_opt idl2  strictarrsubs    cm_general    IF n_elements myuniquetmpdir  EQ 0 THEN BEGIN   define a new and unique directory in getenv IDL_TMPDIR  by using systime 1    look for the login if we use  unix  system     IF  d name EQ  X  THEN spawn   whoami  login   noshell ELSE login    idl      myuniquetmpdir   file_search getenv IDL_TMPDIR   mark_directory      myuniquetmpdir   myuniquetmpdir 0    login 0                            strtrim long systime 1  1        create it     file_mkdir  myuniquetmpdir   add it to  path      path    path   :    expand_path myuniquetmpdir    ENDIF      return end"); 
     384a[382] = new Array("./Utilities/demomode_compatibility.html", "demomode_compatibility.pro", "", "     categories Utilities    uses cm_general    version  Id: demomode_compatibility pro 157 2006 08 21 09:01:50Z navarro     PRO demomode_compatibility     compile_opt idl2  strictarrsubs       cm_general     1  remove all cm_demomode_used pro found in  path   to_rm   find cm_demomode_used    IF to_rm 0  NE  NOT FOUND  THEN file_delete  to_rm     2  copy oldcm_full _empty  to myuniquetmpdir oldcm_used pro    select which file should be copied to oldcm_used pro   IF lmgr demo  EQ 1 THEN BEGIN      democm   find cm_demomode       file_copy  democm  myuniquetmpdir    cm_demomode_used pro   overwrite   ENDIF ELSE BEGIN   create an empty file    close the journal if already open     IF  journal NE 0 THEN journal   open a new one     journal  myuniquetmpdir    cm_demomode_used pro    close it   it will be empty      journal   ENDELSE    return END"); 
     385a[383] = new Array("./Utilities/find.html", "find.pro", "", "           file_comments   based on file_search  but it is possible to specify   a set of possibles names and a different set of   possibles directories names    By default look for files included in  path     all file_search keywords can be used       categories find a file      param FILEIN  in required     A scalar or array variable of string type  containing   file names to match  Input names specifications may contain   wildcard characters  enabling them to match multiple files    see file_search for more informations  By default and if   necessary  find is looking for filename and also for filename   completed with  pro       keyword FIRSTFOUND    activate this keyword to stop looking for the file as soon as we found one       keyword IODIRECTORY  default path     A scalar or array variable of string type  containing   directories names where we are looking for the file    Different directories can be separated by   path_sep search_path   :  on unix type machine  as it is done   to define  path    Note that if filename s dirname is different from   this   keyword is not taken into account       keyword LOOKALLDIR    activate to look for the file  with a recursive search if needed    in   iodir  homedir   path   the DATA:TestsData directory if it exists       keyword NOPRO    activate to avoid the automatic search of filename completed with  pro       keyword ONLYPRO    force to look only at file ending with  pro      keyword ONLYNC    force to look only at file ending with  nc      keyword RECURSIVE    performs recursive searching of directory hierarchies    In a recursive search  find looks recursively for any and all   subdirectories in the file hierarchy rooted at the IODIRECTORY argument       keyword REPERTOIRE    obsolete  keep for compatibility  use directory keyword      keyword UNIQUE    activate to make sure that each element of the output vector is unique       keyword TRYFIND    if the file was not found and this keyword is activated  find will call   itself with the keywords  LOOKALLDIR and  FIRSTFOUND to try to find   the file we are looking for  Note that if the file was found at the   first try this keyword as no effect  which is not the case with LOOKALLDIR        keyword _EXTRA    used to pass your keywords      returns    A scalar or array variable of string type  containing the   name  with the full path of the matching files  If no files   exist with names matching the input arguments  find returns   the scalar string :  NOT FOUND       examples     IDL  print  find loadct       usr local rsi idl_6 0 lib utilities xloadct pro      usr local rsi idl_6 0 lib loadct pro   IDL  print  find loadct  iodir dir recursive       usr local rsi idl_6 0 lib loadct pro      usr local rsi idl_6 0 lib utilities xloadct pro   IDL  print  find loadct pro       usr local rsi idl_6 0 lib utilities xloadct pro      usr local rsi idl_6 0 lib loadct pro   IDL  print  find loadct nopro      NOT FOUND   IDL  print  find loadct  iodir    usr local rsi idl_6 0 lib       usr local rsi idl_6 0 lib loadct pro   IDL  print  find loadct  iodir    usr local rsi idl_6 0 lib   test_write      NOT FOUND   IDL  print  find loadct  iodir    usr local rsi idl_6 0 lib   recursive       usr local rsi idl_6 0 lib loadct pro      usr local rsi idl_6 0 lib utilities xloadct pro   IDL  print  find mesh  iodirectory    iodir   path       Users sebastie DATA ORCA2 meshmaskORCA2closea nc      Users sebastie IDL meshmaskclosesea pro      Users sebastie IDL meshmaskclosesea pro       Users sebastie SAXO_RD Obsolete meshlec pro      usr local rsi idl_6 0 lib mesh_obj pro      history Sebastien Masson  smasson lodyc jussieu fr                          28 4 1999                         6 7 1999: compatibility mac and windows   June 2005: Sebastien Masson: cleaning  use for file_  functions      version  Id: find pro 163 2006 08 29 12:59:46Z navarro           FUNCTION find  filein  IODIRECTORY   iodirectory  RECURSIVE   recursive                    REPERTOIRE   repertoire  NOPRO   nopro  ONLYPRO   onlypro                    ONLYNC   onlync  UNIQUE   unique  FIRSTFOUND   firstfound                    LOOKALLDIR   LOOKALLDIR  TRYFIND   tryfind  _extra   ex   define where we look for the file     compile_opt idl2  strictarrsubs     CASE 1 OF     keyword_set lookalldir :BEGIN  cm_general       dirnames     iodir  homedir   path        tstdtadir  file_dirname find find   onlypro   mark_directory        tstdtadir    file_search tstdtadir DATA TestsData 0        IF tstdtadir NE   THEN dirnames    tstdtadir  dirnames      END     keyword_set iodirectory : dirnames   iodirectory     keyword_set repertoire : dirnames   repertoire     ELSE: dirnames      path    ENDCASE   tmp   dirnames   dirnames    dummy    FOR i   0  n_elements tmp 1 DO       dirnames    dirnames  strsplit tmp i  path_sep search_path   extract    dirnames   dirnames 1:      fileout    dummy    FOR i   0  n_elements filein 1 DO BEGIN     dir   file_dirname filein i      base   file_basename filein i    try to complete the file name with  pro or  nc if needed      CASE 1 OF       keyword_set onlypro :BEGIN         promiss   strpos base   pro   reverse_search          promiss   promiss    strlen base    4          bad   where promiss NE 0 OR strlen base  LE 4  cnt          IF cnt NE 0 THEN base bad    base bad     pro        end       keyword_set onlync :BEGIN         ncmiss   strpos base   nc   reverse_search          ncmiss   ncmiss    strlen base    3          bad   where ncmiss NE 0 OR strlen base  LE 3  cnt          IF cnt NE 0 THEN base bad    base bad     nc        END       ELSE:if strmid base  0  1   reverse_offset  NE             AND NOT keyword_set nopro  THEN base   base    pro      ENDCASE   use dirnames only if dir eq       IF dir EQ    THEN BEGIN       if keyword_set recursive  THEN           found   file_search dirnames  base  _extra   ex            ELSE found   file_search dirnames       base  _extra   ex      ENDIF ELSE found   file_search dir       base  _extra   ex      IF found 0  NE   THEN BEGIN       IF keyword_set firstfound  THEN BEGIN         IF keyword_set unique  THEN return  found uniq found  sort found            ELSE return  found       ENDIF       fileout    fileout  found      ENDIF   ENDFOR    IF n_elements fileout  EQ 1 THEN fileout    NOT FOUND      ELSE fileout   fileout 1:      IF n_elements fileout  GT 1 THEN BEGIN     IF keyword_set unique  THEN fileout   fileout uniq fileout  sort fileout    ENDIF ELSE fileout   fileout 0      IF keyword_set lookalldir  AND fileout 0  EQ  NOT FOUND         AND NOT keyword_set recursive  THEN           filout   find file_basename filein 0   lookalldir                            recursive  _extra   ex      IF keyword_set tryfind  AND fileout 0  EQ  NOT FOUND  THEN BEGIN     fileout   find file_basename filein 0   lookalldir   firstfound  _extra   ex      fileout   fileout 0    ENDIF     RETURN  fileout END"); 
     386a[384] = new Array("./Utilities/fitintobox.html", "fitintobox.pro", "", "              file_comments    Check that the input array has size and dimensions   compatible with the domain that was defined with the previous call   of domdef       categories    Compatibility       param sz  in required         param nx  in required       param ny  in required       param nz  in required       param jpi  in required       param jpj  in required       param jpk  in required        param jpt  in required       returns  1      history Sebastien Masson  smasson lodyc jussieu fr             10 juin 2000             June 2005: S  Masson rewrite all       version  Id: fitintobox pro 163 2006 08 29 12:59:46Z navarro        hidden           FUNCTION err_mess  sz  jpi  nx  jpj  ny  jpk  nz  jpt     compile_opt idl2  strictarrsubs     IF n_elements sz EQ 1  THEN       RETURN  report Error:                          the vector size     tostr sz      is incompatible                         with the the domain dimensions                          jpi nx  jpj ny  jpk nz  jpt                            strtrim jpi  1        strtrim nx  1                              strtrim jpj  1        strtrim ny  1                              strtrim jpk  1        strtrim nz  1                              strtrim jpt  1       simple    RETURN  report Error:                          the array dimensions     tostr sz      are incompatible                         with the the domain dimensions                                          jpi nx  jpj ny  jpk nz  jpt                            strtrim jpi  1        strtrim nx  1                              strtrim jpj  1        strtrim ny  1                              strtrim jpk  1        strtrim nz  1                              strtrim jpt  1       simple  END          categories    Compatibility      param field  in required type array or struct    an array or a structure that can be read by the function                   litchamp pro       param nx  in optional default define by grille pro       param ny  in optional default define by grille pro       param nz  in optional default define by grille pro       param firstx  in optional default define by grille pro       param firsty  in optional default define by grille pro       param firstz  in optional default define by grille pro       param lastx  in optional default define by grille pro       param lasty  in optional default define by grille pro       param lastz  in optional default define by grille pro       keyword WDEPTH    To specify that we are at W level      returns    an array with dimensions matching the domain   or  1 if there is an error       uses cm_4mesh    uses cm_4cal      examples    IDL  help  fitintobox findgen jpi jpj        FLOAT       Array 41  3    IDL  help  fitintobox findgen jpi jpj 78    Error:    the array dimensions  180 148 78  are incompatible   with the the domain dimensions     jpi nx  jpj ny  jpk nz  jpt     180 41  148 3  31 31  1        INT                1      history Sebastien Masson  smasson lodyc jussieu fr             10 juin 2000             June 2005: S  Masson rewrite all       version  Id: fitintobox pro 163 2006 08 29 12:59:46Z navarro       FUNCTION fitintobox  field  nx  ny  nz  firstx  firsty                          firstz  lastx  lasty  lastz  WDEPTH   wdepth     include commons     compile_opt idl2  strictarrsubs    cm_4mesh  cm_4cal   IF NOT keyword_set key_forgetold  THEN BEGIN  updatenew   ENDIF     arr   litchamp field    IF n_params  EQ 1 THEN grille   1   1   1   1  nx  ny  nz         firstx  firsty  firstz  lastx  lasty  lastz  WDEPTH   wdepth       case according the number of dimensions of the array       sz   size arr    case sz 0  of       0:BEGIN                       scalar         return  report Error: scalar value       strtrim arr  1   simple      END       1:BEGIN                       1D arrays         CASE 1 OF   x arrays         sz 1  EQ jpi                                                   :arr    temporary arr firstx:lastx                                          sz 1  EQ  nx                                                   :                                                         y arrays         sz 1  EQ jpj                                                   :arr    temporary arr               firsty:lasty                            sz 1  EQ  ny                                                   :                                                         z arrays         sz 1  EQ jpk                                                   :arr    temporary arr                             firstz:lastz              sz 1  EQ  nz                                                   :                                                         t arrays         sz 1  EQ jpt                                                   :         ELSE:return  err_mess sz 1  jpi  nx  jpj  ny  jpk  nz  jpt         ENDCASE     END       2:BEGIN                       2D arrays         CASE 1 OF   xy arrays         sz 1  EQ jpi AND sz 2  EQ jpj                                  :arr    temporary arr firstx:lastx  firsty:lasty                            sz 1  EQ jpi AND sz 2  EQ  ny                                  :arr    temporary arr firstx:lastx                                         sz 1  EQ  nx AND sz 2  EQ jpj                                  :arr    temporary arr              firsty:lasty                           sz 1  EQ  nx AND sz 2  EQ  ny                                  :arr    temporary arr                                               x y z arrays         sz 1  EQ jpi AND ny EQ 1      AND sz 2  EQ jpk                 :arr    temporary arr firstx:lastx  firstz:lastz              sz 1  EQ jpi AND ny EQ 1      AND sz 2  EQ  nz                 :arr    temporary arr firstx:lastx                           sz 1  EQ  nx AND ny EQ 1      AND sz 2  EQ jpk                 :arr    temporary arr              firstz:lastz             sz 1  EQ  nx AND ny EQ 1      AND sz 2  EQ  nz                 :    x yz arrays         nx EQ 1      AND sz 1  EQ jpj AND sz 2  EQ jpk                 :arr    temporary arr               firsty:lasty  firstz:lastz              nx EQ 1      AND sz 1  EQ jpj AND sz 2  EQ  nz                 :arr    temporary arr               firsty:lasty                           nx EQ 1      AND sz 1  EQ  ny AND sz 2  EQ jpk                 :arr    temporary arr                            firstz:lastz             nx EQ 1      AND sz 1  EQ  ny AND sz 2  EQ  nz                 :   xt arrays         sz 1  EQ jpi                                   AND sz 2  EQ jpt:arr    temporary arr firstx:lastx                                         sz 1  EQ  nx                                   AND sz 2  EQ jpt:   yt arrays                          sz 1  EQ jpj                  AND sz 2  EQ jpt:arr    temporary arr               firsty:lasty                                           sz 1  EQ  ny                  AND sz 2  EQ jpt:   zt arrays                                           sz 1  EQ jpk AND sz 2  EQ jpt:arr    temporary arr                             firstz:lastz                                               sz 1  EQ  nz AND sz 2  EQ jpt:         ELSE:return  err_mess sz 1:2  jpi  nx  jpj  ny  jpk  nz  jpt        ENDCASE     END       3:BEGIN                       3D arrays         CASE 1 OF   xyz arrays         sz 1  EQ jpi AND sz 2  EQ jpj AND sz 3  EQ jpk                 :arr    temporary arr firstx:lastx  firsty:lasty  firstz:lastz              sz 1  EQ jpi AND sz 2  EQ  ny AND sz 3  EQ jpk                 :arr    temporary arr firstx:lastx               firstz:lastz             sz 1  EQ  nx AND sz 2  EQ jpj AND sz 3  EQ jpk                 :arr    temporary arr              firsty:lasty  firstz:lastz             sz 1  EQ  nx AND sz 2  EQ  ny AND sz 3  EQ jpk                 :arr    temporary arr                           firstz:lastz             sz 1  EQ jpi AND sz 2  EQ jpj AND sz 3  EQ  nz                 :arr    temporary arr firstx:lastx  firsty:lasty                            sz 1  EQ jpi AND sz 2  EQ  ny AND sz 3  EQ  nz                 :arr    temporary arr firstx:lastx                                        sz 1  EQ  nx AND sz 2  EQ jpj AND sz 3  EQ  nz                 :arr    temporary arr              firsty:lasty                           sz 1  EQ  nx AND sz 2  EQ  ny AND sz 3  EQ  nz                 :   xyt arrays         sz 1  EQ jpi AND sz 2  EQ jpj                  AND sz 3  EQ jpt:arr    temporary arr firstx:lastx  firsty:lasty                           sz 1  EQ jpi AND sz 2  EQ  ny                  AND sz 3  EQ jpt:arr    temporary arr firstx:lastx                                       sz 1  EQ  nx AND sz 2  EQ jpj                  AND sz 3  EQ jpt:arr    temporary arr              firsty:lasty                          sz 1  EQ  nx AND sz 2  EQ  ny                  AND sz 3  EQ jpt:    x yzt arrays         nx EQ 1      AND sz 1  EQ jpj AND sz 2  EQ jpk AND sz 3  EQ jpt:arr    temporary arr               firsty:lasty  firstz:lastz             nx EQ 1      AND sz 1  EQ jpj AND sz 2  EQ  nz AND sz 3  EQ jpt:arr    temporary arr               firsty:lasty                         nx EQ 1      AND sz 1  EQ  ny AND sz 2  EQ jpk AND sz 3  EQ jpt:arr    temporary arr                            firstz:lastz            nx EQ 1      AND sz 1  EQ  ny AND sz 2  EQ  nz AND sz 3  EQ jpt:   x y zt arrays         sz 1  EQ jpi AND ny EQ 1      AND sz 2  EQ jpk AND sz 3  EQ jpt:arr    temporary arr firstx:lastx                firstz:lastz             sz 1  EQ jpi AND ny EQ 1      AND sz 2  EQ  nz AND sz 3  EQ jpt:arr    temporary arr firstx:lastx                                       sz 1  EQ  nx AND ny EQ 1      AND sz 2  EQ jpk AND sz 3  EQ jpt:arr    temporary arr                            firstz:lastz            sz 1  EQ  nx AND ny EQ 1      AND sz 2  EQ  nz AND sz 3  EQ jpt:         ELSE:return  err_mess sz 1:3  jpi  nx  jpj  ny  jpk  nz  jpt        ENDCASE     END       4:BEGIN                       4D arrays         CASE 1 OF   xyzt arrays         sz 1  EQ jpi AND sz 2  EQ jpj AND sz 3  EQ jpk AND sz 4  EQ jpt:arr    temporary arr firstx:lastx  firsty:lasty  firstz:lastz             sz 1  EQ jpi AND sz 2  EQ  ny AND sz 3  EQ jpk AND sz 4  EQ jpt:arr    temporary arr firstx:lastx               firstz:lastz            sz 1  EQ  nx AND sz 2  EQ jpj AND sz 3  EQ jpk AND sz 4  EQ jpt:arr    temporary arr              firsty:lasty  firstz:lastz            sz 1  EQ  nx AND sz 2  EQ  ny AND sz 3  EQ jpk AND sz 4  EQ jpt:arr    temporary arr                           firstz:lastz            sz 1  EQ jpi AND sz 2  EQ jpj AND sz 3  EQ  nz AND sz 4  EQ jpt:arr    temporary arr firstx:lastx  firsty:lasty                          sz 1  EQ jpi AND sz 2  EQ  ny AND sz 3  EQ  nz AND sz 4  EQ jpt:arr    temporary arr firstx:lastx                                      sz 1  EQ  nx AND sz 2  EQ jpj AND sz 3  EQ  nz AND sz 4  EQ jpt:arr    temporary arr              firsty:lasty                         sz 1  EQ  nx AND sz 2  EQ  ny AND sz 3  EQ  nz AND sz 4  EQ jpt:         ELSE:return  err_mess sz 1:4  jpi  nx  jpj  ny  jpk  nz  jpt        ENDCASE     END     ELSE:return  report Error: fitintobox is managing arrays with a maximum of 4 dimensions   simple    ENDCASE    return  arr end"); 
     387a[385] = new Array("./Utilities/isadirectory.html", "isadirectory.pro", "", "           file_comments   check if a directory exists and make sure that it ends   with the directory separator mark       categories io      param DIRECTORYIN  in optional     a proposed directory  If neither dirname   input parameter of IODIRECTORY keyword are defined    the ask the user to choose a directory       keyword IODIRECTORY    a proposed directory      keyword TITLE    the title of the window      keyword _EXTRA    used to pass your keywords      file_comments    all dialog_pickfile keywords  like filter  can be used       returns    the directory name      examples     IDL  print   dir       usr local rsi idl_6 0   IDL  print  isadirectory dir        usr local rsi idl_6 0    IDL  print  isadirectory dir notgood       history Sebastien Masson  smasson lodyc jussieu fr                         June 28  2000   June 2005: Sebastien Masson: cleaning  use for file_  functions      version  Id: isadirectory pro 163 2006 08 29 12:59:46Z navarro           FUNCTION isadirectory  directoryin  TITLE   title  IODIRECTORY   iodirectory  _extra   ex       compile_opt idl2  strictarrsubs     CASE 1 OF      size directoryin   type 0  EQ 7:directory   directoryin     keyword_set iodirectory :directory   iodirectory     ELSE:directory    directory that is not existing    ENDCASE   testfile   file_test directory   directory    if directory doesn t exist  we ask the user to provide a directory name   IF total testfile  NE n_elements directory  THEN BEGIN     IF NOT keyword_set title  THEN title    choose a directory      FOR i   0  n_elements directory 1 DO BEGIN       IF testfile i  EQ 0 THEN BEGIN         directory i    dialog_pickfile directory  title   title                                             must_exist  _extra   ex          if directory i  EQ   THEN RETURN  report check find directory canceled        ENDIF     ENDFOR   ENDIF     directory   file_search directory   mark_directory    IF n_elements directory  EQ 1 THEN RETURN  directory 0      ELSE RETURN  directory   END"); 
     388a[386] = new Array("./Utilities/isafile.html", "isafile.pro", "", "           file_comments   same as find pro except that as long as the file is  NOT FOUND    isafile calls dialog_pickfile  to ask the user to select a file       categories io      param FILEIN  in optional     a proposed name  If neither filein input parameter of filename keyword are    defined  the ask the user to choose a file       keyword FILENAME    a proposed filename       keyword IODIRECTORY    a directory where we look for the file  this   keyword is taken into account only if the dirname   of filein or filename is        keyword NEW    to specify that filename is a new file and that we should check only its    path      keyword ONLYPRO    force to look only at file ending with  pro      keyword ONLYNC    force to look only at file ending with  nc      keyword RECURSIVE    performs recursive searching of directory hierarchies    In a recursive search  find looks recursively for any and all   subdirectories in the file hierarchy rooted at the IODIRECTORY argument       keyword _EXTRA    used to pass your keywords      file_comments    all find  file_search and dialog_pickfile keywords  like title  can be used      returns    the filename with its path      examples     IDL  print  isafile Users sebastie SAXO_RD Commons cm_4mesh pro      Users sebastie SAXO_RD Commons cm_4mesh pro   IDL  print  isafile cm_4mesh pro  iodir    Users sebastie SAXO_RD Commons      Users sebastie SAXO_RD Commons cm_4mesh pro   IDL  print  isafile cm_4mesh pro  iodir    path      Users sebastie SAXO_RD Commons cm_4mesh pro   IDL  print  isafile cm_4mesh pro  iodir    Users sebastie SAXO_RD   recursive      Users sebastie SAXO_RD Commons cm_4mesh pro   IDL  print  isafile cm_4mesh pro  iodir   getenv HOME   recursive      Users sebastie SAXO_RD Commons cm_4mesh pro   IDL  print  isafile fake_file pro       history Sebastien Masson  smasson lodyc jussieu fr                         11 2 2000   June 2005: Sebastien Masson: cleaning  use for file_  functions      version  Id: isafile pro 163 2006 08 29 12:59:46Z navarro           FUNCTION isafile  filein  FILENAME   filename  IODIRECTORY   iodirectory                       NEW   new  RECURSIVE   RECURSIVE  ONLYPRO   onlypro                       ONLYNC   onlync  _extra   ex       compile_opt idl2  strictarrsubs     CASE 1 OF      size filein   type 0  EQ 7:fileout   filein     keyword_set filename :fileout   filename 0      ELSE:fileout    file that is not existing    ENDCASE   if size fileout   type  NE 7 THEN return   1     CASE 1 OF     keyword_set onlypro : filter    pro      keyword_set onlync : filter    nc      else: filter       ENDCASE     basename   file_basename fileout    dirname   file_dirname fileout    should we redefine dirname    if keyword_set iodirectory  AND dirname EQ   then dirname   iodirectory     if keyword_set new  then return  dirname   path_sep    basename     fileout   find basename  iodirectory   dirname                      recursive   recursive   unique   firstfound  ONLYPRO   onlypro                      ONLYNC   onlync  _extra   ex    WHILE fileout 0  EQ  NOT FOUND  DO BEGIN     fileout   dialog_pickfile path   dirname 0  filter   filter  _extra   ex      if fileout EQ   THEN RETURN  report check find file canceled    check again everything      basename   file_basename fileout      dirname   file_dirname fileout    check if the name of the dirname is ok     dirname   isadirectory dirname  title    choose a directory for the file                                  basename    if we cancel the check     IF size dirname   type  NE 7 THEN return  report check find file canceled      fileout   find basename  iodirectory   dirname                        recursive   recursive   unique   firstfound  ONLYPRO   onlypro                        ONLYNC   onlync  _extra   ex    ENDWHILE     RETURN  fileout END"); 
     389a[387] = new Array("./Utilities/linearequation.html", "linearequation.pro", "", "             file_comments    Calculate a linear equation of the type ax by c 0   thanks to coordinates of 2 points    comment: we can have a table with pairs of points       categories    Utilities       param POINT1  in required     This is the first point of the  straight line s  whose we want to calculate    equation s       param POINT2  in required     This is the second point of the  straight line s  whose we want to calculate   equation s      There is 2 possibilities:        1  point is a complex or a table of complex  where each element is the coordinates of the point         2  point is a table of real of dimension 2 number_of_straight_line            For each row of the table  we have coordinates of the point       returns    abc is a table of dimension 3  number_of_straight_line     where for each line of the table we obtain the 3 parameters   a  b and c of the linear equation ax by c 0      examples    IDL  abc linearequation complex 1 2 3 4    IDL  print  abc 0 1 abc 1 2 abc 2    0 00000      history Sebastien Masson  smasson lodyc jussieu fr             10 juin 2000      version  Id: linearequation pro 163 2006 08 29 12:59:46Z navarro             FUNCTION linearequation  point1  point2     compile_opt idl2  strictarrsubs       if size point1   type  EQ 6 OR size point1   type  EQ 9 then begin       x1   float point1        y1   imaginary point1     ENDIF ELSE BEGIN       x1   float reform point1 0          y1   float reform point1 1       ENDELSE     if size point2   type  EQ 6 OR size point2   type  EQ 9 then begin       x2   float point2        y2   imaginary point2     ENDIF ELSE BEGIN       x2   float reform point2 0          y2   float reform point2 1       ENDELSE     vertical   where x1 EQ x2     novertical   where x1 NE x2     abc   fltarr 3  n_elements x1       IF novertical 0  NE  1 then BEGIN   y mx p       nele   n_elements novertical         m    y2 novertical y1 novertical x2 novertical x1 novertical        p    x2 novertical y1 novertical y2 novertical x1 novertical x2 novertical x1 novertical        abc  novertical     reform m  1  nele  replicate 1  1  nele  reform p  1  nele     ENDIF    IF vertical 0  NE  1 then BEGIN   x ny p       nele   n_elements vertical         n    x2 vertical x1 vertical y2 vertical y1 vertical        p    y2 vertical x1 vertical x2 vertical y1 vertical y2 vertical y1 vertical        abc  vertical     replicate 1  1  nele  reform n  1  nele  reform p  1  nele     ENDIF     return  abc end"); 
     390a[388] = new Array("./Utilities/lineintersection.html", "lineintersection.pro", "", "             file_comments    Calculate coordinates of the intersection between 2 straight lines    or of a succession of 2 straight lines       categories    Utilities       param ABC1  in required type 3d array    is the first array of dimension 3  number_of_pairs_of_straight_lines     whose each line contain the 3 parameters a b and c of the first linear    equation of the type ax by c 0      param ABC2  in required type 3d array    is second array of dimension 3  number_of_pairs_of_straight_lines     whose each line contain the 3 parameters a b and c of the second linear    equation of the type ax by c 0      keyword FLOAT    To return the output as a array of real numbers instead of vectors of    complex  by default       returns    2 possibilities:        1  by default: it is a vector of complex whose each element is the coordinates                        of the intersection point of a pair of straight lines         2  if FLOAT is activated  it is a array of reels of dimension 2             number_of_pairs_of_straight_lines whose each row is the coordinates            of the intersection point of a pair of straight line       restrictions    If the 2 straight line are parallel  we return coordinates     values f_nan values f_nan       restrictions    Beware of the precision of the machine which make    that calculated coordinates may not exactly verify    equations of the pair of straight lines       examples    IDL  abc1 linearequation complex 1 2 3 4    IDL  abc2 linearequation complex 1 2 8 15    IDL  print  lineintersection abc1  abc2           1 00000       2 00000    IDL  print  lineintersection abc1  abc2 float    1 00000      2 00000      history Sebastien Masson  smasson lodyc jussieu fr             10 juin 2000      version  Id: lineintersection pro 163 2006 08 29 12:59:46Z navarro             FUNCTION lineintersection  abc1  abc2  FLOAT   float       compile_opt idl2  strictarrsubs      a1   float reform abc1 0       b1   float reform abc1 1       c1   float reform abc1 2       a2   float reform abc2 0       b2   float reform abc2 1       c2   float reform abc2 2         determinant   a1 b2 a2 b1    nan   where determinant EQ 0     if nan 0  NE  1 THEN determinant    values f_nan      x    b1 c2 c1 b2 determinant    y    c1 a2 a1 c2 determinant      if keyword_set float  then begin       npts   n_elements x         res    reform x  1  npts   over  reform y  1  npts   over     ENDIF ELSE res   complex x  y     return  res end"); 
     391a[389] = new Array("./Utilities/mergeonline_help.html", "mergeonline_help.pro", "", "     file_comments   Have one unique online help for IDL and SAXO      categories   Documentation      restrictions   Needs at least version 6 2       history   Sept 2006: Sebastien Masson  smasson lodyc jussieu fr       version    Id: mergeonline_help pro 197 2006 10 26 10:45:17Z smasson     PRO mergeonline_help     compile_opt idl2  strictarrsubs     is the IDL version at least 6 2     idlversion   float strmid version release  0  3    IF idlversion LT 6 2 THEN BEGIN     print   Warning: You need at least IDL 6 2 to use SAXO IDL merged online help      return   ENDIF     check directories      get the environment variable  HOME   home   getenv HOME    is it defined    IF home EQ   THEN return   is  HOME a writable directory    home    file_search home   test_directory   test_write   mark_directory 0    IF home EQ   THEN return    is  dir    help online_help a directory     homeidl    dir    help online_help    homeidl    file_search homeidl   test_directory   mark_directory 0    IF homeidl EQ   THEN return    is  HOME assistant a directory   if not  create it   homeassist   home    assistant    IF file_test homeassist   directory  EQ 0 THEN file_mkdir  homeassist   is  HOME assistant a writable directory    homeassist    file_search homeassist   test_directory   test_write   mark_directory 0    IF homeassist EQ   THEN return   is  HOME assistant src a directory   if not  create it    homesrc   homeassist    src    IF file_test homesrc   directory  EQ 0 THEN file_mkdir  homesrc   is  HOME assistant src a writable directory    homesrc    file_search homesrc   test_directory   test_write   mark_directory 0    IF homesrc EQ   THEN return    homesaxo   file_dirname find buildinit pro 0   mark_directory     Documentation idldoc_assistant_output    IF file_test homesaxo    idldoc lib adp  EQ 0 THEN BEGIN     print   Error when looking for the file   homesaxo    idldoc lib adp      return   ENDIF     check existance and version of the file that need to be created      do idl adp and home html already exists    IF file_test homesrc    home html  AND file_test homesrc    idl adp         AND file_test homesrc    aboutsaxo txt  THEN BEGIN   is the revision version of homesrc idl adp  the same of homesaxo    idldoc lib adp      is  Id found in homesrc idl adp      idladp   getfile homesrc idl adp      line   strmatch idladp   Id      line    where line EQ 1 0      IF line NE  1 THEN BEGIN       new   idladp line    is  Id  found in homesaxo    idldoc lib adp        saxoadp   getfile homesaxo    idldoc lib adp        line   strmatch saxoadp   Id        line    where line EQ 1 0        IF line NE  1 THEN BEGIN         old   saxoadp line    are the 2 revision tags the same          IF array_equal old  new  THEN BEGIN   is IDL version the same of homesrc    home html              homehtml   getfile homesrc home html            line   strmatch homehtml   IDL   string idlversion  format    f3 1                line    where line EQ 1 0            IF line NE  1 THEN  BEGIN              help_path   homesrc             print   Use SAXO IDL merged online help              return           ENDIF         ENDIF       ENDIF     ENDIF   ENDIF     build homesrc    idl adp        modify the original idl adp     idladp   getfile homeidl idl adp    extract part from  to    line1   strmatch idladp      line1    where line1 EQ 1 0    line2   strmatch idladp      line2    where line2 EQ 1 0    1L   idladp   idladp line1:line2    put the complete path of the references   idladp   strsed idladp   ref   ref homeidl      modify the original idldoc lib adp     saxoadp   getfile homesaxo    idldoc lib adp    extract part from    line1   strmatch saxoadp      line1    where line1 EQ 1 0    1   saxoadp   saxoadp line1:    put the complete path of the references   saxoadp   strsed saxoadp   ref   ref homesaxo      merge idl adp and idldoc lib adp  add an header and write it in a new file     header                                                                    SAXO   IDL      version release     Help                         SAXO   IDL      version release     Help                             homesrc    home html                         About SAXO                             homesrc    aboutsaxo txt                             homeidl       newadp    temporary header  temporary idladp  temporary saxoadp      putfile  homesrc    idl adp  temporary newadp      build homesrc    home html      homehtml   getfile homeidl home html    put the complete path of the references   homehtml   strsed homehtml   ref   ref homeidl    find the first line containing     line   strmatch homehtml      line    where line EQ 1 0    insert one line after this line   homehtml    homehtml 0:line                        160 160 SAXO Directory                    homehtml line 1:    find the last line containing     line   strmatch homehtml      line    where line EQ 1  cnt cnt 1    insert one line after this line   homehtml    homehtml 0:line                        160 160 SAXO Home Page                     homehtml line 1:     put the complete path of the images   homehtml   strsed homehtml   src   src homeidl    except for SAXOIDL_OnlineHelp_title png   homehtml   strsed homehtml   src IDL_OnlineHelp_Title gif   src    homesaxo    xmldoc images SAXOIDL_OnlineHelp_title png      putfile  homesrc    home html  temporary homehtml      build homesrc    aboutsaxo txt      about   getfile homesaxo    overview    remove the lines containing     lines   strmatch about      about   about where lines EQ 0    add some informattions:   about    about     More informations on   http: forge ipsl jussieu fr saxo         putfile  homesrc    aboutsaxo txt  temporary about      print   Merge of SAXO and IDL online help done     help_path   homesrc     RETURN END"); 
     392a[390] = new Array("./Utilities/protype.html", "protype.pro", "", "           file_comments   test is a  pro  file corresponds to an IDL procedure  function or batch file       categories    Utilities      param FILE  in     A scalar of string type  the name of the  pro  file to be tested   if necessary  the input name is completed with  pro    and its path found in  path      returns    A scalar of string type:  proc   func  or  batch       examples     IDL  print  protype protype         func   IDL  print  protype protype pro         func   IDL  print  protype init         batch   IDL  print  protype plt         proc      history Sebastien Masson  smasson lodyc jussieu fr                          Feb 2006      version  Id: protype pro 163 2006 08 29 12:59:46Z navarro           FUNCTION protype  file       compile_opt idl2  strictarrsubs     filepro    find file 0   onlypro   firstfound 0    if filepro EQ  NOT FOUND  then return   1   name   file_basename filepro   pro      allines   getfile filepro    CASE 1 OF   this is a procedure     max stregex allines     pro     name   fold_case   boolean :RETURN   proc    this is a function     max stregex allines     function     name   fold_case   boolean :RETURN   func    this is an IDL batch file     ELSE:RETURN   batch    ENDCASE     RETURN   1 END"); 
     393a[391] = new Array("./Utilities/pwd.html", "pwd.pro", "", "             file_comments    print the current directory      categories like unix function       history Sebastien Masson  smasson lodyc jussieu fr       version  Id: pwd pro 136 2006 07 10 15:20:19Z pinsard             PRO pwd     compile_opt idl2  strictarrsubs      cd  current   pwd    print  pwd    return end"); 
     394a[392] = new Array("./Utilities/report.html", "report.pro", "", "             file_comments    Like dialog_message pro if there is already some widget    active or like message pro if there is not any widget active     To ask a question whose answer is not yes no use xquestion       param TEXT  in required     one string or one vector of string  Si le string ne   comporte qu un element  on cherche les eventuels characteres de   retour a la ligne:  C  If text is set to an array of strings  each   array element is displayed as a separate line of text       keyword SIMPLE    activate to print only the message without the name   and the line of the routine  defined by calling routine_name       keyword _EXTRA    used to pass keywords from dialog_message pro and message pro      keyword PARENT    same as DIALOG_PARENT de dialog_message pro      keyword QUESTION  default Warning    Set this keyword to create a  Question  dialog       keyword DEFAULT_NO  default Yes    Set this keyword to make the  No  button the default selection for     Question  dialog        keyword SIMPLE    Activate to print the error message without printing  the routine name with    its full path       returns     1 if the keyword QUESTION is not activated   If the keyword is activated  return 1 for yes and 0 for no        examples    If there is not any widget activated:     IDL  help  report toto tata       MAIN : toto tata       INT                1   IDL  help  report does it works  question    does it works   y n  default answer is y        BYTE           1   IDL  help  report question1:  C does it works  question    question1:   does it works   y n  default answer is y        BYTE           1     If widgets are already activated  it is the same thing but with widgets       history Sebastien Masson  smasson lodyc jussieu fr                         21 10 1999      version  Id: report pro 163 2006 08 29 12:59:46Z navarro             FUNCTION report  text  DEFAULT_NO   default_no  PARENT   parent  QUESTION   question  SIMPLE   simple  _extra   ex     compile_opt idl2  strictarrsubs     res    1                          we separate the text in different lines  separated by  C  if it is not already done     if n_elements text  EQ 1 then text   str_sep text   C   trim    there is some widgets activated  it is easy  we call dialog_massage    if  widget_info managed 0  NE 0 then BEGIN       res   dialog_message text  dialog_parent   parent  QUESTION   question                                title   routine_name 1  DEFAULT_NO   default_no  _extra   ex        if keyword_set question  THEN res   res EQ  Yes  ELSE res    1    ENDIF ELSE BEGIN   there is not any widget activated   do we ask a question         if keyword_set question  then BEGIN   what i sthe answer by default            if keyword_set default_no  then answer    n  ELSE answer    y           default_answer   answer          if n_elements text  GT 1 THEN             for i   0  n_elements text 2 do print text i            read  text n_elements text 1  y n  default answer is  default_answer    answer          answer   strlowcase answer      if the answer is not appropriated          while answer NE   and answer NE  y  and answer NE  n  do begin             read  text n_elements text 1  y n  default answer is  default_answer    answer             answer   strlowcase answer           ENDWHILE                   we adjust res in function of th answer          case answer of              :res   default_answer EQ  y               y :res   1              n :res   0          endcase       endif ELSE BEGIN   If we do not ask any question  we just make a print         IF keyword_set simple  THEN prefix     ELSE prefix      routine_name 1 :            if n_elements text  GT 1 THEN             for i   0  n_elements text 2 do print  prefix text i            print  prefix text n_elements text 1        ENDELSE    ENDELSE     return   res end"); 
     395a[393] = new Array("./Utilities/routine_name.html", "routine_name.pro", "", "             file_comments   Give us the name of the routine  procedure or function  where we are       categories    Utilities      param PILINGNUM  in optional    A whole number which give us how many level we have to reascend   in the piling up of routines and subroutines to find the looked for routine       returns   a string giving either the full name of the routine  with the path  or    MAIN       restrictions   This function use the keyword OUTPUT in help pro and it is specified   in the on line help that the return syntax of this word can change in   function of the version of the code  This version works with IDL 5 2       examples   IDL  print  routine_name      usr1 com smasson IDL_RD UTILITAIRE report pro    IDL  print  routine_name 1      usr1 com smasson IDL_RD PLOTS DIVERS determineminmax pro    IDL  print  routine_name 2      usr1 com smasson IDL_RD PLOTS DESSINE plt pro    IDL  print  routine_name 3      MAIN     IDL  print  routine_name 4      MAIN       history Sebastien Masson  smasson lodyc jussieu fr                         21 10 1999      version  Id: routine_name pro 163 2006 08 29 12:59:46Z navarro             FUNCTION routine_name   pilingnum       compile_opt idl2  strictarrsubs     help    traceback  output   name   name   strtrim name  1          we remove blanks at the beginning of lines and                                 we put elements of the vector stuck ones with                                 each others to make an unique string    allnames       for i   0  n_elements name 1 do allnames   allnames name i      name   str_sep allnames      we cut it out again    name   strtrim name  2        we remouve blanks in front of and behind   name   strcompress name         we compress blanks   we do not hold back the two first elements who are a blanck  and the line concerning   routine_name    name   name 2: n_elements name 1    we choose the line which concern us    if NOT keyword_set pilingnum  then pilingnum   0   if pilingnum GE n_elements name  then return    MAIN    name   name pilingnum    if strpos name   MAIN  NE  1 then return    MAIN    name   str_sep name        if n_elements name  LT 3  then name   name 0  ELSE name    L name 1   name 2      return  name end"); 
     396a[394] = new Array("./Utilities/testvar.html", "testvar.pro", "", "             file_comments    A kind of keyword_set but when the value exist  it send it back      categories    Utilities      keyword VAR    any kind of      returns    0 if the variable does not exist       examples    IDL  print  testvar var toto    0   IDL  print  testvar var toto    toto      history Sebastien Masson  smasson lodyc jussieu fr                         14 12 1999      version  Id: testvar pro 163 2006 08 29 12:59:46Z navarro             FUNCTION testvar  var   var     compile_opt idl2  strictarrsubs      if keyword_set var  then return  var ELSE return   0 end"); 
     397a[395] = new Array("./Utilities/text_box.html", "text_box.pro", "", "       file_comments    This procedure writes a short text message within a box shaped   area in a graphics window   The message may be split at word   boundaries into several lines  and the character size and   orientation may be adjusted for the text to fit within the box          param TEXT  in required     ASCII text string containing the message       keyword POS     4 element vector specifying the box position and size   pos 0 pos 1  specify the lower left corner coordinate   pos 2 pos 3  specify the upper right corner coordinate   data window normalized coordinates are use      keyword FG_COLOR  default 0    color of box and legend titles      keyword BG_COLOR    background color  Setting BG_COLOR erases the area                  covered by the text box  filling it with color BG_COLOR                  prior to writing the text   If both BG_COLOR and  p color                 are zero then the background color is reset to 255 to                 gaurantee a readability                      keyword RIGHT    if set  right justify text      keyword CENTER    if set  center the text      keyword VERT_SPACE  default 1 5    vertical spacing of lines in units of character height      keyword _EXTRA    used to pass your keyword      keyword BOX    activate to show the box on graphics window       history  Paul Ricchiazzi                            7Jul93             Institute for Computational Earth System Science             University of California  Santa Barbara      version  Id: text_box pro 163 2006 08 29 12:59:46Z navarro       PRO text_box text pos pos fg_color fg_color bg_color bg_color                 center center right right box box vert_space vert_space  _EXTRA   ex       compile_opt idl2  strictarrsubs           ON_ERROR  2      Check the number of parameters    justify 1 if keyword_set right  ne 0 then justify 1 if keyword_set center  ne 0 then justify 0 if keyword_set vert_space  eq 0 then vert_space  1 5 IF n_elements text  eq 0 then message   must specify text  nnx x window d x_vsize nny y window d y_vsize nnx 0  1 d x_vsize nny 0  1 d y_vsize   if n_elements pos  eq 0 then begin    box_cursor xx1 yy1 nx ny   xx2 xx1 nx   yy2 yy1 ny   pos xx1 nnx 0 nnx 1 nnx 0 yy1 nny 0 nny 1 nny 0          xx2 nnx 0 nnx 1 nnx 0 yy2 nny 0 nny 1 nny 0    posstring string form a 4 f5 2 a              pos pos 0 pos 1 pos 2 pos 3    print strcompress posstring remove_all       endif else begin      xx1   nnx 0 pos 0 nnx 1 nnx 0    xx2   nnx 0 pos 2 nnx 1 nnx 0    yy1   nny 0 pos 1 nny 1 nnx 0    yy2   nny 0 pos 3 nny 1 nnx 0   endelse      calculate the height and width of the box in characters      width     xx2   xx1     d x_ch_size   height    yy2   yy1     d y_ch_size      decompose the message into words      words   str_sep text      print f 20a words   nwords n_elements words    wordlen lenstr words d x_vsize   blanklen lenstr   d x_vsize   maxcharsize xx2 xx1 4 blanklen max wordlen    charsize 1     lpnt intarr nwords    nomore 0   ntries 0   repeat begin     ntries ntries 1     if ntries gt 20 then message Can not fit message into box      ychsiz vert_space d y_ch_size charsize     wlen wordlen charsize     blen blanklen charsize     n_lines fix yy2 yy1 ychsiz 1     sum 0     ilines 0     print f 8a8 charsz i ilines n_lines lpnt wlen sum xwdth      for i 0 nwords 1 do begin       sum sum wlen i blen       if sum 3 blen gt xx2 xx1 then begin         ilines ilines 1         sum wlen i blen       endif       lpnt i ilines                       print f f8 2 4i8 3f8 2 charsize i ilines n_lines lpnt i                    wlen i blen sum 3 blen xx2 xx1     endfor             case 1 of       ilines 1 lt n_lines: if charsize 1 1 gt maxcharsize then             vert_space yy2 yy1 n_lines 1 d y_ch_size charsize              else charsize charsize 1 1       ilines 1 eq n_lines: nomore 1       ilines 1 gt n_lines: charsize charsize 9     endcase endrep until nomore   lines strarr n_lines  maxlen 0  for i 0 n_lines 1 do begin   ii where lpnt eq i nc    maxlen total wlen ii nc blen maxlen   lines i string f 200a words ii      print i words ii    print i lines i  endfor      align 5 1 justify       case justify of      1:xx   xx1 5 xx2 xx1 maxlen       0:xx   0 5 xx1   xx2       1:xx   xx2 5 xx2 xx1 maxlen    endcase    dy d y_ch_size charsize vert_space   yy yy2 0 5 dy    xbox xx1 xx2 xx2 xx1 xx1    ybox yy1 yy1 yy2 yy2 yy1    if n_elements bg_color  ne 0 then begin     if  p color eq 0 and bg_color eq 0 then bgc 255 else bgc bg_color     polyfill xbox ybox color bgc device   endif    if n_elements fg_color  eq 0 then color   0 else color fg_color    for i_line   0 n_lines 1 do begin     yy   yy dy     print xx yy lines i_line charsize     xyouts  xx  yy  lines i_line   device  charsize charsize          alignment align  color color  font 1  _extra   ex   endfor   if keyword_set box  then plots xbox ybox color color device   return end "); 
     398a[396] = new Array("./Utilities/undefine.html", "undefine.pro", "", "             file_comments    erase a variable   same thing that delvar but usable in a program and usable    for one variable simultaneously      categories    Utilities         param VARNAME  in required     The name of the variable we want erase      examples   IDL  a 1   IDL  undefine a     Compiled module: UNDEFINE    IDL  help  a   A               UNDEFINED         history trouve sur la page web de D Fanning    http: www dfanning com :  QUESTION: How do I make an IDL variable have a type  undefined    ANSWER: At the main IDL level you can use the IDL procedure DELVAR to  delete an IDL variable and make it undefined  Inside of procedures  and functions  I use this little program named UNDEFINE that I got  from Andrew Cool at the DSTO High Frequency Radar Division in  Adelaide  Australia       version  Id: undefine pro 163 2006 08 29 12:59:46Z navarro                PRO undefine  varname       compile_opt idl2  strictarrsubs      tempvar   SIZE TEMPORARY varname     END "); 
     399a[397] = new Array("./Utilities/xfile.html", "xfile.pro", "", "             file_comments    display in a widget an ASCII file    It is the same thing that xdisplayfile but here  we use it    to display the content of a procedure or of a function     even if it is not in the current directory  thanks to the path       categories    Utilities      param FILENAME  in required     It is the name of the procedure or of the function    we want to display  with or without  pro at the end       keyword _EXTRA    used to pass your keywords      examples xfile plt       history Sebastien Masson  smasson lodyc jussieu fr                          7 1 99                         6 7 1999: compatibility mac and windows      version  Id: xfile pro 163 2006 08 29 12:59:46Z navarro             PRO xfile  filename  _extra   ex     compile_opt idl2  strictarrsubs   pfile   strlowcase filename      we have to find the full name        if strpos pfile pro  lt 0 then pfile pfile pro      thisOS   strupcase strmid version os_family  0  3     CASE thisOS of        MAC :BEGIN   sep    :    pathsep       end        WIN :BEGIN   sep       pathsep       end       ELSE: BEGIN   sep       pathsep    :    end    ENDCASE    cd  current   current    if strpos pfile sep  lt 0 then BEGIN       if rstrpos current sep  NE strlen current 1 then current   current sep       multipath   str_sep path pathsep        if rstrpos multipath 0 sep  NE strlen multipath 0 1 then multipath   multipath  sep       pfile    current  multipath  pfile    ENDIF    i   0    repeat begin       res   findfile pfile i         i   i 1    endrep until res 0  NE   OR i EQ n_elements pfile      if res 0  NE    then BEGIN   we open the file in a widget    xdisplayfile  pfile i 1  _extra   ex    ENDIF ELSE ras   report le fichier demande n existe pas         return end"); 
     400a[398] = new Array("./Utilities/xhelp.html", "xhelp.pro", "", "       file_comments    Display an IDL procedure header using widgets and the widget manager       categories   Widget      param FILENAME  in required     A scalar string that contains the filename of the file to display      If FILENAME does not include a complete path specification  xhelp will    search for the file in the current working directory and then each of the   directories listed in  PATH environment variable   The    pro  file suffix will be appended if it is not supplied       keyword _EXTRA    used to pass your keywords      restrictions    Triggers the XMANAGER if it is not already in use       examples    Open a file and create a widget to display its contents       history Written By Steve Richards  December 1990  Graceful error recovery  DMS  Feb  1992          Modified to extract  pro documentation headers  PJR ESRG mar94         Paul Ricchiazzi                            jun93         Institute for Computational Earth System Science         University of California  Santa Barbara    7 1 99 : legeres mofification par Sebastien Masson : utilisation de    xdisplayfile  de findfile et de _extra     6 7 1999: compatibility mac and windows      version  Id: xhelp pro 163 2006 08 29 12:59:46Z navarro       PRO xhelp  filename  _extra ex     compile_opt idl2  strictarrsubs      Are we sure filename is a string     cquoidonc   size filename   type     if cquoidonc NE 7 then begin       ras   report Input parameter must be a string and not a  size filename   tname        return    endif   We have to find the full name     pfile FILENAME    if strpos pfile pro  lt 0 then pfile pfile pro      thisOS   strupcase strmid version os_family  0  3     CASE thisOS of        MAC :BEGIN   sep    :    pathsep       end        WIN :BEGIN   sep       pathsep       end       ELSE: BEGIN   sep       pathsep    :    end    ENDCASE    cd  current   current    if strpos pfile sep  lt 0 then BEGIN       if rstrpos current sep  NE strlen current 1 then current   current sep       multipath   str_sep path pathsep        if rstrpos multipath 0 sep  NE strlen multipath 0 1 then multipath   multipath  sep       pfile    current  multipath  pfile    ENDIF   We test each possible name to find where the file is     nfile n_elements pfile     n   0    repeat begin       res   findfile pfile n         n   n 1    endrep until res 0  NE   OR n EQ n_elements pfile      if res 0  NE   then BEGIN       openr  unit pfile n 1   get_lun   opening of the file   we select the heading piece            a   strarr 1000            Maximum   of lines       xsize 0       i   0       c           readon 0       while not eof unit  do begin          readf unit c          if strpos c  eq 0 then readon 0          if readon then BEGIN             dum where byte c  eq 9b ntab    count tab characters             xsize xsize    strlen c 8 ntab              a i    strmid c 1 200              i   i   1          endif          if strpos c  eq 0 then readon 1       endwhile       if i EQ 0 then            ras   report le programme a etait mal ecrit  il n y a pas d en tete  utiliser xfile pro  ELSE BEGIN           a   a 0:i 1    we wrote the a s content in a widget          xdisplayfile toto text   a title pfile n 1  _extra   ex       ENDELSE        FREE_LUN  unit          free the file unit     ENDIF ELSE ras   report le fichier demande n existe pas      return end "); 
     401a[399] = new Array("./buildinit.html", "buildinit.pro", "", "     file_comments        categories        param PARENT  in required    The ID of the parent widget       keyword COLUMN    Buttons will be arranged in the number of columns specified by this keyword       keyword ROW   Buttons will be arranged in the number of rows specified by this keyword       keyword EVENT_FUNC   The name of an optional user supplied event function for buttons     This function is called with the return value structure whenever a    button is pressed  and follows the conventions for user written event functions       keyword FLOATING        keyword INTEGER        keyword LONG        keyword STRING        keyword FONT   The name of the font to be used for the button titles  If this keyword    is not specified  the default font is used       keyword FRAME   Specifies the width of the frame to be drawn around the base       keyword TITLE   The title of the window      keyword UVALUE   The user value to be associated with the widget       keyword VALUE        keyword RETURN_EVENTS        keyword ALL_EVENTS        keyword FIELDFONT        keyword NOEDIT        keyword TEXT_FRAME        keyword XSIZE   The width of the base        keyword YSIZE   The height of the base       keyword UNAME   The user name to be associated with the widget       returns        uses        restrictions:        examples        history        version    Id: buildinit pro 163 2006 08 29 12:59:46Z navarro               slightly modified version of cw_field  FUNCTION cw_field2  Parent  COLUMN Column  ROW Row        EVENT_FUNC   efun        FLOATING Float  INTEGER Int  LONG Long  STRING String        FONT LabelFont  FRAME Frame  TITLE Title  UVALUE UValue  VALUE TextValueIn        RETURN_EVENTS ReturnEvents  ALL_EVENTS AllUpdates        FIELDFONT FieldFont  NOEDIT NoEdit  TEXT_FRAME Text_Frame        XSIZE XSize  YSIZE YSize  UNAME uname     FLOOR vmin  CEILING vmax      compile_opt idl2  strictarrsubs     resolve_routine   cw_field   compile_full_file   is_function         Examine our keyword list and set default values         for keywords that are not explicitly set       Column        KEYWORD_SET Column      Row           1   Column     AllEvents         1   KEYWORD_SET NoEdit         Enum Update   None  All  CRonly       Update        0     IF KEYWORD_SET AllUpdates  THEN Update    1     IF KEYWORD_SET ReturnEvents  THEN Update      2      IF N_ELEMENTS efun  LE 0 THEN efun         IF N_ELEMENTS Title  EQ 0 THEN Title Input Field:      TextValue    N_ELEMENTS TextValueIn  gt 0    TextValueIn :         Convert non string values to strings      if  SIZE TextValue   TNAME  ne  STRING  then           TextValue   STRTRIM TextValue 2      IF N_ELEMENTS YSize  EQ 0 THEN YSize 1     IF N_ELEMENTS uname  EQ 0 THEN uname CW_FIELD_UNAME       Type      0   string is default     IF KEYWORD_SET Float  THEN  Type      1     IF KEYWORD_SET Int  THEN    Type      2     IF KEYWORD_SET Long  THEN   Type      3          Don t allow multiline non string widgets     if  Type ne 0  then           YSize 1     YSize   YSize   1          Build Widget      Base      WIDGET_BASE Parent  ROW Row  COLUMN Column  UVALUE UValue                EVENT_FUNC CW_FIELD_EVENT                PRO_SET_VALUE CW_FIELD_SET                FUNC_GET_VALUE CW_FIELD_GET                FRAME Frame  UNAME uname       FOR i   0  n_elements title 1 DO         Label     WIDGET_LABEL Base  VALUE   Title i  FONT   LabelFont                                 UNAME   uname _LABEL   align_left      Text      WIDGET_TEXT Base  VALUE   TextValue                XSIZE XSize  YSIZE YSize  FONT FieldFont                ALL_EVENTS AllEvents                EDITABLE AllEvents AND TYPE EQ 0                FRAME Text_Frame                 UNAME uname _TEXT                 NO_ECHO AllEvents AND  TYPE NE 0         Save our internal state in the first child widget     State                 efun: efun                TextId:Text               Title:Title               Update:Update             Type:Type                   WIDGET_CONTROL  WIDGET_INFO Base   CHILD  SET_UVALUE State   NO_COPY     RETURN  Base   END              file_comments        categories         param EVENT        returns          uses          restrictions          examples          history          version     Id: buildinit pro 163 2006 08 29 12:59:46Z navarro     PRO printerdef_event  event   get back the ids of the cw_field widgets     compile_opt idl2  strictarrsubs     widget_control  event id  get_uvalue   cwids   IF size cwids   n_dimensions  EQ 1 THEN cwids   reform cwids  3  1  help  cwids   dims   size cwids   dimensions  help   dims print   dims   results   strarr dims    FOR i   0  dims 1 1 DO BEGIN     widget_control  cwids 0  i  get_value   res   results 0  i    res     widget_control  cwids 1  i  get_value   res   results 1  i    res     widget_control  cwids 2  i  get_value   res   results 2  i    res   ENDFOR   nothing   where results EQ   count    IF count NE 0 THEN BEGIN     nothing   dialog_message Some of the text box are still empty  dialog_parent   event top   information      return   ENDIF   now we give the result to buildinit pro by using the pointer uvalue    widget_control  event top  get_uvalue   ptresult     ptresult   temporary results    we destroy the widget    widget_control  event top   destroy   RETURN END              file_comments        categories         param EVENT        returns          uses          restrictions          examples          history          version     Id: buildinit pro 163 2006 08 29 12:59:46Z navarro     PRO papsize_event  event   get back the ids of the cw_field widgets     compile_opt idl2  strictarrsubs     widget_control  event id  get_uvalue   uvalue   IF uvalue 0  NE  ok  THEN return   idist   widget_info event top  find_by_uname    list    id   widget_info idist   list_select    widget_control  idist  get_uvalue   selected   selected   selected id    selected   strsplit selected   extract    now we give the result to buildinit pro by using the pointer uvalue    widget_control  event top  get_uvalue   ptresult     ptresult    float selected 3  float selected 4    we destroy the widget    widget_control  event top   destroy   RETURN END              file_comments        categories         param EVENT        returns          uses          restrictions          examples          history          version     Id: buildinit pro 163 2006 08 29 12:59:46Z navarro     PRO xask_event  event   now we give the answer to buildinit pro by using the pointer uvalue     compile_opt idl2  strictarrsubs      widget_control  event top  get_uvalue   ptranswer     ptranswer   event value   we destroy the widget    widget_control  event top   destroy   RETURN END              file_comments        categories         keyword _EXTRA   Used to pass your keywords      returns          uses          restrictions          examples          history          version     Id: buildinit pro 163 2006 08 29 12:59:46Z navarro     FUNCTION xask  _extra   ex     compile_opt idl2  strictarrsubs     base   widget_base     field   cw_field2 base   frame   return_events   column  _extra   ex     ptranswer   ptr_new allocate_heap    we realize the widget and wait for an answer   widget_control  base   realize  set_uvalue   ptranswer   xmanager   xask  base   we get the answer   answer    ptranswer   we freeing the pointer   ptr_free  ptranswer   RETURN  answer END              file_comments        categories        keyword TITLE   The title of the window      keyword NOMARK         keyword NOWRITE        returns          uses          restrictions          examples          history          version     Id: buildinit pro 163 2006 08 29 12:59:46Z navarro     FUNCTION getdir  title   title  nomark   nomark  nowrite   nowrite     compile_opt idl2  strictarrsubs        REPEAT BEGIN     dir   dialog_pickfile directory   must_exist  title   title    make sure dir is ok  check read write access and directory separator mark     dir   file_search dir   test_directory   test_read                           test_write   1   keyword_set nowrite                            mark_directory   1   keyword_set nomark      dir   dir 0    ENDREP UNTIL dir NE      RETURN  dir END              file_comments        categories        returns          uses          restrictions          examples          history          version     Id: buildinit pro 163 2006 08 29 12:59:46Z navarro     PRO buildinit       compile_opt idl2  strictarrsubs     IF fix strmid version release  0  1  LT 6 THEN BEGIN      print                                print                        ERROR       print                                print   This version of SAXO needs at least IDL version 6 0      print                                print                        ERROR       print                                return   ENDIF   IF lmgr demo  EQ 1 THEN BEGIN     print   impossible to use buildinit in demo mode      return   ENDIF     init                     This is the initialisation file                  it defines the  path and the defaut values of some of the common variables                                  this is supposed to speed up IDL                                  a   fltarr 1000 1000 100                  a   0                                  path definition                      define  myIDL  directory   myIDL   getdir title    Select the home directory  my IDL   nomark    define  SAXO  directory   saxodir   getdir title    Select SAXO directory   nomark   nowrite    define the  path   init    init   path   expand_path     myIDL                            :    expand_path     saxodir                            :    expand_path     dir      should we keep the compatibility with the old version      yes   dialog_message shall we keep the compatibility                               with the old version    question   default_no    yes   strlowcase yes       init    init                                 compatibility with the old version                                 keep_compatibility      strtrim fix yes EQ  yes  2       define all the commons     init    init                                 define all the commons                                 all_cm      define default directories     init    init                                 define default directories                                 homedir   isadirectory myIDL  title    Select the default HOME directory    iodir   getdir title    Select the default IO directory    init    init                iodir   isadirectory iodir  title    Select the default IO directory    psdir   getdir title    Select the default postscripts directory    init    init                psdir   isadirectory psdir  title    Select the default postscripts directory    imagedir   getdir title    Select the default images directory    init    init                imagedir   isadirectory imagedir  title    Select the default images directory    animdir   getdir title    Select the default animations directory    init    init                animdir   isadirectory animdir  title    Select the default animations directory      number of printer     ptnumb   xask title    Number of accessible printers  value   0   long      define all the printer parameters      init    init                                 define printer parameters                        IF ptnumb NE 0 THEN BEGIN     base   widget_base column   frame       cwids   lonarr 3  ptnumb      FOR i   0  ptnumb 1 DO BEGIN       subbase   widget_base base   row        cwids 0  i    cw_field subbase   string                                  Title    printer_human_names strtrim i  2             cwids 1  i    cw_field subbase   string                                  Title    printer_machine_names strtrim i  2             cwids 2  i    cw_field subbase   string  value    lpr  P                                   Title    print_command strtrim i  2           ENDFOR     trash   widget_button base  value    ok  uvalue   cwids      ptresult   ptr_new allocate_heap    we realize the widget and wait for an answer     widget_control  base   realize  set_uvalue   ptresult     xmanager   printerdef  base       init    init                  printer_human_names   strarr strtrim ptnumb  2                   printer_machine_names   strarr strtrim ptnumb  2                   print_command   strarr strtrim ptnumb  2      FOR i   0  ptnumb 1 DO BEGIN       init    init                    printer_human_names strtrim i  2                         ptresult 0  i                     printer_machine_names strtrim i  2                         ptresult 1  i                     print_command strtrim i  2                         ptresult 2  i      ENDFOR   we freeing the pointer     ptr_free  ptresult   ENDIF ELSE BEGIN     init    init                  printer_human_names                      printer_machine_names                      print_command       ENDELSE      Colors     init    init                                 colors                                  device  decomposed   0                 device  retain   2      default color tables     loadct  get_names   names    ntables   40   title                                                                      Choose the default color table                                                                        the following lines come from loadct procedure    nlines    ntables   2    3  of lines to print   nend   nlines    nlines 3    ntables    for i   0  nend 1 do           Print each line     title    title                  string format    i2   a17  3x  i2   a17  3x  i2   a17                            i  names i  i nlines  names i nlines                            i 2 nlines  xask title   title  value   39   long   xask title   title  value   0   long    2   init    init                archive_ps    strtrim archive_ps  2                                                  end of the part that should be modified by the users                                                  if needed  keep compatibility with the old version                                 updateold                       filename   xask title    name of the init file   written in homedir:     myIDL     value    init pro   string    journal  myIDL       filename   FOR i   0  n_elements init 1 DO journal  init i    journal    RETURN END"); 
    401402 
    402403 
Note: See TracChangeset for help on using the changeset viewer.