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

Last change on this file since 1119 was 1047, checked in by emillour, 11 years ago

Mars GCM:

  • IMPORTANT CHANGE: Removed all reference/use of ngridmx (dimphys.h) in routines (necessary prerequisite to using parallel dynamics); in most cases this just means adding 'ngrid' as routine argument, and making local saved variables allocatable (and allocated at first call). In the process, had to convert many *.h files to equivalent modules: yomaer.h => yomaer_h.F90 , surfdat.h => surfdat_h.F90 , comsaison.h => comsaison_h.F90 , yomlw.h => yomlw_h.F90 , comdiurn.h => comdiurn_h.F90 , dimradmars.h => dimradmars_mod.F90 , comgeomfi.h => comgeomfi_h.F90, comsoil.h => comsoil_h.F90 , slope.h => slope_mod.F90
  • Also updated EOF routines, everything is now in eofdump_mod.F90
  • Removed unused routine lectfux.F (in dyn3d)

EM

File size: 2.6 KB
Line 
1      subroutine thermosphere(ngrid,nlayer,nq,
2     &     pplev,pplay,dist_sol,
3     $     mu0,ptimestep,ptime,zday,tsurf,zzlev,zzlay,
4     &     pt,pq,pu,pv,pdt,pdq,
5     $     zdteuv,zdtconduc,zdumolvis,zdvmolvis,zdqmoldiff)
6
7      use conc_mod, only: rnew, cpnew
8      implicit none
9
10!#include "dimensions.h"
11!#include "dimphys.h"
12#include "comcstfi.h"
13#include "callkeys.h"
14!#include "comdiurn.h"
15!#include "param.h"
16!#include "param_v4.h"
17!#include "chimiedata.h"
18!#include "conc.h"
19
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 pplay(ngrid,nlayer)
25      real pplev(ngrid,nlayer+1)
26      REAL zzlay(ngrid,nlayer)
27      real zzlev(ngrid,nlayer+1)
28      REAL pt(ngrid,nlayer)
29      real zday
30      REAL dist_sol
31      real mu0(ngrid)
32      real pq(ngrid,nlayer,nq)
33      real ptimestep
34      real ptime
35      real tsurf(ngrid)
36      REAL pu(ngrid,nlayer),pv(ngrid,nlayer)
37      REAL pdt(ngrid,nlayer),pdq(ngrid,nlayer,nq)
38
39      REAL zdteuv(ngrid,nlayer)
40      REAL zdtconduc(ngrid,nlayer)
41      REAL zdumolvis(ngrid,nlayer)
42      REAL zdvmolvis(ngrid,nlayer)
43      real zdqmoldiff(ngrid,nlayer,nq)
44
45      INTEGER l,ig
46      logical,save :: firstcall=.true.
47
48      if (firstcall) then
49        if (.not. tracer) then
50          do l=1,nlayer
51            do ig=1,ngrid
52              rnew(ig,l)=r
53              cpnew(ig,l)=cpp
54            enddo
55          enddo
56        endif
57        firstcall= .false.
58      endif
59
60      if (calleuv) then
61        zdteuv(1:ngrid,1:nlayer)=0
62        call euvheat(ngrid,nlayer,nq,pt,pdt,pplev,pplay,zzlay,
63     $               mu0,ptimestep,ptime,zday,pq,pdq,zdteuv)
64      endif
65
66      if (callconduct) THEN
67        zdtconduc(1:ngrid,1:nlayer)=0
68        call conduction(ngrid,nlayer,ptimestep,pplay,pplev,pt,zdteuv,
69     $                   tsurf,zzlev,zzlay,zdtconduc)
70      endif
71
72      if (callmolvis) THEN
73        zdumolvis(1:ngrid,1:nlayer)=0
74        call molvis(ngrid,nlayer,ptimestep,pplay,pplev,pt,
75     &                zdteuv,zdtconduc,pu,
76     $                   tsurf,zzlev,zzlay,zdumolvis)
77        zdvmolvis(1:ngrid,1:nlayer)=0
78        call molvis(ngrid,nlayer,ptimestep,pplay,pplev,pt,
79     &                zdteuv,zdtconduc,pv,
80     $                   tsurf,zzlev,zzlay,zdvmolvis)
81      endif
82
83      if (callmoldiff) THEN
84        zdqmoldiff(1:ngrid,1:nlayer,1:nq)=0
85        call moldiff_red(ngrid,nlayer,nq,
86     &                   pplay,pplev,pt,pdt,pq,pdq,ptimestep,
87     &                   zzlay,zdteuv,zdtconduc,zdqmoldiff)
88      endif
89
90      return
91      end
92
93
Note: See TracBrowser for help on using the repository browser.