source: LMDZ5/trunk/libf/dyn3d_common/tourpot.F90 @ 3919

Last change on this file since 3919 was 2603, checked in by Ehouarn Millour, 8 years ago

Cleanup in the dynamics: turn logic.h into module logic_mod.F90
EM

  • 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 
[2336]1SUBROUTINE tourpot ( vcov, ucov, massebxy, vorpot )
[524]2!
[2336]3!-------------------------------------------------------------------------------
4! Authors: P. Le Van.
5!-------------------------------------------------------------------------------
6! Purpose: Compute potential vorticity.
7  IMPLICIT NONE
8  include "dimensions.h"
9  include "paramet.h"
10  include "comgeom.h"
11!===============================================================================
12! Arguments:
13  REAL, INTENT(IN)  :: vcov    (ip1jm,  llm)
14  REAL, INTENT(IN)  :: ucov    (ip1jmp1,llm)
15  REAL, INTENT(IN)  :: massebxy(ip1jm,  llm)
16  REAL, INTENT(OUT) :: vorpot  (ip1jm,  llm)
17!===============================================================================
18! Method used:
19!   vorpot = ( Filtre( d(vcov)/dx - d(ucov)/dy ) + fext ) /psbarxy
20!===============================================================================
21! Local variables:
22  INTEGER :: l, ij
23  REAL    :: rot(ip1jm,llm)
24!===============================================================================
[524]25
[2336]26!--- Wind vorticity ; correction: rot(iip1,j,l) = rot(1,j,l)
27  DO l=1,llm
28    DO ij=1,ip1jm-1
29      rot(ij,l)=vcov(ij+1,l)-vcov(ij,l)+ucov(ij+iip1,l)-ucov(ij,l)
30    END DO
31    DO ij=iip1,ip1jm,iip1; rot(ij,l)=rot(ij-iim,l); END DO
32  END DO
[524]33
[2336]34!--- Filter
35  CALL  filtreg(rot,jjm,llm,2,1,.FALSE.,1)
[524]36
[2336]37!--- Potential vorticity ; correction: rot(iip1,j,l) = rot(1,j,l)
38  DO l=1,llm
39    DO ij=1,ip1jm-1
40      vorpot(ij,l)=(rot(ij,l)+fext(ij))/massebxy(ij,l)
41    END DO
42    DO ij=iip1,ip1jm,iip1; vorpot(ij,l)=vorpot(ij-iim,l); END DO
43  END DO
[524]44
[2336]45END SUBROUTINE tourpot
Note: See TracBrowser for help on using the repository browser.