Ignore:
Timestamp:
04/15/11 19:49:48 (13 years ago)
Author:
smasson
Message:

get time axis even when using /timestep keyword in read_ncdfSRC/ToBeReviewed/LECTURE/read_ncdf.pro

File:
1 edited

Legend:

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

    r460 r462  
    189189      firsttps = long(beginning[0]) 
    190190      IF n_elements(ending) NE 0 THEN lasttps = long(ending[0]) ELSE lasttps = firsttps 
    191       jpt = lasttps-firsttps+1 
    192       IF NOT keyword_set(callitself) then time = julday(1, 1, 1) + lindgen(jpt) 
     191      IF NOT keyword_set(callitself) then BEGIN  
     192        time = ncdf_gettime(filename, cdfid, caller = 'read_ncdf', err = err, _extra = ex) 
     193        jpt = lasttps-firsttps+1 
     194        IF time[0] LT 0 then time = julday(1, 1, 1) + lindgen(jpt) $ 
     195        ELSE time = time[firsttps:lasttps] 
     196      ENDIF ELSE jpt = lasttps-firsttps+1 
    193197    END 
    194198    keyword_set(parent):BEGIN 
     
    204208      jpt = lasttps-firsttps+1 
    205209    END 
    206     keyword_set(allrecords):BEGIN 
     210    keyword_set(allrecords) OR n_elements(beginning) EQ 0:BEGIN 
    207211      time = ncdf_gettime(filename, cdfid, caller = 'read_ncdf', err = err, _extra = ex) 
    208212      IF time[0] LT 0 then BEGIN  
Note: See TracChangeset for help on using the changeset viewer.