Index: branches/2015/dev_r5171_CNRS_LIM3_seaicebgc/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsbc.F90
===================================================================
--- branches/2015/dev_r5171_CNRS_LIM3_seaicebgc/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsbc.F90	(revision 5185)
+++ branches/2015/dev_r5171_CNRS_LIM3_seaicebgc/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsbc.F90	(revision 5193)
@@ -216,4 +216,11 @@
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampissbc in configuration namelist', lwp )
       IF(lwm) WRITE ( numonp, nampissbc )
+
+      IF ( ( nn_ice_tr >= 0 ) .AND. ln_ironice ) THEN 
+         WRITE(numout,*) ' ln_ironice incompatible with nn_ice_tr = ', nn_ice_tr
+         WRITE(numout,*) ' Specify your sea ice iron concentration in nampisice instead '
+         WRITE(numout,*) ' ln_ironice is forced to .FALSE. '
+         ln_ironice = .FALSE.
+      ENDIF
 
       IF(lwp) THEN
Index: branches/2015/dev_r5171_CNRS_LIM3_seaicebgc/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsed.F90
===================================================================
--- branches/2015/dev_r5171_CNRS_LIM3_seaicebgc/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsed.F90	(revision 5185)
+++ branches/2015/dev_r5171_CNRS_LIM3_seaicebgc/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsed.F90	(revision 5193)
@@ -73,5 +73,5 @@
       CHARACTER (len=25) :: charout
       REAL(wp), POINTER, DIMENSION(:,:  ) :: zpdep, zsidep, zwork1, zwork2, zwork3, zwork4
-      REAL(wp), POINTER, DIMENSION(:,:  ) :: zdenit2d, zbureff
+      REAL(wp), POINTER, DIMENSION(:,:  ) :: zdenit2d, zironice, zbureff
       REAL(wp), POINTER, DIMENSION(:,:  ) :: zwsbio3, zwsbio4, zwscal
       REAL(wp), POINTER, DIMENSION(:,:,:) :: znitrpot, zirondep, zsoufer
@@ -97,4 +97,30 @@
       zwork3  (:,:) = 0.e0
       zwork4  (:,:) = 0.e0
+
+      ! Iron input/uptake due to sea ice : Crude parameterization based on Lancelot et al.
+      ! ----------------------------------------------------
+      IF( ln_ironice ) THEN  
+         !                                              
+         CALL wrk_alloc( jpi, jpj, zironice )
+         !                                              
+         DO jj = 1, jpj
+            DO ji = 1, jpi
+               zdep    = rfact2 / fse3t(ji,jj,1)
+               zwflux  = fmmflx(ji,jj) / 1000._wp
+               zfminus = MIN( 0._wp, -zwflux ) * trn(ji,jj,1,jpfer) * zdep
+               zfplus  = MAX( 0._wp, -zwflux ) * icefeinput * zdep
+               zironice(ji,jj) =  zfplus + zfminus
+            END DO
+         END DO
+         !
+         trn(:,:,1,jpfer) = trn(:,:,1,jpfer) + zironice(:,:) 
+         ! 
+         IF( lk_iomput .AND. jnt == nrdttrc .AND. iom_use( "Ironice" ) )   &
+            &   CALL iom_put( "Ironice", zironice(:,:) * 1.e+3 * rfact2r * fse3t(:,:,1) * tmask(:,:,1) ) ! iron flux from ice
+         !
+         CALL wrk_dealloc( jpi, jpj, zironice )
+         !                                              
+      ENDIF
+
 
       ! Add the external input of nutrients from dust deposition
Index: branches/2015/dev_r5171_CNRS_LIM3_seaicebgc/NEMOGCM/NEMO/TOP_SRC/PISCES/trcice_pisces.F90
===================================================================
--- branches/2015/dev_r5171_CNRS_LIM3_seaicebgc/NEMOGCM/NEMO/TOP_SRC/PISCES/trcice_pisces.F90	(revision 5185)
+++ branches/2015/dev_r5171_CNRS_LIM3_seaicebgc/NEMOGCM/NEMO/TOP_SRC/PISCES/trcice_pisces.F90	(revision 5193)
@@ -21,4 +21,5 @@
    USE sms_pisces      ! PISCES Source Minus Sink variables
    USE p4zsbc
+   USE in_out_manager
 
    IMPLICIT NONE
@@ -114,6 +115,11 @@
       !--------------------------------------------
 
-      REWIND( numnatp )
-      READ( numnatp, nampisice )
+      REWIND( numnatp_ref )
+      READ( numnatp_ref, nampisice, IOSTAT = ios, ERR = 901 )
+901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampisice in reference namelist', lwp )
+
+      REWIND( numnatp_cfg )
+      READ( numnatp_cfg, nampisice, IOSTAT = ios, ERR = 902 )
+902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampisice in configuration namelist', lwp )
 
       ! Assign namelist stuff
