da_calc_mu_uv.inc
References to this file elsewhere.
1 subroutine da_calc_mu_uv (mu, mub, muu, muv, &
2 ids, ide, jds, jde)
3
4 implicit none
5
6 integer, intent(in) :: ids, ide, jds, jde
7
8 real, dimension(ids:ide, jds:jde), intent(in ) :: mu, mub
9
10 real, dimension(ids:ide+1, jds:jde ), intent( out) :: muu
11 real, dimension(ids:ide , jds:jde+1), intent( out) :: muv
12
13 real, dimension(ids-1:ide+1, jds-1:jde+1) :: mut
14
15 integer :: i, j
16
17 do j=jds,jde
18 do i=ids,ide
19 mut(i,j) = mu(i,j)+mub(i,j)
20 end do
21
22 mut(ids-1,j) = mut(ids,j)
23 mut(ide+1,j) = mut(ide,j)
24 end do
25
26 do i=ids-1,ide+1
27 mut(i,jds-1)=mut(i,jds)
28 mut(i,jde+1)=mut(i,jde)
29 end do
30
31 do j=jds,jde
32 do i=ids,ide+1
33 muu(i,j) = 0.5*(mut(i,j)+mut(i-1,j))
34 end do
35 end do
36
37 do j=jds,jde+1
38 do i=ids,ide
39 muv(i,j) = 0.5*(mut(i,j)+mut(i,j-1))
40 end do
41 end do
42
43 end subroutine da_calc_mu_uv
44
45