Index: /branches/UKMO/dev_r5518_GO6_package_asm_3d_bgc/NEMOGCM/NEMO/OPA_SRC/ASM/asmbgc.F90
===================================================================
--- /branches/UKMO/dev_r5518_GO6_package_asm_3d_bgc/NEMOGCM/NEMO/OPA_SRC/ASM/asmbgc.F90	(revision 9332)
+++ /branches/UKMO/dev_r5518_GO6_package_asm_3d_bgc/NEMOGCM/NEMO/OPA_SRC/ASM/asmbgc.F90	(revision 9333)
@@ -864,17 +864,19 @@
             ! reset to zero at the start of trc_stp, called after this routine
 #if defined key_medusa && defined key_foam_medusa
-            DO jk = 1, jpkm1
-               trn(:,:,jk,jp_msa0:jp_msa1) = trn(:,:,jk,jp_msa0:jp_msa1) + &
-                  &                          phyto2d_balinc(:,:,jk,jp_msa0:jp_msa1) * zincwgt
-               trb(:,:,jk,jp_msa0:jp_msa1) = trb(:,:,jk,jp_msa0:jp_msa1) + &
-                  &                          phyto2d_balinc(:,:,jk,jp_msa0:jp_msa1) * zincwgt
-            END DO
+            WHERE( phyto2d_balinc(:,:,:,:) > 0.0_wp .OR. &
+               &   trn(:,:,:,jp_msa0:jp_msa1) + phyto2d_balinc(:,:,:,:) * zincwgt > 0.0_wp )
+               trn(:,:,:,jp_msa0:jp_msa1) = trn(:,:,:,jp_msa0:jp_msa1) + &
+                  &                         phyto2d_balinc(:,:,:,jp_msa0:jp_msa1) * zincwgt
+               trb(:,:,:,jp_msa0:jp_msa1) = trb(:,:,:,jp_msa0:jp_msa1) + &
+                  &                         phyto2d_balinc(:,:,:,jp_msa0:jp_msa1) * zincwgt
+            END WHERE
 #elif defined key_hadocc
-            DO jk = 1, jpkm1
-               trn(:,:,jk,jp_had0:jp_had1) = trn(:,:,jk,jp_had0:jp_had1) + &
-                  &                          phyto2d_balinc(:,:,jk,jp_had0:jp_had1) * zincwgt
-               trb(:,:,jk,jp_had0:jp_had1) = trb(:,:,jk,jp_had0:jp_had1) + &
-                  &                          phyto2d_balinc(:,:,jk,jp_had0:jp_had1) * zincwgt
-            END DO
+            WHERE( phyto2d_balinc(:,:,:,:) > 0.0_wp .OR. &
+               &   trn(:,:,:,jp_had0:jp_had1) + phyto2d_balinc(:,:,:,:) * zincwgt > 0.0_wp )
+               trn(:,:,:,jp_had0:jp_had1) = trn(:,:,:,jp_had0:jp_had1) + &
+                  &                         phyto2d_balinc(:,:,:,jp_had0:jp_had1) * zincwgt
+               trb(:,:,:,jp_had0:jp_had1) = trb(:,:,:,jp_had0:jp_had1) + &
+                  &                         phyto2d_balinc(:,:,:,jp_had0:jp_had1) * zincwgt
+            END WHERE
 #endif
 
@@ -893,20 +895,22 @@
             neuler = 0                    ! Force Euler forward step
 
-#if defined key_medusa && defined key_foam_medusa
             ! Initialize the now fields with the background + increment
             ! Background currently is what the model is initialised with
