NCEPLIBS-bufr  11.6.0
 All Data Structures Files Functions Variables Pages
gettab.f90
Go to the documentation of this file.
1 
5 
6 program gettab
7 
8  implicit none
9 
10  character(len=255) :: finput !> name of filename to read
11  integer, parameter :: lunit = 20
12  logical :: file_exists
13 
15  call getarg(1, finput)
17  if (trim(adjustl(finput)) == '') finput = 'fort.20'
19  inquire(file=trim(adjustl(finput)), exist=file_exists)
20  if (.not. file_exists) then
21  write(6,'(3(A,X))') "File", trim(adjustl(finput)), 'does not exist, ABORT!'
22  stop
23  endif
24 
26  open(lunit,file=trim(adjustl(finput)), status='old', form='unformatted')
27  call openbf(lunit, 'IN', lunit)
29  call dxdump(lunit, 6)
31  call closbf(lunit)
32  close(lunit)
33 
34  stop
35 end program gettab
36 
subroutine dxdump(LUNIT, LDXOT)
This subroutine prints a copy of the DX BUFR table associated with a specified Fortran logical unit...
Definition: dxdump.f:45
subroutine closbf(LUNIT)
This subroutine closes the connection between logical unit LUNIT and the BUFRLIB software.
Definition: closbf.f:34
subroutine status(LUNIT, LUN, IL, IM)
This subroutine checks whether a specified Fortran logical unit number is currently connected to the ...
Definition: status.f:55
subroutine openbf(LUNIT, IO, LUNDX)
This subroutine connects a new file to the BUFRLIB software for input or output operations.
Definition: openbf.f:138