Ignore:
Timestamp:
06/27/06 17:47:06 (18 years ago)
Author:
pinsard
Message:

add $ in Calendar, Grid, Interpolation, Obsolete and Postscript *.pro files, add svn:keywords Id to all these files, some improvements in header

Location:
trunk/SRC/Interpolation
Files:
22 edited

Legend:

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

    • Property svn:keywords set to Id
    r114 r118  
    33; @file_comments north stereographic polar projection 
    44; 
    5 ; @keyword    /DOUBLE use double precision (default is float) 
     5; @param plam {in}{required} 
     6; 
     7; @param pphi {in}{required}  
     8; 
     9; @keyword /DOUBLE use double precision (default is float) 
    610; 
    711; @returns 
     
    2630;                   98-06 (G. Madec) 
    2731;       Feb 2005: IDL adaptation S. Masson  
     32; 
     33; @version $Id$ 
     34; 
    2835;- 
    2936;--------- 
     
    5461;        glamf, gphif: longitudes and latitudes at F-points 
    5562; 
     63; @param gcosu {in}{required} 
     64; @param gsinu {in}{required} 
     65; @param gcosv {in}{required} 
     66; @param gsinv {in}{required} 
     67; @param gcost {in}{required} 
     68; @param gsint {in}{required} 
    5669; @keyword IODIRECTORY the directory path where is located fileocemesh 
    57 ; @keyword    /DOUBLE use double precision (default is float) 
     70; @keyword /DOUBLE use double precision (default is float) 
    5871;- 
    5972;--------- 
  • trunk/SRC/Interpolation/clickincell.pro

    • Property svn:keywords set to Id
    r114 r118  
    4444;      Sebastien Masson (smasson\@lodyc.jussieu.fr) 
    4545;      August 2003 
     46; 
     47; @version $Id$ 
     48; 
    4649; 
    4750;- 
  • trunk/SRC/Interpolation/compute_fromirr_bilinear_weigaddr.pro

    • Property svn:keywords set to Id
    r110 r118  
    66; @categories interpolation 
    77; 
    8 ;     @param olonin {in}{required} longitudeof the input data  
    9 ;     @param olat   {in}{required} latitude of the input data  
    10 ;     @param omsk   {in}{required} land/se mask of the input data  
    11 ;     @param alonin {in}{required} longitude of the output data  
    12 ;     @param alat   {in}{required} latitude of the output data  
    13 ;     @param amsk   {in}{required} land/se mask of the output data  
    14 ; 
    15 ; @returns  
    16 ;     weig, addr: 2D arrays, weig and addr are the weight and addresses used to 
    17 ;     perform the interpolation: 
    18 ;          dataout = total(weig*datain[addr], 1) 
    19 ;          dataout = reform(dataout, jpia, jpja, /over) 
     8; @param olonin {in}{required} longitudeof the input data  
     9; @param olat   {in}{required} latitude of the input data  
     10; @param omsk   {in}{required} land/se mask of the input data  
     11; @param alonin {in}{required} longitude of the output data  
     12; @param alat   {in}{required} latitude of the output data  
     13; @param amsk   {in}{required} land/sea mask of the output data  
     14; 
     15; @param weig {out} 
     16; @param addr {out} 
     17; 2D arrays, weig and addr are the weight and addresses used to 
     18; perform the interpolation: 
     19;  dataout = total(weig*datain[addr], 1) 
     20;  dataout = reform(dataout, jpia, jpja, /over) 
    2021; 
    2122; @restrictions 
     
    3435;  June 2006: Sebastien Masson (smasson\@lodyc.jussieu.fr)  
    3536;  
     37; 
     38; @version $Id$ 
     39; 
    3640;- 
    3741; 
  • trunk/SRC/Interpolation/compute_fromreg_bilinear_weigaddr.pro

    • Property svn:keywords set to Id
    r114 r118  
    55; @categories interpolation 
    66; 
    7 ;     @param alonin {in}{required} longitudeof the input data  
    8 ;     @param alatin  {in}{required} latitude of the input data  
    9 ;     @param olonin {in}{required} longitude of the output data  
    10 ;     @param olat  {in}{required} latitude of the output data  
     7; @param alonin {in}{required} longitudeof the input data  
     8; @param alatin  {in}{required} latitude of the input data  
     9; @param olonin {in}{required} longitude of the output data  
     10; @param olat  {in}{required} latitude of the output data  
    1111; 
    1212; @keyword     /NONORTHERNLINE activate if you don't whant to take into 
     
    1616;          interpolation. 
    1717; 
    18 ; @returns  
    19 ;     weig, addr: 2D arrays, weig and addr are the weight and addresses used to 
    20 ;     perform the interpolation: 
    21 ;          dataout = total(weig*datain[addr], 1) 
    22 ;          dataout = reform(dataout, jpio, jpjo, /over) 
     18; @param weig {out} 
     19; @param addr {out} 
     20; 2D arrays, weig and addr are the weight and addresses used to 
     21; perform the interpolation: 
     22;  dataout = total(weig*datain[addr], 1) 
     23;  dataout = reform(dataout, jpio, jpjo, /over) 
    2324; 
    2425; @restrictions 
     
    3435;  November 2005: Sebastien Masson (smasson\@lodyc.jussieu.fr)  
    3536;  
     37; @version $Id$ 
     38; 
    3639;- 
    3740; 
  • trunk/SRC/Interpolation/compute_fromreg_imoms3_weigaddr.pro

    • Property svn:keywords set to Id
    r114 r118  
    66; @categories interpolation 
    77; 
    8 ;     @param alonin {in}{required} longitude of the input data  
    9 ;     @param alatin  {in}{required} latitude of the input data  
    10 ;     @param olonin {in}{required} longitude of the output data  
    11 ;     @param olat {in}{required} latitude of the output data  
    12 ; 
    13 ; @keyword /NONORTHERNLINE and /NOSOUTHERNLINE activate if you don't whant to take into 
    14 ;          account the northen/southern line of the input data when perfoming the 
    15 ;          interpolation. 
    16 ; 
    17 ; @returns  
    18 ;     weig, addr: 2D arrays, weig and addr are the weight and addresses used to 
    19 ;     perform the interpolation: 
    20 ;          dataout = total(weig*datain[addr], 1) 
    21 ;          dataout = reform(dataout, jpio, jpjo, /over) 
     8; @param alonin {in}{required} longitude of the input data  
     9; @param alatin  {in}{required} latitude of the input data  
     10; @param olonin {in}{required} longitude of the output data  
     11; @param olat {in}{required} latitude of the output data  
     12; 
     13; @keyword /NONORTHERNLINE  
     14; @keyword /NOSOUTHERNLINE  
     15; activate if you don't whant to take into account the northen/southern line  
     16; of the input data when perfoming the interpolation. 
     17; 
     18; @param weig {out} 
     19; @param addr {out} 
     20; 2D arrays, weig and addr are the weight and addresses used to 
     21; perform the interpolation: 
     22;  dataout = total(weig*datain[addr], 1) 
     23;  dataout = reform(dataout, jpio, jpjo, /over) 
    2224; 
    2325; @restrictions 
     
    3638;  November 2005: Sebastien Masson (smasson\@lodyc.jussieu.fr)  
    3739;  March 2006: works for rectangular grids 
     40; 
     41; @version $Id$ 
     42; 
    3843;- 
    3944; 
  • trunk/SRC/Interpolation/cutpar.pro

    • Property svn:keywords set to Id
    r114 r118  
    88; res = cutpar(x0, y0, x1, y1, x2, y2, x3, y3, n) 
    99; 
    10 ;       @param x0,y0  {in}{required} 1d arrays of p elements, giving the edge positions. The 
     10; @param x0 {in}{required} 
     11; @param y0 {in}{required}  
     12; @param x1 {in}{required} 
     13; @param y1 {in}{required}  
     14; @param x2 {in}{required} 
     15; @param y2 {in}{required}  
     16; @param x3 {in}{required} 
     17; @param y3 {in}{required}  
     18; 1d arrays of p elements, giving the edge positions. The 
    1119;       edges must be given as in plot to traw the parallelogram. (see 
    1220;       example). 
    13 ;       @param n {in}{required} each parallelogram will be cutted in n^2 pieces 
    1421; 
    15 ; @keyword         /endpoints see outputs 
     22; @param n {in}{required} each parallelogram will be cutted in n^2 pieces 
    1623; 
    17 ; @keyword         /onsphere to specify that the points are located on a 
     24; @keyword /endpoints see outputs 
     25; 
     26; @keyword /onsphere to specify that the points are located on a 
    1827;         sphere. In this case, x and y corresponds to longitude and 
    1928;         latitude in degrees. 
    2029; 
    2130; @returns 
    22 ;        -defaut: 3d array(2,n^2,p) giving the center position of each 
     31;        - defaut: 3d array(2,n^2,p) giving the center position of each 
    2332;        piece of the parallelograms 
    24 ;        -/endpoints: 3d array(2,(n+1)^2,p) giving the edge positions 
     33;        - /endpoints: 3d array(2,(n+1)^2,p) giving the edge positions 
    2534;        of each piece of the parallelograms 
    2635; 
     
    2938; @examples  
    3039; 
    31 ; x0 = [2,6,2] 
    32 ; y0 = [0,2,6] 
    33 ; x1 = [3,8,4] 
    34 ; y1 = [4,4,6] 
    35 ; x2 = [1,6,4] 
    36 ; y2 = [5,6,8] 
    37 ; x3 = [0,4,2] 
    38 ; y3 = [1,4,8] 
    39 ; n = 4 
    40 ; splot, [0,10], [0,10], xstyle = 1, ystyle = 1,/nodata 
    41 ; for i=0,2 do oplot, [x0[i],x1[i],x2[i],x3[i],x0[i]],[y0[i],y1[i],y2[i],y3[i],y0[i]] 
    42 ; res=cutpar(x0, y0, x1, y1, x2, y2, x3, y3, n) 
    43 ; for i=0,2 do oplot, [res[0,*,i]], [res[1,*,i]], color = 20+10*i, psym = 1, thick = 3 
     40; IDL> x0 = [2,6,2] 
     41; IDL> y0 = [0,2,6] 
     42; IDL> x1 = [3,8,4] 
     43; IDL> y1 = [4,4,6] 
     44; IDL> x2 = [1,6,4] 
     45; IDL> y2 = [5,6,8] 
     46; IDL> x3 = [0,4,2] 
     47; IDL> y3 = [1,4,8] 
     48; IDL> n = 4 
     49; IDL> splot, [0,10], [0,10], xstyle = 1, ystyle = 1,/nodata 
     50; IDL> for i=0,2 do oplot, [x0[i],x1[i],x2[i],x3[i],x0[i]],[y0[i],y1[i],y2[i],y3[i],y0[i]] 
     51; IDL> res=cutpar(x0, y0, x1, y1, x2, y2, x3, y3, n) 
     52; IDL> for i=0,2 do oplot, [res[0,*,i]], [res[1,*,i]], color = 20+10*i, psym = 1, thick = 3 
    4453; 
    4554; @history 
    4655;           S. Masson (smasson\@lodyc.jussieu.fr) 
    4756;           July 5th, 2002 
     57; 
     58; @version $Id$ 
     59; 
    4860;- 
    4961FUNCTION cutpar, x0, y0, x1, y1, x2, y2, x3, y3, n, endpoints = endpoints, onsphere = onsphere 
  • trunk/SRC/Interpolation/cutsegment.pro

    • Property svn:keywords set to Id
    r114 r118  
    88; res = cutsegment(x0, y0, x1, y1, n) 
    99; 
    10 ;         @param x0,y0 and x1,y1  {in}{required}  1d arrays of p elements, the coordinates of 
    11 ;         the endpoints of the p segmements 
    12 ;         @param  n {in}{required}  the number of pieces we want to cut each segment 
     10; @param x0 {in}{required} 
     11; @param y0 {in}{required} 
     12; @param x1 {in}{required} 
     13; @param y1 {in}{required} 
     14; 1d arrays of p elements, the coordinates of the endpoints of the p segments 
    1315; 
     16; @param n {in}{required} the number of pieces we want to cut each segment 
    1417; 
    15 ; @keyword         /endpoints see ouputs 
     18; @keyword /endpoints see ouputs 
    1619; 
    17 ; @keyword         /onsphere to specify that the points are located on a 
     20; @keyword /onsphere to specify that the points are located on a 
    1821;         sphere. In this case, x and y corresponds to longitude and 
    1922;         latitude in degrees. 
     
    4144;           S. Masson (smasson\@lodyc.jussieu.fr) 
    4245;           July 5th, 2002 
     46; 
     47; @version $Id$ 
     48; 
    4349;- 
    4450FUNCTION cutsegment, x0, y0, x1, y1, n, endpoints = endpoints, onsphere = onsphere 
  • trunk/SRC/Interpolation/extrapolate.pro

    • Property svn:keywords set to Id
    r114 r118  
    11;+ 
    2 ; @file_comments extrapolate data (zinput) where maskinput eq 0 by filling step by 
    3 ; step the coastline points with the mean value of the 8 neighbourgs. 
     2; @file_comments extrapolate data (zinput) where maskinput eq 0 by filling  
     3; step by step the coastline points with the mean value of the 8 neighbourgs. 
     4; 
     5; @param zinput {in}{required} 
     6; data to be extrapolate 
     7; 
     8; @param maskinput {in}{required} 
     9; 
     10; @param nb_iteration {in}{optional} 
     11; number of iteration 
     12; 
     13; @keyword x_periodic 
     14; @keyword MINVAL 
     15; @keyword MAXVAL 
     16; 
     17; @version $Id$ 
    418; 
    519;- 
  • trunk/SRC/Interpolation/fromirr.pro

    • Property svn:keywords set to Id
    r113 r118  
    3737; @examples 
    3838 
    39 ; tncep = fromirr('bilinear', topa, glamt, gphit, tmask[*,*,0], lonout, latout, mskout) 
     39; IDL> tncep = fromirr('bilinear', topa, glamt, gphit, tmask[*,*,0], lonout, latout, mskout) 
    4040; 
    4141;  or  
    4242; 
    43 ; t1ncep = fromirr('bilinear', topa, glamt, gphit, tmask[*,*,0], lonout, latout, mskout $ 
     43; IDL> t1ncep = fromirr('bilinear', topa, glamt, gphit, tmask[*,*,0], lonout, latout, mskout $ 
    4444;                            , WEIG = a, ADDR = b) 
    45 ; help, a, b 
    46 ; t2ncep = fromirr('bilinear', topa, WEIG = a, ADDR = b) 
     45; IDL> help, a, b 
     46; IDL> t2ncep = fromirr('bilinear', topa, WEIG = a, ADDR = b) 
    4747; 
    4848; @history 
    4949;  June 2006: Sebastien Masson (smasson\@lodyc.jussieu.fr)  
    5050;  
     51; @version $Id$ 
     52; 
    5153;- 
    5254;---------------------------------------------------------- 
  • trunk/SRC/Interpolation/fromreg.pro

    • Property svn:keywords set to Id
    r114 r118  
    1111; dataout = fromreg(method, datain [, lonin, latin, lonout, latout]) 
    1212; 
    13 ;    @param method {in}{required}  a string defining the interpolation method.  
     13; @param method {in}{required}  a string defining the interpolation method.  
    1414;            must be 'bilinear' or 'imoms3' 
    15 ;    @param datain {in}{required}  a 2D array the input data to interpolate 
    16 ;    @param lonin {in}{required}  1D or 2D array defining the longitude of the input data 
    17 ;    @param latin {in}{required}  1D or 2D array defining the latitude of the input data 
    18 ;    @param lonout {in}{required}  1D or 2D array defining the longitude of the output data 
    19 ;    @param lonout {in}{required}  1D or 2D array defining the latitude of the output data 
     15; @param datain {in}{required}  a 2D array the input data to interpolate 
     16; @param lonin {in}{required}  1D or 2D array defining the longitude of the input data 
     17; @param latin {in}{required}  1D or 2D array defining the latitude of the input data 
     18; @param lonout {in}{required}  1D or 2D array defining the longitude of the output data 
     19; @param latout {in}{required}  1D or 2D array defining the latitude of the output data 
    2020; 
    21 ; @keyword     WEIG (see ADDR) 
    22 ; @keyword     ADDR 2D arrays, weig and addr are the weight and addresses used to 
     21; @keyword WEIG (see ADDR) 
     22; @keyword ADDR 2D arrays, weig and addr are the weight and addresses used to 
    2323;     perform the interpolation: 
    2424;          dataout = total(weig*datain[addr], 1) 
     
    2929;     case, lonin, latin, lonout and latout are not necessary. 
    3030; 
    31 ; @keyword     /NONORTHERNLINE and /NOSOUTHERNLINE activate if you don't whant to take into 
    32 ;          account the northen/southern line of the input data when perfoming the 
    33 ;          interpolation. 
     31; @keyword /NONORTHERNLINE  
     32; @keyword /NOSOUTHERNLINE  
     33; activate if you don't whant to take into account the northen/southern line  
     34; of the input data when perfoming the interpolation. 
    3435; 
    3536; @returns 2D array: the interpolated data 
     
    4041; @examples   
    4142 
    42 topa = fromreg('bilinear', tncep, xncep, yncep, glamt, gphit) 
     43IDL> topa = fromreg('bilinear', tncep, xncep, yncep, glamt, gphit) 
    4344; 
    4445;  or  
    4546; 
    46 t1opa = fromreg('bilinear', t1ncep, xncep, yncep, glamt, gphit, WEIG = a, ADDR = b) 
    47 help, a, b 
    48 t2opa = fromreg('bilinear', t2ncep, xncep, WEIG = a, ADDR = b) 
     47IDL> t1opa = fromreg('bilinear', t1ncep, xncep, yncep, glamt, gphit, WEIG = a, ADDR = b) 
     48IDL> help, a, b 
     49IDL> t2opa = fromreg('bilinear', t2ncep, xncep, WEIG = a, ADDR = b) 
    4950; 
    5051; @history 
    5152;  November 2005: Sebastien Masson (smasson\@lodyc.jussieu.fr)  
    52 ;  
     53; 
     54; @version $Id$ 
     55; 
    5356;- 
    5457;---------------------------------------------------------- 
  • trunk/SRC/Interpolation/get_gridparams.pro

    • Property svn:keywords set to Id
    r114 r118  
    11;+ 
    22; 
    3 ; @file_comments  
     3; @file_comments 
    44;   1) extract from a NetCDF file the longitude, latidude, and their dimensions 
    5 ;      and make sure it is 1D or 2D arrays  
    6 ;    
    7 ;   or 2) given longitude and latitude arrays get their dimensions and make sure  
    8     they are 1D or 2D arrays  
     5;      and make sure it is 1D or 2D arrays 
     6; 
     7;   or 2) given longitude and latitude arrays get their dimensions and make 
     8sure they are 1D or 2D arrays 
    99; 
    1010; @categories interpolation 
    1111; 
    12 ; @examples  
    13 ;  
     12; @examples 
     13; 
    1414; 1) get_gridparams, file, lonname, latname, lon, lat, jpi, jpj, n_dimensions 
    1515; 
    16 ; or  
     16; or 
    1717; 
    1818; 2) get_gridparams, lon, lat, jpi, jpj, n_dimensions 
    1919; 
    20 ; 1)  
    21 ; @param in1 {in}{required}  the name of the netcdf file 
    22 ;  @param in2 {in}{required} the name of the variable that contains the longitude in the NetCDF file 
    23 ;  @param in3 {in}{required} the name of the variable that contains the latitude in the NetCDF file 
    24 ;  @param in4 {out} the number of points in the longitudinal direction 
    25 ;  @param in5 {out} the number of points in the latitudinal direction 
     20; 1) 
     21; @param in1 {in}{required} the name of the netcdf file 
     22; @param in2 {in}{required} the name of the variable that contains the longitude in the NetCDF file 
     23; @param in3 {in}{required} the name of the variable that contains the latitude in the NetCDF file 
     24; @param in4 {out} the number of points in the longitudinal direction 
     25; @param in5 {out} the number of points in the latitudinal direction 
    2626; @param in6 {out} the variable that will contain the longitudes 
    27 ;  @param in7 {out} the variable that will contain the latitudes 
    28 ;  @param in8 {out} 1 or 2 to specify if lon and lat should be 1D (jpi or jpj) 
    29 ; 
    30 ; or  
    31 ; 
    32 ; 2)  
    33 ; @param in1 {in}{required}  1d or 2D arrays defining longitudes and latitudes.  
    34 ; @param in2 {in}{required}  1d or 2D arrays defining longitudes and latitudes.  
    35 ;    Note that these arrays are also outputs and can therefore be modified.  
     27; @param in7 {out} the variable that will contain the latitudes 
     28; @param in8 {out} 1 or 2 to specify if lon and lat should be 1D (jpi or jpj) 
     29; 
     30; or 
     31; 
     32; 2) 
     33; @param in1 {in}{required} 1d or 2D arrays defining longitudes and latitudes. 
     34; @param in2 {in}{required} 1d or 2D arrays defining longitudes and latitudes. 
     35;    Note that these arrays are also outputs and can therefore be modified. 
    3636 
    3737; @param in1 {out} the variable that will contain the longitudes 
    38 ;  @param in2 {out} the variable that will contain the latitudes 
    39 ;  @param in3 {in} the number of points in the longitudinal direction 
    40 ;  @param in4 {in} the number of points in the latitudinal direction 
    41 ;  @param in5 {in} 1 or 2 to specify if lon and lat should be 1D (jpi or jpj) 
     38; @param in2 {out} the variable that will contain the latitudes 
     39; @param in3 {in} the number of points in the longitudinal direction 
     40; @param in4 {in} the number of points in the latitudinal direction 
     41; @param in5 {in} 1 or 2 to specify if lon and lat should be 1D (jpi or jpj) 
    4242;    arrays or 2D arrays (jpi,jpj). Note that of  n_dimensions = 1, then the 
    4343;    grid must be regular (each longitudes must be the same for all latitudes 
    44 ;    and each latitudes should be the sae for all longitudes).  
    45 ; 
    46 ; @examples   
    47 ;  
    48 ; 1) ncdf_get_gridparams, 'coordinates_ORCA_R05.nc', 'glamt', 'gphit' $ 
     44;    and each latitudes should be the sae for all longitudes). 
     45; 
     46; @keyword /DOUBLE use double precision to perform the computation 
     47; 
     48; @examples 
     49; 
     50; 1) IDL> ncdf_get_gridparams, 'coordinates_ORCA_R05.nc', 'glamt', 'gphit' $ 
    4951;            , olon, olat, jpio, jpjo, 2 
    5052; 
    51 ; 2) ncdf_get_gridparams, olon, olat, jpio, jpjo, 2 
     53; 2) IDL> ncdf_get_gridparams, olon, olat, jpio, jpjo, 2 
    5254; 
    5355; @history 
    54 ;  November 2005: Sebastien Masson (smasson\@lodyc.jussieu.fr)  
    55 ;  
     56;  November 2005: Sebastien Masson (smasson\@lodyc.jussieu.fr) 
     57; 
     58; @version $Id$ 
     59; 
    5660;- 
    5761; 
     
    5963;---------------------------------------------------------- 
    6064; 
    61  
    6265PRO get_gridparams, in1,   in2,   in3,     in4, in5, in6, in7, in8, DOUBLE = double 
    6366;                  file, lonname, latname, lon, lat, jpi, jpj, n_dimensions 
     
    7073    8:BEGIN 
    7174; get longitude and latitude 
    72       IF file_test(in1) EQ 0 THEN BEGIN  
     75      IF file_test(in1) EQ 0 THEN BEGIN 
    7376        print, 'file ' + in1 + ' does not exist' 
    7477        stop 
     
    7780      ncdf_varget, cdfido, in2, lon 
    7881      ncdf_varget, cdfido, in3, lat 
    79       ncdf_close, cdfido  
     82      ncdf_close, cdfido 
    8083      n_dimensions = in8 
    8184    END 
    82     5:BEGIN  
     85    5:BEGIN 
    8386      lon = temporary(in1) 
    8487      lat = temporary(in2) 
    8588      n_dimensions = in5 
    8689    END 
    87     ELSE:BEGIN  
     90    ELSE:BEGIN 
    8891      print, 'Bad nimber of input parameters' 
    8992      stop 
     
    9396  sizelon = size(lon) 
    9497  sizelat = size(lat) 
    95   CASE 1 OF  
     98  CASE 1 OF 
    9699;------- 
    97100; lon and lat are 1D arrays 
    98101;------- 
    99     sizelon[0] EQ 1 AND sizelat[0] EQ 1:BEGIN  
     102    sizelon[0] EQ 1 AND sizelat[0] EQ 1:BEGIN 
    100103; get jpi and jpj 
    101104      jpi = sizelon[1] 
    102105      jpj = sizelat[1] 
    103106; make sure that lon and lat have the good number of dimensions 
    104       CASE n_dimensions OF  
     107      CASE n_dimensions OF 
    105108        1: 
    106109        2:BEGIN 
     
    115118; lon is 2D array and lat is 1D array 
    116119;------- 
    117     sizelon[0] EQ 2 AND sizelat[0] EQ 1:BEGIN  
     120    sizelon[0] EQ 2 AND sizelat[0] EQ 1:BEGIN 
    118121; get jpi and jpj 
    119122      jpi = sizelon[1] 
     
    121124      IF jpj NE n_elements(lat) THEN stop 
    122125; make sure that lon and lat have the good number of dimensions 
    123       CASE n_dimensions OF  
    124         1:BEGIN  
    125           IF array_equal(lon, lon[*, 0] # replicate(1, jpj)) NE 1 THEN BEGIN  
     126      CASE n_dimensions OF 
     127        1:BEGIN 
     128          IF array_equal(lon, lon[*, 0] # replicate(1, jpj)) NE 1 THEN BEGIN 
    126129            print, 'Longitudes are not the same for all latitudes, imposible to extract a 1D array of the longitudes' 
    127130            stop 
     
    136139; lon is 1D array and lat is 2D array 
    137140;------- 
    138     sizelon[0] EQ 1 AND sizelat[0] EQ 2:BEGIN  
     141    sizelon[0] EQ 1 AND sizelat[0] EQ 2:BEGIN 
    139142; get jpi and jpj 
    140143      jpi = sizelat[1] 
     
    142145      IF jpi NE n_elements(lon) THEN stop 
    143146; make sure that lon and lat have the good number of dimensions 
    144       CASE n_dimensions OF  
    145         1:BEGIN  
    146           IF array_equal(lat, replicate(1, jpi) # lat[0, *]) NE 1 THEN BEGIN  
     147      CASE n_dimensions OF 
     148        1:BEGIN 
     149          IF array_equal(lat, replicate(1, jpi) # lat[0, *]) NE 1 THEN BEGIN 
    147150            print, 'Latitudes are not the same for all longitudes, imposible to extract a 1D array of the latitudes' 
    148151            stop 
     
    157160; lon and lat are 2D arrays 
    158161;------- 
    159     sizelon[0] EQ 2 AND sizelat[0] EQ 2:BEGIN  
     162    sizelon[0] EQ 2 AND sizelat[0] EQ 2:BEGIN 
    160163; get jpi and jpj 
    161164      IF array_equal(sizelon[1:2], sizelat[1:2]) NE 1 THEN stop 
    162165      jpi = sizelon[1] 
    163       jpj = sizelon[2]       
    164 ; make sure that lon and lat have the good number of dimensions 
    165       CASE n_dimensions OF  
    166         1:BEGIN  
    167           IF array_equal(lon, lon[*, 0] # replicate(1, jpj)) NE 1 THEN BEGIN  
     166      jpj = sizelon[2] 
     167; make sure that lon and lat have the good number of dimensions 
     168      CASE n_dimensions OF 
     169        1:BEGIN 
     170          IF array_equal(lon, lon[*, 0] # replicate(1, jpj)) NE 1 THEN BEGIN 
    168171            print, 'Longitudes are not the same for all latitudes, imposible to extract a 1D array of the longitudes' 
    169172            stop 
    170173          ENDIF 
    171174          lon = lon[*, 0] 
    172           IF array_equal(lat, replicate(1, jpi) # reform(lat[0, *])) NE 1 THEN BEGIN  
     175          IF array_equal(lat, replicate(1, jpi) # reform(lat[0, *])) NE 1 THEN BEGIN 
    173176            print, 'Latitudes are not the same for all longitudes, imposible to extract a 1D array of the latitudes' 
    174177            stop 
     
    189192; double keyword 
    190193;------- 
    191   if keyword_set(double) then BEGIN  
     194  if keyword_set(double) then BEGIN 
    192195    lon = double(temporary(lon)) 
    193196    lat = double(temporary(lat)) 
  • trunk/SRC/Interpolation/imoms3.pro

    • Property svn:keywords set to Id
    r114 r118  
    11;+ 
    22;  
     3;  
     4; @param xin {in}{required} 
     5; 
     6; @version $Id$ 
     7; 
    38;- 
    49FUNCTION imoms3, xin 
  • trunk/SRC/Interpolation/inquad.pro

    • Property svn:keywords set to Id
    r114 r118  
    55; 
    66; @examples  
    7 ; 
    8 ;     res = inquad(x, y, x1, y1, x2, y2, x3, y3, x4, y4) 
    9 ; 
    10 ;     @param x y {in}{required}  the coordinates of the point we want to know where it 
    11 ;     is. Must be a scalar if /onsphere activated else can be scalar 
    12 ;     or array.  
    13 ; 
    14 ;     @param x1 y1 x2 y2 x3 y3 x4 y4 {in}{required}  the coordinates of the 
    15 ;     quadrilateral given in the CLOCKWISE order. Scalar or array. 
    16 ; 
    17 ; 
    18 ; @keyword    /DOUBLE use double precision to perform the computation  
    19 ; 
    20 ; @keyword    /ONSPHERE to specify that the quadilateral are on a sphere and 
     7; IDL> res = inquad(x, y, x1, y1, x2, y2, x3, y3, x4, y4) 
     8; 
     9; @param x {in}{required} 
     10; @param y {in}{required} 
     11;  the coordinates of the point we want to know where it is.  
     12;  Must be a scalar if /onsphere activated else can be scalar or array.  
     13; 
     14; @param x1 {in}{required} 
     15; @param y1 {in}{required} 
     16; @param x2 {in}{required} 
     17; @param y2 {in}{required} 
     18; @param x3 {in}{required} 
     19; @param y3 {in}{required} 
     20; @param x4 {in}{required} 
     21; @param y4 {in}{required} 
     22;  the coordinates of the quadrilateral given in the CLOCKWISE order.  
     23;  Scalar or array. 
     24; 
     25; @keyword /DOUBLE use double precision to perform the computation  
     26; 
     27; @keyword /ONSPHERE to specify that the quadilateral are on a sphere and 
    2128;    that teir coordinates are longitude-latitude coordinates. In this 
    2229;    case, est-west periodicity, poles singularity and other pbs 
     
    2431;    automatically.  
    2532; 
    26 ; @keyword    ZOOMRADIUS :the zoom (circle centred on the (x,y) with a radius of 
     33; @keyword ZOOMRADIUS the zoom (circle centred on the (x,y) with a radius of 
    2734;    zoomradius degree where we look for the the quadrilateral which;    contains the (x,y) point) used for the satellite projection 
    2835;    when /onsphere is activated. Default is 4 and seems to be the 
     
    3037;    larger than 5 degrees. 
    3138;    
    32 ; @keyword    /NOPRINT to suppress the print messages. 
     39; @keyword /NOPRINT to suppress the print messages. 
     40; 
     41; @keyword NEWCOORD 
    3342; 
    3443; @returns 
     
    4251; @examples  
    4352; 
    44 ;       x = 1.*[1, 2, 6, 7, 3] 
    45 ;       y = 1.*[1, 3, 3, 4, 7] 
    46 ;       x1 = 1.*[0,4,2] 
    47 ;       y1 = 1.*[1,4,8] 
    48 ;       x2 = 1.*[1,6,4] 
    49 ;       y2 = 1.*[5,6,8] 
    50 ;       x3 = 1.*[3,8,4] 
    51 ;       y3 = 1.*[4,4,6] 
    52 ;       x4 = 1.*[2,6,2] 
    53 ;       y4 = 1.*[0,2,6] 
    54 ;       splot, [0,10], [0,10], xstyle = 1, ystyle = 1,/nodata 
    55 ;       for i=0,2 do oplot, [x4[i],x1[i],x2[i],x3[i],x4[i]],[y4[i],y1[i],y2[i],y3[i],y4[i]] 
    56 ;       oplot, x, y, color = 20, psym = 1, thick = 2 
    57 ;       print, inquad(x, y, x1, y1, x2, y2, x3, y3, x4, y4) 
     53; IDL> x = 1.*[1, 2, 6, 7, 3] 
     54; IDL> y = 1.*[1, 3, 3, 4, 7] 
     55; IDL> x1 = 1.*[0,4,2] 
     56; IDL> y1 = 1.*[1,4,8] 
     57; IDL> x2 = 1.*[1,6,4] 
     58; IDL> y2 = 1.*[5,6,8] 
     59; IDL> x3 = 1.*[3,8,4] 
     60; IDL> y3 = 1.*[4,4,6] 
     61; IDL> x4 = 1.*[2,6,2] 
     62; IDL> y4 = 1.*[0,2,6] 
     63; IDL> splot, [0,10], [0,10], xstyle = 1, ystyle = 1,/nodata 
     64; IDL> for i=0,2 do oplot, [x4[i],x1[i],x2[i],x3[i],x4[i]],[y4[i],y1[i],y2[i],y3[i],y4[i]] 
     65; IDL> oplot, x, y, color = 20, psym = 1, thick = 2 
     66; IDL> print, inquad(x, y, x1, y1, x2, y2, x3, y3, x4, y4) 
    5867; 
    5968;      On a sphere see clickincell.pro... 
     
    6372;      August 2003 
    6473;      Based on Convert_clic_ij.pro written by Gurvan Madec  
     74; 
     75; @version $Id$ 
    6576; 
    6677;- 
  • trunk/SRC/Interpolation/inrecgrid.pro

    • Property svn:keywords set to Id
    r114 r118  
    1010; res = inrecgrid(xin, yin, left, bottom) 
    1111; 
    12 ;    @param x1d {in}{required}  a 1d array, the x position on the points 
    13 ;    @param y1d {in}{required}  a 1d array, the y position on the points 
    14 ;    left {in}{required}  a 1d, monotonically increasing array, the position of the 
    15 ;   "left" border of each cell. 
    16 ;    @param bottom {in}{required}  a 1d, monotonically increasing array, the position of the 
    17 ;   "bottom" border of each cell. 
     12; @param x1d {in}{required}  a 1d array, the x position on the points 
     13; @param y1d {in}{required}  a 1d array, the y position on the points 
     14; @param left {in}{required} a 1d, monotonically increasing array,  
     15; the position of the "left" border of each cell. 
     16; @param bottom {in}{required}  a 1d, monotonically increasing array,  
     17; the position of the "bottom" border of each cell. 
    1818; 
    19 ; 
    20 ; @keyword    /output2d to get the output as a 2d array (2,n_elements(x1d)), 
     19; @keyword /output2d to get the output as a 2d array (2,n_elements(x1d)), 
    2120;    with res[0,*] the x index accoring to the 1d array defined by 
    2221;    left and res[1,*] the y index accoring to the 1d array defined by 
    2322;    bottom. 
    2423; 
    25 ; @keyword    checkout=[rbgrid,ubgrid] specify the right and upper bondaries of 
     24; @keyword checkout=[rbgrid,ubgrid] specify the right and upper bondaries of 
    2625;    the grid and check if some points are out. 
    2726; 
     
    4645;                      July 3rd, 2002 
    4746;                      October 3rd, 2003: use value_locate 
     47; 
     48; @version $Id$ 
     49; 
    4850;- 
    4951 
  • trunk/SRC/Interpolation/ll_narcs_distances.pro

    • Property svn:keywords set to Id
    r114 r118  
    6262; Sebastien Masson (smasson\@lodyc.jussieu.fr) 
    6363;                  August 2005 
     64; 
     65; @version $Id$ 
     66; 
    6467;- 
    6568 
  • trunk/SRC/Interpolation/map_npoints.pro

    • Property svn:keywords set to Id
    r114 r118  
    1212; 
    1313; @examples  
    14 ;Result = Map_nPoints(lon0, lat0, lon1, lat1) 
     14; IDL> Result = Map_nPoints(lon0, lat0, lon1, lat1) 
    1515; 
    16 ;@param Lon0 Lat0  {in}{required} np0 elements vector. longitudes and latitudes of np0 points P0  
    17 ;@param Lon1 Lat1  {in}{required}  np1 elements vector. longitude and latitude of np1 points P1  
     16; @param Lon0 {in}{required} 
     17; @param Lat0 {in}{required}  
     18; np0 elements vector. longitudes and latitudes of np0 points P0  
    1819; 
    19 ; @keyword   AZIMUTH A named variable that will receive the azimuth of the great 
     20; @param Lon1 {in}{required} 
     21; @param Lat1 {in}{required}   
     22; np1 elements vector. longitude and latitude of np1 points P1  
     23; 
     24; @keyword AZIMUTH A named variable that will receive the azimuth of the great 
    2025;       circle  connecting the two points, P0 to P1 
    21 ; @keyword   /MIDDLE to get the longitude/latitude of the middle point betwen P0 and P1. 
    22 ; @keyword   RADIANS = if set, inputs and angular outputs are in radians, otherwise 
     26; @keyword /MIDDLE to get the longitude/latitude of the middle point betwen P0 and P1. 
     27; @keyword RADIANS if set, inputs and angular outputs are in radians, otherwise 
    2328;degrees. 
    24 ; @keyword   RADIUS If given, return the distance between the two points 
     29; @keyword RADIUS If given, return the distance between the two points 
    2530;calculated using the given radius. 
    26 ;       Default value is the earth radius : 6378206.4d0 
    27 ; @keyword   TWO_BY_TWO:If given,then Map_nPoints returns the distances between 
     31; Default value is the earth radius : 6378206.4d0 
     32; 
     33; @keyword TWO_BY_TWO If given,then Map_nPoints returns the distances between 
    2834;       number n of P0 points and number n of P1 points (in that case, 
    2935;       np0 and np1 must be equal). 
     
    3945; 
    4046; @examples 
    41 ;IDL> print, $ 
    42 ;map_npoints([-105.15,1],[40.02,1],[-0.07,100,50],[51.30,20,0]) 
     47; IDL> print, $ 
     48; map_npoints([-105.15,1],[40.02,1],[-0.07,100,50],[51.30,20,0]) 
    4349;       7551369.3       5600334.8 
    4450;       12864354.       10921254. 
    4551;       14919237.       5455558.8 
    4652; 
    47 ;IDL> lon0 = [-10, 20, 100] 
    48 ;IDL> lat0 = [0, -10, 45] 
    49 ;IDL> lon1 = [10, 60, 280] 
    50 ;IDL> lat1 = [0, 10, 45] 
    51 ;IDL> dist = map_npoints(lon0, lat0, lon1, lat1, azimuth = azi) 
    52 ;IDL> help, dist, azi 
    53 ;DIST            DOUBLE    = Array[3, 3] 
    54 ;AZI             DOUBLE    = Array[3, 3] 
    55 ;IDL> print, dist[4*lindgen(3)], azi[4*lindgen(3)] 
     53; IDL> lon0 = [-10, 20, 100] 
     54; IDL> lat0 = [0, -10, 45] 
     55; IDL> lon1 = [10, 60, 280] 
     56; IDL> lat1 = [0, 10, 45] 
     57; IDL> dist = map_npoints(lon0, lat0, lon1, lat1, azimuth = azi) 
     58; IDL> help, dist, azi 
     59; DIST            DOUBLE    = Array[3, 3] 
     60; AZI             DOUBLE    = Array[3, 3] 
     61; IDL> print, dist[4*lindgen(3)], azi[4*lindgen(3)] 
    5662;       2226414.0       4957944.5       10018863. 
    5763;       90.000000       64.494450   4.9615627e-15 
    58 ;IDL> dist = map_npoints(lon0, lat0, lon1, lat1, azimuth = azi, /two_by_two) 
    59 ;IDL> help, dist, azi 
    60 ;DIST            DOUBLE    = Array[3] 
    61 ;AZI             DOUBLE    = Array[3] 
    62 ;IDL> print, dist, azi 
     64; IDL> dist = map_npoints(lon0, lat0, lon1, lat1, azimuth = azi, /two_by_two) 
     65; IDL> help, dist, azi 
     66; DIST            DOUBLE    = Array[3] 
     67; AZI             DOUBLE    = Array[3] 
     68; IDL> print, dist, azi 
    6369;       2226414.0       4957944.5       10018863. 
    6470;       90.000000       64.494450   4.9615627e-15 
    65 ;IDL> print, map_2points(lon0[0], lat0[0], lon1[0], lat1[0]) 
     71; IDL> print, map_2points(lon0[0], lat0[0], lon1[0], lat1[0]) 
    6672;       20.000000       90.000000 
    67 ;IDL> print, map_npoints(lon0[0], lat0[0], lon1[0], lat1[0], azi=azi)/6378206.4d0 / !dtor, azi 
     73; IDL> print, map_npoints(lon0[0], lat0[0], lon1[0], lat1[0], azi=azi)/6378206.4d0 / !dtor, azi 
    6874;       20.000000 
    6975;       90.000000 
    7076; 
    71 ;IDL> lon0 = [-10, 20, 100] 
    72 ;IDL> lat0 = [0, -10, 45] 
    73 ;IDL> lon1 = [10, 60, 280] 
    74 ;IDL> lat1 = [0, 10, 45] 
    75 ;IDL> mid = map_npoints(lon0, lat0, lon1, lat1, /middle, /two_by_two) 
    76 ;IDL> print, reform(mid[0,*]), reform(mid[1,*]) 
     77; IDL> lon0 = [-10, 20, 100] 
     78; IDL> lat0 = [0, -10, 45] 
     79; IDL> lon1 = [10, 60, 280] 
     80; IDL> lat1 = [0, 10, 45] 
     81; IDL> mid = map_npoints(lon0, lat0, lon1, lat1, /middle, /two_by_two) 
     82; IDL> print, reform(mid[0,*]), reform(mid[1,*]) 
    7783;       0.0000000       40.000000       190.00000 
    7884;       0.0000000  -1.5902773e-15       90.000000 
    79 ;IDL> print, (map_2points(lon0[0], lat0[0], lon1[0], lat1[0], npath = 3))[*, 1] 
     85; IDL> print, (map_2points(lon0[0], lat0[0], lon1[0], lat1[0], npath = 3))[*, 1] 
    8086;       0.0000000       0.0000000 
    81 ;IDL> print, (map_2points(lon0[1], lat0[1], lon1[1], lat1[1], npath = 3))[*, 1] 
     87; IDL> print, (map_2points(lon0[1], lat0[1], lon1[1], lat1[1], npath = 3))[*, 1] 
    8288;       40.000000  -1.5902773e-15 
    83 ;IDL> print, (map_2points(lon0[2], lat0[2], lon1[2], lat1[2], npath = 3))[*, 1] 
     89; IDL> print, (map_2points(lon0[2], lat0[2], lon1[2], lat1[2], npath = 3))[*, 1] 
    8490;       190.00000       90.000000 
    8591; 
     
    8894; Sebastien Masson (smasson\@lodyc.jussieu.fr) 
    8995;                  October 2003 
     96; 
     97; @version $Id$ 
     98; 
    9099;- 
    91100Function Map_npoints, lon0, lat0, lon1, lat1, azimuth = azimuth $ 
  • trunk/SRC/Interpolation/neighbor.pro

    • Property svn:keywords set to Id
    r114 r118  
    1010; IDL> Result = neighbor(lon0, lat0, lon1, lat1) 
    1111; 
    12 ;@param p0lon {in}{required}  scalar. longitudes of point P0.  
    13 ;@param p0lat  {in}{required}  scalar. latitudes of point P0.  
     12; @param p0lon {in}{required}  scalar. longitudes of point P0.  
     13; @param p0lat {in}{required}  scalar. latitudes of point P0.  
     14; @param neighlon {in}{optional}  
     15; @param neighlat {in}{optional}  
    1416; 
    15 ; @keyword   RADIANS if set, inputs and angular outputs are in radians, otherwise 
     17; @keyword RADIANS if set, inputs and angular outputs are in radians, otherwise 
    1618;degrees. 
    17 ; @keyword   DISTANCE dis, to get back the distances between P0 and the np1 
     19; @keyword DISTANCE dis, to get back the distances between P0 and the np1 
    1820;   points P1 in the variable dis. 
    19 ; @keyword   /SPHERE to activate if points are located on a sphere. 
     21; @keyword /SPHERE to activate if points are located on a sphere. 
    2022; 
    2123; @returns 
    22 ;       index giving the P1[index] point that is the closetest point 
    23 ;       of (P0) 
     24;       index giving the P1[index] point that is the closest point of (P0) 
    2425; 
    2526; @examples 
     
    3334; Sebastien Masson (smasson\@lodyc.jussieu.fr) 
    3435;                  October 2003 
     36; 
     37; @version $Id$ 
     38; 
    3539;- 
    3640FUNCTION neighbor, p0lon, p0lat, neighlon, neighlat, sphere = sphere, distance = distance, radians = radians 
  • trunk/SRC/Interpolation/quadrilateral2square.pro

    • Property svn:keywords set to Id
    r114 r118  
    1616; @examples  
    1717; 
    18 ;     res = square2quadrilateral(x0,y0,x1,y1,x2,y2,x3,y3,xin,yin) 
     18; IDL> res = square2quadrilateral(x0,y0,x1,y1,x2,y2,x3,y3,xin,yin) 
    1919;  
    20 ;     @param x0in {in}{required}  the coordinates of the quadrilateral 
    21 ;     @param y0in {in}{required}  the coordinates of the quadrilateral 
    22 ;     @param x1in {in}{required}  the coordinates of the quadrilateral 
    23 ;     @param y1in {in}{required}  the coordinates of the quadrilateral 
    24 ;     @param x2in {in}{required}  the coordinates of the quadrilateral 
    25 ;     @param y2in {in}{required}  the coordinates of the quadrilateral 
    26 ;     @param x3in {in}{required}  the coordinates of the quadrilateral 
    27 ;     @param y3in  {in}{required}  the coordinates of the quadrilateral 
    28 ;     (see above for correspondance with the unit square). Can be 
    29 ;     scalar or array. (x0,y0), (x1,y1), (x2,y2) and (x3,y3) are 
    30 ;     given in the anticlockwise order. 
     20; @param x0in {in}{required} 
     21; @param y0in {in}{required} 
     22; @param x1in {in}{required} 
     23; @param y1in {in}{required} 
     24; @param x2in {in}{required} 
     25; @param y2in {in}{required} 
     26; @param x3in {in}{required} 
     27; @param y3in  {in}{required} 
     28; the coordinates of the quadrilateral 
     29; (see above for correspondance with the unit square). Can be 
     30; scalar or array. (x0,y0), (x1,y1), (x2,y2) and (x3,y3) are 
     31; given in the anticlockwise order. 
    3132; 
    32 ;     @param xxin {in}{required} the coordinates of the point(s) for which we want to do the 
    33 ;     mapping. Can be scalar or array. 
    34 ;     @param yyin {in}{required} the coordinates of the point(s) for which we want to do the 
    35 ;     mapping. Can be scalar or array. 
     33; @param xxin {in}{required} the coordinates of the point(s) for which we want to do the mapping. Can be scalar or array. 
     34; @param yyin {in}{required} the coordinates of the point(s) for which we want to do the mapping. Can be scalar or array. 
     35; 
     36; @keyword PERF 
    3637; 
    3738; @returns 
     
    6566;      Chapter 3, see p 52-56 
    6667;       
     68; 
     69; @version $Id$ 
     70; 
    6771;- 
    6872;------------------------------------------------------------ 
  • trunk/SRC/Interpolation/spl_fstdrv.pro

    • Property svn:keywords set to Id
    r114 r118  
    3131;    y2: f'(x2) = y2.  
    3232; 
    33 ; 
    3433; @history 
    3534;  Sebastien Masson (smasson\@lodyc.jussieu.fr): May 2005 
     35; 
     36; @version $Id$ 
     37; 
    3638;- 
    3739;------------------------------------------------------------ 
  • trunk/SRC/Interpolation/spl_incr.pro

    • Property svn:keywords set to Id
    r114 r118  
    1212; in a way that interpolated values are also monotonically increasing. 
    1313; 
    14 ; @examples  y2 =  spl_incr(x, y, x2) 
    15 ; 
    16 ; @param x1 {in}{required}  An n-element (at least 2) input vector that specifies the 
    17 ;    tabulate points in a strict ascending order. 
    18 ; 
    19 ;    @param y1 {in}{required}  f(x) = y. An n-element input vector that specifies the values 
     14; @examples 
     15; IDL>  y2 =  spl_incr(x, y, x2) 
     16; 
     17; @param x1 {in}{required}   
     18; An n-element (at least 2) input vector that specifies the tabulate points in  
     19; a strict ascending order. 
     20; 
     21; @param y1 {in}{required}   
     22; f(x) = y. An n-element input vector that specifies the values 
    2023;    of the tabulated function F(Xi) corresponding to Xi. As f is 
    2124;    supposed to be monotonically increasing, y values must be 
    2225;    monotonically increasing. y can have equal consecutive values. 
    2326; 
    24 ;    @param x2 {in}{required}  The input values for which the interpolated values are 
    25 ;    desired. Its values must be strictly monotonically increasing.  
    26 ; 
    27 ; 
    28 ; 
     27; @param x2 {in}{required}   
     28; The input values for which the interpolated values are 
     29; desired. Its values must be strictly monotonically increasing.  
     30; 
     31; @param der2 
     32; @param x  
    2933; 
    3034; @returns  
     
    3842; @examples  
    3943; 
    40 ;     n = 100L 
    41 ;     x = (dindgen(n))^2 
    42 ;     y = abs(randomn(0, n)) 
    43 ;     y[n/2:n/2+1] = 0. 
    44 ;     y[n-n/3] = 0. 
    45 ;     y[n-n/6:n-n/6+5] = 0. 
    46 ;     y = total(y, /cumulative, /double) 
    47 ;     x2 = dindgen((n-1)^2) 
    48 ;     n2 = n_elements(x2) 
    49 ;     print, min(y[1:n-1]-y[0:n-2]) LT 0 
    50 ;     y2 = spl_incr( x, y, x2) 
    51 ;     splot, x, y, xstyle = 1, ystyle = 1, ysurx=.25, petit = [1, 2, 1], /land 
    52 ;     oplot, x2, y2, color = 100 
    53 ;     c = y2[1:n2-1] - y2[0:n2-2] 
    54 ;     print, min(c) LT 0  
    55 ;     print, min(c, max = ma), ma 
    56 ;     splot,c,xstyle=1,ystyle=1, yrange=[-.01,.05], ysurx=.25, petit = [1, 2, 2], /noerase 
    57 ;     oplot,[0, n_elements(c)], [0, 0], linestyle = 1 
     44; IDL> n = 100L 
     45; IDL> x = (dindgen(n))^2  
     46; IDL> y = abs(randomn(0, n)) 
     47; IDL> y[n/2:n/2+1] = 0. 
     48; IDL> y[n-n/3] = 0. 
     49; IDL> y[n-n/6:n-n/6+5] = 0. 
     50; IDL> y = total(y, /cumulative, /double) 
     51; IDL> x2 = dindgen((n-1)^2) 
     52; IDL> n2 = n_elements(x2) 
     53; IDL> print, min(y[1:n-1]-y[0:n-2]) LT 0 
     54; IDL> y2 = spl_incr( x, y, x2) 
     55; IDL> splot, x, y, xstyle = 1, ystyle = 1, ysurx=.25, petit = [1, 2, 1], /land 
     56; IDL> oplot, x2, y2, color = 100 
     57; IDL> c = y2[1:n2-1] - y2[0:n2-2] 
     58; IDL> print, min(c) LT 0  
     59; IDL> print, min(c, max = ma), ma 
     60; IDL> splot,c,xstyle=1,ystyle=1, yrange=[-.01,.05], ysurx=.25, petit = [1, 2, 2], /noerase 
     61; IDL> oplot,[0, n_elements(c)], [0, 0], linestyle = 1 
    5862; 
    5963; @history 
    6064;  Sebastien Masson (smasson\@lodyc.jussieu.fr): May-Dec 2005 
     65; 
     66; @version $Id$ 
     67; 
    6168;- 
    6269;------------------------------------------------------------ 
     
    8289END 
    8390 
     91;+ 
     92; @param x1 {in}{required}   
     93; An n-element (at least 2) input vector that specifies the tabulate points in  
     94; a strict ascending order. 
     95; 
     96; @param y1 {in}{required}   
     97; f(x) = y. An n-element input vector that specifies the values 
     98;    of the tabulated function F(Xi) corresponding to Xi. As f is 
     99;    supposed to be monotonically increasing, y values must be 
     100;    monotonically increasing. y can have equal consecutive values. 
     101; 
     102; @param x2 {in}{required}   
     103; The input values for which the interpolated values are 
     104; desired. Its values must be strictly monotonically increasing.  
     105; 
     106; @param der2 
     107; @param x  
     108; 
     109;- 
    84110FUNCTION pure_convex, x1, x2, y1, y2, der2, x 
    85111; 1-(1-X)^n type 
     
    103129 
    104130;+ 
    105 ; @keyword    YP0 The first derivative of the interpolating function at the 
     131; @param x 
     132; @param y 
     133; @param x2 
     134; @keyword YP0 The first derivative of the interpolating function at the 
    106135;    point X0. If YP0 is omitted, the second derivative at the 
    107136;    boundary is set to zero, resulting in a "natural spline." 
    108 ; @keyword    YPN_1 The first derivative of the interpolating function at the 
     137; @keyword YPN_1 The first derivative of the interpolating function at the 
    109138;    point Xn-1. If YPN_1 is omitted, the second derivative at the 
    110139;    boundary is set to zero, resulting in a "natural spline."  
  • trunk/SRC/Interpolation/spl_keep_mean.pro

    • Property svn:keywords set to Id
    r114 r118  
    7272; @history 
    7373;  Sebastien Masson (smasson\@lodyc.jussieu.fr): May 2005 
     74; 
     75; @version $Id$ 
     76; 
    7477;- 
    7578;------------------------------------------------------------ 
  • trunk/SRC/Interpolation/square2quadrilateral.pro

    • Property svn:keywords set to Id
    r114 r118  
    8484;      Chapter 3, see p 52-56 
    8585;       
     86; 
     87; @version $Id$ 
     88; 
    8689;- 
    8790;------------------------------------------------------------ 
Note: See TracChangeset for help on using the changeset viewer.