NCEPLIBS-bufr  11.7.0
 All Data Structures Files Functions Variables Pages
closbf.f File Reference

Close a previously opened system file and disconnect it from the BUFRLIB software. More...

Go to the source code of this file.

Functions/Subroutines

subroutine closbf (LUNIT)
 This subroutine closes the connection between logical unit LUNIT and the BUFRLIB software. More...
 

Detailed Description

Close a previously opened system file and disconnect it from the BUFRLIB software.

Definition in file closbf.f.

Function/Subroutine Documentation

subroutine closbf (   LUNIT)

This subroutine closes the connection between logical unit LUNIT and the BUFRLIB software.

Authors
J. Woollen
J. Ator
Date
1994-01-06
Parameters
[in]LUNIT– integer: Fortran logical unit number for BUFR file
Remarks
  • This subroutine will execute a Fortran "CLOSE" on logical unit LUNIT, even though subroutine openbf() didn't previously handle the corresponding Fortran "OPEN" of the same file.
  • It's a good idea to call this subroutine for every LUNIT that was opened to the software via openbf(); however, it's especially important to do so when writing/encoding a BUFR file, in order to ensure that all output is properly flushed to LUNIT.

Program history log:

Date Programmer Comments
1994-01-06 J. Woollen Original author
2003-11-04 J. Ator Don't close lunit if opened as a NULL file by openbf()
2003-11-04 S. Bender Added remarks and routine interdependencies
2003-11-04 D. Keyser Unified/portable for WRF; added history documentation
2012-09-15 J. Woollen Modified for C/I/O/BUFR interface; added call to closfb() to close C files
2014-12-10 J. Ator Use modules instead of COMMON blocks
2020-07-16 J. Ator Add sanity check to ensure that openbf() was previously called (needed for GSI)

Definition at line 34 of file closbf.f.

References closfb(), closmg(), errwrt(), status(), and wtstat().

Referenced by bufr_c_interface_mod::closbf_c(), copybf(), datebf(), dumpbf(), exitbufr(), mesgbc(), mesgbf(), split_by_subset(), ufbinx(), ufbmem(), ufbmex(), and ufbtab().