source: trunk/SRC/Documentation/idldoc_assistant_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: 8.4 KB
Line 
1
2
3<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4  <head>
5    <title>fromreg.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="fromirr.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="get_gridparams.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>fromreg.pro</h2>
59
60    <dl>
61    </dl>
62
63   
64 interpolate data from a "regular/rectangular grid" to any grid.
65
66 2 methods available: bilinear and imoms3
67
68 A "regular/rectangular grid" is defined as a grid for which
69
70 Each longitude lines have the same latitude and each latitude columns
71 have the same longitude.
72
73
74   
75
76     
77      <a name="#_fromreg"></a>
78
79      <h2>fromreg  <font size="-1" color="#006633"> 
80 Interpolation
81</font></h2>
82
83      <p><font face="Courier"><i>result = </i>fromreg(<i><a href="#_fromreg_keyword_method">method</a>, <a href="#_fromreg_keyword_datain">datain</a>, <a href="#_fromreg_keyword_lonin">lonin</a>, <a href="#_fromreg_keyword_latin">latin</a>, <a href="#_fromreg_keyword_lonout">lonout</a>, <a href="#_fromreg_keyword_latout">latout</a></i>, <a href="#_fromreg_keyword_WEIG">WEIG</a>=<i>2d array or variable name</i>, <a href="#_fromreg_keyword_ADDR">ADDR</a>=<i>2d array or variable name</i>, <a href="#_fromreg_keyword_NONORTHERNLINE">NONORTHERNLINE</a>=<i>NONORTHERNLINE</i>, <a href="#_fromreg_keyword_NOSOUTHERNLINE">NOSOUTHERNLINE</a>=<i>NOSOUTHERNLINE</i>, <a href="#_fromreg_keyword__EXTRA">_EXTRA</a>=<i>_EXTRA</i>)</font></p>
84
85   
86
87
88    <h3>Return value</h3>
89 2D array the interpolated data
90
91
92   
93    <h3>Parameters</h3>
94   
95
96    <a name="#_fromreg_keyword_method"></a>
97    <h4>method&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
98      <font size="-1" color="#006633">in</font>
99     
100     
101      <font size="-1" color="#006633">required</font>
102     
103      <font size="-1" color="#006633">type:</font> <font size="-1" color="#006633"><i>string</i></font>
104     
105     
106    </h4>
107
108   
109 the interpolation method.
110 must be 'bilinear' or 'imoms3'
111
112   
113
114    <a name="#_fromreg_keyword_datain"></a>
115    <h4>datain&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
116      <font size="-1" color="#006633">in</font>
117     
118     
119      <font size="-1" color="#006633">required</font>
120     
121      <font size="-1" color="#006633">type:</font> <font size="-1" color="#006633"><i>2d array</i></font>
122     
123     
124    </h4>
125
126   
127 the input data to interpolate
128
129   
130
131    <a name="#_fromreg_keyword_lonin"></a>
132    <h4>lonin&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
133      <font size="-1" color="#006633">in</font>
134     
135     
136      <font size="-1" color="#006633">required</font>
137     
138      <font size="-1" color="#006633">type:</font> <font size="-1" color="#006633"><i>1d or 2d array</i></font>
139     
140     
141    </h4>
142
143   
144 the longitude of the input data
145
146   
147
148    <a name="#_fromreg_keyword_latin"></a>
149    <h4>latin&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
150      <font size="-1" color="#006633">in</font>
151     
152     
153      <font size="-1" color="#006633">required</font>
154     
155      <font size="-1" color="#006633">type:</font> <font size="-1" color="#006633"><i>1d or 2d array</i></font>
156     
157     
158    </h4>
159
160   
161 the latitude of the input data
162
163   
164
165    <a name="#_fromreg_keyword_lonout"></a>
166    <h4>lonout&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
167      <font size="-1" color="#006633">in</font>
168     
169     
170      <font size="-1" color="#006633">required</font>
171     
172      <font size="-1" color="#006633">type:</font> <font size="-1" color="#006633"><i>1d or 2d array</i></font>
173     
174     
175    </h4>
176
177   
178 the longitude of the output data
179
180   
181
182    <a name="#_fromreg_keyword_latout"></a>
183    <h4>latout&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
184      <font size="-1" color="#006633">in</font>
185     
186     
187      <font size="-1" color="#006633">required</font>
188     
189      <font size="-1" color="#006633">type:</font> <font size="-1" color="#006633"><i>1d or 2d array</i></font>
190     
191     
192    </h4>
193
194   
195 the latitude of the output data
196
197   
198   
199
200   
201    <h3>Keywords</h3>
202
203   
204    <a name="#_fromreg_keyword_WEIG"></a>
205    <h4>WEIG&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
206     
207     
208     
209     
210     
211      <font size="-1" color="#006633">type:</font> <font size="-1" color="#006633"><i>2d array or variable name</i></font>
212     
213     
214    </h4>
215
216   
217 (see ADDR)
218
219   
220    <a name="#_fromreg_keyword_ADDR"></a>
221    <h4>ADDR&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
222     
223     
224     
225     
226     
227      <font size="-1" color="#006633">type:</font> <font size="-1" color="#006633"><i>2d array or variable name</i></font>
228     
229     
230    </h4>
231
232   
233 1) at the first call of fromreg:
234 This keyword can be set to a named variable (undefined or equal to 0) into which the
235 addresses used to perform the interpolation will be copied when the current routine exits.
236 2) Next, once this keyword is set to a defined 2d array, it is used to bypass the computation
237 of the weights and addresses used to perform the interpolation. In this case, fromreg simply
238 compute the interpolated field as:
239          dataout = total(weig*datain[addr], 1)
240          dataout = reform(dataout, jpio, jpjo, /over)
241
242 In that case, method, lonin, latin, are not used (but are necessary).
243 lonout, latout are used only to know the output domain size
244
245   
246    <a name="#_fromreg_keyword_NONORTHERNLINE"></a>
247    <h4>NONORTHERNLINE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
248     
249     
250     
251     
252     
253     
254     
255     
256    </h4>
257
258   
259 activate if you don't want to take into account the northern line
260 of the input data when performing the interpolation.
261
262   
263    <a name="#_fromreg_keyword_NOSOUTHERNLINE"></a>
264    <h4>NOSOUTHERNLINE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
265     
266     
267     
268     
269     
270     
271     
272     
273    </h4>
274
275   
276 activate if you don't want to take into account the southern line
277 of the input data when performing the interpolation.
278
279   
280    <a name="#_fromreg_keyword__EXTRA"></a>
281    <h4>_EXTRA&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
282     
283     
284     
285     
286     
287     
288     
289     
290    </h4>
291
292     to be able to call fromreg with _extra keyword
293
294   
295   
296
297    <h3>Examples</h3><pre>
298
299  To interpolate 1 field:
300
301   IDL> topa = fromreg('bilinear', tncep, xncep, yncep, glamt, gphit)
302
303  or if you have several fields to interpolate from the same source and target grids
304 
305 1) get back the weights and addresses in variables a and b
306   (that must be undefined or equal to 0 before calling fromreg
307
308   IDL> t1opa = fromreg('bilinear', t1ncep, xncep, yncep, glamt, gphit, WEIG = a, ADDR = b)
309   IDL> help, a, b
310
311 2) use a and b that are now defined to bypass the computation of the weights and addresses
312 and speed-up the computation!
313
314   IDL> t2opa = fromreg('bilinear', t2ncep, xncep, yncep, glamt, gphit, WEIG = a, ADDR = b)
315
316    </pre><h3>Version history</h3>
317   
318    <h4>Version</h4>
319 $Id: fromreg.pro 372 2008-08-08 12:31:53Z pinsard $
320
321    <h4>History</h4>
322  November 2005: Sebastien Masson (smasson@lodyc.jussieu.fr)
323
324   
325
326    <h3>Known issues</h3>
327   
328   
329   
330    <h4>Restrictions</h4>
331 We supposed the data are located on a sphere, with a periodicity along the
332 longitude.
333
334
335   
336   
337   
338   
339   
340   
341   
342
343    <font size="-3"><p>&nbsp;</p></font>
344    <hr size="1" color="#CCCCCC"/>
345     
346
347   
348
349    <p><font color="gray" size="-3">&nbsp;&nbsp;Produced by IDLdoc 2.0.</font></p>
350
351  </body>
352</html>
Note: See TracBrowser for help on using the repository browser.