Hi Ed,
Comments included below.
* Ed Hartnett <ed@xxxxxxxxxxxxxxxx> [2005-01-07 20:23]:
> > To: netcdfgroup@xxxxxxxxxxxxxxxx
> > Subject: Notes on building netcdf-3.6 on nec SX6
> > From: Jacob Weismann Poulsen <jwp@xxxxxx>
> >
> > Hi,
>
> Howdy Jacob!
>
> >
> > I had to help a friend building netcdf on our nec sx6 system the other
> > day and I discovered a couple of things:
> >
> > 1) As to the source code I noticed that you in the f90 subdirectory
> > define and apply a 'OneByteInt = selected_int_kind(2)' and
> > 'TwoByteInt = selected_int_kind(4)'. On the sx6 system one does not
> > distinguish between 'selected_int_kind(2)' and 'selected_int_kind(4)'
> > and this obviously leads to problems that one can easily overcome by
> > removing all the duplicate definitions. However, it would be nice if
> > one didn't have to patch the source in order to build it.
>
> I'm not (yet) an expert on the F90 interface. Can you send us a patch?
> If so, we'll make it available for our users, and also take a look at
> this issue.
I have attached the patch that made it build on the sx6. Obviously, you
can't use the patch as is. An idea for a general patch:
1) During configuration one would have to compare the result of
selected_int_kind(2), selected_int_kind(4), ...
I would recommend that you allowed for a configure options allowing
one to specify it explictly too and hence omit AC_TRY_RUN stuff.
2) Based on the result above construct the relevant definitions and
functions/subroutines in the f90 subdirectory.
>
> >
> > 2) As to the build environment I noticed that your configure setup
> > doesn't support cross-compilation. You could easily change that simply
> > by checking the variable 'cross_compiling' after your call to AC_PROG_CC
> > and then avoid the AC_TRY_RUN, UD_CHECK_FTRUNCATE and all the
> > AC_CHECK_SIZEOF
> > calls in this case. Just of curiosity, why have you chosen to use autoconf
> > and not automake for portable handling of Makefiles ???
>
> It is not considered that cross-compiling is important for netCDF
> users. That is, no one has ever asked for it, or expressed interest in
> it. Would you cross-compile netCDF if it were possible to do so? I
Sure and I would suspect that other folks working on vector machines
would prefer it too.
> would be very interested to hear of practical uses of cross-compiling
> netCDF.
>
> I would like to support cross-compilation, just for fun, but
> priorities lie elsewhere for the near future.
I understand :)
>
> Release 3.6.0 doesn't use automake because netCDF started using
> autoconf before automake caught on. However, in netCDF-4, (the next
> major release), netCDF will also use automake.
cool,
Cheers, Jacob
>
> > I hope that feedback is useful to you,
> >
>
> Yes, thanks!
>
> Ed Hartnett
> Unidata
>
--
Jacob Weismann Poulsen <jwp@xxxxxx>
Fingerprint: 9315 DC43 D2E4 4F70 3AA8 F8F0 9DA0 B765 F5C8 7D26
diff -Nur src/f90/netcdf.f90 src/f90/netcdf.f90
--- src/f90/netcdf.f90 Thu May 24 21:45:20 2001
+++ src/f90/netcdf.f90 Tue Jan 4 15:36:45 2005
@@ -34,7 +34,7 @@
! length of the argument character string.
!
module netcdf
- use typeSizes, only: OneByteInt, TwoByteInt, FourByteInt, EightByteInt, &
+ use typeSizes, only: TwoByteInt, FourByteInt, EightByteInt, &
FourByteReal, EightByteReal
implicit none
private
diff -Nur src/f90/netcdf_attributes.f90 src/f90/netcdf_attributes.f90
--- src/f90/netcdf_attributes.f90 Tue Nov 9 17:34:10 2004
+++ src/f90/netcdf_attributes.f90 Tue Jan 4 15:27:58 2005
@@ -77,46 +77,6 @@
! -------
! Integer attributes
! -------
- function nf90_put_att_OneByteInt(ncid, varid, name, values)
- integer, intent( in) :: ncid, varid
- character(len = *), intent( in) :: name
- integer (kind = OneByteInt), dimension(:), intent( in) :: values
- integer ::
nf90_put_att_OneByteInt
-
- nf90_put_att_OneByteInt = nf_put_att_int1(ncid, varid, name, nf90_int1,
size(values), values)
- end function nf90_put_att_OneByteInt
- ! -------
- function nf90_put_att_one_OneByteInt(ncid, varid, name, values)
- integer, intent( in) :: ncid, varid
- character(len = *), intent( in) :: name
- integer (kind = OneByteInt), intent( in) :: values
- integer ::
nf90_put_att_one_OneByteInt
-
- integer (kind = OneByteInt), dimension(1) :: valuesA
- valuesA(1) = values
- nf90_put_att_one_OneByteInt = nf_put_att_int1(ncid, varid, name,
nf90_int1, 1, valuesA)
- end function nf90_put_att_one_OneByteInt
- ! -------
- function nf90_get_att_OneByteInt(ncid, varid, name, values)
- integer, intent( in) :: ncid, varid
- character(len = *), intent( in) :: name
- integer (kind = OneByteInt), dimension(:), intent(out) :: values
- integer ::
nf90_get_att_OneByteInt
-
- nf90_get_att_OneByteInt = nf_get_att_int1(ncid, varid, name, values)
- end function nf90_get_att_OneByteInt
- ! -------
- function nf90_get_att_one_OneByteInt(ncid, varid, name, values)
- integer, intent( in) :: ncid, varid
- character(len = *), intent( in) :: name
- integer (kind = OneByteInt), intent(out) :: values
- integer ::
nf90_get_att_one_OneByteInt
-
- integer (kind = OneByteInt), dimension(1) :: valuesA
- nf90_get_att_one_OneByteInt = nf_get_att_int1(ncid, varid, name, valuesA)
- values = valuesA(1)
- end function nf90_get_att_one_OneByteInt
- ! -------
function nf90_put_att_TwoByteInt(ncid, varid, name, values)
integer, intent( in) :: ncid, varid
character(len = *), intent( in) :: name
diff -Nur src/f90/netcdf_constants.f90 src/f90/netcdf_constants.f90
--- src/f90/netcdf_constants.f90 Thu Jul 29 05:23:23 2004
+++ src/f90/netcdf_constants.f90 Tue Jan 4 15:28:47 2005
@@ -20,9 +20,6 @@
!
character (len = 1), parameter, public :: &
nf90_fill_char = achar(0)
- integer (kind = OneByteInt), parameter, public :: &
- nf90_fill_byte = -127, &
- nf90_fill_int1 = nf90_fill_byte
integer (kind = TwoByteInt), parameter, public :: &
nf90_fill_short = -32767, &
nf90_fill_int2 = nf90_fill_short
diff -Nur src/f90/netcdf_expanded.f90 src/f90/netcdf_expanded.f90
--- src/f90/netcdf_expanded.f90 Tue Nov 9 17:47:00 2004
+++ src/f90/netcdf_expanded.f90 Tue Jan 4 15:23:57 2005
@@ -4,23 +4,6 @@
- function nf90_put_var_OneByteInt(ncid, varid, values, start)
- integer, intent( in) :: ncid, varid
- integer (kind = OneByteInt), intent( in) :: values
- integer, dimension(:), optional, intent( in) :: start
- integer :: nf90_put_var_OneByteInt
-
- integer, dimension(nf90_max_var_dims) :: localIndex
- integer :: counter
-
- ! Set local arguments to default values
- localIndex(:) = 1
- if(present(start)) localIndex(:size(start)) = start(:)
-
- nf90_put_var_OneByteInt = nf_put_var1_int1(ncid, varid, localIndex,
values)
- end function nf90_put_var_OneByteInt
-
-
function nf90_put_var_TwoByteInt(ncid, varid, values, start)
integer, intent( in) :: ncid, varid
integer (kind = TwoByteInt), intent( in) :: values
@@ -106,23 +89,6 @@
end function nf90_put_var_EightByteReal
- function nf90_get_var_OneByteInt(ncid, varid, values, start)
- integer, intent( in) :: ncid, varid
- integer (kind = OneByteInt), intent(out) :: values
- integer, dimension(:), optional, intent( in) :: start
- integer :: nf90_get_var_OneByteInt
-
- integer, dimension(nf90_max_var_dims) :: localIndex
- integer :: counter
-
- ! Set local arguments to default values
- localIndex(:) = 1
- if(present(start)) localIndex(:size(start)) = start(:)
-
- nf90_get_var_OneByteInt = nf_get_var1_int1(ncid, varid, localIndex,
values)
- end function nf90_get_var_OneByteInt
-
-
function nf90_get_var_TwoByteInt(ncid, varid, values, start)
integer, intent( in) :: ncid, varid
integer (kind = TwoByteInt), intent(out) :: values
@@ -213,250 +179,6 @@
- function nf90_put_var_1D_OneByteInt(ncid, varid, values, start, count,
stride, map)
- integer, intent( in) :: ncid, varid
- integer (kind = OneByteInt), dimension(:), &
- intent( in) :: values
- integer, dimension(:), optional, intent( in) :: start, count, stride, map
- integer :: nf90_put_var_1D_OneByteInt
-
- integer, dimension(nf90_max_var_dims) :: localStart, localCount,
localStride, localMap
- integer :: numDims, counter
-
- ! Set local arguments to default values
- numDims = size(shape(values))
- localStart (: ) = 1
- localCount (:numDims ) = shape(values)
- localCount (numDims+1:) = 1
- localStride(: ) = 1
- localMap (:numDims ) = (/ 1, (product(localCount(:counter)), counter =
1, numDims - 1) /)
-
- if(present(start)) localStart (:size(start) ) = start(:)
- if(present(count)) localCount (:size(count) ) = count(:)
- if(present(stride)) localStride(:size(stride)) = stride(:)
- if(present(map)) then
- localMap (:size(map)) = map(:)
- nf90_put_var_1D_OneByteInt = &
- nf_put_varm_int1(ncid, varid, localStart, localCount, localStride,
localMap, values)
- else if(present(stride)) then
- nf90_put_var_1D_OneByteInt = &
- nf_put_vars_int1(ncid, varid, localStart, localCount, localStride,
values)
- else
- nf90_put_var_1D_OneByteInt = &
- nf_put_vara_int1(ncid, varid, localStart, localCount, values)
- end if
- end function nf90_put_var_1D_OneByteInt
-
-
- function nf90_put_var_2D_OneByteInt(ncid, varid, values, start, count,
stride, map)
- integer, intent( in) :: ncid, varid
- integer (kind = OneByteInt), dimension(:, :), &
- intent( in) :: values
- integer, dimension(:), optional, intent( in) :: start, count, stride, map
- integer :: nf90_put_var_2D_OneByteInt
-
- integer, dimension(nf90_max_var_dims) :: localStart, localCount,
localStride, localMap
- integer :: numDims, counter
-
- ! Set local arguments to default values
- numDims = size(shape(values))
- localStart (: ) = 1
- localCount (:numDims ) = shape(values)
- localCount (numDims+1:) = 1
- localStride(: ) = 1
- localMap (:numDims ) = (/ 1, (product(localCount(:counter)), counter =
1, numDims - 1) /)
-
- if(present(start)) localStart (:size(start) ) = start(:)
- if(present(count)) localCount (:size(count) ) = count(:)
- if(present(stride)) localStride(:size(stride)) = stride(:)
- if(present(map)) then
- localMap (:size(map)) = map(:)
- nf90_put_var_2D_OneByteInt = &
- nf_put_varm_int1(ncid, varid, localStart, localCount, localStride,
localMap, values)
- else if(present(stride)) then
- nf90_put_var_2D_OneByteInt = &
- nf_put_vars_int1(ncid, varid, localStart, localCount, localStride,
values)
- else
- nf90_put_var_2D_OneByteInt = &
- nf_put_vara_int1(ncid, varid, localStart, localCount, values)
- end if
- end function nf90_put_var_2D_OneByteInt
-
-
- function nf90_put_var_3D_OneByteInt(ncid, varid, values, start, count,
stride, map)
- integer, intent( in) :: ncid, varid
- integer (kind = OneByteInt), dimension(:, :, :), &
- intent( in) :: values
- integer, dimension(:), optional, intent( in) :: start, count, stride, map
- integer :: nf90_put_var_3D_OneByteInt
-
- integer, dimension(nf90_max_var_dims) :: localStart, localCount,
localStride, localMap
- integer :: numDims, counter
-
- ! Set local arguments to default values
- numDims = size(shape(values))
- localStart (: ) = 1
- localCount (:numDims ) = shape(values)
- localCount (numDims+1:) = 1
- localStride(: ) = 1
- localMap (:numDims ) = (/ 1, (product(localCount(:counter)), counter =
1, numDims - 1) /)
-
- if(present(start)) localStart (:size(start) ) = start(:)
- if(present(count)) localCount (:size(count) ) = count(:)
- if(present(stride)) localStride(:size(stride)) = stride(:)
- if(present(map)) then
- localMap (:size(map)) = map(:)
- nf90_put_var_3D_OneByteInt = &
- nf_put_varm_int1(ncid, varid, localStart, localCount, localStride,
localMap, values)
- else if(present(stride)) then
- nf90_put_var_3D_OneByteInt = &
- nf_put_vars_int1(ncid, varid, localStart, localCount, localStride,
values)
- else
- nf90_put_var_3D_OneByteInt = &
- nf_put_vara_int1(ncid, varid, localStart, localCount, values)
- end if
- end function nf90_put_var_3D_OneByteInt
-
-
- function nf90_put_var_4D_OneByteInt(ncid, varid, values, start, count,
stride, map)
- integer, intent( in) :: ncid, varid
- integer (kind = OneByteInt), dimension(:, :, :, :), &
- intent( in) :: values
- integer, dimension(:), optional, intent( in) :: start, count, stride, map
- integer :: nf90_put_var_4D_OneByteInt
-
- integer, dimension(nf90_max_var_dims) :: localStart, localCount,
localStride, localMap
- integer :: numDims, counter
-
- ! Set local arguments to default values
- numDims = size(shape(values))
- localStart (: ) = 1
- localCount (:numDims ) = shape(values)
- localCount (numDims+1:) = 1
- localStride(: ) = 1
- localMap (:numDims ) = (/ 1, (product(localCount(:counter)), counter =
1, numDims - 1) /)
-
- if(present(start)) localStart (:size(start) ) = start(:)
- if(present(count)) localCount (:size(count) ) = count(:)
- if(present(stride)) localStride(:size(stride)) = stride(:)
- if(present(map)) then
- localMap (:size(map)) = map(:)
- nf90_put_var_4D_OneByteInt = &
- nf_put_varm_int1(ncid, varid, localStart, localCount, localStride,
localMap, values)
- else if(present(stride)) then
- nf90_put_var_4D_OneByteInt = &
- nf_put_vars_int1(ncid, varid, localStart, localCount, localStride,
values)
- else
- nf90_put_var_4D_OneByteInt = &
- nf_put_vara_int1(ncid, varid, localStart, localCount, values)
- end if
- end function nf90_put_var_4D_OneByteInt
-
-
- function nf90_put_var_5D_OneByteInt(ncid, varid, values, start, count,
stride, map)
- integer, intent( in) :: ncid, varid
- integer (kind = OneByteInt), dimension(:, :, :, :, :), &
- intent( in) :: values
- integer, dimension(:), optional, intent( in) :: start, count, stride, map
- integer :: nf90_put_var_5D_OneByteInt
-
- integer, dimension(nf90_max_var_dims) :: localStart, localCount,
localStride, localMap
- integer :: numDims, counter
-
- ! Set local arguments to default values
- numDims = size(shape(values))
- localStart (: ) = 1
- localCount (:numDims ) = shape(values)
- localCount (numDims+1:) = 1
- localStride(: ) = 1
- localMap (:numDims ) = (/ 1, (product(localCount(:counter)), counter =
1, numDims - 1) /)
-
- if(present(start)) localStart (:size(start) ) = start(:)
- if(present(count)) localCount (:size(count) ) = count(:)
- if(present(stride)) localStride(:size(stride)) = stride(:)
- if(present(map)) then
- localMap (:size(map)) = map(:)
- nf90_put_var_5D_OneByteInt = &
- nf_put_varm_int1(ncid, varid, localStart, localCount, localStride,
localMap, values)
- else if(present(stride)) then
- nf90_put_var_5D_OneByteInt = &
- nf_put_vars_int1(ncid, varid, localStart, localCount, localStride,
values)
- else
- nf90_put_var_5D_OneByteInt = &
- nf_put_vara_int1(ncid, varid, localStart, localCount, values)
- end if
- end function nf90_put_var_5D_OneByteInt
-
-
- function nf90_put_var_6D_OneByteInt(ncid, varid, values, start, count,
stride, map)
- integer, intent( in) :: ncid, varid
- integer (kind = OneByteInt), dimension(:, :, :, :, :, :), &
- intent( in) :: values
- integer, dimension(:), optional, intent( in) :: start, count, stride, map
- integer :: nf90_put_var_6D_OneByteInt
-
- integer, dimension(nf90_max_var_dims) :: localStart, localCount,
localStride, localMap
- integer :: numDims, counter
-
- ! Set local arguments to default values
- numDims = size(shape(values))
- localStart (: ) = 1
- localCount (:numDims ) = shape(values)
- localCount (numDims+1:) = 1
- localStride(: ) = 1
- localMap (:numDims ) = (/ 1, (product(localCount(:counter)), counter =
1, numDims - 1) /)
-
- if(present(start)) localStart (:size(start) ) = start(:)
- if(present(count)) localCount (:size(count) ) = count(:)
- if(present(stride)) localStride(:size(stride)) = stride(:)
- if(present(map)) then
- localMap (:size(map)) = map(:)
- nf90_put_var_6D_OneByteInt = &
- nf_put_varm_int1(ncid, varid, localStart, localCount, localStride,
localMap, values)
- else if(present(stride)) then
- nf90_put_var_6D_OneByteInt = &
- nf_put_vars_int1(ncid, varid, localStart, localCount, localStride,
values)
- else
- nf90_put_var_6D_OneByteInt = &
- nf_put_vara_int1(ncid, varid, localStart, localCount, values)
- end if
- end function nf90_put_var_6D_OneByteInt
-
-
- function nf90_put_var_7D_OneByteInt(ncid, varid, values, start, count,
stride, map)
- integer, intent( in) :: ncid, varid
- integer (kind = OneByteInt), dimension(:, :, :, :, :, :, :), &
- intent( in) :: values
- integer, dimension(:), optional, intent( in) :: start, count, stride, map
- integer :: nf90_put_var_7D_OneByteInt
-
- integer, dimension(nf90_max_var_dims) :: localStart, localCount,
localStride, localMap
- integer :: numDims, counter
-
- ! Set local arguments to default values
- numDims = size(shape(values))
- localStart (: ) = 1
- localCount (:numDims ) = shape(values)
- localCount (numDims+1:) = 1
- localStride(: ) = 1
- localMap (:numDims ) = (/ 1, (product(localCount(:counter)), counter =
1, numDims - 1) /)
-
- if(present(start)) localStart (:size(start) ) = start(:)
- if(present(count)) localCount (:size(count) ) = count(:)
- if(present(stride)) localStride(:size(stride)) = stride(:)
- if(present(map)) then
- localMap (:size(map)) = map(:)
- nf90_put_var_7D_OneByteInt = &
- nf_put_varm_int1(ncid, varid, localStart, localCount, localStride,
localMap, values)
- else if(present(stride)) then
- nf90_put_var_7D_OneByteInt = &
- nf_put_vars_int1(ncid, varid, localStart, localCount, localStride,
values)
- else
- nf90_put_var_7D_OneByteInt = &
- nf_put_vara_int1(ncid, varid, localStart, localCount, values)
- end if
- end function nf90_put_var_7D_OneByteInt
-
function nf90_put_var_1D_TwoByteInt(ncid, varid, values, start, count,
stride, map)
integer, intent( in) :: ncid, varid
@@ -1683,251 +1405,6 @@
end function nf90_put_var_7D_EightByteReal
- function nf90_get_var_1D_OneByteInt(ncid, varid, values, start, count,
stride, map)
- integer, intent( in) :: ncid, varid
- integer (kind = OneByteInt), dimension(:), &
- intent(out) :: values
- integer, dimension(:), optional, intent( in) :: start, count, stride, map
- integer :: nf90_get_var_1D_OneByteInt
-
- integer, dimension(nf90_max_var_dims) :: localStart, localCount,
localStride, localMap
- integer :: numDims, counter
-
- ! Set local arguments to default values
- numDims = size(shape(values))
- localStart (: ) = 1
- localCount (:numDims ) = shape(values)
- localCount (numDims+1:) = 1
- localStride(: ) = 1
- localMap (:numDims ) = (/ 1, (product(localCount(:counter)), counter =
1, numDims - 1) /)
-
- if(present(start)) localStart (:size(start) ) = start(:)
- if(present(count)) localCount (:size(count) ) = count(:)
- if(present(stride)) localStride(:size(stride)) = stride(:)
- if(present(map)) then
- localMap (:size(map)) = map(:)
- nf90_get_var_1D_OneByteInt = &
- nf_get_varm_int1(ncid, varid, localStart, localCount, localStride,
localMap, values)
- else if(present(stride)) then
- nf90_get_var_1D_OneByteInt = &
- nf_get_vars_int1(ncid, varid, localStart, localCount, localStride,
values)
- else
- nf90_get_var_1D_OneByteInt = &
- nf_get_vara_int1(ncid, varid, localStart, localCount, values)
- end if
- end function nf90_get_var_1D_OneByteInt
-
-
- function nf90_get_var_2D_OneByteInt(ncid, varid, values, start, count,
stride, map)
- integer, intent( in) :: ncid, varid
- integer (kind = OneByteInt), dimension(:, :), &
- intent(out) :: values
- integer, dimension(:), optional, intent( in) :: start, count, stride, map
- integer :: nf90_get_var_2D_OneByteInt
-
- integer, dimension(nf90_max_var_dims) :: localStart, localCount,
localStride, localMap
- integer :: numDims, counter
-
- ! Set local arguments to default values
- numDims = size(shape(values))
- localStart (: ) = 1
- localCount (:numDims ) = shape(values)
- localCount (numDims+1:) = 1
- localStride(: ) = 1
- localMap (:numDims ) = (/ 1, (product(localCount(:counter)), counter =
1, numDims - 1) /)
-
- if(present(start)) localStart (:size(start) ) = start(:)
- if(present(count)) localCount (:size(count) ) = count(:)
- if(present(stride)) localStride(:size(stride)) = stride(:)
- if(present(map)) then
- localMap (:size(map)) = map(:)
- nf90_get_var_2D_OneByteInt = &
- nf_get_varm_int1(ncid, varid, localStart, localCount, localStride,
localMap, values)
- else if(present(stride)) then
- nf90_get_var_2D_OneByteInt = &
- nf_get_vars_int1(ncid, varid, localStart, localCount, localStride,
values)
- else
- nf90_get_var_2D_OneByteInt = &
- nf_get_vara_int1(ncid, varid, localStart, localCount, values)
- end if
- end function nf90_get_var_2D_OneByteInt
-
-
- function nf90_get_var_3D_OneByteInt(ncid, varid, values, start, count,
stride, map)
- integer, intent( in) :: ncid, varid
- integer (kind = OneByteInt), dimension(:, :, :), &
- intent(out) :: values
- integer, dimension(:), optional, intent( in) :: start, count, stride, map
- integer :: nf90_get_var_3D_OneByteInt
-
- integer, dimension(nf90_max_var_dims) :: localStart, localCount,
localStride, localMap
- integer :: numDims, counter
-
- ! Set local arguments to default values
- numDims = size(shape(values))
- localStart (: ) = 1
- localCount (:numDims ) = shape(values)
- localCount (numDims+1:) = 1
- localStride(: ) = 1
- localMap (:numDims ) = (/ 1, (product(localCount(:counter)), counter =
1, numDims - 1) /)
-
- if(present(start)) localStart (:size(start) ) = start(:)
- if(present(count)) localCount (:size(count) ) = count(:)
- if(present(stride)) localStride(:size(stride)) = stride(:)
- if(present(map)) then
- localMap (:size(map)) = map(:)
- nf90_get_var_3D_OneByteInt = &
- nf_get_varm_int1(ncid, varid, localStart, localCount, localStride,
localMap, values)
- else if(present(stride)) then
- nf90_get_var_3D_OneByteInt = &
- nf_get_vars_int1(ncid, varid, localStart, localCount, localStride,
values)
- else
- nf90_get_var_3D_OneByteInt = &
- nf_get_vara_int1(ncid, varid, localStart, localCount, values)
- end if
- end function nf90_get_var_3D_OneByteInt
-
-
- function nf90_get_var_4D_OneByteInt(ncid, varid, values, start, count,
stride, map)
- integer, intent( in) :: ncid, varid
- integer (kind = OneByteInt), dimension(:, :, :, :), &
- intent(out) :: values
- integer, dimension(:), optional, intent( in) :: start, count, stride, map
- integer :: nf90_get_var_4D_OneByteInt
-
- integer, dimension(nf90_max_var_dims) :: localStart, localCount,
localStride, localMap
- integer :: numDims, counter
-
- ! Set local arguments to default values
- numDims = size(shape(values))
- localStart (: ) = 1
- localCount (:numDims ) = shape(values)
- localCount (numDims+1:) = 1
- localStride(: ) = 1
- localMap (:numDims ) = (/ 1, (product(localCount(:counter)), counter =
1, numDims - 1) /)
-
- if(present(start)) localStart (:size(start) ) = start(:)
- if(present(count)) localCount (:size(count) ) = count(:)
- if(present(stride)) localStride(:size(stride)) = stride(:)
- if(present(map)) then
- localMap (:size(map)) = map(:)
- nf90_get_var_4D_OneByteInt = &
- nf_get_varm_int1(ncid, varid, localStart, localCount, localStride,
localMap, values)
- else if(present(stride)) then
- nf90_get_var_4D_OneByteInt = &
- nf_get_vars_int1(ncid, varid, localStart, localCount, localStride,
values)
- else
- nf90_get_var_4D_OneByteInt = &
- nf_get_vara_int1(ncid, varid, localStart, localCount, values)
- end if
- end function nf90_get_var_4D_OneByteInt
-
-
- function nf90_get_var_5D_OneByteInt(ncid, varid, values, start, count,
stride, map)
- integer, intent( in) :: ncid, varid
- integer (kind = OneByteInt), dimension(:, :, :, :, :), &
- intent(out) :: values
- integer, dimension(:), optional, intent( in) :: start, count, stride, map
- integer :: nf90_get_var_5D_OneByteInt
-
- integer, dimension(nf90_max_var_dims) :: localStart, localCount,
localStride, localMap
- integer :: numDims, counter
-
- ! Set local arguments to default values
- numDims = size(shape(values))
- localStart (: ) = 1
- localCount (:numDims ) = shape(values)
- localCount (numDims+1:) = 1
- localStride(: ) = 1
- localMap (:numDims ) = (/ 1, (product(localCount(:counter)), counter =
1, numDims - 1) /)
-
- if(present(start)) localStart (:size(start) ) = start(:)
- if(present(count)) localCount (:size(count) ) = count(:)
- if(present(stride)) localStride(:size(stride)) = stride(:)
- if(present(map)) then
- localMap (:size(map)) = map(:)
- nf90_get_var_5D_OneByteInt = &
- nf_get_varm_int1(ncid, varid, localStart, localCount, localStride,
localMap, values)
- else if(present(stride)) then
- nf90_get_var_5D_OneByteInt = &
- nf_get_vars_int1(ncid, varid, localStart, localCount, localStride,
values)
- else
- nf90_get_var_5D_OneByteInt = &
- nf_get_vara_int1(ncid, varid, localStart, localCount, values)
- end if
- end function nf90_get_var_5D_OneByteInt
-
-
- function nf90_get_var_6D_OneByteInt(ncid, varid, values, start, count,
stride, map)
- integer, intent( in) :: ncid, varid
- integer (kind = OneByteInt), dimension(:, :, :, :, :, :), &
- intent(out) :: values
- integer, dimension(:), optional, intent( in) :: start, count, stride, map
- integer :: nf90_get_var_6D_OneByteInt
-
- integer, dimension(nf90_max_var_dims) :: localStart, localCount,
localStride, localMap
- integer :: numDims, counter
-
- ! Set local arguments to default values
- numDims = size(shape(values))
- localStart (: ) = 1
- localCount (:numDims ) = shape(values)
- localCount (numDims+1:) = 1
- localStride(: ) = 1
- localMap (:numDims ) = (/ 1, (product(localCount(:counter)), counter =
1, numDims - 1) /)
-
- if(present(start)) localStart (:size(start) ) = start(:)
- if(present(count)) localCount (:size(count) ) = count(:)
- if(present(stride)) localStride(:size(stride)) = stride(:)
- if(present(map)) then
- localMap (:size(map)) = map(:)
- nf90_get_var_6D_OneByteInt = &
- nf_get_varm_int1(ncid, varid, localStart, localCount, localStride,
localMap, values)
- else if(present(stride)) then
- nf90_get_var_6D_OneByteInt = &
- nf_get_vars_int1(ncid, varid, localStart, localCount, localStride,
values)
- else
- nf90_get_var_6D_OneByteInt = &
- nf_get_vara_int1(ncid, varid, localStart, localCount, values)
- end if
- end function nf90_get_var_6D_OneByteInt
-
-
- function nf90_get_var_7D_OneByteInt(ncid, varid, values, start, count,
stride, map)
- integer, intent( in) :: ncid, varid
- integer (kind = OneByteInt), dimension(:, :, :, :, :, :, :), &
- intent(out) :: values
- integer, dimension(:), optional, intent( in) :: start, count, stride, map
- integer :: nf90_get_var_7D_OneByteInt
-
- integer, dimension(nf90_max_var_dims) :: localStart, localCount,
localStride, localMap
- integer :: numDims, counter
-
- ! Set local arguments to default values
- numDims = size(shape(values))
- localStart (: ) = 1
- localCount (:numDims ) = shape(values)
- localCount (numDims+1:) = 1
- localStride(: ) = 1
- localMap (:numDims ) = (/ 1, (product(localCount(:counter)), counter =
1, numDims - 1) /)
-
- if(present(start)) localStart (:size(start) ) = start(:)
- if(present(count)) localCount (:size(count) ) = count(:)
- if(present(stride)) localStride(:size(stride)) = stride(:)
- if(present(map)) then
- localMap (:size(map)) = map(:)
- nf90_get_var_7D_OneByteInt = &
- nf_get_varm_int1(ncid, varid, localStart, localCount, localStride,
localMap, values)
- else if(present(stride)) then
- nf90_get_var_7D_OneByteInt = &
- nf_get_vars_int1(ncid, varid, localStart, localCount, localStride,
values)
- else
- nf90_get_var_7D_OneByteInt = &
- nf_get_vara_int1(ncid, varid, localStart, localCount, values)
- end if
- end function nf90_get_var_7D_OneByteInt
-
-
function nf90_get_var_1D_TwoByteInt(ncid, varid, values, start, count,
stride, map)
integer, intent( in) :: ncid, varid
integer (kind = TwoByteInt), dimension(:), &
diff -Nur src/f90/netcdf_overloads.f90 src/f90/netcdf_overloads.f90
--- src/f90/netcdf_overloads.f90 Thu May 24 21:45:22 2001
+++ src/f90/netcdf_overloads.f90 Tue Jan 4 08:44:42 2005
@@ -6,19 +6,19 @@
! Overloaded attribute functions
interface nf90_put_att
module procedure nf90_put_att_text, &
- nf90_put_att_OneByteInt, nf90_put_att_TwoByteInt, &
+ nf90_put_att_TwoByteInt, &
nf90_put_att_FourByteInt, nf90_put_att_EightByteInt, &
nf90_put_att_FourByteReal, nf90_put_att_EightByteReal
- module procedure nf90_put_att_one_OneByteInt,
nf90_put_att_one_TwoByteInt, &
+ module procedure nf90_put_att_one_TwoByteInt, &
nf90_put_att_one_FourByteInt,
nf90_put_att_one_EightByteInt, &
nf90_put_att_one_FourByteReal,
nf90_put_att_one_EightByteReal
end interface !nf90_put_att
interface nf90_get_att
module procedure nf90_get_att_text, &
- nf90_get_att_OneByteInt, nf90_get_att_TwoByteInt, &
+ nf90_get_att_TwoByteInt, &
nf90_get_att_FourByteInt, nf90_get_att_EightByteInt, &
nf90_get_att_FourByteReal, nf90_get_att_EightByteReal
- module procedure nf90_get_att_one_OneByteInt,
nf90_get_att_one_TwoByteInt, &
+ module procedure nf90_get_att_one_TwoByteInt, &
nf90_get_att_one_FourByteInt,
nf90_get_att_one_EightByteInt, &
nf90_get_att_one_FourByteReal,
nf90_get_att_one_EightByteReal
end interface ! nf90_get_att
@@ -26,70 +26,70 @@
! Overloaded variable functions
interface nf90_put_var
module procedure nf90_put_var_text, &
- nf90_put_var_OneByteInt, nf90_put_var_TwoByteInt, &
+ nf90_put_var_TwoByteInt, &
nf90_put_var_FourByteInt, nf90_put_var_EightByteInt, &
nf90_put_var_FourByteReal, nf90_put_var_EightByteReal
module procedure nf90_put_var_1D_text,
&
- nf90_put_var_1D_OneByteInt, nf90_put_var_1D_TwoByteInt,
&
+ nf90_put_var_1D_TwoByteInt, &
nf90_put_var_1D_FourByteInt,
nf90_put_var_1D_EightByteInt, &
nf90_put_var_1D_FourByteReal,
nf90_put_var_1D_EightByteReal
module procedure nf90_put_var_2D_text,
&
- nf90_put_var_2D_OneByteInt, nf90_put_var_2D_TwoByteInt,
&
+ nf90_put_var_2D_TwoByteInt, &
nf90_put_var_2D_FourByteInt,
nf90_put_var_2D_EightByteInt, &
nf90_put_var_2D_FourByteReal,
nf90_put_var_2D_EightByteReal
module procedure nf90_put_var_3D_text,
&
- nf90_put_var_3D_OneByteInt, nf90_put_var_3D_TwoByteInt,
&
+ nf90_put_var_3D_TwoByteInt, &
nf90_put_var_3D_FourByteInt,
nf90_put_var_3D_EightByteInt, &
nf90_put_var_3D_FourByteReal,
nf90_put_var_3D_EightByteReal
module procedure nf90_put_var_4D_text,
&
- nf90_put_var_4D_OneByteInt, nf90_put_var_4D_TwoByteInt,
&
+ nf90_put_var_4D_TwoByteInt, &
nf90_put_var_4D_FourByteInt,
nf90_put_var_4D_EightByteInt, &
nf90_put_var_4D_FourByteReal,
nf90_put_var_4D_EightByteReal
module procedure nf90_put_var_5D_text,
&
- nf90_put_var_5D_OneByteInt, nf90_put_var_5D_TwoByteInt,
&
+ nf90_put_var_5D_TwoByteInt, &
nf90_put_var_5D_FourByteInt,
nf90_put_var_5D_EightByteInt, &
nf90_put_var_5D_FourByteReal,
nf90_put_var_5D_EightByteReal
module procedure nf90_put_var_6D_text,
&
- nf90_put_var_6D_OneByteInt, nf90_put_var_6D_TwoByteInt,
&
+ nf90_put_var_6D_TwoByteInt, &
nf90_put_var_6D_FourByteInt,
nf90_put_var_6D_EightByteInt, &
nf90_put_var_6D_FourByteReal,
nf90_put_var_6D_EightByteReal
module procedure nf90_put_var_7D_text,
&
- nf90_put_var_7D_OneByteInt, nf90_put_var_7D_TwoByteInt,
&
+ nf90_put_var_7D_TwoByteInt, &
nf90_put_var_7D_FourByteInt,
nf90_put_var_7D_EightByteInt, &
nf90_put_var_7D_FourByteReal,
nf90_put_var_7D_EightByteReal
end interface ! nf90_put_var
interface nf90_get_var
module procedure nf90_get_var_text, &
- nf90_get_var_OneByteInt, nf90_get_var_TwoByteInt, &
+ nf90_get_var_TwoByteInt, &
nf90_get_var_FourByteInt, nf90_get_var_EightByteInt, &
nf90_get_var_FourByteReal, nf90_get_var_EightByteReal
module procedure nf90_get_var_1D_text,
&
- nf90_get_var_1D_OneByteInt, nf90_get_var_1D_TwoByteInt,
&
+ nf90_get_var_1D_TwoByteInt, &
nf90_get_var_1D_FourByteInt,
nf90_get_var_1D_EightByteInt, &
nf90_get_var_1D_FourByteReal,
nf90_get_var_1D_EightByteReal
module procedure nf90_get_var_2D_text,
&
- nf90_get_var_2D_OneByteInt, nf90_get_var_2D_TwoByteInt,
&
+ nf90_get_var_2D_TwoByteInt, &
nf90_get_var_2D_FourByteInt,
nf90_get_var_2D_EightByteInt, &
nf90_get_var_2D_FourByteReal,
nf90_get_var_2D_EightByteReal
module procedure nf90_get_var_3D_text,
&
- nf90_get_var_3D_OneByteInt, nf90_get_var_3D_TwoByteInt,
&
+ nf90_get_var_3D_TwoByteInt, &
nf90_get_var_3D_FourByteInt,
nf90_get_var_3D_EightByteInt, &
nf90_get_var_3D_FourByteReal,
nf90_get_var_3D_EightByteReal
module procedure nf90_get_var_4D_text,
&
- nf90_get_var_4D_OneByteInt, nf90_get_var_4D_TwoByteInt,
&
+ nf90_get_var_4D_TwoByteInt, &
nf90_get_var_4D_FourByteInt,
nf90_get_var_4D_EightByteInt, &
nf90_get_var_4D_FourByteReal,
nf90_get_var_4D_EightByteReal
module procedure nf90_get_var_5D_text,
&
- nf90_get_var_5D_OneByteInt, nf90_get_var_5D_TwoByteInt,
&
+ nf90_get_var_5D_TwoByteInt, &
nf90_get_var_5D_FourByteInt,
nf90_get_var_5D_EightByteInt, &
nf90_get_var_5D_FourByteReal,
nf90_get_var_5D_EightByteReal
module procedure nf90_get_var_6D_text,
&
- nf90_get_var_6D_OneByteInt, nf90_get_var_6D_TwoByteInt,
&
+ nf90_get_var_6D_TwoByteInt, &
nf90_get_var_6D_FourByteInt,
nf90_get_var_6D_EightByteInt, &
nf90_get_var_6D_FourByteReal,
nf90_get_var_6D_EightByteReal
module procedure nf90_get_var_7D_text,
&
- nf90_get_var_7D_OneByteInt, nf90_get_var_7D_TwoByteInt,
&
+ nf90_get_var_7D_TwoByteInt, &
nf90_get_var_7D_FourByteInt,
nf90_get_var_7D_EightByteInt, &
nf90_get_var_7D_FourByteReal,
nf90_get_var_7D_EightByteReal
end interface ! nf90_get_var
diff -Nur src/f90/typeSizes.f90 src/f90/typeSizes.f90
--- src/f90/typeSizes.f90 Mon Oct 23 22:07:06 2000
+++ src/f90/typeSizes.f90 Tue Jan 4 15:12:53 2005
@@ -30,10 +30,10 @@
module typeSizes
implicit none
public
- integer, parameter :: OneByteInt = selected_int_kind(2), &
+ integer, parameter :: &
TwoByteInt = selected_int_kind(4), &
- FourByteInt = selected_int_kind(9), &
- EightByteInt = selected_int_kind(18)
+ FourByteInt = selected_int_kind(8), &
+ EightByteInt = selected_int_kind(10)
integer, parameter :: &
FourByteReal = selected_real_kind(P = 6, R = 37), &
@@ -48,12 +48,10 @@
! the bit_size intrinsic, but I haven't seen this in a long time.
! Local variables
- integer (kind = OneByteInt) :: One
integer (kind = TwoByteInt) :: Two
integer (kind = FourByteInt) :: Four
- if (bit_size( One) == 8 .and. bit_size( Two) == 16 .and. &
- bit_size(Four) == 32 .and. &
+ if (bit_size( Two) == 16 .and. bit_size(Four) == 32 .and.
&
FourByteReal > 0 .and. EightByteReal > 0 .and. &
FourByteReal /= EightByteReal) then
byteSizesOK = .true.