Changeset 457 for trunk/SRC/ToBeReviewed
- Timestamp:
- 04/12/11 09:44:35 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/ToBeReviewed/LECTURE/read_ncdf.pro
r399 r457 38 38 ; missing values 39 39 ; 40 ; @keyword ALLRECORDS 41 ; activate to read all records in a file (no need to specify any 42 ; parameter other than NAME) 43 ; 40 44 ; @keyword BOXZOOM 41 45 ; Contain the boxzoom on which we have to do the reading … … 109 113 ;- 110 114 FUNCTION read_ncdf, name, beginning, ending, compatibility $ 111 , BOXZOOM = boxzoom, FILENAME = filename $115 , ALLRECORDS = allrecords, BOXZOOM = boxzoom, FILENAME = filename $ 112 116 , PARENTIN = parentin, TIMESTEP = timestep $ 113 117 , ADDSCL_BEFORE = addscl_before $ … … 176 180 ; check the time axis and the debut and ending dates 177 181 ;------------------------------------------------------------ 178 IF n_elements(beginning) EQ 0 THEN BEGIN182 IF n_elements(beginning) EQ 0 AND NOT keyword_set(allrecords) THEN BEGIN 179 183 beginning = 0L 180 184 timestep = 1L … … 199 203 lasttps = (where(abs(time - date2) LT 0.9d/86400.d))[0] 200 204 jpt = lasttps-firsttps+1 205 END 206 keyword_set(allrecords):BEGIN 207 time = ncdf_gettime(filename, cdfid, caller = 'read_ncdf', err = err, _extra = ex) 208 IF time[0] LT 0 then BEGIN 209 jpt = -time[0] 210 time = julday(1, 1, 1) + lindgen(jpt) 211 ENDIF 212 firsttps = 0 213 lasttps = jpt -1 201 214 END 202 215 ELSE:BEGIN
Note: See TracChangeset
for help on using the changeset viewer.