Index: branches/UKMO/AMM15_v3_6_STABLE_package_collate_BGC_DA/NEMOGCM/CONFIG/SHARED/namelist_ref
===================================================================
--- branches/UKMO/AMM15_v3_6_STABLE_package_collate_BGC_DA/NEMOGCM/CONFIG/SHARED/namelist_ref	(revision 10658)
+++ branches/UKMO/AMM15_v3_6_STABLE_package_collate_BGC_DA/NEMOGCM/CONFIG/SHARED/namelist_ref	(revision 10661)
@@ -1281,4 +1281,5 @@
     ln_pno3inc     = .false. !  Logical switch for applying pno3 increments
     ln_psi4inc     = .false. !  Logical switch for applying psi4 increments
+    ln_ppo4inc     = .false. !  Logical switch for applying ppo4 increments
     ln_pdicinc     = .false. !  Logical switch for applying pdic increments
     ln_palkinc     = .false. !  Logical switch for applying palk increments
Index: branches/UKMO/AMM15_v3_6_STABLE_package_collate_BGC_DA/NEMOGCM/NEMO/OPA_SRC/ASM/asmbgc.F90
===================================================================
--- branches/UKMO/AMM15_v3_6_STABLE_package_collate_BGC_DA/NEMOGCM/NEMO/OPA_SRC/ASM/asmbgc.F90	(revision 10658)
+++ branches/UKMO/AMM15_v3_6_STABLE_package_collate_BGC_DA/NEMOGCM/NEMO/OPA_SRC/ASM/asmbgc.F90	(revision 10661)
@@ -135,4 +135,5 @@
    LOGICAL, PUBLIC :: ln_pno3inc     = .FALSE. !: No profile nitrate                       increment
    LOGICAL, PUBLIC :: ln_psi4inc     = .FALSE. !: No profile silicate                      increment
+   LOGICAL, PUBLIC :: ln_ppo4inc     = .FALSE. !: No profile phosphate                     increment
    LOGICAL, PUBLIC :: ln_pdicinc     = .FALSE. !: No profile dissolved inorganic carbon    increment
    LOGICAL, PUBLIC :: ln_palkinc     = .FALSE. !: No profile alkalinity                    increment
@@ -175,4 +176,5 @@
    REAL(wp), DIMENSION(:,:,:),   ALLOCATABLE :: pno3_bkginc     ! pno3 inc
    REAL(wp), DIMENSION(:,:,:),   ALLOCATABLE :: psi4_bkginc     ! psi4 inc
+   REAL(wp), DIMENSION(:,:,:),   ALLOCATABLE :: ppo4_bkginc     ! ppo4 inc
    REAL(wp), DIMENSION(:,:,:),   ALLOCATABLE :: pdic_bkginc     ! pdic inc
    REAL(wp), DIMENSION(:,:,:),   ALLOCATABLE :: palk_bkginc     ! palk inc
@@ -229,7 +231,9 @@
 
 #if defined key_hadocc
-      IF ( ln_slchldiainc .OR. ln_slchlnoninc .OR. ln_slphydiainc .OR. &
-         & ln_slphynoninc .OR. ln_psi4inc .OR. ln_pphinc .OR. ln_po2inc ) THEN
-         CALL ctl_stop( ' Cannot assimilate PFTs, Si4, pH or O2 into HadOCC' )
+      IF ( ln_slchldiainc .OR. ln_slchlnoninc .OR. ln_slchlnaninc .OR. &
+         & ln_slchldininc .OR. ln_slchlpicinc .OR. ln_slphydiainc .OR. &
+         & ln_slphynoninc .OR. ln_psi4inc     .OR. ln_pphinc      .OR. &
+         & ln_po2inc      .OR. ln_ppo4inc ) THEN
+         CALL ctl_stop( ' Cannot assimilate PFTs, Si4, PO4, pH or O2 into HadOCC' )
       ENDIF
 #endif
