23 public ::
open_c,
close_c,
openbf_c,
closbf_c,
exitbufr_c,
bort_c,
readmg_c,
readsb_c,
readns_c,
ireadmg_c,
ireadsb_c
30 public ::
upftbv_c,
ufbtab_c,
ufbpos_c,
datelen_c,
iupvs01_c,
nmsub_c,
pkvs01_c,
datebf_c,
dumpbf_c,
minimg_c,
upds3_c
31 public ::
pkbs1_c,
strcpt_c,
rtrcpt_c,
atrcpt_c,
dxdump_c,
ufbdmp_c,
ufdump_c,
copybf_c,
copymg_c,
copysb_c,
ufbcpy_c
37 integer,
allocatable,
target,
save :: isc_f(:), link_f(:), itp_f(:), jmpb_f(:), irf_f(:)
38 character(len=10),
allocatable,
target,
save :: tag_f(:)
39 character(len=3),
allocatable,
target,
save :: typ_f(:)
50 function get_c_string_length(c_str)
result(nchars)
51 character(kind=c_char, len=1),
intent(in) :: c_str(*)
55 do while (c_str(nchars) /= c_null_char)
59 end function get_c_string_length
71 function c_f_string(c_str)
result(f_str)
72 character(kind=c_char, len=1),
intent(in) :: c_str(*)
73 character(len=:),
allocatable :: f_str
76 nchars = get_c_string_length(c_str)
78 allocate(
character(len=nchars) :: f_str)
79 f_str = transfer(c_str(1:nchars), f_str)
80 end function c_f_string
89 subroutine copy_f_c_str(f_str, c_str, c_str_len)
90 character(len=*),
intent(in) :: f_str
91 character(kind=c_char),
intent(inout) :: c_str(*)
92 integer,
intent(in) :: c_str_len
95 if (c_str_len /= 0)
then
97 c_str(ii) = f_str(ii:ii)
99 c_str(c_str_len) = c_null_char
101 end subroutine copy_f_c_str
109 subroutine open_c(lunit, filepath) bind(C, name='open_f')
110 integer(c_int),
value,
intent(in) :: lunit
111 character(kind=c_char) :: filepath
113 open(lunit, file=c_f_string(filepath))
121 subroutine close_c(lunit) bind(C, name='close_f')
122 integer(c_int),
value,
intent(in) :: lunit
137 recursive subroutine openbf_c(bufr_unit, cio, table_file_id) bind(C, name='openbf_f')
138 integer(c_int),
value,
intent(in) :: bufr_unit, table_file_id
139 character(kind=c_char),
intent(in) :: cio(*)
140 character(len=5) :: io
143 lio = get_c_string_length(cio)
148 io = transfer(cio(1:lio), io)
150 call openbf(bufr_unit, io(1:lio), table_file_id)
160 recursive subroutine closbf_c(bufr_unit) bind(C, name='closbf_f')
161 integer(c_int),
value,
intent(in) :: bufr_unit
189 function ireadmg_c(bufr_unit, c_subset, iddate, subset_str_len)
result(ires) bind(C, name='ireadmg_f')
190 integer(c_int),
value,
intent(in) :: bufr_unit, subset_str_len
191 character(kind=c_char),
intent(out) :: c_subset(*)
192 integer(c_int),
intent(out) :: iddate
193 integer(c_int) :: ires
194 character(len=25) :: f_subset
197 ires =
ireadmg(bufr_unit, f_subset, iddate)
200 call copy_f_c_str(f_subset, c_subset, subset_str_len)
217 recursive subroutine readmg_c(bufr_unit, c_subset, iddate, subset_str_len, ires) bind(C, name='readmg_f')
218 integer(c_int),
value,
intent(in) :: bufr_unit, subset_str_len
219 character(kind=c_char),
intent(out) :: c_subset(*)
220 integer(c_int),
intent(out) :: iddate, ires
221 character(len=25) :: f_subset
223 call readmg(bufr_unit, f_subset, iddate, ires)
226 call copy_f_c_str(f_subset, c_subset, subset_str_len)
241 function ireadsb_c(bufr_unit)
result(ires) bind(C, name='ireadsb_f')
242 integer(c_int),
value,
intent(in) :: bufr_unit
243 integer(c_int) :: ires
259 recursive subroutine readsb_c(bufr_unit, ires) bind(C, name='readsb_f')
260 integer(c_int),
value,
intent(in) :: bufr_unit
261 integer(c_int),
intent(out) :: ires
263 call readsb(bufr_unit, ires)
273 recursive subroutine writsb_c(bufr_unit) bind(C, name='writsb_f')
274 integer(c_int),
value,
intent(in) :: bufr_unit
289 recursive subroutine writsa_c(bufr_unit, bufr_len, bufr, nbufr) bind(C, name='writsa_f')
290 integer(c_int),
value,
intent(in) :: bufr_unit, bufr_len
291 integer(c_int),
intent(out) :: bufr(*), nbufr
293 call writsa(bufr_unit, bufr_len, bufr, nbufr)
307 recursive subroutine ufbint_c(bufr_unit, c_data, dim_1, dim_2, iret, table_b_mnemonic) bind(C, name='ufbint_f')
308 integer(c_int),
value,
intent(in) :: bufr_unit, dim_1, dim_2
309 type(c_ptr),
intent(inout) :: c_data
310 integer(c_int),
intent(out) :: iret
311 character(kind=c_char),
intent(in) :: table_b_mnemonic(*)
312 character(len=90) :: str
313 real,
pointer :: f_data
316 lstr = get_c_string_length(table_b_mnemonic)
321 str = transfer(table_b_mnemonic(1:lstr), str)
323 call c_f_pointer(c_data, f_data)
324 call ufbint(bufr_unit, f_data, dim_1, dim_2, iret, str(1:lstr))
338 recursive subroutine ufbrep_c(bufr_unit, c_data, dim_1, dim_2, iret, table_b_mnemonic) bind(C, name='ufbrep_f')
339 integer(c_int),
value,
intent(in) :: bufr_unit, dim_1, dim_2
340 type(c_ptr),
intent(inout) :: c_data
341 integer(c_int),
intent(out) :: iret
342 character(kind=c_char),
intent(in) :: table_b_mnemonic(*)
343 character(len=90) :: str
344 real,
pointer :: f_data
347 lstr = get_c_string_length(table_b_mnemonic)
352 str = transfer(table_b_mnemonic(1:lstr), str)
354 call c_f_pointer(c_data, f_data)
355 call ufbrep(bufr_unit, f_data, dim_1, dim_2, iret, str(1:lstr))
369 recursive subroutine ufbstp_c(bufr_unit, c_data, dim_1, dim_2, iret, table_b_mnemonic) bind(C, name='ufbstp_f')
370 integer(c_int),
value,
intent(in) :: bufr_unit, dim_1, dim_2
371 type(c_ptr),
intent(inout) :: c_data
372 integer(c_int),
intent(out) :: iret
373 character(kind=c_char),
intent(in) :: table_b_mnemonic(*)
374 character(len=90) :: str
375 real,
pointer :: f_data
378 lstr = get_c_string_length(table_b_mnemonic)
383 str = transfer(table_b_mnemonic(1:lstr), str)
385 call c_f_pointer(c_data, f_data)
386 call ufbstp(bufr_unit, f_data, dim_1, dim_2, iret, str(1:lstr))
400 recursive subroutine ufbevn_c(bufr_unit, c_data, dim_1, dim_2, dim_3, iret, table_b_mnemonic) bind(C, name='ufbevn_f')
401 integer(c_int),
value,
intent(in) :: bufr_unit, dim_1, dim_2, dim_3
402 type(c_ptr),
intent(out) :: c_data
403 integer(c_int),
intent(out) :: iret
404 character(kind=c_char),
intent(in) :: table_b_mnemonic(*)
405 character(len=90) :: str
406 real,
pointer :: f_data
409 lstr = get_c_string_length(table_b_mnemonic)
414 str = transfer(table_b_mnemonic(1:lstr), str)
416 call c_f_pointer(c_data, f_data)
417 call ufbevn(bufr_unit, f_data, dim_1, dim_2, dim_3, iret, str(1:lstr))
429 subroutine mtinfo_c(path, file_unit_1, file_unit_2) bind(C, name='mtinfo_f')
430 character(kind=c_char),
intent(in) :: path(*)
431 integer(c_int),
value,
intent(in) :: file_unit_1, file_unit_2
432 character(len=240) :: mtdir
435 lmtdir = get_c_string_length(path)
436 if (lmtdir == 0)
then
440 mtdir = transfer(path(1:lmtdir), mtdir)
442 call mtinfo(mtdir(1:lmtdir), file_unit_1, file_unit_2)
455 recursive subroutine status_c(file_unit, lun, il, im) bind(C, name='status_f')
456 integer(c_int),
value,
intent(in) :: file_unit
457 integer(c_int),
intent(out) :: lun
458 integer(c_int),
intent(out) :: il
459 integer(c_int),
intent(out) :: im
461 call status(file_unit, lun, il, im)
477 subroutine nemdefs_c(file_unit, mnemonic, unit_c, unit_str_len, desc_c, desc_str_len, iret) &
478 bind(c, name=
'nemdefs_f')
479 integer(c_int),
value,
intent(in) :: file_unit, unit_str_len, desc_str_len
480 character(kind=c_char),
intent(in) :: mnemonic(*)
481 character(kind=c_char),
intent(out) :: unit_c(*), desc_c(*)
482 integer(c_int),
intent(out) :: iret
483 character(len=25) :: unit_f
484 character(len=55) :: desc_f
485 character(len=10) :: tag
488 ltag = get_c_string_length(mnemonic)
493 tag = transfer(mnemonic(1:ltag), tag)
497 call nemdefs ( file_unit, tag(1:ltag), desc_f, unit_f, iret)
501 call copy_f_c_str(unit_f, unit_c, min(len(unit_f), unit_str_len))
503 call copy_f_c_str(desc_f, desc_c, min(len(desc_f), desc_str_len))
521 subroutine nemspecs_c(file_unit, mnemonic, mnemonic_idx, scale, reference, bits, iret) &
522 bind(c, name=
'nemspecs_f')
523 integer(c_int),
value,
intent(in) :: file_unit, mnemonic_idx
524 character(kind=c_char),
intent(in) :: mnemonic(*)
525 integer(c_int),
intent(out) :: scale, reference, bits, iret
526 character(len=10) :: tag
529 ltag = get_c_string_length(mnemonic)
534 tag = transfer(mnemonic(1:ltag), tag)
538 call nemspecs(file_unit, tag(1:ltag), mnemonic_idx, scale, reference, bits, iret)
552 subroutine nemtab_c(lun, mnemonic, descriptor, table_type, table_idx) &
553 bind(c, name=
'nemtab_f')
554 integer(c_int),
value,
intent(in) :: lun
555 character(kind=c_char),
intent(in) :: mnemonic(*)
556 integer(c_int),
intent(out) :: descriptor, table_idx
557 character(kind=c_char),
intent(out) :: table_type(*)
558 character(len=1) :: table_type_f
559 character(len=10) :: tag
562 ltag = get_c_string_length(mnemonic)
567 tag = transfer(mnemonic(1:ltag), tag)
570 call nemtab(lun, tag(1:ltag), descriptor, table_type_f, table_idx)
572 table_type(1) = table_type_f(1:1)
588 subroutine nemtbb_c(lun, table_idx, unit_str, unit_str_len, scale, reference, bits) &
589 bind(c, name=
'nemtbb_f')
590 integer(c_int),
intent(in),
value :: lun
591 integer(c_int),
intent(in),
value :: table_idx
592 character(kind=c_char),
intent(out) :: unit_str(*)
593 integer(c_int),
intent(in),
value :: unit_str_len
594 integer(c_int),
intent(out) :: scale
595 integer(c_int),
intent(out) :: reference
596 integer(c_int),
intent(out) :: bits
598 character(len=25) :: unit_str_f
601 call nemtbb( lun, table_idx, unit_str_f, scale, reference, bits)
602 call copy_f_c_str(unit_str_f, unit_str, min(len(unit_str_f), unit_str_len))
611 subroutine get_isc_c(isc_ptr, isc_size) bind(C, name='get_isc_f')
613 type(c_ptr),
intent(inout) :: isc_ptr
614 integer(c_int),
intent(out) :: isc_size
616 allocate(isc_f(
ntab))
618 isc_size =
size(isc_f)
619 isc_ptr = c_loc(isc_f(1))
628 subroutine get_link_c(link_ptr, link_size) bind(C, name='get_link_f')
630 type(c_ptr),
intent(inout) :: link_ptr
631 integer(c_int),
intent(out) :: link_size
633 allocate(link_f(
ntab))
635 link_size =
size(link_f)
636 link_ptr = c_loc(link_f(1))
645 subroutine get_itp_c(itp_ptr, itp_size) bind(C, name='get_itp_f')
647 type(c_ptr),
intent(inout) :: itp_ptr
648 integer(c_int),
intent(out) :: itp_size
650 allocate(itp_f(
ntab))
652 itp_size =
size(itp_f)
653 itp_ptr = c_loc(itp_f(1))
663 subroutine get_typ_c(typ_ptr, typ_len, mem_size) bind(C, name='get_typ_f')
665 type(c_ptr),
intent(inout) :: typ_ptr
666 integer(c_int),
intent(out) :: typ_len
667 integer(c_int),
intent(out) :: mem_size
669 allocate(typ_f(
ntab))
671 typ_len = len(
typ(1))
672 mem_size =
size(typ_f)
673 typ_ptr = c_loc(typ_f(1))
683 subroutine get_tag_c(tag_ptr, tag_len, mem_size) bind(C, name='get_tag_f')
685 type(c_ptr),
intent(inout) :: tag_ptr
686 integer(c_int),
intent(out) :: tag_len
687 integer(c_int),
intent(out) :: mem_size
689 allocate(tag_f(
ntab))
691 tag_len = len(
tag(1))
692 mem_size =
size(tag_f)
693 tag_ptr = c_loc(tag_f(1))
702 subroutine get_jmpb_c(jmpb_ptr, jmpb_size) bind(C, name='get_jmpb_f')
704 type(c_ptr),
intent(inout) :: jmpb_ptr
705 integer(c_int),
intent(out) :: jmpb_size
707 allocate(jmpb_f(
ntab))
709 jmpb_size =
size(jmpb_f)
710 jmpb_ptr = c_loc(jmpb_f(1))
719 subroutine get_irf_c(irf_ptr, irf_size) bind(C, name='get_irf_f')
721 type(c_ptr),
intent(inout) :: irf_ptr
722 integer(c_int),
intent(out) :: irf_size
724 allocate(irf_f(
ntab))
726 irf_size =
size(irf_f)
727 irf_ptr = c_loc(irf_f(1))
736 subroutine get_inode_c(lun, start_node) bind(C, name='get_inode_f')
738 integer(c_int),
value,
intent(in) :: lun
739 integer(c_int),
intent(out) :: start_node
741 start_node =
inode(lun)
750 subroutine get_nval_c(lun, num_nodes) bind(C, name='get_nval_f')
752 integer(c_int),
value,
intent(in) :: lun
753 integer(c_int),
intent(out) :: num_nodes
755 num_nodes =
nval(lun)
765 subroutine get_val_c(lun, val_ptr, val_size) bind(C, name='get_val_f')
767 integer(c_int),
value,
intent(in) :: lun
768 type(c_ptr),
intent(inout) :: val_ptr
769 integer(c_int),
intent(out) :: val_size
771 val_size =
size(
val(:, lun))
772 val_ptr = c_loc(
val(1, lun))
782 subroutine get_inv_c(lun, inv_ptr, inv_size) bind(C, name='get_inv_f')
784 integer(c_int),
value,
intent(in) :: lun
785 type(c_ptr),
intent(inout) :: inv_ptr
786 integer(c_int),
intent(out) :: inv_size
788 inv_size =
size(
inv(:, lun))
789 inv_ptr = c_loc(
inv(1, lun))
801 recursive subroutine readlc_c(lunit, str_id, output_str, output_str_len) bind(C, name='readlc_f')
802 integer(c_int),
value,
intent(in) :: lunit, output_str_len
803 character(kind=c_char),
intent(in) :: str_id(*)
804 character(kind=c_char),
intent(out) :: output_str(*)
805 character(len=256) :: output_str_f
806 character(len=14) :: str
807 integer :: output_str_len_f, lstr
809 lstr = get_c_string_length(str_id)
814 str = transfer(str_id(1:lstr), str)
817 call readlc(lunit, output_str_f, str(1:lstr))
819 output_str_len_f = len(trim(output_str_f)) + 1
820 call copy_f_c_str(output_str_f, output_str, min(output_str_len_f, output_str_len))
831 recursive subroutine writlc_c(lunit, str, chr) bind(C, name='writlc_f')
832 integer(c_int),
value,
intent(in) :: lunit
833 character(kind=c_char),
intent(in) :: str(*), chr(*)
834 character(len=14) :: my_str
835 character(len=255) :: my_chr
836 integer :: lstr, lchr
838 lstr = get_c_string_length(str)
843 my_str = transfer(str(1:lstr), my_str)
846 lchr = get_c_string_length(chr)
851 my_chr = transfer(chr(1:lchr), my_chr)
854 call writlc(lunit, my_chr(1:lchr), my_str(1:lstr))
861 if (
allocated(isc_f))
deallocate(isc_f)
862 if (
allocated(link_f))
deallocate(link_f)
863 if (
allocated(itp_f))
deallocate(itp_f)
864 if (
allocated(typ_f))
deallocate(typ_f)
865 if (
allocated(tag_f))
deallocate(tag_f)
866 if (
allocated(jmpb_f))
deallocate(jmpb_f)
867 if (
allocated(irf_f))
deallocate(irf_f)
882 function iupbs01_c(bufr, mnemonic)
result(ires) bind(C, name='iupbs01_f')
883 integer(c_int),
intent(in) :: bufr(*)
884 character(kind=c_char),
intent(in) :: mnemonic(*)
885 integer(c_int) :: ires
887 character(len=10) :: tag
889 ltag = get_c_string_length(mnemonic)
894 tag = transfer(mnemonic(1:ltag), tag)
897 ires =
iupbs01(bufr,tag(1:ltag))
910 function igetprm_c(cprmnm)
result(ires) bind(C, name='igetprm_f')
911 character(kind=c_char),
intent(in) :: cprmnm(*)
912 integer(c_int) :: ires
915 ires =
igetprm(c_f_string(cprmnm))
928 function isetprm_c(cprmnm,ipval)
result(ires) bind(C, name='isetprm_f')
929 character(kind=c_char),
intent(in) :: cprmnm(*)
930 integer(c_int),
value,
intent(in) :: ipval
931 integer(c_int) :: ires
934 ires =
isetprm(c_f_string(cprmnm),ipval)
946 integer(c_int),
value,
intent(in) :: max0
960 function igetmxby_c()
result(ires) bind(C, name='igetmxby_f')
961 integer(c_int) :: ires
977 subroutine cadn30_c(idn, adn, adn_str_len) bind(C, name='cadn30_f')
978 integer(c_int),
intent(in),
value :: idn, adn_str_len
979 character(kind=c_char),
intent(out) :: adn(*)
980 character(len=8) :: adn_f
983 call copy_f_c_str(adn_f, adn, adn_str_len)
996 function igetntbi_c(lun, table_type)
result(ires) bind(C, name='igetntbi_f')
997 integer(c_int),
value,
intent(in) :: lun
998 character(kind=c_char),
intent(in) :: table_type(*)
999 integer(c_int) :: ires
1001 character(len=1) :: table_type_f
1003 table_type_f(1:1) = table_type(1)(1:1)
1018 integer(c_int),
value,
intent(in) :: lun
1019 character(kind=c_char),
intent(in) :: card(*)
1020 character(len=80) :: card_f
1024 card_f(ii:ii) = card(ii)
1041 subroutine numtbd_c(lun,idn,nemo,nemo_str_len,tab,iret) bind(C, name='numtbd_f')
1042 integer(c_int),
value,
intent(in) :: lun, idn, nemo_str_len
1043 character(kind=c_char),
intent(out) :: nemo(*), tab(*)
1044 integer(c_int),
intent(out) :: iret
1046 character(len=9) :: nemo_f
1047 character(len=1) :: tab_f
1049 call numtbd(lun, idn, nemo_f, tab_f, iret)
1051 call copy_f_c_str(nemo_f, nemo, nemo_str_len)
1065 function ifxy_c(cfxy)
result(ires) bind(C, name='ifxy_f')
1066 character(kind=c_char),
intent(in) :: cfxy(*)
1067 integer(c_int) :: ires
1070 ires =
ifxy(c_f_string(cfxy))
1089 subroutine uptdd_c(id, lun, ient, iret) bind(C, name='uptdd_f')
1090 integer(c_int),
intent(in),
value :: id, lun, ient
1091 integer(c_int),
intent(out) :: iret
1093 call uptdd(id, lun, ient, iret)
1105 function imrkopr_c(nemo)
result(ires) bind(C, name='imrkopr_f')
1106 character(kind=c_char),
intent(in) :: nemo(*)
1107 integer(c_int) :: ires
1110 ires =
imrkopr(c_f_string(nemo))
1122 function istdesc_c(idn)
result(ires) bind(C, name='istdesc_f')
1123 integer(c_int),
intent(in),
value :: idn
1124 integer(c_int) :: ires
1140 recursive subroutine drfini_c(bufr_unit, mdrf, ndrf, table_d_mnemonic) bind(C, name='drfini_f')
1141 integer(c_int),
value,
intent(in) :: bufr_unit, ndrf
1142 integer(c_int),
intent(in) :: mdrf(*)
1143 character(kind=c_char),
intent(in) :: table_d_mnemonic(*)
1144 character(len=12) :: str
1147 lstr = get_c_string_length(table_d_mnemonic)
1152 str = transfer(table_d_mnemonic(1:lstr), str)
1154 call drfini(bufr_unit, mdrf, ndrf, str(1:lstr))
1168 recursive subroutine ufbseq_c(bufr_unit, c_data, dim_1, dim_2, iret, table_d_mnemonic) bind(C, name='ufbseq_f')
1169 integer(c_int),
value,
intent(in) :: bufr_unit, dim_1, dim_2
1170 type(c_ptr),
intent(inout) :: c_data
1171 integer(c_int),
intent(out) :: iret
1172 character(kind=c_char),
intent(in) :: table_d_mnemonic(*)
1173 character(len=90) :: str
1174 real,
pointer :: f_data
1177 lstr = get_c_string_length(table_d_mnemonic)
1182 str = transfer(table_d_mnemonic(1:lstr), str)
1184 call c_f_pointer(c_data, f_data)
1185 call ufbseq(bufr_unit, f_data, dim_1, dim_2, iret, str(1:lstr))
1202 function ireadns_c(bufr_unit, c_subset, iddate, subset_str_len)
result(ires) bind(C, name='ireadns_f')
1203 integer(c_int),
value,
intent(in) :: bufr_unit
1204 character(kind=c_char),
intent(out) :: c_subset(*)
1205 integer(c_int),
intent(out) :: iddate
1206 integer(c_int),
value,
intent(in) :: subset_str_len
1207 integer(c_int) :: ires
1208 character(len=25) :: f_subset
1211 ires =
ireadns(bufr_unit, f_subset, iddate)
1214 call copy_f_c_str(f_subset, c_subset, subset_str_len)
1231 recursive subroutine readns_c(bufr_unit, c_subset, iddate, subset_str_len, ires) bind(C, name='readns_f')
1232 integer(c_int),
value,
intent(in) :: bufr_unit
1233 character(kind=c_char),
intent(out) :: c_subset(*)
1234 integer(c_int),
intent(out) :: iddate, ires
1235 integer(c_int),
value,
intent(in) :: subset_str_len
1236 character(len=25) :: f_subset
1238 call readns(bufr_unit, f_subset, iddate, ires)
1241 call copy_f_c_str(f_subset, c_subset, subset_str_len)
1254 function ibfms_c(r8val)
result(ires) bind(C, name='ibfms_f')
1255 real(c_double),
intent(in),
value :: r8val
1256 integer(c_int) :: ires
1271 subroutine strnum_c(str,num,iret) bind(C, name='strnum_f')
1272 character(kind=c_char),
intent(in) :: str(*)
1273 integer(c_int),
intent(out) :: num, iret
1275 call strnum(c_f_string(str), num, iret)
1289 subroutine stntbi_c(n,lun,numb,nemo,celsq) bind(C, name='stntbi_f')
1290 integer(c_int),
intent(in),
value :: n, lun
1291 character(kind=c_char),
intent(in) :: numb(*), nemo(*), celsq(*)
1292 character(len=6) :: numb_f
1293 character(len=8) :: nemo_f
1294 character(len=55) :: celsq_f
1298 numb_f(ii:ii) = numb(ii)
1301 nemo_f(ii:ii) = nemo(ii)
1304 celsq_f(ii:ii) = celsq(ii)
1306 call stntbi(n, lun, numb_f, nemo_f, celsq_f)
1319 function igettdi_c(iflag)
result(ires) bind(C, name='igettdi_f')
1320 integer(c_int),
intent(in),
value :: iflag
1321 integer(c_int) :: ires
1339 subroutine pktdd_c(id, lun, idn, iret) bind(C, name='pktdd_f')
1340 integer(c_int),
intent(in),
value :: id, lun, idn
1341 integer(c_int),
intent(out) :: iret
1343 call pktdd(id, lun, idn, iret)
1353 recursive subroutine bort_c(errstr) bind(C, name='bort_f')
1354 character(kind=c_char),
intent(in) :: errstr(*)
1355 character(len=255) :: my_errstr
1358 lers = get_c_string_length(errstr)
1359 my_errstr = transfer(errstr(1:lers), my_errstr)
1361 call bort(my_errstr(1:lers))
1374 recursive subroutine openmb_c(bufr_unit, c_subset, iddate) bind(C, name='openmb_f')
1375 integer(c_int),
value,
intent(in) :: bufr_unit, iddate
1376 character(kind=c_char),
intent(in) :: c_subset(*)
1377 character(len=8) :: f_subset
1380 lfs = get_c_string_length(c_subset)
1385 f_subset = transfer(c_subset(1:lfs), f_subset)
1388 call openmb(bufr_unit, f_subset(1:lfs), iddate)
1401 recursive subroutine openmg_c(bufr_unit, c_subset, iddate) bind(C, name='openmg_f')
1402 integer(c_int),
value,
intent(in) :: bufr_unit, iddate
1403 character(kind=c_char),
intent(in) :: c_subset(*)
1404 character(len=8) :: f_subset
1407 lfs = get_c_string_length(c_subset)
1412 f_subset = transfer(c_subset(1:lfs), f_subset)
1415 call openmg(bufr_unit, f_subset(1:lfs), iddate)
1425 recursive subroutine closmg_c(bufr_unit) bind(C, name='closmg_f')
1426 integer(c_int),
value,
intent(in) :: bufr_unit
1439 recursive subroutine bvers_c(cverstr, cverstr_len) bind(C, name='bvers_f')
1440 character(kind=c_char),
intent(out) :: cverstr(*)
1441 integer(c_int),
value,
intent(in) :: cverstr_len
1442 character(len=10) :: f_cverstr
1444 call bvers(f_cverstr)
1445 call copy_f_c_str(f_cverstr, cverstr, cverstr_len)
1456 recursive subroutine cmpmsg_c(cf) bind(C, name='cmpmsg_f')
1457 character(kind=c_char),
intent(in) :: cf(*)
1476 character(kind=c_char),
intent(in) :: cf(*)
1478 integer(c_int) :: ires
1494 function bort_target_set_c()
result(ires) bind(C, name='bort_target_set_f')
1495 integer(c_int) :: ires
1499 end function bort_target_set_c
1506 subroutine bort_target_unset_c() bind(C, name='bort_target_unset_f')
1508 end subroutine bort_target_unset_c
1520 integer(c_int),
value,
intent(in) :: error_str_len
1521 character(kind=c_char),
intent(out) :: error_str(*)
1522 character(len=310) :: error_str_f
1523 integer :: error_str_len_f
1527 error_str_len_f = error_str_len_f + 1
1528 call copy_f_c_str(error_str_f, error_str, min(error_str_len_f, error_str_len))
1540 recursive subroutine ufbcnt_c(lunit, kmsg, ksub) bind(C, name='ufbcnt_f')
1541 integer(c_int),
value,
intent(in) :: lunit
1542 integer(c_int),
intent(out) :: kmsg, ksub
1544 call ufbcnt(lunit, kmsg, ksub)
1556 recursive subroutine ufbqcd_c(lunit, cnemo, iqcd) bind(C, name='ufbqcd_f')
1557 integer(c_int),
value,
intent(in) :: lunit
1558 integer(c_int),
intent(out) :: iqcd
1559 character(kind=c_char),
intent(in) :: cnemo(*)
1560 character(len=12) :: nemo
1563 lcn = get_c_string_length(cnemo)
1568 nemo = transfer(cnemo(1:lcn), nemo)
1570 call ufbqcd(lunit, nemo(1:lcn), iqcd)
1583 recursive subroutine ufbqcp_c(lunit, iqcp, cnemo, cnemo_len) bind(C, name='ufbqcp_f')
1584 integer(c_int),
value,
intent(in) :: lunit, iqcp, cnemo_len
1585 character(kind=c_char),
intent(out) :: cnemo(*)
1586 character(len=8) :: nemo
1589 call ufbqcp(lunit, iqcp, nemo)
1591 lnm = len(trim(nemo)) + 1
1592 call copy_f_c_str(nemo, cnemo, min(lnm, cnemo_len))
1607 recursive subroutine getcfmng_c(lunit, cnemoi, ivali, cnemod, ivald, cmeang_c, lcmgc, iret) &
1608 bind(c, name=
'getcfmng_f')
1609 integer(c_int),
value,
intent(in) :: lunit, ivali, ivald, lcmgc
1610 integer(c_int),
intent(out) :: iret
1611 character(kind=c_char),
intent(in) :: cnemoi(*), cnemod(*)
1612 character(kind=c_char),
intent(out) :: cmeang_c(*)
1613 character(len=600) :: cmeang
1614 character(len=8) :: nemoi, nemod
1615 integer :: lcni, lcnd, lcmg
1617 lcni = get_c_string_length(cnemoi)
1622 nemoi = transfer(cnemoi(1:lcni), nemoi)
1624 lcnd = get_c_string_length(cnemod)
1629 nemod = transfer(cnemod(1:lcnd), nemod)
1632 call getcfmng(lunit, nemoi(1:lcni), ivali, nemod(1:lcnd), ivald, cmeang(1:min(len(cmeang), lcmgc)), lcmg, iret)
1635 call copy_f_c_str(cmeang, cmeang_c, min(lcmg, lcmgc))
1650 recursive subroutine upftbv_c(lunit, cnemo, val, ibit, mxib, nib) bind(C, name='upftbv_f')
1651 integer(c_int),
value,
intent(in) :: lunit, mxib
1652 integer(c_int),
intent(out) :: ibit(*), nib
1653 real(c_double),
value,
intent(in) :: val
1654 character(kind=c_char),
intent(in) :: cnemo(*)
1655 character(len=12) :: nemo
1658 lcn = get_c_string_length(cnemo)
1663 nemo = transfer(cnemo(1:lcn), nemo)
1665 call upftbv(lunit, nemo(1:lcn), val, mxib, ibit, nib)
1679 recursive subroutine ufbtab_c(bufr_unit, c_data, dim_1, dim_2, iret, table_b_mnemonic) bind(C, name='ufbtab_f')
1680 integer(c_int),
value,
intent(in) :: bufr_unit, dim_1, dim_2
1681 type(c_ptr),
intent(out) :: c_data
1682 integer(c_int),
intent(inout) :: iret
1683 character(kind=c_char),
intent(in) :: table_b_mnemonic(*)
1684 character(len=90) :: str
1685 real,
pointer :: f_data
1688 lstr = get_c_string_length(table_b_mnemonic)
1693 str = transfer(table_b_mnemonic(1:lstr), str)
1695 call c_f_pointer(c_data, f_data)
1697 call ufbtab(bufr_unit, f_data, dim_1, dim_2, iret, str(1:lstr))
1712 recursive subroutine ufbpos_c(bufr_unit, irec, isub, c_subset, iddate, subset_str_len) bind(C, name='ufbpos_f')
1713 integer(c_int),
value,
intent(in) :: bufr_unit, subset_str_len, irec, isub
1714 character(kind=c_char),
intent(out) :: c_subset(*)
1715 integer(c_int),
intent(out) :: iddate
1716 character(len=25) :: f_subset
1718 call ufbpos(bufr_unit, irec, isub, f_subset, iddate)
1720 call copy_f_c_str(f_subset, c_subset, subset_str_len)
1730 recursive subroutine datelen_c(len) bind(C, name='datelen_f')
1731 integer(c_int),
value,
intent(in) :: len
1746 recursive function iupvs01_c(bufr_unit, c_s01m)
result(ires) bind(C, name='iupvs01_f')
1747 integer(c_int),
value,
intent(in) :: bufr_unit
1748 character(kind=c_char),
intent(in) :: c_s01m(*)
1749 integer(c_int) :: ires
1751 character(len=12) :: f_s01m
1753 lfs = get_c_string_length(c_s01m)
1758 f_s01m = transfer(c_s01m(1:lfs), f_s01m)
1761 ires =
iupvs01(bufr_unit, f_s01m(1:lfs))
1773 recursive function nmsub_c(bufr_unit)
result(ires) bind(C, name='nmsub_f')
1774 integer(c_int),
value,
intent(in) :: bufr_unit
1775 integer(c_int) :: ires
1778 ires =
nmsub(bufr_unit)
1789 recursive subroutine pkvs01_c(c_s01m, ival) bind(C, name='pkvs01_f')
1790 character(kind=c_char),
intent(in) :: c_s01m(*)
1791 integer(c_int),
value,
intent(in) :: ival
1793 character(len=12) :: f_s01m
1795 lfs = get_c_string_length(c_s01m)
1800 f_s01m = transfer(c_s01m(1:lfs), f_s01m)
1803 call pkvs01(f_s01m(1:lfs), ival)
1818 recursive subroutine datebf_c(bufr_unit, mear, mmon, mday, mour, idate) bind(C, name='datebf_f')
1819 integer(c_int),
value,
intent(in) :: bufr_unit
1820 integer(c_int),
intent(out) :: mear, mmon, mday, mour, idate
1822 call datebf(bufr_unit, mear, mmon, mday, mour, idate)
1834 recursive subroutine dumpbf_c(bufr_unit, jdate, jdump) bind(C, name='dumpbf_f')
1835 integer(c_int),
value,
intent(in) :: bufr_unit
1836 integer(c_int),
intent(out) :: jdate(*), jdump(*)
1838 call dumpbf(bufr_unit, jdate, jdump)
1849 recursive subroutine minimg_c(bufr_unit, mini) bind(C, name='minimg_f')
1850 integer(c_int),
value,
intent(in) :: bufr_unit, mini
1852 call minimg(bufr_unit, mini)
1865 recursive subroutine upds3_c(mbay, lcds3, ccds3, nds3) bind(C, name='upds3_f')
1866 integer(c_int),
value,
intent(in) :: lcds3
1867 integer(c_int),
intent(in) :: mbay(*)
1868 integer(c_int),
intent(out) :: nds3
1869 character(kind=c_char),
intent(out) :: ccds3(6,*)
1870 character(len=6) :: cds3(600)
1873 call upds3(mbay, lcds3, cds3, nds3)
1876 ccds3(jj,ii) = cds3(ii)(jj:jj)
1890 recursive subroutine pkbs1_c(ival, mbay, c_s1m) bind(C, name='pkbs1_f')
1891 character(kind=c_char),
intent(in) :: c_s1m(*)
1892 integer(c_int),
value,
intent(in) :: ival
1893 integer(c_int),
intent(inout) :: mbay(*)
1895 character(len=12) :: f_s1m
1897 lfs = get_c_string_length(c_s1m)
1902 f_s1m = transfer(c_s1m(1:lfs), f_s1m)
1905 call pkbs1(ival, mbay, f_s1m(1:lfs))
1920 recursive subroutine strcpt_c(cf, iyr, imo, idy, ihr, imi) bind(C, name='strcpt_f')
1921 integer(c_int),
value,
intent(in) :: iyr, imo, idy, ihr, imi
1922 character(kind=c_char),
intent(in) :: cf(*)
1926 call strcpt(ch, iyr, imo, idy, ihr, imi)
1942 recursive subroutine rtrcpt_c(lunit, iyr, imo, idy, ihr, imi, iret) bind(C, name='rtrcpt_f')
1943 integer(c_int),
value,
intent(in) :: lunit
1944 integer(c_int),
intent(out) :: iyr, imo, idy, ihr, imi, iret
1946 call rtrcpt(lunit, iyr, imo, idy, ihr, imi, iret)
1958 recursive subroutine atrcpt_c(msgin, lmsgot, msgot) bind(C, name='atrcpt_f')
1959 integer(c_int),
value,
intent(in) :: lmsgot
1960 integer(c_int),
intent(in) :: msgin(*)
1961 integer(c_int),
intent(out) :: msgot(*)
1963 call atrcpt(msgin, lmsgot, msgot)
1974 recursive subroutine dxdump_c(lunit, luprt) bind(C, name='dxdump_f')
1975 integer(c_int),
value,
intent(in) :: lunit, luprt
1977 call dxdump(lunit, luprt)
1988 recursive subroutine ufbdmp_c(lunit, luprt) bind(C, name='ufbdmp_f')
1989 integer(c_int),
value,
intent(in) :: lunit, luprt
1991 call ufbdmp(lunit, luprt)
2002 recursive subroutine ufdump_c(lunit, luprt) bind(C, name='ufdump_f')
2003 integer(c_int),
value,
intent(in) :: lunit, luprt
2005 call ufdump(lunit, luprt)
2016 recursive subroutine copybf_c(lunin, lunot) bind(C, name='copybf_f')
2017 integer(c_int),
value,
intent(in) :: lunin, lunot
2019 call copybf(lunin, lunot)
2030 recursive subroutine copymg_c(lunin, lunot) bind(C, name='copymg_f')
2031 integer(c_int),
value,
intent(in) :: lunin, lunot
2033 call copymg(lunin, lunot)
2045 recursive subroutine copysb_c(lunin, lunot, iret) bind(C, name='copysb_f')
2046 integer(c_int),
value,
intent(in) :: lunin, lunot
2047 integer(c_int),
intent(out) :: iret
2049 call copysb(lunin, lunot, iret)
2060 recursive subroutine ufbcpy_c(lunin, lunot) bind(C, name='ufbcpy_f')
2061 integer(c_int),
value,
intent(in) :: lunin, lunot
2063 call ufbcpy(lunin, lunot)
2078 recursive subroutine readerme_c(mesg, bufr_unit, c_subset, iddate, subset_str_len, ires) bind(C, name='readerme_f')
2079 integer(c_int),
value,
intent(in) :: bufr_unit, subset_str_len
2080 integer(c_int),
intent(in) :: mesg(*)
2081 integer(c_int),
intent(out) :: iddate, ires
2082 character(kind=c_char),
intent(out) :: c_subset(*)
2083 character(len=25) :: f_subset
2085 call readerme(mesg, bufr_unit, f_subset, iddate, ires)
2088 call copy_f_c_str(f_subset, c_subset, subset_str_len)
2101 recursive subroutine rdmgsb_c(lunit, imsg, isub) bind(C, name='rdmgsb_f')
2102 integer(c_int),
value,
intent(in) :: lunit, imsg, isub
2104 call rdmgsb(lunit, imsg, isub)
2117 recursive subroutine ufbmem_c(lunit, inew, iret, iunit) bind(C, name='ufbmem_f')
2118 integer(c_int),
value,
intent(in) :: lunit, inew
2119 integer(c_int),
intent(out) :: iret, iunit
2121 call ufbmem(lunit, inew, iret, iunit)
2135 recursive subroutine ufbmex_c(lunit, lundx, inew, iret, mesg) bind(C, name='ufbmex_f')
2136 integer(c_int),
value,
intent(in) :: lunit, lundx, inew
2137 integer(c_int),
intent(out) :: iret, mesg(*)
2139 call ufbmex(lunit, lundx, inew, iret, mesg)
2153 recursive subroutine ufbmms_c(imsg, isub, c_subset, jdate, subset_str_len) bind(C, name='ufbmms_f')
2154 integer(c_int),
value,
intent(in) :: imsg, isub, subset_str_len
2155 integer(c_int),
intent(out) :: jdate
2156 character(kind=c_char),
intent(out) :: c_subset(*)
2157 character(len=10) :: f_subset
2159 call ufbmms(imsg, isub, f_subset, jdate)
2161 call copy_f_c_str(f_subset, c_subset, subset_str_len)
2174 recursive subroutine ufbmns_c(irep, c_subset, idate, subset_str_len) bind(C, name='ufbmns_f')
2175 integer(c_int),
value,
intent(in) :: irep, subset_str_len
2176 integer(c_int),
intent(out) :: idate
2177 character(kind=c_char),
intent(out) :: c_subset(*)
2178 character(len=10) :: f_subset
2180 call ufbmns(irep, f_subset, idate)
2182 call copy_f_c_str(f_subset, c_subset, subset_str_len)
2196 recursive subroutine rdmemm_c(imsg, c_subset, jdate, subset_str_len, ires) bind(C, name='rdmemm_f')
2197 integer(c_int),
value,
intent(in) :: imsg, subset_str_len
2198 character(kind=c_char),
intent(out) :: c_subset(*)
2199 integer(c_int),
intent(out) :: jdate, ires
2200 character(len=10) :: f_subset
2202 call rdmemm(imsg, f_subset, jdate, ires)
2205 call copy_f_c_str(f_subset, c_subset, subset_str_len)
2217 recursive subroutine rdmems_c(isub, ires) bind(C, name='rdmems_f')
2218 integer(c_int),
value,
intent(in) :: isub
2219 integer(c_int),
intent(out) :: ires
2236 recursive subroutine ufbrms_c(imsg, isub, c_data, dim_1, dim_2, iret, table_b_mnemonic) bind(C, name='ufbrms_f')
2237 integer(c_int),
value,
intent(in) :: imsg, isub, dim_1, dim_2
2238 type(c_ptr),
intent(out) :: c_data
2239 integer(c_int),
intent(out) :: iret
2240 character(kind=c_char),
intent(in) :: table_b_mnemonic(*)
2241 character(len=90) :: str
2242 real,
pointer :: f_data
2245 lstr = get_c_string_length(table_b_mnemonic)
2250 str = transfer(table_b_mnemonic(1:lstr), str)
2252 call c_f_pointer(c_data, f_data)
2253 call ufbrms(imsg, isub, f_data, dim_1, dim_2, iret, str(1:lstr))
2266 recursive subroutine ufbtam_c(c_data, dim_1, dim_2, iret, table_b_mnemonic) bind(C, name='ufbtam_f')
2267 integer(c_int),
value,
intent(in) :: dim_1, dim_2
2268 type(c_ptr),
intent(out) :: c_data
2269 integer(c_int),
intent(out) :: iret
2270 character(kind=c_char),
intent(in) :: table_b_mnemonic(*)
2271 character(len=90) :: str
2272 real,
pointer :: f_data
2275 lstr = get_c_string_length(table_b_mnemonic)
2280 str = transfer(table_b_mnemonic(1:lstr), str)
2282 call c_f_pointer(c_data, f_data)
2284 call ufbtam(f_data, dim_1, dim_2, iret, str(1:lstr))
2294 recursive subroutine cpymem_c(lunot) bind(C, name='cpymem_f')
2295 integer(c_int),
value,
intent(in) :: lunot
2308 recursive subroutine ufbcup_c(lunin, lunot) bind(C, name='ufbcup_f')
2309 integer(c_int),
value,
intent(in) :: lunin, lunot
2311 call ufbcup(lunin, lunot)
2321 recursive subroutine stdmsg_c(cf) bind(C, name='stdmsg_f')
2322 character(kind=c_char),
intent(in) :: cf(*)
2339 recursive subroutine stndrd_c(lunit, msgin, lmsgot, msgot) bind(C, name='stndrd_f')
2340 integer(c_int),
value,
intent(in) :: lunit, lmsgot
2341 integer(c_int),
intent(in) :: msgin(*)
2342 integer(c_int),
intent(out) :: msgot(*)
2344 call stndrd(lunit, msgin, lmsgot, msgot)
2355 recursive subroutine codflg_c(cf) bind(C, name='codflg_f')
2356 character(kind=c_char),
intent(in) :: cf(*)
2375 recursive subroutine gettagpr_c(bufr_unit, c_tagch, ntagch, c_tagpr, tagpr_len, ires) bind(C, name='gettagpr_f')
2376 integer(c_int),
value,
intent(in) :: bufr_unit, ntagch, tagpr_len
2377 integer(c_int),
intent(out) :: ires
2378 character(kind=c_char),
intent(in) :: c_tagch(*)
2379 character(kind=c_char),
intent(out) :: c_tagpr(*)
2380 character(len=10) :: f_tagch, f_tagpr
2383 lfc = get_c_string_length(c_tagch)
2388 f_tagch = transfer(c_tagch(1:lfc), f_tagch)
2391 call gettagpr(bufr_unit, f_tagch(1:lfc), ntagch, f_tagpr, ires)
2393 lfp = len(trim(f_tagpr)) + 1
2394 call copy_f_c_str(f_tagpr, c_tagpr, min(lfp, tagpr_len))
2410 recursive subroutine gettagre_c(bufr_unit, c_tagi, ntagi, c_tagre, tagre_len, ntagre, ires) bind(C, name='gettagre_f')
2411 integer(c_int),
value,
intent(in) :: bufr_unit, ntagi, tagre_len
2412 integer(c_int),
intent(out) :: ntagre, ires
2413 character(kind=c_char),
intent(in) :: c_tagi(*)
2414 character(kind=c_char),
intent(out) :: c_tagre(*)
2415 character(len=10) :: f_tagi, f_tagre
2418 lfi = get_c_string_length(c_tagi)
2423 f_tagi = transfer(c_tagi(1:lfi), f_tagi)
2426 call gettagre(bufr_unit, f_tagi(1:lfi), ntagi, f_tagre, ntagre, ires)
2428 lfr = len(trim(f_tagre)) + 1
2429 call copy_f_c_str(f_tagre, c_tagre, min(lfr, tagre_len))
2441 recursive subroutine cnved4_c(msgin, lmsgot, msgot) bind(C, name='cnved4_f')
2442 integer(c_int),
value,
intent(in) :: lmsgot
2443 integer(c_int),
intent(in) :: msgin(*)
2444 integer(c_int),
intent(out) :: msgot(*)
2446 call cnved4(msgin, lmsgot, msgot)
2459 recursive function lcmgdf_c(bufr_unit, c_subset)
result(ires) bind(C, name='lcmgdf_f')
2460 integer(c_int),
value,
intent(in) :: bufr_unit
2461 integer(c_int) :: ires
2462 character(kind=c_char),
intent(in) :: c_subset(*)
2463 character(len=8) :: f_subset
2466 lfs = get_c_string_length(c_subset)
2471 f_subset = transfer(c_subset(1:lfs), f_subset)
2474 ires =
lcmgdf(bufr_unit, f_subset(1:lfs))
2490 recursive subroutine setvalnb_c(bufr_unit, c_tagpv, ntagpv, c_tagnb, ntagnb, r8val, ires) bind(C, name='setvalnb_f')
2491 integer(c_int),
value,
intent(in) :: bufr_unit, ntagpv, ntagnb
2492 integer(c_int),
intent(out) :: ires
2493 character(kind=c_char),
intent(in) :: c_tagpv(*), c_tagnb(*)
2494 real(c_double),
value,
intent(in) :: r8val
2495 character(len=10) :: f_tagpv, f_tagnb
2498 lfp = get_c_string_length(c_tagpv)
2503 f_tagpv = transfer(c_tagpv(1:lfp), f_tagpv)
2505 lfn = get_c_string_length(c_tagnb)
2510 f_tagnb = transfer(c_tagnb(1:lfn), f_tagnb)
2513 call setvalnb(bufr_unit, f_tagpv(1:lfp), ntagpv, f_tagnb(1:lfn), ntagnb, r8val, ires)
2529 recursive function getvalnb_c(bufr_unit, c_tagpv, ntagpv, c_tagnb, ntagnb)
result(r8val) bind(C, name='getvalnb_f')
2530 integer(c_int),
value,
intent(in) :: bufr_unit, ntagpv, ntagnb
2531 character(kind=c_char),
intent(in) :: c_tagpv(*), c_tagnb(*)
2532 real(c_double) :: r8val
2533 character(len=10) :: f_tagpv, f_tagnb
2537 lfp = get_c_string_length(c_tagpv)
2542 f_tagpv = transfer(c_tagpv(1:lfp), f_tagpv)
2544 lfn = get_c_string_length(c_tagnb)
2549 f_tagnb = transfer(c_tagnb(1:lfn), f_tagnb)
2552 r8val =
getvalnb(bufr_unit, f_tagpv(1:lfp), ntagpv, f_tagnb(1:lfn), ntagnb)
2565 recursive subroutine getabdb_c(lunit, itab, ctabdb, jtab) bind(C, name='getabdb_f')
2566 integer(c_int),
value,
intent(in) :: lunit, itab
2567 integer(c_int),
intent(out) :: jtab
2568 character(kind=c_char),
intent(out) :: ctabdb(128,*)
2569 character(len=128) :: tabdb(1000)
2572 call getabdb(lunit, tabdb, itab, jtab)
2575 ctabdb(jj,ii) = tabdb(ii)(jj:jj)
2591 recursive subroutine ufbget_c(bufr_unit, tab, i1, iret, table_b_mnemonic) bind(C, name='ufbget_f')
2592 integer(c_int),
value,
intent(in) :: bufr_unit, i1
2593 integer(c_int),
intent(out) :: iret
2594 real(c_double),
intent(out) :: tab(*)
2595 character(kind=c_char),
intent(in) :: table_b_mnemonic(*)
2596 character(len=90) :: str
2599 lstr = get_c_string_length(table_b_mnemonic)
2604 str = transfer(table_b_mnemonic(1:lstr), str)
2607 call ufbget(bufr_unit, tab, i1, iret, str(1:lstr))
2623 recursive subroutine ufbinx_c(bufr_unit, imsg, isub, c_data, dim_1, dim_2, iret, table_b_mnemonic) &
2624 bind(c, name=
'ufbinx_f')
2625 integer(c_int),
value,
intent(in) :: bufr_unit, dim_1, dim_2, imsg, isub
2626 type(c_ptr),
intent(out) :: c_data
2627 integer(c_int),
intent(out) :: iret
2628 character(kind=c_char),
intent(in) :: table_b_mnemonic(*)
2629 character(len=90) :: str
2630 real,
pointer :: f_data
2633 lstr = get_c_string_length(table_b_mnemonic)
2638 str = transfer(table_b_mnemonic(1:lstr), str)
2641 call c_f_pointer(c_data, f_data)
2642 call ufbinx(bufr_unit, imsg, isub, f_data, dim_1, dim_2, iret, str(1:lstr))
2656 recursive subroutine ufbovr_c(bufr_unit, c_data, dim_1, dim_2, iret, table_b_mnemonic) &
2657 bind(c, name=
'ufbovr_f')
2658 integer(c_int),
value,
intent(in) :: bufr_unit, dim_1, dim_2
2659 type(c_ptr),
intent(in) :: c_data
2660 integer(c_int),
intent(out) :: iret
2661 character(kind=c_char),
intent(in) :: table_b_mnemonic(*)
2662 character(len=90) :: str
2663 real,
pointer :: f_data
2666 lstr = get_c_string_length(table_b_mnemonic)
2671 str = transfer(table_b_mnemonic(1:lstr), str)
2674 call c_f_pointer(c_data, f_data)
2675 call ufbovr(bufr_unit, f_data, dim_1, dim_2, iret, str(1:lstr))
2687 recursive function ifbget_c(bufr_unit)
result(ires) bind(C, name='ifbget_f')
2688 integer(c_int),
value,
intent(in) :: bufr_unit
2689 integer(c_int) :: ires
2704 recursive function igetsc_c(bufr_unit)
result(ires) bind(C, name='igetsc_f')
2705 integer(c_int),
value,
intent(in) :: bufr_unit
2706 integer(c_int) :: ires
2720 recursive subroutine wrdxtb_c(lundx, lunot) bind(C, name='wrdxtb_f')
2721 integer(c_int),
value,
intent(in) :: lundx, lunot
2723 call wrdxtb(lundx, lunot)
2734 recursive subroutine mesgbf_c(lunit, mesgtyp) bind(C, name='mesgbf_f')
2735 integer(c_int),
value,
intent(in) :: lunit
2736 integer(c_int),
intent(out) :: mesgtyp
2738 call mesgbf(lunit, mesgtyp)
2750 recursive subroutine mesgbc_c(lunin, mesgtyp, icomp) bind(C, name='mesgbc_f')
2751 integer(c_int),
value,
intent(in) :: lunin
2752 integer(c_int),
intent(out) :: mesgtyp, icomp
2754 call mesgbc(lunin, mesgtyp, icomp)
2765 recursive subroutine invmrg_c(lubfi, lubfj) bind(C, name='invmrg_f')
2766 integer(c_int),
value,
intent(in) :: lubfi, lubfj
2768 call invmrg(lubfi, lubfj)
2782 recursive function iupm_c(cbay, nbits, lcbay)
result(ires) bind(C, name='iupm_f')
2783 character(kind=c_char),
intent(in) :: cbay(*)
2784 integer(c_int),
value,
intent(in) :: nbits, lcbay
2785 integer(c_int) :: ires
2787 character(len=16) :: f_cbay
2789 f_cbay = transfer(cbay(1:lcbay), f_cbay)
2791 ires =
iupm(f_cbay(1:lcbay), nbits)
2804 recursive subroutine ipkm_c(cbay, nbyt, ival, cbay_len) bind(C, name='ipkm_f')
2805 character(kind=c_char),
intent(out) :: cbay(*)
2806 integer(c_int),
value,
intent(in) :: nbyt, ival, cbay_len
2807 character(len=8) :: f_cbay
2810 call ipkm(f_cbay, nbyt, ival)
2813 call copy_f_c_str(f_cbay, cbay, min(nbytp1, cbay_len))
integer function igetprm(cprmnm)
Return the current value of a parameter used for allocating one or more internal arrays within the NC...
subroutine exitbufr
Free all dynamically-allocated memory, close all logical units that are open within the NCEPLIBS-bufr...
recursive integer function isetprm(cprmnm, ipval)
Set a specified parameter to a specified value for use in dynamically allocating one or more internal...
recursive subroutine gettagre(lunit, tagi, ntagi, tagre, ntagre, iret)
Check whether a specified Table B mnemonic references another Table B mnemonic within the same data s...
integer function imrkopr(nemo)
Check whether a specified mnemonic is a Table C marker operator.
recursive subroutine check_for_bort(bort_str, bort_str_len)
Check whether a bort error occurred during a previous call to an NCEPLIBS-bufr subroutine or function...
recursive subroutine bort(str)
Log an error message, then either return to or abort the application program.
integer function catch_borts(cbc)
Specify whether subsequent bort errors should be caught and returned to the application program.
subroutine bort_target_unset
Clear any existing bort target.
integer function bort_target_set()
Sets a new bort target, if bort catching is enabled and such a target doesn't already exist.
recursive subroutine ufbqcd(lunit, nemo, iqcd)
Given a mnemonic associated with a category 63 Table D descriptor from an NCEP prepbufr file,...
recursive subroutine ufbqcp(lunit, iqcp, nemo)
Given an event program code, which is equivalent to the Y value of a category 63 Table D descriptor f...
recursive subroutine upftbv(lunit, nemo, val, mxib, ibit, nib)
Given a Table B mnemonic with flag table units and a corresponding numerical data value,...
recursive subroutine getcfmng(lunit, nemoi, ivali, nemod, ivald, cmeang, lnmng, iret)
Decode the meaning of a numerical value from a code or flag table.
recursive integer function iupm(cbay, nbits)
Decode an integer value from within a specified number of bits of a character string,...
recursive subroutine ipkm(cbay, nbyt, n)
Encode an integer value within a specified number of bytes of a character string, up to a maximum of ...
recursive subroutine cmpmsg(cf)
Specify whether BUFR messages output by future calls to message-writing subroutines and subset-writin...
recursive subroutine copybf(lunin, lunot)
Copy an entire BUFR file from one Fortran logical unit to another.
recursive subroutine ufbcup(lubin, lubot)
Copy unique elements of a data subset.
recursive subroutine copysb(lunin, lunot, iret)
Copy a BUFR data subset from one Fortran logical unit to another.
recursive subroutine cpymem(lunot)
Copy a BUFR message from internal arrays to a file.
recursive subroutine ufbcpy(lubin, lubot)
Copy a BUFR data subset from one Fortran logical unit to another.
recursive subroutine copymg(lunin, lunot)
Copy a BUFR message from one file to another.
recursive subroutine ufdump(lunit, luprt)
Print a verbose listing of the contents of a data subset, including all data values and replicated se...
recursive subroutine getabdb(lunit, tabdb, itab, jtab)
Get Table B and Table D information from the internal DX BUFR tables.
recursive subroutine dxdump(lunit, ldxot)
Print a copy of the DX BUFR table associated with a specified Fortran logical unit.
recursive subroutine ufbdmp(lunin, luprt)
Print a verbose listing of the contents of a data subset, including all data values and replicated se...
subroutine elemdx(card, lun)
Decode the scale factor, reference value, bit width and units (i.e., the "elements") from a Table B m...
subroutine nemtbb(lun, itab, unit, iscl, iref, ibit)
Get information about a Table B descriptor from the internal DX BUFR tables.
recursive subroutine wrdxtb(lundx, lunot)
Generate one or more BUFR messages from the DX BUFR tables information associated with a given BUFR f...
subroutine stntbi(n, lun, numb, nemo, celsq)
Store a new entry within internal BUFR Table B or D.
subroutine pktdd(id, lun, idn, iret)
Store information about a child mnemonic within the internal BUFR Table D.
recursive subroutine nemdefs(lunit, nemo, celem, cunit, iret)
Get the element name and units associated with a Table B descriptor.
integer function igetntbi(lun, ctb)
Get the next available index for storing an entry within a specified internal DX BUFR table.
subroutine uptdd(id, lun, ient, iret)
Get the WMO bit-wise representation of the FXY value corresponding to a child mnemonic in a Table D s...
subroutine nemtab(lun, nemo, idn, tab, iret)
Get information about a descriptor, based on a mnemonic.
subroutine cadn30(idn, adn)
Convert an FXY value from its WMO bit-wise representation to its 6 character representation.
subroutine numtbd(lun, idn, nemo, tab, iret)
Get information about a Table B or Table D descriptor, based on the WMO bit-wise representation of an...
integer function ifxy(adsc)
Convert an FXY value from its 6 character representation to its WMO bit-wise representation.
recursive subroutine nemspecs(lunit, nemo, nnemo, nscl, nref, nbts, iret)
Get the scale factor, reference value and bit width associated with a specified occurrence of a Table...
recursive subroutine gettagpr(lunit, tagch, ntagch, tagpr, iret)
Get the parent for a specified occurrence of a Table B or Table D mnemonic within a data subset defin...
recursive subroutine codflg(cf)
Specify whether or not code and flag table information should be included during all future reads of ...
integer function igettdi(iflag)
Depending on the value of the input flag, either return the next usable scratch Table D index for the...
recursive subroutine mtinfo(cmtdir, lunmt1, lunmt2)
Specify the directory location and Fortran logical unit numbers to be used when reading master BUFR t...
recursive subroutine rdmems(isub, iret)
Read a specified data subset from the BUFR message that was most recently read via a call to subrouti...
recursive subroutine rdmemm(imsg, subset, jdate, iret)
Read a specified BUFR message from internal arrays in memory, so that it is now in scope for processi...
recursive subroutine ufbmem(lunit, inew, iret, iunit)
Connect a new file to the NCEPLIBS-bufr software for input operations, then read the entire file cont...
recursive subroutine ufbmex(lunit, lundx, inew, iret, mesg)
Connect a new file to the NCEPLIBS-bufr software for input operations, then read the entire file cont...
recursive subroutine ufbmns(irep, subset, idate)
Read a specified data subset from internal arrays in memory, so that it is now in scope for processin...
recursive subroutine ufbrms(imsg, isub, usr, i1, i2, iret, str)
Read one or more data values from a data subset in internal arrays.
recursive subroutine ufbtam(tab, i1, i2, iret, str)
Read through every data subset in internal arrays and return one or more specified data values from e...
recursive subroutine ufbmms(imsg, isub, subset, jdate)
Read a specified data subset from internal arrays.
recursive subroutine bvers(cverstr)
Get the version number of the NCEPLIBS-bufr software.
recursive integer function igetsc(lunit)
Check for an abnormal status code associated with the processing of a file.
recursive subroutine strnum(str, num, iret)
Decode an integer from a character string.
integer function ibfms(r8val)
Check whether a real*8 data value returned from a previous call to any of the NCEPLIBS-bufr values-re...
Wrap Fortran NCEPLIBS-bufr subprograms and variables so they can be called from within C.
subroutine, public get_isc_c(isc_ptr, isc_size)
Get copy of the moda_tables ISC array.
subroutine, public open_c(lunit, filepath)
Open a Fortran file from a C program.
recursive subroutine, public closmg_c(bufr_unit)
Close a BUFR message.
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.
integer(c_int) function, public ifxy_c(cfxy)
Convert an FXY value from its 6 character representation to its WMO bit-wise representation.
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.
recursive subroutine, public readsb_c(bufr_unit, ires)
Read the next data subset from a BUFR message.
recursive subroutine, public rdmgsb_c(lunit, imsg, isub)
Read a specified data subset from a BUFR file.
recursive subroutine, public ufdump_c(lunit, luprt)
Print a verbose listing of the contents of a data subset.
recursive subroutine, public ufbqcd_c(lunit, cnemo, iqcd)
Return a prepbufr program code corresponding to a mnemonic.
subroutine, public get_nval_c(lun, num_nodes)
Get the number of values in the current subset.
recursive subroutine, public upds3_c(mbay, lcds3, ccds3, nds3)
Get the sequence of data descriptors contained within Section 3 of a BUFR message.
subroutine, public stntbi_c(n, lun, numb, nemo, celsq)
Store a new entry within the internal BUFR Table B or D.
recursive subroutine, public codflg_c(cf)
Specify whether to read code and flag table information from master BUFR tables.
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.
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.
recursive integer(c_int) function, public ifbget_c(bufr_unit)
Check if there are any more data subsets available within a BUFR message.
recursive subroutine, public readmg_c(bufr_unit, c_subset, iddate, subset_str_len, ires)
Read the next message from a BUFR file.
integer(c_int) function, public ireadmg_c(bufr_unit, c_subset, iddate, subset_str_len)
Read the next message from a BUFR file.
integer(c_int) function, public igetprm_c(cprmnm)
Get the current value of a parameter.
recursive subroutine, public minimg_c(bufr_unit, mini)
Write a minutes value into Section 1 of a BUFR message.
recursive subroutine, public invmrg_c(lubfi, lubfj)
Merge parts of data subsets.
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.
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.
subroutine, public close_c(lunit)
Close a Fortran file from a C program.
recursive subroutine, public ufbqcp_c(lunit, iqcp, cnemo, cnemo_len)
Return a mnemonic corresponding to a prepbufr program code.
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.
integer(c_int) function, public ibfms_c(r8val)
Test whether a data value is "missing".
recursive subroutine, public rdmemm_c(imsg, c_subset, jdate, subset_str_len, ires)
Read a specified message from internal arrays.
recursive subroutine, public dxdump_c(lunit, luprt)
Print a copy of the DX BUFR table associated with a specified Fortran logical unit.
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.
recursive subroutine, public cpymem_c(lunot)
Copy a message from internal arrays to a file.
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.
subroutine, public mtinfo_c(path, file_unit_1, file_unit_2)
Specify location of master BUFR tables on local file system.
integer(c_int) function, public igetntbi_c(lun, table_type)
Get the next index for storing an entry within an internal DX BUFR table.
integer(c_int) function, public iupbs01_c(bufr, mnemonic)
Read a data value from Section 0 or Section 1 of a BUFR message.
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.
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...
subroutine, public exitbufr_c()
Reset the library.
integer(c_int) function, public igettdi_c(iflag)
Get the next usable Table D index for the current master table, or reset the index.
subroutine, public get_inv_c(lun, inv_ptr, inv_size)
Get pointer to the moda_usrint INV array.
recursive subroutine, public readerme_c(mesg, bufr_unit, c_subset, iddate, subset_str_len, ires)
Read a BUFR message from a memory array.
subroutine, public get_tag_c(tag_ptr, tag_len, mem_size)
Get copy of the moda_tables TAG array.
recursive integer(c_int) function, public lcmgdf_c(bufr_unit, c_subset)
Check if a subset definition contains any long character strings.
subroutine, public cadn30_c(idn, adn, adn_str_len)
Convert an FXY value from its WMO bit-wise representation to its six-character representation.
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.
recursive subroutine, public ufbcup_c(lunin, lunot)
Copy unique elements of a data subset from one file to another.
integer(c_int) function, public istdesc_c(idn)
Check whether a descriptor is WMO-standard.
recursive integer(c_int) function, public iupm_c(cbay, nbits, lcbay)
Decode an integer from a character string.
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.
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.
recursive subroutine, public stdmsg_c(cf)
Specify whether to standardize future output BUFR messages.
recursive subroutine, public rtrcpt_c(lunit, iyr, imo, idy, ihr, imi, iret)
Get the tank receipt time from Section 1 of a BUFR message.
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.
subroutine, public get_typ_c(typ_ptr, typ_len, mem_size)
Get copy of the moda_tables TYP array.
integer(c_int) function, public ireadns_c(bufr_unit, c_subset, iddate, subset_str_len)
Read the next data subset from a BUFR file.
recursive subroutine, public writlc_c(lunit, str, chr)
Write a long string to the BUFR file.
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.
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.
recursive subroutine, public pkvs01_c(c_s01m, ival)
Specify a value to be written into Section 0 or 1 of all future BUFR messages.
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.
recursive subroutine, public datelen_c(len)
Specify the format of Section 1 date-time values that will be output by future calls to message-readi...
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 alr...
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.
recursive subroutine, public pkbs1_c(ival, mbay, c_s1m)
Specify a value to be written into Section 1 of a BUFR message.
subroutine, public pktdd_c(id, lun, idn, iret)
Store information about a child mnemonic within the internal arrays.
recursive subroutine, public ufbmem_c(lunit, inew, iret, iunit)
Read an entire BUFR file into internal arrays.
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.
subroutine, public elemdx_c(card, lun)
Decode the scale factor, reference value, bit width, and units from a Table B mnemonic definition.
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.
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 s...
recursive subroutine, public ufbmns_c(irep, c_subset, idate, subset_str_len)
Read a specified data subset from internal arrays.
recursive subroutine, public ufbcpy_c(lunin, lunot)
Copy a BUFR data subset from one Fortran logical unit to another.
recursive integer(c_int) function, public igetsc_c(bufr_unit)
Check for an abnormal status code associated with the processing of a file.
integer(c_int) function, public imrkopr_c(nemo)
Check whether a specified mnemonic is a Table C marker operator.
subroutine, public maxout_c(max0)
Define a customized maximum length for output BUFR messages.
recursive subroutine, public mesgbc_c(lunin, mesgtyp, icomp)
Get information from the first data message in a BUFR file.
subroutine, public get_jmpb_c(jmpb_ptr, jmpb_size)
Get copy of the moda_tables JMPB array.
recursive subroutine, public bort_c(errstr)
Log one error message and abort application program.
recursive subroutine, public readlc_c(lunit, str_id, output_str, output_str_len)
Get a long string from the BUFR file.
subroutine, public get_inode_c(lun, start_node)
Get the bufr node idx for the start node of the subset.
recursive subroutine, public status_c(file_unit, lun, il, im)
Check whether a file is connected to the library.
subroutine, public delete_table_data_c()
Deletes the copies of the moda_tables arrays.
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.
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.
recursive subroutine, public getabdb_c(lunit, itab, ctabdb, jtab)
Get Table B and Table D information from the internal DX tables.
recursive subroutine, public copybf_c(lunin, lunot)
Copy an entire BUFR file from one Fortran logical unit to another.
recursive subroutine, public copysb_c(lunin, lunot, iret)
Copy a BUFR data subset from one Fortran logical unit to another.
subroutine, public nemtab_c(lun, mnemonic, descriptor, table_type, table_idx)
Get information about a descriptor.
integer(c_int) function, public ireadsb_c(bufr_unit)
Read the next data subset from a BUFR message.
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.
subroutine, public get_link_c(link_ptr, link_size)
Get copy of the moda_tables LINK array.
recursive subroutine, public ufbdmp_c(lunit, luprt)
Print a verbose listing of the contents of a data subset.
integer(c_int) function, public isetprm_c(cprmnm, ipval)
Define a customized parameter value for dynamic allocation.
recursive subroutine, public rdmems_c(isub, ires)
Read a specified data subset from internal arrays.
recursive integer(c_int) function, public nmsub_c(bufr_unit)
Get the total number of data subsets available within a BUFR message.
recursive subroutine, public writsb_c(bufr_unit)
Write the next data subset to a BUFR message.
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.
subroutine, public get_itp_c(itp_ptr, itp_size)
Get copy of the moda_tables ITP array.
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...
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.
subroutine, public nemtbb_c(lun, table_idx, unit_str, unit_str_len, scale, reference, bits)
Get information about a Table B descriptor.
recursive subroutine, public readns_c(bufr_unit, c_subset, iddate, subset_str_len, ires)
Read the next data subset from a BUFR file.
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.
recursive subroutine, public ufbcnt_c(lunit, kmsg, ksub)
Get the current location of the file pointer within a BUFR file.
recursive subroutine, public ipkm_c(cbay, nbyt, ival, cbay_len)
Encode an integer into a character string.
recursive subroutine, public copymg_c(lunin, lunot)
Copy a BUFR message from one Fortran logical unit to another.
recursive subroutine, public ufbmms_c(imsg, isub, c_subset, jdate, subset_str_len)
Read a specified data subset from internal arrays.
recursive subroutine, public bvers_c(cverstr, cverstr_len)
Get the version number of the NCEPLIBS-bufr software.
recursive subroutine, public wrdxtb_c(lundx, lunot)
Generate DX BUFR table messages and write them to a output file.
recursive subroutine, public drfini_c(bufr_unit, mdrf, ndrf, table_d_mnemonic)
Explicitly initialize delayed replication factors for writing to a data subset.
integer(c_int) function, public igetmxby_c()
Get the maximum length of a BUFR message that can be written to an output file.
recursive subroutine, public ufbmex_c(lunit, lundx, inew, iret, mesg)
Read an entire BUFR file into internal arrays.
recursive subroutine, public closbf_c(bufr_unit)
Close a previously opened file and disconnect it from the library.
integer(c_int) function, public catch_borts_c(cf)
Specify whether subsequent bort errors should be caught and returned to the application program.
recursive subroutine, public cmpmsg_c(cf)
Specify the use of compression when writing BUFR messages.
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.
recursive subroutine, public cnved4_c(msgin, lmsgot, msgot)
Convert a BUFR message to edition 4.
subroutine, public get_irf_c(irf_ptr, irf_size)
Get copy of the moda_tables IRF array.
subroutine, public get_val_c(lun, val_ptr, val_size)
Get pointer to the moda_usrint VAL array.
subroutine, public strnum_c(str, num, iret)
Decode an integer from a character string.
recursive subroutine, public stndrd_c(lunit, msgin, lmsgot, msgot)
Standardize a copy of a BUFR message.
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.
recursive subroutine, public mesgbf_c(lunit, mesgtyp)
Get information from the first data message in a BUFR file.
Declare arrays used to store information about the current BUFR message that is in the process of bei...
integer, dimension(:), allocatable inode
Table A mnemonic for type of BUFR message.
Declare arrays and variables used to store the internal jump/link table.
integer, dimension(:), allocatable irf
Reference values corresponding to tag and typ:
integer, dimension(:), allocatable isc
Scale factors corresponding to tag and typ:
character *3, dimension(:), allocatable typ
Type indicators corresponding to tag:
integer, dimension(:), allocatable jmpb
Jump backward indices corresponding to tag and typ:
character *10, dimension(:), allocatable tag
Mnemonics in the jump/link table.
integer ntab
Number of entries in the jump/link table.
integer, dimension(:), allocatable itp
Integer type values corresponding to typ:
integer, dimension(:), allocatable link
Link indices corresponding to tag, typ and jmpb:
Declare arrays used to store data values and associated metadata for the current BUFR data subset in ...
integer, dimension(:), allocatable nval
Number of data values in BUFR data subset.
real *8, dimension(:,:), allocatable, target val
Data values.
integer, dimension(:,:), allocatable, target inv
Inventory pointer which links each data value to its corresponding node in the internal jump/link tab...
recursive subroutine closbf(lunit)
Close the connection between logical unit lunit and the NCEPLIBS-bufr software.
recursive subroutine openbf(lunit, io, lundx)
Connect a new file to the NCEPLIBS-bufr software for input or output operations, or initialize the li...
recursive subroutine ufbcnt(lunit, kmsg, ksub)
Get the current location of the file pointer within a BUFR file, in terms of a message number countin...
recursive subroutine status(lunit, lun, il, im)
Check whether a specified Fortran logical unit number is currently connected to the NCEPLIBS-bufr sof...
recursive subroutine ufbtab(lunin, tab, i1, i2, iret, str)
Read through every data subset in a BUFR file and return one or more specified data values from each ...
recursive subroutine maxout(maxo)
Specify the maximum length of a BUFR message that can be written to any output file by the NCEPLIBS-b...
recursive subroutine openmg(lunit, subset, jdate)
Open and initialize a new BUFR message within internal arrays, for eventual output to logical unit lu...
recursive subroutine openmb(lunit, subset, jdate)
Open and initialize a new BUFR message within internal arrays, for eventual output to logical unit lu...
recursive subroutine closmg(lunin)
Close the BUFR message that is currently open for writing within internal arrays associated with logi...
recursive integer function nmsub(lunit)
Get the total number of data subsets available within the BUFR message that was most recently opened ...
integer function igetmxby()
Get the maximum length of a BUFR message that can be written to an output file by the NCEPLIBS-bufr s...
recursive subroutine readerme(mesg, lunit, subset, jdate, iret)
Read a BUFR message from a memory array.
recursive subroutine readmg(lunxx, subset, jdate, iret)
Read the next BUFR message from logical unit abs(lunxx) into internal arrays.
recursive integer function ifbget(lunit)
Check whether there are any more data subsets available to be read from a BUFR message.
recursive subroutine cnved4(msgin, lmsgot, msgot)
Convert a BUFR edition 3 message to BUFR edition 4.
recursive integer function ireadmg(lunit, subset, idate)
Call subroutine readmg() and pass back its return code as the function value.
recursive subroutine ufbpos(lunit, irec, isub, subset, jdate)
Jump forwards or backwards to a specified data subset within a BUFR file.
recursive subroutine writsa(lunxx, lmsgt, msgt, msgl)
Write a complete data subset into a BUFR message, and return each completed message within a memory a...
recursive integer function ireadns(lunit, subset, idate)
Call subroutine readns() and pass back its return code as the function value.
recursive subroutine writsb(lunit)
Write a complete data subset into a BUFR message, for eventual output to logical unit lunit.
recursive subroutine invmrg(lubfi, lubfj)
Merge parts of data subsets which have duplicate space and time coordinates but different or unique o...
recursive integer function ireadsb(lunit)
Call subroutine readsb() and pass back its return code as the function value.
recursive subroutine readsb(lunit, iret)
Read the next data subset from a BUFR message.
recursive integer function lcmgdf(lunit, subset)
Check whether the subset definition for a given message type contains any long character strings (gre...
recursive subroutine rdmgsb(lunit, imsg, isub)
Read a specified data subset from a BUFR file.
recursive subroutine readns(lunit, subset, jdate, iret)
Read the next data subset from a BUFR file.
recursive real *8 function getvalnb(lunit, tagpv, ntagpv, tagnb, ntagnb)
Read a data value corresponding to a specific occurrence of a mnemonic within a data subset,...
recursive subroutine ufbinx(lunit, imsg, isub, usr, i1, i2, iret, str)
Read one or more data values from a specified data subset.
recursive subroutine ufbseq(lunin, usr, i1, i2, iret, str)
Read or write an entire sequence of data values from or to a data subset.
recursive subroutine ufbovr(lunit, usr, i1, i2, iret, str)
Overwrite one or more data values within a data subset.
recursive subroutine ufbint(lunin, usr, i1, i2, iret, str)
Read or write one or more data values from or to a data subset.
recursive subroutine drfini(lunit, mdrf, ndrf, drftag)
Explicitly initialize delayed replication factors and allocate a corresponding amount of space within...
recursive subroutine ufbstp(lunin, usr, i1, i2, iret, str)
Read or write one or more data values from or to a data subset.
recursive subroutine readlc(lunit, chr, str)
Read a long character string (greater than 8 bytes) from a data subset.
recursive subroutine setvalnb(lunit, tagpv, ntagpv, tagnb, ntagnb, r8val, iret)
Write a data value corresponding to a specific occurrence of a mnemonic within a data subset,...
recursive subroutine ufbevn(lunit, usr, i1, i2, i3, iret, str)
Read one or more data values from an NCEP prepbufr file.
recursive subroutine writlc(lunit, chr, str)
Write a long character string (greater than 8 bytes) to a data subset.
recursive subroutine ufbget(lunit, tab, i1, iret, str)
Read one or more data values from a data subset without advancing the subset pointer.
recursive subroutine ufbrep(lunin, usr, i1, i2, iret, str)
Read or write one or more data values from or to a data subset.
recursive integer function iupbs01(mbay, s01mnem)
Read a specified value from within Section 0 or Section 1 of a BUFR message.
recursive subroutine datebf(lunit, mear, mmon, mday, mour, idate)
Get the Section 1 date-time from the first data message of a BUFR file, bypassing any messages at the...
recursive integer function iupvs01(lunit, s01mnem)
Read a specified value from within Section 0 or 1 of a BUFR message.
recursive subroutine pkbs1(ival, mbay, s1mnem)
Write a specified value into a specified location within Section 1 of a BUFR message,...
recursive subroutine minimg(lunit, mini)
Write a minutes value into Section 1 of the BUFR message that was most recently opened for writing vi...
recursive subroutine upds3(mbay, lcds3, cds3, nds3)
Read the sequence of data descriptors contained within Section 3 of a BUFR message.
recursive subroutine mesgbf(lunit, mesgtyp)
Read through a BUFR file (starting from the beginning of the file) and return the message type (from ...
recursive subroutine datelen(len)
Specify the format of Section 1 date-time values that will be output by future calls to any of the NC...
recursive subroutine dumpbf(lunit, jdate, jdump)
Read the Section 1 date-time from the first two "dummy" messages of an NCEP dump file.
recursive subroutine mesgbc(lunin, mesgtyp, icomp)
Return the message type (from Section 1) and message compression indicator (from Section 3) of a BUFR...
recursive subroutine pkvs01(s01mnem, ival)
Specify a value to be written into a specified location within Section 0 or Section 1 of all BUFR mes...
recursive subroutine stndrd(lunit, msgin, lmsgot, msgot)
Standardize a BUFR message.
recursive subroutine stdmsg(cf)
Specify whether BUFR messages output by future calls to message-writing subroutines and subset-writin...
integer function istdesc(idn)
Given the WMO bit-wise representation of an FXY value for a descriptor, check whether the descriptor ...
recursive subroutine strcpt(cf, iyr, imo, idy, ihr, imi)
Specify a tank receipt time to be included within Section 1 of all BUFR messages output by future cal...
recursive subroutine rtrcpt(lunit, iyr, imo, idy, ihr, imi, iret)
Read the tank receipt time (if one exists) from Section 1 of a BUFR message.
recursive subroutine atrcpt(msgin, lmsgot, msgot)
Read an input message and output an equivalent BUFR message with a tank receipt time added to Section...