source: trunk/SRC/Documentation/idldoc_assistant_output/Interpolation/fromreg.html @ 234

Last change on this file since 234 was 234, checked in by pinsard, 17 years ago

new idldoc html and assistant outputs

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