Skip to content

Commit

Permalink
name dimnames dims for conveninence in write()
Browse files Browse the repository at this point in the history
  • Loading branch information
scivision committed Mar 19, 2020
1 parent ef18eb2 commit c56030b
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ if(NOT CMAKE_BUILD_TYPE)
endif()
project(nc4fortran
LANGUAGES Fortran
VERSION 0.4.0
VERSION 0.4.1
DESCRIPTION "thin, light, easy NetCDF4 Fortran interface"
HOMEPAGE_URL https://github.com/scivision/nc4fortran)
enable_testing()
Expand Down
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
project('nc4fortran', 'fortran',
meson_version : '>=0.52.0',
version: '0.4.0',
version: '0.4.1',
default_options : ['default_library=static', 'buildtype=release', 'warning_level=3'])

subdir('meson')
Expand Down
28 changes: 14 additions & 14 deletions src/interface.f90
Original file line number Diff line number Diff line change
Expand Up @@ -51,59 +51,59 @@ module subroutine nc_write_scalar(self, dname, value, ierr)
integer, intent(out), optional :: ierr
end subroutine nc_write_scalar

module subroutine nc_write_1d(self, dname, value, dimnames, ierr)
module subroutine nc_write_1d(self, dname, value, dims, ierr)
class(netcdf_file), intent(in) :: self
character(*), intent(in) :: dname
class(*), intent(in) :: value(:)
character(*), intent(in), optional :: dimnames(:)
character(*), intent(in), optional :: dims(:)
integer, intent(out), optional :: ierr
end subroutine nc_write_1d

module subroutine nc_write_2d(self, dname, value, dimnames, ierr)
module subroutine nc_write_2d(self, dname, value, dims, ierr)
class(netcdf_file), intent(in) :: self
character(*), intent(in) :: dname
class(*), intent(in) :: value(:,:)
character(*), intent(in), optional :: dimnames(:)
character(*), intent(in), optional :: dims(:)
integer, intent(out), optional :: ierr
end subroutine nc_write_2d

module subroutine nc_write_3d(self, dname, value, dimnames, ierr)
module subroutine nc_write_3d(self, dname, value, dims, ierr)
class(netcdf_file), intent(in) :: self
character(*), intent(in) :: dname
class(*), intent(in) :: value(:,:,:)
character(*), intent(in), optional :: dimnames(:)
character(*), intent(in), optional :: dims(:)
integer, intent(out), optional :: ierr
end subroutine nc_write_3d

module subroutine nc_write_4d(self, dname, value, dimnames, ierr)
module subroutine nc_write_4d(self, dname, value, dims, ierr)
class(netcdf_file), intent(in) :: self
character(*), intent(in) :: dname
class(*), intent(in) :: value(:,:,:,:)
character(*), intent(in), optional :: dimnames(:)
character(*), intent(in), optional :: dims(:)
integer, intent(out), optional :: ierr
end subroutine nc_write_4d

module subroutine nc_write_5d(self, dname, value, dimnames, ierr)
module subroutine nc_write_5d(self, dname, value, dims, ierr)
class(netcdf_file), intent(in) :: self
character(*), intent(in) :: dname
class(*), intent(in) :: value(:,:,:,:,:)
character(*), intent(in), optional :: dimnames(:)
character(*), intent(in), optional :: dims(:)
integer, intent(out), optional :: ierr
end subroutine nc_write_5d

module subroutine nc_write_6d(self, dname, value, dimnames, ierr)
module subroutine nc_write_6d(self, dname, value, dims, ierr)
class(netcdf_file), intent(in) :: self
character(*), intent(in) :: dname
class(*), intent(in) :: value(:,:,:,:,:,:)
character(*), intent(in), optional :: dimnames(:)
character(*), intent(in), optional :: dims(:)
integer, intent(out), optional :: ierr
end subroutine nc_write_6d

module subroutine nc_write_7d(self, dname, value, dimnames, ierr)
module subroutine nc_write_7d(self, dname, value, dims, ierr)
class(netcdf_file), intent(in) :: self
character(*), intent(in) :: dname
class(*), intent(in) :: value(:,:,:,:,:,:,:)
character(*), intent(in), optional :: dimnames(:)
character(*), intent(in), optional :: dims(:)
integer, intent(out), optional :: ierr
end subroutine nc_write_7d

Expand Down
14 changes: 7 additions & 7 deletions src/writer.f90
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
module procedure nc_write_1d
integer :: varid, dimids(rank(value)),ier

call self%def_dims(dname, dimnames, shape(value), dimids, ier)
call self%def_dims(dname, dims, shape(value), dimids, ier)

select type (value)
type is (real(real64))
Expand Down Expand Up @@ -70,7 +70,7 @@
module procedure nc_write_2d
integer :: varid, dimids(rank(value)), ier

call self%def_dims(dname, dimnames, shape(value), dimids, ier)
call self%def_dims(dname, dims, shape(value), dimids, ier)

select type (value)
type is (real(real64))
Expand Down Expand Up @@ -102,7 +102,7 @@
module procedure nc_write_3d
integer :: varid, dimids(rank(value)), ier

call self%def_dims(dname, dimnames, shape(value), dimids, ier)
call self%def_dims(dname, dims, shape(value), dimids, ier)

select type (value)
type is (real(real64))
Expand Down Expand Up @@ -134,7 +134,7 @@
module procedure nc_write_4d
integer :: varid, dimids(rank(value)), ier

call self%def_dims(dname, dimnames, shape(value), dimids, ier)
call self%def_dims(dname, dims, shape(value), dimids, ier)

select type (value)
type is (real(real64))
Expand Down Expand Up @@ -166,7 +166,7 @@
module procedure nc_write_5d
integer :: varid, dimids(rank(value)), ier

call self%def_dims(dname, dimnames, shape(value), dimids, ier)
call self%def_dims(dname, dims, shape(value), dimids, ier)

select type (value)
type is (real(real64))
Expand Down Expand Up @@ -198,7 +198,7 @@
module procedure nc_write_6d
integer :: varid, dimids(rank(value)), ier

call self%def_dims(dname, dimnames, shape(value), dimids, ier)
call self%def_dims(dname, dims, shape(value), dimids, ier)

select type (value)
type is (real(real64))
Expand Down Expand Up @@ -230,7 +230,7 @@
module procedure nc_write_7d
integer :: varid, dimids(rank(value)), ier

call self%def_dims(dname, dimnames, shape(value), dimids, ier)
call self%def_dims(dname, dims, shape(value), dimids, ier)

select type (value)
type is (real(real64))
Expand Down

0 comments on commit c56030b

Please sign in to comment.