*IF DEF,C91_2A                                                             ALOGHF2A.2      
C ******************************COPYRIGHT******************************    GTS2F400.325    
C (c) CROWN COPYRIGHT 1995, METEOROLOGICAL OFFICE, All Rights Reserved.    GTS2F400.326    
C                                                                          GTS2F400.327    
C Use, duplication or disclosure of this code is subject to the            GTS2F400.328    
C restrictions as set forth in the contract.                               GTS2F400.329    
C                                                                          GTS2F400.330    
C                Meteorological Office                                     GTS2F400.331    
C                London Road                                               GTS2F400.332    
C                BRACKNELL                                                 GTS2F400.333    
C                Berkshire UK                                              GTS2F400.334    
C                RG12 2SZ                                                  GTS2F400.335    
C                                                                          GTS2F400.336    
C If no contract has been raised with this copy of the code, the use,      GTS2F400.337    
C duplication or disclosure of it is strictly prohibited.  Permission      GTS2F400.338    
C to do so must first be obtained in writing from the Head of Numerical    GTS2F400.339    
C Modelling at the above address.                                          GTS2F400.340    
C ******************************COPYRIGHT******************************    GTS2F400.341    
C                                                                          GTS2F400.342    
CLL Function ALOGHF                                                        ALOGHF2A.3      
CLL                                                                        ALOGHF2A.4      
CLL Purpose:  Portable version of Cray library function to compute         TS220993.1      
CLL           the natural logarithm of ARG1.                               TS220993.2      
CLL                                                                        TS220993.3      
CLL Tested under compiler:   fort77                                        TS220993.4      
CLL Tested under OS version: HP-UX A.08.07                                 TS220993.5      
CLL                                                                        ALOGHF2A.6      
CLL  Model            Modification history:                                ALOGHF2A.7      
CLL version  Date                                                          ALOGHF2A.8      
CLL  3.2   16/07/93   New deck. Tracey Smith.                              ALOGHF2A.9      
CLL  3.3   22/09/93   Improved comments  Tracey Smith                      TS220993.6      
CLL  4.0   23/03/95   Write out input value if <0. Tracey Smith            GTS1F400.1      
CLL                                                                        TS220993.7      
CLL Programming Standard: UM Doc Paper 3, version 5 (08/12/92)             TS220993.8      
CLL                                                                        ALOGHF2A.10     

      REAL FUNCTION ALOGHF(ARG1)                                           ,1ALOGHF2A.11     
        IMPLICIT NONE                                                      ALOGHF2A.12     
        REAL ARG1                                                          ALOGHF2A.13     
        IF(ARG1.LE.0) THEN                                                 ALOGHF2A.14     
          WRITE(6,*) 'Error: Attempt to LOG negative value ',ARG1          GTS1F400.2      
          CALL ABORT                                                       ALOGHF2A.16     
        ELSE                                                               ALOGHF2A.17     
          ALOGHF=ALOG(ARG1)                                                ALOGHF2A.18     
        END IF                                                             ALOGHF2A.19     
      END                                                                  ALOGHF2A.20     
*ENDIF                                                                     ALOGHF2A.21