Index: trunk/NEMO/OPA_SRC/geo2ocean.F90
===================================================================
--- trunk/NEMO/OPA_SRC/geo2ocean.F90	(revision 672)
+++ trunk/NEMO/OPA_SRC/geo2ocean.F90	(revision 685)
@@ -38,5 +38,5 @@
    !!---------------------------------------------------------------------------------
    !!   OPA 9.0 , LOCEAN-IPSL (2005) 
-   !! $Header$ 
+   !! $Header: /home/opalod/NEMOCVSROOT/NEMO/OPA_SRC/geo2ocean.F90,v 1.7 2007/06/29 14:23:06 opalod Exp $ 
    !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt 
    !!---------------------------------------------------------------------------------
@@ -45,5 +45,5 @@
 
    SUBROUTINE repcmo ( pxu1, pyu1, pxv1, pyv1,   &
-                       px2 , py2 , kt )
+                       px2 , py2 )
       !!----------------------------------------------------------------------
       !!                  ***  ROUTINE repcmo  ***
@@ -62,6 +62,4 @@
       !!----------------------------------------------------------------------
       !! * Arguments 
-      INTEGER,  INTENT( in ) ::   &
-         kt                ! ocean time-step
       REAL(wp), INTENT( in ), DIMENSION(jpi,jpj) ::   & 
          pxu1, pyu1,     & ! geographic vector componantes at u-point
@@ -75,11 +73,11 @@
       ! ----------------------------------------------
       
-      px2(:,:) = rot_rep( pxu1, pyu1, 'U', 'en->i' )
-      py2(:,:) = rot_rep( pxv1, pyv1, 'V', 'en->j' )
+      CALL rot_rep( pxu1, pyu1, 'U', 'en->i',px2 )
+      CALL rot_rep( pxv1, pyv1, 'V', 'en->j',py2 )
       
    END SUBROUTINE repcmo
 
 
-   FUNCTION rot_rep ( pxin, pyin, cd_type, cdtodo )
+   SUBROUTINE rot_rep ( pxin, pyin, cd_type, cdtodo, prot )
       !!----------------------------------------------------------------------
       !!                  ***  ROUTINE rot_rep  ***
@@ -100,5 +98,5 @@
       !!                                                           ! 'ij->e' model i-j componantes to east componante
       !!                                                           ! 'ij->n' model i-j componantes to east componante
-      REAL(wp), DIMENSION(jpi,jpj) ::   rot_rep      
+      REAL(wp), DIMENSION(jpi,jpj), INTENT(out) ::   prot      
 
       !!----------------------------------------------------------------------
@@ -120,32 +118,32 @@
       CASE ('en->i')      ! 'en->i' est-north componantes to model i componante
          SELECT CASE (cd_type)
-         CASE ('T')   ;   rot_rep(:,:) = pxin(:,:) * gcost(:,:) + pyin(:,:) * gsint(:,:)
-         CASE ('U')   ;   rot_rep(:,:) = pxin(:,:) * gcosu(:,:) + pyin(:,:) * gsinu(:,:)
-         CASE ('V')   ;   rot_rep(:,:) = pxin(:,:) * gcosv(:,:) + pyin(:,:) * gsinv(:,:)
-         CASE ('F')   ;   rot_rep(:,:) = pxin(:,:) * gcosf(:,:) + pyin(:,:) * gsinf(:,:)
+         CASE ('T')   ;   prot(:,:) = pxin(:,:) * gcost(:,:) + pyin(:,:) * gsint(:,:)
+         CASE ('U')   ;   prot(:,:) = pxin(:,:) * gcosu(:,:) + pyin(:,:) * gsinu(:,:)
+         CASE ('V')   ;   prot(:,:) = pxin(:,:) * gcosv(:,:) + pyin(:,:) * gsinv(:,:)
+         CASE ('F')   ;   prot(:,:) = pxin(:,:) * gcosf(:,:) + pyin(:,:) * gsinf(:,:)
          CASE DEFAULT   ;   CALL ctl_stop( 'Only T, U, V and F grid points are coded' )
          END SELECT
       CASE ('en->j')      ! 'en->j' est-north componantes to model j componante
          SELECT CASE (cd_type)
