Changeset 460 for trunk


Ignore:
Timestamp:
Dec 8, 2011, 11:22:59 AM (13 years ago)
Author:
emillour
Message:

Mars GCM: more updates for photochemistry:
-aeronomars/inichim_newstart.F : add methane + bug correction in "oldnames" case
-aeronomars/read_phototable.F : adapt routine so that photolysis table file

name may be set in the def file with
phototable = filename
(default is "jmars.20111014")

EM

Location:
trunk/LMDZ.MARS
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.MARS/README

    r459 r460  
    13171317                     and rice.
    13181318 
     1319== 08/12/2011 == EM
     1320>> more updates for photochemistry:
     1321-aeronomars/inichim_newstart.F : add methane + bug correction in "oldnames" case
     1322-aeronomars/read_phototable.F : adapt routine so that photolysis table file
     1323                                name may be set in the def file with
     1324                                phototable = filename
     1325                                (default is "jmars.20111014")
     1326
  • trunk/LMDZ.MARS/libf/aeronomars/inichim_newstart.F

    r164 r460  
    1515c   Author:   Sebastien Lebonnois (08/11/2002)
    1616c   -------
    17 c Revised 07/2003 by Monica Angelats-i-Coll to use input files
    18 c Modified 10/2008 Identify tracers by their names Ehouarn Millour
     17c   Revised 07/2003 by Monica Angelats-i-Coll to use input files
     18c   Modified 10/2008 Identify tracers by their names Ehouarn Millour
     19c   Modified 11/2011 Addition of methane (Franck Lefevre)
    1920c
    2021c   Arguments:
     
    150151          end if
    151152        endif ! of if (photochem .or. callthermos)
    152         do iq=nqchem_start,nqchem_start+ncomp-1
     153        do iq=nqchem_start,nqchem_start+ncomp-2
    153154          noms(iq)=nomchem(iq-nqchem_start+1)
    154155          mmol(iq)=mmolchem(iq-nqchem_start+1)
     
    260261      igcm_ho2=0
    261262      igcm_h2o2=0
     263      igcm_ch4=0
    262264      igcm_n2=0
    263265      igcm_ar=0
     
    358360          nbqchem=nbqchem+1
    359361        endif
     362        if (noms(iq).eq."ch4") then
     363          igcm_ch4=iq
     364          mmol(igcm_ch4)=16.
     365          count=count+1
     366          nbqchem=nbqchem+1
     367        endif
    360368        if (noms(iq).eq."n2") then
    361369          igcm_n2=iq
     
    408416      ! as in the old days, water vapour is last and water ice,
    409417      ! if present, is just before water vapour
    410       do iq=1,15 ! loop so as to avoid out-of-bounds on array
     418      do iq=1,16 ! loop so as to avoid out-of-bounds on array
    411419      if (iq==1) nqchem(i)=igcm_co2
    412420      if (iq==2) nqchem(i)=igcm_co
     
    420428      if (iq==10) nqchem(i)=igcm_ho2
    421429      if (iq==11) nqchem(i)=igcm_h2o2
    422       if (iq==12) nqchem(i)=igcm_n2
    423       if (iq==13) nqchem(i)=igcm_ar
    424       if (iq==14) nqchem(i)=igcm_h2o_ice
    425       if (iq==15) nqchem(i)=igcm_h2o_vap
     430      if (iq==12) nqchem(i)=igcm_ch4
     431      if (iq==13) nqchem(i)=igcm_n2
     432      if (iq==14) nqchem(i)=igcm_ar
     433      if (iq==15) nqchem(i)=igcm_h2o_ice
     434      if (iq==16) nqchem(i)=igcm_h2o_vap
    426435      enddo
    427436
  • trunk/LMDZ.MARS/libf/aeronomars/read_phototable.F

    r334 r460  
    1919cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
    2020c
     21! to use  'getin'
     22      USE ioipsl_getincom
     23
    2124      implicit none
    2225c
     
    3235c
    3336      real xsza
     37      character(len=128) :: phototable ! photolysis table file name
    3438c
    3539cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
    3640c
     41! set photolysis table input file name
     42      phototable="jmars.20111014" ! default
     43      ! look for a " phototable= ..." option in def files
     44      call getin("phototable",phototable)
     45
    3746      fic = 81
    3847
    3948      open(fic, form = 'formatted', status = 'old',
    40      &file =trim(datafile)//'/jmars.20101220',iostat=ierr)
     49     &file =trim(datafile)//trim(phototable),iostat=ierr)
    4150
    4251      IF (ierr.NE.0) THEN
    43         write(*,*)'Error : cannot open photolysis lookup table'
     52        write(*,*)'Error : cannot open photolysis lookup table ',
     53     &             trim(phototable)
    4454        write(*,*)'(in aeronomars/init_chemistry.F)'
    4555        write(*,*)'It should be in :',trim(datafile),'/'
    46         write(*,*)'1) You can change this directory address in '
    47         write(*,*)'   file phymars/datafile.h'
     56        write(*,*)'1) You can change this directory path in physiq.def'
     57        write(*,*)'   with:'
     58        write(*,*)'   datadir=/path/to/the/directory'
     59        write(*,*)'2) You can change the input phototable file name in'
     60        write(*,*)'   physiq.def with:'
     61        write(*,*)'   phototable=filename'
    4862        STOP
    4963      ENDIF
    5064
    5165c
    52       print*, 'read photolysis lookup table...'
     66      print*, 'read photolysis lookup table ',trim(phototable)
    5367c
    5468      do itau = 1,ntau
Note: See TracChangeset for help on using the changeset viewer.