NCEPLIBS-bufr  12.3.0
bufr_c2f_interface Module Reference

Wrap Fortran NCEPLIBS-bufr subprograms and variables so they can be called from within C. More...

Functions/Subroutines

recursive subroutine, public atrcpt_c (msgin, lmsgot, msgot)
 Read a BUFR message and output an equivalent message with a tank receipt time added to Section 1. More...
 
recursive subroutine, public bort_c (errstr)
 Log one error message and abort application program. More...
 
recursive subroutine, public bvers_c (cverstr, cverstr_len)
 Get the version number of the NCEPLIBS-bufr software. More...
 
subroutine, public cadn30_c (idn, adn, adn_str_len)
 Convert an FXY value from its WMO bit-wise representation to its six-character representation. More...
 
integer(c_int) function, public catch_borts_c (cf)
 Specify whether subsequent bort errors should be caught and returned to the application program. More...
 
subroutine, public check_for_bort_c (error_str, error_str_len)
 Check whether a bort error was caught during a previous call to a library function or subroutine. More...
 
recursive subroutine, public closbf_c (bufr_unit)
 Close a previously opened file and disconnect it from the library. More...
 
subroutine, public close_c (lunit)
 Close a Fortran file from a C program. More...
 
recursive subroutine, public closmg_c (bufr_unit)
 Close a BUFR message. More...
 
recursive subroutine, public cmpmsg_c (cf)
 Specify the use of compression when writing BUFR messages. More...
 
recursive subroutine, public cnved4_c (msgin, lmsgot, msgot)
 Convert a BUFR message to edition 4. More...
 
recursive subroutine, public codflg_c (cf)
 Specify whether to read code and flag table information from master BUFR tables. More...
 
recursive subroutine, public copybf_c (lunin, lunot)
 Copy an entire BUFR file from one Fortran logical unit to another. More...
 
recursive subroutine, public copymg_c (lunin, lunot)
 Copy a BUFR message from one Fortran logical unit to another. More...
 
recursive subroutine, public copysb_c (lunin, lunot, iret)
 Copy a BUFR data subset from one Fortran logical unit to another. More...
 
recursive subroutine, public cpymem_c (lunot)
 Copy a message from internal arrays to a file. More...
 
recursive subroutine, public datebf_c (bufr_unit, mear, mmon, mday, mour, idate)
 Get the Section 1 date-time from the first data message of a BUFR file. More...
 
recursive subroutine, public datelen_c (len)
 Specify the format of Section 1 date-time values that will be output by future calls to message-reading subroutines. More...
 
subroutine, public delete_table_data_c ()
 Deletes the copies of the moda_tables arrays. More...
 
recursive subroutine, public drfini_c (bufr_unit, mdrf, ndrf, table_d_mnemonic)
 Explicitly initialize delayed replication factors for writing to a data subset. More...
 
recursive subroutine, public dumpbf_c (bufr_unit, jdate, jdump)
 Get the Section 1 date-time from the first two "dummy" messages of an NCEP dump file. More...
 
recursive subroutine, public dxdump_c (lunit, luprt)
 Print a copy of the DX BUFR table associated with a specified Fortran logical unit. More...
 
subroutine, public elemdx_c (card, lun)
 Decode the scale factor, reference value, bit width, and units from a Table B mnemonic definition. More...
 
subroutine, public exitbufr_c ()
 Reset the library. More...
 
subroutine, public get_inode_c (lun, start_node)
 Get the bufr node idx for the start node of the subset. More...
 
subroutine, public get_inv_c (lun, inv_ptr, inv_size)
 Get pointer to the moda_usrint INV array. More...
 
subroutine, public get_irf_c (irf_ptr, irf_size)
 Get copy of the moda_tables IRF array. More...
 
subroutine, public get_isc_c (isc_ptr, isc_size)
 Get copy of the moda_tables ISC array. More...
 
subroutine, public get_itp_c (itp_ptr, itp_size)
 Get copy of the moda_tables ITP array. More...
 
subroutine, public get_jmpb_c (jmpb_ptr, jmpb_size)
 Get copy of the moda_tables JMPB array. More...
 
subroutine, public get_link_c (link_ptr, link_size)
 Get copy of the moda_tables LINK array. More...
 
subroutine, public get_nval_c (lun, num_nodes)
 Get the number of values in the current subset. More...
 
subroutine, public get_tag_c (tag_ptr, tag_len, mem_size)
 Get copy of the moda_tables TAG array. More...
 
subroutine, public get_typ_c (typ_ptr, typ_len, mem_size)
 Get copy of the moda_tables TYP array. More...
 
subroutine, public get_val_c (lun, val_ptr, val_size)
 Get pointer to the moda_usrint VAL array. More...
 
recursive subroutine, public getabdb_c (lunit, itab, ctabdb, jtab)
 Get Table B and Table D information from the internal DX tables. More...
 
recursive subroutine, public getcfmng_c (lunit, cnemoi, ivali, cnemod, ivald, cmeang_c, lcmgc, iret)
 Get the meaning of a numerical value from a code or flag table. More...
 
recursive subroutine, public gettagpr_c (bufr_unit, c_tagch, ntagch, c_tagpr, tagpr_len, ires)
 Get the parent for a specified occurrence of a Table B or Table D mnemonic. More...
 
recursive subroutine, public gettagre_c (bufr_unit, c_tagi, ntagi, c_tagre, tagre_len, ntagre, ires)
 Check whether a specified Table B mnemonic references another Table B mnemonic via an internal bitmap. More...
 
recursive real(c_double) function, public getvalnb_c (bufr_unit, c_tagpv, ntagpv, c_tagnb, ntagnb)
 Read a data value corresponding to a specific occurrence of a mnemonic. More...
 
integer(c_int) function, public ibfms_c (r8val)
 Test whether a data value is "missing". More...
 
recursive integer(c_int) function, public ifbget_c (bufr_unit)
 Check if there are any more data subsets available within a BUFR message. More...
 
integer(c_int) function, public ifxy_c (cfxy)
 Convert an FXY value from its 6 character representation to its WMO bit-wise representation. More...
 
integer(c_int) function, public igetmxby_c ()
 Get the maximum length of a BUFR message that can be written to an output file. More...
 
integer(c_int) function, public igetntbi_c (lun, table_type)
 Get the next index for storing an entry within an internal DX BUFR table. More...
 
integer(c_int) function, public igetprm_c (cprmnm)
 Get the current value of a parameter. More...
 
recursive integer(c_int) function, public igetsc_c (bufr_unit)
 Check for an abnormal status code associated with the processing of a file. More...
 
integer(c_int) function, public igettdi_c (iflag)
 Get the next usable Table D index for the current master table, or reset the index. More...
 
integer(c_int) function, public imrkopr_c (nemo)
 Check whether a specified mnemonic is a Table C marker operator. More...
 
recursive subroutine, public invmrg_c (lubfi, lubfj)
 Merge parts of data subsets. More...
 
recursive subroutine, public ipkm_c (cbay, nbyt, ival, cbay_len)
 Encode an integer into a character string. More...
 
integer(c_int) function, public ireadmg_c (bufr_unit, c_subset, iddate, subset_str_len)
 Read the next message from a BUFR file. More...
 
integer(c_int) function, public ireadns_c (bufr_unit, c_subset, iddate, subset_str_len)
 Read the next data subset from a BUFR file. More...
 
integer(c_int) function, public ireadsb_c (bufr_unit)
 Read the next data subset from a BUFR message. More...
 
integer(c_int) function, public isetprm_c (cprmnm, ipval)
 Define a customized parameter value for dynamic allocation. More...
 
integer(c_int) function, public istdesc_c (idn)
 Check whether a descriptor is WMO-standard. More...
 
integer(c_int) function, public iupbs01_c (bufr, mnemonic)
 Read a data value from Section 0 or Section 1 of a BUFR message. More...
 
recursive integer(c_int) function, public iupm_c (cbay, nbits, lcbay)
 Decode an integer from a character string. More...
 
recursive integer(c_int) function, public iupvs01_c (bufr_unit, c_s01m)
 Read a specified value from within Section 0 or 1 of a BUFR message. More...
 
recursive integer(c_int) function, public lcmgdf_c (bufr_unit, c_subset)
 Check if a subset definition contains any long character strings. More...
 
subroutine, public maxout_c (max0)
 Define a customized maximum length for output BUFR messages. More...
 
recursive subroutine, public mesgbc_c (lunin, mesgtyp, icomp)
 Get information from the first data message in a BUFR file. More...
 
recursive subroutine, public mesgbf_c (lunit, mesgtyp)
 Get information from the first data message in a BUFR file. More...
 
recursive subroutine, public minimg_c (bufr_unit, mini)
 Write a minutes value into Section 1 of a BUFR message. More...
 
subroutine, public mtinfo_c (path, file_unit_1, file_unit_2)
 Specify location of master BUFR tables on local file system. More...
 
subroutine, public nemdefs_c (file_unit, mnemonic, unit_c, unit_str_len, desc_c, desc_str_len, iret)
 Get the element name and units associated with a Table B mnemonic. More...
 
subroutine, public nemspecs_c (file_unit, mnemonic, mnemonic_idx, scale, reference, bits, iret)
 Get the scale factor, reference value and bit width associated with a specified occurrence of a Table B mnemonic. More...
 
subroutine, public nemtab_c (lun, mnemonic, descriptor, table_type, table_idx)
 Get information about a descriptor. More...
 
subroutine, public nemtbb_c (lun, table_idx, unit_str, unit_str_len, scale, reference, bits)
 Get information about a Table B descriptor. More...
 
recursive integer(c_int) function, public nmsub_c (bufr_unit)
 Get the total number of data subsets available within a BUFR message. More...
 
subroutine, public numtbd_c (lun, idn, nemo, nemo_str_len, tab, iret)
 Search for a Table B or Table D descriptor within the internal DX BUFR tables. More...
 
subroutine, public open_c (lunit, filepath)
 Open a Fortran file from a C program. More...
 
recursive subroutine, public openbf_c (bufr_unit, cio, table_file_id)
 Connect a new file to the library, or initialize the library, or change verbosity associated with already-connected file. More...
 
recursive subroutine, public openmb_c (bufr_unit, c_subset, iddate)
 Open a new message for output in a BUFR file that was previously opened for writing. More...
 
recursive subroutine, public openmg_c (bufr_unit, c_subset, iddate)
 Open a new message for output in a BUFR file that was previously opened for writing. More...
 
recursive subroutine, public pkbs1_c (ival, mbay, c_s1m)
 Specify a value to be written into Section 1 of a BUFR message. More...
 
subroutine, public pktdd_c (id, lun, idn, iret)
 Store information about a child mnemonic within the internal arrays. More...
 
recursive subroutine, public pkvs01_c (c_s01m, ival)
 Specify a value to be written into Section 0 or 1 of all future BUFR messages. More...
 
recursive subroutine, public rdmemm_c (imsg, c_subset, jdate, subset_str_len, ires)
 Read a specified message from internal arrays. More...
 
recursive subroutine, public rdmems_c (isub, ires)
 Read a specified data subset from internal arrays. More...
 
recursive subroutine, public rdmgsb_c (lunit, imsg, isub)
 Read a specified data subset from a BUFR file. More...
 
recursive subroutine, public readerme_c (mesg, bufr_unit, c_subset, iddate, subset_str_len, ires)
 Read a BUFR message from a memory array. More...
 
recursive subroutine, public readlc_c (lunit, str_id, output_str, output_str_len)
 Get a long string from the BUFR file. More...
 
recursive subroutine, public readmg_c (bufr_unit, c_subset, iddate, subset_str_len, ires)
 Read the next message from a BUFR file. More...
 
recursive subroutine, public readns_c (bufr_unit, c_subset, iddate, subset_str_len, ires)
 Read the next data subset from a BUFR file. More...
 
recursive subroutine, public readsb_c (bufr_unit, ires)
 Read the next data subset from a BUFR message. More...
 
recursive subroutine, public rtrcpt_c (lunit, iyr, imo, idy, ihr, imi, iret)
 Get the tank receipt time from Section 1 of a BUFR message. More...
 
recursive subroutine, public setvalnb_c (bufr_unit, c_tagpv, ntagpv, c_tagnb, ntagnb, r8val, ires)
 Write a data value corresponding to a specific occurrence of a mnemonic. More...
 
