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

Last change on this file since 2919 was 1245, checked in by aslmd, 11 years ago

LMDZ.COMMON. added support for gfortran. corrected cyclic dependency with moyzon.

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(klon,llm,nqtot)
27#ifdef CPP_PHYS
28!! This routine needs physics
29IMPLICIT NONE
30       INTEGER :: klon,llm,nqtot
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))
37#else
38    include "iniprint.h"
39    write(lunout,*) "moyzon_init Error: should only be called with physics"
40    stop
41#endif
42END SUBROUTINE moyzon_init
43
44!======================================================================
45SUBROUTINE moyzon(nlev,var,varbar)
46
47IMPLICIT 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
63END SUBROUTINE moyzon
64
65!======================================================================
66      END MODULE moyzon_mod
Note: See TracBrowser for help on using the repository browser.