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 12236 for NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/stpctl.F90 – NEMO

Ignore:
Timestamp:
2019-12-13T10:19:48+01:00 (4 years ago)
Author:
acc
Message:

Branch 2019/dev_r11943_MERGE_2019. Merge in changes from 2019/fix_sn_cfctl_ticket2328. Fully SETTE tested

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/stpctl.F90

    r11949 r12236  
    7373      ! 
    7474      ll_wrtstp  = ( MOD( kt, sn_cfctl%ptimincr ) == 0 ) .OR. ( kt == nitend ) 
    75       ll_colruns = ll_wrtstp .AND. ( ln_ctl .OR. sn_cfctl%l_runstat ) 
     75      ll_colruns = ll_wrtstp .AND. ( sn_cfctl%l_runstat ) 
    7676      ll_wrtruns = ll_colruns .AND. lwm 
    7777      IF( kt == nit000 .AND. lwp ) THEN 
     
    8383         !                                ! open run.stat file(s) at start whatever 
    8484         !                                ! the value of sn_cfctl%ptimincr 
    85          IF( lwm .AND. ( ln_ctl .OR. sn_cfctl%l_runstat ) ) THEN 
     85         IF( lwm .AND. ( sn_cfctl%l_runstat ) ) THEN 
    8686            CALL ctl_opn( numrun, 'run.stat', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, narea ) 
    8787            clname = 'run.stat.nc' 
     
    148148      END IF 
    149149      !                                   !==  error handling  ==! 
    150       IF( ( ln_ctl .OR. lsomeoce ) .AND. (   &             ! have use mpp_max (because ln_ctl=.T.) or contains some ocean points 
     150      IF( ( sn_cfctl%l_glochk .OR. lsomeoce ) .AND. (   &  ! domain contains some ocean points, check for sensible ranges 
    151151         &  zmax(1) >   20._wp .OR.   &                    ! too large sea surface height ( > 20 m ) 
    152152         &  zmax(2) >   10._wp .OR.   &                    ! too large velocity ( > 10 m/s) 
     
    155155         &  zmax(4) <    0._wp .OR.   &                    ! too large sea surface salinity (keep this line for sea-ice) 
    156156         &  ISNAN( zmax(1) + zmax(2) + zmax(3) ) ) ) THEN   ! NaN encounter in the tests 
    157          IF( lk_mpp .AND. ln_ctl ) THEN 
     157         IF( lk_mpp .AND. sn_cfctl%l_glochk ) THEN 
     158            ! have use mpp_max (because sn_cfctl%l_glochk=.T. and distributed) 
    158159            CALL mpp_maxloc( 'stpctl', ABS(ssh(:,:,Kmm))        , ssmask(:,:)  , zzz, ih  ) 
    159160            CALL mpp_maxloc( 'stpctl', ABS(uu(:,:,:,Kmm))          , umask (:,:,:), zzz, iu  ) 
     
    161162            CALL mpp_maxloc( 'stpctl', ts(:,:,:,jp_sal,Kmm), tmask (:,:,:), zzz, is2 ) 
    162163         ELSE 
     164            ! find local min and max locations 
    163165            ih(:)  = MAXLOC( ABS( ssh(:,:,Kmm)   )                              ) + (/ nimpp - 1, njmpp - 1    /) 
    164166            iu(:)  = MAXLOC( ABS( uu  (:,:,:,Kmm) )                              ) + (/ nimpp - 1, njmpp - 1, 0 /) 
     
    176178         CALL dia_wri_state( Kmm, 'output.abort' )     ! create an output.abort file 
    177179          
    178          IF( .NOT. ln_ctl ) THEN 
     180         IF( .NOT. sn_cfctl%l_glochk ) THEN 
    179181            WRITE(ctmp8,*) 'E R R O R message from sub-domain: ', narea 
    180182            CALL ctl_stop( 'STOP', ctmp1, ' ', ctmp8, ' ', ctmp2, ctmp3, ctmp4, ctmp5, ctmp6 ) 
Note: See TracChangeset for help on using the changeset viewer.