Skip to content

Commit

Permalink
more fortran wrappers
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardhartnett committed Dec 22, 2024
1 parent 198b655 commit 76d4f4a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/g2c_interface.F90
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ function g2c_inq_dim(g2id, msg_num, prod_num, dim_num, len, name, val) bind(c)
integer(c_int), intent(out) :: prod_num, dim_num
integer(c_size_t), intent(out) :: len
character(c_char), intent(in) :: name(*)
real(c_float), intent(out) :: val
real(c_float), intent(out) :: val(*)
integer(c_int) :: g2c_inq_dim
end function g2c_inq_dim

Expand Down
6 changes: 4 additions & 2 deletions src/g2cf.F90
Original file line number Diff line number Diff line change
Expand Up @@ -361,10 +361,11 @@ function g2cf_inq_dim(g2id, msg_num, prod_num, dim_num, len, name, val) result(s
integer(c_int) :: g2cid, cmsg_num, cprod_num, cdim_num
integer(c_size_t) :: clen
character(c_char) :: cname(G2_MAX_NAME)
real(c_float) :: cval(*)
real(c_float) :: cval(10)

integer(c_int) :: cstatus
integer :: status
integer(kind = 8) :: i

! Copy input params to C types.
g2cid = g2id
Expand All @@ -377,7 +378,8 @@ function g2cf_inq_dim(g2id, msg_num, prod_num, dim_num, len, name, val) result(s

! Copy output params to Fortran types.
len = clen
name = cname
name(1) = ''
!name = cname
do i = 1, len
val(i) = cval(i)
end do
Expand Down

0 comments on commit 76d4f4a

Please sign in to comment.