Ignore:
Timestamp:
May 12, 2012, 8:10:08 AM (13 years ago)
Author:
emillour
Message:

Mars GCM:

  • updated high atmosphere photochemistry (jthermcalc.F, param_v4.h, iono.h, paramfoto_compact.F, param_read.F , thermosphere.F).
  • minor change in calchim.F90 (to not use maxloc(zycol, dim = 2) function which seems to be a problem for g95) .
  • minor bug fix in perosat.F; set tendency on pdqscloud for h2o2 to zero if none is computed.
  • in "moldiff.F", changed "tridag" to "tridag_sp", "LUBKSB" to "LUBKSB_SP" and "LUDCMP" to "LUDCMP_SP" to avoid possible conflicts with same routines defined in "moldiff_red.F". Added use of automatic-sized array in "tridag" and "tridag_sp" local array "gam" (to avoid using an a priori oversized local array).

FGG+JYC+EM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.MARS/libf/aeronomars/moldiff.F

    r414 r658  
    279279c Inverting the alfa matrix
    280280c
    281         call ludcmp(alf,ncompmoldiff-1,ncompmoldiff-1,indx,d,ierr)
     281        call ludcmp_sp(alf,ncompmoldiff-1,ncompmoldiff-1,indx,d,ierr)
    282282
    283283c       TEMPORAIRE *****************************
    284284        if (ierr.ne.0) then
    285             write(*,*) 'In moldiff: Problem in LUDCMP with matrix alf'
     285            write(*,*)'In moldiff: Problem in LUDCMP_SP with matrix alf'
    286286            write(*,*) 'Singular matrix ?'
    287287c           write(*,*) 'Matrix alf = ', alf
     
    294294c       *******************************************
    295295        do n=1,ncompmoldiff-1
    296           call lubksb(alf,ncompmoldiff-1,ncompmoldiff-1,indx,y(1,n))
     296          call lubksb_sp(alf,ncompmoldiff-1,ncompmoldiff-1,indx,y(1,n))
    297297          do nn=1,ncompmoldiff-1
    298298            alfinv(l,nn,n)=y(nn,n)/hh
     
    415415        btri(1)=btri(1)+atri(1)
    416416
    417         call tridag(atri,btri,ctri,rtri,qtri,nz-2)
     417        call tridag_sp(atri,btri,ctri,rtri,qtri,nz-2)
    418418
    419419        do l=2,nz-1
     
    464464c    ********************************************************************
    465465 
    466       subroutine tridag(a,b,c,r,u,n)
    467       parameter (nmax=100)
     466      subroutine tridag_sp(a,b,c,r,u,n)
     467c      parameter (nmax=100)
    468468c      dimension gam(nmax),a(n),b(n),c(n),r(n),u(n)
    469       real gam(nmax),a(n),b(n),c(n),r(n),u(n)
     469      real gam(n),a(n),b(n),c(n),r(n),u(n)
    470470      if(b(1).eq.0.)then
    471         stop 'tridag: error: b(1)=0 !!! '
     471        stop 'tridag_sp: error: b(1)=0 !!! '
    472472      endif
    473473      bet=b(1)
     
    477477        bet=b(j)-a(j)*gam(j)
    478478        if(bet.eq.0.) then
    479           stop 'tridag: error: bet=0 !!! '
     479          stop 'tridag_sp: error: bet=0 !!! '
    480480        endif
    481481        u(j)=(r(j)-a(j)*u(j-1))/bet
     
    491491c    ********************************************************************
    492492
    493       SUBROUTINE LUBKSB(A,N,NP,INDX,B)
     493      SUBROUTINE LUBKSB_SP(A,N,NP,INDX,B)
    494494
    495495      implicit none
     
    530530c    ********************************************************************
    531531
    532       SUBROUTINE LUDCMP(A,N,NP,INDX,D,ierr)
     532      SUBROUTINE LUDCMP_SP(A,N,NP,INDX,D,ierr)
    533533
    534534      implicit none
     
    55055011      CONTINUE
    551551        IF (AAMAX.EQ.0.) then
    552             write(*,*) 'In moldiff: Problem in LUDCMP with matrix A'
     552            write(*,*) 'In moldiff: Problem in LUDCMP_SP with matrix A'
    553553            write(*,*) 'Singular matrix ?'
    554554c           write(*,*) 'Matrix A = ', A
Note: See TracChangeset for help on using the changeset viewer.