Index: NEMO/branches/UKMO/NEMO_4.0.4_EAP_rheology_fix/src/ICE/icedyn_rhg_eap.F90
===================================================================
--- NEMO/branches/UKMO/NEMO_4.0.4_EAP_rheology_fix/src/ICE/icedyn_rhg_eap.F90	(revision 15750)
+++ NEMO/branches/UKMO/NEMO_4.0.4_EAP_rheology_fix/src/ICE/icedyn_rhg_eap.F90	(revision 15803)
@@ -1068,6 +1068,10 @@
       REAL(wp)          ::   zresm           ! local real 
       CHARACTER(len=20) ::   clname
-      REAL(wp), DIMENSION(jpi,jpj) ::   zres           ! check convergence
+      LOGICAL           ::   ll_maxcvg
+      REAL(wp), DIMENSION(jpi,jpj) ::   zres1           ! check convergence
+      REAL(wp), DIMENSION(jpi,jpj) ::   zres2           ! check convergence
+      REAL(wp), DIMENSION(2)         ::   ztmp
       !!----------------------------------------------------------------------
+      ll_maxcvg = .FALSE.
 
       ! create file
@@ -1093,18 +1097,34 @@
       ! time
       it = ( kt - nit000 ) * kitermax + kiter
-      
-      ! convergence
+
+     ! convergence
       IF( kiter == 1 ) THEN ! remove the first iteration for calculations of convergence (always very large)
          zresm = 0._wp
       ELSE
-         DO jj = 1, jpj
-            DO ji = 1, jpi
-               zres(ji,jj) = MAX( ABS( pu(ji,jj) - pub(ji,jj) ) * umask(ji,jj,1), &
+         zresm = 0._wp
+         IF( ll_maxcvg ) THEN   ! error max over the domain
+           DO jj = 1, jpj
+              DO ji = 1, jpi
+                 zres1(ji,jj) = MAX( ABS( pu(ji,jj) - pub(ji,jj) ) * umask(ji,jj,1), &
                   &               ABS( pv(ji,jj) - pvb(ji,jj) ) * vmask(ji,jj,1) ) * zmsk15(ji,jj)
-            END DO
-         END DO
-         zresm = MAXVAL( zres )
-         CALL mpp_max( 'icedyn_rhg_evp', zresm )   ! max over the global domain
-      ENDIF
+                 zres2(ji,jj) = 0._wp
+              END DO
+           END DO
+           zresm = MAXVAL( zres1 )
+           CALL mpp_max( 'icedyn_rhg_evp', zresm )   ! max over the global domain
+         ELSE                    ! error averaged over the domain
+           DO jj = 1, jpj
+              DO ji = 1, jpi
+                 zres1(ji,jj) = MAX( ABS( pu(ji,jj) - pub(ji,jj) ) * umask(ji,jj,1), &
+                  &                 ABS( pv(ji,jj) - pvb(ji,jj) ) * vmask(ji,jj,1) ) * zmsk15(ji,jj)
+                 zres2(ji,jj) = zmsk15(ji,jj)
+              END DO
+           END DO
+           ztmp(1) = glob_sum( 'icedyn_rhg_evp', zres1 )
+           ztmp(2) = glob_sum( 'icedyn_rhg_evp', zres2 )
+           IF( ztmp(2) /= 0._wp )   zresm = ztmp(1) / ztmp(2)
+         ENDIF
+      ENDIF
+
 
       IF( lwm ) THEN
@@ -1116,5 +1136,4 @@
       
    END SUBROUTINE rhg_cvg_eap
-
 
    SUBROUTINE update_stress_rdg( ksub, kndte, pdivu, ptension, pshear, pa11, pa12, &
Index: NEMO/branches/UKMO/NEMO_4.0.4_EAP_rheology_fix/src/ICE/icedyn_rhg_evp.F90
===================================================================
--- NEMO/branches/UKMO/NEMO_4.0.4_EAP_rheology_fix/src/ICE/icedyn_rhg_evp.F90	(revision 15750)
+++ NEMO/branches/UKMO/NEMO_4.0.4_EAP_rheology_fix/src/ICE/icedyn_rhg_evp.F90	(revision 15803)
@@ -985,6 +985,10 @@
       REAL(wp)          ::   zresm           ! local real 
       CHARACTER(len=20) ::   clname
-      REAL(wp), DIMENSION(jpi,jpj) ::   zres           ! check convergence
+      LOGICAL           ::   ll_maxcvg
+      REAL(wp), DIMENSION(jpi,jpj) ::   zres1           ! check convergence
+      REAL(wp), DIMENSION(jpi,jpj) ::   zres2           ! check convergence
+      REAL(wp), DIMENSION(2)         ::   ztmp
       !!----------------------------------------------------------------------
+      ll_maxcvg = .FALSE.
 
       ! create file
@@ -1015,12 +1019,27 @@
          zresm = 0._wp
       ELSE
-         DO jj = 1, jpj
-            DO ji = 1, jpi
-               zres(ji,jj) = MAX( ABS( pu(ji,jj) - pub(ji,jj) ) * umask(ji,jj,1), &
+         zresm = 0._wp
+         IF( ll_maxcvg ) THEN   ! error max over the domain
+           DO jj = 1, jpj
+              DO ji = 1, jpi
+                 zres1(ji,jj) = MAX( ABS( pu(ji,jj) - pub(ji,jj) ) * umask(ji,jj,1), &
                   &               ABS( pv(ji,jj) - pvb(ji,jj) ) * vmask(ji,jj,1) ) * zmsk15(ji,jj)
-            END DO
-         END DO
-         zresm = MAXVAL( zres )
-         CALL mpp_max( 'icedyn_rhg_evp', zresm )   ! max over the global domain
+                 zres2(ji,jj) = 0._wp
+              END DO
+           END DO
+           zresm = MAXVAL( zres1 )
+           CALL mpp_max( 'icedyn_rhg_evp', zresm )   ! max over the global domain
+         ELSE                    ! error averaged over the domain
+           DO jj = 1, jpj
+              DO ji = 1, jpi
+                 zres1(ji,jj) = MAX( ABS( pu(ji,jj) - pub(ji,jj) ) * umask(ji,jj,1), &
+                  &                 ABS( pv(ji,jj) - pvb(ji,jj) ) * vmask(ji,jj,1) ) * zmsk15(ji,jj)
+                 zres2(ji,jj) = zmsk15(ji,jj)
+              END DO
+           END DO
+           ztmp(1) = glob_sum( 'icedyn_rhg_evp', zres1 )
+           ztmp(2) = glob_sum( 'icedyn_rhg_evp', zres2 )
+           IF( ztmp(2) /= 0._wp )   zresm = ztmp(1) / ztmp(2)
+         ENDIF
       ENDIF
 
