Unidata / netcdf-fortran

Official GitHub repository for netCDF-Fortran libraries, which depend on the netCDF C library. Install the netCDF C library first.
Other
244 stars 98 forks source link

fix intents and variable types in interfaces #424

Closed rwirth closed 10 months ago

rwirth commented 11 months ago

Fix a few intents, array-ness, and type of arguments in the nf and nf90 interfaces.

Fixes #417

CLAassistant commented 11 months ago

CLA assistant check
All committers have signed the CLA.

skosukhin commented 10 months ago

It might make sense to fix fortran/nf_nc4.F90 as well:

diff --git a/fortran/nf_nc4.F90 b/fortran/nf_nc4.F90
index 30ea9ee..a1b58f2 100755
--- a/fortran/nf_nc4.F90
+++ b/fortran/nf_nc4.F90
@@ -566,11 +566,11 @@

  Implicit NONE

- Integer,          Intent(IN)    :: ncid, xtype, field_typeid, offset, ndims
- Character(LEN=*), Intent(IN)    :: name
- Integer,          Intent(INOUT) :: dim_sizes(*)
+ Integer,          Intent(IN) :: ncid, xtype, field_typeid, offset, ndims
+ Character(LEN=*), Intent(IN) :: name
+ Integer,          Intent(IN) :: dim_sizes(*)

- Integer                         :: status
+ Integer                      :: status

  Integer(C_INT)               :: cncid, cxtype, ctypeid, cndims, cstatus
  Integer(C_SIZE_T)            :: coffset
@@ -1370,10 +1370,10 @@

  Implicit NONE

- Integer, Intent(IN)    :: ncid, varid, contiguous
- Integer, Intent(INOUT) :: chunksizes(*)
+ Integer, Intent(IN) :: ncid, varid, contiguous
+ Integer, Intent(IN) :: chunksizes(*)

- Integer                :: status
+ Integer             :: status

  Integer(C_INT) :: cncid, cvarid, ccontiguous, cstat1, cstatus, &
                    cndims
RobertPincus commented 10 months ago

@WardF Any possibility of merging this PR? I collaborate with the group in which @rwirth and @skosukhin work and am happy for the support of the very strict NAG compiler. (It's also possible that these errors descend from my initial Fortran 90 interface for netCDF written in the late 1990s).

WardF commented 10 months ago

Thanks for the ping; I've been focused on the C PR backlog. Running tests now and will get merged.