anchor.diff:  ! 6007 format(' Warning in convip: undetermined kind used =',I10)
   
   end SUBROUTINE CONVIP_plus
  +!=========================== start of private function =========================================
   !===============================================================================================
   function conv_kind_15(p,mykind,ip,mode) result(status) ! convert kind = 15 and subkinds
     implicit none
  
positive.code: ! total failure if we get here
    return
  end function conv_kind_15
  !===============================================================================================
  integer function value_to_string(val,string,maxlen)  ! write value val into string using at most maxlen characters
  ! Version originale M.Valin 2013
  ! Revision 001 :    M.Valin  Oct 2013 alignement a droite corrige pour valeurs entieres > 0
    integer :: maxlen
    character (len=*) :: string
    character (len=32) :: fstring
    real *4 :: val, value
    integer :: after, before
    integer :: grosint, maxc, intdig
  
  
negative.code: ! * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  ! * Boston, MA 02111-1307, USA.
  ! */
  !****P* rmnlib/convert_ip123
  ! SYNOPSIS
  module convert_ip123
  use ISO_C_BINDING
  ! DESCRIPTION
  !  set of generic IP123 conversion functions (IP123 from RPN standard files)
  !  (ip1,ip2,ip3) triplet <-> 3 (real value,kind) pairs
  !
  !  the Fortran user will call the generic functions
  !  - encode_ip   (real value,kind) pairs -> (ip1,ip2,ip3) triplet
  !  - decode_ip   (ip1,ip2,ip3) triplet   -> (real value,kind) pairs
  !  the kind of arguments will determine which specific conversion function will be used
  !  (see description of specific functions)
  !  encode_ip_0, encode_ip_1, encode_ip_2, encode_ip_3
  !  decode_ip_0, decode_ip_1, decode_ip_2, decode_ip_3
  ! AUTHOR
  !  M.Valin 2013
  ! EXAMPLES
  !   use convert_ip123
  !   implicit none
  !   integer :: ip1, ip2, ip3, stat
  !   integer, dimension(3) :: vip123
  !   integer :: k1, k2, k3
  !   integer, dimension(3) :: vk123
  !   real    :: v1, v2, v3
  !   real, dimension(3)    :: v123
  !   type(FLOAT_IP) :: RP1,RP2,RP3
  !   type(FLOAT_IP), dimension(3) :: VRP123
  !
  !   stat = encode_ip(ip1,ip2,ip3,v1,k1,v2,k2,v3,k3)  ! everything explicit (encode_ip_0)
  !   stat = encode_ip(vip123,v123,vk123)              ! vector version of above (encode_ip_1)
  !   stat = encode_ip(ip1,ip2,ip3,RP1,RP2,RP3)        ! ip <- multiple FLOAT_IP  (encode_ip_2)
  !   stat = encode_ip(vip123,VRP123)                  ! vector version of above (encode_ip_3)
  !
  !   stat = decode_ip(v1,k1,v2,k2,v3,k3,ip1,ip2,ip3)  ! everything explicit (decode_ip_0)
  !   stat = decode_ip(v123,vk123,vip123)              ! vector version of above (decode_ip_1)
  !   stat = decode_ip(RP1,RP2,RP3,ip1,ip2,ip3)        ! ip -> multiple FLOAT_IP  (decode_ip_2)
  !   stat = decode_ip(VRP123,vip123)                  ! vector version of above (decode_ip_3)
  ! NOTES
  !  the FORTRAN user must include
  !    use convert_ip123
  !  in order to access this package
  !
  !  individual IP to real value + kind conversions are performed by function convip_plus
  !  real value to formatted string encoding is performed by function value_to_string
  !******
  public  :: encode_ip_0, encode_ip_1, decode_ip_0, decode_ip_1
  public  :: encode_ip_2, encode_ip_3, decode_ip_2, decode_ip_3
  public  :: convip_plus, test_convip_plus, test_value_to_string
  public  :: value_to_string
  private :: conv_kind_15
  
  !****T* rmnlib/FLOAT_IP
  ! SYNOPSIS
  type, BIND(C)  :: FLOAT_IP
  real(C_FLOAT)  :: lo         ! low bound
  real(C_FLOAT)  :: hi         ! high bound
  integer(C_INT) :: kind       ! type code (see table below)
  end type
  ! TABLES
  ! kind     name              description                  range of values
  !
  !   0  KIND_ABOVE_SEA   height (m) above mean sea level (-20,000 -> 100,000)
  !   1  KIND_SIGMA       sigma coordinates               (0.0 -> 1.0)
  !   2  KIND_PRESSURE    pressure (mb)                   (0 -> 1100)
  !   3  KIND_ARBITRARY   arbitrary number, no units      (-4.8e8 -> 1.0e10)
  !   4  KIND_ABOVE_GND   height (m) above ground         (-20,000 -> 100,000)
  !   5  KIND_HYBRID      hybrid coordinates              (0.0 -> 1.0)
  !   6  KIND_THETA       theta coordinates               (1 -> 200,000)
  !  10  KIND_HOURS       time (hours)                    (0.0 -> 1.0e10)
  !  15  KIND_SAMPLES     reserved (integer value)        (0 -> 1 999 999)
  !  17  KIND_MTX_IND     conversion matrix x subscript)  (1.0 -> 1.0e10)
  !                       (shared with kind=1 
  !  21  KIND_M_PRES      pressure-meters                 (0 -> 1,000,000) fact=1E+4
  !                       (shared with kind=5)
  !
  ! return FLAGS for encode/decode functions (more than one flag may be set)
  !  CONVERT_OK     ( 0 = no FLAG set)
  !  CONVERT_GUESS  (= CONVERT_GOOD_GUESS || CONVERT_BAD_GUESS || CONVERT_TERRIBLE_GUESS)
  !  CONVERT_GOOD_GUESS
  !  CONVERT_BAD_GUESS
  !  CONVERT_TERRIBLE_GUESS
  !  CONVERT_WARNING
  !  CONVERT_ERROR
  
  ! NOTES
  !  the FORTRAN user must
  !    use convert_ip123
  !  in order to use this derived type and the symbolic names for kind
  !******
  
  integer, public, parameter :: TO_IP=1
  integer, public, parameter :: TO_RP=-1
  