NCEPLIBS-bufr  11.5.0
 All Data Structures Files Functions Variables Pages
cktaba.f File Reference

Go to the source code of this file.

Functions/Subroutines

subroutine cktaba (LUN, SUBSET, JDATE, IRET)
 THIS SUBROUTINE PARSES THE TABLE A MNEMONIC AND THE DATE OUT OF SECTION 1 OF A BUFR MESSAGE PREVIOUSLY READ FROM UNIT LUNIT USING BUFR ARCHIVE LIBRARY SUBROUTINE READMG OR EQUIVALENT (AND NOW STORED IN THE INTERNAL MESSAGE BUFFER, ARRAY MBAY IN MODULE BITBUF). More...
 

Detailed Description

Author
WOOLLEN
Date
2000-09-19

Definition in file cktaba.f.

Function/Subroutine Documentation

subroutine cktaba (   LUN,
character*8  SUBSET,
  JDATE,
  IRET 
)

THIS SUBROUTINE PARSES THE TABLE A MNEMONIC AND THE DATE OUT OF SECTION 1 OF A BUFR MESSAGE PREVIOUSLY READ FROM UNIT LUNIT USING BUFR ARCHIVE LIBRARY SUBROUTINE READMG OR EQUIVALENT (AND NOW STORED IN THE INTERNAL MESSAGE BUFFER, ARRAY MBAY IN MODULE BITBUF).

THE TABLE A MNEMONIC IS ASSOCIATED WITH THE BUFR MESSAGE TYPE/SUBTYPE IN SECTION 1. IT ALSO FILLS IN THE MESSAGE CONTROL WORD PARTITION ARRAYS IN MODULE MSGCWD.

PROGRAM HISTORY LOG: 2000-09-19 J. WOOLLEN – ORIGINAL AUTHOR - CONSOLIDATED MESSAGE DECODING LOGIC THAT HAD BEEN REPLICATED IN READMG, READFT, READERME, RDMEMM AND READIBM (CKTABA IS NOW CALLED BY THESE CODES); LOGIC ENHANCED HERE TO ALLOW COMPRESSED AND STANDARD BUFR MESSAGES TO BE READ 2003-11-04 S. BENDER – ADDED REMARKS/BUFRLIB ROUTINE INTERDEPENDENCIES 2003-11-04 D. KEYSER – MODIFIED TO NOT ABORT WHEN THE SECTION 1 MESSAGE SUBTYPE DOES NOT AGREE WITH THE SECTION 1 MESSAGE SUBTYPE IN THE DICTIONARY IF THE MESSAGE TYPE MNEMONIC IS NOT OF THE FORM "NCtttsss", WHERE ttt IS THE BUFR TYPE AND sss IS THE BUFR SUBTYPE (E.G., IN "PREPBUFR" FILES); MODIFIED DATE CALCULATIONS TO NO LONGER USE FLOATING POINT ARITHMETIC SINCE THIS CAN LEAD TO ROUND OFF ERROR AND AN IMPROPER RESULTING DATE ON SOME MACHINES (E.G., NCEP IBM FROST/SNOW), INCREASES PORTABILITY; UNIFIED/PORTABLE FOR WRF; ADDED DOCUMENTATION (INCLUDING HISTORY); OUTPUTS MORE COMPLETE DIAGNOSTIC INFO WHEN ROUTINE TERMINATES ABNORMALLY OR UNUSUAL THINGS HAPPEN; SUBSET DEFINED AS " " IF IRET RETURNED AS 11 (BEFORE WAS UNDEFINED) 2004-08-09 J. ATOR – MAXIMUM MESSAGE LENGTH INCREASED FROM 20,000 TO 50,000 BYTES 2005-11-29 J. ATOR – USE IUPBS01, IGETDATE AND GETLENS 2006-04-14 J. ATOR – ALLOW "FRtttsss" AND "FNtttsss" AS POSSIBLE TABLE A MNEMONICS, WHERE ttt IS THE BUFR TYPE AND sss IS THE BUFR SUBTYPE 2009-03-23 J. ATOR – ADD LOGIC TO ALLOW SECTION 3 DECODING; USE IUPBS3 AND ERRWRT 2014-12-10 J. ATOR – USE MODULES INSTEAD OF COMMON BLOCKS

USAGE: CALL CKTABA (LUN, SUBSET, JDATE, IRET) INPUT ARGUMENT LIST: LUN - INTEGER: I/O STREAM INDEX INTO INTERNAL MEMORY ARRAYS

OUTPUT ARGUMENT LIST: SUBSET - CHARACTER*8: TABLE A MNEMONIC FOR TYPE OF BUFR MESSAGE BEING CHECKED: " " = IRET equal to 11 (see IRET below) and not using Section 3 decoding JDATE - INTEGER: DATE-TIME STORED WITHIN SECTION 1 OF BUFR MESSAGE BEING CHECKED, IN FORMAT OF EITHER YYMMDDHH OR YYYYMMDDHH, DEPENDING ON DATELEN() VALUE IRET - INTEGER: RETURN CODE: 0 = normal return -1 = unrecognized Table A (message type) value 11 = this is a BUFR table (dictionary) message

REMARKS: THIS ROUTINE CALLS: BORT DIGIT ERRWRT GETLENS I4DY IGETDATE IUPB IUPBS01 IUPBS3 NEMTBAX NUMTAB OPENBT RDUSDX THIS ROUTINE IS CALLED BY: RDMEMM READERME READMG Normally not called by any application programs.

Definition at line 75 of file cktaba.f.

References bort(), digit(), errwrt(), getlens(), i4dy(), igetdate(), iupb(), iupbs01(), iupbs3(), nemtbax(), numtab(), openbt(), and rdusdx().

Referenced by rdmemm(), readerme(), and readmg().