- Timestamp:
- Aug 28, 2018, 4:22:24 PM (6 years ago)
- Location:
- trunk/LMDZ.GENERIC
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.GENERIC/README
r1987 r1988 1378 1378 Tauaero and tauray are set to 0 (a small value for rayleigh because the code crashes otherwise) in the 4 first semilayers in optcv, but not optci. 1379 1379 This solves random variations of the sw heating at the model top. 1380 1381 == 28/08/2018 == JL 1382 We now shift the radiative model top from p=0 to the middle of the last physical layer. This is done by changing pmid and plevrad in callcorrk and some corrections need to be done in gfluxv. 1383 This seems to get rid of the aratic temperature behavior in the last two layers of the model (especially on the night side on synchronous planets). 1384 Additional speedup corrections have been made in gfluxi that change nothing to the result. 1385 Finally, if aerosols are present in the last layer we must account for them. Provides better upper boundary condition in the IR. They must however be put to zero in the sw (see optcv and changes in last commit.) 1386 This has been done for water ice in aeropacity, but same correction should probably be done for other aerosol types. 1387 -
trunk/LMDZ.GENERIC/libf/phystd/aeropacity.F90
r1677 r1988 219 219 220 220 do ig=1, ngrid 221 do l=1,nlayer-1 ! to stop the rad tran bug 222 221 !do l=1,nlayer-1 ! to stop the rad tran bug 222 do l=1,nlayer !JL18 if aerosols are present in the last layer we must account for them. Provides better upper boundary condition in the IR. They must however be put to zero in the sw (see optcv) 223 ! same correction should b-probably be done for other aerosol types. 223 224 aerosol(ig,l,iaer) = & !modification by BC 224 225 ( 0.75 * QREFvis3d(ig,l,iaer) / & … … 236 237 call totalcloudfrac(ngrid,nlayer,nq,cloudfrac,totcloudfrac,pplev,pq,aerosol(1,1,iaer)) 237 238 do ig=1, ngrid 238 do l=1,nlayer-1 ! to stop the rad tran bug 239 !do l=1,nlayer-1 ! to stop the rad tran bug 240 do l=1,nlayer !JL18 if aerosols are present in the last layer we must account for them. Provides better upper boundary condition in the IR. They must however be put to zero in the sw (see optcv) 239 241 CLFtot = max(totcloudfrac(ig),0.01) 240 242 aerosol(ig,l,iaer)=aerosol(ig,l,iaer)/CLFtot … … 244 246 else 245 247 do ig=1, ngrid 246 do l=1,nlayer-1 ! to stop the rad tran bug 248 !do l=1,nlayer-1 ! to stop the rad tran bug 249 do l=1,nlayer !JL18 if aerosols are present in the last layer we must account for them. Provides better upper boundary condition in the IR. They must however be put to zero in the sw (see optcv) 247 250 CLFtot = CLFfixval 248 251 aerosol(ig,l,iaer)=aerosol(ig,l,iaer)/CLFtot -
trunk/LMDZ.GENERIC/libf/phystd/callcorrk.F90
r1940 r1988 486 486 tauaero(1,iaer) = tauaero(2,iaer) 487 487 !tauaero(1,iaer) = 0. 488 488 !JL18 at time of testing, the two above conditions gave the same results bit for bit. 489 489 490 end do ! naerkind 490 491 … … 665 666 666 667 plevrad(1) = 0. 667 plevrad(2) = 0. !! Trick to have correct calculations of fluxes in gflux(i/v).F, but the pmid levels are not impacted by this change. 668 ! plevrad(2) = 0. !! JL18 enabling this line puts the radiative top at p=0 which was the idea before, but does not seem to perform best after all. 668 669 669 670 tlevrad(1) = tlevrad(2) 670 671 tlevrad(2*nlayer+1)=tsurf(ig) 671 672 672 pmid(1) = max(pgasmin,0.0001*plevrad(3))673 pmid(1) = pplay(ig,nlayer)/scalep 673 674 pmid(2) = pmid(1) 674 675 … … 899 900 ! These are values at top of atmosphere 900 901 dtsw(ig,L_NLAYRAD)=(fmnetv(1)-nfluxtopv) & 901 *glat(ig)/(cpp*scalep*(plevrad(3)-plevrad( 1)))902 *glat(ig)/(cpp*scalep*(plevrad(3)-plevrad(2))) 902 903 dtlw(ig,L_NLAYRAD)=(fmneti(1)-nfluxtopi) & 903 *glat(ig)/(cpp*scalep*(plevrad(3)-plevrad( 1)))904 *glat(ig)/(cpp*scalep*(plevrad(3)-plevrad(2))) 904 905 905 906 -
trunk/LMDZ.GENERIC/libf/phystd/gfluxi.F
r1420 r1988 117 117 TERM = UBARI/(1.0D0-W0(L)*COSBAR(L)) 118 118 119 C CP AND CM ARE THE CPLUS AND CMINUS TERMS EVALUATED AT THE120 C BOTTOM OF THE LAYER. THAT IS AT DTAU OPTICAL DEPTH121 122 CP(L) = B0(L)+B1(L)*DTAU(L) +B1(L)*TERM123 CM(L) = B0(L)+B1(L)*DTAU(L) -B1(L)*TERM124 119 125 120 C CPM1 AND CMM1 ARE THE CPLUS AND CMINUS TERMS EVALUATED … … 128 123 CPM1(L) = B0(L)+B1(L)*TERM 129 124 CMM1(L) = B0(L)-B1(L)*TERM 125 126 C CP AND CM ARE THE CPLUS AND CMINUS TERMS EVALUATED AT THE 127 C BOTTOM OF THE LAYER. THAT IS AT DTAU OPTICAL DEPTH. 128 C JL18 put CP and CM after the calculation of CPM1 and CMM1 to avoid unecessary calculations. 129 130 CP(L) = CPM1(L) +B1(L)*DTAU(L) 131 CM(L) = CMM1(L) +B1(L)*DTAU(L) 130 132 END DO 131 133 -
trunk/LMDZ.GENERIC/libf/phystd/gfluxv.F
r1420 r1988 240 240 C FLUX AT THE Ptop layer 241 241 242 EP = 1.0 243 EM = 1.0 242 ! EP = 1.0 243 ! EM = 1.0 244 C JL18 correction to account for the fact that the radiative top is not at zero optical depth. 245 EXPTRM(L) = MIN(TAUMAX,LAMDA(L)*(TAUCUM(2))) 246 EP = EXP(EXPTRM(L)) 247 EM = 1.0/EP 244 248 G4 = 1.0-G3(1) 245 249 DENOM = LAMDA(1)**2 - 1./UBAR0**2 … … 260 264 C AT THE MIDDLE OF THE LAYER. 261 265 262 CPMID = AP 263 CMMID = AM 266 C CPMID = AP 267 C CMMID = AM 268 C JL18 correction to account for the fact that the radiative top is not at zero optical depth. 269 TAUMID = TAUCUM(2) 270 CPMID = AP*EXP(-TAUMID/UBAR0) 271 CMMID = AM*EXP(-TAUMID/UBAR0) 264 272 265 273 FLUXUP = XK1(1)*EP + GAMA(1)*XK2(1)*EM + CPMID … … 268 276 C ADD THE DIRECT FLUX TO THE DOWNWELLING TERM 269 277 270 fluxdn = fluxdn+UBAR0*F0PI*EXP(-MIN(TAUCUM(1),TAUMAX)/UBAR0) 278 ! fluxdn = fluxdn+UBAR0*F0PI*EXP(-MIN(TAUCUM(1),TAUMAX)/UBAR0) 279 !JL18 the line above assumed that the top of the radiative model was P=0 280 ! it seems to be better for the IR to use the middle of the last physical layer as the radiative top. 281 ! so we correct the downwelling flux below for the calculation of the heating rate 282 fluxdn = fluxdn+UBAR0*F0PI*EXP(-TAUCUM(2)/UBAR0) 271 283 272 284 C This is for the "special" bottom layer, where we take
Note: See TracChangeset
for help on using the changeset viewer.