Changeset 125 for trunk/SRC/Interpolation/extrapolate.pro
- Timestamp:
- 07/06/06 16:10:25 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/Interpolation/extrapolate.pro
r118 r125 1 1 ;+ 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 3 4 ; step by step the coastline points with the mean value of the 8 neighbourgs. 4 5 ; … … 20 21 FUNCTION extrapolate, zinput, maskinput, nb_iteration, x_periodic = x_periodic, MINVAL = minval, MAXVAL = maxval 21 22 ; 22 compile_opt idl2, strictarrsubs 23 compile_opt idl2, strictarrsubs 23 24 ; 24 25 ; check the number of iteration used in the extrapolation. … … 28 29 ny = (size(zinput))[2] 29 30 ; take care of the boundary conditions... 30 ; 31 ; 31 32 ; 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. 33 34 ; 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. 35 36 ; These changes allow us to use shift function without taking care of 36 37 ; the x and y periodicity. … … 54 55 ;--------------------------------------------------------------- 55 56 ;--------------------------------------------------------------- 56 ; extrapolation 57 ; extrapolation 57 58 ;--------------------------------------------------------------- 58 59 sqrtinv = 1./sqrt(2) 59 60 ; 60 61 cnt = 1 61 ; When we look for the coast line, we don't w hant to select the62 ; When we look for the coast line, we don't want to select the 62 63 ; borderlines of the array. -> we force the value of the mask for 63 64 ; those lines. … … 86 87 ; we compute the weighted number of sea neighbourgs. 87 88 ; those 4 neighbours have a weight of 1: 88 ; * 89 ; *+* 90 ; * 89 ; * 90 ; *+* 91 ; * 91 92 ; 92 93 ; those 4 neighbours have a weight of 1/sqrt(2): 93 94 ; 94 95 ; * * 95 ; + 96 ; + 96 97 ; * * 97 98 ; … … 117 118 +1./sqrt(2)*(z[nx2+1+coast]+z[nx2-1+coast] $ 118 119 +z[-nx2+1+coast]+z[-nx2-1+coast]) 119 ; 120 ; 120 121 IF n_elements(minval) NE 0 THEN zcoast = minval > temporary(zcoast) 121 122 IF n_elements(maxval) NE 0 THEN zcoast = temporary(zcoast) < maxval … … 132 133 ; 133 134 cnt = cnt + 1 134 ; When we look for the coast line, we don't w hant to select the135 ; When we look for the coast line, we don't want to select the 135 136 ; borderlines of the array. -> we force the value of the mask for 136 137 ; those lines. … … 146 147 ; we return the original size of the array 147 148 ;--------------------------------------------------------------- 148 149 ; 149 150 return, z[1:nx, 1:ny] 150 END 151 END 151 152
Note: See TracChangeset
for help on using the changeset viewer.