24 k_to_c => standard_temperature
45 '$Id: Liu.f90 60152 2015-08-13 19:19:13Z paul.vandelst@noaa.gov $' 49 REAL(fp),
PARAMETER ::
zero = 0.0_fp
50 REAL(fp),
PARAMETER ::
one = 1.0_fp
51 REAL(fp),
PARAMETER ::
two = 2.0_fp
52 REAL(fp),
PARAMETER ::
three = 3.0_fp
53 REAL(fp),
PARAMETER ::
four = 4.0_fp
73 REAL(fp),
PARAMETER ::
es_t_coeff(0:3) = (/ 87.9181727_fp , &
74 -4.031592248e-01_fp, &
76 -1.930858348e-06_fp /)
77 REAL(fp),
PARAMETER ::
es_s_coeff(0:2) = (/-2.697e-03_fp, &
86 REAL(fp),
PARAMETER ::
e1_s_coeff(0:2) = (/-6.28908e-03_fp, &
101 -3.010041629e-05_fp, &
102 4.811910733e-06_fp, &
103 -4.259775841e-08_fp /)
207 Temperature , & ! Input
209 Frequency , & ! Input
210 Permittivity, & ! Output
213 REAL(fp),
INTENT(IN) :: temperature
214 REAL(fp),
INTENT(IN) :: salinity
215 REAL(fp),
INTENT(IN) :: frequency
220 REAL(fp) :: tau1, tau2, es, e1
228 ivar%t = temperature - k_to_c
259 IF ( ivar%s >
zero )
THEN 261 ivar%delta = 25.0_fp - ivar%t
273 ivar%alpha = ivar%alpha25*exp(-ivar%delta*ivar%beta)
275 ie = -ivar%alpha/(frequency*
tau0)
292 tau1 = tau1 * ivar%tau1_s
295 tau2 = tau2 * ivar%tau2_s
303 ivar%f1 = frequency*tau1
304 ivar%f2 = frequency*tau2
306 ivar%del2 = e1 - einf
308 re = einf + ivar%del1/(
one + ivar%f1**2) + &
309 ivar%del2/(
one + ivar%f2**2)
311 ie = -ie + ivar%del1*ivar%f1/(
one + ivar%f1**2) + &
312 ivar%del2*ivar%f2/(
one + ivar%f2**2)
376 Temperature_TL , & ! TL Input
377 Salinity_TL , & ! TL Input
378 Frequency , & ! Invariant input
379 Permittivity_TL, & ! TL Output
382 REAL(fp),
INTENT(IN) :: temperature_tl
383 REAL(fp),
INTENT(IN) :: salinity_tl
384 REAL(fp),
INTENT(IN) :: frequency
385 COMPLEX(fp),
INTENT(OUT) :: permittivity_tl
390 REAL(fp) :: es_s_tl, es_tl
391 REAL(fp) :: e1_s_tl, e1_tl
392 REAL(fp) :: tau1_s_tl, tau1_tl
393 REAL(fp) :: tau2_s_tl, tau2_tl
394 REAL(fp) :: delta_tl, beta_tl
395 REAL(fp) :: alpha25_tl, alpha_tl
396 REAL(fp) :: f1_tl, f2_tl, del1_tl, del2_tl
398 REAL(fp) :: re_tl, ie_tl
426 IF ( ivar%s >
zero )
THEN 428 delta_tl = -temperature_tl
440 alpha_tl = (alpha25_tl/ivar%alpha25 - ivar%delta*beta_tl - ivar%beta*delta_tl)*ivar%alpha
442 ie_tl = -alpha_tl/(frequency*
tau0)
448 es_tl = ivar%es_t*es_s_tl + ivar%es_s*es_tl
454 e1_tl = ivar%e1_t*e1_s_tl + ivar%e1_s*e1_tl
462 tau1_tl = ivar%tau1_t*tau1_s_tl + ivar%tau1_s*tau1_tl
467 tau2_tl = ivar%tau2_t*tau2_s_tl + ivar%tau2_s*tau2_tl
475 f1_tl = frequency*tau1_tl
476 f2_tl = frequency*tau2_tl
477 del1_tl = es_tl - e1_tl
478 del2_tl = e1_tl - einf_tl
480 x1 =
one + ivar%f1**2
481 x2 =
one + ivar%f2**2
484 (x1*del1_tl - ivar%del1*ivar%f1*
two*f1_tl)/x1**2 + &
485 (x2*del2_tl - ivar%del2*ivar%f2*
two*f2_tl)/x2**2
487 ie_tl = ivar%f1*del1_tl/x1 + &
488 ivar%del1*(
one - ivar%f1**2)*f1_tl/x1**2 + &
489 ivar%f2*del2_tl/x2 + &
490 ivar%del2*(
one - ivar%f2**2)*f2_tl/x2**2 - &
493 permittivity_tl = cmplx(re_tl,-ie_tl,
fp)
563 Permittivity_AD, & ! AD Input
564 Frequency , & ! Invariant Input
565 Temperature_AD , & ! AD Output
566 Salinity_AD , & ! AD Output
570 COMPLEX(fp),
INTENT(IN OUT) :: permittivity_ad
571 REAL(fp),
INTENT(IN) :: frequency
572 REAL(fp),
INTENT(IN OUT) :: temperature_ad
573 REAL(fp),
INTENT(IN OUT) :: salinity_ad
576 REAL(fp) :: re_ad, ie_ad
578 REAL(fp) :: f1_ad, f2_ad, del1_ad, del2_ad
579 REAL(fp) :: delta_ad, beta_ad
580 REAL(fp) :: alpha25_ad, alpha_ad
581 REAL(fp) :: tau1_s_ad, tau1_ad
582 REAL(fp) :: tau2_s_ad, tau2_ad
584 REAL(fp) :: es_s_ad, es_ad
585 REAL(fp) :: e1_s_ad, e1_ad
591 ie_ad = -aimag(permittivity_ad)
592 re_ad =
REAL(permittivity_ad,
fp)
593 permittivity_ad =
zero 595 x1 =
one + ivar%f1**2
596 x2 =
one + ivar%f2**2
598 f2_ad = ivar%del2*(
one - ivar%f2**2)*ie_ad/x2**2
599 del2_ad = ivar%f2*ie_ad/x2
600 f1_ad = ivar%del1*(
one - ivar%f1**2)*ie_ad/x1**2
601 del1_ad = ivar%f1*ie_ad/x1
604 f2_ad = f2_ad - (ivar%del2*ivar%f2*
two*re_ad)/x2**2
605 del2_ad = del2_ad + re_ad/x2
606 f1_ad = f1_ad - (ivar%del1*ivar%f1*
two*re_ad)/x1**2
607 del1_ad = del1_ad + re_ad/x1
610 einf_ad = einf_ad - del2_ad
612 e1_ad = e1_ad - del1_ad
614 tau2_ad = frequency*f2_ad
615 tau1_ad = frequency*f1_ad
620 IF ( ivar%s >
zero )
THEN 623 tau2_s_ad = ivar%tau2_t*tau2_ad
624 tau2_ad = ivar%tau2_s*tau2_ad
625 salinity_ad = salinity_ad + &
628 temperature_ad = temperature_ad + &
631 tau1_s_ad = ivar%tau1_t*tau1_ad
632 tau1_ad = ivar%tau1_s*tau1_ad
633 salinity_ad = salinity_ad + &
636 temperature_ad = temperature_ad + &
641 e1_s_ad = ivar%e1_t*e1_ad
642 e1_ad = ivar%e1_s*e1_ad
643 salinity_ad = salinity_ad + &
645 temperature_ad = temperature_ad + &
650 es_s_ad = ivar%es_t*es_ad
651 es_ad = ivar%es_s*es_ad
652 salinity_ad = salinity_ad + &
654 temperature_ad = temperature_ad + &
659 alpha_ad = -ie_ad/(frequency*
tau0)
661 alpha25_ad = ivar%alpha*alpha_ad/ivar%alpha25
662 beta_ad = -ivar%delta*ivar%alpha*alpha_ad
663 delta_ad = -ivar%beta*ivar%alpha*alpha_ad
665 salinity_ad = salinity_ad + &
671 salinity_ad = salinity_ad + &
674 delta_ad = delta_ad + &
678 temperature_ad = temperature_ad - delta_ad
684 temperature_ad = temperature_ad + &
687 temperature_ad = temperature_ad + &
691 temperature_ad = temperature_ad + &
694 temperature_ad = temperature_ad + &
698 temperature_ad = temperature_ad +
einf_coeff(1)*einf_ad
real(fp), dimension(0:3), parameter tau2_t_coeff
real(fp), dimension(0:3), parameter alpha25_coeff
real(fp), parameter, public zero
real(fp), dimension(0:2), parameter tau1_s_coeff
real(fp), parameter alpha_coeff
real(fp), parameter, public four
integer, parameter, public fp
real(fp), parameter, public three
real(fp), dimension(0:2), parameter e1_t_coeff
subroutine, public liu_ocean_permittivity(Temperature, Salinity, Frequency, Permittivity, iVar)
real(fp), dimension(0:3), parameter tau1_t_coeff
real(fp), dimension(0:2), parameter es_s_coeff
real(fp), dimension(0:3), parameter es_t_coeff
real(fp), dimension(0:2), parameter e1_s_coeff
real(fp), parameter, public one
real(fp), parameter, public two
real(fp), dimension(0:1), parameter einf_coeff
real(fp), parameter, public permittivity
subroutine, public liu_ocean_permittivity_ad(Permittivity_AD, Frequency, Temperature_AD, Salinity_AD, iVar)
real(fp), dimension(0:5), parameter beta_coeff
subroutine, public liu_ocean_permittivity_tl(Temperature_TL, Salinity_TL, Frequency, Permittivity_TL, iVar)
character(*), parameter module_version_id
real(fp), parameter ghz_to_hz
real(fp), dimension(0:2), parameter tau2_s_coeff
real(fp), parameter, public pi