Index: branches/2015/dev_r5171_CNRS_LIM3_seaicebgc/NEMOGCM/NEMO/TOP_SRC/TRP/trcsbc.F90
===================================================================
--- branches/2015/dev_r5171_CNRS_LIM3_seaicebgc/NEMOGCM/NEMO/TOP_SRC/TRP/trcsbc.F90	(revision 5185)
+++ branches/2015/dev_r5171_CNRS_LIM3_seaicebgc/NEMOGCM/NEMO/TOP_SRC/TRP/trcsbc.F90	(revision 5193)
@@ -63,6 +63,6 @@
       !
       INTEGER  ::   ji, jj, jn                                     ! dummy loop indices
-      REAL(wp) ::   zsrau, zse3t                                   ! temporary scalars
-      REAL(wp) ::   zswitch, zftra, zcd, zdtra, ztfx, ztra, zeuler ! temporary scalars
+      REAL(wp) ::   zse3t                                          ! temporary scalars
+      REAL(wp) ::   zswitch, zftra, zcd, zdtra, ztfx, ztra         ! temporary scalars
       CHARACTER (len=22) :: charout
       REAL(wp), POINTER, DIMENSION(:,:  ) :: zsfx
@@ -99,9 +99,7 @@
       ENDIF
 
+      WRITE(numout,*) ' trc_sbc initial values', trn(3,2,1,2), trb(3,2,1,2), tra(3,2,1,2)
+
       ! 0. initialization
-      zsrau = 1. / rau0
-
-      zeuler = 1.   ;  IF ( neuler .EQ. 0 ) zeuler = 0.
-
       DO jn = 1, jptra
          !
@@ -114,5 +112,5 @@
                DO ji = fs_2, fs_jpim1   ! vector opt.
                   zse3t = 1. / fse3t(ji,jj,1)
-                  tra(ji,jj,1,jn) = tra(ji,jj,1,jn) + zsfx(ji,jj) *  zsrau * trn(ji,jj,1,jn) * zse3t
+                  tra(ji,jj,1,jn) = tra(ji,jj,1,jn) + zsfx(ji,jj) * r1_rau0 * trn(ji,jj,1,jn) * zse3t
                END DO
             END DO
@@ -122,5 +120,5 @@
             DO jj = 2, jpj
                DO ji = fs_2, fs_jpim1   ! vector opt.
-   
+
                   zse3t = 1. / fse3t(ji,jj,1)
                   
@@ -133,28 +131,27 @@
                   ztfx  = zftra + zswitch * zcd                ! net tracer flux (+C/D if no ice/ocean mass exchange)
    
-                  ! tracer change (left member: euler; right member:leapfrog)
-                  ztra = ( 1. - zeuler ) * trn(ji,jj,1,jn) + zeuler * trb(ji,jj,1,jn)
-                  
-                  ! MAX is there to avoid integral ocean uptake in the case of freezing (for iron)
-                  zdtra = MAX ( - ztra / r2dtra(1) , zsrau * ( ztfx + zsfx(ji,jj) * trn(ji,jj,1,jn) ) * zse3t ) ! tracer tendency
-                  ! r2dtra is time step
-                  tra(ji,jj,1,jn) = tra(ji,jj,1,jn) + zdtra ! new line
+                  zdtra = r1_rau0 * ( ztfx + zsfx(ji,jj) * trn(ji,jj,1,jn) ) * zse3t
+                  tra(ji,jj,1,jn) = MAX( tra(ji,jj,1,jn) + zdtra, 0.) ! avoid integral ocean uptake if freezing (for iron)
    
-   !              IF ( ztfx .NE. 0.0 ) THEN
-   !                  WRITE(numout,*) ji, jj, jn
-   !                  WRITE(numout,*) ' trc_o  : ', trc_o(ji,jj,jn)
-   !                  WRITE(numout,*) ' trc_i  : ', trc_i(ji,jj,jn)
-   !                  WRITE(numout,*) ' fmmflx : ', fmmflx(ji,jj)
-   !                  WRITE(numout,*) ' zswitch: ', zswitch
-   !                  WRITE(numout,*) ' zcd   : ', zcd
-   !                  WRITE(numout,*) ' zftra : ', zftra
-   !                  WRITE(numout,*) ' ztfx  : ', ztfx
-   !                  WRITE(numout,*) ' zsrau : ', zsrau
-   !                  WRITE(numout,*) ' zsfx  : ', zsfx(ji,jj)
-   !                  WRITE(numout,*) ' zse3t : ', zse3t
-   !                  WRITE(numout,*) ' ztra  : ', ztra
-   !                  WRITE(numout,*) ' zdtra : ', zdtra
-   !                  WRITE(numout,*) ' Old tendency : ', zsfx(ji,jj) * zsrau * trn(ji,jj,1,jn) * zse3t
-   !              ENDIF
+!                 IF ( ztfx .NE. 0.0 ) THEN
+                  IF ( ( ji .EQ. 3 ) .AND. ( jj .EQ. 2 )  .AND. ( jn .EQ. 2 ) ) THEN
+                      WRITE(numout,*) ji, jj, jn
+                      WRITE(numout,*) ' trn    : ', trn(ji,jj,1,jn)
+                      WRITE(numout,*) ' trb    : ', trb(ji,jj,1,jn)
+                      WRITE(numout,*) ' tra    : ', tra(ji,jj,1,jn)
+                      WRITE(numout,*) ' trc_o  : ', trc_o(ji,jj,jn)
+                      WRITE(numout,*) ' trc_i  : ', trc_i(ji,jj,jn)
+                      WRITE(numout,*) ' fmmflx : ', fmmflx(ji,jj)
+                      WRITE(numout,*) ' zswitch: ', zswitch
+                      WRITE(numout,*) ' zcd   : ', zcd
+                      WRITE(numout,*) ' zftra : ', zftra
+                      WRITE(numout,*) ' ztfx  : ', ztfx
+                      WRITE(numout,*) ' r1_rau0 : ', r1_rau0
+                      WRITE(numout,*) ' zsfx  : ', zsfx(ji,jj)
+                      WRITE(numout,*) ' zse3t : ', zse3t
+                      WRITE(numout,*) ' ztra  : ', ztra
+                      WRITE(numout,*) ' zdtra : ', zdtra
+                      WRITE(numout,*) ' Old tendency : ', zsfx(ji,jj) * r1_rau0 * trn(ji,jj,1,jn) * zse3t
+                  ENDIF
    
                END DO
