*IF DEF,FLUXPROC                                                           FPGETROW.2      
C ******************************COPYRIGHT******************************    FPGETROW.3      
C (c) CROWN COPYRIGHT 1998, METEOROLOGICAL OFFICE, All Rights Reserved.    FPGETROW.4      
C                                                                          FPGETROW.5      
C Use, duplication or disclosure of this code is subject to the            FPGETROW.6      
C restrictions as set forth in the contract.                               FPGETROW.7      
C                                                                          FPGETROW.8      
C                Meteorological Office                                     FPGETROW.9      
C                London Road                                               FPGETROW.10     
C                BRACKNELL                                                 FPGETROW.11     
C                Berkshire UK                                              FPGETROW.12     
C                RG12 2SZ                                                  FPGETROW.13     
C                                                                          FPGETROW.14     
C If no contract has been raised with this copy of the code, the use,      FPGETROW.15     
C duplication or disclosure of it is strictly prohibited.  Permission      FPGETROW.16     
C to do so must first be obtained in writing from the Head of Numerical    FPGETROW.17     
C Modelling at the above address.                                          FPGETROW.18     
C ******************************COPYRIGHT******************************    FPGETROW.19     
C                                                                          FPGETROW.20     
C Programming standard: Unified Model Documentation Paper No 3             FPGETROW.21     
C                       Version No 1 15/1/90                               FPGETROW.22     
C History:                                                                 FPGETROW.23     
C version  date         change                                             FPGETROW.24     
C 4.5      03/09/98     New code                                           FPGETROW.25     
C                                                                          FPGETROW.26     
! Author:     M. J. Bell                                                   FPGETROW.27     
!----------------------------------------------------------------------    FPGETROW.28     
! contains routines: get_rows_cols                                         FPGETROW.29     
!                                                                          FPGETROW.30     
! Purpose: Flux processing routine.                                        FPGETROW.31     
!          Returns row and column dependent constants for one file         FPGETROW.32     
!----------------------------------------------------------------------    FPGETROW.33     

      subroutine get_rows_cols (UnitIn, icode,                              1,1FPGETROW.34     
*CALL DUMP_AR2                                                             FPGETROW.35     
*CALL ARGPPX                                                               FPGETROW.36     
     # Len_data, rowdepc, coldepc)                                         FPGETROW.37     
                                                                           FPGETROW.38     
      implicit none                                                        FPGETROW.39     
                                                                           FPGETROW.40     
! declaration of argument list                                             FPGETROW.41     
      integer UnitIn  ! IN unit number of file to read                     FPGETROW.42     
      integer icode  ! IN/OUT error code ; > 0 => fatal error detected     FPGETROW.43     
! all arguments in DUMP_LEN are IN                                         FPGETROW.44     
*CALL DUMP_LEN                                                             FPGETROW.45     
                                                                           FPGETROW.46     
      integer Len_data ! IN length of data in file                         FPGETROW.47     
                                                                           FPGETROW.48     
! rowdepc, coldepc: intent is OUT; they are declared by DUMP_DIM           FPGETROW.49     
                                                                           FPGETROW.50     
! no parameters                                                            FPGETROW.51     
                                                                           FPGETROW.52     
! declaration of globals used                                              FPGETROW.53     
*CALL CSUBMODL                                                             FPGETROW.54     
*CALL CPPXREF                                                              FPGETROW.55     
*CALL PPXLOOK                                                              FPGETROW.56     
*CALL CMESS                                                                FPGETROW.57     
                                                                           FPGETROW.58     
! declaration of local arrays                                              FPGETROW.59     
! DUMP_DIM  declares local arrays for ancillary file header                FPGETROW.60     
*CALL DUMP_DIM                                                             FPGETROW.61     
                                                                           FPGETROW.62     
! declaration of local scalars                                             FPGETROW.63     
      integer START_BLOCK       !  start of data block                     FPGETROW.64     
      character*256 CMESSAGE    !  error message                           FPGETROW.65     
                                                                           FPGETROW.66     
      external READHEAD                                                    FPGETROW.67     
                                                                           FPGETROW.68     
!----------------------------------------------------------------------    FPGETROW.69     
! 0. Preliminaries                                                         FPGETROW.70     
      CSub = 'get_rows_cols'  ! subroutine name for error messages         FPGETROW.71     
                                                                           FPGETROW.72     
! 1. Read dump / ancillary file header                                     FPGETROW.73     
                                                                           FPGETROW.74     
      call READHEAD(UnitIn,                                                FPGETROW.75     
*CALL DUMP_AR1                                                             FPGETROW.76     
     # Len_data,                                                           FPGETROW.77     
*CALL ARGPPX                                                               FPGETROW.78     
     # START_BLOCK,ICODE,CMESSAGE)                                         FPGETROW.79     
                                                                           FPGETROW.80     
      if ( icode .gt. 0 ) then                                             FPGETROW.81     
        write(UnErr,*)CErr,CSub,                                           FPGETROW.82     
     #  ' step 1. failed to read ancillary file header; cmessage is ',     FPGETROW.83     
     #  cmessage                                                           FPGETROW.84     
        icode = 22                                                         FPGETROW.85     
        go to 9999                                                         FPGETROW.86     
      end if                                                               FPGETROW.87     
                                                                           FPGETROW.88     
9999  continue                                                             FPGETROW.89     
      return                                                               FPGETROW.90     
      end                                                                  FPGETROW.91     
!----------------------------------------------------------------------    FPGETROW.92     
*ENDIF                                                                     FPGETROW.93