Index: /branches/2013/dev_MERGE_2013/NEMOGCM/CONFIG/cfg.txt
===================================================================
--- /branches/2013/dev_MERGE_2013/NEMOGCM/CONFIG/cfg.txt	(revision 4305)
+++ /branches/2013/dev_MERGE_2013/NEMOGCM/CONFIG/cfg.txt	(revision 4306)
@@ -4,5 +4,4 @@
 ORCA2_LIM_CFC_C14b OPA_SRC LIM_SRC_2 NST_SRC TOP_SRC
 GYRE OPA_SRC
-ORCA2_LIM_PISCES OPA_SRC LIM_SRC_2 NST_SRC TOP_SRC
 ORCA2_OFF_PISCES OPA_SRC OFF_SRC TOP_SRC
 ORCA2_SAS_LIM OPA_SRC SAS_SRC LIM_SRC_2 NST_SRC
@@ -10,2 +9,3 @@
 ORCA2_LIM OPA_SRC LIM_SRC_2 NST_SRC
 C1D_PAPA OPA_SRC
+ORCA2_LIM_PISCES OPA_SRC LIM_SRC_2 NST_SRC TOP_SRC
Index: /branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/LIM_SRC_2/ice_2.F90
===================================================================
--- /branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/LIM_SRC_2/ice_2.F90	(revision 4305)
+++ /branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/LIM_SRC_2/ice_2.F90	(revision 4306)
@@ -63,4 +63,7 @@
 
    !!* Ice Rheology
+
+   LOGICAL , PUBLIC::  ltrcdm2dc_ice = .FALSE.              !: In case of Diurnal Cycle short wave, compute a Daily Mean short waves flux
+
 # if defined key_lim2_vp
    !                                                      !!* VP rheology *
@@ -108,4 +111,5 @@
    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   qdtcn         !: energy from the ice to the ocean point (at a factor 2)
    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   thcm          !: part of the solar energy used in the lead heat budget
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   fstric_daymean!: Solar flux transmitted trough the ice, for day mean of qsr ( PISCES, with dirunal cycle )
    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   fstric        !: Solar flux transmitted trough the ice
    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   ffltbif       !: linked with the max heat contained in brine pockets (?)
@@ -167,4 +171,6 @@
          &     tbif  (jpi,jpj,jplayersp1)                           , STAT=ierr(5))
 
