Changeset 2821 for trunk/LMDZ.GENERIC


Ignore:
Timestamp:
Nov 17, 2022, 3:42:23 PM (2 years ago)
Author:
aslmd
Message:

Fixed the extrapolation in tpindex.F

if above the Tmax or Pmax of the grid, we go back to the maximum value of the grid. We do not extrapolate anymore. LT

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.GENERIC/libf/phystd/tpindex.F

    r2582 r2821  
    8383!     Get the upper and lower temperature grid indicies that bound the
    8484!     requested temperature. If the sought temperature is below
    85 !     the T-grid minimum, assume that lower value. If the sought teperature
    86 !     is above the T-grid maximum, extrapolate.
     85!     the T-grid minimum, assume that lower value. If the sought temperature
     86!     is above the T-grid maximum, assume that maximum value.
    8787!     TW : temperature to interpolate to
    8888!     TREF : reference temperature array
     
    9696        MT = 1
    9797        TWL=TREF(1)*1.00
    98         write(*,*) 'tpindex: Caution! Temperature of upper levels lower
    99      $ than ref temperature for k-coef: k-coeff fixed for upper levels'
    100         write(*,*) "         TW=",TWL
    101         write(*,*) "         TREF(1)=",TREF(1)
    10298      ELSEIF(TWL.GE.TREF(L_NTREF)) THEN
    10399       ! Above highest tabulated temperature
    104        MT = L_NTREF-1
     100        MT=L_NTREF-1
     101        TWL = TREF(L_NTREF)*1.00
    105102      ELSE
    106103        ! Regular case, find encompassing tabulated temperatures
     
    121118!     requested pressure. If the sought pressure is below
    122119!     the P-grid minimum, assume that lower value. If the sought pressure
    123 !     is above the P-grid maximum, extrapolate.
     120!     is above the P-grid maximum, assume that maximum value.
    124121
    125122      PWL = log10(PW)
     
    129126        MP = 1
    130127        PWL=Pref(1)*1.00
    131         write(*,*) 'tpindex: Caution! Pressure of upper levels lower
    132      $than ref pressure for k-coef: k-coeff fixed for upper levels'
    133         write(*,*) "         PWL=",PWL
    134         write(*,*) "         PREF(1)=",PREF(1)
    135128      ELSEIF(PWL.GE.PREF(L_PINT)) THEN
    136129        ! Above highest tabulated pressure
    137130        MP = L_PINT-1
     131        PWL = PREF(L_PINT)
    138132      ELSE
    139133        ! Regular case, find encompassing tabulated pressures
Note: See TracChangeset for help on using the changeset viewer.