Changeset 861 for trunk/LMDZ.GENERIC


Ignore:
Timestamp:
Jan 10, 2013, 9:46:08 PM (12 years ago)
Author:
aslmd
Message:

LMDZ.GENERIC

  • Fixed an allocating bug which arises from previous modifications owing to the double use of callcorrk with CLF_varying
  • Fixed a small bug in a diagnostic in the end of calc_rayleigh. Some picky compilers complain.
  • Fixed a small bug with the array noms which is not allocated when tracer is false. But still need in physdem1.
Location:
trunk/LMDZ.GENERIC
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.GENERIC/README

    r858 r861  
    852852  have the full (naerkind size) array of aerosol radii.
    853853- cleanup (addition of intent(..) to routine arguments) in various routines
     854
     855== 10/01/2013 == AS
     856- Fixed an allocating bug which arises from previous modifications
     857  owing to the double use of callcorrk with CLF_varying
     858- Fixed a small bug in a diagnostic in the end of calc_rayleigh. Some picky compilers complain.
     859- Fixed a small bug with the array noms which is not allocated when tracer is false. But still need in physdem1.
  • trunk/LMDZ.GENERIC/libf/phystd/calc_rayleigh.F90

    r848 r861  
    4444      real*8 tauconsti(ngasmx)
    4545      real*8 tauvari(ngasmx)
     46
     47      integer icantbewrong
    4648
    4749      ! tau0/p0=tau/p (Hansen 1974)
     
    145147
    146148      IF (L_NSPECTV > 6) THEN
    147         print*,'At 1 atm and lambda = ',WAVEV(L_NSPECTV-6),' um'
    148         print*,'tau_R = ',TAURAY(L_NSPECTV-6)*1013.25
    149         print*,'sig_R = ',TAURAY(L_NSPECTV-6)*g*mugaz*1.67e-27*100, &
     149        icantbewrong = L_NSPECTV-6
     150        print*,'At 1 atm and lambda = ',WAVEV(icantbewrong),' um'
     151        print*,'tau_R = ',TAURAY(icantbewrong)*1013.25
     152        print*,'sig_R = ',TAURAY(icantbewrong)*g*mugaz*1.67e-27*100, &
    150153               'cm^2 molecule^-1'
    151154      ENDIF
  • trunk/LMDZ.GENERIC/libf/phystd/callcorrk.F90

    r858 r861  
    195195      if(firstcall) then
    196196
    197          ALLOCATE(QREFvis3d(ngrid,nlayermx,naerkind))
    198          ALLOCATE(QREFir3d(ngrid,nlayermx,naerkind))
     197         !!! ALLOCATED instances are necessary because of CLFvarying
     198         !!! strategy to call callcorrk twice in physiq...
     199         IF(.not.ALLOCATED(QREFvis3d)) ALLOCATE(QREFvis3d(ngrid,nlayermx,naerkind))
     200         IF(.not.ALLOCATED(QREFir3d)) ALLOCATE(QREFir3d(ngrid,nlayermx,naerkind))
     201         ! Effective radius and variance of the aerosols
     202         IF(.not.ALLOCATED(reffrad)) allocate(reffrad(ngrid,nlayer,naerkind))
     203         IF(.not.ALLOCATED(nueffrad)) allocate(nueffrad(ngrid,nlayer,naerkind))
    199204
    200205         call system('rm -f surf_vals_long.out')
    201 
    202 !--------------------------------------------------
    203 !     Effective radius and variance of the aerosols
    204          allocate(reffrad(ngrid,nlayer,naerkind))
    205          allocate(nueffrad(ngrid,nlayer,naerkind))
    206206
    207207         if(naerkind.gt.4)then
     
    812812        IF( ALLOCATED( wrefvar ) ) DEALLOCATE( wrefvar )
    813813        IF( ALLOCATED( pfgasref ) ) DEALLOCATE( pfgasref )
     814        IF ( ALLOCATED(reffrad)) DEALLOCATE(reffrad)
     815        IF ( ALLOCATED(nueffrad)) DEALLOCATE(nueffrad)
    814816      endif
    815817
  • trunk/LMDZ.GENERIC/libf/phystd/initracer.F

    r787 r861  
    5454       !! we allocate once for all arrays in common in tracer_h.F90
    5555       !! (supposedly those are not used before call to initracer)
    56        ALLOCATE(noms(nq))
     56       IF (.NOT.ALLOCATED(noms)) ALLOCATE(noms(nq))
    5757       ALLOCATE(mmol(nq))
    5858       ALLOCATE(radius(nq))
  • trunk/LMDZ.GENERIC/libf/phystd/physiq.F90

    r858 r861  
    475475!        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    476476         tracerdyn=tracer
     477         IF (.NOT.ALLOCATED(noms)) ALLOCATE(noms(nq)) !! because noms is an argument of physdem1
     478                                                      !! whether or not tracer is on
    477479         if (tracer) then
    478480            call initracer(ngrid,nq,nametrac)
     
    15861588                    cloudfrac,totcloudfrac,hice,noms)
    15871589         endif
     1590
    15881591
    15891592!        -----------------------------------------------------------------
     
    17671770      endif
    17681771
    1769 
    17701772      icount=icount+1
    17711773
     
    18541856        IF ( ALLOCATED(coslon)) DEALLOCATE(coslon)
    18551857
     1858
    18561859      endif
    18571860
Note: See TracChangeset for help on using the changeset viewer.