Index: LMDZ5/branches/testing/libf/bibio/new_unit.F90
===================================================================
--- LMDZ5/branches/testing/libf/bibio/new_unit.F90	(revision 1669)
+++ 	(revision )
@@ -1,25 +1,0 @@
-module new_unit_m
-
-  implicit none
-
-contains
-
-  subroutine new_unit(unit)
-
-    integer, intent(out):: unit
-
-    ! Variables local to the procedure:
-    logical opened, exist
-
-    !------------------------------------------------------
-
-    unit = 0
-    do
-       inquire(unit=unit, opened=opened, exist=exist)
-       if (exist .and. .not. opened) exit
-       unit = unit + 1
-    end do
-
-  end subroutine new_unit
-
-end module new_unit_m
Index: LMDZ5/branches/testing/libf/bibio/new_unit_m.F90
===================================================================
--- LMDZ5/branches/testing/libf/bibio/new_unit_m.F90	(revision 1707)
+++ LMDZ5/branches/testing/libf/bibio/new_unit_m.F90	(revision 1707)
@@ -0,0 +1,25 @@
+module new_unit_m
+
+  implicit none
+
+contains
+
+  subroutine new_unit(unit)
+
+    integer, intent(out):: unit
+
+    ! Variables local to the procedure:
+    logical opened, exist
+
+    !------------------------------------------------------
+
+    unit = 0
+    do
+       inquire(unit=unit, opened=opened, exist=exist)
+       if (exist .and. .not. opened) exit
+       unit = unit + 1
+    end do
+
+  end subroutine new_unit
+
+end module new_unit_m
Index: LMDZ5/branches/testing/libf/bibio/pchfe_95.F90
===================================================================
--- LMDZ5/branches/testing/libf/bibio/pchfe_95.F90	(revision 1669)
+++ 	(revision )
@@ -1,76 +1,0 @@
-module PCHFE_95_m
-
-  implicit none
-
-contains
-
-  SUBROUTINE PCHFE_95(X, F, D, SKIP, XE, FE, IERR)
-
-    ! PURPOSE  Evaluate a piecewise cubic Hermite function at an array of
-    !            points.  May be used by itself for Hermite interpolation,
-    !            or as an evaluator for PCHIM or PCHIC.
-    ! CATEGORY  E3
-    ! KEYWORDS  CUBIC HERMITE EVALUATION, HERMITE INTERPOLATION, PCHIP,
-    !             PIECEWISE CUBIC EVALUATION
-
-    !          PCHFE:  Piecewise Cubic Hermite Function Evaluator
-    ! Evaluates the cubic Hermite function defined by  X, F, D  at
-    ! the points  XE.
-
-    use assert_eq_m, only: assert_eq
-
-    REAL, intent(in):: X(:) ! real array of independent variable values
-    ! The elements of X must be strictly increasing.
-
-    REAL, intent(in):: F(:) ! real array of function values
-    ! F(I) is the value corresponding to X(I).
-
-    REAL, intent(in):: D(:) ! real array of derivative values
-    ! D(I) is the value corresponding to X(I).
-
-    LOGICAL, intent(inout):: SKIP 
-    ! request to skip checks for validity of "x"
-    ! If "skip" is false then "pchfe" will check that size(x) >= 2 and
-    ! "x" is in strictly ascending order.
-    ! Setting "skip" to true will save time in case these checks have
-    ! already been performed (say, in "PCHIM" or "PCHIC").
-    ! "SKIP" will be set to TRUE on normal return.
-
-    real, intent(in):: XE(:) ! points at which the function is to be evaluated
-    ! NOTES:
-    ! 1. The evaluation will be most efficient if the elements of XE
-    ! are increasing relative to X.
-    ! That is,   XE(J) .GE. X(I)
-    ! implies    XE(K) .GE. X(I),  all K.GE.J
-    ! 2. If any of the XE are outside the interval [X(1),X(N)], values
-    ! are extrapolated from the nearest extreme cubic, and a warning
-    ! error is returned.
-
-    real, intent(out):: FE(:) ! values of the cubic Hermite function
-    ! defined by X, F, D at the points XE
-
-    integer, intent(out):: IERR ! error flag
-    ! Normal return:
-    ! IERR = 0  no error
-    ! Warning error:
-    ! IERR > 0  means that extrapolation was performed at IERR points
-    ! "Recoverable" errors:
-    !              IERR = -1  if N < 2
-    !              IERR = -3  if the X-array is not strictly increasing
-    !              IERR = -4  if NE < 1
-    ! NOTE: The above errors are checked in the order listed, and
-    ! following arguments have **NOT** been validated.
-
-    ! Variables local to the procedure:
-
-    INTEGER  N, NE
-
-    !---------------------------------------
-
-    n = assert_eq(size(x), size(f), size(d), "PCHFE_95 n")
-    ne = assert_eq(size(xe), size(fe), "PCHFE_95 ne")
-    call PCHFE(N, X, F, D, 1, SKIP, NE, XE, FE, IERR)
-
-  end SUBROUTINE PCHFE_95
-
-end module PCHFE_95_m
Index: LMDZ5/branches/testing/libf/bibio/pchfe_95_m.F90
===================================================================
--- LMDZ5/branches/testing/libf/bibio/pchfe_95_m.F90	(revision 1707)
+++ LMDZ5/branches/testing/libf/bibio/pchfe_95_m.F90	(revision 1707)
@@ -0,0 +1,76 @@
+module PCHFE_95_m
+
+  implicit none
+
+contains
+
+  SUBROUTINE PCHFE_95(X, F, D, SKIP, XE, FE, IERR)
+
+    ! PURPOSE  Evaluate a piecewise cubic Hermite function at an array of
+    !            points.  May be used by itself for Hermite interpolation,
+    !            or as an evaluator for PCHIM or PCHIC.
+    ! CATEGORY  E3
+    ! KEYWORDS  CUBIC HERMITE EVALUATION, HERMITE INTERPOLATION, PCHIP,
+    !             PIECEWISE CUBIC EVALUATION
+
+    !          PCHFE:  Piecewise Cubic Hermite Function Evaluator
+    ! Evaluates the cubic Hermite function defined by  X, F, D  at
+    ! the points  XE.
+
+    use assert_eq_m, only: assert_eq
+
+    REAL, intent(in):: X(:) ! real array of independent variable values
+    ! The elements of X must be strictly increasing.
+
+    REAL, intent(in):: F(:) ! real array of function values
+    ! F(I) is the value corresponding to X(I).
+
+    REAL, intent(in):: D(:) ! real array of derivative values
+    ! D(I) is the value corresponding to X(I).
+
+    LOGICAL, intent(inout):: SKIP 
+    ! request to skip checks for validity of "x"
+    ! If "skip" is false then "pchfe" will check that size(x) >= 2 and
+    ! "x" is in strictly ascending order.
+    ! Setting "skip" to true will save time in case these checks have
+    ! already been performed (say, in "PCHIM" or "PCHIC").
+    ! "SKIP" will be set to TRUE on normal return.
+
+    real, intent(in):: XE(:) ! points at which the function is to be evaluated
+    ! NOTES:
+    ! 1. The evaluation will be most efficient if the elements of XE
+    ! are increasing relative to X.
+    ! That is,   XE(J) .GE. X(I)
+    ! implies    XE(K) .GE. X(I),  all K.GE.J
+    ! 2. If any of the XE are outside the interval [X(1),X(N)], values
+    ! are extrapolated from the nearest extreme cubic, and a warning
+    ! error is returned.
+
+    real, intent(out):: FE(:) ! values of the cubic Hermite function
+    ! defined by X, F, D at the points XE
+
+    integer, intent(out):: IERR ! error flag
+    ! Normal return:
+    ! IERR = 0  no error
+    ! Warning error:
+    ! IERR > 0  means that extrapolation was performed at IERR points
+    ! "Recoverable" errors:
+    !              IERR = -1  if N < 2
+    !              IERR = -3  if the X-array is not strictly increasing
+    !              IERR = -4  if NE < 1
+    ! NOTE: The above errors are checked in the order listed, and
+    ! following arguments have **NOT** been validated.
+
+    ! Variables local to the procedure:
+
+    INTEGER  N, NE
+
+    !---------------------------------------
+
+    n = assert_eq(size(x), size(f), size(d), "PCHFE_95 n")
+    ne = assert_eq(size(xe), size(fe), "PCHFE_95 ne")
+    call PCHFE(N, X, F, D, 1, SKIP, NE, XE, FE, IERR)
+
+  end SUBROUTINE PCHFE_95
+
+end module PCHFE_95_m
Index: LMDZ5/branches/testing/libf/bibio/pchsp_95.F90
===================================================================
--- LMDZ5/branches/testing/libf/bibio/pchsp_95.F90	(revision 1669)
+++ 	(revision )
@@ -1,116 +1,0 @@
-module pchsp_95_m
-
-  implicit none
-
-contains
-
-  function pchsp_95(x, f, ibeg, iend, vc_beg, vc_end)
-
-    ! PURPOSE: Set derivatives needed to determine the Hermite
-    ! representation of the cubic spline interpolant to given data,
-    ! with specified boundary conditions.
-
-    ! Part of the "pchip" package.
-
-    ! CATEGORY: E1A
-
-    ! KEYWORDS: cubic hermite interpolation, piecewise cubic
-    ! interpolation, spline interpolation
-
-    ! DESCRIPTION: "pchsp" stands for "Piecewise Cubic Hermite Spline"
-    ! Computes the Hermite representation of the cubic spline
-    ! interpolant to the data given in X and F satisfying the boundary
-    ! conditions specified by Ibeg, iend, vc_beg and VC_end.
-
-    ! The resulting piecewise cubic Hermite function may be evaluated
-    ! by "pchfe" or "pchfd".
-
-    ! NOTE: This is a modified version of C. de Boor's cubic spline
-    ! routine "cubspl".
-
-    ! REFERENCE: Carl de Boor, A Practical Guide to Splines, Springer,
-    ! 2001, pages 43-47
-
-    use assert_eq_m, only: assert_eq
-
-    real, intent(in):: x(:)
-    ! independent variable values
-    ! The elements of X must be strictly increasing:
-    !                X(I-1) < X(I),  I = 2...N.
-    !           (Error return if not.)
-    ! (error if size(x) < 2)
-
-    real, intent(in):: f(:)
-    !     dependent variable values to be interpolated
-    !  F(I) is value corresponding to X(I).
-
-    INTEGER, intent(in):: ibeg
-    !     desired boundary condition at beginning of data
-
-    !        IBEG = 0  to set pchsp_95(1) so that the third derivative is con-
-    !              tinuous at X(2).  This is the "not a knot" condition
-    !              provided by de Boor's cubic spline routine CUBSPL.
-    !              This is the default boundary condition.
-    !        IBEG = 1  if first derivative at X(1) is given in VC_BEG.
-    !        IBEG = 2  if second derivative at X(1) is given in VC_BEG.
-    !        IBEG = 3  to use the 3-point difference formula for pchsp_95(1).
-    !              (Reverts to the default boundary condition if size(x) < 3 .)
-    !        IBEG = 4  to use the 4-point difference formula for pchsp_95(1).
-    !              (Reverts to the default boundary condition if size(x) < 4 .)
-
-    !          NOTES:
-    !           1. An error return is taken if IBEG is out of range.
-    !           2. For the "natural" boundary condition, use IBEG=2 and
-    !              VC_BEG=0.
-
-    INTEGER, intent(in):: iend
-    !           IC(2) = IEND, desired condition at end of data.
-    !  IEND may take on the same values as IBEG, but applied to
-    !  derivative at X(N). In case IEND = 1 or 2, The value is given in VC_END.
-
-    !          NOTES:
-    !           1. An error return is taken if IEND is out of range.
-    !           2. For the "natural" boundary condition, use IEND=2 and
-    !              VC_END=0.
-
-    REAL, intent(in), optional:: vc_beg
-    ! desired boundary value, as indicated above.
-    !           VC_BEG need be set only if IBEG = 1 or 2 .
-
-    REAL, intent(in), optional:: vc_end
-    ! desired boundary value, as indicated above.
-    !           VC_END need be set only if Iend = 1 or 2 .
-
-    real pchsp_95(size(x))
-    ! derivative values at the data points
-    !           These values will determine the cubic spline interpolant
-    !           with the requested boundary conditions.
-    !           The value corresponding to X(I) is stored in
-    !                PCHSP_95(I),  I=1...N.
-
-    ! LOCAL VARIABLES:
-    real wk(2, size(x)) ! real array of working storage
-    INTEGER n ! number of data points
-    integer ierr, ic(2)
-    real vc(2)
-
-    !-------------------------------------------------------------------
-
-    n = assert_eq(size(x), size(f), "pchsp_95 n")
-    if ((ibeg == 1 .or. ibeg == 2) .and. .not. present(vc_beg)) then
-       print *, "vc_beg required for IBEG = 1 or 2"
-       stop 1
-    end if
-    if ((iend == 1 .or. iend == 2) .and. .not. present(vc_end)) then
-       print *, "vc_end required for IEND = 1 or 2"
-       stop 1
-    end if
-    ic = (/ibeg, iend/)
-    if (present(vc_beg)) vc(1) = vc_beg
-    if (present(vc_end)) vc(2) = vc_end
-    call PCHSP(IC, VC, N, X, F, pchsp_95, 1, WK, size(WK), IERR)
-    if (ierr /= 0) stop 1
-
-  END function pchsp_95
-
-end module pchsp_95_m
Index: LMDZ5/branches/testing/libf/bibio/pchsp_95_m.F90
===================================================================
--- LMDZ5/branches/testing/libf/bibio/pchsp_95_m.F90	(revision 1707)
+++ LMDZ5/branches/testing/libf/bibio/pchsp_95_m.F90	(revision 1707)
@@ -0,0 +1,116 @@
+module pchsp_95_m
+
+  implicit none
+
+contains
+
+  function pchsp_95(x, f, ibeg, iend, vc_beg, vc_end)
+
+    ! PURPOSE: Set derivatives needed to determine the Hermite
+    ! representation of the cubic spline interpolant to given data,
+    ! with specified boundary conditions.
+
+    ! Part of the "pchip" package.
+
+    ! CATEGORY: E1A
+
+    ! KEYWORDS: cubic hermite interpolation, piecewise cubic
+    ! interpolation, spline interpolation
+
+    ! DESCRIPTION: "pchsp" stands for "Piecewise Cubic Hermite Spline"
+    ! Computes the Hermite representation of the cubic spline
+    ! interpolant to the data given in X and F satisfying the boundary
+    ! conditions specified by Ibeg, iend, vc_beg and VC_end.
+
+    ! The resulting piecewise cubic Hermite function may be evaluated
+    ! by "pchfe" or "pchfd".
+
+    ! NOTE: This is a modified version of C. de Boor's cubic spline
+    ! routine "cubspl".
+
+    ! REFERENCE: Carl de Boor, A Practical Guide to Splines, Springer,
+    ! 2001, pages 43-47
+
+    use assert_eq_m, only: assert_eq
+
+    real, intent(in):: x(:)
+    ! independent variable values
+    ! The elements of X must be strictly increasing:
+    !                X(I-1) < X(I),  I = 2...N.
+    !           (Error return if not.)
+    ! (error if size(x) < 2)
+
+    real, intent(in):: f(:)
+    !     dependent variable values to be interpolated
+    !  F(I) is value corresponding to X(I).
+
+    INTEGER, intent(in):: ibeg
+    !     desired boundary condition at beginning of data
+
+    !        IBEG = 0  to set pchsp_95(1) so that the third derivative is con-
+    !              tinuous at X(2).  This is the "not a knot" condition
+    !              provided by de Boor's cubic spline routine CUBSPL.
+    !              This is the default boundary condition.
+    !        IBEG = 1  if first derivative at X(1) is given in VC_BEG.
+    !        IBEG = 2  if second derivative at X(1) is given in VC_BEG.
+    !        IBEG = 3  to use the 3-point difference formula for pchsp_95(1).
+    !              (Reverts to the default boundary condition if size(x) < 3 .)
+    !        IBEG = 4  to use the 4-point difference formula for pchsp_95(1).
+    !              (Reverts to the default boundary condition if size(x) < 4 .)
+
+    !          NOTES:
+    !           1. An error return is taken if IBEG is out of range.
+    !           2. For the "natural" boundary condition, use IBEG=2 and
+    !              VC_BEG=0.
+
+    INTEGER, intent(in):: iend
+    !           IC(2) = IEND, desired condition at end of data.
+    !  IEND may take on the same values as IBEG, but applied to
+    !  derivative at X(N). In case IEND = 1 or 2, The value is given in VC_END.
+
+    !          NOTES:
+    !           1. An error return is taken if IEND is out of range.
+    !           2. For the "natural" boundary condition, use IEND=2 and
+    !              VC_END=0.
+
+    REAL, intent(in), optional:: vc_beg
+    ! desired boundary value, as indicated above.
+    !           VC_BEG need be set only if IBEG = 1 or 2 .
+
+    REAL, intent(in), optional:: vc_end
+    ! desired boundary value, as indicated above.
+    !           VC_END need be set only if Iend = 1 or 2 .
+
+    real pchsp_95(size(x))
+    ! derivative values at the data points
+    !           These values will determine the cubic spline interpolant
+    !           with the requested boundary conditions.
+    !           The value corresponding to X(I) is stored in
+    !                PCHSP_95(I),  I=1...N.
+
+    ! LOCAL VARIABLES:
+    real wk(2, size(x)) ! real array of working storage
+    INTEGER n ! number of data points
+    integer ierr, ic(2)
+    real vc(2)
+
+    !-------------------------------------------------------------------
+
+    n = assert_eq(size(x), size(f), "pchsp_95 n")
+    if ((ibeg == 1 .or. ibeg == 2) .and. .not. present(vc_beg)) then
+       print *, "vc_beg required for IBEG = 1 or 2"
+       stop 1
+    end if
+    if ((iend == 1 .or. iend == 2) .and. .not. present(vc_end)) then
+       print *, "vc_end required for IEND = 1 or 2"
+       stop 1
+    end if
+    ic = (/ibeg, iend/)
+    if (present(vc_beg)) vc(1) = vc_beg
+    if (present(vc_end)) vc(2) = vc_end
+    call PCHSP(IC, VC, N, X, F, pchsp_95, 1, WK, size(WK), IERR)
+    if (ierr /= 0) stop 1
+
+  END function pchsp_95
+
+end module pchsp_95_m
