Ignore:
Timestamp:
Jun 29, 2018, 12:31:11 PM (6 years ago)
Author:
Laurent Fairhead
Message:

First attempt at merging with trunk

Location:
LMDZ6/branches/DYNAMICO-conv
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/branches/DYNAMICO-conv

  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/StratAer/aerophys.F90

    r2964 r3356  
    22!
    33MODULE aerophys
     4!
     5  IMPLICIT NONE
    46!
    57  REAL,PARAMETER                         :: ropx=1500.0              ! default aerosol particle mass density [kg/m3]
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/StratAer/interp_sulf_input.F90

    r2752 r3356  
    3232  INTEGER, SAVE :: n_lev   ! number of levels in the input data
    3333  INTEGER n_mth   ! number of months in the input data
    34   REAL OCS_tmp, SO2_tmp
    3534  INTEGER, SAVE :: mth_pre
    3635!$OMP THREADPRIVATE(mth_pre)
     
    238237    DO k=1, klev
    239238      !
    240       OCS_tmp=tr_seri(i,k,id_OCS_strat)
    241       SO2_tmp=tr_seri(i,k,id_SO2_strat)
    242       !--OCS and SO2 prescribed below p_bound
     239      !--OCS and SO2 prescribed back to their clim values below p_bound
    243240      IF (paprs(i,k).GT.p_bound) THEN
     241        budg_3D_backgr_ocs(i,k)=OCS_clim(i,k)-tr_seri(i,k,id_OCS_strat)
     242        budg_3D_backgr_so2(i,k)=SO2_clim(i,k)-tr_seri(i,k,id_SO2_strat)
    244243        tr_seri(i,k,id_OCS_strat)=OCS_clim(i,k)
    245244        tr_seri(i,k,id_SO2_strat)=SO2_clim(i,k)
    246245      ENDIF
    247       budg_3D_backgr_ocs(i,k)=tr_seri(i,k,id_OCS_strat)-OCS_tmp
    248       budg_3D_backgr_so2(i,k)=tr_seri(i,k,id_SO2_strat)-SO2_tmp
    249246    ENDDO
    250247  ENDDO
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/StratAer/micphy_tstep.F90

    r2752 r3356  
    44  USE aerophys
    55  USE infotrac
    6   USE phys_local_var_mod, ONLY: mdw, budg_3D_nucl, budg_3D_cond_evap, R2SO4, DENSO4, f_r_wet
     6  USE phys_local_var_mod, ONLY: mdw, budg_3D_nucl, budg_3D_cond_evap, budg_h2so4_to_part, R2SO4, DENSO4, f_r_wet
    77  USE nucleation_tstep_mod
    88  USE cond_evap_tstep_mod
     
    2525  ! local variables in coagulation routine
    2626  INTEGER, PARAMETER        :: nbtstep=4  ! Max number of time steps in microphysics per time step in physics
    27   INTEGER                   :: it,ilon,ilev,IK,count_tstep
     27  INTEGER                   :: it,ilon,ilev,count_tstep
    2828  REAL                      :: rhoa !H2SO4 number density [molecules/cm3]
    2929  REAL                      :: ntot !total number of molecules in the critical cluster (ntot>4)
     
    4343  REAL H2SO4_sat(nbtr_bin)
    4444
    45   DO IK=1,nbtr_bin
    46     Vbin(IK)=4.0*RPI*((mdw(IK)/2.)**3)/3.0
     45  DO it=1,nbtr_bin
     46    Vbin(it)=4.0*RPI*((mdw(it)/2.)**3)/3.0
    4747  ENDDO
    4848
     
    6464
    6565  DO ilon=1, klon
     66!
     67!--initialisation of diagnostic
     68  budg_h2so4_to_part(ilon)=0.0
     69!
    6670  DO ilev=1, klev
     71!
     72!--initialisation of diagnostic
     73  budg_3D_nucl(ilon,ilev)=0.0
     74  budg_3D_cond_evap(ilon,ilev)=0.0
     75!
    6776  ! only in the stratosphere
    6877  IF (is_strato(ilon,ilev)) THEN
    6978    ! initialize sulfur fluxes
    70     budg_3D_nucl(ilon,ilev)=0.0
    71     budg_3D_cond_evap(ilon,ilev)=0.0
    7279    H2SO4_init=tr_seri(ilon,ilev,id_H2SO4_strat)
    7380    ! adaptive timestep for nucleation and condensation
     
    8895             & RRSI,Vbin,FL,ASO4,DNDR)
    8996      ! consider only condensation (positive FL)
    90       DO IK=1,nbtr_bin
    91         FL(IK)=MAX(FL(IK),0.)
     97      DO it=1,nbtr_bin
     98        FL(it)=MAX(FL(it),0.)
    9299      ENDDO
    93100      ! compute total H2SO4 cond flux for all particles
    94101      cond_evap_rate=0.0
    95       DO IK=1, nbtr_bin
    96         cond_evap_rate=cond_evap_rate+tr_seri(ilon,ilev,IK+nbtr_sulgas)*FL(IK)*mH2SO4mol
     102      DO it=1, nbtr_bin
     103        cond_evap_rate=cond_evap_rate+tr_seri(ilon,ilev,it+nbtr_sulgas)*FL(it)*mH2SO4mol
    97104      ENDDO
    98105      ! determine appropriate time step
     
    124131           & RRSI,Vbin,FL,ASO4,DNDR)
    125132    ! limit evaporation (negative FL) over one physics time step to H2SO4 content of the droplet
    126     DO IK=1,nbtr_bin
    127       FL(IK)=MAX(FL(IK)*pdtphys,0.-ASO4(IK))/pdtphys
     133    DO it=1,nbtr_bin
     134      FL(it)=MAX(FL(it)*pdtphys,0.-ASO4(it))/pdtphys
    128135      ! consider only evap (negative FL)
    129       FL(IK)=MIN(FL(IK),0.)
     136      FL(it)=MIN(FL(it),0.)
    130137    ENDDO
    131138    ! compute total H2SO4 evap flux for all particles
    132139    evap_rate=0.0
    133     DO IK=1, nbtr_bin
    134       evap_rate=evap_rate+tr_seri(ilon,ilev,IK+nbtr_sulgas)*FL(IK)*mH2SO4mol
     140    DO it=1, nbtr_bin
     141      evap_rate=evap_rate+tr_seri(ilon,ilev,it+nbtr_sulgas)*FL(it)*mH2SO4mol
    135142    ENDDO
    136143    ! update H2SO4 concentration after evap
     
    141148    budg_3D_cond_evap(ilon,ilev)=budg_3D_cond_evap(ilon,ilev)+mSatom/mH2SO4mol &
    142149             & *evap_rate*(paprs(ilon,ilev)-paprs(ilon,ilev+1))/RG
     150    ! compute vertically integrated flux due to the net effect of nucleation and condensation/evaporation
     151    budg_h2so4_to_part(ilon)=budg_h2so4_to_part(ilon)+(H2SO4_init-tr_seri(ilon,ilev,id_H2SO4_strat)) &
     152             & *mSatom/mH2SO4mol*(paprs(ilon,ilev)-paprs(ilon,ilev+1))/RG/pdtphys
    143153  ENDIF
    144154  ENDDO
     
    148158    DO ilon=1, klon
    149159    DO ilev=1, klev   
    150     DO IK=1, nbtr
    151       IF (tr_seri(ilon,ilev,IK).LT.0.0) THEN
    152         PRINT *, 'micphy_tstep: negative concentration', tr_seri(ilon,ilev,IK), ilon, ilev, IK
     160    DO it=1, nbtr
     161      IF (tr_seri(ilon,ilev,it).LT.0.0) THEN
     162        PRINT *, 'micphy_tstep: negative concentration', tr_seri(ilon,ilev,it), ilon, ilev, it
    153163      ENDIF
    154164    ENDDO
  • LMDZ6/branches/DYNAMICO-conv/libf/phylmd/StratAer/traccoag_mod.F90

    r2752 r3356  
    203203            !vertically distributed emission
    204204            DO k=1, klev
    205               ! stretch emission over one day of Pinatubo eruption
    206               emission=m_aer_emiss_vol*(mSO2mol/mSatom)/m_air_gridbox(i,k)*f_lay_emiss(k)/1./86400.
     205              ! stretch emission over one day (minus one timestep) of Pinatubo eruption
     206              emission=m_aer_emiss_vol*(mSO2mol/mSatom)/m_air_gridbox(i,k)*f_lay_emiss(k)/1./(86400.-pdtphys)
    207207              tr_seri(i,k,id_SO2_strat)=tr_seri(i,k,id_SO2_strat)+emission*pdtphys
    208208              budg_emi_so2(i)=budg_emi_so2(i)+emission*zdm(k)*mSatom/mSO2mol
Note: See TracChangeset for help on using the changeset viewer.