1 |
! |
module tourpot_m |
|
! $Header: /home/cvsroot/LMDZ4/libf/dyn3d/tourpot.F,v 1.1.1.1 2004/05/19 12:53:06 lmdzadmin Exp $ |
|
|
! |
|
|
SUBROUTINE tourpot ( vcov, ucov, massebxy, vorpot ) |
|
2 |
|
|
3 |
c======================================================================= |
IMPLICIT NONE |
|
c |
|
|
c Auteur: P. Le Van |
|
|
c ------- |
|
|
c |
|
|
c Objet: |
|
|
c ------ |
|
|
c |
|
|
c ******************************************************************* |
|
|
c ......... calcul du tourbillon potentiel ......... |
|
|
c ******************************************************************* |
|
|
c |
|
|
c vcov,ucov,fext et pbarxyfl sont des argum. d'entree pour le s-pg . |
|
|
c vorpot est un argum.de sortie pour le s-pg . |
|
|
c |
|
|
c======================================================================= |
|
4 |
|
|
5 |
use dimens_m |
contains |
|
use paramet_m |
|
|
use logic |
|
|
use comgeom |
|
|
use filtreg_m, only: filtreg |
|
6 |
|
|
7 |
IMPLICIT NONE |
SUBROUTINE tourpot(vcov, ucov, massebxy, vorpot) |
8 |
|
|
9 |
REAL rot( ip1jm,llm ) |
! From LMDZ4/libf/dyn3d/tourpot.F, version 1.1.1.1, 2004/05/19 12:53:06 |
|
REAL, intent(in):: vcov( ip1jm,llm ),ucov( ip1jmp1,llm ) |
|
|
REAL massebxy( ip1jm,llm ),vorpot( ip1jm,llm ) |
|
10 |
|
|
11 |
INTEGER l, ij |
! Author: P. Le Van |
12 |
|
! Objet : calcul du tourbillon potentiel |
13 |
|
|
14 |
|
USE comgeom, ONLY: fext_2d |
15 |
|
USE dimens_m, ONLY: iim, jjm, llm |
16 |
|
use filtreg_m, only: filtreg |
17 |
|
|
18 |
|
REAL, intent(in):: vcov(:, :, :) ! (iim + 1, jjm, llm) |
19 |
|
REAL, intent(in):: ucov(:, :, :) ! (iim + 1, jjm + 1, llm) |
20 |
|
REAL, intent(in):: massebxy(:, :, :) ! (iim + 1, jjm, llm) mass of grid cell |
21 |
|
|
22 |
|
real, intent(out):: vorpot(:, :, :) ! (iim + 1, jjm, llm) |
23 |
|
! = (Filtre(d(vcov)/dx - d(ucov)/dy) + fext) / massebxy |
24 |
|
|
25 |
c ... vorpot = ( Filtre( d(vcov)/dx - d(ucov)/dy ) + fext ) /psbarxy .. |
! Local: |
26 |
|
|
27 |
|
REAL rot(iim + 1, jjm, llm) |
28 |
|
! relative vorticity multiplied by cell area, in m2 s-1 |
29 |
|
|
30 |
|
INTEGER l, i, j |
31 |
|
|
32 |
c ........ Calcul du rotationnel du vent V puis filtrage ........ |
!--------------------------------------------------------------- |
33 |
|
|
34 |
DO 5 l = 1,llm |
! Calcul du rotationnel du vent puis filtrage |
35 |
|
|
36 |
DO 2 ij = 1, ip1jm - 1 |
forall (i = 1: iim, j = 1: jjm) rot(i, j, :) & |
37 |
rot( ij,l ) = vcov(ij+1,l)-vcov(ij,l)+ucov(ij+iip1,l)-ucov(ij,l) |
= vcov(i + 1, j, :) - vcov(i, j, :) + ucov(i, j + 1, :) - ucov(i, j, :) |
38 |
2 CONTINUE |
rot(iim + 1, :, :) = rot(1, :, :) |
39 |
|
|
40 |
c .... correction pour rot( iip1,j,l ) ..... |
CALL filtreg(rot, direct = .true., intensive = .true.) |
|
c .... rot(iip1,j,l) = rot(1,j,l) ..... |
|
41 |
|
|
42 |
CDIR$ IVDEP |
forall (l = 1: llm) vorpot(:iim, :, l) & |
43 |
|
= (rot(:iim, :, l) + fext_2d(:iim, :)) / massebxy(:iim, :, l) |
44 |
|
vorpot(iim + 1, :, :)= vorpot(1, :, :) |
45 |
|
|
46 |
DO 3 ij = iip1, ip1jm, iip1 |
END SUBROUTINE tourpot |
|
rot( ij,l ) = rot( ij -iim, l ) |
|
|
3 CONTINUE |
|
47 |
|
|
48 |
5 CONTINUE |
end module tourpot_m |
|
|
|
|
|
|
|
CALL filtreg( rot, jjm, llm, 2, 1, .FALSE., 1 ) |
|
|
|
|
|
|
|
|
DO 10 l = 1, llm |
|
|
|
|
|
DO 6 ij = 1, ip1jm - 1 |
|
|
vorpot( ij,l ) = ( rot(ij,l) + fext(ij) ) / massebxy(ij,l) |
|
|
6 CONTINUE |
|
|
|
|
|
c ..... correction pour vorpot( iip1,j,l) ..... |
|
|
c .... vorpot(iip1,j,l)= vorpot(1,j,l) .... |
|
|
CDIR$ IVDEP |
|
|
DO 8 ij = iip1, ip1jm, iip1 |
|
|
vorpot( ij,l ) = vorpot( ij -iim,l ) |
|
|
8 CONTINUE |
|
|
|
|
|
10 CONTINUE |
|
|
|
|
|
RETURN |
|
|
END |
|