Index: branches/2015/dev_r5171_CNRS_LIM3_seaicebgc/NEMOGCM/NEMO/TOP_SRC/trcice.F90
===================================================================
--- branches/2015/dev_r5171_CNRS_LIM3_seaicebgc/NEMOGCM/NEMO/TOP_SRC/trcice.F90	(revision 5185)
+++ branches/2015/dev_r5171_CNRS_LIM3_seaicebgc/NEMOGCM/NEMO/TOP_SRC/trcice.F90	(revision 5193)
@@ -49,19 +49,24 @@
       NAMELIST/namtrc_ice/ nn_ice_tr
       !
-      IF(lwp) WRITE(numout,*)
-      IF(lwp) WRITE(numout,*) 'trc_ice_ini : Initialize sea ice tracer boundary condition'
-      IF(lwp) WRITE(numout,*) '~~~~~~~~~~~~~'
+      IF(lwp) THEN
+         WRITE(numout,*)
+         WRITE(numout,*) 'trc_ice_ini : Initialize sea ice tracer boundary condition'
+         WRITE(numout,*) '~~~~~~~~~~~~~'
+      ENDIF
 
       IF( nn_timing == 1 )  CALL timing_start('trc_ice_ini')
 
-      IF(lwp) THEN
-         WRITE(numout,*) ' '
-         WRITE(numout,*) ' sea ice tracers option (nn_ice_tr) : ', nn_ice_tr
-         WRITE(numout,*) ' '
-      ENDIF
       !
       REWIND( numnat_ref )              ! Namelist namtrc_dta in reference namelist : Passive tracer input data
       READ  ( numnat_ref, namtrc_ice, IOSTAT = ios, ERR = 901)
  901  IF( ios /= 0 ) CALL ctl_nam ( ios , ' namtrc_ice in reference namelist ', lwp )
+
+      REWIND( numnat_cfg )              ! Namelist nampissbc in configuration namelist : Pisces external sources of nutrients
+      READ  ( numnat_cfg, namtrc_ice, IOSTAT = ios, ERR = 902 )
+ 902  IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_ice in configuration namelist', lwp )
+
+      WRITE(numout,*) ' '
+      WRITE(numout,*) ' Sea ice tracers option (nn_ice_tr) : ', nn_ice_tr
+      WRITE(numout,*) ' '
 
       trc_i(:,:,:) = 0.0d0 ! by default
Index: branches/2015/dev_r5171_CNRS_LIM3_seaicebgc/NEMOGCM/NEMO/TOP_SRC/trcini.F90
===================================================================
--- branches/2015/dev_r5171_CNRS_LIM3_seaicebgc/NEMOGCM/NEMO/TOP_SRC/trcini.F90	(revision 5185)
+++ branches/2015/dev_r5171_CNRS_LIM3_seaicebgc/NEMOGCM/NEMO/TOP_SRC/trcini.F90	(revision 5193)
@@ -97,10 +97,10 @@
       areatot = glob_sum( cvol(:,:,:) )
 
+      CALL trc_ice_ini                                 ! Tracers in sea ice
+
       IF( lk_pisces  )       CALL trc_ini_pisces       ! PISCES  bio-model
       IF( lk_cfc     )       CALL trc_ini_cfc          ! CFC     tracers
       IF( lk_c14b    )       CALL trc_ini_c14b         ! C14 bomb  tracer
       IF( lk_my_trc  )       CALL trc_ini_my_trc       ! MY_TRC  tracers
-
-      CALL trc_ice_ini                                 ! Tracers in sea ice
 
       IF( lwp ) THEN
