Changeset 163 for trunk/SRC/Interpolation
- Timestamp:
- 08/29/06 14:59:46 (18 years ago)
- Location:
- trunk/SRC/Interpolation
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/Interpolation/clickincell.pro
r157 r163 19 19 ; grid (with no key_shift, ixminmesh, iyminmesh...) 20 20 ; 21 ; @keyword IJ see outpu s21 ; @keyword IJ see outputs 22 22 ; 23 23 ; @keyword _EXTRA to pass extra keywords to inquad and plot (when /drawcell) -
trunk/SRC/Interpolation/compute_fromreg_bilinear_weigaddr.pro
r157 r163 21 21 ; @keyword NONORTHERNLINE 22 22 ; activate if you don't want to take into 23 ; account the northen line of the input data when perfo ming the interpolation.23 ; account the northen line of the input data when performing the interpolation. 24 24 ; 25 25 ; @keyword NOSOUTHERNLINE 26 26 ; activate if you don't want to take into 27 ; account the southern line of the input data when perfo ming the interpolation.27 ; account the southern line of the input data when performing the interpolation. 28 28 ; 29 29 ; @param weig {out} … … 36 36 ; @restrictions 37 37 ; - the input grid must be a "regular grid", defined as a grid for which each 38 ; lon titudes lines have the same latitude and each latitudes columns have the38 ; longitudes lines have the same latitude and each latitudes columns have the 39 39 ; same longitude. 40 40 ; - We supposed the data are located on a sphere, with a periodicity along -
trunk/SRC/Interpolation/compute_fromreg_imoms3_weigaddr.pro
r157 r163 2 2 ; 3 3 ; @file_comments 4 ; compute the weight and address need eto interpolate data from a4 ; compute the weight and address need to interpolate data from a 5 5 ; "regular grid" to any grid using the imoms3 method 6 6 ; … … 22 22 ; @keyword NOSOUTHERNLINE 23 23 ; activate if you don't want to take into account the northen/southern line 24 ; of the input data when perfo ming the interpolation.24 ; of the input data when performing the interpolation. 25 25 ; 26 26 ; @param weig {out} … … 33 33 ; @restrictions 34 34 ; - the input grid must be a "regular/rectangular grid", defined as a grid for 35 ; which each lon titudes lines have the same latitude and each latitudes columns35 ; which each longitudes lines have the same latitude and each latitudes columns 36 36 ; have the same longitude. 37 37 ; - We supposed the data are located on a sphere, with a periodicity along -
trunk/SRC/Interpolation/cutpar.pro
r136 r163 18 18 ; 19 19 ; @param n {in}{required} 20 ; each parallelogram will be cut tedin n^2 pieces20 ; each parallelogram will be cut in n^2 pieces 21 21 ; 22 22 ; @keyword ENDPOINTS -
trunk/SRC/Interpolation/cutsegment.pro
r136 r163 16 16 ; 17 17 ; @keyword ENDPOINTS 18 ; see ou puts18 ; see outputs 19 19 ; 20 20 ; @keyword ONSPHERE … … 24 24 ; @returns 25 25 ; - default: a 3d array (2,n,p) that gives the coordinates of the 26 ; middle of the cut tedsegments.26 ; middle of the cut segments. 27 27 ; - if /ENDPOINTS, a 3d array (2,n+1,p) that gives the 28 28 ; coordinates of the endpoints of the cutted segments. -
trunk/SRC/Interpolation/fromirr.pro
r157 r163 8 8 ; Interpolation 9 9 ; 10 ; @param method {in}{required} 10 ; @param method {in}{required}{type=string} 11 11 ; a string defining the interpolation method. must be 'bilinear' 12 12 ; 13 ; @param datain {in}{required} 13 ; @param datain {in}{required}{type=2d array} 14 14 ; a 2D array the input data to interpolate 15 15 ; 16 ; @param lonin {in}{optional} 16 ; @param lonin {in}{optional}{type=2d array} 17 17 ; a 2D array defining the longitude of the input data 18 18 ; 19 ; @param latin {in}{optional} 19 ; @param latin {in}{optional}{type=2d array} 20 20 ; a 2D array defining the latitude of the input data. 21 21 ; 22 ; @param mskin {in}{optional} 22 ; @param mskin {in}{optional}{type=2d array} 23 23 ; a 2D array, the land-sea mask of the input data (1 on ocean, 0 on land) 24 24 ; 25 ; @param lonout {in}{optional} 25 ; @param lonout {in}{optional}{type=1d or 2d array} 26 26 ; 1D or 2D array defining the longitude of the output data. 27 27 ; 28 ; @param latout {in}{optional} 28 ; @param latout {in}{optional}{type=1d or 2d array} 29 29 ; 1D or 2D array defining the latitude of the output data. 30 30 ; 31 ; @param mskout {in}{required} 32 ; a 2D array, the land-sea mask of the ou put data (1 on ocean, 0 on land)31 ; @param mskout {in}{required}{type=2d array} 32 ; a 2D array, the land-sea mask of the output data (1 on ocean, 0 on land) 33 33 ; 34 ; @keyword WEIG (see ADDR) 35 ; @keyword ADDR 2D arrays, weig and addr are the weight and addresses used to 34 ; @keyword WEIG {type=2d array} 35 ; (see ADDR) 36 ; 37 ; @keyword ADDR {type=2d array} 38 ; 2D arrays, weig and addr are the weight and addresses used to 36 39 ; perform the interpolation: 37 40 ; dataout = total(weig*datain[addr], 1) … … 39 42 ; Those keywords can be set to named variables (that are undefined or equal to 0) into which the 40 43 ; values will be copied when the current routine exits. Next, they can be used to perform 41 ; the interpolation w hithout computing again those 2 parameters. This greatly44 ; the interpolation without computing again those 2 parameters. This greatly 42 45 ; speed-up the interpolation! In that case, lonin, latin, lonout and latout are not necessary. 43 46 ; -
trunk/SRC/Interpolation/fromreg.pro
r157 r163 3 3 ; @file_comments 4 4 ; interpolate data from a "regular/rectangular grid" to any grid. 5 ; 2 methods available s: bilinear and imoms36 ; A "regular/rectangular grid" is defined as a grid for which each lon titudes lines have5 ; 2 methods available: bilinear and imoms3 6 ; A "regular/rectangular grid" is defined as a grid for which each longitudes lines have 7 7 ; the same latitude and each latitudes columns have the same longitude. 8 8 ; … … 10 10 ; Interpolation 11 11 ; 12 ; @param method {in}{required} 12 ; @param method {in}{required}{type=string} 13 13 ; a string defining the interpolation method. 14 14 ; must be 'bilinear' or 'imoms3' 15 15 ; 16 ; @param datain {in}{required} 16 ; @param datain {in}{required}{type=2d array} 17 17 ; a 2D array the input data to interpolate 18 18 ; 19 ; @param lonin {in}{optional} 19 ; @param lonin {in}{optional}{type=1d or 2d array} 20 20 ; 1D or 2D array defining the longitude of the input data 21 21 ; 22 ; @param latin {in}{optional} 22 ; @param latin {in}{optional}{type=1d or 2d array} 23 23 ; 1D or 2D array defining the latitude of the input data 24 24 ; 25 ; @param lonout {in}{optional} 25 ; @param lonout {in}{optional}{type=1d or 2d array} 26 26 ; 1D or 2D array defining the longitude of the output data 27 27 ; 28 ; @param latout {in}{required} 28 ; @param latout {in}{required}{type=1d or 2d array} 29 29 ; 1D or 2D array defining the latitude of the output data 30 30 ; 31 ; @keyword WEIG (see ADDR) 32 ; @keyword ADDR 2D arrays, weig and addr are the weight and addresses used to 31 ; @keyword WEIG {type=2d array} 32 ; (see ADDR) 33 ; 34 ; @keyword ADDR {type=2d array} 35 ; 2D arrays, weig and addr are the weight and addresses used to 33 36 ; perform the interpolation: 34 37 ; dataout = total(weig*datain[addr], 1) … … 36 39 ; Those keywords can be set to named variables (that are undefined or equal to 0) into which the 37 40 ; values will be copied when the current routine exits. Next, they can be used to perform 38 ; the interpolation w hithout computing again those 2 parameters. In that41 ; the interpolation without computing again those 2 parameters. In that 39 42 ; case, lonin, latin, lonout and latout are not necessary. 40 43 ; 41 44 ; @keyword NONORTHERNLINE 45 ; activate if you don't want to take into account the northern line 46 ; of the input data when performing the interpolation. 47 ; 42 48 ; @keyword NOSOUTHERNLINE 43 ; activate if you don't want to take into account the northen/southern line44 ; of the input data when perfo ming the interpolation.49 ; activate if you don't want to take into account the southern line 50 ; of the input data when performing the interpolation. 45 51 ; 46 52 ; @returns -
trunk/SRC/Interpolation/get_gridparams.pro
r157 r163 2 2 ; 3 3 ; @file_comments 4 ; 1) extract from a NetCDF file the longitude, lati dude, and their dimensions4 ; 1) extract from a NetCDF file the longitude, latitude, and their dimensions 5 5 ; and make sure it is 1D or 2D arrays 6 6 ; … … 24 24 ; 1) 25 25 ; @param in1 {in}{required} 26 ; the name of the netcdf file 26 ; Case 1: the name of the netcdf file 27 ; Case 2: 1d or 2D arrays defining longitudes and latitudes. 28 ; Out: the variable that will contain the longitudes 27 29 ; 28 30 ; @param in2 {in}{required} 29 ; the name of the variable that contains the longitude in the NetCDF file 31 ; Case 1: the name of the variable that contains the longitude in the NetCDF file 32 ; Case 2: 1d or 2D arrays defining longitudes and latitudes. 33 ; Note that these arrays are also outputs and can therefore be modified. 34 ; Out: the variable that will contain the latitudes 30 35 ; 31 36 ; @param in3 {in}{required} 32 ; the name of the variable that contains the latitude in the NetCDF file 37 ; Case 1: the name of the variable that contains the latitude in the NetCDF file 38 ; Case 2: the number of points in the longitudinal direction. 33 39 ; 34 40 ; @param in4 {out} 35 ; the number of points in the longitudinal direction 41 ; Case 1: the number of points in the longitudinal direction 42 ; Case 2: the number of points in the latitudinal direction 36 43 ; 37 44 ; @param in5 {out} 38 ; the number of points in the latitudinal direction 45 ; Case 1: the number of points in the latitudinal direction 46 ; Case 2: 1 or 2 to specify if lon and lat should be 1D (jpi or jpj) 47 ; arrays or 2D arrays (jpi,jpj). Note that of n_dimensions = 1, then the 48 ; grid must be regular (each longitudes must be the same for all latitudes 49 ; and each latitudes should be the same for all longitudes). 39 50 ; 40 51 ; @param in6 {out} … … 46 57 ; @param in8 {out} 47 58 ; 1 or 2 to specify if lon and lat should be 1D (jpi or jpj) 48 ;49 ; or50 ;51 ; 2)52 ; @param in1 {in}{required}53 ; 1d or 2D arrays defining longitudes and latitudes.54 ;55 ; @param in2 {in}{required}56 ; 1d or 2D arrays defining longitudes and latitudes.57 ; Note that these arrays are also outputs and can therefore be modified.58 ;59 ; @param in1 {out}60 ; the variable that will contain the longitudes61 ;62 ; @param in2 {out}63 ; the variable that will contain the latitudes64 ;65 ; @param in3 {in}66 ; the number of points in the longitudinal direction67 ;68 ; @param in4 {in}69 ; the number of points in the latitudinal direction70 ;71 ; @param in5 {in}72 ; 1 or 2 to specify if lon and lat should be 1D (jpi or jpj)73 ; arrays or 2D arrays (jpi,jpj). Note that of n_dimensions = 1, then the74 ; grid must be regular (each longitudes must be the same for all latitudes75 ; and each latitudes should be the sae for all longitudes).76 59 ; 77 60 ; @keyword DOUBLE -
trunk/SRC/Interpolation/inquad.pro
r157 r163 26 26 ; 27 27 ; @keyword ONSPHERE 28 ; to specify that the quad ilateral are on a sphere and29 ; that t eir coordinates are longitude-latitude coordinates. In this28 ; to specify that the quadrilateral are on a sphere and 29 ; that their coordinates are longitude-latitude coordinates. In this 30 30 ; case, est-west periodicity, poles singularity and other pbs 31 31 ; related to longitude-latitude coordinates are managed … … 33 33 ; 34 34 ; @keyword ZOOMRADIUS {default=4} 35 ; the zoom (circle cent red on the (x,y) with a radius of35 ; the zoom (circle centered on the (x,y) with a radius of 36 36 ; zoomradius degree where we look for the the quadrilateral which 37 37 ; contains the (x,y) point) used for the satellite projection … … 197 197 ; 198 198 ; 199 ; the point is inside the quad ilateral if test eq 1199 ; the point is inside the quadrilateral if test eq 1 200 200 ; with test equal to: 201 201 ; test = ((x-x1)*(y2-y1) GE (x2-x1)*(y-y1)) $ -
trunk/SRC/Interpolation/inrecgrid.pro
r157 r163 9 9 ; Without loop 10 10 ; 11 ; @param x1d {in}{required} 12 ; a 1d array,the x position on the points11 ; @param x1d {in}{required}{type=1d array} 12 ; the x position on the points 13 13 ; 14 ; @param y1d {in}{required} 15 ; a 1d array,the y position on the points14 ; @param y1d {in}{required}{type=1d array} 15 ; the y position on the points 16 16 ; 17 ; @param left {in}{required} 18 ; a 1d, monotonically increasing array, 17 ; @param left {in}{required}{type=1d monotonically increasing array} 19 18 ; the position of the "left" border of each cell. 20 19 ; 21 ; @param bottom {in}{required} 22 ; a 1d, monotonically increasing array, 20 ; @param bottom {in}{required}{type=1d monotonically increasing array} 23 21 ; the position of the "bottom" border of each cell. 24 22 ; -
trunk/SRC/Interpolation/ll_narcs_distances.pro
r136 r163 35 35 ; 36 36 ; @returns 37 ; a (2, n) array containing the longitude/latitude of the resulting spoints.37 ; a (2, n) array containing the longitude/latitude of the resulting points. 38 38 ; Values are in radians unless the keyword DEGREES is set. 39 39 ; … … 67 67 ;- 68 68 ; 69 FUNCTION LL_NARCS_DISTANCES, lon0, lat0, arc_dist, az, DEGREES = degs69 FUNCTION ll_narcs_distances, lon0, lat0, arc_dist, az, DEGREES = degs 70 70 ; 71 71 compile_opt idl2, strictarrsubs -
trunk/SRC/Interpolation/map_npoints.pro
r136 r163 24 24 ; 25 25 ; @keyword MIDDLE 26 ; to get the longitude/latitude of the middle point betwe n P0 and P1.26 ; to get the longitude/latitude of the middle point between P0 and P1. 27 27 ; 28 28 ; @keyword RADIANS … … 41 41 ; @returns 42 42 ; An (np0,np1) array giving the distance in meter between np0 43 ; points P0 and np1 points P1. Element (i,j) of the ou put is the43 ; points P0 and np1 points P1. Element (i,j) of the output is the 44 44 ; distance between element P0[i] and P1[j]. 45 45 ; If keyword /TWO_BY_TWO is given then Map_nPoints returns … … 100 100 ; 101 101 ;- 102 Function Map_npoints, lon0, lat0, lon1, lat1, AZIMUTH = azimuth $102 Function map_npoints, lon0, lat0, lon1, lat1, AZIMUTH = azimuth $ 103 103 , RADIANS = radians, RADIUS = radius, MIDDLE = middle, TWO_BY_TWO = two_by_two 104 104 -
trunk/SRC/Interpolation/quadrilateral2square.pro
r157 r163 25 25 ; @param y3in {in}{required} 26 26 ; the coordinates of the quadrilateral 27 ; (see above for correspond ance with the unit square). Can be27 ; (see above for correspondence with the unit square). Can be 28 28 ; scalar or array. (x0,y0), (x1,y1), (x2,y2) and (x3,y3) are 29 29 ; given in the anticlockwise order. … … 41 41 ; @returns 42 42 ; 43 ; (2,n) array: the new coo dinates (xout, yout) of the (xin,yin) point(s) after43 ; (2,n) array: the new coordinates (xout, yout) of the (xin,yin) point(s) after 44 44 ; mapping. 45 45 ; If xin is a scalar, then n is equal to the number of elements of x0. -
trunk/SRC/Interpolation/spl_incr.pro
r136 r163 142 142 ; 143 143 ;--------------------------------- 144 ; check and initiali sation ...144 ; check and initialization ... 145 145 ;--------------------------------- 146 146 ; -
trunk/SRC/Interpolation/spl_keep_mean.pro
r136 r163 18 18 ; a strict ascending order. 19 19 ; 20 ; @param yin {in}{required} 20 ; @param yin {in}{required}{type=array} 21 21 ; an array with one element less than x. y[i] represents the 22 22 ; mean value between x[i] and x[i+1]. if /GE0 is activated, y must … … 84 84 ; 85 85 ;--------------------------------- 86 ; check and initiali sation ...86 ; check and initialization ... 87 87 ;--------------------------------- 88 88 ; -
trunk/SRC/Interpolation/square2quadrilateral.pro
r157 r163 23 23 ; @param x3in {in}{required} 24 24 ; @param y3in {in}{required} 25 ; the coordinates of the quadrilateral (see above for correspond ance with the25 ; the coordinates of the quadrilateral (see above for correspondence with the 26 26 ; unit square). 27 27 ; Can be scalar or array. … … 34 34 ; 35 35 ; @returns 36 ; (2,n) array: the new coo dinates (xout, yout) of the (xin,yin)36 ; (2,n) array: the new coordinates (xout, yout) of the (xin,yin) 37 37 ; point(s) after mapping. 38 38 ; If xin is a scalar, then n is equal to the number of elements of
Note: See TracChangeset
for help on using the changeset viewer.