*IF DEF,SCMA                                                               S_ERRONE.2      
C *****************************COPYRIGHT******************************     S_ERRONE.3      
C (c) CROWN COPYRIGHT 1998, METEOROLOGICAL OFFICE, All Rights Reserved.    S_ERRONE.4      
C                                                                          S_ERRONE.5      
C Use, duplication or disclosure of this code is subject to the            S_ERRONE.6      
C restrictions as set forth in the contract.                               S_ERRONE.7      
C                                                                          S_ERRONE.8      
C                Meteorological Office                                     S_ERRONE.9      
C                London Road                                               S_ERRONE.10     
C                BRACKNELL                                                 S_ERRONE.11     
C                Berkshire UK                                              S_ERRONE.12     
C                RG12 2SZ                                                  S_ERRONE.13     
C                                                                          S_ERRONE.14     
C If no contract has been raised with this copy of the code, the use,      S_ERRONE.15     
C duplication or disclosure of it is strictly prohibited.  Permission      S_ERRONE.16     
C to do so must first be obtained in writing from the Head of Numerical    S_ERRONE.17     
C Modelling at the above address.                                          S_ERRONE.18     
C ******************************COPYRIGHT******************************    S_ERRONE.19     
C                                                                          S_ERRONE.20     
C     Single Column Unified Model routine to write out error               S_ERRONE.21     
C     messages if there are bad arguments in Boundary Layer,               S_ERRONE.22     
C     Large Scale Precipitation or Large Scale Cloud routines.             S_ERRONE.23     
C     Boundary layer error:-                                               S_ERRONE.24     
C          1 to 6 incl - bad grid definition detected;                     S_ERRONE.25     
C          11 - error in SF_EXCH;                                          S_ERRONE.26     
C          21 - error in KMKH;                                             S_ERRONE.27     
C          31 - error in IMPL_CAL;                                         S_ERRONE.28     
C          41 - error in LS_CLD called in BL scheme                        S_ERRONE.29     
C          51 - error in SOIL_HTF.                                         S_ERRONE.30     
C     Large Scales precipitation and cloud schemes:-                       S_ERRONE.31     
C          0 if OK                                                         S_ERRONE.32     
C          1 if bad arguments                                              S_ERRONE.33     
C                                                                          S_ERRONE.34     
C     Author:        Fiona Hewer  20/6/90                                  S_ERRONE.35     
C                                                                          S_ERRONE.36     
C     Modification History:                                                S_ERRONE.37     
C Version  Date                                                            S_ERRONE.38     
C  4.5     07/98     SCM integrated as a standard UM configuration         S_ERRONE.39     
C                    JC Thil.                                              S_ERRONE.40     
C                                                                          S_ERRONE.41     

      Subroutine ERRONEOUS (error, title)                                   3S_ERRONE.42     
                                                                           S_ERRONE.43     
      Character*10 title                                                   S_ERRONE.44     
                                                                           S_ERRONE.45     
      Integer                                                              S_ERRONE.46     
     &  error                   ! 0 If arguments are ok                    S_ERRONE.47     
C                                                                          S_ERRONE.48     
      If (error .eq. 1) then                                               S_ERRONE.49     
        Write (6, 90)                                                      S_ERRONE.50     
        Write (6, 100) error, title                                        S_ERRONE.51     
      elseif ((2 .le. error) .and. (error .le. 6)) then                    S_ERRONE.52     
        Write (6, 90)                                                      S_ERRONE.53     
        Write (6, 110) error, title                                        S_ERRONE.54     
      elseif (error .eq. 11) then                                          S_ERRONE.55     
        Write (6, 90)                                                      S_ERRONE.56     
        Write (6, 120) error, title                                        S_ERRONE.57     
      elseif (error .eq. 21) then                                          S_ERRONE.58     
        Write (6, 90)                                                      S_ERRONE.59     
        Write (6, 130) error, title                                        S_ERRONE.60     
      elseif (error .eq. 31) then                                          S_ERRONE.61     
        Write (6, 90)                                                      S_ERRONE.62     
        Write (6, 140) error, title                                        S_ERRONE.63     
      elseif (error .eq. 41) then                                          S_ERRONE.64     
        Write (6, 90)                                                      S_ERRONE.65     
        Write (6, 150) error, title                                        S_ERRONE.66     
      elseif (error .eq. 51) then                                          S_ERRONE.67     
        Write (6, 90)                                                      S_ERRONE.68     
        Write (6, 160) error, title                                        S_ERRONE.69     
      endif                                                                S_ERRONE.70     
                                                                           S_ERRONE.71     
 90   Format                                                               S_ERRONE.72     
     &  ('1!!!!!!!!!!Run has terminated in subroutine error!!!!!',         S_ERRONE.73     
     &  '!!!!'///10(/20x,' bad arguments'/20x,' see details below'//))     S_ERRONE.74     
 100  Format                                                               S_ERRONE.75     
     &  ('0 Error = ',i2,', bad arguments in subroutine',a10)              S_ERRONE.76     
 110  Format                                                               S_ERRONE.77     
     &  ('0 Error = ',i2,', bad grid definition in subroutine ',a10)       S_ERRONE.78     
 120  Format                                                               S_ERRONE.79     
     &  ('0 Error = ',i2,', error in routine SF_EXCH called by ',a10)      S_ERRONE.80     
 130  Format                                                               S_ERRONE.81     
     &  ('0 Error = ',i2,', error in routine KMKH called by ',a10)         S_ERRONE.82     
 140  Format                                                               S_ERRONE.83     
     &  ('0 Error = ',i2,',error in routine IMPL_CAL called by ',a10)      S_ERRONE.84     
 150  Format                                                               S_ERRONE.85     
     &  ('0 Error = ',i2,', error in routine LS_CLD called by ',a10)       S_ERRONE.86     
 160  Format                                                               S_ERRONE.87     
     &  ('0 Error = ',i2,',error in routine SOIL_HTF called by ',a10)      S_ERRONE.88     
      Return                                                               S_ERRONE.89     
      End                       ! Subroutine ERRONEOUS                     S_ERRONE.90     
C                                                                          S_ERRONE.91     
*ENDIF                                                                     S_ERRONE.92