Index: LMDZ6/trunk/libf/misc/handle_err_m.F90
===================================================================
--- LMDZ6/trunk/libf/misc/handle_err_m.F90	(revision 4477)
+++ 	(revision )
@@ -1,47 +1,0 @@
-! $Id$
-module handle_err_m
-
-  implicit none
-
-contains
-
-  subroutine handle_err(message, ncerr, ncid, varid)
-
-    use netcdf, only: nf90_strerror, nf90_noerr, nf90_close
-
-    character(len=*), intent(in):: message
-    ! (should include name of calling procedure)
-
-    integer, intent(in):: ncerr
-
-    integer, intent(in), optional :: ncid
-    ! (Provide this argument if you want "handle_err" to try to close
-    ! the file.)
-
-    integer, intent(in), optional :: varid
-
-    ! Variable local to the procedure:
-    integer ncerr_close
-
-    !-------------------
-
-    if (ncerr /= nf90_noerr) then
-       print *, "NetCDF95 handle_err:"
-       print *, message, ":"
-       if (present(varid)) print *, "varid = ", varid
-       print *, trim(nf90_strerror(ncerr))
-       if (present(ncid)) then
-          ! Try to close, to leave the file in a consistent state:
-          ncerr_close = nf90_close(ncid)
-          ! (do not call "nf95_close", we do not want to recurse)
-          if (ncerr_close /= nf90_noerr) then
-             print *, "nf90_close:"
-             print *, trim(nf90_strerror(ncerr_close))
-          end if
-       end if
-       call abort_physic("NetCDF95 handle_err", "see above", 1)
-    end if
-
-  end subroutine handle_err
-
-end module handle_err_m
Index: LMDZ6/trunk/libf/misc/netcdf95.F90
===================================================================
--- LMDZ6/trunk/libf/misc/netcdf95.F90	(revision 4477)
+++ 	(revision )
@@ -1,17 +1,0 @@
-! $Id$
-module netcdf95
-
-  ! Author: Lionel GUEZ
-  ! See:
-  ! http://www.lmd.jussieu.fr/~lglmd/NetCDF95
-
-  use nf95_def_var_m
-  use nf95_put_var_m
-  use nf95_get_var_m
-  use nf95_gw_var_m
-  use nf95_put_att_m
-  use nf95_get_att_m
-  use simple
-  use handle_err_m
-
-end module netcdf95
Index: LMDZ6/trunk/libf/misc/nf95_def_var_m.F90
===================================================================
--- LMDZ6/trunk/libf/misc/nf95_def_var_m.F90	(revision 4477)
+++ 	(revision )
@@ -1,102 +1,0 @@
-! $Id$
-module nf95_def_var_m
-
-  ! The generic procedure name "nf90_def_var" applies to
-  ! "nf90_def_var_Scalar" but we cannot apply the generic procedure name
-  ! "nf95_def_var" to "nf95_def_var_scalar" because of the additional
-  ! optional argument.
-  ! "nf95_def_var_scalar" cannot be distinguished from "nf95_def_var_oneDim".
-
-  implicit none
-
-  interface nf95_def_var
-    module procedure nf95_def_var_oneDim, nf95_def_var_ManyDims
-  end interface
-
-  private
-  public nf95_def_var, nf95_def_var_scalar
-
-contains
-
-  subroutine nf95_def_var_scalar(ncid, name, xtype, varid, ncerr)
-
-    use netcdf, only: nf90_def_var
-    use handle_err_m, only: handle_err
-
-    integer,               intent( in) :: ncid
-    character (len = *),   intent( in) :: name
-    integer,               intent( in) :: xtype
-    integer,               intent(out) :: varid
-    integer, intent(out), optional:: ncerr
-
-    ! Variable local to the procedure:
-    integer ncerr_not_opt
-
-    !-------------------
-
-    ncerr_not_opt = nf90_def_var(ncid, name, xtype, varid)
-    if (present(ncerr)) then
-       ncerr = ncerr_not_opt
-    else
-       call handle_err("nf95_def_var_scalar " // name, ncerr_not_opt, ncid)
-    end if
-
-  end subroutine nf95_def_var_scalar
-
-  !***********************
-
-  subroutine nf95_def_var_oneDim(ncid, name, xtype, dimids, varid, ncerr)
-
-    use netcdf, only: nf90_def_var
-    use handle_err_m, only: handle_err
-
-    integer,               intent( in) :: ncid
-    character (len = *),   intent( in) :: name
-    integer,               intent( in) :: xtype
-    integer,               intent( in) :: dimids
-    integer,               intent(out) :: varid
-    integer, intent(out), optional:: ncerr
-
-    ! Variable local to the procedure:
-    integer ncerr_not_opt
-
-    !-------------------
-
-    ncerr_not_opt = nf90_def_var(ncid, name, xtype, dimids, varid)
-    if (present(ncerr)) then
-       ncerr = ncerr_not_opt
-    else
-       call handle_err("nf95_def_var_oneDim " // name, ncerr_not_opt, ncid)
-    end if
-
-  end subroutine nf95_def_var_oneDim
-
-  !***********************
-
-  subroutine nf95_def_var_ManyDims(ncid, name, xtype, dimids, varid, ncerr)
-
-    use netcdf, only: nf90_def_var
-    use handle_err_m, only: handle_err
-
-    integer,               intent( in) :: ncid
-    character (len = *),   intent( in) :: name
-    integer,               intent( in) :: xtype
-    integer, dimension(:), intent( in) :: dimids
-    integer,               intent(out) :: varid
-    integer, intent(out), optional:: ncerr
-
-    ! Variable local to the procedure:
-    integer ncerr_not_opt
-
-    !-------------------
-
-    ncerr_not_opt = nf90_def_var(ncid, name, xtype, dimids, varid)
-    if (present(ncerr)) then
-       ncerr = ncerr_not_opt
-    else
-       call handle_err("nf95_def_var_ManyDims " // name, ncerr_not_opt, ncid)
-    end if
-
-  end subroutine nf95_def_var_ManyDims
-
-end module nf95_def_var_m
Index: LMDZ6/trunk/libf/misc/nf95_get_att_m.F90
===================================================================
--- LMDZ6/trunk/libf/misc/nf95_get_att_m.F90	(revision 4477)
+++ 	(revision )
@@ -1,105 +1,0 @@
-! $Id$
-module nf95_get_att_m
-
-  use handle_err_m, only: handle_err
-  use netcdf, only: nf90_get_att, nf90_noerr
-  use simple, only: nf95_inquire_attribute
-
-  implicit none
-
-  interface nf95_get_att
-     module procedure nf95_get_att_text, nf95_get_att_one_FourByteInt
-
-     ! The difference between the specific procedures is the type of
-     ! argument "values".
-  end interface
-
-  private
-  public nf95_get_att
-
-contains
-
-  subroutine nf95_get_att_text(ncid, varid, name, values, ncerr)
-
-    integer,                          intent( in) :: ncid, varid
-    character(len = *),               intent( in) :: name
-    character(len = *),               intent(out) :: values
-    integer, intent(out), optional:: ncerr
-
-    ! Variables local to the procedure:
-    integer ncerr_not_opt
-    integer att_len
-
-    !-------------------
-
-    ! Check that the length of "values" is large enough:
-    call nf95_inquire_attribute(ncid, varid, name, nclen=att_len, &
-         ncerr=ncerr_not_opt)
-    if (ncerr_not_opt == nf90_noerr) then
-       if (len(values) < att_len) then
-          print *, "nf95_get_att_text"
-          print *, "varid = ", varid
-          print *, "attribute name: ", name
-          print *, 'length of "values" is not large enough'
-          print *, "len(values) = ", len(values)
-          print *, "number of characters in attribute: ", att_len
-          stop 1
-       end if
-    end if
-
-    values = "" ! useless in NetCDF version 3.6.2 or better
-    ncerr_not_opt = nf90_get_att(ncid, varid, name, values)
-    if (present(ncerr)) then
-       ncerr = ncerr_not_opt
-    else
-       call handle_err("nf95_get_att_text " // trim(name), ncerr_not_opt, &
-            ncid, varid)
-    end if
-
-    if (att_len >= 1 .and. ncerr_not_opt == nf90_noerr) then
-       ! Remove null terminator, if any:
-       if (iachar(values(att_len:att_len)) == 0) values(att_len:att_len) = " "
-    end if
-
-  end subroutine nf95_get_att_text
-
-  !***********************
-
-  subroutine nf95_get_att_one_FourByteInt(ncid, varid, name, values, ncerr)
-
-    integer,                                    intent( in) :: ncid, varid
-    character(len = *),                         intent( in) :: name
-    integer ,               intent(out) :: values
-    integer, intent(out), optional:: ncerr
-
-    ! Variables local to the procedure:
-    integer ncerr_not_opt
-    integer att_len
-
-    !-------------------
-
-    ! Check that the attribute contains a single value:
-    call nf95_inquire_attribute(ncid, varid, name, nclen=att_len, &
-         ncerr=ncerr_not_opt)
-    if (ncerr_not_opt == nf90_noerr) then
-       if (att_len /= 1) then
-          print *, "nf95_get_att_one_FourByteInt"
-          print *, "varid = ", varid
-          print *, "attribute name: ", name
-          print *, 'the attribute does not contain a single value'
-          print *, "number of values in attribute: ", att_len
-          stop 1
-       end if
-    end if
-
-    ncerr_not_opt = nf90_get_att(ncid, varid, name, values)
-    if (present(ncerr)) then
-       ncerr = ncerr_not_opt
-    else
-       call handle_err("nf95_get_att_one_FourByteInt " // trim(name), &
-            ncerr_not_opt, ncid, varid)
-    end if
-
-  end subroutine nf95_get_att_one_FourByteInt
-
-end module nf95_get_att_m
Index: LMDZ6/trunk/libf/misc/nf95_get_var_m.F90
===================================================================
--- LMDZ6/trunk/libf/misc/nf95_get_var_m.F90	(revision 4477)
+++ 	(revision )
@@ -1,391 +1,0 @@
-module nf95_get_var_m
-
-  use netcdf, only: nf90_get_var
-  use handle_err_m, only: handle_err
-
-  implicit none
-
-  interface nf95_get_var
-     module procedure nf95_get_var_FourByteReal, nf95_get_var_FourByteInt, &
-          nf95_get_var_1D_FourByteReal, nf95_get_var_1D_FourByteInt, &
-          nf95_get_var_2D_FourByteReal, &
-          nf95_get_var_3D_FourByteInt, &
-          nf95_get_var_3D_FourByteReal, &
-          nf95_get_var_4D_FourByteReal, &
-          nf95_get_var_5D_FourByteReal
-  end interface
-
-  private
-  public nf95_get_var
-
-contains
-
-  subroutine nf95_get_var_FourByteReal(ncid, varid, values, start, ncerr)
-
-    integer, intent(in) :: ncid, varid
-    real, intent(out) :: values
-    integer, dimension(:), optional, intent(in) :: start
-    integer, intent(out), optional:: ncerr
-
-    ! Variable local to the procedure:
-    integer ncerr_not_opt
-
-    !-------------------
-
-    ncerr_not_opt = nf90_get_var(ncid, varid, values, start)
-    if (present(ncerr)) then
-       ncerr = ncerr_not_opt
-    else
-       call handle_err("nf95_get_var_FourByteReal", ncerr_not_opt, ncid, &
-            varid)
-    end if
-
-  end subroutine nf95_get_var_FourByteReal
-
-  !***********************
-
-  subroutine nf95_get_var_FourByteInt(ncid, varid, values, start, ncerr)
-
-    integer, intent(in) :: ncid, varid
-    integer, intent(out) :: values
-    integer, dimension(:), optional, intent(in) :: start
-    integer, intent(out), optional:: ncerr
-
-    ! Variable local to the procedure:
-    integer ncerr_not_opt
-
-    !-------------------
-
-    ncerr_not_opt = nf90_get_var(ncid, varid, values, start)
-    if (present(ncerr)) then
-       ncerr = ncerr_not_opt
-    else
-       call handle_err("nf95_get_var_FourByteInt", ncerr_not_opt, ncid, &
-            varid)
-    end if
-
-  end subroutine nf95_get_var_FourByteInt
-
-  !***********************
-
-  subroutine nf95_get_var_1D_FourByteReal(ncid, varid, values, start, &
-       count_nc, stride, map, ncerr)
-
-    integer,                         intent(in) :: ncid, varid
-    real, intent(out) :: values(:)
-    integer, dimension(:), optional, intent(in) :: start, count_nc, stride, map
-    integer, intent(out), optional:: ncerr
-
-    ! Variable local to the procedure:
-    integer ncerr_not_opt
-
-    !-------------------
-
-    ncerr_not_opt = nf90_get_var(ncid, varid, values, start, count_nc, &
-         stride, map)
-    if (present(ncerr)) then
-       ncerr = ncerr_not_opt
-    else
-       call handle_err("nf95_get_var_1D_FourByteReal", ncerr_not_opt, ncid, &
-            varid)
-    end if
-
-  end subroutine nf95_get_var_1D_FourByteReal
-
-  !***********************
-
-  subroutine nf95_get_var_1D_FourByteInt(ncid, varid, values, start, &
-       count_nc, stride, map, ncerr)
-
-    integer,                         intent(in) :: ncid, varid
-    integer, intent(out) :: values(:)
-    integer, dimension(:), optional, intent(in) :: start, count_nc, stride, map
-    integer, intent(out), optional:: ncerr
-
-    ! Variable local to the procedure:
-    integer ncerr_not_opt
-
-    !-------------------
-
-    ncerr_not_opt = nf90_get_var(ncid, varid, values, start, count_nc, &
-         stride, map)
-    if (present(ncerr)) then
-       ncerr = ncerr_not_opt
-    else
-       call handle_err("nf95_get_var_1D_FourByteInt", ncerr_not_opt, ncid, &
-            varid)
-    end if
-
-  end subroutine nf95_get_var_1D_FourByteInt
-
-  !***********************
-
-  subroutine nf95_get_var_1D_EightByteReal(ncid, varid, values, start, &
-       count_nc, stride, map, ncerr)
-
-    use typesizes, only: eightByteReal
-
-    integer,                         intent(in) :: ncid, varid
-    real (kind = EightByteReal),     intent(out) :: values(:)
-    integer, dimension(:), optional, intent(in):: start, count_nc, stride, map
-    integer, intent(out), optional:: ncerr
-
-    ! Variable local to the procedure:
-    integer ncerr_not_opt
-
-    !-------------------
-
-    ncerr_not_opt = nf90_get_var(ncid, varid, values, start, count_nc, &
-         stride, map)
-    if (present(ncerr)) then
-       ncerr = ncerr_not_opt
-    else
-       call handle_err("nf95_get_var_1D_eightByteReal", ncerr_not_opt, ncid, &
-            varid)
-    end if
-
-  end subroutine nf95_get_var_1D_EightByteReal
-
-  !***********************
-
-  subroutine nf95_get_var_2D_FourByteReal(ncid, varid, values, start, &
-       count_nc, stride, map, ncerr)
-
-    integer,                         intent(in) :: ncid, varid
-    real , intent(out) :: values(:, :)
-    integer, dimension(:), optional, intent(in) :: start, count_nc, stride, map
-    integer, intent(out), optional:: ncerr
-
-    ! Variable local to the procedure:
-    integer ncerr_not_opt
-
-    !-------------------
-
-    ncerr_not_opt = nf90_get_var(ncid, varid, values, start, count_nc, &
-         stride, map)
-    if (present(ncerr)) then
-       ncerr = ncerr_not_opt
-    else
-       call handle_err("nf95_get_var_2D_FourByteReal", ncerr_not_opt, ncid, &
-            varid)
-    end if
-
-  end subroutine nf95_get_var_2D_FourByteReal
-
-  !***********************
-
-  subroutine nf95_get_var_2D_EightByteReal(ncid, varid, values, start, &
-       count_nc, stride, map, ncerr)
-
-    use typesizes, only: EightByteReal
-
-    integer,                         intent(in) :: ncid, varid
-    real (kind = EightByteReal), intent(out) :: values(:, :)
-    integer, dimension(:), optional, intent(in) :: start, count_nc, stride, map
-    integer, intent(out), optional:: ncerr
-
-    ! Variable local to the procedure:
-    integer ncerr_not_opt
-
-    !-------------------
-
-    ncerr_not_opt = nf90_get_var(ncid, varid, values, start, count_nc, &
-         stride, map)
-    if (present(ncerr)) then
-       ncerr = ncerr_not_opt
-    else
-       call handle_err("nf95_get_var_2D_EightByteReal", ncerr_not_opt, ncid, &
-            varid)
-    end if
-
-  end subroutine nf95_get_var_2D_EightByteReal
-
-  !***********************
-
-  subroutine nf95_get_var_3D_FourByteInt(ncid, varid, values, start, &
-       count_nc, stride, map, ncerr)
-
-    integer, intent(in):: ncid, varid
-    integer, intent(out):: values(:, :, :)
-    integer, dimension(:), optional, intent(in):: start, count_nc, stride, map
-    integer, intent(out), optional:: ncerr
-
-    ! Variable local to the procedure:
-    integer ncerr_not_opt
-
-    !-------------------
-
-    ncerr_not_opt = nf90_get_var(ncid, varid, values, start, count_nc, &
-         stride, map)
-    if (present(ncerr)) then
-       ncerr = ncerr_not_opt
-    else
-       call handle_err("nf95_get_var_3D_FourByteInt", ncerr_not_opt, ncid, &
-            varid)
-    end if
-
-  end subroutine nf95_get_var_3D_FourByteInt
-
-  !***********************
-
-  subroutine nf95_get_var_3D_FourByteReal(ncid, varid, values, start, &
-       count_nc, stride, map, ncerr)
-
-    integer,                         intent(in) :: ncid, varid
-    real , intent(out) :: values(:, :, :)
-    integer, dimension(:), optional, intent(in) :: start, count_nc, stride, map
-    integer, intent(out), optional:: ncerr
-
-    ! Variable local to the procedure:
-    integer ncerr_not_opt
-
-    !-------------------
-
-    ncerr_not_opt = nf90_get_var(ncid, varid, values, start, count_nc, &
-         stride, map)
-    if (present(ncerr)) then
-       ncerr = ncerr_not_opt
-    else
-       call handle_err("nf95_get_var_3D_FourByteReal", ncerr_not_opt, ncid, &
-            varid)
-    end if
-
-  end subroutine nf95_get_var_3D_FourByteReal
-
-  !***********************
-
-  subroutine nf95_get_var_3D_EightByteReal(ncid, varid, values, start, &
-       count_nc, stride, map, ncerr)
-
-    use typesizes, only: eightByteReal
-
-    integer,                         intent(in) :: ncid, varid
-    real (kind = EightByteReal),     intent(out) :: values(:, :, :)
-    integer, dimension(:), optional, intent(in) :: start, count_nc, stride, map
-    integer, intent(out), optional:: ncerr
-
-    ! Variable local to the procedure:
-    integer ncerr_not_opt
-
-    !-------------------
-
-    ncerr_not_opt = nf90_get_var(ncid, varid, values, start, count_nc, &
-         stride, map)
-    if (present(ncerr)) then
-       ncerr = ncerr_not_opt
-    else
-       call handle_err("nf95_get_var_3D_eightByteReal", ncerr_not_opt, ncid, &
-            varid)
-    end if
-
-  end subroutine nf95_get_var_3D_EightByteReal
-
-  !***********************
-
-  subroutine nf95_get_var_4D_FourByteReal(ncid, varid, values, start, &
-       count_nc, stride, map, ncerr)
-
-    integer,                         intent(in) :: ncid, varid
-    real , intent(out) :: values(:, :, :, :)
-    integer, dimension(:), optional, intent(in) :: start, count_nc, stride, map
-    integer, intent(out), optional:: ncerr
-
-    ! Variable local to the procedure:
-    integer ncerr_not_opt
-
-    !-------------------
-
-    ncerr_not_opt = nf90_get_var(ncid, varid, values, start, count_nc, &
-         stride, map)
-    if (present(ncerr)) then
-       ncerr = ncerr_not_opt
-    else
-       call handle_err("nf95_get_var_4D_FourByteReal", ncerr_not_opt, ncid, &
-            varid)
-    end if
-
-  end subroutine nf95_get_var_4D_FourByteReal
-
-  !***********************
-
-  subroutine nf95_get_var_4D_EightByteReal(ncid, varid, values, start, &
-       count_nc, stride, map, ncerr)
-
-    use typesizes, only: EightByteReal
-
-    integer, intent(in):: ncid, varid
-    real(kind = EightByteReal), intent(out):: values(:, :, :, :)
-    integer, dimension(:), optional, intent(in):: start, count_nc, stride, map
-    integer, intent(out), optional:: ncerr
-
-    ! Variable local to the procedure:
-    integer ncerr_not_opt
-
-    !-------------------
-
-    ncerr_not_opt = nf90_get_var(ncid, varid, values, start, count_nc, &
-         stride, map)
-    if (present(ncerr)) then
-       ncerr = ncerr_not_opt
-    else
-       call handle_err("nf95_get_var_4D_EightByteReal", ncerr_not_opt, ncid, &
-            varid)
-    end if
-
-  end subroutine nf95_get_var_4D_EightByteReal
-
-  !***********************
-
-  subroutine nf95_get_var_5D_FourByteReal(ncid, varid, values, start, &
-       count_nc, stride, map, ncerr)
-
-    integer, intent(in):: ncid, varid
-    real, intent(out):: values(:, :, :, :, :)
-    integer, dimension(:), optional, intent(in):: start, count_nc, stride, map
-    integer, intent(out), optional:: ncerr
-
-    ! Variable local to the procedure:
-    integer ncerr_not_opt
-
-    !-------------------
-
-    ncerr_not_opt = nf90_get_var(ncid, varid, values, start, count_nc, &
-         stride, map)
-    if (present(ncerr)) then
-       ncerr = ncerr_not_opt
-    else
-       call handle_err("nf95_get_var_5D_FourByteReal", ncerr_not_opt, ncid, &
-            varid)
-    end if
-
-  end subroutine nf95_get_var_5D_FourByteReal
-
-  !***********************
-
-  subroutine nf95_get_var_5D_EightByteReal(ncid, varid, values, start, &
-       count_nc, stride, map, ncerr)
-
-    use typesizes, only: EightByteReal
-
-    integer, intent(in):: ncid, varid
-    real(kind = EightByteReal), intent(out):: values(:, :, :, :, :)
-    integer, dimension(:), optional, intent(in):: start, count_nc, stride, map
-    integer, intent(out), optional:: ncerr
-
-    ! Variable local to the procedure:
-    integer ncerr_not_opt
-
-    !-------------------
-
-    ncerr_not_opt = nf90_get_var(ncid, varid, values, start, count_nc, &
-         stride, map)
-    if (present(ncerr)) then
-       ncerr = ncerr_not_opt
-    else
-       call handle_err("nf95_get_var_5D_EightByteReal", ncerr_not_opt, ncid, &
-            varid)
-    end if
-
-  end subroutine nf95_get_var_5D_EightByteReal
-
-end module nf95_get_var_m
Index: LMDZ6/trunk/libf/misc/nf95_gw_var_m.F90
===================================================================
--- LMDZ6/trunk/libf/misc/nf95_gw_var_m.F90	(revision 4477)
+++ 	(revision )
@@ -1,336 +1,0 @@
-! $Id$
-module nf95_gw_var_m
-
-  use nf95_get_var_m, only: NF95_GET_VAR
-  use simple, only: nf95_inquire_variable, nf95_inquire_dimension
-
-  implicit none
-
-  interface nf95_gw_var
-     ! "nf95_gw_var" stands for "NetCDF 1995 get whole variable".
-     ! These procedures read a whole NetCDF variable (coordinate or
-     ! primary) into an array.
-     ! The difference between the procedures is the rank and type of
-     ! argument "values".
-     ! The procedures do not check the type of the NetCDF variable.
-
-     ! Not including double precision procedures in the generic
-     ! interface because we use a compilation option that changes default
-     ! real precision.
-     module procedure nf95_gw_var_real_1d, nf95_gw_var_real_2d, &
-          nf95_gw_var_real_3d, nf95_gw_var_real_4d, nf95_gw_var_real_5d, &
-          nf95_gw_var_int_1d, nf95_gw_var_int_3d
-  end interface
-
-  private
-  public nf95_gw_var
-
-contains
-
-  subroutine nf95_gw_var_real_1d(ncid, varid, values)
-
-    ! Real type, the array has rank 1.
-
-    integer, intent(in):: ncid
-    integer, intent(in):: varid
-    real, pointer:: values(:)
-
-    ! Variables local to the procedure:
-    integer nclen
-    integer, pointer:: dimids(:)
-
-    !---------------------
-
-    call nf95_inquire_variable(ncid, varid, dimids=dimids)
-
-    if (size(dimids) /= 1) then
-       print *, "nf95_gw_var_real_1d:"
-       print *, "varid = ", varid
-       print *, "rank of NetCDF variable is ", size(dimids), ", not 1"
-       stop 1
-    end if
-
-    call nf95_inquire_dimension(ncid, dimids(1), nclen=nclen)
-    deallocate(dimids) ! pointer
-
-    allocate(values(nclen))
-    if (nclen /= 0) call NF95_GET_VAR(ncid, varid, values)
-
-  end subroutine nf95_gw_var_real_1d
-
-  !************************************
-
-  subroutine nf95_gw_var_real_2d(ncid, varid, values)
-
-    ! Real type, the array has rank 2.
-
-    integer, intent(in):: ncid
-    integer, intent(in):: varid
-    real, pointer:: values(:, :)
-
-    ! Variables local to the procedure:
-    integer nclen1, nclen2
-    integer, pointer:: dimids(:)
-
-    !---------------------
-
-    call nf95_inquire_variable(ncid, varid, dimids=dimids)
-
-    if (size(dimids) /= 2) then
-       print *, "nf95_gw_var_real_2d:"
-       print *, "varid = ", varid
-       print *, "rank of NetCDF variable is ", size(dimids), ", not 2"
-       stop 1
-    end if
-
-    call nf95_inquire_dimension(ncid, dimids(1), nclen=nclen1)
-    call nf95_inquire_dimension(ncid, dimids(2), nclen=nclen2)
-    deallocate(dimids) ! pointer
-
-    allocate(values(nclen1, nclen2))
-    if (nclen1 /= 0 .and. nclen2 /= 0) call NF95_GET_VAR(ncid, varid, values)
-
-  end subroutine nf95_gw_var_real_2d
-
-  !************************************
-
-  subroutine nf95_gw_var_real_3d(ncid, varid, values)
-
-    ! Real type, the array has rank 3.
-
-    integer, intent(in):: ncid
-    integer, intent(in):: varid
-    real, pointer:: values(:, :, :)
-
-    ! Variables local to the procedure:
-    integer nclen1, nclen2, nclen3
-    integer, pointer:: dimids(:)
-
-    !---------------------
-
-    call nf95_inquire_variable(ncid, varid, dimids=dimids)
-
-    if (size(dimids) /= 3) then
-       print *, "nf95_gw_var_real_3d:"
-       print *, "varid = ", varid
-       print *, "rank of NetCDF variable is ", size(dimids), ", not 3"
-       stop 1
-    end if
-
-    call nf95_inquire_dimension(ncid, dimids(1), nclen=nclen1)
-    call nf95_inquire_dimension(ncid, dimids(2), nclen=nclen2)
-    call nf95_inquire_dimension(ncid, dimids(3), nclen=nclen3)
-    deallocate(dimids) ! pointer
-
-    allocate(values(nclen1, nclen2, nclen3))
-    if (nclen1 * nclen2 * nclen3 /= 0) call NF95_GET_VAR(ncid, varid, values)
-
-  end subroutine nf95_gw_var_real_3d
-
-  !************************************
-
-  subroutine nf95_gw_var_real_4d(ncid, varid, values)
-
-    ! Real type, the array has rank 4.
-
-    integer, intent(in):: ncid
-    integer, intent(in):: varid
-    real, pointer:: values(:, :, :, :)
-
-    ! Variables local to the procedure:
-    integer len_dim(4), i
-    integer, pointer:: dimids(:)
-
-    !---------------------
-
-    call nf95_inquire_variable(ncid, varid, dimids=dimids)
-
-    if (size(dimids) /= 4) then
-       print *, "nf95_gw_var_real_4d:"
-       print *, "varid = ", varid
-       print *, "rank of NetCDF variable is ", size(dimids), ", not 4"
-       stop 1
-    end if
-
-    do i = 1, 4
-       call nf95_inquire_dimension(ncid, dimids(i), nclen=len_dim(i))
-    end do
-    deallocate(dimids) ! pointer
-
-    allocate(values(len_dim(1), len_dim(2), len_dim(3), len_dim(4)))
-    if (all(len_dim /= 0)) call NF95_GET_VAR(ncid, varid, values)
-
-  end subroutine nf95_gw_var_real_4d
-
-  !************************************
-
-  subroutine nf95_gw_var_real_5d(ncid, varid, values)
-
-    ! Real type, the array has rank 5.
-
-    integer, intent(in):: ncid
-    integer, intent(in):: varid
-    real, pointer:: values(:, :, :, :, :)
-
-    ! Variables local to the procedure:
-    integer len_dim(5), i
-    integer, pointer:: dimids(:)
-
-    !---------------------
-
-    call nf95_inquire_variable(ncid, varid, dimids=dimids)
-
-    if (size(dimids) /= 5) then
-       print *, "nf95_gw_var_real_5d:"
-       print *, "varid = ", varid
-       print *, "rank of NetCDF variable is ", size(dimids), ", not 5"
-       stop 1
-    end if
-
-    do i = 1, 5
-       call nf95_inquire_dimension(ncid, dimids(i), nclen=len_dim(i))
-    end do
-    deallocate(dimids) ! pointer
-
-    allocate(values(len_dim(1), len_dim(2), len_dim(3), len_dim(4), len_dim(5)))
-    if (all(len_dim /= 0)) call NF95_GET_VAR(ncid, varid, values)
-
-  end subroutine nf95_gw_var_real_5d
-
-  !************************************
-
-!!$  subroutine nf95_gw_var_dble_1d(ncid, varid, values)
-!!$
-!!$    ! Double precision, the array has rank 1.
-!!$
-!!$    integer, intent(in):: ncid
-!!$    integer, intent(in):: varid
-!!$    double precision, pointer:: values(:)
-!!$
-!!$    ! Variables local to the procedure:
-!!$    integer nclen
-!!$    integer, pointer:: dimids(:)
-!!$
-!!$    !---------------------
-!!$
-!!$    call nf95_inquire_variable(ncid, varid, dimids=dimids)
-!!$
-!!$    if (size(dimids) /= 1) then
-!!$       print *, "nf95_gw_var_dble_1d:"
-!!$       print *, "varid = ", varid
-!!$       print *, "rank of NetCDF variable is ", size(dimids), ", not 1"
-!!$        stop 1
-!!$    end if
-!!$
-!!$    call nf95_inquire_dimension(ncid, dimids(1), nclen=nclen)
-!!$    deallocate(dimids) ! pointer
-!!$
-!!$    allocate(values(nclen))
-!!$    if (nclen /= 0) call NF95_GET_VAR(ncid, varid, values)
-!!$
-!!$  end subroutine nf95_gw_var_dble_1d
-!!$
-!!$  !************************************
-!!$
-!!$  subroutine nf95_gw_var_dble_3d(ncid, varid, values)
-!!$
-!!$    ! Double precision, the array has rank 3.
-!!$
-!!$    integer, intent(in):: ncid
-!!$    integer, intent(in):: varid
-!!$    double precision, pointer:: values(:, :, :)
-!!$
-!!$    ! Variables local to the procedure:
-!!$    integer nclen1, nclen2, nclen3
-!!$    integer, pointer:: dimids(:)
-!!$
-!!$    !---------------------
-!!$
-!!$    call nf95_inquire_variable(ncid, varid, dimids=dimids)
-!!$
-!!$    if (size(dimids) /= 3) then
-!!$       print *, "nf95_gw_var_dble_3d:"
-!!$       print *, "varid = ", varid
-!!$       print *, "rank of NetCDF variable is ", size(dimids), ", not 3"
-!!$       stop 1
-!!$    end if
-!!$
-!!$    call nf95_inquire_dimension(ncid, dimids(1), nclen=nclen1)
-!!$    call nf95_inquire_dimension(ncid, dimids(2), nclen=nclen2)
-!!$    call nf95_inquire_dimension(ncid, dimids(3), nclen=nclen3)
-!!$    deallocate(dimids) ! pointer
-!!$
-!!$    allocate(values(nclen1, nclen2, nclen3))
-!!$    if (nclen1 * nclen2 * nclen3 /= 0) call NF95_GET_VAR(ncid, varid, values)
-!!$
-!!$  end subroutine nf95_gw_var_dble_3d
-!!$
-  !************************************
-
-  subroutine nf95_gw_var_int_1d(ncid, varid, values)
-
-    ! Integer type, the array has rank 1.
-
-    integer, intent(in):: ncid
-    integer, intent(in):: varid
-    integer, pointer:: values(:)
-
-    ! Variables local to the procedure:
-    integer nclen
-    integer, pointer:: dimids(:)
-
-    !---------------------
-
-    call nf95_inquire_variable(ncid, varid, dimids=dimids)
-
-    if (size(dimids) /= 1) then
-       print *, "nf95_gw_var_int_1d:"
-       print *, "varid = ", varid
-       print *, "rank of NetCDF variable is ", size(dimids), ", not 1"
-       stop 1
-    end if
-
-    call nf95_inquire_dimension(ncid, dimids(1), nclen=nclen)
-    deallocate(dimids) ! pointer
-
-    allocate(values(nclen))
-    if (nclen /= 0) call NF95_GET_VAR(ncid, varid, values)
-
-  end subroutine nf95_gw_var_int_1d
-
-  !************************************
-
-  subroutine nf95_gw_var_int_3d(ncid, varid, values)
-
-    ! Integer type, the array has rank 3.
-
-    integer, intent(in):: ncid
-    integer, intent(in):: varid
-    integer, pointer:: values(:, :, :)
-
-    ! Variables local to the procedure:
-    integer nclen1, nclen2, nclen3
-    integer, pointer:: dimids(:)
-
-    !---------------------
-
-    call nf95_inquire_variable(ncid, varid, dimids=dimids)
-
-    if (size(dimids) /= 3) then
-       print *, "nf95_gw_var_int_3d:"
-       print *, "varid = ", varid
-       print *, "rank of NetCDF variable is ", size(dimids), ", not 3"
-       stop 1
-    end if
-
-    call nf95_inquire_dimension(ncid, dimids(1), nclen=nclen1)
-    call nf95_inquire_dimension(ncid, dimids(2), nclen=nclen2)
-    call nf95_inquire_dimension(ncid, dimids(3), nclen=nclen3)
-    deallocate(dimids) ! pointer
-
-    allocate(values(nclen1, nclen2, nclen3))
-    if (nclen1 * nclen2 * nclen3 /= 0) call NF95_GET_VAR(ncid, varid, values)
-
-  end subroutine nf95_gw_var_int_3d
-
-end module nf95_gw_var_m
Index: LMDZ6/trunk/libf/misc/nf95_put_att_m.F90
===================================================================
--- LMDZ6/trunk/libf/misc/nf95_put_att_m.F90	(revision 4477)
+++ 	(revision )
@@ -1,67 +1,0 @@
-! $Id$
-module nf95_put_att_m
-
-  implicit none
-
-  interface nf95_put_att
-     module procedure nf95_put_att_text, nf95_put_att_one_FourByteInt
-  end interface
-
-  private
-  public nf95_put_att
-
-contains
-
-  subroutine nf95_put_att_text(ncid, varid, name, values, ncerr)
-
-    use netcdf, only: nf90_put_att
-    use handle_err_m, only: handle_err
-
-    integer, intent(in) :: ncid, varid
-    character(len = *), intent(in) :: name
-    character(len = *), intent(in) :: values
-    integer, intent(out), optional:: ncerr
-
-    ! Variable local to the procedure:
-    integer ncerr_not_opt
-
-    !-------------------
-
-    ncerr_not_opt = nf90_put_att(ncid, varid, name, values)
-    if (present(ncerr)) then
-       ncerr = ncerr_not_opt
-    else
-       call handle_err("nf95_put_att_text", ncerr_not_opt, ncid, varid)
-    end if
-
-  end subroutine nf95_put_att_text
-
-  !************************************
-
-  subroutine nf95_put_att_one_FourByteInt(ncid, varid, name, values, ncerr)
-
-    use netcdf, only: nf90_put_att
-    use handle_err_m, only: handle_err
-    use typesizes, only: FourByteInt
-
-    integer, intent(in) :: ncid, varid
-    character(len = *), intent(in) :: name
-    integer(kind = FourByteInt), intent(in) :: values
-    integer, intent(out), optional:: ncerr
-
-    ! Variable local to the procedure:
-    integer ncerr_not_opt
-
-    !-------------------
-
-    ncerr_not_opt = nf90_put_att(ncid, varid, name, values)
-    if (present(ncerr)) then
-       ncerr = ncerr_not_opt
-    else
-       call handle_err("nf95_put_att_one_FourByteInt", ncerr_not_opt, ncid, &
-            varid)
-    end if
-
-  end subroutine nf95_put_att_one_FourByteInt
-
-end module nf95_put_att_m
Index: LMDZ6/trunk/libf/misc/nf95_put_var_m.F90
===================================================================
--- LMDZ6/trunk/libf/misc/nf95_put_var_m.F90	(revision 4477)
+++ 	(revision )
@@ -1,335 +1,0 @@
-! $Id$
-module nf95_put_var_m
-
-  implicit none
-
-  interface nf95_put_var
-     module procedure nf95_put_var_FourByteReal, nf95_put_var_FourByteInt, &
-          nf95_put_var_1D_FourByteReal, nf95_put_var_1D_FourByteInt, &
-          nf95_put_var_2D_FourByteReal, nf95_put_var_3D_FourByteReal, &
-          nf95_put_var_4D_FourByteReal
-  end interface
-
-  private
-  public nf95_put_var
-
-contains
-
-  subroutine nf95_put_var_FourByteReal(ncid, varid, values, start, ncerr)
-
-    use netcdf, only: nf90_put_var
-    use handle_err_m, only: handle_err
-
-    integer, intent(in) :: ncid, varid
-    real, intent(in) :: values
-    integer, dimension(:), optional, intent(in) :: start
-    integer, intent(out), optional:: ncerr
-
-    ! Variable local to the procedure:
-    integer ncerr_not_opt
-
-    !-------------------
-
-    ncerr_not_opt = nf90_put_var(ncid, varid, values, start)
-    if (present(ncerr)) then
-       ncerr = ncerr_not_opt
-    else
-       call handle_err("nf95_put_var_FourByteReal", ncerr_not_opt, ncid, &
-            varid)
-    end if
-
-  end subroutine nf95_put_var_FourByteReal
-
-  !***********************
-
-  subroutine nf95_put_var_FourByteInt(ncid, varid, values, start, ncerr)
-
-    use netcdf, only: nf90_put_var
-    use handle_err_m, only: handle_err
-
-    integer, intent(in) :: ncid, varid
-    integer, intent(in) :: values
-    integer, dimension(:), optional, intent(in) :: start
-    integer, intent(out), optional:: ncerr
-
-    ! Variable local to the procedure:
-    integer ncerr_not_opt
-
-    !-------------------
-
-    ncerr_not_opt = nf90_put_var(ncid, varid, values, start)
-    if (present(ncerr)) then
-       ncerr = ncerr_not_opt
-    else
-       call handle_err("nf95_put_var_FourByteInt", ncerr_not_opt, ncid, &
-            varid)
-    end if
-
-  end subroutine nf95_put_var_FourByteInt
-
-  !***********************
-
-  subroutine nf95_put_var_1D_FourByteReal(ncid, varid, values, start, &
-       count_nc, stride, map, ncerr)
-
-    use netcdf, only: nf90_put_var
-    use handle_err_m, only: handle_err
-
-    integer,                         intent(in) :: ncid, varid
-    real, intent(in) :: values(:)
-    integer, dimension(:), optional, intent(in) :: start, count_nc, stride, map
-    integer, intent(out), optional:: ncerr
-
-    ! Variable local to the procedure:
-    integer ncerr_not_opt
-
-    !-------------------
-
-    ncerr_not_opt = nf90_put_var(ncid, varid, values, start, count_nc, &
-         stride, map)
-    if (present(ncerr)) then
-       ncerr = ncerr_not_opt
-    else
-       call handle_err("nf95_put_var_1D_FourByteReal", ncerr_not_opt, ncid, &
-            varid)
-    end if
-
-  end subroutine nf95_put_var_1D_FourByteReal
-
-  !***********************
-
-  subroutine nf95_put_var_1D_FourByteInt(ncid, varid, values, start, &
-       count_nc, stride, map, ncerr)
-
-    use netcdf, only: nf90_put_var
-    use handle_err_m, only: handle_err
-
-    integer,                         intent(in) :: ncid, varid
-    integer, intent(in) :: values(:)
-    integer, dimension(:), optional, intent(in) :: start, count_nc, stride, map
-    integer, intent(out), optional:: ncerr
-
-    ! Variable local to the procedure:
-    integer ncerr_not_opt
-
-    !-------------------
-
-    ncerr_not_opt = nf90_put_var(ncid, varid, values, start, count_nc, &
-         stride, map)
-    if (present(ncerr)) then
-       ncerr = ncerr_not_opt
-    else
-       call handle_err("nf95_put_var_1D_FourByteInt", ncerr_not_opt, ncid, &
-            varid)
-    end if
-
-  end subroutine nf95_put_var_1D_FourByteInt
-
-  !***********************
-
-  subroutine nf95_put_var_1D_EightByteReal(ncid, varid, values, start, &
-       count_nc, stride, map, ncerr)
-
-    use typesizes, only: eightByteReal
-    use netcdf, only: nf90_put_var
-    use handle_err_m, only: handle_err
-
-    integer,                         intent(in) :: ncid, varid
-    real (kind = EightByteReal),     intent(in) :: values(:)
-    integer, dimension(:), optional, intent(in):: start, count_nc, stride, map
-    integer, intent(out), optional:: ncerr
-
-    ! Variable local to the procedure:
-    integer ncerr_not_opt
-
-    !-------------------
-
-    ncerr_not_opt = nf90_put_var(ncid, varid, values, start, count_nc, &
-         stride, map)
-    if (present(ncerr)) then
-       ncerr = ncerr_not_opt
-    else
-       call handle_err("nf95_put_var_1D_eightByteReal", ncerr_not_opt, ncid, &
-            varid)
-    end if
-
-  end subroutine nf95_put_var_1D_EightByteReal
-
-  !***********************
-
-  subroutine nf95_put_var_2D_FourByteReal(ncid, varid, values, start, &
-       count_nc, stride, map, ncerr)
-
-    use netcdf, only: nf90_put_var
-    use handle_err_m, only: handle_err
-
-    integer,                         intent(in) :: ncid, varid
-    real, intent(in) :: values(:, :)
-    integer, dimension(:), optional, intent(in) :: start, count_nc, stride, map
-    integer, intent(out), optional:: ncerr
-
-    ! Variable local to the procedure:
-    integer ncerr_not_opt
-
-    !-------------------
-
-    ncerr_not_opt = nf90_put_var(ncid, varid, values, start, count_nc, &
-         stride, map)
-    if (present(ncerr)) then
-       ncerr = ncerr_not_opt
-    else
-       call handle_err("nf95_put_var_2D_FourByteReal", ncerr_not_opt, ncid, &
-            varid)
-    end if
-
-  end subroutine nf95_put_var_2D_FourByteReal
-
-  !***********************
-
-  subroutine nf95_put_var_2D_EightByteReal(ncid, varid, values, start, &
-       count_nc, stride, map, ncerr)
-
-    use typesizes, only: EightByteReal
-    use netcdf, only: nf90_put_var
-    use handle_err_m, only: handle_err
-
-    integer,                         intent(in) :: ncid, varid
-    real (kind = EightByteReal), intent(in) :: values(:, :)
-    integer, dimension(:), optional, intent(in) :: start, count_nc, stride, map
-    integer, intent(out), optional:: ncerr
-
-    ! Variable local to the procedure:
-    integer ncerr_not_opt
-
-    !-------------------
-
-    ncerr_not_opt = nf90_put_var(ncid, varid, values, start, count_nc, &
-         stride, map)
-    if (present(ncerr)) then
-       ncerr = ncerr_not_opt
-    else
-       call handle_err("nf95_put_var_2D_EightByteReal", ncerr_not_opt, ncid, &
-            varid)
-    end if
-
-  end subroutine nf95_put_var_2D_EightByteReal
-
-  !***********************
-
-  subroutine nf95_put_var_3D_FourByteReal(ncid, varid, values, start, &
-       count_nc, stride, map, ncerr)
-
-    use netcdf, only: nf90_put_var
-    use handle_err_m, only: handle_err
-
-    integer,                         intent(in) :: ncid, varid
-    real, intent(in) :: values(:, :, :)
-    integer, dimension(:), optional, intent(in) :: start, count_nc, stride, map
-    integer, intent(out), optional:: ncerr
-
-    ! Variable local to the procedure:
-    integer ncerr_not_opt
-
-    !-------------------
-
-    ncerr_not_opt = nf90_put_var(ncid, varid, values, start, count_nc, &
-         stride, map)
-    if (present(ncerr)) then
-       ncerr = ncerr_not_opt
-    else
-       call handle_err("nf95_put_var_3D_FourByteReal", ncerr_not_opt, ncid, &
-            varid)
-    end if
-
-  end subroutine nf95_put_var_3D_FourByteReal
-
-  !***********************
-
-  subroutine nf95_put_var_3D_EightByteReal(ncid, varid, values, start, &
-       count_nc, stride, map, ncerr)
-
-    use typesizes, only: eightByteReal
-    use netcdf, only: nf90_put_var
-    use handle_err_m, only: handle_err
-
-    integer,                         intent(in) :: ncid, varid
-    real (kind = EightByteReal),     intent(in) :: values(:, :, :)
-    integer, dimension(:), optional, intent(in) :: start, count_nc, stride, map
-    integer, intent(out), optional:: ncerr
-
-    ! Variable local to the procedure:
-    integer ncerr_not_opt
-
-    !-------------------
-
-    ncerr_not_opt = nf90_put_var(ncid, varid, values, start, count_nc, &
-         stride, map)
-    if (present(ncerr)) then
-       ncerr = ncerr_not_opt
-    else
-       call handle_err("nf95_put_var_3D_eightByteReal", ncerr_not_opt, ncid, &
-            varid)
-    end if
-
-  end subroutine nf95_put_var_3D_EightByteReal
-
-  !***********************
-
-  subroutine nf95_put_var_4D_FourByteReal(ncid, varid, values, start, &
-       count_nc, stride, map, ncerr)
-
-    use netcdf, only: nf90_put_var
-    use handle_err_m, only: handle_err
-
-    integer,                         intent(in) :: ncid, varid
-    real, intent(in) :: values(:, :, :, :)
-    integer, dimension(:), optional, intent(in) :: start, count_nc, stride, map
-    integer, intent(out), optional:: ncerr
-
-    ! Variable local to the procedure:
-    integer ncerr_not_opt
-
-    !-------------------
-
-    ncerr_not_opt = nf90_put_var(ncid, varid, values, start, count_nc, &
-         stride, map)
-    if (present(ncerr)) then
-       ncerr = ncerr_not_opt
-    else
-       call handle_err("nf95_put_var_4D_FourByteReal", ncerr_not_opt, ncid, &
-            varid)
-    end if
-
-  end subroutine nf95_put_var_4D_FourByteReal
-
-  !***********************
-
-  subroutine nf95_put_var_4D_EightByteReal(ncid, varid, values, start, &
-       count_nc, stride, map, ncerr)
-
-    use typesizes, only: EightByteReal
-    use netcdf, only: nf90_put_var
-    use handle_err_m, only: handle_err
-
-    integer, intent(in):: ncid, varid
-    real(kind = EightByteReal), intent(in):: values(:, :, :, :)
-    integer, dimension(:), optional, intent(in):: start, count_nc, stride, map
-    integer, intent(out), optional:: ncerr
-
-    ! Variable local to the procedure:
-    integer ncerr_not_opt
-
-    !-------------------
-
-    ncerr_not_opt = nf90_put_var(ncid, varid, values, start, count_nc, &
-         stride, map)
-    if (present(ncerr)) then
-       ncerr = ncerr_not_opt
-    else
-       call handle_err("nf95_put_var_4D_EightByteReal", ncerr_not_opt, ncid, &
-            varid)
-    end if
-
-  end subroutine nf95_put_var_4D_EightByteReal
-
-end module nf95_put_var_m
Index: LMDZ6/trunk/libf/misc/simple.F90
===================================================================
--- LMDZ6/trunk/libf/misc/simple.F90	(revision 4477)
+++ 	(revision )
@@ -1,361 +1,0 @@
-! $Id$
-module simple
-
-  use handle_err_m, only: handle_err
-  
-  implicit none
-
-  private handle_err
-
-contains
-
-  subroutine nf95_open(path, mode, ncid, chunksize, ncerr)
-
-    use netcdf, only: nf90_open
-
-    character(len=*), intent(in):: path
-    integer, intent(in):: mode
-    integer, intent(out):: ncid
-    integer, intent(inout), optional:: chunksize
-    integer, intent(out), optional:: ncerr
-
-    ! Variable local to the procedure:
-    integer ncerr_not_opt
-
-    !-------------------
-
-    ncerr_not_opt = nf90_open(path, mode, ncid, chunksize)
-    if (present(ncerr)) then
-       ncerr = ncerr_not_opt
-    else
-       call handle_err("nf95_open " // path, ncerr_not_opt)
-    end if
-
-  end subroutine nf95_open
-
-  !************************
-
-  subroutine nf95_inq_dimid(ncid, name, dimid, ncerr)
-
-    use netcdf, only: nf90_inq_dimid
-
-    integer,             intent(in) :: ncid
-    character (len = *), intent(in) :: name
-    integer,             intent(out) :: dimid
-    integer, intent(out), optional:: ncerr
-
-    ! Variable local to the procedure:
-    integer ncerr_not_opt
-
-    !-------------------
-
-    ncerr_not_opt = nf90_inq_dimid(ncid, name, dimid)
-    if (present(ncerr)) then
-       ncerr = ncerr_not_opt
-    else
-       call handle_err("nf95_inq_dimid " // name, ncerr_not_opt, ncid)
-    end if
-
-  end subroutine nf95_inq_dimid
-
-  !************************
-
-  subroutine nf95_inquire_dimension(ncid, dimid, name, nclen, ncerr)
-
-    use netcdf, only: nf90_inquire_dimension
-
-    integer,                       intent( in) :: ncid, dimid
-    character (len = *), optional, intent(out) :: name
-    integer,             optional, intent(out) :: nclen
-    integer, intent(out), optional:: ncerr
-
-    ! Variable local to the procedure:
-    integer ncerr_not_opt
-
-    !-------------------
-
-    ncerr_not_opt = nf90_inquire_dimension(ncid, dimid, name, nclen)
-    if (present(ncerr)) then
-       ncerr = ncerr_not_opt
-    else
-       call handle_err("nf95_inquire_dimension", ncerr_not_opt, ncid)
-    end if
-
-  end subroutine nf95_inquire_dimension
-
-  !************************
-
-  subroutine nf95_inq_varid(ncid, name, varid, ncerr)
-
-    use netcdf, only: nf90_inq_varid
-
-    integer,             intent(in) :: ncid
-    character(len=*), intent(in):: name
-    integer,             intent(out) :: varid
-    integer, intent(out), optional:: ncerr
-
-    ! Variable local to the procedure:
-    integer ncerr_not_opt
-
-    !-------------------
-
-    ncerr_not_opt = nf90_inq_varid(ncid, name, varid)
-    if (present(ncerr)) then
-       ncerr = ncerr_not_opt
-    else
-       call handle_err("nf95_inq_varid, name = " // name, ncerr_not_opt, ncid)
-    end if
-
-  end subroutine nf95_inq_varid
-
-  !************************
-
-  subroutine nf95_inquire_variable(ncid, varid, name, xtype, ndims, dimids, &
-       nAtts, ncerr)
-
-    ! In "nf90_inquire_variable", "dimids" is an assumed-size array.
-    ! This is not optimal.
-    ! We are in the classical case of an array the size of which is
-    ! unknown in the calling procedure, before the call.
-    ! Here we use a better solution: a pointer argument array.
-    ! This procedure associates and defines "dimids" if it is present.
-
-    use netcdf, only: nf90_inquire_variable, nf90_max_var_dims
-
-    integer, intent(in):: ncid, varid
-    character(len = *), optional, intent(out):: name
-    integer, optional, intent(out) :: xtype, ndims
-    integer, dimension(:), optional, pointer :: dimids
-    integer, optional, intent(out) :: nAtts
-    integer, intent(out), optional :: ncerr
-
-    ! Variable local to the procedure:
-    integer ncerr_not_opt
-    integer dimids_local(nf90_max_var_dims)
-    integer ndims_not_opt
-
-    !-------------------
-
-    if (present(dimids)) then
-       ncerr_not_opt = nf90_inquire_variable(ncid, varid, name, xtype, &
-            ndims_not_opt, dimids_local, nAtts)
-       allocate(dimids(ndims_not_opt)) ! also works if ndims_not_opt == 0
-       dimids = dimids_local(:ndims_not_opt)
-       if (present(ndims)) ndims = ndims_not_opt
-    else
-       ncerr_not_opt = nf90_inquire_variable(ncid, varid, name, xtype, ndims, &
-            nAtts=nAtts)
-    end if
-
-    if (present(ncerr)) then
-       ncerr = ncerr_not_opt
-    else
-       call handle_err("nf95_inquire_variable", ncerr_not_opt, ncid, varid)
-    end if
-
-  end subroutine nf95_inquire_variable
-
-  !************************
-
-  subroutine nf95_create(path, cmode, ncid, initialsize, chunksize, ncerr)
-    
-    use netcdf, only: nf90_create
-
-    character (len = *), intent(in   ) :: path
-    integer,             intent(in   ) :: cmode
-    integer,             intent(  out) :: ncid
-    integer, optional,   intent(in   ) :: initialsize
-    integer, optional,   intent(inout) :: chunksize
-    integer, intent(out), optional :: ncerr
-
-    ! Variable local to the procedure:
-    integer ncerr_not_opt
-
-    !-------------------
-
-    ncerr_not_opt = nf90_create(path, cmode, ncid, initialsize, chunksize)
-    if (present(ncerr)) then
-       ncerr = ncerr_not_opt
-    else
-       call handle_err("nf95_create " // path, ncerr_not_opt)
-    end if
-
-  end subroutine nf95_create
-
-  !************************
-
-  subroutine nf95_def_dim(ncid, name, nclen, dimid, ncerr)
-
-    use netcdf, only: nf90_def_dim
-
-    integer,             intent( in) :: ncid
-    character (len = *), intent( in) :: name
-    integer,             intent( in) :: nclen
-    integer,             intent(out) :: dimid
-    integer, intent(out), optional :: ncerr
-
-    ! Variable local to the procedure:
-    integer ncerr_not_opt
-
-    !-------------------
-
-    ncerr_not_opt = nf90_def_dim(ncid, name, nclen, dimid)
-    if (present(ncerr)) then
-       ncerr = ncerr_not_opt
-    else
-       call handle_err("nf95_def_dim " // name, ncerr_not_opt, ncid)
-    end if
-
-  end subroutine nf95_def_dim
-
-  !***********************
-
-  subroutine nf95_redef(ncid, ncerr)
-
-    use netcdf, only: nf90_redef
-
-    integer, intent( in) :: ncid
-    integer, intent(out), optional :: ncerr
-
-    ! Variable local to the procedure:
-    integer ncerr_not_opt
-
-    !-------------------
-
-    ncerr_not_opt = nf90_redef(ncid)
-    if (present(ncerr)) then
-       ncerr = ncerr_not_opt
-    else
-       call handle_err("nf95_redef", ncerr_not_opt, ncid)
-    end if
-
-  end subroutine nf95_redef
-  
-  !***********************
-
-  subroutine nf95_enddef(ncid, h_minfree, v_align, v_minfree, r_align, ncerr)
-
-    use netcdf, only: nf90_enddef
-
-    integer,           intent( in) :: ncid
-    integer, optional, intent( in) :: h_minfree, v_align, v_minfree, r_align
-    integer, intent(out), optional :: ncerr
-
-    ! Variable local to the procedure:
-    integer ncerr_not_opt
-
-    !-------------------
-
-    ncerr_not_opt = nf90_enddef(ncid, h_minfree, v_align, v_minfree, r_align)
-    if (present(ncerr)) then
-       ncerr = ncerr_not_opt
-    else
-       call handle_err("nf95_enddef", ncerr_not_opt, ncid)
-    end if
-
-  end subroutine nf95_enddef
-
-  !***********************
-
-  subroutine nf95_close(ncid, ncerr)
-
-    use netcdf, only: nf90_close
-
-    integer, intent( in) :: ncid
-    integer, intent(out), optional :: ncerr
-
-    ! Variable local to the procedure:
-    integer ncerr_not_opt
-
-    !-------------------
-
-    ncerr_not_opt = nf90_close(ncid)
-    if (present(ncerr)) then
-       ncerr = ncerr_not_opt
-    else
-       call handle_err("nf95_close", ncerr_not_opt)
-    end if
-
-  end subroutine nf95_close
-
-  !***********************
-
-  subroutine nf95_copy_att(ncid_in, varid_in, name, ncid_out, varid_out, ncerr)
-
-    use netcdf, only: nf90_copy_att
-
-    integer, intent( in):: ncid_in,  varid_in
-    character(len=*), intent( in):: name
-    integer, intent( in):: ncid_out, varid_out
-    integer, intent(out), optional:: ncerr
-
-    ! Variable local to the procedure:
-    integer ncerr_not_opt
-
-    !-------------------
-
-    ncerr_not_opt = nf90_copy_att(ncid_in, varid_in, name, ncid_out, varid_out)
-    if (present(ncerr)) then
-       ncerr = ncerr_not_opt
-    else
-       call handle_err("nf95_copy_att " // name, ncerr_not_opt, ncid_out)
-    end if
-
-  end subroutine nf95_copy_att
-
-  !***********************
-
-  subroutine nf95_inquire_attribute(ncid, varid, name, xtype, nclen, attnum, &
-       ncerr)
-
-    use netcdf, only: nf90_inquire_attribute
-
-    integer,             intent( in)           :: ncid, varid
-    character (len = *), intent( in)           :: name
-    integer,             intent(out), optional :: xtype, nclen, attnum
-    integer, intent(out), optional:: ncerr
-
-    ! Variable local to the procedure:
-    integer ncerr_not_opt
-
-    !-------------------
-
-    ncerr_not_opt = nf90_inquire_attribute(ncid, varid, name, xtype, nclen, &
-         attnum)
-    if (present(ncerr)) then
-       ncerr = ncerr_not_opt
-    else
-       call handle_err("nf95_inquire_attribute " // name, ncerr_not_opt, &
-            ncid, varid)
-    end if
-
-  end subroutine nf95_inquire_attribute
-
-  !***********************
-
-  subroutine nf95_inquire(ncid, nDimensions, nVariables, nAttributes, &
-       unlimitedDimId, formatNum, ncerr)
-
-    use netcdf, only: nf90_inquire
-
-    integer,           intent( in) :: ncid
-    integer, optional, intent(out) :: nDimensions, nVariables, nAttributes
-    integer, optional, intent(out) :: unlimitedDimId, formatNum
-    integer, intent(out), optional:: ncerr
-
-    ! Variable local to the procedure:
-    integer ncerr_not_opt
-
-    !-------------------
-
-    ncerr_not_opt = nf90_inquire(ncid, nDimensions, nVariables, nAttributes, &
-         unlimitedDimId, formatNum)
-    if (present(ncerr)) then
-       ncerr = ncerr_not_opt
-    else
-       call handle_err("nf95_inquire", ncerr_not_opt, ncid)
-    end if
-
-  end subroutine nf95_inquire
-
-end module simple
