source: trunk/LMDZ.MARS/libf/aeronomars/thermosphere.F @ 3289

Last change on this file since 3289 was 3156, checked in by csegonne, 13 months ago

MARS PCM
rnew and cpnew are already initialized in physiq_mod.F with call concentrations.F if callthermos is true.

File size: 2.9 KB
Line 
1      MODULE thermosphere_mod
2     
3      IMPLICIT NONE
4     
5      CONTAINS
6     
7      subroutine thermosphere(ngrid,nlayer,nq,
8     &     pplev,pplay,dist_sol,
9     $     mu0,ptimestep,ptime,zday,tsurf,zzlev,zzlay,
10     &     pt,pq,pu,pv,pdt,pdq,
11     $     zdteuv,zdtconduc,zdumolvis,zdvmolvis,zdqmoldiff,
12     $     PhiEscH,PhiEscH2,PhiEscD)
13
14      use moldiff_red_mod, only: moldiff_red
15      use conc_mod, only: rnew, cpnew
16      USE comcstfi_h, only: r, cpp
17      implicit none
18
19      include "callkeys.h"
20
21      integer,intent(in) :: ngrid ! number of atmospheric columns
22      integer,intent(in) :: nlayer ! number of atmospheric layers
23      integer,intent(in) :: nq ! number of advected tracers
24      REAL,INTENT(in) :: pplay(ngrid,nlayer)
25      REAL,INTENT(in) :: pplev(ngrid,nlayer+1)
26      REAL,INTENT(in) :: zzlay(ngrid,nlayer)
27      REAL,INTENT(in) :: zzlev(ngrid,nlayer+1)
28      REAL,INTENT(in) :: pt(ngrid,nlayer)
29      REAL,INTENT(in) :: zday
30      REAL,INTENT(in) :: dist_sol
31      REAL,INTENT(in) :: mu0(ngrid)
32      REAL,INTENT(in) :: pq(ngrid,nlayer,nq)
33      REAL,INTENT(in) :: ptimestep
34      REAL,INTENT(in) :: ptime
35      REAL,INTENT(in) :: tsurf(ngrid)
36      REAL,INTENT(in) :: pu(ngrid,nlayer),pv(ngrid,nlayer)
37      REAL,INTENT(in) :: pdt(ngrid,nlayer),pdq(ngrid,nlayer,nq)
38
39      REAL,INTENT(out) :: zdteuv(ngrid,nlayer)
40      REAL,INTENT(out) :: zdtconduc(ngrid,nlayer)
41      REAL,INTENT(out) :: zdumolvis(ngrid,nlayer)
42      REAL,INTENT(out) :: zdvmolvis(ngrid,nlayer)
43      REAL,INTENT(out) :: zdqmoldiff(ngrid,nlayer,nq)
44      REAL*8,INTENT(out) :: PhiEscH,PhiEscH2,PhiEscD
45
46      INTEGER :: l,ig
47
48      ! initialize tendencies to zero in all cases
49      ! (tendencies are added later on, even if parametrization is not called)
50      zdteuv(1:ngrid,1:nlayer)=0
51      zdtconduc(1:ngrid,1:nlayer)=0
52      zdumolvis(1:ngrid,1:nlayer)=0
53      zdvmolvis(1:ngrid,1:nlayer)=0
54      zdqmoldiff(1:ngrid,1:nlayer,1:nq)=0
55     
56      if (calleuv) then
57        call euvheat(ngrid,nlayer,nq,pt,pdt,pplev,pplay,zzlay,
58     $               mu0,ptimestep,ptime,zday,pq,pdq,zdteuv)
59      endif
60
61      if (callconduct) THEN
62        call conduction(ngrid,nlayer,ptimestep,pplay,pplev,pt,zdteuv,
63     $                   tsurf,zzlev,zzlay,zdtconduc)
64      endif
65
66      if (callmolvis) THEN
67        call molvis(ngrid,nlayer,ptimestep,pplay,pplev,pt,
68     &                zdteuv,zdtconduc,pu,
69     $                   tsurf,zzlev,zzlay,zdumolvis)
70        call molvis(ngrid,nlayer,ptimestep,pplay,pplev,pt,
71     &                zdteuv,zdtconduc,pv,
72     $                   tsurf,zzlev,zzlay,zdvmolvis)
73      endif
74
75      if (callmoldiff) THEN
76        call moldiff_red(ngrid,nlayer,nq,
77     &                   pplay,pplev,pt,pdt,pq,pdq,ptimestep,
78     &                   zzlay,zdteuv,zdtconduc,zdqmoldiff,
79     &                   PhiEscH,PhiEscH2,PhiEscD)
80      endif
81
82      end subroutine thermosphere
83
84      END MODULE thermosphere_mod
85
Note: See TracBrowser for help on using the repository browser.