Ignore:
Timestamp:
08/30/07 14:44:23 (17 years ago)
Author:
smasson
Message:

bugfix for interpolation from ORCA2 without mask

File:
1 edited

Legend:

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

    r262 r271  
    1616; put -1 if input data are not masked 
    1717; 
    18 ; @param nb_iteration {in}{optional}{type=integer scalar}{default=10.E20} 
     18; @param nb_iteration {in}{optional}{type=integer}{default=large enough to fill everything} 
    1919; Maximum number of iterations done in the extrapolation process. If there 
    2020; is no more masked values we exit extrapolate before reaching nb_iteration 
    21 ; (to be sure to fill everything, you can use a very large value) 
    2221; 
    2322; @keyword X_PERIODIC {type=scalar, 0 or 1}{default=0} 
     
    3231; @keyword GE0 {type=scalar 0 or 1}{default=0} 
    3332; put 1 to force the extrapolated values to be larger than 0, same as using minval=0. 
     33; 
     34; @keyword  
     35; _EXTRA to be able to call extrapolate with _extra keyword 
    3436; 
    3537; @returns 
     
    5456; 
    5557FUNCTION extrapolate, zinput, maskinput, nb_iteration, X_PERIODIC = x_periodic $ 
    56                       , MINVAL = minval, MAXVAL = maxval, GE0 = ge0 
     58                      , MINVAL = minval, MAXVAL = maxval, GE0 = ge0, _EXTRA = ex 
    5759; 
    5860  compile_opt idl2, strictarrsubs 
    5961; 
    6062; check the number of iteration used in the extrapolation. 
    61   IF n_elements(nb_iteration) EQ 0 THEN nb_iteration = 10.E20 
     63  szin = size(zinput) 
     64  IF szin[0] NE 2 THEN return, -1. ELSE szin = szin[1:2] 
     65  nx = szin[0] 
     66  ny = szin[1] 
     67  IF n_elements(nb_iteration) EQ 0 THEN nb_iteration = max(szin) 
    6268  IF nb_iteration EQ 0 THEN return, zinput 
    63   nx = (size(zinput))[1] 
    64   ny = (size(zinput))[2] 
    6569; take care of the boundary conditions... 
    6670; 
Note: See TracChangeset for help on using the changeset viewer.