New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 7847 for branches/2015/nemo_v3_6_STABLE/NEMOGCM – NEMO

Ignore:
Timestamp:
2017-03-30T15:30:29+02:00 (7 years ago)
Author:
cetlod
Message:

Bugfix: clear stop with output.abort created after numerical explosion of ssh, see shaconemeo ticket #66

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2015/nemo_v3_6_STABLE/NEMOGCM/NEMO/OPA_SRC/stpctl.F90

    r7607 r7847  
    2121   USE lbclnk          ! ocean lateral boundary conditions (or mpp link) 
    2222   USE lib_mpp         ! distributed memory computing 
     23   USE lib_fortran     ! Fortran routines library  
    2324   USE dynspg_oce      ! pressure gradient schemes  
    2425   USE c1d             ! 1D vertical configuration 
     
    5758      INTEGER  ::   ji, jj, jk              ! dummy loop indices 
    5859      INTEGER  ::   ii, ij, ik              ! temporary integers 
    59       REAL(wp) ::   zumax, zsmin, zssh2     ! temporary scalars 
     60      REAL(wp) ::   zumax, zsmin, zssh2, zsshmax     ! temporary scalars 
    6061      INTEGER, DIMENSION(3) ::   ilocu      !  
    6162      INTEGER, DIMENSION(2) ::   ilocs      !  
     
    173174         ENDIF 
    174175         ! 
    175          zssh2 = SUM( sshn(:,:) * sshn(:,:) * tmask_i(:,:) ) 
    176          IF( lk_mpp )   CALL mpp_sum( zssh2 )      ! sum over the global domain 
     176         zsshmax = 0.e0 
     177         DO jj = 1, jpj 
     178            DO ji = 1, jpi 
     179               IF( tmask(ji,jj,1) == 1) zsshmax = MAX( zsshmax, ABS(sshn(ji,jj)) ) 
     180            END DO 
     181         END DO 
     182         IF( lk_mpp )   CALL mpp_max( zsshmax )                ! min over the global domain 
     183         ! 
     184         IF( MOD( kt, nwrite ) == 1 .AND. lwp )   WRITE(numout,*) ' ==>> time-step= ',kt,' ssh max:', zsshmax 
     185           ! 
     186           IF( zsshmax > 10.e0 ) THEN  
     187              IF (lk_mpp) THEN 
     188                CALL mpp_maxloc( ABS(sshn(:,:)),tmask(:,:,1),zsshmax,ii,ij) 
     189              ELSE 
     190                ilocs = MAXLOC( ABS(sshn(:,:)) ) 
     191                ii = ilocs(1) + nimpp - 1 
     192                ij = ilocs(2) + njmpp - 1 
     193              ENDIF 
     194              ! 
     195              IF(lwp) THEN 
     196                 WRITE(numout,cform_err) 
     197                 WRITE(numout,*) 'stp_ctl : the ssh is larger than 10m' 
     198                 WRITE(numout,*) '======= ' 
     199                 WRITE(numout,9600) kt, zsshmax, ii, ij 
     200                 WRITE(numout,*) 
     201                 WRITE(numout,*) '          output of last fields in numwso' 
     202              ENDIF 
     203             kindic = -3 
     204         ENDIF 
     2059600     FORMAT (' kt=',i6,' max ssh: ',1pg11.4,', i j: ',2i5) 
     206 
     207         zssh2 = glob_sum( sshn(:,:) * sshn(:,:) ) 
    177208         ! 
    178209         IF(lwp) WRITE(numsol,9300) kt, zssh2, zumax, zsmin      ! ssh statistics 
    179210         ! 
    180211      ENDIF 
    181  
    1822129200  FORMAT('it:', i8, ' iter:', i4, ' r: ',d23.16, ' b: ',d23.16 ) 
    1832139300  FORMAT(' it :', i8, ' ssh2: ', d23.16, ' Umax: ',d23.16,' Smin: ',d23.16) 
Note: See TracChangeset for help on using the changeset viewer.