@@ -238,4 +242,8 @@
       IF ( .NOT. ln_foam_medusa ) THEN
          CALL ctl_stop( ' MEDUSA data assimilation options not turned on: set ln_foam_medusa' )
+      ENDIF
+
+      IF ( ln_ppo4inc ) THEN
+         CALL ctl_stop( ' Cannot assimilate PO4 into MEDUSA' )
       ENDIF
 #endif
@@ -419,4 +427,9 @@
          ALLOCATE( psi4_bkginc(jpi,jpj,jpk) )
          CALL asm_bgc_read_incs_3d( knum, 'bckinpsi4', psi4_bkginc )
+      ENDIF
+      
+      IF ( ln_ppo4inc ) THEN
+         ALLOCATE( ppo4_bkginc(jpi,jpj,jpk) )
+         CALL asm_bgc_read_incs_3d( knum, 'bckinppo4', ppo4_bkginc )
       ENDIF
       
@@ -2441,4 +2454,25 @@
          ENDIF
 
+         IF ( ln_ppo4inc ) THEN
+#if defined key_fabm
+            it = jp_fabm_n1p
+
+            IF ( ln_phytobal ) THEN
+               ppo4_bkginc(:,:,:) = ppo4_bkginc(:,:,:) - phyto2d_balinc(:,:,:,it)
+            ENDIF
+            IF ( ln_plchltotinc .OR. ln_pchltotinc ) THEN
+               ppo4_bkginc(:,:,:) = ppo4_bkginc(:,:,:) - phyto3d_balinc(:,:,:,it)
+            ENDIF
+            IF ( ln_sfco2inc .OR. ln_spco2inc ) THEN
+               ppo4_bkginc(:,:,:) = ppo4_bkginc(:,:,:) - pco2_balinc(:,:,:,it)
+            ENDIF
+            IF ( ln_pphinc ) THEN
+               ppo4_bkginc(:,:,:) = ppo4_bkginc(:,:,:) - ph_balinc(:,:,:,it)
+            ENDIF
+#else
+            CALL ctl_stop ( ' bgc3d_asm_inc: no compatible BGC model defined' )
+#endif
+         ENDIF
+
          IF ( ln_pdicinc ) THEN
 #if defined key_hadocc || defined key_medusa || defined key_fabm
@@ -2585,4 +2619,16 @@
             ENDIF
 
+            IF ( ln_ppo4inc ) THEN
+#if defined key_fabm
+               WHERE( ppo4_bkginc(:,:,:) > 0.0_wp .OR. &
+                  &   trn(:,:,:,jp_fabm_n1p) + ppo4_bkginc(:,:,:) * zincwgt > 0.0_wp )
+                  trn(:,:,:,jp_fabm_n1p) = trn(:,:,:,jp_fabm_n1p) + ppo4_bkginc(:,:,:) * zincwgt
+                  trb(:,:,:,jp_fabm_n1p) = trb(:,:,:,jp_fabm_n1p) + ppo4_bkginc(:,:,:) * zincwgt
+               END WHERE
+#else
+               CALL ctl_stop ( ' bgc3d_asm_inc: no compatible BGC model defined' )
+#endif
+            ENDIF
+
             IF ( ln_pdicinc ) THEN
 #if defined key_hadocc
@@ -2654,4 +2700,5 @@
                IF ( ln_pno3inc ) DEALLOCATE( pno3_bkginc )
                IF ( ln_psi4inc ) DEALLOCATE( psi4_bkginc )
+               IF ( ln_ppo4inc ) DEALLOCATE( ppo4_bkginc )
                IF ( ln_pdicinc ) DEALLOCATE( pdic_bkginc )
                IF ( ln_palkinc ) DEALLOCATE( palk_bkginc )
@@ -2718,4 +2765,16 @@
             ENDIF
 