recursive subroutine, public status_c (file_unit, lun, il, im)
 Check whether a file is connected to the library. More...
 
recursive subroutine, public stdmsg_c (cf)
 Specify whether to standardize future output BUFR messages. More...
 
recursive subroutine, public stndrd_c (lunit, msgin, lmsgot, msgot)
 Standardize a copy of a BUFR message. More...
 
subroutine, public stntbi_c (n, lun, numb, nemo, celsq)
 Store a new entry within the internal BUFR Table B or D. More...
 
recursive subroutine, public strcpt_c (cf, iyr, imo, idy, ihr, imi)
 Specify a tank receipt time to be written into Section 1 of all future BUFR messages. More...
 
subroutine, public strnum_c (str, num, iret)
 Decode an integer from a character string. More...
 
recursive subroutine, public ufbcnt_c (lunit, kmsg, ksub)
 Get the current location of the file pointer within a BUFR file. More...
 
recursive subroutine, public ufbcpy_c (lunin, lunot)
 Copy a BUFR data subset from one Fortran logical unit to another. More...
 
recursive subroutine, public ufbcup_c (lunin, lunot)
 Copy unique elements of a data subset from one file to another. More...
 
recursive subroutine, public ufbdmp_c (lunit, luprt)
 Print a verbose listing of the contents of a data subset. More...
 
recursive subroutine, public ufbevn_c (bufr_unit, c_data, dim_1, dim_2, dim_3, iret, table_b_mnemonic)
 Read one or more data values from a data subset. More...
 
recursive subroutine, public ufbget_c (bufr_unit, tab, i1, iret, table_b_mnemonic)
 Read one or more data values from a data subset without advancing the subset pointer. More...
 
recursive subroutine, public ufbint_c (bufr_unit, c_data, dim_1, dim_2, iret, table_b_mnemonic)
 Read/write one or more data values from/to a data subset. More...
 
recursive subroutine, public ufbinx_c (bufr_unit, imsg, isub, c_data, dim_1, dim_2, iret, table_b_mnemonic)
 Read one or more data values from a specified data subset. More...
 
recursive subroutine, public ufbmem_c (lunit, inew, iret, iunit)
 Read an entire BUFR file into internal arrays. More...
 
recursive subroutine, public ufbmex_c (lunit, lundx, inew, iret, mesg)
 Read an entire BUFR file into internal arrays. More...
 
recursive subroutine, public ufbmms_c (imsg, isub, c_subset, jdate, subset_str_len)
 Read a specified data subset from internal arrays. More...
 
recursive subroutine, public ufbmns_c (irep, c_subset, idate, subset_str_len)
 Read a specified data subset from internal arrays. More...
 
recursive subroutine, public ufbovr_c (bufr_unit, c_data, dim_1, dim_2, iret, table_b_mnemonic)
 Overwrite one or more data values within a data subset. More...
 
recursive subroutine, public ufbpos_c (bufr_unit, irec, isub, c_subset, iddate, subset_str_len)
 Jump forwards or backwards to a specified data subset within a BUFR file. More...
 
recursive subroutine, public ufbqcd_c (lunit, cnemo, iqcd)
 Return a prepbufr program code corresponding to a mnemonic. More...
 
recursive subroutine, public ufbqcp_c (lunit, iqcp, cnemo, cnemo_len)
 Return a mnemonic corresponding to a prepbufr program code. More...
 
recursive subroutine, public ufbrep_c (bufr_unit, c_data, dim_1, dim_2, iret, table_b_mnemonic)
 Read/write one or more data values from/to a data subset. More...
 
recursive subroutine, public ufbrms_c (imsg, isub, c_data, dim_1, dim_2, iret, table_b_mnemonic)
 Read one or more data values from internal arrays. More...
 
recursive subroutine, public ufbseq_c (bufr_unit, c_data, dim_1, dim_2, iret, table_d_mnemonic)
 Read/write an entire sequence of data values from/to a data subset. More...
 
recursive subroutine, public ufbstp_c (bufr_unit, c_data, dim_1, dim_2, iret, table_b_mnemonic)
 Read/write one or more data values from/to a data subset. More...
 
recursive subroutine, public ufbtab_c (bufr_unit, c_data, dim_1, dim_2, iret, table_b_mnemonic)
 Read one or more data values from every data subset in a BUFR file. More...
 
recursive subroutine, public ufbtam_c (c_data, dim_1, dim_2, iret, table_b_mnemonic)
 Read one or more data values from every data subset in internal arrays. More...
 
recursive subroutine, public ufdump_c (lunit, luprt)
 Print a verbose listing of the contents of a data subset. More...
 
recursive subroutine, public upds3_c (mbay, lcds3, ccds3, nds3)
 Get the sequence of data descriptors contained within Section 3 of a BUFR message. More...
 
recursive subroutine, public upftbv_c (lunit, cnemo, val, ibit, mxib, nib)
 Get the bit settings equivalent to a given numerical value for a flag table mnemonic. More...
 
subroutine, public uptdd_c (id, lun, ient, iret)
 Get the WMO bit-wise representation of the FXY value corresponding to a child mnemonic of a Table D sequence. More...
 
recursive subroutine, public wrdxtb_c (lundx, lunot)
 Generate DX BUFR table messages and write them to a output file. More...
 
recursive subroutine, public writlc_c (lunit, str, chr)
 Write a long string to the BUFR file. More...
 
recursive subroutine, public writsa_c (bufr_unit, bufr_len, bufr, nbufr)
 Write the next data subset to a BUFR message, and return a copy of any completed message. More...
 
recursive subroutine, public writsb_c (bufr_unit)
 Write the next data subset to a BUFR message. More...
 

Detailed Description

Wrap Fortran NCEPLIBS-bufr subprograms and variables so they can be called from within C.

Local copies of some Fortran variables are stored as allocatable objects, especially isc, link, jmpb, tag and typ. It's the application program's responsibility to call delete_table_data_f in order to properly delete these variables.

Author
Ronald Mclaren
Date
2020-07-29

Function/Subroutine Documentation

◆ atrcpt_c()

recursive subroutine, public bufr_c2f_interface::atrcpt_c ( integer(c_int), dimension(*), intent(in)  msgin,
integer(c_int), intent(in), value  lmsgot,
integer(c_int), dimension(*), intent(out)  msgot 
)

Read a BUFR message and output an equivalent message with a tank receipt time added to Section 1.

Wraps atrcpt() subroutine.

Parameters
msgin- BUFR message
lmsgot- Allocated length of msgot
msgot- Copy of msgin with a tank receipt time added to Section 1
Author
J. Ator
Date
2025-11-20

Definition at line 1958 of file bufr_c2f_interface.F90.

References atrcpt().

◆ bort_c()

recursive subroutine, public bufr_c2f_interface::bort_c ( character(kind=c_char), dimension(*), intent(in)  errstr)

Log one error message and abort application program.

Wraps bort() subroutine.

Parameters
errstr- Error message.
Author
J. Ator
Date
2023-04-07

Definition at line 1353 of file bufr_c2f_interface.F90.

References bort().

◆ bvers_c()

recursive subroutine, public bufr_c2f_interface::bvers_c ( character(kind=c_char), dimension(*), intent(out)  cverstr,
integer(c_int), intent(in), value  cverstr_len 
)

Get the version number of the NCEPLIBS-bufr software.

Wraps bvers() subroutine.

Parameters
cverstr- Version string.
cverstr_len- Length of the version string.
Author
J. Ator
Date
2023-04-07

Definition at line 1439 of file bufr_c2f_interface.F90.

References bvers().

◆ cadn30_c()

subroutine, public bufr_c2f_interface::cadn30_c ( integer(c_int), intent(in), value  idn,
character(kind=c_char), dimension(*), intent(out)  adn,
integer(c_int), intent(in), value  adn_str_len 
)

Convert an FXY value from its WMO bit-wise representation to its six-character representation.

Wraps cadn30() function.

Parameters
idn- WMO bit-wise representation of FXY value.
adn- FXY value.
adn_str_len- Length of adn string.
Author
J. Ator
Date
2023-04-07

Definition at line 977 of file bufr_c2f_interface.F90.

References cadn30().

◆ catch_borts_c()

integer(c_int) function, public bufr_c2f_interface::catch_borts_c ( character(kind=c_char), dimension(*), intent(in)  cf)

Specify whether subsequent bort errors should be caught and returned to the application program.

Wraps catch_borts() function.

Parameters
cf- Flag indicating whether subsequent bort errors should be caught and returned to the application program ('Y' = Yes, 'N' = No).
Returns
catch_borts_c - -1 if cf contained an illegal value, otherwise 0
Author
J. Ator
Date
2025-10-15

Definition at line 1475 of file bufr_c2f_interface.F90.

References bort_target_set(), bort_target_unset(), and catch_borts().

◆ check_for_bort_c()

subroutine, public bufr_c2f_interface::check_for_bort_c ( character(kind=c_char), dimension(*), intent(out)  error_str,
integer(c_int), intent(in), value  error_str_len 
)

Check whether a bort error was caught during a previous call to a library function or subroutine.

Wraps check_for_bort() subroutine.

Parameters
error_str- Error string if a bort error occurred; otherwise empty
error_str_len- Allocated size of error_str
Author
J. Ator
Date
2025-10-15

Definition at line 1519 of file bufr_c2f_interface.F90.

References check_for_bort().

◆ closbf_c()

recursive subroutine, public bufr_c2f_interface::closbf_c ( integer(c_int), intent(in), value  bufr_unit)

Close a previously opened file and disconnect it from the library.

Wraps closbf() subroutine.

Parameters
bufr_unit- Fortran logical unit number to close
Author
Ronald McLaren
Date
2020-07-29

Definition at line 160 of file bufr_c2f_interface.F90.

References closbf().

◆ close_c()

subroutine, public bufr_c2f_interface::close_c ( integer(c_int), intent(in), value  lunit)

Close a Fortran file from a C program.

Parameters
lunit- Fortran logical unit
Author
Ronald McLaren
Date
2020-07-29

Definition at line 121 of file bufr_c2f_interface.F90.

◆ closmg_c()

recursive subroutine, public bufr_c2f_interface::closmg_c ( integer(c_int), intent(in), value  bufr_unit)

Close a BUFR message.

Wraps closmg() subroutine.

Parameters
bufr_unit- Fortran logical unit number to write to.
Author
J. Ator
Date
2025-12-09

Definition at line 1425 of file bufr_c2f_interface.F90.

References closmg().

◆ cmpmsg_c()

recursive subroutine, public bufr_c2f_interface::cmpmsg_c ( character(kind=c_char), dimension(*), intent(in)  cf)

Specify the use of compression when writing BUFR messages.

Wraps cmpmsg() subroutine.

Parameters
cf- Flag indicating whether future BUFR output messages are to be compressed ('Y' = Yes, 'N' = No).
Author
J. Ator
Date
2023-04-07

Definition at line 1456 of file bufr_c2f_interface.F90.

References cmpmsg().

◆ cnved4_c()

recursive subroutine, public bufr_c2f_interface::cnved4_c ( integer(c_int), dimension(*), intent(in)  msgin,
integer(c_int), intent(in), value  lmsgot,
integer(c_int), dimension(*), intent(out)  msgot 
)

Convert a BUFR message to edition 4.

Wraps cnved4() subroutine.

Parameters
msgin- BUFR message
lmsgot- Allocated length of msgot
msgot- Copy of msgin now converted to edition 4
Author
J. Ator
Date
2025-12-03

Definition at line 2441 of file bufr_c2f_interface.F90.

References cnved4().

◆ codflg_c()

recursive subroutine, public bufr_c2f_interface::codflg_c ( character(kind=c_char), dimension(*), intent(in)  cf)

Specify whether to read code and flag table information from master BUFR tables.

Wraps codflg() subroutine.

Parameters
cf- Flag indicating whether code and flag table information should be included when reading from master BUFR tables
Author
J. Ator
Date
2025-12-02

Definition at line 2355 of file bufr_c2f_interface.F90.

References codflg().

◆ copybf_c()

recursive subroutine, public bufr_c2f_interface::copybf_c ( integer(c_int), intent(in), value  lunin,
integer(c_int), intent(in), value  lunot 
)

Copy an entire BUFR file from one Fortran logical unit to another.

Wraps copybf() subroutine.

