64 '$Id: Large_Scale_Correction_Module.f90 60152 2015-08-13 19:19:13Z paul.vandelst@noaa.gov $' 67 REAL(fp),
PARAMETER ::
zero = 0.0_fp
68 REAL(fp),
PARAMETER ::
one = 1.0_fp
69 REAL(fp),
PARAMETER ::
two = 2.0_fp
94 REAL(fp) :: wind_speed =
zero 96 LOGICAL :: zcoeff_invalid = .true.
115 Frequency , & ! Input
117 Wind_Speed, & ! Input
118 Rv_Large , & ! Output
119 Rh_Large , & ! Output
123 REAL(fp),
INTENT(IN) :: frequency
124 REAL(fp),
INTENT(IN) :: cos_z
125 REAL(fp),
INTENT(IN) :: wind_speed
126 REAL(fp),
INTENT(OUT) :: rv_large
127 REAL(fp),
INTENT(OUT) :: rh_large
131 ivar%zcoeff_invalid = .true.
132 ivar%wind_speed = wind_speed
133 ivar%sec_z =
one/cos_z
135 IF( ivar%sec_z >
two ) ivar%sec_z =
two 140 ivar%zcoeff_invalid = .false.
143 rv_large = ivar%zcoeff_v(1) + &
144 ivar%zcoeff_v(2) * ivar%sec_z + &
145 ivar%zcoeff_v(3) * ivar%sec_z**2 + &
146 ivar%zcoeff_v(4) * ivar%wind_speed + &
147 ivar%zcoeff_v(5) * ivar%wind_speed**2 + &
148 ivar%zcoeff_v(6) * ivar%wind_speed*ivar%sec_z
150 rh_large = ivar%zcoeff_h(1) + &
151 ivar%zcoeff_h(2) * ivar%sec_z + &
152 ivar%zcoeff_h(3) * ivar%sec_z**2 + &
153 ivar%zcoeff_h(4) * ivar%wind_speed + &
154 ivar%zcoeff_h(5) * ivar%wind_speed**2 + &
155 ivar%zcoeff_h(6) * ivar%wind_speed*ivar%sec_z
160 REAL(fp),
INTENT(IN) :: coeff(:,:)
161 REAL(fp),
INTENT(IN) :: frequency
162 REAL(fp),
INTENT(OUT) :: zcoeff(:)
164 DO i = 1,
SIZE(zcoeff)
165 zcoeff(i) = coeff(1,i) + frequency*(coeff(2,i) + frequency*coeff(3,i))
174 Wind_Speed_TL, & ! Input
175 Rv_Large_TL , & ! Output
176 Rh_Large_TL , & ! Output
179 REAL(fp),
INTENT(IN) :: wind_speed_tl
180 REAL(fp),
INTENT(OUT) :: rv_large_tl
181 REAL(fp),
INTENT(OUT) :: rh_large_tl
185 IF ( ivar%zcoeff_invalid )
THEN 192 rv_large_tl = ( ivar%zcoeff_v(4) + &
193 (
two * ivar%zcoeff_v(5) * ivar%wind_speed) + &
194 ( ivar%zcoeff_v(6) * ivar%sec_z ) ) * wind_speed_tl
196 rh_large_tl = ( ivar%zcoeff_h(4) + &
197 (
two * ivar%zcoeff_h(5) * ivar%wind_speed) + &
198 ( ivar%zcoeff_h(6) * ivar%sec_z ) ) * wind_speed_tl
205 Rv_Large_AD , & ! Input
206 Rh_Large_AD , & ! Input
207 Wind_Speed_AD, & ! Output
210 REAL(fp),
INTENT(IN OUT) :: rv_large_ad
211 REAL(fp),
INTENT(IN OUT) :: rh_large_ad
212 REAL(fp),
INTENT(IN OUT) :: wind_speed_ad
216 IF ( ivar%zcoeff_invalid )
THEN 224 wind_speed_ad = wind_speed_ad + &
225 ( ivar%zcoeff_h(4) + &
226 (
two * ivar%zcoeff_h(5) * ivar%wind_speed) + &
227 ( ivar%zcoeff_h(6) * ivar%sec_z ) ) * rh_large_ad
230 wind_speed_ad = wind_speed_ad + &
231 ( ivar%zcoeff_v(4) + &
232 (
two * ivar%zcoeff_v(5) * ivar%wind_speed) + &
233 ( ivar%zcoeff_v(6) * ivar%sec_z ) ) * rv_large_ad
subroutine, public interp_4d(z, ulp, vlp, wlp, xlp, z_int)
integer, parameter, public fp
subroutine, public interp_4d_tl(z, ulp, vlp, wlp, xlp, z_TL, ulp_TL, vlp_TL, wlp_TL, xlp_TL, z_int_TL)
subroutine, public interp_4d_ad(z, ulp, vlp, wlp, xlp, z_int_AD, z_AD, ulp_AD, vlp_AD, wlp_AD, xlp_AD)
subroutine, public clear_lpoly(p)
subroutine, public lpoly_ad(x, x_int, p, p_AD, x_AD, x_int_AD)
subroutine, public large_scale_correction(LSCCoeff, Frequency, cos_Z, Wind_Speed, Rv_Large, Rh_Large, iVar)
integer, parameter n_zcoeffs
subroutine, public large_scale_correction_tl(Wind_Speed_TL, Rv_Large_TL, Rh_Large_TL, iVar)
real(fp), parameter, public two
integer, parameter n_lutdims
subroutine, public lpoly(x, x_int, p)
integer, parameter, public npts
subroutine compute_zcoeff(coeff, frequency, zcoeff)
subroutine, public large_scale_correction_ad(Rv_Large_AD, Rh_Large_AD, Wind_Speed_AD, iVar)
character(*), parameter module_version_id
subroutine, public lpoly_tl(x, x_int, p, x_TL, x_int_TL, p_TL)