Changeset 4080


Ignore:
Timestamp:
Feb 20, 2026, 11:39:45 AM (4 weeks ago)
Author:
streel
Message:

!!! Important : The microphysical scheme is still a work in progress, and I was trying to fix a bug prior this commit. Ehouarn is planning to review the tracers in the model and to facilitate his work I am now commiting an unfinished version of the microphysical scheme.
For users, the Aurélien Stolzenbach parametrization remains untouched with this commit, meaning that this commit will act as a transparent one for your current simulations. Thanks for your understanding. !!!

Patch note :

First deployment of the microphysical scheme.

Modifications of the Venus Physics

  • Removal of the old files / Addition of the new ones linked to the microphysical scheme in the cloud venus folder.
  • Modification of cles_phys_mod and conf_phys : Additions of the new keywords used by the microphysical scheme
  • Modification of chemparam_mod / phys_state_var_mod : Adding the new tracers and parameters used by the microphysical scheme.
  • Modification of phytrac_chimie : Adding the call to the microphysical scheme and computation of the tendencies.
  • Modification of physiq_mod : New sedimentation of the microphysical tracers replacing the older ones. Computation of the final mixing ratios of the microphysical tracers. Outputs of the new variables.

New definitions files for the simulations

  • New tracer_mic.def, traceur_ion_mic.def
  • Update of the differents physiq.def (with a new microphysical sub part)
  • Update of the xml files, with the new possible outputs

Miscellaneous

  • Fixed a typo in a comment in photolysis_mod

All the information related to the microphysical scheme will be sum-up and updated on the wiki page : https://lmdz-forge.lmd.jussieu.fr/mediawiki/Planets/index.php/Venus_PCM_-_Microphysical_scheme

NS

Location:
trunk/LMDZ.VENUS
Files:
18 added
11 deleted
14 edited

