- 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/tests/STATION_ASF/MY_SRC/stpctl.F90
r13058 r13185 111 111 ! !== done by all processes at every time step ==! 112 112 llmsk(:,:) = tmask(:,:,1) == 1._wp 113 zmax(1) = MAXVAL( taum(:,:) , mask = llmsk ) ! max wind stress module 114 zmax(2) = MAXVAL( ABS( qns(:,:) ) , mask = llmsk ) ! max non-solar heat flux 115 zmax(3) = MAXVAL( ABS( emp(:,:) ) , mask = llmsk ) ! max E-P 113 IF( COUNT( llmsk(:,:) ) > 0 ) THEN ! avoid huge values sent back for land processors... 114 zmax(1) = MAXVAL( taum(:,:) , mask = llmsk ) ! max wind stress module 115 zmax(2) = MAXVAL( ABS( qns(:,:) ) , mask = llmsk ) ! max non-solar heat flux 116 zmax(3) = MAXVAL( ABS( emp(:,:) ) , mask = llmsk ) ! max E-P 117 ELSE 118 IF( ll_colruns ) THEN ! default value: must not be kept when calling mpp_max -> must be as small as possible 119 zmax(1:3) = -HUGE(1._wp) 120 ELSE ! default value: must not give true for any of the tests bellow (-> avoid manipulating HUGE...) 121 zmax(1:3) = 0._wp 122 ENDIF 123 ENDIF 116 124 zmax(4) = REAL( nstop, wp ) ! stop indicator 117 125 ! !== get global extrema ==! … … 179 187 ! 180 188 IF( ll_colruns .or. jpnij == 1 ) THEN ! all processes synchronized -> use lwp to print in opened ocean.output files 181 IF(lwp) CALL ctl_stop( ctmp1, ' ', ctmp2, ctmp3, ctmp4, ctmp5, ' ', ctmp6 ) 189 IF(lwp) THEN ; CALL ctl_stop( ctmp1, ' ', ctmp2, ctmp3, ctmp4, ctmp5, ' ', ctmp6 ) 190 ELSE ; nstop = MAX(1, nstop) ! make sure nstop > 0 (automatically done when calling ctl_stop) 191 ENDIF 182 192 ELSE ! only mpi subdomains with errors are here -> STOP now 183 193 CALL ctl_stop( 'STOP', ctmp1, ' ', ctmp2, ctmp3, ctmp4, ctmp5, ' ', ctmp6 ) 184 194 ENDIF 185 195 ! 186 IF( nstop == 0 ) nstop = 1 187 ngrdstop = Agrif_Fixed() 188 ! 196 ENDIF 197 ! 198 IF( nstop > 0 ) THEN ! an error was detected and we did not abort yet... 199 ngrdstop = Agrif_Fixed() ! store which grid got this error 200 IF( .NOT. ll_colruns .AND. jpnij > 1 ) CALL ctl_stop( 'STOP' ) ! we must abort here to avoid MPI deadlock 189 201 ENDIF 190 202 !
Note: See TracChangeset
for help on using the changeset viewer.