source: LMDZ6/branches/contrails/libf/dyn3d_common/tourpot.f90 @ 5445

Last change on this file since 5445 was 5285, checked in by abarral, 8 weeks ago

As discussed internally, remove generic ONLY: ... for new _mod_h 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 comgeom_mod_h
8  USE dimensions_mod, ONLY: iim, jjm, llm, ndm
9USE paramet_mod_h
10IMPLICIT NONE
11
12
13!===============================================================================
14! Arguments:
15  REAL, INTENT(IN)  :: vcov    (ip1jm,  llm)
16  REAL, INTENT(IN)  :: ucov    (ip1jmp1,llm)
17  REAL, INTENT(IN)  :: massebxy(ip1jm,  llm)
18  REAL, INTENT(OUT) :: vorpot  (ip1jm,  llm)
19!===============================================================================
20! Method used:
21!   vorpot = ( Filtre( d(vcov)/dx - d(ucov)/dy ) + fext ) /psbarxy
22!===============================================================================
23! Local variables:
24  INTEGER :: l, ij
25  REAL    :: rot(ip1jm,llm)
26!===============================================================================
27
28!--- Wind vorticity ; correction: rot(iip1,j,l) = rot(1,j,l)
29  DO l=1,llm
30    DO ij=1,ip1jm-1
31      rot(ij,l)=vcov(ij+1,l)-vcov(ij,l)+ucov(ij+iip1,l)-ucov(ij,l)
32    END DO
33    DO ij=iip1,ip1jm,iip1; rot(ij,l)=rot(ij-iim,l); END DO
34  END DO
35
36!--- Filter
37  CALL  filtreg(rot,jjm,llm,2,1,.FALSE.,1)
38
39!--- Potential vorticity ; correction: rot(iip1,j,l) = rot(1,j,l)
40  DO l=1,llm
41    DO ij=1,ip1jm-1
42      vorpot(ij,l)=(rot(ij,l)+fext(ij))/massebxy(ij,l)
43    END DO
44    DO ij=iip1,ip1jm,iip1; vorpot(ij,l)=vorpot(ij-iim,l); END DO
45  END DO
46
47END SUBROUTINE tourpot
Note: See TracBrowser for help on using the repository browser.