Skip to content

Commit

Permalink
Merge pull request #424 from rwirth/issue_417
Browse files Browse the repository at this point in the history
fix intents and variable types in interfaces
  • Loading branch information
WardF authored Jan 29, 2024
2 parents 4be252a + 2d8ba90 commit c96bb4b
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 28 deletions.
12 changes: 6 additions & 6 deletions fortran/module_netcdf4_nc_interfaces.F90
Original file line number Diff line number Diff line change
Expand Up @@ -310,13 +310,13 @@ Function nc_insert_array_compound_f(ncid, xtype, name, offset, field_typeid, &

USE ISO_C_BINDING, ONLY: C_INT, C_SIZE_T, C_CHAR

Integer(C_INT), VALUE :: ncid, ndims
Integer(C_INT), VALUE :: xtype, field_typeid ! nc_type in C
Integer(C_SIZE_T), VALUE :: offset
Character(KIND=C_CHAR), Intent(IN) :: name(*)
Integer(C_INT), Intent(INOUT) :: dim_sizes(*)
Integer(C_INT), VALUE :: ncid, ndims
Integer(C_INT), VALUE :: xtype, field_typeid ! nc_type in C
Integer(C_SIZE_T), VALUE :: offset
Character(KIND=C_CHAR), Intent(IN) :: name(*)
Integer(C_INT), Intent(IN) :: dim_sizes(*)

Integer(C_INT) :: nc_insert_array_compound_f
Integer(C_INT) :: nc_insert_array_compound_f

End Function nc_insert_array_compound_f
End Interface
Expand Down
14 changes: 7 additions & 7 deletions fortran/module_netcdf4_nf_interfaces.F90
Original file line number Diff line number Diff line change
Expand Up @@ -217,10 +217,10 @@ End Function nf_insert_compound
Function nf_insert_array_compound( ncid, xtype, name, offset, field_typeid, &
ndims, dim_sizes) RESULT (status)

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

End Function nf_insert_array_compound
End Interface
Expand Down Expand Up @@ -483,9 +483,9 @@ End Function nf_inq_opaque
Function nf_def_var_chunking( ncid, varid, contiguous, chunksizes) &
RESULT(status)

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

End Function nf_def_var_chunking
End Interface
Expand Down
16 changes: 8 additions & 8 deletions fortran/netcdf4_func.F90
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ function nf90_inq_dimids(ncid, ndims, dimids, include_parents)
integer, intent(in) :: ncid
integer, intent(out) :: ndims
integer, dimension(:), intent(out) :: dimids
integer, intent(out) :: include_parents
integer, intent(in) :: include_parents
integer :: nf90_inq_dimids

nf90_inq_dimids = nf_inq_dimids(ncid, ndims, dimids, include_parents)
Expand Down Expand Up @@ -255,7 +255,7 @@ function nf90_insert_array_compound(ncid, xtype, name, offset, field_typeid, &
integer, intent(in) :: offset
integer, intent(in) :: field_typeid
integer, intent(in) :: ndims
integer, intent(in) :: dim_sizes
integer, dimension(:), intent(in) :: dim_sizes
integer :: nf90_insert_array_compound

nf90_insert_array_compound = nf_insert_array_compound(ncid, xtype, name, &
Expand Down Expand Up @@ -319,7 +319,7 @@ function nf90_inq_compound_field(ncid, xtype, fieldid, name, offset, &
integer, intent(out) :: offset
integer, intent(out) :: field_typeid
integer, intent(out) :: ndims
integer, intent(out) :: dim_sizes
integer, dimension(:), intent(out) :: dim_sizes
integer :: nf90_inq_compound_field

nf90_inq_compound_field = nf_inq_compound_field(ncid, xtype, fieldid, name, offset, &
Expand Down Expand Up @@ -380,7 +380,7 @@ function nf90_inq_cmp_fielddim_sizes(ncid, xtype, fieldid, dim_sizes)
integer, intent(in) :: ncid
integer, intent(in) :: xtype
integer, intent(in) :: fieldid
integer, intent(out) :: dim_sizes
integer, dimension(:), intent(out) :: dim_sizes
integer :: nf90_inq_cmp_fielddim_sizes

nf90_inq_cmp_fielddim_sizes = nf_inq_compound_fielddim_sizes(ncid, xtype, fieldid, dim_sizes)
Expand Down Expand Up @@ -464,20 +464,20 @@ function nf90_inq_enum_member(ncid, xtype, idx, name, value)
integer, intent(in) :: xtype
integer, intent(in) :: idx
character (len = *), intent(out) :: name
integer, intent(in) :: value
integer, intent(out) :: value
integer :: nf90_inq_enum_member

nf90_inq_enum_member = nf_inq_enum_member(ncid, xtype, idx, name, value)
end function nf90_inq_enum_member
! -----------
function nf90_inq_enum_ident(ncid, xtype, value, idx)
function nf90_inq_enum_ident(ncid, xtype, value, identifier)
integer, intent(in) :: ncid
integer, intent(in) :: xtype
integer, intent(in) :: value
integer, intent(out) :: idx
character (len = *), intent(out) :: identifier
integer :: nf90_inq_enum_ident

nf90_inq_enum_ident = nf_inq_enum_ident(ncid, xtype, value, idx)
nf90_inq_enum_ident = nf_inq_enum_ident(ncid, xtype, value, identifier)
end function nf90_inq_enum_ident
! -----------
function nf90_def_opaque(ncid, size, name, xtype)
Expand Down
14 changes: 7 additions & 7 deletions fortran/nf_nc4.F90
Original file line number Diff line number Diff line change
Expand Up @@ -566,11 +566,11 @@ Function nf_insert_array_compound( ncid, xtype, name, offset, field_typeid, &

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
Expand Down Expand Up @@ -1370,10 +1370,10 @@ Function nf_def_var_chunking( ncid, varid, contiguous, chunksizes) &

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
Expand Down

0 comments on commit c96bb4b

Please sign in to comment.