Parameters
lunin- Fortran logical unit for source BUFR file
lunot- Fortran logical unit for target BUFR file
Author
J. Ator
Date
2025-11-20

Definition at line 2016 of file bufr_c2f_interface.F90.

References copybf().

◆ copymg_c()

recursive subroutine, public bufr_c2f_interface::copymg_c ( integer(c_int), intent(in), value  lunin,
integer(c_int), intent(in), value  lunot 
)

Copy a BUFR message from one Fortran logical unit to another.

Wraps copymg() subroutine.

Parameters
lunin- Fortran logical unit for source BUFR file
lunot- Fortran logical unit for target BUFR file
Author
J. Ator
Date
2025-11-20

Definition at line 2030 of file bufr_c2f_interface.F90.

References copymg().

◆ copysb_c()

recursive subroutine, public bufr_c2f_interface::copysb_c ( integer(c_int), intent(in), value  lunin,
integer(c_int), intent(in), value  lunot,
integer(c_int), intent(out)  iret 
)

Copy a BUFR data subset from one Fortran logical unit to another.

Wraps copysb() subroutine.

Parameters
lunin- Fortran logical unit for source BUFR file
lunot- Fortran logical unit for target BUFR file
iret- Return code
Author
J. Ator
Date
2025-11-20

Definition at line 2045 of file bufr_c2f_interface.F90.

References copysb().

◆ cpymem_c()

recursive subroutine, public bufr_c2f_interface::cpymem_c ( integer(c_int), intent(in), value  lunot)

Copy a message from internal arrays to a file.

Wraps cpymem() subroutine.

Parameters
lunot- Fortran logical unit for target BUFR file
Author
J. Ator
Date
2025-12-02

Definition at line 2294 of file bufr_c2f_interface.F90.

References cpymem().

◆ datebf_c()

recursive subroutine, public bufr_c2f_interface::datebf_c ( integer(c_int), intent(in), value  bufr_unit,
integer(c_int), intent(out)  mear,
integer(c_int), intent(out)  mmon,
integer(c_int), intent(out)  mday,
integer(c_int), intent(out)  mour,
integer(c_int), intent(out)  idate 
)

Get the Section 1 date-time from the first data message of a BUFR file.

Wraps datebf() subroutine.

Parameters
bufr_unit- Fortran logical unit number to read from
mear- Year stored within Section 1 of first data message
mmon- Month stored within Section 1 of first data message
mday- Day stored within Section 1 of first data message
mour- Hour stored within Section 1 of first data message
idate- Date-time stored within Section 1 of first data message
Author
Jeff Ator
Date
2025-11-18

Definition at line 1818 of file bufr_c2f_interface.F90.

References datebf().

◆ datelen_c()

recursive subroutine, public bufr_c2f_interface::datelen_c ( integer(c_int), intent(in), value  len)

Specify the format of Section 1 date-time values that will be output by future calls to message-reading subroutines.

Wraps datelen() subroutine.

Parameters
len- Length of Section 1 date-time values to be output by all future calls to message-reading subroutines
Author
Jeff Ator
Date
2025-11-14

Definition at line 1730 of file bufr_c2f_interface.F90.

References datelen().

◆ delete_table_data_c()

subroutine, public bufr_c2f_interface::delete_table_data_c

Deletes the copies of the moda_tables arrays.

Author
Ronald McLaren
Date
2022-03-23

Definition at line 860 of file bufr_c2f_interface.F90.

◆ drfini_c()

recursive subroutine, public bufr_c2f_interface::drfini_c ( integer(c_int), intent(in), value  bufr_unit,
integer(c_int), dimension(*), intent(in)  mdrf,
integer(c_int), intent(in), value  ndrf,
character(kind=c_char), dimension(*), intent(in)  table_d_mnemonic 
)

Explicitly initialize delayed replication factors for writing to a data subset.

Wraps drfini() subroutine.

Parameters
bufr_unit- Fortran logical unit number to write to
mdrf- Array of delayed replication factors
ndrf- Number of delayed replication factors in mdrf
table_d_mnemonic- Table D mnemonic
Author
Jeff Ator
Date
2025-10-28

Definition at line 1140 of file bufr_c2f_interface.F90.

References drfini().

◆ dumpbf_c()

recursive subroutine, public bufr_c2f_interface::dumpbf_c ( integer(c_int), intent(in), value  bufr_unit,
integer(c_int), dimension(*), intent(out)  jdate,
integer(c_int), dimension(*), intent(out)  jdump 
)

Get the Section 1 date-time from the first two "dummy" messages of an NCEP dump file.

Wraps dumpbf() subroutine.

Parameters
bufr_unit- Fortran logical unit number to read from
jdate- Dump center date-time stored within Section 1 of first "dummy" message
jdump- Dump initiation date-time stored within Section 1 of second "dummy" message
Author
Jeff Ator
Date
2025-11-18

Definition at line 1834 of file bufr_c2f_interface.F90.

References dumpbf().

◆ dxdump_c()

recursive subroutine, public bufr_c2f_interface::dxdump_c ( integer(c_int), intent(in), value  lunit,
integer(c_int), intent(in), value  luprt 
)

Print a copy of the DX BUFR table associated with a specified Fortran logical unit.

Wraps dxdump() subroutine.

Parameters
lunit- Fortran logical unit for BUFR file
luprt- Fortran logical unit for print output
Author
J. Ator
Date
2025-11-20

Definition at line 1974 of file bufr_c2f_interface.F90.

References dxdump().

◆ elemdx_c()

subroutine, public bufr_c2f_interface::elemdx_c ( character(kind=c_char), dimension(*), intent(in)  card,
integer(c_int), intent(in), value  lun 
)

Decode the scale factor, reference value, bit width, and units from a Table B mnemonic definition.

Wraps elemdx() subroutine.

Parameters
card- Mnemonic definition card.
lun- File ID.
Author
J. Ator
Date
2003-11-04

Definition at line 1017 of file bufr_c2f_interface.F90.

References elemdx().

◆ exitbufr_c()

subroutine, public bufr_c2f_interface::exitbufr_c

Reset the library.

Wraps exitbufr() subroutine.

Author
Ronald McLaren
Date
2020-07-29

Definition at line 171 of file bufr_c2f_interface.F90.

References exitbufr().

◆ get_inode_c()

subroutine, public bufr_c2f_interface::get_inode_c ( integer(c_int), intent(in), value  lun,
integer(c_int), intent(out)  start_node 
)

Get the bufr node idx for the start node of the subset.

Parameters
lun- File ID.
start_node- The start node of the subset
Author
Ronald McLaren
Date
2022-03-23

Definition at line 736 of file bufr_c2f_interface.F90.

References moda_msgcwd::inode.

◆ get_inv_c()

subroutine, public bufr_c2f_interface::get_inv_c ( integer(c_int), intent(in), value  lun,
type(c_ptr), intent(inout)  inv_ptr,
integer(c_int), intent(out)  inv_size 
)

Get pointer to the moda_usrint INV array.

Parameters
lun- File ID.
inv_ptr- C-style pointer to the INV array
inv_size- Length of the array
Author
Ronald McLaren
Date
2022-03-23

Definition at line 782 of file bufr_c2f_interface.F90.

References moda_usrint::inv.

◆ get_irf_c()

subroutine, public bufr_c2f_interface::get_irf_c ( type(c_ptr), intent(inout)  irf_ptr,
integer(c_int), intent(out)  irf_size 
)

Get copy of the moda_tables IRF array.

Parameters
irf_ptr- C-style pointer to the IRF array
irf_size- Length of the array
Author
Ronald McLaren
Date
2023-04-05

Definition at line 719 of file bufr_c2f_interface.F90.

References moda_tables::irf, and moda_tables::ntab.

◆ get_isc_c()

subroutine, public bufr_c2f_interface::get_isc_c ( type(c_ptr), intent(inout)  isc_ptr,
integer(c_int), intent(out)  isc_size 
)

Get copy of the moda_tables ISC array.

Parameters
isc_ptr- C-style pointer to the ISC array
isc_size- Size of the ISC array
Author
Ronald McLaren
Date
2022-03-23

Definition at line 611 of file bufr_c2f_interface.F90.

References moda_tables::isc, and moda_tables::ntab.

◆ get_itp_c()

subroutine, public bufr_c2f_interface::get_itp_c ( type(c_ptr), intent(inout)  itp_ptr,
integer(c_int), intent(out)  itp_size 
)

Get copy of the moda_tables ITP array.

Parameters
itp_ptr- C-style pointer to the ITP array
itp_size- Size of the ITP array
Author
Ronald McLaren
Date
2022-03-23

Definition at line 645 of file bufr_c2f_interface.F90.

References moda_tables::itp, and moda_tables::ntab.

◆ get_jmpb_c()

subroutine, public bufr_c2f_interface::get_jmpb_c ( type(c_ptr), intent(inout)  jmpb_ptr,
integer(c_int), intent(out)  jmpb_size 
)

Get copy of the moda_tables JMPB array.

Parameters
jmpb_ptr- C-style pointer to the JMPB array
jmpb_size- Length of the array
Author
Ronald McLaren
Date
2022-03-23

Definition at line 702 of file bufr_c2f_interface.F90.

References moda_tables::jmpb, and moda_tables::ntab.

◆ get_link_c()

subroutine, public bufr_c2f_interface::get_link_c ( type(c_ptr), intent(inout)  link_ptr,
integer(c_int), intent(out)  link_size 
)

Get copy of the moda_tables LINK array.

Parameters
link_ptr- C-style pointer to the LINK array
link_size- Size of the LINK array
Author
Ronald McLaren
Date
2022-03-23

Definition at line 628 of file bufr_c2f_interface.F90.

References moda_tables::link, and moda_tables::ntab.

◆ get_nval_c()

subroutine, public bufr_c2f_interface::get_nval_c ( integer(c_int), intent(in), value  lun,
integer(c_int), intent(out)  num_nodes 
)

Get the number of values in the current subset.

Parameters
lun- File ID.
num_nodes- number of values in the subset
Author
Ronald McLaren
Date
2022-03-23

Definition at line 750 of file bufr_c2f_interface.F90.

References moda_usrint::nval.

◆ get_tag_c()

subroutine, public bufr_c2f_interface::get_tag_c ( type(c_ptr), intent(inout)  tag_ptr,
integer(c_int), intent(out)  tag_len,
integer(c_int), intent(out)  mem_size 
)

Get copy of the moda_tables TAG array.

Parameters
tag_ptr- C-style pointer to the TAG array
tag_len- Length of the tag string
mem_size- Size of TAG array
Author
Ronald McLaren
Date
2022-03-23

Definition at line 683 of file bufr_c2f_interface.F90.

References moda_tables::ntab, and moda_tables::tag.

◆ get_typ_c()

subroutine, public bufr_c2f_interface::get_typ_c ( type(c_ptr), intent(inout)  typ_ptr,
integer(c_int), intent(out)  typ_len,
integer(c_int), intent(out)  mem_size 
)

Get copy of the moda_tables TYP array.

Parameters
typ_ptr- C-style pointer to the TYP array
typ_len- Size of each string within the TYP array
mem_size- Size of the TYP array
Author
Ronald McLaren
Date
2022-03-23

Definition at line 663 of file bufr_c2f_interface.F90.

References moda_tables::ntab, and moda_tables::typ.

◆ get_val_c()

subroutine, public bufr_c2f_interface::get_val_c ( integer(c_int), intent(in), value  lun,
type(c_ptr), intent(inout)  val_ptr,
integer(c_int), intent(out)  val_size 
)

Get pointer to the moda_usrint VAL array.

Parameters
lun- File ID.
val_ptr- C-style pointer to the VAL array
val_size- Length of the array
Author
Ronald McLaren
Date
2022-03-23

Definition at line 765 of file bufr_c2f_interface.F90.

References moda_usrint::val.

◆ getabdb_c()

recursive subroutine, public bufr_c2f_interface::getabdb_c ( integer(c_int), intent(in), value  lunit,
integer(c_int), intent(in), value  itab,
character(kind=c_char), dimension(128,*), intent(out)  ctabdb,
integer(c_int), intent(out)  jtab 
)

Get Table B and Table D information from the internal DX tables.

Wraps getabdb() subroutine.

