Changeset 1988


Ignore:
Timestamp:
Aug 28, 2018, 4:22:24 PM (6 years ago)
Author:
jleconte
Message:

28/08/2018 == JL

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.
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).
Additional speedup corrections have been made in gfluxi that change nothing to the result.
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.)
This has been done for water ice in aeropacity, but same correction should probably be done for other aerosol types.

Location:
trunk/LMDZ.GENERIC
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.GENERIC/README

    r1987 r1988  
    13781378Tauaero 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.
    13791379This solves random variations of the sw heating at the model top.
     1380
     1381== 28/08/2018 == JL
     1382We 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.
     1383This 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).
     1384Additional speedup corrections have been made in gfluxi that change nothing to the result.
     1385Finally, 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.)
     1386This 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  
    219219
    220220               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.
    223224                     aerosol(ig,l,iaer) =                                    & !modification by BC
    224225                          (  0.75 * QREFvis3d(ig,l,iaer) /        &
     
    236237                  call totalcloudfrac(ngrid,nlayer,nq,cloudfrac,totcloudfrac,pplev,pq,aerosol(1,1,iaer))
    237238                  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)
    239241                        CLFtot  = max(totcloudfrac(ig),0.01)
    240242                        aerosol(ig,l,iaer)=aerosol(ig,l,iaer)/CLFtot
     
    244246               else
    245247                  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)
    247250                        CLFtot  = CLFfixval
    248251                        aerosol(ig,l,iaer)=aerosol(ig,l,iaer)/CLFtot
  • trunk/LMDZ.GENERIC/libf/phystd/callcorrk.F90

    r1940 r1988  
    486486            tauaero(1,iaer)          = tauaero(2,iaer)
    487487            !tauaero(1,iaer)          = 0.
    488            
     488            !JL18 at time of testing, the two above conditions gave the same results bit for bit.
     489           
    489490         end do ! naerkind
    490491
     
    665666     
    666667      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.
    668669
    669670      tlevrad(1) = tlevrad(2)
    670671      tlevrad(2*nlayer+1)=tsurf(ig)
    671672     
    672       pmid(1) = max(pgasmin,0.0001*plevrad(3))
     673      pmid(1) = pplay(ig,nlayer)/scalep
    673674      pmid(2) =  pmid(1)
    674675
     
    899900!     These are values at top of atmosphere
    900901         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)))
    902903         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)))
    904905
    905906
  • trunk/LMDZ.GENERIC/libf/phystd/gfluxi.F

    r1420 r1988  
    117117        TERM    = UBARI/(1.0D0-W0(L)*COSBAR(L))
    118118
    119 C       CP AND CM ARE THE CPLUS AND CMINUS TERMS EVALUATED AT THE
    120 C       BOTTOM OF THE LAYER.  THAT IS AT DTAU OPTICAL DEPTH
    121 
    122         CP(L) = B0(L)+B1(L)*DTAU(L) +B1(L)*TERM
    123         CM(L) = B0(L)+B1(L)*DTAU(L) -B1(L)*TERM
    124119
    125120C       CPM1 AND CMM1 ARE THE CPLUS AND CMINUS TERMS EVALUATED
     
    128123        CPM1(L) = B0(L)+B1(L)*TERM
    129124        CMM1(L) = B0(L)-B1(L)*TERM
     125
     126C       CP AND CM ARE THE CPLUS AND CMINUS TERMS EVALUATED AT THE
     127C       BOTTOM OF THE LAYER.  THAT IS AT DTAU OPTICAL DEPTH.
     128C       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)
    130132      END DO
    131133 
  • trunk/LMDZ.GENERIC/libf/phystd/gfluxv.F

    r1420 r1988  
    240240C     FLUX AT THE Ptop layer
    241241
    242       EP    = 1.0
    243       EM    = 1.0
     242!      EP    = 1.0
     243!      EM    = 1.0
     244C 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
    244248      G4    = 1.0-G3(1)
    245249      DENOM = LAMDA(1)**2 - 1./UBAR0**2
     
    260264C     AT THE MIDDLE OF THE LAYER.
    261265
    262       CPMID  = AP
    263       CMMID  = AM
     266C      CPMID  = AP
     267C      CMMID  = AM
     268C 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)
    264272
    265273      FLUXUP = XK1(1)*EP + GAMA(1)*XK2(1)*EM + CPMID
     
    268276C     ADD THE DIRECT FLUX TO THE DOWNWELLING TERM
    269277
    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)
    271283
    272284C     This is for the "special" bottom layer, where we take
Note: See TracChangeset for help on using the changeset viewer.