Changeset 5344 for LMDZ6/trunk


Ignore:
Timestamp:
Nov 28, 2024, 5:16:07 PM (2 weeks ago)
Author:
Laurent Fairhead
Message:

Temporary fix on value of index so that the code does not crash in debug mode.
We still have to understand how it can be 0
TL, JG, DC, LF

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/trunk/libf/phylmd/tropopause_m.f90

    r5285 r5344  
    4444  REAL,    PARAMETER :: w(5)=[0.1,0.25,0.3,0.25,0.1] !--- Vertical smoothing
    4545  INTEGER, SAVE :: k0
     46  INTEGER :: savkt
    4647  LOGICAL, SAVE :: first=.TRUE.
    4748!$OMP THREADPRIVATE(k0,first)
     
    9293  DO i = 1, klon
    9394    !--- UPPER TROPOPAUSE: |PV|=2PVU POINT STARTING FROM TOP
    94     DO kt=klev-1,1,-1; IF(ALL(ABS(pvor_cen(i,kt-nadj:kt))<=pv0)) EXIT; END DO
     95    DO kt=klev-1,1,-1; savkt = kt; IF(ALL(ABS(pvor_cen(i,kt-nadj:kt))<=pv0)) EXIT; END DO
     96    kt = savkt
     97    IF (kt == 0 ) THEN
     98       call abort_physic("dyn_tropopause", " kt = 1", 1)
     99    ENDIF
    95100    !--- LOWER TROPOPAUSE: |PV|=2PVU POINT STARTING FROM BOTTOM
    96101    DO kb=k0,klev-1;   IF(ALL(ABS(pvor_cen(i,kb:kb+nadj))> pv0)) EXIT; END DO; kb=kb-1
Note: See TracChangeset for help on using the changeset viewer.