Parameters
lunit- Fortran logical unit number for BUFR file
itab- Allocated length of ctabdb
ctabdb- Internal Table B and Table D information
jtab- Number of entries returned in ctabdb
Author
Jeff Ator
Date
2025-12-05

Definition at line 2565 of file bufr_c2f_interface.F90.

References getabdb().

◆ getcfmng_c()

recursive subroutine, public bufr_c2f_interface::getcfmng_c ( integer(c_int), intent(in), value  lunit,
character(kind=c_char), dimension(*), intent(in)  cnemoi,
integer(c_int), intent(in), value  ivali,
character(kind=c_char), dimension(*), intent(in)  cnemod,
integer(c_int), intent(in), value  ivald,
character(kind=c_char), dimension(*), intent(out)  cmeang_c,
integer(c_int), intent(in), value  lcmgc,
integer(c_int), intent(out)  iret 
)

Get the meaning of a numerical value from a code or flag table.

Parameters
lunit- Fortran logical unit.
cnemoi- Mnemonic to search for
ivali- Value associated with cnemoi
cnemod- Optional second mnemonic upon which cnemoi may depend
ivald- Value associated with cnemod
cmeang_c- Meaning associated with cnemoi and ivali (and possibly cnemod and ivald as well)
lcmgc- Allocated length of cmeang_c
iret- Return code from call to getcfmng
Author
J. Ator
Date
2025-11-05

Definition at line 1607 of file bufr_c2f_interface.F90.

References getcfmng().

◆ gettagpr_c()

recursive subroutine, public bufr_c2f_interface::gettagpr_c ( integer(c_int), intent(in), value  bufr_unit,
character(kind=c_char), dimension(*), intent(in)  c_tagch,
integer(c_int), intent(in), value  ntagch,
character(kind=c_char), dimension(*), intent(out)  c_tagpr,
integer(c_int), intent(in), value  tagpr_len,
integer(c_int), intent(out)  ires 
)

Get the parent for a specified occurrence of a Table B or Table D mnemonic.

Wraps gettagpr() subroutine.

Parameters
bufr_unit- Fortran logical unit number
c_tagch- Table B or Table D mnemonic
ntagch- Ordinal occurrence of c_tagch for which c_tagpr is to be returned
c_tagpr- Table D mnemonic
tagpr_len- Allocated length of c_tagpr
ires- Return code
Author
J. Ator
Date
2025-12-03

Definition at line 2375 of file bufr_c2f_interface.F90.

References gettagpr().

◆ gettagre_c()

recursive subroutine, public bufr_c2f_interface::gettagre_c ( integer(c_int), intent(in), value  bufr_unit,
character(kind=c_char), dimension(*), intent(in)  c_tagi,
integer(c_int), intent(in), value  ntagi,
character(kind=c_char), dimension(*), intent(out)  c_tagre,
integer(c_int), intent(in), value  tagre_len,
integer(c_int), intent(out)  ntagre,
integer(c_int), intent(out)  ires 
)

Check whether a specified Table B mnemonic references another Table B mnemonic via an internal bitmap.

Wraps gettagre() subroutine.

Parameters
bufr_unit- Fortran logical unit number
c_tagi- Table B mnemonic
ntagi- Ordinal occurrence of c_tagi for which c_tagre is to be returned
c_tagre- Table B mnemonic referenced by c_tagi via an internal bitmap
tagre_len- Allocated length of c_tagre
ntagre- Ordinal occurrence of tagre referenced by (ntagi)th occurrence of tagi
ires- Return code
Author
J. Ator
Date
2025-12-03

Definition at line 2410 of file bufr_c2f_interface.F90.

References gettagre().

◆ getvalnb_c()

recursive real(c_double) function, public bufr_c2f_interface::getvalnb_c ( integer(c_int), intent(in), value  bufr_unit,
character(kind=c_char), dimension(*), intent(in)  c_tagpv,
integer(c_int), intent(in), value  ntagpv,
character(kind=c_char), dimension(*), intent(in)  c_tagnb,
integer(c_int), intent(in), value  ntagnb 
)

Read a data value corresponding to a specific occurrence of a mnemonic.

Wraps getvalnb() function.

Parameters
bufr_unit- Fortran logical unit number
c_tagpv- Pivot mnemonic
ntagpv- Ordinal occurrence of c_tagpv to search for
c_tagnb- Nearby mnemonic
ntagnb- Ordinal occurrence of c_tagnb to search for
Returns
getvalnb_c - Return value
Author
J. Ator
Date
2025-12-05

Definition at line 2529 of file bufr_c2f_interface.F90.

References getvalnb().

◆ ibfms_c()

integer(c_int) function, public bufr_c2f_interface::ibfms_c ( real(c_double), intent(in), value  r8val)

Test whether a data value is "missing".

Wraps ibfms() function.

Parameters
r8val- Data value.
Returns
ibfms_c - 1 if r8val is "missing", or 0 otherwise.
Author
J. Ator
Date
2023-04-07

Definition at line 1254 of file bufr_c2f_interface.F90.

References ibfms().

◆ ifbget_c()

recursive integer(c_int) function, public bufr_c2f_interface::ifbget_c ( integer(c_int), intent(in), value  bufr_unit)

Check if there are any more data subsets available within a BUFR message.

Wraps ifbget() function.

Parameters
bufr_unit- Fortran logical unit number
Returns
ifbget_c - Return code
Author
J. Ator
Date
2025-12-09

Definition at line 2687 of file bufr_c2f_interface.F90.

References ifbget().

◆ ifxy_c()

integer(c_int) function, public bufr_c2f_interface::ifxy_c ( character(kind=c_char), dimension(*), intent(in)  cfxy)

Convert an FXY value from its 6 character representation to its WMO bit-wise representation.

Wraps ifxy() function.

Parameters
cfxy- FXY value.
Returns
ifxy_c - WMO bit-wise representation of FXY value.
Author
J. Ator
Date
2023-04-07

Definition at line 1065 of file bufr_c2f_interface.F90.

References ifxy().

◆ igetmxby_c()

integer(c_int) function, public bufr_c2f_interface::igetmxby_c

Get the maximum length of a BUFR message that can be written to an output file.

Wraps igetmxby() function.

Returns
igetmxby_c - Maximum length of a BUFR message that can be written to an output file.
Author
J. Ator
Date
2023-04-07

Definition at line 960 of file bufr_c2f_interface.F90.

References igetmxby().

◆ igetntbi_c()

integer(c_int) function, public bufr_c2f_interface::igetntbi_c ( integer(c_int), intent(in), value  lun,
character(kind=c_char), dimension(*), intent(in)  table_type 
)

Get the next index for storing an entry within an internal DX BUFR table.

Wraps igetntbi() subroutine.

Parameters
lun- File ID.
table_type- Type of internal DX BUFR table ('A', 'B', or 'D')
Returns
igetntbi_c - Next available index within table_type.
Author
Ronald McLaren
Date
2022-08-16

Definition at line 996 of file bufr_c2f_interface.F90.

References igetntbi().

◆ igetprm_c()

integer(c_int) function, public bufr_c2f_interface::igetprm_c ( character(kind=c_char), dimension(*), intent(in)  cprmnm)

Get the current value of a parameter.

Wraps igetprm() function.

Parameters
cprmnm- Parameter.
Returns
igetprm_c - Value corresponding to cprmnm, or -1 if not found or other error occurred.
Author
J. Ator
Date
2023-04-07

Definition at line 910 of file bufr_c2f_interface.F90.

References igetprm().

◆ igetsc_c()

recursive integer(c_int) function, public bufr_c2f_interface::igetsc_c ( integer(c_int), intent(in), value  bufr_unit)

Check for an abnormal status code associated with the processing of a file.

Wraps igetsc() function.

Parameters
bufr_unit- Fortran logical unit number
Returns
igetsc_c - Return code
Author
J. Ator
Date
2025-12-09

Definition at line 2704 of file bufr_c2f_interface.F90.

References igetsc().

◆ igettdi_c()

integer(c_int) function, public bufr_c2f_interface::igettdi_c ( integer(c_int), intent(in), value  iflag)

Get the next usable Table D index for the current master table, or reset the index.

Wraps igettdi() function.

Parameters
iflag- if 0, will reset the index.
Returns
igettdi_c - -1 if iflag=0, otherwise the next usable index.
Author
J. Ator
Date
2023-04-07

Definition at line 1319 of file bufr_c2f_interface.F90.

References igettdi().

◆ imrkopr_c()

integer(c_int) function, public bufr_c2f_interface::imrkopr_c ( character(kind=c_char), dimension(*), intent(in)  nemo)

Check whether a specified mnemonic is a Table C marker operator.

Wraps imrkopr() function.

Parameters
nemo- Mnemonic.
Returns
imrkopr_c - 1 if nemo is a Table C marker operator, else 0.
Author
J. Ator
Date
2023-04-07

Definition at line 1105 of file bufr_c2f_interface.F90.

References imrkopr().

◆ invmrg_c()

recursive subroutine, public bufr_c2f_interface::invmrg_c ( integer(c_int), intent(in), value  lubfi,
integer(c_int), intent(in), value  lubfj 
)

Merge parts of data subsets.

Wraps invmrg() subroutine.

Parameters
lubfi- Fortran logical unit number for input file
lubfj- Fortran logical unit number for output file
Author
J. Ator
Date
2025-12-09

Definition at line 2765 of file bufr_c2f_interface.F90.

References invmrg().

◆ ipkm_c()

recursive subroutine, public bufr_c2f_interface::ipkm_c ( character(kind=c_char), dimension(*), intent(out)  cbay,
integer(c_int), intent(in), value  nbyt,
integer(c_int), intent(in), value  ival,
integer(c_int), intent(in), value  cbay_len 
)

Encode an integer into a character string.

Wraps ipkm() subroutine.

Parameters
cbay- Character string
nbyt- Number of bytes of cbay within which to encode ival
ival- Value to encode
cbay_len- Allocated length of cbay
Author
J. Ator
Date
2025-12-09

Definition at line 2804 of file bufr_c2f_interface.F90.

References ipkm().

◆ ireadmg_c()

integer(c_int) function, public bufr_c2f_interface::ireadmg_c ( integer(c_int), intent(in), value  bufr_unit,
character(kind=c_char), dimension(*), intent(out)  c_subset,
integer(c_int), intent(out)  iddate,
integer(c_int), intent(in), value  subset_str_len 
)

Read the next message from a BUFR file.

Wraps ireadmg() function.

Parameters
bufr_unit- Fortran logical unit number to read from
c_subset- Subset string
iddate- Datetime of message
subset_str_len- Length of the subset string
Returns
ireadmg_c - Return code:
  • 0 new BUFR message was successfully read into internal arrays
  • -1 there are no more BUFR messages in bufr_unit
Author
Ronald McLaren
Date
2020-07-29

Definition at line 189 of file bufr_c2f_interface.F90.

References ireadmg().

◆ ireadns_c()

integer(c_int) function, public bufr_c2f_interface::ireadns_c ( integer(c_int), intent(in), value  bufr_unit,
character(kind=c_char), dimension(*), intent(out)  c_subset,
integer(c_int), intent(out)  iddate,
integer(c_int), intent(in), value  subset_str_len 
)

Read the next data subset from a BUFR file.

Wraps ireadns() function.

Parameters
bufr_unit- Fortran logical unit number to read from.
c_subset- Subset string.
iddate- Datetime of message.
subset_str_len- Length of the subset string.
Returns
ireadns_c - Return code:
  • 0 new BUFR data subset was successfully read into internal arrays.
  • -1 there are no more BUFR data subsets in bufr_unit.
Author
J. Ator
Date
2023-04-07

Definition at line 1202 of file bufr_c2f_interface.F90.

References ireadns().

◆ ireadsb_c()

integer(c_int) function, public bufr_c2f_interface::ireadsb_c ( integer(c_int), intent(in), value  bufr_unit)

Read the next data subset from a BUFR message.

Wraps ireadsb() function.

Parameters
bufr_unit- Fortran logical unit number to read from
Returns
ireadsb_c - Return code:
  • 0 new BUFR data subset was successfully read into internal arrays.
  • -1 there are no more BUFR data subsets in the BUFR message associated with bufr_unit
Author
Ronald McLaren
Date
2020-07-29

Definition at line 241 of file bufr_c2f_interface.F90.

References ireadsb().

◆ isetprm_c()

