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

Last change on this file was 5159, checked in by abarral, 7 weeks 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
RevLine 
[5106]1SUBROUTINE tourpot( vcov, ucov, massebxy, vorpot )
[5099]2
[2336]3!-------------------------------------------------------------------------------
4! Authors: P. Le Van.
5!-------------------------------------------------------------------------------
6! Purpose: Compute potential vorticity.
[5106]7  USE lmdz_filtreg, ONLY: filtreg
[5136]8  USE lmdz_comgeom
9
[5159]10USE lmdz_dimensions, ONLY: iim, jjm, llm, ndm
11  USE lmdz_paramet
[2336]12  IMPLICIT NONE
[5159]13
14
[2336]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!===============================================================================
[524]29
[2336]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
[524]37
[2336]38!--- Filter
39  CALL  filtreg(rot,jjm,llm,2,1,.FALSE.,1)
[524]40
[2336]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
[524]48
[2336]49END SUBROUTINE tourpot
Note: See TracBrowser for help on using the repository browser.