Ignore:
Timestamp:
Jan 24, 2018, 10:24:24 PM (7 years ago)
Author:
jvatant
Message:

Making Titan's hazy again - part II
+ Major updates of J.Burgalat YAMMS library and optical coupling, including :
++ Added the routines for haze optics inside YAMMS
++ Calling rad. transf. with interactive haze is plugged
in but should stay unactive as long as the microphysics is
in test phase : cf "uncoupl_optic_haze" flag : true for now !
++ Also some sanity checks for negative tendencies and
some others upkeep of YAMMS model
+ Also added a temporary CPP key USE_QTEST in physiq_mod
that enables to have microphysical tendencies separated
from dynamics for debugging and test phases
-- JVO and JB

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.TITAN/libf/muphytitan/mm_microphysic.f90

    r1819 r1897  
    1 ! Copyright 2013-2015 Université de Reims Champagne-Ardenne
     1! Copyright 2013-2015,2017 Université de Reims Champagne-Ardenne
    22! Contributor: J. Burgalat (GSMA, URCA)
    33! email of the author : jeremie.burgalat@univ-reims.fr
     
    3535!! brief: Microphysic processes interface module.
    3636!! author: J. Burgalat
    37 !! date: 2013-2015
     37!! date: 2013-2015,2017
    3838
    3939MODULE MM_MICROPHYSIC
     
    111111      ! add temporary aerosols tendencies (-> m-3)
    112112      dm0a_f = dm0a_f + zdm0a_f  ; dm3a_f = dm3a_f + zdm3a_f
    113       ! sanity check for clouds tendencies
    114       WHERE (mm_m0ccn+dm0n*mm_dzlev < 0) ; dm0n = -mm_m0ccn/mm_dzlev ; END WHERE
    115       WHERE (mm_m3ccn+dm3n*mm_dzlev < 0) ; dm3n = -mm_m3ccn/mm_dzlev ; END WHERE
    116 
    117113      ! reverse directly clouds tendencies (-> m-2)
    118114      dm0n   = dm0n(mm_nla:1:-1) * mm_dzlev(mm_nla:1:-1)
    119115      dm3n   = dm3n(mm_nla:1:-1) * mm_dzlev(mm_nla:1:-1)
     116      ! sanity check for clouds tendencies
     117      WHERE (mm_m0ccn+dm0n < 0) ; dm0n = -mm_m0ccn ; END WHERE
     118      WHERE (mm_m3ccn+dm3n < 0) ; dm3n = -mm_m3ccn ; END WHERE
    120119      DO i=1,mm_nesp
    121120        dm3i(:,i)  = dm3i(mm_nla:1:-1,i)  * mm_dzlev(mm_nla:1:-1)
    122         WHERE (mm_m3ccn+dm3n*mm_dzlev < 0) ; dm3n = -mm_m3ccn/mm_dzlev ; END WHERE
     121        WHERE (mm_m3ice+dm3i < 0) ; dm3i = -mm_m3ice ; END WHERE
    123122        dgazs(:,i) = dgazs(mm_nla:1:-1,i)
    124123        ! no sanity check for gazs, let's prey.
     
    127126      dm0n = 0._mm_wp ; dm3n = 0._mm_wp ; dm3i = 0._mm_wp ; dgazs = 0._mm_wp
    128127    ENDIF
    129     ! sanity check
    130     WHERE (mm_m0aer_s+dm0a_s*mm_dzlev < 0) ; dm0a_s = -mm_m0aer_s/mm_dzlev ; END WHERE
    131     WHERE (mm_m3aer_s+dm3a_f*mm_dzlev < 0) ; dm3a_s = -mm_m3aer_s/mm_dzlev ; END WHERE
    132     WHERE (mm_m0aer_f+dm0a_f*mm_dzlev < 0) ; dm0a_f = -mm_m0aer_f/mm_dzlev ; END WHERE
    133     WHERE (mm_m3aer_f+dm3a_f*mm_dzlev < 0) ; dm3a_f = -mm_m3aer_f/mm_dzlev ; END WHERE
    134 
    135128    ! multiply by altitude thickness and reverse vectors so they go from ground to top :)
    136129    dm0a_s = dm0a_s(mm_nla:1:-1) * mm_dzlev(mm_nla:1:-1)
     
    138131    dm0a_f = dm0a_f(mm_nla:1:-1) * mm_dzlev(mm_nla:1:-1)
    139132    dm3a_f = dm3a_f(mm_nla:1:-1) * mm_dzlev(mm_nla:1:-1)
     133    ! sanity check
     134    WHERE (mm_m0aer_s+dm0a_s < 0) ; dm0a_s = -mm_m0aer_s ; END WHERE
     135    WHERE (mm_m3aer_s+dm3a_f < 0) ; dm3a_s = -mm_m3aer_s ; END WHERE
     136    WHERE (mm_m0aer_f+dm0a_f < 0) ; dm0a_f = -mm_m0aer_f ; END WHERE
     137    WHERE (mm_m3aer_f+dm3a_f < 0) ; dm3a_f = -mm_m3aer_f ; END WHERE
    140138   
    141139    RETURN
     
    167165    ! Calls haze microphysics
    168166    call mm_haze_microphysics(dm0a_s,dm3a_s,dm0a_f,dm3a_f)
    169     ! sanity check
    170     WHERE (mm_m0aer_s+dm0a_s*mm_dzlev < 0) ; dm0a_s = -mm_m0aer_s/mm_dzlev ; END WHERE
    171     WHERE (mm_m3aer_s+dm3a_f*mm_dzlev < 0) ; dm3a_s = -mm_m3aer_s/mm_dzlev ; END WHERE
    172     WHERE (mm_m0aer_f+dm0a_f*mm_dzlev < 0) ; dm0a_f = -mm_m0aer_f/mm_dzlev ; END WHERE
    173     WHERE (mm_m3aer_f+dm3a_f*mm_dzlev < 0) ; dm3a_f = -mm_m3aer_f/mm_dzlev ; END WHERE
    174167    ! reverse vectors so they go from ground to top :)
    175168    dm0a_s = dm0a_s(mm_nla:1:-1) * mm_dzlev(mm_nla:1:-1)
     
    177170    dm0a_f = dm0a_f(mm_nla:1:-1) * mm_dzlev(mm_nla:1:-1)
    178171    dm3a_f = dm3a_f(mm_nla:1:-1) * mm_dzlev(mm_nla:1:-1)
     172    ! sanity check
     173    WHERE (mm_m0aer_s+dm0a_s < 0) ; dm0a_s = -mm_m0aer_s ; END WHERE
     174    WHERE (mm_m3aer_s+dm3a_f < 0) ; dm3a_s = -mm_m3aer_s ; END WHERE
     175    WHERE (mm_m0aer_f+dm0a_f < 0) ; dm0a_f = -mm_m0aer_f ; END WHERE
     176    WHERE (mm_m3aer_f+dm3a_f < 0) ; dm3a_f = -mm_m3aer_f ; END WHERE
    179177    RETURN
    180178  END FUNCTION muphys_nocld
Note: See TracChangeset for help on using the changeset viewer.