- Timestamp:
- 2019-11-07T17:55:13+01:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2019/fix_sn_cfctl_ticket2328/src/OCE/stpctl.F90
r11407 r11872 72 72 ! 73 73 ll_wrtstp = ( MOD( kt, sn_cfctl%ptimincr ) == 0 ) .OR. ( kt == nitend ) 74 ll_colruns = ll_wrtstp .AND. ( ln_ctl .OR.sn_cfctl%l_runstat )74 ll_colruns = ll_wrtstp .AND. ( sn_cfctl%l_runstat ) 75 75 ll_wrtruns = ll_colruns .AND. lwm 76 76 IF( kt == nit000 .AND. lwp ) THEN … … 82 82 ! ! open run.stat file(s) at start whatever 83 83 ! ! the value of sn_cfctl%ptimincr 84 IF( lwm .AND. ( ln_ctl .OR.sn_cfctl%l_runstat ) ) THEN84 IF( lwm .AND. ( sn_cfctl%l_runstat ) ) THEN 85 85 CALL ctl_opn( numrun, 'run.stat', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, narea ) 86 86 clname = 'run.stat.nc' … … 147 147 END IF 148 148 ! !== error handling ==! 149 IF( ( ln_ctl .OR. lsomeoce ) .AND. ( & ! have use mpp_max (because ln_ctl=.T.) or contains some ocean points149 IF( ( sn_cfctl%l_glochk .OR. lsomeoce ) .AND. ( & ! domain contains some ocean points, check for sensible ranges 150 150 & zmax(1) > 20._wp .OR. & ! too large sea surface height ( > 20 m ) 151 151 & zmax(2) > 10._wp .OR. & ! too large velocity ( > 10 m/s) … … 154 154 & zmax(4) < 0._wp .OR. & ! too large sea surface salinity (keep this line for sea-ice) 155 155 & ISNAN( zmax(1) + zmax(2) + zmax(3) ) ) ) THEN ! NaN encounter in the tests 156 IF( lk_mpp .AND. ln_ctl ) THEN 156 IF( lk_mpp .AND. sn_cfctl%l_glochk ) THEN 157 ! have use mpp_max (because sn_cfctl%l_glochk=.T. and distributed) 157 158 CALL mpp_maxloc( 'stpctl', ABS(sshn) , ssmask(:,:) , zzz, ih ) 158 159 CALL mpp_maxloc( 'stpctl', ABS(un) , umask (:,:,:), zzz, iu ) … … 160 161 CALL mpp_maxloc( 'stpctl', tsn(:,:,:,jp_sal), tmask (:,:,:), zzz, is2 ) 161 162 ELSE 163 ! find local min and max locations 162 164 ih(:) = MAXLOC( ABS( sshn(:,:) ) ) + (/ nimpp - 1, njmpp - 1 /) 163 165 iu(:) = MAXLOC( ABS( un (:,:,:) ) ) + (/ nimpp - 1, njmpp - 1, 0 /) … … 175 177 CALL dia_wri_state( 'output.abort' ) ! create an output.abort file 176 178 177 IF( .NOT. ln_ctl) THEN179 IF( .NOT. sn_cfctl%l_glochk ) THEN 178 180 WRITE(ctmp8,*) 'E R R O R message from sub-domain: ', narea 179 181 CALL ctl_stop( 'STOP', ctmp1, ' ', ctmp8, ' ', ctmp2, ctmp3, ctmp4, ctmp5, ctmp6 )
Note: See TracChangeset
for help on using the changeset viewer.