From cc56600acb39d22db97225ca2ab52cb25ef4465c Mon Sep 17 00:00:00 2001 From: Roland Wirth Date: Fri, 8 Dec 2023 18:37:21 +0100 Subject: [PATCH] fix intents and variable types in interfaces --- fortran/module_netcdf4_nf_interfaces.F90 | 14 +++++++------- fortran/netcdf4_func.F90 | 16 ++++++++-------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/fortran/module_netcdf4_nf_interfaces.F90 b/fortran/module_netcdf4_nf_interfaces.F90 index 158e4f97..7f2fe9d2 100755 --- a/fortran/module_netcdf4_nf_interfaces.F90 +++ b/fortran/module_netcdf4_nf_interfaces.F90 @@ -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 @@ -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 diff --git a/fortran/netcdf4_func.F90 b/fortran/netcdf4_func.F90 index 0b92d656..bf1b99f8 100644 --- a/fortran/netcdf4_func.F90 +++ b/fortran/netcdf4_func.F90 @@ -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) @@ -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, & @@ -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, & @@ -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) @@ -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)