source: LMDZ6/branches/Amaury_dev/libf/dyn3d_common/tourpot.F90 @ 5159

Last change on this file since 5159 was 5159, checked in by abarral, 3 months ago

Put dimensions.h and paramet.h into modules

  • Property copyright set to
    Name of program: LMDZ
    Creation date: 1984
    Version: LMDZ5
    License: CeCILL version 2
    Holder: Laboratoire de m\'et\'eorologie dynamique, CNRS, UMR 8539
    See the license file in the root directory
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.6 KB
Line 
1SUBROUTINE tourpot( vcov, ucov, massebxy, vorpot )
2
3!-------------------------------------------------------------------------------
4! Authors: P. Le Van.
5!-------------------------------------------------------------------------------
6! Purpose: Compute potential vorticity.
7  USE lmdz_filtreg, ONLY: filtreg
8  USE lmdz_comgeom
9
10USE lmdz_dimensions, ONLY: iim, jjm, llm, ndm
11  USE lmdz_paramet
12  IMPLICIT NONE
13
14
15!===============================================================================
16! Arguments:
17  REAL, INTENT(IN)  :: vcov    (ip1jm,  llm)
18  REAL, INTENT(IN)  :: ucov    (ip1jmp1,llm)
19  REAL, INTENT(IN)  :: massebxy(ip1jm,  llm)
20  REAL, INTENT(OUT) :: vorpot  (ip1jm,  llm)
21!===============================================================================
22! Method used:
23!   vorpot = ( Filtre( d(vcov)/dx - d(ucov)/dy ) + fext ) /psbarxy
24!===============================================================================
25! Local variables:
26  INTEGER :: l, ij
27  REAL    :: rot(ip1jm,llm)
28!===============================================================================
29
30!--- Wind vorticity ; correction: rot(iip1,j,l) = rot(1,j,l)
31  DO l=1,llm
32    DO ij=1,ip1jm-1
33      rot(ij,l)=vcov(ij+1,l)-vcov(ij,l)+ucov(ij+iip1,l)-ucov(ij,l)
34    END DO
35    DO ij=iip1,ip1jm,iip1; rot(ij,l)=rot(ij-iim,l); END DO
36  END DO
37
38!--- Filter
39  CALL  filtreg(rot,jjm,llm,2,1,.FALSE.,1)
40
41!--- Potential vorticity ; correction: rot(iip1,j,l) = rot(1,j,l)
42  DO l=1,llm
43    DO ij=1,ip1jm-1
44      vorpot(ij,l)=(rot(ij,l)+fext(ij))/massebxy(ij,l)
45    END DO
46    DO ij=iip1,ip1jm,iip1; vorpot(ij,l)=vorpot(ij-iim,l); END DO
47  END DO
48
49END SUBROUTINE tourpot
Note: See TracBrowser for help on using the repository browser.