-            CALL ctl_warn( ' Doing direct initialisation of MEDUSA with chlorophyll assimilation', &
+            CALL ctl_warn( ' Doing direct initialisation with phyto2d assimilation', &
                &           ' Background state is taken from model rather than background file' )
-            trn(:,:,:,jp_msa0:jp_msa1) = trn(:,:,:,jp_msa0:jp_msa1) + &
-               &                         phyto2d_balinc(:,:,:,jp_msa0:jp_msa1)
-            trb(:,:,:,jp_msa0:jp_msa1) = trn(:,:,:,jp_msa0:jp_msa1)
+#if defined key_medusa && defined key_foam_medusa
+            WHERE( phyto2d_balinc(:,:,:,:) > 0.0_wp .OR. &
+               &   trn(:,:,:,jp_msa0:jp_msa1) + phyto2d_balinc(:,:,:,:) * zincwgt > 0.0_wp )
+               trn(:,:,:,jp_msa0:jp_msa1) = trn(:,:,:,jp_msa0:jp_msa1) + &
+                  &                         phyto2d_balinc(:,:,:,jp_msa0:jp_msa1)
+               trb(:,:,:,jp_msa0:jp_msa1) = trn(:,:,:,jp_msa0:jp_msa1)
+            END WHERE
 #elif defined key_hadocc
-            ! Initialize the now fields with the background + increment
-            ! Background currently is what the model is initialised with
-            CALL ctl_warn( ' Doing direct initialisation of HadOCC with chlorophyll assimilation', &
-               &           ' Background state is taken from model rather than background file' )
-            trn(:,:,:,jp_had0:jp_had1) = trn(:,:,:,jp_had0:jp_had1) + &
-               &                         phyto2d_balinc(:,:,:,jp_had0:jp_had1)
-            trb(:,:,:,jp_had0:jp_had1) = trn(:,:,:,jp_had0:jp_had1)
+            WHERE( phyto2d_balinc(:,:,:,:) > 0.0_wp .OR. &
+               &   trn(:,:,:,jp_had0:jp_had1) + phyto2d_balinc(:,:,:,:) * zincwgt > 0.0_wp )
+               trn(:,:,:,jp_had0:jp_had1) = trn(:,:,:,jp_had0:jp_had1) + &
+                  &                         phyto2d_balinc(:,:,:,jp_had0:jp_had1)
+               trb(:,:,:,jp_had0:jp_had1) = trn(:,:,:,jp_had0:jp_had1)
+            END WHERE
 #endif
  
Index: /branches/UKMO/dev_r5518_GO6_package_asm_3d_bgc/NEMOGCM/NEMO/OPA_SRC/ASM/asminc.F90
===================================================================
--- /branches/UKMO/dev_r5518_GO6_package_asm_3d_bgc/NEMOGCM/NEMO/OPA_SRC/ASM/asminc.F90	(revision 9332)
+++ /branches/UKMO/dev_r5518_GO6_package_asm_3d_bgc/NEMOGCM/NEMO/OPA_SRC/ASM/asminc.F90	(revision 9333)
@@ -1231,13 +1231,9 @@
       icycper = SIZE( wgtiau )
       
-      ! Ocean colour variables first (chlorophyll profiles?)
+      ! Ocean colour variables first
       IF ( ln_slchltotinc .OR. ln_slchldiainc .OR. ln_slchlnoninc .OR. &
          & ln_schltotinc  .OR. ln_slphytotinc .OR. ln_slphydiainc .OR. &
          & ln_slphynoninc ) THEN
          CALL phyto2d_asm_inc( kt, ln_asmdin, ln_asmiau, icycper, wgtiau )
-      ENDIF
-      
-      IF ( ln_plchltotinc .OR. ln_pchltotinc ) THEN
-         CALL phyto3d_asm_inc( kt, ln_asmdin, ln_asmiau, icycper, wgtiau )
       ENDIF
       
@@ -1254,4 +1250,9 @@
       ENDIF
       
+      ! Then chlorophyll profiles
+      IF ( ln_plchltotinc .OR. ln_pchltotinc ) THEN
+         CALL phyto3d_asm_inc( kt, ln_asmdin, ln_asmiau, icycper, wgtiau )
+      ENDIF
+      
       ! Remaining bgc profile variables
       IF ( ln_pno3inc .OR. ln_psi4inc .OR. ln_pdicinc .OR. &
