Index: branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OFF_SRC/dtadyn.F90
===================================================================
--- branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OFF_SRC/dtadyn.F90	(revision 4312)
+++ branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OFF_SRC/dtadyn.F90	(revision 4313)
@@ -243,5 +243,5 @@
       tsn(:,:,:,jp_sal) = sf_dyn(jf_sal)%fnow(:,:,:)  * tmask(:,:,:)    ! salinity
       !
-      CALL eos    ( tsn, rhd, rhop )                                       ! In any case, we need rhop
+      CALL eos    ( tsn, rhd, rhop, gdept_0(:,:,:) )                                       ! In any case, we need rhop
       CALL zdf_mxl( kt )                                                   ! In any case, we need mxl 
       !
@@ -521,5 +521,5 @@
       !!---------------------------------------------------------------------
 #if defined key_ldfslp && ! defined key_c1d
-      CALL eos( pts, rhd, rhop )   ! Time-filtered in situ density 
+      CALL eos( pts, rhd, rhop, gdept_0(:,:,:) )   ! Time-filtered in situ density 
       CALL bn2( pts, rn2 )         ! before Brunt-Vaisala frequency
       IF( ln_zps )   &
Index: branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/ASM/asminc.F90
===================================================================
--- branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/ASM/asminc.F90	(revision 4312)
+++ branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/ASM/asminc.F90	(revision 4313)
@@ -761,5 +761,5 @@
             tsb(:,:,:,:) = tsn(:,:,:,:)               ! Update before fields
 
-            CALL eos( tsb, rhd, rhop )                ! Before potential and in situ densities
+            CALL eos( tsb, rhd, rhop, gdept_0(:,:,:) )                ! Before potential and in situ densities
          
             IF( ln_zps .AND. .NOT. lk_c1d ) &
@@ -769,5 +769,5 @@
 
 #if defined key_zdfkpp
-            CALL eos( tsn, rhd )                      ! Compute rhd
+            CALL eos( tsn, rhd, fsdept_n(:,:,:) )                      ! Compute rhd
 #endif
 
Index: branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/C1D/step_c1d.F90
===================================================================
--- branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/C1D/step_c1d.F90	(revision 4312)
+++ branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/C1D/step_c1d.F90	(revision 4313)
@@ -130,5 +130,5 @@
                              CALL tra_nxt    ( kstp )        ! tracer fields at next time step
       IF( ln_zdfnpc      )   CALL tra_npc    ( kstp )        ! applied non penetrative convective adjustment on (t,s)
-                             CALL eos( tsb, rhd, rhop )      ! now (swap=before) in situ density for dynhpg module
+                             CALL eos( tsb, rhd, rhop, gdept_0(:,:,:) )      ! now (swap=before) in situ density for dynhpg module
 
       !>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Index: branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/DIA/diaar5.F90
===================================================================
--- branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/DIA/diaar5.F90	(revision 4312)
+++ branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/DIA/diaar5.F90	(revision 4313)
@@ -98,5 +98,5 @@
       ztsn(:,:,:,jp_tem) = tsn(:,:,:,jp_tem)                    ! thermosteric ssh
       ztsn(:,:,:,jp_sal) = sn0(:,:,:)
-      CALL eos( ztsn, zrhd )                       ! now in situ density using initial salinity
+      CALL eos( ztsn, zrhd, fsdept_n(:,:,:) )                       ! now in situ density using initial salinity
       !
       zbotpres(:,:) = 0._wp                        ! no atmospheric surface pressure, levitating sea-ice
@@ -112,5 +112,5 @@
       
       !                                         ! steric sea surface height
-      CALL eos( tsn, zrhd, zrhop )                 ! now in situ and potential density
+      CALL eos( tsn, zrhd, zrhop, fsdept_n(:,:,:) )                 ! now in situ and potential density
       zrhop(:,:,jpk) = 0._wp
       CALL iom_put( 'rhop', zrhop )
Index: branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/DOM/istate.F90
===================================================================
--- branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/DOM/istate.F90	(revision 4312)
+++ branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/DOM/istate.F90	(revision 4313)
@@ -130,5 +130,5 @@
          ENDIF
          !
-         CALL eos( tsb, rhd, rhop )        ! before potential and in situ densities
+         CALL eos( tsb, rhd, rhop, gdept_0(:,:,:) )        ! before potential and in situ densities
 #if ! defined key_c1d
          IF( ln_zps )   CALL zps_hde( nit000, jpts, tsb, gtsu, gtsv,  & ! zps: before hor. gradient
Index: branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/IOM/restart.F90
===================================================================
--- branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/IOM/restart.F90	(revision 4312)
+++ branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/IOM/restart.F90	(revision 4313)
@@ -228,5 +228,5 @@
          CALL iom_get( numror, jpdom_autoglo, 'rhop'   , rhop    )   ! now    potential density
       ELSE
-         CALL eos    ( tsn, rhd, rhop )   
+         CALL eos    ( tsn, rhd, rhop, fsdept_n(:,:,:) )   
       ENDIF
 #if defined key_zdfkpp
@@ -234,5 +234,5 @@
          CALL iom_get( numror, jpdom_autoglo, 'rhd'    , rhd     )   ! now    in situ density anomaly
       ELSE
-         CALL eos( tsn, rhd )   ! compute rhd
+         CALL eos( tsn, rhd, fsdept_n(:,:,:) )   ! compute rhd
       ENDIF
 #endif
Index: branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/TRA/tranpc.F90
===================================================================
--- branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/TRA/tranpc.F90	(revision 4312)
+++ branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/TRA/tranpc.F90	(revision 4313)
@@ -81,5 +81,5 @@
          inpci = 0
 
-         CALL eos( tsa, rhd, zrhop )         ! Potential density
+         CALL eos( tsa, rhd, zrhop, fsdept_n(:,:,:) )         ! Potential density
 
          IF( l_trdtra )   THEN                    !* Save ta and sa trends
Index: branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/TRD/trdicp.F90
===================================================================
--- branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/TRD/trdicp.F90	(revision 4312)
+++ branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/TRD/trdicp.F90	(revision 4313)
@@ -276,5 +276,5 @@
          zkepe(:,:,:) = 0._wp
    
-         CALL eos( tsn, rhd, rhop )       ! now potential and in situ densities
+         CALL eos( tsn, rhd, rhop, fsdept_n(:,:,:) )       ! now potential and in situ densities
 
          zcof = 0.5_wp / rau0             ! Density flux at w-point
Index: branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/step.F90
===================================================================
--- branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/step.F90	(revision 4312)
+++ branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/step.F90	(revision 4313)
@@ -112,5 +112,5 @@
           ! Note that the computation of vertical velocity above, hence "after" sea level
           ! is necessary to compute momentum advection for the rhs of barotropic loop:
-                                  CALL eos    ( tsn, rhd, rhop )                 ! now in situ density for hpg computation
+                                  CALL eos    ( tsn, rhd, rhop, fsdept_n(:,:,:) )                 ! now in situ density for hpg computation
           IF( ln_zps      )       CALL zps_hde( kstp, jpts, tsn, gtsu, gtsv,  &  ! zps: now hor. derivative
                 &                                          rhd, gru , grv  )     ! of t, s, rd at the last ocean level