integer(c_int) function, public bufr_c2f_interface::isetprm_c ( character(kind=c_char), dimension(*), intent(in)  cprmnm,
integer(c_int), intent(in), value  ipval 
)

Define a customized parameter value for dynamic allocation.

Wraps isetprm() function.

Parameters
cprmnm- Parameter.
ipval- Value to be set for cprmnm.
Returns
isetprm_c - 0 if successful, or -1 if cprmnm unknown.
Author
J. Ator
Date
2023-04-07

Definition at line 928 of file bufr_c2f_interface.F90.

References isetprm().

◆ istdesc_c()

integer(c_int) function, public bufr_c2f_interface::istdesc_c ( integer(c_int), intent(in), value  idn)

Check whether a descriptor is WMO-standard.

Wraps istdesc() function.

Parameters
idn- WMO bit-wise representation of FXY value for descriptor.
Returns
istdesc_c - 1 if idn is WMO-standard, else 0.
Author
J. Ator
Date
2023-04-07

Definition at line 1122 of file bufr_c2f_interface.F90.

References istdesc().

◆ iupbs01_c()

integer(c_int) function, public bufr_c2f_interface::iupbs01_c ( integer(c_int), dimension(*), intent(in)  bufr,
character(kind=c_char), dimension(*), intent(in)  mnemonic 
)

Read a data value from Section 0 or Section 1 of a BUFR message.

Wraps iupbs01() function.

Parameters
bufr- BUFR message.
mnemonic- Value to be read from Section 0 or Section 1 of BUFR message.
Returns
iupbs01_c - Value corresponding to mnemonic, or -1 if not found or other error occurred.
Author
J. Ator
Date
2023-04-07

Definition at line 882 of file bufr_c2f_interface.F90.

References iupbs01().

◆ iupm_c()

recursive integer(c_int) function, public bufr_c2f_interface::iupm_c ( character(kind=c_char), dimension(*), intent(in)  cbay,
integer(c_int), intent(in), value  nbits,
integer(c_int), intent(in), value  lcbay 
)

Decode an integer from a character string.

Wraps iupm() function.

Parameters
cbay- Character string
nbits- Number of bits to decode from cbay
lcbay- Length of cbay
Returns
iupm_c - Decoded value
Author
J. Ator
Date
2025-12-09

Definition at line 2782 of file bufr_c2f_interface.F90.

References iupm().

◆ iupvs01_c()

recursive integer(c_int) function, public bufr_c2f_interface::iupvs01_c ( integer(c_int), intent(in), value  bufr_unit,
character(kind=c_char), dimension(*), intent(in)  c_s01m 
)

Read a specified value from within Section 0 or 1 of a BUFR message.

Wraps iupvs01() function.

Parameters
bufr_unit- Fortran logical unit number to read from
c_s01m- Mnemonic
Returns
iupvs01_c - Value corresponding to mnemonic
Author
Jeff Ator
Date
2025-11-14

Definition at line 1746 of file bufr_c2f_interface.F90.

References iupvs01().

◆ lcmgdf_c()

recursive integer(c_int) function, public bufr_c2f_interface::lcmgdf_c ( integer(c_int), intent(in), value  bufr_unit,
character(kind=c_char), dimension(*), intent(in)  c_subset 
)

Check if a subset definition contains any long character strings.

Wraps lcmgdf() function.

Parameters
bufr_unit- Fortran logical unit number
c_subset- Table A mnemonic
Returns
lcmgdf_c - Return code
Author
J. Ator
Date
2025-12-03

Definition at line 2459 of file bufr_c2f_interface.F90.

References lcmgdf().

◆ maxout_c()

subroutine, public bufr_c2f_interface::maxout_c ( integer(c_int), intent(in), value  max0)

Define a customized maximum length for output BUFR messages.

Wraps maxout() subroutine.

Parameters
max0- New maximum length (in bytes) for all BUFR messages written to all output files.
Author
J. Ator
Date
2023-04-07

Definition at line 945 of file bufr_c2f_interface.F90.

References maxout().

◆ mesgbc_c()

recursive subroutine, public bufr_c2f_interface::mesgbc_c ( integer(c_int), intent(in), value  lunin,
integer(c_int), intent(out)  mesgtyp,
integer(c_int), intent(out)  icomp 
)

Get information from the first data message in a BUFR file.

Wraps mesgbc() subroutine.

Parameters
lunin- Fortran logical unit number
mesgtyp- Message type
icomp- Compression indicator
Author
J. Ator
Date
2025-12-09

Definition at line 2750 of file bufr_c2f_interface.F90.

References mesgbc().

◆ mesgbf_c()

recursive subroutine, public bufr_c2f_interface::mesgbf_c ( integer(c_int), intent(in), value  lunit,
integer(c_int), intent(out)  mesgtyp 
)

Get information from the first data message in a BUFR file.

Wraps mesgbf() subroutine.

Parameters
lunit- Fortran logical unit number
mesgtyp- Message type
Author
J. Ator
Date
2025-12-09

Definition at line 2734 of file bufr_c2f_interface.F90.

References mesgbf().

◆ minimg_c()

recursive subroutine, public bufr_c2f_interface::minimg_c ( integer(c_int), intent(in), value  bufr_unit,
integer(c_int), intent(in), value  mini 
)

Write a minutes value into Section 1 of a BUFR message.

Wraps minimg() subroutine.

Parameters
bufr_unit- Fortran logical unit number to read from
mini- Minutes value
Author
Jeff Ator
Date
2025-11-18

Definition at line 1849 of file bufr_c2f_interface.F90.

References minimg().

◆ mtinfo_c()

subroutine, public bufr_c2f_interface::mtinfo_c ( character(kind=c_char), dimension(*), intent(in)  path,
integer(c_int), intent(in), value  file_unit_1,
integer(c_int), intent(in), value  file_unit_2 
)

Specify location of master BUFR tables on local file system.

Wraps mtinfo() subroutine.

Parameters
path- Path where the WMO tables are stored
file_unit_1- Number to use for first logical unit
file_unit_2- Number to use for second logical unit
Author
Ronald McLaren
Date
2020-07-29

Definition at line 429 of file bufr_c2f_interface.F90.

References mtinfo().

◆ nemdefs_c()

subroutine, public bufr_c2f_interface::nemdefs_c ( integer(c_int), intent(in), value  file_unit,
character(kind=c_char), dimension(*), intent(in)  mnemonic,
character(kind=c_char), dimension(*), intent(out)  unit_c,
integer(c_int), intent(in), value  unit_str_len,
character(kind=c_char), dimension(*), intent(out)  desc_c,
integer(c_int), intent(in), value  desc_str_len,
integer(c_int), intent(out)  iret 
)

Get the element name and units associated with a Table B mnemonic.

Wraps nemdefs() subroutine.

Parameters
file_unit- Fortran logical unit for the open file.
mnemonic- Mnemonic.
unit_c- Unit string.
unit_str_len- Unit string length.
desc_c- Description string.
desc_str_len- Description string length.
iret- Return value. 0 indicates success -1 indicates failure.
Author
Ronald McLaren
Date
2022-08-08

Definition at line 477 of file bufr_c2f_interface.F90.

References nemdefs().

◆ nemspecs_c()

subroutine, public bufr_c2f_interface::nemspecs_c ( integer(c_int), intent(in), value  file_unit,
character(kind=c_char), dimension(*), intent(in)  mnemonic,
integer(c_int), intent(in), value  mnemonic_idx,
integer(c_int), intent(out)  scale,
integer(c_int), intent(out)  reference,
integer(c_int), intent(out)  bits,
integer(c_int), intent(out)  iret 
)

Get the scale factor, reference value and bit width associated with a specified occurrence of a Table B mnemonic.

Wraps nemspecs() subroutine.

Parameters
file_unit- Fortran logical unit for the open file.
mnemonic- Mnemonic.
mnemonic_idx- Ordinal indicator of specific mnemonic element (if repeated).
scale- Scale of element.
reference- Reference value of element.
bits- Number of bits representing the element.
iret- Return value. 0 indicates success -1 indicates failure.
Author
Ronald McLaren
Date
2022-08-08

Definition at line 521 of file bufr_c2f_interface.F90.

References nemspecs().

◆ nemtab_c()

subroutine, public bufr_c2f_interface::nemtab_c ( integer(c_int), intent(in), value  lun,
character(kind=c_char), dimension(*), intent(in)  mnemonic,
integer(c_int), intent(out)  descriptor,
character(kind=c_char), dimension(*), intent(out)  table_type,
integer(c_int), intent(out)  table_idx 
)

Get information about a descriptor.

Wraps nemtab() subroutine.

Parameters
lun- File ID.
mnemonic- Mnemonic
descriptor- The binary descriptor for the mnemonic
table_type- Type of internal DX BUFR table ('B', 'C', or 'D').
table_idx- The table index, or 0 if not found
Author
Ronald McLaren
Date
2022-08-16

Definition at line 552 of file bufr_c2f_interface.F90.

References nemtab().

◆ nemtbb_c()

subroutine, public bufr_c2f_interface::nemtbb_c ( integer(c_int), intent(in), value  lun,
integer(c_int), intent(in), value  table_idx,
character(kind=c_char), dimension(*), intent(out)  unit_str,
integer(c_int), intent(in), value  unit_str_len,
integer(c_int), intent(out)  scale,
integer(c_int), intent(out)  reference,
integer(c_int), intent(out)  bits 
)

Get information about a Table B descriptor.

Wraps nemtbb() subroutine.

Parameters
lun- File ID.
table_idx- Table B index.
unit_str- Unit string.
unit_str_len- Unit string length.
scale- Scale of element.
reference- Reference value of element.
bits- Number of bits representing the element.
Author
Ronald McLaren
Date
2022-08-16

Definition at line 588 of file bufr_c2f_interface.F90.

References nemtbb().

◆ nmsub_c()

recursive integer(c_int) function, public bufr_c2f_interface::nmsub_c ( integer(c_int), intent(in), value  bufr_unit)

Get the total number of data subsets available within a BUFR message.

Wraps nmsub() function.

Parameters
bufr_unit- Fortran logical unit number to read from
Returns
nmsub_c - Number of data subsets
Author
Jeff Ator
Date
2025-11-14

Definition at line 1773 of file bufr_c2f_interface.F90.

References nmsub().

◆ numtbd_c()

subroutine, public bufr_c2f_interface::numtbd_c ( integer(c_int), intent(in), value  lun,
integer(c_int), intent(in), value  idn,
character(kind=c_char), dimension(*), intent(out)  nemo,
integer(c_int), intent(in), value  nemo_str_len,
character(kind=c_char), dimension(*), intent(out)  tab,
integer(c_int), intent(out)  iret 
)

Search for a Table B or Table D descriptor within the internal DX BUFR tables.

Wraps numtbd() subroutine.

Parameters
lun- File ID.
idn- WMO bit-wise representation of FXY value.
nemo- Mnemonic.
nemo_str_len- Length of nemo string.
tab- Type of internal DX BUFR table ('B', or 'D').
iret- Positional index of idn within Table B or D, or 0 if not found.
Author
J. Ator
Date
2003-11-04

Definition at line 1041 of file bufr_c2f_interface.F90.

References numtbd().

◆ open_c()

subroutine, public bufr_c2f_interface::open_c ( integer(c_int), intent(in), value  lunit,
character(kind=c_char)  filepath 
)

Open a Fortran file from a C program.

Parameters
lunit- Fortran logical unit
filepath- Path to the file we want to open.
Author
Ronald McLaren
Date
2020-07-29

Definition at line 109 of file bufr_c2f_interface.F90.

◆ openbf_c()

recursive subroutine, public bufr_c2f_interface::openbf_c ( integer(c_int), intent(in), value  bufr_unit,
character(kind=c_char), dimension(*), intent(in)  cio,
integer(c_int), intent(in), value  table_file_id 
)

Connect a new file to the library, or initialize the library, or change verbosity associated with already-connected file.

Wraps openbf() subroutine.

Parameters
bufr_unit- Fortran logical unit number
cio- cio string
table_file_id- table_file unit number
Author
Ronald McLaren
Date
2020-07-29

Definition at line 137 of file bufr_c2f_interface.F90.

References openbf().

◆ openmb_c()

recursive subroutine, public bufr_c2f_interface::openmb_c ( integer(c_int), intent(in), value  bufr_unit,
character(kind=c_char), dimension(*), intent(in)  c_subset,
integer(c_int), intent(in), value  iddate 
)

