Changeset 3451 for trunk/LMDZ.VENUS


Ignore:
Timestamp:
Oct 7, 2024, 3:37:34 PM (7 weeks ago)
Author:
emillour
Message:

Venus PCM:
Add "Age of Air" scheme from Maureen Cohen.
Activated with flag "ok_aoa=y" and requires that there is also
an "aoa" tracer in traceur.def
MC

Location:
trunk/LMDZ.VENUS
Files:
1 added
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.VENUS/deftank/field_def_physics.xml

    r3260 r3451  
    281281                   long_name="Kinetic Energy net flux"
    282282                   unit="W/m2" />
     283           <!---- TRACERS ---->
     284            <field id="age"
     285                   long_name="Age of air"
     286                   unit="s" />
     287            <field id="aoa"
     288                   long_name="Age of air tracer"
     289                   unit="kg/kg" />
     290           <!---- CHEMISTRY TRACERS ---->
    283291            <field id="co2"
    284292                   long_name="CO2"
  • trunk/LMDZ.VENUS/deftank/physiq.def

    r3191 r3451  
    4141# Reinitialization of tracer abundances
    4242reinit_trac=n
     43#
     44# Parameters for Age of air
     45##~~~~~~~~~~~~~~~~~~~~~~~~~
     46# Compute age of air (requires that there is an "aoa" tracer; default: n)
     47ok_aoa=n
     48# Reinitialize age of air tracer (default: y)
     49reinit_aoa=n
     50# Emission altitude (in model layers) of aoa tracer emission (default: 1)
     51lev_aoa=1
    4352#
    4453# parameters for chemistry and microphysics
  • trunk/LMDZ.VENUS/libf/phyvenus/conf_phys.F90

    r3035 r3451  
    1010   use print_control_mod, only: lunout
    1111   use IOIPSL, only: getin
     12   use age_of_air_mod, only: ok_aoa, reinit_aoa, lev_aoa
    1213
    1314   implicit none
     
    318319  call getin('tr_scheme',tr_scheme)
    319320
     321!Config Key = ok_aoa
     322!Config Desc = Flag to run age of air subroutine
     323!Config Def = .false.
     324  ok_aoa=.false.
     325  call getin('ok_aoa',ok_aoa)
     326
     327!Config Key = reinit_aoa
     328!Config Desc = Flag to reinitiate age of air array to 0
     329!Config Def = .true.
     330  reinit_aoa=.true.
     331  call getin('reinit_aoa',reinit_aoa)
     332 
     333!Config Key = lev_aoa
     334!Config Desc = Model level where tracer associated with age of air is released
     335!Config Def = 1 (surface)
     336  lev_aoa=1
     337  call getin('lev_aoa',lev_aoa)
     338
    320339!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    321340!   PARAMETRES DE LA CHIMIE/NUAGE dans physiq.def
     
    369388    stop
    370389  endif
     390
     391
     392! Check that chemistry and age of air flages are not both active
     393  if ((ok_chem) .and. (ok_aoa)) then
     394     write(*,*) "Chemistry and age of air cannot be run together"
     395     write(*,*) "ok_chem=",ok_chem," / ok_aoa=",ok_aoa
     396     stop
     397  endif
     398
     399
    371400
    372401!
     
    566595  write(lunout,*)' Inclinaison =',R_incl
    567596  write(lunout,*)' tr_scheme = ', tr_scheme
     597  write(lunout,*)' ok_aoa = ', ok_aoa
     598  write(lunout,*)' reinit_aoa = ', reinit_aoa
     599  write(lunout,*)' lev_aoa = ', lev_aoa
    568600  write(lunout,*)' iflag_pbl = ', iflag_pbl
    569601  write(lunout,*)' z0 = ',z0
  • trunk/LMDZ.VENUS/libf/phyvenus/ini_histmth.h

    r1667 r3451  
    109109c    .                "ave(X)", zsto,zout)
    110110
     111       IF ((iflag_trac.eq.1) .and. ok_aoa) THEN
     112         CALL histdef(nid_mth, "age", "Age of air", "s",
     113     .                nbp_lon,jj_nb,nhori, klev,1,klev,nvert, 32,
     114     .                "ave(X)", zsto,zout)
     115       ENDIF
    111116
    112117c plusieurs traceurs  !!!outputs in [vmr]
  • trunk/LMDZ.VENUS/libf/phyvenus/phyetat0.F90

    r2580 r3451  
    351351ELSE
    352352  ancien_ok=.false.
     353ENDIF
     354
     355IF (startphy_file) THEN
     356  CALL get_field("age",age,found)
     357  IF (.not.found) THEN
     358    PRINT*, "phyetat0: Age of air is missing"
     359    PRINT*, "Reinitialising age of air to 0"
     360    age(:,:) = 0.
     361  ENDIF
     362ELSE
     363  age(:,:) = 0.
    353364ENDIF
    354365
  • trunk/LMDZ.VENUS/libf/phyvenus/phyredem.F90

    r2580 r3451  
    1515  use nonoro_gwd_ran_mod, only: du_nonoro_gwd, dv_nonoro_gwd, &
    1616                                east_gwstress, west_gwstress
    17 
    18       implicit none
     17  use age_of_air_mod, only: ok_aoa
     18  implicit none
    1919!======================================================================
    2020! Auteur(s) Z.X. Li (LMD/CNRS) date: 19930818
     
    109109endif
    110110
     111if (ok_aoa) then
     112   call put_field("age","Age of air",age)
     113endif
     114
    111115! close file
    112116
  • trunk/LMDZ.VENUS/libf/phyvenus/phys_state_var_mod.F90

    r2580 r3451  
    117117      REAL,save,allocatable :: fder(:) ! Derive de flux (sensible et latente)
    118118!$OMP THREADPRIVATE(dlw,fder)
     119      REAL, ALLOCATABLE, SAVE :: age(:,:) ! Age of air (s)
     120!$OMP THREADPRIVATE(age)
     121
    119122CONTAINS
    120123
     
    171174      ALLOCATE(topsw0(klon),toplw0(klon),solsw0(klon),sollw0(klon))
    172175      ALLOCATE(dlw(klon), fder(klon))
     176      ALLOCATE(age(klon,klev))
    173177
    174178      ! allocate turb_mod module variables
     
    212216      deallocate(topsw0,toplw0,solsw0,sollw0)
    213217      deallocate(dlw, fder)
     218      deallocate(age)
    214219
    215220      ! deallocate turb_mod module variables
  • trunk/LMDZ.VENUS/libf/phyvenus/physiq_mod.F

    r3323 r3451  
    6868      USE cpdet_phy_mod, only: cpdet, t2tpot
    6969      USE chemparam_mod
     70      USE age_of_air_mod, ONLY: ok_aoa, reinit_aoa, i_aoa, init_age
     71      USE age_of_air_mod, ONLY: aoa_ini, age_of_air
    7072      USE conc
    7173      USE param_v4_h
     
    454456     
    455457c======================================================================
    456 c PREMIER APPEL SEULEMENT
     458c DONE ONLY AT FIRST CALL
    457459c========================
    458       IF (debut) THEN
     460      IF (debut) THEN         
    459461         allocate(source(klon,nqmax))
    460462         allocate(prod_tr(klon,klev,nqmax))
     
    473475
    474476         IF (if_ebil.ge.1) d_h_vcol_phy=0.
    475 c
    476 c appel a la lecture du physiq.def
    477 c
     477!
     478! load flag and parameter values from physiq.def
     479!
    478480         call conf_phys(ok_journe, ok_mensuel,
    479481     .                  ok_instan,
     
    743745      end if
    744746         
     747      if ((iflag_trac.eq.1) .and. ok_aoa) then
     748          write(lunout,*) 'Initialising age of air subroutine'
     749          allocate(init_age(klon,klev))
     750          call aoa_ini(ok_chem, tr_scheme) ! get index of age of air tracer in the tracer array
     751          if (reinit_aoa) then
     752            age(:,:) = 0. ! Set initial value of age of air to 0 everywhere
     753            tr_seri(:,:,i_aoa) = 1e-30 ! Set initial value of tracer to tiny everywhere
     754          endif ! reinitialisation loop
     755          init_age(:,:) = age(:,:) !  save initial value of age, either read in from restartphy or set to 0
     756      endif ! age of air initialisation
     757
    745758!     initialise cloud parameters (for cl_scheme = 1)
    746759
     
    10301043
    10311044      if (iflag_trac.eq.1) then
     1045
     1046        if ( ok_aoa ) then
     1047            call age_of_air(tr_seri(:,:,i_aoa),klon,klev,
     1048     I                   itap,pdtphys,init_age,
     1049     O                   age)
     1050        end if
     1051
    10321052!====================================================================
    10331053! Case 1: pseudo-chemistry with relaxation toward fixed profile
     
    21482168      if (iflag_trac == 1) then
    21492169
     2170         if (ok_aoa) then
     2171            call send_xios_field("age",age)
     2172            call send_xios_field("aoa",tr_seri(:,:,i_aoa))
     2173         endif
     2174
    21502175! production and destruction rate, cm-3.s-1
    21512176! Beware of the context*.xml file !!
  • trunk/LMDZ.VENUS/libf/phyvenus/write_histmth.h

    r2560 r3451  
    4848      call histwrite_phy(nid_mth,.false.,"mmean",itau_w,mmean)
    4949c     call histwrite_phy(nid_mth,.false.,"rho",itau_w,rho)
     50      IF ((iflag_trac.eq.1) .and. ok_aoa) THEN
     51        call histwrite_phy(nid_mth,.false.,"age",itau_w,age)
     52      ENDIF
    5053
    5154c plusieurs traceurs  !!!outputs in [vmr]
Note: See TracChangeset for help on using the changeset viewer.