Index: vendors/AGRIF/CMEMS_2020/AGRIF_FILES/modarrays.F90
===================================================================
--- vendors/AGRIF/CMEMS_2020/AGRIF_FILES/modarrays.F90	(revision 10087)
+++ vendors/AGRIF/CMEMS_2020/AGRIF_FILES/modarrays.F90	(revision 10725)
@@ -88,5 +88,4 @@
         ub_glob_index = ub_var(i)
 #endif
-
         lb_tab_true(i) = max(lb_tab(i), lb_glob_index)
         ub_tab_true(i) = min(ub_tab(i), ub_glob_index)
@@ -234,6 +233,5 @@
     case (1) ; call Agrif_set_array_tozero_1D(variable%array1)
     case (2) ; call Agrif_set_array_tozero_2D(variable%array2)
-    case (3) ; call Agrif_set_array_tozero_reshape(variable%array3,size(variable%array3))
-!case (3) ; call Agrif_set_array_tozero_3D(variable%array3)
+    case (3) ; call Agrif_set_array_tozero_3D(variable%array3)
     case (4) ; call Agrif_set_array_tozero_4D(variable%array4)
     case (5) ; call Agrif_set_array_tozero_5D(variable%array5)
@@ -276,110 +274,4 @@
 !===================================================================================================
 !
-!===================================================================================================
-!
-!===================================================================================================
-!  subroutine agrif_set_array_cond
-!
-!> Compute the masking of \b variablein, according to the required dimension.
-!---------------------------------------------------------------------------------------------------
-subroutine agrif_set_array_cond ( variablein, variableout, value, nbdim )
-!---------------------------------------------------------------------------------------------------
-    type(Agrif_Variable), intent(in)    :: variablein     !< Variablein
-    type(Agrif_Variable), intent(inout) :: variableout    !< Variableout
-    real,intent(in) :: value                            !< special value
-    integer, intent(in)                 :: nbdim        !< Dimension of the array
-
-!
-    select case (nbdim)
-    case (1) ; call agrif_set_array_cond_1D(variablein%array1,variableout%array1,value)
-    case (2) ; call agrif_set_array_cond_2D(variablein%array2,variableout%array2,value)
-    case (3) ; call agrif_set_array_cond_reshape(variablein%array3,variableout%array3,value,size(variablein%array3))
-!    case (3) ; call agrif_set_array_cond_3D(variablein%array3,variableout%array3,value)
-    case (4) ; call agrif_set_array_cond_4D(variablein%array4,variableout%array4,value)
-    case (5) ; call agrif_set_array_cond_5D(variablein%array5,variableout%array5,value)
-    case (6) ; call agrif_set_array_cond_6D(variablein%array6,variableout%array6,value)
-    end select
-!---------------------------------------------------------------------------------------------------
-contains
-!---------------------------------------------------------------------------------------------------
-subroutine agrif_set_array_cond_1D(arrayin,arrayout,value)
-real,dimension(:),intent(in) :: arrayin
-real,dimension(:),intent(out) :: arrayout
-real :: value
-
-where (arrayin == value)
-  arrayout = 0.
-elsewhere
-  arrayout = 1.
-end where
-
-end subroutine agrif_set_array_cond_1D
-!
-subroutine agrif_set_array_cond_2D(arrayin,arrayout,value)
-real,dimension(:,:),intent(in) :: arrayin
-real,dimension(:,:),intent(out) :: arrayout
-real :: value
-
-where (arrayin == value)
-  arrayout = 0.
-elsewhere
-  arrayout = 1.
-end where
-
-end subroutine agrif_set_array_cond_2D
-!
-subroutine agrif_set_array_cond_3D(arrayin,arrayout,value)
-real,dimension(:,:,:),intent(in) :: arrayin
-real,dimension(:,:,:),intent(out) :: arrayout
-real :: value
-
-where (arrayin == value)
-  arrayout = 0.
-elsewhere
-  arrayout = 1.
-end where
-
-end subroutine agrif_set_array_cond_3D
-!
-subroutine agrif_set_array_cond_4D(arrayin,arrayout,value)
-real,dimension(:,:,:,:),intent(in) :: arrayin
-real,dimension(:,:,:,:),intent(out) :: arrayout
-real :: value
-
-where (arrayin == value)
-  arrayout = 0.
-elsewhere
-  arrayout = 1.
-end where
-
-end subroutine agrif_set_array_cond_4D
-!
-subroutine agrif_set_array_cond_5D(arrayin,arrayout,value)
-real,dimension(:,:,:,:,:),intent(in) :: arrayin
-real,dimension(:,:,:,:,:),intent(out) :: arrayout
-real :: value
-
-where (arrayin == value)
-  arrayout = 0.
-elsewhere
-  arrayout = 1.
-end where
-
-end subroutine agrif_set_array_cond_5D
-!
-subroutine agrif_set_array_cond_6D(arrayin,arrayout,value)
-real,dimension(:,:,:,:,:,:),intent(in) :: arrayin
-real,dimension(:,:,:,:,:,:),intent(out) :: arrayout
-real :: value
-
-where (arrayin == value)
-  arrayout = 0.
-elsewhere
-  arrayout = 1.
-end where
-
-end subroutine agrif_set_array_cond_6D
-!---------------------------------------------------------------------------------------------------
-end subroutine agrif_set_array_cond
 !===================================================================================================
 !  subroutine Agrif_var_copy_array
