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

Last change on this file since 338 was 338, checked in by smasson, 16 years ago

update documentation

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