Changeset 226 for trunk


Ignore:
Timestamp:
03/16/07 10:22:26 (17 years ago)
Author:
pinsard
Message:

corrections of some misspellings in some *.pro

Location:
trunk/SRC
Files:
85 edited

Legend:

Unmodified
Added
Removed
  • trunk/SRC/Calendar/julday.pro

    r205 r226  
    44; Calculate the Julian Day Number for a given month, day, and year. 
    55; This is the inverse of the library function CALDAT. 
    6 ; 3 calendars are available according to the value of key_caltype  
     6; 3 calendars are available according to the value of key_caltype 
    77; (variable of the common file cm_4cal): 'greg', '360d', 'noleap' 
    88; 
    99; @categories Calendar 
    1010; 
    11 ; @param MONTH {in}{required}  
    12 ; Number of the desired month (1 = January, ..., 12 = December).  
     11; @param MONTH {in}{required} 
     12; Number of the desired month (1 = January, ..., 12 = December). 
    1313; Can be scalar or array 
    1414; 
    15 ; @param DAY {in}{required}  
     15; @param DAY {in}{required} 
    1616; Number of day of the month.Can be scalar or array 
    1717; 
    18 ; @param YEARin {in}{required}   
     18; @param YEARin {in}{required} 
    1919; Number of the desired year.Year parameters must be valid 
    2020; values from the civil calendar.  Years B.C.E. are represented 
     
    2222; as positive integers. In particular, note that there is no 
    2323; year 0 in the civil calendar.  1 B.C.E. (-1) is followed by 
    24 ; 1 C.E. (1).  
    25 ; Change: However for climatological year, we do accept the year  
     24; 1 C.E. (1). 
     25; Change: However for climatological year, we do accept the year 
    2626; O but we change it for year 654321L (the same trick is done in 
    2727; caldat so caldat, julday(1,1,0) gives you back Jan 1st of year 0) 
    2828; Can be scalar or array 
    2929; 
    30 ; @param HOUR {in}{optional}{default=12}  
     30; @param HOUR {in}{optional}{default=12} 
    3131; Number of the hour of the day. Can be scalar or array 
    3232; 
     
    3737; Number of the second of the minute. Can be scalar or array 
    3838; 
    39 ; @restrictions  
     39; @restrictions 
    4040; The Result will have the same dimensions as the smallest array, or 
    4141; will be a scalar if all arguments are scalars. 
    42 ;  
    43 ; @keyword NDAYSPM {default=30}  
     42; 
     43; @keyword NDAYSPM {default=30} 
    4444; To use a calendar with fixed number of days per months. 
    4545; see also the use of key_caltype (variable of the common file cm_4cal) 
    4646; 
    47 ; @returns  
     47; @returns 
    4848; the Julian Day Number (which begins at noon) of the specified calendar date. 
    49 ; If Hour, Minute, and Second are not specified, then the result will be a  
    50 ; long integer, otherwise the result is a double precision floating point  
     49; If Hour, Minute, and Second are not specified, then the result will be a 
     50; long integer, otherwise the result is a double precision floating point 
    5151; number. 
    5252; 
    5353; @uses cm_4cal 
    5454; 
    55 ; @restrictions  
     55; @restrictions 
    5656; Accuracy using IEEE double precision numbers is approximately 
    5757; 1/10000th of a second, with higher accuracy for smaller (earlier) 
    5858; Julian dates. 
    5959; 
    60 ; @history  
     60; @history 
    6161; Translated from "Numerical Recipies in C", by William H. Press, 
    6262; Brian P. Flannery, Saul A. Teukolsky, and William T. Vetterling. 
     
    7575; eg. julday(349,1,1970) 
    7676; 
    77 ; Sebastien Masson, May 2006, add diferent calendat with key_caltype  
     77; Sebastien Masson, May 2006, add different calendat with key_caltype 
    7878; (variable of the common file cm_4cal) 
    7979; 
    80 ; @version $Id$ 
     80; @version 
     81; $Id$ 
    8182;- 
    8283; 
     
    224225      RETURN, jul 
    225226 
    226     END  
     227    END 
    227228    '360d':BEGIN 
    228229; 
     
    240241      IF neg[0] NE -1 THEN L_YEAR[neg] =  L_YEAR[neg]+1 
    241242 
    242       JUL = ((L_YEAR-1)*12 + (L_MONTH-1))* ndayspm + L_DAY  
     243      JUL = ((L_YEAR-1)*12 + (L_MONTH-1))* ndayspm + L_DAY 
    243244      if n_elements(Hour) + n_elements(Minute) + n_elements(Second) eq 0 then $ 
    244245        return, JUL 
     
    246247      if n_elements(Minute) eq 0 then Minute = 0 
    247248      if n_elements(Second) eq 0 then Second = 0 
    248        
     249 
    249250      IF total([hour NE 12, minute NE 0, second NE 0]) EQ 0 THEN return, JUL ELSE $ 
    250251        return, JUL + (Hour / 24.0d0 - 0.5d) + (Minute/1440.0d0) + (Second / 86400.0d0) 
    251252 
    252     END  
     253    END 
    253254    'noleap':BEGIN 
    254255 
     
    279280      if n_elements(Minute) eq 0 then Minute = 0 
    280281      if n_elements(Second) eq 0 then Second = 0 
    281        
     282 
    282283        IF total([hour NE 12, minute NE 0, second NE 0]) EQ 0 THEN return, JUL ELSE $ 
    283284        return, JUL + (Hour / 24.0d0 - 0.5d) + (Minute/1440.0d0) + (Second / 86400.0d0) 
    284285 
    285     END  
     286    END 
    286287    ELSE:return, report('only 3 types of calendar are accepted: greg, 360d and noleap') 
    287288  ENDCASE 
  • trunk/SRC/Colors/newpalette.pro

    r163 r226  
    22;+ 
    33; 
    4 ; @file_comments  
     4; @file_comments 
    55; Allows to save the palette which is on the screen 
    66; in a same type file than the one given by default in IDL 
    77; 'colors1.tbl'. 
    88; 
    9 ; @categories  
     9; @categories 
    1010; Color 
    1111; 
     
    1313; a string containing the name of the new palette we want to write. 
    1414; 
    15 ; @keyword OVER  
     15; @keyword OVER 
    1616; the number of the palette we want to replace 
    1717; 
     
    1919; The file containing the color palettes. It can be in any directory of the !path. 
    2020; 
    21 ; @keyword _EXTRA  
     21; @keyword _EXTRA 
    2222; Used to pass modifyct keywords 
    2323; 
     
    4545; is nametbl belongs to the same effective user ID (UID) as the IDL process? 
    4646    IF !d.name EQ 'X' THEN BEGIN ; works only for unix tye machine 
    47       IF file_test(nametbl, /user) NE 1 THEN BEGIN  
    48         noanswer = report('The file '+nametbl+' is not yours... Do you want to copy '+nameshort+' in your MyIDL diectory: '+homedir+' ?', /default_no, /question) 
    49         IF noanswer THEN return ELSE BEGIN  
     47      IF file_test(nametbl, /user) NE 1 THEN BEGIN 
     48        noanswer = report('The file '+nametbl+' is not yours... Do you want to copy '+nameshort+' in your MyIDL directory: '+homedir+' ?', /default_no, /question) 
     49        IF noanswer THEN return ELSE BEGIN 
    5050          file_copy, nametbl, homedir  ; copy the file 
    5151          nametbl = homedir + nametbl  ; update its name 
     
    5454    ENDIF 
    5555; no file nametbl found 
    56     ENDIF ELSE BEGIN                            
     56    ENDIF ELSE BEGIN 
    5757      nametbl = file_basename(namesave)        ; get back the original nametbl 
    58       noanswer = report('The file '+nametbl+' was not found !path directories... Do you want to create such a file in  your MyIDL diectory: '+homedir+' ?', /default_no, /question) 
     58      noanswer = report('The file '+nametbl+' was not found !path directories... Do you want to create such a file in  your MyIDL directory: '+homedir+' ?', /default_no, /question) 
    5959      if NOT noanswer then return 
    60       nameorg = filepath('colors1.tbl', subdir = ['resource', 'colors'])  
     60      nameorg = filepath('colors1.tbl', subdir = ['resource', 'colors']) 
    6161      file_copy, nameorg, homedir 
    62     ENDELSE  
     62    ENDELSE 
    6363; is nametbl writable? 
    6464    IF file_test(nametbl, /write) NE 1 THEN file_chmod, nametbl, /u_write 
    6565; make sure that we will really use nametbl name even if _EXTRA keyword is used 
    66     if n_elements(ex) NE 0 then $  
     66    if n_elements(ex) NE 0 then $ 
    6767       if (where(tag_names(ex) EQ 'FILE'))[0] NE -1 then ex.FILE = nametbl 
    6868; 
  • trunk/SRC/Computation/curl.pro

    r168 r226  
    99; @categories 
    1010; Calculation 
    11 ;  
     11; 
    1212; @param UU 
    1313; Matrix representing the zonal coordinates (U point) of a field of vectors 
    1414; A 2D (xy), 3D (xyz or yt) or a structure readable by litchamp and containing 
    1515; a 2D (xy), 3D (xyz or yt) array (4d case is not coded yet). 
    16 ; note that the dimension of the arry must suit the domain dimension. 
    17 ; 
    18 ; @param VV  
     16; note that the dimension of the array must suit the domain dimension. 
     17; 
     18; @param VV 
    1919; Matrix representing the meridional coordinates (V point) of a field of vectors 
    2020; A 2D (xy), 3D (xyz or yt) or a structure readable by litchamp and containing 
    2121; a 2D (xy), 3D (xyz or yt) array (4d case is not coded yet). 
    22 ; note that the dimension of the arry must suit the domain dimension. 
     22; note that the dimension of the array must suit the domain dimension. 
    2323; 
    2424; @keyword DIREC {type=scalar string} 
     
    3030; 
    3131; @uses 
    32 ; cm_4cal, cm_4data, cm_4mmesh  
     32; cm_4cal, cm_4data, cm_4mmesh 
    3333; 
    3434; @restrictions 
    3535; 
    36 ; - Works only for Arakawa C-grid.  
     36; - Works only for Arakawa C-grid. 
    3737; - UU must be on U grid, VV must be on V grid 
    3838; - 4d case is not coded yet 
    3939; - the common variable jpt is used to differ xyz (jpt=1) and xyt (jpt\=1) cases. 
    40 ; - U and V arrays are cut in the same geographic domain. Because of the shift between  
    41 ;   T, U, V and F grids, it is possible that these two arrays do not have the same  
    42 ;   size and refer to different indexes. In this case, arrays are re-cut on  
     40; - U and V arrays are cut in the same geographic domain. Because of the shift between 
     41;   T, U, V and F grids, it is possible that these two arrays do not have the same 
     42;   size and refer to different indexes. In this case, arrays are re-cut on 
    4343;   common indexes. To avoid these re-cuts, use the keyword /memeindice in domdef.pro 
    4444; - When computing the divergence, we update, vargrid, varname, varunits and the 
    4545;   grid position parameters (firstxf, lastxf, nxf, firstyf, lastyf, nyf). 
    46 ; - points that cannot be computed (domain bondaries, coastline) are set to NaN 
     46; - points that cannot be computed (domain boundaries, coastline) are set to NaN 
    4747; 
    4848; @examples 
     
    5050; IDL> plt, curl(dist(jpi,jpj), dist(jpi,jpj)) 
    5151; 
    52 ; @history  
     52; @history 
    5353; Guillaume Roullet (grlod\@ipsl.jussieu.fr) 
    5454; Sebastien Masson (smasson\@lodyc.jussieu.fr) 
    5555; adaptation to work with a reduce domain 
    5656; 21/5/1999: missing values at !values.f_nan 
    57 ;  
     57; 
    5858; @version 
    5959; $Id$ 
    6060; 
    61 ; @todo  
     61; @todo 
    6262; code the 4d case 
    6363;- 
     
    7171@cm_4cal                        ; for jpt 
    7272@cm_4data                       ; for varname, vargrid, vardate, varunit, valmask 
    73 @cm_4mesh  
     73@cm_4mesh 
    7474; 
    7575  tempsun = systime(1)          ; To key_performance 
     
    8484  szu = size(u) 
    8585  szv = size(v) 
    86    
     86 
    8787  if szu[0] NE szv[0] then return, report('U and V input data must have the same number of dimensions') 
    8888 
     
    9696  indiceyv = (lindgen(jpj))[firstyv:firstyv+nyv-1] 
    9797  indicey = inter(indiceyu, indiceyv) 
    98   nx = n_elements(indicex)  
     98  nx = n_elements(indicex) 
    9999  ny = n_elements(indicey) 
    100100  indice2d = lindgen(jpi, jpj) 
     
    105105  varunits = 's-1' 
    106106  if n_elements(valmask) EQ 0 THEN valmask = 1e20 
    107   firstxt = indicex[0] & lastxt = indicex[0]+nx-1 & nxt = nx  
     107  firstxt = indicex[0] & lastxt = indicex[0]+nx-1 & nxt = nx 
    108108  firstyt = indicey[0] & lastyt = indicey[0]+ny-1 & nyt = ny 
    109109;---------------------------------------------------------------------------- 
     
    113113;xyz 
    114114;---------------------------------------------------------------------------- 
    115     szu[0] EQ 3 AND jpt EQ 1:BEGIN  
     115    szu[0] EQ 3 AND jpt EQ 1:BEGIN 
    116116;------------------------------------------------------------ 
    117117; extraction of U and V on the appropriated domain 
     
    119119      case 1 of 
    120120        szu[1] EQ nxu AND szu[2] EQ nyu AND $ 
    121            szv[1] EQ nxv AND szv[2] EQ nyv:BEGIN  
     121           szv[1] EQ nxv AND szv[2] EQ nyv:BEGIN 
    122122          case 1 of 
    123123            nxu NE nx:if indicex[0] EQ firstxu then u = u[0:nx-1, *, *] ELSE u = u[1: nx, *, *] 
     
    129129        END 
    130130        szu[1] EQ jpi AND szu[2] EQ jpj AND $ 
    131            szv[1] EQ jpi AND szv[2] EQ jpj:BEGIN  
     131           szv[1] EQ jpi AND szv[2] EQ jpj:BEGIN 
    132132          u = u[indicex[0]:indicex[0]+nx-1, indicey[0]:indicey[0]+ny-1, *] 
    133133          v = v[indicex[0]:indicex[0]+nx-1, indicey[0]:indicey[0]+ny-1, *] 
     
    142142      landu = where(coefu EQ 0) 
    143143      if landu[0] NE -1 then coefu[temporary(landu)] = !values.f_nan 
    144        
     144 
    145145      coefv = ((e2v[indice2d])[*]#replicate(1., nzt)) $ 
    146146              *(vmask())[indicex[0]:indicex[0]+nx-1, indicey[0]:indicey[0]+ny-1, firstzt:lastzt] 
     
    175175;---------------------------------------------------------------------------- 
    176176;---------------------------------------------------------------------------- 
    177     szu[0] EQ 3 AND jpt GT 1:BEGIN  
     177    szu[0] EQ 3 AND jpt GT 1:BEGIN 
    178178;------------------------------------------------------------ 
    179179; extraction of U and V on the appropriated domain 
     
    181181      case 1 of 
    182182        szu[1] EQ nxu AND szu[2] EQ nyu AND $ 
    183            szv[1] EQ nxv AND szv[2] EQ nyv:BEGIN  
     183           szv[1] EQ nxv AND szv[2] EQ nyv:BEGIN 
    184184          if nxu NE nx then $ 
    185              if indicex[0] EQ firstxu then u = u[0:nx-1, *, *] ELSE u = u[1: nx, *, *]  
     185             if indicex[0] EQ firstxu then u = u[0:nx-1, *, *] ELSE u = u[1: nx, *, *] 
    186186          IF nxv NE nx THEN $ 
    187187             if indicex[0] EQ firstxv then v = v[0:nx-1, *, *] ELSE v = v[1: nx, *, *] 
    188188          IF nyu NE ny THEN $ 
    189              if indicey[0] EQ firstyu then u = u[*, 0:ny-1, *] ELSE u = u[*, 1: ny, *]  
     189             if indicey[0] EQ firstyu then u = u[*, 0:ny-1, *] ELSE u = u[*, 1: ny, *] 
    190190          IF nyv NE ny THEN $ 
    191191             if indicey[0] EQ firstyv then v = v[*, 0:ny-1, *] ELSE v = v[*, 1: ny, *] 
    192192        END 
    193193        szu[1] EQ jpi AND szu[2] EQ jpj AND $ 
    194            szv[1] EQ jpi AND szv[2] EQ jpj:BEGIN  
     194           szv[1] EQ jpi AND szv[2] EQ jpj:BEGIN 
    195195          u = u[indicex[0]:indicex[0]+nx-1, indicey[0]:indicey[0]+ny-1, *] 
    196196          v = v[indicex[0]:indicex[0]+nx-1, indicey[0]:indicey[0]+ny-1, *] 
    197197        END 
    198         ELSE:BEGIN  
     198        ELSE:BEGIN 
    199199          print, 'problemes d''adequation entre la taille du domaine et la taille des matrices necessaires a tracer des vecteurs' 
    200200          return, -1 
     
    240240;---------------------------------------------------------------------------- 
    241241;---------------------------------------------------------------------------- 
    242     szu[0] EQ 4:BEGIN  
     242    szu[0] EQ 4:BEGIN 
    243243      return, report('Case not coded contact saxo team or make a do loop!') 
    244244    END 
     
    248248;---------------------------------------------------------------------------- 
    249249;---------------------------------------------------------------------------- 
    250     szu[0] EQ 2:BEGIN  
     250    szu[0] EQ 2:BEGIN 
    251251;------------------------------------------------------------ 
    252252;------------------------------------------------------------ 
    253253      case 1 of 
    254254        szu[1] EQ nxu AND szu[2] EQ nyu AND $ 
    255            szv[1] EQ nxv AND szv[2] EQ nyv:BEGIN  
     255           szv[1] EQ nxv AND szv[2] EQ nyv:BEGIN 
    256256          if nxu NE nx then $ 
    257              if indicex[0] EQ firstxu then u = u[0:nx-1, *] ELSE u = u[1: nx, *]  
     257             if indicex[0] EQ firstxu then u = u[0:nx-1, *] ELSE u = u[1: nx, *] 
    258258          IF nxv NE nx THEN $ 
    259259             if indicex[0] EQ firstxv then v = v[0:nx-1, *] ELSE v = v[1: nx, *] 
    260260          IF nyu NE ny THEN $ 
    261              if indicey[0] EQ firstyu then u = u[*, 0:ny-1] ELSE u = u[*, 1: ny]  
     261             if indicey[0] EQ firstyu then u = u[*, 0:ny-1] ELSE u = u[*, 1: ny] 
    262262          IF nyv NE ny THEN $ 
    263263             if indicey[0] EQ firstyv then v = v[*, 0:ny-1] ELSE v = v[*, 1: ny] 
    264264        END 
    265265        szu[1] EQ jpi AND szu[2] EQ jpj AND $ 
    266            szv[1] EQ jpi AND szv[2] EQ jpj:BEGIN  
     266           szv[1] EQ jpi AND szv[2] EQ jpj:BEGIN 
    267267          u = u[indice2d] 
    268268          v = v[indice2d] 
     
    305305  ENDCASE 
    306306;------------------------------------------------------------ 
    307   if keyword_set(key_performance) THEN print, 'temps curl', systime(1)-tempsun  
     307  if keyword_set(key_performance) THEN print, 'temps curl', systime(1)-tempsun 
    308308 
    309309  return, psi 
  • trunk/SRC/Computation/div.pro

    r168 r226  
    1010; Calculation 
    1111; 
    12 ; @param UU  
     12; @param UU 
    1313; Matrix representing the zonal coordinates (U point) of a field of vectors 
    1414; A 2D (xy), 3D (xyz or yt) or a structure readable by litchamp and containing 
    1515; a 2D (xy), 3D (xyz or yt) array (4d case is not coded yet). 
    16 ; note that the dimension of the arry must suit the domain dimension. 
    17 ; 
    18 ; @param VV  
     16; note that the dimension of the array must suit the domain dimension. 
     17; 
     18; @param VV 
    1919; Matrix representing the meridional coordinates (V point) of a field of vectors 
    2020; A 2D (xy), 3D (xyz or yt) or a structure readable by litchamp and containing 
    2121; a 2D (xy), 3D (xyz or yt) array (4d case is not coded yet). 
    22 ; note that the dimension of the arry must suit the domain dimension. 
     22; note that the dimension of the array must suit the domain dimension. 
    2323; 
    2424; @keyword DIREC {type=scalar string} 
     
    3030; 
    3131; @uses 
    32 ; cm_4cal, cm_4data, cm_4mmesh  
     32; cm_4cal, cm_4data, cm_4mmesh 
    3333; 
    3434; @restrictions 
    3535; 
    36 ; - Works only for Arakawa C-grid.  
     36; - Works only for Arakawa C-grid. 
    3737; - UU must be on U grid, VV must be on V grid 
    3838; - 4d case is not coded yet 
    3939; - the common variable jpt is used to differ xyz (jpt=1) and xyt (jpt\=1) cases. 
    40 ; - U and V arrays are cut in the same geographic domain. Because of the shift between  
    41 ;   T, U, V and F grids, it is possible that these two arrays do not have the same  
    42 ;   size and refer to different indexes. In this case, arrays are re-cut on  
     40; - U and V arrays are cut in the same geographic domain. Because of the shift between 
     41;   T, U, V and F grids, it is possible that these two arrays do not have the same 
     42;   size and refer to different indexes. In this case, arrays are re-cut on 
    4343;   common indexes. To avoid these re-cuts, use the keyword /memeindice in domdef.pro 
    4444; - When computing the divergence, we update, vargrid, varname, varunits and the 
    4545;   grid position parameters (firstxt, lastxt, nxt, firstyt, lastyt, nyt). 
    46 ; - points that cannot be computed (domain bondaries, coastline) are set to NaN 
     46; - points that cannot be computed (domain boundaries, coastline) are set to NaN 
    4747; 
    4848; @examples 
     
    5858; $Id$ 
    5959; 
    60 ; @todo  
     60; @todo 
    6161; code the 4d case 
    6262;- 
     
    7070@cm_4cal                        ; for jpt 
    7171@cm_4data                       ; for varname, vargrid, vardate, varunit, valmask 
    72 @cm_4mesh  
     72@cm_4mesh 
    7373; 
    7474  tempsun = systime(1)          ; For key_performance 
     
    8383  szu = size(u) 
    8484  szv = size(v) 
    85    
     85 
    8686  if szu[0] NE szv[0] then return, report('U and V input data must have the same number of dimensions') 
    8787 
     
    9595  indiceyv = (lindgen(jpj))[firstyv:firstyv+nyv-1] 
    9696  indicey = inter(indiceyu, indiceyv) 
    97   nx = n_elements(indicex)  
     97  nx = n_elements(indicex) 
    9898  ny = n_elements(indicey) 
    9999  indice2d = lindgen(jpi, jpj) 
     
    104104  varunits = '1.e6*s-1' 
    105105  if n_elements(valmask) EQ 0 THEN valmask = 1.e20 
    106   firstxt = indicex[0] & lastxt = indicex[0]+nx-1 & nxt = nx  
     106  firstxt = indicex[0] & lastxt = indicex[0]+nx-1 & nxt = nx 
    107107  firstyt = indicey[0] & lastyt = indicey[0]+ny-1 & nyt = ny 
    108108;---------------------------------------------------------------------------- 
     
    112112;xyz 
    113113;---------------------------------------------------------------------------- 
    114     szu[0] EQ 3 AND jpt EQ 1:BEGIN  
     114    szu[0] EQ 3 AND jpt EQ 1:BEGIN 
    115115;------------------------------------------------------------ 
    116116; extraction of U and V on the appropriated domain 
     
    118118      case 1 of 
    119119        szu[1] EQ nxu AND szu[2] EQ nyu AND $ 
    120            szv[1] EQ nxv AND szv[2] EQ nyv:BEGIN  
     120           szv[1] EQ nxv AND szv[2] EQ nyv:BEGIN 
    121121          case 1 of 
    122122            nxu NE nx:if indicex[0] EQ firstxu then u = u[0:nx-1, *, *] ELSE u = u[1: nx, *, *] 
     
    128128        END 
    129129        szu[1] EQ jpi AND szu[2] EQ jpj AND $ 
    130            szv[1] EQ jpi AND szv[2] EQ jpj:BEGIN  
     130           szv[1] EQ jpi AND szv[2] EQ jpj:BEGIN 
    131131          u = u[indicex[0]:indicex[0]+nx-1, indicey[0]:indicey[0]+ny-1, *] 
    132132          v = v[indicex[0]:indicex[0]+nx-1, indicey[0]:indicey[0]+ny-1, *] 
     
    168168;---------------------------------------------------------------------------- 
    169169;---------------------------------------------------------------------------- 
    170     szu[0] EQ 3 AND jpt GT 1:BEGIN  
     170    szu[0] EQ 3 AND jpt GT 1:BEGIN 
    171171;------------------------------------------------------------ 
    172172; extraction of U and V on the appropriated domain 
     
    174174      case 1 of 
    175175        szu[1] EQ nxu AND szu[2] EQ nyu AND $ 
    176            szv[1] EQ nxv AND szv[2] EQ nyv:BEGIN  
     176           szv[1] EQ nxv AND szv[2] EQ nyv:BEGIN 
    177177          case 1 of 
    178178            nxu NE nx:if indicex[0] EQ firstxu then u = u[0:nx-1, *, *] ELSE u = u[1: nx, *, *] 
     
    184184        END 
    185185        szu[1] EQ jpi AND szu[2] EQ jpj AND $ 
    186            szv[1] EQ jpi AND szv[2] EQ jpj:BEGIN  
     186           szv[1] EQ jpi AND szv[2] EQ jpj:BEGIN 
    187187          u = u[indicex[0]:indicex[0]+nx-1, indicey[0]:indicey[0]+ny-1, *] 
    188188          v = v[indicex[0]:indicex[0]+nx-1, indicey[0]:indicey[0]+ny-1, *] 
     
    218218; 
    219219      land = where(tmask[indice2d+jpi*jpj*firstzt] EQ 0, cnt) 
    220       if land[0] NE -1 then BEGIN  
     220      if land[0] NE -1 then BEGIN 
    221221        land = (temporary(land))#replicate(1L, jpt) + replicate(1L, cnt)#(nx*ny*lindgen(jpt)) 
    222222        zdiv[temporary(land)] = valmask 
     
    229229;---------------------------------------------------------------------------- 
    230230;---------------------------------------------------------------------------- 
    231     szu[0] EQ 4:BEGIN  
     231    szu[0] EQ 4:BEGIN 
    232232      return, report('Case not coded contact saxo team or make a do loop!') 
    233233    END 
     
    237237;---------------------------------------------------------------------------- 
    238238;---------------------------------------------------------------------------- 
    239     szu[0] EQ 2:BEGIN  
     239    szu[0] EQ 2:BEGIN 
    240240;------------------------------------------------------------ 
    241241; extraction of U and V on the appropriated domain 
     
    243243      case 1 of 
    244244        szu[1] EQ nxu AND szu[2] EQ nyu AND $ 
    245            szv[1] EQ nxv AND szv[2] EQ nyv:BEGIN  
     245           szv[1] EQ nxv AND szv[2] EQ nyv:BEGIN 
    246246          case 1 of 
    247247            nxu NE nx:if indicex[0] EQ firstxu then u = u[0:nx-1, *] ELSE u = u[1: nx, *] 
     
    253253        END 
    254254        szu[1] EQ jpi AND szu[2] EQ jpj AND $ 
    255            szv[1] EQ jpi AND szv[2] EQ jpj:BEGIN  
     255           szv[1] EQ jpi AND szv[2] EQ jpj:BEGIN 
    256256          u = u[indice2d] 
    257257          v = v[indice2d] 
     
    291291;---------------------------------------------------------------------------- 
    292292    ELSE:return, report('U and V input arrays must have 2, 3 or 4 dimensions') 
    293   ENDCASE    
    294 ;------------------------------------------------------------ 
    295   if keyword_set(key_performance) THEN print, 'temps div', systime(1)-tempsun  
    296    
     293  ENDCASE 
     294;------------------------------------------------------------ 
     295  if keyword_set(key_performance) THEN print, 'temps div', systime(1)-tempsun 
     296 
    297297  return, zdiv 
    298298end 
  • trunk/SRC/Computation/grad.pro

    r168 r226  
    1313; 3D (xyz or yt) or 4D (xyzt) array or a structure readable by litchamp 
    1414; and containing a 2D (xy), 3D (xyz or yt) or 4D (xyzt) array. 
    15 ; note that the dimension of the arry must suit the domain dimension. 
     15; note that the dimension of the array must suit the domain dimension. 
    1616; 
    1717; @param DIREC {type=scalar string} 
     
    2222; 
    2323; @uses 
    24 ; cm_4cal, cm_4data, cm_4mmesh  
     24; cm_4cal, cm_4data, cm_4mmesh 
    2525; 
    2626; @restrictions 
    27 ; - Works only for Arakawa C-grid.  
     27; - Works only for Arakawa C-grid. 
    2828; - When computing the gradient, the result is not on the same grid point 
    2929;   than the input data. In consequence, we update, vargrid and the grid position 
    3030;   parameters (firstx[tuvf], lastx[tuvf], nx[tuvf], firsty[tuvf], lasty[tuvf], 
    3131;   ny[tuvf], firstz[tw], lastz[tw], nz[tw]). 
    32 ; - points that cannot be computed (domain bondaries, coastline) are set to NaN 
     32; - points that cannot be computed (domain boundaries, coastline) are set to NaN 
    3333; - the common variable jpt is used to differ xyz (jpt=1) and xyt (jpt\=1) cases. 
    3434; 
     
    5454@cm_4cal   ; for jpt 
    5555@cm_4data  ; for varname, vargrid, vardate, varunit, valmask 
    56 @cm_4mesh  
     56@cm_4mesh 
    5757;------------------------------------------------------------ 
    5858; 
     
    6464  szres = size(res) 
    6565  grille, mask, glam, gphi, gdep, nx, ny, nz $ 
    66           , firstx, firsty, firstz, lastx, lasty, lastz      
     66          , firstx, firsty, firstz, lastx, lasty, lastz 
    6767; 
    6868  if n_elements(valmask) EQ 0 then valmask = 1.e20 
     
    7272    'T':BEGIN 
    7373      case direc of 
    74         'x':BEGIN  
     74        'x':BEGIN 
    7575          divi = e1u[firstx:lastx, firsty:lasty] 
    7676          newmask = (umask())[firstx:lastx, firsty:lasty, firstz:lastz] 
    7777          vargrid = 'U' 
    78           firstxu = firstxt & lastxu = lastxt & nxu = nxt  
     78          firstxu = firstxt & lastxu = lastxt & nxu = nxt 
    7979          firstyu = firstyt & lastyu = lastyt & nyu = nyt 
    8080        END 
     
    8383          newmask = (vmask())[firstx:lastx, firsty:lasty, firstz:lastz] 
    8484          vargrid = 'V' 
    85           firstxv = firstxt & lastxv = lastxt & nxv = nxt  
     85          firstxv = firstxt & lastxv = lastxt & nxv = nxt 
    8686          firstyv = firstyt & lastyv = lastyt & nyv = nyt 
    8787        END 
     
    9090          newmask = mask 
    9191          vargrid = 'W' 
    92           firstzw = firstzt & lastzw = lastzt & nzw = nzt  
     92          firstzw = firstzt & lastzw = lastzt & nzw = nzt 
    9393        END 
    9494        ELSE:return, report('Bad definition of direction argument') 
     
    9797    'W':BEGIN 
    9898      case direc of 
    99         'x':BEGIN  
     99        'x':BEGIN 
    100100          divi = e1u[firstx:lastx, firsty:lasty] 
    101101          newmask = (umask())[firstx:lastx, firsty:lasty, firstz:lastz] 
    102102          vargrid = 'U' 
    103           firstxu = firstxt & lastxu = lastxt & nxu = nxt  
     103          firstxu = firstxt & lastxu = lastxt & nxu = nxt 
    104104          firstyu = firstyt & lastyu = lastyt & nyu = nyt 
    105105        END 
     
    108108          newmask = (vmask())[firstx:lastx, firsty:lasty, firstz:lastz] 
    109109          vargrid = 'V' 
    110           firstxv = firstxt & lastxv = lastxt & nxv = nxt  
     110          firstxv = firstxt & lastxv = lastxt & nxv = nxt 
    111111          firstyv = firstyt & lastyv = lastyt & nyv = nyt 
    112112        END 
     
    115115          newmask = mask 
    116116          vargrid = 'T' 
    117           firstzt = firstzw & lastzt = lastzw & nzt = nzw  
     117          firstzt = firstzw & lastzt = lastzw & nzt = nzw 
    118118        END 
    119119        ELSE:return, report('Bad definition of direction argument') 
     
    126126          newmask = tmask[firstx:lastx, firsty:lasty, firstz:lastz] 
    127127          vargrid = 'T' 
    128           firstxt = firstxu & lastxt = lastxu & nxt = nxu  
     128          firstxt = firstxu & lastxt = lastxu & nxt = nxu 
    129129          firstyt = firstyu & lastyt = lastyu & nyt = nyu 
    130130        END 
     
    133133          newmask = (fmask())[firstx:lastx, firsty:lasty, firstz:lastz] 
    134134          vargrid = 'F' 
    135           firstxf = firstxu & lastxf = lastxu & nxf = nxu  
     135          firstxf = firstxu & lastxf = lastxu & nxf = nxu 
    136136          firstyf = firstyu & lastyf = lastyu & nyf = nyu 
    137137        END 
     
    140140          newmask = mask 
    141141          vargrid = 'W' 
    142           firstzw = firstzt & lastzw = lastzt & nzw = nzt  
     142          firstzw = firstzt & lastzw = lastzt & nzw = nzt 
    143143        END 
    144144        ELSE:return, report('Bad definition of direction argument') 
     
    165165          newmask = mask 
    166166          vargrid = 'W' 
    167           firstzw = firstzt & lastzw = lastzt & nzw = nzt  
     167          firstzw = firstzt & lastzw = lastzt & nzw = nzt 
    168168        END 
    169169        ELSE:return, report('Bad definition of direction argument') 
     
    191191      if land[0] NE -1 then res[temporary(land)] = !values.f_nan 
    192192      case direc of 
    193         'x':BEGIN  
     193        'x':BEGIN 
    194194          res = (shift(res, -1, 0)-res)/temporary(divi) 
    195195          if key_periodic EQ 0 OR nx NE jpi THEN res[nx-1, *] = !values.f_nan 
    196196          if vargrid EQ 'T' OR vargrid EQ 'V' then res = shift(temporary(res), 1, 0) 
    197197        END 
    198         'y':BEGIN  
     198        'y':BEGIN 
    199199          res = (shift(res, 0, -1)-res)/temporary(divi) 
    200200          res[*, ny-1] = !values.f_nan 
    201           if vargrid EQ 'T' OR vargrid EQ 'U' then res = shift(temporary(res), 0, 1)            
     201          if vargrid EQ 'T' OR vargrid EQ 'U' then res = shift(temporary(res), 0, 1) 
    202202        END 
    203203        ELSE:return,  report('Bad definition of direction argument for the type of array') 
     
    217217      divi = (temporary(divi))[*]#replicate(1., jpt) 
    218218      case direc of 
    219         'x':BEGIN  
     219        'x':BEGIN 
    220220          res = (shift(res, -1, 0, 0)-res)/temporary(divi) 
    221221          if key_periodic EQ 0 OR nx NE jpi THEN res[nx-1, *, *] = !values.f_nan 
    222222          if vargrid EQ 'T' OR vargrid EQ 'V' then res = shift(temporary(res), 1, 0, 0) 
    223223        END 
    224         'y':BEGIN  
     224        'y':BEGIN 
    225225          res = (shift(res, 0, -1, 0)-res)/temporary(divi) 
    226226          res[*, ny-1, *] = !values.f_nan 
    227           if vargrid EQ 'T' OR vargrid EQ 'U' then res = shift(temporary(res), 0, 1, 0)         
     227          if vargrid EQ 'T' OR vargrid EQ 'U' then res = shift(temporary(res), 0, 1, 0) 
    228228        END 
    229229        ELSE:return,  report('Bad definition of direction argument for the type of array') 
     
    242242      if land[0] NE -1 then res[temporary(land)] = !values.f_nan 
    243243      case direc OF 
    244         'x':BEGIN  
     244        'x':BEGIN 
    245245          divi = (temporary(divi))[*]#replicate(1., nz) 
    246246          res = (shift(res, -1, 0, 0)-res)/temporary(divi) 
     
    248248          if vargrid EQ 'T' OR vargrid EQ 'V' then res = shift(temporary(res), 1, 0, 0) 
    249249        END 
    250         'y':BEGIN  
     250        'y':BEGIN 
    251251          divi = (temporary(divi))[*]#replicate(1., nz) 
    252252          res = (shift(res, 0, -1, 0)-res)/temporary(divi) 
    253253          res[*, ny-1, *] = !values.f_nan 
    254           if vargrid EQ 'T' OR vargrid EQ 'U' then res = shift(temporary(res), 0, 1, 0)         
     254          if vargrid EQ 'T' OR vargrid EQ 'U' then res = shift(temporary(res), 0, 1, 0) 
    255255        END 
    256256        'z':BEGIN 
    257257          divi = replicate(1., nx*ny)#(temporary(divi))[*] 
    258258          if nx EQ 1 OR ny EQ 1 then res = reform(res, nx, ny, nz, /overwrite) 
    259           if vargrid EQ 'W' THEN BEGIN  
     259          if vargrid EQ 'W' THEN BEGIN 
    260260            res = (shift(res, 0, 0, 1)-res)/temporary(divi) 
    261261            res[*, *, 0] = !values.f_nan 
     
    279279      ENDIF 
    280280      case direc OF 
    281         'x':BEGIN  
     281        'x':BEGIN 
    282282          divi = (temporary(divi))[*]#replicate(1., nz*jpt) 
    283283          res = (shift(res, -1, 0, 0, 0)-res)/temporary(divi) 
     
    285285          if vargrid EQ 'T' OR vargrid EQ 'V' then res = shift(temporary(res), 1, 0, 0, 0) 
    286286        END 
    287         'y':BEGIN  
     287        'y':BEGIN 
    288288          divi = (temporary(divi))[*]#replicate(1., nz*jpt) 
    289289          res = (shift(res, 0, -1, 0, 0)-res)/temporary(divi) 
    290290          res[*, ny-1, *, *] = !values.f_nan 
    291           if vargrid EQ 'T' OR vargrid EQ 'U' then res = shift(temporary(res), 0, 1, 0, 0)         
     291          if vargrid EQ 'T' OR vargrid EQ 'U' then res = shift(temporary(res), 0, 1, 0, 0) 
    292292        END 
    293293        'z':BEGIN 
     
    295295          divi = (temporary(divi))[*]#replicate(1L, jpt) 
    296296          if nx EQ 1 OR ny EQ 1 then res = reform(res, nx, ny, nz, jpt, /overwrite) 
    297           if vargrid EQ 'W' THEN BEGIN  
     297          if vargrid EQ 'W' THEN BEGIN 
    298298            res = (shift(res, 0, 0, 1, 0)-res)/temporary(divi) 
    299299            res[*, *, 0, *] = !values.f_nan 
  • trunk/SRC/Grid/checkperio.pro

    r197 r226  
    88; @param file {in}{required}{type=scalar string} 
    99; A string giving the name of the NetCdf file 
    10 ;  
     10; 
    1111; @keyword WRITE {default=0}{type=scalar: 0 or 1} 
    1212; Define to 1 to write the good periodicity in the file. 
    13 ; By default print only mesage of periodicity errors 
     13; By default print only message of periodicity errors 
    1414; 
    1515; @restrictions 
     
    3838; @history 
    3939; October 2006: Sebastien Masson (smasson\@locean-ipsl.upmc.fr) 
    40 ;     
     40; 
    4141; @version 
    4242; $Id$ 
     
    4444PRO checkperio, file, WRITE = write 
    4545 
    46   IF file_test(file) EQ 0 THEN BEGIN  
     46  IF file_test(file) EQ 0 THEN BEGIN 
    4747    print, 'file '+file+' not found' 
    4848    RETURN 
     
    5353; 
    5454  dimsz = lonarr(finq.ndims) 
    55   FOR did = 0, finq.ndims-1 DO BEGIN  
     55  FOR did = 0, finq.ndims-1 DO BEGIN 
    5656    ncdf_diminq, cdfid, did, name, size 
    5757    dimsz[did] = size 
    5858  ENDFOR 
    5959; 
    60   FOR vid = 0, finq.nvars-1 DO BEGIN  
     60  FOR vid = 0, finq.nvars-1 DO BEGIN 
    6161    vinq =  ncdf_varinq(cdfid, vid) 
    6262    IF vinq.ndims GE 2 THEN BEGIN 
     
    6868; 2D VAR 
    6969;------------------------------ 
    70         2:BEGIN  
     70        2:BEGIN 
    7171; y periodicity (1) 
    7272          CASE 1 OF 
     
    7575              ncdf_varget, cdfid, vid, part2, count = [jpi-2, 1], offset = [1, jpj-3] 
    7676              part2 = reverse(shift(part2, -1)) 
    77               IF array_equal(part1, part2) NE 1 THEN BEGIN  
     77              IF array_equal(part1, part2) NE 1 THEN BEGIN 
    7878                print, vinq.name+' bad y periodicity (1)' 
    7979                IF keyword_set(write) THEN $ 
     
    8585              ncdf_varget, cdfid, vid, part2, count = [jpi-2, 1], offset = [1, jpj-2] 
    8686              part2 = reverse(part2) 
    87               IF array_equal(part1, part2) NE 1 THEN BEGIN  
     87              IF array_equal(part1, part2) NE 1 THEN BEGIN 
    8888                print, vinq.name+' bad y periodicity (1)' 
    8989                IF keyword_set(write) THEN $ 
     
    9999              ncdf_varget, cdfid, vid, part2, count = [(jpi-1)/2-2+1, 1], offset = [          2, jpj-2] 
    100100              part2 = reverse(part2) 
    101               IF array_equal(part1, part2) NE 1 THEN BEGIN  
     101              IF array_equal(part1, part2) NE 1 THEN BEGIN 
    102102                print, vinq.name+' bad y periodicity (2)' 
    103103                IF keyword_set(write) THEN $ 
     
    112112          ncdf_varget, cdfid, vid, part1, count = [1, jpj], offset = [0, 0] 
    113113          ncdf_varget, cdfid, vid, part2, count = [1, jpj], offset = [jpi-2, 0] 
    114           IF array_equal(part1, part2) NE 1 THEN BEGIN  
     114          IF array_equal(part1, part2) NE 1 THEN BEGIN 
    115115            print, vinq.name+' bad x periodicity (1)' 
    116116            IF keyword_set(write) THEN $ 
     
    120120          ncdf_varget, cdfid, vid, part1, count = [1, jpj], offset = [jpi-1, 0] 
    121121          ncdf_varget, cdfid, vid, part2, count = [1, jpj], offset = [1, 0] 
    122           IF array_equal(part1, part2) NE 1 THEN BEGIN  
     122          IF array_equal(part1, part2) NE 1 THEN BEGIN 
    123123            print, vinq.name+' bad x periodicity (2)' 
    124124            IF keyword_set(write) THEN $ 
     
    129129; 3D VAR 
    130130;------------------------------ 
    131         3:BEGIN  
     131        3:BEGIN 
    132132          jpk = vdimsz[2] 
    133133; y periodicity (1) 
     
    138138              IF jpk EQ 1 THEN part2 = reform(part2, jpi-2, 1, jpk, /over) 
    139139              part2 = reverse(shift(part2, -1, 0, 0), 1) 
    140               IF array_equal(part1, part2) NE 1 THEN BEGIN  
     140              IF array_equal(part1, part2) NE 1 THEN BEGIN 
    141141                print, vinq.name+' bad y periodicity (1)' 
    142142                IF keyword_set(write) THEN $ 
     
    149149              IF jpk EQ 1 THEN part2 = reform(part2, jpi-2, 1, jpk, /over) 
    150150              part2 = reverse(part2, 1) 
    151               IF array_equal(part1, part2) NE 1 THEN BEGIN  
     151              IF array_equal(part1, part2) NE 1 THEN BEGIN 
    152152                print, vinq.name+' bad y periodicity (1)' 
    153153                IF keyword_set(write) THEN $ 
     
    163163              ncdf_varget, cdfid, vid, part2, count = [(jpi-1)/2-2+1, 1, jpk], offset = [          2, jpj-2, 0] 
    164164              part2 = reverse(part2, 1) 
    165               IF array_equal(part1, part2) NE 1 THEN BEGIN  
     165              IF array_equal(part1, part2) NE 1 THEN BEGIN 
    166166                print, vinq.name+' bad y periodicity (2)' 
    167167                IF keyword_set(write) THEN $ 
     
    176176          ncdf_varget, cdfid, vid, part1, count = [1, jpj, jpk], offset = [0, 0, 0] 
    177177          ncdf_varget, cdfid, vid, part2, count = [1, jpj, jpk], offset = [jpi-2, 0, 0] 
    178           IF array_equal(part1, part2) NE 1 THEN BEGIN  
     178          IF array_equal(part1, part2) NE 1 THEN BEGIN 
    179179            print, vinq.name+' bad x periodicity (1)' 
    180180            IF keyword_set(write) THEN $ 
     
    184184          ncdf_varget, cdfid, vid, part1, count = [1, jpj, jpk], offset = [jpi-1, 0, 0] 
    185185          ncdf_varget, cdfid, vid, part2, count = [1, jpj, jpk], offset = [1, 0, 0] 
    186           IF array_equal(part1, part2) NE 1 THEN BEGIN  
     186          IF array_equal(part1, part2) NE 1 THEN BEGIN 
    187187            print, vinq.name+' bad x periodicity (2)' 
    188188            IF keyword_set(write) THEN $ 
     
    193193; 4D VAR 
    194194;------------------------------ 
    195         4:BEGIN  
     195        4:BEGIN 
    196196          jpk = vdimsz[2] 
    197197          jpt = vdimsz[3] 
     
    203203              IF jpt EQ 1 THEN part2 = reform(part2, jpi-2, 1, jpk, jpt, /over) 
    204204              part2 = reverse(shift(part2, -1, 0, 0, 0), 1) 
    205               IF array_equal(part1, part2) NE 1 THEN BEGIN  
     205              IF array_equal(part1, part2) NE 1 THEN BEGIN 
    206206                print, vinq.name+' bad y periodicity (1)' 
    207207                IF keyword_set(write) THEN $ 
     
    214214              IF jpt EQ 1 THEN part2 = reform(part2, jpi-2, 1, jpk, jpt, /over) 
    215215              part2 = reverse(part2, 1) 
    216               IF array_equal(part1, part2) NE 1 THEN BEGIN  
     216              IF array_equal(part1, part2) NE 1 THEN BEGIN 
    217217                print, vinq.name+' bad y periodicity (1)' 
    218218                IF keyword_set(write) THEN $ 
     
    228228              ncdf_varget, cdfid, vid, part2, count = [(jpi-1)/2-2+1, 1, jpk, jpt], offset = [          2, jpj-2, 0, 0] 
    229229              part2 = reverse(part2, 1) 
    230               IF array_equal(part1, part2) NE 1 THEN BEGIN  
     230              IF array_equal(part1, part2) NE 1 THEN BEGIN 
    231231                print, vinq.name+' bad y periodicity (2)' 
    232232                IF keyword_set(write) THEN $ 
     
    241241          ncdf_varget, cdfid, vid, part1, count = [1, jpj, jpk, jpt], offset = [0, 0, 0, 0] 
    242242          ncdf_varget, cdfid, vid, part2, count = [1, jpj, jpk, jpt], offset = [jpi-2, 0, 0, 0] 
    243           IF array_equal(part1, part2) NE 1 THEN BEGIN  
     243          IF array_equal(part1, part2) NE 1 THEN BEGIN 
    244244            print, vinq.name+' bad x periodicity (1)' 
    245245            IF keyword_set(write) THEN $ 
     
    249249          ncdf_varget, cdfid, vid, part1, count = [1, jpj, jpk, jpt], offset = [jpi-1, 0, 0, 0] 
    250250          ncdf_varget, cdfid, vid, part2, count = [1, jpj, jpk, jpt], offset = [1, 0, 0, 0] 
    251           IF array_equal(part1, part2) NE 1 THEN BEGIN  
     251          IF array_equal(part1, part2) NE 1 THEN BEGIN 
    252252            print, vinq.name+' bad x periodicity (2)' 
    253253            IF keyword_set(write) THEN $ 
     
    257257        ELSE:print, vinq.name+' nothing to check' 
    258258      ENDCASE 
    259     ENDIF     
     259    ENDIF 
    260260  ENDFOR 
    261261 
  • trunk/SRC/Grid/computegrid.pro

    r217 r226  
    44;+ 
    55; 
    6 ; @file_comments  
     6; @file_comments 
    77; 
    88; compute the grid parameters (cm_4mesh) common 
     
    5050; ccmeshparameters, ccreadparameters 
    5151; 
    52 ; @categories  
     52; @categories 
    5353; Grid 
    5454; 
     
    7272;       optional if [XY]AXIS keyword is used or stepxin is a vector 
    7373; 
    74 ; @param nyin {in}{optional}{type=scalar}  
     74; @param nyin {in}{optional}{type=scalar} 
    7575;       number of points in y direction, 
    7676;       optional if [XY]AXIS keyword is used or stepyin is a vector 
     
    111111; 
    112112; @keyword SHIFT {default=computed according to glamboundary}{type=scalar} 
    113 ;       Force the manual definition of the zonal shift that must be apply to the data.  
     113;       Force the manual definition of the zonal shift that must be apply to the data. 
    114114;       The resulting value will be stored in the common (cm_4mesh) variable key_shift 
    115115;       Note that if key_periodic=0 then in any case key_shift = 0. 
     
    169169;       Activate when the model is a C grid based on a F point 
    170170;       (with a F point at the bottom-left corner and a T point at the 
    171 ;       upper-right corner). In this case, we ignore  
     171;       upper-right corner). In this case, we ignore 
    172172;         - the first line of F and V points 
    173173;         - the last  line of T and U points 
     
    181181;       Activate when the model is a C grid based on a U point 
    182182;       (with a U point at the bottom-left corner and a T point at the 
    183 ;       upper-right corner). In this case, we ignore  
     183;       upper-right corner). In this case, we ignore 
    184184;         - if the grid is not x-periodic, the first column of F and U points 
    185185;         - if the grid is not x-periodic, the last  column of T and V points. 
     
    191191;       Activate when the model is a C grid based on a V point 
    192192;       (with a V point at the bottom-left corner and a T point at the 
    193 ;       upper-right corner). In this case, we ignore  
     193;       upper-right corner). In this case, we ignore 
    194194;         - the first line of F and V points 
    195195;         - the last  line of T and U points 
     
    203203;       Used when the model is a ROMS C-grid with one more point 
    204204;       in longitude for T and V grid and one more point in latitude 
    205 ;       for T and U grid. In this case, we ignore  
     205;       for T and U grid. In this case, we ignore 
    206206;         - the last line of T and U points 
    207207;         - the last column of T and V points. 
     
    215215;       Specify the vertical axis. Must be sorted in the increasing or deceasing order 
    216216; 
    217 ; @keyword _EXTRA  
     217; @keyword _EXTRA 
    218218;    (not used in the present case...) 
    219219; 
    220220; @uses cm_4mesh cm_4data cm_4cal 
    221221; 
    222 ; @restrictions if the grid has x/y periodicity orverlap and/or if 
     222; @restrictions if the grid has x/y periodicity overlap and/or if 
    223223;    the mask has 0 everywhere at the border (like a close sea) and 
    224224;    if (we did not activate /plain and xminmesh, xmaxmesh, yminmesh, 
     
    230230; @restrictions FUV points definition is not exact if the grid is irregular 
    231231; 
    232 ; @history Sebastien Masson (smasson\@lodyc.jussieu.fr) 
     232; @history 
     233; Sebastien Masson (smasson\@lodyc.jussieu.fr) 
    233234;                      2000-04-20 
    234 ;  Sept 2004, several bug fixs to suit C grid type... 
     235;  Sept 2004, several bug fix to suit C grid type... 
    235236;  Aug 2005, rewritte almost everything... 
    236237; 
    237 ; @version $Id$ 
     238; @version 
     239; $Id$ 
    238240; 
    239241;- 
     
    996998      gdepw = gdept 
    997999    ENDELSE 
    998     IF keyword_set(romsh) THEN gdepw = gdept  
     1000    IF keyword_set(romsh) THEN gdepw = gdept 
    9991001; 
    10001002;==================================================== 
     
    10201022      tmask = tmask[*]#replicate(1, jpkglo) 
    10211023      tmask = reform(tmask, jpiglo, jpjglo, jpkglo, /overwrite) 
    1022     ENDIF   
     1024    ENDIF 
    10231025    IF jpiglo EQ 1 OR jpjglo EQ 1 THEN tmask = reform(tmask, jpiglo, jpjglo, jpkglo, /overwrite) 
    10241026    tmask = byte(tmask[ixminmesh:ixmaxmesh, iyminmesh:iymaxmesh, izminmesh:izmaxmesh]) 
  • trunk/SRC/Grid/ncdf_meshread.pro

    r216 r226  
    66; @file_comments read NetCDF meshmask file created by OPA 
    77; 
    8 ; @categories  
     8; @categories 
    99; Grid 
    1010; 
     
    4646; 
    4747; @keyword SHIFT {default=computed according to glamboundary}{type=scalar} 
    48 ;    Force the manual definition of the zonal shift that must be apply to the data.  
     48;    Force the manual definition of the zonal shift that must be apply to the data. 
    4949;    The resulting value will be stored in the common (cm_4mesh) variable key_shift 
    5050;    Note that if key_periodic=0 then in any case key_shift = 0. 
     
    6767;  are equal to -1 they will be automatically defined 
    6868; 
    69 ; @history Sebastien Masson (smasson\@lodyc.jussieu.fr) 
     69; @history 
     70; Sebastien Masson (smasson\@lodyc.jussieu.fr) 
    7071;                      12/1999 
    7172; July 2004, Sebastien Masson: Several modifications (micromeshmask, 
     
    7576; Aug. 2005, Sebastien Masson: some cleaning + english 
    7677; 
    77 ; @version $Id$ 
     78; @version 
     79; $Id$ 
    7880; 
    7981;- 
     
    218220; 
    219221      IF array_equal(sort(xaxis), lindgen(jpi)) NE 1 THEN BEGIN 
    220         print, 'the x axis (1st line of glamt) is not sorted in the inceasing order after the automatic definition of key_shift' 
     222        print, 'the x axis (1st line of glamt) is not sorted in the increasing order after the automatic definition of key_shift' 
    221223        print, 'please use the keyword shift (and periodic) to suppress the automatic definition of key_shift (and key_periodic) and define by hand a more suitable value...' 
    222224        widget_control, noticebase, bad_id = nothing, /destroy 
     
    405407    tmask = byte(res) 
    406408  ENDELSE 
    407 ; boudary conditions used to compute umask. 
     409; boundary conditions used to compute umask. 
    408410  varcontient = ncdf_varinq(cdfid, 'umask') 
    409411  name = varcontient.name 
     
    420422    umaskred = reform(byte(res), /over) 
    421423  ENDELSE 
    422 ; boudary conditions used to compute fmask (1). 
     424; boundary conditions used to compute fmask (1). 
    423425  varcontient = ncdf_varinq(cdfid, 'fmask') 
    424426  name = varcontient.name 
     
    433435    fmaskredy = temporary(fmaskredy) MOD 2 
    434436  ENDELSE 
    435 ; boudary conditions used to compute vmask 
     437; boundary conditions used to compute vmask 
    436438  varcontient = ncdf_varinq(cdfid, 'vmask') 
    437439  name = varcontient.name 
     
    459461    vmaskred = reform(byte(res), /over) 
    460462  ENDELSE 
    461 ; boudary conditions used to compute fmask (2). 
     463; boundary conditions used to compute fmask (2). 
    462464  varcontient = ncdf_varinq(cdfid, 'fmask') 
    463465  name = varcontient.name 
     
    509511  ncdf_close,  cdfid 
    510512;------------------------------------------------------- 
    511 ; Apply Glamboudary 
     513; Apply Glamboundary 
    512514;------------------------------------------------------- 
    513515  if keyword_set(glamboundary) AND key_onearth then BEGIN 
  • trunk/SRC/Grid/ncdf_meshroms.pro

    r216 r226  
    66; @file_comments read NetCDF grid file created by ROMS 
    77; 
    8 ; @categories  
     8; @categories 
    99; Grid 
    1010; 
     
    4444; @keyword NRHO {default=1}{type=scalar} 
    4545;    Specify the number of rho level that contain the data we want to explore. 
    46 ;    This is mainly useful when using xxx to get access to the depper levers and vertical sections. 
     46;    This is mainly useful when using xxx to get access to the deeper levers and vertical sections. 
    4747; 
    4848; @keyword SHIFT {default=computed according to glamboundary}{type=scalar} 
    49 ;    Force the manual definition of the zonal shift that must be apply to the data.  
     49;    Force the manual definition of the zonal shift that must be apply to the data. 
    5050;    The resulting value will be stored in the common (cm_4mesh) variable key_shift 
    5151;    Note that if key_periodic=0 then in any case key_shift = 0. 
     
    7777; 
    7878;  Scale factors are compuited using the distance between the points 
    79 ;  (which is not the exact definition for irregulare grid). 
    80 ; 
    81 ; @history Sebastien Masson (smasson\@lodyc.jussieu.fr) September 2006 
    82 ; 
    83 ; @version $Id$ 
     79;  (which is not the exact definition for irregular grid). 
     80; 
     81; @history 
     82; Sebastien Masson (smasson\@lodyc.jussieu.fr) September 2006 
     83; 
     84; @version 
     85; $Id$ 
    8486; 
    8587;- 
     
    197199; 
    198200      IF array_equal(sort(xaxis), lindgen(jpi)) NE 1 THEN BEGIN 
    199         print, 'the x axis (1st line of glamt) is not sorted in the inceasing order after the automatic definition of key_shift' 
     201        print, 'the x axis (1st line of glamt) is not sorted in the increasing order after the automatic definition of key_shift' 
    200202        print, 'please use the keyword shift (and periodic) to suppress the automatic definition of key_shift (and key_periodic) and define by hand a more suitable value...' 
    201203        widget_control, noticebase, bad_id = nothing, /destroy 
  • trunk/SRC/Grid/restoreboxparam.pro

    r155 r226  
    55; 
    66; @file_comments restore all the zoom parameters (defined by calling domdef) 
    7 ; perviously defined by saveboxparam 
     7; previously defined by saveboxparam 
    88; 
    9 ; @param filename {in}{required}  
    10 ; a scalar string defining the file name  
     9; @param filename {in}{required} 
     10; a scalar string defining the file name 
    1111; 
    1212; @uses cm_4mesh (and cm_demomode_used if we are in demo mode) 
    1313; 
    14 ; @restrictions call def_myuniquetmpdir, if myuniquetmpdir is undefined:  
     14; @restrictions call def_myuniquetmpdir, if myuniquetmpdir is undefined: 
    1515;               => define, create and add it to !path 
    1616; 
    1717; @examples 
    1818; IDL> restoreboxparam, filename 
    19 ;  
     19; 
    2020; @history Sebastien Masson (smasson\@lodyc.jussieu.fr) 
    2121;                      July 2005 
     
    8888  return 
    8989end 
    90      
     90 
  • trunk/SRC/Grid/romsdepth.pro

    r192 r226  
    1616; common variable (cm_4mesh) romszinfos must be correctly defined 
    1717; 
    18 ; @history  
     18; @history 
    1919; Sept 2006 Sebastien Masson (smasson\@lodyc.jussieu.fr) 
    2020; 
     
    4141  grille, -1, -1, -1, -1, nx, ny, nz, firstx, firsty, firstz, lastx, lasty, lastz 
    4242  hroms = hroms[firstx:lastx, firsty:lasty] 
    43   nt = n_elements(zeta)/nx/ny  
     43  nt = n_elements(zeta)/nx/ny 
    4444; 
    4545  cff1 = 1./sinh(theta_s) 
     
    4747; 
    4848  IF type EQ 'W' THEN BEGIN 
    49     sc = (findgen(jpk)-jpk)/jpk       
    50 ;  sc = (dindgen(jpk+1)-jpk)/jpk       
     49    sc = (findgen(jpk)-jpk)/jpk 
     50;  sc = (dindgen(jpk+1)-jpk)/jpk 
    5151;  jpk = jpk+1 
    5252  ENDIF ELSE BEGIN 
    53     sc = (findgen(jpk)-jpk-0.5+1)/jpk   
     53    sc = (findgen(jpk)-jpk-0.5+1)/jpk 
    5454  ENDELSE 
    5555; 
     
    6060  hinv = 1./hroms 
    6161  hinv = hinv[*]#replicate(1., jpk) 
    62 ; put a z dimenstion to zeta 
     62; put a z dimension to zeta 
    6363  zeta = transpose(temporary(zeta)) 
    6464  zeta = reform((temporary(zeta))[*]#replicate(1., jpk), nt, ny, nx, jpk, /overwrite) 
  • trunk/SRC/Interpolation/compute_fromirr_bilinear_weigaddr.pro

    r202 r226  
    55; to any grid using the bilinear method 
    66; 
    7 ; @categories  
     7; @categories 
    88; Interpolation 
    99; 
     
    5353;  June 2006: Sebastien Masson (smasson\@lodyc.jussieu.fr) 
    5454; 
    55 ; @version $Id$ 
     55; @version 
     56; $Id$ 
    5657; 
    5758;- 
     
    6566; 
    6667  jpio = (size(olonin, /dimensions))[0] 
    67   jpjo = (size(olonin, /dimensions))[1]   
     68  jpjo = (size(olonin, /dimensions))[1] 
    6869; mask check 
    6970  IF n_elements(omsk) EQ 1 AND omsk[0] EQ -1 THEN omsk = replicate(1b, jpio, jpjo) 
     
    7374    stop 
    7475  ENDIF 
    75   IF n_elements(amsk) NE jpia*jpja THEN BEGIN  
     76  IF n_elements(amsk) NE jpia*jpja THEN BEGIN 
    7677    print, 'output grid mask do not have the good size' 
    7778    stop 
     
    181182        ind = good[ind] 
    182183; now, we morph the quadrilateral ocean cell into the reference square (0 -> 1) 
    183 ; in addition we get the corrdinates of the atmospheric point in this new morphed square 
     184; in addition we get the coordinates of the atmospheric point in this new morphed square 
    184185        IF onsphere THEN BEGIN 
    185186; Warning! quadrilateral2square use anticlockwise quadrilateral definition 
     
    213214          xy[1] EQ 0 AND (tmpmsk[0]+tmpmsk[1]) EQ 0    : foraddr[n] = -1 
    214215          xy[1] EQ 1 AND (tmpmsk[2]+tmpmsk[3]) EQ 0    : foraddr[n] = -1 
    215           ELSE: BEGIN  
     216          ELSE: BEGIN 
    216217; we keep its address 
    217218        foraddr[n] = ind 
  • trunk/SRC/Interpolation/compute_fromreg_bilinear_weigaddr.pro

    r208 r226  
    44; "regular grid" to any grid using the bilinear method 
    55; 
    6 ; @categories  
     6; @categories 
    77; Interpolation 
    88; 
     
    2121; @keyword NONORTHERNLINE {type=scalar 0 or 1}{default=0} 
    2222; put 1 if you don't want to take into 
    23 ; account the northen line of the input data when performing the interpolation. 
     23; account the northern line of the input data when performing the interpolation. 
    2424; 
    2525; @keyword NOSOUTHERNLINE {type=scalar 0 or 1}{default=0} 
     
    4848;  November 2005: Sebastien Masson (smasson\@lodyc.jussieu.fr) 
    4949; 
    50 ; @version $Id$ 
     50; @version 
     51; $Id$ 
    5152; 
    5253;- 
     
    109110  IF ma GE minalon+360. THEN stop 
    110111; 
    111 ; we want to do biliear interpolation => for each ocean point, we must 
     112; we want to do bilinear interpolation => for each ocean point, we must 
    112113; find in which atm cell it is located. 
    113114; if the ocean point is out of the atm grid, we use closest neighbor 
    114115; interpolation 
    115116; 
    116 ; for each T point of oce grid, we find in which armospheric cell it is 
     117; for each T point of oce grid, we find in which atmospheric cell it is 
    117118; located. 
    118119; As the atmospheric grid is regular, we can use inrecgrid instead 
  • trunk/SRC/Interpolation/compute_fromreg_imoms3_weigaddr.pro

    r202 r226  
    55; "regular grid" to any grid using the imoms3 method 
    66; 
    7 ; @categories  
     7; @categories 
    88; Interpolation 
    99; 
     
    2222; @keyword NONORTHERNLINE {type=scalar 0 or 1}{default=0} 
    2323; put 1 if you don't want to take into 
    24 ; account the northen line of the input data when performing the interpolation. 
     24; account the northern line of the input data when performing the interpolation. 
    2525; 
    2626; @keyword NOSOUTHERNLINE {type=scalar 0 or 1}{default=0} 
  • trunk/SRC/Interpolation/extrapolate.pro

    r202 r226  
    11;+ 
    22; @file_comments 
    3 ; extrapolate data (zinput) where maskinput eq 0 by filling step by  
     3; extrapolate data (zinput) where maskinput eq 0 by filling step by 
    44; step the coastline points with the mean value of the 8 neighbourgs 
    55; (weighted by their mask value). 
    66; 
    7 ; @categories  
     7; @categories 
    88; Interpolation 
    99; 
     
    4747;  Sebastien Masson (smasson\@lodyc.jussieu.fr) 
    4848; 
    49 ; @version $Id$ 
     49; @version 
     50; $Id$ 
    5051; 
    5152;- 
     
    7172  ztmp = bytarr(nx+2, ny+2) 
    7273  IF n_elements(maskinput) EQ 1 AND maskinput[0] EQ -1 THEN maskinput = replicate(1b, nx, ny) 
    73   IF n_elements(maskinput) NE nx*ny THEN BEGIN  
     74  IF n_elements(maskinput) NE nx*ny THEN BEGIN 
    7475    print, 'input grid mask do not have the good size' 
    7576    return, -1 
     
    9798; 
    9899  cnt = 1 
    99 ; When we look for the coast line, we don't want to select the 
     100; When we look for the coastline, we don't want to select the 
    100101; borderlines of the array. -> we force the value of the mask for 
    101102; those lines. 
     
    109110  WHILE cnt LE nb_iteration AND cnt_land NE 0 DO BEGIN 
    110111;--------------------------------------------------------------- 
    111 ; find the coast line points... 
     112; find the coastline points... 
    112113;--------------------------------------------------------------- 
    113114; Once the land points list has been found, we change back the the 
     
    148149    weight = weight[temporary(ok)] 
    149150;--------------------------------------------------------------- 
    150 ; fill the coastine points 
     151; fill the coastline points 
    151152;--------------------------------------------------------------- 
    152153    z = temporary(z)*msk 
  • trunk/SRC/Interpolation/extrapsmooth.pro

    r202 r226  
    4646;- 
    4747FUNCTION extrapsmooth, in, mskin, x_periodic = x_periodic, MINVAL = minval, MAXVAL = maxval, GE0 = ge0 
    48  
    49   compile_opt strictarr, strictarrsubs  
    5048; 
    51   sz = size(reform(in))   
    52   IF sz[0] NE 2 THEN BEGIN  
     49  compile_opt strictarr, strictarrsubs 
     50; 
     51  sz = size(reform(in)) 
     52  IF sz[0] NE 2 THEN BEGIN 
    5353    print, 'Input arrays must have 2 dimensions' 
    5454    return, -1 
     
    5757  ny = sz[2] 
    5858  IF n_elements(mskin) EQ 1 AND mskin[0] EQ -1 THEN mskin = replicate(1b, nx, ny) 
    59   IF n_elements(mskin) NE nx*ny THEN BEGIN  
     59  IF n_elements(mskin) NE nx*ny THEN BEGIN 
    6060    print, 'input grid mask do not have the good size' 
    6161    return, -1 
     
    6565  whmsk = where(mskin EQ 0, nbr) 
    6666  IF nbr NE 0 THEN out[temporary(whmsk)] = !values.f_nan 
    67 ; add values on each side of the array to avoid bondary effects 
     67; add values on each side of the array to avoid boundary effects 
    6868  nx2 = nx/2 
    6969  ny2 = ny/2 
     
    7474    add2 = out[nx-nx2:nx-1, *] 
    7575    out = [add2, [temporary(out)], add1] 
    76   ENDIF ELSE BEGIN  
     76  ENDIF ELSE BEGIN 
    7777    add = replicate(!values.f_nan, nx2, ny+2*ny2) 
    7878    out = [add, [temporary(out)], add] 
  • trunk/SRC/Interpolation/get_gridparams.pro

    r163 r226  
    142142        1:BEGIN 
    143143          IF array_equal(lon, lon[*, 0] # replicate(1, jpj)) NE 1 THEN BEGIN 
    144             print, 'Longitudes are not the same for all latitudes, imposible to extract a 1D array of the longitudes' 
     144            print, 'Longitudes are not the same for all latitudes, impossible to extract a 1D array of the longitudes' 
    145145            stop 
    146146          ENDIF 
     
    163163        1:BEGIN 
    164164          IF array_equal(lat, replicate(1, jpi) # lat[0, *]) NE 1 THEN BEGIN 
    165             print, 'Latitudes are not the same for all longitudes, imposible to extract a 1D array of the latitudes' 
     165            print, 'Latitudes are not the same for all longitudes, impossible to extract a 1D array of the latitudes' 
    166166            stop 
    167167          ENDIF 
     
    184184        1:BEGIN 
    185185          IF array_equal(lon, lon[*, 0] # replicate(1, jpj)) NE 1 THEN BEGIN 
    186             print, 'Longitudes are not the same for all latitudes, imposible to extract a 1D array of the longitudes' 
     186            print, 'Longitudes are not the same for all latitudes, impossible to extract a 1D array of the longitudes' 
    187187            stop 
    188188          ENDIF 
    189189          lon = lon[*, 0] 
    190190          IF array_equal(lat, replicate(1, jpi) # reform(lat[0, *])) NE 1 THEN BEGIN 
    191             print, 'Latitudes are not the same for all longitudes, imposible to extract a 1D array of the latitudes' 
     191            print, 'Latitudes are not the same for all longitudes, impossible to extract a 1D array of the latitudes' 
    192192            stop 
    193193          ENDIF 
  • trunk/SRC/Interpolation/inquad.pro

    r163 r226  
    33; to find if an (x,y) point is in a quadrilateral (x1,x2,x3,x4) 
    44; 
    5 ; @categories  
     5; @categories 
    66; Grid 
    77; 
     
    205205; 
    206206; computation of test without any do loop for ntofind points (x,y) and 
    207 ; nquad quadilateral((x1,x2,x3,x4),(y1,y2,y3,y4)) 
     207; nquad quadrilateral((x1,x2,x3,x4),(y1,y2,y3,y4)) 
    208208; test dimensions are (ntofind, nquad) 
    209209; column i of test corresponds to the intersection of point i with all 
    210 ; quadirlateral. 
     210; quadrilateral. 
    211211; row j of test corresponds to all the points localized in cell j 
    212212  test = $ 
  • trunk/SRC/Obsolete/lec.pro

    r157 r226  
    66; lit les fichiers Vairmer en sort: 
    77; un tableau 2d ou 3d en fonction de nomchamp qui est le nom 
    8 ; du champ a extaire (2d s'il commence par SO et 3d s'il commence par VO) 
     8; du champ a extraire (2d s'il commence par SO et 3d s'il commence par VO) 
    99; cette fonction modifie aussi les variables globales: 
    1010; varname: trois lettres: nom de l'experience 
    1111; vargrid: nom de la grille 
    1212; vardate: date (yy)yymmdd 
    13 ; varexp: nom Vairmer du champ a tarcer 
     13; varexp: nom Vairmer du champ a tracer 
    1414; 
    1515; @obsolete 
    1616; 
    17 ; @categories  
     17; @categories 
    1818; Graphics, Reading 
    1919; 
     
    2525; minuscule commencant par vo ou so). Dans cette methode on saute directement 
    2626; d'en-tete en en-tete jusqu'a trouver le bon fichier. 
    27 ;             2) chaine de characteres commencant par vo ou so suivit du 
     27;             2) chaine de caracteres commencant par vo ou so suivit du 
    2828; numero de champ a aller chercher (par ex 'vo5'). Cette methode est un peu 
    2929; plus rapide car elle va directement chercher le fichier qui nous interesse. 
     
    7272; @uses common.pro isnumber.pro fivardate.pro 
    7373; 
    74 ; @history Sebastien Masson (smasson\@lodyc.jussieu.fr) 
     74; @history 
     75; Sebastien Masson (smasson\@lodyc.jussieu.fr) 
    7576;                       26/5/98 
    7677;                       Jerome Vialard : adaptation au format vairmer 
     
    8283;                       2/99 
    8384; 
    84 ; @version $Id$ 
     85; @version  
     86; $Id$ 
    8587; 
    8688;;- 
     
    166168;  le fortran ajoute au debut et a la fin de chaque write 4 octets de controle 
    167169;  les reels du model sont codes sur 4 octets 
    168 ;  un charactere fait 1 octet 
     170;  un caractere fait 1 octet 
    169171;----------------------------------------------------------------------- 
    170 ;4 chaines de 8 characteres+un tableau de reels+4 trucs de controle (pour les 
     172;4 chaines de 8 caracteres+un tableau de reels+4 trucs de controle (pour les 
    171173; 2 write): 
    172174   if dim eq 'VO' then $ 
     
    229231;--------------------------------------------------------------------- 
    230232      if taillebloc*numerochamp gt infofichier.size then $ 
    231        return, report('Ce numero de champ n''exite pas. Le fichier '+infofichier.name+' ne contient que ',infofichier.size/taillebloc,' champs.') 
     233       return, report('Ce numero de champ n''existe pas. Le fichier '+infofichier.name+' ne contient que ',infofichier.size/taillebloc,' champs.') 
    232234;--------------------------------------------------------------------- 
    233235; lecture de l'en-tete numero numerochamp 
     
    306308   ENDIF ELSE BEGIN 
    307309      case vargrid OF           ; on recupere le mask en entier ds le cas ou /TOUT 
    308          'U':mask = umask()     ; n''est pas active et on le choisit en fontion 
     310         'U':mask = umask()     ; n''est pas active et on le choisit en fonction 
    309311         'T':mask = tmask       ;  de la valeur de vargrid 
    310312         'W':mask = tmask 
  • trunk/SRC/Obsolete/meshlec.pro

    r134 r226  
    5858   tab    = 'aaaaa' 
    5959;--------------------------------------------------------- 
    60 ;  definition du domaine de la grille surlequel sont 
     60;  definition du domaine de la grille sur lequel sont 
    6161;  effectuees les sorties.les indices des tableaux commencant 
    6262;  a 1: cf le fichier wrivr2.F ds WKOPA sur le cray 
  • trunk/SRC/Obsolete/nlec.pro

    r134 r226  
    221221   endif 
    222222;------------------------------------------------------------ 
    223 ; points a metre a nan 
     223; points a mettre a nan 
    224224;------------------------------------------------------------ 
    225225   if n_elements(nan) NE 0 then BEGIN 
  • trunk/SRC/ReadWrite/idl-NetCDF/ncdf_quickread/ncdf_quickread_helper.pro

    r163 r226  
    11;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 
    22; 
    3 ; ncdf_quickread_helper.pro - This file contains IDL functions to read netCDF  
    4 ;                             data files into IDL variables.  
     3; ncdf_quickread_helper.pro - This file contains IDL functions to read netCDF 
     4;                             data files into IDL variables. 
    55; 
    66; Adapted from CDF2IDL.pro 
     
    88;  This file contains the following functions and procedures: 
    99;     functions: 
    10 ;        ncdf_quickread_getfile - strips the directory and optionally) any  
     10;        ncdf_quickread_getfile - strips the directory and optionally) any 
    1111;                                 suffixes from the path+file 
    1212;        ncdf_quickread_getdir - returns the directory from the full path+file 
     
    2525;  10 Jun 97  S. Rupert     Modified keyword usage. 
    2626;  03 Feb 98  S. Rupert     Added additional error checking, and warning to 
    27 ;                           output script.  
     27;                           output script. 
    2828;  17 Feb 98  S. Rupert     Corrected validation routine to handle instance 
    2929;                           of name strating with a number and containing a 
     
    5858; @examples 
    5959; Call: file = ncdf_quickread_getfile(fullpath) 
    60 ;  
     60; 
    6161; @history 
    6262; 
     
    6868on_error,2 
    6969compile_opt hidden 
    70 ; Retrieve the postion at which the first '/' character occurs from 
     70; Retrieve the position at which the first '/' character occurs from 
    7171; the end of the string. 
    7272dirlen = rstrpos(fullpath, '/') 
     
    111111; @examples 
    112112; Call: dir = ncdf_quickread_getdir(fullpath) 
    113 ;  
     113; 
    114114; @history 
    115115; 
     
    122122on_error,2 
    123123compile_opt hidden 
    124 ; Retrieve the postion at which the first '/' character occurs from 
     124; Retrieve the position at which the first '/' character occurs from 
    125125; the end of the string. 
    126126len = rstrpos(fullpath, '/') 
     
    139139; @file_comments 
    140140; This routine ensures that the given name does not start with a number, 
    141 ; nor contain a dash.  IDL cannot accept a variable starting with a  
    142 ; number or containing a dash.  If the name starts with a number, an  
    143 ; underscore is prepended to the name, and if it contains a dash, the  
    144 ; dash is replaced with an underscore.   
     141; nor contain a dash.  IDL cannot accept a variable starting with a 
     142; number or containing a dash.  If the name starts with a number, an 
     143; underscore is prepended to the name, and if it contains a dash, the 
     144; dash is replaced with an underscore. 
    145145; 
    146146; @categories 
     
    149149; @param VARNAME 
    150150; The name of the variable to be read 
    151 ;  
     151; 
    152152; 
    153153; @returns 
     
    158158; 
    159159; @examples 
    160 ;  
    161 ;  
     160; 
     161; 
    162162; @history 
    163163; 
     
    186186if (strpos(varname, '9') EQ 0) then name = strcompress("_"+varname) 
    187187 
    188 ; If the name contains a dash replace it with an underscore.  
     188; If the name contains a dash replace it with an underscore. 
    189189if (strpos(name, '-') NE -1) then begin 
    190190   pieces = str_sep(name, '-') 
     
    214214; full path to netCDF file of interest 
    215215; 
    216 ; @keyword VERBOSE   
     216; @keyword VERBOSE 
    217217; Set this keyword to return an error message in case of an error. 
    218218; 
     
    224224; 
    225225; @keyword REFORM 
    226 ; see changelog above.  
     226; see changelog above 
    227227; 
    228228; @returns 
     
    233233; 
    234234; @examples 
    235 ;  
    236 ;  
     235; 
     236; 
    237237; @history 
    238238; 
     
    274274 
    275275; Place the desired variables in local arrays. 
    276 for i=0, ncidinfo.Nvars-1 do begin  
     276for i=0, ncidinfo.Nvars-1 do begin 
    277277   vardata = NCDF_VARINQ(ncid, i) 
    278278   if not subset then begin 
     
    283283   endelse 
    284284   if wanted then begin 
    285        varname = ncdf_quickread_validatename(vardata.Name)  
     285       varname = ncdf_quickread_validatename(vardata.Name) 
    286286       if keyword_set(prefix) then varname=prefix+varname 
    287287       commands=$ 
     
    304304endfor 
    305305 
    306 if (keyword_set(verbose)) then begin  
     306if (keyword_set(verbose)) then begin 
    307307  for i=0, ncidinfo.Ngatts-1 do begin 
    308308     name = NCDF_ATTNAME(ncid, /GLOBAL, i) 
  • trunk/SRC/ReadWrite/readoldoparestart.pro

    r163 r226  
    1111; 
    1212; @param PARAMS 
    13 ;  
    14 ;  
     13; 
    1514; @param NUM 
    16 ;  
    17 ; 
    18 ; @restrictions  
     15; 
     16; @restrictions 
    1917; bug for etab and etan written on the same record??? 
    2018; 
    21 ; @history Sebastien Masson (smasson\@lodyc.jussieu.fr) 
     19; @history 
     20; Sebastien Masson (smasson\@lodyc.jussieu.fr) 
    2221;                      June 2002 
    23 ; @version $Id$ 
     22; 
     23; @version 
     24; $Id$ 
    2425;- 
    2526;------------------------------------------------------------ 
     
    4445; 
    4546; @param PARAMS 
    46 ;  
    47 ;  
     47; 
    4848; @param NUM 
    49 ;  
    50 ; 
    51 ; @history Sebastien Masson (smasson\@lodyc.jussieu.fr) 
     49; 
     50; @history 
     51; Sebastien Masson (smasson\@lodyc.jussieu.fr) 
    5252;                      June 2002 
    5353;- 
     
    6666; based on the OPA subroutine dtrlec included at the end of the file. 
    6767; 
    68 ; @categories  
     68; @categories 
    6969; For OPA 
    7070; 
     
    7373; 
    7474; @param JPIGLO {in}{required} 
    75 ;  
    76 ;  
     75; 
    7776; @param JPJGLO {in}{required} 
    78 ;  
    79 ;  
     77; 
    8078; @param JPK {in}{required} 
    8179; dimensions of the opa grid 
    8280; 
    83 ; @keyword IBLOC {default=4096L}  
     81; @keyword IBLOC {default=4096L} 
    8482; Ibloc size 
    85 ;  
     83; 
    8684; @keyword JPBYT {default=8L} 
    8785; Jpbyt size 
    88 ;  
    89 ; @keyword NUMREC {default=19L*jpk}  
     86; 
     87; @keyword NUMREC {default=19L*jpk} 
    9088; Number of records in the file 
    91 ;  
     89; 
    9290; @keyword UB 
    93 ;  
    94 ;  
     91; 
     92; 
    9593; @keyword VB 
    96 ;  
    97 ;  
     94; 
     95; 
    9896; @keyword TB 
    99 ;  
    100 ;  
     97; 
    10198; @keyword SB 
    102 ;  
    103 ;  
     99; 
    104100; @keyword ROTB 
    105 ;  
    106 ;  
     101; 
    107102; @keyword HDIVB 
    108 ;  
    109 ;  
     103; 
    110104; @keyword UN 
    111 ;  
    112 ;  
     105; 
    113106; @keyword VN 
    114 ;  
    115 ;  
     107; 
    116108; @keyword TN 
    117 ;  
    118 ;  
     109; 
    119110; @keyword SN 
    120 ;  
    121 ;  
     111; 
    122112; @keyword ROTN 
    123 ;  
    124 ;  
     113; 
    125114; @keyword HDIVN 
    126 ;  
    127 ;  
     115; 
    128116; @keyword GCX 
    129 ;  
    130 ;  
     117; 
    131118; @keyword GCXB 
    132 ;  
    133 ;  
     119; 
    134120; @keyword ETAB 
    135 ;  
    136 ;  
     121; 
    137122; @keyword ETAN 
    138 ;  
    139 ;  
     123; 
    140124; @keyword BSFB 
    141 ;  
    142 ;  
     125; 
    143126; @keyword BSFN 
    144 ;  
    145 ;  
     127; 
    146128; @keyword BSFD 
    147 ;  
    148 ;  
     129; 
    149130; @keyword EN 
    150131; the variable we want to read. 
    151132; 
    152 ; @returns  
     133; @returns 
    153134; According to the given keywords. 
    154 ;  
    155 ; @restrictions  
     135; 
     136; @restrictions 
    156137; Bug for etab and etan written on the same record??? 
    157138; 
    158 ; @history  
     139; @history 
    159140; Sebastien Masson (smasson\@lodyc.jussieu.fr) 
    160141;                      June 2002 
    161 ;  
     142; 
    162143; @version 
    163144; $Id$ 
     
    458439;          IF(lwp) THEN 
    459440;              WRITE(numout,*) ' ===>>>> : the previous restart file', 
    460 ;     $            ' didnt used  tke scheme' 
     441;     $            ' did''nt used  tke scheme' 
    461442;              WRITE(numout,*) ' =======                =======' 
    462443;          ENDIF 
  • trunk/SRC/Textoidl/translate_sub_super.pro

    r163 r226  
    22; @file_comments 
    33; Return the proper IDL font positioning command for TeX 
    4 ; sub/superscripts.  
     4; sub/superscripts. 
    55; 
    66; @categories 
     
    2525; function.  So even if sub_sup_idl was declared with 
    2626; FORWARD_FUNCTION in translate_sub_super, it would not properly 
    27 ; compile.  
     27; compile. 
    2828; 
    2929; The file translate_sub_super.pro contains two functions, 
     
    3636; Used only by translate_sub_super.  Should be kept in same 
    3737; file. 
    38 ;  
     38; 
    3939; @examples 
    4040; 
     
    8686        print, offset+offset+"             or '!D' or '!I' for subscripts." 
    8787        return, -1 
    88     ENDIF  
    89  
    90     IF keyword_set(force_ud) THEN BEGIN  
    91         IF (token EQ '^') THEN return, '!U'  
     88    ENDIF 
     89 
     90    IF keyword_set(force_ud) THEN BEGIN 
     91        IF (token EQ '^') THEN return, '!U' 
    9292        IF (token EQ '_') THEN return, '!D' 
    9393        return, '' 
    9494    ENDIF ELSE BEGIN 
    95         IF (token EQ '^') THEN return, '!E'  
     95        IF (token EQ '^') THEN return, '!E' 
    9696        IF (token EQ '_') THEN return, '!I' 
    9797        return, '' 
    9898    ENDELSE 
    99      
     99 
    100100END 
    101101 
     
    113113;       old       -- string to be translated from TeX to IDL.   in 
    114114; KEYWORD PARAMETERS: 
    115 ;       /RECURSED -- set if this function is being called  
    116 ;                    recursively.                   
     115;       /RECURSED -- set if this function is being called 
     116;                    recursively. 
    117117;       /HELP     -- Set to print useful message and exit. 
    118118; OUTPUTS: 
     
    130130;       out = translate_sub_super( 'N^2_{big}' ) 
    131131;       Then out='N!U2!N!Dbig!N' which looks like it should on the 
    132 ;       display.  
     132;       display. 
    133133; LIBRARY FUNCTIONS CALLED: 
    134134;       str_token      -- Text/string (mcraig) 
     
    195195        print, offset+offset+"- Sub/superscripts may be nested (e.g. 'N^{N_1^N}')." 
    196196        return, -1 
    197     ENDIF  
     197    ENDIF 
    198198 
    199199;  To allow for nested scripts, use !E/!I instead of !U/!D for scripts 
     
    233233        EndOfScript = 0         ;Position of end of this script. 
    234234        IF (Script EQ '{') THEN BEGIN   ; Scripts of more than 1 char. 
    235             EndOfScript = matchdelim(strn)       
     235            EndOfScript = matchdelim(strn) 
    236236            Script = translate_sub_super(strmid(strn, 1, EndOfScript-1), $ 
    237237                                         /recursed ) 
    238         ENDIF  
    239 ;     Grab rest of string _after_ the end of the script.         
     238        ENDIF 
     239;     Grab rest of string _after_ the end of the script. 
    240240        strn = strmid(strn, EndOfScript+1, $ 
    241241                      strlen(strn)-EndOfScript-1) 
     
    265265            StorePos = '' 
    266266            RecallPos = '' 
    267 ;     calculate the difference in length between this script and the  
     267;     calculate the difference in length between this script and the 
    268268;     previous stacked one, removing font change commands (crudely by 
    269269;     guessing that the number of characters this takes is twice the 
     
    276276        ENDIF ELSE BEGIN 
    277277            IF (Token NE OldToken) AND (pos EQ 0) THEN BEGIN 
    278 ;             The next script immediately folows this one.  Arrange to 
     278;             The next script immediately follows this one.  Arrange to 
    279279;             save the position of the current script so that both begin 
    280280;             with the same horizontal position. 
     
    283283                LenLastScript = strlen(Script) - 2*strcnt(Script,'!') 
    284284            ENDIF 
    285         ENDELSE   
     285        ENDELSE 
    286286 
    287287;  Continue building the IDL string, adding on our just processed script. 
     
    289289          + FontRestore 
    290290 
    291         IF ( pos NE -1 ) THEN BEGIN     ; more left to process      
     291        IF ( pos NE -1 ) THEN BEGIN     ; more left to process 
    292292            NewString = NewString $ 
    293               + str_token(strn, Token)    
     293              + str_token(strn, Token) 
    294294        ENDIF ELSE BEGIN                ; we are done 
    295295            NewString = NewString + strn 
    296296            strn = '' 
    297297        ENDELSE 
    298     ENDWHILE  
    299      
     298    ENDWHILE 
     299 
    300300    return, NewString 
    301301END 
  • trunk/SRC/ToBeReviewed/CALCULS/depth2floatlevel.pro

    r163 r226  
    44;+ 
    55; @file_comments 
    6 ; Rather comparable to depth2level but here, the calculated level is in float.  
    7 ; For example, the level 5.4 correspond to a depth equal  
     6; Rather comparable to depth2level but here, the calculated level is in float. 
     7; For example, the level 5.4 correspond to a depth equal 
    88; to gdep[5]+.4*(gdep[6]-gdep[5]) 
    99; 
    10 ; @categories  
     10; @categories 
    1111; Without loop 
    1212; 
     
    3232;  ->champ nul a 1e-6 pres 
    3333; 
    34 ; @history  
     34; @history 
    3535; Sebastien Masson (smasson\@lodyc.jussieu.fr) 
    3636;                      15/06/2000 
    37 ;  
     37; 
    3838; @version 
    3939; $Id$ 
     
    5757   levellow = depth2level(depthin, /lower, /nomask) 
    5858   depthlow = level2depth(levellow, /nomask) 
    59 ; calculate the distance depthlow-depthup and management of the case  
    60 ; of this distance is null or eqal to !values.f_nan 
     59; calculate the distance depthlow-depthup and management of the case 
     60; of this distance is null or equal to !values.f_nan 
    6161   divi = depthlow-depthup 
    6262   nan = where(finite(divi) EQ 0) 
     
    7474   endif 
    7575;------------------------------------------------------------ 
    76    if keyword_set(key_performance) THEN print, 'temps depth2floatlevel', systime(1)-tempsun  
     76   if keyword_set(key_performance) THEN print, 'temps depth2floatlevel', systime(1)-tempsun 
    7777; 
    7878   return, res 
  • trunk/SRC/ToBeReviewed/CALCULS/depth2level.pro

    r163 r226  
    44;+ 
    55; 
    6 ; @file_comments  
     6; @file_comments 
    77; Allows to pass from a 2d depth array to a corresponding 2d level array. 
    88; 
     
    1111; 
    1212; @param TAB {type=2d array} 
    13 ; 2d depth array (or a structure respecting litchamp critrions) 
     13; 2d depth array (or a structure respecting litchamp criterions) 
    1414; 
    1515; @keyword UPPER 
     
    1717; 
    1818; @keyword LOWER 
    19 ; We select the level just below the depth  
     19; We select the level just below the depth 
    2020; 
    21 ; @keyword CLOSER  
    22 ; We select the depth's closer level  
     21; @keyword CLOSER 
     22; We select the depth's closer level 
    2323; 
    24 ; @keyword NOMASK  
     24; @keyword NOMASK 
    2525; To do not mask land points 
    2626; 
    27 ; @returns  
     27; @returns 
    2828; It is a 2d array containing level's values. 
    2929; 
     
    3131; common.pro 
    3232; 
    33 ; @restrictions  
     33; @restrictions 
    3434; For depths out of gdep's values, the value !values.f_nan is sent back. 
    35 ; if the depth is superior to this one of the bottom, we send back jpk-1 in  
     35; if the depth is superior to this one of the bottom, we send back jpk-1 in 
    3636; the upper case, and !values.f_nan in the lower case. 
    3737; 
     
    8080   if notanumber[0] NE -1 then in[notanumber] = 0 
    8181;------------------------------------------------------------ 
    82 ; We transform the 2d deth value in a 2d array of levels corresponding to depthes 
     82; We transform the 2d depth value in a 2d array of levels corresponding to depths 
    8383;------------------------------------------------------------ 
    8484; We go on array who have the size of 3d arrays 
    85    prof=replicate(1,nx*ny)#gdep[firstz:lastz]  
     85   prof=replicate(1,nx*ny)#gdep[firstz:lastz] 
    8686   in = in[*]#replicate(1, nz) 
    8787; 
     
    116116;------------------------------------------------------------ 
    117117;------------------------------------------------------------ 
    118    if keyword_set(key_performance) THEN print, 'temps depth2level', systime(1)-tempsun  
     118   if keyword_set(key_performance) THEN print, 'temps depth2level', systime(1)-tempsun 
    119119   return, levels 
    120120end 
  • trunk/SRC/ToBeReviewed/CALCULS/depth2mask.pro

    r163 r226  
    44;+ 
    55; 
    6 ; @file_comments  
    7 ; Allows to pass from a 2d depth sill array to a 3d array of mask  
     6; @file_comments 
     7; Allows to pass from a 2d depth sill array to a 3d array of mask 
    88; with one of levels above the sill depth and 0s below. 
    99; 
     
    1212; 
    1313; @param TAB {type=3d array} 
    14 ; 2d sill depth array (or a structure respecting litchamp critrions) 
     14; 2d sill depth array (or a structure respecting litchamp criterions) 
    1515; 
    1616; @keyword _EXTRA 
    1717; used to pass your keywords 
    18 ;  
     18; 
    1919; @returns 
    2020; It is a 3d array containing the mas associated to the 2d sill depth array 
     
    4242@common 
    4343;------------------------------------------------------------ 
    44 ; We transform the 2d deth value in a 2d array of levels corresponding to depthes 
     44; We transform the 2d depth value in a 2d array of levels corresponding to depths 
    4545;------------------------------------------------------------ 
    4646   niveaux = depth2level(tab, _extra = ex) 
     
    5151   mask = level2mask(niveaux) 
    5252;------------------------------------------------------------ 
    53    if keyword_set(key_performance) NE 0 THEN print, 'temps depth2mask', systime(1)-tempsun  
     53   if keyword_set(key_performance) NE 0 THEN print, 'temps depth2mask', systime(1)-tempsun 
    5454   return, mask 
    5555end 
  • trunk/SRC/ToBeReviewed/CALCULS/floatlevel2depth.pro

    r163 r226  
    44;+ 
    55; 
    6 ; @file_comments  
     6; @file_comments 
    77; Rather comparable to level2depth. It is the invert function of depth2floatlevel 
    88; 
     
    1717; 
    1818; @returns 
    19 ; 2d array containing depthes 
     19; 2d array containing depths 
    2020; 
    2121; @uses 
     
    5252; We sill (delete land points at valmask for example) 
    5353   flevelin = 0 > flevelin < (jpk-1) 
    54 ; We caculate the depth  
     54; We calculate the depth 
    5555   depthup = level2depth(floor(flevelin), /nomask) 
    5656   depthlow= level2depth(ceil(flevelin), /nomask) 
     
    6767   endif 
    6868;------------------------------------------------------------ 
    69    if keyword_set(key_performance) THEN print, 'temps floatlevel2depth', systime(1)-tempsun  
     69   if keyword_set(key_performance) THEN print, 'temps floatlevel2depth', systime(1)-tempsun 
    7070; 
    7171   return, res 
  • trunk/SRC/ToBeReviewed/CALCULS/hdyn.pro

    r224 r226  
    1919; array representing the temperature. Has the same size than SN. 
    2020; 
    21 ; @keyword GILL  
     21; @keyword GILL 
    2222; We activate this key if we want to calculate the dynamic height 
    2323; like in the GILL page 215, which means by rapport to a reference state which 
     
    3232; Give a value to this keyword to change the reference salinity used in the 
    3333; calculation when GILL is activated. 
    34 ;  
     34; 
    3535; @keyword TREF 
    3636; Give a value to this keyword to change the reference temperature used in the 
     
    5858; 
    5959; @restrictions 
    60 ; approximation: The pressure in decibars is equal to the depth in meters  
     60; approximation: The pressure in decibars is equal to the depth in meters 
    6161; (the pressure increase of 1 bar every 10 m) 
    6262; 
     
    9999   if total(tailles[0:tailles[0]] NE taillet[0:taillet[0]]) NE 0 then $ 
    100100    return,  report('arrays sn and tn must have the same size') 
    101    if tailles[3] NE jpk then return, report('vertical dimension of sn and tn arrarrays must be equal to jpk') 
     101   if tailles[3] NE jpk then return, report('vertical dimension of sn and tn arrays must be equal to jpk') 
    102102   nx = nxt 
    103103   ny = nyt 
  • trunk/SRC/ToBeReviewed/CALCULS/level2depth.pro

    r224 r226  
    4747   grille,mask, -1, -1,gdep,nx,ny,nz,firstx,firsty,firstz,lastx,lasty,lastz 
    4848;--------------------------------------------------------------- 
    49 ; verification of the coherence between array's size and the domain definied by domdef 
     49; verification of the coherence between array's size and the domain defined by domdef 
    5050;--------------------------------------------------------------- 
    5151   taille = size(niveaux) 
  • trunk/SRC/ToBeReviewed/CALCULS/norme.pro

    r163 r226  
    44;+ 
    55; 
    6 ; @file_comments  
     6; @file_comments 
    77; calculate the norm of a field of vectors, then make a possible average. 
    88;   Comment 1: The field of vector can be, 2d:xy, 3d: xyz or xyt, 
    99; 4d: xyzt 
    1010;   Comment 2: 
    11 ; The calculation of the norm is made before the possible spatial or  
    12 ; temporal average because the average of the norm is not equal to the  
     11; The calculation of the norm is made before the possible spatial or 
     12; temporal average because the average of the norm is not equal to the 
    1313; norm of averages 
    1414 
     
    2424; 
    2525; @keyword BOXZOOM 
    26 ; boxzoom on which do the average (by default the domain selected  
     26; boxzoom on which do the average (by default the domain selected 
    2727; by the last domdef done) 
    2828; 
    2929; @keyword DIREC 
    3030; 't' 'x' 'y' 'z' 'xys' 'xz' 'yz' 'xyz' 'xt' 'yt' 'zt' 'xyt' 
    31 ;       'xzt' 'yzt' 'xyzt' Direction on which do averages  
     31;       'xzt' 'yzt' 'xyzt' Direction on which do averages 
    3232; 
    3333; @returns 
     
    3737; common.pro 
    3838; 
    39 ; @restrictions  
    40 ; The norm is calculated on points TTo do this calculation, we average  
    41 ; field U and Von points T before calculate the norme. At the edge of  
    42 ; coast and of domain, we can not calculate fields U and V at points T,  
    43 ; that is why these points are at value !values.f_nan.  
    44 ;  
    45 ; When we calculate on a reduce geographic domain, field U and V have not  
    46 ; necessarily the same number of point. In this case, we recut U and V to  
    47 ; keep only common points. We profit of this to redo a domdef which redefine  
     39; @restrictions 
     40; The norm is calculated on points TTo do this calculation, we average 
     41; field U and Von points T before calculate the norme. At the edge of 
     42; coast and of domain, we can not calculate fields U and V at points T, 
     43; that is why these points are at value !values.f_nan. 
     44; 
     45; When we calculate on a reduce geographic domain, field U and V have not 
     46; necessarily the same number of point. In this case, we recut U and V to 
     47; keep only common points. We profit of this to redo a domdef which redefine 
    4848; a geographic domain on which fields U and V are extracted on same points 
    4949; 
    5050; @restrictions 
    51 ; To know what type of array we work with, we  test its size and dates  
    52 ; gave by time[0] and time[jpt-1] to know if thee is a temporal dimension.  
    53 ; Before to start norme, make sure that time and jpt are defined how  
    54 ; they have to!  
     51; To know what type of array we work with, we  test its size and dates 
     52; gave by time[0] and time[jpt-1] to know if thee is a temporal dimension. 
     53; Before to start norme, make sure that time and jpt are defined how 
     54; they have to! 
    5555; 
    5656; @examples 
    57 ; To calculate the average of the norme of streams on all the domain  
     57; To calculate the average of the norme of streams on all the domain 
    5858; between 0 et 50: 
    5959;      IDL> res=norme(un,vn,boxzoom=[0,50],dir='xyz') 
     
    9090; 
    9191;------------------------------------------------------------ 
    92   if keyword_set(boxzoom) then BEGIN  
     92  if keyword_set(boxzoom) then BEGIN 
    9393    Case 1 Of 
    9494      N_Elements(Boxzoom) Eq 1:bte = [lon1, lon2, lat1, lat2, 0., boxzoom[0]] 
     
    100100    ENDCASE 
    101101    domdef, boxzoom 
    102   ENDIF  
     102  ENDIF 
    103103;------------------------------------------------------------ 
    104104   if NOT keyword_set(direc) then direc = 0 
     
    120120   if grillev EQ '' then grillev = 'V' 
    121121   IF grilleu EQ 'V' AND grillev EQ 'U' THEN inverse = 1 
    122    IF grilleu EQ 'T' AND grillev EQ 'T' THEN BEGIN  
    123       interpolle  = 0  
     122   IF grilleu EQ 'T' AND grillev EQ 'T' THEN BEGIN 
     123      interpolle  = 0 
    124124      return, report('cas non code mais facile a faire!') 
    125125   ENDIF ELSE interpolle = 1 
     
    140140   indiceyv = (lindgen(jpj))[firstyv:firstyv+nyv-1] 
    141141   indicey = inter(indiceyu, indiceyv) 
    142    nx = n_elements(indicex)  
     142   nx = n_elements(indicex) 
    143143   ny = n_elements(indicey) 
    144144;---------------------------------------------------------------------------- 
     
    149149;---------------------------------------------------------------------------- 
    150150;---------------------------------------------------------------------------- 
    151       (size(u))[0] EQ 3 AND date1 EQ date2 :BEGIN  
     151      (size(u))[0] EQ 3 AND date1 EQ date2 :BEGIN 
    152152;---------------------------------------------------------------------------- 
    153153         indice2d = lindgen(jpi, jpj) 
     
    160160         case 1 of 
    161161            (size(u))[1] EQ nxu AND (size(u))[2] EQ nyu AND $ 
    162              (size(v))[1] EQ nxv AND (size(v))[2] EQ nyv:BEGIN  
     162             (size(v))[1] EQ nxv AND (size(v))[2] EQ nyv:BEGIN 
    163163               case (size(u))[3] OF 
    164                   nzt:BEGIN  
     164                  nzt:BEGIN 
    165165                     if nxu NE nx then $ 
    166                       if indicex[0] EQ firstxu then u = u[0:nx-1,*,*] ELSE u = u[1: nx, *,*]  
     166                      if indicex[0] EQ firstxu then u = u[0:nx-1,*,*] ELSE u = u[1: nx, *,*] 
    167167                     IF nxv NE nx THEN $ 
    168168                      if indicex[0] EQ firstxv then v = v[0:nx-1,*,*] ELSE v = v[1: nx, *,*] 
    169169                     IF nyu NE ny THEN $ 
    170                       if indicey[0] EQ firstyu then u = u[*,0:ny-1,*] ELSE u = u[*, 1: ny,*]  
     170                      if indicey[0] EQ firstyu then u = u[*,0:ny-1,*] ELSE u = u[*, 1: ny,*] 
    171171                     IF nyv NE ny THEN $ 
    172172                      if indicey[0] EQ firstyv then v = v[*,0:ny-1,*] ELSE v = v[*, 1: ny,*] 
    173173                  end 
    174                   jpk:BEGIN  
     174                  jpk:BEGIN 
    175175                     if nxu NE nx then $ 
    176                       if indicex[0] EQ firstxu then u = u[0:nx-1, *,firstzt:lastzt] ELSE u = u[1: nx, *,firstzt:lastzt]  
     176                      if indicex[0] EQ firstxu then u = u[0:nx-1, *,firstzt:lastzt] ELSE u = u[1: nx, *,firstzt:lastzt] 
    177177                     IF nxv NE nx THEN $ 
    178178                      if indicex[0] EQ firstxv then v = v[0:nx-1, *,firstzt:lastzt] ELSE v = v[1: nx, *,firstzt:lastzt] 
    179179                     IF nyu NE ny THEN $ 
    180                       if indicey[0] EQ firstyu then u = u[*, 0:ny-1,firstzt:lastzt] ELSE u = u[*, 1: ny,firstzt:lastzt]  
     180                      if indicey[0] EQ firstyu then u = u[*, 0:ny-1,firstzt:lastzt] ELSE u = u[*, 1: ny,firstzt:lastzt] 
    181181                     IF nyv NE ny THEN $ 
    182182                      if indicey[0] EQ firstyv then v = v[*, 0:ny-1,firstzt:lastzt] ELSE v = v[*, 1: ny,firstzt:lastzt] 
     
    186186            END 
    187187            (size(u))[1] EQ jpi AND (size(u))[2] EQ jpj AND (size(u))[3] EQ jpk AND $ 
    188              (size(v))[1] EQ jpi AND (size(v))[2] EQ jpj AND (size(u))[3] EQ jpk :BEGIN  
     188             (size(v))[1] EQ jpi AND (size(v))[2] EQ jpj AND (size(u))[3] EQ jpk :BEGIN 
    189189               u = u[indice3d] 
    190190               v = v[indice3d] 
     
    209209         if NOT keyword_set(key_periodic) OR nx NE jpi then v[*,0,*]=a 
    210210;---------------------------------------------------------------------------- 
    211 ; attribution of the mask and of logitude and latitude arrays 
     211; attribution of the mask and of longitude and latitude arrays 
    212212;---------------------------------------------------------------------------- 
    213213         mask = tmask[indice3d] 
     
    234234;---------------------------------------------------------------------------- 
    235235;---------------------------------------------------------------------------- 
    236       date1 NE date2 AND (size(u))[0] EQ 3 :BEGIN  
     236      date1 NE date2 AND (size(u))[0] EQ 3 :BEGIN 
    237237         indice2d = lindgen(jpi, jpj) 
    238238         indice2d = indice2d[indicex[0]:indicex[0]+nx-1,indicey[0]:indicey[0]+ny-1] 
     
    242242         case 1 of 
    243243            (size(u))[1] EQ nxu AND (size(u))[2] EQ nyu AND $ 
    244              (size(v))[1] EQ nxv AND (size(v))[2] EQ nyv:BEGIN  
     244             (size(v))[1] EQ nxv AND (size(v))[2] EQ nyv:BEGIN 
    245245               if nxu NE nx then $ 
    246                 if indicex[0] EQ firstxu then u = u[0:nx-1, *, *] ELSE u = u[1: nx, *, *]  
     246                if indicex[0] EQ firstxu then u = u[0:nx-1, *, *] ELSE u = u[1: nx, *, *] 
    247247               IF nxv NE nx THEN $ 
    248248                if indicex[0] EQ firstxv then v = v[0:nx-1, *, *] ELSE v = v[1: nx, *, *] 
    249249               IF nyu NE ny THEN $ 
    250                 if indicey[0] EQ firstyu then u = u[*, 0:ny-1, *] ELSE u = u[*, 1: ny, *]  
     250                if indicey[0] EQ firstyu then u = u[*, 0:ny-1, *] ELSE u = u[*, 1: ny, *] 
    251251               IF nyv NE ny THEN $ 
    252252                if indicey[0] EQ firstyv then v = v[*, 0:ny-1, *] ELSE v = v[*, 1: ny, *] 
    253253            END 
    254254            (size(u))[1] EQ jpi AND (size(u))[2] EQ jpj AND $ 
    255              (size(v))[1] EQ jpi AND (size(v))[2] EQ jpj:BEGIN  
     255             (size(v))[1] EQ jpi AND (size(v))[2] EQ jpj:BEGIN 
    256256               u = u[indicex[0]:indicex[0]+nx-1,indicey[0]:indicey[0]+ny-1, *] 
    257257               v = v[indicex[0]:indicex[0]+nx-1,indicey[0]:indicey[0]+ny-1, *] 
     
    270270;---------------------------------------------------------------------------- 
    271271; attribution of the mask and of longitude and latitude arrays. 
    272 ; We recover the complete grid to establish a big mask extent in the four  
    273 ; direction to cover pointsfor which a land point has been  
     272; We recover the complete grid to establish a big mask extent in the four 
     273; direction to cover pointsfor which a land point has been 
    274274; considerated (make a small drawing) 
    275275;---------------------------------------------------------------------------- 
     
    288288         res[*,0, *]=!values.f_nan 
    289289         mask = where(mask eq 0) 
    290          IF mask[0] NE -1 THEN BEGIN  
     290         IF mask[0] NE -1 THEN BEGIN 
    291291            coeftps = lindgen(jpt)*nx*ny 
    292292            coeftps = replicate(1, n_elements(mask))#coeftps 
     
    304304;---------------------------------------------------------------------------- 
    305305;---------------------------------------------------------------------------- 
    306       date1 NE date2 AND (size(u))[0] EQ 4:BEGIN  
     306      date1 NE date2 AND (size(u))[0] EQ 4:BEGIN 
    307307         indice2d = lindgen(jpi, jpj) 
    308308         indice2d = indice2d[indicex[0]:indicex[0]+nx-1,indicey[0]:indicey[0]+ny-1] 
     
    314314         case 1 of 
    315315            (size(u))[1] EQ nxu AND (size(u))[2] EQ nyu AND $ 
    316              (size(v))[1] EQ nxv AND (size(v))[2] EQ nyv:BEGIN  
     316             (size(v))[1] EQ nxv AND (size(v))[2] EQ nyv:BEGIN 
    317317               case (size(u))[3] OF 
    318                   nzt:BEGIN  
     318                  nzt:BEGIN 
    319319                     if nxu NE nx then $ 
    320                       if indicex[0] EQ firstxu then u = u[0:nx-1,*,*,*] ELSE u = u[1: nx, *,*,*]  
     320                      if indicex[0] EQ firstxu then u = u[0:nx-1,*,*,*] ELSE u = u[1: nx, *,*,*] 
    321321                     IF nxv NE nx THEN $ 
    322322                      if indicex[0] EQ firstxv then v = v[0:nx-1,*,*,*] ELSE v = v[1: nx, *,*,*] 
    323323                     IF nyu NE ny THEN $ 
    324                       if indicey[0] EQ firstyu then u = u[*,0:ny-1,*,*] ELSE u = u[*, 1: ny,*,*]  
     324                      if indicey[0] EQ firstyu then u = u[*,0:ny-1,*,*] ELSE u = u[*, 1: ny,*,*] 
    325325                     IF nyv NE ny THEN $ 
    326326                      if indicey[0] EQ firstyv then v = v[*,0:ny-1,*,*] ELSE v = v[*, 1: ny,*,*] 
    327327                  end 
    328                   jpk:BEGIN  
     328                  jpk:BEGIN 
    329329                     if nxu NE nx then $ 
    330                       if indicex[0] EQ firstxu then u = u[0:nx-1, *,firstzt:lastzt,*] ELSE u = u[1: nx, *,firstzt:lastzt,*]  
     330                      if indicex[0] EQ firstxu then u = u[0:nx-1, *,firstzt:lastzt,*] ELSE u = u[1: nx, *,firstzt:lastzt,*] 
    331331                     IF nxv NE nx THEN $ 
    332332                      if indicex[0] EQ firstxv then v = v[0:nx-1, *,firstzt:lastzt,*] ELSE v = v[1: nx, *,firstzt:lastzt,*] 
    333333                     IF nyu NE ny THEN $ 
    334                       if indicey[0] EQ firstyu then u = u[*, 0:ny-1,firstzt:lastzt,*] ELSE u = u[*, 1: ny,firstzt:lastzt,*]  
     334                      if indicey[0] EQ firstyu then u = u[*, 0:ny-1,firstzt:lastzt,*] ELSE u = u[*, 1: ny,firstzt:lastzt,*] 
    335335                     IF nyv NE ny THEN $ 
    336336                      if indicey[0] EQ firstyv then v = v[*, 0:ny-1,firstzt:lastzt,*] ELSE v = v[*, 1: ny,firstzt:lastzt,*] 
     
    340340            END 
    341341            (size(u))[1] EQ jpi AND (size(u))[2] EQ jpj AND (size(u))[3] EQ jpk AND $ 
    342              (size(v))[1] EQ jpi AND (size(v))[2] EQ jpj AND (size(u))[3] EQ jpk :BEGIN  
     342             (size(v))[1] EQ jpi AND (size(v))[2] EQ jpj AND (size(u))[3] EQ jpk :BEGIN 
    343343               u = u[indicex[0]:indicex[0]+nx-1,indicey[0]:indicey[0]+ny-1,firstzt:lastzt, *] 
    344344               v = v[indicex[0]:indicex[0]+nx-1,indicey[0]:indicey[0]+ny-1,firstzt:lastzt, *] 
     
    356356         if NOT keyword_set(key_periodic) OR nx NE jpi then v[*,0,*,*]=a 
    357357;---------------------------------------------------------------------------- 
    358 ; attribution of the mask and of logitude and latitude arrays 
     358; attribution of the mask and of longitude and latitude arrays 
    359359;---------------------------------------------------------------------------- 
    360360         mask = tmask[indice3d] 
     
    370370         res[*,0, *, *]=!values.f_nan 
    371371         mask = where(mask eq 0) 
    372          IF mask[0] NE -1 THEN BEGIN  
     372         IF mask[0] NE -1 THEN BEGIN 
    373373            coeftps = lindgen(jpt)*nx*ny*nzt 
    374374            coeftps = replicate(1, n_elements(mask))#coeftps 
     
    394394         case 1 of 
    395395            (size(u))[1] EQ nxu AND (size(u))[2] EQ nyu AND $ 
    396              (size(v))[1] EQ nxv AND (size(v))[2] EQ nyv:BEGIN  
     396             (size(v))[1] EQ nxv AND (size(v))[2] EQ nyv:BEGIN 
    397397               if nxu NE nx then $ 
    398                 if indicex[0] EQ firstxu then u = u[0:nx-1, *] ELSE u = u[1: nx, *]  
     398                if indicex[0] EQ firstxu then u = u[0:nx-1, *] ELSE u = u[1: nx, *] 
    399399               IF nxv NE nx THEN $ 
    400400                if indicex[0] EQ firstxv then v = v[0:nx-1, *] ELSE v = v[1: nx, *] 
    401401               IF nyu NE ny THEN $ 
    402                 if indicey[0] EQ firstyu then u = u[*, 0:ny-1] ELSE u = u[*, 1: ny]  
     402                if indicey[0] EQ firstyu then u = u[*, 0:ny-1] ELSE u = u[*, 1: ny] 
    403403               IF nyv NE ny THEN $ 
    404404                if indicey[0] EQ firstyv then v = v[*, 0:ny-1] ELSE v = v[*, 1: ny] 
    405405            END 
    406406            (size(u))[1] EQ jpi AND (size(u))[2] EQ jpj AND $ 
    407              (size(v))[1] EQ jpi AND (size(v))[2] EQ jpj:BEGIN  
     407             (size(v))[1] EQ jpi AND (size(v))[2] EQ jpj:BEGIN 
    408408               u = u[indice2d] 
    409409               v = v[indice2d] 
     
    429429;---------------------------------------------------------------------------- 
    430430; attribution of the mask and of longitude and latitude arrays. 
    431 ; We recover the complete grid to establish a big mask extent in the four  
    432 ; direction to cover pointsfor which a land point has been  
     431; We recover the complete grid to establish a big mask extent in the four 
     432; direction to cover pointsfor which a land point has been 
    433433; considerated (make a small drawing) 
    434434;---------------------------------------------------------------------------- 
     
    455455   endcase 
    456456;------------------------------------------------------------ 
    457    if keyword_set(key_performance) THEN print, 'temps norme', systime(1)-tempsun  
     457   if keyword_set(key_performance) THEN print, 'temps norme', systime(1)-tempsun 
    458458   return, res 
    459459end 
  • trunk/SRC/ToBeReviewed/CALCULS/projectondepth.pro

    r224 r226  
    1212; @param ARRAYIN {type=3d array} 
    1313; It is a 3d array whose 3rd dimension must be equal to jpk 
    14 ;  
     14; 
    1515; @param DEPTHIN {type=2d array} 
    1616; It is a 2d array indicating for each point n, at which depth to project 
    17 ;        
     17; 
    1818; @returns 
    1919; A 2d array which is the projection of the 3d array following depths indicated by depthin 
     
    2222; common.pro 
    2323; 
    24 ; @restrictions  
     24; @restrictions 
    2525; points at !values.f_nan impossible calculation. Land points masked at valmask. 
    2626; 
     
    2929;   IDL> a=gdept[jpk-1]/(1.*jpi*jpj)*findgen(jpi,jpj) 
    3030; We build an array to project on these depths. For the test, 
    31 ; we build a 3d array whose each vector following z is the depth.  
     31; we build a 3d array whose each vector following z is the depth. 
    3232;   IDL> arraytest=replicate(1,jpi*jpj)#gdept 
    3333;   IDL> arraytest=reform(arraytest,jpi,jpj,jpk, /over) 
     
    3535;   IDL> plt, 1e6*(a-projectondepth(arraytest,a)),/nocontour 
    3636;   ->null field at 1e-6 pres 
    37 ;  
    38 ;  verifcation projecting the temperature of 20°C for example... 
     37; 
     38;  verification projecting the temperature of 20°C for example... 
    3939; 
    4040; @history 
     
    6363   if tailledepth[0] NE 2 THEN return, report('Depth array must have 2 dimensions') 
    6464   if taillearray[0] NE 3 THEN return, report('Array in must have 3 dimensions') 
    65 ; verification of the coherence between array's size and the domain  
     65; verification of the coherence between array's size and the domain 
    6666   grille, mask, -1, -1, -1,nx,ny,nz,firstx,firsty,firstz,lastx,lasty,lastz 
    6767   case 1 of 
     
    103103   if terre[0] NE -1 then res[terre] = valmask 
    104104;------------------------------------------------------------ 
    105    if keyword_set(key_performance) THEN print, 'temps projectondepth', systime(1)-tempsun  
     105   if keyword_set(key_performance) THEN print, 'temps projectondepth', systime(1)-tempsun 
    106106   return, res 
    107107end 
  • trunk/SRC/ToBeReviewed/CALCULS/remplit.pro

    r209 r226  
    2222; 
    2323; @keyword FILLXDIR 
    24 ;  
     24; 
    2525; 
    2626; @keyword FILLYDIR 
     
    5151; $Id$ 
    5252; 
    53   ;; 
    54   ;; Extrapole zinout[jpi,jpj] sur les continents en utilisant les 4 
    55   ;; plus proches voisins masques oceaniquement et construit un nouveau 
    56 ;   masque 
    57   ;; contenant l'ancien masque oceanique PLUSles points extrapoles. 
    58   ;; Reitere le processus niter fois. 
    59   ;; C'est pas clair, essayez ! 
    60   ;; 
    61   ;; 
     53;; 
     54;; Extrapole zinout[jpi,jpj] sur les continents en utilisant les 4 
     55;; plus proches voisins masques oceaniquement et construit un nouveau masque 
     56;; contenant l'ancien masque oceanique PLUS les points extrapoles. 
     57;; Reitere le processus niter fois. 
     58;; C'est pas clair, essayez ! 
     59;; 
     60;; 
    6261; 
    6362;    /Nan: to fill the point which have the value 
    64 ;    !values.f_nan. Whitout this keyword, these point are not filling 
     63;    !values.f_nan. Without this keyword, these point are not filling 
    6564;    and stays at !values.f_nan. 
    6665; 
     
    139138;--------------------------------------------------------------- 
    140139;--------------------------------------------------------------- 
    141 ; iteration  
    142 ;--------------------------------------------------------------- 
    143 ;--------------------------------------------------------------- 
    144   FOR n = 1, niter DO BEGIN  
     140; iteration 
     141;--------------------------------------------------------------- 
     142;--------------------------------------------------------------- 
     143  FOR n = 1, niter DO BEGIN 
    145144; on trouve les points coast 
    146145    tempdeux = systime(1)       ; pour key_performance =2 
     
    244243      END 
    245244    endcase 
    246 ;     
     245; 
    247246    z[coast] =  temporary(zcoast)/ temporary(weight) 
    248247; we update the the boundary conditions of z 
     
    258257    IF testvar(var = key_performance) EQ 2 THEN $ 
    259258      print, 'temps remplit: une iteration ', systime(1)-tempdeux 
    260   ENDFOR  
     259  ENDFOR 
    261260fini: 
    262261; 
     
    280279  key_gridtype = oldkey_gridtype 
    281280;--------------------------------------------------------------- 
    282   if keyword_set(key_performance) THEN print, 'temps remplit', systime(1)-tempsun  
     281  if keyword_set(key_performance) THEN print, 'temps remplit', systime(1)-tempsun 
    283282  return, z 
    284 END  
     283END 
    285284 
  • trunk/SRC/ToBeReviewed/GRILLE/decoupeterre.pro

    r163 r226  
    4848; Used to pass your keywords 
    4949; 
    50 ; @keyword TRI  
     50; @keyword TRI 
    5151; This keyword serve to obtain, thanks to grille, the triangulation which 
    5252; refer to the grid but only on the part of the zoom. This of triangulation 
     
    5656; 
    5757; @keyword WDEPTH 
    58 ; To specify that the field is at W depth instead of T  
     58; To specify that the field is at W depth instead of T 
    5959; depth (automatically activated if vargrid eq 'W') 
    6060; 
     
    184184        if vargrid EQ 'V' OR vargrid EQ 'F' then $ 
    185185          glam = glamv[firstx:lastx, firsty:lasty] 
    186       ENDIF ELSE BEGIN          ; to drawsectionbottom  
     186      ENDIF ELSE BEGIN          ; to drawsectionbottom 
    187187        if vargrid EQ 'V' OR vargrid EQ 'F' OR finite(glamu[0]) EQ 0 then $ 
    188188          glam = glamf[0 > (firstx-1):lastx, firsty:lasty] $ 
     
    194194        if vargrid EQ 'U' OR vargrid EQ 'F' then $ 
    195195          gphi = gphiu[firstx:lastx, firsty:lasty] 
    196       ENDIF ELSE BEGIN          ; to drawsectionbottom   
     196      ENDIF ELSE BEGIN          ; to drawsectionbottom 
    197197        if vargrid EQ 'U' OR vargrid EQ 'F' OR finite(gphiv[0]) EQ 0 then $ 
    198198          gphi = gphif[firstx:lastx, 0 > (firsty-1):lasty] $ 
     
    211211    firstz = firstzt 
    212212    lastz = lastzt 
    213   ENDELSE  
     213  ENDELSE 
    214214  nz = lastz-firstz+1 
    215215;------------------------------------------------------------ 
     
    221221      profond = firstz NE 0 
    222222    END 
    223 ; for the verical section, we have to choose the right mask according 
     223; for the vertical section, we have to choose the right mask according 
    224224; to the grid point and to the direction of the section 
    225225    'xz':BEGIN 
     
    267267      END 
    268268      keyword_set(key_partialstep) and type EQ 'yz' $ 
    269         AND nx EQ 1 AND keyword_set(realsection):BEGIN  
     269        AND nx EQ 1 AND keyword_set(realsection):BEGIN 
    270270        bottom = total(mask, 3) 
    271271        good = where(bottom NE 0 AND bottom NE nz+1) 
     
    290290      tri = triangule(mask, coinmonte = coinmonte, coindescend = coindescend, _extra = ex) 
    291291      indicezoom = (lindgen(jpi, jpj))[firstx:lastx, firsty:lasty] 
    292   ENDIF ELSE BEGIN  
     292  ENDIF ELSE BEGIN 
    293293; Otherwise, we recuperate the part of triangulation that interest us and we number them well!! 
    294       if nx EQ jpi AND ny EQ jpj then tri = triangles_list ELSE BEGIN  
     294      if nx EQ jpi AND ny EQ jpj then tri = triangles_list ELSE BEGIN 
    295295        msk = bytarr(jpi, jpj) 
    296296        msk[firstx:lastx, firsty:lasty] = 1 
     
    306306  ENDELSE 
    307307;------------------------------------------------------------------- 
    308   if keyword_set(key_performance) THEN print, 'temps decoupeterre', systime(1)-tempsun  
     308  if keyword_set(key_performance) THEN print, 'temps decoupeterre', systime(1)-tempsun 
    309309;------------------------------------------------------------ 
    310310  return 
  • trunk/SRC/ToBeReviewed/GRILLE/domdef.pro

    r163 r226  
    44;+ 
    55; 
    6 ; @file_comments  
    7 ; Allows to extract a sub-domain of study by providing parameters  
     6; @file_comments 
     7; Allows to extract a sub-domain of study by providing parameters 
    88; needed for drawings (see outputs) 
    99; 
     
    1212; @param Z1 {in}{optional} 
    1313; For a 3d domain whose the horizontal part cover all glam 
    14 ;  
     14; 
    1515; @param Z2 {in}{optional} 
    1616; For a 3d domain whose the horizontal part cover all gphi 
     
    3838; 
    3939; @keyword FINDALWAYS 
    40 ; Force to redefine a box even when none point is find in the box.  
     40; Force to redefine a box even when none point is find in the box. 
    4141; In this case, we select all the grid. 
    4242; 
    4343; @keyword GRIDTYPE {type=string or vector} 
    44 ; It is a string or a vector of strings containing the grids's name  
    45 ; (Only determined by 'T','U','V','W','F') for which the calculation  
    46 ; must be done.  
     44; It is a string or a vector of strings containing the grids's name 
     45; (Only determined by 'T','U','V','W','F') for which the calculation 
     46; must be done. 
    4747;  For example: 'T' or ['T','U'] 
    4848; 
     
    5555; grids. 
    5656; 
    57 ; @keyword INDEX  
    58 ; We activate it if we want that all elements passed in input of domdef  
    59 ; refer to indexes of glam, gphi and gdep arrays rather than to values  
     57; @keyword INDEX 
     58; We activate it if we want that all elements passed in input of domdef 
     59; refer to indexes of glam, gphi and gdep arrays rather than to values 
    6060; of these arrays. 
    6161; 
    62 ; @keyword XINDEX  
    63 ; We activate it if we want that all elements passed in input of domdef  
    64 ; and concerning the X dimension refer to indexes of glam arrays rather  
     62; @keyword XINDEX 
     63; We activate it if we want that all elements passed in input of domdef 
     64; and concerning the X dimension refer to indexes of glam arrays rather 
    6565; than to values of these arrays. 
    6666; 
    67 ; @keyword YINDEX  
    68 ; We activate it if we want that all elements passed in input of domdef  
    69 ; and concerning the X dimension refer to indexes of gphi arrays rather  
     67; @keyword YINDEX 
     68; We activate it if we want that all elements passed in input of domdef 
     69; and concerning the X dimension refer to indexes of gphi arrays rather 
    7070; than to values of these arrays. 
    71 ;  
    72 ; @keyword ZINDEX  
    73 ; We activate it if we want that all elements passed in input of domdef  
    74 ; and concerning the X dimension refer to indexes of gdep arrays rather  
     71; 
     72; @keyword ZINDEX 
     73; We activate it if we want that all elements passed in input of domdef 
     74; and concerning the X dimension refer to indexes of gdep arrays rather 
    7575; than to values of these arrays. 
    7676; 
    7777; @uses 
    7878; common.pro 
    79 ; 
    8079; 
    8180; @history 
     
    123122; 
    124123  IF keyword_set(endpoints) THEN BEGIN 
    125     IF NOT keyword_set(type) THEN BEGIN  
     124    IF NOT keyword_set(type) THEN BEGIN 
    126125      dummy = report(['If domdef is used do find the box associated' $ 
    127126                      , 'to endpoints, you must also specify type keyword']) 
    128127      return 
    129     ENDIF  
     128    ENDIF 
    130129    CASE N_PARAMS() OF 
    131130      0: 
     
    137136    section, BOXZOOM = boxzoom, ENDPOINTS = endpoints, TYPE = type, /ONLYBOX 
    138137    return 
    139   ENDIF    
     138  ENDIF 
    140139 
    141140;------------------------------------------------------------------- 
     
    153152      END 
    154153    ENDCASE 
    155     RETURN   
     154    RETURN 
    156155  ENDIF 
    157156;------------------------------------------------------------------- 
     
    170169  vert1t = 99999. & vert2t = -99999. & vert1w = 99999. & vert2w = -99999. 
    171170; 
    172   IF jpj EQ 1 THEN BEGIN  
     171  IF jpj EQ 1 THEN BEGIN 
    173172    IF (where(gridtype eq 'T'))[0] NE -1 OR (where(gridtype EQ 'W'))[0] NE -1 THEN BEGIN 
    174173      glamt = reform(glamt, jpi, jpj, /over) 
    175174      gphit = reform(gphit, jpi, jpj, /over) 
    176     ENDIF  
     175    ENDIF 
    177176    IF (where(gridtype eq 'U'))[0] NE -1 THEN BEGIN 
    178177      glamu = reform(glamu, jpi, jpj, /over) 
    179178      gphiu = reform(gphiu, jpi, jpj, /over) 
    180     ENDIF   
     179    ENDIF 
    181180    IF (where(gridtype eq 'V'))[0] NE -1 THEN BEGIN 
    182181      glamv = reform(glamv, jpi, jpj, /over) 
    183182      gphiv = reform(gphiv, jpi, jpj, /over) 
    184     ENDIF   
     183    ENDIF 
    185184    IF (where(gridtype eq 'F'))[0] NE -1 THEN BEGIN 
    186185      glamf = reform(glamf, jpi, jpj, /over) 
    187186      gphif = reform(gphif, jpi, jpj, /over) 
    188     ENDIF   
     187    ENDIF 
    189188  ENDIF 
    190189; 
     
    229228         AND NOT keyword_set(xindex) AND NOT keyword_set(yindex) AND NOT keyword_set(index) ) THEN BEGIN 
    230229    IF N_PARAMS() EQ 0 THEN BEGIN 
    231 ; find lon1 and lon2 the longitudinal boudaries of the full domain 
     230; find lon1 and lon2 the longitudinal boundaries of the full domain 
    232231      IF (where(gridtype eq 'T'))[0] NE -1 THEN lon1t = min(glamt, max = lon2t) 
    233232      IF (where(gridtype eq 'W'))[0] NE -1 AND (where(gridtype eq 'T'))[0] EQ -1 THEN lon1t = min(glamt, max = lon2t) 
     
    237236      lon1 = min([lon1t, lon1u, lon1v, lon1f]) 
    238237      lon2 = max([lon2t, lon2u, lon2v, lon2f]) 
    239 ; find lat1 and lat2 the latitudinal boudaries of the full domain 
     238; find lat1 and lat2 the latitudinal boundaries of the full domain 
    240239      IF (where(gridtype eq 'T'))[0] NE -1 THEN lat1t = min(gphit, max = lat2t) 
    241240      IF (where(gridtype eq 'W'))[0] NE -1 AND (where(gridtype eq 'T'))[0] EQ -1 THEN lat1t = min(gphit, max = lat2t) 
     
    245244      lat1 = min([lat1t, lat1u, lat1v, lat1f]) 
    246245      lat2 = max([lat2t, lat2u, lat2v, lat2f]) 
    247     ENDIF ELSE BEGIN  
     246    ENDIF ELSE BEGIN 
    248247      lon1 = min([x1, x2], max = lon2) 
    249248      lat1 = min([y1, y2], max = lat2) 
     
    288287        IF (dom[0] EQ -1) THEN BEGIN 
    289288          IF keyword_set(findalways) THEN BEGIN 
    290 ; if t grid parameters alreday defined, we use them...  
     289; if t grid parameters alreday defined, we use them... 
    291290            CASE 1 OF 
    292291              (where(gridtype eq 'T'))[0] NE -1 OR (where(gridtype EQ 'W'))[0] NE -1:BEGIN 
     
    337336                firstxv = firstxt & lastxv = lastxt & nxv = nxt 
    338337                firstyv = firstyt & lastyv = lastyt & nyv = nyt 
    339               END  
     338              END 
    340339              (where(gridtype eq 'U'))[0] NE -1:BEGIN 
    341340                print, 'WARNING, empty V points box... we use the same index as U points...' 
    342341                firstxv = firstxu & lastxv = lastxu & nxv = nxu 
    343342                firstyv = firstyu & lastyv = lastyu & nyv = nyu 
    344               END  
     343              END 
    345344              ELSE:BEGIN 
    346345                print, 'WARNING, empty V points box... we get the neighnors to define a new box...' 
     
    385384                firstxf = firstxt & lastxf = lastxt & nxf = nxt 
    386385                firstyf = firstyt & lastyf = lastyt & nyf = nyt 
    387               END  
     386              END 
    388387              (where(gridtype eq 'U'))[0] NE -1:BEGIN 
    389388                print, 'WARNING, empty F points box... we use the same index as U points...' 
    390389                firstxf = firstxu & lastxf = lastxu & nxf = nxu 
    391390                firstyf = firstyu & lastyf = lastyu & nyf = nyu 
    392               END  
     391              END 
    393392              (where(gridtype eq 'V'))[0] NE -1:BEGIN 
    394393                print, 'WARNING, empty F points box... we use the same index as V points...' 
    395394                firstxf = firstxv & lastxf = lastxv & nxf = nxv 
    396395                firstyf = firstyv & lastyf = lastyv & nyf = nyv 
    397               END  
     396              END 
    398397              ELSE:BEGIN 
    399398                print, 'WARNING, empty F points box... we get the neighnors to define a new box...' 
     
    406405                RETURN 
    407406              END 
    408             ENDCASE   
     407            ENDCASE 
    409408          ENDIF ELSE BEGIN 
    410409            ras = report('WARNING, The box does not contain any F points...') 
     
    469468          firstyv = fsty & lastyv = lsty 
    470469          nxv = nx & nyv = ny 
    471         ENDIF          
     470        ENDIF 
    472471; find lon1f, lon2f, lat1f, lat2f, firstxf, firstxf, nxf and nyf 
    473472; according to x1, x2, y1, y2 
     
    537536                    print, 'WARNING, empty U points box... we use the same index as T points...' 
    538537                    firstyu = firstyt & lastyu = lastyt & nyu = nyt 
    539                   END  
     538                  END 
    540539                  ELSE:BEGIN 
    541540                    print, 'WARNING, empty U points box... we get the neighnors to define a new box...' 
     
    548547                    RETURN 
    549548                  END 
    550                 ENDCASE  
     549                ENDCASE 
    551550              ENDIF ELSE BEGIN 
    552551                ras = report('WARNING, The box does not contain any U points...') 
     
    575574                    print, 'WARNING, empty V points box... we use the same index as T points...' 
    576575                    firstyv = firstyt & lastyv = lastyt & nyv = nyt 
    577                   END  
     576                  END 
    578577                  (where(gridtype eq 'U'))[0] NE -1:BEGIN 
    579578                    print, 'WARNING, empty V points box... we use the same index as U points...' 
    580579                    firstyv = firstyu & lastyv = lastyu & nyv = nyu 
    581                   END  
     580                  END 
    582581                  ELSE:BEGIN 
    583582                    print, 'WARNING, empty V points box... we get the neighnors to define a new box...' 
     
    589588                    ENDCASE 
    590589                    RETURN 
    591                   END  
    592                 ENDCASE  
     590                  END 
     591                ENDCASE 
    593592              ENDIF ELSE BEGIN 
    594593                ras = report('WARNING, The box does not contain any V points...') 
     
    617616                    print, 'WARNING, empty F points box... we use the same index as T points...' 
    618617                    firstyf = firstyt & lastyf = lastyt & nyf = nyt 
    619                   END  
     618                  END 
    620619                  (where(gridtype eq 'U'))[0] NE -1:BEGIN 
    621620                    print, 'WARNING, empty F points box... we use the same index as U points...' 
    622621                    firstyf = firstyu & lastyf = lastyu & nyf = nyu 
    623                   END  
     622                  END 
    624623                  (where(gridtype eq 'V'))[0] NE -1:BEGIN 
    625624                    print, 'WARNING, empty F points box... we use the same index as V points...' 
    626625                    firstyf = firstyv & lastyf = lastyv & nyf = nyv 
    627                   END  
     626                  END 
    628627                  ELSE:BEGIN 
    629628                    print, 'WARNING, empty F points box... we get the neighnors to define a new box...' 
     
    636635                    RETURN 
    637636                  END 
    638                 ENDCASE  
     637                ENDCASE 
    639638              ENDIF ELSE BEGIN 
    640639                ras = report('WARNING, The box does not contain any F points...') 
     
    705704                    print, 'WARNING, empty U points box... we use the same index as T points...' 
    706705                    firstxu = firstxt & lastxu = lastxt & nxu = nxt 
    707                   END  
     706                  END 
    708707                  ELSE:BEGIN 
    709708                    print, 'WARNING, empty U points box... we get the neighnors to define a new box...' 
     
    716715                    RETURN 
    717716                  END 
    718                 ENDCASE  
     717                ENDCASE 
    719718              ENDIF ELSE BEGIN 
    720719                ras = report('WARNING, The box does not contain any U points...') 
     
    743742                    print, 'WARNING, empty V points box... we use the same index as T points...' 
    744743                    firstxv = firstxt & lastxv = lastxt & nxv = nxt 
    745                   END  
     744                  END 
    746745                  (where(gridtype eq 'U'))[0] NE -1:BEGIN 
    747746                    print, 'WARNING, empty V points box... we use the same index as U points...' 
    748747                    firstxv = firstxu & lastxv = lastxu & nxv = nxu 
    749                   END  
     748                  END 
    750749                  ELSE:BEGIN 
    751750                    print, 'WARNING, empty V points box... we get the neighnors to define a new box...' 
     
    757756                    ENDCASE 
    758757                    RETURN 
    759                   END  
    760                 ENDCASE  
     758                  END 
     759                ENDCASE 
    761760              ENDIF ELSE BEGIN 
    762761                ras = report('WARNING, The box does not contain any V points...') 
     
    785784                    print, 'WARNING, empty F points box... we use the same index as T points...' 
    786785                    firstxf = firstxt & lastxf = lastxt & nxf = nxt 
    787                   END  
     786                  END 
    788787                  (where(gridtype eq 'U'))[0] NE -1:BEGIN 
    789788                    print, 'WARNING, empty F points box... we use the same index as U points...' 
    790789                    firstxf = firstxu & lastxf = lastxu & nxf = nxu 
    791                   END  
     790                  END 
    792791                  (where(gridtype eq 'V'))[0] NE -1:BEGIN 
    793792                    print, 'WARNING, empty F points box... we use the same index as V points...' 
    794793                    firstxf = firstxv & lastxf = lastxv & nxf = nxv 
    795                   END  
     794                  END 
    796795                  ELSE:BEGIN 
    797796                    print, 'WARNING, empty F points box... we get the neighnors to define a new box...' 
     
    803802                    ENDCASE 
    804803                    RETURN 
    805                   END  
    806                 ENDCASE  
     804                  END 
     805                ENDCASE 
    807806              ENDIF ELSE BEGIN 
    808807                ras = report('WARNING, The box does not contain any F points...') 
     
    821820      END 
    822821    ENDCASE 
    823   ENDELSE  
    824 ;------------------------------------------------------------------- 
    825 ; The extracted domain is it regular or not?  
     822  ENDELSE 
     823;------------------------------------------------------------------- 
     824; The extracted domain is it regular or not? 
    826825;------------------------------------------------------------------- 
    827826  CASE 1 OF 
    828827    ((where(gridtype eq 'T'))[0] NE -1 OR (where(gridtype eq 'W'))[0] NE -1) AND nxt NE 0 AND nyt NE 0:BEGIN 
    829 ; to get faster, we first test the most basic cases befor testing the 
     828; to get faster, we first test the most basic cases before testing the 
    830829; full array. 
    831830      CASE 0 OF 
     
    908907        firstzt = domz[0] 
    909908        lastzt = domz[nzt-1] 
    910       ENDIF ELSE BEGIN  
     909      ENDIF ELSE BEGIN 
    911910        ras = report('WARNING, The box does not contain any T level...') 
    912911        firstzt = -1 
    913912        lastzt = -1 
    914       ENDELSE  
     913      ENDELSE 
    915914    ENDIF 
    916915; define firstzw, firstzw, nzw 
     
    920919        lastzw = lastzt 
    921920        nzw = nzt 
    922       ENDIF ELSE BEGIN  
     921      ENDIF ELSE BEGIN 
    923922        domz = where(gdepw ge vert1 and gdepw le vert2, nzw) 
    924923        IF nzw NE 0 THEN BEGIN 
    925924          firstzw = domz[0] 
    926925          lastzw = domz[nzw-1] 
    927         ENDIF ELSE BEGIN  
     926        ENDIF ELSE BEGIN 
    928927          ras = report('WARNING, The box does not contain any W level...') 
    929928          firstzw = -1 
    930929          lastzw = -1 
    931         ENDELSE  
    932       ENDELSE  
     930        ENDELSE 
     931      ENDELSE 
    933932    ENDIF 
    934933;------------------------------------------------------------------- 
    935934; vertical domain defined with the Z index 
    936935;------------------------------------------------------------------- 
    937   ENDIF ELSE BEGIN  
     936  ENDIF ELSE BEGIN 
    938937    CASE N_PARAMS() OF 
    939938      2:fstz = min([x1, x2], max = lstz) 
     
    951950      vert1t = min(gdept[fstz:lstz], max = vert2t) 
    952951      firstzt = fstz & lastzt = lstz & nzt = nz 
    953     ENDIF       
     952    ENDIF 
    954953; find vert1w, vert2w, firstzw, firstzw, nzw 
    955954; according to (x1, x2) or (z1, z2) 
     
    957956      vert1w = min(gdepw[fstz:lstz], max = vert2w) 
    958957      firstzw = fstz & lastzw = lstz & nzw = nz 
    959     ENDIF       
     958    ENDIF 
    960959    vert1 = min([vert1t, vert1w]) 
    961960    vert2 = max([vert2t, vert2w]) 
     
    965964  IF NOT keyword_set(key_forgetold) THEN BEGIN 
    966965@updateold 
    967   ENDIF  
    968 ;------------------------------------------------------------------- 
    969   if keyword_set(key_performance) THEN print, 'temps domdef', systime(1)-tempsun  
     966  ENDIF 
     967;------------------------------------------------------------------- 
     968  if keyword_set(key_performance) THEN print, 'temps domdef', systime(1)-tempsun 
    970969;------------------------------------------------------------------- 
    971970 
  • trunk/SRC/ToBeReviewed/GRILLE/fmask.pro

    r157 r226  
    1515; @examples 
    1616; Used like if fmask was a known array by substituing fmask by (fmask()) 
    17 ; For example: Instaed of write fmask[domainef] we have to write (fmask())[domainef] 
     17; For example: Instead of write fmask[domainef] we have to write (fmask())[domainef] 
    1818; 
    1919; @history 
     
    3939;--------------------------------------------------------- 
    4040  tempsun = systime(1)          ; For key_performance 
    41 ;  
     41; 
    4242  CASE size(tmask, /n_dimensions) OF 
    4343    2:res = tmask*shift(tmask, -1, 0)*shift(tmask, 0, -1)*shift(tmask, -1, -1) 
     
    4848  res[*, jpj-1, *] = fmaskredx 
    4949; 
    50   if keyword_set(key_performance) THEN print, 'temps fmask', systime(1)-tempsun  
    51    
     50  if keyword_set(key_performance) THEN print, 'temps fmask', systime(1)-tempsun 
     51 
    5252  return, res 
    5353end 
  • trunk/SRC/ToBeReviewed/HOPE/computehopegrid.pro

    r157 r226  
    88; @categories 
    99; Grid 
    10 ;  
     10; 
    1111; @param XAXIS 
    1212; 
     
    6868   if NOT keyword_set(lasts) then lasts = [jpi-1, jpj-1, jpk-1] 
    6969; 
    70 ; depermination of the grid type and of the point type 
     70; determination of the grid type and of the point type 
    7171; 
    7272   if keyword_set(pttype) then vargrid = pttype 
     
    129129         gphiv = gphit+(gphit[0, 1]-gphit[0, 0])/2. 
    130130         gphif = gphit+(gphit[0, 1]-gphit[0, 0])/2. 
    131       ENDIF ELSE BEGIN  
     131      ENDIF ELSE BEGIN 
    132132         gphiv = gphit 
    133133         gphif = gphit 
     
    181181   e2f = e2t 
    182182; 
    183 ; mask  
     183; mask 
    184184; 
    185185   tmask = replicate(1b, jpi, jpj, jpk) 
     
    239239  IF NOT keyword_set(key_forgetold) THEN BEGIN 
    240240   @updateold 
    241   ENDIF  
     241  ENDIF 
    242242;------------------------------------------------------------ 
    243243   return 
  • trunk/SRC/ToBeReviewed/HOPE/domainpart.pro

    r163 r226  
    6262   endif 
    6363; 
    64 ; we get the size of the dimenstion id of this section 
     64; we get the size of the dimension id of this section 
    6565; 
    6666   dimvar = *top_uvalue[1, findline(top_uvalue, 'dimvar')] 
  • trunk/SRC/ToBeReviewed/HOPE/findlineandpointtype.pro

    r163 r226  
    6868   jpj = n_elements(yaxis) 
    6969; 
    70 ; depermination of the grid type and of the point type 
     70; determination of the grid type and of the point type 
    7171; 
    7272; low resolution grid: jpi=128, jpj=121 ( x 2), jpk=20 
    73 ;  
     73; 
    7474;                0.       1.4         2.8       4.2        5.6 
    7575;    odd                    T          u          T          u  93.3 
     
    8080; 
    8181; high resolution grid: jpi=256, jpj=195 ( x 2), jpk=29 
    82 ;  
    83 ;                0.       0.7         1.4        2.1        2.8        
     82; 
     83;                0.       0.7         1.4        2.1        2.8 
    8484;    odd                    T          u          T          u  91.6 
    8585;    even        T          u          T          u             91.0 
  • trunk/SRC/ToBeReviewed/HOPE/read_hope.pro

    r163 r226  
    77; 
    88; @param EVENT 
    9 ;  
     9; 
    1010; 
    1111; @returns 
     
    1616; 
    1717; @examples 
    18 ;  
    19 ;  
     18; 
    2019; @history 
    2120; 
     
    244243; A two elements vector [date1, date2]] 
    245244; the boundary of the calendar with date1 and date2 
    246 ; folowing the syntax yyyymmdd 
     245; following the syntax yyyymmdd 
    247246; 
    248247; @keyword ODDPT 
    249248; Activate to read only the sections located on ODD 
    250 ; points  
     249; points 
    251250; 
    252251; @keyword EVENPT 
    253252; Activate to read only the sections located on even 
    254 ; points  
     253; points 
    255254; 
    256255; @keyword ODDEVENPT 
     
    332331  compile_opt idl2, strictarrsubs 
    333332; 
    334 @common                         ; usefull only for the definition of iodir  
     333@common                         ; usefull only for the definition of iodir 
    335334  if n_elements(filename) EQ 0 then filename = isafile(iodirectory = iodir, _extra = ex) 
    336335  IF size(filename, /type) NE 7 THEN return, -1 
    337336  filename = isafile(filename = filename, iodirectory = iodir, _extra = ex) 
    338337; 
    339   cdfid = ncdf_open(filename)       ; id of the netcdf file  
     338  cdfid = ncdf_open(filename)       ; id of the netcdf file 
    340339  wathinside = ncdf_inquire(cdfid)  ; structure with global informations 
    341 ;-------------------------------  
     340;------------------------------- 
    342341;  dimensions 
    343 ;-------------------------------  
     342;------------------------------- 
    344343  namedim = strarr(wathinside.ndims)  ; name of the dimensions 
    345344  typedim = strarr(wathinside.ndims)  ; type of the dimensions (x,y,z,t) 
     
    349348    ncdf_diminq, cdfid, dimiq, name, value 
    350349    namedim[dimiq] = name 
    351     case 1 of  
     350    case 1 of 
    352351      STRCMP(name, 'lon', 3, /FOLD_CASE):typedim[dimiq] = 'x' 
    353352      STRCMP(name, 'lat', 3, /FOLD_CASE):typedim[dimiq] = 'y' 
     
    363362; dimlist: structure which contains the name and the value of each 
    364363; dimension 
    365 ; we suppose that there is always a variable which has the  
     364; we suppose that there is always a variable which has the 
    366365; same name that the dimension and which gives the values of 
    367366; this dimension 
     
    372371    dimlist = create_struct(dimlist, namedim[dimiq], value) 
    373372  endfor 
    374 ;-------------------------------  
     373;------------------------------- 
    375374;  variables 
    376 ;-------------------------------  
     375;------------------------------- 
    377376  namevar = strarr(wathinside.nvars)   ; names of the variables 
    378377  ndimsvar = lonarr(wathinside.nvars)  ; number of dim for each variable 
     
    388387; we cut dimvar to select only the interessant part 
    389388  dimvar = dimvar[0:max(ndimsvar)-1, *] 
    390 ; selection of the data variables which are diffrent from the 
     389; selection of the data variables which are different from the 
    391390; dimension variables 
    392391; we suppose that that data variables are 4D array (with sometime 
     
    412411  endfor 
    413412; 
    414 ;---------------------------------------------------   
    415 ;---------------------------------------------------   
    416 ;---------------------------------------------------   
     413;--------------------------------------------------- 
     414;--------------------------------------------------- 
     415;--------------------------------------------------- 
    417416;  definition of the widget 
    418 ;---------------------------------------------------   
    419 ;---------------------------------------------------   
    420 ;---------------------------------------------------   
     417;--------------------------------------------------- 
     418;--------------------------------------------------- 
     419;--------------------------------------------------- 
    421420  base = widget_base(/column) 
    422 ;---------------------------------------------------   
    423 ; first base:  
     421;--------------------------------------------------- 
     422; first base: 
    424423;    droplist to select the type of section 
    425424;    droplist to select the variable 
    426425;    button to select type of line : odd, even or odd-even 
    427 ;---------------------------------------------------   
     426;--------------------------------------------------- 
    428427  base1 = widget_base(base, /row, /frame) 
    429428  typechoice = sectype[uniq(sectype, sort(sectype))] 
     
    435434                    = 0L > (where(typechoice EQ selectedtype))[0] 
    436435  ENDIF ELSE selectedtype = typechoice[0] 
    437 ;  
     436; 
    438437  varchoice = namevar[uniq(namevar, sort(namevar))] 
    439438  base12 = widget_droplist(base1, title = 'Available data', value = varchoice, uvalue = {name:'var choice'}, uname = 'var choice') 
     
    445444; 
    446445  base13 = widget_base(base1, /row, uname = 'linechoicebase') 
    447 ;---------------------------------------------------   
     446;--------------------------------------------------- 
    448447; base 2: base to select the domain of the odd points 
    449448;--------------------------------------------------- 
    450449  base2 = widget_base(base, /column, uname = 'basedomainodd', /frame) 
    451 ;---------------------------------------------------   
     450;--------------------------------------------------- 
    452451; base 3: base to select the domain of the even points 
    453452;--------------------------------------------------- 
    454453  base3 = widget_base(base, /column, uname = 'basedomaineven', /frame) 
    455 ;---------------------------------------------------   
     454;--------------------------------------------------- 
    456455; base 4: base to select the domain of the odd-even points 
    457456;--------------------------------------------------- 
    458457  base4 = widget_base(base, /column, uname = 'basedomainodd-even', /frame) 
    459 ;---------------------------------------------------   
     458;--------------------------------------------------- 
    460459; base 5: calendar 
    461460;--------------------------------------------------- 
     
    468467  base51 = cw_calendar(base5, time, uname = 'date1', uvalue = {name:'date1'}) 
    469468  base52 = cw_calendar(base5, time, uname = 'date2', uvalue = {name:'date2'}) 
    470 ;---------------------------------------------------   
     469;--------------------------------------------------- 
    471470;  base 6: base to select the min, max, ... and others keywords 
    472471;--------------------------------------------------- 
    473472  base6 = cw_specifie(base, /column, uname = 'specifie', uvalue = {name:'specifie'}) 
    474 ;---------------------------------------------------   
     473;--------------------------------------------------- 
    475474;  base 7: last base with the action buttons 
    476475;--------------------------------------------------- 
     
    478477  base71 = widget_button(base7, value = 'Plot', uvalue = {name:'plot'}) 
    479478  base72 = widget_button(base7, value = 'Cancel', uvalue = {name:'cancel'}) 
    480 ;---------------------------------------------------   
     479;--------------------------------------------------- 
    481480; determination of the selected variable ...... 
    482 ;---------------------------------------------------   
     481;--------------------------------------------------- 
    483482  goodname = 0 > where(strlowcase(namevar) EQ strlowcase(selectedname)) 
    484483  goodtype = 0 > where(sectype EQ selectedtype) 
     
    568567    endif 
    569568  ENDIF 
    570 ;---------------------------------------------------   
     569;--------------------------------------------------- 
    571570; definition of the uvalue of the base which allows to share the 
    572 ; variables between programs.  
    573 ;---------------------------------------------------   
     571; variables between programs. 
     572;--------------------------------------------------- 
    574573  top_uvalue = ptrarr(2, 18, /allocate_heap) 
    575574  *top_uvalue[0, 0] = 'type choice' & *top_uvalue[1, 0] = temporary(typechoice) 
  • trunk/SRC/ToBeReviewed/HOPE/rh_alldomains.pro

    r163 r226  
    4343   selectedline=(*top_uvalue[1, findline(top_uvalue, 'linetype')])[selected] 
    4444; 
    45 ; we get the size of the dimenstion id of this section 
     45; we get the size of the dimension id of this section 
    4646; 
    4747   dimvar = *top_uvalue[1, findline(top_uvalue, 'dimvar')] 
     
    8585         oddsecchoice = oddsecchoice[sortedzdim] 
    8686         nothing=widget_droplist(basedomainodd,title = 'number of levels', value = strtrim(sizedims, 2), uvalue = {name:'oddsecchoice'}, uname='oddsecchoice') 
    87       ENDIF  
     87      ENDIF 
    8888      domainpart, top_uvalue, basedomainodd, oddsecchoice[0] 
    8989      widget_control, basedomainodd, set_uvalue = oddsecchoice 
    90    ENDIF ELSE BEGIN  
     90   ENDIF ELSE BEGIN 
    9191      nothing=widget_label(basedomainodd, value = ' ', uname = 'title') 
    9292      domainpart, top_uvalue, basedomainodd, /destroy 
     
    115115         evensecchoice = evensecchoice[sortedzdim] 
    116116         nothing=widget_droplist(basedomaineven,title = 'number of levels', value = strtrim(sizedims, 2), uvalue = {name:'evensecchoice'}, uname='evensecchoice') 
    117       ENDIF  
     117      ENDIF 
    118118      domainpart, top_uvalue, basedomaineven, evensecchoice[0] 
    119119      widget_control, basedomaineven, set_uvalue = evensecchoice 
     
    145145         oddevensecchoice = oddevensecchoice[sortedzdim] 
    146146         nothing=widget_droplist(basedomainoddeven,title = 'number of levels', value = strtrim(sizedims, 2), uvalue = {name:'odd-evensecchoice'}, uname='odd-evensecchoice') 
    147       ENDIF  
     147      ENDIF 
    148148      domainpart, top_uvalue, basedomainoddeven, oddevensecchoice[0] 
    149149      widget_control, basedomainoddeven, set_uvalue = oddevensecchoice 
  • trunk/SRC/ToBeReviewed/INIT/initncdf.pro

    r221 r226  
    6464; 
    6565; @restrictions 
    66 ; the file must contain an x and an y axis. (1 ou 2 dimentional array) 
     66; the file must contain an x and an y axis. (1 ou 2 dimensional array) 
    6767; 
    6868; @examples 
  • trunk/SRC/ToBeReviewed/LECTURE/GRIB/read_gribtable.pro

    r163 r226  
    8383free_lun,lun 
    8484 
    85 ; fill up missing varible names 
     85; fill up missing variable names 
    8686index=WHERE(parmtabl[0,*] EQ '',count) 
    8787IF count GT 0 THEN parmtabl[0,index]='var'+strcompress(index,/rem) 
  • trunk/SRC/ToBeReviewed/LECTURE/read_ftp.pro

    r157 r226  
    11;+ 
    2 ; @file_comments  
    3 ;  
    4 ;  
     2; @file_comments 
     3; 
    54; @categories 
    6 ;  
    7 ;  
    8 ; @param U  
     5; 
     6; @param U 
    97; 
    108; 
     
    1210; 
    1311; 
    14 ; @param RES  
    15 ;  
     12; @param RES 
    1613; 
    1714; @keyword OUT 
     
    1916; 
    2017; @keyword COUNT 
    21 ; Upon return, the number of elements in the result set.  
     18; Upon return, the number of elements in the result set. 
    2219; This is only important when the result set is the empty 
    2320; set, in which case COUNT is set to zero. 
    24 ;  
     21; 
    2522; @restrictions 
    26 ;  
    27 ;  
     23; 
    2824; @examples 
    2925; 
    3026; 
    3127; @history 
    32 ;  
     28; 
    3329; 
    3430; @version 
     
    6056end 
    6157;+ 
    62 ; @file_comments  
    63 ;  
    64 ;  
     58; @file_comments 
     59; 
    6560; @categories 
    66 ;  
    67 ;  
     61; 
    6862; @param TEXT 
    6963; ASCII text string containing the message. 
     
    7367; 
    7468; @param PORT 
    75 ;  
     69; 
    7670; @restrictions 
    77 ;  
    78 ;  
     71; 
     72; 
    7973; @examples 
    8074; 
    81 ; 
    8275; @history 
    83 ;  
    8476; 
    8577; @version 
     
    173165;                  10 File(s)      3,618,694 bytes 
    174166; 
    175 ;  These compressed files can cosequently be opened with OPENR and the 
     167;  These compressed files can consequently be opened with OPENR and the 
    176168;   /COMPRESSED keyword. 
    177169; 
     
    181173; $Id$ 
    182174; 
    183 ; @todo  
     175; @todo 
    184176; seb: que fait-on de "syntax" au debut du header? 
    185177; give examples with date in year 0 (should not exists but may happen) 
    186 ;  
     178; 
    187179;- 
    188180pro read_ftp, site, files, dir, port, data=data, file=file, user=user, $ 
  • trunk/SRC/ToBeReviewed/LECTURE/read_ncdf.pro

    r216 r226  
    22; @file_comments 
    33; Reading function for the file net_cdf. 
    4 ; This program is less universal than ncdf_lec (it appeal to declared  
     4; This program is less universal than ncdf_lec (it appeal to declared 
    55; variables in common.pro) but it is very easier to be used. It considerate 
    66; the declaration of the different zooms which have been defined 
    77; (ixminmesh...premierx...), the declaration of the variable key_shift... 
    88; To put it in a nutshell, the result of read_ncdf can be directly used in plt... 
    9 ; This is also this program which is used by default in our reading widgets.   
     9; This is also this program which is used by default in our reading widgets. 
    1010; 
    1111; @categories 
    1212; Reading 
    13 ;  
     13; 
    1414; @param NAME {in}{required}{type=string} 
    1515; It define the field to be read. 
     
    1818; Relative with the time axis. 
    1919; These can be 
    20 ;  - 2 date of the  type yyyymmdd and in this case, we select dates  
     20;  - 2 date of the  type yyyymmdd and in this case, we select dates 
    2121;  which are included between these two dates. 
    22 ;  - 2 indexes which define between which and which time step we have  
     22;  - 2 indexes which define between which and which time step we have 
    2323;  to extract the temporal dimension. 
    2424; 
     
    2626; Relative with the time axis. 
    2727; See BEGINNING. 
    28 ;  
     28; 
    2929; @param COMPATIBILITY {in}{optional} 
    3030; Useless, defined for compatibility 
    31 ;   
    32 ; @keyword BOXZOOM  
    33 ; Contain the boxzoom on which we have to do the reading  
    34 ;  
     31; 
     32; @keyword BOXZOOM 
     33; Contain the boxzoom on which we have to do the reading 
     34; 
    3535; @keyword CALLITSELF {default=0}{type=scalar: 0 or 1} 
    3636; For ROMS outputs. Use by read_ncdf itself to access auxilliary data (h and zeta). 
    37 ;  
     37; 
    3838; @keyword FILENAME {required}{type=string} 
    3939; It contains he file's name. 
    40 ;  
     40; 
    4141; @keyword INIT {default=0}{type=scalar: 0 or 1} 
    4242; To call automatically initncdf, filename and thus 
    4343; redefine all the grid parameters 
    44 ;  
     44; 
    4545; @keyword GRID 
    4646; ='[UTVWF]' to specify the type of grid. Default is (1) 
     
    4848; GRID[._][TUVFW].NC (not case sensible) or (2) T if case (1) 
    4949; is not found. 
    50 ;  
     50; 
    5151; @keyword TIMESTEP {default=0}{type=scalar: 0 or 1} 
    5252; Specify that BEGINNING and ENDING refer to indexes of the time axis and not to dates 
    5353; 
    5454; @keyword TOUT {default=0}{type=scalar: 0 or 1} 
    55 ; We activate it if we want to read the file on the whole domain without  
    56 ; considerate the sub-domain defined by the boxzoom or  
     55; We activate it if we want to read the file on the whole domain without 
     56; considerate the sub-domain defined by the boxzoom or 
    5757; lon1,lon2,lat1,lat2,vert1,vert2. 
    58 ;  
     58; 
    5959; @keyword NOSTRUCT {default=0}{type=scalar: 0 or 1} 
    60 ; We activate it if we do not want that read_ncdf send back a structure  
     60; We activate it if we do not want that read_ncdf send back a structure 
    6161; but only the array referring to the field. 
    62 ;  
     62; 
    6363; @keyword TIMEVAR {type=string} 
    6464; It define the name of the variable that 
     
    7474; 
    7575; @keyword _EXTRA 
    76 ; Used to pass your keywords  
     76; Used to pass your keywords 
    7777; 
    7878; @returns 
    7979; Structure readable by litchamp.pro or an array if NOSTRUCT is activated. 
    80 ;  
     80; 
    8181; @uses 
    8282; common.pro 
    83 ;  
     83; 
    8484; @restrictions 
    8585; The field must have a temporal dimension. 
    86 ;  
     86; 
    8787; @history 
    8888; Sebastien Masson (smasson\@lodyc.jussieu.fr) 
    89 ;                      15/10/1999  
    90 ;  
     89;                      15/10/1999 
     90; 
    9191; @version 
    92 ; $Id$  
     92; $Id$ 
    9393;- 
    9494;--------------------------------------------------------- 
     
    116116; we find the filename. 
    117117;------------------------------------------------------------ 
    118 ;  print,filename  
     118;  print,filename 
    119119; is parent a valid widget ? 
    120120  if keyword_set(parentin) then BEGIN 
     
    145145    ncdf_diminq, cdfid, varcontient.dim[i], tmp, dimsize 
    146146    dimnames[i] = tmp 
    147   ENDFOR  
     147  ENDFOR 
    148148;------------------------------------------------------------ 
    149149; shall we redefine the grid parameters 
     
    174174      lasttps = where(time EQ date2) & lasttps = lasttps[0] 
    175175    ENDIF ELSE BEGIN 
    176       IF keyword_set(timevar) THEN BEGIN  
     176      IF keyword_set(timevar) THEN BEGIN 
    177177        timeid = ncdf_varid(cdfid, timevar) 
    178178        IF timeid EQ -1 THEN BEGIN 
     
    183183        timecontient = ncdf_varinq(cdfid, timeid) 
    184184        contient.recdim = timecontient.dim[0] 
    185       ENDIF ELSE BEGIN  
     185      ENDIF ELSE BEGIN 
    186186; we find the infinite dimension 
    187187        timedim = contient.recdim 
     
    190190          return, report('the file '+filename+' as no infinite dimension. !C Use TIMESTEP or TIMEVAR keyword') 
    191191        endif 
    192 ; we find the FIRST time axis       
     192; we find the FIRST time axis 
    193193        timeid = 0 
    194194        repeat BEGIN       ; As long as we have not find a variable having only one dimension: the infinite one 
     
    204204        endif 
    205205        timeid = timeid-1 
    206       ENDELSE  
     206      ENDELSE 
    207207; we must found the time origin of the julian calendar used in the 
    208 ; time axis.  
     208; time axis. 
    209209; does the attribut units an dcalendar exist for the variable time axis? 
    210210      if timecontient.natts EQ 0 then BEGIN 
     
    231231          'greg':IF n_elements(key_caltype) EQ 0 THEN key_caltype = 'greg' 
    232232          ELSE:BEGIN 
    233 ;            notused = report('Unknown calendar: '+value+', we use greg calendar.')  
     233;            notused = report('Unknown calendar: '+value+', we use greg calendar.') 
    234234            key_caltype = 'greg' 
    235235          END 
    236236        ENDCASE 
    237237      ENDIF ELSE BEGIN 
    238 ;        notused = report('Unknown calendar, we use '+key_caltype+' calendar.')  
     238;        notused = report('Unknown calendar, we use '+key_caltype+' calendar.') 
    239239        IF n_elements(key_caltype) EQ 0 THEN key_caltype = 'greg' 
    240240      ENDELSE 
     
    272272        'hour':time = julday(depart[1], depart[2], depart[0])+time/24.d 
    273273        'day':time = julday(depart[1], depart[2], depart[0])+time 
    274         'month':BEGIN  
     274        'month':BEGIN 
    275275          if total(fix(time) NE time) NE 0 then $ ; we switch to days with 30d/m 
    276276            time = julday(depart[1], depart[2], depart[0])+round(time*30) $ 
     
    327327        dimnames[0] EQ 'xi_u'   AND dimnames[1] EQ 'eta_rho':vargrid = 'U' 
    328328        dimnames[0] EQ 'xi_u'   AND dimnames[1] EQ 'eta_v'  :vargrid = 'F' 
    329         ELSE:BEGIN  
     329        ELSE:BEGIN 
    330330; could we define the grid type from the file name?? 
    331331          pattern = ['GRID.', 'GRID_', 'GRID', 'UPID_', '30ID_'] 
     
    369369    endcase 
    370370  ENDIF ELSE BEGIN 
    371     if keyword_set(boxzoom) then BEGIN  
     371    if keyword_set(boxzoom) then BEGIN 
    372372      Case 1 Of 
    373373        N_Elements(Boxzoom) Eq 1:bte = [lon1, lon2, lat1, lat2, 0., boxzoom[0]] 
     
    386386    ENDIF 
    387387    grille, mask, glam, gphi, gdep, nx, ny, nz, firstx, firsty, firstz, lastx, lasty, lastz 
    388     undefine, glam & undefine, gphi & ; We liberate some memoty! 
     388    undefine, glam & undefine, gphi & ; We liberate some memory! 
    389389  ENDELSE 
    390390;--------------------------------------------------------------------- 
     
    442442    if found NE -1 then ncdf_attget, cdfid, name, attnames[found], missing_value 
    443443; 
    444   ENDIF ELSE BEGIN  
     444  ENDIF ELSE BEGIN 
    445445    IF NOT keyword_set(callitself) THEN varunit = '' 
    446446    add_offset = 0. 
     
    484484; we look for  missing_value 
    485485  IF size(missing_value, /type) NE 7 then BEGIN 
    486     IF size(missing_value, /type) EQ 1 THEN BEGIN  
     486    IF size(missing_value, /type) EQ 1 THEN BEGIN 
    487487      missing_value = strlowcase(string(missing_value)) 
    488       IF strmid(missing_value, 0, 1, /reverse_offset) EQ 'f' THEN $  
     488      IF strmid(missing_value, 0, 1, /reverse_offset) EQ 'f' THEN $ 
    489489        missing_value = strmid(missing_value, 0, strlen(missing_value)-1) 
    490       IF isnumber(string(missing_value), tmp) EQ 1 THEN missing_value = tmp ELSE BEGIN  
     490      IF isnumber(string(missing_value), tmp) EQ 1 THEN missing_value = tmp ELSE BEGIN 
    491491        print, 'Warning: missing value is not a number: ', missing_value 
    492492        missing_value = - 1 
    493493      ENDELSE 
    494     ENDIF  
     494    ENDIF 
    495495;    if missing_value NE valmask then begin 
    496496    if abs(missing_value) LT 1e6 then missing = where(res EQ missing_value) $ 
     
    498498;    ENDIF ELSE missing = -1 
    499499  ENDIF ELSE missing = -1 
    500 ; we apply add_offset, scale_factor and missing_value  
     500; we apply add_offset, scale_factor and missing_value 
    501501  if scale_factor NE 1 then res = temporary(res)*scale_factor 
    502502  if add_offset NE 0 then res = temporary(res)+add_offset 
     
    538538  IF keyword_set(nostruct) THEN return, res 
    539539  IF keyword_set(key_forgetold) THEN BEGIN 
    540     return, {arr:temporary(res), grid:vargrid, unit:varunit, experiment:varexp, name:varname}  
    541   ENDIF ELSE BEGIN  
     540    return, {arr:temporary(res), grid:vargrid, unit:varunit, experiment:varexp, name:varname} 
     541  ENDIF ELSE BEGIN 
    542542    return, {tab:temporary(res), grille:vargrid, unite:varunit, experience:varexp, nom:varname} 
    543543  ENDELSE 
  • trunk/SRC/ToBeReviewed/PLOTS/DESSINE/pltbase.pro

    r171 r226  
    55; 
    66; @file_comments 
    7 ; Overlayer contour to trace a field which can be mask.  
     7; Overlayer contour to trace a field which can be mask. 
    88; Elementary brick of plt, pltz et pltt. 
    99; 
    10 ; @categories  
     10; @categories 
    1111; Graphics 
    1212; 
     
    2121; 
    2222; @param MASK {in}{required}{type=array} 
    23 ; It is the array who mask z2d (with 0s on points we want to mask and 1s on others).  
     23; It is the array who mask z2d (with 0s on points we want to mask and 1s on others). 
    2424; If z2d is not masked, put this argument equal to 1. 
    2525; 
    2626; @param XM {in}{required} 
    27 ; Axis of the mask. Vector or array of the same size that mask.  
     27; Axis of the mask. Vector or array of the same size that mask. 
    2828; This is the coordinate of mask on x. 
    2929; 
    3030; @param YM {in}{required} 
    31 ; Axis of the mask. Vector or array of the same size that mask.  
     31; Axis of the mask. Vector or array of the same size that mask. 
    3232; This is the coordinate of mask on y. 
    3333; 
    3434; @param LEVELS {in}{optional}{type=vector} 
    35 ; Vectors which contain levels needed at the contour.  
     35; Vectors which contain levels needed at the contour. 
    3636; If it is not given, we take 20 levels between the min and the max. 
    37 ;   
     37; 
    3838; @param COLORS {in}{optional}{type=vector} 
    39 ; Vectors which contain colors needed at the contour.  
     39; Vectors which contain colors needed at the contour. 
    4040; If it is not given, we take 20 levels between the min and the max. 
    4141; 
    42 ; @keyword COLORTRICHAMP  
     42; @keyword COLORTRICHAMP 
    4343; The color we want to use to draw the triangulation which is used to make contours of the field. 
    4444; 
    45 ; @keyword COLORTRIMASK  
     45; @keyword COLORTRIMASK 
    4646; The color we want to use to draw the triangulation which is used to make contours of the mask. 
    4747; 
    48 ; @keyword COLOR_C  
     48; @keyword COLOR_C 
    4949; To draw the contour in color instead of in black 
    50 ; with filling in color  
    51 ; 
    52 ; @keyword CONT_NOFILL  
    53 ; Activate it not to fill the point mask to let them transparent!  
     50; with filling in color 
     51; 
     52; @keyword CONT_NOFILL 
     53; Activate it not to fill the point mask to let them transparent! 
    5454; Comment: Nevertheless, we trace mask's contour. 
    5555; 
     
    5757; The color of the continent. 
    5858; 
    59 ; @keyword DESSTRICHAMP  
    60 ; To draw the triangulation which is used to make field's contours.  
    61 ; 
    62 ; @keyword DESSTRIMASK  
     59; @keyword DESSTRICHAMP 
     60; To draw the triangulation which is used to make field's contours. 
     61; 
     62; @keyword DESSTRIMASK 
    6363; To draw the triangulation which is used to make mask's contours. 
    64 ;  
    65 ; @keyword FORPLT  
     64; 
     65; @keyword FORPLT 
    6666; To activate if we want that the drawing of coast be realized by tracecote rather than tracemask. 
    6767; 
    6868; @keyword I_COLORS {type=vector} 
    69 ; It is a vector specifying the colors to use to trace contours.  
     69; It is a vector specifying the colors to use to trace contours. 
    7070; It is the same thing that c_colors which act on contours. 
    7171; 
     
    7474;  % Out of range subscript encountered: <LONG      Array[38911]>. 
    7575;  % Execution halted at:  PLTBASE           151 
    76 ;             If the bug still exist, increase the value of more!  
     76;             If the bug still exist, increase the value of more! 
    7777; (The explanation and the justification of this method do not have scientific bases yet...). 
    7878; 
     
    8989; I specify we only label one contour on two. 
    9090; 
    91 ; @keyword CONTOUR  
     91; @keyword CONTOUR 
    9292; To be used since plt, pltz or pltt. (Have a look on these routines). 
    9393; 
    94 ; @keyword _EXTRA  
     94; @keyword _EXTRA 
    9595; Used to pass your keywords 
    9696; 
     
    106106; 8/2/2000 check if the tri array is not equal to 
    107107; -1. allow contour with out using a triangulation. 
    108 ;  
     108; 
    109109; @version 
    110110; $Id$ 
     
    146146;--------------------------------------------------------- 
    147147; 
    148 ; Explanation concerning contour. This keyword is activated when we trace a  
     148; Explanation concerning contour. This keyword is activated when we trace a 
    149149; colored contour different from the one with black trait. 
    150150; If it is activated (case n_elements(contour) NE 0), we pass 2 time in pltbase: 
    151151;   1) We trace colors then we leave, it is the case: 
    152152;         n_elements(contour) NE 0 AND n_elements(contour) NE 4) 
    153 ;   2) We trace contours in traits then continents, it is the case:  
     153;   2) We trace contours in traits then continents, it is the case: 
    154154;         n_elements(contour) NE 0 AND n_elements(contour) EQ 4) 
    155155; 
     
    162162; If levels and colors aren't given 
    163163;---------------------------------------------------------------------- 
    164   if n_params() EQ 4 then $  
     164  if n_params() EQ 4 then $ 
    165165    label, 0, min(z2d*mask), max(z2d*mask), ncontour, levels, colors 
    166166; attention bidouille inexplicable pour que tout se passe bien avec les 
     
    171171; Is cell_fill is a part of _extra, we desactive it if it is nt equal to 2 
    172172;---------------------------------------------------------------------- 
    173   IF chkstru(ex, 'CELL_FILL') THEN BEGIN  
     173  IF chkstru(ex, 'CELL_FILL') THEN BEGIN 
    174174    cell_fill = ex.CELL_FILL 
    175175    if ex.CELL_FILL NE 2 then ex.CELL_FILL = 0 
    176176  ENDIF ELSE cell_fill = 0      ; 
    177177;---------------------------------------------------------------------- 
    178 ; I) Filling of contours in palette colors  
     178; I) Filling of contours in palette colors 
    179179;---------------------------------------------------------------------- 
    180180  if NOT keyword_set(more) then more = 10 
    181181  if NOT keyword_set(nofill) AND NOT keyword_set(color_c) then begin 
    182     if n_elements(contour) NE 4 THEN BEGIN  
     182    if n_elements(contour) NE 4 THEN BEGIN 
    183183      if usetri EQ 2 then BEGIN 
    184184        IF size(x, /n_dimensions) EQ 1 THEN x = x#replicate(1, (size(z2d))[2]) 
     
    191191        IF size(y, /n_dimensions) EQ 2 THEN y = reform(y[0, *]) 
    192192        contour, z2d, x, y, levels = levels, c_color = colors, /noerase $ 
    193           , /fill, _extra = ex  
     193          , /fill, _extra = ex 
    194194      ENDELSE 
    195195    ENDIF 
    196196  ENDIF 
    197   if n_elements(contour) NE 0 AND n_elements(contour) NE 4 THEN GOTO, fini  
     197  if n_elements(contour) NE 0 AND n_elements(contour) NE 4 THEN GOTO, fini 
    198198  IF chkstru(ex, 'C_ORIENTATION') THEN ex = extractstru(ex, 'C_ORIENTATION') 
    199199  IF chkstru(ex, 'C_SPACING') THEN ex = extractstru(ex, 'C_SPACING') 
     
    207207; 
    208208    IF (n_elements(mask) GT 1 OR n_elements(masknan) GT 1) $ 
    209       AND NOT keyword_set(cont_nofill) THEN BEGIN  
    210       IF keyword_set(maskorg) THEN tonan = maskorg*masknan ELSE tonan = mask*masknan  
     209      AND NOT keyword_set(cont_nofill) THEN BEGIN 
     210      IF keyword_set(maskorg) THEN tonan = maskorg*masknan ELSE tonan = mask*masknan 
    211211      tonan = where(remplit(tonan, nite = 1, mask = tonan $ 
    212212                            , /basique, fillval = 0 $ 
    213213                            , fillxdir = keyword_set(realsection)) EQ 0, count) 
    214214      IF count NE 0 THEN z2d[temporary(tonan)] = !values.f_nan 
    215     ENDIF    
     215    ENDIF 
    216216; 
    217217; We do not pass if we have to make differents contours... 
     
    232232      ENDCASE 
    233233; 
    234       IF usetri EQ 2 THEN BEGIN  
     234      IF usetri EQ 2 THEN BEGIN 
    235235        IF size(x, /n_dimensions) EQ 1 THEN x = x#replicate(1, (size(z2d))[2]) 
    236236        IF size(y, /n_dimensions) EQ 1 THEN y = replicate(1, (size(z2d))[1])#y 
     
    253253    IF chkstru(ex, 'LEVELS') THEN ex = extractstru(ex, 'LEVELS') 
    254254    IF chkstru(ex, 'NODATA') THEN ex = extractstru(ex, 'NODATA') 
    255     IF NOT keyword_set(cont_color) THEN cont_color = (!d.n_colors-1) <  255     
    256 ; 
    257 ; If there is points at NaN  
    258 ; We trace points in white at NaN bafore drawing coasts with a trait. 
     255    IF NOT keyword_set(cont_color) THEN cont_color = (!d.n_colors-1) <  255 
     256; 
     257; If there is points at NaN 
     258; We trace points in white at NaN before drawing coasts with a trait. 
    259259; 
    260260    if keyword_set(trinan) THEN BEGIN 
     
    298298              , COINDESCEND = coindescendmask, CONT_COLOR = cont_color, _extra = ex 
    299299          END 
    300           ELSE:BEGIN  
     300          ELSE:BEGIN 
    301301            IF size(xm, /n_dimensions) EQ 2 THEN xm = xm[*, 0] 
    302302            IF size(ym, /n_dimensions) EQ 2 THEN ym = reform(ym[0, *]) 
     
    310310;------------------------------------------------------------ 
    311311      case 1 of 
    312         keyword_set(realsection) AND NOT keyword_set(cont_nofill):       
     312        keyword_set(realsection) AND NOT keyword_set(cont_nofill): 
    313313        keyword_set(realsection) AND keyword_set(cont_nofill): $ 
    314314          drawsectionbottom, mask, xm, ym $ 
     
    334334; 
    335335fini: 
    336   IF keyword_set(key_performance) THEN print, 'temps pltbase', systime(1)-tempsun  
     336  IF keyword_set(key_performance) THEN print, 'temps pltbase', systime(1)-tempsun 
    337337 
    338338  return 
  • trunk/SRC/ToBeReviewed/PLOTS/DESSINE/pltz.pro

    r172 r226  
    44;+ 
    55; 
    6 ; @file_comments  
     6; @file_comments 
    77; Trace vertical graphs. 
    88; 
    9 ; @categories  
     9; @categories 
    1010; Graphics 
    1111; 
    12 ; @param TAB  
     12; @param TAB 
    1313; The field whose we want to make a vertical cut can be 2 kind of thing: 
    14 ;         1) An 2d or 3d array.  
    15 ;         If the field is 2d, indicate, with the keyword BOXZOOM, geographic delineations of the boxzoom.  
     14;         1) An 2d or 3d array. 
     15;         If the field is 2d, indicate, with the keyword BOXZOOM, geographic delineations of the boxzoom. 
    1616;         If the field is 3d, we extract the section on we average possibly before to do the plot. 
    17 ;         2)  a structure respecting all criterions specified by litchamp.pro.  
     17;         2)  a structure respecting all criterions specified by litchamp.pro. 
    1818;          See IDL> xhelp,'litchamp'. The array contained in the structure must be 2 or 3d (See case 1) 
    1919; 
    2020; ces arguments ne sont pas obligatoires: 
    21 ;   
     21; 
    2222;       MAX: valeur maximum que l'on veut prendre en compte dans le trace 
    2323; des contours. Par defaut on prend le max de tab1 (sur les pts mer) 
     
    2626; des contours. Par defaut on prend le min de tab1 (sur les pts mer) 
    2727; 
    28 ; @keyword BOXZOOM  
    29 ; Vector indicating the geographic zone on which we want to cut the map.  
     28; @keyword BOXZOOM 
     29; Vector indicating the geographic zone on which we want to cut the map. 
    3030;  If BOXZOOM has : 
    3131; 1 element : The extraction is made on [lon1, lon2, lat1, lat2, 0.,boxzoom[0]] 
     
    3737; Where lon1, lon2,lat1,lat2 are global variables defined at the last domdef! 
    3838; 
    39 ; @keyword CONTINTERVALLE  
    40 ; When CONTOUR is activated, it is the value between 2 isolines  
    41 ; traced by a trait. So it can be different from the one specified by INTERVALLE which,  
    42 ; in this case, does not control colored isolines in color anymore. If there is noone  
    43 ; specified min, we choose a contour min which goes well with the specified interval!  
    44 ; If this keyword is not specified, we trace 20 isolines from the min to the max.  
     39; @keyword CONTINTERVALLE 
     40; When CONTOUR is activated, it is the value between 2 isolines 
     41; traced by a trait. So it can be different from the one specified by INTERVALLE which, 
     42; in this case, does not control colored isolines in color anymore. If there is noone 
     43; specified min, we choose a contour min which goes well with the specified interval! 
     44; If this keyword is not specified, we trace 20 isolines from the min to the max. 
    4545; 
    4646; @keyword CONTLABEL {type=integer} 
    4747; When CONTOUR is activated, if n 
    48 ; is different of 0, choose the label type corresponding to n cases for  
    49 ; the traced by a traitisolines. To specify the type of label of the  
     48; is different of 0, choose the label type corresponding to n cases for 
     49; the traced by a traitisolines. To specify the type of label of the 
    5050; colored contour, use LABEL 
    5151; 
    5252; @keyword CONTMAX {default=max of the keyword CONTOUR (on ocean points)} 
    53 ; When CONTOUR is activated, max value we want to consider in the isoline  
     53; When CONTOUR is activated, max value we want to consider in the isoline 
    5454; traced by a trait's line. 
    5555; 
    5656; @keyword CONTMIN {default=min of the keyword CONTOUR (on ocean points)} 
    57 ; When CONTOUR is activated, min value we want to consider in the isoline  
    58 ; traced by a trait's line.  
     57; When CONTOUR is activated, min value we want to consider in the isoline 
     58; traced by a trait's line. 
    5959; 
    6060; @keyword CONTNLEVEL {default=20} 
     
    6363; CONTLABEL=0). 
    6464; 
    65 ; @keyword CONTOUR  
    66 ; If we want to trace contours of a different field than the one  
    67 ; whose we have the colored drawing (by example E-P in color and QSR in contours).  
     65; @keyword CONTOUR 
     66; If we want to trace contours of a different field than the one 
     67; whose we have the colored drawing (by example E-P in color and QSR in contours). 
    6868; It must be a field respecting same characteristics than the argument number one of plt. 
    6969; 
    70 ; @keyword ENDPOINTS  
    71 ; keyword specifying that we want to make a vertical cut in diagonal. Then coordinated of extremities  
    72 ; of these one are defined by the 4 elements of the vector ENDPOINTS: [x1,y1,x2,y2] which are  
    73 ; coordinates.  
    74 ; 
    75 ; @keyword INTERVALLE  
    76 ; Value of an internal between to isoline. If there is none specified min,  
    77 ; we choose a min contour which goes well with the specified interval!. If this keyword is not  
    78 ; specified, we trace 20 isoline from the min to the max. Comment: When CONTOUR is activated,  
    79 ; INTERVALLE only specify the interval between 2 colored isoline. To specify the interval  
     70; @keyword ENDPOINTS 
     71; keyword specifying that we want to make a vertical cut in diagonal. Then coordinated of extremities 
     72; of these one are defined by the 4 elements of the vector ENDPOINTS: [x1,y1,x2,y2] which are 
     73; coordinates. 
     74; 
     75; @keyword INTERVALLE 
     76; Value of an internal between to isoline. If there is none specified min, 
     77; we choose a min contour which goes well with the specified interval!. If this keyword is not 
     78; specified, we trace 20 isoline from the min to the max. Comment: When CONTOUR is activated, 
     79; INTERVALLE only specify the interval between 2 colored isoline. To specify the interval 
    8080; between 2 isolines traced by a trait, use CONTINTERVALLE. 
    8181; 
    82 ; @keyword INV  
    83 ; Invert the color vector used to color the graph  
     82; @keyword INV 
     83; Invert the color vector used to color the graph 
    8484;               (without use the black, the white and the used palette) 
    8585; 
    8686; @keyword ZRATIO {default=2./3} 
    87 ; When the drawing has a zoomed part, it is the size rapport between the zoomed part,  
     87; When the drawing has a zoomed part, it is the size rapport between the zoomed part, 
    8888; hz (zoom height), and the whole drawing, ht (total height). 
    8989; 
    9090; @keyword LABEL {default=0}{type=integer} 
    9191; It choose the label's type corresponding to cases in label.pro. 
    92 ; Comment: When CONTOUR is activated, it only specify the label's type for colored isolines.  
    93 ; For these one traced by a trait, use CONTLABEL.  
    94 ; 
    95 ; @keyword MAXIN  
     92; Comment: When CONTOUR is activated, it only specify the label's type for colored isolines. 
     93; For these one traced by a trait, use CONTLABEL. 
     94; 
     95; @keyword MAXIN 
    9696; to specify the max value we want to plot with a keyword instead of with the 
    9797; input parameter max. If max is defined by both, parameter and keyword, the 
    9898; keyword is retained. 
    9999; 
    100 ; @keyword MININ  
     100; @keyword MININ 
    101101; to specify the min value we want to plot with a keyword instead of with the 
    102102; input parameter min. If min is defined by both, parameter and keyword, the 
     
    106106; Number of contour to draw by default =20. active if 
    107107; LABEL=0 or is not specified. 
    108 ;  
    109 ; @keyword NOTRI  
    110 ; To force not to use the triangulation. Beware, in this case, the  
    111 ; drawing only works if the grid is undeformed (It means that each point of a longitude  
    112 ; give one latitude and each point of a latitude give one longitude) except if we use  
    113 ; the keyword CELL_FILL=2.  
     108; 
     109; @keyword NOTRI 
     110; To force not to use the triangulation. Beware, in this case, the 
     111; drawing only works if the grid is undeformed (It means that each point of a longitude 
     112; give one latitude and each point of a latitude give one longitude) except if we use 
     113; the keyword CELL_FILL=2. 
    114114; Comment: if the field contain points !values.f_nan, then we even do a triangulation. 
    115115; 
    116 ; @keyword OVERPLOT  
    117 ; To make a plot over an other one.  
    118 ; Comment: Contrarily to the use of CONTOUR or VECTEUR, the use of this keyword  
     116; @keyword OVERPLOT 
     117; To make a plot over an other one. 
     118; Comment: Contrarily to the use of CONTOUR or VECTEUR, the use of this keyword 
    119119; does not the caption and/or the color bar. 
    120120; 
    121 ; @keyword SIN  
    122 ; Activate this keyword if we want the x axis to be traced in sinus of the  
     121; @keyword SIN 
     122; Activate this keyword if we want the x axis to be traced in sinus of the 
    123123; latitude when we make a drawing f(y) 
    124124; 
    125 ; @keyword STRICTFILL  
    126 ; Activate this keyword to that the filling of contours be  
    127 ; precisely done between the min and the max specified letting values inferior at the  
     125; @keyword STRICTFILL 
     126; Activate this keyword to that the filling of contours be 
     127; precisely done between the min and the max specified letting values inferior at the 
    128128; specified min and values superior at the specified max in white. 
    129129; 
     
    131131; Contour's style to adopt to draw isolines 
    132132; 
    133 ; @keyword WDEPTH  
    134 ; To specify that the field is at W depth instead of T  
     133; @keyword WDEPTH 
     134; To specify that the field is at W depth instead of T 
    135135; depth (automatically activated if vargrid eq 'W') 
    136136; 
     
    209209  IF usetri EQ 1 AND keyword_set(realsection) THEN usetri = 0 
    210210; did we specify the type ? 
    211   if keyword_set(typein) then BEGIN  
     211  if keyword_set(typein) then BEGIN 
    212212    if size(type, /type) NE 7 AND size(type, /type) NE 0 then begin 
    213213      if n_elements(min) NE 0 then max = min 
     
    216216    type = typein 
    217217  ENDIF 
    218 ;  
     218; 
    219219  checktypeminmax, 'pltz', TYPE = type, MIN = min, MAX = max $ 
    220220    , XZ = xz, YZ = yz, ENDPOINTS = endpoints, _extra = ex 
    221221; 
    222222  if keyword_set(endpoints) then begin 
    223     section, tab, z2d, glam, gphi, ENDPOINTS = endpoints, TYPE = type $  
     223    section, tab, z2d, glam, gphi, ENDPOINTS = endpoints, TYPE = type $ 
    224224    , BOXZOOM = boxzoom, DIREC = direc, WDEPTH = wdepth, _extra = ex 
    225     if z2d[0] EQ -1 AND n_elements(contour) ne 4 then BEGIN  
     225    if z2d[0] EQ -1 AND n_elements(contour) ne 4 then BEGIN 
    226226      restoreboxparam, 'boxparam4pltz.dat' 
    227227      return 
    228228    ENDIF 
    229     nx = n_elements(glam)  
     229    nx = n_elements(glam) 
    230230    ny = nx 
    231231    if strupcase(vargrid) EQ 'W' then begin 
     
    240240    z2d = checkfield(tab, 'pltz', TYPE = type, BOXZOOM = boxzoom $ 
    241241                     , DIREC = direc, WDEPTH = wdepth, _extra = ex) 
    242     if z2d[0] EQ -1 AND n_elements(contour) ne 4 then BEGIN  
     242    if z2d[0] EQ -1 AND n_elements(contour) ne 4 then BEGIN 
    243243      restoreboxparam, 'boxparam4pltz.dat' 
    244244      return 
     
    260260  z2d = reverse(z2d, 2) 
    261261;----------------------------------------------------------------------------- 
    262 ; Determination of the mi:min and of the ma:max of z2d in the same way  
     262; Determination of the mi:min and of the ma:max of z2d in the same way 
    263263; as max: max and min: min for the drawing. 
    264264;----------------------------------------------------------------------------- 
     
    316316      z2d = remplit(z2d, nite = 1-(n_elements(maskfill) NE 0) $ 
    317317                    , mask = z2d LT valmask/10, /basique, _extra = ex) 
    318   ENDIF ELSE BEGIN  
     318  ENDIF ELSE BEGIN 
    319319; filling the mask values with 8 neighbourg 
    320320    z2d = remplit(z2d, nite = (1+(vargrid NE 'T')+keyword_set(nan)) $ 
    321321                  *(1-(n_elements(maskfill) NE 0)), mask = mask*masknan $ 
    322322                  , /basique, _extra = ex) 
    323   ENDELSE  
     323  ENDELSE 
    324324  if keyword_set(strictfill) EQ 0 AND n_elements(maskfill) EQ 0 $ 
    325325    then z2d = min > z2d <  max 
     
    329329  ENDIF 
    330330;---------------------------------------------------------- 
    331 ; check the mask and the triangulation according to the grid type and  
     331; check the mask and the triangulation according to the grid type and 
    332332; nan values. find the coordinates of the mask 
    333 ;----------------------------------------------------------  
     333;---------------------------------------------------------- 
    334334;   if (where(mask EQ 0))[0] EQ -1 AND NOT keyword_set(nan) then notri = 1 
    335335;   if keyword_set(notri) then trifield = -1 $ 
     
    347347    xmask = xxaxis 
    348348    zmask = zzaxis 
    349   ENDELSE  
    350 ; 
    351   if (usetri GE 1 AND (vargrid NE 'T' AND vargrid NE 'W')) THEN BEGIN  
     349  ENDELSE 
     350; 
     351  if (usetri GE 1 AND (vargrid NE 'T' AND vargrid NE 'W')) THEN BEGIN 
    352352    IF keyword_set(realsection) THEN trimsk = triangule(mask, /basic) $ 
    353353    ELSE trimsk = triangule(mask, /basic, coinmonte = coinmontemask $ 
    354354                            , coindescend = coindescendmask) 
    355   ENDIF      
     355  ENDIF 
    356356;------------------------------------------------------------ 
    357357; dessin en lui meme 
     
    387387    return 
    388388  endif 
    389   if keyword_set(contour) THEN BEGIN  
     389  if keyword_set(contour) THEN BEGIN 
    390390    pourlegende = [1, 1, 1, 1] 
    391391    oldattributs = saveatt() 
     
    403403; 3rd part: drawing of the frame, caption, colorbar... 
    404404;------------------------------------------------------------ 
    405   if keyword_set(overplot) then BEGIN  
     405  if keyword_set(overplot) then BEGIN 
    406406    !y.range =  [zoom, profmin] ; We get back on physic coordinates 
    407407    plot, [0], [0], /nodata, /noerase, title = '', subtitle = '', xstyle = 5, ystyle = 5 
     
    409409  endif 
    410410;------------------------------------------------------------ 
    411 ; Caption + dysplay of them 
     411; Caption + display of them 
    412412;------------------------------------------------------------ 
    413413  legende, mi, ma, type, CONTOUR = pourlegende, INTERVALLE = intervalle, DIREC = direc, endpoints = endpoints, _EXTRA = ex 
     
    423423; Y axis in 1 or 2 part 
    424424;------------------------------------------------------------ 
    425   if n_elements(ex) NE 0 then BEGIN  
     425  if n_elements(ex) NE 0 then BEGIN 
    426426; To do not put title anymore 
    427427    if (where(tag_names(ex) EQ 'TITLE'))[0] NE -1 then ex.TITLE = ' ' 
     
    429429    if (where(tag_names(ex) EQ 'SUBTITLE'))[0] NE -1 then ex.SUBTITLE = ' ' 
    430430; To have just one ytitle 
    431     if (where(tag_names(ex) EQ 'YTITLE'))[0] NE -1 then BEGIN  
     431    if (where(tag_names(ex) EQ 'YTITLE'))[0] NE -1 then BEGIN 
    432432      ytitle = ex.YTITLE 
    433433      ex.YTITLE = ' ' 
     
    480480  restoreboxparam, 'boxparam4pltz.dat' 
    481481; 
    482   if keyword_set(key_performance) NE 0 THEN print, 'temps pltz', systime(1)-tempsun  
     482  if keyword_set(key_performance) NE 0 THEN print, 'temps pltz', systime(1)-tempsun 
    483483  return 
    484484end 
  • trunk/SRC/ToBeReviewed/PLOTS/DESSINE/scontour.pro

    r223 r226  
    4343; 1) I reinitializate the graphic environment (variables !x, !y et !p): 
    4444  if NOT keyword_set(NOREINITPLT) then reinitplt, _extra = ex 
    45 ; 2) i put the drawing on the screen like on the postcript 
     45; 2) i put the drawing on the screen like on the postscript 
    4646; if ex contains norease and c_orientation keywords we force ex.noerase = 0 
    4747  IF chkstru(ex, 'overplot') EQ 0 THEN placedessin, 'autre', _extra = ex 
    48 ; fiddle when noerase is used with c_orentation... 
     48; fiddle when noerase is used with c_orientation... 
    4949; call contour with /nodata to get the graphic environment, then force 
    5050; noerase = 0 and overplot = 1 
    5151  IF size(ex, /type) EQ 8 THEN BEGIN 
    52 ; check if noerase is used with c_orentation 
     52; check if noerase is used with c_orientation 
    5353    alltags = strlowcase(tag_names(ex)) 
    5454    dummy = where(alltags EQ 'noerase', count1) 
     
    7171    3:contour, x, y, z, xstyle = 1, ystyle = 1, _EXTRA = ex 
    7272  ENDCASE 
    73 ; fiddle when noerase is used with c_orentation... draw the contour axis 
     73; fiddle when noerase is used with c_orientation... draw the contour axis 
    7474  IF keyword_set(noerase_orientation)  THEN BEGIN 
    7575    ex.noerase = 1 
  • trunk/SRC/ToBeReviewed/PLOTS/DESSINE/splot.pro

    r223 r226  
    4747; 1) I reinitializate the graphic environment (les variables !x, !y et !p): 
    4848   if NOT keyword_set(NOREINITPLT) then reinitplt, _extra = ex 
    49 ; 2) i put the drawing on the screen like on the postcript 
     49; 2) i put the drawing on the screen like on the postscript 
    5050   placedessin, 'autre', _extra = ex 
    5151; 3) Drawing 
  • trunk/SRC/ToBeReviewed/PLOTS/DESSINE/tvplus.pro

    r163 r226  
    77; Enhanced version of tvscl 
    88; 
    9 ; @categories quick exploration of 2D arrays  
    10 ; 
    11 ; INPUTS:  
     9; @categories quick exploration of 2D arrays 
    1210; 
    1311; @param Z2D {in}{required} 
     
    2119; of cellsize that forces tvplus to create a window larger than 
    2220; the screen, a "scrolling window" will be displayed instead of a 
    23 ; regular window. Unfortunately the nice functionnalities of tvplus 
     21; regular window. Unfortunately the nice functionalities of tvplus 
    2422; are not coded for "scrolling window" case... 
    2523; 
     
    3331; The color number that should be used for the mask values. 
    3432; 
    35 ; @keyword OFFSET  
     33; @keyword OFFSET 
    3634; 2 elements vector used by tvplus itself when showing zoom. 
    3735; It is used to shift the ranges of xaxis and yaxis. 
    38 ; For example: tvplus,sst[x1:x2,y1:y2],offest=[x1,y1] 
    39 ; 
    40 ; @keyword MASK  
     36; For example: tvplus,sst[x1:x2,y1:y2],offset=[x1,y1] 
     37; 
     38; @keyword MASK 
    4139; The mask value. Note that if abs(mask) < 1.e6, then the 
    4240; exact value of the mask is used to find the maskwd point. 
     
    6765; @keyword _EXTRA 
    6866; used to pass keywords to TV, PLOT, COLORBAR 
    69 ;  
    70 ; @restrictions  
     67; 
     68; @restrictions 
    7169; use your mouse to scan the array values... 
    7270;     left button  : mouse position and associated array value 
     
    7472;     right button : quit 
    7573; 
    76 ; the nice functionnalities of tvplus are not coded 
     74; the nice functionalities of tvplus are not coded 
    7775; for "scrolling window" case... 
    7876; 
     
    102100  arr = reform(float(z2d)) 
    103101;------------------------------------------------------------ 
    104 ; check the size of the input array  
     102; check the size of the input array 
    105103;------------------------------------------------------------ 
    106104  if (size(arr))[0] NE 2 then begin 
     
    130128;------------------------------------------------------------ 
    131129; Compute the size (in pixel) of the square representing 1 
    132 ; point of the input array  
     130; point of the input array 
    133131;------------------------------------------------------------ 
    134132  dimensions = GET_SCREEN_SIZE() 
    135   if n_elements(cellsize) EQ 0 then BEGIN  
     133  if n_elements(cellsize) EQ 0 then BEGIN 
    136134    cellsize = min(floor(dimensions/(size(z2d))[1: 2]*.75)) 
    137   ENDIF ELSE $  
     135  ENDIF ELSE $ 
    138136; we need to use a scrolling bar window 
    139137  if cellsize GE min(floor(dimensions/(size(z2d))[1: 2]*.75)) then scrolling = 1 
     
    145143; Change the value of the masked value for the min of the non-masked values 
    146144;------------------------------------------------------------ 
    147   if n_elements(mask) then BEGIN  
    148     if abs(mask) LT 1e6 then BEGIN  
     145  if n_elements(mask) then BEGIN 
     146    if abs(mask) LT 1e6 then BEGIN 
    149147      masked = where(arr EQ mask) 
    150148      if masked[0] NE -1 then arr[masked] = min(arr[where(arr NE mask)]) 
    151     ENDIF ELSE BEGIN  
     149    ENDIF ELSE BEGIN 
    152150      masked = where(abs(arr) GE abs(mask)/10.) 
    153151      if masked[0] NE -1 then arr[masked] = min(arr[where(abs(arr) LT abs(mask)/10.)]) 
     
    157155; apply min/max keywords 
    158156;------------------------------------------------------------ 
    159   if n_elements(min) NE 0 then BEGIN  
     157  if n_elements(min) NE 0 then BEGIN 
    160158    arr = min > arr 
    161159    truemin = min 
    162160  ENDIF ELSE truemin = min(arr) 
    163   if n_elements(max) NE 0 then BEGIN  
     161  if n_elements(max) NE 0 then BEGIN 
    164162    arr = arr < max 
    165163    truemax = max 
     
    171169  ENDIF 
    172170;------------------------------------------------------------ 
    173 ; apply other keywords (nointerp, c_nan, c_mask)  
     171; apply other keywords (nointerp, c_nan, c_mask) 
    174172;------------------------------------------------------------ 
    175173  if NOT keyword_set(nointerp) then BEGIN 
     
    177175    m = 1.*(ncolors-1)/(truemax-truemin) 
    178176    p = bottom-1.*truemin*m 
    179     arr = round(m*temporary(arr)+p)  
    180   endif 
    181 ; set c_nan for NaN values  
     177    arr = round(m*temporary(arr)+p) 
     178  endif 
     179; set c_nan for NaN values 
    182180  if keyword_set(nan) then begin 
    183181    if n_elements(c_nan) NE 0 THEN arr[nanindex] = c_nan <  (ncolmax -1) $ 
     
    190188  arr = byte(temporary(arr)) 
    191189; increase the size of the array in order to be displayed 
    192 ; with the suitable size  
     190; with the suitable size 
    193191  szarr = size(arr, /dimensions) 
    194192  arr = congrid(temporary(arr), szarr[0]*cellsize, szarr[1]*cellsize) 
     
    205203    if NOT keyword_set(window) then window = 0 
    206204    window, window, xsize = nx+marginpix[0]+marginpix[1] $ 
    207             , ysize = ny+marginpix[2]+marginpix[3]  
     205            , ysize = ny+marginpix[2]+marginpix[3] 
    208206; for 24 bits colors, make sure thate the background color is the good one... 
    209207    if !d.n_colors gt 256 then BEGIN 
     
    215213    tv, arr, marginpix[0], marginpix[2], _EXTRA = ex 
    216214; 
    217 ; axis and plot frame  
     215; axis and plot frame 
    218216; 
    219217; get the normalized position of the tv (we just done above) 
     
    233231    xenvsauve = !x & yenvsauve = !y & penvsauve = !p 
    234232; 
    235 ; draw the colorbar  
     233; draw the colorbar 
    236234; 
    237235    IF truemin ne truemax THEN BEGIN 
     
    244242    ENDIF 
    245243;      !p.position = poscadre 
    246   ENDIF ELSE BEGIN  
     244  ENDIF ELSE BEGIN 
    247245;------------------------------------------------------------ 
    248246; scrolling bar window case... 
     
    261259                 , yvisible = round(.7*dimensions[1]) < (size(arr))[2], /register, congrid = 0, show_full = 0 
    262260    return 
    263   ENDELSE  
     261  ENDELSE 
    264262;------------------------------------------------------------ 
    265263; Use the mouse to get nice functionalities 
  • trunk/SRC/ToBeReviewed/PLOTS/DIVERS/barrecouleur.pro

    r163 r226  
    55; 
    66; @file_comments 
    7 ; Overlayeur of colorbar 
     7; Overlayer of colorbar 
    88; 
    99; @categories 
     
    2323; 
    2424; @keyword NOCOLORBAR 
    25 ;  
     25; 
    2626; 
    2727; @keyword CB_TITLE 
    28 ;  
     28; 
    2929; 
    3030; @keyword NOFILL 
    31 ;  
     31; 
    3232; 
    3333; @keyword COLOR_c 
    34 ;  
     34; 
    3535; 
    3636; @keyword MIN 
     
    4141; 
    4242; @keyword DIVISIONS 
    43 ;  
     43; 
    4444; 
    4545; @keyword CB_SUBTITLE 
    46 ;  
     46; 
    4747; 
    4848; @keyword POST 
    49 ;  
     49; 
    5050; 
    5151; @keyword _EXTRA 
     
    8484  if keyword_set(divisions) THEN  clbdiv = divisions 
    8585  nocolorbar = keyword_set(nocolorbar) + keyword_set(nofill) $ 
    86                + keyword_set(color_c)   
     86               + keyword_set(color_c) 
    8787;------------------------------------------------------------ 
    8888    def_myuniquetmpdir 
     
    9999   ENDELSE 
    100100;------------------------------------------------------------ 
    101    if keyword_set(nocolorbar) then return  
     101   if keyword_set(nocolorbar) then return 
    102102;------------------------------------------------------------ 
    103103   ancienx = !x 
  • trunk/SRC/ToBeReviewed/PLOTS/DIVERS/determineminmax.pro

    r163 r226  
    77; Determine the min and the max of a mask array 
    88; 
    9 ; @categories  
     9; @categories 
    1010; Plotting 
    1111; 
     
    1414; 
    1515; @param MASK {in}{required} 
    16 ; The mask array  
     16; The mask array 
    1717; 
    1818; @keyword MININ {type=scalar} 
     
    2222; If it is not defined, it takes the value of VRAIMAX 
    2323; 
    24 ; @keyword ZEROMIDDLE  
     24; @keyword ZEROMIDDLE 
    2525; Force the middle of the colorbar to be equal 
    2626; to 0 (force max=max(abs([min,max])) and min=-max) 
    27 ;  
     27; 
    2828; @keyword _EXTRA 
    2929; used to pass your keywords 
     
    3131; @keyword USETRI 
    3232; To force using triangulation. 
    33 ;  
     33; 
    3434; @param VRAIMIN {out} 
    3535; The min of the array 
     
    6464;----------------------------------------------------------------------------- 
    6565;----------------------------------------------------------------------------- 
    66 ; Type o fthe vertical grid: 
     66; Type of the vertical grid: 
    6767  if vargrid EQ 'W' then nz = nzw ELSE nz = nzt 
    6868; liste des points mer 
    6969  if (size(mask))[0] EQ 3 then mer = mask[*, *, 0] $ 
    7070  ELSE mer = mask 
    71 ; If key_irregular eq 1, we mask also points which are not in the geographic  
     71; If key_irregular eq 1, we mask also points which are not in the geographic 
    7272; domain defined by lon1,lon2,lat1,lat2 
    7373  if keyword_set(key_irregular) AND n_elements(glam) NE 0 AND n_elements(gphi) NE 0 then begin 
     
    8989; ma and mi : max and min on ocean points 
    9090  vraimax = max(tab[mer], min = vraimin, _extra = ex) 
    91   sameminmax = testvar(var = minin) EQ testvar(var = maxin)  
     91  sameminmax = testvar(var = minin) EQ testvar(var = maxin) 
    9292  if n_elements(maxin) EQ 0 OR sameminmax then maxin = vraimax 
    93   if n_elements(minin) EQ 0 OR sameminmax then BEGIN  
     93  if n_elements(minin) EQ 0 OR sameminmax then BEGIN 
    9494    if keyword_set(intervalle) then minin = floor(vraimin/intervalle)*intervalle $ 
    9595    ELSE minin = vraimin 
  • trunk/SRC/ToBeReviewed/PLOTS/DIVERS/placedessin.pro

    r163 r226  
    44;+ 
    55; 
    6 ; @file_comments  
     6; @file_comments 
    77; Putting into place of the drawing/ opening of the window or of the PS 
    88; 
    9 ; @categories  
     9; @categories 
    1010; Utilities 
    1111; 
     
    1313; It specify what procedure is called by PLACEDESSIN: 'plt', 'pltz' or 'pltt' 
    1414; 
    15 ; @keyword LANDSCAPE  
     15; @keyword LANDSCAPE 
    1616; Force the page or the window on the screen to be in lengthened position. 
    1717; 
    1818; @keyword LCT {type=integer} 
    19 ; It designate the number of the palette of color we want to use for the plot.  
     19; It designate the number of the palette of color we want to use for the plot. 
    2020;        
    21 ; @keyword MAP  
     21; @keyword MAP 
    2222; We use it when we want to do a projection. 
    2323; This keyword can be of two types: 
    2424;     MAP=[P0lat,P0lon,Rot]. For the description of these 3 values (see the online help of MAP_SET). 
    25 ;     /MAP: In this case, map is automatically calculated have the value:  
     25;     /MAP: In this case, map is automatically calculated have the value: 
    2626;          map = [0, (lon1+lon2)/2., 0] 
    2727; Comment: A good way to choose the type of the projection we want to do is to have a look at IDL demo: 
    2828; IDL> demo 
    2929; Then choose earth sciences and  mapping. 
    30 ; Comment2: By default it is a cylindrical projection which is effectuated (with or without the keyword map).  
     30; Comment2: By default it is a cylindrical projection which is effectuated (with or without the keyword map). 
    3131; If we want an other projection, MAP must be activated and we have to add the keyword: /nom_projection. 
    3232; For example, for a polar projection centered on the south pole: 
     
    3434; IDL> plt, tab, /stereo,map=[-90,0,0] 
    3535;        
    36 ; @keyword NOCOLORBAR  
     36; @keyword NOCOLORBAR 
    3737; We active it if we do not want the colorbar. 
    3838 
    39 ;; @keyword NOFILL  
     39;; @keyword NOFILL 
    4040; We active it if we only want contours in black and white with a white background. 
    4141; 
    42 ; @keyword NOERASE  
     42; @keyword NOERASE 
    4343; We active it to make a drawing without creating a new frame. 
    4444; 
    45 ; @keyword SMALL  
    46 ; Vector composed of 3 or 4 elements, applied to make a drawing on a  
     45; @keyword SMALL 
     46; Vector composed of 3 or 4 elements, applied to make a drawing on a 
    4747; small portion of a page or screen. It delimit the zone where the drawing will be done. 
    4848;     If there is 4 elements: 
    49 ; then is constituted of coordinates (expressed in cm located from the up and  
    50 ; left corner of the page or the window (in portrait like in landscape)) of the bottom  
     49; then is constituted of coordinates (expressed in cm located from the up and 
     50; left corner of the page or the window (in portrait like in landscape)) of the bottom 
    5151; and left corner and of the up and right corner of the drawing zone. 
    5252;     If there is 3 elements: 
    53 ; in this case, we divide the page or the screen in small[0] columns and in small[1] lines  
    54 ; the drawing made in the box numbered small[2]. The numerotation starting up and left by  
     53; in this case, we divide the page or the screen in small[0] columns and in small[1] lines 
     54; the drawing made in the box numbered small[2]. The numerotation starting up and left by 
    5555; the number 1 and then, following the writing direction. 
    56 ; By default, we make the largest drawing we can do, conserving the aspect rapport  
     56; By default, we make the largest drawing we can do, conserving the aspect rapport 
    5757; (except when REMPLI is activated). 
    58 ;  
    59 ; @keyword PORTRAIT  
     58; 
     59; @keyword PORTRAIT 
    6060; Force the page or the window to be in standing position. 
    6161; 
    62 ; @keyword POST  
     62; @keyword POST 
    6363; Make a postscript. Only works if we made one drawing on the page. 
    6464; If we make several drawing, use \@ps. 
    6565; 
    66 ; @keyword REMPLI  
     66; @keyword REMPLI 
    6767; Force the drawing to occupy the whole space defined by small. 
    6868; 
    69 ; @keyword WINDOW  
    70 ; Number of the window on which we want to do the graph (Allow to open several windows).  
     69; @keyword WINDOW 
     70; Number of the window on which we want to do the graph (Allow to open several windows). 
    7171; By default, we open 'IDL0' 
    7272; 
    73 ; @keyword CB_TITLE  
     73; @keyword CB_TITLE 
    7474; The colorbar's title 
    7575; 
    76 ; @keyword CONTOUR  
    77 ; If we want to trace contours of a different field than the one  
    78 ; whose we have the colored drawing (by example E-P in color and QSR in contours).  
     76; @keyword CONTOUR 
     77; If we want to trace contours of a different field than the one 
     78; whose we have the colored drawing (by example E-P in color and QSR in contours). 
    7979; It must be a field respecting same characteristics than the argument number one of plt. 
    8080; 
    81 ; @keyword ENDPOINTS  
    82 ; keyword specifying that we want to make a vertical cut in diagonal. Then coordinated of extremities  
    83 ; of these one are defined by the 4 elements of the vector ENDPOINTS: [x1,y1,x2,y2] which are  
    84 ; coordinates.  
     81; @keyword ENDPOINTS 
     82; keyword specifying that we want to make a vertical cut in diagonal. Then coordinated of extremities 
     83; of these one are defined by the 4 elements of the vector ENDPOINTS: [x1,y1,x2,y2] which are 
     84; coordinates. 
    8585; 
    8686; @keyword VECTEUR {type=vector} 
     
    9494; @keyword DIREC 
    9595; 't' 'x' 'y' 'z' 'xys' 'xz' 'yz' 'xyz' 'xt' 'yt' 'zt' 'xyt' 
    96 ;       'xzt' 'yzt' 'xyzt' Direction on which do averages  
     96;       'xzt' 'yzt' 'xyzt' Direction on which do averages 
    9797; 
    9898; @keyword _EXTRA 
    9999; Used to pass your keywords. 
    100100; 
    101 ; @keyword COLOR_C  
     101; @keyword COLOR_C 
    102102; To draw the contour in color instead of in black 
    103 ; with filling in color  
     103; with filling in color 
    104104; 
    105105; @param POSFENETRE {out}{type=vector} 
    106 ; It is a vector composed by 4 elements containing the position of the frame  
    107 ; containing captions and the graph in normalized coordinates.  
    108 ; Comment: To position the drawing; we have to do !p.position=posfenetre  
     106; It is a vector composed by 4 elements containing the position of the frame 
     107; containing captions and the graph in normalized coordinates. 
     108; Comment: To position the drawing; we have to do !p.position=posfenetre 
    109109; after the call of the caliber 
    110110; 
    111111; @param POSBAR {out}{type=vector} 
    112 ; Like POSFENETRE but for the color bar.  
     112; Like POSFENETRE but for the color bar. 
    113113; Same comment to position the color bar, !p.position=posbar 
    114114; 
     
    148148; 1) Determination of the size of margins (unity=number of lines or columns) 
    149149; to the left, to the right, up and down. 
    150 ; BEWARE in margebar, the last element is the right up corner  
     150; BEWARE in margebar, the last element is the right up corner 
    151151; instead of the up margin 
    152152;------------------------------------------------------------- 
     
    157157    margebar = 1.*[marge[0]+1, marge[1]+1,  marge[2]-8,  marge[2]-6] 
    158158    if keyword_set(barmarges) then margebar = margebar+barmarges 
    159   ENDIF ELSE BEGIN  
    160     nocolorbar = keyword_set(nocolorbar) + keyword_set(nofill) + keyword_set(color_c)   
     159  ENDIF ELSE BEGIN 
     160    nocolorbar = keyword_set(nocolorbar) + keyword_set(nofill) + keyword_set(color_c) 
    161161    case typedessin of 
    162162      'plt':marge = 1.*[6, 2, 4, 3] 
     
    186186; Portrait or landscape 
    187187;-------------------------------------------------------------- 
    188   IF NOT keyword_set(noerase) THEN BEGIN  
     188  IF NOT keyword_set(noerase) THEN BEGIN 
    189189    CASE 1 OF 
    190190      n_elements(portrait) NE 0:key_portrait = portrait 
     
    192192      ELSE: 
    193193    ENDCASE 
    194   ENDIF  
     194  ENDIF 
    195195;-------------------------------------------------------------- 
    196196; What type of aspect rapport (it will be crushed if YXASPECT exist) 
     
    218218;------------------------------------------------------------ 
    219219  case 1 of 
    220 ; case of the first drawing on a postcript 
     220; case of the first drawing on a postscript 
    221221    keyword_set(post) AND !d.name ne 'PS':openps, _extra = ex 
    222222; case of the first drawing on a screen 
     
    236236      windsize = givewindowsize() 
    237237      window, window, xsize = windsize[0], ysize = windsize[1],  retain = 2, _extra = ex 
    238 ; When we used colors which are coded on 24bit, we can not stipulate the background color  
     238; When we used colors which are coded on 24bit, we can not stipulate the background color 
    239239; of a window thanks to !p.background, so we have to to this: 
    240240;          if !d.n_colors gt 256 then begin 
  • trunk/SRC/ToBeReviewed/PLOTS/DIVERS/restoreatt.pro

    r163 r226  
    55; 
    66; @file_comments 
    7 ; Allows to reattribuate global variables associated with a field  
     7; Allows to reattribute global variables associated with a field 
    88; when we give a structure created by saveatt.pro by example. 
    99; 
    10 ; @categories  
     10; @categories 
    1111; Utilities 
    1212; 
    1313; @param STRUCT {in}{required} 
    14 ; a structure like the one who read litchamp.  
     14; a structure like the one who read litchamp. 
    1515;        See IDL> xhelp,'litchamp' 
    1616; 
     
    1919; 
    2020; @restrictions 
    21 ; Change the value if global variables attribute of a field: vargrid,  
     21; Change the value if global variables attribute of a field: vargrid, 
    2222; varname, varunit, vardate, varexp , valmask and time. 
    2323; 
     
    4747         'e':varexp = struct.(i) 
    4848         'm':valmask = struct.(i) 
    49          'd':BEGIN  
    50             if size(struct.(i),/type) EQ 7 THEN BEGIN  
     49         'd':BEGIN 
     50            if size(struct.(i),/type) EQ 7 THEN BEGIN 
    5151               vardate = struct.(i) 
    5252            ENDIF ELSE BEGIN 
     
    5555            ENDELSE 
    5656         end 
    57          ELSE:BEGIN  
     57         ELSE:BEGIN 
    5858            ras = report('Le nom '+nomelements[i]+' ne correspont a aucun element reconnu de la structure. !C cf. IDL> xhelp, ''litchamp''') 
    5959         end 
  • trunk/SRC/ToBeReviewed/PLOTS/LABEL/label.pro

    r163 r226  
    1313; Number of the type of the label we want to trace 
    1414;        
    15 ; @param MIN {in}{required}  
     15; @param MIN {in}{required} 
    1616; Smallest value for the drawing of the contour. 
    1717; 
     
    2020; 
    2121; @keyword INTERVALLE {default=20} 
    22 ; Value of an interval between two isolines. By default, it is calculated to  
     22; Value of an interval between two isolines. By default, it is calculated to 
    2323; draw 20 isolines. In all cases, this keyword must be returned have a nice 
    2424; caption. If levels do not contain regular intervals, put it at -1. 
     
    2929; @param NCONTOUR {out} 
    3030; Number of contour to be drawn. 
    31 ;  
     31; 
    3232; @param LEVEL_Z2D {out} 
    3333; Vector containing values of contours we draw. 
     
    3939; common.pro 
    4040; 
    41 ; @history  
     41; @history 
    4242; Sebastien Masson (smasson\@lodyc.jussieu.fr) 
    4343;                       7/5/98 
    4444; 
    45 ; @version  
     45; @version 
    4646; $Id$ 
    4747; 
     
    8686         ncontour  = fix((max-min)/intervalle) 
    8787         ncontour = 1 > ncontour 
    88          level_z2d = min + intervalle*findgen(Ncontour)  
     88         level_z2d = min + intervalle*findgen(Ncontour) 
    8989         colnumb   = ncoul*(findgen(Ncontour))/Ncontour+ncoul/(2*ncontour) 
    9090         max=level_z2d[Ncontour-1]+intervalle 
  • trunk/SRC/ToBeReviewed/PLOTS/VECTEUR/vecteur.pro

    r163 r226  
    11;+ 
    2 ; @file_comments  
    3 ;  
    4 ;  
     2; @file_comments 
     3; 
     4; 
    55; @categories 
    6 ;  
    7 ;  
    8 ; @param ANGLE  
    9 ; 
     6; 
     7; 
     8; @param ANGLE 
    109; 
    1110; @returns 
    12 ;  
    13 ;  
     11; 
    1412; @restrictions 
    15 ;  
    16 ;  
     13; 
    1714; @examples 
    1815; 
    19 ; 
    2016; @history 
    21 ;  
    2217; 
    2318; @version 
     
    2924; by rapport at the x axis and which must do 1 cm on the drawing. 
    3025; Angle can be an array. 
    31 ;  
     26; 
    3227; 
    3328; 
     
    5348; 
    5449;+ 
    55 ; @file_comments  
    56 ;  
    57 ;  
     50; @file_comments 
     51; 
     52; 
    5853; @categories 
    59 ;  
    60 ;  
     54; 
     55; 
    6156; @param U 
    6257; 
     
    6459; @param V 
    6560; 
    66 ; 
    67 ; @param W  
    68 ; 
     61; @param W 
    6962; 
    7063; @restrictions 
    71 ;  
    72 ;  
     64; 
    7365; @examples 
    7466; 
    75 ; 
    7667; @history 
    77 ;  
    7868; 
    7969; @version 
     
    8777  compile_opt idl2, strictarrsubs 
    8878; 
    89    IF n_elements(w) NE 0 THEN BEGIN  
     79   IF n_elements(w) NE 0 THEN BEGIN 
    9080      norme = sqrt(u^2.+v^2.+w^2.) 
    9181      ind = where(norme NE 0) 
     
    9888      u[ind] = u[ind]/norme[ind] 
    9989      v[ind] = v[ind]/norme[ind] 
    100    ENDELSE  
     90   ENDELSE 
    10191END 
    10292;------------------------------------------------------------ 
     
    111101; and is position on the sphere). 
    112102; 
    113 ; @categories  
     103; @categories 
    114104; Graphics 
    115 ;  
     105; 
    116106; @param COMPOSANTEU {in}{required} 
    117 ; It is the u component of the vector to be traced. This 2d array has the  
     107; It is the u component of the vector to be traced. This 2d array has the 
    118108; same dimension that reduitindice2d (see further) 
    119 ;  
     109; 
    120110; @param COMPOSANTEV {in}{required} 
    121 ; It is the v component of the vector to be traced. This 2d array has the  
     111; It is the v component of the vector to be traced. This 2d array has the 
    122112; same dimension that reduitindice2d (see further) 
    123 ;  
     113; 
    124114; @param NORMEVECTEUR 
    125115; 
    126116; 
    127117; @param INDICE2D  {in}{required} 
    128 ; It in an index allowing to to pass from an jpi or jpj array to the zoom  
     118; It in an index allowing to to pass from an jpi or jpj array to the zoom 
    129119; on which we do the drawing 
    130 ;  
     120; 
    131121; @param REDUITINDICE2D {in}{required} 
    132 ; It is an index allowing to pass from an array defined by indice2d to the  
    133 ; array for which we really have vectors to be traced (to be clear, it is  
     122; It is an index allowing to pass from an array defined by indice2d to the 
     123; array for which we really have vectors to be traced (to be clear, it is 
    134124; for example when we trace only one vector on two). 
    135125; 
    136126; @keyword CMREF {default=between .5 and 1.5 cm} 
    137 ; The length in cm that must measure the arrow normed normeref. By default,  
     127; The length in cm that must measure the arrow normed normeref. By default, 
    138128; it is adjusted to other drawing and included between .5 and 1.5 cm. 
    139129; 
    140130; @keyword MISSING 
    141 ; The value of a missing value. Do not use this keyword. Fixed at 1e5 by  
     131; The value of a missing value. Do not use this keyword. Fixed at 1e5 by 
    142132; ajoutvect.pro 
    143 ;       
    144 ; @keyword NORMEREF  
     133; 
     134; @keyword NORMEREF 
    145135; The norme of the reference arrow. 
    146136; 
    147137; @keyword VECTCOLOR {default=0} 
    148138; The color of the arrow. Black by default (color 0) 
    149 ;  
     139; 
    150140; @keyword VECTTHICK {default=1} 
    151 ; The thick of the arrow.  
     141; The thick of the arrow. 
    152142; 
    153143; @keyword VECTREFPOS 
    154 ; Vector composed of 2 elements specifying the position on DATA coordinates  
    155 ; from the beginning of the reference vector. By default at the right bottom  
     144; Vector composed of 2 elements specifying the position on DATA coordinates 
     145; from the beginning of the reference vector. By default at the right bottom 
    156146; of the drawing. 
    157147; 
     
    161151; @keyword NOVECTREF 
    162152; To delete the display of the reference vector. 
    163 ;  
     153; 
    164154; @keyword _EXTRA 
    165 ; Used to pass your keywords  
    166 ; 
    167 ; @uses  
     155; Used to pass your keywords 
     156; 
     157; @uses 
    168158; common.pro 
    169159; 
     
    179169; 
    180170; @version 
    181 ; $Id$  
     171; $Id$ 
    182172; 
    183173;- 
     
    209199   msk = replicate(1, nx, ny) 
    210200   if keyword_set(missing) then terre = where(abs(zu) GE missing/10) ELSE terre = -1 
    211    if terre[0] NE -1  then BEGIN  
     201   if terre[0] NE -1  then BEGIN 
    212202      msk[terre] = 0 
    213203      zu[terre] = 0 
     
    216206   ENDIF 
    217207; 
    218 ; Stage 1:  
    219 ; 
    220 ; Given that the directions and the sense that the vector has on the sphere,  
    221 ; we have to try to determinate this direction and the sense that the vector  
     208; Stage 1: 
     209; 
     210; Given that the directions and the sense that the vector has on the sphere, 
     211; we have to try to determinate this direction and the sense that the vector 
    222212; will have on the screen once it will have been projected. 
    223213; 
    224 ; In theory: on the sphere, a vector in a given point has for direction the  
    225 ; tangent at the circle passing by the center of the Earth and by the vector.  
     214; In theory: on the sphere, a vector in a given point has for direction the 
     215; tangent at the circle passing by the center of the Earth and by the vector. 
    226216; So, find the direction once the projection is done, it is find the tangent 
    227 ; to the curve representing the projection of the circle on the 2d plan at the  
    228 ; point representing the projection of the starting point of the shere on the  
     217; to the curve representing the projection of the circle on the 2d plan at the 
     218; point representing the projection of the starting point of the sphere on the 
    229219; 2d plan. 
    230 ;  
    231 ; In practice we do no know the definition of the curve given by the projection  
     220; 
     221; In practice we do no know the definition of the curve given by the projection 
    232222; of a circle so find its tangente in a point... 
    233223; 
    234224; What we do: 
    235225; In a 3d cartesian reference, 
    236 ;       a) We find coorinates of the point T (starting of the arrow) situed  
     226;       a) We find coordinates of the point T (starting of the arrow) situed 
    237227;       on the sphere. 
    238228;       b) To each point T, we determine local directions defined by the grid 
    239229;       on this point and on which coordinates (u,v) of the vector refer to. 
    240230;       These local directions are defined by gradients of glam and gphi. Once 
    241 ;       we have obtain these directions, we considare them like orthogonal and 
     231;       we have obtain these directions, we consider them like orthogonal and 
    242232;       by norming them, we build an orthonormal reference (nu,nv) on which 
    243233;       coordinates (u,v) of the vector refer to. In the starting 3d cartesian 
     
    254244;       e) We pass coordinates of these points in normalized coordinates, then 
    255245;       in polar coordinates in order to find the angle and the direction they 
    256 ;       dertermine on the drawing. 
     246;       determine on the drawing. 
    257247; 
    258248; 
     
    280270; points u[i,j] and u[i-1,j] (resp v[i,j] and v[i,j-1]) which define, for each 
    281271; point on the sphere, local directions associated with u and v. These vectors 
    282 ; define a local orthonormal reference.  
    283 ; These vectors are built in a cartesian reference (cv_coord). We have choose a  
     272; define a local orthonormal reference. 
     273; These vectors are built in a cartesian reference (cv_coord). We have choose a 
    284274; unity radius of the Earth (unit). 
    285275; 
     
    294284   uy = reform(r[1, *], nxgd, nygd) 
    295285   uz = reform(r[2, *], nxgd, nygd) 
    296 ; calculation of nu  
     286; calculation of nu 
    297287   nux = ux-shift(ux, 1, 0) 
    298288   nuy = uy-shift(uy, 1, 0) 
     
    311301   IF finite(glamv[0]*gphiv[0]) NE 0 THEN $ 
    312302   coord_sphe = transpose([ [(glamv[indice2d])[*]], [(gphiv[indice2d])[*]], [radius[*]] ]) $ 
    313    ELSE coord_sphe = transpose([ [(glamt[indice2d])[*]], [(gphif[indice2d])[*]], [radius[*]] ])                 
     303   ELSE coord_sphe = transpose([ [(glamt[indice2d])[*]], [(gphif[indice2d])[*]], [radius[*]] ]) 
    314304   r = cv_coord(from_sphere=coord_sphe,/to_rect,/degrees) 
    315305; coordinates of points of the grid in cartesian. 
     
    317307   vy = reform(r[1, *], nxgd, nygd) 
    318308   vz = reform(r[2, *], nxgd, nygd) 
    319 ; calcul of nv  
     309; calcul of nv 
    320310   nvx = vx-shift(vx, 0, 1) 
    321311   nvy = vy-shift(vy, 0, 1) 
     
    383373; Stage 1, e) 
    384374; 
    385    r = convert_coord(glam,gphi,/data,/to_normal)  
     375   r = convert_coord(glam,gphi,/data,/to_normal) 
    386376   x0 = r[0, *]                 ; normal coordinates of the beginning of the array. 
    387    y0 = r[1, *]                 ;  
    388     
    389    r = convert_coord(glam1,gphi1,/data,/to_normal)  
     377   y0 = r[1, *]                 ; 
     378 
     379   r = convert_coord(glam1,gphi1,/data,/to_normal) 
    390380   x1 = r[0, *]                 ; normal coordinates of the ending of the array (Before scaling). 
    391    y1 = r[1, *]                 ;  
     381   y1 = r[1, *]                 ; 
    392382; 
    393383; tests to avoid that arrows be drawing out of the domain. 
     
    397387   if out[0] NE -1 THEN x0[out] = !values.f_nan 
    398388; 
    399 ; Following projections, there may are points at NaN when we pass in normal coordinates.  
     389; Following projections, there may are points at NaN when we pass in normal coordinates. 
    400390; We delete these points. 
    401391; 
     
    422412; Now we take care of the norme... 
    423413; 
    424 ; Automatic putting at the scale  
    425 ; 
    426    if NOT keyword_set(cmref) then BEGIN  
     414; Automatic putting at the scale 
     415; 
     416   if NOT keyword_set(cmref) then BEGIN 
    427417      mipgsz = min(page_size, max = mapgsz) 
    428418      sizexfeuille = mipgsz*key_portrait+mapgsz*(1-key_portrait) 
     
    438428   cm = 1.*normeref/cmref 
    439429; 
    440 ; We modify the array norme to an element having the value cm be represented  
    441 ; by a trait of lenght 1 cm on the paper. Norme contain the norme of vectors  
     430; We modify the array norme to an element having the value cm be represented 
     431; by a trait of lenght 1 cm on the paper. Norme contain the norme of vectors 
    442432; we want to draw. 
    443433; 
     
    446436; 
    447437; Stage 3 
    448 ; Now that we have the angle and the norme, we recuperate coordinates in  
     438; Now that we have the angle and the norme, we recuperate coordinates in 
    449439; rectangular and we draw arrows. 
    450440; 
     
    467457; 
    468458   if NOT keyword_set(novectref) then BEGIN 
    469       dx = cmref*cv_cm2normal(0) ; Lenght of the vector of reference in normalzed coordinates. 
     459      dx = cmref*cv_cm2normal(0) ; Length of the vector of reference in normalzed coordinates. 
    470460      if keyword_set(vectrefformat) then $ 
    471461       normelegende = strtrim(string(normeref, format = vectrefformat), 1)+' ' $ 
     
    490480; 
    491481 
    492    if keyword_set(key_performance) NE 0 THEN print, 'temps vecteur', systime(1)-tempsun  
     482   if keyword_set(key_performance) NE 0 THEN print, 'temps vecteur', systime(1)-tempsun 
    493483;------------------------------------------------------------ 
    494484;------------------------------------------------------------ 
    495485   return 
    496 END  
    497  
    498  
    499  
    500  
     486END 
     487 
     488 
     489 
     490 
  • trunk/SRC/ToBeReviewed/PLOTS/axe.pro

    r209 r226  
    88; pltz and pltt 
    99; 
    10 ; @categories  
     10; @categories 
    1111; Graphics 
    1212; 
    1313; @param COUPE {type=string} 
    14 ; It designate the type of cut to which the axes we create  
     14; It designate the type of cut to which the axes we create 
    1515; must report. For example: 'xy','xt'... 
    1616; 
    1717; @param TEMPSMIN {in}{required} 
    18 ; In the case where we do cut containing the time dimension, we have  
     18; In the case where we do cut containing the time dimension, we have 
    1919; to specify the beginning of the time's axis in julian days. 
    2020; 
    2121; @param TEMPSMAX {in}{required} 
    22 ; In the case where we do cut containing the time dimension, we have  
     22; In the case where we do cut containing the time dimension, we have 
    2323; to specify the end of the time's axis in julian days. 
    2424; 
    25 ; @keyword SIN  
     25; @keyword SIN 
    2626; activated when we trace in sinus of the latitude 
    2727; 
    2828; @keyword SEPDATE {type=string} 
    29 ; It separate the different constituents of the date. By default,  
    30 ; it is a return to the line when we do a 'yt', 'zt' or a 't'.  
    31 ; In the other cases, it is a blank.  
     29; It separate the different constituents of the date. By default, 
     30; it is a return to the line when we do a 'yt', 'zt' or a 't'. 
     31; In the other cases, it is a blank. 
    3232; 
    3333; @keyword DIGITSYEAR 
     
    3636; information on %Z and %Y. 
    3737; 
    38 ; @keyword _EXTRA  
     38; @keyword _EXTRA 
    3939; used to pass your keywords 
    40 ;  
     40; 
    4141; @uses 
    4242; common.pro 
     
    6565   tempsun = systime(1)         ; pour key_performance 
    6666;-------------------------------------------------------------- 
    67 ; Management of ticks of the time axis in the case of TEMPSMIN  
    68 ; and TEMPSMAX are definied 
     67; Management of ticks of the time axis in the case of TEMPSMIN 
     68; and TEMPSMAX are defined 
    6969;-------------------------------------------------------------- 
    7070   divday = 0 
     
    9494          ymax-ymin+1 GT 10: BEGIN & freq = 2. & tminor = 4 & datfmt = '%M'+sep+fmtyr & end 
    9595          ELSE: BEGIN & freq = 1. & tminor = 4 & datfmt = '%M'+sep+fmtyr & end 
    96           ENDCASE  
     96          ENDCASE 
    9797          nticks = ceil((ymax-ymin)/freq) + 2 
    9898          yminf = (floor(ymin/freq))*freq 
     
    174174          for mn = 0, nticks-1 do ticknom[mn] = julday(mmin, dmin, ymin, hmin, mnminf + freq*mn, 0, _EXTRA = ex) 
    175175          ticknom = ticknom[where(ticknom GE tempsmin AND ticknom LE tempsmax, nticks)] 
    176           datfmt = '%H:%I'  
     176          datfmt = '%H:%I' 
    177177        END 
    178178; second base 
     
    201201      dummy = label_date(0, 0, 0, DATE_FORMAT = datfmt, _EXTRA = ex) 
    202202      if chkstru(ex, 'DATE_FORMAT') then ex.DATE_FORMAT = '' 
    203    ENDIF  
     203   ENDIF 
    204204;-------------------------------------------------------------- 
    205205; Definition of axes parameters case by case 
    206206;-------------------------------------------------------------- 
    207207   case coupe of 
    208       'pltv':BEGIN  
     208      'pltv':BEGIN 
    209209        dtasize = tempsmin 
    210210         !x.range = [-0.5, dtasize[0] - 0.5] 
    211          !y.range = [-0.5, dtasize[1] - 0.5]  
     211         !y.range = [-0.5, dtasize[1] - 0.5] 
    212212         if keyword_set(reverse_x) then !x.range=reverse(!x.range) 
    213213         if keyword_set(reverse_y) then !y.range=reverse(!y.range) 
     
    215215         !y.title = 'ny' 
    216216      END 
    217       'xy':BEGIN  
     217      'xy':BEGIN 
    218218         if keyword_set(reverse_x) then !x.range=[lon2,lon1] ELSE !x.range=[lon1,lon2] 
    219219         if keyword_set(reverse_y) then !y.range=[lat2,lat1] ELSE !y.range=[lat1,lat2] 
     
    221221         IF key_onearth THEN !y.tickformat='lataxe' 
    222222      END 
    223       'yz':BEGIN  
     223      'yz':BEGIN 
    224224         if keyword_set(reverse_x) then !x.range=[lat2,lat1] ELSE !x.range=[lat1,lat2] 
    225225         if keyword_set(reverse_y) then !y.range=[0, -1] ELSE !y.range = [-1, 0] 
     
    227227; number of ticks by default 
    228228            plot, [0], [0], /noerase, /nodata, xtick_get = xaxe 
    229 ; We increase this number to it be around 10  
     229; We increase this number to it be around 10 
    230230            ticks = n_elements(xaxe)-1 
    231231            ticks = ticks*[1, 2, 4, 8] 
     
    241241         endif 
    242242      end 
    243       'xz':BEGIN  
     243      'xz':BEGIN 
    244244         if keyword_set(reverse_x) then !x.range=[lon2,lon1] ELSE !x.range=[lon1,lon2] 
    245245         if keyword_set(reverse_y) then !y.range=[0, -1] ELSE !y.range = [-1, 0] 
     
    252252;          result = LABEL_DATE(DATE_FORMAT = '%M'+sep+fmtyr) 
    253253;          !y.tickformat='LABEL_DATE' 
    254          !y.tickname = LABEL_DATE(1, 0,ticknom,_EXTRA = ex)  
     254         !y.tickname = LABEL_DATE(1, 0,ticknom,_EXTRA = ex) 
    255255         !y.ticklen=1. 
    256256         !y.gridstyle=2 
     
    266266         if keyword_set(reverse_y) then !y.range=[lat2, lat1] ELSE !y.range=[lat1,lat2] 
    267267         IF key_onearth THEN !y.tickformat='lataxe' 
    268          !x.tickname = LABEL_DATE(0, 0,ticknom,_EXTRA = ex)  
     268         !x.tickname = LABEL_DATE(0, 0,ticknom,_EXTRA = ex) 
    269269         !x.ticklen=1. 
    270270         !x.gridstyle=2 
     
    278278         if keyword_set(reverse_x) then !x.range = [tempsmax,tempsmin]-tempsmin $ 
    279279         ELSE !x.range=[tempsmin,tempsmax]-tempsmin 
    280          if vargrid EQ 'W' then gdep=gdepw[0:nzw-1] ELSE gdep=gdept[0:nzt-1]  
    281          !x.tickname = LABEL_DATE(0, 0,ticknom,_EXTRA = ex)  
     280         if vargrid EQ 'W' then gdep=gdepw[0:nzw-1] ELSE gdep=gdept[0:nzt-1] 
     281         !x.tickname = LABEL_DATE(0, 0,ticknom,_EXTRA = ex) 
    282282         !x.ticklen=1. 
    283283         !x.gridstyle=2 
     
    291291         if keyword_set(reverse_x) then !x.range = [tempsmax,tempsmin]-tempsmin $ 
    292292         ELSE !x.range=[tempsmin,tempsmax]-tempsmin 
    293          !x.tickname = LABEL_DATE(0, 0,ticknom,_EXTRA = ex)  
     293         !x.tickname = LABEL_DATE(0, 0,ticknom,_EXTRA = ex) 
    294294         !x.ticklen=1. 
    295295         !x.gridstyle=2 
     
    308308; Number of ticks by default 
    309309            plot, [0], [0], /nodata, /noerase, xstyle = 5, ystyle = 5, xtick_get = xaxe 
    310 ; We increase this number to it be around 10  
     310; We increase this number to it be around 10 
    311311            ticks = n_elements(xaxe)-1 
    312312            ticks = ticks*[1, 2, 4, 8] 
     
    324324      END 
    325325      'z' : begin 
    326 ;          if vargrid EQ 'W' then gdep=gdepw[0:nzw-1] ELSE gdep=gdept[0:nzt-1]  
     326;          if vargrid EQ 'W' then gdep=gdepw[0:nzw-1] ELSE gdep=gdept[0:nzt-1] 
    327327;          if keyword_set(reverse_y) then !y.range=[gdep[0], gdep[n_elements(gdep)-1]] $ 
    328328;          ELSE !y.range=[gdep[n_elements(gdep)-1], gdep[0]] 
    329       END  
     329      END 
    330330   endcase 
    331    if keyword_set(key_performance) THEN print, 'temps axe', systime(1)-tempsun  
     331   if keyword_set(key_performance) THEN print, 'temps axe', systime(1)-tempsun 
    332332   return 
    333333end 
  • trunk/SRC/ToBeReviewed/POSTSCRIPT/calibre.pro

    r222 r226  
    44;+ 
    55; @file_comments 
    6 ; From a rapport of aspect and values (in line of character) of different margins,  
    7 ; it calculate POSFENETRE and POSBAR which serve to place the drawing and the color  
    8 ; bar thanks to !p.position on a leaf or a screen output whose the window has the same  
     6; From a rapport of aspect and values (in line of character) of different margins, 
     7; it calculate POSFENETRE and POSBAR which serve to place the drawing and the color 
     8; bar thanks to !p.position on a leaf or a screen output whose the window has the same 
    99; proportion. 
    1010; 
    11 ; @categories  
     11; @categories 
    1212; Graphics 
    1313; 
    14 ;  
    1514; @param RAPPORTYX {in}{required} 
    16 ; Scale rapport between the length of the y axis and the x one. For example,  
     15; Scale rapport between the length of the y axis and the x one. For example, 
    1716; for an xy map: RAPPORTYX=(lat2-lat1)/(lon2-lon1) 
    1817; 
    1918; @param MARGE {in}{required}{type=vector} 
    20 ; Vector made of 4 elements containing the size of the left, right, up and  
     19; Vector made of 4 elements containing the size of the left, right, up and 
    2120; bottom margin having to surround the graph. All is measured in lines of characters. 
    2221; 
    2322; @param MARGEBAR {in}{required}{type=vector} 
    24 ; Vector made of 4 elements containing the size of the left, right and bottom  
    25 ; margin and -BEWARE- the last element is this time the position of the right up  
     23; Vector made of 4 elements containing the size of the left, right and bottom 
     24; margin and -BEWARE- the last element is this time the position of the right up 
    2625; corner, having to surround the color bar. All is measured in lines of characters. 
    2726; 
    2827; @param SMALLDRAW {in}{required}{type=vector} 
    2928; 2 possibilities: 
    30 ;    It is vector made of 4 elements giving (in portrait or landscape) the position  
    31 ; of the frame in which the drawing must go in. This position is given by coordinates  
    32 ; of the 2 corners of the frame: in the left bottom and the right up. It is always  
    33 ; (for a postscript or a screen output) express in cm, the origin being the  
     29;    It is vector made of 4 elements giving (in portrait or landscape) the position 
     30; of the frame in which the drawing must go in. This position is given by coordinates 
     31; of the 2 corners of the frame: in the left bottom and the right up. It is always 
     32; (for a postscript or a screen output) express in cm, the origin being the 
    3433; left bottom corner. 
    35 ;    It is a vector made of 3 elements giving the number of column to be done in the  
    36 ; drawing, the number of line and the number of the case the number have to occupy  
    37 ; (see matlab). For example, to do 6 drawing in 3 columns and 2 lines and occupy  
     34;    It is a vector made of 3 elements giving the number of column to be done in the 
     35; drawing, the number of line and the number of the case the number have to occupy 
     36; (see matlab). For example, to do 6 drawing in 3 columns and 2 lines and occupy 
    3837; the 4th case, small=[2,3,4] 
    3938; 
    4039; @keyword REMPLI 
    41 ; Force the drawing to occupy the biggest possible place defined by  
     40; Force the drawing to occupy the biggest possible place defined by 
    4241; SMALLDRAW without respect the rapport y on x. 
    4342; 
    4443; @keyword YXASPECT 
    45 ; Force the rapport y on x to take the value RAPPORTYX*YXASPECT.  
     44; Force the rapport y on x to take the value RAPPORTYX*YXASPECT. 
    4645; This keyword can be used in 2 cases: 
    47 ;   1) YXASPECT=1 : force RAPPORTYX to be respected otherwise, Calibre take the  
    48 ;   initiative to change it a little in the case of the aspect rapport of SMALL  
    49 ;   is too different of the one of SMALLDRAW.  
    50 ;   2) YXASPECT=n : multiply by n the aspect rapport given by default.  
     46;   1) YXASPECT=1 : force RAPPORTYX to be respected otherwise, Calibre take the 
     47;   initiative to change it a little in the case of the aspect rapport of SMALL 
     48;   is too different of the one of SMALLDRAW. 
     49;   2) YXASPECT=n : multiply by n the aspect rapport given by default. 
    5150;   For example in plt, RAPPORTYX is calculated to the reference be orthonormal, 
    5251;   to have a reference where the y axis is 2 time bigger than the x one, YXASPECT=2. 
    5352;        
    54 ; @keyword PORTRAIT        
     53; @keyword PORTRAIT 
    5554; Force the page or the window to be in standing position. 
    56 ;  
    57 ; @keyword LANDSCAPE        
     55; 
     56; @keyword LANDSCAPE 
    5857; Force the page or the window on the screen to be in lengthened position. 
    59 ;  
     58; 
    6059; @keyword _EXTRA 
    6160; Used to pass your keywords 
    6261; 
    6362; @param POSFENETRE {type=vector} 
    64 ; It is a vector made of 4 elements containing the position of the frame  
    65 ; containing captions + the graph in normalized coordinates.  
    66 ; Comment: to position the drawing, we have to do !p.position=POSFENETRE  
     63; It is a vector made of 4 elements containing the position of the frame 
     64; containing captions + the graph in normalized coordinates. 
     65; Comment: to position the drawing, we have to do !p.position=POSFENETRE 
    6766; after the call of calibre. 
    6867; 
    6968; @param POSBAR {type=vector} 
    70 ; See POSFENTRE but for the color bar. Same comment to position the color bar, !p.position=POSBAR 
     69; See POSFENTERE but for the color bar. Same comment to position the color bar, !p.position=POSBAR 
    7170; 
    7271; @uses 
     
    103102   if keyword_set(landscape) then key_portrait=0 
    104103   if keyword_set(yxaspect) then begin 
    105       rapportyx=rapportyx*yxaspect  
     104      rapportyx=rapportyx*yxaspect 
    106105      test2=0 
    107106   endif else begin 
     
    109108      test2=1 
    110109    ENDELSE 
    111 ;  
     110; 
    112111    mipgsz = min(page_size, max = mapgsz) 
    113112;------------------------------------------------------------ 
     
    133132      numlig = numero/nbrecol 
    134133      numcol = numero-numlig*nbrecol 
    135       bas = mipgsz*key_portrait+mapgsz*(1-key_portrait)  
    136       cote = mapgsz*key_portrait+mipgsz*(1-key_portrait)  
     134      bas = mipgsz*key_portrait+mapgsz*(1-key_portrait) 
     135      cote = mapgsz*key_portrait+mipgsz*(1-key_portrait) 
    137136      poscol = page_margins[0]+findgen(nbrecol+1)*(1.*(bas-(page_margins[0]+page_margins[1]))/nbrecol) 
    138137      poslig = cote-page_margins[3]-findgen(nbrelig+1)*(1.*(cote-(page_margins[2]+page_margins[3]))/nbrelig) 
     
    166165   else rapportmax=1.*(small-marge[2]-marge[0])/(big-marge[3]-marge[1]) 
    167166;------------------------------------------------------------ 
    168 ; If YXASPECT is not specified, we modify the value of RAPPORTYX  
     167; If YXASPECT is not specified, we modify the value of RAPPORTYX 
    169168; to it match better with the leaf's proportions. 
    170169;------------------------------------------------------------ 
     
    189188; in the case where we do a Landscape: 
    190189;------------------------------------------------------------ 
    191    if key_portrait eq 0 then begin        
     190   if key_portrait eq 0 then begin 
    192191      if keyword_set(rempli) then begin 
    193192         xs=big 
     
    220219; In the case where we do a portrait: 
    221220;------------------------------------------------------------ 
    222    else begin        
     221   else begin 
    223222      if keyword_set(rempli) then begin 
    224223         xs=small 
     
    258257                      ,-margebar[1]/bas,(-ys+margebar[3])/cote ] 
    259258;------------------------------------------------------------ 
    260    if keyword_set(key_performance) THEN print, 'temps calibre', systime(1)-tempsun  
     259   if keyword_set(key_performance) THEN print, 'temps calibre', systime(1)-tempsun 
    261260 
    262261  IF NOT keyword_set(key_forgetold) THEN BEGIN 
    263262   @updateold 
    264   ENDIF  
    265    
     263  ENDIF 
     264 
    266265   return 
    267266end 
  • trunk/SRC/ToBeReviewed/STATISTICS/c_timecorrelate.pro

    r163 r226  
    11;+ 
    22; @file_comments 
    3 ;  
     3; 
    44; 
    55; @categories 
     
    6565; This function computes the "time cross correlation" Pxy(L) or 
    6666; the "time cross covariance" between 2 arrays (this is some 
    67 ; kind of c_correlate but for multidimenstionals arrays) as a 
     67; kind of c_correlate but for multidimensional arrays) as a 
    6868; function of the lag (L). 
    6969; 
     
    8585; 
    8686; @keyword COVARIANCE 
    87 ; If set to a non-zero value, the sample cross  
     87; If set to a non-zero value, the sample cross 
    8888; covariance is computed. 
    8989; 
     
    9393; 
    9494; @examples 
    95 ;  
     95; 
    9696;       Define two n-element sample populations. 
    9797;         x = [3.73, 3.67, 3.77, 3.83, 4.67, 5.87, 6.70, 6.97, 6.40, 5.57] 
     
    108108;       - 01/03/2000 Sebastien Masson (smasson\@lodyc.jussieu.fr) 
    109109;       Based on the C_CORRELATE procedure of IDL 
    110 ;       - August 2003 Sebastien Masson  
     110;       - August 2003 Sebastien Masson 
    111111;       update according to the update made in C_CORRELATE by 
    112112;       W. Biagiotti and available in IDL 5.5 
     
    122122FUNCTION c_timecorrelate, X, Y, Lag, Covariance = Covariance, Double = Double 
    123123 
    124 ;Compute the sample cross correlation or cross covariance of  
     124;Compute the sample cross correlation or cross covariance of 
    125125;(Xt, Xt+l) and (Yt, Yt+l) as a function of the lag (l). 
    126126 
     
    138138   if nt lt 2 then $ 
    139139    MESSAGE, "Time dimension of X and Y arrays must contain 2 or more elements." 
    140     
     140 
    141141;If the DOUBLE keyword is not set then the internal precision and 
    142142;result are identical to the type of input. 
     
    168168   if KEYWORD_SET(Covariance) eq 0 then begin ;Compute Cross  Crossation. 
    169169      for k = 0, nLag-1 do begin 
    170          if Lag[k] ge 0 then BEGIN  
     170         if Lag[k] ge 0 then BEGIN 
    171171            case NDim of 
    172172               1: Cross[k] = TimeCross_Cov(Xd, Yd, Lag[k], nT, Ndim, Double = Double) 
    173173               2: Cross[*, k] = TimeCross_Cov(Xd, Yd, Lag[k], nT, Ndim, Double = Double) 
    174174               3: Cross[*, *, k] = TimeCross_Cov(Xd, Yd, Lag[k], nT, Ndim, Double = Double) 
    175                4: Cross[*, *, *, k] = TimeCross_Cov(Xd, Yd, Lag[k], nT, Ndim, Double = Double)  
     175               4: Cross[*, *, *, k] = TimeCross_Cov(Xd, Yd, Lag[k], nT, Ndim, Double = Double) 
    176176             endcase 
    177          ENDIF else BEGIN  
     177         ENDIF else BEGIN 
    178178            case NDim of 
    179179               1: Cross[k] = TimeCross_Cov(Yd, Xd, ABS(Lag[k]), nT, Ndim, Double = Double) 
     
    182182               4: Cross[*, *, *, k] = TimeCross_Cov(Yd, Xd, ABS(Lag[k]), nT, Ndim, Double = Double) 
    183183             endcase 
    184          ENDELSE  
     184         ENDELSE 
    185185       ENDFOR 
    186186       div = sqrt(TimeCross_Cov(Xd, Xd, 0L, nT, Ndim, Double = Double, /zero2nan) * $ 
     
    196196               4: Cross[*, *, *, k] = TimeCross_Cov(Xd, Yd, Lag[k], nT, Ndim, Double = Double) / nT 
    197197            ENDCASE 
    198          ENDIF else BEGIN  
     198         ENDIF else BEGIN 
    199199            case NDim of 
    200200               1: Cross[k] = TimeCross_Cov(yd, xd, ABS(Lag[k]), nT, Ndim, Double = Double) / nT 
     
    203203               4: Cross[*, *, *, k] = TimeCross_Cov(yd, xd, ABS(Lag[k]), nT, Ndim, Double = Double) / nT 
    204204            ENDCASE 
    205          ENDELSE  
     205         ENDELSE 
    206206      endfor 
    207207   endelse 
     
    210210 
    211211END 
    212    
     212 
  • trunk/SRC/ToBeReviewed/STRING/getfile.pro

    r223 r226  
    7777          file = file[0] 
    7878          if file EQ 'NOT FOUND' then begin 
    79             print, ' Error in getfile: File '+filein+' not fouond.' 
     79            print, ' Error in getfile: File '+filein+' not found.' 
    8080            return, -1 
    8181          endif 
  • trunk/SRC/ToBeReviewed/STRING/str_size.pro

    r163 r226  
    2222; the target width. 
    2323; 
    24 ; @keyword INITSIZE {default=1.0}   
     24; @keyword INITSIZE {default=1.0} 
    2525; This is the initial size of the string. Default is 1.0. 
    2626; 
     
    2929; of the interactive process of calculating the string size. 
    3030; 
    31 ; @returns  
     31; @returns 
    3232; thisCharSize. This is the size the specified string should be set 
    3333; to if you want to produce output of the specified target 
     
    4545; Written by: David Fanning, 17 DEC 96. 
    4646; Added a scaling factor to take into account the aspect ratio 
    47 ; of the window in determing the character size. 28 Oct 97. DWF 
     47; of the window in determining the character size. 28 Oct 97. DWF 
    4848; 
    4949; @version 
  • trunk/SRC/ToBeReviewed/STRING/strtok.pro

    r186 r226  
    44; @file_comments 
    55; Retrieve portion of string up to token. 
    6 ;  
     6; 
    77; @categories 
    88; String 
     
    1010; @param STRING {in}{required} 
    1111; String to be split. Contains text after in, out token on output. 
    12 ;  
     12; 
    1313; @param TOKEN {in}{required} 
    14 ; Token to use in splitting old.        
     14; Token to use in splitting old. 
    1515; 
    16 ; @keyword TRIM  
     16; @keyword TRIM 
    1717; set to remove leading blanks from old before returning. 
    1818; 
    1919; @keyword HELP 
    2020; print useful message and exit. 
    21 ;  
     21; 
    2222; @returns 
    2323; new   -- portion of string up to token.              out 
     
    2828; Token may be one or more characters. 
    2929; if token is not found, returns old and sets old to ''. 
    30 ;  
     30; 
    3131; @examples 
    3232;       If old is 'foo44 bar', then strtok( old, '44' ) would return 
     
    5858;  Copyright (C) 1996 The Regents of the University of California, All 
    5959;  Rights Reserved.  Written by Matthew W. Craig. 
    60 ;  See the file COPYRIGHT for restrictions on distrubting this code. 
     60;  See the file COPYRIGHT for restrictions on distributing this code. 
    6161;  This code comes with absolutely NO warranty; see DISCLAIMER for details. 
    6262; 
     
    7474    On_error, 2 
    7575 
    76     IF (n_params() NE 2) OR keyword_set(Help) THEN BEGIN  
     76    IF (n_params() NE 2) OR keyword_set(Help) THEN BEGIN 
    7777        offset = '   ' 
    7878        print, offset+'Retrieve portion of string up to token.' 
     
    102102        print, offset+offset+"  new='xyz' and old=''." 
    103103        return, -1 
    104     ENDIF  
     104    ENDIF 
    105105 
    106106    pos = strpos(string, token) 
    107107 
    108108    IF (pos GE 0) THEN BEGIN 
    109         front = strmid(string, 0, pos)  
     109        front = strmid(string, 0, pos) 
    110110        string = strmid(string, pos + strlen(token), strlen(string)) 
    111111        IF keyword_set(trim) THEN string = strtrim(string, 1) 
    112112        return, front 
    113113    ENDIF 
    114      
     114 
    115115    front = string 
    116116    string = '' 
    117117    return, front 
    118      
     118 
    119119END 
    120120 
  • trunk/SRC/ToBeReviewed/STRUCTURE/extractstru.pro

    r163 r226  
    1313; 
    1414; @param LISTE {in}{required}{type=vector} 
    15 ; A vector of string including names of STRU to be deleted  
     15; A vector of string including names of STRU to be deleted 
    1616; (by default) or to be kept (if KEEP is activated). 
    1717; 
     
    4848; @version 
    4949; $Id$ 
    50 ;  
     50; 
    5151;- 
    5252;------------------------------------------------------------ 
     
    5959   if size(stru, /type) NE 8 then return,  -1 
    6060   if size(liste, /type) NE 7 then return,  -1 
    61 ; cheking for keep and vire keywords 
     61; checking for keep and vire keywords 
    6262   keep = keyword_set(keep)*(1-keyword_set(delete)) 
    6363   delete = keyword_set(delete)*(1-keyword_set(keep)) +(keyword_set(delete) EQ keep) 
     
    8080      if n_elements(index) GT 1 then for i = 1, n_elements(index)-1 do $ 
    8181            res = create_struct(res, tname[index[i]], stru.(index[i])) 
    82    ENDELSE  
     82   ENDELSE 
    8383 
    8484   return, res 
  • trunk/SRC/ToBeReviewed/STRUCTURE/struct2string.pro

    r163 r226  
    33;------------------------------------------------------------ 
    44;+ 
    5 ;  
     5; 
    66; @file_comments 
    77; Convert a structure to an "executable string" 
     
    99; @categories 
    1010; Utilities 
    11 ;  
     11; 
    1212; @param STRUCT {in}{required} 
    1313; A structure 
     
    1515; @keyword MAX_STRUCT_LENGTH {default=10000l} 
    1616; The maximum length of the structure 
    17 ; permetted to convert the structure to string. 
     17; permitted to convert the structure to string. 
    1818; 
    1919; @keyword DIRECT2STRING 
     
    3131;      create_struct('NAME','X','X_SIZE',891,'Y_SIZE',630,'X_VSIZE' 
    3232;      ,891,'Y_VSIZE',630,'X_CH_SIZE',6,'Y_CH_SIZE',10,'X_PX_CM' 
    33 ;      ,40.0000,'Y_PX_CM',40.0000,'N_COLORS',16777216,'TABLE_SIZE'  
     33;      ,40.0000,'Y_PX_CM',40.0000,'N_COLORS',16777216,'TABLE_SIZE' 
    3434;      ,256,'FILL_DIST',1,'WINDOW',32,'UNIT',0,'FLAGS',328124,'ORIGIN' 
    3535;      ,[0,0],'ZOOM',[1,1]) 
     
    4646;------------------------------------------------------------ 
    4747;------------------------------------------------------------ 
    48 FUNCTION struct2string, struct, CUT_IN_STRING = cut_in_string, MAX_STRUCT_LENGTH = max_struct_length, DIRECT2STRING = direct2string  
     48FUNCTION struct2string, struct, CUT_IN_STRING = cut_in_string, MAX_STRUCT_LENGTH = max_struct_length, DIRECT2STRING = direct2string 
    4949; 
    5050  compile_opt idl2, strictarrsubs 
     
    6565            endfor 
    6666         endif 
    67           
     67 
    6868      END 
    6969      keyword_set(CUT_IN_STRING):BEGIN 
  • trunk/SRC/ToBeReviewed/TRIANGULATION/ciseauxtri.pro

    r192 r226  
    33;------------------------------------------------------------ 
    44;+ 
    5 ; @file_comments  
     5; @file_comments 
    66; Delete arrays which do not have to be drawn thanks to 2 tests: 
    77;     1) Corners of the array must be in the window 
    8 ;     2) Lengthes of side of triangles expressed in normalized  
    9 ;        coordinates must not surpass a sill length.  
     8;     2) Lengthes of side of triangles expressed in normalized 
     9;        coordinates must not surpass a sill length. 
    1010; 
    1111; @categories 
    1212; 
    1313; @param TRIANG 
    14 ;  
    15 ; @param GLAM  
    16 ; 
    17 ; @param GPHI  
    18 ;  
     14; 
     15; @param GLAM 
     16; 
     17; @param GPHI 
     18; 
    1919; @keyword _EXTRA 
    2020; Used to pass your keywords. 
     
    2929; @version 
    3030; $Id$ 
    31 ;  
     31; 
    3232;- 
    3333;------------------------------------------------------------ 
     
    5656 
    5757   tempdeux = systime(1)        ; For key_performance =2 
    58    z = convert_coord(glam[*],gphi[*],/data,/to_normal)  
     58   z = convert_coord(glam[*],gphi[*],/data,/to_normal) 
    5959   x = z[0, *] 
    6060   y = z[1, *] 
     
    6363    print, 'temps ciseauxtri: convert_coord data to_normal', systime(1)-tempdeux 
    6464; 
    65 ; Beware, following the projection, some points x or y can become NaN  
    66 ; (see points behind the Earth in an orthographic projection).  
     65; Beware, following the projection, some points x or y can become NaN 
     66; (see points behind the Earth in an orthographic projection). 
    6767; In this case, we have to remove all triangle which contain one of these points. 
    6868; 
     
    9999      testy = abs(temporary(ytri)) GT ((!p.position[3]-!p.position[1])/seuil) 
    100100      testy = total(temporary(testy), 1) 
    101 ;  
     101; 
    102102      test = temporary(testx)+temporary(testy) 
    103       ind=where(temporary(test) EQ 0)  
     103      ind=where(temporary(test) EQ 0) 
    104104; 
    105105      IF testvar(var = key_performance) EQ 2 THEN $ 
     
    146146   if keyword_set(trichanged) then BEGIN 
    147147; 
    148 ; We have to check that triangles we keep do not form a triangulation  
    149 ; in which 2 triangles have a common summit without have a common side.  
    150 ; 
    151 ; We constitute the list of rectangles we want to keep (we keep every  
     148; We have to check that triangles we keep do not form a triangulation 
     149; in which 2 triangles have a common summit without have a common side. 
     150; 
     151; We constitute the list of rectangles we want to keep (we keep every 
    152152; rectangle containing a triangle) 
    153153; 
     
    155155; last summit are those of the diagonale of the rectangle defined by 
    156156; the mesh size. To find from which rectangle a triangle comes, we look 
    157 ; for the min of the index folowing x and following y of each triangle. 
     157; for the min of the index following x and following y of each triangle. 
    158158; Then we go by again this indexion following x and y in an indexion 
    159159; following nx*ny/ 
     
    166166      indxtriang2 = triang[2, *]-nx*(triang[2, *]/nx) 
    167167      indxmin = indxtriang0 < indxtriang2 
    168 ; Beware in the case where the grid is periodic and where we have all points  
    169 ; following x, triangles which assure the periodicity in x have indexes  
    170 ; following x which are 0 and nx-1. They belong to rectangles of the column  
     168; Beware in the case where the grid is periodic and where we have all points 
     169; following x, triangles which assure the periodicity in x have indexes 
     170; following x which are 0 and nx-1. They belong to rectangles of the column 
    171171; nx-1 and not to column 0. 
    172172      if keyword_set(key_periodic) AND nx EQ jpi then BEGIN 
    173173      indxmax = indxtriang0 > indxtriang2 
    174174      indxtriang = indxmin + (nx-1)*(indxmin EQ 0 AND indxmax EQ (nx-1)) 
    175       ENDIF ELSE indxtriang = indxmin  
     175      ENDIF ELSE indxtriang = indxmin 
    176176      listrect = nx*indytriang+indxtriang 
    177177      IF testvar(var = key_performance) EQ 2 THEN $ 
    178178       print, 'temps ciseauxtri: liste des rectangles', systime(1)-tempdeux 
    179179; 
    180 ; Now we have this list, we will make sure that we do not have triangles  
     180; Now we have this list, we will make sure that we do not have triangles 
    181181; with only a common summit. 
    182182; 
     
    195195                         *shift(test, 0, -1)*shift(test, -1, 0)) EQ 1) 
    196196; We delete the top rectangle (same x index but equal to 1) 
    197          if vire2[0] NE -1 THEN test[vire2+nx] = 0  
     197         if vire2[0] NE -1 THEN test[vire2+nx] = 0 
    198198      ENDWHILE 
    199199;stop 
     
    202202      avirer = where(temporary(test) EQ 0) 
    203203      IF testvar(var = key_performance) EQ 2 THEN $ 
    204        print, 'temps ciseauxtri: determinationdes rectangles a virer', systime(1)-tempdeux 
     204       print, 'temps ciseauxtri: determination des rectangles a virer', systime(1)-tempdeux 
    205205; 
    206206      if avirer[0] NE -1 then begin 
     
    208208      indnx = n_elements(listrect) 
    209209      indny = n_elements(avirer) 
    210       ind = listrect[*]#replicate(1l, indny)  
     210      ind = listrect[*]#replicate(1l, indny) 
    211211      ind = ind EQ replicate(1, indnx)#avirer[*] 
    212212      if indny GT 1 then ind = total(ind, 2) 
     
    217217       print, 'temps ciseauxtri: derniere retouche de la triangulation', systime(1)-tempdeux 
    218218   endif 
    219 ;     
    220 ; 
    221    if keyword_set(key_performance) THEN print, 'temps ciseauxtri', systime(1)-tempsun  
     219; 
     220; 
     221   if keyword_set(key_performance) THEN print, 'temps ciseauxtri', systime(1)-tempsun 
    222222; 
    223223   return,  triang 
  • trunk/SRC/ToBeReviewed/TRIANGULATION/drawcoast_e.pro

    r163 r226  
    55; @categories 
    66; 
    7 ;  
     7; 
    88; @param MASK 
    99; 
    10 ;  
     10; 
    1111; @param XF 
    12 ;  
     12; 
    1313; 
    1414; @param YF 
    15 ;  
     15; 
    1616; 
    1717; @param NX 
    18 ;  
     18; 
    1919; 
    2020; @param NY 
    21 ;  
     21; 
    2222; 
    2323; @keyword COAST_COLOR {default=0} 
     
    2929; 
    3030; @keyword XSEUIL {default=5} 
    31 ; To eliminate segments of coasts which are to big (which link points which can  
    32 ; be close on the sphere but distant on the drawing). We delete all segments  
     31; To eliminate segments of coasts which are to big (which link points which can 
     32; be close on the sphere but distant on the drawing). We delete all segments 
    3333; whose the size surpass the size of the window following X/XSEUIL. 
    34 ; But it can be to big if we do a big zoom or a little one for some  
     34; But it can be to big if we do a big zoom or a little one for some 
    3535; projections... We specify it the keyword thanks to this keyword! 
    3636; 
     
    4040; @keyword _EXTRA 
    4141; Used to pass our keywords 
    42 ;   
     42; 
    4343; @returns 
    44 ;  
    45 ;  
     44; 
     45; 
    4646; @uses 
    47 ;  
    48 ;  
     47; 
     48; 
    4949; @restrictions 
    50 ;  
    51 ;  
     50; 
     51; 
    5252; @examples 
    53 ;  
    54 ;  
     53; 
     54; 
    5555; @history 
    56 ;  
    57 ;  
    58 ; @version  
     56; 
     57; 
     58; @version 
    5959; 
    6060; @todo 
    6161; Seb: remplir le header 
    62 ;  
     62; 
    6363;- 
    6464 
     
    8888   if NOT keyword_set(xseuil) then xseuil = 5. < (min([nx, ny])-2) 
    8989   distanceseuil = (!p.position[2]-!p.position[0])/xseuil 
    90 ; liste: liste des points i pourlesquels on va tracer un segment  
     90; liste: liste des points i pour lesquels on va tracer un segment 
    9191   index = lindgen(nx, ny) 
    9292   index = index[0:nx-2, 1:ny-1] 
     
    107107   if NOT keyword_set(xseuil) then xseuil = 5. < (min([nx, ny])-2) 
    108108   distanceseuil = (!p.position[2]-!p.position[0])/xseuil 
    109 ; liste: liste des points i pourlesquels on va tracer un segment  
     109; liste: liste des points i pour lesquels on va tracer un segment 
    110110   index = lindgen(nx, ny-1) 
    111111   index = index[0:nx-2, *] 
  • trunk/SRC/ToBeReviewed/TRIANGULATION/tracemask.pro

    r163 r226  
    99; @categories 
    1010; Utilities 
    11 ;  
     11; 
    1212; @param MASKENTREE {in}{required} 
    1313; 2d array specifying the mask 
    14 ;  
     14; 
    1515; @param XIN {in}{required}, 
    1616; 2d array specifying longitude coordinates. 
    17 ;  
     17; 
    1818; @param YIN {in}{required}, 
    1919; 2d array specifying latitude coordinates. 
     
    5656@updatekwd 
    5757  ENDIF 
    58 ;---------------------------------------------------------  
     58;--------------------------------------------------------- 
    5959   tempsun = systime(1)         ; For key_performance 
    6060; We avoid edging problems: 
     
    8282; we sill 
    8383   xentree = xrange[0] > xentree < xrange[1] 
    84 ; we enlarge the array  
     84; we enlarge the array 
    8585   xf = fltarr(nx, ny) 
    8686   xf[1:nx-1, 1:ny-1] = xentree 
     
    9292   yrange = !y.range[sort(!y.range)] 
    9393   yentree = .5*(yentree+shift(yentree, 0, -1)) 
    94    IF not keyword_set(overplot) THEN BEGIN  
     94   IF not keyword_set(overplot) THEN BEGIN 
    9595      if yinverse then yentree[*, ny-2] = yrange[0] ELSE yentree[*, ny-2] = yrange[1] 
    9696   ENDIF ELSE yentree[*, ny-2] = yentree[*, ny-3] 
     
    9999   yf[1:nx-1, 1:ny-1] = yentree 
    100100   yf[0, 1:ny-1] = yentree[0, *] 
    101    IF not keyword_set(overplot) THEN BEGIN  
     101   IF not keyword_set(overplot) THEN BEGIN 
    102102      if yinverse then yf[*, 0] = yrange[1] ELSE yf[*, 0] = yrange[0] 
    103103   ENDIF ELSE yentree[*, 0] = yentree[*, 1] 
     
    113113; We recuperate lx and ly which are indexes in a 2d array of points given by list 
    114114      ly = liste/nx & lx = temporary(liste)-nx*ly 
    115       indice = where(ly NE 0) ; We do not take points concernining  
    116 ; the first line because in this case, the point j-1 is not defined  
     115      indice = where(ly NE 0) ; We do not take points concerning 
     116; the first line because in this case, the point j-1 is not defined 
    117117      if indice[0] NE -1 then begin 
    118118         lx = lx[indice] & ly = ly[temporary(indice)] 
     
    122122; loop on concerned points and drawing of the segment. 
    123123; comments: we use plots instead of plot because plots is faster. 
    124          for pt = 0L, n_elements(lx)-1 do BEGIN  
     124         for pt = 0L, n_elements(lx)-1 do BEGIN 
    125125            i = lx[pt] & j = ly[pt] 
    126126            plots, [xf[i, j-1], xf[i, j]], [yf[i, j-1], yf[i, j]] $ 
     
    146146       print, 'temps tracemask: liste traits horizontaux', systime(1)-tempdeux 
    147147      tempdeux = systime(1)     ; For key_performance =2 
    148       for pt = 0L, n_elements(lx)-1 do BEGIN  
     148      for pt = 0L, n_elements(lx)-1 do BEGIN 
    149149         i = lx[pt] & j = ly[pt] 
    150150         plots, [xf[i-1, j], xf[i, j]], [yf[i-1, j], yf[i, j]] $ 
     
    156156; 
    157157; 
    158    if keyword_set(key_performance) THEN print, 'temps tracemask', systime(1)-tempsun  
    159     
     158   if keyword_set(key_performance) THEN print, 'temps tracemask', systime(1)-tempsun 
     159 
    160160   return 
    161161end 
  • trunk/SRC/ToBeReviewed/TRIANGULATION/triangule_c.pro

    r163 r226  
    77; Construct the triangulation array. 
    88; 
    9 ; The idea is: construct a list of triangle which link points between them.  
     9; The idea is: construct a list of triangle which link points between them. 
    1010; This is automatically done by the function TRIANGULATE 
    1111;  Here: 
    12 ; we consider the fact that points are disposed on a grid (regular or not,  
    13 ; but not unstructured, that is to say that points are written following a  
    14 ; rectangular matrix). A easy way to do triangles between all points is then:  
     12; we consider the fact that points are disposed on a grid (regular or not, 
     13; but not unstructured, that is to say that points are written following a 
     14; rectangular matrix). A easy way to do triangles between all points is then: 
    1515; 
    1616;     for each point (i,j) of the matrix -except those of the last line and of 
     
    2222; drawing to make sure!!), so there are two possible choice for each rectangle 
    2323; we want to cut in 2 triangles... 
    24 ;  
     24; 
    2525; It is thanks to this choice that we will be able to trace coast with right 
    2626; angles. At each angle of coast remarkable by the existence of an unique land 
    2727; point or of an unique ocean point on one of the four summit of a rectangle (i,j), 
    2828; we have to cut the rectangle following the diagonal passing by this point. 
    29 ;  
     29; 
    3030; @categories 
    3131; Graphics 
    3232; 
    3333; @param MASKENTREE {in}{optional}{type=2d array} 
    34 ; It is a 2d array which will serve to mask the field we will trace after with CONTOUR,  
     34; It is a 2d array which will serve to mask the field we will trace after with CONTOUR, 
    3535; ...TRIANGULATION=triangule(mask) 
    3636; If this argument is not specified, the function use tmask 
     
    4343; 
    4444; @keyword COINMONTE {type=array} 
    45 ; To obtain the array of "ascending land corner" to be treated with  
    46 ; completecointerre.pro in the variable array instead of make it pass by the global  
     45; To obtain the array of "ascending land corner" to be treated with 
     46; completecointerre.pro in the variable array instead of make it pass by the global 
    4747; variable twin_corners_up. 
    4848; 
     
    5252; @returns 
    5353; res: tableau 2d (3,nbre de triangles). 
    54 ; Each line of res represent indexes of points constituting summits of a triangle.  
     54; Each line of res represent indexes of points constituting summits of a triangle. 
    5555; See how we trace triangles in definetri.pro 
    5656; 
     
    6161; 
    6262; @restrictions 
    63 ; Datas whose we want to do the contour must be disposed in a matrix.  
    64 ; On the other hand, in the matrix, the points's arrangement can not be  
     63; Datas whose we want to do the contour must be disposed in a matrix. 
     64; On the other hand, in the matrix, the points's arrangement can not be 
    6565; irregular. If it is, use TRIANGULE. 
    6666; 
     
    7373; 
    7474; @todo 
    75 ; seb L.267->268 je ne pense pas que ce soit ce que tu voulais dire mais  
     75; seb L.267->268 je ne pense pas que ce soit ce que tu voulais dire mais 
    7676; c'est la traduction de ce qu'il y avait écrit. Correction si besoin. 
    7777;- 
     
    101101;------------------------------------------------------------ 
    102102if keyword_set(key_periodic)*(nx EQ jpi) $ 
    103   AND NOT keyword_set(basic) then BEGIN  
     103  AND NOT keyword_set(basic) then BEGIN 
    104104    msk = [msk, msk[0, *]] 
    105105    nx = nx+1 
    106106ENDIF 
    107107;------------------------------------------------------------ 
    108 ; We will find the list of rectangles (i,j)(located by their left  
    109 ; bottom corner) we have to cut folowing a descendant diagonal.  
     108; We will find the list of rectangles (i,j)(located by their left 
     109; bottom corner) we have to cut following a descendant diagonal. 
    110110; We will call this list : pts_downward 
    111 ;  
     111; 
    112112pts_downward = 0 
    113113 
     
    164164ENDIF 
    165165; 
    166 if n_elements(pts_downward) EQ 1 then BEGIN  
     166if n_elements(pts_downward) EQ 1 then BEGIN 
    167167    tempdeux = systime(1)       ; For key_performance =2 
    168168; 
     
    173173    coinmont = -1 
    174174    coindesc = -1 
    175 ENDIF ELSE BEGIN  
     175ENDIF ELSE BEGIN 
    176176    tempdeux = systime(1)       ; For key_performance =2 
    177177    pts_downward = pts_downward[1:n_elements(pts_downward)-1] 
    178178    pts_downward = pts_downward[uniq(pts_downward, sort(pts_downward))] 
    179 ; None rectangle can have an element of the last column or of the  
     179; None rectangle can have an element of the last column or of the 
    180180; last line as left bottom corner. 
    181181; so we have to remove these points if they has been selected in pts_downward. 
    182     derniere_colonne = (lindgen(ny)+1)*nx-1  
    183     derniere_ligne = lindgen(nx)+(ny-1)*nx  
     182    derniere_colonne = (lindgen(ny)+1)*nx-1 
     183    derniere_ligne = lindgen(nx)+(ny-1)*nx 
    184184    pts_downward =different(pts_downward,derniere_colonne ) 
    185185    pts_downward =different(pts_downward,derniere_ligne ) 
     
    193193            coindesc =different(coindesc,derniere_ligne ) 
    194194        endif 
    195     ENDIF ELSE BEGIN  
     195    ENDIF ELSE BEGIN 
    196196        coinmont = -1 
    197197        coindesc = -1 
    198     ENDELSE  
     198    ENDELSE 
    199199    IF testvar(var = key_performance) EQ 2 THEN $ 
    200200      print, 'temps triangule: menage ds pts_downward coinmont et coindesc', systime(1)-tempdeux 
     
    205205    IF testvar(var = key_performance) EQ 2 THEN $ 
    206206      print, 'temps triangule: definetri', systime(1)-tempdeux 
    207 ENDELSE  
     207ENDELSE 
    208208;------------------------------------------------------------ 
    209209; We delete land points which only contain land points. 
    210210;------------------------------------------------------------ 
    211211; 
    212 ;   
     212; 
    213213if (NOT keyword_set(basic)) AND (NOT keyword_set(keep_cont)) then begin 
    214214    tempdeux = systime(1)       ; For key_performance =2 
     
    224224    trimask = intarr(nx, ny) 
    225225    trimask[0:nx-2, 0:ny-2] = 1 
    226     IF recdsterre[0] NE -1 then BEGIN  
     226    IF recdsterre[0] NE -1 then BEGIN 
    227227        tempdeux = systime(1)   ; For key_performance =2 
    228228        indice[recdsterre] = 1 
     
    231231            vire2 = 0 
    232232            while (vire1[0] NE -1 OR vire2[0] NE -1) ne 0 do begin 
    233 ; Delete rectangles we have to remove from recsterre (in fact those we have  
    234 ; to keep although they ar eentirely in the land). 
     233; Delete rectangles we have to remove from recsterre (in fact those we have 
     234; to keep although they are entirely in the land). 
    235235                vire1 = where( (indice*shift(indice, -1, -1) $ 
    236236                                *(1-shift(indice, 0, -1))*(1-shift(indice, -1, 0))*trimask) EQ 1) 
    237                 if vire1[0] NE -1 THEN BEGIN  
     237                if vire1[0] NE -1 THEN BEGIN 
    238238                    indice[vire1] = 0 
    239239;               indice[vire1+nx+1] = 0 
    240240                endif 
    241                  
     241 
    242242                vire2 = where( ((1-indice)*(1-shift(indice, -1, -1)) $ 
    243243                                *shift(indice, 0, -1)*shift(indice, -1, 0)*trimask) EQ 1) 
    244                 if vire2[0] NE -1 THEN BEGIN  
     244                if vire2[0] NE -1 THEN BEGIN 
    245245                    indice[vire2+1] = 0 
    246246;               indice[vire2+nx] = 0 
     
    259259        trigarde = transpose(temporary(trigarde)) 
    260260        trigarde = [trigarde, trigarde+1] 
    261 ;  
     261; 
    262262        triang = triang[*, temporary(trigarde[*])] 
    263263        IF testvar(var = key_performance) EQ 2 THEN $ 
     
    265265    endif 
    266266endif 
    267 ; print, 'temps tri triangles', systime(1)-t1  
    268 ;------------------------------------------------------------ 
    269 ; When key_periodic equal 1, triang is a list of indexes's array which  
     267; print, 'temps tri triangles', systime(1)-t1 
     268;------------------------------------------------------------ 
     269; When key_periodic equal 1, triang is a list of indexes's array which 
    270270; have a surplus column. 
    271 ; We have to put it back to the initial matrix by putting indexes of  
     271; We have to put it back to the initial matrix by putting indexes of 
    272272; the last column equal to these of the last column... 
    273273;------------------------------------------------------------ 
    274274tempdeux = systime(1)           ; For key_performance =2 
    275275if keyword_set(key_periodic)*(nx-1 EQ jpi) $ 
    276   AND NOT keyword_set(basic) then BEGIN  
     276  AND NOT keyword_set(basic) then BEGIN 
    277277    indicey = triang/nx 
    278278    indicex = triang-indicey*nx 
     
    310310IF NOT keyword_set(key_forgetold) THEN BEGIN 
    311311   @updateold 
    312 ENDIF  
    313  
    314 IF keyword_set(key_performance) THEN print, 'temps triangule', systime(1)-tempsun  
     312ENDIF 
     313 
     314IF keyword_set(key_performance) THEN print, 'temps triangule', systime(1)-tempsun 
    315315 
    316316return, triang 
    317317 
    318 END  
     318END 
  • trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/buildcmd.pro

    r172 r226  
    55; 
    66; @file_comments 
    7 ; This function send back a string which contain the reading command  
     7; This function send back a string which contain the reading command 
    88; and drawing's parameters. 
    99; 
     
    1111; 
    1212; @keyword BOXZOOM 
    13 ; Vector indicating the geographic zone on which we want to cut the map.  
    14 ; If BOXZOOM has :  
     13; Vector indicating the geographic zone on which we want to cut the map. 
     14; If BOXZOOM has : 
    1515;   1 element : The extraction is made on [lon1, lon2, lat1, lat2, 0.,boxzoom[0]] 
    1616;   2 elements: The extraction is made on [lon1, lon2, lat1, lat2, boxzoom[0],boxzoom[1]] 
    1717;   4 elements: The extraction is made on [Boxzoom, 0, max([gdept, gdepw])] 
    1818;   5 elements: The extraction is made on [Boxzoom[0:3], 0, Boxzoom[4]] 
    19 ;   6 elements: The extraction is made on Boxzoom  
     19;   6 elements: The extraction is made on Boxzoom 
    2020; Where lon1, lon2,lat1,lat2 are global variables defined at the last domdef! 
    2121; 
     
    5454  numdessinout = smallout[2]-1 
    5555; 
    56   options = extractatt(top_uvalue, 'options')    
     56  options = extractatt(top_uvalue, 'options') 
    5757  optionsflag = extractatt(top_uvalue, 'optionsflag') 
    5858  portrait = (strtrim(optionsflag[where(options EQ 'Portrait/Landscape'), 0], 1))[0] 
     
    8383;  Search of options 
    8484; 
    85   options = extractatt(top_uvalue, 'options')    
     85  options = extractatt(top_uvalue, 'options') 
    8686  optionsflag = extractatt(top_uvalue, 'optionsflag') 
    8787  flags = optionsflag[*, numdessinin] 
     
    133133  widcmd =  strtrim(widcmd, 2) 
    134134  IF widcmd[0] EQ '' THEN widcmd = 'zzz' 
    135    
     135 
    136136  cutcmd, widcmd[0], toread, numberofread, prefix, nameexp, ending 
    137137; 
     
    158158; we complet the reading command 
    159159        oldrdcmd = extractatt(top_uvalue, 'currentreadcmd') 
    160         nl = n_elements(oldrdcmd)  
     160        nl = n_elements(oldrdcmd) 
    161161        oldrdcmd[nl-1] = oldrdcmd[nl-1] + ' $' 
    162162        readcmd[i] = prefix + readcmd[i] 
     
    164164      ENDELSE 
    165165; exit if we have to read other fields... 
    166       if alreadyread+1 NE numberofread-1 THEN BEGIN  
     166      if alreadyread+1 NE numberofread-1 THEN BEGIN 
    167167        *top_uvalue[1, findline(top_uvalue, 'currentreadcmd')] = readcmd 
    168168        *top_uvalue[1, findline(top_uvalue, 'alreadyread')] = alreadyread+1 
     
    171171      ENDIF 
    172172; we finalize the reading command 
    173       IF ending NE '' THEN BEGIN  
    174         nl = n_elements(readcmd)  
     173      IF ending NE '' THEN BEGIN 
     174        nl = n_elements(readcmd) 
    175175        readcmd[nl-1] = readcmd[nl-1] + ' $' 
    176176        readcmd = [temporary(readcmd), ending] 
     
    186186      tgnm = strlowcase(tag_names(exextra)) 
    187187      indtmp = where(tgnm EQ 'box' OR tgnm EQ 'boxzoom', cnt) 
    188       IF cnt EQ 1 THEN BEGIN  
     188      IF cnt EQ 1 THEN BEGIN 
    189189        boxextra = exextra.(indtmp[0]) 
    190190        exextra = extractstru(exextra, ['box', 'boxzoom']) 
    191       ENDIF  
     191      ENDIF 
    192192      extra =  mixstru(exextra, extra) 
    193193      sextra = struct2string(extra) 
     
    214214    'vector':BEGIN 
    215215; for the vectors, there is 2 components. we read u when alreadyvector 
    216 ; is a interger and v when alreadyvector is a interger+0.5 
     216; is a integer and v when alreadyvector is a integer+0.5 
    217217      if floor(alreadyvector)+1 EQ 0 then begin 
    218218        if floor(alreadyvector) EQ alreadyvector then begin 
     
    226226      ENDIF ELSE BEGIN 
    227227        oldrdcmd = extractatt(top_uvalue, 'currentreadcmd') 
    228         nl = n_elements(oldrdcmd)  
     228        nl = n_elements(oldrdcmd) 
    229229        oldrdcmd[nl-1] = oldrdcmd[nl-1] + ' $' 
    230230        readcmd[i] = prefix + readcmd[i] 
     
    235235        numberofread-1:BEGIN 
    236236; we finalize the reading command 
    237           IF ending NE '' THEN BEGIN  
    238             nl = n_elements(readcmd)  
     237          IF ending NE '' THEN BEGIN 
     238            nl = n_elements(readcmd) 
    239239            readcmd[nl-1] = readcmd[nl-1] + ' $' 
    240240            readcmd = [temporary(readcmd), ending] 
     
    252252        numberofread-0.5:BEGIN 
    253253; we finalize the reading command 
    254           IF ending NE '' THEN BEGIN  
    255             nl = n_elements(readcmd)  
     254          IF ending NE '' THEN BEGIN 
     255            nl = n_elements(readcmd) 
    256256            readcmd[nl-1] = readcmd[nl-1] + ' $' 
    257257            readcmd = [temporary(readcmd), ending] 
     
    301301      ENDIF ELSE BEGIN 
    302302        oldrdcmd = extractatt(top_uvalue, 'currentreadcmd') 
    303         nl = n_elements(oldrdcmd)  
     303        nl = n_elements(oldrdcmd) 
    304304        oldrdcmd[nl-1] = oldrdcmd[nl-1] + ' $' 
    305305        readcmd[i] = prefix + readcmd[i] 
     
    307307      ENDELSE 
    308308; 
    309       if alreadyover+1 NE numberofread-1 THEN BEGIN  
     309      if alreadyover+1 NE numberofread-1 THEN BEGIN 
    310310; we still need to read some files... 
    311311        *top_uvalue[1, findline(top_uvalue, 'currentreadcmd')] = readcmd 
     
    315315      ENDIF 
    316316; we finalize the reading command 
    317       IF ending NE '' THEN BEGIN  
    318         nl = n_elements(readcmd)  
     317      IF ending NE '' THEN BEGIN 
     318        nl = n_elements(readcmd) 
    319319        readcmd[nl-1] = readcmd[nl-1] + ' $' 
    320320        readcmd = [temporary(readcmd), ending] 
     
    362362; For [plots in z, box must have by default 0,profmax 
    363363  if strpos(type, 'z') NE -1 then BEGIN 
    364 ; If more than 1 level is selected:  
     364; If more than 1 level is selected: 
    365365    widget_control, widget_info(base, find_by_uname = 'dthlv1'), get_value = niv1 
    366366    niv1 = niv1.combobox_index 
  • trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/identifyclick.pro

    r150 r226  
    8585; t/3/0 End of the double click 
    8686      thisEvent EQ 'WIDGET_TIMER' AND uval.click EQ 3 AND press EQ 0:uval.click = 0 
    87 ; Imposible case in theory: 
     87; Impossible case in theory: 
    8888      ELSE:BEGIN 
    8989         print, thisEvent, uval.click, press 
  • trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/scanfile.pro

    r221 r226  
    55; @categories 
    66; 
    7 ;  
     7; 
    88; @param NAMEFILE 
    99; 
    10 ;  
    1110; @keyword GRID {default='T'}{type=scalar string} 
    1211; Used to specify on which grid type are located the data 
     
    1413; @keyword _EXTRA 
    1514; Used to pass your keywords to isafile and ncdf_getaxis 
    16 ;  
     15; 
    1716; @returns 
    18 ;  
    19 ;  
     17; 
    2018; @uses 
    21 ;  
    22 ;  
     19; 
    2320; @restrictions 
    24 ;  
    25 ;  
     21; 
    2622; @examples 
    27 ;  
    28 ;  
     23; 
    2924; @history 
    30 ;  
    31 ;  
    32 ; @version  
     25; 
     26; @version 
    3327; $Id$ 
    3428; 
    3529; @todo 
    3630; seb : I don't know what to do with that... 
    37 ;  
     31; 
    3832;- 
    3933; 
     
    4943;       dont les noms sont 'x','lon...','xi_...' et 'y','lat...' ou 
    5044;       'eta_...' ou bien en majuscule. 
    51 ;       4) il doit exiter ds ce fichier une unique variable n''ayant 
     45;       4) il doit exister ds ce fichier une unique variable n''ayant 
    5246;       qu''une dimension et etant la dimension temporelle. cette 
    5347;       variable sera prise comme axe des temps. Rq: si plusieurs 
     
    5549;       variable 
    5650;       5) Cette variable axe des temps doit contenir l''attribut 
    57 ;       'units'qui doit etre ecrit suivant la syntaxe: 
    58 ;               "seconds since 0001-01-01 00:00:00"  
    59 ;               "hours since 0001-01-01 00:00:00"  
    60 ;               "days since 1979-01-01 00:59:59"  
    61 ;               "months since 1979-01-01 00:59:59"  
    62 ;               "years since 1979-01-01 00:59:59"  
     51;       'units' qui doit etre ecrit suivant la syntaxe: 
     52;               "seconds since 0001-01-01 00:00:00" 
     53;               "hours since 0001-01-01 00:00:00" 
     54;               "days since 1979-01-01 00:59:59" 
     55;               "months since 1979-01-01 00:59:59" 
     56;               "years since 1979-01-01 00:59:59" 
    6357; 
    6458; je crois que c''est tout! 
     
    9387  namedim = strarr(inside.ndims) 
    9488  for dimiq = 0, inside.ndims-1 do begin 
    95     ncdf_diminq, cdfid, dimiq, tmpname, value  
     89    ncdf_diminq, cdfid, dimiq, tmpname, value 
    9690    namedim[dimiq] = strlowcase(tmpname) 
    9791  ENDFOR 
     
    110104       (inter(invar.dim, dimidy))[0] NE -1 AND $ 
    111105       ((where(invar.dim EQ inside.recdim))[0] NE -1 OR inside.recdim EQ -1) $ 
    112     THEN namevar[varid] = invar.name  
     106    THEN namevar[varid] = invar.name 
    113107  ENDFOR 
    114108  namevar = namevar[where(namevar NE '')] 
     
    135129        tmpnm[0] EQ 'xi_u'   AND tmpnm[1] EQ 'eta_rho':listgrid[i] = 'U' 
    136130        tmpnm[0] EQ 'xi_u'   AND tmpnm[1] EQ 'eta_v'  :listgrid[i] = 'F' 
    137         ELSE:  
    138       ENDCASE  
     131        ELSE: 
     132      ENDCASE 
    139133    ENDFOR 
    140134    empty = where(listgrid EQ '') 
    141     IF empty[0] NE -1 THEN BEGIN    
     135    IF empty[0] NE -1 THEN BEGIN 
    142136; could we define the grid type from the file name?? 
    143137      pattern = ['GRID.', 'GRID_', 'GRID', 'UPID_', '30ID_'] 
     
    153147      ENDFOR 
    154148      listgrid[empty] = vargrid 
    155     ENDIF  
     149    ENDIF 
    156150  ENDIF ELSE listgrid[*] = vargrid 
    157151;------------------------------------------------------------ 
     
    159153;------------------------------------------------------------ 
    160154  date0fk = date2jul(19000101) 
    161   IF inside.recdim EQ -1 THEN BEGIN  
     155  IF inside.recdim EQ -1 THEN BEGIN 
    162156    jpt = 1 
    163157    time = date0fk 
     
    170164    repeat BEGIN 
    171165      IF varid LT inside.nvars THEN BEGIN 
    172         invar = ncdf_varinq(cdfid, varid)  
    173         varid = varid+1         
     166        invar = ncdf_varinq(cdfid, varid) 
     167        varid = varid+1 
    174168      ENDIF ELSE varid = 0 
    175169    endrep until (n_elements(invar.dim) EQ 1 AND invar.dim[0] EQ inside.recdim) OR (varid EQ 0) 
     
    177171; 
    178172    CASE 1 OF 
    179       varid EQ -1:BEGIN  
     173      varid EQ -1:BEGIN 
    180174        dummy = report('the file '+fullname+' has no time axis.!C we create a fake calendar ...') 
    181175        fakecal = 1 
    182176        time = date0fk + lindgen(1>jpt) 
    183177      END 
    184       invar.natts EQ 0:BEGIN  
     178      invar.natts EQ 0:BEGIN 
    185179        dummy = report('the variable '+invar.name+' has no attribut.!C we create a fake calendar ...') 
    186180        fakecal = 1 
     
    197191          fakecal = 1 
    198192          time = date0fk + lindgen(1>jpt) 
    199         ENDIF ELSE BEGIN  
     193        ENDIF ELSE BEGIN 
    200194; we read the time axis 
    201195          ncdf_varget, cdfid, varid, time 
     
    223217            err = 1 
    224218          ENDIF 
    225           IF err GT 0 THEN BEGIN  
     219          IF err GT 0 THEN BEGIN 
    226220            fakecal = 1 
    227221            time = date0fk + lindgen(1>jpt) 
    228           ENDIF ELSE BEGIN  
     222          ENDIF ELSE BEGIN 
    229223            debut = str_sep(mots[2], '-') 
    230224; 
     
    241235                'greg':IF n_elements(key_caltype) EQ 0 THEN key_caltype = 'greg' 
    242236                ELSE:BEGIN 
    243 ;            notused = report('Unknown calendar: '+value+', we use greg calendar.')  
     237;            notused = report('Unknown calendar: '+value+', we use greg calendar.') 
    244238                  key_caltype = 'greg' 
    245239                END 
    246240              ENDCASE 
    247241            ENDIF ELSE BEGIN 
    248 ;        notused = report('Unknown calendar, we use '+key_caltype+' calendar.')  
     242;        notused = report('Unknown calendar, we use '+key_caltype+' calendar.') 
    249243              IF n_elements(key_caltype) EQ 0 THEN key_caltype = 'greg' 
    250244            ENDELSE 
     
    259253              'hour':time = julday(debut[1], debut[2], debut[0])+time/24.d 
    260254              'day':time = julday(debut[1], debut[2], debut[0])+time 
    261               'month':BEGIN  
     255              'month':BEGIN 
    262256                if total(fix(time) NE time) NE 0 then $ ; we switch to days with 30d/m 
    263257                   time = julday(debut[1], debut[2], debut[0])+round(time*30) $ 
  • trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/xcreateanim.pro

    r150 r226  
    55; @categories 
    66; 
    7 ;  
    87; @param EVENT 
    98; 
    10 ;  
    119; @returns 
    12 ;  
    13 ;  
     10; 
    1411; @uses 
    15 ;  
    16 ;  
     12; 
    1713; @restrictions 
    18 ;  
    19 ;  
     14; 
    2015; @examples 
    21 ;  
    22 ;  
     16; 
    2317; @history 
    24 ;  
    25 ;  
     18; 
    2619; @version 
    27 ; $Id$  
    28 ;  
     20; $Id$ 
     21; 
    2922; @todo 
    3023; seb 
    3124; 
    3225;- 
    33 pro xcreateanim_event, event  
     26pro xcreateanim_event, event 
    3427; 
    3528  compile_opt idl2, strictarrsubs 
     
    6154  widget_control, widget_info(event.top, find_by_uname = 'debut') $ 
    6255                  , get_value = vdate1 
    63   index1 = where(calendar eq date2jul(vdate1)) & index1 = index1[0]  
     56  index1 = where(calendar eq date2jul(vdate1)) & index1 = index1[0] 
    6457  if index1 EQ -1 then return 
    6558; 
    6659  widget_control, widget_info(event.handler, find_by_uname = 'fin') $ 
    6760                  , get_value = vdate2 
    68   index2 = where(calendar eq date2jul(vdate2)) & index2 = index2[0]  
     61  index2 = where(calendar eq date2jul(vdate2)) & index2 = index2[0] 
    6962  if index2 EQ -1 OR index2 LE index1 then return 
    7063; We delete the widget before create the file .ps 
     
    7366; creation of the routine which will serve us to do the drawing 
    7467; 
    75 ; We recuperate the list of instructions  
     68; We recuperate the list of instructions 
    7669  globalcommand = extractatt(top_uvalue, 'globalcommand') 
    7770; We complete by first and last lines of the program 
     
    113106    green = green[index] 
    114107    blue = blue[index] 
    115   endif             
     108  endif 
    116109; 
    117110  if depth gt 8 then $ 
     
    133126      IF keyword_set(fakecal) THEN date = ind ELSE date = jul2date(calendar[ind]) 
    134127      xxx2ps, /noerase, date1 = date, date2 = date 
    135 ;       
     128; 
    136129      image = tvrd(true = depth GT 8) 
    137130; 
     
    142135      wdelete, !d.window 
    143136    ENDFOR 
    144   ENDIF  
     137  ENDIF 
    145138; We put a last white picture 
    146139  window, /free, /pixmap, xsize = xsize, ysize = ysize 
     
    155148  wdelete, !d.window 
    156149; File's closing. 
    157   write_gif, animdir+nomfic, /close  
    158   widget_control, base, /destroy  
     150  write_gif, animdir+nomfic, /close 
     151  widget_control, base, /destroy 
    159152; Rerock in "normal" mode 
    160153  thisOS = strupcase(strmid(!version.os_family, 0, 3)) 
     
    169162  endif 
    170163; 
    171    
     164 
    172165  return 
    173166end 
     
    179172; @categories 
    180173; 
    181 ;  
     174; 
    182175; @param PARENT 
    183176; 
    184 ;  
     177; 
    185178; @returns 
    186 ;  
    187 ;  
     179; 
     180; 
    188181; @uses 
    189 ;  
    190 ;  
     182; 
    191183; @restrictions 
    192 ;  
    193 ;  
     184; 
    194185; @examples 
    195 ;  
    196 ;  
     186; 
    197187; @history 
    198 ;  
    199 ;  
     188; 
    200189; @version 
    201 ; $Id$  
    202 ;  
     190; $Id$ 
     191; 
    203192; @todo 
    204193; seb 
     
    229218   if strtrim(filenames[0], 1) EQ '' then filenames = filenames[1:n_elements(filenames)-1] 
    230219   indexfile = (where(filelist EQ filenames[0]))[0] 
    231    calendar = (*(extractatt(top_uvalue, 'fileparameters'))[indexfile]).time_counter   
     220   calendar = (*(extractatt(top_uvalue, 'fileparameters'))[indexfile]).time_counter 
    232221   key_caltype = (*(extractatt(top_uvalue, 'fileparameters'))[indexfile]).caltype 
    233222   fakecal = (*(extractatt(top_uvalue, 'fileparameters'))[indexfile]).fakecal 
     
    237226         calendarbis = (*(extractatt(top_uvalue, 'fileparameters'))[indexfilebis]).time_counter 
    238227         if n_elements(calendarbis) NE n_elements(calendar)  then begin 
    239             nothing = report('Les diffrents plots n''utilisent pas le meme calendrier. !C Animation impossible!', /error) 
     228            nothing = report('plots do not use the same calendar. !C Animation impossible!', /error) 
    240229            return 
    241230         ENDIF 
    242231         if total(calendar NE calendarbis) NE 0 then begin 
    243             nothing = report('Les diffrents plots n''utilisent pas le meme calendrier. !C Animation impossible!', /error) 
     232            nothing = report('plots do not use the same calendar. !C Animation impossible!', /error) 
    244233            return 
    245234         endif 
     
    249238; It is possible to do an animation. 
    250239; 
    251    base = widget_base(/column, title = 'animation creation', uvalue = {parent:parent, indexfile:indexfile})    
     240   base = widget_base(/column, title = 'animation creation', uvalue = {parent:parent, indexfile:indexfile}) 
    252241   rien = widget_label(base, value = 'animation name') 
    253242   rien = widget_text(base,value='anim_idl.gif', uname='Filename', /editable) 
     
    266255   widget_control,base,/realize 
    267256   xmanager,'xcreateanim', base, /no_block 
    268     
     257 
    269258   return 
    270259end 
  • trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/xxxmenubar_event.pro

    r150 r226  
    55; @categories 
    66; 
    7 ;  
     7; 
    88; @param EVENT 
    99; 
    10 ;  
    1110; @returns 
    12 ;  
    13 ;  
     11; 
    1412; @uses 
    15 ;  
    16 ;  
     13; 
    1714; @restrictions 
    18 ;  
    19 ;  
     15; 
    2016; @examples 
    21 ;  
    22 ;  
     17; 
    2318; @history 
    24 ;  
    25 ;  
    26 ; @version  
     19; 
     20; @version 
    2721; $Id$ 
    2822; 
    29 ; @todo  
     23; @todo 
    3024; seb 
    3125;- 
     
    3933 
    4034  case event.value of 
    41     'Open' :begin  
     35    'Open' :begin 
    4236      oldmeshparams = ccmeshparameters 
    4337      newfile = selectfile() 
     
    6256; What is the selected field ? Do we reselect it ? 
    6357      fieldname = widget_info(vlstid, /combobox_gettext) 
    64       index = where(newfile.fileparameters.listvar EQ fieldname)  
     58      index = where(newfile.fileparameters.listvar EQ fieldname) 
    6559      widget_control, vlstid, set_value = newfile.fileparameters.listvar 
    6660      widget_control, vlstid, set_combobox_select = 0 > index[0] 
     
    117111      xxx, CALLERWIDID = event.top, _extra = extra 
    118112    end 
    119     'Quit':begin  
     113    'Quit':begin 
    120114      widget_control, event.top, get_uvalue = top_uvalue 
    121115      ptr_free, extractatt(top_uvalue, 'exextra') 
     
    142136                 , /POSTSCRIPT 
    143137    END 
    144     'Animated gif' :begin  
     138    'Animated gif' :begin 
    145139      IF float(strmid(!version.release,0,3)) GE 6.2 THEN xcreateanim, event.top 
    146140    end 
     
    174168      widget_control, event.top, get_uvalue = top_uvalue 
    175169; portrait or landscape ??? 
    176       options = extractatt(top_uvalue, 'options')    
     170      options = extractatt(top_uvalue, 'options') 
    177171      optionsflag = extractatt(top_uvalue, 'optionsflag') 
    178172      portrait = (optionsflag[where(options EQ 'Portrait/Landscape'), 0])[0] 
     
    203197      ENDIF 
    204198; We recuperate the name of the file 
    205       filename = xquestion('dans quel fichier bianire voulez vous sauver le widget ?', 'xxx_widget.dat') 
     199      filename = xquestion('In which binary file do you want to save the widget ?', 'xxx_widget.dat') 
    206200; We complete it by a .dat 
    207201      if rstrpos(filename, '.dat') NE strlen(filename)-4 then filename = filename+'.dat' 
     
    219213      for i = 0,  n_elements(commande)-1 do print, commande[i] 
    220214    end 
    221    'Portrait/Landscape' :begin  
     215   'Portrait/Landscape' :begin 
    222216      widget_control, event.top, get_uvalue = top_uvalue 
    223217      options = extractatt(top_uvalue, 'options') 
     
    255249      ENDELSE 
    256250    end 
    257     'Overlay' :begin  
     251    'Overlay' :begin 
    258252      widget_control, event.top, get_uvalue = top_uvalue 
    259253      numdessinin = (extractatt(top_uvalue, 'smallin'))[2]-1 
    260       options = extractatt(top_uvalue, 'options')    
     254      options = extractatt(top_uvalue, 'options') 
    261255      flags = extractatt(top_uvalue, 'optionsflag') 
    262256      index = where(options EQ 'Overlay') 
     
    269263      widget_control, event.top, get_uvalue = top_uvalue 
    270264      numdessinin = (extractatt(top_uvalue, 'smallin'))[2]-1 
    271       options = extractatt(top_uvalue, 'options')    
     265      options = extractatt(top_uvalue, 'options') 
    272266      flags = extractatt(top_uvalue, 'optionsflag') 
    273267      index = where(options EQ 'Vecteur') 
     
    280274      widget_control, event.top, get_uvalue = top_uvalue 
    281275      numdessinin = (extractatt(top_uvalue, 'smallin'))[2]-1 
    282       options = extractatt(top_uvalue, 'options')    
     276      options = extractatt(top_uvalue, 'options') 
    283277      flags = extractatt(top_uvalue, 'optionsflag') 
    284278      index = where(options EQ 'Longitude / x index') 
     
    314308      (*top_uvalue[1, findline(top_uvalue, 'domaines')])[*, numdessinin] = boxzoom 
    315309    end 
    316     'Latitude / y index':begin  
     310    'Latitude / y index':begin 
    317311      widget_control, event.top, get_uvalue = top_uvalue 
    318312      numdessinin = (extractatt(top_uvalue, 'smallin'))[2]-1 
    319       options = extractatt(top_uvalue, 'options')    
     313      options = extractatt(top_uvalue, 'options') 
    320314      flags = extractatt(top_uvalue, 'optionsflag') 
    321315      index = where(options EQ 'Latitude / y index') 
  • trunk/SRC/ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_calendar.pro

    r157 r226  
    77;    case uval of 
    88;       'done':widget_control, event.top, /destroy 
    9 ;       'set':BEGIN  
     9;       'set':BEGIN 
    1010;          widget_control, event.id, get_value = value 
    1111;          widget_control, ComboboxId, set_value = value 
    1212;       END 
    13 ;       'get':BEGIN  
     13;       'get':BEGIN 
    1414;          widget_control, ComboboxId, get_value = value 
    1515;          help,  value, /struct 
     
    4040; @file_comments 
    4141; 
    42 ; 
    43 ; @categories 
    44 ; Compound widget 
    45 ;  
     42; @categories 
     43; Compound widget 
     44; 
    4645; @param ID 
    4746; 
     
    5150; 
    5251; @returns 
    53 ;  
    54 ;  
    55 ; @uses 
    56 ;  
    57 ;  
    58 ; @restrictions 
    59 ;  
    60 ;  
    61 ; @examples 
    62 ;  
    63 ;  
    64 ; @history 
    65 ;  
    66 ;  
    67 ; @version  
     52; 
     53; @uses 
     54; 
     55; @restrictions 
     56; 
     57; @examples 
     58; 
     59; @history 
     60; 
     61; @version 
    6862; $Id$ 
    6963;- 
     
    7165PRO cw_calendar_set_value, id, value 
    7266; 
    73   compile_opt strictarr, strictarrsubs  
     67  compile_opt strictarr, strictarrsubs 
    7468; 
    7569; 
     
    7973  widget_control, winfo_id, get_uvalue = infowid 
    8074  key_caltype = infowid.caltype 
    81    
     75 
    8276; high freqeuncy calendar 
    8377  IF keyword_set(infowid.fakecal) THEN BEGIN 
    8478    value2 = date2jul(long(value)) - infowid.fakecal 
    85     IF value2 LT n_elements(infowid.calendar) AND value2 GE 0 THEN BEGIN   
     79    IF value2 LT n_elements(infowid.calendar) AND value2 GE 0 THEN BEGIN 
    8680      stepid = widget_info(id, find_by_uname = 'step') 
    8781      widget_control, stepid, set_value = {combobox_select:value2} 
     
    8983      widget_control, winfo_id, set_uvalue = infowid 
    9084    ENDIF 
    91   ENDIF ELSE BEGIN  
     85  ENDIF ELSE BEGIN 
    9286; 
    9387    value = long(value[0]) 
     
    122116; @categories 
    123117; Compound widget 
    124 ;  
     118; 
    125119; @param ID 
    126120; 
    127121; 
    128122; @returns 
    129 ;  
    130 ;  
    131 ; @uses 
    132 ;  
    133 ;  
    134 ; @restrictions 
    135 ;  
    136 ;  
    137 ; @examples 
    138 ;  
    139 ;  
    140 ; @history 
    141 ;  
    142 ;  
    143 ; @version  
     123; 
     124; @uses 
     125; 
     126; @restrictions 
     127; 
     128; @examples 
     129; 
     130; @history 
     131; 
     132; @version 
    144133; $Id$ 
    145134;- 
    146135FUNCTION cw_calendar_get_value, id 
    147136; 
    148   compile_opt strictarr, strictarrsubs  
     137  compile_opt strictarr, strictarrsubs 
    149138; 
    150139  winfo_id = widget_info(id, find_by_uname = 'infocal') 
     
    159148; @categories 
    160149; Compound widget 
    161 ;  
     150; 
    162151; @param ID 
    163152; 
     
    167156; 
    168157; @returns 
    169 ;  
    170 ;  
    171 ; @uses 
    172 ;  
    173 ;  
    174 ; @restrictions 
    175 ;  
    176 ;  
    177 ; @examples 
    178 ;  
    179 ;  
    180 ; @history 
    181 ;  
    182 ;  
    183 ; @version  
    184 ; $Id$ 
    185 ;- 
    186 FUNCTION get_cal_value, id, winfoid  
    187 ; 
    188   compile_opt strictarr, strictarrsubs  
     158; 
     159; @uses 
     160; 
     161; @restrictions 
     162; 
     163; @examples 
     164; 
     165; @history 
     166; 
     167; @version 
     168; $Id$ 
     169;- 
     170FUNCTION get_cal_value, id, winfoid 
     171; 
     172  compile_opt strictarr, strictarrsubs 
    189173; 
    190174  winfo_id = widget_info(id, find_by_uname = 'infocal') 
     
    202186    widget_control, wid_id, get_value = wid_value 
    203187    allmonths = string(format = '(C(CMoA))', 31*(indgen(12))) 
    204     month = (where(allmonths EQ wid_value.combobox_gettext))[0] + 1  
     188    month = (where(allmonths EQ wid_value.combobox_gettext))[0] + 1 
    205189    date = date + 100L * long(month) 
    206190  ENDIF ELSE date = date + (oldate MOD 10000L)/100L*100L 
     
    224208; @categories 
    225209; Compound widget 
    226 ;  
     210; 
    227211; @param EVENT 
    228212; 
     
    235219; 
    236220; @returns 
    237 ;  
    238 ;  
    239 ; @uses 
    240 ;  
    241 ;  
    242 ; @restrictions 
    243 ;  
    244 ;  
    245 ; @examples 
    246 ;  
    247 ;  
    248 ; @history 
    249 ;  
    250 ;  
    251 ; @version  
     221; 
     222; @uses 
     223; 
     224; @restrictions 
     225; 
     226; @examples 
     227; 
     228; @history 
     229; 
     230; @version 
    252231; $Id$ 
    253232;- 
    254233PRO set_cal_combobox, event, casename, date0 
    255234; 
    256   compile_opt strictarr, strictarrsubs  
     235  compile_opt strictarr, strictarrsubs 
    257236; 
    258237; casename: Which widget shall we move: 'day', 'month' or 'year' ? 
     
    269248; index of days/months/years according to date0 
    270249  case casename of 
    271     'day':BEGIN  
     250    'day':BEGIN 
    272251; list of days corresponding to month0 and year0 
    273252      index = where(monthcal EQ month0 AND yearcal EQ year0) 
    274253      current = daycal[index] 
    275254    END 
    276     'month':BEGIN  
     255    'month':BEGIN 
    277256; list of months corresponding to year0 
    278257      index = where(yearcal EQ year0) 
     
    283262      current = current[indexbis] 
    284263    END 
    285     'year':BEGIN  
     264    'year':BEGIN 
    286265; keep only the uniq years 
    287266      index = uniq(yearcal) 
     
    297276  if casename EQ 'month' then begin 
    298277    widget_control, wid_id, set_value = string(format = '(C(CMoA))', 31*(current-1)) 
    299   ENDIF ELSE BEGIN  
     278  ENDIF ELSE BEGIN 
    300279    widget_control, wid_id, set_value = strtrim(current, 1) 
    301280  ENDELSE 
     
    310289    1:selected = 0 
    311290; 2: a new date has been specified... 
    312     2:BEGIN  
     291    2:BEGIN 
    313292      case casename of 
    314293        'day':selected = (where(current EQ day0))[0] 
     
    325304end 
    326305;---------------------------------------------------------------------- 
    327 ; move cyclicly the calendar to the 
     306; move cyclically the calendar to the 
    328307; value 0 if event.out=1 or combobox_number-1 if event.out=-1 
    329308;+ 
     
    333312; @categories 
    334313; Compound widget 
    335 ;  
     314; 
    336315; @param EVENT 
    337316; 
     
    341320; 
    342321; @returns 
    343 ;  
    344 ;  
    345 ; @uses 
    346 ;  
    347 ;  
    348 ; @restrictions 
    349 ;  
    350 ;  
    351 ; @examples 
    352 ;  
    353 ;  
    354 ; @history 
    355 ;  
    356 ;  
    357 ; @version  
     322; 
     323; @uses 
     324; 
     325; @restrictions 
     326; 
     327; @examples 
     328; 
     329; @history 
     330; 
     331; @version 
    358332; $Id$ 
    359333;- 
    360334PRO move, event, casename 
    361335; 
    362   compile_opt strictarr, strictarrsubs  
     336  compile_opt strictarr, strictarrsubs 
    363337; 
    364338   possiblecase = ['day', 'month', 'year', 'impossiblecase'] 
     
    391365; @categories 
    392366; Compound widget 
    393 ;  
     367; 
    394368; @param EVENT 
    395369; 
    396370; 
    397371; @returns 
    398 ;  
    399 ;  
    400 ; @uses 
    401 ;  
    402 ;  
    403 ; @restrictions 
    404 ;  
    405 ;  
    406 ; @examples 
    407 ;  
    408 ;  
    409 ; @history 
    410 ;  
    411 ;  
    412 ; @version  
     372; 
     373; @uses 
     374; 
     375; @restrictions 
     376; 
     377; @examples 
     378; 
     379; @history 
     380; 
     381; @version 
    413382; $Id$ 
    414383;- 
     
    416385; 
    417386@cm_4cal 
    418   compile_opt strictarr, strictarrsubs  
     387  compile_opt strictarr, strictarrsubs 
    419388; 
    420389  winfo_id = widget_info(event.handler, find_by_uname = 'infocal') 
     
    424393  widget_control, event.id, get_uvalue = uval 
    425394; high frequency calendar 
    426   IF uval.name EQ 'step' THEN BEGIN  
     395  IF uval.name EQ 'step' THEN BEGIN 
    427396    infowid.date = jul2date(event.index + infowid.fakecal) 
    428397  ENDIF ELSE BEGIN 
     
    434403; we try to move the combobox just right, with name: possiblecase[whichcase+1] 
    435404      if widget_info(event.handler, find_by_uname = possiblecase[whichcase+1]) EQ 0 then BEGIN 
    436 ; this widget do not exist we set cyclicly the current widget to the 
     405; this widget do not exist we set cyclically the current widget to the 
    437406; value 0 if event.out=1 or combobox_number-1 if event.out=-1 
    438407        widget_control, event.id, get_value = widvalue 
     
    451420; we update the date 
    452421    infowid = get_cal_value(event.handler, winfo_id) 
    453   ENDELSE  
     422  ENDELSE 
    454423; 
    455424  widget_control, winfo_id, set_uvalue = infowid 
     
    465434; @categories 
    466435; Compound widget 
    467 ;  
     436; 
    468437; @param PARENT {in}{required} 
    469438; The widget ID of the parent widget. 
     
    474443; @param JDATE0 
    475444; 
    476 ;  
    477445; @keyword CALTYPE 
    478 ;  
    479 ;  
     446; 
    480447; @keyword FAKECAL 
    481448; 
    482 ;  
     449; 
    483450; @keyword UVALUE 
    484451; 
    485 ;  
    486452; @keyword UNAME 
    487453; 
    488 ;  
     454; 
    489455; @keyword _EXTRA 
    490456; Used to pass your keywords 
    491 ;  
    492 ; @returns 
    493 ;  
    494 ;  
    495 ; @uses 
    496 ;  
    497 ;  
    498 ; @restrictions 
    499 ;  
    500 ;  
    501 ; @examples 
    502 ;  
    503 ;  
    504 ; @history 
    505 ;  
    506 ;  
    507 ; @version  
     457; 
     458; @returns 
     459; 
     460; @uses 
     461; 
     462; @restrictions 
     463; 
     464; @examples 
     465; 
     466; @history 
     467; 
     468; @version 
    508469; $Id$ 
    509470; 
    510471; @todo 
    511472; seb 
    512 ;  
     473; 
    513474;- 
    514475FUNCTION cw_calendar, parent, calendar, jdate0, CALTYPE = CALTYPE, FAKECAL = fakecal, UVALUE = uvalue, UNAME = uname, _extra = ex 
     
    516477@cm_4cal 
    517478; 
    518   compile_opt strictarr, strictarrsubs  
     479  compile_opt strictarr, strictarrsubs 
    519480; 
    520481  if keyword_set(caltype) then key_caltype = caltype 
     
    547508                     , uvalue = {calendar:calendar, date:jul2date(jdate0), fakecal:fakecal, caltype: key_caltype}) 
    548509; 
    549   IF keyword_set(fakecal) THEN BEGIN  
     510  IF keyword_set(fakecal) THEN BEGIN 
    550511    cmbbid = cw_combobox_pm(base, UVALUE = {name:'step'}, UNAME = 'step' $ 
    551512                            , value = strtrim(indgen(n_elements(calendar)), 1)) 
    552513    widget_control, cmbbid, set_value = {combobox_select:(where(calendar EQ jdate0))[0]} 
    553   ENDIF ELSE BEGIN  
     514  ENDIF ELSE BEGIN 
    554515; 
    555516    vallen = widget_info(base, string_size = 'm') 
  • trunk/SRC/ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_combobox_pm.pro

    r157 r226  
    77;    case uval of 
    88;       'done':widget_control, event.top, /destroy 
    9 ;       'dynamic_resize':BEGIN  
     9;       'dynamic_resize':BEGIN 
    1010;          widget_control, event.id, get_value = value 
    1111;          widget_control, ComboboxId, set_value = {dynamic_resize:value} 
    1212;       END 
    13 ;       'combobox_select':BEGIN  
     13;       'combobox_select':BEGIN 
    1414;          widget_control, event.id, get_value = value 
    1515;          widget_control, ComboboxId, set_value = {combobox_select:value} 
    1616;       END 
    17 ;       'value':BEGIN  
     17;       'value':BEGIN 
    1818;          widget_control, event.id, get_value = value 
    1919;          widget_control, ComboboxId, set_value = value 
    2020;       END 
    21 ;       'get':BEGIN  
     21;       'get':BEGIN 
    2222;          widget_control, ComboboxId, get_value = value 
    2323;          help,  value, /struct 
     
    5252; @categories 
    5353; Compound widget 
    54 ;  
     54; 
    5555; @param ID 
    5656; 
     
    6060; 
    6161; @returns 
    62 ;  
    63 ;  
     62; 
    6463; @uses 
    65 ;  
    66 ;  
     64; 
    6765; @restrictions 
    68 ;  
    69 ;  
     66; 
    7067; @examples 
    71 ;  
    72 ;  
     68; 
    7369; @history 
    74 ;  
    75 ;  
    76 ; @version  
     70; 
     71; @version 
    7772; $Id$ 
    7873;- 
     
    10499; @categories 
    105100; Compound widget 
    106 ;  
     101; 
    107102; @param ID 
    108103; 
    109 ; 
    110104; @returns 
    111 ;  
    112 ;  
     105; 
    113106; @uses 
    114 ;  
    115 ;  
     107; 
    116108; @restrictions 
    117 ;  
    118 ;  
     109; 
    119110; @examples 
    120 ;  
    121 ;  
     111; 
    122112; @history 
    123 ;  
    124 ;  
    125 ; @version  
     113; 
     114; @version 
    126115; $Id$ 
    127116;- 
     
    147136; @categories 
    148137; Compound widget 
    149 ;  
     138; 
    150139; @param EVENT 
    151140; 
    152 ; 
    153141; @returns 
    154 ;  
    155 ;  
     142; 
    156143; @uses 
    157 ;  
    158 ;  
     144; 
    159145; @restrictions 
    160 ;  
    161 ;  
     146; 
    162147; @examples 
    163 ;  
    164 ;  
     148; 
    165149; @history 
    166 ;  
    167 ;  
    168 ; @version  
     150; 
     151; @version 
    169152; $Id$ 
    170153;- 
     
    187170   case uval OF 
    188171      'plus':BEGIN 
    189          if index LT (cmbbnumb - 1) then BEGIN  
     172         if index LT (cmbbnumb - 1) then BEGIN 
    190173           index = index + 1 
    191174           widget_control, ComboboxId, set_combobox_select = index 
     
    193176      END 
    194177      'minus':BEGIN 
    195          if index GT 0 then BEGIN  
     178         if index GT 0 then BEGIN 
    196179           index = index - 1 
    197180           widget_control, ComboboxId, set_combobox_select = index 
     
    212195; @categories 
    213196; Compound widget 
    214 ;  
     197; 
    215198; @param PARENT {in}{required} 
    216199; The widget ID of the parent widget. 
     
    219202; Buttons will be arranged in the number of columns 
    220203; specified by this keyword. 
    221 ;  
     204; 
    222205; @keyword ROW 
    223206; Buttons will be arranged in the number of rows 
    224207; specified by this keyword. 
    225 ;  
     208; 
    226209; @keyword UVALUE 
    227210; The user value to be associated with the widget. 
    228 ;  
     211; 
    229212; @keyword UNAME 
    230213; The user name to be associated with the widget. 
    231 ;  
     214; 
    232215; @keyword VALUE 
    233216; 
     
    258241;   index the array of names originally used to set the widget''s 
    259242;   value 
    260 ;   OUT:It is an integer which can take 3 values:  
     243;   OUT:It is an integer which can take 3 values: 
    261244;       1 : If we press + when the index is already at the max 
    262245;       Comment: In this case, the index stay at the max 
     
    271254;       1) GET_VALUE 
    272255;   widget_control,wid_id,get_value=resultat 
    273 ;   Send back, in the result variable, a structure of 3 elements whose  
     256;   Send back, in the result variable, a structure of 3 elements whose 
    274257;   names are inspired by keywords we can pass at widget_control when 
    275258;   we use WIDGET_COMBOBOX: 
     
    285268;       2) SET_VALUE 
    286269;   widget_control,wid_id,set_value=impose 
    287 ;   Allows to modify the state of the combobox like we can do it for  
    288 ;   WIDGET_COMBOBOX. May impose:  
     270;   Allows to modify the state of the combobox like we can do it for 
     271;   WIDGET_COMBOBOX. May impose: 
    289272;       a) The contents of the list widget (string or string array) 
    290 ;       b) A structure which can have for elements (from 1 to 3):  
     273;       b) A structure which can have for elements (from 1 to 3): 
    291274;            DYNAMIC_RESIZE:Set this keyword to activate (if set to 1) 
    292275;            or deactivate (if set to 0) dynamic resizing of the 
     
    323306   IF (N_PARAMS() NE 1) THEN MESSAGE, 'Incorrect number of arguments' 
    324307   ON_ERROR, 2                  ;return to caller 
    325 ; cheking for row and column keywords 
    326    row = keyword_set(row)*(1-keyword_set(column))  
    327    column = keyword_set(column)*(1-keyword_set(row))+(keyword_set(column) EQ row)  
     308; checking for row and column keywords 
     309   row = keyword_set(row)*(1-keyword_set(column)) 
     310   column = keyword_set(column)*(1-keyword_set(row))+(keyword_set(column) EQ row) 
    328311   if NOT keyword_set(uvalue) then uvalue = '' 
    329312   if NOT keyword_set(uname) then uname = '' 
     
    333316                      , FUNC_GET_VALUE='cw_combobox_pm_get_value' $ 
    334317                      , PRO_SET_VALUE='cw_combobox_pm_set_value' $ 
    335                       , UVALUE = uvalue, UNAME = uname, _extra = ex)    
     318                      , UVALUE = uvalue, UNAME = uname, _extra = ex)  
    336319; 
    337320   vallen = widget_info(base, string_size = 'm') 
    338321   vallen = 35 + (vallen[0]-1)*max(strlen(value)) 
    339    if keyword_set(row) THEN BEGIN  
     322   if keyword_set(row) THEN BEGIN 
    340323     nothing = widget_button(base, value = '-', uvalue = 'minus', xoffset = 0 $ 
    341324                             , yoffset = 5, xsize = 15, ysize = 15) 
     
    345328                             , xoffset = vallen+11, yoffset = 5 $ 
    346329                             , xsize = 15, ysize = 15) 
    347    ENDIF ELSE BEGIN  
     330   ENDIF ELSE BEGIN 
    348331     nothing = widget_combobox(base, VALUE = value, UVALUE = 'Combobox', UNAME = 'Combobox' $ 
    349332                               , xoffset = 0, yoffset = 0, xsize = vallen) 
     
    354337                             , xoffset = vallen/2 $ 
    355338                             , yoffset = 24, xsize = 15, ysize = 15) 
    356    ENDELSE  
     339   ENDELSE 
    357340; 
    358341;   widget_control,base,/realize 
  • trunk/SRC/ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_domain.pro

    r172 r226  
    1212;          widget_control, Id, set_value = boxzoom 
    1313;       END 
    14 ;       'get':BEGIN  
     14;       'get':BEGIN 
    1515;          widget_control, Id, get_value = value 
    1616;          print,  value 
     
    4545; @categories 
    4646; Compound widget 
    47 ;  
     47; 
    4848; @param ID 
    4949; 
     
    5353; 
    5454; @returns 
    55 ;  
    56 ;  
     55; 
    5756; @uses 
    58 ;  
    59 ;  
     57; 
    6058; @restrictions 
    61 ;  
    62 ;  
     59; 
    6360; @examples 
    64 ;  
    65 ;  
     61; 
    6662; @history 
    67 ;  
    68 ;  
    69 ; @version  
     63; 
     64; @version 
    7065; $Id$ 
    7166;- 
     
    8681; What is the type of boxzoom ? 
    8782   currentplot = (extractatt(top_uvalue, 'smallin'))[2]-1 
    88    options = extractatt(top_uvalue, 'options')    
     83   options = extractatt(top_uvalue, 'options') 
    8984   flags = extractatt(top_uvalue, 'optionsflag') 
    9085   flags = flags[*, currentplot] 
     
    119114   Case N_Elements(Value) OF 
    120115      0:boxzoom = [lonn1, lonn2, latt1, latt2, vertf1, vertf2] 
    121       1:BEGIN  
     116      1:BEGIN 
    122117         if value EQ -1 then boxzoom = [lonn1, lonn2, latt1, latt2, vertf1, vertf2] $ 
    123118         ELSE boxzoom=[lonn1, lonn2, latt1, latt2, 0.,value[0]] 
     
    127122      5:boxzoom=[Value[0:3], 0, Value[4]] 
    128123      6:boxzoom = Value 
    129       Else:BEGIN  
     124      Else:BEGIN 
    130125         rien = report('Wrong Definition of Boxzoom') 
    131126      END 
     
    151146      min = floor(min([glamt,glamf], max = max)) 
    152147      max = ceil(max) 
    153    ENDIF ELSE BEGIN  
     148   ENDIF ELSE BEGIN 
    154149      min = 0 
    155150      max = jpi-1 
     
    195190      min = floor(min([gphit,gphif], max = max)) 
    196191      max = ceil(max) 
    197    ENDIF ELSE BEGIN  
     192   ENDIF ELSE BEGIN 
    198193      min = 0 
    199194      max = jpj-1 
     
    250245      widget_control, dthlv2id, set_value = {value:strtrim(gdep2, 1)} 
    251246   ENDIF ELSE gdep2 = gdep1+1 
    252 ; We make sure that given depthes contain at least one level. 
     247; We make sure that given depths contains at least one level. 
    253248   if boxzoom[4] GT boxzoom[5] then begin 
    254249      rien = boxzoom[4] 
     
    256251      boxzoom[5] = rien 
    257252   endif 
    258 ;  
     253; 
    259254   rien = where(gdep1 LT boxzoom[4], indice1) 
    260255   indice1 = indice1 < (jpk-1) 
     
    279274   widget_control, depth1id, set_value = {slider_min:min1, slider_max:max1, value:boxzoom[4]} 
    280275   min2 = gdep2[indice1] 
    281    if indice2 EQ jpk-1 then BEGIN  
     276   if indice2 EQ jpk-1 then BEGIN 
    282277      max2 = max([gdept, gdepw]) 
    283278      max2 = strtrim(string(max2,format='(e8.0)'), 1) 
     
    295290; @categories 
    296291; Compound widget 
    297 ;  
     292; 
    298293; @param ID 
    299294; 
    300295; 
    301296; @returns 
    302 ;  
    303 ;  
     297; 
    304298; @uses 
    305 ;  
    306 ;  
     299; 
    307300; @restrictions 
    308 ;  
    309 ;  
     301; 
    310302; @examples 
    311 ;  
    312 ;  
     303; 
    313304; @history 
    314 ;  
    315 ;  
    316 ; @version  
     305; 
     306; @version 
    317307; $Id$ 
    318308;- 
     
    337327; @categories 
    338328; Compound widget 
    339 ;  
     329; 
    340330; @param EVENT 
    341331; 
    342332; 
    343333; @returns 
    344 ;  
    345 ;  
     334; 
    346335; @uses 
    347 ;  
    348 ;  
     336; 
    349337; @restrictions 
    350 ;  
    351 ;  
     338; 
    352339; @examples 
    353 ;  
    354 ;  
     340; 
    355341; @history 
    356 ;  
    357 ;  
    358 ; @version  
     342; 
     343; @version 
    359344; $Id$ 
    360345;- 
     
    408393            widget_control, dthlv2id, set_value = {combobox_select:event.index} 
    409394; So we redefine the value and the max of the slider 2 
    410             if event.index EQ jpk-1 then BEGIN  
     395            if event.index EQ jpk-1 then BEGIN 
    411396               max = max([gdept, gdepw]) 
    412397               max = strtrim(string(max,format='(e8.0)'), 1) 
     
    417402; So we redefine the max of the slider 1 
    418403            widget_control, depth1id, set_value = {slider_max:gdep1[event.index]} 
    419          END  
    420 ; We redefine the value and the min of the slider depth1  
     404         END 
     405; We redefine the value and the min of the slider depth1 
    421406         if event.index EQ 0 then min = 0 ELSE min = gdep1[event.index-1]+1 
    422407         widget_control, depth1id, set_value = {slider_min:min, value:gdep1[event.index]} 
     
    443428; Se we redefine the min of the slider 2 
    444429            widget_control, depth2id, set_value = {slider_min:gdep2[event.index]} 
    445          END  
     430         END 
    446431; We redefine the value and the max of the slider depth 2 
    447          if event.index EQ jpk-1 then BEGIN  
     432         if event.index EQ jpk-1 then BEGIN 
    448433            max = max([gdept, gdepw]) 
    449434            max = strtrim(string(max,format='(e8.0)'), 1) 
     
    488473            widget_control, dthlv2id, set_value = {combobox_select:indice} 
    489474; So we redefine the min of the slider 2 
    490             if indice EQ jpk-1 then BEGIN  
     475            if indice EQ jpk-1 then BEGIN 
    491476               max = max([gdept, gdepw]) 
    492477               max = strtrim(string(max,format='(e8.0)'), 1) 
     
    510495; @categories 
    511496; Compound widget 
    512 ;  
     497; 
    513498; @param PARENT {in}{required} 
    514499; The widget ID of the parent widget. 
    515 ;  
     500; 
    516501; @keyword UVALUE 
    517502; The user value to be associated with the widget. 
    518 ;  
     503; 
    519504; @keyword UNAME 
    520505; The user name to be associated with the widget. 
    521 ;  
     506; 
    522507; @keyword STRICT 
    523508; 
     
    527512; 
    528513; @keyword BOXZOOM 
    529 ; Vector indicating the geographic zone on which we want to cut the map.  
    530 ; If BOXZOOM has :  
     514; Vector indicating the geographic zone on which we want to cut the map. 
     515; If BOXZOOM has : 
    531516;   1 element : The extraction is made on [lon1, lon2, lat1, lat2, 0.,boxzoom[0]] 
    532517;   2 elements: The extraction is made on [lon1, lon2, lat1, lat2, boxzoom[0],boxzoom[1]] 
    533518;   4 elements: The extraction is made on [Boxzoom, 0, max([gdept, gdepw])] 
    534519;   5 elements: The extraction is made on [Boxzoom[0:3], 0, Boxzoom[4]] 
    535 ;   6 elements: The extraction is made on Boxzoom  
     520;   6 elements: The extraction is made on Boxzoom 
    536521; Where lon1, lon2,lat1,lat2 are global variables defined at the last domdef! 
    537522; 
    538523; @keyword _EXTRA 
    539524; Used to pass your keywords 
    540 ;  
     525; 
    541526; @returns 
    542 ;  
    543 ;  
     527; 
    544528; @uses 
    545 ;  
    546 ;  
     529; 
    547530; @restrictions 
    548 ;  
    549 ;  
     531; 
    550532; @examples 
    551 ;  
    552 ;  
     533; 
    553534; @history 
    554 ;  
    555 ;  
    556 ; @version  
     535; 
     536; @version 
    557537; $Id$ 
    558538; 
    559539; @todo 
    560540; seb: Documenter 
    561 ;  
     541; 
    562542;- 
    563543FUNCTION cw_domain, parent, BOXZOOM = boxzoom, STRICT = strict, UVALUE = uvalue, UNAME = uname, UNZOOM = unzoom, _extra = ex 
     
    596576                     , FUNC_GET_VALUE = 'cw_domain_get_value' $ 
    597577                     , PRO_SET_VALUE = 'cw_domain_set_value' $ 
    598                      , UVALUE = uvalue, UNAME = uname, _extra = ex)    
     578                     , UVALUE = uvalue, UNAME = uname, _extra = ex) 
    599579;------------------------------------------------ 
    600580  baseh = widget_base(base, column = 1+keyword_set(unzoom), space = 0) 
  • trunk/SRC/ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_droplist_pm.pro

    r157 r226  
    66;    case uval of 
    77;       'done':widget_control, event.top, /destroy 
    8 ;       'dynamic_resize':BEGIN  
     8;       'dynamic_resize':BEGIN 
    99;          widget_control, event.id, get_value = value 
    1010;          widget_control, DroplistId, set_value = {dynamic_resize:value} 
    1111;       END 
    12 ;       'droplist_select':BEGIN  
     12;       'droplist_select':BEGIN 
    1313;          widget_control, event.id, get_value = value 
    1414;          widget_control, DroplistId, set_value = {droplist_select:value} 
    1515;       END 
    16 ;       'value':BEGIN  
     16;       'value':BEGIN 
    1717;          widget_control, event.id, get_value = value 
    1818;          widget_control, DroplistId, set_value = value 
    1919;       END 
    20 ;       'get':BEGIN  
     20;       'get':BEGIN 
    2121;          widget_control, DroplistId, get_value = value 
    2222;          help,  value, /struct 
     
    5454; @categories 
    5555; Compound widget 
    56 ;  
     56; 
    5757; @param ID 
    58 ; 
    5958; 
    6059; @param VALUE 
     
    6261; 
    6362; @returns 
    64 ;  
    65 ;  
     63; 
    6664; @uses 
    67 ;  
    68 ;  
     65; 
    6966; @restrictions 
    70 ;  
    71 ;  
     67; 
    7268; @examples 
    73 ;  
    74 ;  
     69; 
    7570; @history 
    76 ;  
    77 ;  
    78 ; @version  
     71; 
     72; @version 
    7973; $Id$ 
    8074;- 
     
    10498; @categories 
    10599; Compound widget 
    106 ;  
     100; 
    107101; @param ID 
    108102; 
    109103; @returns 
    110 ;  
    111 ;  
     104; 
    112105; @uses 
    113 ;  
    114 ;  
     106; 
    115107; @restrictions 
    116 ;  
    117 ;  
     108; 
    118109; @examples 
    119 ;  
    120 ;  
     110; 
    121111; @history 
    122 ;  
    123 ;  
    124 ; @version  
     112; 
     113; @version 
    125114; $Id$ 
    126115;- 
     
    141130; @categories 
    142131; Compound widget 
    143 ;  
     132; 
    144133; @param EVENT 
    145134; 
    146 ; 
    147135; @returns 
    148 ;  
    149 ;  
     136; 
    150137; @uses 
    151 ;  
    152 ;  
     138; 
    153139; @restrictions 
    154 ;  
    155 ;  
     140; 
    156141; @examples 
    157 ;  
    158 ;  
     142; 
    159143; @history 
    160 ;  
    161 ;  
    162 ; @version  
     144; 
     145; @version 
    163146; $Id$ 
    164147;- 
     
    200183; @categories 
    201184; Compound widget 
    202 ;  
     185; 
    203186; @param PARENT {in}{required} 
    204187; The widget ID of the parent widget. 
     
    207190; Buttons will be arranged in the number of columns 
    208191; specified by this keyword. 
    209 ;  
     192; 
    210193; @keyword ROW 
    211194; Buttons will be arranged in the number of rows 
    212195; specified by this keyword. 
    213 ;  
     196; 
    214197; @keyword UVALUE 
    215198; The user value to be associated with the widget. 
    216 ;  
     199; 
    217200; @keyword UNAME 
    218201; The user name to be associated with the widget. 
    219 ;  
     202; 
    220203; @keyword _EXTRA 
    221204; Used to pass your keywords 
     
    243226;   index the array of names originally used to set the widget''s 
    244227;   value 
    245 ;   OUT:It is an integer which can take 3 values:  
     228;   OUT:It is an integer which can take 3 values: 
    246229;       1 : If we press + when the index is already at the max 
    247230;       Comment: In this case, the index stay at the max 
     
    256239;       1) GET_VALUE 
    257240;   widget_control,wid_id,get_value=resultat 
    258 ;   Send back, in the result variable, a structure of 3 elements whose  
     241;   Send back, in the result variable, a structure of 3 elements whose 
    259242;   names are inspired by keywords we can pass at widget_control when 
    260243;   we use WIDGET_COMBOBOX: 
     
    273256;   pour WIDGET_DROPLIST Impose peut etre: 
    274257;       a) The contents of the list widget (string or string array) 
    275 ;       b) A structure which can have for elements (from 1 to 3):  
     258;       b) A structure which can have for elements (from 1 to 3): 
    276259;            DYNAMIC_RESIZE:Set this keyword to activate (if set to 1) 
    277260;            or deactivate (if set to 0) dynamic resizing of the 
     
    308291   IF (N_PARAMS() NE 1) THEN MESSAGE, 'Incorrect number of arguments' 
    309292   ON_ERROR, 2                  ;return to caller 
    310 ; cheking for row and column keywords 
    311    row = keyword_set(row)*(1-keyword_set(column))  
    312    column = keyword_set(column)*(1-keyword_set(row))+(keyword_set(column) EQ row)  
     293; checking for row and column keywords 
     294   row = keyword_set(row)*(1-keyword_set(column)) 
     295   column = keyword_set(column)*(1-keyword_set(row))+(keyword_set(column) EQ row) 
    313296   if NOT keyword_set(uvalue) then uvalue = '' 
    314297   if NOT keyword_set(uname) then uname = '' 
     
    318301                      , FUNC_GET_VALUE='cw_droplist_pm_get_value' $ 
    319302                      , PRO_SET_VALUE='cw_droplist_pm_set_value' $ 
    320                       , UVALUE = uvalue, UNAME = uname, _extra = ex)    
     303                      , UVALUE = uvalue, UNAME = uname, _extra = ex) 
    321304; 
    322305   if keyword_set(row) THEN nothing = widget_button(base,value= '-', uvalue= 'minus') 
  • trunk/SRC/ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_slide_slice.pro

    r157 r226  
    55; @categories 
    66; Compound widget 
    7 ;  
     7; 
    88; @param ID 
    9 ; 
    109; 
    1110; @param VALUE 
     
    1312; 
    1413; @returns 
    15 ;  
    16 ;  
     14; 
    1715; @uses 
    18 ;  
    19 ;  
     16; 
    2017; @restrictions 
    21 ;  
    22 ;  
     18; 
    2319; @examples 
    24 ;  
    25 ;  
     20; 
    2621; @history 
    27 ;  
    28 ;  
    29 ; @version  
     22; 
     23; @version 
    3024; $Id$ 
    3125;- 
     
    4943      widget_control, sliderid, set_value = {slider_min:mini, slider_max:maxi, value:boxzoom[0]<maxi} 
    5044      thickness = boxzoom[1]-boxzoom[0] 
    51    ENDIF ELSE BEGIN  
     45   ENDIF ELSE BEGIN 
    5246      mini = floor(min([gphit, gphif], max = maxi)) 
    5347      maxi = ceil(maxi)-thickness 
     
    5751   thicknessval = thicknessuval.choix 
    5852   index = where(thicknessval EQ thickness) & index = index[0] 
    59    if index EQ -1 then BEGIN  
     53   if index EQ -1 then BEGIN 
    6054      index = 20 
    6155      thicknessval[20] = strtrim(thickness, 1) 
     
    7367; @categories 
    7468; Compound widget 
    75 ;  
     69; 
    7670; @param EVENT 
    7771; 
    78 ; 
    7972; @returns 
    80 ;  
    81 ;  
     73; 
    8274; @uses 
    83 ;  
    84 ;  
     75; 
    8576; @restrictions 
    86 ;  
    87 ;  
     77; 
    8878; @examples 
    89 ;  
    90 ;  
     79; 
    9180; @history 
    92 ;  
    93 ;  
    94 ; @version  
     81; 
     82; @version 
    9583; $Id$ 
    9684;- 
     
    117105         mini = floor(min([glamt, glamf], max = maxi)) 
    118106         maxi = ceil(maxi)-thickness 
    119       ENDIF ELSE BEGIN  
     107      ENDIF ELSE BEGIN 
    120108         mini = floor(min([gphit, gphif], max = maxi)) 
    121109         maxi = ceil(maxi)-thickness 
     
    136124; print, lon1, mini, maxi 
    137125;             widget_control, sliderid, set_value = {value:lon1, slider_min_max:[mini, maxi]} 
    138 ;          ENDIF ELSE BEGIN  
     126;          ENDIF ELSE BEGIN 
    139127;             mini = floor(min([gphit, glamf], max = maxi)) 
    140128;             maxi = ceil(maxi) 
     
    145133; print, 'ds if',firstxt, 0, jpi-1 
    146134;             widget_control, sliderid, set_value = {value:firstxt, slider_min_max:[0, jpi-1]} 
    147 ;          ENDIF ELSE BEGIN  
     135;          ENDIF ELSE BEGIN 
    148136;             widget_control, sliderid, set_value = {value:firstyt, slider_min_max:[0, jpj-1]} 
    149137;          ENDELSE 
     
    154142   if type EQ 'y' then begin 
    155143      boxzoom[0] = slider &  boxzoom[1] = slider+thickness 
    156    ENDIF ELSE BEGIN  
     144   ENDIF ELSE BEGIN 
    157145      boxzoom[2] = slider &  boxzoom[3] = slider+thickness 
    158    ENDELSE  
     146   ENDELSE 
    159147;    ENDIF ELSE BEGIN 
    160148;       if strpos(type,'y') NE -1 then begin 
    161149;          boxzoom[0] = glamt[slider, 0] &  boxzoom[1] = glamf[slider+thickness, 0] 
    162 ;       ENDIF ELSE BEGIN  
     150;       ENDIF ELSE BEGIN 
    163151;          boxzoom[2] = gphit[0, slider] &  boxzoom[3] = gphif[0, slider+thickness] 
    164 ;       ENDELSE  
     152;       ENDELSE 
    165153;    ENDELSE 
    166154   widget_control, domainid, set_value = boxzoom 
     
    179167; 
    180168; @keyword BOXZOOM 
    181 ; Vector indicating the geographic zone on which we want to cut the map.  
    182 ; If BOXZOOM has :  
     169; Vector indicating the geographic zone on which we want to cut the map. 
     170; If BOXZOOM has : 
    183171;   1 element : The extraction is made on [lon1, lon2, lat1, lat2, 0.,boxzoom[0]] 
    184172;   2 elements: The extraction is made on [lon1, lon2, lat1, lat2, boxzoom[0],boxzoom[1]] 
    185173;   4 elements: The extraction is made on [Boxzoom, 0, max([gdept, gdepw])] 
    186174;   5 elements: The extraction is made on [Boxzoom[0:3], 0, Boxzoom[4]] 
    187 ;   6 elements: The extraction is made on Boxzoom  
     175;   6 elements: The extraction is made on Boxzoom 
    188176; Where lon1, lon2,lat1,lat2 are global variables defined at the last domdef! 
    189177; 
     
    191179; Buttons will be arranged in the number of columns 
    192180; specified by this keyword. 
    193 ;  
     181; 
    194182; @keyword FRAME 
    195183; Specifies the width of the frame to be drawn around the base. 
    196 ;  
     184; 
    197185; @keyword ROW 
    198186; Buttons will be arranged in the number of rows 
    199187; specified by this keyword. 
    200 ;  
     188; 
    201189; @keyword UVALUE 
    202190; The user value to be associated with the widget. 
    203 ;  
     191; 
    204192; @keyword UNAME 
    205193; The user name to be associated with the widget. 
    206 ;  
     194; 
    207195; @keyword _EXTRA 
    208196; Used to pass your keywords 
    209 ;  
     197; 
    210198; @returns 
    211 ;  
    212 ;  
     199; 
    213200; @uses 
    214 ;  
    215 ;  
     201; 
    216202; @restrictions 
    217 ;  
    218 ;  
     203; 
    219204; @examples 
    220 ;  
    221 ;  
     205; 
    222206; @history 
    223 ;  
    224 ;  
    225 ; @version  
     207; 
     208; @version 
    226209; $Id$ 
    227 ;  
     210; 
    228211; @todo 
    229212; seb: documenter 
     
    236219@common 
    237220;------------------------------------------------ 
    238 ; cheking exclusive keywords 
     221; checking exclusive keywords 
    239222   column = keyword_set(column)*(1-keyword_set(row)) 
    240    row = keyword_set(row)*(1-keyword_set(column)) +(keyword_set(row) EQ column)  
     223   row = keyword_set(row)*(1-keyword_set(column)) +(keyword_set(row) EQ column) 
    241224   if NOT keyword_set(uvalue) then uvalue = '' 
    242225   if NOT keyword_set(uname) then uname = '' 
     
    247230                      , PRO_SET_VALUE='cw_slide_slice_set_value' $ 
    248231                      , ROW = row, COLUMN = column, UVALUE = uvalue, UNAME = uname $ 
    249                       , FRAME = frame, _extra = ex)    
     232                      , FRAME = frame, _extra = ex) 
    250233;------------------------------------------------ 
    251234   if NOT keyword_set(boxzoom) then boxzoom = [lon1, lon2, lat1, lat2] 
     
    264247                          , value = mini > boxzoom[0] < maxi, /column, uname = 'slider' $ 
    265248                          , uvalue = {name:'slider'}) 
    266    ENDIF ELSE BEGIN  
     249   ENDIF ELSE BEGIN 
    267250      mini = floor(min([gphit, gphif], max = maxi)) 
    268251      thickness = boxzoom[3]-boxzoom[2] 
     
    273256   ENDELSE 
    274257   index = where(thicknessval EQ thickness) & index = index[0] 
    275    if index EQ -1 then BEGIN  
     258   if index EQ -1 then BEGIN 
    276259      index = 20 
    277260      thicknessval[20] = strtrim(thickness, 1) 
     
    280263   endif 
    281264   widget_control, droplistid, set_value = {droplist_select:index} 
    282     
     265 
    283266;   if type EQ 'xt' then begin 
    284267;       mini = floor(min([glamt,glamf], max = maxi)) 
    285268;       maxi = ceil(maxi) 
    286 ;    ENDIF ELSE BEGIN  
     269;    ENDIF ELSE BEGIN 
    287270;       mini = floor(min([gphit,gphif], max = maxi)) 
    288271;       maxi = ceil(maxi) 
    289272;    ENDELSE 
    290     
     273  
    291274;------------------------------------------------ 
    292275   return, base 
  • trunk/SRC/ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_slider_pm.pro

    r163 r226  
    66;    case uval of 
    77;       'done':widget_control, event.top, /destroy 
    8 ;       'slider_min':BEGIN  
     8;       'slider_min':BEGIN 
    99;          widget_control, event.id, get_value = value 
    1010;          widget_control, SliderBarId, set_value = {slider_min:value} 
    1111;       END 
    12 ;       'slider_max':BEGIN  
     12;       'slider_max':BEGIN 
    1313;          widget_control, event.id, get_value = value 
    1414;          widget_control, SliderBarId, set_value = {slider_max:value} 
    1515;       END 
    16 ;       'slider_value':BEGIN  
     16;       'slider_value':BEGIN 
    1717;          widget_control, event.id, get_value = value 
    1818;          widget_control, SliderBarId, set_value = value 
    1919;       END 
    20 ;       'get':BEGIN  
     20;       'get':BEGIN 
    2121;          widget_control, SliderBarId, get_value = value 
    2222;          help,  value, /struct 
     
    5757; 
    5858; @returns 
    59 ;  
    60 ;  
     59; 
    6160; @uses 
    62 ;  
    63 ;  
    64 ; @restrictions 
    65 ;  
    66 ;  
    67 ; @examples 
    68 ;  
    69 ;  
    70 ; @history 
    71 ;  
    72 ;  
    73 ; @version  
     61; 
     62; @restrictions 
     63; 
     64; @examples 
     65; 
     66; @history 
     67; 
     68; @version 
    7469; $Id$ 
    7570;- 
     
    9388; 
    9489; @returns 
    95 ;  
    96 ;  
     90; 
    9791; @uses 
    98 ;  
    99 ;  
    100 ; @restrictions 
    101 ;  
    102 ;  
    103 ; @examples 
    104 ;  
    105 ;  
    106 ; @history 
    107 ;  
    108 ;  
    109 ; @version  
     92; 
     93; @restrictions 
     94; 
     95; @examples 
     96; 
     97; @history 
     98; 
     99; @version 
    110100; $Id$ 
    111101;- 
     
    124114; @categories 
    125115; Compound widget 
    126 ;  
     116; 
    127117; @param ID 
    128 ; 
    129118; 
    130119; @param VALUE 
     
    132121; 
    133122; @returns 
    134 ;  
    135 ;  
     123; 
    136124; @uses 
    137 ;  
    138 ;  
    139 ; @restrictions 
    140 ;  
    141 ;  
    142 ; @examples 
    143 ;  
    144 ;  
    145 ; @history 
    146 ;  
    147 ;  
    148 ; @version  
     125; 
     126; @restrictions 
     127; 
     128; @examples 
     129; 
     130; @history 
     131; 
     132; @version 
    149133; $Id$ 
    150134;- 
     
    161145      case strtrim(strlowcase(tagnames[tag]), 2) of 
    162146        'slider_min':BEGIN 
    163 ;          IF float(value.slider_min[0]) LT minmax[1] THEN BEGIN  
     147;          IF float(value.slider_min[0]) LT minmax[1] THEN BEGIN 
    164148            minmax[0] = value.slider_min[0] 
    165149            widget_control, sbid, set_slider_min = floor(float(value.slider_min[0])) 
     
    169153              widget_control, dcid, set_value = decvalue(value.slider_min) 
    170154              widget_control, dcid, set_combobox_select = decind(value.slider_min) 
    171             ENDIF  
    172 ;          ENDIF  
     155            ENDIF 
     156;          ENDIF 
    173157        end 
    174158        'slider_max':BEGIN 
    175 ;          IF float(value.slider_max[0]) GT minmax[0] THEN BEGIN  
     159;          IF float(value.slider_max[0]) GT minmax[0] THEN BEGIN 
    176160            minmax[1] = value.slider_max[0] 
    177161            widget_control, sbid, set_slider_max = ceil(float(value.slider_max[0])) 
     
    181165              widget_control, dcid, set_value = decvalue(value.slider_max) 
    182166              widget_control, dcid, set_combobox_select = decind(value.slider_max) 
    183             ENDIF  
    184 ;          ENDIF  
     167            ENDIF 
     168;          ENDIF 
    185169        end 
    186170        'value':IF float(value.value[0]) GE minmax[0] $ 
     
    189173      endcase 
    190174    endfor 
    191   ENDIF ELSE BEGIN  
     175  ENDIF ELSE BEGIN 
    192176    IF float(value[0]) GE minmax[0] $ 
    193177      AND float(value[0]) LE minmax[1] THEN value2 = float(value[0]) 
    194178  ENDELSE 
    195   IF n_elements(value2) NE 0 THEN BEGIN  
     179  IF n_elements(value2) NE 0 THEN BEGIN 
    196180    widget_control, sbid, set_value = fix(value2) 
    197181    widget_control, dcid, set_value = decvalue(value2) 
    198182    widget_control, dcid, set_combobox_select = decind(value2) 
    199   ENDIF  
     183  ENDIF 
    200184  return 
    201185end 
     
    206190; 
    207191; @categories 
    208 ; Compound widget  
    209 ;  
     192; Compound widget 
     193; 
    210194; @param ID 
    211195; 
    212 ; 
    213 ; @returns 
    214 ;  
    215 ;  
     196; @returns 
     197; 
    216198; @uses 
    217 ;  
    218 ;  
    219 ; @restrictions 
    220 ;  
    221 ;  
    222 ; @examples 
    223 ;  
    224 ;  
    225 ; @history 
    226 ;  
    227 ;  
    228 ; @version  
     199; 
     200; @restrictions 
     201; 
     202; @examples 
     203; 
     204; @history 
     205; 
     206; @version 
    229207; $Id$ 
    230208;- 
     
    246224; @categories 
    247225; Compound widget 
    248 ;  
     226; 
    249227; @param EVENT 
    250 ;  
    251 ; 
    252 ; @returns 
    253 ;  
    254 ;  
     228; 
     229; @returns 
     230; 
    255231; @uses 
    256 ;  
    257 ;  
    258 ; @restrictions 
    259 ;  
    260 ;  
    261 ; @examples 
    262 ;  
    263 ;  
    264 ; @history 
    265 ;  
    266 ;  
    267 ; @version  
     232; 
     233; @restrictions 
     234; 
     235; @examples 
     236; 
     237; @history 
     238; 
     239; @version 
    268240; $Id$ 
    269241;- 
     
    284256    'minus':if (value - 1) GE minmax[0] then value2 = value - 1 ELSE out = -1 
    285257    'SliderBar':if (event.value + value - floor(value)) LE minmax[1] THEN value2 = event.value + value - floor(value) 
    286     'decimal':BEGIN  
     258    'decimal':BEGIN 
    287259      CASE 1 OF 
    288260        value GT minmax[1]: value2 = minmax[1] 
     
    313285; @categories 
    314286; Compound widget 
    315 ;  
     287; 
    316288; @param PARENT {in}{required} 
    317289; The widget ID of the parent widget. 
     
    319291; @keyword UVALUE 
    320292; The user value to be associated with the widget. 
    321 ;  
     293; 
    322294; @keyword UNAME 
    323295; The user name to be associated with the widget. 
    324 ;  
     296; 
    325297; @keyword VALUE 
    326298; 
    327 ; 
    328299; @keyword MAXIMUM 
    329 ;  
    330 ;  
     300; 
    331301; @keyword MINIMUM 
    332302; 
    333 ;  
     303; 
    334304; @keyword STRMINLEN 
    335305; 
     
    365335;  computationally expensive operations until the user releases the 
    366336;  slider. 
    367 ;  OUT:It is an integer which can take 3 values:  
     337;  OUT:It is an integer which can take 3 values: 
    368338;       1 : If we press + when the index is already at the max 
    369339;       Comment: In this case, the index stay at the max 
     
    378348;       1) GET_VALUE 
    379349;   widget_control,wid_id,get_value=resultat 
    380 ;   Send back in the result variable a structure of 2 elements whose name  
    381 ;   are inspired from keywords we can pass at  
     350;   Send back in the result variable a structure of 2 elements whose name 
     351;   are inspired from keywords we can pass at 
    382352;   widget_control when we use WIDGET_SLIDER: 
    383353;            VALUE:the value setting of the widget 
     
    386356;       2) SET_VALUE 
    387357;   widget_control,wid_id,set_value=impose 
    388 ;   Allows to modify the state of the combobox like we can do it for  
    389 ;   WIDGET_COMBOBOX. May impose:   
     358;   Allows to modify the state of the combobox like we can do it for 
     359;   WIDGET_COMBOBOX. May impose: 
    390360;       a) a integer: give the new position of the slider. 
    391 ;       b) A structure which can have for elements (from 1 to 3):  
     361;       b) A structure which can have for elements (from 1 to 3): 
    392362;            VALUE: an integer which give the new position of the slider 
    393363;            SLIDER_MIN:Set to a new minimum value for the specified 
     
    428398  if NOT keyword_set(title) then title = '    ' 
    429399; 
    430 ; cheking exclusive keywords 
     400; checking exclusive keywords 
    431401  column = (keyword_set(column)*(1-keyword_set(row))+keyword_set(vertical)) < 1 
    432   row = keyword_set(row)*(1-keyword_set(column)) +(keyword_set(row) EQ column)  
     402  row = keyword_set(row)*(1-keyword_set(column)) +(keyword_set(row) EQ column) 
    433403  if NOT keyword_set(uvalue) then uvalue = '' 
    434404  if NOT keyword_set(uname) then uname = '' 
     
    437407                     , FUNC_GET_VALUE = 'cw_slider_pm_get_value' $ 
    438408                     , PRO_SET_VALUE = 'cw_slider_pm_set_value' $ 
    439                      , space = 0, UVALUE = uvalue, UNAME = uname, _extra = ex)    
     409                     , space = 0, UVALUE = uvalue, UNAME = uname, _extra = ex) 
    440410; 
    441411  mlen = (widget_info(base, string_size = 'm'))[0] 
  • trunk/SRC/ToBeReviewed/WIDGET/COMPOUND_WIDGET/cw_specifie.pro

    r157 r226  
    66; @categories 
    77; Compound widget 
    8 ;  
     8; 
    99; @param ID 
    10 ; 
    1110; 
    1211; @param VALUE 
     
    1413; 
    1514; @returns 
    16 ;  
    17 ;  
    18 ; @uses 
    19 ;  
    20 ;  
    21 ; @restrictions 
    22 ;  
    23 ;  
    24 ; @examples 
    25 ;  
    26 ;  
    27 ; @history 
    28 ;  
    29 ;  
    30 ; @version  
    31 ; $Id$ 
    32 ;- 
    33 ;***************************************************** 
     15; 
     16; @uses 
     17; 
     18; @restrictions 
     19; 
     20; @examples 
     21; 
     22; @history 
     23; 
     24; @version 
     25; $Id$ 
     26;- 
    3427PRO cw_specifie_set_value, id, value 
    3528; 
     
    4336   widget_control, widget_info(id,find_by_uname='palnum'), set_value = strtrim(value.lct, 2) 
    4437   autres = extractstru(value, ['min', 'max', 'inter', 'lct', 'nothing', 'xindex', 'yindex']) 
    45    if size(autres, /type) EQ 8 then BEGIN  
     38   if size(autres, /type) EQ 8 then BEGIN 
    4639      autresid = widget_info(id,find_by_uname='autres') 
    4740      widget_control, widget_info(id, find_by_uname = 'autres'), get_value = autresautres 
     
    6457; @categories 
    6558; Compound widget 
    66 ;  
     59; 
    6760; @param ID 
    6861; 
    69 ; 
    70 ; @returns 
    71 ;  
    72 ;  
    73 ; @uses 
    74 ;  
    75 ;  
    76 ; @restrictions 
    77 ;  
    78 ;  
    79 ; @examples 
    80 ;  
    81 ;  
    82 ; @history 
    83 ;  
    84 ;  
    85 ; @version  
    86 ; $Id$ 
    87 ;- 
    88 ;***************************************************** 
     62; @returns 
     63; 
     64; @uses 
     65; 
     66; @restrictions 
     67; 
     68; @examples 
     69; 
     70; @history 
     71; 
     72; @version 
     73; $Id$ 
     74;- 
    8975FUNCTION cw_specifie_get_value, id 
    9076; 
     
    118104; @categories 
    119105; Compound widget 
    120 ;  
     106; 
    121107; @param EVENT 
    122108; 
    123 ; 
    124 ; @returns 
    125 ;  
    126 ;  
    127 ; @uses 
    128 ;  
    129 ;  
    130 ; @restrictions 
    131 ;  
    132 ;  
    133 ; @examples 
    134 ;  
    135 ;  
    136 ; @history 
    137 ;  
    138 ;  
    139 ; @version  
    140 ; $Id$ 
    141 ;- 
    142 ;***************************************************** 
     109; @returns 
     110; 
     111; @uses 
     112; 
     113; @restrictions 
     114; 
     115; @examples 
     116; 
     117; @history 
     118; 
     119; @version 
     120; $Id$ 
     121;- 
    143122FUNCTION cw_specifie_event, event 
    144123;------------------------------------------------------------ 
    145 ; on recuper les ID des differents widgets  
     124; on recupere les ID des differents widgets 
    146125;------------------------------------------------------------ 
    147126;------------------------------------------------------------ 
     
    157136;------------------------------------------------------------ 
    158137  case uval of 
    159     'default':BEGIN  
     138    'default':BEGIN 
    160139;--------------- 
    161 ; We find the name of the variable:  
     140; We find the name of the variable: 
    162141      vlstid = widget_info(event.top, find_by_uname = 'varlist') 
    163142      fieldname = widget_info(vlstid, /combobox_gettext) 
     
    170149      widget_control, widget_info(event.handler, find_by_uname = 'autres'), set_value = '' 
    171150    END 
    172     'palcol':BEGIN  
     151    'palcol':BEGIN 
    173152      ind = fix(strmid(event.value, 0, strpos(event.value, '-'))) 
    174153      widget_control, widget_info(event.handler, find_by_uname = 'palnum'), set_value = strtrim(ind, 1) 
     
    186165; @categories 
    187166; Compound widget 
    188 ;  
     167; 
    189168; @param PARENT {in}{required} 
    190169; The widget ID of the parent widget. 
     
    193172; Buttons will be arranged in the number of columns 
    194173; specified by this keyword. 
    195 ;  
     174; 
    196175; @keyword ROW 
    197176; Buttons will be arranged in the number of rows 
    198177; specified by this keyword. 
    199 ;  
     178; 
    200179; @keyword UVALUE 
    201180; The user value to be associated with the widget. 
    202 ;  
     181; 
    203182; @keyword UNAME 
    204183; The user name to be associated with the widget. 
     
    206185; @keyword FRAME 
    207186; 
    208 ; 
    209187; @keyword FORXXX 
    210188; 
    211 ;  
    212189; @keyword _EXTRA 
    213190; Used to pass your keywords 
    214191; 
    215 ;  
    216 ; @returns 
    217 ;  
    218 ;  
    219 ; @uses 
    220 ;  
    221 ;  
    222 ; @restrictions 
    223 ;  
    224 ;  
    225 ; @examples 
    226 ;  
    227 ;  
    228 ; @history 
    229 ;  
    230 ;  
    231 ; @version  
    232 ; $ID$ 
     192; @returns 
     193; 
     194; @uses 
     195; 
     196; @restrictions 
     197; 
     198; @examples 
     199; 
     200; @history 
     201; 
     202; @version 
     203; $Id$ 
    233204; 
    234205; @todo 
    235206; seb: documenter 
    236 ;  
     207; 
    237208;- 
    238209FUNCTION cw_specifie, parent, ROW = row, COLUMN = column, UVALUE = uvalue, UNAME = uname, FRAME = frame, FORXXX = forxxx, _extra = ex 
    239 ; cheking exclusive keywords 
     210; checking exclusive keywords 
    240211; 
    241212  compile_opt idl2, strictarrsubs 
    242213; 
    243214   column = keyword_set(column)*(1-keyword_set(row)) 
    244    row = keyword_set(row)*(1-keyword_set(column)) +(keyword_set(row) EQ column)  
     215   row = keyword_set(row)*(1-keyword_set(column)) +(keyword_set(row) EQ column) 
    245216;------------------------------------------------ 
    246217   if NOT keyword_set(uvalue) then uvalue = '' 
     
    250221                      , FUNC_GET_VALUE='cw_specifie_get_value' $ 
    251222                      , PRO_SET_VALUE='cw_specifie_set_value' $ 
    252                       , UVALUE = uvalue, UNAME = uname, _extra = ex)    
    253 ; base1  
     223                      , UVALUE = uvalue, UNAME = uname, _extra = ex) 
     224; base1 
    254225   base1 = widget_base(base) 
    255226   rien = widget_label(base1, value = 'Min', xoffset =  85, yoffset = 15) 
     
    277248 
    278249 
    279 ; widget text containig other keywords pass into top_uvalue.exextra 
     250; widget text containing other keywords pass into top_uvalue.exextra 
    280251; Does it remain some? If yes, we have to put them as string 
    281     
     252 
    282253   rien = widget_text(base, value = '  ', /editable, uname = 'autres', uvalue = 'autres', xsize = 54, ysize = 3, yoffset = 65, /wrap, /no_newline) 
    283254 
  • trunk/SRC/ToBeReviewed/WIDGET/xnotice.pro

    r163 r226  
    99; @categories 
    1010; Information 
    11 ;  
     11; 
    1212; @param TEXT {in}{required}{type=string vector or scalar} 
    13 ; it is a string or a vector of string. If it is a scalar, we  
     13; it is a string or a vector of string. If it is a scalar, we 
    1414; look for the line separator !C to create a text with several lines. 
    1515; 
    1616; @keyword CHKWIDGET 
    17 ; Force to verify that they are some active widget to create a widget,  
     17; Force to verify that they are some active widget to create a widget, 
    1818; otherwise print at the prompt 
    1919; 
     
    2121; The identity of the created widget 
    2222; 
    23 ; @restrictions  
    24 ; It do not call xmanager -> It do not create any event!  
    25 ; We have to delete this widget manuelly: 
     23; @restrictions 
     24; It do not call xmanager -> It do not create any event! 
     25; We have to delete this widget manually: 
    2626; widget_control, widgetid, /destroy 
    2727; 
  • trunk/SRC/ToBeReviewed/WIDGET/xxx.pro

    r192 r226  
    55; @categories 
    66; 
    7 ;  
    87; @param EVENT 
    98; 
    109; 
    1110; @returns 
    12 ;  
    13 ;  
     11; 
    1412; @uses 
    15 ;  
    16 ;  
     13; 
    1714; @restrictions 
    18 ;  
    19 ;  
     15; 
    2016; @examples 
    21 ;  
    22 ;  
     17; 
    2318; @history 
    24 ;  
    25 ;  
    26 ; @version  
     19; 
     20; @version 
    2721; $Id$ 
    2822;- 
     
    3529;------------------------------------------------------------ 
    3630;    = widget_info(event.top,find_by_uname = '') 
    37 ; What is the type of evenment ? 
     31; What is the type of event ? 
    3832;   if event.id EQ 622 then help,  event,  /struct 
    3933   widget_control, event.id, get_uvalue=uval 
     
    4236;help,  event, /struct 
    4337;help, uval , /struct 
    44 ; case on the type of evenment 
     38; case on the type of event 
    4539   widget_control, event.top, get_uvalue = top_uvalue 
    4640; If we activate the keyword separate at the call of xxx 
     
    122116; @categories 
    123117; Widget 
    124 ;  
     118; 
    125119; @param DATAFILENAME 
    126120; 
     
    134128; @keyword SEPARATE 
    135129; To separate the button part and the drawing part in 2 windows. 
    136 ; Useful for small screens, but be careful to do not saturate the  
     130; Useful for small screens, but be careful to do not saturate the 
    137131; video memory of some antiquated Tx. 
    138132; 
    139133; @keyword RESTORE 
    140 ; 'toto.dat' or toto.dat is a file created at the time of a precedent  
     134; 'toto.dat' or toto.dat is a file created at the time of a precedent 
    141135; use of xxx thanks to the command "Widget" of the menu "save as". 
    142 ;  
     136; 
    143137; @keyword _EXTRA 
    144138; Used to pass your keywords 
     
    148142; 
    149143; @keyword REDRAW 
    150 ;  
     144; 
    151145; 
    152146; @keyword SEPARATE 
    153147; 
    154148; 
    155 ; @keyword UVALUE  
     149; @keyword UVALUE 
    156150; The user value to be associated with the widget. 
    157151; 
     
    191185  if keyword_set(restore) then BEGIN 
    192186    restore = isafile(filename = restore, iodir = homedir, _extra = ex) 
    193     if size(restore, /type) NE 7 then restore = 0 ELSE BEGIN  
     187    if size(restore, /type) NE 7 then restore = 0 ELSE BEGIN 
    194188      restore, isafile(file = restore, iodir = homedir, _extra = ex) 
    195189      newgrid = *(extractatt(uvalue, 'meshparameters'))[0] 
    196190      change = changegrid(newgrid) 
    197     ENDELSE  
     191    ENDELSE 
    198192  endif 
    199193  if n_elements(CallerWidId) NE 0 THEN $ 
     
    203197; list of files we want to look at 
    204198; 
    205   if keyword_set(uvalue) then BEGIN  
     199  if keyword_set(uvalue) then BEGIN 
    206200    currentfile = extractatt(uvalue, 'currentfile') 
    207201    filelist = extractatt(uvalue, 'filelist') 
     
    222216  ENDELSE 
    223217; 
    224   if keyword_set(uvalue) THEN BEGIN  
     218  if keyword_set(uvalue) THEN BEGIN 
    225219    smallin = extractatt(uvalue, 'smallin') 
    226220    smallout = extractatt(uvalue, 'smallout') 
    227   ENDIF ELSE BEGIN  
     221  ENDIF ELSE BEGIN 
    228222    smallin = [1, 1, 1] 
    229223    smallout = [1, 1, 1] 
    230   ENDELSE  
     224  ENDELSE 
    231225  nbredessin = smallin[0]*smallin[1] 
    232226  numdessinin = smallin[2]-1 
    233227; warning flg definition must be consistent with cw_pdmenu argument 
    234228; see also flag definition in cw_pagelayout 
    235   if keyword_set(uvalue) then BEGIN  
     229  if keyword_set(uvalue) then BEGIN 
    236230    flag = extractatt(uvalue, 'optionsflag') 
    237231    key_portrait = flag[0, numdessinin] 
     
    252246; The top base 
    253247;------------------------------------------------------------ 
    254   IF xxxsize[0] LE scrsize[0] AND xxxsize[1] LE scrsize[1] THEN BEGIN  
     248  IF xxxsize[0] LE scrsize[0] AND xxxsize[1] LE scrsize[1] THEN BEGIN 
    255249    base = widget_base(title = 'xxx', GROUP_LEADER = group, /tracking_events $ 
    256250                       , uname = 'base', space = 0) 
    257   ENDIF ELSE BEGIN  
     251  ENDIF ELSE BEGIN 
    258252    base = widget_base(title = 'xxx', GROUP_LEADER = group, /tracking_events $ 
    259253                       , uname = 'base', space = 0 $ 
     
    278272    selectact = (extractatt(uvalue, 'types'))[numdessinin] 
    279273    selectact = (where(pltlst EQ selectact))[0] 
    280     widget_control, actid, set_combobox_select = 0 > selectact  
     274    widget_control, actid, set_combobox_select = 0 > selectact 
    281275  ENDIF ELSE selectfile = 0 
    282276 
     
    316310  yoff = yoff + 37 
    317311  xoff = 5 
    318 ; boutton 'OK' 
     312; button 'OK' 
    319313  baseok = widget_button(base, value = ' OK ', uvalue = {name:'ok'}, uname = 'ok button' $ 
    320314                         , /frame, xoffset = xoff, yoffset = yoff) 
     
    337331    selectvar = (extractatt(uvalue, 'varinfo'))[1, numdessinin] 
    338332    selectvar = (where(currentlistvar EQ selectvar))[0] 
    339     widget_control, vlstid, set_combobox_select = 0 > selectvar  
     333    widget_control, vlstid, set_combobox_select = 0 > selectvar 
    340334  ENDIF ELSE selectvar = 0 
    341335;------------------------------------------------------------ 
     
    348342    selectfile = (extractatt(uvalue, 'varinfo'))[0, numdessinin] 
    349343    selectfile = (where(file_basename(filelist) EQ selectfile))[0] 
    350     widget_control, flstid, set_combobox_select = 0 > selectfile  
     344    widget_control, flstid, set_combobox_select = 0 > selectfile 
    351345  ENDIF ELSE selectfile = 0 
    352346;------------------------------------------------------------ 
     
    375369  dummyid = cw_calendar(basecalid, currentcalendar, date2, FAKECAL = fakecal, uname = 'calendar2', uvalue = {name:'calendar2'}, /frame) 
    376370;------------------------------------------------------------ 
    377 ; Domain  
     371; Domain 
    378372;------------------------------------------------------------ 
    379373  yoff = yoff + 60 
     
    399393     basegraph = widget_base(title = 'xxx window',  group_leader = base, uvalue = base) $ 
    400394  ELSE basegraph = base 
    401    
     395 
    402396  graphid = widget_draw(basegraph, uname = 'graph', /button_events, retain = 2 $ 
    403397                        , uvalue = {name:'graph', press:0, click:0, x:[0., 0.], y:[0., 0.]} $ 
     
    416410  if keyword_set(uvalue) then BEGIN ; 
    417411; We recopy the pointer uvalue in top_uvalue. 
    418 ; Beware, we have to redefine completely top_value from variables  
    419 ; pointed by uvalue. Otherwise, if we simply do top_value = uvalue,  
    420 ; when we delete by uvalue and variables on which it point, we  
     412; Beware, we have to redefine completely top_value from variables 
     413; pointed by uvalue. Otherwise, if we simply do top_value = uvalue, 
     414; when we delete by uvalue and variables on which it point, we 
    421415; also delete variables on which point top_value. 
    422416    case 1 of 
     
    443437; widgets's state 
    444438        updatewidget, base 
    445 ;  
     439; 
    446440      END 
    447441      ELSE:BEGIN 
     
    450444        FOR i =  0, 14 do *top_uvalue[1, i] = *uvalue[1, i] 
    451445        FOR i = 18, 27 do *top_uvalue[1, i] = *uvalue[1, i] 
    452         numfile = n_elements(extractatt(uvalue, 'filelist'))  
     446        numfile = n_elements(extractatt(uvalue, 'filelist')) 
    453447        *top_uvalue[1, 15] = ptrarr(numfile, /allocate_heap) 
    454448        *top_uvalue[1, 16] = ptrarr(numfile, /allocate_heap) 
    455449        *top_uvalue[1, 17] = ptrarr(numfile, /allocate_heap) 
    456450        for i = 0, numfile-1 do begin 
    457           *(*top_uvalue[1, 15])[i] = *(*uvalue[1, 15])[i]  
    458           *(*top_uvalue[1, 16])[i] = *(*uvalue[1, 16])[i]  
    459           *(*top_uvalue[1, 17])[i] = *(*uvalue[1, 17])[i]  
     451          *(*top_uvalue[1, 15])[i] = *(*uvalue[1, 15])[i] 
     452          *(*top_uvalue[1, 16])[i] = *(*uvalue[1, 16])[i] 
     453          *(*top_uvalue[1, 17])[i] = *(*uvalue[1, 17])[i] 
    460454        endfor 
    461455        *top_uvalue[1, 28] = ptrarr(nbredessin, /allocate_heap) 
    462         for i = 0, nbredessin-1 do *(*top_uvalue[1, 28])[i] = *(*uvalue[1, 28])[i]  
     456        for i = 0, nbredessin-1 do *(*top_uvalue[1, 28])[i] = *(*uvalue[1, 28])[i] 
    463457        widget_control, base, set_uvalue = top_uvalue 
    464458; Copy the screen of the widget of uvalue in top_value's one 
     
    478472; 
    479473ENDIF ELSE BEGIN 
    480 ; Otherwise we will define all elements we will hook at the widget  
    481 ; thanks to the top_value which is a pointer array with 2  
    482 ; columns: names and variables.  
     474; Otherwise we will define all elements we will hook at the widget 
     475; thanks to the top_value which is a pointer array with 2 
     476; columns: names and variables. 
    483477; We initialize all these elements. 
    484478; Variables concerning the widget in its generality. 
     
    486480; variables se rapportant aux differents fichiers que l''on peut lire 
    487481; variables specifiques a chaque dessin 
    488 ;       
    489      
     482; 
     483 
    490484; creation of the pointer we will hook at the widget. 
    491485    top_uvalue = ptrarr(2, 29, /allocate_heap) 
     
    516510    *top_uvalue[0, 21] = 'nameprocedures' & *top_uvalue[1, 21] = strarr(nbredessin) 
    517511    *top_uvalue[0, 22] = 'types' & *top_uvalue[1, 22] = strarr(nbredessin) 
    518     *top_uvalue[0, 23] = 'varinfo' & *top_uvalue[1, 23] = strarr(2, nbredessin)     
     512    *top_uvalue[0, 23] = 'varinfo' & *top_uvalue[1, 23] = strarr(2, nbredessin) 
    519513    *top_uvalue[0, 24] = 'domaines' & *top_uvalue[1, 24] = fltarr(6, nbredessin) 
    520514    *top_uvalue[0, 25] = 'dates' & *top_uvalue[1, 25] = lonarr(2, nbredessin) 
     
    526520    createhistory, base, smallin 
    527521; 
    528   ENDELSE  
    529 ;------------------------------------------------------------ 
    530   xmanager, 'xxx', base, /no_block  
     522  ENDELSE 
     523;------------------------------------------------------------ 
     524  xmanager, 'xxx', base, /no_block 
    531525;------------------------------------------------------------ 
    532526;------------------------------------------------------------ 
  • trunk/SRC/Utilities/report.pro

    r224 r226  
    1111; @param TEXT {in}{required} 
    1212; one string or one vector of string. Si le string ne 
    13 ; comporte qu''un element, on cherche les eventuels characteres de 
     13; comporte qu''un element, on cherche les eventuels caracteres de 
    1414; retour a la ligne: '!C'. If text is set to an array of strings, each 
    1515; array element is displayed as a separate line of text. 
  • trunk/SRC/Utilities/routine_name.pro

    r224 r226  
    5959; 
    6060  name = str_sep(allnames, '%') ; we cut it out again. 
    61   name = strtrim(name, 2)     ; we remouve blanks in front of and behind 
     61  name = strtrim(name, 2)     ; we remove blanks in front of and behind 
    6262  name = strcompress(name)      ; we compress blanks 
    6363; we do not hold back the two first elements who are a blanck  and the line concerning 
  • trunk/SRC/Utilities/text_box.pro

    r224 r226  
    2424;               prior to writing the text.  If both BG_COLOR and !p.color 
    2525;               are zero then the background color is reset to 255 to 
    26 ;               gaurantee a readability. 
     26;               guarantee a readability. 
    2727; 
    2828; @keyword RIGHT 
Note: See TracChangeset for help on using the changeset viewer.