Ignore:
Timestamp:
07/06/06 16:10:25 (18 years ago)
Author:
pinsard
Message:

improvements of Interpolation/*.pro header

File:
1 edited

Legend:

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

    r118 r125  
    11;+ 
    2 ; @file_comments extrapolate data (zinput) where maskinput eq 0 by filling  
     2; @file_comments  
     3; extrapolate data (zinput) where maskinput eq 0 by filling 
    34; step by step the coastline points with the mean value of the 8 neighbourgs. 
    45; 
     
    2021FUNCTION extrapolate, zinput, maskinput, nb_iteration, x_periodic = x_periodic, MINVAL = minval, MAXVAL = maxval 
    2122; 
    22   compile_opt idl2, strictarrsubs  
     23  compile_opt idl2, strictarrsubs 
    2324; 
    2425; check the number of iteration used in the extrapolation. 
     
    2829  ny = (size(zinput))[2] 
    2930; take care of the boundary conditions... 
    30 ;  
     31; 
    3132; for the x direction, we put 2 additional columns at the left and 
    32 ; right side of the array.  
     33; right side of the array. 
    3334; for the y direction, we put 2 additional lines at the bottom and 
    34 ; top side of the array.  
     35; top side of the array. 
    3536; These changes allow us to use shift function without taking care of 
    3637; the x and y periodicity. 
     
    5455;--------------------------------------------------------------- 
    5556;--------------------------------------------------------------- 
    56 ; extrapolation  
     57; extrapolation 
    5758;--------------------------------------------------------------- 
    5859  sqrtinv = 1./sqrt(2) 
    5960; 
    6061  cnt = 1 
    61 ; When we look for the coast line, we don't whant to select the 
     62; When we look for the coast line, we don't want to select the 
    6263; borderlines of the array. -> we force the value of the mask for 
    6364; those lines. 
     
    8687; we compute the weighted number of sea neighbourgs. 
    8788; those 4 neighbours have a weight of 1: 
    88 ;    *     
    89 ;   *+*         
    90 ;    *      
     89;    * 
     90;   *+* 
     91;    * 
    9192; 
    9293; those 4 neighbours have a weight of 1/sqrt(2): 
    9394; 
    9495;    * * 
    95 ;     +        
     96;     + 
    9697;    * * 
    9798; 
     
    117118             +1./sqrt(2)*(z[nx2+1+coast]+z[nx2-1+coast] $ 
    118119                          +z[-nx2+1+coast]+z[-nx2-1+coast]) 
    119 ;     
     120; 
    120121    IF n_elements(minval) NE 0 THEN zcoast = minval > temporary(zcoast) 
    121122    IF n_elements(maxval) NE 0 THEN zcoast = temporary(zcoast) < maxval 
     
    132133; 
    133134    cnt = cnt + 1 
    134 ; When we look for the coast line, we don't whant to select the 
     135; When we look for the coast line, we don't want to select the 
    135136; borderlines of the array. -> we force the value of the mask for 
    136137; those lines. 
     
    146147; we return the original size of the array 
    147148;--------------------------------------------------------------- 
    148    
     149; 
    149150  return, z[1:nx, 1:ny] 
    150 END  
     151END 
    151152 
Note: See TracChangeset for help on using the changeset viewer.