From 76d4f4a52627c17e875ce4016482fa527217cf5e Mon Sep 17 00:00:00 2001 From: Edward Hartnett Date: Sun, 22 Dec 2024 09:07:42 -0700 Subject: [PATCH] more fortran wrappers --- src/g2c_interface.F90 | 2 +- src/g2cf.F90 | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/g2c_interface.F90 b/src/g2c_interface.F90 index b7d717d5..a9e277c0 100644 --- a/src/g2c_interface.F90 +++ b/src/g2c_interface.F90 @@ -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 diff --git a/src/g2cf.F90 b/src/g2cf.F90 index 875c9cb3..d29078af 100644 --- a/src/g2cf.F90 +++ b/src/g2cf.F90 @@ -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 @@ -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