+            IF ( ln_ppo4inc ) THEN
+#if defined key_fabm
+               WHERE( ppo4_bkginc(:,:,:) > 0.0_wp .OR. &
+                  &   trn(:,:,:,jp_fabm_n1p) + ppo4_bkginc(:,:,:) > 0.0_wp )
+                  trn(:,:,:,jp_fabm_n1p) = trn(:,:,:,jp_fabm_n1p) + ppo4_bkginc(:,:,:)
+                  trb(:,:,:,jp_fabm_n1p) = trn(:,:,:,jp_fabm_n1p)
+               END WHERE
+#else
+               CALL ctl_stop ( ' bgc3d_asm_inc: no compatible BGC model defined' )
+#endif
+            ENDIF
+
             IF ( ln_pdicinc ) THEN
 #if defined key_hadocc
@@ -2786,4 +2845,5 @@
             IF ( ln_pno3inc ) DEALLOCATE( pno3_bkginc )
             IF ( ln_psi4inc ) DEALLOCATE( psi4_bkginc )
+            IF ( ln_ppo4inc ) DEALLOCATE( ppo4_bkginc )
             IF ( ln_pdicinc ) DEALLOCATE( pdic_bkginc )
             IF ( ln_palkinc ) DEALLOCATE( palk_bkginc )
Index: branches/UKMO/AMM15_v3_6_STABLE_package_collate_BGC_DA/NEMOGCM/NEMO/OPA_SRC/ASM/asminc.F90
===================================================================
--- branches/UKMO/AMM15_v3_6_STABLE_package_collate_BGC_DA/NEMOGCM/NEMO/OPA_SRC/ASM/asminc.F90	(revision 10658)
+++ branches/UKMO/AMM15_v3_6_STABLE_package_collate_BGC_DA/NEMOGCM/NEMO/OPA_SRC/ASM/asminc.F90	(revision 10661)
@@ -172,5 +172,5 @@
          &                 ln_sfco2inc, ln_plchltotinc, ln_pchltotinc,     &
          &                 ln_pno3inc, ln_psi4inc, ln_pdicinc, ln_palkinc, &
-         &                 ln_pphinc, ln_po2inc,                           &
+         &                 ln_pphinc, ln_po2inc, ln_ppo4inc,               &
          &                 ln_asmdin, ln_asmiau,                           &
          &                 nitbkg, nitdin, nitiaustr, nitiaufin, niaufn,   &
@@ -242,4 +242,5 @@
          WRITE(numout,*) '      Logical switch for applying pno3 increments             ln_pno3inc = ', ln_pno3inc
          WRITE(numout,*) '      Logical switch for applying psi4 increments             ln_psi4inc = ', ln_psi4inc
+         WRITE(numout,*) '      Logical switch for applying ppo4 increments             ln_ppo4inc = ', ln_ppo4inc
          WRITE(numout,*) '      Logical switch for applying pdic increments             ln_pdicinc = ', ln_pdicinc
          WRITE(numout,*) '      Logical switch for applying palk increments             ln_palkinc = ', ln_palkinc
@@ -304,5 +305,5 @@
          & ln_plchltotinc .OR. ln_pchltotinc  .OR. ln_pno3inc     .OR. &
          & ln_psi4inc     .OR. ln_pdicinc     .OR. ln_palkinc     .OR. &
-         & ln_pphinc      .OR. ln_po2inc ) THEN
+         & ln_pphinc      .OR. ln_po2inc      .OR. ln_ppo4inc ) THEN
          lk_bgcinc = .TRUE.
       ENDIF
@@ -1383,5 +1384,5 @@
       ! Remaining bgc profile variables
       IF ( ln_pno3inc .OR. ln_psi4inc .OR. ln_pdicinc .OR. &
-         & ln_palkinc .OR. ln_po2inc ) THEN
+         & ln_palkinc .OR. ln_po2inc  .OR. ln_ppo4inc ) THEN
          CALL bgc3d_asm_inc( kt, ln_asmdin, ln_asmiau, icycper, wgtiau )
       ENDIF
