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 | |
---|
24 | CONTAINS |
---|
25 | !====================================================================== |
---|
26 | SUBROUTINE moyzon_init |
---|
27 | #ifdef CPP_PHYS |
---|
28 | ! This routine needs physics |
---|
29 | USE dimphy |
---|
30 | USE infotrac, only: nqtot |
---|
31 | IMPLICIT 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 |
---|
45 | END SUBROUTINE moyzon_init |
---|
46 | |
---|
47 | !====================================================================== |
---|
48 | SUBROUTINE moyzon(nlev,var,varbar) |
---|
49 | |
---|
50 | IMPLICIT 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 |
---|
66 | END SUBROUTINE moyzon |
---|
67 | |
---|
68 | !====================================================================== |
---|
69 | END MODULE moyzon_mod |
---|