source: trunk/LMDZ.COMMON/libf/dyn3d_common/tourpot.F90 @ 3000

Last change on this file since 3000 was 1523, checked in by emillour, 9 years ago

All models: More updates to make planetary codes (+Earth) setups converge.

  • in dyn3d_common:
  • convmas.F => convmas.F90
  • enercin.F => enercin.F90
  • flumass.F => flumass.F90
  • massbar.F => massbar.F90
  • tourpot.F => tourpot.F90
  • vitvert.F => vitvert.F90
  • in misc:
  • move "q_sat" from "dyn3d_common" to "misc" (in Earth model, it is also called by the physics)
  • move "write_field" from "dyn3d_common" to "misc"(may be called from physics or dynamics and depends on neither).
  • in phy_common:
  • move "write_field_phy" here since it may be called from any physics package)
  • add module "regular_lonlat_mod" to store global information on lon-lat grid
  • in dynlonlat_phylonlat/phy*:
  • turn "iniphysiq.F90" into module "iniphysiq_mod.F90" (and of course adapt gcm.F[90] and 1D models accordingly)

EM

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  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!===============================================================================
25
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
33
34!--- Filter
35  CALL  filtreg(rot,jjm,llm,2,1,.FALSE.,1)
36
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
44
45END SUBROUTINE tourpot
Note: See TracBrowser for help on using the repository browser.