!-------------------------------------------------------------------------- !---------------------------- caldyn_fast ---------------------------------- ! SELECT CASE(caldyn_thermo) CASE(thermo_boussinesq) DO l = ll_begin, ll_end !DIR$ SIMD DO ij=ij_begin, ij_end berni(ij,l) = pk(ij,l) ! from now on pk contains the vertically-averaged geopotential pk(ij,l) = .5*(geopot(ij,l)+geopot(ij,l+1)) END DO END DO CASE(thermo_theta) DO l = ll_begin, ll_end !DIR$ SIMD DO ij=ij_begin, ij_end berni(ij,l) = .5*(geopot(ij,l)+geopot(ij,l+1)) END DO END DO CASE(thermo_entropy) DO l = ll_begin, ll_end !DIR$ SIMD DO ij=ij_begin, ij_end berni(ij,l) = .5*(geopot(ij,l)+geopot(ij,l+1)) berni(ij,l) = berni(ij,l) + pk(ij,l)*(cpp-theta(ij,l,1)) ! Gibbs = Cp.T-Ts = T(Cp-s) END DO END DO CASE DEFAULT PRINT *, 'Unsupported value of caldyn_thermo : ',caldyn_thermo ! FIXME STOP END SELECT ! DO l = ll_begin, ll_end !DIR$ SIMD DO ij=ij_begin, ij_end due = .5*(theta(ij,l,1)+theta(ij+t_right,l,1))*(pk(ij+t_right,l)-pk(ij,l)) + berni(ij+t_right,l)-berni(ij,l) du(ij+u_right,l) = du(ij+u_right,l) - ne_right*due u(ij+u_right,l) = u(ij+u_right,l) + tau*du(ij+u_right,l) due = .5*(theta(ij,l,1)+theta(ij+t_lup,l,1))*(pk(ij+t_lup,l)-pk(ij,l)) + berni(ij+t_lup,l)-berni(ij,l) du(ij+u_lup,l) = du(ij+u_lup,l) - ne_lup*due u(ij+u_lup,l) = u(ij+u_lup,l) + tau*du(ij+u_lup,l) due = .5*(theta(ij,l,1)+theta(ij+t_ldown,l,1))*(pk(ij+t_ldown,l)-pk(ij,l)) + berni(ij+t_ldown,l)-berni(ij,l) du(ij+u_ldown,l) = du(ij+u_ldown,l) - ne_ldown*due u(ij+u_ldown,l) = u(ij+u_ldown,l) + tau*du(ij+u_ldown,l) END DO END DO ! !---------------------------- caldyn_fast ---------------------------------- !--------------------------------------------------------------------------