Line | |
---|
1 | FUNCTION find_jptmax, filename, IODIRECTORY = iodirectory, _EXTRA = ex |
---|
2 | |
---|
3 | @common |
---|
4 | @com_eg |
---|
5 | |
---|
6 | jptmax = -1 |
---|
7 | ;------------------------------------------------------------ |
---|
8 | ; we find the filename and open the file |
---|
9 | ;------------------------------------------------------------ |
---|
10 | IF keyword_set(iodirectory) THEN BEGIN |
---|
11 | filename_tmp = isafile(FILENAME = filename, IODIRECTORY = iodirectory, _EXTRA = ex) |
---|
12 | ENDIF ELSE BEGIN |
---|
13 | filename_tmp = isafile(FILENAME = filename, _EXTRA = ex) |
---|
14 | ENDELSE |
---|
15 | IF size(filename, /type) NE 7 THEN print, report('find_jptmax cancelled') |
---|
16 | cdfid = ncdf_open(filename_tmp) |
---|
17 | inq = ncdf_inquire(cdfid) |
---|
18 | ;------------------------------------------------------------ |
---|
19 | ; we look for the record dimension |
---|
20 | ;------------------------------------------------------------ |
---|
21 | IF inq.recdim NE -1 THEN BEGIN |
---|
22 | ncdf_diminq, cdfid, inq.recdim, timedimname, jptmax |
---|
23 | ENDIF ELSE print, $ |
---|
24 | report('the file '+filename+' has no infinite dimension !!!') |
---|
25 | |
---|
26 | ncdf_close, cdfid |
---|
27 | |
---|
28 | return, jptmax |
---|
29 | |
---|
30 | END |
---|
Note: See
TracBrowser
for help on using the repository browser.