Changeset 1681
- Timestamp:
- Mar 30, 2017, 4:54:02 PM (8 years ago)
- Location:
- trunk/LMDZ.TITAN
- Files:
-
- 10 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.TITAN/README
r1680 r1681 1282 1282 of an initial date and month number and lenght). 1283 1283 1284 == 19/01/2017 == JVO 1285 Custom radiative transfer to Titan : 1286 - enables an altitude dependant molecular fraction for CIA computations 1287 -> read vertical CH4 profile with call_profilgases 1288 -> for now you need a 'profile.def' 1289 -> later you'll read it directly from chemistry 1290 -> gases.def isn't as before (composition for reference level for cpp_mu only) 1291 - added temporary mean aerosol profile opacity routine (disr_haze) 1292 1284 1293 == 21/02/2017 == EM 1285 1294 Added possibility to run without a startfi.nc file (mainly usefull for -
trunk/LMDZ.TITAN/libf/phytitan/disr_haze.F90
r1672 r1681 30 30 integer :: i, j, iw, ip, ierr 31 31 real*8 :: wln, factw, factp 32 real*8 :: tmp_p, fact_t , fact_s, fact_c32 real*8 :: tmp_p, fact_t 33 33 integer,parameter :: nbwl_PL=328, nblev_PL=162 34 34 real*8,save :: ext_PL(nblev_PL,nbwl_PL), ssa_PL(nblev_PL,nbwl_PL) … … 82 82 83 83 !----------------- Interpolate values from the hazetable -------------------- 84 if (iw.ne. nbwl_PL) then 85 factw = (wln-wl_PL(iw)) / (wl_PL(iw+1)-wl_PL(iw)) 86 endif 84 87 85 if(iw.ne.nbwl_PL) then 86 factw = (wln-wl_PL(iw)) / (wl_PL(iw+1)-wl_PL(iw)) 87 else 88 factw = 0. ! If we reach the end of the table we keep the last value 89 endif 90 if(ip.ne.nblev_PL) then 88 if (ip .ne. nblev_PL) then 91 89 factp = (press-press_PL(ip)) / (press_PL(ip+1)-press_PL(ip)) 92 else93 factp=0.94 90 endif 95 91 96 92 ! Lin-Log interpolation : linear on wln, logarithmic on press 97 93 98 if ((iw.ne.nbwl_PL).and.(ip.ne.nblev_PL)) then 94 if((ip.ne.nblev_PL) .and. (iw.ne.nbwl_PL)) then 95 99 96 taeros = ( ext_PL(ip,iw)*(1.-factw) + ext_PL(ip,iw+1) *factw ) ** (1.-factp) & 100 97 *( ext_PL(ip+1,iw)*(1.-factw) + ext_PL(ip+1,iw+1)*factw ) ** factp … … 105 102 cbar = ( asf_PL(ip,iw)*(1.-factw) + asf_PL(ip,iw+1) *factw ) ** (1.-factp) & 106 103 *( asf_PL(ip+1,iw)*(1.-factw) + asf_PL(ip+1,iw+1)*factw ) ** factp 107 else if ((iw.eq.nbwl_PL).and.(ip.ne.nblev_PL)) then108 taeros = ext_PL(ip,iw) ** (1.-factp) * ext_PL(ip+1,iw) ** factp109 104 110 ssa = ssa_PL(ip,iw) ** (1.-factp) * ssa_PL(ip+1,iw) ** factp 105 else if ((ip.ne.nblev_PL) .and. (iw.eq.nbwl_PL)) then 111 106 112 cbar = asf_PL(ip,iw) ** (1.-factp) * asf_PL(ip+1,iw) ** factp 107 taeros = ext_PL(ip,iw)**(1.-factp) * ext_PL(ip+1,iw)**factp 108 109 ssa = ssa_PL(ip,iw)**(1.-factp) * ssa_PL(ip+1,iw)**factp 110 111 cbar = asf_PL(ip,iw)**(1.-factp) * asf_PL(ip+1,iw)**factp 112 113 113 114 114 ! In case of vertical extension over the max of the table 115 115 ! We take the scale height on the last 5 levels (more it's not quite log) 116 116 ! Arbitray threshold pressure value, just to deal with the last level press=0 117 ! We do not touch to ssa and cbar and let them at the value of last level 118 ! (extrap would lead to too dark aerosols) 117 119 118 120 else if(ip.eq.nblev_PL) then … … 124 126 endif 125 127 126 if (iw.ne.nbwl_PL) then 127 fact_t = log10( ( ext_PL(ip,iw)*(1.-factw) + ext_PL(ip,iw+1) *factw ) & 128 / ( ext_PL(ip-5,iw)*(1.-factw) + ext_PL(ip-5,iw+1) *factw ) ) 129 fact_s = log10( ( ssa_PL(ip,iw)*(1.-factw) + ssa_PL(ip,iw+1) *factw ) & 130 / ( ssa_PL(ip-5,iw)*(1.-factw) + ssa_PL(ip-5,iw+1) *factw ) ) 131 fact_c = log10( ( asf_PL(ip,iw)*(1.-factw) + asf_PL(ip,iw+1) *factw ) & 132 / ( asf_PL(ip-5,iw)*(1.-factw) + asf_PL(ip-5,iw+1) *factw ) ) 133 else 134 fact_t = log10( ext_PL(ip,iw) / ext_PL(ip-5,iw) ) 135 fact_s = log10( ssa_PL(ip,iw) / ssa_PL(ip-5,iw) ) 136 fact_c = log10( asf_PL(ip,iw) / asf_PL(ip-5,iw) ) 137 endif 128 if(iw.ne.nbwl_PL) then 129 130 fact_t = log10( ( ext_PL(ip,iw)*(1.-factw) + ext_PL(ip,iw+1) *factw ) & 131 / ( ext_PL(ip-5,iw)*(1.-factw) + ext_PL(ip-5,iw+1) *factw ) ) 132 133 else if (iw.eq.nbwl_PL) then 134 135 fact_t = log10( ext_PL(ip,iw) / ext_PL(ip-5,iw) ) 136 137 endif 138 138 139 139 fact_t = fact_t / log10( press_PL(ip) / press_PL(ip-5) ) 140 fact_s = fact_s / log10( press_PL(ip) / press_PL(ip-5) )141 fact_c = fact_c / log10( press_PL(ip) / press_PL(ip-5) )142 140 143 141 taeros = taeros * ( tmp_p / press_PL(ip) ) ** fact_t 144 ssa = ssa * ( tmp_p / press_PL(ip) ) ** fact_s145 cbar = cbar * ( tmp_p / press_PL(ip) ) ** fact_c146 142 147 143 endif
Note: See TracChangeset
for help on using the changeset viewer.