Changeset 228
- Timestamp:
- 03/16/07 15:12:31 (17 years ago)
- Location:
- trunk/SRC/Interpolation
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/Interpolation/fromirr.pro
r205 r228 38 38 ; 39 39 ; @keyword ADDR {type=2d array} 40 ; 2D arrays, weig and addr are the weight and addresses used to 41 ; perform the interpolation: 40 ; 1) at the first call of fromirr: 41 ; This keyword can be set to a named variable (undefined or equal to 0) into which the 42 ; addresses used to perform the interpolation will be copied when the current routine exits. 43 ; 2) Next, once this keyword is set to a defined 2d array, it is used to bypass the computation 44 ; of the weights and addresses used to perform the interpolation. In this case, fromirr simply 45 ; compute the interpolated field as: 42 46 ; dataout = total(weig*datain[addr], 1) 43 47 ; dataout = reform(dataout, jpio, jpjo, /over) 44 ; Those keywords can be set to named variables (that are undefined or equal to 0) into which the 45 ; values will be copied when the current routine exits. Next, they can be used to perform 46 ; the interpolation without computing again those 2 parameters. This greatly 47 ; speed-up the interpolation! In that case, lonin, latin, lonout and latout are not necessary. 48 ; In that case, method, lonin, latin, are not used (but are necessary). 49 ; lonout, latout are used only to know the output domain size 48 50 ; 49 51 ; @returns … … 58 60 ; @examples 59 61 ; 62 ; To interpolate 1 field: 63 ; 60 64 ; IDL> tncep = fromirr('bilinear', topa, glamt, gphit, tmask[*,*,0], lonout, latout, mskout) 61 65 ; 62 ; or 66 ; or if you have several fields to interpolate from the same source and target grids 67 ; 68 ; 1) get back the weights and addresses in variables a and b 69 ; (that must be undefined or equal to 0 before calling fromirr) 63 70 ; 64 71 ; IDL> t1ncep = fromirr('bilinear', topa, glamt, gphit, tmask[*,*,0], lonout, latout, mskout $ 65 72 ; , WEIG = a, ADDR = b) 66 73 ; IDL> help, a, b 74 ; 75 ; 2) use a and b that are now defined to bypass the computation of the weights and addresses 76 ; and speed-up the computation! 77 ; 67 78 ; IDL> t2ncep = fromirr('bilinear', topa, WEIG = a, ADDR = b) 68 79 ; -
trunk/SRC/Interpolation/fromreg.pro
r205 r228 29 29 ; 1D or 2D array defining the latitude of the output data 30 30 ; 31 ; @keyword WEIG {type=2d array }31 ; @keyword WEIG {type=2d array or variable name} 32 32 ; (see ADDR) 33 33 ; 34 ; @keyword ADDR {type=2d array} 35 ; 2D arrays, weig and addr are the weight and addresses used to 36 ; perform the interpolation: 34 ; @keyword ADDR {type=2d array or variable name} 35 ; 1) at the first call of fromreg: 36 ; This keyword can be set to a named variable (undefined or equal to 0) into which the 37 ; addresses used to perform the interpolation will be copied when the current routine exits. 38 ; 2) Next, once this keyword is set to a defined 2d array, it is used to bypass the computation 39 ; of the weights and addresses used to perform the interpolation. In this case, fromreg simply 40 ; compute the interpolated field as: 37 41 ; dataout = total(weig*datain[addr], 1) 38 42 ; dataout = reform(dataout, jpio, jpjo, /over) 39 ; Those keywords can be set to named variables (that are undefined or equal to 0) into which the 40 ; values will be copied when the current routine exits. Next, they can be used to perform 41 ; the interpolation without computing again those 2 parameters. In that 42 ; case, lonin, latin, lonout and latout are not necessary. 43 ; In that case, method, lonin, latin, are not used (but are necessary). 44 ; lonout, latout are used only to know the output domain size 43 45 ; 44 46 ; @keyword NONORTHERNLINE … … 59 61 ; @examples 60 62 ; 63 ; To interpolate 1 field: 64 ; 61 65 ; IDL> topa = fromreg('bilinear', tncep, xncep, yncep, glamt, gphit) 62 66 ; 63 ; or 67 ; or if you have several fields to interpolate from the same source and target grids 68 ; 69 ; 1) get back the weights and addresses in variables a and b 70 ; (that must be undefined or equal to 0 before calling fromreg) 64 71 ; 65 72 ; IDL> t1opa = fromreg('bilinear', t1ncep, xncep, yncep, glamt, gphit, WEIG = a, ADDR = b) 66 73 ; IDL> help, a, b 67 ; IDL> t2opa = fromreg('bilinear', t2ncep, xncep, WEIG = a, ADDR = b) 74 ; 75 ; 2) use a and b that are now defined to bypass the computation of the weights and addresses 76 ; and speed-up the computation! 77 ; 78 ; IDL> t2opa = fromreg('bilinear', t2ncep, xncep, yncep, glamt, gphit, WEIG = a, ADDR = b) 68 79 ; 69 80 ; @history
Note: See TracChangeset
for help on using the changeset viewer.