Changeset 198 for trunk/SRC/ToBeReviewed/LECTURE/read_ncdf.pro
- Timestamp:
- 12/01/06 12:05:05 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SRC/ToBeReviewed/LECTURE/read_ncdf.pro
r192 r198 253 253 mots = str_sep(value, ' ') 254 254 unite = mots[0] 255 IF unite NE 'seconds' AND unite NE 'hours' AND unite NE 'days' $ 256 AND unite NE 'months' AND unite NE 'years' THEN BEGIN 255 unite = strlowcase(unite) 256 IF strpos(unite, 's', strlen(unite)-1) NE -1 THEN unite = strmid(unite, 0, strlen(unite)-1) 257 IF strpos(unite, 'julian_') NE -1 THEN unite = strmid(unite, 7) 258 IF unite NE 'second' AND unite NE 'hour' AND unite NE 'day' $ 259 AND unite NE 'month' AND unite NE 'year' THEN BEGIN 257 260 ncdf_close, cdfid 258 261 return, report('time units does not start with seconds/hours/days/months/years') … … 265 268 ncdf_varget, cdfid, timeid, time 266 269 time = double(time) 267 unite = strlowcase(unite)268 IF strpos(unite, 's', strlen(unite)-1) NE -1 THEN unite = strmid(unite, 0, strlen(unite)-1)269 IF strpos(unite, 'julian_') NE -1 THEN unite = strmid(unite, 7)270 270 case unite of 271 271 'second':time = julday(depart[1], depart[2], depart[0])+time/86400.d … … 300 300 if lasttps[0] EQ -1 THEN BEGIN 301 301 ncdf_close, cdfid 302 return, report('the time axis as no date before date 2: '+strtrim(jul2date(date2), 1))302 return, report('the time axis has no date before date 2: '+strtrim(jul2date(date2), 1)) 303 303 endif 304 304 lasttps = lasttps[n_elements(lasttps)-1] 305 305 if lasttps LT firsttps then BEGIN 306 306 ncdf_close, cdfid 307 return, report('the time axis as no dates between date1 and date 2: '+strtrim(jul2date(date1), 1)+' '+strtrim(jul2date(date2), 1))307 return, report('the time axis has no dates between date1 and date 2: '+strtrim(jul2date(date1), 1)+' '+strtrim(jul2date(date2), 1)) 308 308 endif 309 309 ENDELSE
Note: See TracChangeset
for help on using the changeset viewer.