subroutine calcpres_ecmwf(ppres,knbrlev,pps,kprof) 2,1
      implicit none
c
#if defined (DOC)
*
***s/r CALCPRES_ECMWF - Computes pressure values on ecmwf eta levels
*
*Author  : Y.J. Rochon, ARQX, July 2010
*          Based on 'calcpres.ftn' by S. Pellerin *ARMA/AES April 2000
*Revision:
*
*    -------------------
**    Purpose: Computes pressure values associated with profiles
*              of constant eta levels given 2 dimensionnal surface
*              pressure a set of 'a' and 'b's for
*
*                        p = a+b*ps
*
*Arguments
*    Onput :
*           ppres(knbrlev,kprof) : profiles of pressure values (in Pascals)
*    Input :
*           knbrlev              : number of levels
*           pps(kprof)           : surface pressure values
*           kprof                : number of profiles
*
************************************************************************
#endif
#include "comlun.cdk"
      integer knbrlev,kprof
      real*8 ppres(knbrlev,kprof),pps(kprof)
c     
      integer nab
      parameter (nab=92)
      real*8 a(nab),b(nab)
c
      integer jprof,jlev
c
      if (knbrlev.ne.nab) then
          write(nulout,*) 'Number of levels :', knbrlev
          call abort3d(nulout
     &          ,'CALCPRES_ECMWF :Problem with number of levels')
      end if
      
      call setab_ecmwf(a,b)
      do jprof   = 1, kprof
        do jlev  = 1,knbrlev
          ppres(jlev,jprof) = a(jlev) + b(jlev)*pps(jprof)
        enddo
      enddo
c
      return
      end