da_balance_geoterm_lin.inc
References to this file elsewhere.
1 subroutine da_balance_geoterm_lin( cori, rho, u, v, term_x, term_y)
2
3 !---------------------------------------------------------------------------
4 ! Purpose: calculates linearised geostrophic term in balance equation.
5 !
6 ! method: term is k x rho f u on a single level.
7 !
8 ! assumptions: Various (see documentation).
9 !---------------------------------------------------------------------------
10
11 implicit none
12
13 real, dimension(ims:ime,jms:jme), intent(in) :: cori, & ! Coriolis factor.
14 rho, & ! Density
15 u, & ! u wind increment
16 v ! v wind increment
17
18 real, dimension(ims:ime,jms:jme), intent(inout) :: &
19 term_x, & ! x component of term.
20 term_y ! y component of term.
21
22 integer :: is, js ! i,j lower loop limits
23 integer :: ie, je ! i,j upper loop limits
24
25 ! Set loop limits
26
27 is = its-1
28 ie = ite+1
29 js = jts-1
30 je = jte+1
31 if (its == ids ) is = ids
32 if (ite == ide ) ie = ide
33 if (jts == jds ) js = jds
34 if (jte == jde ) je = jde
35
36 !---------------------------------------------------------------------------
37 ! [1.0] Calculate term_x = -f rho v~:
38 !---------------------------------------------------------------------------
39
40 term_x(is:ie,js:je) = term_x(is:ie,js:je) - &
41 rho(is:ie,js:je) * cori(is:ie,js:je) * v(is:ie,js:je)
42
43 !---------------------------------------------------------------------------
44 ! [2.0] Calculate term_y = f rho u~:
45 !---------------------------------------------------------------------------
46
47 term_y(is:ie,js:je) = term_y(is:ie,js:je) + &
48 rho(is:ie,js:je) * cori(is:ie,js:je) * u(is:ie,js:je)
49
50 end subroutine da_balance_geoterm_lin
51
52