*IF DEF,C80_1A,OR,DEF,RECON,OR,DEF,UTILIO,OR,DEF,FLDIO,OR,DEF,UTILHIST GKR1F405.13 C ******************************COPYRIGHT****************************** G_CH_L1A.3 C (c) CROWN COPYRIGHT 1997, METEOROLOGICAL OFFICE, All Rights Reserved. G_CH_L1A.4 C G_CH_L1A.5 C Use, duplication or disclosure of this code is subject to the G_CH_L1A.6 C restrictions as set forth in the contract. G_CH_L1A.7 C G_CH_L1A.8 C Meteorological Office G_CH_L1A.9 C London Road G_CH_L1A.10 C BRACKNELL G_CH_L1A.11 C Berkshire UK G_CH_L1A.12 C RG12 2SZ G_CH_L1A.13 C G_CH_L1A.14 C If no contract has been raised with this copy of the code, the use, G_CH_L1A.15 C duplication or disclosure of it is strictly prohibited. Permission G_CH_L1A.16 C to do so must first be obtained in writing from the Head of Numerical G_CH_L1A.17 C Modelling at the above address. G_CH_L1A.18 C ******************************COPYRIGHT****************************** G_CH_L1A.19 C G_CH_L1A.20 CLL Routine: G_CH_L1A ------------------------------------------------ G_CH_L1A.21 CLL G_CH_L1A.22 CLL Purpose: To find the number of characters in a Fortran string G_CH_L1A.23 CLL which are terminated by blanks. G_CH_L1A.24 CLL G_CH_L1A.25 CLL Author: Bob Carruthers, Cray Research. Date: 18 September 1997 G_CH_L1A.26 CLL from the original code in UMSHELL1 by Paul Burton. G_CH_L1A.27 CLL GKR1F405.9 CLL Version Date Modification history GKR1F405.10 CLL 4.5 09/10/98 Added def UTILHIST to top def line to allow GKR1F405.11 CLL history executables to be built. K Rogers GKR1F405.12 CLL G_CH_L1A.28 CLL ------------------------------------------------------------------- G_CH_L1A.29 C*L Interface and arguments: ------------------------------------------ G_CH_L1A.30INTEGER FUNCTION GET_CHAR_LEN(string) 7G_CH_L1A.31 ! finds the length of the contents of character variable string G_CH_L1A.32 G_CH_L1A.33 IMPLICIT NONE G_CH_L1A.34 G_CH_L1A.35 CHARACTER *(*) string ! IN : string to find length of G_CH_L1A.36 INTEGER real_len G_CH_L1A.37 LOGICAL found_end G_CH_L1A.38 G_CH_L1A.39 found_end=.FALSE. G_CH_L1A.40 real_len=LEN(string) G_CH_L1A.41 G_CH_L1A.42 DO WHILE ( .NOT. found_end ) G_CH_L1A.43 G_CH_L1A.44 IF (string(real_len:real_len) .NE. " ") THEN G_CH_L1A.45 found_end=.TRUE. G_CH_L1A.46 ELSE G_CH_L1A.47 real_len=real_len-1 G_CH_L1A.48 ENDIF G_CH_L1A.49 G_CH_L1A.50 ENDDO G_CH_L1A.51 G_CH_L1A.52 GET_CHAR_LEN=real_len G_CH_L1A.53 G_CH_L1A.54 RETURN G_CH_L1A.55 END G_CH_L1A.56 *ENDIF G_CH_L1A.57