Index: branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OFF_SRC/dtadyn.F90
===================================================================
--- branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OFF_SRC/dtadyn.F90	(revision 3269)
+++ branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OFF_SRC/dtadyn.F90	(revision 3270)
@@ -135,7 +135,7 @@
          CALL fld_read( kt, 1, sf_dyn )      !==   read data at kt time step   ==!
          !
-         IF( lk_ldfslp .AND. sf_dyn(jf_tem)%ln_tint ) THEN    ! Computes slopes (here avt is used as workspace)                       
-            zts(:,:,:,jf_tem) = sf_dyn(jf_tem)%fdta(:,:,:,1) * tmask(:,:,:)   ! temperature
-            zts(:,:,:,jf_sal) = sf_dyn(jf_sal)%fdta(:,:,:,1) * tmask(:,:,:)   ! salinity 
+         IF( lk_ldfslp .AND. .NOT.lk_c1d .AND. sf_dyn(jf_tem)%ln_tint ) THEN    ! Computes slopes (here avt is used as workspace)                       
+            zts(:,:,:,jp_tem) = sf_dyn(jf_tem)%fdta(:,:,:,1) * tmask(:,:,:)   ! temperature
+            zts(:,:,:,jp_sal) = sf_dyn(jf_sal)%fdta(:,:,:,1) * tmask(:,:,:)   ! salinity 
             avt(:,:,:)        = sf_dyn(jf_avt)%fdta(:,:,:,1) * tmask(:,:,:)   ! vertical diffusive coef.
             CALL dta_dyn_slp( kt, zts, zuslp, zvslp, zwslpi, zwslpj )
@@ -159,5 +159,5 @@
       ENDIF
       ! 
-      IF( lk_ldfslp ) THEN    ! Computes slopes (here avt is used as workspace)                       
+      IF( lk_ldfslp .AND. .NOT.lk_c1d ) THEN    ! Computes slopes (here avt is used as workspace)                       
          iswap_tem = 0
          IF(  kt /= nit000 .AND. ( sf_dyn(jf_tem)%nrec_a(2) - nrecprev_tem ) /= 0 )  iswap_tem = 1
@@ -173,6 +173,6 @@
                ENDIF
                !
-               zts(:,:,:,jf_tem) = sf_dyn(jf_tem)%fdta(:,:,:,2) * tmask(:,:,:)   ! temperature
-               zts(:,:,:,jf_sal) = sf_dyn(jf_sal)%fdta(:,:,:,2) * tmask(:,:,:)   ! salinity 
+               zts(:,:,:,jp_tem) = sf_dyn(jf_tem)%fdta(:,:,:,2) * tmask(:,:,:)   ! temperature
+               zts(:,:,:,jp_sal) = sf_dyn(jf_sal)%fdta(:,:,:,2) * tmask(:,:,:)   ! salinity 
                avt(:,:,:)        = sf_dyn(jf_avt)%fdta(:,:,:,2) * tmask(:,:,:)   ! vertical diffusive coef.
                CALL dta_dyn_slp( kt, zts, zuslp, zvslp, zwslpi, zwslpj )
@@ -183,6 +183,6 @@
                wslpjdta(:,:,:,2) = zwslpj(:,:,:) 
             ELSE
-               zts(:,:,:,jf_tem) = sf_dyn(jf_tem)%fnow(:,:,:) * tmask(:,:,:)
-               zts(:,:,:,jf_sal) = sf_dyn(jf_sal)%fnow(:,:,:) * tmask(:,:,:)
+               zts(:,:,:,jp_tem) = sf_dyn(jf_tem)%fnow(:,:,:) * tmask(:,:,:)
+               zts(:,:,:,jp_sal) = sf_dyn(jf_sal)%fnow(:,:,:) * tmask(:,:,:)
                avt(:,:,:)        = sf_dyn(jf_avt)%fnow(:,:,:) * tmask(:,:,:)
                CALL dta_dyn_slp( kt, zts, zuslp, zvslp, zwslpi, zwslpj )
@@ -241,8 +241,9 @@
       ENDIF
       !
-      tsn(:,:,:,jf_tem) = sf_dyn(jf_tem)%fnow(:,:,:) * tmask(:,:,:)    ! temperature
-      tsn(:,:,:,jf_sal) = sf_dyn(jf_sal)%fnow(:,:,:) * tmask(:,:,:)    ! salinity
-      !
-      CALL eos( tsn, rhd, rhop )                                       ! In any case, we need rhop
+      tsn(:,:,:,jp_tem) = sf_dyn(jf_tem)%fnow(:,:,:) * tmask(:,:,:)    ! temperature
+      tsn(:,:,:,jp_sal) = sf_dyn(jf_sal)%fnow(:,:,:) * tmask(:,:,:)    ! salinity
+      !
+      CALL eos    ( tsn, rhd, rhop )                                       ! In any case, we need rhop
+      CALL zdf_mxl( kt )                                                   ! In any case, we need mxl 
       !
       avt(:,:,:)       = sf_dyn(jf_avt)%fnow(:,:,:) * tmask(:,:,:)    ! vertical diffusive coefficient 
