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

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