1 subroutine da_balance_geoterm_lin( cori, rho, u, v, term_x, term_y)
3 !---------------------------------------------------------------------------
4 ! Purpose: calculates linearised geostrophic term in balance equation.
6 ! method: term is k x rho f u on a single level.
8 ! assumptions: Various (see documentation).
9 !---------------------------------------------------------------------------
13 real, intent(in) :: cori(ims:ime,jms:jme) ! Coriolis factor.
14 real, intent(in) :: rho(ims:ime,jms:jme) ! Density
15 real, intent(in) :: u(ims:ime,jms:jme) ! u wind increment
16 real, intent(in) :: v(ims:ime,jms:jme) ! v wind increment
17 real, intent(inout) :: term_x(ims:ime,jms:jme) ! x component of term.
18 real, intent(inout) :: term_y(ims:ime,jms:jme) ! y component of term.
20 integer :: is, js ! i,j lower loop limits
21 integer :: ie, je ! i,j upper loop limits
23 if (trace_use) call da_trace_entry("da_balance_geoterm_lin")
31 if (its == ids ) is = ids
32 if (ite == ide ) ie = ide
33 if (jts == jds ) js = jds
34 if (jte == jde ) je = jde
36 !---------------------------------------------------------------------------
37 ! [1.0] Calculate term_x = -f rho v~:
38 !---------------------------------------------------------------------------
40 term_x(is:ie,js:je) = term_x(is:ie,js:je) - rho(is:ie,js:je) * cori(is:ie,js:je) * v(is:ie,js:je)
42 !---------------------------------------------------------------------------
43 ! [2.0] Calculate term_y = f rho u~:
44 !---------------------------------------------------------------------------
46 term_y(is:ie,js:je) = term_y(is:ie,js:je) + rho(is:ie,js:je) * cori(is:ie,js:je) * u(is:ie,js:je)
48 if (trace_use) call da_trace_exit("da_balance_geoterm_lin")
50 end subroutine da_balance_geoterm_lin