Index: branches/2015/dev_merge_2015/NEMOGCM/NEMO/OPA_SRC/OBS/obs_inter_sup.F90
===================================================================
--- branches/2015/dev_merge_2015/NEMOGCM/NEMO/OPA_SRC/OBS/obs_inter_sup.F90	(revision 6059)
+++ branches/2015/dev_merge_2015/NEMOGCM/NEMO/OPA_SRC/OBS/obs_inter_sup.F90	(revision 6069)
@@ -35,5 +35,5 @@
 CONTAINS
 
-   SUBROUTINE obs_int_comm_3d( kptsi, kptsj, kobs, kpk, kgrdi, kgrdj, &
+   SUBROUTINE obs_int_comm_3d( kptsi, kptsj, kobs, kpi, kpj, kpk, kgrdi, kgrdj, &
       &                        pval, pgval, kproc )
       !!----------------------------------------------------------------------
@@ -57,4 +57,6 @@
       INTEGER, INTENT(IN) :: kptsj     ! Number of j horizontal points per stencil
       INTEGER, INTENT(IN) :: kobs      ! Local number of observations
+      INTEGER, INTENT(IN) :: kpi       ! Number of points in i direction
+      INTEGER, INTENT(IN) :: kpj       ! Number of points in j direction
       INTEGER, INTENT(IN) :: kpk       ! Number of levels
       INTEGER, DIMENSION(kptsi,kptsj,kobs), INTENT(IN) :: &
@@ -63,5 +65,5 @@
       INTEGER, OPTIONAL, DIMENSION(kptsi,kptsj,kobs), INTENT(IN) :: &
          & kproc            ! Precomputed processor for each i,j,iobs points
-      REAL(KIND=wp), DIMENSION(jpi,jpj,kpk), INTENT(IN) ::&
+      REAL(KIND=wp), DIMENSION(kpi,kpj,kpk), INTENT(IN) ::&
          & pval             ! Local 3D array to extract data from
       REAL(KIND=wp), DIMENSION(kptsi,kptsj,kpk,kobs), INTENT(OUT) ::&
@@ -73,10 +75,10 @@
          IF (PRESENT(kproc)) THEN
 
-            CALL obs_int_comm_3d_global( kptsi, kptsj, kobs, kpk, kgrdi, &
+            CALL obs_int_comm_3d_global( kptsi, kptsj, kobs, kpi, kpj, kpk, kgrdi, &
                &                         kgrdj, pval, pgval, kproc=kproc )
 
          ELSE
 
-            CALL obs_int_comm_3d_global( kptsi, kptsj, kobs, kpk, kgrdi, &
+            CALL obs_int_comm_3d_global( kptsi, kptsj, kobs, kpi, kpj, kpk, kgrdi, &
                &                         kgrdj, pval, pgval )
 
@@ -85,5 +87,5 @@
       ELSE
 
-         CALL obs_int_comm_3d_local( kptsi, kptsj, kobs, kpk, kgrdi, kgrdj, &
+         CALL obs_int_comm_3d_local( kptsi, kptsj, kobs, kpi, kpj, kpk, kgrdi, kgrdj, &
             &                        pval, pgval )
 
@@ -92,5 +94,5 @@
    END SUBROUTINE obs_int_comm_3d
 
-   SUBROUTINE obs_int_comm_2d( kptsi, kptsj, kobs, kgrdi, kgrdj, pval, pgval, &
+   SUBROUTINE obs_int_comm_2d( kptsi, kptsj, kobs, kpi, kpj, kgrdi, kgrdj, pval, pgval, &
       &                        kproc )
       !!----------------------------------------------------------------------
@@ -111,4 +113,6 @@
       INTEGER, INTENT(IN) :: kptsj        ! Number of j horizontal points per stencil
       INTEGER, INTENT(IN) :: kobs          ! Local number of observations
+      INTEGER, INTENT(IN) :: kpi          ! Number of model grid points in i direction
+      INTEGER, INTENT(IN) :: kpj          ! Number of model grid points in j direction
       INTEGER, DIMENSION(kptsi,kptsj,kobs), INTENT(IN) :: &
          & kgrdi, &         ! i,j indicies for each stencil
@@ -116,5 +120,5 @@
       INTEGER, OPTIONAL, DIMENSION(kptsi,kptsj,kobs), INTENT(IN) :: &
          & kproc            ! Precomputed processor for each i,j,iobs points
-      REAL(KIND=wp), DIMENSION(jpi,jpj), INTENT(IN) ::&
+      REAL(KIND=wp), DIMENSION(kpi,kpj), INTENT(IN) ::&
          & pval             ! Local 3D array to extra data from
       REAL(KIND=wp), DIMENSION(kptsi,kptsj,kobs), INTENT(OUT) ::&
@@ -136,9 +140,9 @@
       IF (PRESENT(kproc)) THEN
 
-         CALL obs_int_comm_3d( kptsi, kptsj, kobs, 1, kgrdi, kgrdj, zval, &
+         CALL obs_int_comm_3d( kptsi, kptsj, kobs, kpi, kpj, 1, kgrdi, kgrdj, zval, &
             &                  zgval, kproc=kproc )
       ELSE
 
-         CALL obs_int_comm_3d( kptsi, kptsj, kobs, 1, kgrdi, kgrdj, zval, &
+         CALL obs_int_comm_3d( kptsi, kptsj, kobs, kpi, kpj, 1, kgrdi, kgrdj, zval, &
             &                  zgval )
 
@@ -154,5 +158,5 @@
    END SUBROUTINE obs_int_comm_2d
 
-   SUBROUTINE obs_int_comm_3d_global( kptsi, kptsj, kobs, kpk, kgrdi, kgrdj, &
+   SUBROUTINE obs_int_comm_3d_global( kptsi, kptsj, kobs, kpi, kpj, kpk, kgrdi, kgrdj, &
       &                               pval, pgval, kproc )
       !!----------------------------------------------------------------------
@@ -174,4 +178,6 @@
       INTEGER, INTENT(IN) :: kptsj     ! Number of j horizontal points per stencil
       INTEGER, INTENT(IN) :: kobs      ! Local number of observations
+      INTEGER, INTENT(IN) :: kpi       ! Number of model points in i direction
+      INTEGER, INTENT(IN) :: kpj       ! Number of model points in j direction
       INTEGER, INTENT(IN) :: kpk       ! Number of levels
       INTEGER, DIMENSION(kptsi,kptsj,kobs), INTENT(IN) :: &
@@ -180,5 +186,5 @@
       INTEGER, OPTIONAL, DIMENSION(kptsi,kptsj,kobs), INTENT(IN) :: &
          & kproc            ! Precomputed processor for each i,j,iobs points
-      REAL(KIND=wp), DIMENSION(jpi,jpj,kpk), INTENT(IN) ::&
+      REAL(KIND=wp), DIMENSION(kpi,kpj,kpk), INTENT(IN) ::&
          & pval             ! Local 3D array to extract data from
       REAL(KIND=wp), DIMENSION(kptsi,kptsj,kpk,kobs), INTENT(OUT) ::&
@@ -207,11 +213,11 @@
 
       ! Check valid points
-      
+
       IF ( ( MAXVAL(kgrdi) > jpiglo ) .OR. ( MINVAL(kgrdi) < 1 ) .OR. &
          & ( MAXVAL(kgrdj) > jpjglo ) .OR. ( MINVAL(kgrdj) < 1 ) ) THEN
-         
+
          CALL ctl_stop( 'Error in obs_int_comm_3d_global', &
             &           'Point outside global domain' )
-         
+
       ENDIF
 
@@ -323,5 +329,5 @@
    END SUBROUTINE obs_int_comm_3d_global
    
-   SUBROUTINE obs_int_comm_3d_local( kptsi, kptsj, kobs, kpk, kgrdi, kgrdj, &
+   SUBROUTINE obs_int_comm_3d_local( kptsi, kptsj, kobs, kpi, kpj, kpk, kgrdi, kgrdj, &
       &                              pval, pgval )
       !!----------------------------------------------------------------------
@@ -343,9 +349,11 @@
       INTEGER, INTENT(IN) :: kptsj        ! Number of j horizontal points per stencil
       INTEGER, INTENT(IN) :: kobs         ! Local number of observations
+      INTEGER, INTENT(IN) :: kpi          ! Number of model points in i direction
+      INTEGER, INTENT(IN) :: kpj          ! Number of model points in j direction
       INTEGER, INTENT(IN) :: kpk          ! Number of levels
       INTEGER, DIMENSION(kptsi,kptsj,kobs), INTENT(IN) :: &
          & kgrdi, &         ! i,j indicies for each stencil
          & kgrdj
-      REAL(KIND=wp), DIMENSION(jpi,jpj,kpk), INTENT(IN) ::&
+      REAL(KIND=wp), DIMENSION(kpi,kpj,kpk), INTENT(IN) ::&
          & pval             ! Local 3D array to extract data from
       REAL(KIND=wp), DIMENSION(kptsi,kptsj,kpk,kobs), INTENT(OUT) ::&
