Index: /LMDZ4/branches/LMDZ4-dev/libf/bibio/assert_eq_m.F90
===================================================================
--- /LMDZ4/branches/LMDZ4-dev/libf/bibio/assert_eq_m.F90	(revision 1157)
+++ /LMDZ4/branches/LMDZ4-dev/libf/bibio/assert_eq_m.F90	(revision 1157)
@@ -0,0 +1,70 @@
+! $Id$
+MODULE assert_eq_m
+
+  implicit none
+
+  INTERFACE assert_eq
+     MODULE PROCEDURE assert_eq2,assert_eq3,assert_eq4,assert_eqn
+  END INTERFACE
+
+  private assert_eq2,assert_eq3,assert_eq4,assert_eqn
+
+CONTAINS
+
+  FUNCTION assert_eq2(n1,n2,string)
+    CHARACTER(LEN=*), INTENT(IN) :: string
+    INTEGER, INTENT(IN) :: n1,n2
+    INTEGER  assert_eq2
+    if (n1 == n2) then
+       assert_eq2=n1
+    else
+       write (*,*) 'nrerror: an assert_eq failed with this tag: ', &
+            string
+       print *, 'program terminated by assert_eq2'
+       stop 1
+    end if
+  END FUNCTION assert_eq2
+  !BL
+  FUNCTION assert_eq3(n1,n2,n3,string)
+    CHARACTER(LEN=*), INTENT(IN) :: string
+    INTEGER, INTENT(IN) :: n1,n2,n3
+    INTEGER  assert_eq3
+    if (n1 == n2 .and. n2 == n3) then
+       assert_eq3=n1
+    else
+       write (*,*) 'nrerror: an assert_eq failed with this tag: ', &
+            string
+       print *, 'program terminated by assert_eq3'
+       stop 1
+    end if
+  END FUNCTION assert_eq3
+  !BL
+  FUNCTION assert_eq4(n1,n2,n3,n4,string)
+    CHARACTER(LEN=*), INTENT(IN) :: string
+    INTEGER, INTENT(IN) :: n1,n2,n3,n4
+    INTEGER  assert_eq4
+    if (n1 == n2 .and. n2 == n3 .and. n3 == n4) then
+       assert_eq4=n1
+    else
+       write (*,*) 'nrerror: an assert_eq failed with this tag: ', &
+            string
+       print *, 'program terminated by assert_eq4'
+       stop 1
+    end if
+  END FUNCTION assert_eq4
+  !BL
+  FUNCTION assert_eqn(nn,string)
+    CHARACTER(LEN=*), INTENT(IN) :: string
+    INTEGER, DIMENSION(:), INTENT(IN) :: nn
+    INTEGER  assert_eqn
+    if (all(nn(2:) == nn(1))) then
+       assert_eqn=nn(1)
+    else
+       write (*,*) 'nrerror: an assert_eq failed with this tag: ', &
+            string
+       print *, 'program terminated by assert_eqn'
+       stop 1
+    end if
+  END FUNCTION assert_eqn
+
+END MODULE assert_eq_m
Index: DZ4/branches/LMDZ4-dev/libf/bibio/assert_eq_m.f90
===================================================================
--- /LMDZ4/branches/LMDZ4-dev/libf/bibio/assert_eq_m.f90	(revision 1156)
+++ 	(revision )
@@ -1,70 +1,0 @@
-! $Id$
-MODULE assert_eq_m
-
-  implicit none
-
-  INTERFACE assert_eq
-     MODULE PROCEDURE assert_eq2,assert_eq3,assert_eq4,assert_eqn
-  END INTERFACE
-
-  private assert_eq2,assert_eq3,assert_eq4,assert_eqn
-
-CONTAINS
-
-  FUNCTION assert_eq2(n1,n2,string)
-    CHARACTER(LEN=*), INTENT(IN) :: string
-    INTEGER, INTENT(IN) :: n1,n2
-    INTEGER  assert_eq2
-    if (n1 == n2) then
-       assert_eq2=n1
-    else
-       write (*,*) 'nrerror: an assert_eq failed with this tag: ', &
-            string
-       print *, 'program terminated by assert_eq2'
-       stop 1
-    end if
-  END FUNCTION assert_eq2
-  !BL
-  FUNCTION assert_eq3(n1,n2,n3,string)
-    CHARACTER(LEN=*), INTENT(IN) :: string
-    INTEGER, INTENT(IN) :: n1,n2,n3
-    INTEGER  assert_eq3
-    if (n1 == n2 .and. n2 == n3) then
-       assert_eq3=n1
-    else
-       write (*,*) 'nrerror: an assert_eq failed with this tag: ', &
-            string
-       print *, 'program terminated by assert_eq3'
-       stop 1
-    end if
-  END FUNCTION assert_eq3
-  !BL
-  FUNCTION assert_eq4(n1,n2,n3,n4,string)
-    CHARACTER(LEN=*), INTENT(IN) :: string
-    INTEGER, INTENT(IN) :: n1,n2,n3,n4
-    INTEGER  assert_eq4
-    if (n1 == n2 .and. n2 == n3 .and. n3 == n4) then
-       assert_eq4=n1
-    else
-       write (*,*) 'nrerror: an assert_eq failed with this tag: ', &
-            string
-       print *, 'program terminated by assert_eq4'
-       stop 1
-    end if
-  END FUNCTION assert_eq4
-  !BL
-  FUNCTION assert_eqn(nn,string)
-    CHARACTER(LEN=*), INTENT(IN) :: string
-    INTEGER, DIMENSION(:), INTENT(IN) :: nn
-    INTEGER  assert_eqn
-    if (all(nn(2:) == nn(1))) then
-       assert_eqn=nn(1)
-    else
-       write (*,*) 'nrerror: an assert_eq failed with this tag: ', &
-            string
-       print *, 'program terminated by assert_eqn'
-       stop 1
-    end if
-  END FUNCTION assert_eqn
-
-END MODULE assert_eq_m
Index: /LMDZ4/branches/LMDZ4-dev/libf/bibio/assert_m.F90
===================================================================
--- /LMDZ4/branches/LMDZ4-dev/libf/bibio/assert_m.F90	(revision 1157)
+++ /LMDZ4/branches/LMDZ4-dev/libf/bibio/assert_m.F90	(revision 1157)
@@ -0,0 +1,69 @@
+! $Id$
+MODULE assert_m
+
+  implicit none
+
+  INTERFACE assert
+     MODULE PROCEDURE assert1,assert2,assert3,assert4,assert_v
+  END INTERFACE
+
+  private assert1,assert2,assert3,assert4,assert_v
+
+CONTAINS
+
+  SUBROUTINE assert1(n1,string)
+    CHARACTER(LEN=*), INTENT(IN) :: string
+    LOGICAL, INTENT(IN) :: n1
+    if (.not. n1) then
+       write (*,*) 'nrerror: an assertion failed with this tag:', &
+            string
+       print *, 'program terminated by assert1'
+       stop 1
+    end if
+  END SUBROUTINE assert1
+  !BL
+  SUBROUTINE assert2(n1,n2,string)
+    CHARACTER(LEN=*), INTENT(IN) :: string
+    LOGICAL, INTENT(IN) :: n1,n2
+    if (.not. (n1 .and. n2)) then
+       write (*,*) 'nrerror: an assertion failed with this tag:', &
+            string
+       print *, 'program terminated by assert2'
+       stop 1
+    end if
+  END SUBROUTINE assert2
+  !BL
+  SUBROUTINE assert3(n1,n2,n3,string)
+    CHARACTER(LEN=*), INTENT(IN) :: string
+    LOGICAL, INTENT(IN) :: n1,n2,n3
+    if (.not. (n1 .and. n2 .and. n3)) then
+       write (*,*) 'nrerror: an assertion failed with this tag:', &
+            string
+       print *, 'program terminated by assert3'
+       stop 1
+    end if
+  END SUBROUTINE assert3
+  !BL
+  SUBROUTINE assert4(n1,n2,n3,n4,string)
+    CHARACTER(LEN=*), INTENT(IN) :: string
+    LOGICAL, INTENT(IN) :: n1,n2,n3,n4
+    if (.not. (n1 .and. n2 .and. n3 .and. n4)) then
+       write (*,*) 'nrerror: an assertion failed with this tag:', &
+            string
+       print *, 'program terminated by assert4'
+       stop 1
+    end if
+  END SUBROUTINE assert4
+  !BL
+  SUBROUTINE assert_v(n,string)
+    CHARACTER(LEN=*), INTENT(IN) :: string
+    LOGICAL, DIMENSION(:), INTENT(IN) :: n
+    if (.not. all(n)) then
+       write (*,*) 'nrerror: an assertion failed with this tag:', &
+            string
+       print *, 'program terminated by assert_v'
+       stop 1
+    end if
+  END SUBROUTINE assert_v
+
+END MODULE assert_m
Index: DZ4/branches/LMDZ4-dev/libf/bibio/assert_m.f90
===================================================================
--- /LMDZ4/branches/LMDZ4-dev/libf/bibio/assert_m.f90	(revision 1156)
+++ 	(revision )
@@ -1,69 +1,0 @@
-! $Id$
-MODULE assert_m
-
-  implicit none
-
-  INTERFACE assert
-     MODULE PROCEDURE assert1,assert2,assert3,assert4,assert_v
-  END INTERFACE
-
-  private assert1,assert2,assert3,assert4,assert_v
-
-CONTAINS
-
-  SUBROUTINE assert1(n1,string)
-    CHARACTER(LEN=*), INTENT(IN) :: string
-    LOGICAL, INTENT(IN) :: n1
-    if (.not. n1) then
-       write (*,*) 'nrerror: an assertion failed with this tag:', &
-            string
-       print *, 'program terminated by assert1'
-       stop 1
-    end if
-  END SUBROUTINE assert1
-  !BL
-  SUBROUTINE assert2(n1,n2,string)
-    CHARACTER(LEN=*), INTENT(IN) :: string
-    LOGICAL, INTENT(IN) :: n1,n2
-    if (.not. (n1 .and. n2)) then
-       write (*,*) 'nrerror: an assertion failed with this tag:', &
-            string
-       print *, 'program terminated by assert2'
-       stop 1
-    end if
-  END SUBROUTINE assert2
-  !BL
-  SUBROUTINE assert3(n1,n2,n3,string)
-    CHARACTER(LEN=*), INTENT(IN) :: string
-    LOGICAL, INTENT(IN) :: n1,n2,n3
-    if (.not. (n1 .and. n2 .and. n3)) then
-       write (*,*) 'nrerror: an assertion failed with this tag:', &
-            string
-       print *, 'program terminated by assert3'
-       stop 1
-    end if
-  END SUBROUTINE assert3
-  !BL
-  SUBROUTINE assert4(n1,n2,n3,n4,string)
-    CHARACTER(LEN=*), INTENT(IN) :: string
-    LOGICAL, INTENT(IN) :: n1,n2,n3,n4
-    if (.not. (n1 .and. n2 .and. n3 .and. n4)) then
-       write (*,*) 'nrerror: an assertion failed with this tag:', &
-            string
-       print *, 'program terminated by assert4'
-       stop 1
-    end if
-  END SUBROUTINE assert4
-  !BL
-  SUBROUTINE assert_v(n,string)
-    CHARACTER(LEN=*), INTENT(IN) :: string
-    LOGICAL, DIMENSION(:), INTENT(IN) :: n
-    if (.not. all(n)) then
-       write (*,*) 'nrerror: an assertion failed with this tag:', &
-            string
-       print *, 'program terminated by assert_v'
-       stop 1
-    end if
-  END SUBROUTINE assert_v
-
-END MODULE assert_m
Index: /LMDZ4/branches/LMDZ4-dev/libf/bibio/handle_err_m.F90
===================================================================
--- /LMDZ4/branches/LMDZ4-dev/libf/bibio/handle_err_m.F90	(revision 1157)
+++ /LMDZ4/branches/LMDZ4-dev/libf/bibio/handle_err_m.F90	(revision 1157)
@@ -0,0 +1,46 @@
+! $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 *, 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
+       stop 1
+    end if
+
+  end subroutine handle_err
+
+end module handle_err_m
Index: DZ4/branches/LMDZ4-dev/libf/bibio/handle_err_m.f90
===================================================================
--- /LMDZ4/branches/LMDZ4-dev/libf/bibio/handle_err_m.f90	(revision 1156)
+++ 	(revision )
@@ -1,46 +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 *, 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
-       stop 1
-    end if
-
-  end subroutine handle_err
-
-end module handle_err_m
Index: /LMDZ4/branches/LMDZ4-dev/libf/bibio/interpolation.F90
===================================================================
--- /LMDZ4/branches/LMDZ4-dev/libf/bibio/interpolation.F90	(revision 1157)
+++ /LMDZ4/branches/LMDZ4-dev/libf/bibio/interpolation.F90	(revision 1157)
@@ -0,0 +1,138 @@
+! $Id$
+module interpolation
+
+  ! From Press et al., 1996, version 2.10a
+  ! B3 Interpolation and Extrapolation
+
+  IMPLICIT NONE 
+
+contains
+
+  pure FUNCTION locate(xx,x)
+
+    REAL, DIMENSION(:), INTENT(IN) :: xx
+    REAL, INTENT(IN) :: x
+    INTEGER  locate
+
+    ! Given an array xx(1:N), and given a value x, returns a value j,
+    ! between 0 and N, such that x is between xx(j) and xx(j + 1). xx
+    ! must be monotonic, either increasing or decreasing. j = 0 or j =
+    ! N is returned to indicate that x is out of range. This
+    ! procedure should not be called with a zero-sized array argument.
+    ! See notes.
+
+    INTEGER  n,jl,jm,ju
+    LOGICAL  ascnd
+
+    !----------------------------
+
+    n=size(xx)
+    ascnd = (xx(n) >= xx(1))
+    ! (True if ascending order of table, false otherwise.)
+    ! Initialize lower and upper limits:
+    jl=0
+    ju=n+1
+    do while (ju-jl > 1)
+       jm=(ju+jl)/2 ! Compute a midpoint,
+       if (ascnd .eqv. (x >= xx(jm))) then
+          jl=jm ! and replace either the lower limit
+       else
+          ju=jm ! or the upper limit, as appropriate.
+       end if
+    end do
+    ! {ju == jl + 1}
+
+    ! {(ascnd .and. xx(jl) <= x < xx(jl+1)) 
+    !  .neqv. 
+    !  (.not. ascnd .and. xx(jl+1) <= x < xx(jl))}
+
+    ! Then set the output, being careful with the endpoints:
+    if (x == xx(1)) then
+       locate=1
+    else if (x == xx(n)) then
+       locate=n-1
+    else
+       locate=jl
+    end if
+
+  END FUNCTION locate
+
+  !***************************
+
+  pure SUBROUTINE hunt(xx,x,jlo)
+
+    ! Given an array xx(1:N ), and given a value x, returns a value
+    ! jlo such that x is between xx(jlo) and xx(jlo+1). xx must be
+    ! monotonic, either increasing or decreasing. jlo = 0 or jlo = N is
+    ! returned to indicate that x is out of range. jlo on input is taken as
+    ! the initial guess for jlo on output.
+    ! Modified so that it uses the information "jlo = 0" on input.
+
+    INTEGER, INTENT(INOUT) :: jlo
+    REAL, INTENT(IN) :: x
+    REAL, DIMENSION(:), INTENT(IN) :: xx
+    INTEGER  n,inc,jhi,jm
+    LOGICAL  ascnd, hunt_up
+
+    !-----------------------------------------------------
+
+    n=size(xx)
+    ascnd = (xx(n) >= xx(1))
+    ! (True if ascending order of table, false otherwise.)
+    if (jlo < 0 .or. jlo > n) then
+       ! Input guess not useful. Go immediately to bisection.
+       jlo=0
+       jhi=n+1
+    else
+       inc=1 ! Set the hunting increment.
+       if (jlo == 0) then
+          hunt_up = .true.
+       else
+          hunt_up = x >= xx(jlo) .eqv. ascnd
+       end if
+       if (hunt_up) then ! Hunt up:
+          do
+             jhi=jlo+inc
+             if (jhi > n) then ! Done hunting, since off end of table.
+                jhi=n+1
+                exit
+             else
+                if (x < xx(jhi) .eqv. ascnd) exit
+                jlo=jhi ! Not done hunting,
+                inc=inc+inc ! so double the increment
+             end if
+          end do ! and try again.
+       else ! Hunt down:
+          jhi=jlo
+          do
+             jlo=jhi-inc
+             if (jlo < 1) then ! Done hunting, since off end of table.
+                jlo=0
+                exit
+             else
+                if (x >= xx(jlo) .eqv. ascnd) exit
+                jhi=jlo ! Not done hunting,
+                inc=inc+inc ! so double the increment
+             end if
+          end do ! and try again.
+       end if
+    end if ! Done hunting, value bracketed.
+
+    do ! Hunt is done, so begin the final bisection phase:
+       if (jhi-jlo <= 1) then
+          if (x == xx(n)) jlo=n-1
+          if (x == xx(1)) jlo=1
+          exit
+       else
+          jm=(jhi+jlo)/2
+          if (x >= xx(jm) .eqv. ascnd) then
+             jlo=jm
+          else
+             jhi=jm
+          end if
+       end if
+    end do
+
+  END SUBROUTINE hunt
+
+end module interpolation
Index: DZ4/branches/LMDZ4-dev/libf/bibio/interpolation.f90
===================================================================
--- /LMDZ4/branches/LMDZ4-dev/libf/bibio/interpolation.f90	(revision 1156)
+++ 	(revision )
@@ -1,138 +1,0 @@
-! $Id$
-module interpolation
-
-  ! From Press et al., 1996, version 2.10a
-  ! B3 Interpolation and Extrapolation
-
-  IMPLICIT NONE 
-
-contains
-
-  pure FUNCTION locate(xx,x)
-
-    REAL, DIMENSION(:), INTENT(IN) :: xx
-    REAL, INTENT(IN) :: x
-    INTEGER  locate
-
-    ! Given an array xx(1:N), and given a value x, returns a value j,
-    ! between 0 and N, such that x is between xx(j) and xx(j + 1). xx
-    ! must be monotonic, either increasing or decreasing. j = 0 or j =
-    ! N is returned to indicate that x is out of range. This
-    ! procedure should not be called with a zero-sized array argument.
-    ! See notes.
-
-    INTEGER  n,jl,jm,ju
-    LOGICAL  ascnd
-
-    !----------------------------
-
-    n=size(xx)
-    ascnd = (xx(n) >= xx(1))
-    ! (True if ascending order of table, false otherwise.)
-    ! Initialize lower and upper limits:
-    jl=0
-    ju=n+1
-    do while (ju-jl > 1)
-       jm=(ju+jl)/2 ! Compute a midpoint,
-       if (ascnd .eqv. (x >= xx(jm))) then
-          jl=jm ! and replace either the lower limit
-       else
-          ju=jm ! or the upper limit, as appropriate.
-       end if
-    end do
-    ! {ju == jl + 1}
-
-    ! {(ascnd .and. xx(jl) <= x < xx(jl+1)) 
-    !  .neqv. 
-    !  (.not. ascnd .and. xx(jl+1) <= x < xx(jl))}
-
-    ! Then set the output, being careful with the endpoints:
-    if (x == xx(1)) then
-       locate=1
-    else if (x == xx(n)) then
-       locate=n-1
-    else
-       locate=jl
-    end if
-
-  END FUNCTION locate
-
-  !***************************
-
-  pure SUBROUTINE hunt(xx,x,jlo)
-
-    ! Given an array xx(1:N ), and given a value x, returns a value
-    ! jlo such that x is between xx(jlo) and xx(jlo+1). xx must be
-    ! monotonic, either increasing or decreasing. jlo = 0 or jlo = N is
-    ! returned to indicate that x is out of range. jlo on input is taken as
-    ! the initial guess for jlo on output.
-    ! Modified so that it uses the information "jlo = 0" on input.
-
-    INTEGER, INTENT(INOUT) :: jlo
-    REAL, INTENT(IN) :: x
-    REAL, DIMENSION(:), INTENT(IN) :: xx
-    INTEGER  n,inc,jhi,jm
-    LOGICAL  ascnd, hunt_up
-
-    !-----------------------------------------------------
-
-    n=size(xx)
-    ascnd = (xx(n) >= xx(1))
-    ! (True if ascending order of table, false otherwise.)
-    if (jlo < 0 .or. jlo > n) then
-       ! Input guess not useful. Go immediately to bisection.
-       jlo=0
-       jhi=n+1
-    else
-       inc=1 ! Set the hunting increment.
-       if (jlo == 0) then
-          hunt_up = .true.
-       else
-          hunt_up = x >= xx(jlo) .eqv. ascnd
-       end if
-       if (hunt_up) then ! Hunt up:
-          do
-             jhi=jlo+inc
-             if (jhi > n) then ! Done hunting, since off end of table.
-                jhi=n+1
-                exit
-             else
-                if (x < xx(jhi) .eqv. ascnd) exit
-                jlo=jhi ! Not done hunting,
-                inc=inc+inc ! so double the increment
-             end if
-          end do ! and try again.
-       else ! Hunt down:
-          jhi=jlo
-          do
-             jlo=jhi-inc
-             if (jlo < 1) then ! Done hunting, since off end of table.
-                jlo=0
-                exit
-             else
-                if (x >= xx(jlo) .eqv. ascnd) exit
-                jhi=jlo ! Not done hunting,
-                inc=inc+inc ! so double the increment
-             end if
-          end do ! and try again.
-       end if
-    end if ! Done hunting, value bracketed.
-
-    do ! Hunt is done, so begin the final bisection phase:
-       if (jhi-jlo <= 1) then
-          if (x == xx(n)) jlo=n-1
-          if (x == xx(1)) jlo=1
-          exit
-       else
-          jm=(jhi+jlo)/2
-          if (x >= xx(jm) .eqv. ascnd) then
-             jlo=jm
-          else
-             jhi=jm
-          end if
-       end if
-    end do
-
-  END SUBROUTINE hunt
-
-end module interpolation
Index: /LMDZ4/branches/LMDZ4-dev/libf/bibio/netcdf95.F90
===================================================================
--- /LMDZ4/branches/LMDZ4-dev/libf/bibio/netcdf95.F90	(revision 1157)
+++ /LMDZ4/branches/LMDZ4-dev/libf/bibio/netcdf95.F90	(revision 1157)
@@ -0,0 +1,40 @@
+! $Id$
+module netcdf95
+
+  ! Author: Lionel GUEZ
+
+  ! Three criticisms may be made about the Fortran 90 NetCDF interface:
+
+  ! -- NetCDF procedures are usually functions with side effects.
+  ! First, they have "intent(out)" arguments.
+  ! Furthermore, there is obviously data transfer inside the procedures.
+  ! Any data transfer inside a function is considered as a side effect.
+
+  ! -- The caller of a NetCDF procedure usually has to handle the error
+  ! status. NetCDF procedures would be much friendlier if they behaved
+  ! like the Fortran input/output statements. That is, the error status
+  ! should be an optional output argument.
+  ! If the caller does not request the error status and there is an
+  ! error then the NetCDF procedure should produce an error message
+  ! and stop the program.
+
+  ! -- Some procedures use array arguments with assumed size.
+  ! It would be better to use the pointer attribute.
+
+  ! This module produces a NetCDF interface that answers those three
+  ! criticisms for some (not all) procedures.
+
+  ! This module replaces some of the official NetCDF procedures.
+  ! This module also provides the procedures "handle_err" and "nf95_gw_var".
+
+  ! This module provides only a partial replacement for some generic
+  ! procedures such as "nf90_def_var".
+
+  use nf95_def_var_m
+  use nf95_put_var_m
+  use nf95_gw_var_m
+  use nf95_put_att_m
+  use simple
+  use handle_err_m
+
+end module netcdf95
Index: DZ4/branches/LMDZ4-dev/libf/bibio/netcdf95.f90
===================================================================
--- /LMDZ4/branches/LMDZ4-dev/libf/bibio/netcdf95.f90	(revision 1156)
+++ 	(revision )
@@ -1,40 +1,0 @@
-! $Id$
-module netcdf95
-
-  ! Author: Lionel GUEZ
-
-  ! Three criticisms may be made about the Fortran 90 NetCDF interface:
-
-  ! -- NetCDF procedures are usually functions with side effects.
-  ! First, they have "intent(out)" arguments.
-  ! Furthermore, there is obviously data transfer inside the procedures.
-  ! Any data transfer inside a function is considered as a side effect.
-
-  ! -- The caller of a NetCDF procedure usually has to handle the error
-  ! status. NetCDF procedures would be much friendlier if they behaved
-  ! like the Fortran input/output statements. That is, the error status
-  ! should be an optional output argument.
-  ! If the caller does not request the error status and there is an
-  ! error then the NetCDF procedure should produce an error message
-  ! and stop the program.
-
-  ! -- Some procedures use array arguments with assumed size.
-  ! It would be better to use the pointer attribute.
-
-  ! This module produces a NetCDF interface that answers those three
-  ! criticisms for some (not all) procedures.
-
-  ! This module replaces some of the official NetCDF procedures.
-  ! This module also provides the procedures "handle_err" and "nf95_gw_var".
-
-  ! This module provides only a partial replacement for some generic
-  ! procedures such as "nf90_def_var".
-
-  use nf95_def_var_m
-  use nf95_put_var_m
-  use nf95_gw_var_m
-  use nf95_put_att_m
-  use simple
-  use handle_err_m
-
-end module netcdf95
Index: /LMDZ4/branches/LMDZ4-dev/libf/bibio/nf95_def_var_m.F90
===================================================================
--- /LMDZ4/branches/LMDZ4-dev/libf/bibio/nf95_def_var_m.F90	(revision 1157)
+++ /LMDZ4/branches/LMDZ4-dev/libf/bibio/nf95_def_var_m.F90	(revision 1157)
@@ -0,0 +1,69 @@
+! $Id$
+module nf95_def_var_m
+
+  implicit none
+
+  interface nf95_def_var
+    module procedure nf95_def_var_oneDim, nf95_def_var_ManyDims
+  end interface
+
+  private
+  public nf95_def_var
+
+contains
+
+  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: DZ4/branches/LMDZ4-dev/libf/bibio/nf95_def_var_m.f90
===================================================================
--- /LMDZ4/branches/LMDZ4-dev/libf/bibio/nf95_def_var_m.f90	(revision 1156)
+++ 	(revision )
@@ -1,69 +1,0 @@
-! $Id$
-module nf95_def_var_m
-
-  implicit none
-
-  interface nf95_def_var
-    module procedure nf95_def_var_oneDim, nf95_def_var_ManyDims
-  end interface
-
-  private
-  public nf95_def_var
-
-contains
-
-  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: /LMDZ4/branches/LMDZ4-dev/libf/bibio/nf95_gw_var_m.F90
===================================================================
--- /LMDZ4/branches/LMDZ4-dev/libf/bibio/nf95_gw_var_m.F90	(revision 1157)
+++ /LMDZ4/branches/LMDZ4-dev/libf/bibio/nf95_gw_var_m.F90	(revision 1157)
@@ -0,0 +1,338 @@
+! $Id$
+module nf95_gw_var_m
+
+  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 of the array
+     ! and the type of Fortran values.
+     ! The procedures do not check the type of the NetCDF variable.
+
+!!$     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_dble_1d, &
+!!$          nf95_gw_var_dble_3d, nf95_gw_var_int_1d, nf95_gw_var_int_3d
+     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_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.
+
+    use netcdf, only: NF90_GET_VAR
+    use simple, only: nf95_inquire_variable, nf95_inquire_dimension
+    use handle_err_m, only: handle_err
+
+    integer, intent(in):: ncid
+    integer, intent(in):: varid
+    real, pointer:: values(:)
+
+    ! Variables local to the procedure:
+    integer ierr, len
+    integer, pointer :: dimids(:)
+
+    !---------------------
+
+    call nf95_inquire_variable(ncid, varid, dimids=dimids)
+
+    if (size(dimids) /= 1) then
+       print *, "nf95_gw_var_real_1d: NetCDF variable is not of rank 1"
+       stop 1
+    end if
+
+    call nf95_inquire_dimension(ncid, dimids(1), len=len)
+    deallocate(dimids) ! pointer
+
+    allocate(values(len))
+    if (len /= 0) then
+       ierr = NF90_GET_VAR(ncid, varid, values)
+       call handle_err("NF90_GET_VAR", ierr, ncid, varid)
+    end if
+
+  end subroutine nf95_gw_var_real_1d
+
+  !************************************
+
+  subroutine nf95_gw_var_real_2d(ncid, varid, values)
+
+    ! Real type, the array has rank 2.
+
+    use netcdf, only: NF90_GET_VAR
+    use simple, only: nf95_inquire_variable, nf95_inquire_dimension
+    use handle_err_m, only: handle_err
+
+    integer, intent(in):: ncid
+    integer, intent(in):: varid
+    real, pointer:: values(:, :)
+
+    ! Variables local to the procedure:
+    integer ierr, len1, len2
+    integer, pointer :: dimids(:)
+
+    !---------------------
+
+    call nf95_inquire_variable(ncid, varid, dimids=dimids)
+
+    if (size(dimids) /= 2) then
+       print *, "nf95_gw_var_real_2d: NetCDF variable is not of rank 2"
+       stop 1
+    end if
+
+    call nf95_inquire_dimension(ncid, dimids(1), len=len1)
+    call nf95_inquire_dimension(ncid, dimids(2), len=len2)
+    deallocate(dimids) ! pointer
+
+    allocate(values(len1, len2))
+    if (len1 /= 0 .and. len2 /= 0) then
+       ierr = NF90_GET_VAR(ncid, varid, values)
+       call handle_err("NF90_GET_VAR", ierr, ncid, varid)
+    end if
+
+  end subroutine nf95_gw_var_real_2d
+
+  !************************************
+
+  subroutine nf95_gw_var_real_3d(ncid, varid, values)
+
+    ! Real type, the array has rank 3.
+
+    use netcdf, only: NF90_GET_VAR
+    use simple, only: nf95_inquire_variable, nf95_inquire_dimension
+    use handle_err_m, only: handle_err
+
+    integer, intent(in):: ncid
+    integer, intent(in):: varid
+    real, pointer:: values(:, :, :)
+
+    ! Variables local to the procedure:
+    integer ierr, len1, len2, len3
+    integer, pointer :: dimids(:)
+
+    !---------------------
+
+    call nf95_inquire_variable(ncid, varid, dimids=dimids)
+
+    if (size(dimids) /= 3) then
+       print *, "nf95_gw_var_real_3d: NetCDF variable is not of rank 3"
+       stop 1
+    end if
+
+    call nf95_inquire_dimension(ncid, dimids(1), len=len1)
+    call nf95_inquire_dimension(ncid, dimids(2), len=len2)
+    call nf95_inquire_dimension(ncid, dimids(3), len=len3)
+    deallocate(dimids) ! pointer
+
+    allocate(values(len1, len2, len3))
+    if (len1 * len2 * len3 /= 0) then
+       ierr = NF90_GET_VAR(ncid, varid, values)
+       call handle_err("NF90_GET_VAR", ierr, ncid, varid)
+    end if
+
+  end subroutine nf95_gw_var_real_3d
+
+  !************************************
+
+  subroutine nf95_gw_var_real_4d(ncid, varid, values)
+
+    ! Real type, the array has rank 4.
+
+    use netcdf, only: NF90_GET_VAR
+    use simple, only: nf95_inquire_variable, nf95_inquire_dimension
+    use handle_err_m, only: handle_err
+
+    integer, intent(in):: ncid
+    integer, intent(in):: varid
+    real, pointer:: values(:, :, :, :)
+
+    ! Variables local to the procedure:
+    integer ierr, 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: NetCDF variable is not of rank 4"
+       stop 1
+    end if
+
+    do i = 1, 4
+       call nf95_inquire_dimension(ncid, dimids(i), len=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)) then
+       ierr = NF90_GET_VAR(ncid, varid, values)
+       call handle_err("NF90_GET_VAR", ierr, ncid, varid)
+    end if
+
+  end subroutine nf95_gw_var_real_4d
+
+  !************************************
+
+!!$  subroutine nf95_gw_var_dble_1d(ncid, varid, values)
+!!$
+!!$    ! Double precision, the array has rank 1.
+!!$
+!!$    use netcdf, only: NF90_GET_VAR
+!!$    use simple, only: nf95_inquire_variable, nf95_inquire_dimension
+!!$    use handle_err_m, only: handle_err
+!!$
+!!$    integer, intent(in):: ncid
+!!$    integer, intent(in):: varid
+!!$    double precision, pointer:: values(:)
+!!$
+!!$    ! Variables local to the procedure:
+!!$    integer ierr, len
+!!$    integer, pointer :: dimids(:)
+!!$
+!!$    !---------------------
+!!$
+!!$    call nf95_inquire_variable(ncid, varid, dimids=dimids)
+!!$
+!!$    if (size(dimids) /= 1) then
+!!$       print *, "nf95_gw_var_dble_1d: NetCDF variable is not of rank 1"
+!!$       stop 1
+!!$    end if
+!!$
+!!$    call nf95_inquire_dimension(ncid, dimids(1), len=len)
+!!$    deallocate(dimids) ! pointer
+!!$
+!!$    allocate(values(len))
+!!$    if (len /= 0) then
+!!$       ierr = NF90_GET_VAR(ncid, varid, values)
+!!$       call handle_err("NF90_GET_VAR", ierr, ncid, varid)
+!!$    end if
+!!$
+!!$  end subroutine nf95_gw_var_dble_1d
+!!$
+!!$  !************************************
+!!$
+!!$  subroutine nf95_gw_var_dble_3d(ncid, varid, values)
+!!$
+!!$    ! Double precision, the array has rank 3.
+!!$
+!!$    use netcdf, only: NF90_GET_VAR
+!!$    use simple, only: nf95_inquire_variable, nf95_inquire_dimension
+!!$    use handle_err_m, only: handle_err
+!!$
+!!$    integer, intent(in):: ncid
+!!$    integer, intent(in):: varid
+!!$    double precision, pointer:: values(:, :, :)
+!!$
+!!$    ! Variables local to the procedure:
+!!$    integer ierr, len1, len2, len3
+!!$    integer, pointer :: dimids(:)
+!!$
+!!$    !---------------------
+!!$
+!!$    call nf95_inquire_variable(ncid, varid, dimids=dimids)
+!!$
+!!$    if (size(dimids) /= 3) then
+!!$       print *, "nf95_gw_var_dble_3d: NetCDF variable is not of rank 3"
+!!$       stop 1
+!!$    end if
+!!$
+!!$    call nf95_inquire_dimension(ncid, dimids(1), len=len1)
+!!$    call nf95_inquire_dimension(ncid, dimids(2), len=len2)
+!!$    call nf95_inquire_dimension(ncid, dimids(3), len=len3)
+!!$    deallocate(dimids) ! pointer
+!!$
+!!$    allocate(values(len1, len2, len3))
+!!$    if (len1 * len2 * len3 /= 0) then
+!!$       ierr = NF90_GET_VAR(ncid, varid, values)
+!!$       call handle_err("NF90_GET_VAR", ierr, ncid, varid)
+!!$    end if
+!!$
+!!$  end subroutine nf95_gw_var_dble_3d
+
+  !************************************
+
+  subroutine nf95_gw_var_int_1d(ncid, varid, values)
+
+    ! Integer type, the array has rank 1.
+
+    use netcdf, only: NF90_GET_VAR
+    use simple, only: nf95_inquire_variable, nf95_inquire_dimension
+    use handle_err_m, only: handle_err
+
+    integer, intent(in):: ncid
+    integer, intent(in):: varid
+    integer, pointer:: values(:)
+
+    ! Variables local to the procedure:
+    integer ierr, len
+    integer, pointer :: dimids(:)
+
+    !---------------------
+
+    call nf95_inquire_variable(ncid, varid, dimids=dimids)
+
+    if (size(dimids) /= 1) then
+       print *, "nf95_gw_var_int_1d: NetCDF variable is not of rank 1"
+       stop 1
+    end if
+
+    call nf95_inquire_dimension(ncid, dimids(1), len=len)
+    deallocate(dimids) ! pointer
+
+    allocate(values(len))
+    if (len /= 0) then
+       ierr = NF90_GET_VAR(ncid, varid, values)
+       call handle_err("NF90_GET_VAR", ierr, ncid, varid)
+    end if
+
+  end subroutine nf95_gw_var_int_1d
+
+  !************************************
+
+  subroutine nf95_gw_var_int_3d(ncid, varid, values)
+
+    ! Integer type, the array has rank 3.
+
+    use netcdf, only: NF90_GET_VAR
+    use simple, only: nf95_inquire_variable, nf95_inquire_dimension
+    use handle_err_m, only: handle_err
+
+    integer, intent(in):: ncid
+    integer, intent(in):: varid
+    integer, pointer:: values(:, :, :)
+
+    ! Variables local to the procedure:
+    integer ierr, len1, len2, len3
+    integer, pointer :: dimids(:)
+
+    !---------------------
+
+    call nf95_inquire_variable(ncid, varid, dimids=dimids)
+
+    if (size(dimids) /= 3) then
+       print *, "nf95_gw_var_int_3d: NetCDF variable is not of rank 3"
+       stop 1
+    end if
+
+    call nf95_inquire_dimension(ncid, dimids(1), len=len1)
+    call nf95_inquire_dimension(ncid, dimids(2), len=len2)
+    call nf95_inquire_dimension(ncid, dimids(3), len=len3)
+    deallocate(dimids) ! pointer
+
+    allocate(values(len1, len2, len3))
+    if (len1 * len2 * len3 /= 0) then
+       ierr = NF90_GET_VAR(ncid, varid, values)
+       call handle_err("NF90_GET_VAR", ierr, ncid, varid)
+    end if
+
+  end subroutine nf95_gw_var_int_3d
+
+end module nf95_gw_var_m
Index: DZ4/branches/LMDZ4-dev/libf/bibio/nf95_gw_var_m.f90
===================================================================
--- /LMDZ4/branches/LMDZ4-dev/libf/bibio/nf95_gw_var_m.f90	(revision 1156)
+++ 	(revision )
@@ -1,338 +1,0 @@
-! $Id$
-module nf95_gw_var_m
-
-  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 of the array
-     ! and the type of Fortran values.
-     ! The procedures do not check the type of the NetCDF variable.
-
-!!$     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_dble_1d, &
-!!$          nf95_gw_var_dble_3d, nf95_gw_var_int_1d, nf95_gw_var_int_3d
-     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_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.
-
-    use netcdf, only: NF90_GET_VAR
-    use simple, only: nf95_inquire_variable, nf95_inquire_dimension
-    use handle_err_m, only: handle_err
-
-    integer, intent(in):: ncid
-    integer, intent(in):: varid
-    real, pointer:: values(:)
-
-    ! Variables local to the procedure:
-    integer ierr, len
-    integer, pointer :: dimids(:)
-
-    !---------------------
-
-    call nf95_inquire_variable(ncid, varid, dimids=dimids)
-
-    if (size(dimids) /= 1) then
-       print *, "nf95_gw_var_real_1d: NetCDF variable is not of rank 1"
-       stop 1
-    end if
-
-    call nf95_inquire_dimension(ncid, dimids(1), len=len)
-    deallocate(dimids) ! pointer
-
-    allocate(values(len))
-    if (len /= 0) then
-       ierr = NF90_GET_VAR(ncid, varid, values)
-       call handle_err("NF90_GET_VAR", ierr, ncid, varid)
-    end if
-
-  end subroutine nf95_gw_var_real_1d
-
-  !************************************
-
-  subroutine nf95_gw_var_real_2d(ncid, varid, values)
-
-    ! Real type, the array has rank 2.
-
-    use netcdf, only: NF90_GET_VAR
-    use simple, only: nf95_inquire_variable, nf95_inquire_dimension
-    use handle_err_m, only: handle_err
-
-    integer, intent(in):: ncid
-    integer, intent(in):: varid
-    real, pointer:: values(:, :)
-
-    ! Variables local to the procedure:
-    integer ierr, len1, len2
-    integer, pointer :: dimids(:)
-
-    !---------------------
-
-    call nf95_inquire_variable(ncid, varid, dimids=dimids)
-
-    if (size(dimids) /= 2) then
-       print *, "nf95_gw_var_real_2d: NetCDF variable is not of rank 2"
-       stop 1
-    end if
-
-    call nf95_inquire_dimension(ncid, dimids(1), len=len1)
-    call nf95_inquire_dimension(ncid, dimids(2), len=len2)
-    deallocate(dimids) ! pointer
-
-    allocate(values(len1, len2))
-    if (len1 /= 0 .and. len2 /= 0) then
-       ierr = NF90_GET_VAR(ncid, varid, values)
-       call handle_err("NF90_GET_VAR", ierr, ncid, varid)
-    end if
-
-  end subroutine nf95_gw_var_real_2d
-
-  !************************************
-
-  subroutine nf95_gw_var_real_3d(ncid, varid, values)
-
-    ! Real type, the array has rank 3.
-
-    use netcdf, only: NF90_GET_VAR
-    use simple, only: nf95_inquire_variable, nf95_inquire_dimension
-    use handle_err_m, only: handle_err
-
-    integer, intent(in):: ncid
-    integer, intent(in):: varid
-    real, pointer:: values(:, :, :)
-
-    ! Variables local to the procedure:
-    integer ierr, len1, len2, len3
-    integer, pointer :: dimids(:)
-
-    !---------------------
-
-    call nf95_inquire_variable(ncid, varid, dimids=dimids)
-
-    if (size(dimids) /= 3) then
-       print *, "nf95_gw_var_real_3d: NetCDF variable is not of rank 3"
-       stop 1
-    end if
-
-    call nf95_inquire_dimension(ncid, dimids(1), len=len1)
-    call nf95_inquire_dimension(ncid, dimids(2), len=len2)
-    call nf95_inquire_dimension(ncid, dimids(3), len=len3)
-    deallocate(dimids) ! pointer
-
-    allocate(values(len1, len2, len3))
-    if (len1 * len2 * len3 /= 0) then
-       ierr = NF90_GET_VAR(ncid, varid, values)
-       call handle_err("NF90_GET_VAR", ierr, ncid, varid)
-    end if
-
-  end subroutine nf95_gw_var_real_3d
-
-  !************************************
-
-  subroutine nf95_gw_var_real_4d(ncid, varid, values)
-
-    ! Real type, the array has rank 4.
-
-    use netcdf, only: NF90_GET_VAR
-    use simple, only: nf95_inquire_variable, nf95_inquire_dimension
-    use handle_err_m, only: handle_err
-
-    integer, intent(in):: ncid
-    integer, intent(in):: varid
-    real, pointer:: values(:, :, :, :)
-
-    ! Variables local to the procedure:
-    integer ierr, 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: NetCDF variable is not of rank 4"
-       stop 1
-    end if
-
-    do i = 1, 4
-       call nf95_inquire_dimension(ncid, dimids(i), len=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)) then
-       ierr = NF90_GET_VAR(ncid, varid, values)
-       call handle_err("NF90_GET_VAR", ierr, ncid, varid)
-    end if
-
-  end subroutine nf95_gw_var_real_4d
-
-  !************************************
-
-!!$  subroutine nf95_gw_var_dble_1d(ncid, varid, values)
-!!$
-!!$    ! Double precision, the array has rank 1.
-!!$
-!!$    use netcdf, only: NF90_GET_VAR
-!!$    use simple, only: nf95_inquire_variable, nf95_inquire_dimension
-!!$    use handle_err_m, only: handle_err
-!!$
-!!$    integer, intent(in):: ncid
-!!$    integer, intent(in):: varid
-!!$    double precision, pointer:: values(:)
-!!$
-!!$    ! Variables local to the procedure:
-!!$    integer ierr, len
-!!$    integer, pointer :: dimids(:)
-!!$
-!!$    !---------------------
-!!$
-!!$    call nf95_inquire_variable(ncid, varid, dimids=dimids)
-!!$
-!!$    if (size(dimids) /= 1) then
-!!$       print *, "nf95_gw_var_dble_1d: NetCDF variable is not of rank 1"
-!!$       stop 1
-!!$    end if
-!!$
-!!$    call nf95_inquire_dimension(ncid, dimids(1), len=len)
-!!$    deallocate(dimids) ! pointer
-!!$
-!!$    allocate(values(len))
-!!$    if (len /= 0) then
-!!$       ierr = NF90_GET_VAR(ncid, varid, values)
-!!$       call handle_err("NF90_GET_VAR", ierr, ncid, varid)
-!!$    end if
-!!$
-!!$  end subroutine nf95_gw_var_dble_1d
-!!$
-!!$  !************************************
-!!$
-!!$  subroutine nf95_gw_var_dble_3d(ncid, varid, values)
-!!$
-!!$    ! Double precision, the array has rank 3.
-!!$
-!!$    use netcdf, only: NF90_GET_VAR
-!!$    use simple, only: nf95_inquire_variable, nf95_inquire_dimension
-!!$    use handle_err_m, only: handle_err
-!!$
-!!$    integer, intent(in):: ncid
-!!$    integer, intent(in):: varid
-!!$    double precision, pointer:: values(:, :, :)
-!!$
-!!$    ! Variables local to the procedure:
-!!$    integer ierr, len1, len2, len3
-!!$    integer, pointer :: dimids(:)
-!!$
-!!$    !---------------------
-!!$
-!!$    call nf95_inquire_variable(ncid, varid, dimids=dimids)
-!!$
-!!$    if (size(dimids) /= 3) then
-!!$       print *, "nf95_gw_var_dble_3d: NetCDF variable is not of rank 3"
-!!$       stop 1
-!!$    end if
-!!$
-!!$    call nf95_inquire_dimension(ncid, dimids(1), len=len1)
-!!$    call nf95_inquire_dimension(ncid, dimids(2), len=len2)
-!!$    call nf95_inquire_dimension(ncid, dimids(3), len=len3)
-!!$    deallocate(dimids) ! pointer
-!!$
-!!$    allocate(values(len1, len2, len3))
-!!$    if (len1 * len2 * len3 /= 0) then
-!!$       ierr = NF90_GET_VAR(ncid, varid, values)
-!!$       call handle_err("NF90_GET_VAR", ierr, ncid, varid)
-!!$    end if
-!!$
-!!$  end subroutine nf95_gw_var_dble_3d
-
-  !************************************
-
-  subroutine nf95_gw_var_int_1d(ncid, varid, values)
-
-    ! Integer type, the array has rank 1.
-
-    use netcdf, only: NF90_GET_VAR
-    use simple, only: nf95_inquire_variable, nf95_inquire_dimension
-    use handle_err_m, only: handle_err
-
-    integer, intent(in):: ncid
-    integer, intent(in):: varid
-    integer, pointer:: values(:)
-
-    ! Variables local to the procedure:
-    integer ierr, len
-    integer, pointer :: dimids(:)
-
-    !---------------------
-
-    call nf95_inquire_variable(ncid, varid, dimids=dimids)
-
-    if (size(dimids) /= 1) then
-       print *, "nf95_gw_var_int_1d: NetCDF variable is not of rank 1"
-       stop 1
-    end if
-
-    call nf95_inquire_dimension(ncid, dimids(1), len=len)
-    deallocate(dimids) ! pointer
-
-    allocate(values(len))
-    if (len /= 0) then
-       ierr = NF90_GET_VAR(ncid, varid, values)
-       call handle_err("NF90_GET_VAR", ierr, ncid, varid)
-    end if
-
-  end subroutine nf95_gw_var_int_1d
-
-  !************************************
-
-  subroutine nf95_gw_var_int_3d(ncid, varid, values)
-
-    ! Integer type, the array has rank 3.
-
-    use netcdf, only: NF90_GET_VAR
-    use simple, only: nf95_inquire_variable, nf95_inquire_dimension
-    use handle_err_m, only: handle_err
-
-    integer, intent(in):: ncid
-    integer, intent(in):: varid
-    integer, pointer:: values(:, :, :)
-
-    ! Variables local to the procedure:
-    integer ierr, len1, len2, len3
-    integer, pointer :: dimids(:)
-
-    !---------------------
-
-    call nf95_inquire_variable(ncid, varid, dimids=dimids)
-
-    if (size(dimids) /= 3) then
-       print *, "nf95_gw_var_int_3d: NetCDF variable is not of rank 3"
-       stop 1
-    end if
-
-    call nf95_inquire_dimension(ncid, dimids(1), len=len1)
-    call nf95_inquire_dimension(ncid, dimids(2), len=len2)
-    call nf95_inquire_dimension(ncid, dimids(3), len=len3)
-    deallocate(dimids) ! pointer
-
-    allocate(values(len1, len2, len3))
-    if (len1 * len2 * len3 /= 0) then
-       ierr = NF90_GET_VAR(ncid, varid, values)
-       call handle_err("NF90_GET_VAR", ierr, ncid, varid)
-    end if
-
-  end subroutine nf95_gw_var_int_3d
-
-end module nf95_gw_var_m
Index: /LMDZ4/branches/LMDZ4-dev/libf/bibio/nf95_put_att_m.F90
===================================================================
--- /LMDZ4/branches/LMDZ4-dev/libf/bibio/nf95_put_att_m.F90	(revision 1157)
+++ /LMDZ4/branches/LMDZ4-dev/libf/bibio/nf95_put_att_m.F90	(revision 1157)
@@ -0,0 +1,67 @@
+! $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: DZ4/branches/LMDZ4-dev/libf/bibio/nf95_put_att_m.f90
===================================================================
--- /LMDZ4/branches/LMDZ4-dev/libf/bibio/nf95_put_att_m.f90	(revision 1156)
+++ 	(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: /LMDZ4/branches/LMDZ4-dev/libf/bibio/nf95_put_var_m.F90
===================================================================
--- /LMDZ4/branches/LMDZ4-dev/libf/bibio/nf95_put_var_m.F90	(revision 1157)
+++ /LMDZ4/branches/LMDZ4-dev/libf/bibio/nf95_put_var_m.F90	(revision 1157)
@@ -0,0 +1,195 @@
+! $Id$
+module nf95_put_var_m
+
+  implicit none
+
+  interface nf95_put_var
+     module procedure nf95_put_var_1D_FourByteReal, &
+          nf95_put_var_2D_FourByteReal, nf95_put_var_3D_FourByteReal, &
+          nf95_put_var_4D_FourByteReal
+!!$     module procedure nf95_put_var_1D_FourByteReal, &
+!!$          nf95_put_var_2D_FourByteReal, nf95_put_var_3D_FourByteReal, &
+!!$          nf95_put_var_4D_FourByteReal, nf90_put_var_1D_EightByteReal, &
+!!$          nf90_put_var_3D_EightByteReal
+  end interface
+
+  private
+  public nf95_put_var
+
+contains
+
+  subroutine nf95_put_var_1D_FourByteReal(ncid, varid, values, start, count, &
+       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, 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, 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_2D_FourByteReal(ncid, varid, values, start, count, &
+       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, 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, 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_3D_FourByteReal(ncid, varid, values, start, count, &
+       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, 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, 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_4D_FourByteReal(ncid, varid, values, start, count, &
+       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, 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, 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 nf90_put_var_1D_EightByteReal(ncid, varid, values, start, count, &
+!!$       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, 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, 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 nf90_put_var_1D_EightByteReal
+!!$
+!!$  !***********************
+!!$
+!!$  subroutine nf90_put_var_3D_EightByteReal(ncid, varid, values, start, count, &
+!!$       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, 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, 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 nf90_put_var_3D_EightByteReal
+
+end module nf95_put_var_m
Index: DZ4/branches/LMDZ4-dev/libf/bibio/nf95_put_var_m.f90
===================================================================
--- /LMDZ4/branches/LMDZ4-dev/libf/bibio/nf95_put_var_m.f90	(revision 1156)
+++ 	(revision )
@@ -1,195 +1,0 @@
-! $Id$
-module nf95_put_var_m
-
-  implicit none
-
-  interface nf95_put_var
-     module procedure nf95_put_var_1D_FourByteReal, &
-          nf95_put_var_2D_FourByteReal, nf95_put_var_3D_FourByteReal, &
-          nf95_put_var_4D_FourByteReal
-!!$     module procedure nf95_put_var_1D_FourByteReal, &
-!!$          nf95_put_var_2D_FourByteReal, nf95_put_var_3D_FourByteReal, &
-!!$          nf95_put_var_4D_FourByteReal, nf90_put_var_1D_EightByteReal, &
-!!$          nf90_put_var_3D_EightByteReal
-  end interface
-
-  private
-  public nf95_put_var
-
-contains
-
-  subroutine nf95_put_var_1D_FourByteReal(ncid, varid, values, start, count, &
-       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, 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, 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_2D_FourByteReal(ncid, varid, values, start, count, &
-       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, 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, 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_3D_FourByteReal(ncid, varid, values, start, count, &
-       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, 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, 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_4D_FourByteReal(ncid, varid, values, start, count, &
-       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, 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, 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 nf90_put_var_1D_EightByteReal(ncid, varid, values, start, count, &
-!!$       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, 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, 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 nf90_put_var_1D_EightByteReal
-!!$
-!!$  !***********************
-!!$
-!!$  subroutine nf90_put_var_3D_EightByteReal(ncid, varid, values, start, count, &
-!!$       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, 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, 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 nf90_put_var_3D_EightByteReal
-
-end module nf95_put_var_m
Index: /LMDZ4/branches/LMDZ4-dev/libf/bibio/regr1_lint_m.F90
===================================================================
--- /LMDZ4/branches/LMDZ4-dev/libf/bibio/regr1_lint_m.F90	(revision 1157)
+++ /LMDZ4/branches/LMDZ4-dev/libf/bibio/regr1_lint_m.F90	(revision 1157)
@@ -0,0 +1,98 @@
+! $Id$
+module regr1_lint_m
+
+  ! Author: Lionel GUEZ
+
+  implicit none
+
+  interface regr1_lint
+     ! Each procedure regrids by linear interpolation.
+     ! The regridding operation is done on the first dimension of the
+     ! input array.
+     ! The difference betwwen the procedures is the rank of the first argument.
+     module procedure regr11_lint, regr12_lint
+  end interface
+
+  private
+  public regr1_lint
+
+contains
+
+  function regr11_lint(vs, xs, xt) result(vt)
+
+    ! "vs" has rank 1.
+
+    use assert_eq_m, only: assert_eq
+    use interpolation, only: hunt !!, polint
+
+    real, intent(in):: vs(:)
+    ! (values of the function at source points "xs")
+
+    real, intent(in):: xs(:)
+    ! (abscissas of points in source grid, in strictly monotonic order)
+
+    real, intent(in):: xt(:)
+    ! (abscissas of points in target grid)
+
+    real vt(size(xt)) ! values of the function on the target grid
+
+    ! Variables local to the procedure:
+    integer is, it, ns
+    integer is_b ! "is" bound between 1 and "ns - 1"
+
+    !--------------------------------------
+
+    ns = assert_eq(size(vs), size(xs), "regr11_lint ns")
+
+    is = -1 ! go immediately to bisection on first call to "hunt"
+
+    do it = 1, size(xt)
+       call hunt(xs, xt(it), is)
+       is_b = min(max(is, 1), ns - 1)
+!!       call polint(xs(is_b:is_b+1), vs(is_b:is_b+1), xt(it), vt(it))
+       vt(it) = ((xs(is_b+1) - xt(it)) * vs(is_b) &
+            + (xt(it) - xs(is_b)) * vs(is_b+1)) / (xs(is_b+1) - xs(is_b))
+    end do
+
+  end function regr11_lint
+
+  !*********************************************************
+
+  function regr12_lint(vs, xs, xt) result(vt)
+
+    ! "vs" has rank 2.
+
+    use assert_eq_m, only: assert_eq
+    use interpolation, only: hunt
+
+    real, intent(in):: vs(:, :)
+    ! (values of the function at source points "xs")
+
+    real, intent(in):: xs(:)
+    ! (abscissas of points in source grid, in strictly monotonic order)
+
+    real, intent(in):: xt(:)
+    ! (abscissas of points in target grid)
+
+    real vt(size(xt), size(vs, 2)) ! values of the function on the target grid
+
+    ! Variables local to the procedure:
+    integer is, it, ns
+    integer is_b ! "is" bound between 1 and "ns - 1"
+
+    !--------------------------------------
+
+    ns = assert_eq(size(vs, 1), size(xs), "regr12_lint ns")
+
+    is = -1 ! go immediately to bisection on first call to "hunt"
+
+    do it = 1, size(xt)
+       call hunt(xs, xt(it), is)
+       is_b = min(max(is, 1), ns - 1)
+       vt(it, :) = ((xs(is_b+1) - xt(it)) * vs(is_b, :) &
+            + (xt(it) - xs(is_b)) * vs(is_b+1, :)) / (xs(is_b+1) - xs(is_b))
+    end do
+
+  end function regr12_lint
+
+end module regr1_lint_m
Index: DZ4/branches/LMDZ4-dev/libf/bibio/regr1_lint_m.f90
===================================================================
--- /LMDZ4/branches/LMDZ4-dev/libf/bibio/regr1_lint_m.f90	(revision 1156)
+++ 	(revision )
@@ -1,98 +1,0 @@
-! $Id$
-module regr1_lint_m
-
-  ! Author: Lionel GUEZ
-
-  implicit none
-
-  interface regr1_lint
-     ! Each procedure regrids by linear interpolation.
-     ! The regridding operation is done on the first dimension of the
-     ! input array.
-     ! The difference betwwen the procedures is the rank of the first argument.
-     module procedure regr11_lint, regr12_lint
-  end interface
-
-  private
-  public regr1_lint
-
-contains
-
-  function regr11_lint(vs, xs, xt) result(vt)
-
-    ! "vs" has rank 1.
-
-    use assert_eq_m, only: assert_eq
-    use interpolation, only: hunt !!, polint
-
-    real, intent(in):: vs(:)
-    ! (values of the function at source points "xs")
-
-    real, intent(in):: xs(:)
-    ! (abscissas of points in source grid, in strictly monotonic order)
-
-    real, intent(in):: xt(:)
-    ! (abscissas of points in target grid)
-
-    real vt(size(xt)) ! values of the function on the target grid
-
-    ! Variables local to the procedure:
-    integer is, it, ns
-    integer is_b ! "is" bound between 1 and "ns - 1"
-
-    !--------------------------------------
-
-    ns = assert_eq(size(vs), size(xs), "regr11_lint ns")
-
-    is = -1 ! go immediately to bisection on first call to "hunt"
-
-    do it = 1, size(xt)
-       call hunt(xs, xt(it), is)
-       is_b = min(max(is, 1), ns - 1)
-!!       call polint(xs(is_b:is_b+1), vs(is_b:is_b+1), xt(it), vt(it))
-       vt(it) = ((xs(is_b+1) - xt(it)) * vs(is_b) &
-            + (xt(it) - xs(is_b)) * vs(is_b+1)) / (xs(is_b+1) - xs(is_b))
-    end do
-
-  end function regr11_lint
-
-  !*********************************************************
-
-  function regr12_lint(vs, xs, xt) result(vt)
-
-    ! "vs" has rank 2.
-
-    use assert_eq_m, only: assert_eq
-    use interpolation, only: hunt
-
-    real, intent(in):: vs(:, :)
-    ! (values of the function at source points "xs")
-
-    real, intent(in):: xs(:)
-    ! (abscissas of points in source grid, in strictly monotonic order)
-
-    real, intent(in):: xt(:)
-    ! (abscissas of points in target grid)
-
-    real vt(size(xt), size(vs, 2)) ! values of the function on the target grid
-
-    ! Variables local to the procedure:
-    integer is, it, ns
-    integer is_b ! "is" bound between 1 and "ns - 1"
-
-    !--------------------------------------
-
-    ns = assert_eq(size(vs, 1), size(xs), "regr12_lint ns")
-
-    is = -1 ! go immediately to bisection on first call to "hunt"
-
-    do it = 1, size(xt)
-       call hunt(xs, xt(it), is)
-       is_b = min(max(is, 1), ns - 1)
-       vt(it, :) = ((xs(is_b+1) - xt(it)) * vs(is_b, :) &
-            + (xt(it) - xs(is_b)) * vs(is_b+1, :)) / (xs(is_b+1) - xs(is_b))
-    end do
-
-  end function regr12_lint
-
-end module regr1_lint_m
Index: /LMDZ4/branches/LMDZ4-dev/libf/bibio/regr1_step_av_m.F90
===================================================================
--- /LMDZ4/branches/LMDZ4-dev/libf/bibio/regr1_step_av_m.F90	(revision 1157)
+++ /LMDZ4/branches/LMDZ4-dev/libf/bibio/regr1_step_av_m.F90	(revision 1157)
@@ -0,0 +1,205 @@
+! $Id$
+module regr1_step_av_m
+
+  ! Author: Lionel GUEZ
+
+  implicit none
+
+  interface regr1_step_av
+
+     ! Each procedure regrids a step function by averaging it.
+     ! The regridding operation is done on the first dimension of the
+     ! input array.
+     ! Source grid contains edges of steps.
+     ! Target grid contains positions of cell edges.
+     ! The target grid should be included in the source grid: no
+     ! extrapolation is allowed.
+     ! The difference between the procedures is the rank of the first argument.
+
+     module procedure regr11_step_av, regr12_step_av, regr13_step_av
+  end interface
+
+  private
+  public regr1_step_av
+
+contains
+
+  function regr11_step_av(vs, xs, xt) result(vt)
+
+    ! "vs" has rank 1.
+
+    use assert_eq_m, only: assert_eq
+    use assert_m, only: assert
+    use interpolation, only: locate
+
+    real, intent(in):: vs(:) ! values of steps on the source grid
+    ! (Step "is" is between "xs(is)" and "xs(is + 1)".)
+
+    real, intent(in):: xs(:)
+    ! (edges of of steps on the source grid, in strictly increasing order)
+
+    real, intent(in):: xt(:)
+    ! (edges of cells of the target grid, in strictly increasing order)
+
+    real vt(size(xt) - 1) ! average values on the target grid
+    ! (Cell "it" is between "xt(it)" and "xt(it + 1)".)
+
+    ! Variables local to the procedure:
+    integer is, it, ns, nt
+    real left_edge
+
+    !---------------------------------------------
+
+    ns = assert_eq(size(vs), size(xs) - 1, "regr11_step_av ns")
+    nt = size(xt) - 1
+    ! Quick check on sort order:
+    call assert(xs(1) < xs(2), "regr11_step_av xs bad order")
+    call assert(xt(1) < xt(2), "regr11_step_av xt bad order")
+
+    call assert(xs(1) <= xt(1) .and. xt(nt + 1) <= xs(ns + 1), &
+         "regr11_step_av extrapolation")
+
+    is = locate(xs, xt(1)) ! 1 <= is <= ns, because we forbid extrapolation
+    do it = 1, nt
+       ! 1 <= is <= ns
+       ! xs(is) <= xt(it) < xs(is + 1)
+       ! Compute "vt(it)":
+       left_edge = xt(it)
+       vt(it) = 0.
+       do while (xs(is + 1) < xt(it + 1))
+          ! 1 <= is <= ns - 1
+          vt(it) = vt(it) + (xs(is + 1) - left_edge) * vs(is)
+          is = is + 1
+          left_edge = xs(is)
+       end do
+       ! 1 <= is <= ns
+       vt(it) = (vt(it) + (xt(it + 1) - left_edge) * vs(is)) &
+            / (xt(it + 1) - xt(it))
+       if (xs(is + 1) == xt(it + 1)) is = is + 1
+       ! 1 <= is <= ns .or. it == nt
+    end do
+
+  end function regr11_step_av
+
+  !********************************************
+
+  function regr12_step_av(vs, xs, xt) result(vt)
+
+    ! "vs" has rank 2.
+
+    use assert_eq_m, only: assert_eq
+    use assert_m, only: assert
+    use interpolation, only: locate
+
+    real, intent(in):: vs(:, :) ! values of steps on the source grid
+    ! (Step "is" is between "xs(is)" and "xs(is + 1)".)
+
+    real, intent(in):: xs(:)
+    ! (edges of steps on the source grid, in strictly increasing order)
+
+    real, intent(in):: xt(:)
+    ! (edges of cells of the target grid, in strictly increasing order)
+
+    real vt(size(xt) - 1, size(vs, 2)) ! average values on the target grid
+    ! (Cell "it" is between "xt(it)" and "xt(it + 1)".)
+
+    ! Variables local to the procedure:
+    integer is, it, ns, nt
+    real left_edge
+
+    !---------------------------------------------
+
+    ns = assert_eq(size(vs, 1), size(xs) - 1, "regr12_step_av ns")
+    nt = size(xt) - 1
+
+    ! Quick check on sort order:
+    call assert(xs(1) < xs(2), "regr12_step_av xs bad order")
+    call assert(xt(1) < xt(2), "regr12_step_av xt bad order")
+
+    call assert(xs(1) <= xt(1) .and. xt(nt + 1) <= xs(ns + 1), &
+         "regr12_step_av extrapolation")
+
+    is = locate(xs, xt(1)) ! 1 <= is <= ns, because we forbid extrapolation
+    do it = 1, nt
+       ! 1 <= is <= ns
+       ! xs(is) <= xt(it) < xs(is + 1)
+       ! Compute "vt(it, :)":
+       left_edge = xt(it)
+       vt(it, :) = 0.
+       do while (xs(is + 1) < xt(it + 1))
+          ! 1 <= is <= ns - 1
+          vt(it, :) = vt(it, :) + (xs(is + 1) - left_edge) * vs(is, :)
+          is = is + 1
+          left_edge = xs(is)
+       end do
+       ! 1 <= is <= ns
+       vt(it, :) = (vt(it, :) + (xt(it + 1) - left_edge) * vs(is, :)) &
+            / (xt(it + 1) - xt(it))
+       if (xs(is + 1) == xt(it + 1)) is = is + 1
+       ! 1 <= is <= ns .or. it == nt
+    end do
+
+  end function regr12_step_av
+
+  !********************************************
+
+  function regr13_step_av(vs, xs, xt) result(vt)
+
+    ! "vs" has rank 3.
+
+    use assert_eq_m, only: assert_eq
+    use assert_m, only: assert
+    use interpolation, only: locate
+
+    real, intent(in):: vs(:, :, :) ! values of steps on the source grid
+    ! (Step "is" is between "xs(is)" and "xs(is + 1)".)
+
+    real, intent(in):: xs(:)
+    ! (edges of steps on the source grid, in strictly increasing order)
+
+    real, intent(in):: xt(:)
+    ! (edges of cells of the target grid, in strictly increasing order)
+
+    real vt(size(xt) - 1, size(vs, 2), size(vs, 3)) 
+    ! (average values on the target grid)
+    ! (Cell "it" is between "xt(it)" and "xt(it + 1)".)
+
+    ! Variables local to the procedure:
+    integer is, it, ns, nt
+    real left_edge
+
+    !---------------------------------------------
+
+    ns = assert_eq(size(vs, 1), size(xs) - 1, "regr13_step_av ns")
+    nt = size(xt) - 1
+
+    ! Quick check on sort order:
+    call assert(xs(1) < xs(2), "regr13_step_av xs bad order")
+    call assert(xt(1) < xt(2), "regr13_step_av xt bad order")
+
+    call assert(xs(1) <= xt(1) .and. xt(nt + 1) <= xs(ns + 1), &
+         "regr13_step_av extrapolation")
+
+    is = locate(xs, xt(1)) ! 1 <= is <= ns, because we forbid extrapolation
+    do it = 1, nt
+       ! 1 <= is <= ns
+       ! xs(is) <= xt(it) < xs(is + 1)
+       ! Compute "vt(it, :, :)":
+       left_edge = xt(it)
+       vt(it, :, :) = 0.
+       do while (xs(is + 1) < xt(it + 1))
+          ! 1 <= is <= ns - 1
+          vt(it, :, :) = vt(it, :, :) + (xs(is + 1) - left_edge) * vs(is, :, :)
+          is = is + 1
+          left_edge = xs(is)
+       end do
+       ! 1 <= is <= ns
+       vt(it, :, :) = (vt(it, :, :) &
+            + (xt(it + 1) - left_edge) * vs(is, :, :)) / (xt(it + 1) - xt(it))
+       if (xs(is + 1) == xt(it + 1)) is = is + 1
+       ! 1 <= is <= ns .or. it == nt
+    end do
+
+  end function regr13_step_av
+
+end module regr1_step_av_m
Index: DZ4/branches/LMDZ4-dev/libf/bibio/regr1_step_av_m.f90
===================================================================
--- /LMDZ4/branches/LMDZ4-dev/libf/bibio/regr1_step_av_m.f90	(revision 1156)
+++ 	(revision )
@@ -1,205 +1,0 @@
-! $Id$
-module regr1_step_av_m
-
-  ! Author: Lionel GUEZ
-
-  implicit none
-
-  interface regr1_step_av
-
-     ! Each procedure regrids a step function by averaging it.
-     ! The regridding operation is done on the first dimension of the
-     ! input array.
-     ! Source grid contains edges of steps.
-     ! Target grid contains positions of cell edges.
-     ! The target grid should be included in the source grid: no
-     ! extrapolation is allowed.
-     ! The difference between the procedures is the rank of the first argument.
-
-     module procedure regr11_step_av, regr12_step_av, regr13_step_av
-  end interface
-
-  private
-  public regr1_step_av
-
-contains
-
-  function regr11_step_av(vs, xs, xt) result(vt)
-
-    ! "vs" has rank 1.
-
-    use assert_eq_m, only: assert_eq
-    use assert_m, only: assert
-    use interpolation, only: locate
-
-    real, intent(in):: vs(:) ! values of steps on the source grid
-    ! (Step "is" is between "xs(is)" and "xs(is + 1)".)
-
-    real, intent(in):: xs(:)
-    ! (edges of of steps on the source grid, in strictly increasing order)
-
-    real, intent(in):: xt(:)
-    ! (edges of cells of the target grid, in strictly increasing order)
-
-    real vt(size(xt) - 1) ! average values on the target grid
-    ! (Cell "it" is between "xt(it)" and "xt(it + 1)".)
-
-    ! Variables local to the procedure:
-    integer is, it, ns, nt
-    real left_edge
-
-    !---------------------------------------------
-
-    ns = assert_eq(size(vs), size(xs) - 1, "regr11_step_av ns")
-    nt = size(xt) - 1
-    ! Quick check on sort order:
-    call assert(xs(1) < xs(2), "regr11_step_av xs bad order")
-    call assert(xt(1) < xt(2), "regr11_step_av xt bad order")
-
-    call assert(xs(1) <= xt(1) .and. xt(nt + 1) <= xs(ns + 1), &
-         "regr11_step_av extrapolation")
-
-    is = locate(xs, xt(1)) ! 1 <= is <= ns, because we forbid extrapolation
-    do it = 1, nt
-       ! 1 <= is <= ns
-       ! xs(is) <= xt(it) < xs(is + 1)
-       ! Compute "vt(it)":
-       left_edge = xt(it)
-       vt(it) = 0.
-       do while (xs(is + 1) < xt(it + 1))
-          ! 1 <= is <= ns - 1
-          vt(it) = vt(it) + (xs(is + 1) - left_edge) * vs(is)
-          is = is + 1
-          left_edge = xs(is)
-       end do
-       ! 1 <= is <= ns
-       vt(it) = (vt(it) + (xt(it + 1) - left_edge) * vs(is)) &
-            / (xt(it + 1) - xt(it))
-       if (xs(is + 1) == xt(it + 1)) is = is + 1
-       ! 1 <= is <= ns .or. it == nt
-    end do
-
-  end function regr11_step_av
-
-  !********************************************
-
-  function regr12_step_av(vs, xs, xt) result(vt)
-
-    ! "vs" has rank 2.
-
-    use assert_eq_m, only: assert_eq
-    use assert_m, only: assert
-    use interpolation, only: locate
-
-    real, intent(in):: vs(:, :) ! values of steps on the source grid
-    ! (Step "is" is between "xs(is)" and "xs(is + 1)".)
-
-    real, intent(in):: xs(:)
-    ! (edges of steps on the source grid, in strictly increasing order)
-
-    real, intent(in):: xt(:)
-    ! (edges of cells of the target grid, in strictly increasing order)
-
-    real vt(size(xt) - 1, size(vs, 2)) ! average values on the target grid
-    ! (Cell "it" is between "xt(it)" and "xt(it + 1)".)
-
-    ! Variables local to the procedure:
-    integer is, it, ns, nt
-    real left_edge
-
-    !---------------------------------------------
-
-    ns = assert_eq(size(vs, 1), size(xs) - 1, "regr12_step_av ns")
-    nt = size(xt) - 1
-
-    ! Quick check on sort order:
-    call assert(xs(1) < xs(2), "regr12_step_av xs bad order")
-    call assert(xt(1) < xt(2), "regr12_step_av xt bad order")
-
-    call assert(xs(1) <= xt(1) .and. xt(nt + 1) <= xs(ns + 1), &
-         "regr12_step_av extrapolation")
-
-    is = locate(xs, xt(1)) ! 1 <= is <= ns, because we forbid extrapolation
-    do it = 1, nt
-       ! 1 <= is <= ns
-       ! xs(is) <= xt(it) < xs(is + 1)
-       ! Compute "vt(it, :)":
-       left_edge = xt(it)
-       vt(it, :) = 0.
-       do while (xs(is + 1) < xt(it + 1))
-          ! 1 <= is <= ns - 1
-          vt(it, :) = vt(it, :) + (xs(is + 1) - left_edge) * vs(is, :)
-          is = is + 1
-          left_edge = xs(is)
-       end do
-       ! 1 <= is <= ns
-       vt(it, :) = (vt(it, :) + (xt(it + 1) - left_edge) * vs(is, :)) &
-            / (xt(it + 1) - xt(it))
-       if (xs(is + 1) == xt(it + 1)) is = is + 1
-       ! 1 <= is <= ns .or. it == nt
-    end do
-
-  end function regr12_step_av
-
-  !********************************************
-
-  function regr13_step_av(vs, xs, xt) result(vt)
-
-    ! "vs" has rank 3.
-
-    use assert_eq_m, only: assert_eq
-    use assert_m, only: assert
-    use interpolation, only: locate
-
-    real, intent(in):: vs(:, :, :) ! values of steps on the source grid
-    ! (Step "is" is between "xs(is)" and "xs(is + 1)".)
-
-    real, intent(in):: xs(:)
-    ! (edges of steps on the source grid, in strictly increasing order)
-
-    real, intent(in):: xt(:)
-    ! (edges of cells of the target grid, in strictly increasing order)
-
-    real vt(size(xt) - 1, size(vs, 2), size(vs, 3)) 
-    ! (average values on the target grid)
-    ! (Cell "it" is between "xt(it)" and "xt(it + 1)".)
-
-    ! Variables local to the procedure:
-    integer is, it, ns, nt
-    real left_edge
-
-    !---------------------------------------------
-
-    ns = assert_eq(size(vs, 1), size(xs) - 1, "regr13_step_av ns")
-    nt = size(xt) - 1
-
-    ! Quick check on sort order:
-    call assert(xs(1) < xs(2), "regr13_step_av xs bad order")
-    call assert(xt(1) < xt(2), "regr13_step_av xt bad order")
-
-    call assert(xs(1) <= xt(1) .and. xt(nt + 1) <= xs(ns + 1), &
-         "regr13_step_av extrapolation")
-
-    is = locate(xs, xt(1)) ! 1 <= is <= ns, because we forbid extrapolation
-    do it = 1, nt
-       ! 1 <= is <= ns
-       ! xs(is) <= xt(it) < xs(is + 1)
-       ! Compute "vt(it, :, :)":
-       left_edge = xt(it)
-       vt(it, :, :) = 0.
-       do while (xs(is + 1) < xt(it + 1))
-          ! 1 <= is <= ns - 1
-          vt(it, :, :) = vt(it, :, :) + (xs(is + 1) - left_edge) * vs(is, :, :)
-          is = is + 1
-          left_edge = xs(is)
-       end do
-       ! 1 <= is <= ns
-       vt(it, :, :) = (vt(it, :, :) &
-            + (xt(it + 1) - left_edge) * vs(is, :, :)) / (xt(it + 1) - xt(it))
-       if (xs(is + 1) == xt(it + 1)) is = is + 1
-       ! 1 <= is <= ns .or. it == nt
-    end do
-
-  end function regr13_step_av
-
-end module regr1_step_av_m
Index: /LMDZ4/branches/LMDZ4-dev/libf/bibio/regr3_lint_m.F90
===================================================================
--- /LMDZ4/branches/LMDZ4-dev/libf/bibio/regr3_lint_m.F90	(revision 1157)
+++ /LMDZ4/branches/LMDZ4-dev/libf/bibio/regr3_lint_m.F90	(revision 1157)
@@ -0,0 +1,59 @@
+! $Id$
+module regr3_lint_m
+
+  ! Author: Lionel GUEZ
+
+  implicit none
+
+  interface regr3_lint
+     ! Each procedure regrids by linear interpolation.
+     ! The regridding operation is done on the third dimension of the
+     ! input array.
+     ! The difference betwwen the procedures is the rank of the first argument.
+     module procedure regr33_lint
+  end interface
+
+  private
+  public regr3_lint
+
+contains
+
+  function regr33_lint(vs, xs, xt) result(vt)
+
+    ! "vs" has rank 3.
+
+    use assert_eq_m, only: assert_eq
+    use interpolation, only: hunt
+
+    real, intent(in):: vs(:, :, :)
+    ! (values of the function at source points "xs")
+
+    real, intent(in):: xs(:)
+    ! (abscissas of points in source grid, in strictly monotonic order)
+
+    real, intent(in):: xt(:)
+    ! (abscissas of points in target grid)
+
+    real vt(size(vs, 1), size(vs, 2), size(xt))
+    ! (values of the function on the target grid)
+
+    ! Variables local to the procedure:
+    integer is, it, ns
+    integer is_b ! "is" bound between 1 and "ns - 1"
+
+    !--------------------------------------
+
+    ns = assert_eq(size(vs, 3), size(xs), "regr33_lint ns")
+
+    is = -1 ! go immediately to bisection on first call to "hunt"
+
+    do it = 1, size(xt)
+       call hunt(xs, xt(it), is)
+       is_b = min(max(is, 1), ns - 1)
+       vt(:, :, it) = ((xs(is_b+1) - xt(it)) * vs(:, :, is_b) &
+            + (xt(it) - xs(is_b)) * vs(:, :, is_b+1)) / (xs(is_b+1) - xs(is_b))
+    end do
+
+  end function regr33_lint
+
+end module regr3_lint_m
Index: DZ4/branches/LMDZ4-dev/libf/bibio/regr3_lint_m.f90
===================================================================
--- /LMDZ4/branches/LMDZ4-dev/libf/bibio/regr3_lint_m.f90	(revision 1156)
+++ 	(revision )
@@ -1,59 +1,0 @@
-! $Id$
-module regr3_lint_m
-
-  ! Author: Lionel GUEZ
-
-  implicit none
-
-  interface regr3_lint
-     ! Each procedure regrids by linear interpolation.
-     ! The regridding operation is done on the third dimension of the
-     ! input array.
-     ! The difference betwwen the procedures is the rank of the first argument.
-     module procedure regr33_lint
-  end interface
-
-  private
-  public regr3_lint
-
-contains
-
-  function regr33_lint(vs, xs, xt) result(vt)
-
-    ! "vs" has rank 3.
-
-    use assert_eq_m, only: assert_eq
-    use interpolation, only: hunt
-
-    real, intent(in):: vs(:, :, :)
-    ! (values of the function at source points "xs")
-
-    real, intent(in):: xs(:)
-    ! (abscissas of points in source grid, in strictly monotonic order)
-
-    real, intent(in):: xt(:)
-    ! (abscissas of points in target grid)
-
-    real vt(size(vs, 1), size(vs, 2), size(xt))
-    ! (values of the function on the target grid)
-
-    ! Variables local to the procedure:
-    integer is, it, ns
-    integer is_b ! "is" bound between 1 and "ns - 1"
-
-    !--------------------------------------
-
-    ns = assert_eq(size(vs, 3), size(xs), "regr33_lint ns")
-
-    is = -1 ! go immediately to bisection on first call to "hunt"
-
-    do it = 1, size(xt)
-       call hunt(xs, xt(it), is)
-       is_b = min(max(is, 1), ns - 1)
-       vt(:, :, it) = ((xs(is_b+1) - xt(it)) * vs(:, :, is_b) &
-            + (xt(it) - xs(is_b)) * vs(:, :, is_b+1)) / (xs(is_b+1) - xs(is_b))
-    end do
-
-  end function regr33_lint
-
-end module regr3_lint_m
Index: /LMDZ4/branches/LMDZ4-dev/libf/bibio/simple.F90
===================================================================
--- /LMDZ4/branches/LMDZ4-dev/libf/bibio/simple.F90	(revision 1157)
+++ /LMDZ4/branches/LMDZ4-dev/libf/bibio/simple.F90	(revision 1157)
@@ -0,0 +1,312 @@
+! $Id$
+module simple
+
+  implicit none
+
+contains
+
+  subroutine nf95_open(path, mode, ncid, chunksize, ncerr)
+
+    use netcdf, only: nf90_open
+    use handle_err_m, only: handle_err
+
+    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
+    use handle_err_m, only: handle_err
+
+    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", ncerr_not_opt, ncid)
+    end if
+
+  end subroutine nf95_inq_dimid
+
+  !************************
+
+  subroutine nf95_inquire_dimension(ncid, dimid, name, len, ncerr)
+
+    use netcdf, only: nf90_inquire_dimension
+    use handle_err_m, only: handle_err
+
+    integer,                       intent( in) :: ncid, dimid
+    character (len = *), optional, intent(out) :: name
+    integer,             optional, intent(out) :: len
+    integer, intent(out), optional:: ncerr
+
+    ! Variable local to the procedure:
+    integer ncerr_not_opt
+
+    !-------------------
+
+    ncerr_not_opt = nf90_inquire_dimension(ncid, dimid, name, len)
+    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
+    use handle_err_m, only: handle_err
+
+    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 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
+    use handle_err_m, only: handle_err
+
+    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)
+    end if
+
+  end subroutine nf95_inquire_variable
+
+  !************************
+
+  subroutine nf95_create(path, cmode, ncid, initialsize, chunksize, ncerr)
+    
+    use netcdf, only: nf90_create
+    use handle_err_m, only: handle_err
+
+    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, len, dimid, ncerr)
+
+    use netcdf, only: nf90_def_dim
+    use handle_err_m, only: handle_err
+
+    integer,             intent( in) :: ncid
+    character (len = *), intent( in) :: name
+    integer,             intent( in) :: len
+    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, len, dimid)
+    if (present(ncerr)) then
+       ncerr = ncerr_not_opt
+    else
+       call handle_err("nf95_def_dim", ncerr_not_opt, ncid)
+    end if
+
+  end subroutine nf95_def_dim
+
+  !***********************
+
+  subroutine nf95_redef(ncid, ncerr)
+
+    use netcdf, only: nf90_redef
+    use handle_err_m, only: handle_err
+
+    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
+    use handle_err_m, only: handle_err
+
+    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
+    use handle_err_m, only: handle_err
+
+    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
+    use handle_err_m, only: handle_err
+
+    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", ncerr_not_opt, ncid_out)
+    end if
+
+  end subroutine nf95_copy_att
+
+end module simple
Index: DZ4/branches/LMDZ4-dev/libf/bibio/simple.f90
===================================================================
--- /LMDZ4/branches/LMDZ4-dev/libf/bibio/simple.f90	(revision 1156)
+++ 	(revision )
@@ -1,312 +1,0 @@
-! $Id$
-module simple
-
-  implicit none
-
-contains
-
-  subroutine nf95_open(path, mode, ncid, chunksize, ncerr)
-
-    use netcdf, only: nf90_open
-    use handle_err_m, only: handle_err
-
-    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
-    use handle_err_m, only: handle_err
-
-    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", ncerr_not_opt, ncid)
-    end if
-
-  end subroutine nf95_inq_dimid
-
-  !************************
-
-  subroutine nf95_inquire_dimension(ncid, dimid, name, len, ncerr)
-
-    use netcdf, only: nf90_inquire_dimension
-    use handle_err_m, only: handle_err
-
-    integer,                       intent( in) :: ncid, dimid
-    character (len = *), optional, intent(out) :: name
-    integer,             optional, intent(out) :: len
-    integer, intent(out), optional:: ncerr
-
-    ! Variable local to the procedure:
-    integer ncerr_not_opt
-
-    !-------------------
-
-    ncerr_not_opt = nf90_inquire_dimension(ncid, dimid, name, len)
-    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
-    use handle_err_m, only: handle_err
-
-    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 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
-    use handle_err_m, only: handle_err
-
-    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)
-    end if
-
-  end subroutine nf95_inquire_variable
-
-  !************************
-
-  subroutine nf95_create(path, cmode, ncid, initialsize, chunksize, ncerr)
-    
-    use netcdf, only: nf90_create
-    use handle_err_m, only: handle_err
-
-    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, len, dimid, ncerr)
-
-    use netcdf, only: nf90_def_dim
-    use handle_err_m, only: handle_err
-
-    integer,             intent( in) :: ncid
-    character (len = *), intent( in) :: name
-    integer,             intent( in) :: len
-    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, len, dimid)
-    if (present(ncerr)) then
-       ncerr = ncerr_not_opt
-    else
-       call handle_err("nf95_def_dim", ncerr_not_opt, ncid)
-    end if
-
-  end subroutine nf95_def_dim
-
-  !***********************
-
-  subroutine nf95_redef(ncid, ncerr)
-
-    use netcdf, only: nf90_redef
-    use handle_err_m, only: handle_err
-
-    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
-    use handle_err_m, only: handle_err
-
-    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
-    use handle_err_m, only: handle_err
-
-    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
-    use handle_err_m, only: handle_err
-
-    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", ncerr_not_opt, ncid_out)
-    end if
-
-  end subroutine nf95_copy_att
-
-end module simple
