source: LMDZ6/branches/Amaury_dev/libf/dyn3dmem/tourpot_loc.F90 @ 5208

Last change on this file since 5208 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
File size: 2.1 KB
RevLine 
[5106]1SUBROUTINE tourpot_loc( vcov, ucov, massebxy, vorpot )
[5099]2
[2336]3!-------------------------------------------------------------------------------
4! Authors: P. Le Van.
5!-------------------------------------------------------------------------------
6! Purpose: Compute potential vorticity.
7  USE parallel_lmdz
[5106]8  USE lmdz_filtreg_p
[5136]9  USE lmdz_comgeom
10
[5159]11USE lmdz_dimensions, ONLY: iim, jjm, llm, ndm
12  USE lmdz_paramet
[2336]13  IMPLICIT NONE
[5159]14
15
[2336]16!===============================================================================
17! Arguments:
18  REAL, INTENT(IN)  :: vcov    (ijb_v:ije_v,llm)
19  REAL, INTENT(IN)  :: ucov    (ijb_u:ije_u,llm)
20  REAL, INTENT(IN)  :: massebxy(ijb_v:ije_v,llm)
21  REAL, INTENT(OUT) :: vorpot  (ijb_v:ije_v,llm)
22!===============================================================================
23! Method used:
24!   vorpot = ( Filtre( d(vcov)/dx - d(ucov)/dy ) + fext ) /psbarxy
25!===============================================================================
26! Local variables:
27  INTEGER :: l, ij, ije, ijb, jje, jjb
28  REAL    :: rot(ijb_v:ije_v,llm)
29!===============================================================================
[1632]30
[2336]31  ijb=ij_begin-iip1
32  ije=ij_end
33  IF(pole_nord) ijb=ij_begin
[1632]34
[2336]35!--- Wind vorticity ; correction: rot(iip1,j,l) = rot(1,j,l)
36!$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
37  DO l=1,llm
38    IF(pole_sud) ije=ij_end-iip1-1
39    DO ij=ijb,ije
40      rot(ij,l)=vcov(ij+1,l)-vcov(ij,l)+ucov(ij+iip1,l)-ucov(ij,l)
41    END DO
42    IF(pole_sud) ije=ij_end-iip1
43    DO ij=ijb+iip1-1,ije,iip1; rot(ij,l)=rot(ij-iim,l); END DO
44  END DO
45!$OMP END DO NOWAIT
[1632]46
[2336]47!--- Filter
48  jjb=jj_begin-1
49  jje=jj_end
50  IF(pole_nord) jjb=jjb+1
51  IF(pole_sud)  jje=jje-1
52  CALL filtreg_p(rot,jjb_v,jje_v,jjb,jje,jjm,llm,2,1,.FALSE.,1)
[1632]53
[2336]54!--- Potential vorticity ; correction: rot(iip1,j,l) = rot(1,j,l)
55!$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
56  DO l=1,llm
57    IF(pole_sud) ije=ij_end-iip1-1
58    DO ij=ijb,ije
59      vorpot(ij,l)=(rot(ij,l)+fext(ij))/massebxy(ij,l)
60    END DO
61    IF(pole_sud) ije=ij_end-iip1
62    DO ij=ijb+iip1-1,ije,iip1; vorpot(ij,l)=vorpot(ij-iim,l); END DO
63  END DO
64!$OMP END DO NOWAIT
[1632]65
[2336]66END SUBROUTINE tourpot_loc
[1632]67
Note: See TracBrowser for help on using the repository browser.