Open a new message for output in a BUFR file that was previously opened for writing.

Wraps openmb() subroutine.

Parameters
bufr_unit- Fortran logical unit number to write to.
c_subset- Table A mnemonic of message.
iddate- Date-time to be stored within Section 1 of message.
Author
J. Ator
Date
2023-04-07

Definition at line 1374 of file bufr_c2f_interface.F90.

References openmb().

◆ openmg_c()

recursive subroutine, public bufr_c2f_interface::openmg_c ( integer(c_int), intent(in), value  bufr_unit,
character(kind=c_char), dimension(*), intent(in)  c_subset,
integer(c_int), intent(in), value  iddate 
)

Open a new message for output in a BUFR file that was previously opened for writing.

Wraps openmg() subroutine.

Parameters
bufr_unit- Fortran logical unit number to write to.
c_subset- Table A mnemonic of message.
iddate- Date-time to be stored within Section 1 of message.
Author
J. Ator
Date
2025-10-20

Definition at line 1401 of file bufr_c2f_interface.F90.

References openmg().

◆ pkbs1_c()

recursive subroutine, public bufr_c2f_interface::pkbs1_c ( integer(c_int), intent(in), value  ival,
integer(c_int), dimension(*), intent(inout)  mbay,
character(kind=c_char), dimension(*), intent(in)  c_s1m 
)

Specify a value to be written into Section 1 of a BUFR message.

Wraps pkbs1() subroutine.

Parameters
ival- Value corresponding to mnemonic
mbay- BUFR message
c_s1m- Mnemonic
Author
Jeff Ator
Date
2025-11-18

Definition at line 1890 of file bufr_c2f_interface.F90.

References pkbs1().

◆ pktdd_c()

subroutine, public bufr_c2f_interface::pktdd_c ( integer(c_int), intent(in), value  id,
integer(c_int), intent(in), value  lun,
integer(c_int), intent(in), value  idn,
integer(c_int), intent(out)  iret 
)

Store information about a child mnemonic within the internal arrays.

Wraps pktdd() subroutine.

Parameters
id- Index of parent mnemonic within internal BUFR Table D array.
lun- File ID.
idn- WMO bit-wise representation of FXY value corresponding to child mnemonic; set to 0 to delete all child mnemonic information.
iret- 0 if idn=0; -1 if error occurred; otherwise, the total number of child mnemonics stored so far for parent mnemonic id.
Author
J. Ator
Date
2023-04-07

Definition at line 1339 of file bufr_c2f_interface.F90.

References pktdd().

◆ pkvs01_c()

recursive subroutine, public bufr_c2f_interface::pkvs01_c ( character(kind=c_char), dimension(*), intent(in)  c_s01m,
integer(c_int), intent(in), value  ival 
)

Specify a value to be written into Section 0 or 1 of all future BUFR messages.

Wraps pkvs01() subroutine.

Parameters
c_s01m- Mnemonic
ival- Value corresponding to mnemonic
Author
Jeff Ator
Date
2025-11-14

Definition at line 1789 of file bufr_c2f_interface.F90.

References pkvs01().

◆ rdmemm_c()

recursive subroutine, public bufr_c2f_interface::rdmemm_c ( integer(c_int), intent(in), value  imsg,
character(kind=c_char), dimension(*), intent(out)  c_subset,
integer(c_int), intent(out)  jdate,
integer(c_int), intent(in), value  subset_str_len,
integer(c_int), intent(out)  ires 
)

Read a specified message from internal arrays.

Wraps rdmemm() subroutine.

Parameters
imsg- Number of BUFR message to be read
c_subset- Subset string
jdate- Datetime of message
subset_str_len- Length of the subset string
ires- Return code
Author
Jeff Ator
Date
2025-12-01

Definition at line 2196 of file bufr_c2f_interface.F90.

References rdmemm().

◆ rdmems_c()

recursive subroutine, public bufr_c2f_interface::rdmems_c ( integer(c_int), intent(in), value  isub,
integer(c_int), intent(out)  ires 
)

Read a specified data subset from internal arrays.

Wraps rdmems() subroutine.

Parameters
isub- Number of data subset to be read
ires- Return code
Author
Jeff Ator
Date
2025-12-01

Definition at line 2217 of file bufr_c2f_interface.F90.

References rdmems().

◆ rdmgsb_c()

recursive subroutine, public bufr_c2f_interface::rdmgsb_c ( integer(c_int), intent(in), value  lunit,
integer(c_int), intent(in), value  imsg,
integer(c_int), intent(in), value  isub 
)

Read a specified data subset from a BUFR file.

Wraps rdmgsb() subroutine.

Parameters
lunit- Fortran logical unit for BUFR file
imsg- Message number
isub- Subset number
Author
J. Ator
Date
2025-11-25

Definition at line 2101 of file bufr_c2f_interface.F90.

References rdmgsb().

◆ readerme_c()

recursive subroutine, public bufr_c2f_interface::readerme_c ( integer(c_int), dimension(*), intent(in)  mesg,
integer(c_int), intent(in), value  bufr_unit,
character(kind=c_char), dimension(*), intent(out)  c_subset,
integer(c_int), intent(out)  iddate,
integer(c_int), intent(in), value  subset_str_len,
integer(c_int), intent(out)  ires 
)

Read a BUFR message from a memory array.

Wraps readerme() subroutine.

Parameters
mesg- BUFR message
bufr_unit- Fortran logical unit number
c_subset- Subset string
iddate- Datetime of message
subset_str_len- Length of the subset string
ires- Return code
Author
Jeff Ator
Date
2025-11-25

Definition at line 2078 of file bufr_c2f_interface.F90.

References readerme().

◆ readlc_c()

recursive subroutine, public bufr_c2f_interface::readlc_c ( integer(c_int), intent(in), value  lunit,
character(kind=c_char), dimension(*), intent(in)  str_id,
character(kind=c_char), dimension(*), intent(out)  output_str,
integer(c_int), intent(in), value  output_str_len 
)

Get a long string from the BUFR file.

Parameters
lunit- Fortran logical unit.
str_id- Mnemonic for the string for the source field plus the index number (ex: 'IDMN#2')
output_str- The pre-allocated result string
output_str_len- Size of the result string buffer
Author
Ronald McLaren
Date
2023-07-03

Definition at line 801 of file bufr_c2f_interface.F90.

References readlc().

◆ readmg_c()

recursive subroutine, public bufr_c2f_interface::readmg_c ( integer(c_int), intent(in), value  bufr_unit,
character(kind=c_char), dimension(*), intent(out)  c_subset,
integer(c_int), intent(out)  iddate,
integer(c_int), intent(in), value  subset_str_len,
integer(c_int), intent(out)  ires 
)

Read the next message from a BUFR file.

Wraps readmg() subroutine.

Parameters
bufr_unit- Fortran logical unit number to read from
c_subset- Subset string
iddate- Datetime of message
subset_str_len- Length of the subset string
ires- Return code:
  • 0 new BUFR message was successfully read into internal arrays
  • -1 there are no more BUFR messages in bufr_unit
Author
Jeff Ator
Date
2025-08-25

Definition at line 217 of file bufr_c2f_interface.F90.

References readmg().

◆ readns_c()

recursive subroutine, public bufr_c2f_interface::readns_c ( integer(c_int), intent(in), value  bufr_unit,
character(kind=c_char), dimension(*), intent(out)  c_subset,
integer(c_int), intent(out)  iddate,
integer(c_int), intent(in), value  subset_str_len,
integer(c_int), intent(out)  ires 
)

Read the next data subset from a BUFR file.

Wraps readns() subroutine.

Parameters
bufr_unit- Fortran logical unit number to read from
c_subset- Subset string
iddate- Datetime of message
subset_str_len- Length of the subset string
ires- Return code:
  • 0 new BUFR data subset was successfully read into internal arrays
  • -1 there are no more BUFR data subsets in bufr_unit
Author
Jeff Ator
Date
2025-09-05

Definition at line 1231 of file bufr_c2f_interface.F90.

References readns().

◆ readsb_c()

recursive subroutine, public bufr_c2f_interface::readsb_c ( integer(c_int), intent(in), value  bufr_unit,
integer(c_int), intent(out)  ires 
)

Read the next data subset from a BUFR message.

Wraps readsb() subroutine.

Parameters
bufr_unit- Fortran logical unit number to read from
ires- Return code:
  • 0 new BUFR data subset was successfully read into internal arrays
  • -1 there are no more BUFR data subsets in bufr_unit
Author
Jeff Ator
Date
2025-09-05

Definition at line 259 of file bufr_c2f_interface.F90.

References readsb().

◆ rtrcpt_c()

recursive subroutine, public bufr_c2f_interface::rtrcpt_c ( integer(c_int), intent(in), value  lunit,
integer(c_int), intent(out)  iyr,
integer(c_int), intent(out)  imo,
integer(c_int), intent(out)  idy,
integer(c_int), intent(out)  ihr,
integer(c_int), intent(out)  imi,
integer(c_int), intent(out)  iret 
)

Get the tank receipt time from Section 1 of a BUFR message.

Wraps rtrcpt() subroutine.

Parameters
lunit- Fortran logical unit
iyr- Tank receipt year
imo- Tank receipt month
idy- Tank receipt day
ihr- Tank receipt hour
imi- Tank receipt minute
iret- Return code
Author
J. Ator
Date
2025-11-20

Definition at line 1942 of file bufr_c2f_interface.F90.

References rtrcpt().

◆ setvalnb_c()

recursive subroutine, public bufr_c2f_interface::setvalnb_c ( integer(c_int), intent(in), value  bufr_unit,
character(kind=c_char), dimension(*), intent(in)  c_tagpv,
integer(c_int), intent(in), value  ntagpv,
character(kind=c_char), dimension(*), intent(in)  c_tagnb,
integer(c_int), intent(in), value  ntagnb,
real(c_double), intent(in), value  r8val,
integer(c_int), intent(out)  ires 
)

Write a data value corresponding to a specific occurrence of a mnemonic.

Wraps setvalnb() subroutine.

Parameters
bufr_unit- Fortran logical unit number
c_tagpv- Pivot mnemonic
ntagpv- Ordinal occurrence of c_tagpv to search for
c_tagnb- Nearby mnemonic
ntagnb- Ordinal occurrence of c_tagnb to search for
r8val- Value to be stored
ires- Return code
Author
J. Ator
Date
2025-12-05

Definition at line 2490 of file bufr_c2f_interface.F90.

References setvalnb().

◆ status_c()

recursive subroutine, public bufr_c2f_interface::status_c ( integer(c_int), intent(in), value  file_unit,
integer(c_int), intent(out)  lun,
integer(c_int), intent(out)  il,
integer(c_int), intent(out)  im 
)

Check whether a file is connected to the library.

Wraps status() subroutine.

Parameters
file_unit- Fortran logical unit number of file.
lun- File ID.
il- File status.
im- Message status.
Author
Ronald McLaren
Date
2022-03-23

Definition at line 455 of file bufr_c2f_interface.F90.

References status().

◆ stdmsg_c()

recursive subroutine, public bufr_c2f_interface::stdmsg_c ( character(kind=c_char), dimension(*), intent(in)  cf)

Specify whether to standardize future output BUFR messages.

Wraps stdmsg() subroutine.

Parameters
cf- Flag indicating whether future BUFR output messages should be WMO-standard
Author
J. Ator
Date
2025-12-02

Definition at line 2321 of file bufr_c2f_interface.F90.

References stdmsg().

◆ stndrd_c()

recursive subroutine, public bufr_c2f_interface::stndrd_c ( integer(c_int), intent(in), value  lunit,
integer(c_int), dimension(*), intent(in)  msgin,
integer(c_int), intent(in), value  lmsgot,
integer(c_int), dimension(*), intent(out)  msgot 
)

Standardize a copy of a BUFR message.

Wraps stndrd() subroutine.

Parameters
lunit- Fortran logical unit for BUFR file
msgin- BUFR message
lmsgot- Allocated length of msgot
msgot- Copy of msgin now fully WMO-standardized
Author
J. Ator
Date
2025-12-02

Definition at line 2339 of file bufr_c2f_interface.F90.

References stndrd().

◆ stntbi_c()

