[1056] | 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(:) |
---|
[1126] | 20 | REAL,ALLOCATABLE,SAVE :: zlevmoy(:),zlaymoy(:),phimoy(:) |
---|
[1056] | 21 | REAL,ALLOCATABLE,SAVE :: tmoy(:),tetamoy(:),pkmoy(:) |
---|
| 22 | INTEGER,ALLOCATABLE,SAVE :: klat(:) |
---|
| 23 | |
---|
| 24 | CONTAINS |
---|
| 25 | !====================================================================== |
---|
[1245] | 26 | SUBROUTINE moyzon_init(klon,llm,nqtot) |
---|
[1107] | 27 | #ifdef CPP_PHYS |
---|
[1245] | 28 | !! This routine needs physics |
---|
[1056] | 29 | IMPLICIT NONE |
---|
[1245] | 30 | INTEGER :: klon,llm,nqtot |
---|
[1056] | 31 | |
---|
| 32 | ALLOCATE(zplevbar(klon,llm+1),zplaybar(klon,llm)) |
---|
| 33 | ALLOCATE(zphibar(klon,llm),zphisbar(klon)) |
---|
| 34 | ALLOCATE(ztfibar(klon,llm),zqfibar(klon,llm,nqtot)) |
---|
| 35 | ALLOCATE(zpkbar(klon,llm),ztetabar(klon,llm)) |
---|
| 36 | ALLOCATE(zzlevbar(klon,llm+1),zzlaybar(klon,llm)) |
---|
[1107] | 37 | #else |
---|
| 38 | include "iniprint.h" |
---|
| 39 | write(lunout,*) "moyzon_init Error: should only be called with physics" |
---|
| 40 | stop |
---|
| 41 | #endif |
---|
[1056] | 42 | END SUBROUTINE moyzon_init |
---|
| 43 | |
---|
| 44 | !====================================================================== |
---|
| 45 | SUBROUTINE moyzon(nlev,var,varbar) |
---|
| 46 | |
---|
| 47 | IMPLICIT NONE |
---|
| 48 | #include "dimensions.h" |
---|
| 49 | #include "paramet.h" |
---|
| 50 | |
---|
| 51 | INTEGER :: nlev |
---|
| 52 | REAL,dimension(iip1,nlev) :: var |
---|
| 53 | REAL,dimension(nlev) :: varbar |
---|
| 54 | |
---|
| 55 | INTEGER :: i |
---|
| 56 | |
---|
| 57 | varbar(:) = 0. |
---|
| 58 | do i=1,iim |
---|
| 59 | varbar(:)=varbar(:)+var(i,:)/iim |
---|
| 60 | enddo |
---|
| 61 | |
---|
| 62 | return |
---|
| 63 | END SUBROUTINE moyzon |
---|
| 64 | |
---|
| 65 | !====================================================================== |
---|
| 66 | END MODULE moyzon_mod |
---|