da_transform_xtogpsref.inc
References to this file elsewhere.
1 subroutine da_transform_xtogpsref(xb, xp)
2
3 !-------------------------------------------------------------------
4 ! Purpose: TBD
5 !-------------------------------------------------------------------
6
7 implicit none
8
9 ! input : xb%q, xb%p, xb%t, and xp
10 ! output: xb%ref
11
12 type (xb_type), intent(inout) :: xb ! First guess structure.
13 type(xpose_type), intent(in) :: xp ! domain decomposition vars.
14
15 integer :: i, j, k, is, ie, js, je, ks, ke
16 real :: partone, parttwo, dividnd
17
18 is = xp%its; ie = xp%ite
19 js = xp%jts; je = xp%jte
20 ks = xp%kts; ke = xp%kte
21
22 do k = ks, ke
23 do j = js, je
24 do i = is, ie
25
26 ! calculate refractivity
27
28 ! 1, Hydrostatic part of refractivity:
29 ! Note: p in Pascal.
30
31 partone = 0.776*xb%p(i,j,k)/xb%t(i,j,k)
32
33 ! 2, (Wet part) / (hydrostatic part):
34 ! Note: xb%q is the specific humidity --- an analysis variable
35
36 dividnd = xb%t(i,j,k)*(0.622+0.378*xb%q(i,j,k))
37 parttwo = 1.0+coeff*xb%q(i,j,k)/dividnd
38
39 ! 3, Refractivity:
40 xb%ref(i,j,k)= partone * parttwo
41 end do
42 end do
43 end do
44
45 end subroutine da_transform_xtogpsref
46
47