NCEPLIBS-bufr  12.0.0
gettab.f90
Go to the documentation of this file.
1 
6 
13 program gettab
14 
15  implicit none
16 
17  character(len=255) :: file
18  integer, parameter :: lunit = 20
19  logical :: exist
20 
21 ! get the filename to open and read
22 
23  call getarg(1,file); file=trim(adjustl(file))
24  if (file == '') then
25  print *,'Usage: gettab <bufrfile> will print the internal BUFR table'
26  call exit(2)
27  else
28  inquire(file=file,exist=exist)
29  if (.not.exist) then
30  print *,trim(file)//' does not exist'
31  call exit(3)
32  endif
33  endif
34 
35 ! open the file and dump the bufr table to standard outout
36 
37  open(lunit,file=file,status='old', form='unformatted')
38  call openbf(lunit, 'IN', lunit)
39  call dxdump(lunit, 6)
40  call closbf(lunit)
41  close(lunit)
42 
43  stop
44 end program gettab
45 
recursive subroutine closbf(LUNIT)
Close the connection between logical unit LUNIT and the NCEPLIBS-bufr software.
Definition: closbf.f:24
recursive subroutine dxdump(LUNIT, LDXOT)
This subroutine prints a copy of the DX BUFR table associated with a specified Fortran logical unit.
Definition: dxdump.f:39
program gettab
Read BUFR file containing embedded DX BUFR tables, and print the tables to stdout.
Definition: gettab.f90:13
recursive subroutine openbf(LUNIT, IO, LUNDX)
Connects a new file to the NCEPLIBS-bufr software for input or output operations, or initializes the ...
Definition: openbf.f:124
recursive subroutine status(LUNIT, LUN, IL, IM)
Check whether a specified Fortran logical unit number is currently connected to the NCEPLIBS-bufr sof...
Definition: status.f:36