*IF DEF,A04_2E,OR,DEF,A04_3B                                               ADM0F405.287    
C (c) CROWN COPYRIGHT 1995, METEOROLOGICAL OFFICE, All Rights Reserved.    GTS2F400.15949  
C                                                                          GTS2F400.15950  
C Use, duplication or disclosure of this code is subject to the            GTS2F400.15951  
C restrictions as set forth in the contract.                               GTS2F400.15952  
C                                                                          GTS2F400.15953  
C                Meteorological Office                                     GTS2F400.15954  
C                London Road                                               GTS2F400.15955  
C                BRACKNELL                                                 GTS2F400.15956  
C                Berkshire UK                                              GTS2F400.15957  
C                RG12 2SZ                                                  GTS2F400.15958  
C                                                                          GTS2F400.15959  
C If no contract has been raised with this copy of the code, the use,      GTS2F400.15960  
C duplication or disclosure of it is strictly prohibited.  Permission      GTS2F400.15961  
C to do so must first be obtained in writing from the Head of Numerical    GTS2F400.15962  
C Modelling at the above address.                                          GTS2F400.15963  
C ******************************COPYRIGHT******************************    GTS2F400.15964  
C                                                                          GTS2F400.15965  
C*LL  SUBROUTINE LSP_FOCWWIL--------------------------------------------   LSPFCW2D.3      
!LL                                                                        LSPFCW2D.4      
!LL  Purpose: Calculate from temperature the Fraction Of Cloud Water       LSPFCW2D.5      
!LL           Which Is Liquid.                                             LSPFCW2D.6      
!LL     NOTE: Operates within range 0 to -9 deg.C based upon MRF           LSPFCW2D.7      
!LL           observational analysis. Not robust to changes in TM or T0C   LSPFCW2D.8      
!LL                                                                        LSPFCW2D.9      
!LL A.Bushell   <- programmer of some or all of previous code or changes   LSPFCW2D.10     
!LL                                                                        LSPFCW2D.11     
!LL  Model                                                                 LSPFCW2D.12     
!LL version  Date     Modification history from model version 4.0:         LSPFCW2D.13     
!LL                                                                        LSPFCW2D.14     
!LL   4.0    27/09/95 Subroutine created from in-line COMDECK.             LSPFCW2D.15     
!LL                                                                        LSPFCW2D.16     
!LL                                                                        LSPFCW2D.17     
!LL  Programming standard: Unified Model Documentation Paper No 4,         LSPFCW2D.18     
!LL                        Version 1, dated 12/9/89.                       LSPFCW2D.19     
!LL                                                                        LSPFCW2D.20     
!LL  Logical component covered: Part of P26.                               LSPFCW2D.21     
!LL                                                                        LSPFCW2D.22     
!LL  System task:                                                          LSPFCW2D.23     
!LL                                                                        LSPFCW2D.24     
!LL  Documentation: Unified Model Documentation Paper No 26: Eq 26.50.     LSPFCW2D.25     
!LL                                                                        LSPFCW2D.26     
!LL  Called by components P26, P23.                                        LSPFCW2D.27     
C*                                                                         LSPFCW2D.28     
C*L  Arguments:---------------------------------------------------------   LSPFCW2D.29     

      SUBROUTINE LSP_FOCWWIL(                                               12LSPFCW2D.30     
     & T,POINTS,ROCWWIL                                                    LSPFCW2D.31     
     &)                                                                    LSPFCW2D.32     
      IMPLICIT NONE                                                        LSPFCW2D.33     
      INTEGER          ! Input integer scalar :-                           LSPFCW2D.34     
     & POINTS          ! IN Number of points to be processed.              LSPFCW2D.35     
      REAL             ! Input real arrays :-                              LSPFCW2D.36     
     & T(POINTS)       ! IN Temperature at this level (K).                 LSPFCW2D.37     
      REAL             ! Updated real arrays :-                            LSPFCW2D.38     
     & ROCWWIL(POINTS) ! OUT Ratio Of Cloud Water Which Is Liquid.         LSPFCW2D.39     
C*L   External subprogram called :-                                        LSPFCW2D.40     
!     EXTERNAL None.                                                       LSPFCW2D.41     
C*                                                                         LSPFCW2D.42     
!-----------------------------------------------------------------------   LSPFCW2D.43     
!  Common, then local, physical constants.                                 LSPFCW2D.44     
!-----------------------------------------------------------------------   LSPFCW2D.45     
*CALL C_0_DG_C                                                             LSPFCW2D.46     
      REAL                                                                 LSPFCW2D.47     
     & TSTART          ! Temperature at which ROCWWIL reaches 1.           LSPFCW2D.48     
     &,TRANGE          ! Temperature range over which 0 < ROCWWIL < 1.     LSPFCW2D.49     
      PARAMETER(TSTART=TM,                                                 LSPFCW2D.50     
     &          TRANGE=9.0)                                                LSPFCW2D.51     
!-----------------------------------------------------------------------   LSPFCW2D.52     
!  Define local scalars.                                                   LSPFCW2D.53     
!-----------------------------------------------------------------------   LSPFCW2D.54     
!  (a) Reals effectively expanded to workspace by the Cray (using          LSPFCW2D.55     
!      vector registers).                                                  LSPFCW2D.56     
      REAL             ! Real workspace. At end of DO loop, contains :-    LSPFCW2D.57     
     & TFOC            ! T(I) within DO loop. Allows routines to call      LSPFCW2D.58     
!                        LSP_FOCWWIL(WORK1, POINTS, WORK1) to save space   LSPFCW2D.59     
!  (b) Others.                                                             LSPFCW2D.60     
      INTEGER I       ! Loop counter (horizontal field index).             LSPFCW2D.61     
!                                                                          LSPFCW2D.62     
      DO  I = 1, POINTS                                                    LSPFCW2D.63     
!                                                                          LSPFCW2D.64     
        TFOC = T(I)                                                        LSPFCW2D.65     
!-----------------------------------------------------------------------   LSPFCW2D.66     
!L 0. Calculate fraction of cloud water which is liquid (FL),              LSPFCW2D.67     
!L    according to equation P26.50.                                        LSPFCW2D.68     
!-----------------------------------------------------------------------   LSPFCW2D.69     
        IF (TFOC .LE. (TSTART - TRANGE)) THEN                              LSPFCW2D.70     
!       Low temperatures, cloud water all frozen------------------------   LSPFCW2D.71     
          ROCWWIL(I) = 0.0                                                 LSPFCW2D.72     
!                                                                          LSPFCW2D.73     
        ELSE IF (TFOC .LT. TSTART) THEN                                    LSPFCW2D.74     
!       Intermediate temperatures---------------------------------------   LSPFCW2D.75     
          ROCWWIL(I) = (TFOC - TSTART + TRANGE) / TRANGE                   LSPFCW2D.76     
!                                                                          LSPFCW2D.77     
        ELSE                                                               LSPFCW2D.78     
!       High temperatures, cloud water all liquid-----------------------   LSPFCW2D.79     
          ROCWWIL(I) = 1.0                                                 LSPFCW2D.80     
!                                                                          LSPFCW2D.81     
        END IF                                                             LSPFCW2D.82     
!                                                                          LSPFCW2D.83     
      END DO ! Loop over points                                            LSPFCW2D.84     
!                                                                          LSPFCW2D.85     
      RETURN                                                               LSPFCW2D.86     
      END                                                                  LSPFCW2D.87     
*ENDIF                                                                     LSPFCW2D.88