Changeset 228


Ignore:
Timestamp:
03/16/07 15:12:31 (17 years ago)
Author:
smasson
Message:

more explicit header

Location:
trunk/SRC/Interpolation
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/SRC/Interpolation/fromirr.pro

    r205 r228  
    3838; 
    3939; @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: 
    4246;          dataout = total(weig*datain[addr], 1) 
    4347;          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 
    4850; 
    4951; @returns 
     
    5860; @examples 
    5961; 
     62;  To interpolate 1 field: 
     63; 
    6064; IDL> tncep = fromirr('bilinear', topa, glamt, gphit, tmask[*,*,0], lonout, latout, mskout) 
    6165; 
    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) 
    6370; 
    6471; IDL> t1ncep = fromirr('bilinear', topa, glamt, gphit, tmask[*,*,0], lonout, latout, mskout $ 
    6572;                            , WEIG = a, ADDR = b) 
    6673; 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; 
    6778; IDL> t2ncep = fromirr('bilinear', topa, WEIG = a, ADDR = b) 
    6879; 
  • trunk/SRC/Interpolation/fromreg.pro

    r205 r228  
    2929; 1D or 2D array defining the latitude of the output data 
    3030; 
    31 ; @keyword WEIG {type=2d array} 
     31; @keyword WEIG {type=2d array or variable name} 
    3232; (see ADDR) 
    3333; 
    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: 
    3741;          dataout = total(weig*datain[addr], 1) 
    3842;          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 
    4345; 
    4446; @keyword NONORTHERNLINE 
     
    5961; @examples 
    6062; 
     63;  To interpolate 1 field: 
     64; 
    6165; IDL> topa = fromreg('bilinear', tncep, xncep, yncep, glamt, gphit) 
    6266; 
    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) 
    6471; 
    6572; IDL> t1opa = fromreg('bilinear', t1ncep, xncep, yncep, glamt, gphit, WEIG = a, ADDR = b) 
    6673; 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) 
    6879; 
    6980; @history 
Note: See TracChangeset for help on using the changeset viewer.