Index: /branches/dev_r2174_DCY/NEMO/OPA_SRC/SBC/sbcblk_core.F90
===================================================================
--- /branches/dev_r2174_DCY/NEMO/OPA_SRC/SBC/sbcblk_core.F90	(revision 2215)
+++ /branches/dev_r2174_DCY/NEMO/OPA_SRC/SBC/sbcblk_core.F90	(revision 2216)
@@ -183,10 +183,10 @@
 #endif
       !                                                        ! surface ocean fluxes computed with CLIO bulk formulea
-      IF( MOD( kt - 1, nn_fsbc ) == 0 )   CALL blk_oce_core( kt, sf, sst_m, ssu_m, ssv_m )
+      IF( MOD( kt - 1, nn_fsbc ) == 0 )   CALL blk_oce_core( sf, sst_m, ssu_m, ssv_m )
       !
    END SUBROUTINE sbc_blk_core
    
    
-   SUBROUTINE blk_oce_core( kt, sf, pst, pu, pv )
+   SUBROUTINE blk_oce_core( sf, pst, pu, pv )
       !!---------------------------------------------------------------------
       !!                     ***  ROUTINE blk_core  ***
@@ -209,5 +209,4 @@
       !!  ** Nota  :   sf has to be a dummy argument for AGRIF on NEC
       !!---------------------------------------------------------------------
-      INTEGER ,  INTENT(in)                     ::   kt   ! ocean time step
       TYPE(fld), INTENT(in), DIMENSION(:)       ::   sf    ! input data
       REAL(wp),  INTENT(in), DIMENSION(jpi,jpj) ::   pst   ! surface temperature                      [Celcius]
@@ -263,5 +262,5 @@
       ! ----------------------------------------------------------------------------- !
     
-      IF( ln_dm2dc ) THEN   ;   qsr(:,:) = sbc_dcy( kt, sf(jp_qsr)%fnow )   ! modify now Qsr to include the diurnal cycle
+      IF( ln_dm2dc ) THEN   ;   qsr(:,:) = sbc_dcy( sf(jp_qsr)%fnow )   ! modify now Qsr to include the diurnal cycle
       ELSE                  ;   qsr(:,:) = sf(jp_qsr)%fnow(:,:)
       ENDIF
Index: /branches/dev_r2174_DCY/NEMO/OPA_SRC/SBC/sbccpl.F90
===================================================================
--- /branches/dev_r2174_DCY/NEMO/OPA_SRC/SBC/sbccpl.F90	(revision 2215)
+++ /branches/dev_r2174_DCY/NEMO/OPA_SRC/SBC/sbccpl.F90	(revision 2216)
@@ -23,4 +23,5 @@
    USE sbc_oce         ! Surface boundary condition: ocean fields
    USE sbc_ice         ! Surface boundary condition: ice fields
+   USE sbcdcy          ! surface boundary condition: diurnal cycle
    USE phycst          ! physical constants
 #if defined key_lim3
@@ -728,4 +729,5 @@
          IF( srcv(jpr_qsroce)%laction )   qsr(:,:) = frcv(:,:,jpr_qsroce) 
          IF( srcv(jpr_qsrmix)%laction )   qsr(:,:) = frcv(:,:,jpr_qsrmix)
+         IF( ln_dm2dc )   qsr(:,:) = sbc_dcy( qsr )                           ! modify qsr to include the diurnal cycle
          !
          !                                                       ! total freshwater fluxes over the ocean (emp, emps)
@@ -1159,4 +1161,8 @@
             &                     + palbi         (:,:,1) * zicefr(:,:,1) ) )
       END SELECT
+      IF( ln_dm2dc ) THEN   ! modify qsr to include the diurnal cycle
+         pqsr_tot(:,:  ) = sbc_dcy( pqsr_tot(:,:  ) )
+         pqsr_ice(:,:,1) = sbc_dcy( pqsr_ice(:,:,1) )
+      ENDIF
 
       SELECT CASE( TRIM( cn_rcv_dqnsdt ) )
Index: /branches/dev_r2174_DCY/NEMO/OPA_SRC/SBC/sbcdcy.F90
===================================================================
--- /branches/dev_r2174_DCY/NEMO/OPA_SRC/SBC/sbcdcy.F90	(revision 2215)
+++ /branches/dev_r2174_DCY/NEMO/OPA_SRC/SBC/sbcdcy.F90	(revision 2216)
@@ -21,5 +21,5 @@
    IMPLICIT NONE
    PRIVATE