subroutine, public bufr_c2f_interface::stntbi_c ( integer(c_int), intent(in), value  n,
integer(c_int), intent(in), value  lun,
character(kind=c_char), dimension(*), intent(in)  numb,
character(kind=c_char), dimension(*), intent(in)  nemo,
character(kind=c_char), dimension(*), intent(in)  celsq 
)

Store a new entry within the internal BUFR Table B or D.

Wraps stntbi() subroutine.

Parameters
n- Storage index into internal Table B or D.
lun- File ID.
numb- FXY number for new entry.
nemo- Mnemonic corresponding to numb.
celsq- Element or sequence description corresponding to numb.
Author
J. Ator
Date
2023-04-07

Definition at line 1289 of file bufr_c2f_interface.F90.

References stntbi().

◆ strcpt_c()

recursive subroutine, public bufr_c2f_interface::strcpt_c ( character(kind=c_char), dimension(*), intent(in)  cf,
integer(c_int), intent(in), value  iyr,
integer(c_int), intent(in), value  imo,
integer(c_int), intent(in), value  idy,
integer(c_int), intent(in), value  ihr,
integer(c_int), intent(in), value  imi 
)

Specify a tank receipt time to be written into Section 1 of all future BUFR messages.

Wraps strcpt() subroutine.

Parameters
cf- Flag indicating whether future BUFR output messages should include a tank receipt time
iyr- Tank receipt year
imo- Tank receipt month
idy- Tank receipt day
ihr- Tank receipt hour
imi- Tank receipt minute
Author
J. Ator
Date
2025-11-20

Definition at line 1920 of file bufr_c2f_interface.F90.

References strcpt().

◆ strnum_c()

subroutine, public bufr_c2f_interface::strnum_c ( character(kind=c_char), dimension(*), intent(in)  str,
integer(c_int), intent(out)  num,
integer(c_int), intent(out)  iret 
)

Decode an integer from a character string.

Wraps strnum() subroutine.

Parameters
str- String.
num- Value decoded from str.
iret- 0 if successful, -1 otherwise.
Author
J. Ator
Date
2003-11-04

Definition at line 1271 of file bufr_c2f_interface.F90.

References strnum().

◆ ufbcnt_c()

recursive subroutine, public bufr_c2f_interface::ufbcnt_c ( integer(c_int), intent(in), value  lunit,
integer(c_int), intent(out)  kmsg,
integer(c_int), intent(out)  ksub 
)

Get the current location of the file pointer within a BUFR file.

Wraps ufbcnt() subroutine.

Parameters
lunit- Fortran logical unit.
kmsg- Message number
ksub- Subset number
Author
J. Ator
Date
2025-11-05

Definition at line 1540 of file bufr_c2f_interface.F90.

References ufbcnt().

◆ ufbcpy_c()

recursive subroutine, public bufr_c2f_interface::ufbcpy_c ( integer(c_int), intent(in), value  lunin,
integer(c_int), intent(in), value  lunot 
)

Copy a BUFR data subset from one Fortran logical unit to another.

Wraps ufbcpy() subroutine.

Parameters
lunin- Fortran logical unit for source BUFR file
lunot- Fortran logical unit for target BUFR file
Author
J. Ator
Date
2025-11-20

Definition at line 2060 of file bufr_c2f_interface.F90.

References ufbcpy().

◆ ufbcup_c()

recursive subroutine, public bufr_c2f_interface::ufbcup_c ( integer(c_int), intent(in), value  lunin,
integer(c_int), intent(in), value  lunot 
)

Copy unique elements of a data subset from one file to another.

Wraps ufbcup() subroutine.

Parameters
lunin- Fortran logical unit for source BUFR file
lunot- Fortran logical unit for target BUFR file
Author
J. Ator
Date
2025-12-02

Definition at line 2308 of file bufr_c2f_interface.F90.

References ufbcup().

◆ ufbdmp_c()

recursive subroutine, public bufr_c2f_interface::ufbdmp_c ( integer(c_int), intent(in), value  lunit,
integer(c_int), intent(in), value  luprt 
)

Print a verbose listing of the contents of a data subset.

Wraps ufbdmp() subroutine.

Parameters
lunit- Fortran logical unit for BUFR file
luprt- Fortran logical unit for print output
Author
J. Ator
Date
2025-11-20

Definition at line 1988 of file bufr_c2f_interface.F90.

References ufbdmp().

◆ ufbevn_c()

recursive subroutine, public bufr_c2f_interface::ufbevn_c ( integer(c_int), intent(in), value  bufr_unit,
type(c_ptr), intent(out)  c_data,
integer(c_int), intent(in), value  dim_1,
integer(c_int), intent(in), value  dim_2,
integer(c_int), intent(in), value  dim_3,
integer(c_int), intent(out)  iret,
character(kind=c_char), dimension(*), intent(in)  table_b_mnemonic 
)

Read one or more data values from a data subset.

Wraps ufbevn() subroutine.

Parameters
bufr_unit- Fortran logical unit number to read from
c_data- C-style pointer to a pre-allocated buffer
dim_1,dim_2,dim_3- Dimensionality of data to read
iret- Return value, length of data read
table_b_mnemonic- String of mnemonics
Author
J. Ator
Date
2025-11-05

Definition at line 400 of file bufr_c2f_interface.F90.

References ufbevn().

◆ ufbget_c()

recursive subroutine, public bufr_c2f_interface::ufbget_c ( integer(c_int), intent(in), value  bufr_unit,
real(c_double), dimension(*), intent(out)  tab,
integer(c_int), intent(in), value  i1,
integer(c_int), intent(out)  iret,
character(kind=c_char), dimension(*), intent(in)  table_b_mnemonic 
)

Read one or more data values from a data subset without advancing the subset pointer.

Wraps ufbget() subroutine.

Parameters
bufr_unit- Fortran logical unit number to read from
tab- Data values
i1- Allocated length of tab
iret- Return code
table_b_mnemonic- String of mnemonics
Author
Jeff Ator
Date
2025-12-05

Definition at line 2591 of file bufr_c2f_interface.F90.

References ufbget().

◆ ufbint_c()

recursive subroutine, public bufr_c2f_interface::ufbint_c ( integer(c_int), intent(in), value  bufr_unit,
type(c_ptr), intent(inout)  c_data,
integer(c_int), intent(in), value  dim_1,
integer(c_int), intent(in), value  dim_2,
integer(c_int), intent(out)  iret,
character(kind=c_char), dimension(*), intent(in)  table_b_mnemonic 
)

Read/write one or more data values from/to a data subset.

Wraps ufbint() subroutine.

Parameters
bufr_unit- Fortran logical unit number to read from or write to
c_data- C-style pointer to a pre-allocated buffer
dim_1,dim_2- Dimensionality of data to read or write
iret- Return value, length of data read
table_b_mnemonic- String of mnemonics
Author
Ronald McLaren
Date
2020-07-29

Definition at line 307 of file bufr_c2f_interface.F90.

References ufbint().

◆ ufbinx_c()

recursive subroutine, public bufr_c2f_interface::ufbinx_c ( integer(c_int), intent(in), value  bufr_unit,
integer(c_int), intent(in), value  imsg,
integer(c_int), intent(in), value  isub,
type(c_ptr), intent(out)  c_data,
integer(c_int), intent(in), value  dim_1,
integer(c_int), intent(in), value  dim_2,
integer(c_int), intent(out)  iret,
character(kind=c_char), dimension(*), intent(in)  table_b_mnemonic 
)

Read one or more data values from a specified data subset.

Wraps ufbinx() subroutine.

Parameters
bufr_unit- Fortran logical unit number to read from
imsg- Number of BUFR message to be read
isub- Number of data subset to be read from imsg
c_data- C-style pointer to a pre-allocated buffer
dim_1,dim_2- Dimensionality of data to read
iret- Return value, length of data read
table_b_mnemonic- String of mnemonics
Author
Jeff Ator
Date
2025-12-05

Definition at line 2623 of file bufr_c2f_interface.F90.

References ufbinx().

◆ ufbmem_c()

recursive subroutine, public bufr_c2f_interface::ufbmem_c ( integer(c_int), intent(in), value  lunit,
integer(c_int), intent(in), value  inew,
integer(c_int), intent(out)  iret,
integer(c_int), intent(out)  iunit 
)

Read an entire BUFR file into internal arrays.

Wraps ufbmem() subroutine.

Parameters
lunit- Fortran logical unit for BUFR file
inew- Processing option
iret- Number of BUFR messages that were read and stored into internal arrays
iunit- File status
Author
J. Ator
Date
2025-11-25

Definition at line 2117 of file bufr_c2f_interface.F90.

References ufbmem().

◆ ufbmex_c()

recursive subroutine, public bufr_c2f_interface::ufbmex_c ( integer(c_int), intent(in), value  lunit,
integer(c_int), intent(in), value  lundx,
integer(c_int), intent(in), value  inew,
integer(c_int), intent(out)  iret,
integer(c_int), dimension(*), intent(out)  mesg 
)

Read an entire BUFR file into internal arrays.

Wraps ufbmex() subroutine.

Parameters
lunit- Fortran logical unit for BUFR file
lundx- Fortran logical unit number containing DX BUFR table information
inew- Processing option
iret- Number of BUFR messages that were read and stored into internal arrays
mesg- Types of BUFR messages that were read and stored into internal arrays
Author
J. Ator
Date
2025-11-25

Definition at line 2135 of file bufr_c2f_interface.F90.

References ufbmex().

◆ ufbmms_c()

recursive subroutine, public bufr_c2f_interface::ufbmms_c ( integer(c_int), intent(in), value  imsg,
integer(c_int), intent(in), value  isub,
character(kind=c_char), dimension(*), intent(out)  c_subset,
integer(c_int), intent(out)  jdate,
integer(c_int), intent(in), value  subset_str_len 
)

Read a specified data subset from internal arrays.

Wraps ufbmms() subroutine.

Parameters
imsg- Number of BUFR message to be read
isub- Number of data subset to be read from imsg
c_subset- Subset string
jdate- Datetime of message
subset_str_len- Length of the subset string
Author
Jeff Ator
Date
2025-12-01

Definition at line 2153 of file bufr_c2f_interface.F90.

References ufbmms().

◆ ufbmns_c()

recursive subroutine, public bufr_c2f_interface::ufbmns_c ( integer(c_int), intent(in), value  irep,
character(kind=c_char), dimension(*), intent(out)  c_subset,
integer(c_int), intent(out)  idate,
integer(c_int), intent(in), value  subset_str_len 
)

Read a specified data subset from internal arrays.

Wraps ufbmns() subroutine.

Parameters
irep- Number of data subset to be read
c_subset- Subset string
idate- Datetime of message
subset_str_len- Length of the subset string
Author
Jeff Ator
Date
2025-12-01

Definition at line 2174 of file bufr_c2f_interface.F90.

References ufbmns().

◆ ufbovr_c()

recursive subroutine, public bufr_c2f_interface::ufbovr_c ( integer(c_int), intent(in), value  bufr_unit,
type(c_ptr), intent(in)  c_data,
integer(c_int), intent(in), value  dim_1,
integer(c_int), intent(in), value  dim_2,
integer(c_int), intent(out)  iret,
character(kind=c_char), dimension(*), intent(in)  table_b_mnemonic 
)

Overwrite one or more data values within a data subset.

Wraps ufbovr() subroutine.

Parameters
bufr_unit- Fortran logical unit number to write to
c_data- C-style pointer to a pre-allocated buffer
dim_1,dim_2- Dimensionality of data to write
iret- Return value, length of data written
table_b_mnemonic- String of mnemonics
Author
Jeff Ator
Date
2025-12-05

Definition at line 2656 of file bufr_c2f_interface.F90.

References ufbovr().

◆ ufbpos_c()

recursive subroutine, public bufr_c2f_interface::ufbpos_c ( integer(c_int), intent(in), value  bufr_unit,
integer(c_int), intent(in), value  irec,
integer(c_int), intent(in), value  isub,
character(kind=c_char), dimension(*), intent(out)  c_subset,
integer(c_int), intent(out)  iddate,
integer(c_int), intent(in), value  subset_str_len 
)

Jump forwards or backwards to a specified data subset within a BUFR file.

Wraps ufbpos() subroutine.

