Changeset 192


Ignore:
Timestamp:
09/22/06 11:37:08 (18 years ago)
Author:
smasson
Message:

several bugfix + new strsed

Location:
trunk/SRC
Files:
1 added
1 deleted
13 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/SRC/Documentation/xmldoc/websaxo.xml

    r188 r192  
    6262<title>What's new</title> 
    6363<itemizedlist> 
    64 <listitem><para>September 2006: One <emphasis role="bold">unique online_help</emphasis> for IDL and SAXO (requires IDL 6.2 and higher).</para></listitem> 
     64<listitem><para>September 2006: One <emphasis role="bold">unique online_help</emphasis> for IDL and SAXO (requires IDL 6.2 or higher).</para></listitem> 
    6565<listitem><para>Summer 2006: <emphasis role="bold">English translation</emphasis> of headers, add <emphasis role="bold">pltv</emphasis> and <emphasis role="bold">documentation of xxx</emphasis>.</para></listitem> 
    6666<listitem>  
    6767<para> 
    68 March 2006-May 2006 : migration for <emphasis role="bold">obsolete</emphasis> CVS repository + Sébastien Masson improvements 
    69 in a beautiful <quote><application>trac</application>+<application>svn</application></quote> project on <systemitem>http:://forge.ipsl.jussieu.fr/saxo/</systemitem>. 
     68March 2006-May 2006 : migration of <emphasis role="bold">obsolete</emphasis> CVS repository + Sébastien Masson improvements in a beautiful <quote><application>trac</application>+<application>svn</application></quote> project.</systemitem>. 
    7069</para> 
    7170</listitem> 
  • trunk/SRC/Grid/computegrid.pro

    r172 r192  
    99; 
    1010; domains sizes: 
    11 ;--------------- 
     11; --------------- 
    1212; jpi, jpj, jpk, jpiglo, jpjglo, jpkglo, jpidta, jpjdta, jpkdta 
    1313; 
    1414; domains positions regarding to the original grid: 
    15 ;-------------------------------------------------- 
     15; -------------------------------------------------- 
    1616; ixminmesh, ixmaxmesh, iyminmesh, iymaxmesh, izminmesh, izmaxmesh 
    1717; ixmindta, ixmaxdta, iymindta, iymaxdta, izmindta, izmaxdta 
     
    154154;       Define common (cm_4mesh) variables ixmaxmesh used to define the localization 
    155155;       of the last point of the grid along the x direction in a zoom of the original grid 
     156;       Note that if XMAXMESH < 0 then ixmaxmesh is defined as ixmaxmesh = jpiglo -1 + xmaxmesh 
    156157; 
    157158; @keyword YMAXMESH {default=jpjglo-1}{type=scalar} 
    158159;       Define common (cm_4mesh) variables iymaxmesh used to define the localization 
    159160;       of the last point of the grid along the y direction in a zoom of the original grid 
     161;       Note that if YMAXMESH < 0 then iymaxmesh is defined as iymaxmesh = jpjglo -1 + ymaxmesh 
    160162; 
    161163; @keyword ZMAXMESH {default=jpkglo-1}{type=scalar} 
    162164;       Define common (cm_4mesh) variables izmaxmesh used to define the localization 
    163165;       of the last point of the grid along the z direction in a zoom of the original grid 
     166;       Note that if ZMAXMESH < 0 then izmaxmesh is defined as izmaxmesh = jpkglo -1 + maxmesh 
    164167; 
    165168; @keyword FBASE2TBASE 
  • trunk/SRC/Grid/romsdepth.pro

    r172 r192  
    3939  type = vargrid 
    4040; 
    41   CASE strupcase(vargrid) OF 
    42     'U':BEGIN 
    43       nx = nxu 
    44       ny = nyu 
    45     END  
    46     'V':BEGIN 
    47       nx = nxv 
    48       ny = nyv 
    49     END 
    50     'F':BEGIN 
    51       nx = nxf 
    52       ny = nyf 
    53     END 
    54     ELSE:BEGIN 
    55       nx = nxt 
    56       ny = nyt 
    57     END 
    58   ENDCASE 
     41  grille, -1, -1, -1, -1, nx, ny, nz, firstx, firsty, firstz, lastx, lasty, lastz 
     42  hroms = hroms[firstx:lastx, firsty:lasty] 
    5943  nt = n_elements(zeta)/nx/ny  
    6044; 
  • trunk/SRC/Obsolete/strrepl.pro

    r191 r192  
    44; @file_comments  
    55; replace one (or more) character(s)/string(s) in a string 
     6; --- OBSOLETE --- you should better use strsed.pro 
    67; 
    78; @categories 
     
    1011; @param STR {in}{required} 
    1112; the string to be changed 
     13; 
     14; @param ARG2 {in}{required} 
     15; position of the character(s) to be replaced or a string to be changed in STR. 
    1216; 
    1317; @param RCHAR {in}{required} 
     
    6367 
    6468 
    65 function strrepl,str,agument1,rchar 
     69function strrepl,str,arg2,rchar 
    6670; 
    67   compile_opt idl2, strictarrsubs 
     71  compile_opt idl2, strictarrsubs, obsolete 
    6872; 
    6973    
     
    7377   BStr = byte(str) 
    7478   new = byte(rchar) 
    75    if size(agument1, /type) EQ 7 then begin 
    76       old = byte(agument1) 
    77       index = strpos(str, agument1) 
     79   if size(arg2, /type) EQ 7 then begin 
     80      old = byte(arg2) 
     81      index = strpos(str, arg2) 
    7882      pos = index 
    79       while strpos(str, agument1, pos+1) NE -1 do BEGIN 
    80          pos = strpos(str, agument1, pos+1) 
     83      while strpos(str, arg2, pos+1) NE -1 do BEGIN 
     84         pos = strpos(str, arg2, pos+1) 
    8185         index = [index, pos] 
    8286      ENDWHILE 
     
    8488      if (index[0] lt 0 OR index[0] ge n_elements(BStr)) THEN return,Str 
    8589   ENDIF ELSE BEGIN 
    86       index = agument1 
     90      index = arg2 
    8791      if (index[0] lt 0 OR index[0] ge n_elements(BStr)) then return,Str 
    8892      old = BStr[index[0]] 
  • trunk/SRC/ToBeReviewed/INIT/initncdf.pro

    r172 r192  
    125125  xvarid = (where(namevar EQ xaxisname OR namevar EQ 'longitude' $ 
    126126                  OR namevar EQ 'nav_lon' OR namevar EQ 'lon' $ 
    127                   OR namevar EQ 'lon_rho' OR namevar EQ 'NbLongitudes'))[0] 
    128   romsgrid = strmid(namevar[xvarid], 0, 4) EQ 'lon_' 
     127                  OR namevar EQ 'lon_rho' OR namevar EQ 'nblongitudes'))[0] 
    129128  if xvarid EQ -1 then begin 
    130129    print, 'the xaxis was not found, check the use of XAXISNAME keyword' 
    131130    stop 
    132131  endif 
     132  romsgrid = strmid(namevar[xvarid], 0, 4) EQ 'lon_' 
    133133; get the size of xaxis 
    134134  xinq = ncdf_varinq(cdfid, xvarid) 
     
    149149  yvarid = (where(namevar EQ yaxisname OR namevar EQ 'latitude' $ 
    150150                  OR namevar EQ 'nav_lat' OR namevar EQ 'lat' $ 
    151                   OR namevar EQ 'lat_rho' OR namevar EQ 'NbLatitudes'))[0] 
     151                  OR namevar EQ 'lat_rho' OR namevar EQ 'nblatitudes'))[0] 
    152152  yvarid = yvarid[0] 
    153153  if yvarid EQ -1 then begin 
  • trunk/SRC/ToBeReviewed/LECTURE/read_ncdf.pro

    r181 r192  
    6767; (the first 1D array with unlimited dimension) is not the good one. 
    6868; 
    69 ; @keyword HFILENAME {default=FILENAME}{type=string} 
    70 ; For ROMS outputs. The filename of the file where h vriable should be read 
    71 ; 
    7269; @keyword ZETAFILENAME {default=FILENAME}{type=string} 
    7370; For ROMS outputs. The filename of the file where zeta vriable should be read 
     
    103100                    , TOUT = tout, NOSTRUCT = nostruct, CONT_NOFILL = CONT_NOFILL, INIT = init $ 
    104101                    , GRID = grid, FBASE2TBASE = fbase2tbase, CALLITSELF = callitself $ 
    105                     , HFILENAME = hfilename, ZETAFILENAME = zetafilename, ZETAZERO = zetazero $ 
     102                    , ZETAFILENAME = zetafilename, ZETAZERO = zetazero $ 
    106103                    , _EXTRA = ex 
    107104;--------------------------------------------------------- 
     
    567564      ENDFOR 
    568565      CASE 1 OF 
    569         keyword_set(hfilename):  $ 
    570            hroms = read_ncdf('h', 0, 0, FILENAME = hfilename $ 
    571                              , /TIMESTEP, /NOSTRUCT, CONT_NOFILL = CONT_NOFILL $ 
    572                              , GRID = vargrid, /CALLITSELF, _EXTRA = ex) 
    573         (where(allvarnames EQ 'h'))[0] NE -1: $ 
    574            hroms = read_ncdf('h', 0, 0, FILENAME = filename $ 
    575                              , /TIMESTEP, /NOSTRUCT, CONT_NOFILL = CONT_NOFILL $ 
    576                              , GRID = vargrid, /CALLITSELF, _EXTRA = ex) 
    577         ELSE:return, report('The variable h was not found in the file, please use the keyword HFILENAME to specify the name of a file containing h') 
    578       ENDCASE 
    579       CASE 1 OF 
    580566        keyword_set(zetazero):zeta = fltarr(nx, ny, jpt) 
    581567        keyword_set(zetafilename):  $ 
     
    589575        ELSE:return, report('The variable zeta was not found in the file, please use the keyword ZETAFILENAME to specify the name of a file containing zeta or use  keyword ZETAZERO to define zeta to 0.') 
    590576      ENDCASE 
    591       romszinfos = {h:temporary(hroms), zeta:temporary(zeta), theta_s:theta_s, theta_b:theta_b, hc:hc} 
     577      romszinfos = {h:romszinfos.h, zeta:temporary(zeta), theta_s:theta_s, theta_b:theta_b, hc:hc} 
    592578    ENDIF ELSE romszinfos = {h:-1, zeta:-1, theta_s:-1, theta_b:-1, hc:-1} 
    593579  ENDIF 
  • trunk/SRC/ToBeReviewed/LECTURE/read_ncdf_varget.pro

    r142 r192  
    7575;,,,,,,,,,,,,,,,,,,,,,,,, 
    7676            ncdf_varget,cdfid,name,res,offset=[firstx+ixmin,firsty+iymin] $ 
    77              ,count=[nx,ny], _extra = ex 
     77             ,count=[nx,ny] 
    7878         END 
    7979;,,,,,,,,,,,,,,,,,,,,,,,, 
     
    8383            ncdf_varget,cdfid,name,res,offset=[firstx*key_stride[0]+ixmin $ 
    8484                                               ,firsty*key_stride[1]+iymin] $ 
    85              ,count=[nx,ny], stride = key_stride[0:1], _extra = ex 
     85             ,count=[nx,ny], stride = key_stride[0:1] 
    8686         END 
    8787;,,,,,,,,,,,,,,,,,,,,,,,, 
     
    9494                  ncdf_varget,cdfid,name,res,offset=[ixmin-key+firstx $ 
    9595                                                     ,firsty+iymin] $ 
    96                    ,count=[nx,ny], _extra = ex 
     96                   ,count=[nx,ny] 
    9797               END 
    9898; ......... part, we can directly extract the array in one piece 
     
    100100                  ncdf_varget,cdfid,name,res,offset=[jpi-key+ixmin+firstx $ 
    101101                                                     ,firsty+iymin] $ 
    102                    ,count=[nx,ny], _extra = ex 
     102                   ,count=[nx,ny] 
    103103               END 
    104104               ELSE:BEGIN  ; we have to extract the array in 2 pieces...   
     
    106106                  ncdf_varget,cdfid,name,tab1,offset=[jpi-key+ixmin+firstx $ 
    107107                                                      ,firsty+iymin] $ 
    108                    ,count=[key-1-firstx+1,ny], _extra = ex 
     108                   ,count=[key-1-firstx+1,ny] 
    109109; --------- part, second part... 
    110110                  ncdf_varget,cdfid,name,tab2,offset=[ixmin,firsty+iymin] $ 
    111                    ,count=[lastx-key+1,ny], _extra = ex 
     111                   ,count=[lastx-key+1,ny] 
    112112                  res = [temporary(tab1), temporary(tab2)] 
    113113               END 
     
    125125                                                     +(firstx-((key-1)/key_stride[0]+1))*key_stride[0] $ 
    126126                                                     ,firsty*key_stride[1]+iymin] $ 
    127                    ,count=[nx,ny], stride = key_stride[0:1], _extra = ex 
     127                   ,count=[nx,ny], stride = key_stride[0:1] 
    128128                END 
    129129; ......... part, we can directly extract the array in one piece 
     
    131131                  ncdf_varget,cdfid,name,res,offset=[jpitotal-key+ixmin+firstx*key_stride[0] $ 
    132132                                                     ,firsty*key_stride[1]+iymin] $ 
    133                    ,count=[nx,ny], stride = key_stride[0:1], _extra = ex 
     133                   ,count=[nx,ny], stride = key_stride[0:1] 
    134134               END 
    135135               ELSE:BEGIN ; we have to extract the array in 2 pieces... 
     
    138138                                                      ,firsty*key_stride[1]+iymin] $ 
    139139                   ,count=[(key-firstx*key_stride[0]-1)/key_stride[0]+1,ny] $ 
    140                     , stride = key_stride[0:1], _extra = ex 
     140                    , stride = key_stride[0:1] 
    141141; --------- part, second part... 
    142142                  ncdf_varget,cdfid,name,tab2,offset=[ixmin $ 
     
    144144                                                      , firsty*key_stride[1]+iymin] $ 
    145145                   ,count=[nx-(key-firstx*key_stride[0]-1)/key_stride[0]-1,ny] $ 
    146                     , stride = key_stride[0:1], _extra = ex 
     146                    , stride = key_stride[0:1] 
    147147; in one unique array... 
    148148                  res = [temporary(tab1), temporary(tab2)] 
     
    163163;,,,,,,,,,,,,,,,,,,,,,,,, 
    164164            ncdf_varget,cdfid,name,res,offset=[firstx+ixmin,firsty+iymin,firstz+izmin] $ 
    165              ,count=[nx,ny,nz], _extra = ex 
     165             ,count=[nx,ny,nz] 
    166166         END 
    167167;,,,,,,,,,,,,,,,,,,,,,,,, 
     
    172172                                               ,firsty*key_stride[1]+iymin $ 
    173173                                               ,firstz*key_stride[2]+izmin] $ 
    174              ,count=[nx,ny,nz], stride = key_stride, _extra = ex 
     174             ,count=[nx,ny,nz], stride = key_stride 
    175175         END 
    176176;,,,,,,,,,,,,,,,,,,,,,,,, 
     
    183183                                                     ,firsty+iymin $ 
    184184                                                     ,firstz+izmin] $ 
    185                    ,count=[nx,ny,nz], _extra = ex 
     185                   ,count=[nx,ny,nz] 
    186186               END 
    187187               lastx LE key-1:BEGIN ; on peut tout couper d''un coup 
     
    189189                                                     ,firsty+iymin $ 
    190190                                                     ,firstz+izmin] $ 
    191                    ,count=[nx,ny,nz], _extra = ex 
     191                   ,count=[nx,ny,nz] 
    192192               END 
    193193               ELSE:BEGIN       ; Le tableau est separe en 2 morceaux... 
     
    195195                                                      ,firsty+iymin $ 
    196196                                                      ,firstz+izmin] $ 
    197                    ,count=[key-1-firstx+1,ny,nz], _extra = ex 
     197                   ,count=[key-1-firstx+1,ny,nz] 
    198198                  ncdf_varget,cdfid,name,tab2,offset=[ixmin $ 
    199199                                                      ,firsty+iymin $ 
    200200                                                      ,firstz+izmin] $ 
    201                    ,count=[lastx-key+1,ny,nz], _extra = ex 
     201                   ,count=[lastx-key+1,ny,nz] 
    202202                  res = [temporary(tab1), temporary(tab2)] 
    203203               END 
     
    215215                                                     ,firsty*key_stride[1]+iymin $ 
    216216                                                     ,firstz*key_stride[2]+izmin] $ 
    217                    ,count=[nx,ny,nz], stride = key_stride, _extra = ex 
     217                   ,count=[nx,ny,nz], stride = key_stride 
    218218               END 
    219219               lastx*key_stride[0] LE key-1:BEGIN ; on peut tout couper d''un coup 
     
    221221                                                     ,firsty*key_stride[1]+iymin $ 
    222222                                                     ,firstz*key_stride[2]+izmin] $ 
    223                    ,count=[nx,ny,nz], stride = key_stride, _extra = ex 
     223                   ,count=[nx,ny,nz], stride = key_stride 
    224224               END 
    225225               ELSE:BEGIN       ; le tableau est separe en 2 morceaux... 
     
    228228                                                      ,firstz*key_stride[2]+izmin] $ 
    229229                   ,count=[(key-firstx*key_stride[0]-1)/key_stride[0]+1,ny,nz] $ 
    230                     , stride = key_stride, _extra = ex 
     230                    , stride = key_stride 
    231231; 2eme bout... 
    232232                  ncdf_varget,cdfid,name,tab2,offset=[ixmin $ 
     
    235235                                                      ,firstz*key_stride[2]+izmin] $ 
    236236                   ,count=[nx-(key-firstx*key_stride[0]-1)/key_stride[0]-1,ny,nz] $ 
    237                     , stride = key_stride, _extra = ex 
     237                    , stride = key_stride 
    238238; on recolle le tout 
    239239                  res = [temporary(tab1), temporary(tab2)] 
     
    256256                                               ,firsty+iymin $ 
    257257                                               ,firsttps] $ 
    258              ,count=[nx,ny,jpt], _extra = ex 
     258             ,count=[nx,ny,jpt] 
    259259         END 
    260260;,,,,,,,,,,,,,,,,,,,,,,,, 
     
    265265                                               ,firsty*key_stride[1]+iymin $ 
    266266                                               ,firsttps] $ 
    267              ,count=[nx,ny,jpt], stride = [key_stride[0:1], 1], _extra = ex 
     267             ,count=[nx,ny,jpt], stride = [key_stride[0:1], 1] 
    268268         END 
    269269;,,,,,,,,,,,,,,,,,,,,,,,, 
     
    277277                                                     ,firsty+iymin $ 
    278278                                                     ,firsttps] $ 
    279                    ,count=[nx,ny,jpt], _extra = ex 
     279                   ,count=[nx,ny,jpt] 
    280280               END 
    281281; ......... part, we can directly extract the array in one piece 
     
    284284                                                     ,firsty+iymin $ 
    285285                                                     ,firsttps] $ 
    286                    ,count=[nx,ny,jpt], _extra = ex 
     286                   ,count=[nx,ny,jpt] 
    287287               END 
    288288               ELSE:BEGIN       ; Le tableau est separe en 2 morceaux... 
     
    291291                                                      ,firsty+iymin $ 
    292292                                                      ,firsttps] $ 
    293                    ,count=[key-1-firstx+1,ny,jpt], _extra = ex 
     293                   ,count=[key-1-firstx+1,ny,jpt] 
    294294; --------- part, second part... 
    295295                  ncdf_varget,cdfid,name,tab2,offset=[ixmin $ 
    296296                                                      ,firsty+iymin $ 
    297297                                                      ,firsttps] $ 
    298                    ,count=[lastx-key+1,ny,jpt], _extra = ex 
     298                   ,count=[lastx-key+1,ny,jpt] 
    299299                  res = [temporary(tab1), temporary(tab2)] 
    300300               END 
     
    313313                                                     ,firsty*key_stride[1]+iymin $ 
    314314                                                     ,firsttps] $ 
    315                    ,count=[nx,ny,jpt], stride = [key_stride[0:1], 1], _extra = ex 
     315                   ,count=[nx,ny,jpt], stride = [key_stride[0:1], 1] 
    316316               END 
    317317; ......... part, we can directly extract the array in one piece 
     
    320320                                                     ,firsty*key_stride[1]+iymin $ 
    321321                                                     ,firsttps] $ 
    322                    ,count=[nx,ny,jpt], stride = [key_stride[0:1], 1], _extra = ex 
     322                   ,count=[nx,ny,jpt], stride = [key_stride[0:1], 1] 
    323323               END 
    324324               ELSE:BEGIN       
     
    328328                                                      ,firsttps] $ 
    329329                   ,count=[(key-firstx*key_stride[0]-1)/key_stride[0]+1,ny,jpt] $ 
    330                     , stride = [key_stride[0:1], 1], _extra = ex 
     330                    , stride = [key_stride[0:1], 1] 
    331331; --------- part, second part... 
    332332                  ncdf_varget,cdfid,name,tab2,offset=[ixmin $ 
     
    335335                                                      ,firsttps] $ 
    336336                   ,count=[nx-(key-firstx*key_stride[0]-1)/key_stride[0]-1,ny,jpt] $ 
    337                     , stride = [key_stride[0:1], 1], _extra = ex 
     337                    , stride = [key_stride[0:1], 1] 
    338338; on recolle le tout 
    339339                  res = [temporary(tab1), temporary(tab2)] 
     
    357357                                                      ,firstz+izmin $ 
    358358                                               ,firsttps] $ 
    359              ,count=[nx,ny,nz,jpt], _extra = ex 
     359             ,count=[nx,ny,nz,jpt] 
    360360         END 
    361361;,,,,,,,,,,,,,,,,,,,,,,,, 
     
    367367                                               ,firstz*key_stride[2]+izmin $ 
    368368                                               ,firsttps] $ 
    369              ,count=[nx,ny,nz,jpt], stride = [key_stride, 1], _extra = ex 
     369             ,count=[nx,ny,nz,jpt], stride = [key_stride, 1] 
    370370         END 
    371371;,,,,,,,,,,,,,,,,,,,,,,,, 
     
    379379                                                     ,firstz+izmin $ 
    380380                                                     ,firsttps] $ 
    381                    ,count=[nx,ny,nz,jpt], _extra = ex 
     381                   ,count=[nx,ny,nz,jpt] 
    382382               END 
    383383               lastx LE key-1:BEGIN ; on peut tout couper d''un coup 
     
    386386                                                     ,firstz+izmin $ 
    387387                                                     ,firsttps] $ 
    388                    ,count=[nx,ny,nz,jpt], _extra = ex 
     388                   ,count=[nx,ny,nz,jpt] 
    389389               END 
    390390               ELSE:BEGIN       ; Le tableau est separe en 2 morceaux... 
     
    393393                                                      ,firstz+izmin $ 
    394394                                                      ,firsttps] $ 
    395                    ,count=[key-1-firstx+1,ny,nz,jpt], _extra = ex 
     395                   ,count=[key-1-firstx+1,ny,nz,jpt] 
    396396                  ncdf_varget,cdfid,name,tab2,offset=[ixmin $ 
    397397                                                      ,firsty+iymin $ 
    398398                                                      ,firstz+izmin $ 
    399399                                                      ,firsttps] $ 
    400                    ,count=[lastx-key+1,ny,nz,jpt], _extra = ex 
     400                   ,count=[lastx-key+1,ny,nz,jpt] 
    401401                  res = [temporary(tab1), temporary(tab2)] 
    402402               END 
     
    415415                                                     ,firstz*key_stride[2]+izmin $ 
    416416                                                     ,firsttps] $ 
    417                    ,count=[nx,ny,nz,jpt], stride = [key_stride, 1], _extra = ex 
     417                   ,count=[nx,ny,nz,jpt], stride = [key_stride, 1] 
    418418               END 
    419419               lastx*key_stride[0] LE key-1:BEGIN ; on peut tout coupe d''un coup 
     
    422422                                                     ,firstz*key_stride[2]+izmin $ 
    423423                                                     ,firsttps] $ 
    424                    ,count=[nx,ny,nz,jpt], stride = [key_stride, 1], _extra = ex 
     424                   ,count=[nx,ny,nz,jpt], stride = [key_stride, 1] 
    425425               END 
    426426               ELSE:BEGIN       ; le tableau est separe en 2 morceaux... 
     
    430430                                                      ,firsttps] $ 
    431431                   ,count=[(key-firstx*key_stride[0]-1)/key_stride[0]+1,ny,nz,jpt] $ 
    432                    , stride = [key_stride, 1], _extra = ex 
     432                   , stride = [key_stride, 1] 
    433433; 2eme bout... 
    434434                  ncdf_varget,cdfid,name,tab2,offset=[ixmin $ 
     
    438438                                                      , firsttps] $ 
    439439                   ,count=[nx-(key-firstx*key_stride[0]-1)/key_stride[0]-1,ny,nz,jpt] $ 
    440                    , stride = [key_stride, 1], _extra = ex 
     440                   , stride = [key_stride, 1] 
    441441; on recolle le tout 
    442442                  res = [temporary(tab1), temporary(tab2)] 
  • trunk/SRC/ToBeReviewed/PLOTS/DESSINE/pltt.pro

    r172 r192  
    464464      z2d = remplit(z2d,nite=2+keyword_set(nan), mask = mask, /basique, _extra=ex) 
    465465      if NOT keyword_set(strictfill) then z2d = min > z2d <  max 
     466      usetri = 0 ; default definition 
    466467      if keyword_set(nan) then BEGIN 
    467468        triangulation = triangule(mask, /basic, coinmonte = coinmontemask $ 
     
    469470        usetri = 1 
    470471      ENDIF ELSE triangulation = -1  
    471        
    472472      IF size(gdep, /n_dimensions) EQ 2 THEN BEGIN 
    473473        usetri = 2 
  • trunk/SRC/ToBeReviewed/STRING/getfile.pro

    r163 r192  
    8181          endif 
    8282        ENDIF ELSE file = filein 
    83         if !version.os_family EQ 'unix' then begin 
    84           spawn, 'cat '+file,  res 
    85           if res[0] NE '' then return, res ELSE return, '' 
    86         endif 
    8783         
    8884        if (!version.release+0. ge 5.5) then begin 
  • trunk/SRC/ToBeReviewed/TRIANGULATION/ciseauxtri.pro

    r163 r192  
    1616; 
    1717; @param GPHI  
    18 ; 
    19 ; @keyword ALL 
    2018;  
    2119; @keyword _EXTRA 
     
    3634;------------------------------------------------------------ 
    3735;------------------------------------------------------------ 
    38 FUNCTION ciseauxtri, triang, glam, gphi, ALL = all, _EXTRA = ex 
     36FUNCTION ciseauxtri, triang, glam, gphi, _EXTRA = ex 
    3937;--------------------------------------------------------- 
    4038; 
     
    115113   endif 
    116114; 
    117 ; We delete all triangle which are out of the valid frame when  on supprime les triangles qui sont un peu trop hors du cadre 
    118 ; valable qd ALL is activated 
     115; We delete all triangle which are out of the valid frame 
    119116; 
    120117    if keyword_set(key_irregular) then begin 
  • trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/cutcmd.pro

    r150 r192  
    8888    stop 
    8989  ENDIF 
    90   other = cutted[1-start:*:2] 
     90  IF n_elements(cutted) EQ 1 THEN other = '' ELSE other = cutted[1-start:*:2] 
    9191; make sure that we have a prefix for each nameexp 
    9292  IF start EQ 0 THEN other = ['', other] 
  • trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/loadgrid.pro

    r181 r192  
    7272  IF strmid(listing, 0, 1) NE '@' THEN listing = listing + ', strcalling = ''' + meshfilein + ''', _extra = ex' 
    7373 
    74 print, listing 
    75  
    76  
    7774  createpro, listing, filename = myuniquetmpdir +'for_createpro.pro', _extra = ex 
    7875 
  • trunk/SRC/ToBeReviewed/WIDGET/xxx.pro

    r186 r192  
    356356; computation done on the files... 
    357357  if keyword_set(uvalue) then txtvalue = (extractatt(uvalue, 'txtcmd'))[numdessinin] $ 
    358   ELSE txtvalue = varexp 
     358  ELSE txtvalue = '"' + varexp + '"' 
    359359  dummyid = widget_text(base, value = txtvalue, uvalue = {name:'txtcmd'}, uname = 'txtcmd' $ 
    360360                        , /editable, yoffset = yoff, xsize = 54, /frame) 
  • trunk/SRC/Utilities/mergeonline_help.pro

    r177 r192  
    2323  compile_opt idl2, strictarrsubs 
    2424; 
    25 ; Are we using a "Unix" machine? 
    26   IF !d.name NE 'X' THEN return 
    2725; is the IDL version at least 6.2 ? 
    28   IF float(strmid(!version.release, 0, 3)) LT 6.2 THEN return 
     26  IF float(strmid(!version.release, 0, 3)) LT 6.2 THEN BEGIN 
     27    print, 'Warning: You need at least IDL 6.2 to use SAXO/IDL merged online help' 
     28    return 
     29  ENDIF 
     30;--------------------------------------------------------------- 
     31; check directories  
     32;--------------------------------------------------------------- 
    2933; get the environment variable $HOME 
    3034  home = getenv('HOME') 
     
    3438  home = (file_search(home, /test_directory, /test_write, /mark_directory))[0] 
    3539  IF home EQ '' THEN return 
     40 
     41; is !dir + '/help/online_help a directory ? 
     42  homeidl = !dir + '/help/online_help' 
     43  homeidl = (file_search(homeidl, /test_directory, /mark_directory))[0] 
     44  IF homeidl EQ '' THEN return 
     45 
    3646; is $HOME/.assistant a directory ? if not, create it 
    3747  homeassist = home + '.assistant' 
     
    4050  homeassist = (file_search(homeassist, /test_directory, /test_write, /mark_directory))[0] 
    4151  IF homeassist EQ '' THEN return 
    42 ; is "$HOME/.assistant/src a directory ? if not, create it? 
     52; is $HOME/.assistant/src a directory ? if not, create it? 
    4353  homesrc = homeassist + 'src' 
    4454  IF file_test(homesrc, /directory) EQ 0 THEN file_mkdir, homesrc 
     
    4656  homesrc = (file_search(homesrc, /test_directory, /test_write, /mark_directory))[0] 
    4757  IF homesrc EQ '' THEN return 
     58 
     59  homesaxo = file_dirname(find('buildinit.pro'), /mark_directory) + 'Documentation/idldoc_assistant_output/' 
     60  IF file_test(homesaxo + 'idldoc-lib.adp') EQ 0 THEN BEGIN 
     61    print, 'Error when looking for the file '+ homesaxo + 'idldoc-lib.adp...' 
     62    return 
     63  ENDIF 
     64;--------------------------------------------------------------- 
     65; check existance and version of the file that need to be created 
     66;--------------------------------------------------------------- 
     67 
    4868; do idl.adp and home.html already exists? 
    4969  IF file_test(homesrc + 'home.html') AND file_test(homesrc + 'idl.adp') $ 
    50     AND file_test(homesrc + 'aboutsaxo.txt') THEN BEGIN  
    51     !help_path = homesrc 
    52     return 
     70     AND file_test(homesrc + 'aboutsaxo.txt') THEN BEGIN 
     71; is the revision version of homesrc+'idl.adp' the same of homesaxo + 'idldoc-lib.adp' ? 
     72; is $Id found in homesrc+'idl.adp' 
     73    idladp = getfile(homesrc+'idl.adp') 
     74    line = strmatch(idladp, '*$Id*') 
     75    line = (where(line EQ 1))[0] 
     76    IF line NE -1 THEN BEGIN 
     77      new = idladp[line] 
     78; is $Id  found in homesaxo + 'idldoc-lib.adp' 
     79      saxoadp = getfile(homesaxo + 'idldoc-lib.adp') 
     80      line = strmatch(saxoadp, '*$Id*') 
     81      line = (where(line EQ 1))[0] 
     82      IF line NE -1 THEN BEGIN 
     83        old = saxoadp[line] 
     84; are the 2 revision tags the same?? 
     85        IF array_equal(old, new) THEN BEGIN 
     86          !help_path = homesrc 
     87          print, 'Use SAXO/IDL merged online help...' 
     88          return 
     89        ENDIF 
     90      ENDIF 
     91    ENDIF 
    5392  ENDIF 
    54 ; create idl.adp and home.html 
    55   homeidladp = !dir + '/help/online_help' 
    56   IF file_test(homeidladp + '/idl.adp') EQ 0 THEN BEGIN 
    57     print, 'Error when looking for the file '+homeidladp + '/idl.adp ...' 
    58     print, 'Check the value or your environment variable $IDL_DIR that defines !dir' 
    59     return 
    60   ENDIF 
    61   homesaxoadp = file_dirname(find('buildinit.pro'), /mark_directory) + 'Documentation/idldoc_assistant_output' 
    62  
    63   spawn, homesaxoadp + '/../xmldoc/mergeonline_help.sh' $ 
    64          + ' ' + homeidladp $ 
    65          + ' ' + homesaxoadp $ 
    66          + ' ' + homesrc $ 
    67          + ' ' + !version.release $ 
    68          , /sh, exit_status = err 
     93;--------------------------------------------------------------- 
     94; build homesrc + 'idl.adp' 
     95;--------------------------------------------------------------- 
     96; --- modify the original idl.adp --- 
     97  idladp = getfile(homeidl+'idl.adp') 
     98; extract part from </profile> to </assistantconfig> 
     99  line1 = strmatch(idladp, '*</profile>*') 
     100  line1 = (where(line1 EQ 1))[0] 
     101  line2 = strmatch(idladp, '*</assistantconfig>*') 
     102  line2 = (where(line2 EQ 1))[0] - 1L 
     103  idladp = idladp[line1:line2] 
     104; put the complete path of the references 
     105  idladp = strsed(idladp, 'ref=\"', 'ref="'+homeidl) 
     106; --- modify the original idldoc-lib.adp --- 
     107  saxoadp = getfile(homesaxo + 'idldoc-lib.adp') 
     108; extract part from </profile> 
     109  line1 = strmatch(saxoadp, '*</profile>*') 
     110  line1 = (where(line1 EQ 1))[0] + 1 
     111  saxoadp = saxoadp[line1:*] 
     112; put the complete path of the references 
     113  saxoadp = strsed(saxoadp, 'ref=\"', 'ref="'+homesaxo) 
     114; --- merge idl.adp and idldoc-lib.adp, add an header and write it in a new file --- 
     115  header = ['<!DOCTYPE DCF>' $ 
     116            , '<assistantconfig version="3.3.0">' $ 
     117            , '   <profile>' $ 
     118            , '      <property name="name">SAXO - IDL ' + !version.release + ' Help</property>' $ 
     119            , '      <property name="title">SAXO - IDL ' + !version.release + ' Help</property>' $ 
     120            , '      <property name="startpage">' + homesrc + 'home.html</property>' $ 
     121            , '      <property name="aboutmenutext">About SAXO</property>' $ 
     122            , '      <property name="abouturl">' + homesrc + 'aboutsaxo.txt</property>' $ 
     123            , '      <property name="assistantdocs">' + homeidl + '</property>'] 
     124  newadp = [temporary(header), temporary(idladp), temporary(saxoadp)] 
    69125; 
    70   IF err EQ 0 THEN !help_path = homesrc 
     126  putfile, homesrc + 'idl.adp', temporary(newadp) 
     127;--------------------------------------------------------------- 
     128; build homesrc + 'home.html' 
     129;--------------------------------------------------------------- 
     130  homehtml = getfile(homeidl+'home.html') 
     131; put the complete path of the references 
     132  homehtml = strsed(homehtml, 'ref=\"', 'ref="'+homeidl) 
     133; find the first line containing '</h3>' 
     134  line = strmatch(homehtml, '*</h3>*') 
     135  line = (where(line EQ 1))[0] 
     136; insert one line after this line 
     137  homehtml = [homehtml[0:line] $ 
     138              , '<a name="SAXOdir"> </a><p class="pIndentedRelative"><img src="images/blueball_idl.gif" id="blueballSAXOdir" border="0" hspace="0" vspace="0"/> &#160;&#160;<a href="' + homesaxo + 'home.html">SAXO Directory</a></p>' $ 
     139              , homehtml[line+1:*]] 
     140; find the last line containing '</h3>' 
     141  line = strmatch(homehtml, '*</h3>*') 
     142  line = (where(line EQ 1, cnt))[cnt-1] 
     143; insert one line after this line 
     144  homehtml = [homehtml[0:line] $ 
     145              , '<a name="SAXOweb"> </a><p class="pIndentedRelative"><img src="images/blueball_idl.gif" id="blueballSAXOweb" border="0" hspace="0" vspace="0"/> &#160;&#160;<a href="http://forge.ipsl.jussieu.fr/saxo">SAXO Home Page</a> </p>' $ 
     146              , homehtml[line+1:*]] 
     147 
     148; put the complete path of the images 
     149  homehtml = strsed(homehtml, 'src=\"', 'src="'+homeidl) 
     150; except for SAXOIDL_OnlineHelp_title.png 
     151  homehtml = strsed(homehtml, 'src=\".*IDL_OnlineHelp_Title\.gif\"', 'src="' + homesaxo + '../xmldoc/images/SAXOIDL_OnlineHelp_title.png"') 
     152; 
     153  putfile, homesrc + 'home.html', temporary(homehtml) 
     154;--------------------------------------------------------------- 
     155; build homesrc + 'aboutsaxo.txt' 
     156;--------------------------------------------------------------- 
     157  about = getfile(homesaxo + '../../overview') 
     158; remove the lines containing @ 
     159  lines = strmatch(about, '@*') 
     160  about = about[where(lines EQ 0)] 
     161; add some informattions: 
     162  about = [about, '', 'More informations on', 'http://forge.ipsl.jussieu.fr/saxo', ''] 
     163;  
     164  putfile, homesrc + 'aboutsaxo.txt', temporary(about) 
     165;--------------------------------------------------------------- 
     166  print, 'Merge of SAXO and IDL online help done...' 
     167  !help_path = homesrc 
    71168; 
    72169  RETURN 
Note: See TracChangeset for help on using the changeset viewer.