source: trunk/SRC/Documentation/idldoc_assistant_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: 8.5 KB
Line 
1
2
3<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4  <head>
5    <title>fromirr.pro (SAXO Documentation Assistant)</title>
6  </head>
7
8  <body text="#000000" bgcolor="#FFFFFF">
9
10   
11<!-- Navbar template takes a structure with the following fields:
12       overview_href :
13       overview_selected :
14       dir_overview_href :
15       dir_overview_selected :
16       categories_href :
17       categories_selected :
18       index_href :
19       index_selected :
20       search_href :
21       search_selected :
22       file_selected :
23       source_href :
24       source_selected :
25       help_href :
26       help_selected :
27       etc_selected :
28
29       prev_file_href :
30       next_file_href :
31
32       view_single_page_href :
33       view_frames_href :
34
35       summary_fields_href :
36       summary_routine_href :
37       details_routine_href :
38
39       title :
40       subtitle :
41       user :
42-->
43
44
45<table border="0" cellpadding="0" cellspacing="0" width="98%" bgcolor="#F0F0FF" valign="bottom">
46  <tr>
47    <td width="10%">
48<a href="file_interp.html"><img src="./../prev.gif" border="0" alt="Previous"></a></td>
49    <td width="80%" align="center" valign="center">
50<font size=-1><i>SAXO Documentation Assistant</i>: <a href="./../home.html">Overview</a></font></td>
51    <td width="10%" align="right">
52<a href="fromreg.html"><img src="./../next.gif" border="0" alt="Next"></a></td>
53  </tr>
54</table>
55
56
57    <h1><font size="-2">Interpolation/</font></h1>
58    <h2>fromirr.pro</h2>
59
60    <dl>
61    </dl>
62
63   
64 interpolate data from an irregular 2D grid to any 2D grid.
65   Only 1 method available = bilinear
66
67
68   
69
70     
71      <a name="#_fromirr"></a>
72
73      <h2>fromirr  <font size="-1" color="#006633">
74 Interpolation
75</font></h2>
76
77      <p><font face="Courier"><i>result = </i>fromirr(<i><a href="#_fromirr_keyword_method">method</a>, <a href="#_fromirr_keyword_datain">datain</a>, <a href="#_fromirr_keyword_lonin">lonin</a>, <a href="#_fromirr_keyword_latin">latin</a>, <a href="#_fromirr_keyword_mskin">mskin</a>, <a href="#_fromirr_keyword_lonout">lonout</a>, <a href="#_fromirr_keyword_latout">latout</a>, <a href="#_fromirr_keyword_mskout">mskout</a></i>, <a href="#_fromirr_keyword_WEIG">WEIG</a>=<i>2d array</i>, <a href="#_fromirr_keyword_ADDR">ADDR</a>=<i>2d array</i>, <a href="#_fromirr_keyword__EXTRA">_EXTRA</a>=<i>_EXTRA</i>)</font></p>
78
79   
80
81
82    <h3>Return value</h3>
83 2D array the interpolated data
84
85
86   
87    <h3>Parameters</h3>
88   
89
90    <a name="#_fromirr_keyword_method"></a>
91    <h4>method&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
92      <font size="-1" color="#006633">in</font>
93     
94     
95      <font size="-1" color="#006633">required</font>
96     
97      <font size="-1" color="#006633">type:</font> <font size="-1" color="#006633"><i>string</i></font>
98     
99     
100    </h4>
101
102   
103 the interpolation method. must be 'bilinear'
104
105   
106
107    <a name="#_fromirr_keyword_datain"></a>
108    <h4>datain&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
109      <font size="-1" color="#006633">in</font>
110     
111     
112      <font size="-1" color="#006633">required</font>
113     
114      <font size="-1" color="#006633">type:</font> <font size="-1" color="#006633"><i>2d array</i></font>
115     
116     
117    </h4>
118
119   
120 the input data to interpolate
121
122   
123
124    <a name="#_fromirr_keyword_lonin"></a>
125    <h4>lonin&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
126      <font size="-1" color="#006633">in</font>
127     
128     
129      <font size="-1" color="#006633">required</font>
130     
131      <font size="-1" color="#006633">type:</font> <font size="-1" color="#006633"><i>2d array</i></font>
132     
133     
134    </h4>
135
136   
137 the longitude of the input data
138
139   
140
141    <a name="#_fromirr_keyword_latin"></a>
142    <h4>latin&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
143      <font size="-1" color="#006633">in</font>
144     
145     
146      <font size="-1" color="#006633">required</font>
147     
148      <font size="-1" color="#006633">type:</font> <font size="-1" color="#006633"><i>2d array</i></font>
149     
150     
151    </h4>
152
153   
154 the latitude of the input data.
155
156   
157
158    <a name="#_fromirr_keyword_mskin"></a>
159    <h4>mskin&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
160      <font size="-1" color="#006633">in</font>
161     
162     
163      <font size="-1" color="#006633">required</font>
164     
165      <font size="-1" color="#006633">type:</font> <font size="-1" color="#006633"><i>2d array or -1</i></font>
166     
167     
168    </h4>
169
170   
171 a 2D array, the land-sea mask of the input data (1 on ocean, 0 on land)
172 put -1 if input data are not masked
173
174   
175
176    <a name="#_fromirr_keyword_lonout"></a>
177    <h4>lonout&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
178      <font size="-1" color="#006633">in</font>
179     
180     
181      <font size="-1" color="#006633">required</font>
182     
183      <font size="-1" color="#006633">type:</font> <font size="-1" color="#006633"><i>1d or 2d array</i></font>
184     
185     
186    </h4>
187
188   
189 the longitude of the output data.
190
191   
192
193    <a name="#_fromirr_keyword_latout"></a>
194    <h4>latout&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
195      <font size="-1" color="#006633">in</font>
196     
197     
198      <font size="-1" color="#006633">required</font>
199     
200      <font size="-1" color="#006633">type:</font> <font size="-1" color="#006633"><i>1d or 2d array</i></font>
201     
202     
203    </h4>
204
205   
206 the latitude of the output data.
207
208   
209
210    <a name="#_fromirr_keyword_mskout"></a>
211    <h4>mskout&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
212      <font size="-1" color="#006633">in</font>
213     
214     
215      <font size="-1" color="#006633">required</font>
216     
217      <font size="-1" color="#006633">type:</font> <font size="-1" color="#006633"><i>2d array or -1</i></font>
218     
219     
220    </h4>
221
222   
223 a 2D array, the land-sea mask of the output data (1 on ocean, 0 on land)
224 put -1 if output data are not masked
225
226   
227   
228
229   
230    <h3>Keywords</h3>
231
232   
233    <a name="#_fromirr_keyword_WEIG"></a>
234    <h4>WEIG&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
235     
236     
237     
238     
239     
240      <font size="-1" color="#006633">type:</font> <font size="-1" color="#006633"><i>2d array</i></font>
241     
242     
243    </h4>
244
245   
246 (see ADDR)
247
248   
249    <a name="#_fromirr_keyword_ADDR"></a>
250    <h4>ADDR&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
251     
252     
253     
254     
255     
256      <font size="-1" color="#006633">type:</font> <font size="-1" color="#006633"><i>2d array</i></font>
257     
258     
259    </h4>
260
261   
262 1) at the first call of fromirr:
263 This keyword can be set to a named variable (undefined or equal to 0) into which the
264 addresses used to perform the interpolation will be copied when the current routine exits.
265 2) Next, once this keyword is set to a defined 2d array, it is used to bypass the computation
266 of the weights and addresses used to perform the interpolation. In this case, fromirr simply
267 compute the interpolated field as:
268          dataout = total(weig*datain[addr], 1)
269          dataout = reform(dataout, jpio, jpjo, /over)
270 In that case, method, lonin, latin, are not used (but are necessary).
271 lonout, latout are used only to know the output domain size
272
273   
274    <a name="#_fromirr_keyword__EXTRA"></a>
275    <h4>_EXTRA&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
276     
277     
278     
279     
280     
281     
282     
283     
284    </h4>
285
286     to be able to call fromirr with _extra keyword
287
288   
289   
290
291    <h3>Examples</h3><pre>
292
293  To interpolate 1 field:
294
295 IDL> tncep = fromirr('bilinear', topa, glamt, gphit, tmask[*,*,0], lonout, latout, mskout)
296
297  or if you have several fields to interpolate from the same source and target grids
298
299 1) get back the weights and addresses in variables a and b
300   (that must be undefined or equal to 0 before calling fromirr)
301
302 IDL> t1ncep = fromirr('bilinear', topa, glamt, gphit, tmask[*,*,0], lonout, latout, mskout $
303                            , WEIG = a, ADDR = b)
304 IDL> help, a, b
305
306 2) use a and b that are now defined to bypass the computation of the weights
307 and addresses and speed-up the computation!
308
309 IDL> t2ncep = fromirr('bilinear', topa, WEIG = a, ADDR = b)
310
311    </pre><h3>Version history</h3>
312   
313    <h4>Version</h4>
314 $Id: fromirr.pro 327 2007-12-13 16:22:35Z pinsard $
315
316    <h4>History</h4>
317  June 2006: Sebastien Masson (smasson@lodyc.jussieu.fr)
318
319   
320
321    <h3>Known issues</h3>
322   
323   
324   
325    <h4>Restrictions</h4>
326 We supposed the data are located on a sphere, with a periodicity along
327 the longitude.
328 Note that the input data can contain the same cells several times
329 (like ORCA grid near the north pole boundary)
330
331
332   
333   
334   
335   
336   
337   
338   
339
340    <font size="-3"><p>&nbsp;</p></font>
341    <hr size="1" color="#CCCCCC"/>
342     
343
344   
345
346    <p><font color="gray" size="-3">&nbsp;&nbsp;Produced by IDLdoc 2.0.</font></p>
347
348  </body>
349</html>
Note: See TracBrowser for help on using the repository browser.