-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflclos.f
40 lines (40 loc) · 1.11 KB
/
flclos.f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
SUBROUTINE FL_CLOS ( lun, iret )
C************************************************************************
C* FL_CLOS *
C* *
C* This subroutine closes a file that was opened by a FL subroutine *
C* and frees the assigned logical unit number. *
C* *
C* FL_CLOS ( LUN, IRET ) *
C* *
C* Input parameters: *
C* LUN INTEGER Logical unit number *
C* *
C* Output parameters: *
C* IRET INTEGER Return code *
C* 0 = normal return *
C* -2 = cannot close file *
C** *
C* Log: *
C* G.C.Chatters/RDS 3/84 *
C* M. desJardins/GSFC 3/86 Changed comments *
C* M. desJardins/GSFC 3/87 Rewrote *
C* S. Maxwell/GSC 12/96 Modified return code; removed FL_IRET *
C************************************************************************
C------------------------------------------------------------------------
C* Close the file, get return code.
C
CLOSE ( UNIT = lun, IOSTAT = iostat )
C*
IF ( iostat .ne. 0 ) THEN
iret = -2
ELSE
iret = 0
END IF
C
C* Free the logical unit number.
C
CALL FL_FLUN ( lun, ier )
C*
RETURN
END