NCEPLIBS-bufr  11.6.0
 All Data Structures Files Functions Variables Pages
status.f File Reference

Check whether a system file is connected to the BUFRLIB software. More...

Go to the source code of this file.

Functions/Subroutines

subroutine status (LUNIT, LUN, IL, IM)
 This subroutine checks whether a specified Fortran logical unit number is currently connected to the BUFRLIB software. More...
 

Detailed Description

Check whether a system file is connected to the BUFRLIB software.

Definition in file status.f.

Function/Subroutine Documentation

subroutine status (   LUNIT,
  LUN,
  IL,
  IM 
)

This subroutine checks whether a specified Fortran logical unit number is currently connected to the BUFRLIB software.

If the unit number is already connected, then the subroutine returns information about the associated file. Otherwise, it returns the next available internal I/O stream index that could be used to connect the associated file to the software via a subsequent call to subroutine wtstat().

Author
J. Woollen
Date
1994-01-06
Parameters
[in]LUNIT– integer: Fortran logical unit number for BUFR file
[out]LUN– integer: Internal I/O stream index associated with LUNIT
  • 0 = LUNIT is not already connected to the software, and there is no remaining internal space available that could be used to connect it
[out]IL– integer: File status
  • 0 = LUNIT is not already connected to the software, but LUN contains a new internal I/O stream index that could be used to connect it via a subsequent call to subroutine wtstat()
  • 1 = LUNIT is already connected to the software for output operations (i.e. writing/encoding BUFR)
  • -1 = LUNIT is already connected to the software for input operations (i.e. reading/decoding BUFR)
[out]IM– integer: Message status, indicating whether there is already a message open within internal arrays for LUNIT
  • 0 = No
  • 1 = Yes

Program history log:

Date Programmer Comments
1994-01-06 J. Woollen Original author
1996-12-11 J. Woollen Fixed a long standing bug which occurs in unusual situations, very low impact
1998-07-08 J. Woollen Replaced call to Cray library routine ABORT with call to new internal routine bort()
1999-11-18 J. Woollen The number of BUFR files which can be opened at one time increased from 10 to 32
2003-11-04 J. Ator Added documentation
2003-11-04 S. Bender Added remarks and routine interdependencies
2003-11-04 D. Keyser Unified/portable for WRF; added documentation; outputs more complete diagnostic info when routine terminates abnormally
2014-12-10 J. Ator Use modules instead of COMMON blocks

Definition at line 55 of file status.f.

References bort().

Referenced by closbf(), closmg(), copybf(), copymg(), copysb(), cpdxmm(), cpymem(), datebf(), drfini(), dumpbf(), dxdump(), getabdb(), getcfmng(), gettagpr(), gettagre(), getvalnb(), ifbget(), igetsc(), invmrg(), iupvs01(), lcmgdf(), mesgbc(), minimg(), msgwrt(), nemdefs(), nemspecs(), nmsub(), openbf(), openmb(), openmg(), posapx(), rdmemm(), rdmems(), rdmgsb(), rdmsgw(), readdx(), readerme(), readlc(), readmg(), readns(), readsb(), rewnbf(), rtrcpt(), setvalnb(), stndrd(), ufbcnt(), ufbcpy(), ufbcup(), ufbdmp(), ufbevn(), ufbget(), ufbin3(), ufbint(), ufbinx(), ufbmem(), ufbmms(), ufbovr(), ufbpos(), ufbqcd(), ufbqcp(), ufbrep(), ufbrms(), ufbseq(), ufbstp(), ufbtab(), ufbtam(), ufdump(), upftbv(), wrcmps(), wrdxtb(), writlc(), writsa(), and writsb().