Ignore:
Timestamp:
Sep 23, 2013, 9:56:47 AM (11 years ago)
Author:
emillour
Message:

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:
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,
    23     &                   zzlay,pdteuv,pdtconduc,pdqdiff)
    34
    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,
    56     &                      igcm_o2, igcm_o3, igcm_h, igcm_h2, igcm_oh,
    67     &                      igcm_ho2, igcm_h2o2, igcm_n2, igcm_ar,
    78     &                      igcm_h2o_vap, mmol
     9      use conc_mod, only: rnew, mmean
    810      implicit none
    911
    10 #include "dimensions.h"
    11 #include "dimphys.h"
     12!#include "dimensions.h"
     13!#include "dimphys.h"
    1214#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"
    1618!#include "tracer.h"
    17 #include "conc.h"
     19!#include "conc.h"
    1820
    1921
     
    2123c Input/Output
    2224c
     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
    2328      real ptimestep
    24       real pplay(ngridmx,nlayermx)
    25       real zzlay(ngridmx,nlayermx)
    26       real pplev(ngridmx,nlayermx+1)
    27       real pq(ngridmx,nlayermx,nqmx)
    28       real pdq(ngridmx,nlayermx,nqmx)
    29       real pt(ngridmx,nlayermx)
    30       real pdt(ngridmx,nlayermx)
    31       real pdteuv(ngridmx,nlayermx)
    32       real pdtconduc(ngridmx,nlayermx)
    33       real pdqdiff(ngridmx,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)
    3439c
    3540c Local
     
    4247      real del1,del2, tmean ,dalfinvdz, d
    4348      real hh,dcoef,dcoef1,ptfac, ntot, dens, dens2, dens3
    44       real hp(nlayermx)
    45       real tt(nlayermx)
    46       real qq(nlayermx,ncompmoldiff)
    47       real dmmeandz(nlayermx)
    48       real qnew(nlayermx,ncompmoldiff)
    49       real zlocal(nlayermx)
     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)
    5055      real alf(ncompmoldiff-1,ncompmoldiff-1)
    51       real alfinv(nlayermx,ncompmoldiff-1,ncompmoldiff-1)
     56      real alfinv(nlayer,ncompmoldiff-1,ncompmoldiff-1)
    5257      real indx(ncompmoldiff-1)
    53       real b(nlayermx,ncompmoldiff-1)
     58      real b(nlayer,ncompmoldiff-1)
    5459      real y(ncompmoldiff-1,ncompmoldiff-1)
    55       real aa(nlayermx,ncompmoldiff-1,ncompmoldiff-1)
    56       real bb(nlayermx,ncompmoldiff-1,ncompmoldiff-1)
    57       real cc(nlayermx,ncompmoldiff-1,ncompmoldiff-1)
    58       real atri(nlayermx-2)
    59       real btri(nlayermx-2)
    60       real ctri(nlayermx-2)
    61       real rtri(nlayermx-2)
    62       real qtri(nlayermx-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)
    6368      real alfdiag(ncompmoldiff-1)
    6469      real wi(ncompmoldiff), flux(ncompmoldiff), pote
     
    211216cccccccccccccccccccccccccccccccccccccccccccccccccccccccc
    212217
    213       nz=nlayermx
    214 
    215       do ig=1,ngridmx
     218      nz=nlayer
     219
     220      do ig=1,ngrid
    216221
    217222        do l=2,nz-1
     
    291296            write(*,*) 'ig, l=',ig, l
    292297            write(*,*) 'No molecular diffusion this time !'
    293             call zerophys(ngridmx*nlayermx*nqmx,pdqdiff)
     298            pdqdiff(1:ngrid,1:nlayer,1:nq)=0
    294299            return
    295300c           stop
Note: See TracChangeset for help on using the changeset viewer.