source: trunk/LMDZ.COMMON/libf/dyn3d/moyzon_mod.F90 @ 1242

Last change on this file since 1242 was 1126, checked in by slebonnois, 11 years ago

SL: update of Titan photochemical module to include computation of chemistry up to 1300 km

File size: 2.0 KB
Line 
1      MODULE moyzon_mod
2! Moyennes zonales pour transmission a la physique
3!======================================================================
4! Specifique a Titan
5!
6!======================================================================
7! Declaration des variables
8
9      REAL,ALLOCATABLE,SAVE :: zplevbar(:,:),zplaybar(:,:)
10      REAL,ALLOCATABLE,SAVE :: ztfibar(:,:),zqfibar(:,:,:)
11      REAL,ALLOCATABLE,SAVE :: zphibar(:,:),zphisbar(:)
12      REAL,ALLOCATABLE,SAVE :: zpkbar(:,:),ztetabar(:,:)
13      REAL,ALLOCATABLE,SAVE :: zzlevbar(:,:),zzlaybar(:,:)
14
15! pmoy: global averaged pressure...
16! tmoy: global averaged temperature...
17! put here to be transfered to Titan routines...
18! to be changed...
19      REAL,ALLOCATABLE,SAVE :: plevmoy(:),playmoy(:)
20      REAL,ALLOCATABLE,SAVE :: zlevmoy(:),zlaymoy(:),phimoy(:)
21      REAL,ALLOCATABLE,SAVE :: tmoy(:),tetamoy(:),pkmoy(:)
22      INTEGER,ALLOCATABLE,SAVE :: klat(:)
23
24CONTAINS
25!======================================================================
26SUBROUTINE moyzon_init
27#ifdef CPP_PHYS
28! This routine needs physics
29USE dimphy
30USE infotrac, only: nqtot
31IMPLICIT NONE
32    INCLUDE "dimensions.h"
33
34      ALLOCATE(zplevbar(klon,llm+1),zplaybar(klon,llm))
35      ALLOCATE(zphibar(klon,llm),zphisbar(klon))
36      ALLOCATE(ztfibar(klon,llm),zqfibar(klon,llm,nqtot))
37      ALLOCATE(zpkbar(klon,llm),ztetabar(klon,llm))
38      ALLOCATE(zzlevbar(klon,llm+1),zzlaybar(klon,llm))
39
40#else
41    include "iniprint.h"
42    write(lunout,*) "moyzon_init Error: should only be called with physics"
43    stop
44#endif
45END SUBROUTINE moyzon_init
46
47!======================================================================
48SUBROUTINE moyzon(nlev,var,varbar)
49
50IMPLICIT NONE
51#include "dimensions.h"
52#include "paramet.h"
53
54      INTEGER :: nlev
55      REAL,dimension(iip1,nlev) :: var
56      REAL,dimension(nlev)      :: varbar
57
58      INTEGER :: i
59
60      varbar(:) = 0.
61      do i=1,iim
62        varbar(:)=varbar(:)+var(i,:)/iim
63      enddo
64
65      return
66END SUBROUTINE moyzon
67
68!======================================================================
69      END MODULE moyzon_mod
Note: See TracBrowser for help on using the repository browser.