NCEPLIBS-bufr  12.3.0
bufr_c2f_interface.F90
Go to the documentation of this file.
1 
6 
17 
18  use iso_c_binding
19 
20  implicit none
21 
22  private
36 
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(:)
40 
41  contains
42 
50  function get_c_string_length(c_str) result(nchars)
51  character(kind=c_char, len=1), intent(in) :: c_str(*)
52  integer :: nchars
53 
54  nchars = 1
55  do while (c_str(nchars) /= c_null_char)
56  nchars = nchars + 1
57  end do
58  nchars = nchars - 1
59  end function get_c_string_length
60 
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
74  integer :: nchars
75 
76  nchars = get_c_string_length(c_str)
77 
78  allocate(character(len=nchars) :: f_str)
79  f_str = transfer(c_str(1:nchars), f_str)
80  end function c_f_string
81 
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
93  integer :: ii
94 
95  if (c_str_len /= 0) then
96  do ii = 1, c_str_len
97  c_str(ii) = f_str(ii:ii)
98  enddo
99  c_str(c_str_len) = c_null_char
100  end if
101  end subroutine copy_f_c_str
102 
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
112 
113  open(lunit, file=c_f_string(filepath))
114  end subroutine open_c
115 
121  subroutine close_c(lunit) bind(C, name='close_f')
122  integer(c_int), value, intent(in) :: lunit
123 
124  close(unit=lunit)
125  end subroutine close_c
126 
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
141  integer :: lio
142 
143  lio = get_c_string_length(cio)
144  if (lio == 0) then
145  io(1:1) = ' '
146  lio = 1
147  else
148  io = transfer(cio(1:lio), io)
149  endif
150  call openbf(bufr_unit, io(1:lio), table_file_id)
151  end subroutine openbf_c
152 
160  recursive subroutine closbf_c(bufr_unit) bind(C, name='closbf_f')
161  integer(c_int), value, intent(in) :: bufr_unit
162 
163  call closbf(bufr_unit)
164  end subroutine closbf_c
165 
171  subroutine exitbufr_c() bind(C, name='exitbufr_f')
172  call exitbufr()
173  end subroutine exitbufr_c
174 
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
195  integer :: ireadmg
196 
197  ires = ireadmg(bufr_unit, f_subset, iddate)
198 
199  if (ires == 0) then
200  call copy_f_c_str(f_subset, c_subset, subset_str_len)
201  end if
202  end function ireadmg_c
203 
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
222 
223  call readmg(bufr_unit, f_subset, iddate, ires)
224 
225  if (ires == 0) then
226  call copy_f_c_str(f_subset, c_subset, subset_str_len)
227  end if
228  end subroutine readmg_c
229 
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
244  integer :: ireadsb
245 
246  ires = ireadsb(bufr_unit)
247  end function ireadsb_c
248 
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
262 
263  call readsb(bufr_unit, ires)
264  end subroutine readsb_c
265 
273  recursive subroutine writsb_c(bufr_unit) bind(C, name='writsb_f')
274  integer(c_int), value, intent(in) :: bufr_unit
275 
276  call writsb(bufr_unit)
277  end subroutine writsb_c
278 
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
292 
293  call writsa(bufr_unit, bufr_len, bufr, nbufr)
294  end subroutine writsa_c
295 
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
314  integer :: lstr
315 
316  lstr = get_c_string_length(table_b_mnemonic)
317  if (lstr == 0) then
318  str(1:1) = ' '
319  lstr = 1
320  else
321  str = transfer(table_b_mnemonic(1:lstr), str)
322  endif
323  call c_f_pointer(c_data, f_data)
324  call ufbint(bufr_unit, f_data, dim_1, dim_2, iret, str(1:lstr))
325  end subroutine ufbint_c
326 
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
345  integer :: lstr
346 
347  lstr = get_c_string_length(table_b_mnemonic)
348  if (lstr == 0) then
349  str(1:1) = ' '
350  lstr = 1
351  else
352  str = transfer(table_b_mnemonic(1:lstr), str)
353  endif
354  call c_f_pointer(c_data, f_data)
355  call ufbrep(bufr_unit, f_data, dim_1, dim_2, iret, str(1:lstr))
356  end subroutine ufbrep_c
357 
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
376  integer :: lstr
377 
378  lstr = get_c_string_length(table_b_mnemonic)
379  if (lstr == 0) then
380  str(1:1) = ' '
381  lstr = 1
382  else
383  str = transfer(table_b_mnemonic(1:lstr), str)
384  endif
385  call c_f_pointer(c_data, f_data)
386  call ufbstp(bufr_unit, f_data, dim_1, dim_2, iret, str(1:lstr))
387  end subroutine ufbstp_c
388 
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
407  integer :: lstr
408 
409  lstr = get_c_string_length(table_b_mnemonic)
410  if (lstr == 0) then
411  str(1:1) = ' '
412  lstr = 1
413  else
414  str = transfer(table_b_mnemonic(1:lstr), str)
415  endif
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))
418  end subroutine ufbevn_c
419 
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
433  integer :: lmtdir
434 
435  lmtdir = get_c_string_length(path)
436  if (lmtdir == 0) then
437  mtdir(1:1) = ' '
438  lmtdir = 1
439  else
440  mtdir = transfer(path(1:lmtdir), mtdir)
441  endif
442  call mtinfo(mtdir(1:lmtdir), file_unit_1, file_unit_2)
443  end subroutine mtinfo_c
444 
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
460 
461  call status(file_unit, lun, il, im)
462  end subroutine status_c
463 
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
486  integer :: ltag
487 
488  ltag = get_c_string_length(mnemonic)
489  if (ltag == 0) then
490  tag(1:1) = ' '
491  ltag = 1
492  else
493  tag = transfer(mnemonic(1:ltag), tag)
494  endif
495 
496  ! Get the unit and description strings
497  call nemdefs ( file_unit, tag(1:ltag), desc_f, unit_f, iret)
498 
499  if (iret == 0) then
500  ! Copy the unit Fortran string into the resulting C-style string.
501  call copy_f_c_str(unit_f, unit_c, min(len(unit_f), unit_str_len))
502  ! Copy the descriptor Fortran string into the resulting C-style string.
503  call copy_f_c_str(desc_f, desc_c, min(len(desc_f), desc_str_len))
504  end if
505  end subroutine nemdefs_c
506 
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
527  integer :: ltag
528 
529  ltag = get_c_string_length(mnemonic)
530  if (ltag == 0) then
531  tag(1:1) = ' '
532  ltag = 1
533  else
534  tag = transfer(mnemonic(1:ltag), tag)
535  endif
536 
537  ! Get the scale, reference and bits
538  call nemspecs(file_unit, tag(1:ltag), mnemonic_idx, scale, reference, bits, iret)
539  end subroutine nemspecs_c
540 
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
560  integer :: ltag
561 
562  ltag = get_c_string_length(mnemonic)
563  if (ltag == 0) then
564  tag(1:1) = ' '
565  ltag = 1
566  else
567  tag = transfer(mnemonic(1:ltag), tag)
568  endif
569 
570  call nemtab(lun, tag(1:ltag), descriptor, table_type_f, table_idx)
571 
572  table_type(1) = table_type_f(1:1)
573  end subroutine nemtab_c
574 
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
597 
598  character(len=25) :: unit_str_f
599 
600  ! Get the scale, reference and bits
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))
603  end subroutine nemtbb_c
604 
611  subroutine get_isc_c(isc_ptr, isc_size) bind(C, name='get_isc_f')
612  use moda_tables
613  type(c_ptr), intent(inout) :: isc_ptr
614  integer(c_int), intent(out) :: isc_size
615 
616  allocate(isc_f(ntab))
617  isc_f(1:ntab) = isc(1:ntab)
618  isc_size = size(isc_f)
619  isc_ptr = c_loc(isc_f(1))
620  end subroutine get_isc_c
621 
628  subroutine get_link_c(link_ptr, link_size) bind(C, name='get_link_f')
629  use moda_tables
630  type(c_ptr), intent(inout) :: link_ptr
631  integer(c_int), intent(out) :: link_size
632 
633  allocate(link_f(ntab))
634  link_f(1:ntab) = link(1:ntab)
635  link_size = size(link_f)
636  link_ptr = c_loc(link_f(1))
637  end subroutine get_link_c
638 
645  subroutine get_itp_c(itp_ptr, itp_size) bind(C, name='get_itp_f')
646  use moda_tables
647  type(c_ptr), intent(inout) :: itp_ptr
648  integer(c_int), intent(out) :: itp_size
649 
650  allocate(itp_f(ntab))
651  itp_f(1:ntab) = itp(1:ntab)
652  itp_size = size(itp_f)
653  itp_ptr = c_loc(itp_f(1))
654  end subroutine get_itp_c
655 
663  subroutine get_typ_c(typ_ptr, typ_len, mem_size) bind(C, name='get_typ_f')
664  use moda_tables
665  type(c_ptr), intent(inout) :: typ_ptr
666  integer(c_int), intent(out) :: typ_len
667  integer(c_int), intent(out) :: mem_size
668 
669  allocate(typ_f(ntab))
670  typ_f(1:ntab) = typ(1:ntab)
671  typ_len = len(typ(1))
672  mem_size = size(typ_f)
673  typ_ptr = c_loc(typ_f(1))
674  end subroutine get_typ_c
675 
683  subroutine get_tag_c(tag_ptr, tag_len, mem_size) bind(C, name='get_tag_f')
684  use moda_tables
685  type(c_ptr), intent(inout) :: tag_ptr
686  integer(c_int), intent(out) :: tag_len
687  integer(c_int), intent(out) :: mem_size
688 
689  allocate(tag_f(ntab))
690  tag_f(1:ntab) = tag(1:ntab)
691  tag_len = len(tag(1))
692  mem_size = size(tag_f)
693  tag_ptr = c_loc(tag_f(1))
694  end subroutine get_tag_c
695 
702  subroutine get_jmpb_c(jmpb_ptr, jmpb_size) bind(C, name='get_jmpb_f')
703  use moda_tables
704  type(c_ptr), intent(inout) :: jmpb_ptr
705  integer(c_int), intent(out) :: jmpb_size
706 
707  allocate(jmpb_f(ntab))
708  jmpb_f(1:ntab) = jmpb(1:ntab)
709  jmpb_size = size(jmpb_f)
710  jmpb_ptr = c_loc(jmpb_f(1))
711  end subroutine get_jmpb_c
712 
719  subroutine get_irf_c(irf_ptr, irf_size) bind(C, name='get_irf_f')
720  use moda_tables
721  type(c_ptr), intent(inout) :: irf_ptr
722  integer(c_int), intent(out) :: irf_size
723 
724  allocate(irf_f(ntab))
725  irf_f(1:ntab) = irf(1:ntab)
726  irf_size = size(irf_f)
727  irf_ptr = c_loc(irf_f(1))
728  end subroutine get_irf_c
729 
736  subroutine get_inode_c(lun, start_node) bind(C, name='get_inode_f')
737  use moda_msgcwd
738  integer(c_int), value, intent(in) :: lun
739  integer(c_int), intent(out) :: start_node
740 
741  start_node = inode(lun)
742  end subroutine get_inode_c
743 
750  subroutine get_nval_c(lun, num_nodes) bind(C, name='get_nval_f')
751  use moda_usrint
752  integer(c_int), value, intent(in) :: lun
753  integer(c_int), intent(out) :: num_nodes
754 
755  num_nodes = nval(lun)
756  end subroutine get_nval_c
757 
765  subroutine get_val_c(lun, val_ptr, val_size) bind(C, name='get_val_f')
766  use moda_usrint
767  integer(c_int), value, intent(in) :: lun
768  type(c_ptr), intent(inout) :: val_ptr
769  integer(c_int), intent(out) :: val_size
770 
771  val_size = size(val(:, lun))
772  val_ptr = c_loc(val(1, lun))
773  end subroutine get_val_c
774 
782  subroutine get_inv_c(lun, inv_ptr, inv_size) bind(C, name='get_inv_f')
783  use moda_usrint
784  integer(c_int), value, intent(in) :: lun
785  type(c_ptr), intent(inout) :: inv_ptr
786  integer(c_int), intent(out) :: inv_size
787 
788  inv_size = size(inv(:, lun))
789  inv_ptr = c_loc(inv(1, lun))
790  end subroutine get_inv_c
791 
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
808 
809  lstr = get_c_string_length(str_id)
810  if (lstr == 0) then
811  str(1:1) = ' '
812  lstr = 1
813  else
814  str = transfer(str_id(1:lstr), str)
815  endif
816 
817  call readlc(lunit, output_str_f, str(1:lstr))
818 
819  output_str_len_f = len(trim(output_str_f)) + 1 ! add 1 for the null terminator
820  call copy_f_c_str(output_str_f, output_str, min(output_str_len_f, output_str_len))
821  end subroutine readlc_c
822 
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
837 
838  lstr = get_c_string_length(str)
839  if (lstr == 0) then
840  my_str(1:1) = ' '
841  lstr = 1
842  else
843  my_str = transfer(str(1:lstr), my_str)
844  endif
845 
846  lchr = get_c_string_length(chr)
847  if (lchr == 0) then
848  my_chr(1:1) = ' '
849  lchr = 1
850  else
851  my_chr = transfer(chr(1:lchr), my_chr)
852  endif
853 
854  call writlc(lunit, my_chr(1:lchr), my_str(1:lstr))
855  end subroutine writlc_c
856 
860  subroutine delete_table_data_c() bind(C, name='delete_table_data_f')
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)
868  end subroutine delete_table_data_c
869 
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
886  integer :: iupbs01, ltag
887  character(len=10) :: tag
888 
889  ltag = get_c_string_length(mnemonic)
890  if (ltag == 0) then
891  tag(1:1) = ' '
892  ltag = 1
893  else
894  tag = transfer(mnemonic(1:ltag), tag)
895  endif
896 
897  ires = iupbs01(bufr,tag(1:ltag))
898  end function iupbs01_c
899 
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
913  integer :: igetprm
914 
915  ires = igetprm(c_f_string(cprmnm))
916  end function igetprm_c
917 
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
932  integer :: isetprm
933 
934  ires = isetprm(c_f_string(cprmnm),ipval)
935  end function isetprm_c
936 
945  subroutine maxout_c(max0) bind(C, name='maxout_f')
946  integer(c_int), value, intent(in) :: max0
947 
948  call maxout(max0)
949  end subroutine maxout_c
950 
960  function igetmxby_c() result(ires) bind(C, name='igetmxby_f')
961  integer(c_int) :: ires
962  integer :: igetmxby
963 
964  ires = igetmxby()
965  end function igetmxby_c
966 
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
981 
982  call cadn30(idn, adn_f)
983  call copy_f_c_str(adn_f, adn, adn_str_len)
984  end subroutine cadn30_c
985 
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
1000  integer :: igetntbi
1001  character(len=1) :: table_type_f
1002 
1003  table_type_f(1:1) = table_type(1)(1:1)
1004 
1005  ires = igetntbi(lun, table_type_f)
1006  end function igetntbi_c
1007 
1017  subroutine elemdx_c(card,lun) bind(C, name='elemdx_f')
1018  integer(c_int), value, intent(in) :: lun
1019  character(kind=c_char), intent(in) :: card(*)
1020  character(len=80) :: card_f
1021  integer :: ii
1022 
1023  do ii = 1,80
1024  card_f(ii:ii) = card(ii)
1025  enddo
1026  call elemdx(card_f, lun)
1027  end subroutine elemdx_c
1028 
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
1045 
1046  character(len=9) :: nemo_f
1047  character(len=1) :: tab_f
1048 
1049  call numtbd(lun, idn, nemo_f, tab_f, iret)
1050 
1051  call copy_f_c_str(nemo_f, nemo, nemo_str_len)
1052  tab(1) = tab_f(1:1)
1053  end subroutine numtbd_c
1054 
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
1068  integer :: ifxy
1069 
1070  ires = ifxy(c_f_string(cfxy))
1071  end function ifxy_c
1072 
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
1092 
1093  call uptdd(id, lun, ient, iret)
1094  end subroutine uptdd_c
1095 
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
1108  integer :: imrkopr
1109 
1110  ires = imrkopr(c_f_string(nemo))
1111  end function imrkopr_c
1112 
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
1125  integer :: istdesc
1126 
1127  ires = istdesc(idn)
1128  end function istdesc_c
1129 
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
1145  integer :: lstr
1146 
1147  lstr = get_c_string_length(table_d_mnemonic)
1148  if (lstr == 0) then
1149  str(1:1) = ' '
1150  lstr = 1
1151  else
1152  str = transfer(table_d_mnemonic(1:lstr), str)
1153  endif
1154  call drfini(bufr_unit, mdrf, ndrf, str(1:lstr))
1155  end subroutine drfini_c
1156 
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
1175  integer :: lstr
1176 
1177  lstr = get_c_string_length(table_d_mnemonic)
1178  if (lstr == 0) then
1179  str(1:1) = ' '
1180  lstr = 1
1181  else
1182  str = transfer(table_d_mnemonic(1:lstr), str)
1183  endif
1184  call c_f_pointer(c_data, f_data)
1185  call ufbseq(bufr_unit, f_data, dim_1, dim_2, iret, str(1:lstr))
1186  end subroutine ufbseq_c
1187 
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
1209  integer :: ireadns
1210 
1211  ires = ireadns(bufr_unit, f_subset, iddate)
1212 
1213  if (ires == 0) then
1214  call copy_f_c_str(f_subset, c_subset, subset_str_len)
1215  end if
1216  end function ireadns_c
1217 
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
1237 
1238  call readns(bufr_unit, f_subset, iddate, ires)
1239 
1240  if (ires == 0) then
1241  call copy_f_c_str(f_subset, c_subset, subset_str_len)
1242  end if
1243  end subroutine readns_c
1244 
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
1257  integer :: ibfms
1258 
1259  ires = ibfms(r8val)
1260  end function ibfms_c
1261 
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
1274 
1275  call strnum(c_f_string(str), num, iret)
1276  end subroutine strnum_c
1277 
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
1295  integer :: ii
1296 
1297  do ii = 1,6
1298  numb_f(ii:ii) = numb(ii)
1299  enddo
1300  do ii = 1,8
1301  nemo_f(ii:ii) = nemo(ii)
1302  enddo
1303  do ii = 1,55
1304  celsq_f(ii:ii) = celsq(ii)
1305  enddo
1306  call stntbi(n, lun, numb_f, nemo_f, celsq_f)
1307  end subroutine stntbi_c
1308 
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
1322  integer :: igettdi
1323 
1324  ires = igettdi(iflag)
1325  end function igettdi_c
1326 
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
1342 
1343  call pktdd(id, lun, idn, iret)
1344  end subroutine pktdd_c
1345 
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
1356  integer :: lers
1357 
1358  lers = get_c_string_length(errstr)
1359  my_errstr = transfer(errstr(1:lers), my_errstr)
1360 
1361  call bort(my_errstr(1:lers))
1362  end subroutine bort_c
1363 
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
1378  integer :: lfs
1379 
1380  lfs = get_c_string_length(c_subset)
1381  if (lfs == 0) then
1382  f_subset(1:1) = ' '
1383  lfs = 1
1384  else
1385  f_subset = transfer(c_subset(1:lfs), f_subset)
1386  endif
1387 
1388  call openmb(bufr_unit, f_subset(1:lfs), iddate)
1389  end subroutine openmb_c
1390 
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
1405  integer :: lfs
1406 
1407  lfs = get_c_string_length(c_subset)
1408  if (lfs == 0) then
1409  f_subset(1:1) = ' '
1410  lfs = 1
1411  else
1412  f_subset = transfer(c_subset(1:lfs), f_subset)
1413  endif
1414 
1415  call openmg(bufr_unit, f_subset(1:lfs), iddate)
1416  end subroutine openmg_c
1417 
1425  recursive subroutine closmg_c(bufr_unit) bind(C, name='closmg_f')
1426  integer(c_int), value, intent(in) :: bufr_unit
1427 
1428  call closmg(bufr_unit)
1429  end subroutine closmg_c
1430 
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
1443 
1444  call bvers(f_cverstr)
1445  call copy_f_c_str(f_cverstr, cverstr, cverstr_len)
1446  end subroutine bvers_c
1447 
1456  recursive subroutine cmpmsg_c(cf) bind(C, name='cmpmsg_f')
1457  character(kind=c_char), intent(in) :: cf(*)
1458  character :: ch
1459 
1460  ch = cf(1)
1461  call cmpmsg(ch)
1462  end subroutine cmpmsg_c
1463 
1475  function catch_borts_c(cf) result(ires) bind(C, name='catch_borts_f')
1476  character(kind=c_char), intent(in) :: cf(*)
1477  character :: ch
1478  integer(c_int) :: ires
1479  integer :: catch_borts
1480 
1481  ch = cf(1)
1482  ires = catch_borts(ch)
1483  end function catch_borts_c
1484 
1494  function bort_target_set_c() result(ires) bind(C, name='bort_target_set_f')
1495  integer(c_int) :: ires
1496  integer :: bort_target_set
1497 
1498  ires = bort_target_set()
1499  end function bort_target_set_c
1500 
1506  subroutine bort_target_unset_c() bind(C, name='bort_target_unset_f')
1507  call bort_target_unset
1508  end subroutine bort_target_unset_c
1509 
1519  subroutine check_for_bort_c(error_str, error_str_len) bind(C, name='check_for_bort_f')
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
1524 
1525  call check_for_bort(error_str_f, error_str_len_f)
1526 
1527  error_str_len_f = error_str_len_f + 1 ! add 1 for the null terminator
1528  call copy_f_c_str(error_str_f, error_str, min(error_str_len_f, error_str_len))
1529  end subroutine check_for_bort_c
1530 
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
1543 
1544  call ufbcnt(lunit, kmsg, ksub)
1545  end subroutine ufbcnt_c
1546 
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
1561  integer :: lcn
1562 
1563  lcn = get_c_string_length(cnemo)
1564  if (lcn == 0) then
1565  nemo(1:1) = ' '
1566  lcn = 1
1567  else
1568  nemo = transfer(cnemo(1:lcn), nemo)
1569  endif
1570  call ufbqcd(lunit, nemo(1:lcn), iqcd)
1571  end subroutine ufbqcd_c
1572 
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
1587  integer :: lnm
1588 
1589  call ufbqcp(lunit, iqcp, nemo)
1590 
1591  lnm = len(trim(nemo)) + 1 ! add 1 for the null terminator
1592  call copy_f_c_str(nemo, cnemo, min(lnm, cnemo_len))
1593  end subroutine ufbqcp_c
1594 
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
1616 
1617  lcni = get_c_string_length(cnemoi)
1618  if (lcni == 0) then
1619  nemoi(1:1) = ' '
1620  lcni = 1
1621  else
1622  nemoi = transfer(cnemoi(1:lcni), nemoi)
1623  endif
1624  lcnd = get_c_string_length(cnemod)
1625  if (lcnd == 0) then
1626  nemod(1:1) = ' '
1627  lcnd = 1
1628  else
1629  nemod = transfer(cnemod(1:lcnd), nemod)
1630  endif
1631 
1632  call getcfmng(lunit, nemoi(1:lcni), ivali, nemod(1:lcnd), ivald, cmeang(1:min(len(cmeang), lcmgc)), lcmg, iret)
1633 
1634  lcmg = lcmg + 1 ! add 1 for the null terminator
1635  call copy_f_c_str(cmeang, cmeang_c, min(lcmg, lcmgc))
1636  end subroutine getcfmng_c
1637 
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
1656  integer :: lcn
1657 
1658  lcn = get_c_string_length(cnemo)
1659  if (lcn == 0) then
1660  nemo(1:1) = ' '
1661  lcn = 1
1662  else
1663  nemo = transfer(cnemo(1:lcn), nemo)
1664  endif
1665  call upftbv(lunit, nemo(1:lcn), val, mxib, ibit, nib)
1666  end subroutine upftbv_c
1667 
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
1686  integer :: lstr
1687 
1688  lstr = get_c_string_length(table_b_mnemonic)
1689  if (lstr == 0) then
1690  str(1:1) = ' '
1691  lstr = 1
1692  else
1693  str = transfer(table_b_mnemonic(1:lstr), str)
1694  endif
1695  call c_f_pointer(c_data, f_data)
1696 
1697  call ufbtab(bufr_unit, f_data, dim_1, dim_2, iret, str(1:lstr))
1698  end subroutine ufbtab_c
1699 
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
1717 
1718  call ufbpos(bufr_unit, irec, isub, f_subset, iddate)
1719 
1720  call copy_f_c_str(f_subset, c_subset, subset_str_len)
1721  end subroutine ufbpos_c
1722 
1730  recursive subroutine datelen_c(len) bind(C, name='datelen_f')
1731  integer(c_int), value, intent(in) :: len
1732 
1733  call datelen(len)
1734  end subroutine datelen_c
1735 
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
1750  integer :: iupvs01, lfs
1751  character(len=12) :: f_s01m
1752 
1753  lfs = get_c_string_length(c_s01m)
1754  if (lfs == 0) then
1755  f_s01m(1:1) = ' '
1756  lfs = 1
1757  else
1758  f_s01m = transfer(c_s01m(1:lfs), f_s01m)
1759  endif
1760 
1761  ires = iupvs01(bufr_unit, f_s01m(1:lfs))
1762  end function iupvs01_c
1763 
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
1776  integer :: nmsub
1777 
1778  ires = nmsub(bufr_unit)
1779  end function nmsub_c
1780 
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
1792  integer :: lfs
1793  character(len=12) :: f_s01m
1794 
1795  lfs = get_c_string_length(c_s01m)
1796  if (lfs == 0) then
1797  f_s01m(1:1) = ' '
1798  lfs = 1
1799  else
1800  f_s01m = transfer(c_s01m(1:lfs), f_s01m)
1801  endif
1802 
1803  call pkvs01(f_s01m(1:lfs), ival)
1804  end subroutine pkvs01_c
1805 
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
1821 
1822  call datebf(bufr_unit, mear, mmon, mday, mour, idate)
1823  end subroutine datebf_c
1824 
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(*)
1837 
1838  call dumpbf(bufr_unit, jdate, jdump)
1839  end subroutine dumpbf_c
1840 
1849  recursive subroutine minimg_c(bufr_unit, mini) bind(C, name='minimg_f')
1850  integer(c_int), value, intent(in) :: bufr_unit, mini
1851 
1852  call minimg(bufr_unit, mini)
1853  end subroutine minimg_c
1854 
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)
1871  integer :: ii, jj
1872 
1873  call upds3(mbay, lcds3, cds3, nds3)
1874  do ii = 1, nds3
1875  do jj = 1, 6
1876  ccds3(jj,ii) = cds3(ii)(jj:jj)
1877  enddo
1878  enddo
1879  end subroutine upds3_c
1880 
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(*)
1894  integer :: lfs
1895  character(len=12) :: f_s1m
1896 
1897  lfs = get_c_string_length(c_s1m)
1898  if (lfs == 0) then
1899  f_s1m(1:1) = ' '
1900  lfs = 1
1901  else
1902  f_s1m = transfer(c_s1m(1:lfs), f_s1m)
1903  endif
1904 
1905  call pkbs1(ival, mbay, f_s1m(1:lfs))
1906  end subroutine pkbs1_c
1907 
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(*)
1923  character :: ch
1924 
1925  ch = cf(1)
1926  call strcpt(ch, iyr, imo, idy, ihr, imi)
1927  end subroutine strcpt_c
1928 
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
1945 
1946  call rtrcpt(lunit, iyr, imo, idy, ihr, imi, iret)
1947  end subroutine rtrcpt_c
1948 
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(*)
1962 
1963  call atrcpt(msgin, lmsgot, msgot)
1964  end subroutine atrcpt_c
1965 
1974  recursive subroutine dxdump_c(lunit, luprt) bind(C, name='dxdump_f')
1975  integer(c_int), value, intent(in) :: lunit, luprt
1976 
1977  call dxdump(lunit, luprt)
1978  end subroutine dxdump_c
1979 
1988  recursive subroutine ufbdmp_c(lunit, luprt) bind(C, name='ufbdmp_f')
1989  integer(c_int), value, intent(in) :: lunit, luprt
1990 
1991  call ufbdmp(lunit, luprt)
1992  end subroutine ufbdmp_c
1993 
2002  recursive subroutine ufdump_c(lunit, luprt) bind(C, name='ufdump_f')
2003  integer(c_int), value, intent(in) :: lunit, luprt
2004 
2005  call ufdump(lunit, luprt)
2006  end subroutine ufdump_c
2007 
2016  recursive subroutine copybf_c(lunin, lunot) bind(C, name='copybf_f')
2017  integer(c_int), value, intent(in) :: lunin, lunot
2018 
2019  call copybf(lunin, lunot)
2020  end subroutine copybf_c
2021 
2030  recursive subroutine copymg_c(lunin, lunot) bind(C, name='copymg_f')
2031  integer(c_int), value, intent(in) :: lunin, lunot
2032 
2033  call copymg(lunin, lunot)
2034  end subroutine copymg_c
2035 
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
2048 
2049  call copysb(lunin, lunot, iret)
2050  end subroutine copysb_c
2051 
2060  recursive subroutine ufbcpy_c(lunin, lunot) bind(C, name='ufbcpy_f')
2061  integer(c_int), value, intent(in) :: lunin, lunot
2062 
2063  call ufbcpy(lunin, lunot)
2064  end subroutine ufbcpy_c
2065 
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
2084 
2085  call readerme(mesg, bufr_unit, f_subset, iddate, ires)
2086 
2087  if (ires == 0) then
2088  call copy_f_c_str(f_subset, c_subset, subset_str_len)
2089  end if
2090  end subroutine readerme_c
2091 
2101  recursive subroutine rdmgsb_c(lunit, imsg, isub) bind(C, name='rdmgsb_f')
2102  integer(c_int), value, intent(in) :: lunit, imsg, isub
2103 
2104  call rdmgsb(lunit, imsg, isub)
2105  end subroutine rdmgsb_c
2106 
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
2120 
2121  call ufbmem(lunit, inew, iret, iunit)
2122  end subroutine ufbmem_c
2123 
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(*)
2138 
2139  call ufbmex(lunit, lundx, inew, iret, mesg)
2140  end subroutine ufbmex_c
2141 
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
2158 
2159  call ufbmms(imsg, isub, f_subset, jdate)
2160 
2161  call copy_f_c_str(f_subset, c_subset, subset_str_len)
2162  end subroutine ufbmms_c
2163 
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
2179 
2180  call ufbmns(irep, f_subset, idate)
2181 
2182  call copy_f_c_str(f_subset, c_subset, subset_str_len)
2183  end subroutine ufbmns_c
2184 
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
2201 
2202  call rdmemm(imsg, f_subset, jdate, ires)
2203 
2204  if (ires == 0) then
2205  call copy_f_c_str(f_subset, c_subset, subset_str_len)
2206  end if
2207  end subroutine rdmemm_c
2208 
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
2220 
2221  call rdmems(isub, ires)
2222  end subroutine rdmems_c
2223 
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
2243  integer :: lstr
2244 
2245  lstr = get_c_string_length(table_b_mnemonic)
2246  if (lstr == 0) then
2247  str(1:1) = ' '
2248  lstr = 1
2249  else
2250  str = transfer(table_b_mnemonic(1:lstr), str)
2251  endif
2252  call c_f_pointer(c_data, f_data)
2253  call ufbrms(imsg, isub, f_data, dim_1, dim_2, iret, str(1:lstr))
2254  end subroutine ufbrms_c
2255 
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
2273  integer :: lstr
2274 
2275  lstr = get_c_string_length(table_b_mnemonic)
2276  if (lstr == 0) then
2277  str(1:1) = ' '
2278  lstr = 1
2279  else
2280  str = transfer(table_b_mnemonic(1:lstr), str)
2281  endif
2282  call c_f_pointer(c_data, f_data)
2283 
2284  call ufbtam(f_data, dim_1, dim_2, iret, str(1:lstr))
2285  end subroutine ufbtam_c
2286 
2294  recursive subroutine cpymem_c(lunot) bind(C, name='cpymem_f')
2295  integer(c_int), value, intent(in) :: lunot
2296 
2297  call cpymem(lunot)
2298  end subroutine cpymem_c
2299 
2308  recursive subroutine ufbcup_c(lunin, lunot) bind(C, name='ufbcup_f')
2309  integer(c_int), value, intent(in) :: lunin, lunot
2310 
2311  call ufbcup(lunin, lunot)
2312  end subroutine ufbcup_c
2313 
2321  recursive subroutine stdmsg_c(cf) bind(C, name='stdmsg_f')
2322  character(kind=c_char), intent(in) :: cf(*)
2323  character :: ch
2324 
2325  ch = cf(1)
2326  call stdmsg(ch)
2327  end subroutine stdmsg_c
2328 
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(*)
2343 
2344  call stndrd(lunit, msgin, lmsgot, msgot)
2345  end subroutine stndrd_c
2346 
2355  recursive subroutine codflg_c(cf) bind(C, name='codflg_f')
2356  character(kind=c_char), intent(in) :: cf(*)
2357  character :: ch
2358 
2359  ch = cf(1)
2360  call codflg(ch)
2361  end subroutine codflg_c
2362 
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
2381  integer :: lfc, lfp
2382 
2383  lfc = get_c_string_length(c_tagch)
2384  if (lfc == 0) then
2385  f_tagch(1:1) = ' '
2386  lfc = 1
2387  else
2388  f_tagch = transfer(c_tagch(1:lfc), f_tagch)
2389  endif
2390 
2391  call gettagpr(bufr_unit, f_tagch(1:lfc), ntagch, f_tagpr, ires)
2392 
2393  lfp = len(trim(f_tagpr)) + 1 ! add 1 for the null terminator
2394  call copy_f_c_str(f_tagpr, c_tagpr, min(lfp, tagpr_len))
2395  end subroutine gettagpr_c
2396 
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
2416  integer :: lfi, lfr
2417 
2418  lfi = get_c_string_length(c_tagi)
2419  if (lfi == 0) then
2420  f_tagi(1:1) = ' '
2421  lfi = 1
2422  else
2423  f_tagi = transfer(c_tagi(1:lfi), f_tagi)
2424  endif
2425 
2426  call gettagre(bufr_unit, f_tagi(1:lfi), ntagi, f_tagre, ntagre, ires)
2427 
2428  lfr = len(trim(f_tagre)) + 1 ! add 1 for the null terminator
2429  call copy_f_c_str(f_tagre, c_tagre, min(lfr, tagre_len))
2430  end subroutine gettagre_c
2431 
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(*)
2445 
2446  call cnved4(msgin, lmsgot, msgot)
2447  end subroutine cnved4_c
2448 
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
2464  integer :: lcmgdf, lfs
2465 
2466  lfs = get_c_string_length(c_subset)
2467  if (lfs == 0) then
2468  f_subset(1:1) = ' '
2469  lfs = 1
2470  else
2471  f_subset = transfer(c_subset(1:lfs), f_subset)
2472  endif
2473 
2474  ires = lcmgdf(bufr_unit, f_subset(1:lfs))
2475  end function lcmgdf_c
2476 
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
2496  integer :: lfp, lfn
2497 
2498  lfp = get_c_string_length(c_tagpv)
2499  if (lfp == 0) then
2500  f_tagpv(1:1) = ' '
2501  lfp = 1
2502  else
2503  f_tagpv = transfer(c_tagpv(1:lfp), f_tagpv)
2504  endif
2505  lfn = get_c_string_length(c_tagnb)
2506  if (lfn == 0) then
2507  f_tagnb(1:1) = ' '
2508  lfn = 1
2509  else
2510  f_tagnb = transfer(c_tagnb(1:lfn), f_tagnb)
2511  endif
2512 
2513  call setvalnb(bufr_unit, f_tagpv(1:lfp), ntagpv, f_tagnb(1:lfn), ntagnb, r8val, ires)
2514  end subroutine setvalnb_c
2515 
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
2534  integer :: lfp, lfn
2535  real*8 :: getvalnb
2536 
2537  lfp = get_c_string_length(c_tagpv)
2538  if (lfp == 0) then
2539  f_tagpv(1:1) = ' '
2540  lfp = 1
2541  else
2542  f_tagpv = transfer(c_tagpv(1:lfp), f_tagpv)
2543  endif
2544  lfn = get_c_string_length(c_tagnb)
2545  if (lfn == 0) then
2546  f_tagnb(1:1) = ' '
2547  lfn = 1
2548  else
2549  f_tagnb = transfer(c_tagnb(1:lfn), f_tagnb)
2550  endif
2551 
2552  r8val = getvalnb(bufr_unit, f_tagpv(1:lfp), ntagpv, f_tagnb(1:lfn), ntagnb)
2553  end function getvalnb_c
2554 
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)
2570  integer :: ii, jj
2571 
2572  call getabdb(lunit, tabdb, itab, jtab)
2573  do ii = 1, jtab
2574  do jj = 1, 128
2575  ctabdb(jj,ii) = tabdb(ii)(jj:jj)
2576  enddo
2577  enddo
2578  end subroutine getabdb_c
2579 
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
2597  integer :: lstr
2598 
2599  lstr = get_c_string_length(table_b_mnemonic)
2600  if (lstr == 0) then
2601  str(1:1) = ' '
2602  lstr = 1
2603  else
2604  str = transfer(table_b_mnemonic(1:lstr), str)
2605  endif
2606 
2607  call ufbget(bufr_unit, tab, i1, iret, str(1:lstr))
2608  end subroutine ufbget_c
2609 
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
2631  integer :: lstr
2632 
2633  lstr = get_c_string_length(table_b_mnemonic)
2634  if (lstr == 0) then
2635  str(1:1) = ' '
2636  lstr = 1
2637  else
2638  str = transfer(table_b_mnemonic(1:lstr), str)
2639  endif
2640 
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))
2643  end subroutine ufbinx_c
2644 
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
2664  integer :: lstr
2665 
2666  lstr = get_c_string_length(table_b_mnemonic)
2667  if (lstr == 0) then
2668  str(1:1) = ' '
2669  lstr = 1
2670  else
2671  str = transfer(table_b_mnemonic(1:lstr), str)
2672  endif
2673 
2674  call c_f_pointer(c_data, f_data)
2675  call ufbovr(bufr_unit, f_data, dim_1, dim_2, iret, str(1:lstr))
2676  end subroutine ufbovr_c
2677 
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
2690  integer :: ifbget
2691 
2692  ires = ifbget(bufr_unit)
2693  end function ifbget_c
2694 
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
2707  integer :: igetsc
2708 
2709  ires = igetsc(bufr_unit)
2710  end function igetsc_c
2711 
2720  recursive subroutine wrdxtb_c(lundx, lunot) bind(C, name='wrdxtb_f')
2721  integer(c_int), value, intent(in) :: lundx, lunot
2722 
2723  call wrdxtb(lundx, lunot)
2724  end subroutine wrdxtb_c
2725 
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
2737 
2738  call mesgbf(lunit, mesgtyp)
2739  end subroutine mesgbf_c
2740 
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
2753 
2754  call mesgbc(lunin, mesgtyp, icomp)
2755  end subroutine mesgbc_c
2756 
2765  recursive subroutine invmrg_c(lubfi, lubfj) bind(C, name='invmrg_f')
2766  integer(c_int), value, intent(in) :: lubfi, lubfj
2767 
2768  call invmrg(lubfi, lubfj)
2769  end subroutine invmrg_c
2770 
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
2786  integer :: iupm
2787  character(len=16) :: f_cbay
2788 
2789  f_cbay = transfer(cbay(1:lcbay), f_cbay)
2790 
2791  ires = iupm(f_cbay(1:lcbay), nbits)
2792  end function iupm_c
2793 
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
2808  integer :: nbytp1
2809 
2810  call ipkm(f_cbay, nbyt, ival)
2811 
2812  nbytp1 = nbyt + 1 ! add 1 for the null terminator
2813  call copy_f_c_str(f_cbay, cbay, min(nbytp1, cbay_len))
2814  end subroutine ipkm_c
2815 
2816 end module bufr_c2f_interface
integer function igetprm(cprmnm)
Return the current value of a parameter used for allocating one or more internal arrays within the NC...
Definition: arallocf.F90:1127
subroutine exitbufr
Free all dynamically-allocated memory, close all logical units that are open within the NCEPLIBS-bufr...
Definition: arallocf.F90:900
recursive integer function isetprm(cprmnm, ipval)
Set a specified parameter to a specified value for use in dynamically allocating one or more internal...
Definition: arallocf.F90:995
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...
Definition: bitmaps.F90:110
integer function imrkopr(nemo)
Check whether a specified mnemonic is a Table C marker operator.
Definition: bitmaps.F90:376
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...
Definition: borts.F90:204
recursive subroutine bort(str)
Log an error message, then either return to or abort the application program.
Definition: borts.F90:15
integer function catch_borts(cbc)
Specify whether subsequent bort errors should be caught and returned to the application program.
Definition: borts.F90:119
subroutine bort_target_unset
Clear any existing bort target.
Definition: borts.F90:180
integer function bort_target_set()
Sets a new bort target, if bort catching is enabled and such a target doesn't already exist.
Definition: borts.F90:160
recursive subroutine ufbqcd(lunit, nemo, iqcd)
Given a mnemonic associated with a category 63 Table D descriptor from an NCEP prepbufr file,...
Definition: cftbvs.F90:421
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...
Definition: cftbvs.F90:493
recursive subroutine upftbv(lunit, nemo, val, mxib, ibit, nib)
Given a Table B mnemonic with flag table units and a corresponding numerical data value,...
Definition: cftbvs.F90:68
recursive subroutine getcfmng(lunit, nemoi, ivali, nemod, ivald, cmeang, lnmng, iret)
Decode the meaning of a numerical value from a code or flag table.
Definition: cftbvs.F90:229
recursive integer function iupm(cbay, nbits)
Decode an integer value from within a specified number of bits of a character string,...
Definition: cidecode.F90:263
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 ...
Definition: ciencode.F90:194
recursive subroutine cmpmsg(cf)
Specify whether BUFR messages output by future calls to message-writing subroutines and subset-writin...
Definition: compress.F90:33
recursive subroutine copybf(lunin, lunot)
Copy an entire BUFR file from one Fortran logical unit to another.
Definition: copydata.F90:23
recursive subroutine ufbcup(lubin, lubot)
Copy unique elements of a data subset.
Definition: copydata.F90:804
recursive subroutine copysb(lunin, lunot, iret)
Copy a BUFR data subset from one Fortran logical unit to another.
Definition: copydata.F90:219
recursive subroutine cpymem(lunot)
Copy a BUFR message from internal arrays to a file.
Definition: copydata.F90:456
recursive subroutine ufbcpy(lubin, lubot)
Copy a BUFR data subset from one Fortran logical unit to another.
Definition: copydata.F90:640
recursive subroutine copymg(lunin, lunot)
Copy a BUFR message from one file to another.
Definition: copydata.F90:116
recursive subroutine ufdump(lunit, luprt)
Print a verbose listing of the contents of a data subset, including all data values and replicated se...
Definition: dumpdata.F90:236
recursive subroutine getabdb(lunit, tabdb, itab, jtab)
Get Table B and Table D information from the internal DX BUFR tables.
Definition: dumpdata.F90:857
recursive subroutine dxdump(lunit, ldxot)
Print a copy of the DX BUFR table associated with a specified Fortran logical unit.
Definition: dumpdata.F90:599
recursive subroutine ufbdmp(lunin, luprt)
Print a verbose listing of the contents of a data subset, including all data values and replicated se...
Definition: dumpdata.F90:42
subroutine elemdx(card, lun)
Decode the scale factor, reference value, bit width and units (i.e., the "elements") from a Table B m...
Definition: dxtable.F90:514
subroutine nemtbb(lun, itab, unit, iscl, iref, ibit)
Get information about a Table B descriptor from the internal DX BUFR tables.
Definition: dxtable.F90:1275
recursive subroutine wrdxtb(lundx, lunot)
Generate one or more BUFR messages from the DX BUFR tables information associated with a given BUFR f...
Definition: dxtable.F90:838
subroutine stntbi(n, lun, numb, nemo, celsq)
Store a new entry within internal BUFR Table B or D.
Definition: dxtable.F90:1636
subroutine pktdd(id, lun, idn, iret)
Store information about a child mnemonic within the internal BUFR Table D.
Definition: dxtable.F90:1681
recursive subroutine nemdefs(lunit, nemo, celem, cunit, iret)
Get the element name and units associated with a Table B descriptor.
Definition: dxtable.F90:1443
integer function igetntbi(lun, ctb)
Get the next available index for storing an entry within a specified internal DX BUFR table.
Definition: dxtable.F90:1150
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...
Definition: dxtable.F90:1755
subroutine nemtab(lun, nemo, idn, tab, iret)
Get information about a descriptor, based on a mnemonic.
Definition: fxy.F90:434
subroutine cadn30(idn, adn)
Convert an FXY value from its WMO bit-wise representation to its 6 character representation.
Definition: fxy.F90:65
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...
Definition: fxy.F90:290
integer function ifxy(adsc)
Convert an FXY value from its 6 character representation to its WMO bit-wise representation.
Definition: fxy.F90:152
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...
Definition: mastertable.F90:35
recursive subroutine rdmems(isub, iret)
Read a specified data subset from the BUFR message that was most recently read via a call to subrouti...
Definition: memmsgs.F90:649
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...
Definition: memmsgs.F90:493
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...
Definition: memmsgs.F90:39
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...
Definition: memmsgs.F90:221
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...
Definition: memmsgs.F90:938
recursive subroutine ufbrms(imsg, isub, usr, i1, i2, iret, str)
Read one or more data values from a data subset in internal arrays.
Definition: memmsgs.F90:1013
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...
Definition: memmsgs.F90:1146
recursive subroutine ufbmms(imsg, isub, subset, jdate)
Read a specified data subset from internal arrays.
Definition: memmsgs.F90:858
recursive subroutine bvers(cverstr)
Get the version number of the NCEPLIBS-bufr software.
Definition: misc.F90:361
recursive integer function igetsc(lunit)
Check for an abnormal status code associated with the processing of a file.
Definition: misc.F90:437
recursive subroutine strnum(str, num, iret)
Decode an integer from a character string.
Definition: misc.F90:156
integer function ibfms(r8val)
Check whether a real*8 data value returned from a previous call to any of the NCEPLIBS-bufr values-re...
Definition: missing.F90:25
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.
Definition: readwritemg.F90:44
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.
Definition: readwritesb.F90:32
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.
Definition: s013vals.F90:245
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...
Definition: s013vals.F90:981
recursive integer function iupvs01(lunit, s01mnem)
Read a specified value from within Section 0 or 1 of a BUFR message.
Definition: s013vals.F90:436
recursive subroutine pkbs1(ival, mbay, s1mnem)
Write a specified value into a specified location within Section 1 of a BUFR message,...
Definition: s013vals.F90:524
recursive subroutine minimg(lunit, mini)
Write a minutes value into Section 1 of the BUFR message that was most recently opened for writing vi...
Definition: s013vals.F90:1276
recursive subroutine upds3(mbay, lcds3, cds3, nds3)
Read the sequence of data descriptors contained within Section 3 of a BUFR message.
Definition: s013vals.F90:850
recursive subroutine mesgbf(lunit, mesgtyp)
Read through a BUFR file (starting from the beginning of the file) and return the message type (from ...
Definition: s013vals.F90:1640
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...
Definition: s013vals.F90:925
recursive subroutine dumpbf(lunit, jdate, jdump)
Read the Section 1 date-time from the first two "dummy" messages of an NCEP dump file.
Definition: s013vals.F90:1182
recursive subroutine mesgbc(lunin, mesgtyp, icomp)
Return the message type (from Section 1) and message compression indicator (from Section 3) of a BUFR...
Definition: s013vals.F90:1541
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...
Definition: s013vals.F90:632
recursive subroutine stndrd(lunit, msgin, lmsgot, msgot)
Standardize a BUFR message.
Definition: standard.F90:87
recursive subroutine stdmsg(cf)
Specify whether BUFR messages output by future calls to message-writing subroutines and subset-writin...
Definition: standard.F90:36
integer function istdesc(idn)
Given the WMO bit-wise representation of an FXY value for a descriptor, check whether the descriptor ...
Definition: standard.F90:317
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...
Definition: tankrcpt.F90:272
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.
Definition: tankrcpt.F90:193
recursive subroutine atrcpt(msgin, lmsgot, msgot)
Read an input message and output an equivalent BUFR message with a tank receipt time added to Section...
Definition: tankrcpt.F90:24