NCEPLIBS-bufr
11.5.0
|
Define signatures and declare variables for reading or writing BUFR messages via a C language interface. More...
Go to the source code of this file.
Functions | |
void | backbufr (f77int *) |
This subroutine backspaces a BUFR file by one BUFR message. More... | |
void | cewind (f77int *) |
This subroutine rewinds a BUFR file back to its beginning. More... | |
void | closfb (f77int *) |
This subroutine closes a previously opened BUFR file. More... | |
f77int | crdbufr (f77int *, char *, f77int *) |
This function reads the next message from a BUFR file that was previously opened for reading. More... | |
void | cwrbufr (f77int *, f77int *, f77int *) |
This subroutine writes a BUFR message into a file that was previously opened for writing. More... | |
void | openab (f77int *, char *) |
This subroutine opens a new system file for appending BUFR messages. More... | |
void | openrb (f77int *, char *) |
This subroutine opens a new system file for reading BUFR messages. More... | |
void | openwb (f77int *, char *) |
This subroutine opens a new system file for writing BUFR messages. More... | |
Variables | |
fpos_t | lstpos [NFILES+1] |
Byte positions of last successful reads from files corresponding to pb, for files that were opened for reading. More... | |
FILE * | pb [NFILES+1] |
File pointers. More... | |
Define signatures and declare variables for reading or writing BUFR messages via a C language interface.
These signatures and variables are used by the C language interface which encompasses subroutines openrb(), openwb(), openab(), backbufr(), cewind(), closfb(), crdbufr() and cwrbufr().
The variables are dimensioned as one larger than NFILES because of the difference in array indexing between Fortran and C. In each subroutine, the value passed in for nfile will be an internal Fortran I/O stream index ranging in value from 1 to NFILES, so we need to allow for this same range of values in C, which would otherwise expect the array indices to range from 0 to NFILES-1.
Definition in file cread.h.
void backbufr | ( | f77int * | nfile | ) |
This subroutine backspaces a BUFR file by one BUFR message.
[in] | nfile | - f77int*: Internal Fortran I/O stream index associated with BUFR file |
Program history log:
Definition at line 76 of file cread.c.
Referenced by cpdxmm(), posapx(), rdbfdx(), readmg(), and ufbmem().
void cewind | ( | f77int * | nfile | ) |
This subroutine rewinds a BUFR file back to its beginning.
[in] | nfile | - f77int*: Internal Fortran I/O stream index associated with BUFR file |
Program history log:
Definition at line 90 of file cread.c.
References pb.
void closfb | ( | f77int * | nfile | ) |
This subroutine closes a previously opened BUFR file.
[in] | nfile | - f77int*: Internal Fortran I/O stream index associated with BUFR file |
Program history log:
Definition at line 104 of file cread.c.
References pb.
Referenced by closbf().
f77int crdbufr | ( | f77int * | nfile, |
char * | bufr, | ||
f77int * | mxbyt | ||
) |
This function reads the next message from a BUFR file that was previously opened for reading.
[in] | nfile | - f77int*: Internal Fortran I/O stream index associated with BUFR file |
[out] | bufr | - char*: BUFR message |
[in] | mxbyt | - f77int*: Dimensioned size (in bytes) of bufr; used by the function to ensure that it doesn't overflow the BUFR array |
Program history log:
Definition at line 126 of file cread.c.
References iupbs01(), lstpos, and pb.
Referenced by rdmsgw().
void cwrbufr | ( | f77int * | nfile, |
f77int * | bufr, | ||
f77int * | nwrd | ||
) |
This subroutine writes a BUFR message into a file that was previously opened for writing.
[in] | nfile | - f77int*: Internal Fortran I/O stream index associated with BUFR file |
[in] | bufr | - f77int*: BUFR message |
[in] | nwrd | - f77int*: Size (in f77ints) of bufr |
Program history log:
Definition at line 157 of file cread.c.
References pb.
Referenced by msgwrt().
void openab | ( | f77int * | nfile, |
char * | ufile | ||
) |
This subroutine opens a new system file for appending BUFR messages.
[in] | nfile | - f77int*: Internal Fortran I/O stream index associated with ufile |
[in] | ufile | - char*: [path/]name of system file to be opened |
Program history log:
Definition at line 62 of file cread.c.
References pb.
Referenced by openbf().
void openrb | ( | f77int * | nfile, |
char * | ufile | ||
) |
This subroutine opens a new system file for reading BUFR messages.
[in] | nfile | - f77int*: Internal Fortran I/O stream index associated with ufile |
[in] | ufile | - char*: [path/]name of system file to be opened |
Program history log:
Definition at line 32 of file cread.c.
References pb.
Referenced by openbf().
void openwb | ( | f77int * | nfile, |
char * | ufile | ||
) |
This subroutine opens a new system file for writing BUFR messages.
[in] | nfile | - f77int*: Internal Fortran I/O stream index associated with ufile |
[in] | ufile | - char*: [path/]name of system file to be opened |
Program history log:
Definition at line 47 of file cread.c.
References pb.
Referenced by openbf().
lstpos |
Byte positions of last successful reads from files corresponding to pb, for files that were opened for reading.
Definition at line 59 of file cread.h.
Referenced by arallocc(), ardllocc(), backbufr(), and crdbufr().
pb |
File pointers.
Definition at line 58 of file cread.h.
Referenced by arallocc(), ardllocc(), backbufr(), cewind(), closfb(), crdbufr(), cwrbufr(), openab(), openrb(), and openwb().