Ignore:
Timestamp:
Jan 28, 2026, 11:32:11 AM (4 weeks ago)
Author:
debatzbr
Message:

Pluto PCM: Improve haze microphysics - Updated tracers.
BBT

Location:
trunk/LMDZ.PLUTO/libf/muphypluto
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.PLUTO/libf/muphypluto/mp2m_globals.F90

    r3957 r4032  
    3030    !        - Vertical structure part
    3131    !
    32     !     The module also contains twenty methods:
     32    !     The module also contains twenty-one methods:
    3333    !        - mm_global_init_0
    3434    !        - mm_global_init_1
     
    3636    !        - mm_aerosols_init
    3737    !        - mm_clouds_init
    38     !        - mm_alpha_s, mm_alpha_f
     38    !        - mm_alpha_s, mm_alpha_f, mm_alpha_ccn
    3939    !        - mm_set_moments_thresholds
    4040    !        - mm_get_rcs, mm_get_rcf
     
    8080    ! Moments parameters (mm_aerosols_init)
    8181    PROTECTED :: mm_m0aer_s, mm_m3aer_s, mm_m0aer_f, mm_m3aer_f
    82     ! Moments parameters (derived, are updated with moments parameters)
    83     PROTECTED :: mm_rcs, mm_rcf
    8482    ! Thresholds parameters
    8583    PROTECTED :: mm_m0as_min, mm_m3as_min, mm_rcs_min, mm_m0af_min, mm_m3af_min, mm_rcf_min
     
    11701168    END FUNCTION mm_alpha_f
    11711169
     1170    PURE FUNCTION mm_alpha_ccn(k) RESULT (res)
     1171      !! Inter-moment relation for fractal aerosols size distribution law.
     1172      !! Mk / M0 = rc^k . alpha(k)
     1173      !!
     1174      REAL(kind=mm_wp), INTENT(in) :: k ! k order of the moment.
     1175      REAL(kind=mm_wp) :: sigma         ! Standard deviation.
     1176      REAL(kind=mm_wp) :: res           ! Alpha value.
     1177
     1178      ! Pluto's case
     1179      !~~~~~~~~~~~~~
     1180      sigma = 0.2_mm_wp
     1181      res = exp(k**2 * sigma**2 / 2._mm_wp)
     1182     
     1183      RETURN
     1184    END FUNCTION mm_alpha_ccn
     1185
    11721186
    11731187    !============================================================================
  • trunk/LMDZ.PLUTO/libf/muphypluto/mp2m_haze.F90

    r3952 r4032  
    7676      ! Local variables:
    7777      !~~~~~~~~~~~~~~~~~
    78       REAL(kind=mm_wp), DIMENSION(:), ALLOCATABLE :: zdm0as
    79       REAL(kind=mm_wp), DIMENSION(:), ALLOCATABLE :: zdm3as
    80       REAL(kind=mm_wp), DIMENSION(:), ALLOCATABLE :: zdm0af
    81       REAL(kind=mm_wp), DIMENSION(:), ALLOCATABLE :: zdm3af
     78      ! Updated tracers with haze related processes tendencies
     79      REAL(kind=mm_wp), DIMENSION(:), ALLOCATABLE :: m0as,m3as
     80      REAL(kind=mm_wp), DIMENSION(:), ALLOCATABLE :: m0af,m3af
     81      ! Temporary tendencies through production/coagulation/sedimentation
     82      REAL(kind=mm_wp), DIMENSION(:), ALLOCATABLE :: pdm0as,pdm3as
     83      REAL(kind=mm_wp), DIMENSION(:), ALLOCATABLE :: cdm0as,cdm3as,cdm0af,cdm3af
     84      REAL(kind=mm_wp), DIMENSION(:), ALLOCATABLE :: zdm0as,zdm3as,zdm0af,zdm3af
    8285 
    8386      ! Initialization:
    8487      !~~~~~~~~~~~~~~~~
    85       dm0a_s = 0._mm_wp
    86       dm3a_s = 0._mm_wp
    87       dm0a_f = 0._mm_wp
    88       dm3a_f = 0._mm_wp
    89  
     88      ALLOCATE(m0as(mm_nla),m3as(mm_nla),m0af(mm_nla),m3af(mm_nla))
     89      ALLOCATE(pdm0as(mm_nla),pdm3as(mm_nla))
     90      ALLOCATE(cdm0as(mm_nla),cdm3as(mm_nla),cdm0af(mm_nla),cdm3af(mm_nla))
    9091      ALLOCATE(zdm0as(mm_nla),zdm3as(mm_nla),zdm0af(mm_nla),zdm3af(mm_nla))
    91       zdm0as(1:mm_nla) = 0._mm_wp
    92       zdm3as(1:mm_nla) = 0._mm_wp
    93       zdm0af(1:mm_nla) = 0._mm_wp
    94       zdm3af(1:mm_nla) = 0._mm_wp
    95  
     92     
     93      m0as(:) = mm_m0aer_s ; m3as(:) = mm_m3aer_s
     94      m0af(:) = mm_m0aer_f ; m3af(:) = mm_m3aer_f
     95     
     96      dm0a_s = 0._mm_wp ; dm3a_s = 0._mm_wp
     97      dm0a_f = 0._mm_wp ; dm3a_f = 0._mm_wp
     98
     99      pdm0as(1:mm_nla) = 0._mm_wp ; pdm3as(1:mm_nla) = 0._mm_wp
     100      cdm0as(1:mm_nla) = 0._mm_wp ; cdm3as(1:mm_nla) = 0._mm_wp
     101      cdm0af(1:mm_nla) = 0._mm_wp ; cdm3af(1:mm_nla) = 0._mm_wp
     102      zdm0as(1:mm_nla) = 0._mm_wp ; zdm3as(1:mm_nla) = 0._mm_wp
     103      zdm0af(1:mm_nla) = 0._mm_wp ; zdm3af(1:mm_nla) = 0._mm_wp
    96104
    97105      ! Microphysical processes:
    98106      !~~~~~~~~~~~~~~~~~~~~~~~~~
    99107     
    100       ! Coagulation
    101       IF (mm_call_hazecoag) THEN
    102         call mm_haze_coagulation(dm0a_s,dm3a_s,dm0a_f,dm3a_f)
    103       ENDIF
    104  
    105       ! Sedimentation
    106       IF (mm_call_hazesed) THEN
    107         call mm_haze_sedimentation(zdm0as,zdm3as,zdm0af,zdm3af)
    108  
    109         ! Computes precipitation
    110         mm_aers_prec = SUM(zdm3as*mm_dzlev*mm_rhoaer)
    111         mm_aerf_prec = SUM(zdm3af*mm_dzlev*mm_rhoaer)
    112  
    113         ! Updates tendencies
    114         dm0a_s = dm0a_s + zdm0as
    115         dm3a_s = dm3a_s + zdm3as
    116         dm0a_f = dm0a_f + zdm0af
    117         dm3a_f = dm3a_f + zdm3af
    118       ENDIF
    119  
    120108      ! Production
    121109      IF (mm_call_hazeprod) THEN
    122110        ! Production by photolysis of CH4
    123111        IF (mm_call_CH4hazeprod) THEN
    124           dm0a_s = dm0a_s + (m3a_s_prod / (mm_rc_prod**3 * mm_alpha_s(3._mm_wp)))
    125           dm3a_s = dm3a_s + m3a_s_prod
     112          pdm0as = m3a_s_prod / (mm_rc_prod**3 * mm_alpha_s(3._mm_wp))
     113          pdm3as = m3a_s_prod
    126114        ELSE
    127           call mm_haze_production(zdm0as,zdm3as)
    128           dm0a_s = dm0a_s + zdm0as
    129           dm3a_s = dm3a_s + zdm3as
     115          call mm_haze_production(pdm0as,pdm3as)
    130116        ENDIF
     117
     118        ! Update tracers
     119        m0as = m0as + pdm0as ; m3as = m3as + pdm3as
     120        WHERE(m3as > 0._mm_wp .AND. m0as > 0._mm_wp)
     121          mm_rcs = mm_get_rcs(m0as,m3as)
     122        ELSEWHERE
     123          mm_rcs = 0._mm_wp
     124        ENDWHERE
    131125      ENDIF
     126
     127      ! Coagulation
     128      IF (mm_call_hazecoag) THEN
     129        call mm_haze_coagulation(m0as,m3as,m0af,m3af,cdm0as,cdm3as,cdm0af,cdm3af)
     130
     131        ! Update tracers
     132        m0as = m0as + cdm0as ; m3as = m3as + cdm3as
     133        m0af = m0af + cdm0af ; m3af = m3af + cdm3af
     134        WHERE(m3as > 0._mm_wp .AND. m0as > 0._mm_wp)
     135          mm_rcs = mm_get_rcs(m0as,m3as)
     136        ELSEWHERE
     137          mm_rcs = 0._mm_wp
     138        ENDWHERE
     139        WHERE(m3af > 0._mm_wp .AND. m0af > 0._mm_wp)
     140          mm_rcf = mm_get_rcf(m0af,m3af)
     141        ELSEWHERE
     142          mm_rcf = 0._mm_wp
     143        ENDWHERE
     144      ENDIF
     145 
     146      ! Sedimentation
     147      IF (mm_call_hazesed) THEN
     148        call mm_haze_sedimentation(m0as,m3as,m0af,m3af,zdm0as,zdm3as,zdm0af,zdm3af)
     149
     150        ! Update tracers
     151        m0as = m0as + zdm0as ; m3as = m3as + zdm3as
     152        m0af = m0af + zdm0af ; m3af = m3af + zdm3af
     153        WHERE(m3as > 0._mm_wp .AND. m0as > 0._mm_wp)
     154          mm_rcs = mm_get_rcs(m0as,m3as)
     155        ELSEWHERE
     156          mm_rcs = 0._mm_wp
     157        ENDWHERE
     158        WHERE(m3af > 0._mm_wp .AND. m0af > 0._mm_wp)
     159          mm_rcf = mm_get_rcf(m0af,m3af)
     160        ELSEWHERE
     161          mm_rcf = 0._mm_wp
     162        ENDWHERE
     163 
     164        ! Computes precipitation
     165        mm_aers_prec = SUM(zdm3as*mm_dzlev*mm_rhoaer)
     166        mm_aerf_prec = SUM(zdm3af*mm_dzlev*mm_rhoaer)
     167      ENDIF
     168
     169      ! Updates tendencies:
     170      !~~~~~~~~~~~~~~~~~~~~
     171      dm0a_s = pdm0as + cdm0as + zdm0as
     172      dm3a_s = pdm3as + cdm3as + zdm3as
     173      dm0a_f = cdm0af + zdm0af
     174      dm3a_f = cdm3af + zdm3af
    132175 
    133176      RETURN
     
    187230    !============================================================================
    188231 
    189     SUBROUTINE mm_haze_sedimentation(dm0s,dm3s,dm0f,dm3f)
     232    SUBROUTINE mm_haze_sedimentation(m0as,m3as,m0af,m3af,dm0s,dm3s,dm0f,dm3f)
    190233      !! Interface to sedimentation algorithm.
    191234      !!
     
    193236      !! through sedimentation process and returns their tendencies for a timestep.
    194237      !!
     238      ! 0th and 3rd order moment of the aerosols (spherical mode) component.
     239      REAL(kind=mm_wp), DIMENSION(:), INTENT(in)  :: m0as ! (m-3)
     240      REAL(kind=mm_wp), DIMENSION(:), INTENT(in)  :: m3as ! (m3.m-3)
     241      ! 0th and 3rd order moment of the aerosols (fractal mode) component.
     242      REAL(kind=mm_wp), DIMENSION(:), INTENT(in)  :: m0af ! (m-3)
     243      REAL(kind=mm_wp), DIMENSION(:), INTENT(in)  :: m3af ! (m3.m-3)
    195244      ! Tendency of the 0th order moment of the spherical mode (m-3).
    196245      REAL(kind=mm_wp), INTENT(out), DIMENSION(:) :: dm0s
     
    214263        call get_weff(0._mm_wp,3._mm_wp,mm_rcs,mm_dt,mm_alpha_s,wth)
    215264       
    216         call let_me_fall_in_peace(mm_m0aer_s,-wth,mm_dt,dm0s)
    217         call let_me_fall_in_peace(mm_m3aer_s,-wth,mm_dt,dm3s)
     265        call let_me_fall_in_peace(m0as,-wth,mm_dt,dm0s)
     266        call let_me_fall_in_peace(m3as,-wth,mm_dt,dm3s)
    218267
    219268        ! Get settling velocity and mass flux
    220269        mm_m0as_vsed(:)  = wth(1:mm_nla)
    221270        mm_m3as_vsed(:)  = wth(1:mm_nla)
    222         mm_aer_s_flux(:) = (mm_m3aer_s * mm_rhoaer) * wth(2:)
     271        mm_aer_s_flux(:) = (m3as * mm_rhoaer) * wth(2:)
    223272       
    224273        ! Fractal particles
    225274        call get_weff(0._mm_wp,mm_df,mm_rcf,mm_dt,mm_alpha_f,wth)
    226275       
    227         call let_me_fall_in_peace(mm_m0aer_f,-wth,mm_dt,dm0f)
    228         call let_me_fall_in_peace(mm_m3aer_f,-wth,mm_dt,dm3f)
     276        call let_me_fall_in_peace(m0af,-wth,mm_dt,dm0f)
     277        call let_me_fall_in_peace(m3af,-wth,mm_dt,dm3f)
    229278       
    230279        ! Get settling velocity and mass flux
    231280        mm_m0af_vsed(:)  = wth(1:mm_nla)
    232281        mm_m3af_vsed(:)  = wth(1:mm_nla)
    233         mm_aer_f_flux(:) = (mm_m3aer_f * mm_rhoaer) * wth(2:)
     282        mm_aer_f_flux(:) = (m3af * mm_rhoaer) * wth(2:)
    234283     
    235284      ! Force settling velocity to M3
     
    239288        call get_weff(3._mm_wp,3._mm_wp,mm_rcs,mm_dt,mm_alpha_s,wth)
    240289       
    241         call let_me_fall_in_peace(mm_m3aer_s,-wth,mm_dt,dm3s)
    242         call let_me_fall_in_peace(mm_m0aer_s,-wth,mm_dt,dm0s)
     290        call let_me_fall_in_peace(m3as,-wth,mm_dt,dm3s)
     291        call let_me_fall_in_peace(m0as,-wth,mm_dt,dm0s)
    243292       
    244293        ! Get settling velocity and mass flux
    245294        mm_m3as_vsed(:)  = wth(1:mm_nla)
    246295        mm_m0as_vsed(:)  = wth(1:mm_nla)
    247         mm_aer_s_flux(:) = (mm_m3aer_s * mm_rhoaer) * wth(2:)
     296        mm_aer_s_flux(:) = (m3as * mm_rhoaer) * wth(2:)
    248297       
    249298        ! Fractal particles
    250299        call get_weff(3._mm_wp,mm_df,mm_rcf,mm_dt,mm_alpha_f,wth)
    251300       
    252         call let_me_fall_in_peace(mm_m3aer_f,-wth,mm_dt,dm3f)
    253         call let_me_fall_in_peace(mm_m0aer_f,-wth,mm_dt,dm0f)
     301        call let_me_fall_in_peace(m3af,-wth,mm_dt,dm3f)
     302        call let_me_fall_in_peace(m0af,-wth,mm_dt,dm0f)
    254303
    255304        ! Get settling velocity and mass flux
    256305        mm_m3af_vsed(:) = wth(1:mm_nla)
    257306        mm_m0af_vsed(:) = wth(1:mm_nla)
    258         mm_aer_f_flux(:) = (mm_m3aer_f * mm_rhoaer) * wth(2:)
     307        mm_aer_f_flux(:) = (m3af * mm_rhoaer) * wth(2:)
    259308     
    260309      ! No forcing of settling velocity (might be a problem...)
     
    263312        ! Spherical particles
    264313        call get_weff(0._mm_wp,3._mm_wp,mm_rcs,mm_dt,mm_alpha_s,wth)
    265         call let_me_fall_in_peace(mm_m0aer_s,-wth,mm_dt,dm0s)
     314        call let_me_fall_in_peace(m0as,-wth,mm_dt,dm0s)
    266315       
    267316        ! Get settling velocity
     
    269318       
    270319        call get_weff(3._mm_wp,3._mm_wp,mm_rcs,mm_dt,mm_alpha_s,wth)
    271         call let_me_fall_in_peace(mm_m3aer_s,-wth,mm_dt,dm3s)
     320        call let_me_fall_in_peace(m3as,-wth,mm_dt,dm3s)
    272321       
    273322        ! Get settling velocity
     
    275324       
    276325        ! Get mass flux
    277         mm_aer_s_flux(:) = (mm_m3aer_s * mm_rhoaer) * wth(2:)
     326        mm_aer_s_flux(:) = (m3as * mm_rhoaer) * wth(2:)
    278327       
    279328        ! Fractal aerosols
    280329        call get_weff(0._mm_wp,mm_df,mm_rcf,mm_dt,mm_alpha_f,wth)
    281         call let_me_fall_in_peace(mm_m0aer_f,-wth,mm_dt,dm0f)
     330        call let_me_fall_in_peace(m0af,-wth,mm_dt,dm0f)
    282331       
    283332        ! Get settling velocity
     
    285334       
    286335        call get_weff(3._mm_wp,mm_df,mm_rcf,mm_dt,mm_alpha_f,wth)
    287         call let_me_fall_in_peace(mm_m3aer_f,-wth,mm_dt,dm3f)
     336        call let_me_fall_in_peace(m3af,-wth,mm_dt,dm3f)
    288337       
    289338        ! Get settling velocity
     
    291340       
    292341        ! Get mass flux
    293         mm_aer_f_flux(:) = (mm_m3aer_f * mm_rhoaer) * wth(2:)
     342        mm_aer_f_flux(:) = (m3af * mm_rhoaer) * wth(2:)
    294343      ENDIF
    295344
     
    457506    !============================================================================
    458507 
    459     SUBROUTINE mm_haze_coagulation(dM0s,dM3s,dM0f,dM3f)
     508    SUBROUTINE mm_haze_coagulation(m0as,m3as,m0af,m3af,dM0s,dM3s,dM0f,dM3f)
    460509      !! Get the evolution of the aerosols moments vertical column due to coagulation process.
    461510      !!
     
    471520      !! a floating point exception occured (i.e. a NaN) as we perform a division by zero
    472521      !!
     522      ! 0th and 3rd order moment of the aerosols (spherical mode) component.
     523      REAL(kind=mm_wp), DIMENSION(:), INTENT(in)  :: m0as ! (m-3)
     524      REAL(kind=mm_wp), DIMENSION(:), INTENT(in)  :: m3as ! (m3.m-3)
     525      ! 0th and 3rd order moment of the aerosols (fractal mode) component.
     526      REAL(kind=mm_wp), DIMENSION(:), INTENT(in)  :: m0af ! (m-3)
     527      REAL(kind=mm_wp), DIMENSION(:), INTENT(in)  :: m3af ! (m3.m-3)
    473528      ! Tendency of the 0th order moment of the spherical size-distribution over a time step (m-3).
    474529      REAL(kind=mm_wp), INTENT(out), DIMENSION(:) :: dM0s
     
    661716      ! When X appears as square we set one X at t+1, the other a t.
    662717      ! --- dM0s
    663       tmp(:) = mm_dt * (a_ss*mm_m0aer_s - a_sf*mm_m0aer_f)
    664       dm0s(:) =  mm_m0aer_s * (tmp / (1._mm_wp - tmp))
     718      tmp(:) = mm_dt * (a_ss*m0as - a_sf*m0af)
     719      dm0s(:) =  m0as * (tmp / (1._mm_wp - tmp))
    665720      ! --- dM0f
    666       tmp(:) = mm_dt * b_ff * mm_m0aer_f
    667       dm0f(:) = (b_ss*mm_dt*mm_m0aer_s**2 - tmp*mm_m0aer_f) / (1._mm_wp + tmp)
     721      tmp(:) = mm_dt * b_ff * m0af
     722      dm0f(:) = (b_ss*mm_dt*m0as**2 - tmp*m0af) / (1._mm_wp + tmp)
    668723      ! --- dM3s
    669       tmp(:) = mm_dt * (c_ss*mm_m3aer_s - c_sf*mm_m3aer_f)
    670       dm3s(:) =  mm_m3aer_s * (tmp / (1._mm_wp - tmp))
     724      tmp(:) = mm_dt * (c_ss*m3as - c_sf*m3af)
     725      dm3s(:) =  m3as * (tmp / (1._mm_wp - tmp))
    671726      ! --- dM3f
    672727      dm3f(:) = -dm3s
Note: See TracChangeset for help on using the changeset viewer.