Skip to content

Commit

Permalink
use assumed shapes instead of legacy assumed sizes, Merged io_netcdf_…
Browse files Browse the repository at this point in the history
…module.F90 io_netcdf_file_module.F90 from razvan_nextgems_multio
  • Loading branch information
suvarchal committed Oct 11, 2023
1 parent 002b003 commit 87e271e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions src/io_netcdf_file_module.F90
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ subroutine read_var_r8(this, varindex, starts, sizes, values)
class(netcdf_file_type), intent(in) :: this
integer, intent(in) :: varindex
integer, dimension(:) :: starts, sizes
real(8), intent(inout), target :: values(..) ! must be inout or the allocation might be screwed
real(8), intent(inout), target :: values(:) ! must be inout or the allocation might be screwed
! EO parameters
include "netcdf.inc"
real(8), pointer :: values_ptr(:)
Expand All @@ -324,7 +324,7 @@ subroutine read_var_r4(this, varindex, starts, sizes, values)
class(netcdf_file_type), intent(in) :: this
integer, intent(in) :: varindex
integer, dimension(:) :: starts, sizes
real(4), intent(inout), target :: values(..) ! must be inout or the allocation might be screwed
real(4), intent(inout), target :: values(:) ! must be inout or the allocation might be screwed
! EO parameters
include "netcdf.inc"
real(4), pointer :: values_ptr(:)
Expand All @@ -344,7 +344,7 @@ subroutine read_var_integer(this, varindex, starts, sizes, values)
class(netcdf_file_type), intent(in) :: this
integer, intent(in) :: varindex
integer, dimension(:) :: starts, sizes
integer, intent(inout), target :: values(..) ! must be inout or the allocation might be screwed
integer, intent(inout), target :: values(:) ! must be inout or the allocation might be screwed
! EO parameters
include "netcdf.inc"
integer, pointer :: values_ptr(:)
Expand Down Expand Up @@ -474,7 +474,7 @@ subroutine write_var_r8(this, varindex, starts, sizes, values)
class(netcdf_file_type), intent(in) :: this
integer, intent(in) :: varindex
integer, dimension(:) :: starts, sizes
real(8), intent(in), target :: values(..) ! must be inout or the allocation might be screwed
real(8), intent(in), target :: values(:) ! must be inout or the allocation might be screwed
! EO parameters
include "netcdf.inc"
real(8), pointer :: values_ptr(:)
Expand All @@ -493,7 +493,7 @@ subroutine write_var_r4(this, varindex, starts, sizes, values)
class(netcdf_file_type), intent(in) :: this
integer, intent(in) :: varindex
integer, dimension(:) :: starts, sizes
real(4), intent(in), target :: values(..) ! must be inout or the allocation might be screwed
real(4), intent(in), target :: values(:) ! must be inout or the allocation might be screwed
! EO parameters
include "netcdf.inc"
real(4), pointer :: values_ptr(:)
Expand All @@ -512,7 +512,7 @@ subroutine write_var_integer(this, varindex, starts, sizes, values)
class(netcdf_file_type), intent(in) :: this
integer, intent(in) :: varindex
integer, dimension(:) :: starts, sizes
integer, intent(in), target :: values(..) ! must be inout or the allocation might be screwed
integer, intent(in), target :: values(:) ! must be inout or the allocation might be screwed
! EO parameters
include "netcdf.inc"
integer, pointer :: values_ptr(:)
Expand Down
4 changes: 2 additions & 2 deletions src/io_netcdf_module.F90
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ subroutine read_values_r8(this, timeindex, values)
use, intrinsic :: ISO_C_BINDING
class(netcdf_variable_handle), intent(in) :: this
integer, intent(in) :: timeindex
real(8), intent(inout), target :: values(..) ! must be inout or the allocation might be screwed
real(8), intent(inout), target :: values(:) ! must be inout or the allocation might be screwed
! EO args
real(8), pointer :: values_ptr(:)
integer, allocatable, dimension(:) :: starts, sizes
Expand All @@ -125,7 +125,7 @@ subroutine read_values_r4(this, timeindex, values)
use, intrinsic :: ISO_C_BINDING
class(netcdf_variable_handle), intent(in) :: this
integer, intent(in) :: timeindex
real(4), intent(inout), target :: values(..) ! must be inout or the allocation might be screwed
real(4), intent(inout), target :: values(:) ! must be inout or the allocation might be screwed
! EO args
real(4), pointer :: values_ptr(:)
integer, allocatable, dimension(:) :: starts, sizes
Expand Down

0 comments on commit 87e271e

Please sign in to comment.