-         CASE ('T')   ;   rot_rep(:,:) = pyin(:,:) * gcost(:,:) - pxin(:,:) * gsint(:,:)
-         CASE ('U')   ;   rot_rep(:,:) = pyin(:,:) * gcosu(:,:) - pxin(:,:) * gsinu(:,:)
-         CASE ('V')   ;   rot_rep(:,:) = pyin(:,:) * gcosv(:,:) - pxin(:,:) * gsinv(:,:)   
-         CASE ('F')   ;   rot_rep(:,:) = pyin(:,:) * gcosf(:,:) - pxin(:,:) * gsinf(:,:)   
+         CASE ('T')   ;   prot(:,:) = pyin(:,:) * gcost(:,:) - pxin(:,:) * gsint(:,:)
+         CASE ('U')   ;   prot(:,:) = pyin(:,:) * gcosu(:,:) - pxin(:,:) * gsinu(:,:)
+         CASE ('V')   ;   prot(:,:) = pyin(:,:) * gcosv(:,:) - pxin(:,:) * gsinv(:,:)   
+         CASE ('F')   ;   prot(:,:) = pyin(:,:) * gcosf(:,:) - pxin(:,:) * gsinf(:,:)   
          CASE DEFAULT   ;   CALL ctl_stop( 'Only T, U, V and F grid points are coded' )
          END SELECT
       CASE ('ij->e')      ! 'ij->e' model i-j componantes to est componante
          SELECT CASE (cd_type)
-         CASE ('T')   ;   rot_rep(:,:) = pxin(:,:) * gcost(:,:) - pyin(:,:) * gsint(:,:)
-         CASE ('U')   ;   rot_rep(:,:) = pxin(:,:) * gcosu(:,:) - pyin(:,:) * gsinu(:,:)
-         CASE ('V')   ;   rot_rep(:,:) = pxin(:,:) * gcosv(:,:) - pyin(:,:) * gsinv(:,:)
-         CASE ('F')   ;   rot_rep(:,:) = pxin(:,:) * gcosf(:,:) - pyin(:,:) * gsinf(:,:)
+         CASE ('T')   ;   prot(:,:) = pxin(:,:) * gcost(:,:) - pyin(:,:) * gsint(:,:)
+         CASE ('U')   ;   prot(:,:) = pxin(:,:) * gcosu(:,:) - pyin(:,:) * gsinu(:,:)
+         CASE ('V')   ;   prot(:,:) = pxin(:,:) * gcosv(:,:) - pyin(:,:) * gsinv(:,:)
+         CASE ('F')   ;   prot(:,:) = pxin(:,:) * gcosf(:,:) - pyin(:,:) * gsinf(:,:)
          CASE DEFAULT   ;   CALL ctl_stop( 'Only T, U, V and F grid points are coded' )
          END SELECT
       CASE ('ij->n')      ! 'ij->n' model i-j componantes to est componante
          SELECT CASE (cd_type)
-         CASE ('T')   ;   rot_rep(:,:) = pyin(:,:) * gcost(:,:) + pxin(:,:) * gsint(:,:)
-         CASE ('U')   ;   rot_rep(:,:) = pyin(:,:) * gcosu(:,:) + pxin(:,:) * gsinu(:,:)
-         CASE ('V')   ;   rot_rep(:,:) = pyin(:,:) * gcosv(:,:) + pxin(:,:) * gsinv(:,:)
-         CASE ('F')   ;   rot_rep(:,:) = pyin(:,:) * gcosf(:,:) + pxin(:,:) * gsinf(:,:)
+         CASE ('T')   ;   prot(:,:) = pyin(:,:) * gcost(:,:) + pxin(:,:) * gsint(:,:)
+         CASE ('U')   ;   prot(:,:) = pyin(:,:) * gcosu(:,:) + pxin(:,:) * gsinu(:,:)
+         CASE ('V')   ;   prot(:,:) = pyin(:,:) * gcosv(:,:) + pxin(:,:) * gsinv(:,:)
+         CASE ('F')   ;   prot(:,:) = pyin(:,:) * gcosf(:,:) + pxin(:,:) * gsinf(:,:)
          CASE DEFAULT   ;   CALL ctl_stop( 'Only T, U, V and F grid points are coded' )
          END SELECT
@@ -153,5 +151,5 @@
       END SELECT
       
-   END FUNCTION rot_rep
+   END SUBROUTINE rot_rep
 
 
@@ -438,9 +436,9 @@
       SELECT CASE (kchoix)
       CASE ( 1)      ! change from geographic to model grid.
-         px2(:,:) = rot_rep( px1, py1, cl_type, 'en->i' )
-         py2(:,:) = rot_rep( px1, py1, cl_type, 'en->j' )
+         CALL rot_rep( px1, py1, cl_type, 'en->i', px2 )
+         CALL rot_rep( px1, py1, cl_type, 'en->j', py2 )
       CASE (-1)      ! change from model to geographic grid
-         px2(:,:) = rot_rep( px1, py1, cl_type, 'ij->e' )
-         py2(:,:) = rot_rep( px1, py1, cl_type, 'ij->n' )
+         CALL rot_rep( px1, py1, cl_type, 'ij->e', px2 )
+         CALL rot_rep( px1, py1, cl_type, 'ij->n', py2 )
       CASE DEFAULT   ;   CALL ctl_stop( 'repere: Syntax Error in the definition of kchoix (1 OR -1' )
       END SELECT
