Ignore:
Timestamp:
Mar 10, 2020, 4:59:49 PM (5 years ago)
Author:
jvatant
Message:

Fix a bug in the 2-layers aerosol scheme in aeropacity.F90
-> It appeared that the normalization for total column optical depth was a

wrong way to go, the actual strato and tropo values weren't matcihing the
input values, and one of the main consequence was to strongly underestimate
the actual strato optical depth compared to input value in most cases.

-> Now we ensure the normalization to the input values for both layers, while

keeping a dependence in dP for each GCM layer.

-> Also add a sanity check ensuring pres_top_tropo > pres_bottom_strato.
--JVO

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.GENERIC/libf/phystd/aeropacity.F90

    r1988 r2254  
    6363
    6464      real aerosol0, obs_tau_col_aurora, pm, pente_cloud
     65     
     66      real dp_strato(ngrid)
     67      real dp_tropo(ngrid)
    6568
    6669      INTEGER l,ig,iq,iaer
     
    371374!==================================================================
    372375!    Two-layer aerosols (unknown composition)
    373 !    S. Guerlet (2013)
     376!    S. Guerlet (2013) - Modif by J. Vatant d'Ollone (2020)
    374377!==================================================================
    375378
     
    379382            aerosol(1:ngrid,1:nlayer,iaer)=0.0
    380383!       2. Opacity calculation
    381           DO ig=1,ngrid
    382            DO l=1,nlayer-1
     384
     385
     386!       JVO 20 : Modif to have each of the layers (strato and tropo) correctly normalized
     387!                Otherwise we previously had the total optical depth correct but for each
     388!                separately, so  it didn't match the input values + what's more normalizing
     389!                to the sum was making them non-independent : eg changing tau_tropo was
     390!                affecting stratopsheric values of optical depth ...
     391!
     392!                Note that the main consequence of the former version bug was (in most cases)
     393!                to strongly underestimate the stratospheric optical depths compared to the
     394!                required values, eg, with tau_tropo=10 and tau_strato=0.1, you actually ended
     395!                with an actual tau_strato of 1E-4 ... !
     396!
     397!                NB : Because of the extra transition opacity if the layers are non contiguous,
     398!                be aware that at the the bottom we have tau > tau_strato + tau_tropo
     399
     400         DO ig=1,ngrid
     401          dp_tropo(ig)  = 0.D0
     402          dp_strato(ig) = 0.D0
     403          DO l=1,nlayer-1
    383404             aerosol(ig,l,iaer) = ( pplev(ig,l) - pplev(ig,l+1) )
    384405             !! 1. below tropospheric layer: no aerosols
    385406             IF (pplev(ig,l) .gt. pres_bottom_tropo) THEN
    386                aerosol(ig,l,iaer) = 0.*aerosol(ig,l,iaer)
     407               aerosol(ig,l,iaer) = 0.D0
    387408             !! 2. tropo layer
    388409             ELSEIF (pplev(ig,l) .le. pres_bottom_tropo .and. pplev(ig,l) .ge. pres_top_tropo) THEN
    389                aerosol(ig,l,iaer) = obs_tau_col_tropo*aerosol(ig,l,iaer)
    390              !! 3. linear transition
    391              ELSEIF (pplev(ig,l) .lt. pres_top_tropo .and. pplev(ig,l) .gt. pres_bottom_strato) THEN
    392                expfactor=log(obs_tau_col_strato/obs_tau_col_tropo)/log(pres_bottom_strato/pres_top_tropo)
    393                aerosol(ig,l,iaer)= obs_tau_col_tropo*((pplev(ig,l)/pres_top_tropo)**expfactor)*aerosol(ig,l,iaer)/1.5
    394              !! 4. strato layer
    395              ELSEIF (pplev(ig,l) .le. pres_bottom_strato .and. pplev(ig,l) .gt. pres_top_strato) THEN
    396                aerosol(ig,l,iaer)= obs_tau_col_strato*aerosol(ig,l,iaer)
     410               dp_tropo(ig) = dp_tropo(ig) + aerosol(ig,l,iaer)
     411             !! 3. linear transition
     412             ! JVO 20 : This interpolation needs to be done AFTER we set strato and tropo (see below)
     413             !! 4. strato layer
     414             ELSEIF (pplev(ig,l) .le. pres_bottom_strato .and. pplev(ig,l) .ge. pres_top_strato) THEN
     415               dp_strato(ig) = dp_strato(ig) + aerosol(ig,l,iaer)
    397416             !! 5. above strato layer: no aerosols
    398417             ELSEIF (pplev(ig,l) .lt. pres_top_strato) THEN
    399                aerosol(ig,l,iaer) = 0.*aerosol(ig,l,iaer)
     418               aerosol(ig,l,iaer) = 0.D0
    400419             ENDIF
    401            ENDDO
    402           ENDDO
    403 
    404  !       3. Re-normalize to observed total column
    405          tau_col(:)=0.0
    406          DO l=1,nlayer
    407           DO ig=1,ngrid
    408                tau_col(ig) = tau_col(ig) &
    409                      + aerosol(ig,l,iaer)/(obs_tau_col_tropo+obs_tau_col_strato)
    410             ENDDO
    411          ENDDO
     420          ENDDO
     421         ENDDO
     422
     423!       3. Re-normalize to the (input) observed (total) column (for each of the layers)
    412424
    413425         DO ig=1,ngrid
    414            DO l=1,nlayer-1
    415                 aerosol(ig,l,iaer)=aerosol(ig,l,iaer)/tau_col(ig)
    416            ENDDO
     426          DO l=1,nlayer-1
     427               IF (pplev(ig,l) .le. pres_bottom_tropo .and. pplev(ig,l) .ge. pres_top_tropo) THEN
     428                 aerosol(ig,l,iaer) = obs_tau_col_tropo*aerosol(ig,l,iaer)/dp_tropo(ig)
     429               ELSEIF (pplev(ig,l) .lt. pres_top_tropo .and. pplev(ig,l) .gt. pres_bottom_strato) THEN
     430                 expfactor=log(pplev(ig,l)/pres_top_tropo)/log(pres_bottom_strato/pres_top_tropo)
     431                 aerosol(ig,l,iaer) = (obs_tau_col_strato/dp_strato(ig))**expfactor     &
     432                                    * (obs_tau_col_tropo/dp_tropo(ig))**(1.0-expfactor) &
     433                                    * aerosol(ig,l,iaer)
     434               ELSEIF (pplev(ig,l) .le. pres_bottom_strato .and. pplev(ig,l) .ge. pres_top_strato) THEN
     435                 aerosol(ig,l,iaer) = obs_tau_col_strato*aerosol(ig,l,iaer)/dp_strato(ig)
     436               ENDIF
     437               write(*,*), aerosol(ig,l,iaer)
     438            ENDDO
    417439         ENDDO
    418440
Note: See TracChangeset for help on using the changeset viewer.