Legend:

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

    r3780 r4080  
    510510            <field id="o2_emis"
    511511                   long_name="Volume emission rate O2 emission"
    512                    unit="photons.cm-3.s-1" />
     512                    unit="photons.cm-3.s-1" />
     513            <field id="h2otot"
     514                   long_name="Total vmr of H2O"
     515                    unit="mol/mol" />
     516            <field id="h2so4tot"
     517                   long_name="Total vmr of H2SO4"
     518                    unit="mol/mol" />
    513519
    514        </field_group>
     520           <!---- MICROPHYSICS TRACERS ---->
     521            <field id="m0_aer"
     522                   long_name="Order 0 moment of the aerosols"
     523                    unit="m-3" />
     524            <field id="m0_mode1drop"
     525                   long_name="Order 0 moment of mode 1 droplets"
     526                    unit="m-3" />
     527            <field id="m0_mode1ccn"
     528                   long_name="Order 0 moment of mode 1 ccn"
     529                    unit="m-3" />
     530            <field id="m0_mode2drop"
     531                   long_name="Order 0 moment of mode 2 droplets"
     532                    unit="m-3" />
     533            <field id="m0_mode2ccn"
     534                   long_name="Order 0 moment of mode2 ccn"
     535                    unit="m-3" />
     536            <field id="m3_aer"
     537                   long_name="Order 3 moment of the aerosols"
     538                    unit="m-3/m-3" />
     539            <field id="m3_mode1sa"
     540                   long_name="Order 3 moment of mode 1 Sulfuric Acid"
     541                    unit="m-3/m-3" />
     542            <field id="m3_mode1wv"
     543                   long_name="Order 3 moment of mode 1 Water Vapor"
     544                    unit="m-3/m-3" />
     545            <field id="m3_mode1ccn"
     546                   long_name="Order 3 moment of mode 1 ccn"
     547                    unit="m-3/m-3" />
     548            <field id="m3_mode2sa"
     549                   long_name="Order 3 moment of mode 2 Sulfuric Acid"
     550                    unit="m-3/m-3" />
     551            <field id="m3_mode2wv"
     552                   long_name="Order 3 moment of mode 2 Water Vapor"
     553                    unit="m-3/m-3" />
     554            <field id="m3_mode2ccn"
     555                   long_name="Order 3 moment of mode 2 ccn"
     556                    unit="m-3/m-3" />
     557            <field id="r1"
     558                   long_name="Radius of mode 1 droplets"
     559                    unit="m" />
     560            <field id="r2"
     561                   long_name="Radius of mode 2 droplets"
     562                    unit="m" />
     563            <field id="RHtab"
     564                   long_name="Relative humidity of H2SO4"
     565                    unit="" />
     566            <field id="rhotab"
     567                   long_name="Density of droplets"
     568                    unit="kg/m3" />
     569            <field id="WSAVtab"
     570                   long_name="mass fraction of SA of droplets"
     571                    unit="" />
     572            <field id="dM0m1_hom"
     573                   long_name="Tendencie of the numb of drop by hom nuc"
     574                    unit="/m3" />
     575            <field id="dM3m1_hom_h2so4"
     576                   long_name="Tendencie of the volume of h2so4 by hom nuc"
     577                    unit="m3/m3" />
     578            <field id="dM3m1_hom_h2o"
     579                   long_name="Tendencie of the volume of h2o by hom nuc"
     580                    unit="m3/m3" />
     581            <field id="dM0m1_het"
     582                   long_name="Tendencie of the numb of drop by het nuc"
     583                    unit="/m3" />
     584            <field id="dM0m1_het_ccn"
     585                   long_name="Tendencie of the numb of ccn by het nuc"
     586                    unit="/m3" />
     587            <field id="dM3m1_het_ccn"
     588                   long_name="Tendencie of the volume of ccn by het nuc"
     589                    unit="m3/m3" />
     590            <field id="dM3m1_het_h2so4"
     591                   long_name="Tendencie of the volume of h2so4 by het nuc"
     592                    unit="m3/m3" />
     593            <field id="dM3m1_het_h2o"
     594                   long_name="Tendencie of the volume of h2o by het nuc"
     595                    unit="m3/m3" />
     596            <field id="dM0_het_aer"
     597                   long_name="Tendencie of the numb of aer by het nuc"
     598                    unit="/m3" />
     599            <field id="dM3_het_aer"
     600                   long_name="Tendencie of the volume of aer by het nuc"
     601                    unit="/m3" />
     602            <field id="dM3m1_cond_h2so4"
     603                   long_name="Tendencie of the volume of h2so4 by cond"
     604                    unit="/m3" />
     605            <field id="dM3m1_cond_h2o"
     606                   long_name="Tendencie of the volume of h2o by cond"
     607                    unit="/m3" />
     608            <field id="dM3m2_cond_h2so4"
     609                   long_name="Tendencie of the volume of h2so4 by cond"
     610                    unit="/m3" />
     611            <field id="dM3m2_cond_h2o"
     612                   long_name="Tendencie of the volume of h2o by cond"
     613                    unit="/m3" />
     614            <field id="dM0m1_coag"
     615                   long_name="Tendencie of the numb of drop by coag"
     616                    unit="/m3" />
     617            <field id="dM0m1_coag_ccn"
     618                   long_name="Tendencie of the numb of ccn by coag"
     619                    unit="/m3" />
     620            <field id="dM3m1_coag_ccn"
     621                   long_name="Tendencie of the volume of ccn by coag"
     622                    unit="m3/m3" />
     623            <field id="dM3m1_coag_h2so4"
     624                   long_name="Tendencie of the volume of h2so4 by coag"
     625                    unit="m3/m3" />
     626            <field id="dM3m1_coag_h2o"
     627                   long_name="Tendencie of the volume of h2o by coag"
     628                    unit="m3/m3" />
     629            <field id="dM0m2_coag"
     630                   long_name="Tendencie of the numb of drop by coag"
     631                    unit="/m3" />
     632            <field id="dM0m2_coag_ccn"
     633                   long_name="Tendencie of the numb of ccn by coag"
     634                    unit="/m3" />
     635            <field id="dM3m2_coag_ccn"
     636                   long_name="Tendencie of the volume of ccn by coag"
     637                    unit="m3/m3" />
     638            <field id="dM3m2_coag_h2so4"
     639                   long_name="Tendencie of the volume of h2so4 by coag"
     640                    unit="m3/m3" />
     641            <field id="dM3m2_coag_h2o"
     642                   long_name="Tendencie of the volume of h2o by coag"
     643                    unit="m3/m3" />
     644            <field id="dM0m1_merge"
     645                   long_name="Tendencie of the numb of drop by mode-merge"
     646                    unit="/m3" />
     647            <field id="dM0m1_merge_ccn"
     648                   long_name="Tendencie of the numb of ccn by mode-merge"
     649                    unit="/m3" />
     650            <field id="dM3m1_merge_ccn"
     651                   long_name="Tendencie of the volume of ccn by mode-merge"
     652                    unit="m3/m3" />
     653            <field id="dM3m1_merge_h2so4"
     654                   long_name="Tendencie of the volume of h2so4 by mode-merge"
     655                    unit="m3/m3" />
     656            <field id="dM3m1_merge_h2o"
     657                   long_name="Tendencie of the volume of h2o by mode-merge"
     658                    unit="m3/m3" />
     659            <field id="dM0m2_merge"
     660                   long_name="Tendencie of the numb of drop by mode-merge"
     661                    unit="/m3" />
     662            <field id="dM0m2_merge_ccn"
     663                   long_name="Tendencie of the numb of ccn by mode-merge"
     664                    unit="/m3" />
     665            <field id="dM3m2_merge_ccn"
     666                   long_name="Tendencie of the volume of ccn by mode-merge"
     667                    unit="m3/m3" />
     668            <field id="dM3m2_merge_h2so4"
     669                   long_name="Tendencie of the volume of h2so4 by mode-merge"
     670                    unit="m3/m3" />
     671            <field id="dM3m2_merge_h2o"
     672                   long_name="Tendencie of the volume of h2o by mode-merge"
     673                    unit="m3/m3" />
     674            <field id="satm1"
     675                   long_name="sat ratio of mode 1"
     676                    unit="" />
     677            <field id="satm2"
     678                   long_name="sat ratio of mode 2"
     679                    unit="" />
     680        </field_group>
    515681
    516682    </field_definition>
  • trunk/LMDZ.VENUS/deftank/physiq-96x96x50-chemistry.def

    r3191 r4080  
    6060ok_sedim=y
    6161nb_mode=3
     62#
     63# parameters for microphysics (cl_scheme = 2)
     64##~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     65#
     66# Verboose debug mode
     67debug_cloud = n
     68#Keys to calls the different microphysics processes or not
     69mode_merging = y
     70hom_nuclea = y
     71het_nuclea = y
     72cond_evap = y
     73coag = y
     74#
     75# Regarding the mode 1 and 2 size distributions
     76sigma_mode1 = 1.56
     77sigma_mode2 = 1.29
     78#
     79# Aerosol production (precursors off the droplets)
     80prod_aer = y
     81#Characteristics of the size distribution of the aer
     82rad_aer = 0.125e-6
     83sigma_aer = 1.56
     84rho_aer = 1800
     85# Vertical distribution and production rate
     86alt_aer = 62000
     87sigmaz_aer = 2000
     88tx_prod_aer = 1.D-10
    6289#
    6390# parameters for the boundary layer
  • trunk/LMDZ.VENUS/deftank/physiq-96x96x78-chemistry.def

    r3191 r4080  
    6060ok_sedim=y
    6161nb_mode=3
     62#
     63# parameters for microphysics (cl_scheme = 2)
     64##~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     65#
     66# Verboose debug mode
     67debug_cloud = n
     68#Keys to calls the different microphysics processes or not
     69mode_merging = y
     70hom_nuclea = y
     71het_nuclea = y
     72cond_evap = y
     73coag = y
     74#
     75# Regarding the mode 1 and 2 size distributions
     76sigma_mode1 = 1.56
     77sigma_mode2 = 1.29
     78#
     79# Aerosol production (precursors off the droplets)
     80prod_aer = y
     81#Characteristics of the size distribution of the aer
     82rad_aer = 0.125e-6
     83sigma_aer = 1.56
     84rho_aer = 1800
     85# Vertical distribution and production rate
     86alt_aer = 62000
     87sigmaz_aer = 2000
     88tx_prod_aer = 1.D-10
    6289#
    6390# parameters for the boundary layer
  • trunk/LMDZ.VENUS/deftank/physiq-96x96x90-chemistry-IONOSPHERE-IONDIFF.def

    r3776 r4080  
    6060ok_sedim=y
    6161nb_mode=3
     62# Verboose microphysical model
     63debug_cloud=n
    6264#
    6365# parameters for the boundary layer
  • trunk/LMDZ.VENUS/deftank/physiq-96x96x90-chemistry.def

    r3191 r4080  
    6060ok_sedim=y
    6161nb_mode=3
     62#
     63# parameters for microphysics (cl_scheme = 2)
     64##~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     65#
     66# Verboose debug mode
     67debug_cloud = n
     68#Keys to calls the different microphysics processes or not
     69mode_merging = y
     70hom_nuclea = y
     71het_nuclea = y
     72cond_evap = y
     73coag = y
     74#
     75# Regarding the mode 1 and 2 size distributions
     76sigma_mode1 = 1.56
     77sigma_mode2 = 1.29
     78#
     79# Aerosol production (precursors off the droplets)
     80prod_aer = y
     81#Characteristics of the size distribution of the aer
     82rad_aer = 0.125e-6
     83sigma_aer = 1.56
     84rho_aer = 1800
     85# Vertical distribution and production rate
     86alt_aer = 62000
     87sigmaz_aer = 2000
     88tx_prod_aer = 1.D-10
    6289#
    6390# parameters for the boundary layer
  • trunk/LMDZ.VENUS/deftank/physiq.def

    r3451 r4080  
    6565ok_sedim=n
    6666nb_mode=3
     67#
     68# parameters for microphysics (cl_scheme = 2)
     69##~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     70#
     71# Verboose debug mode
     72debug_cloud = n
     73#Keys to calls the different microphysics processes or not
     74mode_merging = y
     75hom_nuclea = y
     76het_nuclea = y
     77cond_evap = y
     78coag = y
     79#
     80# Regarding the mode 1 and 2 size distributions
     81sigma_mode1 = 1.56
     82sigma_mode2 = 1.29
     83#
     84# Aerosol production (precursors off the droplets)
     85prod_aer = y
     86#Characteristics of the size distribution of the aer
     87rad_aer = 0.125e-6
     88sigma_aer = 1.56
     89rho_aer = 1800
     90# Vertical distribution and production rate
     91alt_aer = 62000
     92sigmaz_aer = 2000
     93tx_prod_aer = 1.D-10
    6794#
    6895# parameters for the boundary layer
  • trunk/LMDZ.VENUS/deftank/traceur-chemcld.def

    r3780 r4080  
    1 48
     155
    2210 10 co2
    3310 10 co
     
    363610 10 oscl
    373710 10 n2
    38 10 10 M0_aer
    39 10 10 M3_aer
    40 10 10 M0_m1drop
    41 10 10 M0_m1ccn
    42 10 10 M3_m1sa
    43 10 10 M3_m1w
    44 10 10 M3_m1ccn
    45 10 10 M0_m2drop
    46 10 10 M0_m2ccn
    47 10 10 M3_m2sa
    48 10 10 M3_m2w
    49 10 10 M3_m2ccn
     3810 10 he
     3910 10 no2
     4010 10 no
     4110 10 n
     4210 10 n2d
     4310 10 h2oliq
     4410 10 h2so4liq
     4510 10 m0_aer
     4610 10 m3_aer
     4710 10 m0_mode1drop
     4810 10 m0_mode1ccn
     4910 10 m3_mode1sa
     5010 10 m3_mode1wv
     5110 10 m3_mode1ccn
     5210 10 m0_mode2drop
     5310 10 m0_mode2ccn
     5410 10 m3_mode2sa
     5510 10 m3_mode2wv
     5610 10 m3_mode2ccn
  • trunk/LMDZ.VENUS/libf/phyvenus/chemparam_mod.F90

    r3841 r4080  
    3232integer, save :: i_m0_aer, i_m3_aer,                       &
    3333                 i_m0_mode1drop, i_m0_mode1ccn,            &
    34                  i_m3_mode1sa, i_m3_mode1w, i_m3_mode1ccn, &
     34                 i_m3_mode1sa, i_m3_mode1wv, i_m3_mode1ccn, &
    3535                 i_m0_mode2drop, i_m0_mode2ccn,            &
    36                  i_m3_mode2sa, i_m3_mode2w, i_m3_mode2ccn
     36                 i_m3_mode2sa, i_m3_mode2wv, i_m3_mode2ccn
    3737
    3838integer, save :: nmicro  ! number of species in the liquid phase
     39INTEGER, SAVE :: nliq    ! number of liquid tracers
     40INTEGER, SAVE :: nmoment ! number of moment tracers
    3941
    4042real, dimension(:), save, allocatable :: m_tr           ! molecular mass of tracers
     
    15751577      i_h2oliq   = 0
    15761578      i_h2so4liq = 0
     1579
     1580      ! MICROPHYSICAL TRACERS FOR CL_SCHEME=2
     1581      i_m0_mode1drop = 0
     1582      i_m0_mode1ccn  = 0
     1583      i_m0_mode2drop = 0
     1584      i_m0_mode2ccn  = 0
     1585      i_m3_mode1sa   = 0
     1586      i_m3_mode1wv   = 0
     1587      i_m3_mode1ccn  = 0
     1588      i_m3_mode2sa   = 0
     1589      i_m3_mode2wv   = 0
     1590      i_m3_mode2ccn  = 0
     1591      i_m0_aer       = 0
     1592      i_m3_aer       = 0
    15771593
    15781594      do i = 1,nqtot
     
    18841900               i_m0_aer = i
    18851901               print*,'m0_aer',i_m0_aer
    1886                type_tr(i_m0_aer) = 10
     1902               type_tr(i_m0_aer) = 4
    18871903            case('m3_aer')
    18881904               i_m3_aer = i
    18891905               print*,'m3_aer',i_m3_aer
    1890                type_tr(i_m3_aer) = 10
    1891             case('m0_m1drop')
     1906               type_tr(i_m3_aer) = 4
     1907            case('m0_mode1drop')
    18921908               i_m0_mode1drop = i
    1893                print*,'m0_m1drop',i_m0_mode1drop
    1894                type_tr(i_m0_mode1drop) = 10
    1895             case('m0_m1ccn')
     1909               print*,'m0_mode1drop',i_m0_mode1drop
     1910               type_tr(i_m0_mode1drop) = 4
     1911            case('m0_mode1ccn')
    18961912               i_m0_mode1ccn = i
    1897                print*,'m0_m1ccn',i_m0_mode1ccn
    1898                type_tr(i_m0_mode1ccn) = 10
    1899             case('m3_m1sa')
     1913               print*,'m0_mode1ccn',i_m0_mode1ccn
     1914               type_tr(i_m0_mode1ccn) = 4
     1915            case('m3_mode1sa')
    19001916               i_m3_mode1sa = i
    1901                print*,'m3_m1sa',i_m3_mode1sa
    1902                type_tr(i_m3_mode1sa) = 10
    1903             case('m3_m1w')
    1904                i_m3_mode1w = i
    1905                print*,'m3_m1w',i_m3_mode1w
    1906                type_tr(i_m3_mode1w) = 10
    1907             case('m3_m1ccn')
     1917               print*,'m3_mode1sa',i_m3_mode1sa
     1918               type_tr(i_m3_mode1sa) = 4
     1919            case('m3_mode1wv')
     1920               i_m3_mode1wv = i
     1921               print*,'m3_mode1wv',i_m3_mode1wv
     1922               type_tr(i_m3_mode1wv) = 4
     1923            case('m3_mode1ccn')
    19081924               i_m3_mode1ccn = i
    1909                print*,'m3_m1ccn',i_m3_mode1ccn
    1910                type_tr(i_m3_mode1ccn) = 10
    1911             case('m0_m2drop')
     1925               print*,'m3_mode1ccn',i_m3_mode1ccn
     1926               type_tr(i_m3_mode1ccn) = 4
     1927            case('m0_mode2drop')
    19121928               i_m0_mode2drop = i
    1913                print*,'m0_m2drop',i_m0_mode2drop
    1914                type_tr(i_m0_mode2drop) = 10
    1915             case('m0_m2ccn')
     1929               print*,'m0_mode2drop',i_m0_mode2drop
     1930               type_tr(i_m0_mode2drop) = 4
     1931            case('m0_mode2ccn')
    19161932               i_m0_mode2ccn = i
    1917                print*,'m0_m2ccn',i_m0_mode2ccn
    1918                type_tr(i_m0_mode2ccn) = 10
    1919             case('m3_m2sa')
     1933               print*,'m0_mode2ccn',i_m0_mode2ccn
     1934               type_tr(i_m0_mode2ccn) = 4
     1935            case('m3_mode2sa')
    19201936               i_m3_mode2sa = i
    1921                print*,'m3_m2sa',i_m3_mode2sa
    1922                type_tr(i_m3_mode2sa) = 10
    1923             case('m3_m2w')
    1924                i_m3_mode2w = i
    1925                print*,'m3_m2w',i_m3_mode2w
    1926                type_tr(i_m3_mode2w) = 10
    1927             case('m3_m2ccn')
     1937               print*,'m3_mode2sa',i_m3_mode2sa
     1938               type_tr(i_m3_mode2sa) = 4
     1939            case('m3_mode2wv')
     1940               i_m3_mode2wv = i
     1941               print*,'m3_mode2wv',i_m3_mode2wv
     1942               type_tr(i_m3_mode2wv) = 4
     1943            case('m3_mode2ccn')
    19281944               i_m3_mode2ccn = i
    1929                print*,'m3_m2ccn',i_m3_mode2ccn
    1930                type_tr(i_m3_mode2ccn) = 10
     1945               print*,'m3_mode2ccn',i_m3_mode2ccn
     1946               type_tr(i_m3_mode2ccn) = 4
    19311947         end select
    19321948      end do
     
    19341950  end subroutine chemparam_ini
    19351951
    1936 !============================================================================
    1937 
    1938   subroutine vapors4muphy_ini(nlon,nlev,trac)
    1939 
    1940 !============================================================================
    1941 
    1942   use infotrac_phy, only: nqtot, tname
    1943 
    1944   integer :: nlon, nlev
    1945   real    :: trac(nlon,nlev,nqtot) ! traceur ( en vmr)
    1946 
    1947 !  integer :: i
    1948 !  real    :: trac1d(nlev,2) ! traceur lu ( en vmr)
    1949 
    1950 ! lecture d'un fichier texte contenant les profils de trac1d(:1) = h2o et trac1d(:,2) = h2so4
    1951 !  do i=1,nlon
    1952 !     trac(i,:,i_h2o) = trac1d(:,1)
    1953 !     trac(i,:,i_h2so4) = trac1d(:,2)
    1954 !  enddo
    1955 
    1956 !  intitialisation profils altitude h2o et h2so4
    1957 !  profil h2o initial vap+liq == que vap
    1958    trac(:,1:24,i_h2o) = 30.e-6 !
    1959    trac(:,25:50,i_h2o) = 1.e-6 !
    1960 
    1961    trac(:,:,i_h2so4) = 3.e-9 ! limite sup sandor 2012
    1962    trac(:,23:50,i_h2so4) = 2.e-6 ! profil h2so4 initial => vap+liq
    1963 
    1964   end subroutine vapors4muphy_ini
     1952! ===========================================================
     1953
     1954  SUBROUTINE cloud_micro_ini(nbr_lon,nbr_lev)
     1955
     1956! ===========================================================
     1957    use donnees_mod
     1958    INTEGER :: nbr_lon,nbr_lev
     1959
     1960          ALLOCATE(WSAVtab(nbr_lon,nbr_lev))
     1961          ALLOCATE(RHOtab(nbr_lon,nbr_lev))
     1962          ALLOCATE(RHtab(nbr_lon,nbr_lev))
     1963          ALLOCATE(r1tab(nbr_lon,nbr_lev))
     1964          ALLOCATE(r2tab(nbr_lon,nbr_lev))
     1965
     1966          ALLOCATE(dm0m1(nbr_lon,nbr_lev,2,5))
     1967          ALLOCATE(dm0m2(nbr_lon,nbr_lev,2,5))
     1968          ALLOCATE(dm3m1(nbr_lon,nbr_lev,3,5))
     1969          ALLOCATE(dm3m2(nbr_lon,nbr_lev,3,5))
     1970          ALLOCATE(dm0aer(nbr_lon,nbr_lev,5))
     1971          ALLOCATE(dm3aer(nbr_lon,nbr_lev,5))
     1972         
     1973          ALLOCATE(satm1(nbr_lon,nbr_lev))
     1974          ALLOCATE(satm2(nbr_lon,nbr_lev))
     1975           !initialisation
     1976     WSAVtab(:,:) =0.
     1977     RHOtab(:,:) =0.
     1978     RHtab(:,:) =0.
     1979     r1tab(:,:)  =0.
     1980     r2tab(:,:)  =0.
     1981
     1982     dm0m1(:,:,:,:)=0.
     1983     dm0m2(:,:,:,:)=0.
     1984     dm3m1(:,:,:,:)=0.
     1985     dm3m2(:,:,:,:)=0.
     1986     dm0aer(:,:,:)=0.
     1987     dm3aer(:,:,:)=0.
     1988     
     1989     satm1(:,:)=0.
     1990     satm2(:,:)=0.
     1991
     1992  end subroutine cloud_micro_ini
    19651993
    19661994end module chemparam_mod
  • trunk/LMDZ.VENUS/libf/phyvenus/clesphys_mod.F90

    r3841 r4080  
    3939!$OMP THREADPRIVATE(euveff, fixed_euv_value)
    4040
     41  LOGICAL,SAVE :: debug_cloud
     42!$OMP THREADPRIVATE(debug_cloud)
     43
     44  LOGICAL,SAVE :: MERGING, NUCLEA, HETNUCLEA, MASSFLUX, COAG
     45!$OMP THREADPRIVATE(MERGING, NUCLEA, HETNUCLEA, MASSFLUX, COAG)
     46
     47  REAL,SAVE :: sigma1, sigma2
     48!$OMP THREADPRIVATE(sigma1, sigma2)
     49
     50  LOGICAL,SAVE ::prod_aer
     51!$OMP THREADPRIVATE(prod_aer)
     52  REAL,SAVE :: r_aer, z_aer, sig_aer, tx_prod, rho_aer, sigz
     53!$OMP THREADPRIVATE(r_aer, z_aer, sig_aer, tx_prod, rho_aer, sigz)
     54
    4155END MODULE clesphys_mod
  • trunk/LMDZ.VENUS/libf/phyvenus/conf_phys.F90

    r3900 r4080  
    368368! 2   = Full microphysics (momentum scheme, Sabrina Guilbon's PhD)
    369369
    370   cl_scheme = 2
     370  cl_scheme = 1
    371371  call getin_p('cl_scheme',cl_scheme)
     372
    372373
    373374!
     
    431432  solarchoice = 1
    432433  call getin_p('solarchoice',solarchoice)
     434
     435!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     436! PARAMETERS FOR THE CLOUDS
     437!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     438
     439!
     440!Config Key  = debug_cloud
     441!Config Desc = Key for activating all the commentaries in the momentum scheme
     442!Config Def  = False
     443!Config Help =
     444!
     445
     446 debug_cloud = .false.
     447 call getin_p('debug_cloud',debug_cloud)
     448
     449!
     450!Config Key  = MERGING
     451!Config Desc = Activate or not the mode meging in the full microphysical scheme (cl_scheme = 2)
     452!Config Def  = True
     453!Config Help =
     454!
     455
     456 MERGING = .true.
     457 call getin_p('mode_merging',MERGING)
     458
     459!
     460!Config Key  = NUCLEA
     461!Config Desc = Activate or not the homogeneous nucleation in the full microphysical scheme (cl_scheme = 2)
     462!Config Def  = True
     463!Config Help =
     464!
     465
     466 NUCLEA = .true.
     467 call getin_p('hom_nuclea',NUCLEA)
     468
     469!
     470!Config Key  = HETNUCLEA
     471!Config Desc = Activate or not the heterogeneous nucleation in the full microphysical scheme (cl_scheme = 2)
     472!Config Def  = True
     473!Config Help =
     474!
     475
     476 HETNUCLEA = .true.
     477 call getin_p('het_nuclea',HETNUCLEA)
     478
     479!
     480!Config Key  = MASSFLUX
     481!Config Desc = Activate or not the condensation / evaporation in the full microphysical scheme (cl_scheme = 2)
     482!Config Def  = True
     483!Config Help =
     484!
     485
     486 MASSFLUX = .true.
     487 call getin_p('cond_evap',MASSFLUX)
     488
     489!
     490!Config Key  = COAG
     491!Config Desc = Activate or not the brownian coagulation in the full microphysical scheme (cl_scheme = 2)
     492!Config Def  = True
     493!Config Help =
     494!
     495
     496 COAG = .true.
     497 call getin_p('coag',COAG)
     498
     499!
     500!Config Key  = sigma1
     501!Config Desc = Fixed sigma of mode 1 droplets  (cl_scheme = 2)
     502!Config Def  =
     503!Config Help =
     504!
     505
     506 sigma1 = 1.56D0
     507 call getin_p('sigma_mode1',sigma1)
     508
     509!
     510!Config Key  = sigma2
     511!Config Desc = Fixed sigma of mode 2 droplets  (cl_scheme = 2)
     512!Config Def  =
     513!Config Help =
     514!
     515
     516 sigma2 = 1.29D0
     517 call getin_p('sigma_mode2',sigma1)
     518
     519!
     520!Config Key  = prod_aer
     521!Config Desc = Activate or not the aerosols production in the full microphysical scheme (cl_scheme = 2)
     522!Config Def  = True
     523!Config Help =
     524!
     525
     526 prod_aer = .true.
     527 call getin_p('prod_aer',prod_aer)
     528
     529!
     530!Config Key  = r_aer
     531!Config Desc = Fixed radius of produced aerosols  (cl_scheme = 2)
     532!Config Def  = 0.125e-6 m
     533!Config Help =
     534!
     535
     536 r_aer = 0.125e-6
     537 call getin_p('rad_aer',r_aer)
     538
     539!
     540!Config Key  = z_aer
     541!Config Desc = Peak altitude of the produced aerosols  (cl_scheme = 2)
     542!Config Def  = 60000.D0 m
     543!Config Help =
     544!
     545
     546 z_aer = 60000.D0
     547 call getin_p('alt_aer',z_aer)
     548
     549!
     550!Config Key  = sig_aer
     551!Config Desc = Std dev of the produced aerosols size distribution (cl_scheme = 2)
     552!Config Def  = 1.56D0
     553!Config Help =
     554!
     555
     556 sig_aer = 1.56D0
     557 call getin_p('sigma_aer',sig_aer)
     558
     559!
     560!Config Key  = tx_prod
     561!Config Desc = Vertically integrated production rate of aerosols (cl_scheme = 2)
     562!Config Def  = 2.D-10 kg/m2/s
     563!Config Help =
     564!
     565
     566 tx_prod = 2.D-10
     567 call getin_p('tx_prod_aer',tx_prod)
     568
     569!
     570!Config Key  = rho_aer
     571!Config Desc = Density of the aerosols (cl_scheme = 2)
     572!Config Def  = 1800 kg/m3
     573!Config Help =
     574!
     575
     576 rho_aer = 1800.D0
     577 call getin_p('rho_aer',rho_aer)
     578
     579!
     580!Config Key  = sig_z
     581!Config Desc = Vertical std dev of the gaussian production of aerosols  (cl_scheme = 2)
     582!Config Def   20000 m
     583!Config Help =
     584!
     585
     586 sigz = 20000
     587 call getin_p('sigmaz_aer',sigz)
    433588
    434589!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  • trunk/LMDZ.VENUS/libf/phyvenus/photolysis_mod.F90

    r3960 r4080  
    15801580!     output
    15811581
    1582       real, dimension(nw) :: yg   ! h2o cross-sections (cm2)
     1582      real, dimension(nw) :: yg   ! s2 cross-sections (cm2)
    15831583
    15841584!     local
  • trunk/LMDZ.VENUS/libf/phyvenus/phys_state_var_mod.F90

    r3877 r4080  
    5858
    5959! photochemistry and microphysics
    60       REAL,ALLOCATABLE,SAVE :: d_tr_chem(:,:,:), d_tr_sed(:,:,:)   
    61 !$OMP THREADPRIVATE(d_tr_chem,d_tr_sed)
     60      REAL,ALLOCATABLE,SAVE :: d_tr_chem(:,:,:), d_tr_sed(:,:,:),d_tr_micro(:,:,:)   
     61!$OMP THREADPRIVATE(d_tr_chem,d_tr_sed,d_tr_micro)
    6262      INTEGER,ALLOCATABLE,SAVE :: iter(:,:)   
    6363!$OMP THREADPRIVATE(iter)
     
    157157      ALLOCATE(nvmr_gcm(klon,klev))
    158158
    159       ALLOCATE(d_tr_chem(klon,klev,nqmax),d_tr_sed(klon,klev,nqmax))
     159      ALLOCATE(d_tr_chem(klon,klev,nqmax),d_tr_sed(klon,klev,nqmax),d_tr_micro(klon,klev,nqmax))
    160160      ALLOCATE(iter(klon,klev))
    161161
     
    200200      deallocate(nvmr_gcm)
    201201
    202       deallocate(d_tr_chem,d_tr_sed)
     202      deallocate(d_tr_chem,d_tr_sed,d_tr_micro)
    203203      deallocate(iter)
    204204
  • trunk/LMDZ.VENUS/libf/phyvenus/physiq_mod.F

    r4070 r4080  
    6969      USE cpdet_phy_mod, only: cpdet, t2tpot
    7070      USE chemparam_mod
     71      USE donnees_mod, only: r1tab, r2tab, MSA, MWV, RHOtab, WSAVtab,PI,
     72     &                   satm1, satm2,RHOas,RHOwv,
     73     &                   RHtab,dm0m1,dm0m2,dm3m1,dm3m2,dm0aer,dm3aer
     74!      USE clesphys_mod, only: sigma1, sigma2
    7175      USE age_of_air_mod, ONLY: ok_aoa, reinit_aoa, i_aoa, init_age
    7276      USE age_of_air_mod, ONLY: aoa_ini, age_of_air, init_aoa
     
    8387      use turb_mod, only : sens, turb_resolved
    8488      use nonoro_gwd_ran_mod, only: nonoro_gwd_ran
    85       use sed_and_prod_mad, only: aer_sedimentation, drop_sedimentation
    8689      use iono_h, only: temp_elect, temp_ion
    8790      use tabcontrol_mod, only: radpas, dtime, dtimerad
     
    225228!$OMP THREADPRIVATE(source)       
    226229      REAL ycoefh(klon,klev)    ! coef d'echange pour phytrac
    227       REAL :: kzz_p(klev)       ! coef d'echange pour phytrac pour le 1D
     230      REAL kzz_p(klev)          ! coef d'echange pour phytrac pour le 1D
    228231      REAL yu1(klon)            ! vents dans la premiere couche U
    229232      REAL yv1(klon)            ! vents dans la premiere couche V
     
    236239c
    237240      REAL Fsedim(klon,klev+1)  ! Flux de sedimentation (kg.m-2)
    238 
    239241      EXTERNAL moldiff_MPF
    240242
     
    276278! sedimentation
    277279
    278       REAL :: m0_mode1(klev,2),m0_mode2(klev,2)
    279       REAL :: m3_mode1(klev,3),m3_mode2 (klev,3)
    280       REAL :: d_drop_sed(klev),d_ccn_sed(klev,2),d_liq_sed(klev,2)
    281       REAL :: aer_flux(klev)
     280      REAL :: ROSAS
     281      REAL :: dM0_prod(klev), dM3_prod(klev)
    282282c
    283283c Variables du changement
     
    339339      REAL :: tr_hedin(klon,klev,nqmax)
    340340      REAL :: d_tr(klon,klev,nqmax)
     341
    341342c pour sorties
    342343      REAL :: col_dens_tr(klon,nqmax)
     344      REAL :: col_dens_liq(klon,4)
    343345      REAL,allocatable,save :: prod_tr(:,:,:)
    344346!$OMP THREADPRIVATE(prod_tr)
     
    701703   
    702704!     number of microphysical tracers
    703 
    704       nmicro = 0
    705       if (ok_cloud .and. (cl_scheme == 1)) nmicro = 2
    706       if (ok_cloud .and. (cl_scheme == 2)) nmicro = 12
    707  
     705      if (cl_scheme == 1) then
     706      nmoment = 0
     707      nliq    = 2
     708      nmicro  = 2
     709      elseif (cl_scheme == 2) then     
     710      nmoment = 12
     711      nliq    =  2
     712      nmicro  = 14
     713      else
     714      nmoment = 0
     715      nliq    = 0
     716      nmicro  = 0
     717      endif
    708718!     initialise chemical parameters. includes the indexation of microphys tracers
    709719
     
    732742         call cloud_ini(nlon,nlev,nb_mode)
    733743      end if
     744
     745!     initialise cloud parameters (for cl_scheme = 2)
     746
     747      if (ok_cloud .and. (cl_scheme == 2)) then
     748         call cloud_micro_ini(nlon,nlev)
     749
     750       end if
    734751
    735752!     initialise mmean
     
    10681085!=========
    10691086
    1070          
    10711087         chempas = nint(rday/pdtphys/nbapp_chem)
    10721088         zctime = dtime*real(chempas)             ! chemical timestep
    10731089
     1090        IF (cl_scheme .eq. 2) THEN
     1091        DO i=1, klon
     1092          call aer_production(zctime,klev,pplay(i,:),
     1093     $          zzlev(i,:),zzlay(i,:),dM0_prod,dM3_prod)
     1094          tr_seri(i,:,i_m0_aer) = tr_seri(i,:,i_m0_aer) +
     1095     $                              dM0_prod(:)
     1096          tr_seri(i,:,i_m3_aer) = tr_seri(i,:,i_m3_aer) +
     1097     $                              dM3_prod(:)
     1098        END DO
     1099        ENDIF
     1100
    10741101         if (mod(itap,chempas) == 0) then         ! <------- start of chemistry supercycling
    10751102
    10761103!        photochemistry and microphysics
    10771104
    1078          call phytrac_chimie(debut,
     1105        call phytrac_chimie(debut,
    10791106     $                       gmtime,
    10801107     $                       nqmax,
     
    10891116     $                       tr_seri,
    10901117     $                       d_tr_chem,
     1118     $                       d_tr_micro,
    10911119     $                       iter,
    10921120     $                       prod_tr,
     
    10941122     $                       no_emission,
    10951123     $                       o2_emission)
    1096 
    1097          if (ok_sedim) then
     1124   
     1125        if (ok_sedim) then
    10981126            if (cl_scheme == 1) then
    10991127
     
    11401168!        sedimentation for detailed microphysics
    11411169
     1170              d_tr_sed(:,:,:) = 0.
     1171
     1172!                 aerosols
     1173
     1174               call sedim_mad_aer(klon, klev, zctime, pplay, paprs,
     1175     $                           rho, zzlev,t_seri,d_tr_sed(:,:,1:2),
     1176     $                      tr_seri,nqmax)
     1177
     1178
     1179        d_tr_sed(:,:,i_m0_aer)= d_tr_sed(:,:,1) / zctime
     1180        d_tr_sed(:,:,i_m3_aer) = d_tr_sed(:,:,2) / zctime
     1181
     1182
     1183!                 mode 1
     1184
    11421185               d_tr_sed(:,:,:) = 0.
    1143 
    1144                do i = 1, klon
    1145 
    1146 !                 mode 1
    1147 
    1148                   m0_mode1(:,1) = tr_seri(i,:,i_m0_mode1drop)
    1149                   m0_mode1(:,2) = tr_seri(i,:,i_m0_mode1ccn)
    1150                   m3_mode1(:,1) = tr_seri(i,:,i_m3_mode1sa)
    1151                   m3_mode1(:,2) = tr_seri(i,:,i_m3_mode1w)
    1152                   m3_mode1(:,3) = tr_seri(i,:,i_m3_mode1ccn)
    1153 
    1154                   call drop_sedimentation(zctime,klev,m0_mode1,m3_mode1,
    1155      $                                    paprs(i,:),zzlev(i,:),
    1156      $                                    zzlay(i,:),t_seri(i,:),1,
    1157      $                                    d_ccn_sed(:,1),d_drop_sed,
    1158      $                                    d_ccn_sed(:,2),d_liq_sed)
    1159 
    1160         d_tr_sed(i,:,i_m0_mode1drop)= d_tr_sed(i,:,i_m0_mode1drop)
    1161      $                              + d_drop_sed
    1162         d_tr_sed(i,:,i_m0_mode1ccn) = d_tr_sed(i,:,i_m0_mode1ccn)
    1163      $                              + d_ccn_sed(:,1)
    1164         d_tr_sed(i,:,i_m3_mode1ccn) = d_tr_sed(i,:,i_m3_mode1ccn)
    1165      $                              + d_ccn_sed(:,2)
    1166         d_tr_sed(i,:,i_m3_mode1sa)  = d_tr_sed(i,:,i_m3_mode1sa)
    1167      $                              + d_liq_sed(:,1)
    1168         d_tr_sed(i,:,i_m3_mode1w)   = d_tr_sed(i,:,i_m3_mode1w)
    1169      $                              + d_liq_sed(:,2)
     1186                  call sedim_mad_m1 (klon, klev, zctime, pplay, paprs,
     1187     $                           rho, zzlev,t_seri,d_tr_sed(:,:,1:5),
     1188     $                      tr_seri,nqmax,r1tab,RHOtab,sigma1)
     1189
     1190
     1191        d_tr_sed(:,:,i_m0_mode1drop)= d_tr_sed(:,:,1) / zctime
     1192        d_tr_sed(:,:,i_m0_mode1ccn) = d_tr_sed(:,:,2) / zctime
     1193        d_tr_sed(:,:,i_m3_mode1ccn) = d_tr_sed(:,:,3) / zctime
     1194        d_tr_sed(:,:,i_m3_mode1sa)  = d_tr_sed(:,:,4) / zctime
     1195        d_tr_sed(:,:,i_m3_mode1wv)  = d_tr_sed(:,:,5) / zctime
    11701196
    11711197!                 mode 2
    11721198
    1173                   m0_mode2(:,1) = tr_seri(i,:,i_m0_mode2drop)
    1174                   m0_mode2(:,2) = tr_seri(i,:,i_m0_mode2ccn)
    1175                   m3_mode2(:,1) = tr_seri(i,:,i_m3_mode2sa)
    1176                   m3_mode2(:,2) = tr_seri(i,:,i_m3_mode2w)
    1177                   m3_mode2(:,3) = tr_seri(i,:,i_m3_mode2ccn)
    1178 
    1179                   call drop_sedimentation(zctime,klev,m0_mode2,m3_mode2,
    1180      $                                    paprs(i,:),zzlev(i,:),
    1181      $                                    zzlay(i,:),t_seri(i,:),2,
    1182      $                                    d_ccn_sed(:,1),d_drop_sed,
    1183      $                                    d_ccn_sed(:,2),d_liq_sed)
    1184 
    1185         d_tr_sed(i,:,i_m0_mode2drop)= d_tr_sed(i,:,i_m0_mode2drop)
    1186      $                              + d_drop_sed
    1187         d_tr_sed(i,:,i_m0_mode2ccn) = d_tr_sed(i,:,i_m0_mode2ccn)
    1188      $                              + d_ccn_sed(:,1)
    1189         d_tr_sed(i,:,i_m3_mode2ccn) = d_tr_sed(i,:,i_m3_mode2ccn)
    1190      $                              + d_ccn_sed(:,2)
    1191         d_tr_sed(i,:,i_m3_mode2sa)  = d_tr_sed(i,:,i_m3_mode2sa)
    1192      $                              + d_liq_sed(:,1)
    1193         d_tr_sed(i,:,i_m3_mode2w)   = d_tr_sed(i,:,i_m3_mode2w)
    1194      $                              + d_liq_sed(:,2)
    1195 
    1196 !                 aer
    1197 
    1198                   call aer_sedimentation(zctime,klev,
    1199      $                                   tr_seri(i,:,i_m0_aer),
    1200      $                                   tr_seri(i,:,i_m3_aer),
    1201      $                                   paprs(i,:),zzlev(i,:),
    1202      $                                   zzlay(i,:),t_seri(i,:),
    1203      $                                   d_tr_sed(i,:,i_m0_aer),
    1204      $                                   d_tr_sed(i,:,i_m3_aer),
    1205      $                                   aer_flux)
    1206 
    1207                end do
     1199               d_tr_sed(:,:,:) = 0.
     1200                  call sedim_mad_m2 (klon, klev, zctime, pplay, paprs,
     1201     $                            rho,zzlev,t_seri,d_tr_sed(:,:,1:5),
     1202     $                      tr_seri,nqmax,r2tab,RHOtab,sigma2)
     1203
     1204
     1205        d_tr_sed(:,:,i_m0_mode2drop)= d_tr_sed(:,:,1) / zctime
     1206        d_tr_sed(:,:,i_m0_mode2ccn) = d_tr_sed(:,:,2) / zctime
     1207        d_tr_sed(:,:,i_m3_mode2ccn) = d_tr_sed(:,:,3) / zctime
     1208        d_tr_sed(:,:,i_m3_mode2sa)  = d_tr_sed(:,:,4) / zctime
     1209        d_tr_sed(:,:,i_m3_mode2wv)  = d_tr_sed(:,:,5) / zctime
    12081210         
    1209 !        tendency due to sedimentation
    1210 
    1211                do iq = nqmax-nmicro+1,nqmax
    1212                   d_tr_sed(:,:,iq) = d_tr_sed(:,:,iq)/zctime
    1213                end do
     1211!        tendency due to sedimentation
     1212
     1213
     1214
    12141215#endif
    12151216            end if  ! cl_scheme
     1217         end if     ! ok_sedim
    12161218
    12171219!        update gaseous tracers (chemistry)
    12181220
    1219             do iq = 1, nqmax - nmicro
     1221        do iq = 1, nqmax - nmicro
    12201222               tr_seri(:,:,iq) = max(tr_seri(:,:,iq)
    12211223     $                         + d_tr_chem(:,:,iq)*zctime,1.e-30)
     
    12231225
    12241226!        update condensed tracers (condensation + sedimentation)
    1225 
     1227       
    12261228            if (cl_scheme == 1) then
    12271229               tr_seri(:,:,i_h2so4liq) = max(tr_seri(:,:,i_h2so4liq)
     
    12301232     $                                 + d_tr_sed(:,:,2)*zctime, 1.e-30)
    12311233            else if (cl_scheme == 2) then
    1232                do iq = nqmax-nmicro+1,nqmax
    1233                   tr_seri(:,:,iq) = max(tr_seri(:,:,iq)
    1234      $                            + d_tr_sed(:,:,iq)*zctime,1.e-30)
    1235                end do
     1234
     1235        tr_seri(:,:,i_m0_aer) = tr_seri(:,:,i_m0_aer)
     1236     $         + d_tr_micro(:,:,i_m0_aer)*zctime
     1237     $         +   d_tr_sed(:,:,i_m0_aer)*zctime
     1238        tr_seri(:,:,i_m3_aer) = tr_seri(:,:,i_m3_aer)
     1239     $         + d_tr_micro(:,:,i_m3_aer)*zctime
     1240     $         +   d_tr_sed(:,:,i_m3_aer)*zctime
     1241
     1242        tr_seri(:,:,i_m0_mode1drop) = tr_seri(:,:,i_m0_mode1drop)
     1243     $         + d_tr_micro(:,:,i_m0_mode1drop)*zctime
     1244     $         +   d_tr_sed(:,:,i_m0_mode1drop)*zctime
     1245        tr_seri(:,:,i_m0_mode1ccn) = tr_seri(:,:,i_m0_mode1ccn)
     1246     $         + d_tr_micro(:,:,i_m0_mode1ccn)*zctime
     1247     $         +   d_tr_sed(:,:,i_m0_mode1ccn)*zctime
     1248
     1249
     1250        tr_seri(:,:,i_m3_mode1sa) = tr_seri(:,:,i_m3_mode1sa)
     1251     $         + d_tr_micro(:,:,i_m3_mode1sa)*zctime
     1252     $         +   d_tr_sed(:,:,i_m3_mode1sa)*zctime
     1253        tr_seri(:,:,i_m3_mode1wv) = tr_seri(:,:,i_m3_mode1wv)
     1254     $         + d_tr_micro(:,:,i_m3_mode1wv)*zctime
     1255     $         +   d_tr_sed(:,:,i_m3_mode1wv)*zctime
     1256        tr_seri(:,:,i_m3_mode1ccn) = tr_seri(:,:,i_m3_mode1ccn)
     1257     $         + d_tr_micro(:,:,i_m3_mode1ccn)*zctime
     1258     $         +   d_tr_sed(:,:,i_m3_mode1ccn)*zctime
     1259
     1260        tr_seri(:,:,i_m0_mode2drop) = tr_seri(:,:,i_m0_mode2drop)
     1261     $         + d_tr_micro(:,:,i_m0_mode2drop)*zctime
     1262     $         +   d_tr_sed(:,:,i_m0_mode2drop)*zctime
     1263        tr_seri(:,:,i_m0_mode2ccn) = tr_seri(:,:,i_m0_mode2ccn)
     1264     $         + d_tr_micro(:,:,i_m0_mode2ccn)*zctime
     1265     $         +   d_tr_sed(:,:,i_m0_mode2ccn)*zctime
     1266
     1267        tr_seri(:,:,i_m3_mode2sa) = tr_seri(:,:,i_m3_mode2sa)
     1268     $         + d_tr_micro(:,:,i_m3_mode2sa)*zctime
     1269     $         +   d_tr_sed(:,:,i_m3_mode2sa)*zctime
     1270        tr_seri(:,:,i_m3_mode2wv) = tr_seri(:,:,i_m3_mode2wv)
     1271     $         + d_tr_micro(:,:,i_m3_mode2wv)*zctime
     1272     $         +   d_tr_sed(:,:,i_m3_mode2wv)*zctime
     1273        tr_seri(:,:,i_m3_mode2ccn) = tr_seri(:,:,i_m3_mode2ccn)
     1274     $         + d_tr_micro(:,:,i_m3_mode2ccn)*zctime
     1275     $         +   d_tr_sed(:,:,i_m3_mode2ccn)*zctime
     1276
     1277
     1278        tr_seri(:,:,i_h2so4liq) = RHOas * (4.D0*PI/3.D0)*
     1279     $  (tr_seri(:,:,i_m3_mode2sa) + tr_seri(:,:,i_m3_mode1sa))
     1280
     1281        tr_seri(:,:,i_h2oliq) = RHOwv * (4.D0*PI/3.D0)*
     1282     $  (tr_seri(:,:,i_m3_mode2wv) + tr_seri(:,:,i_m3_mode1wv))
     1283
     1284        do k = 1, klev
     1285                  do i = 1, klon
     1286                       if (tr_seri(i,k,i_m3_mode1sa) .LT. 1e-18) then
     1287                        tr_seri(:,:,i_m0_aer) = tr_seri(:,:,i_m0_aer)+
     1288     $                  tr_seri(i,k,i_m0_mode1ccn)
     1289
     1290                        tr_seri(:,:,i_m3_aer) = tr_seri(:,:,i_m3_aer)+
     1291     $                  tr_seri(i,k,i_m3_mode1ccn)
     1292
     1293                        tr_seri(i,k,i_m3_mode1sa) = 0.D0
     1294                        tr_seri(i,k,i_m3_mode1wv) = 0.D0
     1295
     1296                        tr_seri(i,k,i_m3_mode1ccn) = 0.D0
     1297
     1298                        tr_seri(i,k,i_m0_mode1drop) = 0.D0
     1299                        tr_seri(i,k,i_m0_mode1ccn) = 0.D0
     1300                       endif
     1301       
     1302                       if (tr_seri(i,k,i_m3_mode2sa) .LT. 1e-18) then
     1303                        tr_seri(:,:,i_m0_aer) = tr_seri(:,:,i_m0_aer)+
     1304     $                  tr_seri(i,k,i_m0_mode2ccn)
     1305
     1306                        tr_seri(:,:,i_m3_aer) = tr_seri(:,:,i_m3_aer)+
     1307     $                  tr_seri(i,k,i_m3_mode2ccn)
     1308
     1309                        tr_seri(i,k,i_m3_mode2sa) = 0.D0
     1310                        tr_seri(i,k,i_m3_mode2wv) = 0.D0
     1311                        tr_seri(i,k,i_m3_mode2ccn) = 0.D0
     1312
     1313                        tr_seri(i,k,i_m0_mode2drop) = 0.D0
     1314                        tr_seri(i,k,i_m0_mode2ccn) = 0.D0
     1315                       endif
     1316                enddo
     1317        enddo
     1318
     1319        tr_seri(:,:,i_h2o) = tr_seri(:,:,i_h2o)
     1320     $         + d_tr_micro(:,:,i_h2o)*zctime
     1321        tr_seri(:,:,i_h2so4) = tr_seri(:,:,i_h2so4)
     1322     $         + d_tr_micro(:,:,i_h2so4)*zctime
     1323
    12361324            end if  ! cl_scheme
    1237 
    1238          end if     ! ok_sedim
    12391325         end if     ! mod(itap,chempas)  <------- end of chemistry supercycling
    12401326
     
    12491335c Appeler la diffusion verticale (programme de couche limite)
    12501336c====================================================================
    1251 
     1337 
    12521338c-------------------------------
    12531339c VENUS TEST: on ne tient pas compte des calculs de clmain mais on force
     
    13561442   
    13571443         DO iq=1, nqmax
    1358     
     1444 
    13591445             CALL cltrac(dtime,ycoefh,t_seri,
    13601446     s               tr_seri(:,:,iq),source(:,iq),
    13611447     e               paprs, pplay,delp,
    1362      s               d_tr_vdf(:,:,iq))
    1363      
     1448     s               d_tr_vdf(:,:,iq))   
     1449
    13641450             tr_seri(:,:,iq) = tr_seri(:,:,iq) + d_tr_vdf(:,:,iq)
    13651451             d_tr_vdf(:,:,iq)= d_tr_vdf(:,:,iq)/dtime          ! /s
     
    14541540      endif
    14551541
    1456       ! tests: output tendencies
    1457 !      call writefield_phy('physiq_d_t_ajs',d_t_ajs,klev)
    1458 !      call writefield_phy('physiq_d_u_ajs',d_u_ajs,klev)
    1459 !      call writefield_phy('physiq_d_v_ajs',d_v_ajs,klev)
    1460 c
    14611542      IF (if_ebil.ge.2) THEN
    14621543        ztit='after dry_adjust'
     
    16841765         ! VCD 2.4
    16851766
    1686              call moldiff_MPF(klon, klev, nqmax,
     1767             call moldiff_MPF(klon, klev, nqmax-nmicro,
    16871768     &                   pplay,paprs,t_seri, tr_seri, pdtphys,
    16881769     &                   d_t_euv,d_t_conduc,d_q_moldif)
     
    16981779            ENDDO
    16991780           ENDDO
    1700            
    17011781         ENDIF  ! callthermos & ok_chem
    17021782
     
    22312311            end if
    22322312         end if
     2313       
     2314         if ((tr_scheme == 3) .and. (cl_scheme == 2)) THEN
     2315        col_dens_liq(:,:) = 0.
     2316         do k = 1, klev
     2317        col_dens_liq(:,1) = col_dens_liq(:,1)+
     2318     $ (((tr_seri(:,k,i_m3_mode1wv)+tr_seri(:,k,i_m3_mode2wv))
     2319     $ *(4.D0/3.D0)*
     2320     $ PI*RHOwv) * (paprs(:,k)-paprs(:,k+1)) / RG)
     2321       
     2322        col_dens_liq(:,2) = col_dens_liq(:,2)+
     2323     $ (((tr_seri(:,k,i_m3_mode1sa)+tr_seri(:,k,i_m3_mode2sa))
     2324     $ *(4.D0/3.D0)*
     2325     $ PI*RHOas) * (paprs(:,k)-paprs(:,k+1)) / RG)
     2326
     2327        enddo
     2328       col_dens_liq(:,3) = col_dens_liq(:,1) + col_dens_tr(:,i_h2o) 
     2329       col_dens_liq(:,4) = col_dens_liq(:,2) + col_dens_tr(:,i_h2so4) 
     2330
     2331 
     2332      call send_xios_field("col_h2oliq",col_dens_liq(:,1))
     2333      call send_xios_field("col_h2so4liq",col_dens_liq(:,2))
     2334      call send_xios_field("col_h2otot",col_dens_liq(:,3))
     2335      call send_xios_field("col_h2so4tot",col_dens_liq(:,4))
     2336            call send_xios_field(tname(i_h2oliq),
     2337     $             tr_seri(:,:,i_h2oliq)*mmean(:,:)/m_tr(i_h2oliq))
     2338            call send_xios_field(tname(i_h2so4liq),
     2339     $             tr_seri(:,:,i_h2so4liq)*mmean(:,:)/m_tr(i_h2so4liq))
     2340
     2341            do iq = nqmax - nmoment, nqmax
     2342              call send_xios_field(tname(iq),tr_seri(:,:,iq)*rho(:,:))
     2343            enddo
     2344
     2345            call send_xios_field("h2otot",
     2346     $      (tr_seri(:,:,i_h2oliq)+tr_seri(:,:,i_h2o))
     2347     $      *mmean(:,:)/m_tr(i_h2oliq))
     2348
     2349            call send_xios_field("h2so4tot",
     2350     $      (tr_seri(:,:,i_h2so4liq)+tr_seri(:,:,i_h2so4))
     2351     $      *mmean(:,:)/m_tr(i_h2so4))
     2352
     2353            call send_xios_field("r1",r1tab(:,:))
     2354            call send_xios_field("r2",r2tab(:,:))
     2355            call send_xios_field("rhotab",RHOtab(:,:))
     2356            call send_xios_field("RHtab",RHtab(:,:))
     2357            call send_xios_field("WSAVtab",WSAVtab(:,:))
     2358
     2359        IF (NUCLEA) THEN
     2360                call send_xios_field("dM0m1_hom",dm0m1(:,:,1,1))
     2361                call send_xios_field("dM3m1_hom_h2so4",dm3m1(:,:,2,1))
     2362                call send_xios_field("dM3m1_hom_h2o",dm3m1(:,:,3,1))
     2363        ENDIF
     2364
     2365        IF (HETNUCLEA) THEN
     2366                call send_xios_field("dM0m1_het",dm0m1(:,:,1,2))
     2367                call send_xios_field("dM0m1_het_ccn",dm0m1(:,:,2,2))
     2368                call send_xios_field("dM3m1_het_ccn",dm3m1(:,:,1,2))
     2369                call send_xios_field("dM3m1_het_h2so4",dm3m1(:,:,2,2))
     2370                call send_xios_field("dM3m1_het_h2o",dm3m1(:,:,3,2))
     2371                call send_xios_field("dM0_het_aer",dm0aer(:,:,2))
     2372                call send_xios_field("dM3_het_aer",dm3aer(:,:,2))
     2373        ENDIF
     2374
     2375        IF (MASSFLUX) THEN
     2376                call send_xios_field("dM3m1_cond_h2so4",dm3m1(:,:,2,3))
     2377                call send_xios_field("dM3m1_cond_h2o",dm3m1(:,:,3,3))
     2378                call send_xios_field("dM3m2_cond_h2so4",dm3m2(:,:,2,3))
     2379                call send_xios_field("dM3m2_cond_h2o",dm3m2(:,:,3,3))
     2380        ENDIF
     2381
     2382        IF (COAG) THEN
     2383                call send_xios_field("dM0m1_coag",dm0m1(:,:,1,4))
     2384                call send_xios_field("dM0m1_coag_ccn",dm0m1(:,:,2,4))
     2385                call send_xios_field("dM3m1_coag_ccn",dm3m1(:,:,1,4))
     2386                call send_xios_field("dM3m1_coag_h2so4",dm3m1(:,:,2,4))
     2387                call send_xios_field("dM3m1_coag_h2o",dm3m1(:,:,3,4))
     2388
     2389                call send_xios_field("dM0m2_coag",dm0m2(:,:,1,4))
     2390                call send_xios_field("dM0m2_coag_ccn",dm0m2(:,:,2,4))
     2391                call send_xios_field("dM3m2_coag_ccn",dm3m2(:,:,1,4))
     2392                call send_xios_field("dM3m2_coag_h2so4",dm3m2(:,:,2,4))
     2393                call send_xios_field("dM3m2_coag_h2o",dm3m2(:,:,3,4))
     2394        ENDIF
     2395
     2396        IF (MERGING) THEN
     2397                call send_xios_field("dM0m1_merge",dm0m1(:,:,1,5))
     2398                call send_xios_field("dM0m1_merge_ccn",dm0m1(:,:,2,5))
     2399                call send_xios_field("dM3m1_merge_ccn",dm3m1(:,:,1,5))
     2400                call send_xios_field("dM3m1_merge_h2so4",dm3m1(:,:,2,5))
     2401                call send_xios_field("dM3m1_merge_h2o",dm3m1(:,:,3,5))
     2402
     2403                call send_xios_field("dM0m2_merge",dm0m2(:,:,1,5))
     2404                call send_xios_field("dM0m2_merge_ccn",dm0m2(:,:,2,5))
     2405                call send_xios_field("dM3m2_merge_ccn",dm3m2(:,:,1,5))
     2406                call send_xios_field("dM3m2_merge_h2so4",dm3m2(:,:,2,5))
     2407                call send_xios_field("dM3m2_merge_h2o",dm3m2(:,:,3,5))
     2408        ENDIF
     2409            call send_xios_field("satm1",satm1(:,:))
     2410            call send_xios_field("satm2",satm2(:,:))
     2411         end if
     2412
     2413
    22332414
    22342415! aeronomical emissions
  • trunk/LMDZ.VENUS/libf/phyvenus/phytrac_chimie.F

    r3954 r4080  
    1313     $                    trac,
    1414     $                    d_tr_chem,
     15     $                    d_tr_micro,
    1516     $                    iter,
    1617     $                    prod_tr,
     
    2021
    2122      use chemparam_mod
    22       use conc, only: mmean,rnew
     23      use donnees_mod, only: WSAVtab, RHOtab, WSAV,PI,MSA,MWV,PI,
     24     $                   RHOSA,r1,r2,r1tab,r2tab,RHOas,RHOwv,
     25     &                   satm1, satm2, SH2SO4, RHtab,
     26     &                   d3fm1as, d3fm1w,d3fm2as, d3fm2w, sat1, sat2
     27      use conc, only: mmean,rnew, rho
    2328      use photolysis_mod, only: init_photolysis, nphot
    2429      use iono_h, only: temp_elect
     
    5661      integer, dimension(nlon,nlev) :: iter                 ! chemical iterations
    5762      real, dimension(nlon,nlev,nqmax) :: d_tr_chem         ! chemical tendency for each tracer
     63      real, dimension(nlon,nlev,nqmax) :: d_tr_micro        !microphysical tendencies
    5864      real, dimension(nlon,nlev,nqmax) :: prod_tr, loss_tr  ! production and loss terms (for info)
    5965      real, dimension(nlon,nlev)    :: no_emi               ! no emission
     
    8086      real, dimension(nlon,nlev) :: mrtwv, mrtsa ! total water and total sulfuric acid
    8187      real, dimension(nlon,nlev) :: mrwv, mrsa   ! gas-phase water and gas-phase sulfuric acid
     88      real, dimension(nlev)      :: dM0_prod, dM3_prod !prod of aer for mad muphy
    8289      real, dimension(nlon,nlev) :: trac_sum
    8390      real, dimension(nlon,nlev,nqmax) :: ztrac  ! local tracer mixing ratio
     91      real, dimension(nlon,nlev,nqmax) :: momtrac  ! local tracer mixing ratio
     92      real, dimension(nlon,nlev, 2) :: mitrac    ! local vmr for gaz implied in microphys
     93      real                  :: ROSAS
    8494      real, dimension(nlev) :: no_em
    8595      real, dimension(nlev) :: o2_em
     
    123133!     first call : initialisations
    124134!===================================================================
    125 
     135     
    126136      if (debutphy) then
    127      
     137
    128138!--- Adjustment of Helium amount
    129139!       if (i_he/=0) then
     
    173183           if (reinit_trac .and. ok_chem) then
    174184 
    175 !             convert mass to volume mixing ratio
     185  !!! in this reinitialisation, trac is VOLUME mixing ratio
     186  ! ONLY SO2!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     187  !           convert mass to volume mixing ratio
    176188              do iq = 1,nqmax - nmicro
    177189                 trac(:,:,iq) = trac(:,:,iq)*mmean(:,:)/m_tr(iq)
    178190              end do
    179191
    180               print*, "SO2 is re-initialised"
    181 
    182192              if (i_so2 /= 0) then
    183                  trac(:,25:,i_so2)  = 100.e-9
    184                  trac(:,1:24,i_so2) = 15.e-6
    185                  trac(:,25:,i_h2o)  = 1.e-6
    186                  trac(:,1:24,i_h2o) = 30.e-6
    187 
    188                  trac(:,:,i_osso_cis)   = 0.
    189                  trac(:,:,i_osso_trans) = 0.
    190                  trac(:,:,i_s2o2_cyc)   = 0.
    191                  trac(:,:,i_cl2so2)     = 0.
    192  
    193 ! AL TRACERS!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    194 !           print*, "Tracers are re-initialised"
    195 !           trac(:,:,:) = 1.0e-30
    196  
    197 !             if ((i_ocs /= 0) .and. (i_co /= 0) .and. (i_hcl /= 0)
    198 !     $          .and. (i_so2 /= 0) .and. (i_h2o /= 0)
    199 !     $          .and. (i_n2 /= 0)  .and. (i_co2 /= 0)) then
    200  
    201 !                trac(:,1:22,i_ocs) = 3.e-6
    202 !                trac(:,1:22,i_co)  = 25.e-6
    203 !                trac(:,:,i_hcl)    = 0.4e-6
    204 !                trac(:,1:22,i_so2) = 7.e-6
    205 !                trac(:,1:22,i_h2o) = 30.e-6
    206 !                trac(:,:,i_n2)     = 0.35e-1
    207 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    208      
    209 !                ensure that sum of mixing ratios = 1
     193              print*, "H2SO4 is re-initialised"
     194                  trac(:,19:23,i_h2so4) = 15.e-6
     195!              print*, "SO2 is re-initialised"
     196
     197!              if (i_so2 /= 0) then
     198!                 trac(:,25:,i_so2)  = 100.e-9
     199!                 trac(:,1:24,i_so2) = 15.e-6
     200!                 trac(:,25:,i_h2o)  = 1.e-6
     201!                 trac(:,1:24,i_h2o) = 30.e-6
     202
     203!                 trac(:,:,i_osso_cis)   = 0.
     204!                 trac(:,:,i_osso_trans) = 0.
     205!                 trac(:,:,i_s2o2_cyc)   = 0.
     206!                 trac(:,:,i_cl2so2)     = 0.
     207 
     208  ! AL TRACERS!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     209  !           print*, "Tracers are re-initialised"
     210  !           trac(:,:,:) = 1.0e-30
     211 
     212  !           if ((i_ocs /= 0) .and. (i_co /= 0) .and. (i_hcl /= 0)
     213  !   $          .and. (i_so2 /= 0) .and. (i_h2o /= 0)
     214  !   $          .and. (i_n2 /= 0)  .and. (i_co2 /= 0)) then
     215  !              trac(:,1:22,i_ocs) = 3.e-6
     216  !              trac(:,1:22,i_co)  = 25.e-6
     217  !              trac(:,:,i_hcl)    = 0.4e-6
     218  !              trac(:,1:22,i_so2) = 7.e-6
     219  !              trac(:,1:22,i_h2o) = 30.e-6
     220  !              trac(:,:,i_n2)     = 0.35e-1
     221  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     222  !          ensure that sum of mixing ratios = 1
    210223 
    211224                 trac_sum(:,:) = 0.
     
    217230                 end do
    218231 
    219 !                initialise co2
     232  !          initialise co2
    220233 
    221234                 trac(:,:,i_co2) = 1. - trac_sum(:,:)
     
    226239              end if
    227240         
    228            update mmean
     241  !           update mmean
    229242 
    230243              mmean(:,:) = 0.
     
    234247              rnew(:,:) = 8.314/mmean(:,:)*1.e3     ! J/kg K
    235248 
    236            convert volume to mass mixing ratio
     249  !           convert volume to mass mixing ratio
    237250 
    238251              do iq = 1,nqmax - nmicro
     
    242255           end if  ! reinit_trac
    243256
     257   !    initilise moments for detailed microphysics
     258
     259       if (ok_cloud .and. (cl_scheme ==2)) then
     260         if ((sum(trac(:,:,i_m0_mode2drop))+
     261     $    sum(trac(:,:,i_m0_mode1drop))) .lt. 1.D0) then
     262
     263         DO ilon = 1, nlon
     264         call init_moment(ilon,nlev,pplay(ilon,:),temp(ilon,:),
     265     $                    trac(ilon,:,:))
     266         ENDDO
     267
     268       ! Convert moment/volune to moment/mass
     269
     270         do iq = nqmax-nmoment+1,nqmax
     271          trac(:,:,iq) = trac(:,:,iq)/rho(:,:)
     272         enddo
     273        endif
     274        endif
    244275         end if  ! ok_chem
    245 
    246 !-------------------------------------------------------------------
    247 !        case of detailed microphysics without chemistry
    248 !-------------------------------------------------------------------
    249 
    250          if (.not. ok_chem .and. ok_cloud .and. cl_scheme == 2) then
    251 
    252 !           convert mass to volume mixing ratio
    253 
    254             do iq = 1,nqmax - nmicro
    255                ztrac(:,:,iq) = trac(:,:,iq)*mmean(:,:)/m_tr(iq)
    256             end do
    257          
    258 !           initialise microphysics
    259  
    260             call vapors4muphy_ini(nlon,nlev,ztrac)
    261 
    262 !           convert volume to mass mixing ratio
    263 
    264             do iq = 1,nqmax - nmicro
    265                trac(:,:,iq) = ztrac(:,:,iq)*m_tr(iq)/mmean(:,:)
    266             end do
    267    
    268          end if
    269 
    270       end if  ! debutphy
    271 
     276      end if ! debutphy
    272277!===================================================================
    273278!     convert mass to volume mixing ratio : gas phase
    274279!===================================================================
    275 
     280        ztrac(:,:,:) = 0.D0
    276281      do iq = 1,nqmax - nmicro
    277282         ztrac(:,:,iq) = max(trac(:,:,iq)*mmean(:,:)/m_tr(iq), 1.e-30)
    278283      end do
    279 
    280284!===================================================================
    281285!     microphysics: simplified scheme (phd aurelien stolzenbach)
    282286!===================================================================
    283 
    284287      if (ok_cloud .and. cl_scheme == 1) then
    285288
     
    323326      if (ok_cloud .and. cl_scheme == 2) then
    324327
    325          do iq = nqmax-nmicro+1,nqmax
    326             ztrac(:,:,iq) = trac(:,:,iq)
    327          end do
    328 
    329          do ilon = 1,nlon       
    330             do ilev = 1, nlev
    331                if (temp(ilon,ilev) < 500.) then
    332                   call mad_muphy(pdtphys,                               ! timestep
     328!     Initiating d_tr_micro with 0
     329
     330        d_tr_micro(:,:,:)=0.D0
     331        momtrac(:,:,:) = 0.D0
     332        r1 = 0.D0
     333        r2 = 0.D0
     334       
     335!    Setting up the values
     336
     337        mitrac(:,:,1) = ztrac(:,:,i_h2o)
     338        mitrac(:,:,2) = ztrac(:,:,i_h2so4)
     339       
     340        do iq = nqmax-nmoment+1,nqmax
     341          momtrac(:,:,iq) = trac(:,:,iq)*rho(:,:)
     342          ztrac(:,:,iq) = momtrac(:,:,iq)
     343        enddo
     344
     345!    Compute WSAV and RHOSA
     346
     347        do ilon = 1,nlon       
     348           do ilev = 1, nlev
     349               if (((ztrac(ilon,ilev,i_m3_mode1sa)+
     350     $               ztrac(ilon,ilev,i_m3_mode2sa))+
     351     $              (ztrac(ilon,ilev,i_m3_mode1wv)+
     352     $               ztrac(ilon,ilev,i_m3_mode2wv))) .gt.
     353     $              1e-30) then
     354
     355                   WSAV  = (ztrac(ilon,ilev,i_m3_mode1sa) +
     356     $                      ztrac(ilon,ilev,i_m3_mode2sa))/
     357     $                    ((ztrac(ilon,ilev,i_m3_mode1sa) +
     358     $                      ztrac(ilon,ilev,i_m3_mode2sa))+
     359     $                     (ztrac(ilon,ilev,i_m3_mode1wv) +
     360     $                      ztrac(ilon,ilev,i_m3_mode2wv)))
     361
     362                    RHOSA = ROSAS(temp, (WSAV*RHOas * 1/(WSAV*RHOas +
     363     $                   (1.D0-WSAV)*RHOwv)))
     364               else
     365                  WSAV   = WSAVtab(ilon,ilev)
     366                  RHOSA = RHOtab(ilon,ilev)
     367               endif       
     368
     369!    Compute liquids mmr before microphysics and saving them
     370
     371              trac(ilon,ilev,i_h2so4liq) = 
     372     $      ((trac(ilon,ilev,i_m3_mode1sa)+trac(ilon,ilev,i_m3_mode2sa))
     373     $     *(4.D0*PI/3.D0) *RHOas/rho(ilon,ilev) * mmean(ilon,ilev)/MSA)
     374
     375             trac(ilon,ilev,i_h2oliq) =
     376     $      ((trac(ilon,ilev,i_m3_mode1wv)+trac(ilon,ilev,i_m3_mode2wv))
     377     $      *(4.D0*PI/3.D0)*RHOwv/rho(ilon,ilev) * mmean(ilon,ilev)*MWV)
     378
     379             ztrac(ilon,ilev,i_h2so4liq) = trac(ilon,ilev,i_h2so4liq)
     380             ztrac(ilon,ilev,i_h2oliq) = trac(ilon,ilev,i_h2oliq)
     381
     382!    Microphysical scheme
     383
     384             if (temp(ilon,ilev) .lt. 400) then
     385                  call mad_muphy(pdtphys,ilon,ilev,                     ! timestep
    333386     $                           temp(ilon,ilev),pplay(ilon,ilev),      ! temperature and pressure
    334      $                           ztrac(ilon,ilev,i_h2o),
    335      $                           ztrac(ilon,ilev,i_h2so4),     
     387     $                           mitrac(ilon,ilev,1),                   ! H2O vapor   
     388     $                           mitrac(ilon,ilev,2),                   ! H2SO4 vapor
     389     $                           ztrac(ilon,ilev,i_h2oliq),             ! H2O liquid
     390     $                           ztrac(ilon,ilev,i_h2so4liq),           ! H2SO4 liquid
     391     $                           rho(ilon,ilev),mmean(ilon,ilev),       ! density and mean molecular mass
    336392     $                           ztrac(ilon,ilev,i_m0_aer),
    337393     $                           ztrac(ilon,ilev,i_m3_aer),   
     
    339395     $                           ztrac(ilon,ilev,i_m0_mode1ccn),
    340396     $                           ztrac(ilon,ilev,i_m3_mode1sa),
    341      $                           ztrac(ilon,ilev,i_m3_mode1w),   
     397     $                           ztrac(ilon,ilev,i_m3_mode1wv),   
    342398     $                           ztrac(ilon,ilev,i_m3_mode1ccn),   
    343399     $                           ztrac(ilon,ilev,i_m0_mode2drop),
    344400     $                           ztrac(ilon,ilev,i_m0_mode2ccn),
    345401     $                           ztrac(ilon,ilev,i_m3_mode2sa),
    346      $                           ztrac(ilon,ilev,i_m3_mode2w),
     402     $                           ztrac(ilon,ilev,i_m3_mode2wv),
    347403     $                           ztrac(ilon,ilev,i_m3_mode2ccn))
    348                else
    349                   ztrac(ilon,ilev,i_m0_aer)       = 0.
    350                   ztrac(ilon,ilev,i_m3_aer)       = 0.
    351                   ztrac(ilon,ilev,i_m0_mode1drop) = 0.
    352                   ztrac(ilon,ilev,i_m0_mode1ccn)  = 0.
    353                   ztrac(ilon,ilev,i_m3_mode1sa)   = 0.
    354                   ztrac(ilon,ilev,i_m3_mode1w)    = 0.
    355                   ztrac(ilon,ilev,i_m3_mode1ccn)  = 0.
    356                   ztrac(ilon,ilev,i_m0_mode2drop) = 0.
    357                   ztrac(ilon,ilev,i_m0_mode2ccn)  = 0.
    358                   ztrac(ilon,ilev,i_m3_mode2sa)   = 0.
    359                   ztrac(ilon,ilev,i_m3_mode2w)    = 0.
    360                   ztrac(ilon,ilev,i_m3_mode2ccn)  = 0.
    361                end if
     404                  satm1(ilon,ilev) = sat1
     405                  satm2(ilon,ilev) = sat2
     406
     407!    Compute liquids mmr after microphysics
     408
     409                 ztrac(ilon,ilev,i_h2so4liq) = 
     410     $   ((ztrac(ilon,ilev,i_m3_mode1sa)+ztrac(ilon,ilev,i_m3_mode2sa))
     411     $     *(4.D0*PI/3.D0) *RHOas/rho(ilon,ilev) * mmean(ilon,ilev)/MSA)
     412                 ztrac(ilon,ilev,i_h2oliq) =
     413     $   ((ztrac(ilon,ilev,i_m3_mode1wv)+ztrac(ilon,ilev,i_m3_mode2wv))
     414     $     *(4.D0*PI/3.D0)*RHOwv/rho(ilon,ilev) * mmean(ilon,ilev)/MWV)
     415
     416!    Compute tendencides of the vapors
     417
     418         d_tr_micro(:,:,i_h2so4) = MSA/mmean(:,:)*(mitrac(:,:,2)
     419     $                            - ztrac(:,:,i_h2so4))/pdtphys
     420         d_tr_micro(:,:,i_h2o) = MWV/mmean(:,:)*(mitrac(:,:,1)
     421     $                            - ztrac(:,:,i_h2o))/pdtphys
     422
     423!    Saving the radius, WSA and rho of the droplets
     424
     425      r2tab(ilon,ilev)=r2
     426      r1tab(ilon,ilev)=r1
     427
     428       if (((ztrac(ilon,ilev,i_m3_mode1sa)+
     429     $       ztrac(ilon,ilev,i_m3_mode2sa))+
     430     $ (ztrac(ilon,ilev,i_m3_mode1wv)
     431     $ +ztrac(ilon,ilev,i_m3_mode2wv))).gt.
     432     $    1e-30) then
     433
     434         WSAVtab(ilon,ilev)  =
     435     $ (ztrac(ilon,ilev,i_m3_mode1sa)+ztrac(ilon,ilev,i_m3_mode2sa))/
     436     $  ((ztrac(ilon,ilev,i_m3_mode1sa)+ztrac(ilon,ilev,i_m3_mode2sa))+
     437     $   (ztrac(ilon,ilev,i_m3_mode1wv)+ztrac(ilon,ilev,i_m3_mode2wv)))
     438        else
     439      WSAVtab(ilon,ilev)=WSAV
     440       endif
     441         RHOtab(ilon,ilev) = RHOSA
     442         RHtab(ilon,ilev) = SH2SO4*100.D0
     443
     444      end if   
    362445            end do
    363446         end do
    364 
    365447      end if  ! detailed scheme
    366            
    367448!===================================================================
    368449!     photochemistry
     
    431512     $                           sza_local,
    432513     $                           lon(ilon), lat(ilon),
    433      $                           nqmax, nespeuv, iter(ilon,:),
     514     $                           nqmax-nmoment, nespeuv, iter(ilon,:),
    434515     $                           prod_tr(ilon,:,:),
    435516     $                           loss_tr(ilon,:,:),
     
    481562      end if
    482563
    483 
    484564      if (ok_cloud .and. cl_scheme == 2) then
    485          do iq = nqmax-nmicro+1,nqmax
    486             d_tr_chem(:,:,iq) = (ztrac(:,:,iq) - trac(:,:,iq))/pdtphys
    487          end do
    488       end if
     565         d_tr_micro(:,:,i_h2so4liq) = ((MSA/mmean(:,:))*
     566     $       (ztrac(:,:,i_h2so4liq) - momtrac(:,:,i_h2so4liq)))/pdtphys
     567
     568         d_tr_micro(:,:,i_h2oliq) = ((MWV/mmean(:,:))*
     569     $       (ztrac(:,:,i_h2oliq) - momtrac(:,:,i_h2oliq)))/pdtphys
     570
     571
     572         d_tr_micro(:,:,i_m0_aer) = (ztrac(:,:,i_m0_aer)
     573     $            - momtrac(:,:,i_m0_aer))/(rho(:,:)*pdtphys)
     574         d_tr_micro(:,:,i_m3_aer) = (ztrac(:,:,i_m3_aer)
     575     $            - momtrac(:,:,i_m3_aer))/(rho(:,:)*pdtphys)
     576
     577         d_tr_micro(:,:,i_m0_mode1drop) = (ztrac(:,:,i_m0_mode1drop)
     578     $            - momtrac(:,:,i_m0_mode1drop))/(rho(:,:)*pdtphys)
     579         d_tr_micro(:,:,i_m0_mode1ccn) = (ztrac(:,:,i_m0_mode1ccn)
     580     $            - momtrac(:,:,i_m0_mode1ccn))/(rho(:,:)*pdtphys)
     581
     582         d_tr_micro(:,:,i_m3_mode1sa) = (ztrac(:,:,i_m3_mode1sa)
     583     $            - momtrac(:,:,i_m3_mode1sa))/(rho(:,:)*pdtphys)
     584         d_tr_micro(:,:,i_m3_mode1wv) = (ztrac(:,:,i_m3_mode1wv)
     585     $            - momtrac(:,:,i_m3_mode1wv))/(rho(:,:)*pdtphys)
     586         d_tr_micro(:,:,i_m3_mode1ccn) = (ztrac(:,:,i_m3_mode1ccn)
     587     $            - momtrac(:,:,i_m3_mode1ccn))/(rho(:,:)*pdtphys)
     588
     589         d_tr_micro(:,:,i_m0_mode2drop) = (ztrac(:,:,i_m0_mode2drop)
     590     $            - momtrac(:,:,i_m0_mode2drop))/(rho(:,:)*pdtphys)
     591         d_tr_micro(:,:,i_m0_mode2ccn) = (ztrac(:,:,i_m0_mode2ccn)
     592     $            - momtrac(:,:,i_m0_mode2ccn))/(rho(:,:)*pdtphys)
     593
     594         d_tr_micro(:,:,i_m3_mode2sa) = (ztrac(:,:,i_m3_mode2sa)
     595     $            - momtrac(:,:,i_m3_mode2sa))/(rho(:,:)*pdtphys)
     596         d_tr_micro(:,:,i_m3_mode2wv) = (ztrac(:,:,i_m3_mode2wv)
     597     $            - momtrac(:,:,i_m3_mode2wv))/(rho(:,:)*pdtphys)
     598         d_tr_micro(:,:,i_m3_mode2ccn) = (ztrac(:,:,i_m3_mode2ccn)
     599     $            - momtrac(:,:,i_m3_mode2ccn))/(rho(:,:)*pdtphys)
     600        endif
    489601
    490602      end subroutine phytrac_chimie
Note: See TracChangeset for help on using the changeset viewer.