-   INTEGER                      ::   nday_qsr                    ! day when parameters were computed
+   INTEGER, PUBLIC              ::   nday_qsr                    ! day when parameters were computed
    REAL(wp), DIMENSION(jpi,jpj) ::   raa , rbb  , rcc  , rab     ! parameters used to compute the diurnal cycle
    REAL(wp), DIMENSION(jpi,jpj) ::   rtmd, rdawn, rdusk, rscal   !     -       -         -           -      -
@@ -34,5 +34,5 @@
 CONTAINS
 
-      FUNCTION sbc_dcy( kt, pqsrin ) RESULT( zqsrout )
+      FUNCTION sbc_dcy( pqsrin ) RESULT( zqsrout )
       !!----------------------------------------------------------------------
       !!                  ***  ROUTINE sbc_dcy  ***
@@ -48,5 +48,4 @@
       !!              Part 1: a diurnally forced OGCM. Climate Dynamics 29:6, 575-590.
       !!----------------------------------------------------------------------
-      INTEGER,                      INTENT(in   ) ::   kt        ! ocean time-step index
       REAL(wp), DIMENSION(jpi,jpj), INTENT(in   ) ::   pqsrin    ! input daily QSR flux 
       !!
@@ -75,5 +74,5 @@
 
       !                                          
-      IF( kt == nit000 ) THEN       ! first time step only               
+      IF( nday_qsr == -1 ) THEN       ! first time step only               
          IF(lwp) THEN
             WRITE(numout,*)
@@ -82,5 +81,4 @@
             WRITE(numout,*)
          ENDIF
-         nday_qsr = 0
          ! Compute rcc needed to compute the time integral of the diurnal cycle
          rcc(:,:) = zconvrad * glamt(:,:) - rpi
@@ -140,5 +138,4 @@
          rdawn(:,:) = MOD((rdawn(:,:) + 1.), 1.)
          rdusk(:,:) = MOD((rdusk(:,:) + 1.), 1.)
-
 
          !     2.2 Compute the scalling function:
Index: /branches/dev_r2174_DCY/NEMO/OPA_SRC/SBC/sbcflx.F90
===================================================================
--- /branches/dev_r2174_DCY/NEMO/OPA_SRC/SBC/sbcflx.F90	(revision 2215)
+++ /branches/dev_r2174_DCY/NEMO/OPA_SRC/SBC/sbcflx.F90	(revision 2216)
@@ -126,5 +126,5 @@
      
       IF( MOD( kt-1, nn_fsbc ) == 0 ) THEN                        ! update ocean fluxes at each SBC frequency
-         IF( ln_dm2dc ) THEN   ;   qsr(:,:) = sbc_dcy( kt, sf(jp_qsr)%fnow )   ! modify now Qsr to include the diurnal cycle
+         IF( ln_dm2dc ) THEN   ;   qsr(:,:) = sbc_dcy( sf(jp_qsr)%fnow )   ! modify now Qsr to include the diurnal cycle
          ELSE                  ;   qsr(:,:) = sf(jp_qsr)%fnow(:,:)
          ENDIF
Index: /branches/dev_r2174_DCY/NEMO/OPA_SRC/SBC/sbcmod.F90
===================================================================
--- /branches/dev_r2174_DCY/NEMO/OPA_SRC/SBC/sbcmod.F90	(revision 2215)
+++ /branches/dev_r2174_DCY/NEMO/OPA_SRC/SBC/sbcmod.F90	(revision 2216)
@@ -18,4 +18,5 @@
    USE sbc_oce          ! Surface boundary condition: ocean fields
    USE sbc_ice          ! Surface boundary condition: ice fields
+   USE sbcdcy           ! surface boundary condition: diurnal cycle
    USE sbcssm           ! surface boundary condition: sea-surface mean variables
    USE sbcana           ! surface boundary condition: analytical formulation
@@ -133,4 +134,6 @@
          &   CALL ctl_stop( 'sea-ice model requires a bulk formulation or coupled configuration' )
       
+      IF( ln_dm2dc )   nday_qsr = -1   ! initialisation flag
+
       IF( ln_dm2dc .AND. .NOT.( ln_flx .OR. ln_blk_core ) )   &
          &   CALL ctl_stop( 'diurnal cycle into qsr field from daily values requires a flux or core-bulk formulation' )
