Changeset 1897 for trunk/LMDZ.TITAN/libf/phytitan/optcv.F90
- Timestamp:
- Jan 24, 2018, 10:24:24 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.TITAN/libf/phytitan/optcv.F90
r1826 r1897 1 SUBROUTINE OPTCV(PQ ,PLEV,TMID,PMID, &1 SUBROUTINE OPTCV(PQO,NLAY,PLEV,TMID,PMID, & 2 2 DTAUV,TAUV,TAUCUMV,WBARV,COSBV,TAURAY,TAUGSURF) 3 3 … … 6 6 use gases_h 7 7 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 9 11 10 12 implicit none … … 41 43 ! Input/Output 42 44 !========================================================== 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) 44 47 REAL*8, INTENT(IN) :: PLEV(L_LEVELS) 45 48 REAL*8, INTENT(IN) :: TMID(L_LEVELS), PMID(L_LEVELS) … … 97 100 integer interm 98 101 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 99 109 !! AS: to save time in computing continuum (see bilinearbig) 100 110 IF (.not.ALLOCATED(indv)) THEN … … 149 159 150 160 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 155 184 156 185 DRAYAER = TRAY(K,NW) … … 355 384 ! ============================================================================== 356 385 386 if(firstcall) firstcall = .false. 357 387 358 388 return
Note: See TracChangeset
for help on using the changeset viewer.