1 2 SUBROUTINE ZIAVER(NLVLS,HTS,PARRAY,ZI,NDXBLW,PBLAVG,VALZI) 3 !*********************************************************************** 4 ! ZIAVER Module of the AMS/EPA Regulatory Model - AERMOD 5 ! 6 ! Purpose: To compute the average value of the parameter between 7 ! the surface and the mixing height 8 ! 9 ! Input: Number of levels in the profile (NLVLS) 10 ! Array of gridded profile heights (HTS) 11 ! Parameter array (PARRAY) 12 ! Boundary layer height (ZI) (or stack height, if higher) 13 ! Index of the level gridded profile height immediately 14 ! below ZI (NDXBLW) 15 ! Value of parameter at ZI (VALZI) 16 ! 17 ! Output: Average value of parameter in boundary layer (PBLAVG); 18 ! 19 ! Called by: METEXT 20 ! 21 ! Assumptions: If the mixing height (ZI) is above the highest 22 ! profile height (5000 m), then we assume the profile 23 ! is constant (= PARRAY(NLVLS)) above ZI and compute 24 ! the average accordingly. 25 ! 26 ! 27 ! Programmer: Jim Paumier PES, Inc. 28 ! 29 ! Date: September 30, 1993 30 ! 31 ! Revision history: 32 ! <none> 33 ! 34 ! Reference(s): Inhomgeneous Boundary Layer, A. Venkatram, 35 ! June 25, 1993 (GOLF document #5) 36 ! 37 !*********************************************************************** 38 ! 39 !---- Variable declarations 40 ! 41 IMPLICIT NONE 42 43 INTEGER NDXBLW , NLVLS , I 44 REAL HTS(NLVLS) , PARRAY(NLVLS) , ZI , SUM , PBLAVG , VALZI 45 ! 46 !---- Data dictionary 47 ! 48 !---- Data initializations 49 ! 50 !....................................................................... 51 52 SUM = 0.0 ! 82188 53 54 !---- Sum over each layer of the gridded profile (PARRAY) to the level 55 ! immediately below ZI 56 57 DO I = 2 , NDXBLW 58 SUM = SUM + (HTS(I)-HTS(I-1))*0.5*(PARRAY(I)+PARRAY(I-1)) !2001510 59 ENDDO 60 61 !---- Finish the summation 62 63 IF ( NDXBLW.LT.NLVLS ) THEN ! 82188 64 !------- Add the area between the level below ZI and ZI to the 65 ! sum and compute the average. 66 67 SUM = SUM + (ZI-HTS(NDXBLW))*0.5*(VALZI+PARRAY(NDXBLW)) ! 82188 68 PBLAVG = SUM/ZI 69 70 ELSE 71 !---- ZI is above the top level (5000 m), assume the parameter is 72 ! constant above that level and sum accordingly and compute 73 ! the average 74 SUM = SUM + (ZI-HTS(NLVLS))*PARRAY(NLVLS) ! 0 75 PBLAVG = SUM/ZI 76 ENDIF 77 78 CONTINUE ! 82188 79 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