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
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
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
97 have the same longitude.
98</div>
99
100     
101
102     
103
104     
105
106     
107
108      <div id="routine_details">
109       
110
111        <div class="routine_details" id="_fromreg">
112
113          <h2><a class="top" href="#container">top</a>fromreg <span class="categories"> 
114 Interpolation
115</span></h2>
116       
117          <p class="header">
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>
119       
120          <div class="comments">
121</div>
122
123          <h3>Return value</h3><div class="preformat">
124 2D array the interpolated data
125</div>
126
127         
128            <h3>Parameters</h3>
129       
130           
131            <h4 id="_fromreg_param_method">method&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
132              <span class="attr">in</span>
133             
134             
135              <span class="attr">required</span>
136             
137              <span class="attr">type:</span> <span class="value">string</span>
138             
139             
140            </h4>
141       
142          <div class="comments">
143 the interpolation method.
144 must be 'bilinear' or 'imoms3'
145</div>
146           
147            <h4 id="_fromreg_param_datain">datain&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
148              <span class="attr">in</span>
149             
150             
151              <span class="attr">required</span>
152             
153              <span class="attr">type:</span> <span class="value">2d array</span>
154             
155             
156            </h4>
157       
158          <div class="comments">
159 the input data to interpolate
160</div>
161           
162            <h4 id="_fromreg_param_lonin">lonin&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
163              <span class="attr">in</span>
164             
165             
166              <span class="attr">required</span>
167             
168              <span class="attr">type:</span> <span class="value">1d or 2d array</span>
169             
170             
171            </h4>
172       
173          <div class="comments">
174 the longitude of the input data
175</div>
176           
177            <h4 id="_fromreg_param_latin">latin&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
178              <span class="attr">in</span>
179             
180             
181              <span class="attr">required</span>
182             
183              <span class="attr">type:</span> <span class="value">1d or 2d array</span>
184             
185             
186            </h4>
187       
188          <div class="comments">
189 the latitude of the input data
190</div>
191           
192            <h4 id="_fromreg_param_lonout">lonout&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
193              <span class="attr">in</span>
194             
195             
196              <span class="attr">required</span>
197             
198              <span class="attr">type:</span> <span class="value">1d or 2d array</span>
199             
200             
201            </h4>
202       
203          <div class="comments">
204 the longitude of the output data
205</div>
206           
207            <h4 id="_fromreg_param_latout">latout&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
208              <span class="attr">in</span>
209             
210             
211              <span class="attr">required</span>
212             
213              <span class="attr">type:</span> <span class="value">1d or 2d array</span>
214             
215             
216            </h4>
217       
218          <div class="comments">
219 the latitude of the output data
220</div>
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             
235              <span class="attr">type:</span> <span class="value">2d array or variable name</span>
236             
237             
238            </h4>
239       
240            <div class="comments">
241 (see ADDR)
242</div>
243           
244            <h4 id="_fromreg_keyword_ADDR">ADDR&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
245             
246             
247             
248             
249             
250              <span class="attr">type:</span> <span class="value">2d array or variable name</span>
251             
252             
253            </h4>
254       
255            <div class="comments">
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:
262          dataout = total(weig*datain[addr], 1)
263          dataout = reform(dataout, jpio, jpjo, /over)
264
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
267</div>
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       
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>
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       
296            <div class="comments">
297 activate if you don't want to take into account the southern line
298 of the input data when performing the interpolation.
299</div>
300           
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           
315         
316
317          <h3>Examples</h3><div class="preformat">
318
319  To interpolate 1 field:
320
321   IDL> topa = fromreg('bilinear', tncep, xncep, yncep, glamt, gphit)
322
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
326   (that must be undefined or equal to 0 before calling fromreg
327
328   IDL> t1opa = fromreg('bilinear', t1ncep, xncep, yncep, glamt, gphit, WEIG = a, ADDR = b)
329   IDL> help, a, b
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
334   IDL> t2opa = fromreg('bilinear', t2ncep, xncep, yncep, glamt, gphit, WEIG = a, ADDR = b)
335</div>
336          <h3>Version history</h3>
337         
338          <h4>Version</h4><div class="preformat">
339 $Id: fromreg.pro 372 2008-08-08 12:31:53Z pinsard $
340</div>
341          <h4>History</h4><div class="preformat">
342  November 2005: Sebastien Masson (smasson@lodyc.jussieu.fr)
343</div>
344         
345         
346          <h3>Known issues</h3>
347         
348         
349         
350          <h4>Restrictions</h4><div class="preformat">
351 We supposed the data are located on a sphere, with a periodicity along the
352 longitude.
353</div>
354       
355         
356         
357         
358         
359         
360         
361         
362       
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>
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>
382</html>
Note: See TracBrowser for help on using the repository browser.