From 060519efa16f4f91227f70914751585a2440ae22 Mon Sep 17 00:00:00 2001 From: Edward Hartnett Date: Wed, 8 Nov 2023 06:59:57 -0700 Subject: [PATCH] more work on netcdf out --- model/src/w3iopomd.F90 | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/model/src/w3iopomd.F90 b/model/src/w3iopomd.F90 index f951cce5b..e2eb6ca6f 100644 --- a/model/src/w3iopomd.F90 +++ b/model/src/w3iopomd.F90 @@ -1079,6 +1079,7 @@ SUBROUTINE W3IOPON_READ (NDSOP, IOTST, IMOD, filename, ncerr) integer, intent(inout) :: ncerr integer :: fh integer :: d_nopts, d_nspec, d_vsize, d_namelen, d_grdidlen + integer :: d_nopts_len, d_nspec_len, d_vsize_len, d_namelen_len, d_grdidlen_len IOTST = 0 @@ -1087,8 +1088,12 @@ SUBROUTINE W3IOPON_READ (NDSOP, IOTST, IMOD, filename, ncerr) if (ncerr .ne. 0) return ! Read the dimension information. -! ncerr = nc90_inq_dir( - + ncerr = nc90_inq_dimid(fh, DNAME_NOPTS, d_nopts) + if (ncerr .ne. 0) return + ncerr = nc90_inquire_dimension(fh, d_nopts, len = d_nopts_len) + if (ncerr .ne. 0) return + print *, 'd_nopts_len = ', d_nopts_len + ! Close the file. ncerr = nf90_close(fh) if (ncerr .ne. 0) return