SURFEX v8.1
General documentation of Surfex
ctor.F
Go to the documentation of this file.
1  SUBROUTINE ctor(CDCHAR_V, PREAL_V, K)
2 !
3 !**** SUBROUTINE ctor - To convert from CHAR to 64-bit REAL
4 !
5 ! S.Saarinen ECMWF 27/6/95
6 !
7 !** INTERFACE
8 ! ---------
9 !
10 ! CALL ctor(cdChar_v, Preal_v, K)
11 ! WHERE:
12 ! cDChar_v = A character-string (INPUT) which contains the
13 ! the ASCII-chars to be converted
14 ! Preal_v = 64-bit REAL-vector (OUTPUT) of n elements
15 ! each holding one ASCII-value [0..255]
16 ! of a character after conversion
17 ! K = length of the REAL-vector and character-string
18 !
19 !
20 !-----------------------------------------------------------------------
21 !
22  USE parkind1, ONLY : jpim
23  IMPLICIT NONE
24  INTEGER(KIND=JPIM) :: K
25 !-- The following MUST be 64-bit REALs [i.e. REAL(8) on Fortran-90]
26 !#ifdef F90
27 ! real(8) Preal_v(K)
28 !#else
29  REAL(KIND=8) :: PREAL_V(k)
30 !#endif
31  CHARACTER(LEN=*) :: CDCHAR_V
32  INTEGER(KIND=JPIM) :: I
33 
34  DO i=1,k
35  preal_v(i) = ichar(cdchar_v(i:i))
36  ENDDO
37  ENDSUBROUTINE ctor
integer, parameter jpim
Definition: parkind1.F90:13
subroutine ctor(CDCHAR_V, PREAL_V, K)
Definition: ctor.F:2