Ignore:
Timestamp:
09/20/16 20:15:00 (8 years ago)
Author:
smasson
Message:

set of bugfixes...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SRC/ToBeReviewed/LECTURE/read_ncdf.pro

    r500 r501  
    120120                    , GRID = grid, CALLITSELF = callitself, DIREC = direc $ 
    121121                    , ZETAFILENAME = zetafilename, ZETAZERO = zetazero $ 
    122                     , ZINVAR = zinvar, _EXTRA = ex 
     122                    , ZINVAR = zinvar, ISROMS = isroms, _EXTRA = ex 
    123123; 
    124124  compile_opt idl2, strictarrsubs 
     
    164164    dimnames[i] = tmp 
    165165  ENDFOR 
    166 ;------------------------------------------------------------ 
    167 ; we check if the variable has a vertical dimension and/or 
    168 ; a record dimension. This is useful to define boxzoom 
    169 ; keyword in domdef 
    170 ;------------------------------------------------------------ 
    171   dummy = where(varinq.dim EQ inq.recdim, tinvar) 
    172 ; check the presence of a vertical dimension according to the 
    173 ; number of dimensions and the presence of a record dimension 
    174   zinvar = (varinq.ndims EQ 3 AND tinvar NE 1) OR varinq.ndims EQ 4 
    175 ;------------------------------------------------------------ 
    176 ; shall we redefine the grid parameters 
    177 ;------------------------------------------------------------ 
    178   IF keyword_set(init) THEN initncdf, filename, _extra = ex 
    179166;------------------------------------------------------------ 
    180167; check the time axis and the debut and ending dates 
     
    248235    END 
    249236  ENDCASE 
     237  IF inq.recdim EQ -1 AND jpt NE 1 THEN inq.recdim = varinq.dim[varinq.ndims-1] 
     238;------------------------------------------------------------ 
     239; we check if the variable has a vertical dimension and/or 
     240; a record dimension. This is useful to define boxzoom 
     241; keyword in domdef 
     242;------------------------------------------------------------ 
     243  dummy = where(varinq.dim EQ inq.recdim, tinvar) 
     244; check the presence of a vertical dimension according to the 
     245; number of dimensions and the presence of a record dimension 
     246  zinvar = (varinq.ndims EQ 3 AND tinvar NE 1) OR varinq.ndims EQ 4 
     247;------------------------------------------------------------ 
     248; shall we redefine the grid parameters 
     249;------------------------------------------------------------ 
     250  IF keyword_set(init) THEN initncdf, filename, _extra = ex 
    250251;------------------------------------------------------------ 
    251252; Name of the grid on which the field refer to. 
     
    405406; if it is roms outputs, we need to get additional infos... 
    406407  IF NOT keyword_set(callitself) THEN BEGIN 
    407     IF strmid(dimnames[0], 0, 3) EQ 'xi_' AND strmid(dimnames[1], 0, 4) EQ 'eta_' THEN BEGIN 
     408    IF (strmid(dimnames[0], 0, 3) EQ 'xi_' AND strmid(dimnames[1], 0, 4) EQ 'eta_') OR keyword_set(isroms) THEN BEGIN 
    408409      ncdf_attget, cdfid, 'theta_s', theta_s, /global 
    409410      ncdf_attget, cdfid, 'theta_b', theta_b, /global 
Note: See TracChangeset for help on using the changeset viewer.