Changeset 3505


Ignore:
Timestamp:
May 16, 2019, 4:24:44 PM (6 years ago)
Author:
yann meurdesoif
Message:

Solve some wrong discrepency problem when comparing longitude from a restartphy file. The current discrepency test is not detecting that 360°==0°, so in some case it may stop the run for a wrong reason.

YM

File:
1 edited

Legend:

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

    r3465 r3505  
    163163  DO i=1,klon
    164164    IF (ABS(lon_startphy(i)-longitude_deg(i))>=1) THEN
    165       WRITE(*,*) "phyetat0: Error! Longitude discrepancy wrt startphy file:",&
    166                  " i=",i," lon_startphy(i)=",lon_startphy(i),&
    167                  " longitude_deg(i)=",longitude_deg(i)
    168       ! This is presumably serious enough to abort run
    169       CALL abort_physic("phyetat0","discrepancy in longitudes!",1)
     165      IF (ABS(360-ABS(lon_startphy(i)-longitude_deg(i)))>=1) THEN
     166        WRITE(*,*) "phyetat0: Error! Longitude discrepancy wrt startphy file:",&
     167                   " i=",i," lon_startphy(i)=",lon_startphy(i),&
     168                   " longitude_deg(i)=",longitude_deg(i)
     169        ! This is presumably serious enough to abort run
     170        CALL abort_physic("phyetat0","discrepancy in longitudes!",1)
     171      ENDIF
    170172    ENDIF
    171     IF (ABS(lon_startphy(i)-longitude_deg(i))>=0.0001) THEN
    172       WRITE(*,*) "phyetat0: Warning! Longitude discrepancy wrt startphy file:",&
    173                  " i=",i," lon_startphy(i)=",lon_startphy(i),&
    174                  " longitude_deg(i)=",longitude_deg(i)
     173    IF (ABS(lon_startphy(i)-longitude_deg(i))>=1) THEN
     174      IF (ABS(360-ABS(lon_startphy(i)-longitude_deg(i))) > 0.0001) THEN
     175        WRITE(*,*) "phyetat0: Warning! Longitude discrepancy wrt startphy file:",&
     176                   " i=",i," lon_startphy(i)=",lon_startphy(i),&
     177                   " longitude_deg(i)=",longitude_deg(i)
     178      ENDIF
    175179    ENDIF
    176180  ENDDO
Note: See TracChangeset for help on using the changeset viewer.