Skip to content

Commit

Permalink
Add 'int()' to some input params in bufr_c2f_interface
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderRichert-NOAA committed Nov 13, 2023
1 parent 1f7bb78 commit 4dbd728
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/bufr_c2f_interface.F90
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ function ireadmg_c(bufr_unit, c_subset, iddate, subset_str_len) result(ires) bin
character(len=25) :: f_subset
integer :: ireadmg

ires = ireadmg(bufr_unit, f_subset, iddate)
ires = ireadmg(int(bufr_unit), f_subset, iddate)

if (ires == 0) then
call copy_f_c_str(f_subset, c_subset, int(subset_str_len))
Expand All @@ -194,7 +194,7 @@ function ireadsb_c(bufr_unit) result(ires) bind(C, name='ireadsb_f')
integer(c_int) :: ires
integer :: ireadsb

ires = ireadsb(bufr_unit)
ires = ireadsb(int(bufr_unit))
end function ireadsb_c

!> Read/write one or more data values from/to a data subset.
Expand Down Expand Up @@ -678,8 +678,7 @@ function isetprm_c(cprmnm,ipval) result(ires) bind(C, name='isetprm_f')
integer(c_int), value, intent(in) :: ipval
integer(c_int) :: ires
integer :: isetprm

ires = isetprm(c_f_string(cprmnm),ipval)
ires = isetprm(c_f_string(cprmnm),int(ipval))
end function isetprm_c

!> Define a customized maximum length for output BUFR messages.
Expand Down Expand Up @@ -750,7 +749,7 @@ function igetntbi_c(lun, table_type) result(ires) bind(C, name='igetntbi_f')

table_type_f(1:1) = table_type(1)(1:1)

ires = igetntbi(lun, table_type_f)
ires = igetntbi(int(lun), table_type_f)
end function igetntbi_c

!> Decode the scale factor, reference value, bit width, and units from a Table B
Expand Down Expand Up @@ -921,7 +920,7 @@ function ireadns_c(bufr_unit, c_subset, iddate, subset_str_len) result(ires) bin
character(len=25) :: f_subset
integer :: ireadns

ires = ireadns(bufr_unit, f_subset, iddate)
ires = ireadns(int(bufr_unit), f_subset, iddate)

if (ires == 0) then
call copy_f_c_str(f_subset, c_subset, subset_str_len)
Expand All @@ -942,7 +941,7 @@ function ibfms_c(r8val) result(ires) bind(C, name='ibfms_f')
integer(c_int) :: ires
integer :: ibfms

ires = ibfms(r8val)
ires = ibfms(int(r8val))
end function ibfms_c

!> Decode an integer from a character string.
Expand Down Expand Up @@ -1007,7 +1006,7 @@ function igettdi_c(iflag) result(ires) bind(C, name='igettdi_f')
integer(c_int) :: ires
integer :: igettdi

ires = igettdi(iflag)
ires = igettdi(int(iflag))
end function igettdi_c

!> Store information about a child mnemonic within the internal arrays.
Expand Down

0 comments on commit 4dbd728

Please sign in to comment.