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
RevLine 
[112]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   
[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" />
[112]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     
[189]35      <td><a href="./../overview.html" title="Overview of library">Overview</a></td>
[112]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>
[112]44     
45
46     
[189]47      <td><a href="./../idldoc-index.html" title="Index of files, routines, and parameters">Index</a></td>
[112]48     
49
50     
[189]51      <td><a href="./../search-page.html" title="Search library">Search</a></td>
[112]52     
53
54      <td id="selected">File</td>
55
56     
[189]57      <td><a href="../../../Interpolation//fromirr.pro" title="Source code of a file">Source</a></td>
[112]58     
59
60     
[189]61      <td><a href="./../idldoc-help.html" title="Help on IDLdoc">Help</a></td>
[112]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
[290]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>
[112]75
76</div>
77
78
79    <div id="container">
80
[189]81      <h1 class="directory"><a href="directory-overview.html">Interpolation/</a></h1>
[112]82      <h2 class="pro_file">fromirr.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 an irregular 2D grid to any 2D grid.
[402]91
92 Only 1 method available = bilinear
[138]93</div>
[112]94
95     
96
97     
98
99     
100
101     
102
103      <div id="routine_details">
104       
105
106        <div class="routine_details" id="_fromirr">
107
[234]108          <h2><a class="top" href="#container">top</a>fromirr <span class="categories">
[157]109 Interpolation
[112]110</span></h2>
111       
112          <p class="header">
[290]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>
[112]114       
115          <div class="comments">
116</div>
117
[138]118          <h3>Return value</h3><div class="preformat">
119 2D array the interpolated data
[112]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             
[163]132              <span class="attr">type:</span> <span class="value">string</span>
[112]133             
134             
135            </h4>
136       
[138]137          <div class="comments">
[242]138 the interpolation method. must be 'bilinear'
[138]139</div>
[112]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             
[163]147              <span class="attr">type:</span> <span class="value">2d array</span>
[112]148             
149             
150            </h4>
151       
[138]152          <div class="comments">
[242]153 the input data to interpolate
[138]154</div>
[112]155           
156            <h4 id="_fromirr_param_lonin">lonin&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
157              <span class="attr">in</span>
158             
159             
[210]160              <span class="attr">required</span>
[112]161             
[163]162              <span class="attr">type:</span> <span class="value">2d array</span>
[112]163             
164             
165            </h4>
166       
[138]167          <div class="comments">
[242]168 the longitude of the input data
[138]169</div>
[112]170           
171            <h4 id="_fromirr_param_latin">latin&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
172              <span class="attr">in</span>
173             
174             
[210]175              <span class="attr">required</span>
[112]176             
[163]177              <span class="attr">type:</span> <span class="value">2d array</span>
[112]178             
179             
180            </h4>
181       
[138]182          <div class="comments">
[242]183 the latitude of the input data.
[138]184</div>
[112]185           
186            <h4 id="_fromirr_param_mskin">mskin&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
187              <span class="attr">in</span>
188             
189             
[210]190              <span class="attr">required</span>
[112]191             
[203]192              <span class="attr">type:</span> <span class="value">2d array or -1</span>
[112]193             
194             
195            </h4>
196       
[138]197          <div class="comments">
198 a 2D array, the land-sea mask of the input data (1 on ocean, 0 on land)
[203]199 put -1 if input data are not masked
[138]200</div>
[112]201           
202            <h4 id="_fromirr_param_lonout">lonout&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
203              <span class="attr">in</span>
204             
205             
[210]206              <span class="attr">required</span>
[112]207             
[163]208              <span class="attr">type:</span> <span class="value">1d or 2d array</span>
[112]209             
210             
211            </h4>
212       
[138]213          <div class="comments">
[242]214 the longitude of the output data.
[138]215</div>
[112]216           
217            <h4 id="_fromirr_param_latout">latout&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
218              <span class="attr">in</span>
219             
220             
[210]221              <span class="attr">required</span>
[112]222             
[163]223              <span class="attr">type:</span> <span class="value">1d or 2d array</span>
[112]224             
225             
226            </h4>
227       
[138]228          <div class="comments">
[242]229 the latitude of the output data.
[138]230</div>
[112]231           
232            <h4 id="_fromirr_param_mskout">mskout&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
233              <span class="attr">in</span>
234             
235             
[113]236              <span class="attr">required</span>
[112]237             
[203]238              <span class="attr">type:</span> <span class="value">2d array or -1</span>
[112]239             
240             
241            </h4>
242       
[138]243          <div class="comments">
[163]244 a 2D array, the land-sea mask of the output data (1 on ocean, 0 on land)
[203]245 put -1 if output data are not masked
[112]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             
[163]261              <span class="attr">type:</span> <span class="value">2d array</span>
[112]262             
263             
264            </h4>
265       
[163]266            <div class="comments">
267 (see ADDR)
268</div>
[112]269           
270            <h4 id="_fromirr_keyword_ADDR">ADDR&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
271             
272             
273             
274             
275             
[163]276              <span class="attr">type:</span> <span class="value">2d array</span>
[112]277             
278             
279            </h4>
280       
[163]281            <div class="comments">
[234]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:
[112]288          dataout = total(weig*datain[addr], 1)
289          dataout = reform(dataout, jpio, jpjo, /over)
[402]290
[234]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
[112]293</div>
294           
[290]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           
[112]309         
310
[138]311          <h3>Examples</h3><div class="preformat">
312
[234]313  To interpolate 1 field:
314
[402]315   IDL> tncep = fromirr('bilinear', topa, glamt, gphit, tmask[*,*,0], lonout, latout, mskout)
[112]316
[234]317  or if you have several fields to interpolate from the same source and target grids
[112]318
[234]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
[402]322   IDL> t1ncep = fromirr('bilinear', topa, glamt, gphit, tmask[*,*,0], lonout, latout, mskout $
[112]323                            , WEIG = a, ADDR = b)
[402]324   IDL> help, a, b
[234]325
[242]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!
[234]328
[402]329   IDL> t2ncep = fromirr('bilinear', topa, WEIG = a, ADDR = b)
[112]330</div>
331          <h3>Version history</h3>
332         
[234]333          <h4>Version</h4><div class="preformat">
[402]334 $Id: fromirr.pro 372 2008-08-08 12:31:53Z pinsard $
[118]335</div>
[138]336          <h4>History</h4><div class="preformat">
[402]337 June 2006: Sebastien Masson (smasson@lodyc.jussieu.fr)
[138]338</div>
[112]339         
340         
341          <h3>Known issues</h3>
342         
343         
344         
[138]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)
[112]350</div>
351       
352         
353         
354         
355         
356         
357         
358         
359       
[163]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>
[112]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>
[249]379</html>
Note: See TracBrowser for help on using the repository browser.