Ignore:
Timestamp:
08/07/08 11:32:02 (16 years ago)
Author:
pinsard
Message:

improvements of headers (alignments of IDL prompt in examples)

Location:
trunk/SRC/Interpolation
Files:
20 edited

Legend:

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

    r370 r371  
    4343; 
    4444; @examples 
    45 IDL> res = clickincell() 
     45 IDL> res = clickincell() 
    4646; 
    4747; Click with the left button to select a cell. Clicking one more 
     
    4949; Click on the right button to quit. 
    5050; 
    51 IDL> plt, findgen(jpi,jpj),/nodata,map=[90,0,0],/ortho 
    52 IDL> print, clickincell(/draw,color=150,/xy) 
     51 IDL> plt, findgen(jpi,jpj),/nodata,map=[90,0,0],/ortho 
     52 IDL> print, clickincell(/draw,color=150,/xy) 
    5353; 
    5454; @history 
  • trunk/SRC/Interpolation/cutpar.pro

    r327 r371  
    4242; @examples 
    4343; 
    44 ; IDL> x0 = [2,6,2] 
    45 ; IDL> y0 = [0,2,6] 
    46 ; IDL> x1 = [3,8,4] 
    47 ; IDL> y1 = [4,4,6] 
    48 ; IDL> x2 = [1,6,4] 
    49 ; IDL> y2 = [5,6,8] 
    50 ; IDL> x3 = [0,4,2] 
    51 ; IDL> y3 = [1,4,8] 
    52 ; IDL> n = 4 
    53 ; IDL> splot, [0,10], [0,10], xstyle = 1, ystyle = 1,/nodata 
    54 ; 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]] 
    55 ; IDL> res=cutpar(x0, y0, x1, y1, x2, y2, x3, y3, n) 
    56 ; IDL> for i=0,2 do oplot, [res[0,*,i]], [res[1,*,i]], color = 20+10*i, psym = 1, thick = 3 
     44;   IDL> x0 = [2,6,2] 
     45;   IDL> y0 = [0,2,6] 
     46;   IDL> x1 = [3,8,4] 
     47;   IDL> y1 = [4,4,6] 
     48;   IDL> x2 = [1,6,4] 
     49;   IDL> y2 = [5,6,8] 
     50;   IDL> x3 = [0,4,2] 
     51;   IDL> y3 = [1,4,8] 
     52;   IDL> n = 4 
     53;   IDL> splot, [0,10], [0,10], xstyle = 1, ystyle = 1,/nodata 
     54;   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]] 
     55;   IDL> res=cutpar(x0, y0, x1, y1, x2, y2, x3, y3, n) 
     56;   IDL> for i=0,2 do oplot, [res[0,*,i]], [res[1,*,i]], color = 20+10*i, psym = 1, thick = 3 
    5757; 
    5858; @history 
  • trunk/SRC/Interpolation/cutsegment.pro

    r327 r371  
    3030; 
    3131; @examples 
    32 ; IDL> x0=[2,5] 
    33 ; IDL> y0=[5,1] 
    34 ; IDL> x1=[9,3] 
    35 ; IDL> y1=[1,8] 
    36 ; IDL> res=cutsegment(x0, y0, x1, y1, 10) 
    37 ; IDL> splot, [0,10], [0,10], xstyle = 1, ystyle = 1,/nodata 
    38 ; IDL> oplot, [x0[0], x1[0]], [y0[0], y1[0]] 
    39 ; IDL> oplot, [res[0,*,0]], [res[1,*,0]], color = 20, psym = 1, thick = 3 
    40 ; IDL> oplot, [x0[1], x1[1]], [y0[1], y1[1]] 
    41 ; IDL> oplot, [res[0,*,1]], [res[1,*,1]], color = 40, psym = 1, thick = 3 
     32; 
     33;   IDL> x0=[2,5] 
     34;   IDL> y0=[5,1] 
     35;   IDL> x1=[9,3] 
     36;   IDL> y1=[1,8] 
     37;   IDL> res=cutsegment(x0, y0, x1, y1, 10) 
     38;   IDL> splot, [0,10], [0,10], xstyle = 1, ystyle = 1,/nodata 
     39;   IDL> oplot, [x0[0], x1[0]], [y0[0], y1[0]] 
     40;   IDL> oplot, [res[0,*,0]], [res[1,*,0]], color = 20, psym = 1, thick = 3 
     41;   IDL> oplot, [x0[1], x1[1]], [y0[1], y1[1]] 
     42;   IDL> oplot, [res[0,*,1]], [res[1,*,1]], color = 40, psym = 1, thick = 3 
    4243; 
    4344; @history 
  • trunk/SRC/Interpolation/extrapolate.pro

    r327 r371  
    3939; 
    4040; @examples 
    41 ; IDL> a=extrapolate(dist(jpi,jpj),tmask[*,*,0],/x_periodic) 
    42 ; IDL> tvplus, a 
    43 ; IDL> tvplus, a*(1-tmask[*,*,0]) 
     41; 
     42;   IDL> a=extrapolate(dist(jpi,jpj),tmask[*,*,0],/x_periodic) 
     43;   IDL> tvplus, a 
     44;   IDL> tvplus, a*(1-tmask[*,*,0]) 
     45; 
    4446; get the coastline: 
    45 ; IDL> a=extrapolate(tmask[*,*,0],tmask[*,*,0],1,/x_periodic) 
    46 ; IDL> tvplus, a-tmask[*,*,0] 
     47; 
     48;   IDL> a=extrapolate(tmask[*,*,0],tmask[*,*,0],1,/x_periodic) 
     49;   IDL> tvplus, a-tmask[*,*,0] 
    4750; 
    4851; @history 
  • trunk/SRC/Interpolation/extrapsmooth.pro

    r327 r371  
    3737; 
    3838; @examples 
    39 ; IDL> a=extrapsmooth(dist(jpi,jpj),tmask[*,*,0],/x_periodic) 
    40 ; IDL> tvplus, a 
     39; 
     40;   IDL> a=extrapsmooth(dist(jpi,jpj),tmask[*,*,0],/x_periodic) 
     41;   IDL> tvplus, a 
     42; 
    4143; compare to extrapolate result: 
    42 ; IDL> b=extrapolate(dist(jpi,jpj),tmask[*,*,0],/x_periodic) 
    43 ; IDL> tvplus, b, window = 1 
     44; 
     45;   IDL> b=extrapolate(dist(jpi,jpj),tmask[*,*,0],/x_periodic) 
     46;   IDL> tvplus, b, window = 1 
    4447; 
    4548; @history 
  • trunk/SRC/Interpolation/file_interp.pro

    r362 r371  
    232232; @examples 
    233233; 
    234 ; IDL> file_interp, filein, fileout, gridout, inxaxisname = 'lo', inyaxisname = 'la', keep = ['lo', 'la', 'cond_sed'] 
    235 ; 
    236 ; IDL> file_interp, in, out, gdout, inuseasmask = 'sst', inmissing_value = -1.00000e+30, missing_value = -1000.00 
     234;   IDL> file_interp, filein, fileout, gridout, inxaxisname = 'lo', inyaxisname = 'la', keep = ['lo', 'la', 'cond_sed'] 
     235;   IDL> file_interp, in, out, gdout, inuseasmask = 'sst', inmissing_value = -1.00000e+30, missing_value = -1000.00 
    237236; 
    238237; @history 
  • trunk/SRC/Interpolation/fromirr.pro

    r327 r371  
    6565;  To interpolate 1 field: 
    6666; 
    67 ; IDL> tncep = fromirr('bilinear', topa, glamt, gphit, tmask[*,*,0], lonout, latout, mskout) 
     67;   IDL> tncep = fromirr('bilinear', topa, glamt, gphit, tmask[*,*,0], lonout, latout, mskout) 
    6868; 
    6969;  or if you have several fields to interpolate from the same source and target grids 
     
    7272;   (that must be undefined or equal to 0 before calling fromirr) 
    7373; 
    74 ; IDL> t1ncep = fromirr('bilinear', topa, glamt, gphit, tmask[*,*,0], lonout, latout, mskout $ 
     74;   IDL> t1ncep = fromirr('bilinear', topa, glamt, gphit, tmask[*,*,0], lonout, latout, mskout $ 
    7575;                            , WEIG = a, ADDR = b) 
    76 ; IDL> help, a, b 
     76;   IDL> help, a, b 
    7777; 
    7878; 2) use a and b that are now defined to bypass the computation of the weights  
    7979; and addresses and speed-up the computation! 
    8080; 
    81 ; IDL> t2ncep = fromirr('bilinear', topa, WEIG = a, ADDR = b) 
     81;   IDL> t2ncep = fromirr('bilinear', topa, WEIG = a, ADDR = b) 
    8282; 
    8383; @history 
  • trunk/SRC/Interpolation/fromreg.pro

    r327 r371  
    6767;  To interpolate 1 field: 
    6868; 
    69 ; IDL> topa = fromreg('bilinear', tncep, xncep, yncep, glamt, gphit) 
     69;   IDL> topa = fromreg('bilinear', tncep, xncep, yncep, glamt, gphit) 
    7070; 
    7171;  or if you have several fields to interpolate from the same source and target grids 
     
    7474;   (that must be undefined or equal to 0 before calling fromreg 
    7575; 
    76 ; IDL> t1opa = fromreg('bilinear', t1ncep, xncep, yncep, glamt, gphit, WEIG = a, ADDR = b) 
    77 ; IDL> help, a, b 
     76;   IDL> t1opa = fromreg('bilinear', t1ncep, xncep, yncep, glamt, gphit, WEIG = a, ADDR = b) 
     77;   IDL> help, a, b 
    7878; 
    7979; 2) use a and b that are now defined to bypass the computation of the weights and addresses  
    8080; and speed-up the computation! 
    8181; 
    82 ; IDL> t2opa = fromreg('bilinear', t2ncep, xncep, yncep, glamt, gphit, WEIG = a, ADDR = b) 
     82;   IDL> t2opa = fromreg('bilinear', t2ncep, xncep, yncep, glamt, gphit, WEIG = a, ADDR = b) 
    8383; 
    8484; @history 
  • trunk/SRC/Interpolation/get_gridparams.pro

    r327 r371  
    1414; 
    1515; Case 1: 
    16 ; IDL> get_gridparams, file name/id, lonname, latname, lon, lat, jpi, jpj, n_dimensions 
     16;   IDL> get_gridparams, file name/id, lonname, latname, lon, lat, jpi, jpj, n_dimensions 
    1717; 
    1818; Case 2: 
    19 ; IDL> get_gridparams, lon, lat, jpi, jpj, n_dimensions 
     19;   IDL> get_gridparams, lon, lat, jpi, jpj, n_dimensions 
    2020; 
    2121; @param in1 {in}{required} 
  • trunk/SRC/Interpolation/inquad.pro

    r327 r371  
    5454; @examples 
    5555; 
    56 ; IDL> x = 1.*[1, 2, 6, 7, 3] 
    57 ; IDL> y = 1.*[1, 3, 3, 4, 7] 
    58 ; IDL> x1 = 1.*[0,4,2] 
    59 ; IDL> y1 = 1.*[1,4,8] 
    60 ; IDL> x2 = 1.*[1,6,4] 
    61 ; IDL> y2 = 1.*[5,6,8] 
    62 ; IDL> x3 = 1.*[3,8,4] 
    63 ; IDL> y3 = 1.*[4,4,6] 
    64 ; IDL> x4 = 1.*[2,6,2] 
    65 ; IDL> y4 = 1.*[0,2,6] 
    66 ; IDL> splot, [0,10], [0,10], xstyle = 1, ystyle = 1,/nodata 
    67 ; 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]] 
    68 ; IDL> oplot, x, y, color = 20, psym = 1, thick = 2 
    69 ; IDL> print, inquad(x, y, x1, y1, x2, y2, x3, y3, x4, y4) 
     56;   IDL> x = 1.*[1, 2, 6, 7, 3] 
     57;   IDL> y = 1.*[1, 3, 3, 4, 7] 
     58;   IDL> x1 = 1.*[0,4,2] 
     59;   IDL> y1 = 1.*[1,4,8] 
     60;   IDL> x2 = 1.*[1,6,4] 
     61;   IDL> y2 = 1.*[5,6,8] 
     62;   IDL> x3 = 1.*[3,8,4] 
     63;   IDL> y3 = 1.*[4,4,6] 
     64;   IDL> x4 = 1.*[2,6,2] 
     65;   IDL> y4 = 1.*[0,2,6] 
     66;   IDL> splot, [0,10], [0,10], xstyle = 1, ystyle = 1,/nodata 
     67;   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]] 
     68;   IDL> oplot, x, y, color = 20, psym = 1, thick = 2 
     69;   IDL> print, inquad(x, y, x1, y1, x2, y2, x3, y3, x4, y4) 
    7070; 
    7171; On a sphere see 
  • trunk/SRC/Interpolation/inrecgrid.pro

    r327 r371  
    3535; @examples 
    3636; 
    37 ; IDL> a=indgen(5) 
    38 ; IDL> b=indgen(7) 
    39 ; IDL> r=inrecgrid([0.25,3.25,2],[4.25,2.8,1.4],a,b) 
    40 ; IDL> print, r 
     37;   IDL> a=indgen(5) 
     38;   IDL> b=indgen(7) 
     39;   IDL> r=inrecgrid([0.25,3.25,2],[4.25,2.8,1.4],a,b) 
     40;   IDL> print, r 
    4141;            20          13           7 
    42 ; IDL> r=inrecgrid([0.25,3.25,2],[4.25,2.8,1.4],a,a+1,b,b+1,/output2d) 
    43 ; IDL> print, r 
     42;   IDL> r=inrecgrid([0.25,3.25,2],[4.25,2.8,1.4],a,a+1,b,b+1,/output2d) 
     43;   IDL> print, r 
    4444;        0.00000      4.00000 
    4545;        3.00000      2.00000 
  • trunk/SRC/Interpolation/lbcorca.pro

    r331 r371  
    2929; 
    3030; @examples 
    31 ;    IDL> \@tst_initorca2 
    32 ;    IDL> a = dist(jpiglo, jpjglo) 
    33 ;    IDL> print, lbcorca(a, 'T') 
    34 ;    IDL> dummy = lbcorca(a, 'T', /correction) 
    35 ;    IDL> print, lbcorca(a, 'T') 
     31; 
     32;   IDL> \@tst_initorca2 
     33;   IDL> a = dist(jpiglo, jpjglo) 
     34;   IDL> print, lbcorca(a, 'T') 
     35;   IDL> dummy = lbcorca(a, 'T', /correction) 
     36;   IDL> print, lbcorca(a, 'T') 
    3637 
    3738; @history 
  • trunk/SRC/Interpolation/ll_narcs_distances.pro

    r327 r371  
    4040; 
    4141; @examples 
    42 ; IDL> Lon_lat0 = [1.0, 2.0]; Initial point specified in radians 
    43 ; IDL> Arc_Dist = 2.0; Arc distance in radians 
    44 ; IDL> Az = 1.0; Azimuth in radians 
    45 ; IDL> Result = LL_ARC_DISTANCE(Lon_lat0, Arc_Dist, Az) 
    46 ; IDL> PRINT, Result 
     42; 
     43;   IDL> Lon_lat0 = [1.0, 2.0]; Initial point specified in radians 
     44;   IDL> Arc_Dist = 2.0; Arc distance in radians 
     45;   IDL> Az = 1.0; Azimuth in radians 
     46;   IDL> Result = LL_ARC_DISTANCE(Lon_lat0, Arc_Dist, Az) 
     47;   IDL> PRINT, Result 
    4748;       2.91415    -0.622234 
    4849; 
    49 ; IDL> lon0 = [-10, 20, 100] 
    50 ; IDL> lat0 = [0, -10, 45] 
    51 ; IDL> lon1 = [10, 60, 280] 
    52 ; IDL> lat1 = [0, 10, 45] 
    53 ; IDL> dist = map_npoints(lon0, lat0, lon1, lat1, azimuth = azi, /two_by_two) 
    54 ; IDL> earthradius = 6378206.4d0 
    55 ; IDL> res = ll_narcs_distances(lon0, lat0, dist/earthradius, azi, /degrees) 
    56 ; IDL> print, reform(res[0, *]) 
     50;   IDL> lon0 = [-10, 20, 100] 
     51;   IDL> lat0 = [0, -10, 45] 
     52;   IDL> lon1 = [10, 60, 280] 
     53;   IDL> lat1 = [0, 10, 45] 
     54;   IDL> dist = map_npoints(lon0, lat0, lon1, lat1, azimuth = azi, /two_by_two) 
     55;   IDL> earthradius = 6378206.4d0 
     56;   IDL> res = ll_narcs_distances(lon0, lat0, dist/earthradius, azi, /degrees) 
     57;   IDL> print, reform(res[0, *]) 
    5758;       10.000000       60.000000       280.00000 
    58 ; IDL> print, reform(res[1, *]) 
     59;   IDL> print, reform(res[1, *]) 
    5960;           1.1999280e-15       10.000000       45.000000 
    6061; 
  • trunk/SRC/Interpolation/map_npoints.pro

    r327 r371  
    4848; and P1[i] (in that case, we have np0 = np1 = np) ; if /MIDDLE see this keyword. 
    4949; @examples 
    50 ; IDL> print, $ 
    51 ; IDL> map_npoints([-105.15,1],[40.02,1],[-0.07,100,50],[51.30,20,0]) 
     50;   IDL> print, $ 
     51;   IDL> map_npoints([-105.15,1],[40.02,1],[-0.07,100,50],[51.30,20,0]) 
    5252; 7551369.3 5600334.8 
    5353; 12864354. 10921254. 
    5454; 14919237. 5455558.8 
    5555; 
    56 ; IDL> lon0 = [-10, 20, 100] 
    57 ; IDL> lat0 = [0, -10, 45] 
    58 ; IDL> lon1 = [10, 60, 280] 
    59 ; IDL> lat1 = [0, 10, 45] 
    60 ; IDL> dist = map_npoints(lon0, lat0, lon1, lat1, AZIMUTH = azi) 
    61 ; IDL> help, dist, azi 
     56;   IDL> lon0 = [-10, 20, 100] 
     57;   IDL> lat0 = [0, -10, 45] 
     58;   IDL> lon1 = [10, 60, 280] 
     59;   IDL> lat1 = [0, 10, 45] 
     60;   IDL> dist = map_npoints(lon0, lat0, lon1, lat1, AZIMUTH = azi) 
     61;   IDL> help, dist, azi 
    6262; DIST DOUBLE = Array[3, 3] 
    6363; AZI DOUBLE = Array[3, 3] 
    64 ; IDL> print, dist[4*lindgen(3)], azi[4*lindgen(3)] 
     64;   IDL> print, dist[4*lindgen(3)], azi[4*lindgen(3)] 
    6565; 2226414.0 4957944.5 10018863. 
    6666; 90.000000 64.494450 4.9615627e-15 
    67 ; IDL> dist = map_npoints(lon0, lat0, lon1, lat1, AZIMUTH = azi, /TWO_BY_TWO) 
    68 ; IDL> help, dist, azi 
     67;   IDL> dist = map_npoints(lon0, lat0, lon1, lat1, AZIMUTH = azi, /TWO_BY_TWO) 
     68;   IDL> help, dist, azi 
    6969; DIST DOUBLE = Array[3] 
    7070; AZI DOUBLE = Array[3] 
    71 ; IDL> print, dist, azi 
     71;   IDL> print, dist, azi 
    7272; 2226414.0 4957944.5 10018863. 
    7373; 90.000000 64.494450 4.9615627e-15 
    74 ; IDL> print, map_2points(lon0[0], lat0[0], lon1[0], lat1[0]) 
     74;   IDL> print, map_2points(lon0[0], lat0[0], lon1[0], lat1[0]) 
    7575; 20.000000 90.000000 
    76 ; IDL> print, map_npoints(lon0[0], lat0[0], lon1[0], lat1[0], AZIMUTH=azi)/6378206.4d0 / !dtor, azi 
     76;   IDL> print, map_npoints(lon0[0], lat0[0], lon1[0], lat1[0], AZIMUTH=azi)/6378206.4d0 / !dtor, azi 
    7777; 20.000000 
    7878; 90.000000 
    7979; 
    80 ; IDL> lon0 = [-10, 20, 100] 
    81 ; IDL> lat0 = [0, -10, 45] 
    82 ; IDL> lon1 = [10, 60, 280] 
    83 ; IDL> lat1 = [0, 10, 45] 
    84 ; IDL> mid = map_npoints(lon0, lat0, lon1, lat1, /MIDDLE, /TWO_BY_TWO) 
    85 ; IDL> print, reform(mid[0,*]), reform(mid[1,*]) 
     80;   IDL> lon0 = [-10, 20, 100] 
     81;   IDL> lat0 = [0, -10, 45] 
     82;   IDL> lon1 = [10, 60, 280] 
     83;   IDL> lat1 = [0, 10, 45] 
     84;   IDL> mid = map_npoints(lon0, lat0, lon1, lat1, /MIDDLE, /TWO_BY_TWO) 
     85;   IDL> print, reform(mid[0,*]), reform(mid[1,*]) 
    8686; 0.0000000 40.000000 190.00000 
    8787; 0.0000000 -1.5902773e-15 90.000000 
    88 ; IDL> print, (map_2points(lon0[0], lat0[0], lon1[0], lat1[0], npath = 3))[*, 1] 
     88;   IDL> print, (map_2points(lon0[0], lat0[0], lon1[0], lat1[0], npath = 3))[*, 1] 
    8989; 0.0000000 0.0000000 
    90 ; IDL> print, (map_2points(lon0[1], lat0[1], lon1[1], lat1[1], npath = 3))[*, 1] 
     90;   IDL> print, (map_2points(lon0[1], lat0[1], lon1[1], lat1[1], npath = 3))[*, 1] 
    9191; 40.000000 -1.5902773e-15 
    92 ; IDL> print, (map_2points(lon0[2], lat0[2], lon1[2], lat1[2], npath = 3))[*, 1] 
     92;   IDL> print, (map_2points(lon0[2], lat0[2], lon1[2], lat1[2], npath = 3))[*, 1] 
    9393; 190.00000 90.000000 
    9494; 
  • trunk/SRC/Interpolation/neighbor.pro

    r327 r371  
    3232; 
    3333; @examples 
    34 ; IDL> print, neighbor(-105.15,40.02,[-0.07,100,50],[51.30,20,0], $ 
    35 ; IDL> distance=dis) 
     34; 
     35;   IDL> print, neighbor(-105.15,40.02,[-0.07,100,50],[51.30,20,0], $ 
     36;               distance=dis) 
    3637;                  0 
    37 ; IDL> print, dis 
     38;   IDL> print, dis 
    3839;             105.684      206.125      160.228 
    3940; 
  • trunk/SRC/Interpolation/quadrilateral2square.pro

    r358 r371  
    5656; @examples 
    5757; 
    58 ; IDL> splot,[0,5],[0,3],/nodata,xstyle=1,ystyle=1 
    59 ; IDL> tracegrille, findgen(11)*.1, findgen(11)*.1,color=indgen(12)*20 
    60 ; IDL> xin = (findgen(11)*.1)#replicate(1, 11) 
    61 ; IDL> yin = replicate(1, 11)#(findgen(11)*.1) 
    62 ; IDL> out = square2quadrilateral(2,1,3,0,5,1,2,3, xin, yin) 
    63 ; IDL> tracegrille, reform(out[0,*],11,11), reform(out[1,*],11,11),color=indgen(12)*20 
     58;   IDL> splot,[0,5],[0,3],/nodata,xstyle=1,ystyle=1 
     59;   IDL> tracegrille, findgen(11)*.1, findgen(11)*.1,color=indgen(12)*20 
     60;   IDL> xin = (findgen(11)*.1)#replicate(1, 11) 
     61;   IDL> yin = replicate(1, 11)#(findgen(11)*.1) 
     62;   IDL> out = square2quadrilateral(2,1,3,0,5,1,2,3, xin, yin) 
     63;   IDL> tracegrille, reform(out[0,*],11,11), reform(out[1,*],11,11),color=indgen(12)*20 
    6464; 
    65 ; IDL> inorg=quadrilateral2square(2,1,3,0,5,1,2,3,out[0,*],out[1,*]) 
    66 ; IDL> tracegrille, reform(inorg[0,*],11,11), reform(inorg[1,*],11,11),color=indgen(12)*20 
     65;   IDL> inorg=quadrilateral2square(2,1,3,0,5,1,2,3,out[0,*],out[1,*]) 
     66;   IDL> tracegrille, reform(inorg[0,*],11,11), reform(inorg[1,*],11,11),color=indgen(12)*20 
    6767; 
    6868; @history 
  • trunk/SRC/Interpolation/spl_fstdrv.pro

    r325 r371  
    1313; 
    1414; @examples 
    15 ; IDL> y2 =  spl_fstdrv(x, y, yscd, x2) 
     15; 
     16;   IDL> y2 =  spl_fstdrv(x, y, yscd, x2) 
    1617; 
    1718; @param x {in}{required} 
  • trunk/SRC/Interpolation/spl_incr.pro

    r327 r371  
    3434; 
    3535; @examples 
    36 ; IDL> n = 100L 
    37 ; IDL> x = (dindgen(n))^2 
    38 ; IDL> y = abs(randomn(0, n)) 
    39 ; IDL> y[n/2:n/2+1] = 0. 
    40 ; IDL> y[n-n/3] = 0. 
    41 ; IDL> y[n-n/6:n-n/6+5] = 0. 
    42 ; IDL> y = total(y, /cumulative, /double) 
    43 ; IDL> x2 = dindgen((n-1)^2) 
    44 ; IDL> n2 = n_elements(x2) 
    45 ; IDL> print, min(y[1:n-1]-y[0:n-2]) LT 0 
    46 ; IDL> y2 = spl_incr( x, y, x2) 
    47 ; IDL> splot, x, y, xstyle = 1, ystyle = 1, ysurx=.25, petit = [1, 2, 1], /land 
    48 ; IDL> oplot, x2, y2, color = 100 
    49 ; IDL> c = y2[1:n2-1] - y2[0:n2-2] 
    50 ; IDL> print, min(c) LT 0 
    51 ; IDL> print, min(c, max = ma), ma 
    52 ; IDL> splot,c,xstyle=1,ystyle=1, yrange=[-.01,.05], ysurx=.25, petit = [1, 2, 2], /noerase 
    53 ; IDL> oplot,[0, n_elements(c)], [0, 0], linestyle = 1 
     36; 
     37;   IDL> n = 100L 
     38;   IDL> x = (dindgen(n))^2 
     39;   IDL> y = abs(randomn(0, n)) 
     40;   IDL> y[n/2:n/2+1] = 0. 
     41;   IDL> y[n-n/3] = 0. 
     42;   IDL> y[n-n/6:n-n/6+5] = 0. 
     43;   IDL> y = total(y, /cumulative, /double) 
     44;   IDL> x2 = dindgen((n-1)^2) 
     45;   IDL> n2 = n_elements(x2) 
     46;   IDL> print, min(y[1:n-1]-y[0:n-2]) LT 0 
     47;   IDL> y2 = spl_incr( x, y, x2) 
     48;   IDL> splot, x, y, xstyle = 1, ystyle = 1, ysurx=.25, petit = [1, 2, 1], /land 
     49;   IDL> oplot, x2, y2, color = 100 
     50;   IDL> c = y2[1:n2-1] - y2[0:n2-2] 
     51;   IDL> print, min(c) LT 0 
     52;   IDL> print, min(c, max = ma), ma 
     53;   IDL> splot,c,xstyle=1,ystyle=1, yrange=[-.01,.05], ysurx=.25, petit = [1, 2, 2], /noerase 
     54;   IDL> oplot,[0, n_elements(c)], [0, 0], linestyle = 1 
    5455; 
    5556; @history 
  • trunk/SRC/Interpolation/spl_keep_mean.pro

    r327 r371  
    4949;    12 monthly values of precipitations into daily values: 
    5050; 
    51 ; IDL> yr1 = 1990 
    52 ; IDL> yr2 = 1992 
    53 ; IDL> nyr = yr2-yr1+1 
    54 ; IDL> n1 = 12*nyr+1 
    55 ; IDL> x = julday(1+findgen(n1), replicate(1, n1) $ 
    56 ; IDL>        , replicate(yr1, n1), fltarr(n1)) 
    57 ; IDL> n2 = 365*nyr + total(leapyr(yr1+indgen(nyr))) + 1 
    58 ; IDL> x2 = julday(replicate(1, n2), 1+findgen(n2) $ 
    59 ; IDL>            , replicate(yr1, n2), fltarr(n2)) 
    60 ; IDL> y = abs(randomn(0, n1-1)) 
    61 ; IDL> y2 = spl_keep_mean(x, y, x2, /ge0) 
    62  
    63 ; IDL> print, min(x, max = ma), ma 
    64 ; IDL> print, min(x2, max = ma), ma 
    65 ; IDL> print, vairdate([min(x, max = ma), ma]) 
    66 ; IDL> print, total(y*(x[1:n1-1]-x[0:n1-2])) 
    67 ; IDL> print, total(y2*(x2[1:n2-1]-x2[0:n2-2])) 
     51;   IDL> yr1 = 1990 
     52;   IDL> yr2 = 1992 
     53;   IDL> nyr = yr2-yr1+1 
     54;   IDL> n1 = 12*nyr+1 
     55;   IDL> x = julday(1+findgen(n1), replicate(1, n1) $ 
     56;   IDL>        , replicate(yr1, n1), fltarr(n1)) 
     57;   IDL> n2 = 365*nyr + total(leapyr(yr1+indgen(nyr))) + 1 
     58;   IDL> x2 = julday(replicate(1, n2), 1+findgen(n2) $ 
     59;   IDL>            , replicate(yr1, n2), fltarr(n2)) 
     60;   IDL> y = abs(randomn(0, n1-1)) 
     61;   IDL> y2 = spl_keep_mean(x, y, x2, /ge0) 
     62; 
     63;   IDL> print, min(x, max = ma), ma 
     64;   IDL> print, min(x2, max = ma), ma 
     65;   IDL> print, vairdate([min(x, max = ma), ma]) 
     66;   IDL> print, total(y*(x[1:n1-1]-x[0:n1-2])) 
     67;   IDL> print, total(y2*(x2[1:n2-1]-x2[0:n2-2])) 
    6868; 
    6969; @history 
  • trunk/SRC/Interpolation/square2quadrilateral.pro

    r358 r371  
    5151; @examples 
    5252; 
    53 ; IDL> splot,[0,5],[0,3],/nodata,xstyle=1,ystyle=1 
    54 ; IDL> tracegrille, findgen(11)*.1, findgen(11)*.1,color=indgen(12)*20 
    55 ; IDL> xin = (findgen(11)*.1)#replicate(1, 11) 
    56 ; IDL> yin = replicate(1, 11)#(findgen(11)*.1) 
    57 ; IDL> out = square2quadrilateral(2,1,3,0,5,1,2,3, xin, yin) 
    58 ; IDL> tracegrille, reform(out[0,*],11,11), reform(out[1,*],11,11),color=indgen(12)*20 
     53;   IDL> splot,[0,5],[0,3],/nodata,xstyle=1,ystyle=1 
     54;   IDL> tracegrille, findgen(11)*.1, findgen(11)*.1,color=indgen(12)*20 
     55;   IDL> xin = (findgen(11)*.1)#replicate(1, 11) 
     56;   IDL> yin = replicate(1, 11)#(findgen(11)*.1) 
     57;   IDL> out = square2quadrilateral(2,1,3,0,5,1,2,3, xin, yin) 
     58;   IDL> tracegrille, reform(out[0,*],11,11), reform(out[1,*],11,11),color=indgen(12)*20 
    5959; 
    6060; @history 
Note: See TracChangeset for help on using the changeset viewer.