Ignore:
Timestamp:
Jun 21, 2022, 11:05:40 AM (3 years ago)
Author:
aslmd
Message:

now data for generic tracers are called only one time !

Location:
trunk/LMDZ.GENERIC/libf/phystd
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.GENERIC/libf/phystd/condensation_generic_mod.F90

    r2708 r2711  
    77                pt, pq, pdt, pdq, pdtlsc, pdqvaplsc, pdqliqlsc)
    88        use ioipsl_getin_p_mod, only: getin_p !-> to get the metallicity
    9         use generic_cloud_common_h, only : RLVTT, cpp, &
    10         Psat_generic,Lcpdqsat_generic,specie_parameters,specie_parameters_table
     9        use generic_cloud_common_h
    1110        USE tracer_h
    1211        IMPLICIT none
     
    107106                        end if
    108107                        if (igcm_generic_ice .eq. -1) then
    109                                 write(*,*) "ERROR : You set a vap traceur but you forgot to set the corresponding ice traceur"
     108                                write(*,*) "ERROR : You set a vap traceur but you forgot to set the corresponding ice traceur, &
     109                                or the pair vap/ice is not written one after another in traceur.def"
    110110                        endif
    111111
    112                         ! Need to call specie_parameters of the considered specie
    113                         !call specie_parameters(noms(iq)(9:len(trim(noms(iq)))-4))
    114                         write(*,*) 'looking specie parameters for : ',noms(iq)(1:len(trim(noms(iq)))-4)
    115                         call specie_parameters_table(noms(iq)(1:len(trim(noms(iq)))-4))
    116                        
     112                        m=constants_mass(iq)
     113                        delta_vapH=constants_delta_vapH(iq)
     114                        Tref=constants_Tref(iq)
     115                        Pref=constants_Pref(iq)
     116                        epsi=constants_epsi(iq)
     117                        RLVTT=constants_RLVTT(iq)
     118                        metallicity_coeff=constants_metallicity_coeff(iq)
     119
    117120                        Lcp=RLVTT/cpp ! need to be init here
    118121
  • trunk/LMDZ.GENERIC/libf/phystd/initracer.F90

    r2706 r2711  
    66      USE recombin_corrk_mod, ONLY: ini_recombin
    77      USE mod_phys_lmdz_para, only: is_master, bcast
     8      use generic_cloud_common_h
    89      IMPLICIT NONE
    910!=======================================================================
     
    117118       ENDIF
    118119       IF (.NOT. allocated(is_condensable)) allocate(is_condensable(nq)) !LT
     120       IF (.NOT. allocated(constants_mass)) allocate(constants_mass(nq))
     121       IF (.NOT. allocated(constants_delta_vapH)) allocate(constants_delta_vapH(nq))
     122       IF (.NOT. allocated(constants_Tref)) allocate(constants_Tref(nq))
     123       IF (.NOT. allocated(constants_Pref)) allocate(constants_Pref(nq))
     124       IF (.NOT. allocated(constants_epsi)) allocate(constants_epsi(nq))
     125       IF (.NOT. allocated(constants_RLVTT)) allocate(constants_RLVTT(nq))
     126       IF (.NOT. allocated(constants_metallicity_coeff)) allocate(constants_metallicity_coeff(nq))
     127
    119128       !! initialization
    120129       alpha_lift(:)     = 0.
     
    133142       radius(:)=0.
    134143       qext(:)=0.
    135        is_condensable(:)= 0 !LT
     144
     145       ! For condensable tracers, by Lucas Teinturier and Noé Clément (2022)
     146
     147       is_condensable(:)= 0
     148
     149       constants_mass(:)=0
     150       constants_delta_vapH(:)=0
     151       constants_Tref(:)=0
     152       constants_Pref(:)=0
     153       constants_epsi(:)=0
     154       constants_RLVTT(:)=0
     155       constants_metallicity_coeff(:)=0
     156
    136157       rho_q(:) = 0. !need to be init here if we want to read it from modern traceur with get_tracdat
    137158
     
    192213      igcm_ch3co=0
    193214      igcm_hcaer=0
    194       ! ! LT generic tracers
    195       ! igcm_generic_Fe_vap = 0
    196       ! igcm_generic_Fe_ice = 0
    197       ! igcm_generic_Cr_vap = 0
    198       ! igcm_generic_Cr_ice = 0
    199 
    200215
    201216      ! 1. find dust tracers
     
    435450
    436451      if (is_master) close(407)
     452
     453      ! Get specific data of condensable tracers
     454      do iq=1,nq
     455        if((is_condensable(iq)==1)) then
     456                write(*,*) "There is a specie which is condensable, for generic condensation : ", noms(iq)
     457                write(*,*) 'looking specie parameters for : ',noms(iq)(1:len(trim(noms(iq)))-4)
     458                call specie_parameters_table(noms(iq)(1:len(trim(noms(iq)))-4))
     459                constants_mass(iq)=m
     460                constants_delta_vapH(iq)=delta_vapH
     461                constants_Tref(iq)=Tref
     462                constants_Pref(iq)=Pref
     463                constants_epsi(iq)=epsi
     464                constants_RLVTT(iq)=RLVTT
     465                constants_metallicity_coeff(iq)=metallicity_coeff
     466        else
     467                write(*,*) "This tracer is not condensable, for generic condensation :  : ", noms(iq)
     468                write(*,*) "We keep condensable constants at zero"
     469        endif !(is_condensable(iq)==1) .and. (index(noms(iq),"vap") .ne. 0))
     470      enddo ! iq=1,nq
    437471
    438472      ! Calculate number of species in the chemistry
Note: See TracChangeset for help on using the changeset viewer.