awips2/ncep/gov.noaa.nws.ncep.viz.rsc.ncgrid/dgdriv_c/dmgetf.f
Steve Harris e5543a0e86 12.4.1-10 baseline
Former-commit-id: 9f8cb727a5 [formerly 9f8cb727a5 [formerly bf53d06834caa780226121334ac1bcf0534c3f16]]
Former-commit-id: 8485b90ff8
Former-commit-id: a28d70b5c5
2012-05-01 18:06:13 -05:00

33 lines
945 B
Fortran

SUBROUTINE DM_GETF ( iflno, iret )
C************************************************************************
C* DM_GETF *
C* *
C* This subroutine gets the next file number to use. *
C* *
C* DM_GETF ( IFLNO, IRET ) *
C* *
C* Output parameters: *
C* IFLNO INTEGER File number *
C* IRET INTEGER Return code *
C* 0 = normal return *
C* -3 = too many files open *
C** *
C* Log: *
C* M. desJardins/GSFC 6/86 *
C* T. Piper/GSC 11/98 Updated prolog *
C************************************************************************
INCLUDE 'GEMPRM.PRM'
INCLUDE 'GMBDTA.CMN'
INCLUDE 'dmcmn.cmn'
C-----------------------------------------------------------------------
C* Initialize and find first available file number.
C
iflno = 0
iret = 0
DO i = MMFILE, 1, -1
IF ( lundm (i) .lt. 0 ) iflno = i
END DO
IF ( iflno .eq. 0 ) iret = -3
C*
RETURN
END