Ignore:
Timestamp:
Oct 19, 2017, 11:27:15 PM (7 years ago)
Author:
bclmd
Message:

Adding photochemistry to LMDZ Generic

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.GENERIC/libf/phystd/dyn1d/rcm1d.F

    r1621 r1802  
    66      use mod_grid_phy_lmdz, only : regular_lonlat
    77      use infotrac, only: nqtot, tname
     8      use tracer_h, only: noms
    89      use surfdat_h, only: albedodat, phisfi, dryness, watercaptag,
    910     &                     zmea, zstd, zsig, zgam, zthe,
     
    2324     &                            nday, iphysiq
    2425      use callkeys_mod, only: tracer,check_cpp_match,rings_shadow,
    25      &                        specOLR,water,pceil,ok_slab_ocean
     26     &                        specOLR,water,pceil,ok_slab_ocean,photochem
    2627      USE comvert_mod, ONLY: ap,bp,aps,bps,pa,preff, sig,
    2728     &                       presnivs,pseudoalt,scaleheight
     
    138139!     added by AS to avoid the use of adv trac common
    139140      character*20,allocatable :: nametrac(:)   ! name of the tracer (no need for adv trac common)
     141      character*20,allocatable :: nametmp(:)   !
    140142
    141143      real :: latitude(1), longitude(1), cell_area(1)
     
    254256          if (nq>0) then
    255257            allocate(tname(nq))
     258            allocate(noms(nq))
    256259            allocate(q(llm,nq))
    257260            allocate(qsurf(nq))
     
    267270          ! minimal version, just read in the tracer names, 1 per line
    268271            read(90,*,iostat=ierr) tname(iq)
     272            noms(iq)=tname(iq)
    269273            if (ierr.ne.0) then
    270274              write(*,*) 'rcm1d: error reading tracer names...'
     
    292296        endif
    293297        close(90)
     298
    294299
    295300      else ! of if (tracer)
     
    816821! -----------------
    817822      do isoil=0,nsoil-1
    818         mlayer(isoil)=2.e-4*(2.**(isoil-0.5)) ! mid-layer depth
     823        mlayer(isoil)=3.e-2*(2.**(isoil-0.5)) ! mid-layer depth
    819824      enddo
    820825      do isoil=1,nsoil
    821         layer(isoil)=2.e-4*(2.**(isoil-1)) ! layer depth
     826        layer(isoil)=3.e-2*(2.**(isoil-1)) ! layer depth
    822827      enddo
    823828
     
    838843      endif
    839844
     845
     846! Initialize chemical species
     847! -----------------
     848      if(tracer.and.photochem) then
     849           call initracer(1,nq,tname)
     850           allocate(nametmp(nq))
     851           nametmp(1:nq)=tname(1:nq)
     852           call inichim_1D(nq, q, qsurf, psurf, 0, 0)
     853           tname(1:nq)=nametmp(1:nq)
     854           noms(1:nq)=nametmp(1:nq)
     855      endif ! tracer and photochem
    840856
    841857
Note: See TracChangeset for help on using the changeset viewer.