- Timestamp:
- 2020-07-01T07:42:23+02:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2020/dev_r12973_AGRIF_CMEMS/src/SAS/stpctl.F90
r13058 r13185 112 112 ! !== done by all processes at every time step ==! 113 113 llmsk(:,:) = tmask(:,:,1) == 1._wp 114 zmax(1) = MAXVAL( vt_i (:,:) , mask = llmsk ) ! max ice thickness 115 zmax(2) = MAXVAL( ABS( u_ice(:,:) ) , mask = llmsk ) ! max ice velocity (zonal only) 116 zmax(3) = MAXVAL( -tm_i (:,:) + 273.15_wp, mask = llmsk ) ! min ice temperature 114 IF( COUNT( llmsk(:,:) ) > 0 ) THEN ! avoid huge values sent back for land processors... 115 zmax(1) = MAXVAL( vt_i (:,:) , mask = llmsk ) ! max ice thickness 116 zmax(2) = MAXVAL( ABS( u_ice(:,:) ) , mask = llmsk ) ! max ice velocity (zonal only) 117 zmax(3) = MAXVAL( -tm_i (:,:) + 273.15_wp, mask = llmsk ) ! min ice temperature 118 ELSE 119 IF( ll_colruns ) THEN ! default value: must not be kept when calling mpp_max -> must be as small as possible 120 zmax(1:3) = -HUGE(1._wp) 121 ELSE ! default value: must not give true for any of the tests bellow (-> avoid manipulating HUGE...) 122 zmax(1:3) = 0._wp 123 ENDIF 124 ENDIF 117 125 zmax(4) = REAL( nstop, wp ) ! stop indicator 118 126 ! !== get global extrema ==! … … 180 188 ! 181 189 IF( ll_colruns .or. jpnij == 1 ) THEN ! all processes synchronized -> use lwp to print in opened ocean.output files 182 IF(lwp) CALL ctl_stop( ctmp1, ' ', ctmp2, ctmp3, ctmp4, ctmp5, ' ', ctmp6 ) 190 IF(lwp) THEN ; CALL ctl_stop( ctmp1, ' ', ctmp2, ctmp3, ctmp4, ctmp5, ' ', ctmp6 ) 191 ELSE ; nstop = MAX(1, nstop) ! make sure nstop > 0 (automatically done when calling ctl_stop) 192 ENDIF 183 193 ELSE ! only mpi subdomains with errors are here -> STOP now 184 194 CALL ctl_stop( 'STOP', ctmp1, ' ', ctmp2, ctmp3, ctmp4, ctmp5, ' ', ctmp6 ) 185 195 ENDIF 186 196 ! 187 IF( nstop == 0 ) nstop = 1 188 ngrdstop = Agrif_Fixed() 189 ! 197 ENDIF 198 ! 199 IF( nstop > 0 ) THEN ! an error was detected and we did not abort yet... 200 ngrdstop = Agrif_Fixed() ! store which grid got this error 201 IF( .NOT. ll_colruns .AND. jpnij > 1 ) CALL ctl_stop( 'STOP' ) ! we must abort here to avoid MPI deadlock 190 202 ENDIF 191 203 !
Note: See TracChangeset
for help on using the changeset viewer.