+      IF( ltrcdm2dc_ice ) ALLOCATE(fstric_daymean(jpi,jpj), STAT=ierr(6) )
+
       !* moment used in the advection scheme
       ALLOCATE(sxice (jpi,jpj) , syice (jpi,jpj) , sxxice(jpi,jpj) ,     &
@@ -193,4 +199,5 @@
    !!   Default option         Empty module        NO LIM 2.0 sea-ice model
    !!----------------------------------------------------------------------
+   LOGICAL , PUBLIC::  ltrcdm2dc_ice = .FALSE.              !: In case of Diurnal Cycle short wave, compute a Daily Mean short waves flux
 #endif
    !!-----------------------------------------------------------------
Index: /branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/LIM_SRC_2/iceini_2.F90
===================================================================
--- /branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/LIM_SRC_2/iceini_2.F90	(revision 4305)
+++ /branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/LIM_SRC_2/iceini_2.F90	(revision 4306)
@@ -76,4 +76,9 @@
       CALL ctl_opn( numnam_ice_cfg, 'namelist_ice_cfg',    'OLD',     'FORMATTED', 'SEQUENTIAL', -1, numout, lwp )
       CALL ctl_opn( numoni,         'output.namelist.ice', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp )
+      ! When Diurnal cycle, core bulk and LIM2  are activated, 
+      ! a daily mean qsr is computed for tracer/biogeochemistery model                                 !
+      IF( ltrcdm2dc ) ltrcdm2dc_ice = .TRUE.
+
+      !                                ! Open the namelist file 
       !    
       CALL ice_run_2                   ! read in namelist some run parameters
Index: /branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/LIM_SRC_2/limsbc_2.F90
===================================================================
--- /branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/LIM_SRC_2/limsbc_2.F90	(revision 4305)
+++ /branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/LIM_SRC_2/limsbc_2.F90	(revision 4306)
@@ -48,4 +48,5 @@
    PUBLIC   lim_sbc_flx_2      ! called by sbc_ice_lim_2
    PUBLIC   lim_sbc_tau_2      ! called by sbc_ice_lim_2
+   PUBLIC   lim_bio_meanqsr_2  ! called by sbc_ice_lim_2
 
    REAL(wp)  ::   r1_rdtice            ! = 1. / rdt_ice 
@@ -437,4 +438,18 @@
    END SUBROUTINE lim_sbc_tau_2
 
+   SUBROUTINE lim_bio_meanqsr_2
+      !!---------------------------------------------------------------------
+      !!                     ***  ROUTINE lim_bio_meanqsr
+      !!
+      !! ** Purpose :   provide daily qsr_mean for PISCES when 
+      !!                analytic diurnal cycle is applied in physic
+      !!
+      !! ** Method  :   add part under ice
+      !!
+      !!---------------------------------------------------------------------
+
+      qsr_mean(:,:) =  pfrld(:,:) * qsr_mean(:,:) + ( 1. - pfrld(:,:) ) * fstric_daymean(:,:)
+
+   END SUBROUTINE lim_bio_meanqsr_2
 
    SUBROUTINE lim_sbc_init_2
Index: /branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/LIM_SRC_2/limthd_2.F90
===================================================================
--- /branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/LIM_SRC_2/limthd_2.F90	(revision 4305)
+++ /branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/LIM_SRC_2/limthd_2.F90	(revision 4306)
@@ -139,4 +139,5 @@
       rdq_ice(:,:) = 0.e0   ! heat content associated with rdm_ice
       zmsk (:,:,:) = 0.e0
+      IF( ltrcdm2dc_ice  ) fstric_daymean (:,:) = 0.e0   ! part of solar radiation absorbing inside the ice
 
       ! set to zero snow thickness smaller than epsi04
@@ -286,4 +287,6 @@
          CALL tab_2d_1d_2( nbpb, tbif_1d    (1:nbpb , 3 ), tbif(:,:,3)    , jpi, jpj, npb(1:nbpb) )
          CALL tab_2d_1d_2( nbpb, qsr_ice_1d (1:nbpb)     , qsr_ice(:,:,1) , jpi, jpj, npb(1:nbpb) )
+         IF( ltrcdm2dc_ice ) &
+         & CALL tab_2d_1d_2( nbpb, qsr_ice_mean_1d (1:nbpb), qsr_ice_mean(:,:,1), jpi, jpj, npb(1:nbpb) )
          CALL tab_2d_1d_2( nbpb, fr1_i0_1d  (1:nbpb)     , fr1_i0         , jpi, jpj, npb(1:nbpb) )
          CALL tab_2d_1d_2( nbpb, fr2_i0_1d  (1:nbpb)     , fr2_i0         , jpi, jpj, npb(1:nbpb) )
@@ -335,5 +338,9 @@
          CALL tab_1d_2d_2( nbpb, qsr_ice(:,:,1), npb, qsr_ice_1d(1:nbpb)  , jpi, jpj )
          CALL tab_1d_2d_2( nbpb, qns_ice(:,:,1), npb, qns_ice_1d(1:nbpb)  , jpi, jpj )
-         IF( .NOT. lk_cpl )   CALL tab_1d_2d_2( nbpb, qla_ice(:,:,1), npb, qla_ice_1d(1:nbpb)  , jpi, jpj )
+         IF( ltrcdm2dc_ice )THEN
+            CALL tab_1d_2d_2( nbpb, fstric_daymean     , npb, fstbif_daymean_1d (1:nbpb)  , jpi, jpj )
+            CALL tab_1d_2d_2( nbpb, qsr_ice_mean(:,:,1), npb,    qsr_ice_mean_1d(1:nbpb)  , jpi, jpj )
+         ENDIF
+         IF( .NOT. lk_cpl )   CALL tab_1d_2d_2( nbpb, qla_ice(:,:,1), npb, qla_ice_1d(1:nbpb)             , jpi, jpj )
          !
       ENDIF
Index: /branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/LIM_SRC_2/limthd_zdf_2.F90
===================================================================
--- /branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/LIM_SRC_2/limthd_zdf_2.F90	(revision 4305)
+++ /branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/LIM_SRC_2/limthd_zdf_2.F90	(revision 4306)
@@ -273,4 +273,16 @@
        END DO
 
+       IF( ltrcdm2dc_ice )THEN
+
+          DO ji = kideb , kiut
+             zihsn  = MAX( zzero , SIGN (zone , -h_snow_1d(ji) ) )
+             zihic  = MAX( zzero , 1.0 - ( h_ice_1d(ji) / zhsu ) )
+             zi0(ji)  = zihsn * ( fr1_i0_1d(ji) + zihic * fr2_i0_1d(ji) )
+             zexp     = MIN( zone , EXP( -1.5 * ( h_ice_1d(ji) - zhsu ) ) )
+             fstbif_daymean_1d(ji) = zi0(ji) * qsr_ice_mean_1d(ji) * zexp
+          END DO
+
+       ENDIF
+
        !--------------------------------------------------------------------------------
        !  4. Computation of the surface temperature : determined by considering the 
Index: /branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/LIM_SRC_2/thd_ice_2.F90
===================================================================
--- /branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/LIM_SRC_2/thd_ice_2.F90	(revision 4305)
+++ /branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/LIM_SRC_2/thd_ice_2.F90	(revision 4306)
@@ -13,4 +13,5 @@
    !!----------------------------------------------------------------------
    USE par_ice_2
+   USE ice_2
 
    IMPLICIT NONE
@@ -54,6 +55,8 @@
       fstbif_1d   ,     &  !:    "                  "      fstric
       fltbif_1d   ,     &  !:    "                  "      ffltbif
+      fstbif_daymean_1d, & !:    "                  " fstric_daymean
       fscbq_1d    ,     &  !:    "                  "      fscmcbq
       qsr_ice_1d  ,     &  !:    "                  "      qsr_ice
+      qsr_ice_mean_1d , &  !:    "                  "      qsr_ice_mean
       fr1_i0_1d   ,     &  !:    "                  "      fr1_i0
       fr2_i0_1d   ,     &  !:    "                  "      fr2_i0
@@ -96,5 +99,5 @@
       !!----------------------------------------------------------------------
       USE lib_mpp        ! MPP library
-      INTEGER :: ierr(4)
+      INTEGER :: ierr(5)
       !!----------------------------------------------------------------------
       !
@@ -119,4 +122,6 @@
          &      tbif_1d(jpij, jplayersp1), Stat=ierr(4))
          !
