Index: trunk/NEMO/OPA_SRC/istate.F90
===================================================================
--- trunk/NEMO/OPA_SRC/istate.F90	(revision 79)
+++ trunk/NEMO/OPA_SRC/istate.F90	(revision 93)
@@ -10,4 +10,5 @@
    !!   istate_sal    : analytical profile for initial Salinity
    !!   istate_eel    : initial state setting of EEL R5 configuration
+   !!   istate_gyre   : initial state setting of GYRE configuration
    !!   istate_uvg    : initial velocity in geostropic balance
    !!----------------------------------------------------------------------
@@ -98,8 +99,11 @@
          adatrj = 0._wp
          IF( cp_cfg == 'eel' ) THEN
-            CALL istate_eel                      ! EEL configuration : start from pre-defined
-            !                                    !                     velocity and thermohaline fields
+            CALL istate_eel                      ! EEL   configuration : start from pre-defined
+            !                                    !                       velocity and thermohaline fields
+         ELSEIF(  cp_cfg == 'gyre') THEN         
+            CALL istate_gyre                     ! GYRE  configuration : start from pre-defined temperature
+            !                                    !                       and salinity fields 
          ELSE
-         !                                       ! Initial temperature and salinity fields
+         !                                       ! Other configurations: Initial temperature and salinity fields
 #if defined key_dtatem
             CALL dta_tem( nit000 )                  ! read 3D temperature data
@@ -375,4 +379,62 @@
 
 
+   SUBROUTINE istate_gyre
+      !!----------------------------------------------------------------------
+      !!                   ***  ROUTINE istate_gyre  ***
+      !! 
+      !! ** Purpose :   Initialization of the dynamics and tracers for GYRE
+      !!      configuration (double gyre with rotated domain)
+      !!
+      !! ** Method  : - set temprature field
+      !!              - set salinity field
+      !!
+      !! ** History :                                     
+      !!      9.0  !  04-05  (A. Koch-Larrouy)  Original code 
+      !!----------------------------------------------------------------------
+      !! * Local variables
+      INTEGER :: ji, jj, jk     ! dummy loop indices
+      !!----------------------------------------------------------------------
+
+      IF(lwp) WRITE(numout,*)
+      IF(lwp) WRITE(numout,*) 'istate_gyre : initial analytical T and S profil deduced from LEVITUS '
+      IF(lwp) WRITE(numout,*) '~~~~~~~~~~~'
+
+      DO jk = 1, jpk
+         DO jj = 1, jpj
+            DO ji = 1, jpi
+               tn(ji,jj,jk) = (  16. - 12. * TANH( (fsdept(ji,jj,jk) - 400) / 700 )         )   &
+                    &           * (-TANH( (500-fsdept(ji,jj,jk)) / 150 ) + 1) / 2               &
+                    &       + (      15. * ( 1. - TANH( (fsdept(ji,jj,jk)-50.) / 1500.) )       &
+                    &                - 1.4 * TANH((fsdept(ji,jj,jk)-100.) / 100.)               &    
+                    &                + 7.  * (1500. - fsdept(ji,jj,jk)) / 1500.             )   & 
+                    &           * (-TANH( (fsdept(ji,jj,jk) - 500) / 150) + 1) / 2
+               tn(ji,jj,jk) = tn(ji,jj,jk) * tmask(ji,jj,jk)
+               tb(ji,jj,jk) = tn(ji,jj,jk)
+
+               sn(ji,jj,jk) =  (  36.25 - 1.13 * TANH( (fsdept(ji,jj,jk) - 305) / 460 )  )  &
+                  &              * (-TANH((500 - fsdept(ji,jj,jk)) / 150) + 1) / 2          &
+                  &          + (  35.55 + 1.25 * (5000. - fsdept(ji,jj,jk)) / 5000.         &
+                  &                - 1.62 * TANH( (fsdept(ji,jj,jk) - 60.  ) / 650. )       &
+                  &                + 0.2  * TANH( (fsdept(ji,jj,jk) - 35.  ) / 100. )       &
+                  &                + 0.2  * TANH( (fsdept(ji,jj,jk) - 1000.) / 5000.)    )  &
+                  &              * (-TANH((fsdept(ji,jj,jk) - 500) / 150) + 1) / 2 
+               sn(ji,jj,jk) = sn(ji,jj,jk) * tmask(ji,jj,jk)
+               sb(ji,jj,jk) = sn(ji,jj,jk)
+            END DO
+         END DO
+      END DO
+
+      IF(lwp) THEN
+         WRITE(numout,*)
+         WRITE(numout,*) '              Initial temperature and salinity profiles:'
+         WRITE(numout, "(9x,' level   gdept   temperature   salinity   ')" )
+         WRITE(numout, "(10x, i4, 3f10.2)" ) ( jk, gdept(jk), tn(2,2,jk), sn(2,2,jk), jk = 1, jpk )
+      ENDIF
+
+     
+   END SUBROUTINE istate_gyre
+
+
+
    SUBROUTINE istate_uvg
       !!----------------------------------------------------------------------
