Index: vendors/AGRIF/CMEMS_2020/AGRIF_FILES/modupdatebasic.F90
===================================================================
--- vendors/AGRIF/CMEMS_2020/AGRIF_FILES/modupdatebasic.F90	(revision 10083)
+++ vendors/AGRIF/CMEMS_2020/AGRIF_FILES/modupdatebasic.F90	(revision 10087)
@@ -49,8 +49,8 @@
     integer,             intent(in)     :: np           !< Length of parent array
     integer,             intent(in)     :: nc           !< Length of child  array
-    real,                intent(in)     :: s_parent     !< Parent grid position (s_root = 0)
-    real,                intent(in)     :: s_child      !< Child  grid position (s_root = 0)
-    real,                intent(in)     :: ds_parent    !< Parent grid dx (ds_root = 1)
-    real,                intent(in)     :: ds_child     !< Child  grid dx (ds_root = 1)
+    real(kind=8),        intent(in)     :: s_parent     !< Parent grid position (s_root = 0)
+    real(kind=8),        intent(in)     :: s_child      !< Child  grid position (s_root = 0)
+    real(kind=8),        intent(in)     :: ds_parent    !< Parent grid dx (ds_root = 1)
+    real(kind=8),        intent(in)     :: ds_child     !< Child  grid dx (ds_root = 1)
 !---------------------------------------------------------------------------------------------------
     integer :: i, locind_child_left, coeffraf
@@ -84,8 +84,8 @@
     integer,             intent(in)     :: np           !< Length of parent array
     integer,             intent(in)     :: nc           !< Length of child  array
-    real,                intent(in)     :: s_parent     !< Parent grid position (s_root = 0)
-    real,                intent(in)     :: s_child      !< Child  grid position (s_root = 0)
-    real,                intent(in)     :: ds_parent    !< Parent grid dx (ds_root = 1)
-    real,                intent(in)     :: ds_child     !< Child  grid dx (ds_root = 1)
+    real(kind=8),        intent(in)     :: s_parent     !< Parent grid position (s_root = 0)
+    real(kind=8),        intent(in)     :: s_child      !< Child  grid position (s_root = 0)
+    real(kind=8),        intent(in)     :: ds_parent    !< Parent grid dx (ds_root = 1)
+    real(kind=8),        intent(in)     :: ds_child     !< Child  grid dx (ds_root = 1)
     integer,             intent(in)     :: dir          !< Direction
 !---------------------------------------------------------------------------------------------------
@@ -157,9 +157,10 @@
     REAL, DIMENSION(nc), intent(in)     :: y
     INTEGER,             intent(in)     :: np,nc
-    REAL,                intent(in)     :: s_parent,  s_child
-    REAL,                intent(in)     :: ds_parent, ds_child
+    REAL(kind=8),        intent(in)     :: s_parent,  s_child
+    REAL(kind=8),        intent(in)     :: ds_parent, ds_child
 !
     INTEGER :: i, ii, locind_child_left, coeffraf
-    REAL    :: xpos, invcoeffraf
+    REAL(kind=8)    :: xpos
+    REAL ::  invcoeffraf
     INTEGER :: nbnonnuls
     INTEGER :: diffmod
@@ -229,11 +230,11 @@
 !---------------------------------------------------------------------------------------------------
     INTEGER, intent(in) :: nc2, np, nc
-    REAL,    intent(in) :: s_parent,  s_child
-    REAL,    intent(in) :: ds_parent, ds_child
+    REAL(kind=8),    intent(in) :: s_parent,  s_child
+    REAL(kind=8),    intent(in) :: ds_parent, ds_child
     INTEGER, intent(in) :: dir
 !
     INTEGER, DIMENSION(:,:), ALLOCATABLE :: indchildaverage_tmp
     INTEGER :: i, locind_child_left, coeffraf
-    REAL    :: xpos
+    REAL(kind=8)    :: xpos
     INTEGER :: diffmod
 !
@@ -281,6 +282,6 @@
     REAL, DIMENSION(nc), intent(in)     :: y
     INTEGER,             intent(in)     :: np, nc
-    REAL,                intent(in)     :: s_parent,  s_child
-    REAL,                intent(in)     :: ds_parent, ds_child
+    REAL(kind=8),                intent(in)     :: s_parent,  s_child
+    REAL(kind=8),                intent(in)     :: ds_parent, ds_child
     INTEGER,             intent(in)     :: dir
 !
@@ -311,10 +312,9 @@
     ELSE
 !
-!CDIR NOLOOPCHG
-        do  j = 1,coeffraf
-!CDIR VECTOR
-            do i= 1,np
+
+        do i = 1,np
+        do j = 1,coeffraf
                 x(i) = x(i) + y(indchildaverage(i,dir) + j-1 )
-            enddo
+        enddo
         enddo
         IF (.not.Agrif_Update_Weights) THEN
@@ -338,8 +338,8 @@
     real, dimension(nc), intent(in)     :: y
     integer,             intent(in)     :: np, nc
-    real,                intent(in)     :: s_parent,  s_child
-    real,                intent(in)     :: ds_parent, ds_child
-!---------------------------------------------------------------------------------------------------
-    REAL    :: xpos, xposfin
+    real(kind=8),                intent(in)     :: s_parent,  s_child
+    real(kind=8),                intent(in)     :: ds_parent, ds_child
+!---------------------------------------------------------------------------------------------------
+    REAL(kind=8)    :: xpos, xposfin
     INTEGER :: i, ii, diffmod
     INTEGER :: it1, it2
