Changeset 3299 for trunk


Ignore:
Timestamp:
Apr 12, 2024, 4:48:27 PM (8 months ago)
Author:
emillour
Message:

Generic PCM:

  • add some auxiliary functions in module tracer_h.F90: is_known_tracer(tname) returns ".true." if "tname" is a known tracer tracer_index(tname) returns the tracer index of tracer "tname"
  • add the possibility of "volcanic outgasing" as point sources. controled by a "callvolcano" flag (default .false.) details about source location and injection details (frequency, length) need be provided in a "volcano.def" ASCII file read at runtime. (see routine "read_volcano" in volcano.F90)

AB+EM

Location:
trunk/LMDZ.GENERIC
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.GENERIC/changelog.txt

    r3291 r3299  
    18961896- improvement of parameterization of sea ice albedo vs sea ice thickness in hydrol+photolysis_online
    18971897(when ok_slab_ocean activated)
     1898
     1899== 12/04/2024 == AB + EM
     1900- add some auxiliary functions in module tracer_h.F90:
     1901  is_known_tracer(tname) returns ".true." if "tname" is a known tracer
     1902  tracer_index(tname) returns the tracer index of tracer "tname"
     1903- add the possibility of "volcanic outgasing" as point sources.
     1904 controled by a "callvolcano" flag (default .false.)
     1905 details about source location and injection details (frequency, length)
     1906 need be provided in a "volcano.def" ASCII file read at runtime.
     1907 (see routine "read_volcano" in volcano.F90)
  • trunk/LMDZ.GENERIC/libf/phystd/callkeys_mod.F90

    r3283 r3299  
    66      logical,save :: calladj,calltherm,co2cond,callsoil
    77!$OMP THREADPRIVATE(calladj,calltherm,co2cond,callsoil)
     8
     9      ! do we have volcanoes (injecting tracers in atmosphere) ?
     10      logical,save :: callvolcano
     11!$OMP THREADPRIVATE(callvolcano)
     12
    813      logical,save :: season,diurnal,tlocked,rings_shadow,lwrite
    914!$OMP THREADPRIVATE(season,diurnal,tlocked,rings_shadow,lwrite)
  • trunk/LMDZ.GENERIC/libf/phystd/inifis_mod.F90

    r3279 r3299  
    503503!       ": ok_slab_heat_transp = ",ok_slab_heat_transp
    504504
     505! Volcanoes (as point sources of tracers)
     506      if (is_master) write(*,*) trim(rname)//": Erupt volcano ?"
     507      callvolcano=.false. ! default value
     508      call getin_p("callvolcano",callvolcano)
     509      if (is_master) write(*,*) trim(rname)//": callvolcano = ",callvolcano
     510     
     511      ! Sanity check: volcano requires tracers
     512      if (callvolcano.and.(.not.tracer)) then
     513        call abort_physic(rname,&
     514             " Error: volcano option requires using tracers",1)
     515      endif
     516
    505517! Photochemistry and chemistry in the thermosphere
    506518
  • trunk/LMDZ.GENERIC/libf/phystd/physiq_mod.F90

    r3294 r3299  
    6666                              ok_slab_ocean, photochem, rings_shadow, rmean, &
    6767                              season, sedimentation,generic_condensation, &
    68                               specOLR, callthermos, &
     68                              specOLR, callthermos, callvolcano, &
    6969                              startphy_file, testradtimes, tlocked, &
    7070                              tracer, UseTurbDiff, water, watercond, &
     
    7777      use phys_state_var_mod
    7878      use callcorrk_mod, only: callcorrk
    79       use conduction_mod
     79      use conduction_mod, only: conduction
     80      use volcano_mod, only: volcano
    8081      use pindex_mod, only: pindex
    8182      use vdifc_mod, only: vdifc
     
    358359      REAL,allocatable,save :: zdqschim(:,:)  ! Calchim_asis routine
    359360!$OMP THREADPRIVATE(zdqchim,zdqschim)
     361      real zdqvolc(ngrid,nlayer,nq) ! injection by volcanoes (kg/kg_of_air/s)
    360362
    361363      REAL array_zero1(ngrid)
     
    14811483      if (tracer) then
    14821484
     1485  ! -----------------------------------------------------
     1486  !   VI.0. Volcanoes injecting tracers in the atmosphere
     1487  ! -----------------------------------------------------
     1488        if (callvolcano) then
     1489          call volcano(ngrid,nlayer,pplev,pu,pv,pt,zzlev,zdqvolc,nq,massarea,&
     1490                       zday,ptimestep)
     1491          pdq(1:ngrid,1:nlayer,1:nq) = pdq(1:ngrid,1:nlayer,1:nq) + &
     1492                                       zdqvolc(1:ngrid,1:nlayer,1:nq)
     1493        endif
     1494
    14831495  ! ---------------------
    14841496  !   VI.1. Water and ice
  • trunk/LMDZ.GENERIC/libf/phystd/tracer_h.F90

    r3101 r3299  
    115115       !$OMP igcm_c2h3,igcm_c2h4,igcm_c2h6,igcm_ch2co,igcm_ch3co,igcm_hcaer)
    116116
     117       contains
     118       
     119       ! some basic auxiliary functions for tracers
     120       
     121       logical function is_known_tracer(tracer_name)
     122         ! checks if tracer_name is a know tracer
     123         ! returns .true. if yes and .false. otherwise
     124         implicit none
     125         character(len=*),intent(in) :: tracer_name
     126         integer :: iq
     127         ! initialization
     128         is_known_tracer=.false.
     129         do iq=1,nqtot
     130           if( trim(tracer_name) == trim(noms(iq)) ) then
     131             is_known_tracer=.true.
     132             exit
     133           endif
     134         enddo
     135       end function is_known_tracer
     136       
     137       integer function tracer_index(tracer_name)
     138         ! gets the index of the tracer tracer_name
     139         ! returns index or 0 if unknown tracer
     140         implicit none
     141         character(len=*),intent(in) :: tracer_name
     142         integer :: iq
     143         ! initialization
     144         tracer_index=0
     145         do iq=1,nqtot
     146           if( trim(tracer_name) == trim(noms(iq)) ) then
     147             tracer_index=iq
     148             exit
     149           endif
     150         enddo
     151       end function tracer_index
     152       
    117153       end module tracer_h
    118154
Note: See TracChangeset for help on using the changeset viewer.