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