+      IF( ltrcdm2dc_ice )ALLOCATE(fstbif_daymean_1d(jpij),qsr_ice_mean_1d(jpij),Stat=ierr(5))
+         !
       thd_ice_alloc_2 = MAXVAL(ierr)
       IF( thd_ice_alloc_2 /= 0 )   CALL ctl_warn('thd_ice_alloc_2: failed to allocate arrays')
Index: /branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/SBC/sbc_ice.F90
===================================================================
--- /branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/SBC/sbc_ice.F90	(revision 4305)
+++ /branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/SBC/sbc_ice.F90	(revision 4306)
@@ -19,4 +19,5 @@
 # if defined key_lim2
    USE par_ice_2        ! LIM-2 parameters
+   USE ice_2
 # endif
 # if defined key_cice 
@@ -55,11 +56,12 @@
 
 #if defined key_lim3 || defined key_lim2 
-   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   qns_ice   !: non solar heat flux over ice                  [W/m2]
-   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   qsr_ice   !: solar heat flux over ice                      [W/m2]
-   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   qla_ice   !: latent flux over ice                          [W/m2]
-   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   dqla_ice  !: latent sensibility over ice                 [W/m2/K]
-   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   dqns_ice  !: non solar heat flux over ice (LW+SEN+LA)    [W/m2/K]
-   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   tn_ice    !: ice surface temperature                          [K]
-   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   alb_ice   !: albedo of ice
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   qns_ice       !: non solar heat flux over ice                  [W/m2]
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   qsr_ice       !: solar heat flux over ice                      [W/m2]
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   qsr_ice_mean  !: dauly mean solar heat flux over ice       [W/m2]
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   qla_ice       !: latent flux over ice                          [W/m2]
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   dqla_ice      !: latent sensibility over ice                 [W/m2/K]
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   dqns_ice      !: non solar heat flux over ice (LW+SEN+LA)    [W/m2/K]
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   tn_ice        !: ice surface temperature                          [K]
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   alb_ice       !: albedo of ice
 
    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   utau_ice  !: atmos-ice u-stress. VP: I-pt ; EVP: U,V-pts   [N/m2]
