source: trunk/SRC/Documentation/idldoc_html_output/Interpolation/fromreg.html @ 402

Last change on this file since 402 was 402, checked in by smasson, 15 years ago

update documentation

File size: 9.6 KB
RevLine 
[89]1
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4
5<!-- Generated by IDLdoc 2.0 -->
6
7<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
8  <head>
[104]9    <title>fromreg.pro (SAXO Documentation)</title>
[89]10
11   
[191]12    <link rel="stylesheet" type="text/css" media="all" href="./../main_files.css" />
13    <link rel="stylesheet" type="text/css" media="print" href="./../main_files_print.css" />
[89]14   
15
16    <script type="text/javascript">
17      function setTitle() {
[104]18        parent.document.title="fromreg.pro (SAXO Documentation)";
[89]19      }
20    </script>
21  </head>
22
23  <body onload="setTitle();">
24
25    <div id="navbar_title">
[104]26  <h1>SAXO Documentation</h1>
[89]27</div>
28
29
30<div id="main_navbar">
31
32  <table cellspacing="0">
33    <tr>
34     
[189]35      <td><a href="./../overview.html" title="Overview of library">Overview</a></td>
[89]36     
37
38     
39      <td >Directory</td>
40     
41
42     
[189]43      <td><a href="./../idldoc-categories.html" title="Browse library by category">Categories</a></td>
[89]44     
45
46     
[189]47      <td><a href="./../idldoc-index.html" title="Index of files, routines, and parameters">Index</a></td>
[89]48     
49
50     
[189]51      <td><a href="./../search-page.html" title="Search library">Search</a></td>
[89]52     
53
54      <td id="selected">File</td>
55
56     
[189]57      <td><a href="../../../Interpolation//fromreg.pro" title="Source code of a file">Source</a></td>
[89]58     
59
60     
[189]61      <td><a href="./../idldoc-help.html" title="Help on IDLdoc">Help</a></td>
[89]62     
63
64      <td >Etc</td>
65
66      <td id="flexible">Developer&nbsp;documentation</td>
67    </tr>
68  </table>
69
70</div>
71
72<div id="secondary_navbar">
73
[189]74<a href="fromirr.html">&lt;&lt;prev file</a> | <a href="get_gridparams.html">next file &gt;&gt;</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="fromreg.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>
[89]75
76</div>
77
78
79    <div id="container">
80
[189]81      <h1 class="directory"><a href="directory-overview.html">Interpolation/</a></h1>
[89]82      <h2 class="pro_file">fromreg.pro</h2>
83
84      <div id="file_attr">
85        <dl>
86        </dl>
87      </div>
88
[138]89      <div id="file_comments">
90 interpolate data from a "regular/rectangular grid" to any grid.
[402]91
92 2 methods available: bilinear and imoms3
93
94 A "regular/rectangular grid" is defined as a grid for which
95
96 Each longitude lines have the same latitude and each latitude columns
[242]97 have the same longitude.
[138]98</div>
[89]99
100     
101
102     
103
104     
105
106     
107
108      <div id="routine_details">
109       
110
111        <div class="routine_details" id="_fromreg">
112
[157]113          <h2><a class="top" href="#container">top</a>fromreg <span class="categories"> 
114 Interpolation
[101]115</span></h2>
[89]116       
117          <p class="header">
[290]118            <span class="result">result = </span>fromreg(<span class="result"><a href="#_fromreg_param_method">method</a>, <a href="#_fromreg_param_datain">datain</a>, <a href="#_fromreg_param_lonin">lonin</a>, <a href="#_fromreg_param_latin">latin</a>, <a href="#_fromreg_param_lonout">lonout</a>, <a href="#_fromreg_param_latout">latout</a></span>, <a href="#_fromreg_keyword_WEIG">WEIG</a>=<span class="result">2d array or variable name</span>, <a href="#_fromreg_keyword_ADDR">ADDR</a>=<span class="result">2d array or variable name</span>, <a href="#_fromreg_keyword_NONORTHERNLINE">NONORTHERNLINE</a>=<span class="result">NONORTHERNLINE</span>, <a href="#_fromreg_keyword_NOSOUTHERNLINE">NOSOUTHERNLINE</a>=<span class="result">NOSOUTHERNLINE</span>, <a href="#_fromreg_keyword__EXTRA">_EXTRA</a>=<span class="result">_EXTRA</span>)</p>
[89]119       
120          <div class="comments">
[101]121</div>
[89]122
[138]123          <h3>Return value</h3><div class="preformat">
124 2D array the interpolated data
[101]125</div>
[89]126
127         
128            <h3>Parameters</h3>
129       
130           
131            <h4 id="_fromreg_param_method">method&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
[101]132              <span class="attr">in</span>
[89]133             
134             
[101]135              <span class="attr">required</span>
[89]136             
[163]137              <span class="attr">type:</span> <span class="value">string</span>
[89]138             
139             
140            </h4>
141       
[138]142          <div class="comments">
[242]143 the interpolation method.
[138]144 must be 'bilinear' or 'imoms3'
145</div>
[89]146           
147            <h4 id="_fromreg_param_datain">datain&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
[101]148              <span class="attr">in</span>
[89]149             
150             
[101]151              <span class="attr">required</span>
[89]152             
[163]153              <span class="attr">type:</span> <span class="value">2d array</span>
[89]154             
155             
156            </h4>
157       
[138]158          <div class="comments">
[242]159 the input data to interpolate
[138]160</div>
[89]161           
162            <h4 id="_fromreg_param_lonin">lonin&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
[101]163              <span class="attr">in</span>
[89]164             
165             
[210]166              <span class="attr">required</span>
[89]167             
[163]168              <span class="attr">type:</span> <span class="value">1d or 2d array</span>
[89]169             
170             
171            </h4>
172       
[138]173          <div class="comments">
[242]174 the longitude of the input data
[138]175</div>
[89]176           
177            <h4 id="_fromreg_param_latin">latin&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
[111]178              <span class="attr">in</span>
[89]179             
180             
[210]181              <span class="attr">required</span>
[89]182             
[163]183              <span class="attr">type:</span> <span class="value">1d or 2d array</span>
[89]184             
185             
186            </h4>
187       
[138]188          <div class="comments">
[242]189 the latitude of the input data
[138]190</div>
[89]191           
192            <h4 id="_fromreg_param_lonout">lonout&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
[101]193              <span class="attr">in</span>
[89]194             
195             
[210]196              <span class="attr">required</span>
[89]197             
[163]198              <span class="attr">type:</span> <span class="value">1d or 2d array</span>
[89]199             
200             
201            </h4>
202       
[138]203          <div class="comments">
[242]204 the longitude of the output data
[138]205</div>
[89]206           
207            <h4 id="_fromreg_param_latout">latout&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
[118]208              <span class="attr">in</span>
[89]209             
210             
[118]211              <span class="attr">required</span>
[89]212             
[163]213              <span class="attr">type:</span> <span class="value">1d or 2d array</span>
[89]214             
215             
216            </h4>
217       
[138]218          <div class="comments">
[242]219 the latitude of the output data
[118]220</div>
[89]221           
222
223         
224
225         
226
227            <h3>Keywords</h3>
228           
229            <h4 id="_fromreg_keyword_WEIG">WEIG&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
230             
231             
232             
233             
234             
[234]235              <span class="attr">type:</span> <span class="value">2d array or variable name</span>
[89]236             
237             
238            </h4>
239       
[163]240            <div class="comments">
241 (see ADDR)
242</div>
[89]243           
244            <h4 id="_fromreg_keyword_ADDR">ADDR&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
245             
246             
247             
248             
249             
[234]250              <span class="attr">type:</span> <span class="value">2d array or variable name</span>
[89]251             
252             
253            </h4>
254       
[163]255            <div class="comments">
[234]256 1) at the first call of fromreg:
257 This keyword can be set to a named variable (undefined or equal to 0) into which the
258 addresses used to perform the interpolation will be copied when the current routine exits.
259 2) Next, once this keyword is set to a defined 2d array, it is used to bypass the computation
260 of the weights and addresses used to perform the interpolation. In this case, fromreg simply
261 compute the interpolated field as:
[111]262          dataout = total(weig*datain[addr], 1)
263          dataout = reform(dataout, jpio, jpjo, /over)
[402]264
[234]265 In that case, method, lonin, latin, are not used (but are necessary).
266 lonout, latout are used only to know the output domain size
[111]267</div>
[89]268           
269            <h4 id="_fromreg_keyword_NONORTHERNLINE">NONORTHERNLINE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
270             
271             
272             
273             
274             
275             
276             
277             
278            </h4>
279       
[163]280            <div class="comments">
281 activate if you don't want to take into account the northern line
282 of the input data when performing the interpolation.
283</div>
[89]284           
285            <h4 id="_fromreg_keyword_NOSOUTHERNLINE">NOSOUTHERNLINE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
286             
287             
288             
289             
290             
291             
292             
293             
294            </h4>
295       
[138]296            <div class="comments">
[163]297 activate if you don't want to take into account the southern line
298 of the input data when performing the interpolation.
[118]299</div>
[89]300           
[290]301            <h4 id="_fromreg_keyword__EXTRA">_EXTRA&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
302             
303             
304             
305             
306             
307             
308             
309             
310            </h4>
311       
312            <div class="comments"> to be able to call fromreg with _extra keyword
313</div>
314           
[89]315         
316
[138]317          <h3>Examples</h3><div class="preformat">
[101]318
[234]319  To interpolate 1 field:
320
[402]321   IDL> topa = fromreg('bilinear', tncep, xncep, yncep, glamt, gphit)
[101]322
[234]323  or if you have several fields to interpolate from the same source and target grids
324 
325 1) get back the weights and addresses in variables a and b
[242]326   (that must be undefined or equal to 0 before calling fromreg
[138]327
[402]328   IDL> t1opa = fromreg('bilinear', t1ncep, xncep, yncep, glamt, gphit, WEIG = a, ADDR = b)
329   IDL> help, a, b
[234]330
331 2) use a and b that are now defined to bypass the computation of the weights and addresses
332 and speed-up the computation!
333
[402]334   IDL> t2opa = fromreg('bilinear', t2ncep, xncep, yncep, glamt, gphit, WEIG = a, ADDR = b)
[101]335</div>
336          <h3>Version history</h3>
[89]337         
[234]338          <h4>Version</h4><div class="preformat">
[402]339 $Id: fromreg.pro 372 2008-08-08 12:31:53Z pinsard $
[118]340</div>
[138]341          <h4>History</h4><div class="preformat">
342  November 2005: Sebastien Masson (smasson@lodyc.jussieu.fr)
[118]343</div>
[89]344         
345         
[101]346          <h3>Known issues</h3>
[89]347         
348         
349         
[138]350          <h4>Restrictions</h4><div class="preformat">
351 We supposed the data are located on a sphere, with a periodicity along the
352 longitude.
[101]353</div>
[89]354       
355         
356         
357         
358         
359         
360         
361         
362       
[163]363          <h3>Statistics</h3>
364          <table class="statistics">
365            <tr><td>McCabe cyclic</td><td>           5</td></tr>
366            <tr><td>McCabe essential</td><td>           1</td></tr>
367            <tr><td>McCabe modular design</td><td>           1</td></tr>
368          </table>
[89]369         
370       
371        </div>
372       
373      </div>
374
375     
376
377      <div id="tagline">Produced by IDLdoc 2.0.</div>
378
379    </div>
380
381  </body>
[249]382</html>
Note: See TracBrowser for help on using the repository browser.