source: trunk/procs/find_jptmax.pro @ 162

Last change on this file since 162 was 162, checked in by pinsard, 15 years ago

start to modify unformal header to idldoc 2. header syntax

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