@@ -109,4 +111,8 @@
       !!                     ***  FUNCTION sbc_ice_alloc  ***
       !!----------------------------------------------------------------------
+      INTEGER :: ierr(2)
+      !!----------------------------------------------------------------------
+      ierr(:) = 0
+
 #if defined key_lim3 || defined key_lim2
       ALLOCATE( qns_ice (jpi,jpj,jpl) , qsr_ice (jpi,jpj,jpl) ,     &
@@ -117,7 +123,7 @@
          &      fr1_i0  (jpi,jpj)     , fr2_i0  (jpi,jpj)     ,     &
 #if defined key_lim3
-         &      emp_ice(jpi,jpj)      , tatm_ice(jpi,jpj)     , STAT= sbc_ice_alloc )
+         &      emp_ice(jpi,jpj)      , tatm_ice(jpi,jpj)     , STAT= ierr(1) )
 #else
-         &      emp_ice(jpi,jpj)                              , STAT= sbc_ice_alloc )
+         &      emp_ice(jpi,jpj)                              , STAT= ierr(1) )
 #endif
 #elif defined key_cice
@@ -126,7 +132,14 @@
                 wndj_ice(jpi,jpj)     , nfrzmlt(jpi,jpj)      , ss_iou(jpi,jpj)       , &
                 ss_iov(jpi,jpj)       , fr_iu(jpi,jpj)        , fr_iv(jpi,jpj)        , &
-                a_i(jpi,jpj,ncat)     , topmelt(jpi,jpj,ncat) , botmelt(jpi,jpj,ncat), STAT= sbc_ice_alloc )
+                a_i(jpi,jpj,ncat)     , topmelt(jpi,jpj,ncat) , botmelt(jpi,jpj,ncat), STAT= ierr(1) )
 #endif
          !
+#if defined key_lim2
+      IF( ltrcdm2dc_ice )THEN
+         ALLOCATE( qsr_ice_mean (jpi,jpj,jpl), STAT=ierr(2) )
+      ENDIF
+#endif
+         !
+      sbc_ice_alloc = MAXVAL( ierr )
       IF( lk_mpp            )   CALL mpp_sum ( sbc_ice_alloc )
       IF( sbc_ice_alloc > 0 )   CALL ctl_warn('sbc_ice_alloc: allocation of arrays failed')
Index: /branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/SBC/sbc_oce.F90
===================================================================
--- /branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/SBC/sbc_oce.F90	(revision 4305)
+++ /branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/SBC/sbc_oce.F90	(revision 4306)
@@ -64,4 +64,5 @@
    !!----------------------------------------------------------------------
    LOGICAL , PUBLIC ::   lhftau = .FALSE.        !: HF tau used in TKE: mean(stress module) - module(mean stress)
+   LOGICAL , PUBLIC ::   ltrcdm2dc               !: In case of Diurnal Cycle short wave, compute a Daily Mean short waves flux
    !!                                   !!   now    ! before   !!
    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   utau   , utau_b   !: sea surface i-stress (ocean referential)     [N/m2]
