Changeset 3141 for LMDZ6/trunk


Ignore:
Timestamp:
Dec 19, 2017, 7:49:05 PM (7 years ago)
Author:
dcugnet
Message:
  • Fix: Sig_bot was used before being initialized in "regr_pr_time_av".
  • Add an optional output argument to the "dyn_tropopause" function: the table of the last tropospheric layer in each column.
  • A filter for irrealistic tropopause pressure (lower than 80hPa or greater than 400hPa) is included in "dyn_tropopause". This is safer if this function is not used together with "regr_pr_time_av" (which contains already this filter), which is the case for the LMDZ version with coupled REPROBUS and INCA chemistry.
Location:
LMDZ6/trunk/libf/phylmd
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/trunk/libf/phylmd/regr_pr_time_av_m.F90

    r3087 r3141  
    312312      Sig_to0 = MIN(SigT_in,SigT_ou)               !--- highest tropopause
    313313      beta    = (Sig_bo0/Sig_to0)**gamm            !--- stretching exponent
    314       Sig_bot = MIN(Sig_bo0*beta,0.1*(9.+Sig_bot)) !--- must be <1
     314      Sig_bot = MIN(Sig_bo0*beta,0.1*(9.+Sig_bo0)) !--- must be <1
    315315      ibot = locate(Sig_ou(:),Sig_bot)             !--- layer index
    316316      IF(ibot-iout<2) THEN                         !--- at least one layer thick
  • LMDZ6/trunk/libf/phylmd/tropopause_m.F90

    r2992 r3141  
    99!-------------------------------------------------------------------------------
    1010!
    11 FUNCTION dyn_tropopause(t, ts, paprs, pplay, rot, thet0, pvor0)
     11FUNCTION dyn_tropopause(t, ts, paprs, pplay, rot, itrop, thet0, pvor0)
    1212!
    1313!-------------------------------------------------------------------------------
     
    2626  REAL, INTENT(IN)  ::  pplay(:,:) !--- Cells-centers pressure
    2727  REAL, INTENT(IN)  ::    rot(:,:) !--- Cells-centers relative vorticity
    28   REAL, INTENT(IN), OPTIONAL :: thet0, pvor0
     28  INTEGER, INTENT(OUT), OPTIONAL :: itrop(klon) !--- Last tropospheric layer idx
     29  REAL,    INTENT(IN),  OPTIONAL :: thet0, pvor0
    2930!-------------------------------------------------------------------------------
    3031! Local variables:
    3132  include "YOMCST.h"
     33  REAL, PARAMETER :: DynPTrMin =8.E+3 !--- Thresholds for minimum and maximum
     34  REAL, PARAMETER :: DynPTrMax =4.E+4 !    dynamical tropopause pressure (Pa).
    3235  CHARACTER(LEN=80)  :: sub
    3336  INTEGER :: i, k, kb, kt, kp, ib, ie, nw
     
    100103    dyn_tropopause(i) = MAX( pplay(i,kp+1)*(pplay(i,kp)/pplay(i,kp+1))**al,    &
    101104                            dyn_tropopause(i) )
     105    !--- UNREALISTIC VALUES DETECTION
     106    IF(dyn_tropopause(i)<DynPTrMin.OR.dyn_tropopause(i)>DynPTrMax) THEN
     107      dyn_tropopause(i)=MIN(MAX(dyn_tropopause(i),DynPTrMax),DynPTrMin)
     108      DO kt=1,klev-1; IF(pplay(i,kt+1)>dyn_tropopause(i)) EXIT; END DO; kp=kt
     109    END IF
     110    !--- LAST TROPOSPHERIC LAYER INDEX NEEDED
     111    IF(PRESENT(itrop)) itrop(i)=MAX(kt,kp)
    102112  END DO
    103113
Note: See TracChangeset for help on using the changeset viewer.