Changeset 3462 for trunk/LMDZ.MARS


Ignore:
Timestamp:
Oct 17, 2024, 5:48:37 PM (5 weeks ago)
Author:
flefevre
Message:

Mars PCM: reverting photochemistry to clean version 3288

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.MARS/libf/aeronomars/photochemistry.F90

    r3290 r3462  
    161161!integer,parameter :: i_hdo2    = 38
    162162
    163 integer, save :: i_last
    164 !$OMP THREADPRIVATE(i_last)
     163integer :: i_last
     164
    165165!Tracer indexes for photionization coeffs
    166166
     
    180180
    181181integer :: ilay
    182 integer, save :: ind_norec
    183 integer, save :: ind_orec
    184 !$OMP THREADPRIVATE(ind_norec, ind_orec)
     182integer :: ind_norec
     183integer :: ind_orec
     184
    185185real :: ctimestep           ! standard timestep for the chemistry (s)
    186186real :: dt_guess            ! first-guess timestep (s)
     
    503503em_no(:)=c(:,i_o)*c(:,i_n)*v_4(:,ind_norec)   !2.8e-17*(300./temp(:)))**0.5
    504504em_o2(:)=0.75*c(:,i_o)*c(:,i_o)*c(:,i_co2)*v_3(:,ind_orec)   !2.5*9.46e-34*exp(485./temp(:))*dens(:)
    505 !print*, "ind_norec= ", ind_norec
    506 !print*, "ind_orec= ", ind_orec
     505
    507506!===================================================================
    508507!     save chemical species for the gcm       
     
    660659
    661660use comcstfi_h
    662 !use photolysis_mod, only : nphot
     661use photolysis_mod, only : nphot
    663662
    664663implicit none
     
    676675logical, intent(in)     :: deutchem
    677676integer                 :: lswitch           ! interface level between lower
    678 integer,parameter :: nphot0 =13
    679677                                             ! atmosphere and thermosphere chemistries
    680678real, dimension(nlayer) :: dens              ! total number density (molecule.cm-3)
     
    697695real (kind = 8), dimension(nlayer,nb_reaction_3_max) :: v_3
    698696real (kind = 8), dimension(nlayer,nb_reaction_4_max) :: v_4
    699 integer, intent(out) :: ind_norec
    700 integer, intent(out) :: ind_orec
     697integer :: ind_norec
     698integer :: ind_orec
    701699
    702700!----------------------------------------------------------------------
     
    705703
    706704integer          :: ilev
    707 integer, save    :: nb_phot, nb_reaction_3, nb_reaction_4
    708 !$OMP THREADPRIVATE(nb_phot, nb_reaction_3, nb_reaction_4)
     705integer          :: nb_phot, nb_reaction_3, nb_reaction_4
    709706real :: ak0, ak1, xpo, rate, rate1, rate2
    710707real :: k1a0, k1b0, k1ainf, k1a, k1b, fc, fx, x, y, gam
     
    740737!     initialisation
    741738!----------------------------------------------------------------------
    742       nb_phot       = 0
    743       nb_phot       = nphot0 + nphotion ! initialised to the number of photolysis + number of photoionization rates
     739
     740      nb_phot       = nphot + nphotion ! initialised to the number of photolysis + number of photoionization rates
    744741      nb_reaction_3 = 0
    745742      nb_reaction_4 = 0
     
    779776      v_3(:,nb_reaction_3) = a002(:)
    780777      ind_orec=nb_reaction_3
    781 !      print*,"ind_orec",ind_orec
     778
    782779!---  a003: o + o3 -> o2 + o2
    783780
     
    12031200      v_4(:,nb_reaction_4) = d007(:)
    12041201      ind_norec = nb_reaction_4
    1205 !      print*,"ind_norec=",ind_norec
     1202
    12061203!---  d008: n + ho2 -> no + oh
    12071204
     
    24612458! local
    24622459
    2463 integer, save :: nb_phot, nb_reaction_3, nb_reaction_4
    2464 !$OMP THREADPRIVATE(nb_phot, nb_reaction_3, nb_reaction_4)
     2460integer :: nb_phot, nb_reaction_3, nb_reaction_4
    24652461integer :: i_dummy
    24662462
Note: See TracChangeset for help on using the changeset viewer.