*IF DEF,C99_1A                                                             LOCRD.2      

      SUBROUTINE locread (cdfldn, pfield, kdimax, knulre, kflgre)           2LOCRD.3      
C****                                                                      LOCRD.4      
C               *****************************                              LOCRD.5      
C               * OASIS ROUTINE  -  LEVEL 0 *                              LOCRD.6      
C               * -------------     ------- *                              LOCRD.7      
C               *****************************                              LOCRD.8      
C                                                                          LOCRD.9      
C**** *locread*  - Read binary field on unit knulre                        LOCRD.10     
C                                                                          LOCRD.11     
C     Purpose:                                                             LOCRD.12     
C     -------                                                              LOCRD.13     
C     Find string cdfldn on unit knulre and read array pfield              LOCRD.14     
C                                                                          LOCRD.15     
C**   Interface:                                                           LOCRD.16     
C     ---------                                                            LOCRD.17     
C       *CALL*  *locread (cdfldn, pfield, kdimax, knulre, kflgre)*         LOCRD.18     
C                                                                          LOCRD.19     
C     Input:                                                               LOCRD.20     
C     -----                                                                LOCRD.21     
C                cdfldn : character string locator                         LOCRD.22     
C                kdimax : dimension of field to be read                    LOCRD.23     
C                knulre : logical unit to be read                          LOCRD.24     
C                                                                          LOCRD.25     
C     Output:                                                              LOCRD.26     
C     ------                                                               LOCRD.27     
C                pfield : field array (real 1D)                            LOCRD.28     
C                kflgre : error status flag                                LOCRD.29     
C                                                                          LOCRD.30     
C     Workspace:                                                           LOCRD.31     
C     ---------                                                            LOCRD.32     
C     None                                                                 LOCRD.33     
C                                                                          LOCRD.34     
C     Externals:                                                           LOCRD.35     
C     ---------                                                            LOCRD.36     
C     None                                                                 LOCRD.37     
C                                                                          LOCRD.38     
C     Reference:                                                           LOCRD.39     
C     ---------                                                            LOCRD.40     
C     See OASIS manual (1995)                                              LOCRD.41     
C                                                                          LOCRD.42     
C     History:                                                             LOCRD.43     
C     -------                                                              LOCRD.44     
C       Version   Programmer     Date      Description                     LOCRD.45     
C       -------   ----------     ----      -----------                     LOCRD.46     
C       2.0       L. Terray      95/09/01  created                         LOCRD.47     
C                                                                          LOCRD.48     
C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%      LOCRD.49     
C                                                                          LOCRD.50     
C* ---------------------------- Include files -----------------------      LOCRD.51     
C                                                                          LOCRD.52     
c      INCLUDE 'doctor.h'                                                  LOCRD.53     
c      INCLUDE 'unit.h'                                                    LOCRD.54     
C                                                                          LOCRD.55     
C* ---------------------------- Argument declarations ---------------      LOCRD.56     
C                                                                          LOCRD.57     
      REAL pfield(kdimax)                                                  LOCRD.58     
      CHARACTER*8 cdfldn                                                   LOCRD.59     
C                                                                          LOCRD.60     
C* ---------------------------- Local declarations ------------------      LOCRD.61     
C                                                                          LOCRD.62     
      CHARACTER*8 clecfl                                                   LOCRD.63     
C                                                                          LOCRD.64     
C* ---------------------------- Poema verses ------------------------      LOCRD.65     
C                                                                          LOCRD.66     
C %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%      LOCRD.67     
C                                                                          LOCRD.68     
C*    1. Initialization                                                    LOCRD.69     
C        --------------                                                    LOCRD.70     
C                                                                          LOCRD.71     
C                                                                          LOCRD.72     
C* Formats                                                                 LOCRD.73     
C                                                                          LOCRD.74     
 1001 FORMAT(5X,' Read binary file connected to unit = ',I3)               LOCRD.75     
C                                                                          LOCRD.76     
C     2. Find field in file                                                LOCRD.77     
C        ------------------                                                LOCRD.78     
C                                                                          LOCRD.79     
      REWIND knulre                                                        LOCRD.80     
 200  CONTINUE                                                             LOCRD.81     
C* Find string                                                             LOCRD.82     
      READ (UNIT = knulre, ERR = 200, END = 210) clecfl                    LOCRD.83     
      IF (clecfl .NE. cdfldn) GO TO  200                                   LOCRD.84     
C* Read associated field                                                   LOCRD.85     
      READ (UNIT = knulre, ERR = 210, END = 210) pfield                    LOCRD.86     
C* Reading done and ok                                                     LOCRD.87     
      kflgre = 0                                                           LOCRD.88     
      GO TO 220                                                            LOCRD.89     
C* Problem in reading                                                      LOCRD.90     
 210  kflgre = 1                                                           LOCRD.91     
 220  CONTINUE                                                             LOCRD.92     
C                                                                          LOCRD.93     
C                                                                          LOCRD.94     
C*    3. End of routine                                                    LOCRD.95     
C        --------------                                                    LOCRD.96     
C                                                                          LOCRD.97     
      RETURN                                                               LOCRD.98     
      END                                                                  LOCRD.99     
                                                                           LOCRD.100    
                                                                           LOCRD.101    
*ENDIF                                                                     LOCRD.102    
                                                                           LOCRD.103