@@ -257,6 +258,7 @@
       fr_i(:,:)        = sf_dyn(jf_ice)%fnow(:,:,1) * tmask(:,:,1)     ! Sea-ice fraction
       qsr (:,:)        = sf_dyn(jf_qsr)%fnow(:,:,1) * tmask(:,:,1)    ! solar radiation
+
       !                                                      ! bbl diffusive coef
-#if defined key_trabbl
+#if defined key_trabbl && ! defined key_c1d
       IF( ln_dynbbl ) THEN                                        ! read in a file
          ahu_bbl(:,:)  = sf_dyn(jf_ubl)%fnow(:,:,1) * umask(:,:,1)
@@ -267,5 +269,5 @@
       END IF
 #endif
-#if ! defined key_degrad && defined key_traldf_c2d && defined key_traldf_eiv
+#if ( ! defined key_degrad && defined key_traldf_c2d && defined key_traldf_eiv ) && ! defined key_c1d 
       aeiw(:,:)        = sf_dyn(jf_eiw)%fnow(:,:,1) * tmask(:,:,1)    ! w-eiv
       !                                                           ! Computes the horizontal values from the vertical value
@@ -279,10 +281,10 @@
 #endif
       
-#if defined key_degrad
+#if defined key_degrad && ! defined key_c1d 
       !                                          ! degrad option : diffusive and eiv coef are 3D
       ahtu(:,:,:) = sf_dyn(jf_ahu)%fnow(:,:,:) * umask(:,:,:)
       ahtv(:,:,:) = sf_dyn(jf_ahv)%fnow(:,:,:) * vmask(:,:,:)
       ahtw(:,:,:) = sf_dyn(jf_ahw)%fnow(:,:,:) * tmask(:,:,:)
-#  if defined key_traldf_eiv
+#  if defined key_traldf_eiv 
       aeiu(:,:,:) = sf_dyn(jf_eiu)%fnow(:,:,:) * umask(:,:,:)
       aeiv(:,:,:) = sf_dyn(jf_eiv)%fnow(:,:,:) * vmask(:,:,:)
@@ -292,6 +294,6 @@
       !
       IF(ln_ctl) THEN                  ! print control
-         CALL prt_ctl(tab3d_1=tsn(:,:,:,jf_tem), clinfo1=' tn      - : ', mask1=tmask, ovlap=1, kdim=jpk   )
-         CALL prt_ctl(tab3d_1=tsn(:,:,:,jf_sal), clinfo1=' sn      - : ', mask1=tmask, ovlap=1, kdim=jpk   )
+         CALL prt_ctl(tab3d_1=tsn(:,:,:,jp_tem), clinfo1=' tn      - : ', mask1=tmask, ovlap=1, kdim=jpk   )
+         CALL prt_ctl(tab3d_1=tsn(:,:,:,jp_sal), clinfo1=' sn      - : ', mask1=tmask, ovlap=1, kdim=jpk   )
          CALL prt_ctl(tab3d_1=un               , clinfo1=' un      - : ', mask1=umask, ovlap=1, kdim=jpk   )
          CALL prt_ctl(tab3d_1=vn               , clinfo1=' vn      - : ', mask1=vmask, ovlap=1, kdim=jpk   )
@@ -381,5 +383,5 @@
          ln_degrad = .FALSE.
       ENDIF
-      IF( ln_dynbbl .AND. .NOT.lk_trabbl ) THEN
+      IF( ln_dynbbl .AND. ( .NOT.lk_trabbl .OR. lk_c1d ) ) THEN
          CALL ctl_warn( 'dta_dyn_init: bbl option requires key_trabbl activated ; force ln_dynbbl to false' )
          ln_dynbbl = .FALSE.
@@ -449,5 +451,5 @@
       CALL fld_fill( sf_dyn, slf_d, cn_dir, 'dta_dyn_init', 'Data in file', 'namdta_dyn' )
       !
-      IF( lk_ldfslp ) THEN                  ! slopes 
+      IF( lk_ldfslp .AND. .NOT.lk_c1d ) THEN                  ! slopes 
          IF( sf_dyn(jf_tem)%ln_tint ) THEN      ! time interpolation
             ALLOCATE( uslpdta (jpi,jpj,jpk,2), vslpdta (jpi,jpj,jpk,2),    &
@@ -536,5 +538,5 @@
       REAL(wp), DIMENSION(jpi,jpj,jpk)     , INTENT(out) :: pwslpi   ! zonal diapycnal slopes
       REAL(wp), DIMENSION(jpi,jpj,jpk)     , INTENT(out) :: pwslpj   ! meridional diapycnal slopes
-      !! 
+      !!---------------------------------------------------------------------
 #if defined key_ldfslp && ! defined key_c1d
       CALL eos( pts, rhd, rhop )   ! Time-filtered in situ density 
@@ -550,6 +552,8 @@
       pwslpj(:,:,:) = wslpj(:,:,:) 
 #else
-      WRITE(*,*) 'dta_dyn_slp: You should not have seen this print! error?', &
-        &        kt, pts(1,1,1,1),puslp(1,1,1), pvslp(1,1,1), pwslpi(1,1,1), pwslpj(1,1,1)
+      puslp (:,:,:) = 0.            ! to avoid warning when compiling
+      pvslp (:,:,:) = 0.
+      pwslpi(:,:,:) = 0.
+      pwslpj(:,:,:) = 0.
 #endif
       !
