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

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

update documentation

File size: 9.5 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>fromirr.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="fromirr.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//fromirr.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="file_interp.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>
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">fromirr.pro</h2>
83
84      <div id="file_attr">
85        <dl>
86        </dl>
87      </div>
88
89      <div id="file_comments">
90 interpolate data from an irregular 2D grid to any 2D grid.
91
92 Only 1 method available = bilinear
93</div>
94
95     
96
97     
98
99     
100
101     
102
103      <div id="routine_details">
104       
105
106        <div class="routine_details" id="_fromirr">
107
108          <h2><a class="top" href="#container">top</a>fromirr <span class="categories">
109 Interpolation
110</span></h2>
111       
112          <p class="header">
113            <span class="result">result = </span>fromirr(<span class="result"><a href="#_fromirr_param_method">method</a>, <a href="#_fromirr_param_datain">datain</a>, <a href="#_fromirr_param_lonin">lonin</a>, <a href="#_fromirr_param_latin">latin</a>, <a href="#_fromirr_param_mskin">mskin</a>, <a href="#_fromirr_param_lonout">lonout</a>, <a href="#_fromirr_param_latout">latout</a>, <a href="#_fromirr_param_mskout">mskout</a></span>, <a href="#_fromirr_keyword_WEIG">WEIG</a>=<span class="result">2d array</span>, <a href="#_fromirr_keyword_ADDR">ADDR</a>=<span class="result">2d array</span>, <a href="#_fromirr_keyword__EXTRA">_EXTRA</a>=<span class="result">_EXTRA</span>)</p>
114       
115          <div class="comments">
116</div>
117
118          <h3>Return value</h3><div class="preformat">
119 2D array the interpolated data
120</div>
121
122         
123            <h3>Parameters</h3>
124       
125           
126            <h4 id="_fromirr_param_method">method&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
127              <span class="attr">in</span>
128             
129             
130              <span class="attr">required</span>
131             
132              <span class="attr">type:</span> <span class="value">string</span>
133             
134             
135            </h4>
136       
137          <div class="comments">
138 the interpolation method. must be 'bilinear'
139</div>
140           
141            <h4 id="_fromirr_param_datain">datain&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
142              <span class="attr">in</span>
143             
144             
145              <span class="attr">required</span>
146             
147              <span class="attr">type:</span> <span class="value">2d array</span>
148             
149             
150            </h4>
151       
152          <div class="comments">
153 the input data to interpolate
154</div>
155           
156            <h4 id="_fromirr_param_lonin">lonin&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
157              <span class="attr">in</span>
158             
159             
160              <span class="attr">required</span>
161             
162              <span class="attr">type:</span> <span class="value">2d array</span>
163             
164             
165            </h4>
166       
167          <div class="comments">
168 the longitude of the input data
169</div>
170           
171            <h4 id="_fromirr_param_latin">latin&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
172              <span class="attr">in</span>
173             
174             
175              <span class="attr">required</span>
176             
177              <span class="attr">type:</span> <span class="value">2d array</span>
178             
179             
180            </h4>
181       
182          <div class="comments">
183 the latitude of the input data.
184</div>
185           
186            <h4 id="_fromirr_param_mskin">mskin&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
187              <span class="attr">in</span>
188             
189             
190              <span class="attr">required</span>
191             
192              <span class="attr">type:</span> <span class="value">2d array or -1</span>
193             
194             
195            </h4>
196       
197          <div class="comments">
198 a 2D array, the land-sea mask of the input data (1 on ocean, 0 on land)
199 put -1 if input data are not masked
200</div>
201           
202            <h4 id="_fromirr_param_lonout">lonout&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
203              <span class="attr">in</span>
204             
205             
206              <span class="attr">required</span>
207             
208              <span class="attr">type:</span> <span class="value">1d or 2d array</span>
209             
210             
211            </h4>
212       
213          <div class="comments">
214 the longitude of the output data.
215</div>
216           
217            <h4 id="_fromirr_param_latout">latout&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
218              <span class="attr">in</span>
219             
220             
221              <span class="attr">required</span>
222             
223              <span class="attr">type:</span> <span class="value">1d or 2d array</span>
224             
225             
226            </h4>
227       
228          <div class="comments">
229 the latitude of the output data.
230</div>
231           
232            <h4 id="_fromirr_param_mskout">mskout&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
233              <span class="attr">in</span>
234             
235             
236              <span class="attr">required</span>
237             
238              <span class="attr">type:</span> <span class="value">2d array or -1</span>
239             
240             
241            </h4>
242       
243          <div class="comments">
244 a 2D array, the land-sea mask of the output data (1 on ocean, 0 on land)
245 put -1 if output data are not masked
246</div>
247           
248
249         
250
251         
252
253            <h3>Keywords</h3>
254           
255            <h4 id="_fromirr_keyword_WEIG">WEIG&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
256             
257             
258             
259             
260             
261              <span class="attr">type:</span> <span class="value">2d array</span>
262             
263             
264            </h4>
265       
266            <div class="comments">
267 (see ADDR)
268</div>
269           
270            <h4 id="_fromirr_keyword_ADDR">ADDR&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
271             
272             
273             
274             
275             
276              <span class="attr">type:</span> <span class="value">2d array</span>
277             
278             
279            </h4>
280       
281            <div class="comments">
282 1) at the first call of fromirr:
283 This keyword can be set to a named variable (undefined or equal to 0) into which the
284 addresses used to perform the interpolation will be copied when the current routine exits.
285 2) Next, once this keyword is set to a defined 2d array, it is used to bypass the computation
286 of the weights and addresses used to perform the interpolation. In this case, fromirr simply
287 compute the interpolated field as:
288          dataout = total(weig*datain[addr], 1)
289          dataout = reform(dataout, jpio, jpjo, /over)
290
291 In that case, method, lonin, latin, are not used (but are necessary).
292 lonout, latout are used only to know the output domain size
293</div>
294           
295            <h4 id="_fromirr_keyword__EXTRA">_EXTRA&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
296             
297             
298             
299             
300             
301             
302             
303             
304            </h4>
305       
306            <div class="comments"> to be able to call fromirr with _extra keyword
307</div>
308           
309         
310
311          <h3>Examples</h3><div class="preformat">
312
313  To interpolate 1 field:
314
315   IDL> tncep = fromirr('bilinear', topa, glamt, gphit, tmask[*,*,0], lonout, latout, mskout)
316
317  or if you have several fields to interpolate from the same source and target grids
318
319 1) get back the weights and addresses in variables a and b
320   (that must be undefined or equal to 0 before calling fromirr)
321
322   IDL> t1ncep = fromirr('bilinear', topa, glamt, gphit, tmask[*,*,0], lonout, latout, mskout $
323                            , WEIG = a, ADDR = b)
324   IDL> help, a, b
325
326 2) use a and b that are now defined to bypass the computation of the weights
327 and addresses and speed-up the computation!
328
329   IDL> t2ncep = fromirr('bilinear', topa, WEIG = a, ADDR = b)
330</div>
331          <h3>Version history</h3>
332         
333          <h4>Version</h4><div class="preformat">
334 $Id: fromirr.pro 372 2008-08-08 12:31:53Z pinsard $
335</div>
336          <h4>History</h4><div class="preformat">
337 June 2006: Sebastien Masson (smasson@lodyc.jussieu.fr)
338</div>
339         
340         
341          <h3>Known issues</h3>
342         
343         
344         
345          <h4>Restrictions</h4><div class="preformat">
346 We supposed the data are located on a sphere, with a periodicity along
347 the longitude.
348 Note that the input data can contain the same cells several times
349 (like ORCA grid near the north pole boundary)
350</div>
351       
352         
353         
354         
355         
356         
357         
358         
359       
360          <h3>Statistics</h3>
361          <table class="statistics">
362            <tr><td>McCabe cyclic</td><td>           4</td></tr>
363            <tr><td>McCabe essential</td><td>           1</td></tr>
364            <tr><td>McCabe modular design</td><td>           1</td></tr>
365          </table>
366         
367       
368        </div>
369       
370      </div>
371
372     
373
374      <div id="tagline">Produced by IDLdoc 2.0.</div>
375
376    </div>
377
378  </body>
379</html>
Note: See TracBrowser for help on using the repository browser.