@@ -71,4 +72,5 @@
    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   wndm              !: wind speed module at T-point (=|U10m-Uoce|)  [m/s]
    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   qsr               !: sea heat flux:     solar                     [W/m2]
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   qsr_mean          !: daily mean sea heat flux: solar              [W/m2]
    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   qns    , qns_b    !: sea heat flux: non solar                     [W/m2]
    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   qsr_tot           !: total     solar heat flux (over sea and ice) [W/m2]
@@ -141,4 +143,6 @@
 #endif
          !
+      IF( ltrcdm2dc ) ALLOCATE( qsr_mean(jpi,jpj) , STAT=ierr(5) )
+         !
       sbc_oce_alloc = MAXVAL( ierr )
       IF( lk_mpp            )   CALL mpp_sum ( sbc_oce_alloc )
Index: /branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_core.F90
===================================================================
--- /branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_core.F90	(revision 4305)
+++ /branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_core.F90	(revision 4306)
@@ -49,4 +49,5 @@
    PUBLIC   sbc_blk_core         ! routine called in sbcmod module
    PUBLIC   blk_ice_core         ! routine called in sbc_ice_lim module
+   PUBLIC   blk_ice_meanqsr      ! routine called in sbc_ice_lim module
    PUBLIC   turb_core_2z         ! routine calles in sbcblk_mfs module
 
@@ -189,4 +190,7 @@
       !                                            ! compute the surface ocean fluxes using CORE bulk formulea
       IF( MOD( kt - 1, nn_fsbc ) == 0 )   CALL blk_oce_core( kt, sf, sst_m, ssu_m, ssv_m )
+
+      ! If diurnal cycle is activated, compute a daily mean short waves flux for biogeochemistery 
+      IF( ltrcdm2dc )   CALL blk_bio_meanqsr
 
 #if defined key_cice
@@ -438,5 +442,59 @@
       !
    END SUBROUTINE blk_oce_core
-   
+  
+   SUBROUTINE blk_bio_meanqsr
+      !!---------------------------------------------------------------------
+      !!                     ***  ROUTINE blk_bio_meanqsr
+      !!                     
+      !! ** Purpose :   provide daily qsr_mean for PISCES when
+      !!                analytic diurnal cycle is applied in physic
+      !!                
+      !! ** Method  :   add part where there is no ice
+      !! 
+      !!---------------------------------------------------------------------
+      IF( nn_timing == 1 )  CALL timing_start('blk_bio_meanqsr')
+
+      qsr_mean(:,:) = (1. - albo ) *  sf(jp_qsr)%fnow(:,:,1)
+
+      IF( nn_timing == 1 )  CALL timing_stop('blk_bio_meanqsr')
+
+   END SUBROUTINE blk_bio_meanqsr
+ 
+ 
+   SUBROUTINE blk_ice_meanqsr(palb,p_qsr_mean,pdim)
+      !!---------------------------------------------------------------------
+      !!
+      !! ** Purpose :   provide the daily qsr_mean over sea_ice for PISCES when
+      !!                analytic diurnal cycle is applied in physic
+      !!
+      !! ** Method  :   compute qsr
+      !! 
+      !!---------------------------------------------------------------------
+      REAL(wp), DIMENSION(:,:,:), INTENT(in   ) ::   palb       ! ice albedo (clear sky) (alb_ice_cs)               [%]
+      REAL(wp), DIMENSION(:,:,:), INTENT(  out) ::   p_qsr_mean !     solar heat flux over ice (T-point)         [W/m2]
+      INTEGER                   , INTENT(in   ) ::   pdim       ! number of ice categories
+      !!
+      INTEGER  ::   ijpl          ! number of ice categories (size of 3rd dim of input arrays)
+      INTEGER  ::   ji, jj, jl    ! dummy loop indices
+      REAL(wp) ::   zztmp         ! temporary variable
+      !!---------------------------------------------------------------------
+      IF( nn_timing == 1 )  CALL timing_start('blk_ice_meanqsr')
+      !
+      ijpl  = pdim                            ! number of ice categories
+      zztmp = 1. / ( 1. - albo )
+      !                                     ! ========================== !
+      DO jl = 1, ijpl                       !  Loop over ice categories  !
+         !                                  ! ========================== !
+         DO jj = 1 , jpj
+            DO ji = 1, jpi
+                  p_qsr_mean(ji,jj,jl) = zztmp * ( 1. - palb(ji,jj,jl) ) * qsr_mean(ji,jj)
+            END DO
+         END DO
+      END DO
+      !
+      IF( nn_timing == 1 )  CALL timing_stop('blk_ice_meanqsr')
+      !
+   END SUBROUTINE blk_ice_meanqsr  
+ 
    
    SUBROUTINE blk_ice_core(  pst   , pui   , pvi   , palb ,   &
Index: /branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_lim_2.F90
===================================================================
--- /branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_lim_2.F90	(revision 4305)
+++ /branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_lim_2.F90	(revision 4306)
@@ -176,4 +176,6 @@
                &                      tprecip    , sprecip    ,                         &
                &                      fr1_i0     , fr2_i0     , cp_ice_msh , jpl  )
