1!----------------------------------------------------------------------
2      SUBROUTINE UNLUMP(UA,TA,RA,F)
3!----------------------------------------------------------------------
4!
5! --- PRIME      Version:  1.0     Level:  970812                UNLUMP
6!                X.(J.) Zhang, J. Scire,  EARTH TECH
7!
8! --- PURPOSE:  Calculate physical variables from lumped variables
9!
10! --- MODIFIED: To limit plume temperature (TP) to be .GE. ambient
11!               temperature (TA) minus 10K to avoid potential math error.
12!               R.W. Brode, PES/MACTEC, Inc. - 06/17/03
13!
14! --- INPUTS:
15!         UA - real    - Current ambient wind speed (m/s)
16!         TA - real    - Current ambient air temperature (K)
17!         RA - real    - Current ambient air density (kg/m^3)
18!       F(7) - real    - Lumped variables
19!
20! --- OUTPUT:
21!       common /PLU/:
22!          U,V,W,USC,R,TP,PHI,Z,Y,X
23!
24! --- UNLUMP called by:  NUMRISE
25! --- UNLUMP calls:      none
26!----------------------------------------------------------------------
27      COMMON /PLU   / S , X , Y , Z , R , U , V , W , USC , PHI , DEN , &
28     &                TP
29      DIMENSION F(7)
30      U = UA + F(2)/F(1)                                                !6441956
31      W = F(3)/F(1)
32      USC = SQRT(U*U+W*W)
33      TP = TA + F(4)/F(1)
34!PES    Limit plume temperature (TP) to be .GE. ambient (TA) - 10 K to
35!PES    avoid potential math error.  R. Brode, PES/MACTEC, 6/21/03
36      TP = MAX(TP,TA-10.)
37      DEN = RA*TA/TP
38      R = SQRT(F(1)/USC/DEN)
39      PHI = ATAN(W/U)
40      Z = F(5)
41      X = F(6)
42      Y = F(7)
43      CONTINUE
44      END


HyperKWIC - Version 1.00DD executed at 20:00 on 1 Mar 2018 | Personal or Academic or Evaluation User | Free for Non-Commercial, Non-Government Use