Parameters
bufr_unit- Fortran logical unit number to read from
irec- Ordinal number of message to be read
isub- Ordinal number of subset to be read from (irec)th message
c_subset- Subset string
iddate- Datetime of message
subset_str_len- Length of the subset string
Author
Jeff Ator
Date
2025-11-13

Definition at line 1712 of file bufr_c2f_interface.F90.

References ufbpos().

◆ ufbqcd_c()

recursive subroutine, public bufr_c2f_interface::ufbqcd_c ( integer(c_int), intent(in), value  lunit,
character(kind=c_char), dimension(*), intent(in)  cnemo,
integer(c_int), intent(out)  iqcd 
)

Return a prepbufr program code corresponding to a mnemonic.

Wraps ufbqcd() subroutine.

Parameters
lunit- Fortran logical unit.
cnemo- Mnemonic
iqcd- Y value of descriptor associated with mnemonic
Author
J. Ator
Date
2025-11-05

Definition at line 1556 of file bufr_c2f_interface.F90.

References ufbqcd().

◆ ufbqcp_c()

recursive subroutine, public bufr_c2f_interface::ufbqcp_c ( integer(c_int), intent(in), value  lunit,
integer(c_int), intent(in), value  iqcp,
character(kind=c_char), dimension(*), intent(out)  cnemo,
integer(c_int), intent(in), value  cnemo_len 
)

Return a mnemonic corresponding to a prepbufr program code.

Wraps ufbqcp() subroutine.

Parameters
lunit- Fortran logical unit.
iqcp- Y value of a Category 63 Table D descriptor
cnemo- Mnemonic associated with iqcp
cnemo_len- Allocated length of cnemo string
Author
J. Ator
Date
2025-11-05

Definition at line 1583 of file bufr_c2f_interface.F90.

References ufbqcp().

◆ ufbrep_c()

recursive subroutine, public bufr_c2f_interface::ufbrep_c ( integer(c_int), intent(in), value  bufr_unit,
type(c_ptr), intent(inout)  c_data,
integer(c_int), intent(in), value  dim_1,
integer(c_int), intent(in), value  dim_2,
integer(c_int), intent(out)  iret,
character(kind=c_char), dimension(*), intent(in)  table_b_mnemonic 
)

Read/write one or more data values from/to a data subset.

Wraps ufbrep() subroutine.

Parameters
bufr_unit- Fortran logical unit number to read from or write to
c_data- C-style pointer to a pre-allocated buffer
dim_1,dim_2- Dimensionality of data to read or write
iret- Return value, length of data read
table_b_mnemonic- String of mnemonics
Author
Ronald McLaren
Date
2020-07-29

Definition at line 338 of file bufr_c2f_interface.F90.

References ufbrep().

◆ ufbrms_c()

recursive subroutine, public bufr_c2f_interface::ufbrms_c ( integer(c_int), intent(in), value  imsg,
integer(c_int), intent(in), value  isub,
type(c_ptr), intent(out)  c_data,
integer(c_int), intent(in), value  dim_1,
integer(c_int), intent(in), value  dim_2,
integer(c_int), intent(out)  iret,
character(kind=c_char), dimension(*), intent(in)  table_b_mnemonic 
)

Read one or more data values from internal arrays.

Wraps ufbrms() subroutine.

Parameters
imsg- Number of BUFR message to be read
isub- Number of data subset to be read from imsg
c_data- C-style pointer to a pre-allocated buffer
dim_1,dim_2- Dimensionality of data to read
iret- Return value, length of data read
table_b_mnemonic- String of mnemonics
Author
Jeff Ator
Date
2025-12-01

Definition at line 2236 of file bufr_c2f_interface.F90.

References ufbrms().

◆ ufbseq_c()

recursive subroutine, public bufr_c2f_interface::ufbseq_c ( integer(c_int), intent(in), value  bufr_unit,
type(c_ptr), intent(inout)  c_data,
integer(c_int), intent(in), value  dim_1,
integer(c_int), intent(in), value  dim_2,
integer(c_int), intent(out)  iret,
character(kind=c_char), dimension(*), intent(in)  table_d_mnemonic 
)

Read/write an entire sequence of data values from/to a data subset.

Wraps ufbseq() subroutine.

Parameters
bufr_unit- Fortran logical unit number to read from or write to
c_data- C-style pointer to a pre-allocated buffer
dim_1,dim_2- Dimensionality of data to read or write
iret- Return value, length of data read
table_d_mnemonic- Table A or Table D mnemonic.
Author
J. Ator
Date
2023-04-07

Definition at line 1168 of file bufr_c2f_interface.F90.

References ufbseq().

◆ ufbstp_c()

recursive subroutine, public bufr_c2f_interface::ufbstp_c ( integer(c_int), intent(in), value  bufr_unit,
type(c_ptr), intent(inout)  c_data,
integer(c_int), intent(in), value  dim_1,
integer(c_int), intent(in), value  dim_2,
integer(c_int), intent(out)  iret,
character(kind=c_char), dimension(*), intent(in)  table_b_mnemonic 
)

Read/write one or more data values from/to a data subset.

Wraps ufbstp() subroutine.

Parameters
bufr_unit- Fortran logical unit number to read from or write to
c_data- C-style pointer to a pre-allocated buffer
dim_1,dim_2- Dimensionality of data to read or write
iret- Return value, length of data read
table_b_mnemonic- String of mnemonics
Author
J. Ator
Date
2025-10-24

Definition at line 369 of file bufr_c2f_interface.F90.

References ufbstp().

◆ ufbtab_c()

recursive subroutine, public bufr_c2f_interface::ufbtab_c ( integer(c_int), intent(in), value  bufr_unit,
type(c_ptr), intent(out)  c_data,
integer(c_int), intent(in), value  dim_1,
integer(c_int), intent(in), value  dim_2,
integer(c_int), intent(inout)  iret,
character(kind=c_char), dimension(*), intent(in)  table_b_mnemonic 
)

Read one or more data values from every data subset in a BUFR file.

Wraps ufbtab() subroutine.

Parameters
bufr_unit- Fortran logical unit number to read from
c_data- C-style pointer to a pre-allocated buffer
dim_1,dim_2- Dimensionality of data to read
iret- Return value, number of data subsets read
table_b_mnemonic- String of mnemonics to read from each data subset
Author
J. Ator
Date
2025-11-13

Definition at line 1679 of file bufr_c2f_interface.F90.

References ufbtab().

◆ ufbtam_c()

recursive subroutine, public bufr_c2f_interface::ufbtam_c ( type(c_ptr), intent(out)  c_data,
integer(c_int), intent(in), value  dim_1,
integer(c_int), intent(in), value  dim_2,
integer(c_int), intent(out)  iret,
character(kind=c_char), dimension(*), intent(in)  table_b_mnemonic 
)

Read one or more data values from every data subset in internal arrays.

Wraps ufbtam() subroutine.

Parameters
c_data- C-style pointer to a pre-allocated buffer
dim_1,dim_2- Dimensionality of data to read
iret- Return value, number of data subsets read
table_b_mnemonic- String of mnemonics to read from each data subset
Author
J. Ator
Date
2025-12-01

Definition at line 2266 of file bufr_c2f_interface.F90.

References ufbtam().

◆ ufdump_c()

recursive subroutine, public bufr_c2f_interface::ufdump_c ( integer(c_int), intent(in), value  lunit,
integer(c_int), intent(in), value  luprt 
)

Print a verbose listing of the contents of a data subset.

Wraps ufdump() subroutine.

Parameters
lunit- Fortran logical unit for BUFR file
luprt- Fortran logical unit for print output
Author
J. Ator
Date
2025-11-20

Definition at line 2002 of file bufr_c2f_interface.F90.

References ufdump().

◆ upds3_c()

recursive subroutine, public bufr_c2f_interface::upds3_c ( integer(c_int), dimension(*), intent(in)  mbay,
integer(c_int), intent(in), value  lcds3,
character(kind=c_char), dimension(6,*), intent(out)  ccds3,
integer(c_int), intent(out)  nds3 
)

Get the sequence of data descriptors contained within Section 3 of a BUFR message.

Wraps upds3() subroutine.

Parameters
mbay- BUFR message
lcds3- Allocated length of cds3
ccds3- Data descriptor sequence within Section 3 of mbay
nds3- Number of descriptors returned in cds3
Author
Jeff Ator
Date
2025-11-18

Definition at line 1865 of file bufr_c2f_interface.F90.

References upds3().

◆ upftbv_c()

recursive subroutine, public bufr_c2f_interface::upftbv_c ( integer(c_int), intent(in), value  lunit,
character(kind=c_char), dimension(*), intent(in)  cnemo,
real(c_double), intent(in), value  val,
integer(c_int), dimension(*), intent(out)  ibit,
integer(c_int), intent(in), value  mxib,
integer(c_int), intent(out)  nib 
)

Get the bit settings equivalent to a given numerical value for a flag table mnemonic.

Wraps upftbv() subroutine.

Parameters
lunit- Fortran logical unit.
cnemo- Mnemonic with flag table units
val- Value corresponding to cnemo
ibit- Bit numbers which were set to "On" in val
mxib- Allocated size of ibit
nib- Number of bit numbers returned in ibit
Author
J. Ator
Date
2025-11-05

Definition at line 1650 of file bufr_c2f_interface.F90.

References upftbv().

◆ uptdd_c()

subroutine, public bufr_c2f_interface::uptdd_c ( integer(c_int), intent(in), value  id,
integer(c_int), intent(in), value  lun,
integer(c_int), intent(in), value  ient,
integer(c_int), intent(out)  iret 
)

Get the WMO bit-wise representation of the FXY value corresponding to a child mnemonic of a Table D sequence.

Wraps uptdd() subroutine.

Parameters
id- Positional index of parent mnemonic within internal BUFR Table D array.
lun- File ID.
ient- Ordinal indicator of child mnemonic to return from within parent sequence; set to 0 to request a count of the total number of child mnemonics.
iret- Total number of child mnemonics if ient = 0; otherwise the WMO bit-wise representation of the FXY value corresponding to the ient'th mnemonic.
Author
J. Ator
Date
2023-04-07

Definition at line 1089 of file bufr_c2f_interface.F90.

References uptdd().

◆ wrdxtb_c()

recursive subroutine, public bufr_c2f_interface::wrdxtb_c ( integer(c_int), intent(in), value  lundx,
integer(c_int), intent(in), value  lunot 
)

Generate DX BUFR table messages and write them to a output file.

Wraps wrdxtb() subroutine.

Parameters
lundx- Fortran logical unit number containing DX BUFR table information
lunot- Fortran logical unit number to write to
Author
J. Ator
Date
2025-12-09

Definition at line 2720 of file bufr_c2f_interface.F90.

References wrdxtb().

◆ writlc_c()

recursive subroutine, public bufr_c2f_interface::writlc_c ( integer(c_int), intent(in), value  lunit,
character(kind=c_char), dimension(*), intent(in)  str,
character(kind=c_char), dimension(*), intent(in)  chr 
)

Write a long string to the BUFR file.

Parameters
lunit- Fortran logical unit.
str- Mnemonic for the string for the source field plus the index number (ex: 'IDMN#2')
chr- Value corresponding to str
Author
Jeff Ator
Date
2025-10-24

Definition at line 831 of file bufr_c2f_interface.F90.

References writlc().

◆ writsa_c()

recursive subroutine, public bufr_c2f_interface::writsa_c ( integer(c_int), intent(in), value  bufr_unit,
integer(c_int), intent(in), value  bufr_len,
integer(c_int), dimension(*), intent(out)  bufr,
integer(c_int), intent(out)  nbufr 
)

Write the next data subset to a BUFR message, and return a copy of any completed message.

Wraps writsa() subroutine.

Parameters
bufr_unit- Fortran logical unit number to write to
bufr_len- Allocated length of bufr array
bufr- BUFR message
nbufr- Number of integers returned in bufr array, or 0 if no message was returned
Author
Jeff Ator
Date
2025-10-20

Definition at line 289 of file bufr_c2f_interface.F90.

References writsa().

◆ writsb_c()

recursive subroutine, public bufr_c2f_interface::writsb_c ( integer(c_int), intent(in), value  bufr_unit)

Write the next data subset to a BUFR message.

Wraps writsb() subroutine.

Parameters
bufr_unit- Fortran logical unit number to write to
Author
Jeff Ator
Date
2025-10-20

Definition at line 273 of file bufr_c2f_interface.F90.

References writsb().