+            IF( ltrcdm2dc_ice )   CALL blk_ice_meanqsr( zalb_ice_cs, qsr_ice_mean, jpl )
+
          CASE( 5 )           ! Coupled formulation : atmosphere-ice stress only (fluxes provided after ice dynamics)
             CALL sbc_cpl_ice_tau( utau_ice , vtau_ice )
@@ -216,4 +218,7 @@
                            CALL lim_thd_2      ( kt )      ! Ice thermodynamics 
                            CALL lim_sbc_flx_2  ( kt )      ! update surface ocean mass, heat & salt fluxes 
+#if defined key_top
+        IF( ltrcdm2dc_ice )CALL lim_bio_meanqsr_2
+#endif
 
          IF( ( MOD( kt+nn_fsbc-1, ninfo ) == 0 .OR. ntmoy == 1 ) .AND. .NOT. lk_mpp )   &
Index: /branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zopt.F90
===================================================================
--- /branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zopt.F90	(revision 4305)
+++ /branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zopt.F90	(revision 4306)
@@ -111,4 +111,5 @@
       !                                        !* Photosynthetically Available Radiation (PAR)
       !                                        !  --------------------------------------
+
       IF( ln_varpar ) THEN
          ze1(:,:,1) = par_varsw(:,:) * qsr(:,:) * EXP( -0.5 * zekb(:,:,1) )
Index: /branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/TOP_SRC/oce_trc.F90
===================================================================
--- /branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/TOP_SRC/oce_trc.F90	(revision 4305)
+++ /branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/TOP_SRC/oce_trc.F90	(revision 4306)
@@ -82,5 +82,5 @@
    USE sbc_oce , ONLY :   vtau       =>    vtau       !: j-surface stress component
    USE sbc_oce , ONLY :   wndm       =>    wndm       !: 10m wind speed 
-   USE sbc_oce , ONLY :   qsr        =>    qsr        !: penetrative solar radiation (w m-2)  
+   USE sbc_oce , ONLY :   qsr        =>    qsr        !: penetrative solar radiation (w m-2)
    USE sbc_oce , ONLY :   emp        =>    emp        !: freshwater budget: volume flux               [Kg/m2/s]
    USE sbc_oce , ONLY :   emp_b      =>    emp_b      !: freshwater budget: volume flux               [Kg/m2/s]
Index: /branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/TOP_SRC/trcini.F90
===================================================================
--- /branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/TOP_SRC/trcini.F90	(revision 4305)
+++ /branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/TOP_SRC/trcini.F90	(revision 4306)
@@ -28,6 +28,8 @@
    USE zpshde          ! partial step: hor. derivative   (zps_hde routine)
    USE prtctl_trc      ! Print control passive tracers (prt_ctl_trc_init routine)
