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/phytitan/optcv.F90

    r1826 r1897  
    1 SUBROUTINE OPTCV(PQ,PLEV,TMID,PMID,  &
     1SUBROUTINE OPTCV(PQO,NLAY,PLEV,TMID,PMID,  &
    22     DTAUV,TAUV,TAUCUMV,WBARV,COSBV,TAURAY,TAUGSURF)
    33
     
    66  use gases_h
    77  use comcstfi_mod, only: g, r
    8   use callkeys_mod, only: continuum,graybody,callgasvis
     8  use callkeys_mod, only: continuum,graybody,callgasvis,callclouds,callmufi,uncoupl_optic_haze
     9  use tracer_h, only: nmicro,nice
     10  use MMP_OPTICS
    911
    1012  implicit none
     
    4143  ! Input/Output
    4244  !==========================================================
    43   REAL*8, INTENT(IN)  :: PQ ! Tracers (kg/kg_of_air).
     45  REAL*8, INTENT(IN)  :: PQO(nlay,nmicro) ! Tracers (X/m2).
     46  INTEGER, INTENT(IN) :: NLAY             ! Number of pressure layers (for pqo)
    4447  REAL*8, INTENT(IN)  :: PLEV(L_LEVELS)
    4548  REAL*8, INTENT(IN)  :: TMID(L_LEVELS), PMID(L_LEVELS)
     
    97100  integer interm
    98101
     102  real*8 m0as,m3as,m0af,m3af
     103  real*8 ext_s,sca_s,ssa_s,asf_s
     104  real*8 ext_f,sca_f,ssa_f,asf_f
     105  logical,save :: firstcall=.true.
     106  !$OMP THREADPRIVATE(firstcall)
     107
     108
    99109  !! AS: to save time in computing continuum (see bilinearbig)
    100110  IF (.not.ALLOCATED(indv)) THEN
     
    149159
    150160     do NW=1,L_NSPECTV
    151 
    152         !================= Titan customisation ========================================
    153         call disr_haze(dz(k),plev(k),wnov(nw),dhaze_T(k,nw),SSA_T(k,nw),ASF_T(k,nw))
    154         ! =============================================================================
     161     
     162        ! Optical coupling of YAMMS is plugged but inactivated (if false) for now
     163        ! as long as the microphysics only isn't fully debugged -- JVO 01/18
     164        IF (callmufi .AND. (.NOT. uncoupl_optic_haze)) THEN
     165          m0as = pqo(ilay,1)
     166          m3as = pqo(ilay,2)
     167          m0af = pqo(ilay,3)
     168          m3af = pqo(ilay,4)
     169
     170          IF (.NOT.mmp_sph_optics_vis(m0as,m3as,nw,ext_s,sca_s,ssa_s,asf_s)) &
     171          CALL abort_gcm("optcv", "Fatal error in mmp_sph_optics_vis", 12)
     172          IF (.NOT.mmp_fra_optics_vis(m0af,m3af,nw,ext_f,sca_f,ssa_f,asf_f)) &
     173          CALL abort_gcm("optcv", "Fatal error in mmp_fra_optics_vis", 12)
     174          dhaze_T(k,nw) = ext_s+ext_f
     175          SSA_T(k,nw)   = (sca_s+sca_f)/dhaze_T(k,nw)
     176          ASF_T(k,nw)   = (asf_s*sca_s + asf_f*sca_f) /(sca_s+sca_f)
     177          IF (callclouds.and.firstcall) &
     178            WRITE(*,*) 'WARNING: In optcv, optical properties &
     179                       &calculations are not implemented yet'
     180        ELSE
     181          ! Call fixed vertical haze profile of extinction - same for all columns
     182          call disr_haze(dz(k),plev(k),wnov(nw),dhaze_T(k,nw),SSA_T(k,nw),ASF_T(k,nw))
     183        ENDIF
    155184         
    156185        DRAYAER = TRAY(K,NW)
     
    355384! ============================================================================== 
    356385
     386  if(firstcall) firstcall = .false.
    357387
    358388  return
Note: See TracChangeset for help on using the changeset viewer.