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

corrections of some misspellings in some *.pro

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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 
Note: See TracChangeset for help on using the changeset viewer.