Changeset 1047 for trunk/LMDZ.MARS/libf/aeronomars/moldiff.F
- Timestamp:
- Sep 23, 2013, 9:56:47 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/libf/aeronomars/moldiff.F
r1036 r1047 1 subroutine moldiff(pplay,pplev,pt,pdt,pq,pdq,ptimestep, 1 subroutine moldiff(ngrid,nlayer,nq, 2 & pplay,pplev,pt,pdt,pq,pdq,ptimestep, 2 3 & zzlay,pdteuv,pdtconduc,pdqdiff) 3 4 4 use tracer_mod, only: nqmx,igcm_co2, igcm_co, igcm_o, igcm_o1d,5 use tracer_mod, only: igcm_co2, igcm_co, igcm_o, igcm_o1d, 5 6 & igcm_o2, igcm_o3, igcm_h, igcm_h2, igcm_oh, 6 7 & igcm_ho2, igcm_h2o2, igcm_n2, igcm_ar, 7 8 & igcm_h2o_vap, mmol 9 use conc_mod, only: rnew, mmean 8 10 implicit none 9 11 10 #include "dimensions.h"11 #include "dimphys.h"12 !#include "dimensions.h" 13 !#include "dimphys.h" 12 14 #include "comcstfi.h" 13 #include "callkeys.h"14 #include "comdiurn.h"15 #include "chimiedata.h"15 !#include "callkeys.h" 16 !#include "comdiurn.h" 17 !#include "chimiedata.h" 16 18 !#include "tracer.h" 17 #include "conc.h"19 !#include "conc.h" 18 20 19 21 … … 21 23 c Input/Output 22 24 c 25 integer,intent(in) :: ngrid ! number of atmospheric columns 26 integer,intent(in) :: nlayer ! number of atmospheric layers 27 integer,intent(in) :: nq ! number of advected tracers 23 28 real ptimestep 24 real pplay(ngrid mx,nlayermx)25 real zzlay(ngrid mx,nlayermx)26 real pplev(ngrid mx,nlayermx+1)27 real pq(ngrid mx,nlayermx,nqmx)28 real pdq(ngrid mx,nlayermx,nqmx)29 real pt(ngrid mx,nlayermx)30 real pdt(ngrid mx,nlayermx)31 real pdteuv(ngrid mx,nlayermx)32 real pdtconduc(ngrid mx,nlayermx)33 real pdqdiff(ngrid mx,nlayermx,nqmx)29 real pplay(ngrid,nlayer) 30 real zzlay(ngrid,nlayer) 31 real pplev(ngrid,nlayer+1) 32 real pq(ngrid,nlayer,nq) 33 real pdq(ngrid,nlayer,nq) 34 real pt(ngrid,nlayer) 35 real pdt(ngrid,nlayer) 36 real pdteuv(ngrid,nlayer) 37 real pdtconduc(ngrid,nlayer) 38 real pdqdiff(ngrid,nlayer,nq) 34 39 c 35 40 c Local … … 42 47 real del1,del2, tmean ,dalfinvdz, d 43 48 real hh,dcoef,dcoef1,ptfac, ntot, dens, dens2, dens3 44 real hp(nlayer mx)45 real tt(nlayer mx)46 real qq(nlayer mx,ncompmoldiff)47 real dmmeandz(nlayer mx)48 real qnew(nlayer mx,ncompmoldiff)49 real zlocal(nlayer mx)49 real hp(nlayer) 50 real tt(nlayer) 51 real qq(nlayer,ncompmoldiff) 52 real dmmeandz(nlayer) 53 real qnew(nlayer,ncompmoldiff) 54 real zlocal(nlayer) 50 55 real alf(ncompmoldiff-1,ncompmoldiff-1) 51 real alfinv(nlayer mx,ncompmoldiff-1,ncompmoldiff-1)56 real alfinv(nlayer,ncompmoldiff-1,ncompmoldiff-1) 52 57 real indx(ncompmoldiff-1) 53 real b(nlayer mx,ncompmoldiff-1)58 real b(nlayer,ncompmoldiff-1) 54 59 real y(ncompmoldiff-1,ncompmoldiff-1) 55 real aa(nlayer mx,ncompmoldiff-1,ncompmoldiff-1)56 real bb(nlayer mx,ncompmoldiff-1,ncompmoldiff-1)57 real cc(nlayer mx,ncompmoldiff-1,ncompmoldiff-1)58 real atri(nlayer mx-2)59 real btri(nlayer mx-2)60 real ctri(nlayer mx-2)61 real rtri(nlayer mx-2)62 real qtri(nlayer mx-2)60 real aa(nlayer,ncompmoldiff-1,ncompmoldiff-1) 61 real bb(nlayer,ncompmoldiff-1,ncompmoldiff-1) 62 real cc(nlayer,ncompmoldiff-1,ncompmoldiff-1) 63 real atri(nlayer-2) 64 real btri(nlayer-2) 65 real ctri(nlayer-2) 66 real rtri(nlayer-2) 67 real qtri(nlayer-2) 63 68 real alfdiag(ncompmoldiff-1) 64 69 real wi(ncompmoldiff), flux(ncompmoldiff), pote … … 211 216 cccccccccccccccccccccccccccccccccccccccccccccccccccccccc 212 217 213 nz=nlayer mx214 215 do ig=1,ngrid mx218 nz=nlayer 219 220 do ig=1,ngrid 216 221 217 222 do l=2,nz-1 … … 291 296 write(*,*) 'ig, l=',ig, l 292 297 write(*,*) 'No molecular diffusion this time !' 293 call zerophys(ngridmx*nlayermx*nqmx,pdqdiff)298 pdqdiff(1:ngrid,1:nlayer,1:nq)=0 294 299 return 295 300 c stop
Note: See TracChangeset
for help on using the changeset viewer.