!*******************************************************************************
!$RCSfile$
!$Revision$
!$Date$
!*******************************************************************************
MODULE sciprime_fi

USE param_fd

INTEGER, PARAMETER :: ISTRG = 132  !Length of Runstream Image Record
INTEGER, PARAMETER :: IFMAX = 40   !Max Number of Fields Per Runstream Record
INTEGER, PARAMETER :: IPN   = 2    !Number of Pathway IDs (Includes '**')
INTEGER, PARAMETER :: IKN   = 6    !Number of keywords

INTEGER, PARAMETER :: MXNTR = 50   !Max no. downwind distances for plume rise reported
INTEGER, PARAMETER :: MXSRC = 20   !Max Number of Sources
INTEGER, PARAMETER :: NSEC  = 36   !Number of Sectors for Building Dimensions
INTEGER, PARAMETER :: MXNZ  = 100  !Max no. vertical layers for meteorological data
INTEGER, PARAMETER :: NST   = 6    !Number of stability classes

INTEGER, PARAMETER :: MXNZP1 = MXNZ+1
!INTEGER, PARAMETER :: INUNIT = 111, IOUNIT=112

REAL,    PARAMETER :: Umin = 0.01  ! Set minimum u to 0.01m/s to avoid divide by zero

LOGICAL  bline,infld,rural,urban
LOGICAL  ldbhr, primeprof

INTEGER  iline,ifc,ipnum,ippnum,kst


REAL     cmass_prm, WDSIN, WDCOS
REAL     dsbh,dsbw,dsbl,xadj,yadj
REAL     hstack,dstack,tstack,wstack,hseff,reff
REAL     ustack,ubldg,afv,dtemdz,pvel,uref
REAL     zi_rel

CHARACTER      :: runst(istrg)
CHARACTER(2)   :: path,ppath
CHARACTER(8)   :: pkeywd,keywrd,keywd(IKN),srcid(MXSRC)
CHARACTER(40)  :: field(IFMAX)
CHARACTER(132) :: runst1

INTEGER, DIMENSION(IFMAX)      :: locb, loce
INTEGER, DIMENSION(IKN)        :: isstat
INTEGER, DIMENSION(MXSRC,IKN)  :: iwrk2
REAL,    DIMENSION(NSEC,MXSRC) :: adsbh,adsbw,adsbl,adsxadj,adsyadj
LOGICAL, DIMENSION(MXSRC)      :: isrural

REAL, DIMENSION(2) :: xrel_prm,yrel_prm,zrel_prm,frac_prm,sigy_prm,sigz_prm
REAL, DIMENSION(2) :: ky_prm,kz_prm,wmom_prm,buoy_prm

REAL, DIMENSION(:), ALLOCATABLE :: concPrime

END MODULE sciprime_fi
