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 9210 for branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/stpctl.F90 – NEMO

Ignore:
Timestamp:
2018-01-11T16:41:21+01:00 (6 years ago)
Author:
gm
Message:

dev_merge_2017: merge a 4th mpp_max (stop, see WP2017/HPC03) cleaning in nemo_gcm routine

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2017/dev_merge_2017/NEMOGCM/NEMO/OPA_SRC/stpctl.F90

    r9023 r9210  
    1919   USE dom_oce         ! ocean space and time domain variables  
    2020   USE c1d             ! 1D vertical configuration 
     21   USE diawri          ! Standard run outputs       (dia_wri_state routine) 
    2122   ! 
    2223   USE in_out_manager  ! I/O manager 
    2324   USE lbclnk          ! ocean lateral boundary conditions (or mpp link) 
    2425   USE lib_mpp         ! distributed memory computing 
    25    USE wet_dry,    ONLY: ll_wd, ssh_ref    ! reference depth for negative bathy 
     26   USE wet_dry,   ONLY : ll_wd, ssh_ref    ! reference depth for negative bathy 
    2627 
    2728   IMPLICIT NONE 
     
    5152      !! ** Actions :   "time.step" file = last ocean time-step 
    5253      !!                "run.stat"  file = run statistics 
     54      !!                nstop indicator sheared among all local domain (lk_mpp=T) 
    5355      !!---------------------------------------------------------------------- 
    5456      INTEGER, INTENT(in   ) ::   kt       ! ocean time-step index 
     
    6264      INTEGER , DIMENSION(3) ::   ilocu, ilocs 
    6365      INTEGER , DIMENSION(2) ::   iloch 
    64       REAL(wp), DIMENSION(3) ::   zmax 
     66      REAL(wp), DIMENSION(4) ::   zmax 
    6567      !!---------------------------------------------------------------------- 
    6668      ! 
     
    8284      !                                   !==  test of extrema  ==! 
    8385      IF( ll_wd ) THEN 
    84          zmax(1) = MAXVAL(  ABS( sshn(:,:) + ssh_ref*tmask(:,:,1) )  )           ! ssh max  
     86         zmax(1) = MAXVAL(  ABS( sshn(:,:) + ssh_ref*tmask(:,:,1) )  )        ! ssh max  
    8587      ELSE 
    86          zmax(1) = MAXVAL(  ABS( sshn(:,:) )  )                                  ! ssh max 
     88         zmax(1) = MAXVAL(  ABS( sshn(:,:) )  )                               ! ssh max 
    8789      ENDIF 
    8890      zmax(2) = MAXVAL(  ABS( un(:,:,:) )  )                                  ! velocity max (zonal only) 
    8991      zmax(3) = MAXVAL( -tsn(:,:,:,jp_sal) , mask = tmask(:,:,:) == 1._wp )   ! minus salinity max 
     92      zmax(4) = REAL( nstop , wp )                                            ! stop indicator 
    9093      ! 
    91       IF( lk_mpp )   CALL mpp_max_multiple( zmax(:), 3 ) ! max over the global domain 
     94      IF( lk_mpp ) THEN 
     95         CALL mpp_max_multiple( zmax(:), 4 )    ! max over the global domain 
     96         ! 
     97         nstop = INT( zmax(4) )                 ! nstop indicator sheared among all local domains 
     98      ENDIF 
    9299      ! 
    93100      IF( MOD( kt, nwrite ) == 1 .AND. lwp ) THEN 
     
    114121         IF(lwp) THEN 
    115122            WRITE(numout,cform_err) 
    116             WRITE(numout,*) ' stpctl: |ssh| > 10 m   or   |U| > 10 m/s   or   S < 0   or   NaN encounter in the tests' 
    117             WRITE(numout,*) ' ====== ' 
     123            WRITE(numout,*) ' stp_ctl: |ssh| > 10 m   or   |U| > 10 m/s   or   S < 0   or   NaN encounter in the tests' 
     124            WRITE(numout,*) ' ======= ' 
    118125            WRITE(numout,9100) kt,   zmax(1), iih, ijh 
    119126            WRITE(numout,9200) kt,   zmax(2), iiu, iju, iku 
     
    123130         ENDIF 
    124131         kindic = -3 
     132         ! 
     133         nstop = nstop + 1                            ! increase nstop by 1 (on all local domains) 
     134         CALL dia_wri_state( 'output.abort', kt )     ! create an output.abort file 
     135         ! 
    125136      ENDIF 
    1261379100  FORMAT (' kt=',i8,'   |ssh| max: ',1pg11.4,', at  i j  : ',2i5) 
Note: See TracChangeset for help on using the changeset viewer.