source: LMDZ6/trunk/libf/dyn3d_common/tourpot.f90 @ 5274

Last change on this file since 5274 was 5272, checked in by abarral, 8 days ago

Turn paramet.h into a module

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