- Timestamp:
- 2019-12-13T10:19:48+01:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2019/dev_r11943_MERGE_2019/src/OCE/stpctl.F90
r11949 r12236 73 73 ! 74 74 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 ) 76 76 ll_wrtruns = ll_colruns .AND. lwm 77 77 IF( kt == nit000 .AND. lwp ) THEN … … 83 83 ! ! open run.stat file(s) at start whatever 84 84 ! ! the value of sn_cfctl%ptimincr 85 IF( lwm .AND. ( ln_ctl .OR.sn_cfctl%l_runstat ) ) THEN85 IF( lwm .AND. ( sn_cfctl%l_runstat ) ) THEN 86 86 CALL ctl_opn( numrun, 'run.stat', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, narea ) 87 87 clname = 'run.stat.nc' … … 148 148 END IF 149 149 ! !== error handling ==! 150 IF( ( ln_ctl .OR. lsomeoce ) .AND. ( & ! have use mpp_max (because ln_ctl=.T.) or contains some ocean points150 IF( ( sn_cfctl%l_glochk .OR. lsomeoce ) .AND. ( & ! domain contains some ocean points, check for sensible ranges 151 151 & zmax(1) > 20._wp .OR. & ! too large sea surface height ( > 20 m ) 152 152 & zmax(2) > 10._wp .OR. & ! too large velocity ( > 10 m/s) … … 155 155 & zmax(4) < 0._wp .OR. & ! too large sea surface salinity (keep this line for sea-ice) 156 156 & 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) 158 159 CALL mpp_maxloc( 'stpctl', ABS(ssh(:,:,Kmm)) , ssmask(:,:) , zzz, ih ) 159 160 CALL mpp_maxloc( 'stpctl', ABS(uu(:,:,:,Kmm)) , umask (:,:,:), zzz, iu ) … … 161 162 CALL mpp_maxloc( 'stpctl', ts(:,:,:,jp_sal,Kmm), tmask (:,:,:), zzz, is2 ) 162 163 ELSE 164 ! find local min and max locations 163 165 ih(:) = MAXLOC( ABS( ssh(:,:,Kmm) ) ) + (/ nimpp - 1, njmpp - 1 /) 164 166 iu(:) = MAXLOC( ABS( uu (:,:,:,Kmm) ) ) + (/ nimpp - 1, njmpp - 1, 0 /) … … 176 178 CALL dia_wri_state( Kmm, 'output.abort' ) ! create an output.abort file 177 179 178 IF( .NOT. ln_ctl) THEN180 IF( .NOT. sn_cfctl%l_glochk ) THEN 179 181 WRITE(ctmp8,*) 'E R R O R message from sub-domain: ', narea 180 182 CALL ctl_stop( 'STOP', ctmp1, ' ', ctmp8, ' ', ctmp2, ctmp3, ctmp4, ctmp5, ctmp6 )
Note: See TracChangeset
for help on using the changeset viewer.