@@ -446,26 +338,9 @@
         real, dimension(l(1):,l(2):,l(3):), intent(out) :: tabout
         real, dimension(m(1):,m(2):,m(3):), intent(in)  :: tabin
-        integer :: i,j,k
-
-
-!$OMP PARALLEL DO DEFAULT(none) PRIVATE(i,j,k) &
-!$OMP SHARED(inf1,inf2,sup1,sup2,tabin,tabout) &
-!$OMP SCHEDULE(RUNTIME)
-        do k=inf1(3),sup1(3)
-        do j=inf1(2),sup1(2)
-        do i=inf1(1),sup1(1)
-!          tabout(i,j,k) = tabin(i+inf2(1)-inf1(1),j+inf2(2)-inf1(2),k+inf2(3)-inf1(3))
-          tabout(i,j,k) = tabin(i,j,k)
-        enddo
-        enddo
-        enddo
-!$OMP END PARALLEL DO
-
-
-!        tabout(inf1(1):sup1(1), &
-!               inf1(2):sup1(2), &
-!               inf1(3):sup1(3)) = tabin(inf2(1):sup2(1), &
-!                                        inf2(2):sup2(2), &
-!                                        inf2(3):sup2(3))
+        tabout(inf1(1):sup1(1), &
+               inf1(2):sup1(2), &
+               inf1(3):sup1(3)) = tabin(inf2(1):sup2(1), &
+                                        inf2(2):sup2(2), &
+                                        inf2(3):sup2(3))
     end subroutine Agrif_copy_array_3d
 !
@@ -764,8 +639,8 @@
     integer, dimension(6), intent(out)          :: lb_child     !< Lower bound on the child grid
     integer, dimension(6), intent(out)          :: lb_parent    !< Lower bound on the parent grid
-    real(kind=8), dimension(6),    intent(out)  :: s_child      !< Child  grid position (s_root = 0)
-    real(kind=8), dimension(6),    intent(out)  :: s_parent     !< Parent grid position (s_root = 0)
-    real(kind=8), dimension(6),    intent(out)  :: ds_child     !< Child  grid dx (ds_root = 1)
-    real(kind=8), dimension(6),    intent(out)  :: ds_parent    !< Parent grid dx (ds_root = 1)
+    real, dimension(6),    intent(out)          :: s_child      !< Child  grid position (s_root = 0)
+    real, dimension(6),    intent(out)          :: s_parent     !< Parent grid position (s_root = 0)
+    real, dimension(6),    intent(out)          :: ds_child     !< Child  grid dx (ds_root = 1)
+    real, dimension(6),    intent(out)          :: ds_parent    !< Parent grid dx (ds_root = 1)
     integer,               intent(out)          :: nbdim        !< Number of dimensions
     logical,               intent(in)           :: interp       !< .true. if preprocess for interpolation, \n
@@ -804,6 +679,6 @@
             else
                 ub_child(n) = lb_child(n) + Agrif_Child_Gr % nb(1) - 1
-                s_child(n)  = s_child(n)  + 0.5d0*ds_child(n)
-                s_parent(n) = s_parent(n) + 0.5d0*ds_parent(n)
+                s_child(n)  = s_child(n)  + 0.5*ds_child(n)
+                s_parent(n) = s_parent(n) + 0.5*ds_parent(n)
             endif
 !
@@ -822,6 +697,6 @@
             else
                 ub_child(n) = lb_child(n) + Agrif_Child_Gr % nb(2) - 1
-                s_child(n)  = s_child(n)  + 0.5d0*ds_child(n)
-                s_parent(n) = s_parent(n) + 0.5d0*ds_parent(n)
+                s_child(n)  = s_child(n)  + 0.5*ds_child(n)
+                s_parent(n) = s_parent(n) + 0.5*ds_parent(n)
             endif
 !
@@ -860,8 +735,8 @@
 !           No interpolation but only a copy of the values of the grid variable
             lb_parent(n) = lb_child(n)
-            s_child(n)   = 0.d0
-            s_parent(n)  = 0.d0
-            ds_child(n)  = 1.d0
-            ds_parent(n) = 1.d0
+            s_child(n)   = 0.
+            s_parent(n)  = 0.
+            ds_child(n)  = 1.
+            ds_parent(n) = 1.
 !
         end select
@@ -966,35 +841,2 @@
 !
 end module Agrif_Arrays
-
-
-subroutine agrif_set_array_cond_reshape(arrayin,arrayout,value,n)
-integer :: n
-real,dimension(n) :: arrayin,arrayout
-real :: value
-
-integer :: i
-
-do i=1,n
-  if (arrayin(i) == value) then
-    arrayout(i) = 0.
-  else
-    arrayout(i) = 1.
-  endif
-enddo
-
-end subroutine agrif_set_array_cond_reshape
-
-subroutine agrif_set_array_tozero_reshape(array,n)
-integer :: n
-real,dimension(n) :: array
-
-integer :: i
-
-!$OMP PARALLEL DO DEFAULT(none) PRIVATE(i) &
-!$OMP SHARED(array,n)
-do i=1,n
-    array(i) = 0.
-enddo
-!$OMP END PARALLEL DO
-
-end subroutine agrif_set_array_tozero_reshape
