da_transform_xtogpsref.inc

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