1
2      SUBROUTINE METINI
3!=======================================================================
4!             METINI Module of the AMS/EPA Regulatory Model - AERMOD
5!
6!   Purpose:  To compute the met parameters at stack top and the averages
7!             within the mixed layer
8!
9!   Input:
10!
11!   Output:
12!
13!   Called by:   PCALC
14!
15!   Assumptions:
16!
17!   Developer(s): Jim Paumier and Roger Brode, PES, Inc.
18!   Date:         30 September 1993
19!
20!   Revision history:
21!                      Added initialization of effective parameters
22!                      to stack top parameters, including TGEFF and
23!                      TGEFF3, replacing intializations that were
24!                      formerly included in subroutine PCALC.
25!                      R.W. Brode, PES, 12/6/99
26!
27!                      Calls to ZIAVER to average sigma-V, sigma-W
28!                      and wind speed moved here from METEXT.  This
29!                      allows averaging up to HS when it is higher
30!                      than ZI.  It now averages from the surface to
31!                      the higher of ZI or HS.  Ref:  Summary of AERMOD
32!                      equations, A. Venkatram, 7/7/94.  Changed 7/12/94
33!                      by Russell F. Lee.
34!
35!                      Added calculation of local vertical lagrangian
36!                      time scales at stack height and at ZI/2.  These
37!                      are needed for calculating the effective TsubLZ
38!                      and the horizontal lagrangian time scale,
39!                      respectively.  Changed 7/14/94 by R.F. Lee
40!
41!
42!   Reference(s): "Inhomogeneous Boundary Layer", A. Venkatram, 6/25/93
43!
44!-----------------------------------------------------------------------
45!
46!---- Variable declarations
47!
48      USE MAIN1
49      IMPLICIT NONE
50      CHARACTER MODNAM*12
51      REAL :: VALABV , VBELOW
52
53      SAVE
54
55!---- Data dictionary
56!
57!---- Data initializations
58!
59!.......................................................................
60!---- Compute the parameter values at stack height
61
62!CRFL
63!CRFL  Add calculation of local vertical lagrangian time scale
64!CRFL  at stack height and at ZI/2.
65!CRFL
66
67      IF ( NDXSTK(ISRC).GE.1 ) THEN                                     !  27396
68!----    Sigma_V at stack height
69         CALL GINTRP(GRIDHT(NDXSTK(ISRC)),GRIDSV(NDXSTK(ISRC)),         &
70     &               GRIDHT(NDXSTK(ISRC)+1),GRIDSV(NDXSTK(ISRC)+1),HS,  &
71     &               SVS)
72
73!----    Sigma_W
74         CALL GINTRP(GRIDHT(NDXSTK(ISRC)),GRIDSW(NDXSTK(ISRC)),         &
75     &               GRIDHT(NDXSTK(ISRC)+1),GRIDSW(NDXSTK(ISRC)+1),HS,  &
76     &               SWS)
77
78!----    Wind speed
79         CALL GINTRP(GRIDHT(NDXSTK(ISRC)),GRIDWS(NDXSTK(ISRC)),         &
80     &               GRIDHT(NDXSTK(ISRC)+1),GRIDWS(NDXSTK(ISRC)+1),HS,  &
81     &               US)
82
83!----    Wind direction
84!----    Check for 360 crossover and adjust if necessary
85         VALABV = GRIDWD(NDXSTK(ISRC)+1)
86         VBELOW = GRIDWD(NDXSTK(ISRC))
87
88         IF ( (VALABV-VBELOW).LT.-180.0 ) THEN
89            VALABV = VALABV + 360.                                      !      0
90         ELSEIF ( (VALABV-VBELOW).GT.180.0 ) THEN
91            VALABV = VALABV - 360.                                      !      0
92         ENDIF
93
94         CALL GINTRP(GRIDHT(NDXSTK(ISRC)),VBELOW,GRIDHT(NDXSTK(ISRC)+1),&
95     &               VALABV,HS,WDIR)
96
97!        Check for WDIR > 360 or < 0
98         IF ( WDIR.GT.360. ) THEN
99            WDIR = WDIR - 360.                                          !      0
100         ELSEIF ( WDIR.LE.0.0 ) THEN
101            WDIR = WDIR + 360.                                          !      0
102         ENDIF
103!
104!----    Potential temperature gradient
105         CALL GINTRP(GRIDHT(NDXSTK(ISRC)),GRIDTG(NDXSTK(ISRC)),         &
106     &               GRIDHT(NDXSTK(ISRC)+1),GRIDTG(NDXSTK(ISRC)+1),HS,  &
107     &               TGS)
108
109!----    Potential temperature
110         CALL GINTRP(GRIDHT(NDXSTK(ISRC)),GRIDPT(NDXSTK(ISRC)),         &
111     &               GRIDHT(NDXSTK(ISRC)+1),GRIDPT(NDXSTK(ISRC)+1),HS,  &
112     &               PTS)
113
114      ELSE
115!        Use GRID value for lowest level
116         SVS = GRIDSV(1)                                                !      0
117         SWS = GRIDSW(1)
118         US = GRIDWS(1)
119         WDIR = GRIDWD(1)
120         TGS = GRIDTG(1)
121         PTS = GRIDPT(1)
122      ENDIF
123
124!RWB  Modify the treatment of low wind/low turbulence cases per 7/31/96
125!RWB  write-up by Steve Perry.  R. Brode, PES, 8/15/96
126      SWS = MAX(SWS,SWMIN)                                              !  27396
127      SVS = MAX(SVS,SVMIN,0.05*US)
128      US = SQRT(US*US+2.*SVS*SVS)
129
130!
131!---- If the wind for the hour is not calm or missing, then convert
132!     direction to radians, compute sine and cosine of direction,
133!     and determine nearest 10-degree sector.
134!
135      IF ( (.NOT.CLMHR .OR. .NOT.CLMPRO) .AND.                          &
136     &     (.NOT.MSGHR .OR. .NOT.MSGPRO) ) THEN
137!
138!---->   wind direction = wind direction in degrees * DTORAD
139
140         WDSIN = SIN(WDIR*DTORAD)                                       !  27396
141         WDCOS = COS(WDIR*DTORAD)
142
143         AFV = WDIR - 180.0
144         IF ( AFV.LT.0.0 ) AFV = AFV + 360.0
145         IFVSEC = INT(AFV*0.10+0.4999)
146         IF ( IFVSEC.EQ.0 ) IFVSEC = 36
147
148      ENDIF
149
150!
151!     ------------------------------------------------------------
152!     Apply lower limit of 0.002 K/m to lapse rate for stable
153!     layers.
154!     ------------------------------------------------------------
155!
156!RJP
157!RJP  ASSIGN TGP AS TGS INITIALLY
158!RJP
159      TGP = TGS                                                         !  27396
160!
161
162!---- Calculate potential temperature at stack height, PTS, for plume
163!     rise calculations.  Compute stack height ambient temperature, TA.
164!     NOTE:  TA is no longer the temperature read in by METEXT from the
165!            scalar file
166      TA = PTS - GOVRCP*(HS+ZBASE)
167
168!--------Compute the overbar (average) quantities for sigma_V, sigma_W,
169!        and wind speed, from the surface to the higher of ZI or HS.
170!        The procedure is to average to ZI using ZIAVER, then extend it
171!        to HS using HEAVER.  LOCATE locates the highest gridded height
172!        before HS.
173
174      CALL ZIAVER(MXGLVL,GRIDHT,GRIDSV,ZI,NDX4ZI,SVAVG,SVATZI)
175      CALL ZIAVER(MXGLVL,GRIDHT,GRIDSW,ZI,NDX4ZI,SWAVG,SWATZI)
176      CALL ZIAVER(MXGLVL,GRIDHT,GRIDWS,ZI,NDX4ZI,UAVG,UATZI)
177
178!---- Assign wind speed to use for plume rise, UP = US
179      UP = US
180
181!     Compute the Brunt-Vaisala frequency, BVF, at stack height for STABLE
182!     conditions or for UNSTAB releases above ZI.  Check for TGS < 0 first.
183      IF ( (TGS.GT.0.0) .AND. (STABLE .OR. (UNSTAB .AND. HS.GE.ZI)) )   &
184     &     THEN
185         BVF = SQRT(G*TGS/PTS)                                          !  22954
186      ELSE
187         BVF = 1.0E-10                                                  !   4442
188      ENDIF
189
190      IF ( BVF.LT.1.0E-10 ) BVF = 1.0E-10                               !  27396
191
192      BVPRIM = 0.7*BVF
193
194!RJP  For downwash calculations, set temporarily assigned effective values
195      UEFF = US
196      SVEFF = SVS
197      SWEFF = SWS
198      TGEFF = TGS
199      UEFFD = US
200      SVEFFD = SVS
201      SWEFFD = SWS
202!RWB  Add effective parameters for indirect plume.  RWB, 12/8/94
203      UEFFN = US
204      SVEFFN = SVS
205      SWEFFN = SWS
206      UEFF3 = US
207      SVEFF3 = SVS
208      SWEFF3 = SWS
209      TGEFF3 = TGS
210
211!     Define temporary values of CENTER and SURFAC based on HS
212      CENTER = HS
213      IF ( CENTER.LT.0.1*ZI ) THEN
214         SURFAC = .TRUE.                                                !  21070
215
216      ELSE
217         SURFAC = .FALSE.                                               !   6326
218      ENDIF
219
220      CONTINUE                                                          !  27396
221      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