-   USE trcsub       ! variables to substep passive tracers
-   
+   USE trcsub          ! variables to substep passive tracers
+   USE lib_mpp         ! distribued memory computing library
+   USE sbc_oce
+ 
    IMPLICIT NONE
    PRIVATE
@@ -69,6 +71,10 @@
       CALL top_alloc()              ! allocate TOP arrays
 
-      IF( ln_dm2dc .AND. lk_pisces )    &
-         &  CALL ctl_stop( ' The diurnal cycle is not compatible with PISCES ' )
+      IF( ln_dm2dc .AND. ln_blk_core .AND. nn_ice==2 )THEN
+         ! When Diurnal cycle, core bulk and LIM2  are activated, 
+         ! a daily mean qsr is computed for tracer/biogeochemistery model 
+         CALL ctl_warn( ' Diurnal cycle on physics but not in PISCES or LOBSTER ' )
+         ltrcdm2dc     = .TRUE.
+      ENDIF
 
       IF( nn_cla == 1 )   &
Index: /branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/TOP_SRC/trcstp.F90
===================================================================
--- /branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/TOP_SRC/trcstp.F90	(revision 4305)
+++ /branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/TOP_SRC/trcstp.F90	(revision 4306)
@@ -11,4 +11,5 @@
    !!----------------------------------------------------------------------
    USE oce_trc          ! ocean dynamics and active tracers variables
+   USE sbc_oce
    USE trc
    USE trctrp           ! passive tracers transport
@@ -51,5 +52,7 @@
       INTEGER               ::  jk, jn  ! dummy loop indices
       REAL(wp)              ::  ztrai
-      CHARACTER (len=25)    ::  charout
+      CHARACTER (len=25)    ::  charout 
+
+      REAL(wp), DIMENSION(:,:), POINTER ::   zqsr_tmp ! save qsr during TOP time-step
       !!-------------------------------------------------------------------
       !
@@ -66,7 +69,15 @@
       ENDIF
       !    
-     IF( nn_dttrc /= 1 )   CALL trc_sub_stp( kt )  ! averaging physical variables for sub-stepping
-
-     IF( MOD( kt , nn_dttrc ) == 0 ) THEN      ! only every nn_dttrc time step
+      IF( ltrcdm2dc ) THEN
+         ! When Diurnal cycle, core bulk and LIM2  are activated, put daily mean qsr in qsr for TOP/biogeochemistery time-step
+         ! and save qsr with diurnal cycle in qsr_tmp
+         CALL wrk_alloc( jpi,jpj, zqsr_tmp )
+         zqsr_tmp(:,:) = qsr     (:,:)
+         qsr     (:,:) = qsr_mean(:,:)    
+      ENDIF
+      !    
+      IF( nn_dttrc /= 1 )   CALL trc_sub_stp( kt )  ! averaging physical variables for sub-stepping
+      !    
+      IF( MOD( kt , nn_dttrc ) == 0 ) THEN      ! only every nn_dttrc time step
          !
          IF(ln_ctl) THEN
@@ -95,4 +106,10 @@
       ENDIF
       !
+      IF( ltrcdm2dc ) THEN
+         ! put back qsr with diurnal cycle in qsr
+         qsr(:,:) = zqsr_tmp(:,:)
+         CALL wrk_dealloc( jpi,jpj, zqsr_tmp )
+      ENDIF
+      !
       ztrai = 0._wp                                                   !  content of all tracers
       DO jn = 1, jptra
Index: /branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/TOP_SRC/trcsub.F90
===================================================================
--- /branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/TOP_SRC/trcsub.F90	(revision 4305)
+++ /branches/2013/dev_MERGE_2013/NEMOGCM/NEMO/TOP_SRC/trcsub.F90	(revision 4306)
@@ -27,5 +27,4 @@
    USE divcur          ! hor. divergence and curl      (div & cur routines)
    USE sbcrnf, ONLY: h_rnf, nk_rnf   ! River runoff 
-   USE sbc_oce         ! surface boundary condition: ocean
    USE bdy_oce
 #if defined key_obc
