1 2 SUBROUTINE NTRPWD(HTBELO,VBELOW,HTABOV,VABOVE,REQDHT,VALUE) 3 !======================================================================= 4 ! NTRPWD Module of the AERMOD Dispersion Model 5 ! 6 ! Purpose: To compute the wind direction at an intermediate level 7 ! by interpolating between two observed values. 8 ! 9 ! Input: 10 ! 11 ! 12 ! 13 ! 14 ! Output: Value of the parameter at the required level 15 ! 16 ! Called by: 17 ! 18 ! Assumptions: 19 ! 20 ! 21 ! Programmer: Jim Paumier 30 September 1993 22 ! Pacific Environmental Services 23 ! 24 ! Revision history: 25 ! RWB August 26, 1996 - modified to use local variable for 26 ! VALABV (value above) rather than 27 ! VABOVE from argument list, since 28 ! the value may be modified by the 29 ! subroutine. 30 ! 31 ! JOP March 14, 1995 - modified the check on the ratio for a 32 ! positive slope and observed values 33 ! 34 ! Reference(s): 35 ! 36 !----------------------------------------------------------------------- 37 ! 38 !---- Variable declarations 39 ! 40 USE MAIN1 41 IMPLICIT NONE 42 43 SAVE 44 45 REAL :: HTBELO , VBELOW , HTABOV , VABOVE , REQDHT , VALUE , & 46 & VALABV , REFABV , REFBLW , RATIO , REFREQ , VALINT , & 47 & REFINT 48 ! 49 !---- Data dictionary 50 ! 51 ! 52 !---- Data initializations 53 VALABV = VABOVE ! 0 54 ! 55 ! 56 !....................................................................... 57 !---- The computation requires 3 estimates from the reference/theoretical 58 ! profile: one height above, one height below and from the level at 59 ! which the parameter is needed. The ratio of the differences 60 ! [EST(requested ht) - EST(ht below)] / [EST(ht above) - EST(ht below)] 61 ! is applied to the difference between the observed values to obtain 62 ! interpolated value. 63 ! 64 ! COMPUTE the value of the parameter from the reference profile 65 ! at the height below the requested height (REFBLW) --- CALL REFWD1 66 67 CALL REFWD1(REFBLW) 68 69 ! COMPUTE the value of the parameter from the reference profile 70 ! at the height above the requested height (REFABV) --- CALL REFWD1 71 72 CALL REFWD1(REFABV) 73 74 ! COMPUTE the value of the parameter from the reference profile 75 ! at the requested height (REFREQ) --- CALL REFWD1 76 77 CALL REFWD1(REFREQ) 78 79 IF ( (VALABV-VBELOW).LT.-180.0 ) THEN 80 VALABV = VALABV + 360. ! 0 81 ELSEIF ( (VALABV-VBELOW).GT.180.0 ) THEN 82 VALABV = VALABV - 360. ! 0 83 ENDIF 84 85 ! Linearly interpolate to REQDHT from observed and reference profiles 86 CALL GINTRP(HTBELO,VBELOW,HTABOV,VALABV,REQDHT,VALINT) ! 0 87 CALL GINTRP(HTBELO,REFBLW,HTABOV,REFABV,REQDHT,REFINT) 88 ! REFREQ is value from REFerence profile at REQuired height 89 ! REFINT is value from REFerence profile linearly INTerpolated to req ht 90 ! VALINT is the observed VALue linearly INTerpolated to required height 91 RATIO = REFREQ/REFINT 92 VALUE = RATIO*VALINT 93 94 IF ( VALUE.GT.360. ) THEN 95 VALUE = VALUE - 360. ! 0 96 ELSEIF ( VALUE.LE.0.0 ) THEN 97 VALUE = VALUE + 360. ! 0 98 ENDIF 99 100 ! 101 CONTINUE ! 0 102 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