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