Index: /branches/UKMO/dev_r5518_medusa_chg_trc_bio_medusa/NEMOGCM/NEMO/TOP_SRC/MEDUSA/bio_medusa_diag_slice.F90
===================================================================
--- /branches/UKMO/dev_r5518_medusa_chg_trc_bio_medusa/NEMOGCM/NEMO/TOP_SRC/MEDUSA/bio_medusa_diag_slice.F90	(revision 8075)
+++ /branches/UKMO/dev_r5518_medusa_chg_trc_bio_medusa/NEMOGCM/NEMO/TOP_SRC/MEDUSA/bio_medusa_diag_slice.F90	(revision 8076)
@@ -48,5 +48,4 @@
                                    zn_co2_flx, zn_dms_srf
       USE trc,               ONLY: med_diag
-      USE wrk_nemo,          ONLY: wrk_dealloc
 
       !! The vertical level
@@ -85,5 +84,5 @@
          IF( med_diag%ATM_PCO2%dgsave ) THEN
             CALL iom_put( "ATM_PCO2"  , f_pco2a2d )
-            CALL wrk_dealloc( jpi, jpj,    f_pco2a2d  )
+            DEALLOCATE( f_pco2a2d )
          ENDIF
          IF( med_diag%OCN_PH%dgsave ) THEN
@@ -93,5 +92,5 @@
          IF( med_diag%OCN_PCO2%dgsave ) THEN
             CALL iom_put( "OCN_PCO2"  , f_pco2w2d )
-            CALL wrk_dealloc( jpi, jpj,   f_pco2w2d   )
+            DEALLOCATE( f_pco2w2d )
          ENDIF
          IF( med_diag%OCNH2CO3%dgsave ) THEN
@@ -109,5 +108,5 @@
          IF( med_diag%CO2FLUX%dgsave ) THEN
             CALL iom_put( "CO2FLUX"  , f_co2flux2d )
-            CALL wrk_dealloc( jpi, jpj,   f_co2flux2d   )
+            DEALLOCATE( f_co2flux2d )
          ENDIF
          !! 
@@ -128,5 +127,5 @@
             CO2Flux_out_cpl = zn_co2_flx
          ENDIF
-         CALL wrk_dealloc( jpi, jpj,   fgco2   )
+         DEALLOCATE( fgco2 )
          !! ---
          IF( med_diag%OM_CAL%dgsave ) THEN
@@ -138,25 +137,25 @@
          IF( med_diag%TCO2%dgsave ) THEN
             CALL iom_put( "TCO2"  , f_TDIC2d )
-            CALL wrk_dealloc( jpi, jpj,   f_TDIC2d   )
+            DEALLOCATE( f_TDIC2d )
          ENDIF
          IF( med_diag%TALK%dgsave ) THEN
             CALL iom_put( "TALK"  , f_TALK2d )
-            CALL wrk_dealloc( jpi, jpj,    f_TALK2d  )
+            DEALLOCATE( f_TALK2d )
          ENDIF
          IF( med_diag%KW660%dgsave ) THEN
             CALL iom_put( "KW660"  , f_kw6602d )
-            CALL wrk_dealloc( jpi, jpj,   f_kw6602d   )
+            DEALLOCATE( f_kw6602d )
          ENDIF
          IF( med_diag%ATM_PP0%dgsave ) THEN
             CALL iom_put( "ATM_PP0"  , f_pp02d )
-            CALL wrk_dealloc( jpi, jpj,    f_pp02d  )
+            DEALLOCATE( f_pp02d )
          ENDIF
          IF( med_diag%O2FLUX%dgsave ) THEN
             CALL iom_put( "O2FLUX"  , f_o2flux2d )
-            CALL wrk_dealloc( jpi, jpj,   f_o2flux2d   )
+            DEALLOCATE( f_o2flux2d )
          ENDIF
          IF( med_diag%O2SAT%dgsave ) THEN
             CALL iom_put( "O2SAT"  , f_o2sat2d )
-            CALL wrk_dealloc( jpi, jpj,  f_o2sat2d    )
+            DEALLOCATE( f_o2sat2d )
          ENDIF
          IF( med_diag%CAL_CCD%dgsave ) THEN
@@ -175,21 +174,21 @@
                   DMS_out_cpl = zn_dms_srf
                ENDIF
-               CALL wrk_dealloc( jpi, jpj,   dms_surf2d   ) 
+               DEALLOCATE( dms_surf2d ) 
             ENDIF
             IF( med_diag%DMS_ANDR%dgsave ) THEN
                CALL iom_put( "DMS_ANDR"  , dms_andr2d )
-               CALL wrk_dealloc( jpi, jpj,   dms_andr2d   )
+               DEALLOCATE( dms_andr2d )
             ENDIF
             IF( med_diag%DMS_SIMO%dgsave ) THEN
                CALL iom_put( "DMS_SIMO"  , dms_simo2d )
-               CALL wrk_dealloc( jpi, jpj,    dms_simo2d  )
+               DEALLOCATE( dms_simo2d )
             ENDIF
             IF( med_diag%DMS_ARAN%dgsave ) THEN
                CALL iom_put( "DMS_ARAN"  , dms_aran2d )
-               CALL wrk_dealloc( jpi, jpj,   dms_aran2d   )
+               DEALLOCATE( dms_aran2d )
             ENDIF
             IF( med_diag%DMS_HALL%dgsave ) THEN
                CALL iom_put( "DMS_HALL"  , dms_hall2d )
-               CALL wrk_dealloc( jpi, jpj,   dms_hall2d   )
+               DEALLOCATE( dms_hall2d )
             ENDIF
          ENDIF
@@ -197,37 +196,37 @@
          IF( med_diag%ATM_XCO2%dgsave ) THEN
             CALL iom_put( "ATM_XCO2"  ,   f_xco2a_2d      )
-            CALL wrk_dealloc( jpi, jpj,   f_xco2a_2d      )
+            DEALLOCATE( f_xco2a_2d )
          ENDIF
          IF( med_diag%OCN_FCO2%dgsave ) THEN
             CALL iom_put( "OCN_FCO2"  ,   f_fco2w_2d      )
-            CALL wrk_dealloc( jpi, jpj,   f_fco2w_2d      )
+            DEALLOCATE( f_fco2w_2d )
          ENDIF
          IF( med_diag%ATM_FCO2%dgsave ) THEN
             CALL iom_put( "ATM_FCO2"  ,   f_fco2a_2d      )
-            CALL wrk_dealloc( jpi, jpj,   f_fco2a_2d      )
+            DEALLOCATE( f_fco2a_2d )
          ENDIF
          IF( med_diag%OCN_RHOSW%dgsave ) THEN
             CALL iom_put( "OCN_RHOSW"  ,  f_ocnrhosw_2d   )
-            CALL wrk_dealloc( jpi, jpj,   f_ocnrhosw_2d   )
+            DEALLOCATE( f_ocnrhosw_2d )
          ENDIF
          IF( med_diag%OCN_SCHCO2%dgsave ) THEN
             CALL iom_put( "OCN_SCHCO2"  , f_ocnschco2_2d  )
-            CALL wrk_dealloc( jpi, jpj,   f_ocnschco2_2d  )
+            DEALLOCATE( f_ocnschco2_2d )
          ENDIF
          IF( med_diag%OCN_KWCO2%dgsave ) THEN
             CALL iom_put( "OCN_KWCO2"  ,  f_ocnkwco2_2d   )
-            CALL wrk_dealloc( jpi, jpj,   f_ocnkwco2_2d   )
+            DEALLOCATE( f_ocnkwco2_2d )
          ENDIF
          IF( med_diag%OCN_K0%dgsave ) THEN
             CALL iom_put( "OCN_K0"  ,     f_ocnk0_2d      )
-            CALL wrk_dealloc( jpi, jpj,   f_ocnk0_2d      )
+            DEALLOCATE( f_ocnk0_2d )
          ENDIF
          IF( med_diag%CO2STARAIR%dgsave ) THEN
             CALL iom_put( "CO2STARAIR"  , f_co2starair_2d )
-            CALL wrk_dealloc( jpi, jpj,   f_co2starair_2d )
+            DEALLOCATE( f_co2starair_2d )
          ENDIF
          IF( med_diag%OCN_DPCO2%dgsave ) THEN
             CALL iom_put( "OCN_DPCO2"  ,  f_ocndpco2_2d   )
-            CALL wrk_dealloc( jpi, jpj,   f_ocndpco2_2d   )
+            DEALLOCATE( f_ocndpco2_2d )
          ENDIF
 # endif                     
@@ -386,5 +385,5 @@
          IF( med_diag%RR_1000%dgsave ) THEN
             CALL iom_put( "RR_1000"  , ffastca2d )
-            CALL wrk_dealloc( jpi, jpj,  ffastca2d    )
+            DEALLOCATE( ffastca2d )
          ENDIF
          IF( med_diag%SDC_1000%dgsave ) THEN
Index: /branches/UKMO/dev_r5518_medusa_chg_trc_bio_medusa/NEMOGCM/NEMO/TOP_SRC/MEDUSA/bio_medusa_fin.F90
===================================================================
--- /branches/UKMO/dev_r5518_medusa_chg_trc_bio_medusa/NEMOGCM/NEMO/TOP_SRC/MEDUSA/bio_medusa_fin.F90	(revision 8075)
+++ /branches/UKMO/dev_r5518_medusa_chg_trc_bio_medusa/NEMOGCM/NEMO/TOP_SRC/MEDUSA/bio_medusa_fin.F90	(revision 8076)
@@ -55,5 +55,4 @@
                                    trbio, trc2d, trc3d
       USE trcnam_trp,        ONLY: ln_trcadv_cen2, ln_trcadv_tvd
-      USE wrk_nemo,          ONLY: wrk_dealloc
  
       !! time (integer timestep)
@@ -467,33 +466,33 @@
          IF ( med_diag%PN_JLIM%dgsave ) THEN
             CALL iom_put( "PN_JLIM"  , fjln2d )
-            CALL wrk_dealloc( jpi, jpj,   fjln2d   )
+            DEALLOCATE( fjln2d )
          ENDIF
          IF ( med_diag%PN_NLIM%dgsave ) THEN
             CALL iom_put( "PN_NLIM"  , fnln2d )
-            CALL wrk_dealloc( jpi, jpj,   fnln2d   )
+            DEALLOCATE( fnln2d )
          ENDIF
          IF ( med_diag%PN_FELIM%dgsave ) THEN
             CALL iom_put( "PN_FELIM"  , ffln2d )
-            CALL wrk_dealloc( jpi, jpj,   ffln2d   )
+            DEALLOCATE( ffln2d )
          ENDIF
          IF ( med_diag%PD_JLIM%dgsave ) THEN
             CALL iom_put( "PD_JLIM"  , fjld2d )
-            CALL wrk_dealloc( jpi, jpj,  fjld2d    )
+            DEALLOCATE( fjld2d )
          ENDIF
          IF ( med_diag%PD_NLIM%dgsave ) THEN
             CALL iom_put( "PD_NLIM"  , fnld2d )
-            CALL wrk_dealloc( jpi, jpj,   fnld2d  )
+            DEALLOCATE( fnld2d )
          ENDIF
          IF ( med_diag%PD_FELIM%dgsave ) THEN
             CALL iom_put( "PD_FELIM"  , ffld2d )
-            CALL wrk_dealloc( jpi, jpj,  ffld2d    )
+            DEALLOCATE( ffld2d )
          ENDIF
          IF ( med_diag%PD_SILIM%dgsave ) THEN
             CALL iom_put( "PD_SILIM"  , fsld2d2 )
-            CALL wrk_dealloc( jpi, jpj,   fsld2d2   )
+            DEALLOCATE( fsld2d2 )
          ENDIF
          IF ( med_diag%PDSILIM2%dgsave ) THEN
             CALL iom_put( "PDSILIM2"  , fsld2d )
-            CALL wrk_dealloc( jpi, jpj,   fsld2d   )
+            DEALLOCATE( fsld2d )
          ENDIF
          IF ( med_diag%INTFLX_N%dgsave ) THEN
@@ -582,17 +581,17 @@
          IF ( med_diag%PRN%dgsave ) THEN
             CALL iom_put( "PRN"  , fprn2d )
-            CALL wrk_dealloc( jpi, jpj,   fprn2d   )
+            DEALLOCATE( fprn2d )
          ENDIF
          IF ( med_diag%MPN%dgsave ) THEN
-            CALL iom_put( "MPN"  ,fdpn2d  )
-            CALL wrk_dealloc( jpi, jpj,    fdpn2d  )
+            CALL iom_put( "MPN"  ,fdpn2d )
+            DEALLOCATE( fdpn2d )
          ENDIF
          IF ( med_diag%PRD%dgsave ) THEN
-            CALL iom_put( "PRD"  ,fprd2d  )
-            CALL wrk_dealloc( jpi, jpj,   fprd2d  )
+            CALL iom_put( "PRD"  ,fprd2d )
+            DEALLOCATE( fprd2d )
          ENDIF
          IF( med_diag%MPD%dgsave ) THEN
             CALL iom_put( "MPD"  , fdpd2d )
-            CALL wrk_dealloc( jpi, jpj,    fdpd2d )
+            DEALLOCATE( fdpd2d )
          ENDIF
          !  IF( med_diag%DSED%dgsave ) THEN
@@ -601,41 +600,41 @@
          IF( med_diag%OPAL%dgsave ) THEN
             CALL iom_put( "OPAL"  , fprds2d )
-            CALL wrk_dealloc( jpi, jpj,   fprds2d  )
+            DEALLOCATE( fprds2d )
          ENDIF
          IF( med_diag%OPALDISS%dgsave ) THEN
             CALL iom_put( "OPALDISS"  , fsdiss2d )
-            CALL wrk_dealloc( jpi, jpj,   fsdiss2d  )
+            DEALLOCATE( fsdiss2d )
          ENDIF
          IF( med_diag%GMIPn%dgsave ) THEN
             CALL iom_put( "GMIPn"  , fgmipn2d )
-            CALL wrk_dealloc( jpi, jpj,   fgmipn2d  )
+            DEALLOCATE( fgmipn2d )
          ENDIF
          IF( med_diag%GMID%dgsave ) THEN
             CALL iom_put( "GMID"  , fgmid2d )
-            CALL wrk_dealloc( jpi, jpj,  fgmid2d  )
+            DEALLOCATE( fgmid2d )
          ENDIF
          IF( med_diag%MZMI%dgsave ) THEN
             CALL iom_put( "MZMI"  , fdzmi2d )
-            CALL wrk_dealloc( jpi, jpj,   fdzmi2d   )
+            DEALLOCATE( fdzmi2d )
          ENDIF
          IF( med_diag%GMEPN%dgsave ) THEN
             CALL iom_put( "GMEPN"  , fgmepn2d )
-            CALL wrk_dealloc( jpi, jpj,   fgmepn2d  )
+            DEALLOCATE( fgmepn2d )
          ENDIF
          IF( med_diag%GMEPD%dgsave ) THEN
             CALL iom_put( "GMEPD"  , fgmepd2d )
-            CALL wrk_dealloc( jpi, jpj,   fgmepd2d   )
+            DEALLOCATE( fgmepd2d )
          ENDIF
          IF( med_diag%GMEZMI%dgsave ) THEN
             CALL iom_put( "GMEZMI"  , fgmezmi2d )
-            CALL wrk_dealloc( jpi, jpj,   fgmezmi2d   )
+            DEALLOCATE( fgmezmi2d )
          ENDIF
          IF( med_diag%GMED%dgsave ) THEN
             CALL iom_put( "GMED"  , fgmed2d )
-            CALL wrk_dealloc( jpi, jpj,    fgmed2d  )
+            DEALLOCATE( fgmed2d )
          ENDIF
          IF( med_diag%MZME%dgsave ) THEN
             CALL iom_put( "MZME"  , fdzme2d )
-            CALL wrk_dealloc( jpi, jpj,  fdzme2d    )
+            DEALLOCATE( fdzme2d )
          ENDIF
          !  IF( med_diag%DEXP%dgsave ) THEN
@@ -644,72 +643,72 @@
          IF( med_diag%DETN%dgsave ) THEN
             CALL iom_put( "DETN"  , fslown2d )
-            CALL wrk_dealloc( jpi, jpj,  fslown2d    )
+            DEALLOCATE( fslown2d )
          ENDIF
          IF( med_diag%MDET%dgsave ) THEN
             CALL iom_put( "MDET"  , fdd2d )
-            CALL wrk_dealloc( jpi, jpj,   fdd2d   )
+            DEALLOCATE( fdd2d )
          ENDIF
          IF( med_diag%AEOLIAN%dgsave ) THEN
             CALL iom_put( "AEOLIAN"  , ffetop2d )
-            CALL wrk_dealloc( jpi, jpj,   ffetop2d   )
+            DEALLOCATE( ffetop2d )
          ENDIF
          IF( med_diag%BENTHIC%dgsave ) THEN
             CALL iom_put( "BENTHIC"  , ffebot2d )
-            CALL wrk_dealloc( jpi, jpj,   ffebot2d   )
+            DEALLOCATE( ffebot2d )
          ENDIF
          IF( med_diag%SCAVENGE%dgsave ) THEN
             CALL iom_put( "SCAVENGE"  , ffescav2d )
-            CALL wrk_dealloc( jpi, jpj,   ffescav2d  )
+            DEALLOCATE( ffescav2d )
          ENDIF
          !! 
          IF( med_diag%TOTREG_N%dgsave ) THEN
             CALL iom_put( "TOTREG_N"  , fregen2d )
-            CALL wrk_dealloc( jpi, jpj,   fregen2d   )
+            DEALLOCATE( fregen2d )
          ENDIF
          IF( med_diag%TOTRG_SI%dgsave ) THEN
             CALL iom_put( "TOTRG_SI"  , fregensi2d )
-            CALL wrk_dealloc( jpi, jpj,    fregensi2d  )
+            DEALLOCATE( fregensi2d )
          ENDIF
          !! 
          IF( med_diag%FASTN%dgsave ) THEN
             CALL iom_put( "FASTN"  , ftempn2d )
-            CALL wrk_dealloc( jpi, jpj,   ftempn2d   )
+            DEALLOCATE( ftempn2d )
          ENDIF
          IF( med_diag%FASTSI%dgsave ) THEN
             CALL iom_put( "FASTSI"  , ftempsi2d )
-            CALL wrk_dealloc( jpi, jpj,   ftempsi2d   )
+            DEALLOCATE( ftempsi2d )
          ENDIF
          IF( med_diag%FASTFE%dgsave ) THEN
             CALL iom_put( "FASTFE"  , ftempfe2d )
-            CALL wrk_dealloc( jpi, jpj,    ftempfe2d  )
+            DEALLOCATE( ftempfe2d )
          ENDIF
          IF( med_diag%FASTC%dgsave ) THEN
             CALL iom_put( "FASTC"  , ftempc2d )
-            CALL wrk_dealloc( jpi, jpj,  ftempc2d    )
+            DEALLOCATE( ftempc2d )
          ENDIF
          IF( med_diag%FASTCA%dgsave ) THEN
             CALL iom_put( "FASTCA"  , ftempca2d )
-            CALL wrk_dealloc( jpi, jpj,  ftempca2d   )
+            DEALLOCATE( ftempca2d )
          ENDIF
          !! 
          IF( med_diag%REMINN%dgsave ) THEN
             CALL iom_put( "REMINN"  , freminn2d )
-            CALL wrk_dealloc( jpi, jpj,   freminn2d   )
+            DEALLOCATE( freminn2d )
          ENDIF
          IF( med_diag%REMINSI%dgsave ) THEN
             CALL iom_put( "REMINSI"  , freminsi2d )
-            CALL wrk_dealloc( jpi, jpj,   freminsi2d   )
+            DEALLOCATE( freminsi2d )
          ENDIF
          IF( med_diag%REMINFE%dgsave ) THEN
             CALL iom_put( "REMINFE"  , freminfe2d )
-            CALL wrk_dealloc( jpi, jpj,  freminfe2d    )
+            DEALLOCATE( freminfe2d )
          ENDIF
          IF( med_diag%REMINC%dgsave ) THEN
             CALL iom_put( "REMINC"  , freminc2d )
-            CALL wrk_dealloc( jpi, jpj,    freminc2d  )
+            DEALLOCATE( freminc2d )
          ENDIF
          IF( med_diag%REMINCA%dgsave ) THEN
             CALL iom_put( "REMINCA"  , freminca2d )
-            CALL wrk_dealloc( jpi, jpj,   freminca2d  )
+            DEALLOCATE( freminca2d )
          ENDIF
          IF( med_diag%SEAFLRN%dgsave ) THEN
@@ -733,158 +732,158 @@
          IF( med_diag%RIV_N%dgsave ) THEN
             CALL iom_put( "RIV_N"  , rivn2d )
-            CALL wrk_dealloc( jpi, jpj,    rivn2d  )
+            DEALLOCATE( rivn2d )
          ENDIF
          IF( med_diag%RIV_SI%dgsave ) THEN
             CALL iom_put( "RIV_SI"  , rivsi2d )
-            CALL wrk_dealloc( jpi, jpj,   rivsi2d   )
+            DEALLOCATE( rivsi2d )
          ENDIF
          IF( med_diag%RIV_C%dgsave ) THEN
             CALL iom_put( "RIV_C"  , rivc2d )
-            CALL wrk_dealloc( jpi, jpj,    rivc2d  )
+            DEALLOCATE( rivc2d )
          ENDIF
          IF( med_diag%RIV_ALK%dgsave ) THEN
             CALL iom_put( "RIV_ALK"  , rivalk2d )
-            CALL wrk_dealloc( jpi, jpj,  rivalk2d    )
+            DEALLOCATE( rivalk2d )
          ENDIF
          IF( med_diag%DETC%dgsave ) THEN
             CALL iom_put( "DETC"  , fslowc2d )
-            CALL wrk_dealloc( jpi, jpj,   fslowc2d   )
+            DEALLOCATE( fslowc2d )
          ENDIF
          !!
          IF( med_diag%PN_LLOSS%dgsave ) THEN
             CALL iom_put( "PN_LLOSS"  , fdpn22d )
-            CALL wrk_dealloc( jpi, jpj,   fdpn22d   )
+            DEALLOCATE( fdpn22d )
          ENDIF
          IF( med_diag%PD_LLOSS%dgsave ) THEN
             CALL iom_put( "PD_LLOSS"  , fdpd22d )
-            CALL wrk_dealloc( jpi, jpj,   fdpd22d   )
+            DEALLOCATE( fdpd22d )
          ENDIF
          IF( med_diag%ZI_LLOSS%dgsave ) THEN
             CALL iom_put( "ZI_LLOSS"  , fdzmi22d )
-             CALL wrk_dealloc( jpi, jpj,    fdzmi22d  )
+             DEALLOCATE( fdzmi22d )
           ENDIF
           IF( med_diag%ZE_LLOSS%dgsave ) THEN
              CALL iom_put( "ZE_LLOSS"  , fdzme22d )
-             CALL wrk_dealloc( jpi, jpj,   fdzme22d   )
+             DEALLOCATE( fdzme22d )
           ENDIF
           IF( med_diag%ZI_MES_N%dgsave ) THEN
              CALL iom_put( "ZI_MES_N"  , zimesn2d )
-             CALL wrk_dealloc( jpi, jpj,    zimesn2d  )
+             DEALLOCATE( zimesn2d )
           ENDIF
           IF( med_diag%ZI_MES_D%dgsave ) THEN
              CALL iom_put( "ZI_MES_D"  , zimesd2d )
-             CALL wrk_dealloc( jpi, jpj,    zimesd2d  )
+             DEALLOCATE( zimesd2d )
           ENDIF
           IF( med_diag%ZI_MES_C%dgsave ) THEN
              CALL iom_put( "ZI_MES_C"  , zimesc2d )
-             CALL wrk_dealloc( jpi, jpj,    zimesc2d  )
+             DEALLOCATE( zimesc2d )
           ENDIF
           IF( med_diag%ZI_MESDC%dgsave ) THEN
-             CALL iom_put( "ZI_MESDC"  ,zimesdc2d  )
-             CALL wrk_dealloc( jpi, jpj,    zimesdc2d  )
+             CALL iom_put( "ZI_MESDC"  ,zimesdc2d )
+             DEALLOCATE( zimesdc2d )
           ENDIF
           IF( med_diag%ZI_EXCR%dgsave ) THEN
              CALL iom_put( "ZI_EXCR"  , ziexcr2d )
-             CALL wrk_dealloc( jpi, jpj,    ziexcr2d )
+             DEALLOCATE( ziexcr2d )
           ENDIF
           IF( med_diag%ZI_RESP%dgsave ) THEN
              CALL iom_put( "ZI_RESP"  , ziresp2d )
-             CALL wrk_dealloc( jpi, jpj,   ziresp2d   )
+             DEALLOCATE( ziresp2d )
           ENDIF
           IF( med_diag%ZI_GROW%dgsave ) THEN
              CALL iom_put( "ZI_GROW"  , zigrow2d )
-             CALL wrk_dealloc( jpi, jpj,   zigrow2d   )
+             DEALLOCATE( zigrow2d )
           ENDIF
           IF( med_diag%ZE_MES_N%dgsave ) THEN
              CALL iom_put( "ZE_MES_N"  , zemesn2d )
-             CALL wrk_dealloc( jpi, jpj,    zemesn2d  )
+             DEALLOCATE( zemesn2d )
           ENDIF
           IF( med_diag%ZE_MES_D%dgsave ) THEN
              CALL iom_put( "ZE_MES_D"  , zemesd2d )
-             CALL wrk_dealloc( jpi, jpj,    zemesd2d  )
+             DEALLOCATE( zemesd2d )
           ENDIF
           IF( med_diag%ZE_MES_C%dgsave ) THEN
              CALL iom_put( "ZE_MES_C"  , zemesc2d )
-             CALL wrk_dealloc( jpi, jpj,   zemesc2d   )
+             DEALLOCATE( zemesc2d )
           ENDIF
           IF( med_diag%ZE_MESDC%dgsave ) THEN
              CALL iom_put( "ZE_MESDC"  , zemesdc2d )
-             CALL wrk_dealloc( jpi, jpj,   zemesdc2d   )
+             DEALLOCATE( zemesdc2d )
           ENDIF
           IF( med_diag%ZE_EXCR%dgsave ) THEN
              CALL iom_put( "ZE_EXCR"  , zeexcr2d )
-             CALL wrk_dealloc( jpi, jpj,   zeexcr2d   )
+             DEALLOCATE( zeexcr2d )
           ENDIF
           IF( med_diag%ZE_RESP%dgsave ) THEN
              CALL iom_put( "ZE_RESP"  , zeresp2d )
-             CALL wrk_dealloc( jpi, jpj,    zeresp2d  )
+             DEALLOCATE( zeresp2d )
           ENDIF
           IF( med_diag%ZE_GROW%dgsave ) THEN
              CALL iom_put( "ZE_GROW"  , zegrow2d )
-             CALL wrk_dealloc( jpi, jpj,   zegrow2d   )
+             DEALLOCATE( zegrow2d )
           ENDIF
           IF( med_diag%MDETC%dgsave ) THEN
              CALL iom_put( "MDETC"  , mdetc2d )
-             CALL wrk_dealloc( jpi, jpj,   mdetc2d   )
+             DEALLOCATE( mdetc2d )
           ENDIF
           IF( med_diag%GMIDC%dgsave ) THEN
              CALL iom_put( "GMIDC"  , gmidc2d )
-             CALL wrk_dealloc( jpi, jpj,    gmidc2d  )
+             DEALLOCATE( gmidc2d )
           ENDIF
           IF( med_diag%GMEDC%dgsave ) THEN
              CALL iom_put( "GMEDC"  , gmedc2d )
-             CALL wrk_dealloc( jpi, jpj,    gmedc2d  )
+             DEALLOCATE( gmedc2d )
           ENDIF
           IF( med_diag%IBEN_N%dgsave ) THEN
              CALL iom_put( "IBEN_N"  , iben_n2d )
-             CALL wrk_dealloc( jpi, jpj,    iben_n2d  )
+             DEALLOCATE( iben_n2d )
           ENDIF
           IF( med_diag%IBEN_FE%dgsave ) THEN
              CALL iom_put( "IBEN_FE"  , iben_fe2d )
-             CALL wrk_dealloc( jpi, jpj,   iben_fe2d   )
+             DEALLOCATE( iben_fe2d )
           ENDIF
           IF( med_diag%IBEN_C%dgsave ) THEN
              CALL iom_put( "IBEN_C"  , iben_c2d )
-             CALL wrk_dealloc( jpi, jpj,   iben_c2d   )
+             DEALLOCATE( iben_c2d )
           ENDIF
           IF( med_diag%IBEN_SI%dgsave ) THEN
              CALL iom_put( "IBEN_SI"  , iben_si2d )
-             CALL wrk_dealloc( jpi, jpj,   iben_si2d   )
+             DEALLOCATE( iben_si2d )
           ENDIF
           IF( med_diag%IBEN_CA%dgsave ) THEN
              CALL iom_put( "IBEN_CA"  , iben_ca2d )
-             CALL wrk_dealloc( jpi, jpj,   iben_ca2d   )
+             DEALLOCATE( iben_ca2d )
           ENDIF
           IF( med_diag%OBEN_N%dgsave ) THEN
              CALL iom_put( "OBEN_N"  , oben_n2d )
-             CALL wrk_dealloc( jpi, jpj,    oben_n2d  )
+             DEALLOCATE( oben_n2d )
           ENDIF
           IF( med_diag%OBEN_FE%dgsave ) THEN
              CALL iom_put( "OBEN_FE"  , oben_fe2d )
-             CALL wrk_dealloc( jpi, jpj,    oben_fe2d  )
+             DEALLOCATE( oben_fe2d )
           ENDIF
           IF( med_diag%OBEN_C%dgsave ) THEN
              CALL iom_put( "OBEN_C"  , oben_c2d )
-             CALL wrk_dealloc( jpi, jpj,    oben_c2d  )
+             DEALLOCATE( oben_c2d )
           ENDIF
           IF( med_diag%OBEN_SI%dgsave ) THEN
              CALL iom_put( "OBEN_SI"  , oben_si2d )
-             CALL wrk_dealloc( jpi, jpj,    oben_si2d  )
+             DEALLOCATE( oben_si2d )
           ENDIF
           IF( med_diag%OBEN_CA%dgsave ) THEN
              CALL iom_put( "OBEN_CA"  , oben_ca2d )
-             CALL wrk_dealloc( jpi, jpj, oben_ca2d     )
+             DEALLOCATE( oben_ca2d )
           ENDIF
           IF( med_diag%SFR_OCAL%dgsave ) THEN
              CALL iom_put( "SFR_OCAL"  , sfr_ocal2d )
-             CALL wrk_dealloc( jpi, jpj,    sfr_ocal2d  )
+             DEALLOCATE( sfr_ocal2d )
           ENDIF
           IF( med_diag%SFR_OARG%dgsave ) THEN
              CALL iom_put( "SFR_OARG"  , sfr_oarg2d )
-             CALL wrk_dealloc( jpi, jpj,    sfr_oarg2d  )
+             DEALLOCATE( sfr_oarg2d )
           ENDIF
           IF( med_diag%LYSO_CA%dgsave ) THEN
              CALL iom_put( "LYSO_CA"  , lyso_ca2d )
-             CALL wrk_dealloc( jpi, jpj,    lyso_ca2d  )
+             DEALLOCATE( lyso_ca2d )
           ENDIF
 # endif                   
@@ -893,13 +892,13 @@
           IF( med_diag%TPP3%dgsave ) THEN
              CALL iom_put( "TPP3"  , tpp3d )
-             CALL wrk_dealloc( jpi, jpj, jpk,   tpp3d  )
+             DEALLOCATE( tpp3d )
           ENDIF
           IF( med_diag%DETFLUX3%dgsave ) THEN
              CALL iom_put( "DETFLUX3"  , detflux3d )
-             CALL wrk_dealloc( jpi, jpj, jpk,    detflux3d )
+             DEALLOCATE( detflux3d )
           ENDIF
           IF( med_diag%REMIN3N%dgsave ) THEN
              CALL iom_put( "REMIN3N"  , remin3dn )
-             CALL wrk_dealloc( jpi, jpj, jpk,   remin3dn  )
+             DEALLOCATE( remin3dn )
           ENDIF
 # if defined key_roam          
@@ -914,45 +913,45 @@
           IF( med_diag%INTDISSIC%dgsave ) THEN
              CALL iom_put( "INTDISSIC"  , intdissic )
-             CALL wrk_dealloc( jpi, jpj, intdissic   )
+             DEALLOCATE( intdissic )
           ENDIF          
           IF( med_diag%INTDISSIN%dgsave ) THEN
              CALL iom_put( "INTDISSIN"  , intdissin )
-             CALL wrk_dealloc( jpi, jpj, intdissin   )
+             DEALLOCATE( intdissin )
           ENDIF          
           IF( med_diag%INTDISSISI%dgsave ) THEN
              CALL iom_put( "INTDISSISI"  , intdissisi )
-             CALL wrk_dealloc( jpi, jpj, intdissisi  )
+             DEALLOCATE( intdissisi )
           ENDIF          
           IF( med_diag%INTTALK%dgsave ) THEN
              CALL iom_put( "INTTALK"  , inttalk )
-             CALL wrk_dealloc( jpi, jpj, inttalk     )
+             DEALLOCATE( inttalk )
           ENDIF          
           IF( med_diag%O2min%dgsave ) THEN
              CALL iom_put( "O2min"  , o2min )
-             CALL wrk_dealloc( jpi, jpj, o2min       )
+             DEALLOCATE( o2min )
           ENDIF          
           IF( med_diag%ZO2min%dgsave ) THEN
              CALL iom_put( "ZO2min"  , zo2min )
-             CALL wrk_dealloc( jpi, jpj, zo2min      )
+             DEALLOCATE( zo2min )
           ENDIF          
           IF( med_diag%FBDDTALK%dgsave ) THEN
-             CALL iom_put( "FBDDTALK"  , fbddtalk   )
-             CALL wrk_dealloc( jpi, jpj, fbddtalk   )
+             CALL iom_put( "FBDDTALK"  , fbddtalk )
+             DEALLOCATE( fbddtalk )
           ENDIF          
           IF( med_diag%FBDDTDIC%dgsave ) THEN
-             CALL iom_put( "FBDDTDIC"  , fbddtdic   )
-             CALL wrk_dealloc( jpi, jpj, fbddtdic   )
+             CALL iom_put( "FBDDTDIC"  , fbddtdic )
+             DEALLOCATE( fbddtdic )
           ENDIF          
           IF( med_diag%FBDDTDIFE%dgsave ) THEN
-             CALL iom_put( "FBDDTDIFE" , fbddtdife  )
-             CALL wrk_dealloc( jpi, jpj, fbddtdife  )
+             CALL iom_put( "FBDDTDIFE" , fbddtdife )
+             DEALLOCATE( fbddtdife )
           ENDIF          
           IF( med_diag%FBDDTDIN%dgsave ) THEN
-             CALL iom_put( "FBDDTDIN"  , fbddtdin   )
-             CALL wrk_dealloc( jpi, jpj, fbddtdin   )
+             CALL iom_put( "FBDDTDIN"  , fbddtdin )
+             DEALLOCATE( fbddtdin )
           ENDIF          
           IF( med_diag%FBDDTDISI%dgsave ) THEN
-             CALL iom_put( "FBDDTDISI" , fbddtdisi  )
-             CALL wrk_dealloc( jpi, jpj, fbddtdisi  )
+             CALL iom_put( "FBDDTDISI" , fbddtdisi )
+             DEALLOCATE( fbddtdisi )
           ENDIF    
           !!
@@ -960,41 +959,41 @@
           IF( med_diag%TPPD3%dgsave ) THEN
              CALL iom_put( "TPPD3"     , tppd3 )
-             CALL wrk_dealloc( jpi, jpj, jpk, tppd3      )
+             DEALLOCATE( tppd3 )
           ENDIF          
           IF( med_diag%BDDTALK3%dgsave ) THEN
              CALL iom_put( "BDDTALK3"  , bddtalk3 )
-             CALL wrk_dealloc( jpi, jpj, jpk, bddtalk3   )
+             DEALLOCATE( bddtalk3 )
           ENDIF          
           IF( med_diag%BDDTDIC3%dgsave ) THEN
              CALL iom_put( "BDDTDIC3"  , bddtdic3 )
-             CALL wrk_dealloc( jpi, jpj, jpk, bddtdic3   )
+             DEALLOCATE( bddtdic3 )
           ENDIF          
           IF( med_diag%BDDTDIFE3%dgsave ) THEN
              CALL iom_put( "BDDTDIFE3" , bddtdife3 )
-             CALL wrk_dealloc( jpi, jpj, jpk, bddtdife3  )
+             DEALLOCATE( bddtdife3 )
           ENDIF          
           IF( med_diag%BDDTDIN3%dgsave ) THEN
              CALL iom_put( "BDDTDIN3"  , bddtdin3 )
-             CALL wrk_dealloc( jpi, jpj, jpk, bddtdin3   )
+             DEALLOCATE( bddtdin3 )
           ENDIF          
           IF( med_diag%BDDTDISI3%dgsave ) THEN
              CALL iom_put( "BDDTDISI3" , bddtdisi3 )
-             CALL wrk_dealloc( jpi, jpj, jpk, bddtdisi3  )
+             DEALLOCATE( bddtdisi3 )
           ENDIF    
           IF( med_diag%FD_NIT3%dgsave ) THEN
              CALL iom_put( "FD_NIT3"  , fd_nit3 )
-             CALL wrk_dealloc( jpi, jpj, jpk,   fd_nit3  )
+             DEALLOCATE( fd_nit3 )
           ENDIF
           IF( med_diag%FD_SIL3%dgsave ) THEN
              CALL iom_put( "FD_SIL3"  , fd_sil3 )
-             CALL wrk_dealloc( jpi, jpj, jpk,   fd_sil3  )
+             DEALLOCATE( fd_sil3 )
           ENDIF
           IF( med_diag%FD_CAL3%dgsave ) THEN
              CALL iom_put( "FD_CAL3"  , fd_cal3 )
-             CALL wrk_dealloc( jpi, jpj, jpk,   fd_cal3  )
+             DEALLOCATE( fd_cal3 )
           ENDIF
           IF( med_diag%FD_CAR3%dgsave ) THEN
              CALL iom_put( "FD_CAR3"  , fd_car3 )
-             CALL wrk_dealloc( jpi, jpj, jpk,   fd_car3  )
+             DEALLOCATE( fd_car3 )
           ENDIF
           IF( med_diag%CO33%dgsave ) THEN
@@ -1009,90 +1008,90 @@
           IF( med_diag%EXPC3%dgsave ) THEN
              CALL iom_put( "EXPC3"  , expc3 )
-             CALL wrk_dealloc( jpi, jpj, jpk, expc3  )
+             DEALLOCATE( expc3 )
           ENDIF          	        
           IF( med_diag%EXPN3%dgsave ) THEN
              CALL iom_put( "EXPN3"  , expn3 )
-             CALL wrk_dealloc( jpi, jpj, jpk, expn3  )
+             DEALLOCATE( expn3 )
           ENDIF          	        
           IF( med_diag%DCALC3%dgsave ) THEN
              CALL iom_put( "DCALC3"  , dcalc3 )
-             CALL wrk_dealloc( jpi, jpj, jpk, dcalc3  )
+             DEALLOCATE( dcalc3 )
           ENDIF          	        
           IF( med_diag%FEDISS3%dgsave ) THEN
              CALL iom_put( "FEDISS3"  , fediss3 )
-             CALL wrk_dealloc( jpi, jpj, jpk, fediss3  )
+             DEALLOCATE( fediss3 )
           ENDIF          	        
           IF( med_diag%FESCAV3%dgsave ) THEN
              CALL iom_put( "FESCAV3"  , fescav3 )
-             CALL wrk_dealloc( jpi, jpj, jpk, fescav3  )
+             DEALLOCATE( fescav3 )
           ENDIF          	        
           IF( med_diag%MIGRAZP3%dgsave ) THEN
              CALL iom_put( "MIGRAZP3"  , migrazp3 )
-             CALL wrk_dealloc( jpi, jpj, jpk, migrazp3  )
+             DEALLOCATE( migrazp3 )
           ENDIF          	        
           IF( med_diag%MIGRAZD3%dgsave ) THEN
              CALL iom_put( "MIGRAZD3"  , migrazd3 )
-             CALL wrk_dealloc( jpi, jpj, jpk, migrazd3  )
+             DEALLOCATE( migrazd3 )
           ENDIF          	        
           IF( med_diag%MEGRAZP3%dgsave ) THEN
              CALL iom_put( "MEGRAZP3"  , megrazp3 )
-             CALL wrk_dealloc( jpi, jpj, jpk, megrazp3  )
+             DEALLOCATE( megrazp3 )
           ENDIF          	        
           IF( med_diag%MEGRAZD3%dgsave ) THEN
              CALL iom_put( "MEGRAZD3"  , megrazd3 )
-             CALL wrk_dealloc( jpi, jpj, jpk, megrazd3  )
+             DEALLOCATE( megrazd3 )
           ENDIF          	        
           IF( med_diag%MEGRAZZ3%dgsave ) THEN
              CALL iom_put( "MEGRAZZ3"  , megrazz3 )
-             CALL wrk_dealloc( jpi, jpj, jpk, megrazz3  )
+             DEALLOCATE( megrazz3 )
           ENDIF          	        
           IF( med_diag%O2SAT3%dgsave ) THEN
              CALL iom_put( "O2SAT3"  , o2sat3 )
-             CALL wrk_dealloc( jpi, jpj, jpk, o2sat3 )
+             DEALLOCATE( o2sat3 )
           ENDIF          	        
           IF( med_diag%PBSI3%dgsave ) THEN
              CALL iom_put( "PBSI3"  , pbsi3 )
-             CALL wrk_dealloc( jpi, jpj, jpk, pbsi3  )
+             DEALLOCATE( pbsi3 )
           ENDIF          	        
           IF( med_diag%PCAL3%dgsave ) THEN
              CALL iom_put( "PCAL3"  , pcal3 )
-             CALL wrk_dealloc( jpi, jpj, jpk, pcal3  )
+             DEALLOCATE( pcal3 )
           ENDIF          	        
           IF( med_diag%REMOC3%dgsave ) THEN
              CALL iom_put( "REMOC3"  , remoc3 )
-             CALL wrk_dealloc( jpi, jpj, jpk, remoc3 )
+             DEALLOCATE( remoc3 )
           ENDIF          	        
           IF( med_diag%PNLIMJ3%dgsave ) THEN
              CALL iom_put( "PNLIMJ3" , pnlimj3 )
-             CALL wrk_dealloc( jpi, jpj, jpk, pnlimj3  )
+             DEALLOCATE( pnlimj3 )
           ENDIF          	        
           IF( med_diag%PNLIMN3%dgsave ) THEN
              CALL iom_put( "PNLIMN3" , pnlimn3 )
-             CALL wrk_dealloc( jpi, jpj, jpk, pnlimn3  )
+             DEALLOCATE( pnlimn3 )
           ENDIF          	        
           IF( med_diag%PNLIMFE3%dgsave ) THEN
              CALL iom_put( "PNLIMFE3" , pnlimfe3 )
-             CALL wrk_dealloc( jpi, jpj, jpk, pnlimfe3 )
+             DEALLOCATE( pnlimfe3 )
           ENDIF          	        
           IF( med_diag%PDLIMJ3%dgsave ) THEN
              CALL iom_put( "PDLIMJ3" , pdlimj3 )
-             CALL wrk_dealloc( jpi, jpj, jpk, pdlimj3  )
+             DEALLOCATE( pdlimj3 )
           ENDIF          	        
           IF( med_diag%PDLIMN3%dgsave ) THEN
              CALL iom_put( "PDLIMN3" , pdlimn3 )
-             CALL wrk_dealloc( jpi, jpj, jpk, pdlimn3  )
+             DEALLOCATE( pdlimn3 )
           ENDIF          	        
           IF( med_diag%PDLIMFE3%dgsave ) THEN
              CALL iom_put( "PDLIMFE3" , pdlimfe3 )
-             CALL wrk_dealloc( jpi, jpj, jpk, pdlimfe3 )
+             DEALLOCATE( pdlimfe3 )
           ENDIF          	        
           IF( med_diag%PDLIMSI3%dgsave ) THEN
              CALL iom_put( "PDLIMSI3" , pdlimsi3 )
-             CALL wrk_dealloc( jpi, jpj, jpk, pdlimsi3 )
+             DEALLOCATE( pdlimsi3 )
           ENDIF          	        
           
 # endif         
 
-          CALL wrk_dealloc( jpi, jpj,   zw2d   )
+          DEALLOCATE( zw2d )
 
        ENDIF                    ! end of ln_diatrc option
Index: /branches/UKMO/dev_r5518_medusa_chg_trc_bio_medusa/NEMOGCM/NEMO/TOP_SRC/MEDUSA/bio_medusa_init.F90
===================================================================
--- /branches/UKMO/dev_r5518_medusa_chg_trc_bio_medusa/NEMOGCM/NEMO/TOP_SRC/MEDUSA/bio_medusa_init.F90	(revision 8075)
+++ /branches/UKMO/dev_r5518_medusa_chg_trc_bio_medusa/NEMOGCM/NEMO/TOP_SRC/MEDUSA/bio_medusa_init.F90	(revision 8076)
@@ -37,5 +37,4 @@
       USE trc,               ONLY: ln_diatrc, med_diag, nittrc000,     &
                                    trc2d, trc3d
-      USE wrk_nemo,          ONLY: wrk_alloc
 
 # if defined key_iomput
@@ -175,112 +174,112 @@
          IF ( kt == nittrc000 )   CALL trc_nam_iom_medusa 
 
-         CALL wrk_alloc( jpi, jpj,      zw2d )
+         ALLOCATE( zw2d(1:jpi, 1:jpj) )
          zw2d(:,:)      = 0.0   !!
          IF ( med_diag%PRN%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,   fprn2d    )
+            ALLOCATE( fprn2d(1:jpi, 1:jpj) )
             fprn2d(:,:)      = 0.0 !!
          ENDIF
          IF ( med_diag%MPN%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,   fdpn2d    )
+            ALLOCATE( fdpn2d(1:jpi, 1:jpj) )
             fdpn2d(:,:)      = 0.0 !!
          ENDIF
          IF ( med_diag%PRD%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,   fprd2d    )
+            ALLOCATE( fprd2d(1:jpi, 1:jpj) )
             fprd2d(:,:)      = 0.0 !!
          ENDIF
          IF( med_diag%MPD%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,   fdpd2d    )
+            ALLOCATE( fdpd2d(1:jpi, 1:jpj) )
             fdpd2d(:,:)      = 0.0 !!
          ENDIF
          IF( med_diag%OPAL%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,   fprds2d    )
+            ALLOCATE( fprds2d(1:jpi, 1:jpj) )
             fprds2d(:,:)      = 0.0 !!
          ENDIF
          IF( med_diag%OPALDISS%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,   fsdiss2d    )
+            ALLOCATE( fsdiss2d(1:jpi, 1:jpj) )
             fsdiss2d(:,:)      = 0.0 !!
          ENDIF
          IF( med_diag%GMIPn%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,   fgmipn2d    )
+            ALLOCATE( fgmipn2d(1:jpi, 1:jpj) )
             fgmipn2d(:,:)      = 0.0 !!
          ENDIF
          IF( med_diag%GMID%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,   fgmid2d    )
+            ALLOCATE( fgmid2d(1:jpi, 1:jpj) )
             fgmid2d(:,:)      = 0.0 !!
          ENDIF
          IF( med_diag%MZMI%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,   fdzmi2d    )
+            ALLOCATE( fdzmi2d(1:jpi, 1:jpj) )
             fdzmi2d(:,:)      = 0.0 !!
          ENDIF
          IF( med_diag%GMEPN%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,   fgmepn2d    )
+            ALLOCATE( fgmepn2d(1:jpi, 1:jpj) )
             fgmepn2d(:,:)      = 0.0 !!
          ENDIF
          IF( med_diag%GMEPD%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,   fgmepd2d    )
+            ALLOCATE( fgmepd2d(1:jpi, 1:jpj) )
             fgmepd2d(:,:)      = 0.0 !!
          ENDIF
          IF( med_diag%GMEZMI%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,   fgmezmi2d    )
+            ALLOCATE( fgmezmi2d(1:jpi, 1:jpj) )
             fgmezmi2d(:,:)      = 0.0 !!
          ENDIF
          IF( med_diag%GMED%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,   fgmed2d    )
+            ALLOCATE( fgmed2d(1:jpi, 1:jpj) )
             fgmed2d(:,:)      = 0.0 !!
          ENDIF
          IF( med_diag%MZME%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,   fdzme2d    )
+            ALLOCATE( fdzme2d(1:jpi, 1:jpj) )
             fdzme2d(:,:)      = 0.0 !!
          ENDIF
          IF( med_diag%DETN%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,   fslown2d    )
+            ALLOCATE( fslown2d(1:jpi, 1:jpj) )
             fslown2d(:,:)      = 0.0 !!
          ENDIF
          IF( med_diag%MDET%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,   fdd2d    )
+            ALLOCATE( fdd2d(1:jpi, 1:jpj) )
             fdd2d(:,:)      = 0.0 !!
          ENDIF      
          IF( med_diag%AEOLIAN%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,   ffetop2d    )
+            ALLOCATE( ffetop2d(1:jpi, 1:jpj) )
             ffetop2d(:,:)      = 0.0 !!
          ENDIF
          IF( med_diag%BENTHIC%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,    ffebot2d   )
+            ALLOCATE( ffebot2d(1:jpi, 1:jpj) )
             ffebot2d(:,:)      = 0.0 !!
          ENDIF
          IF( med_diag%SCAVENGE%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,   ffescav2d    )
+            ALLOCATE( ffescav2d(1:jpi, 1:jpj) )
             ffescav2d(:,:)      = 0.0 !!
          ENDIF
          IF( med_diag%PN_JLIM%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,   fjln2d    )
+            ALLOCATE( fjln2d(1:jpi, 1:jpj) )
             fjln2d(:,:)      = 0.0 !!
          ENDIF
          IF( med_diag%PN_NLIM%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,   fnln2d    )
+            ALLOCATE( fnln2d(1:jpi, 1:jpj) )
             fnln2d(:,:)      = 0.0 !!
          ENDIF
          IF( med_diag%PN_FELIM%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,   ffln2d    )
+            ALLOCATE( ffln2d(1:jpi, 1:jpj) )
             ffln2d(:,:)      = 0.0 !!
          ENDIF
          IF( med_diag%PD_JLIM%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,   fjld2d    )
+            ALLOCATE( fjld2d(1:jpi, 1:jpj) )
             fjld2d(:,:)      = 0.0 !!
          ENDIF
          IF( med_diag%PD_NLIM%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,   fnld2d    )
+            ALLOCATE( fnld2d(1:jpi, 1:jpj) )
             fnld2d(:,:)      = 0.0 !!
          ENDIF
          IF( med_diag%PD_FELIM%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,   ffld2d    )
+            ALLOCATE( ffld2d(1:jpi, 1:jpj) )
             ffld2d(:,:)      = 0.0 !!
          ENDIF
          IF( med_diag%PD_SILIM%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,   fsld2d2    )
+            ALLOCATE( fsld2d2(1:jpi, 1:jpj) )
             fsld2d2(:,:)      = 0.0 !!
          ENDIF
          IF( med_diag%PDSILIM2%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,   fsld2d    )
+            ALLOCATE( fsld2d(1:jpi, 1:jpj) )
             fsld2d(:,:)      = 0.0 !!
          ENDIF
@@ -289,9 +288,9 @@
 !!
          IF( med_diag%TOTREG_N%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,   fregen2d    )
+            ALLOCATE( fregen2d(1:jpi, 1:jpj) )
             fregen2d(:,:)      = 0.0 !!
          ENDIF
          IF( med_diag%TOTRG_SI%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,   fregensi2d    )
+            ALLOCATE( fregensi2d(1:jpi, 1:jpj) )
             fregensi2d(:,:)      = 0.0 !!
          ENDIF
@@ -300,21 +299,21 @@
 !!
          IF( med_diag%FASTN%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,   ftempn2d    )
+            ALLOCATE( ftempn2d(1:jpi, 1:jpj) )
             ftempn2d(:,:)      = 0.0 !!
          ENDIF
          IF( med_diag%FASTSI%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,   ftempsi2d    )
+            ALLOCATE( ftempsi2d(1:jpi, 1:jpj) )
             ftempsi2d(:,:)      = 0.0 !!
          ENDIF
          IF( med_diag%FASTFE%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,  ftempfe2d     )
+            ALLOCATE( ftempfe2d(1:jpi, 1:jpj) )
             ftempfe2d(:,:)      = 0.0 !!
          ENDIF
          IF( med_diag%FASTC%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,  ftempc2d     )
+            ALLOCATE( ftempc2d(1:jpi, 1:jpj) )
             ftempc2d(:,:)      = 0.0 !!
          ENDIF
          IF( med_diag%FASTCA%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,   ftempca2d    )
+            ALLOCATE( ftempca2d(1:jpi, 1:jpj) )
             ftempca2d(:,:)      = 0.0 !!
          ENDIF     
@@ -323,21 +322,21 @@
 !!
          IF( med_diag%REMINN%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,    freminn2d   )
+            ALLOCATE( freminn2d(1:jpi, 1:jpj) )
             freminn2d(:,:)      = 0.0 !!
          ENDIF
          IF( med_diag%REMINSI%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,    freminsi2d   )
+            ALLOCATE( freminsi2d(1:jpi, 1:jpj) )
             freminsi2d(:,:)      = 0.0 !!
          ENDIF
          IF( med_diag%REMINFE%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,    freminfe2d   )
+            ALLOCATE( freminfe2d(1:jpi, 1:jpj) )
             freminfe2d(:,:)      = 0.0 !!
          ENDIF
          IF( med_diag%REMINC%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,   freminc2d    )
+            ALLOCATE( freminc2d(1:jpi, 1:jpj) )
             freminc2d(:,:)      = 0.0 !! 
          ENDIF
          IF( med_diag%REMINCA%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,   freminca2d    )
+            ALLOCATE( freminca2d(1:jpi, 1:jpj) )
             freminca2d(:,:)      = 0.0 !!
          ENDIF
@@ -348,10 +347,10 @@
 !!
          IF( med_diag%RR_0100%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,    ffastca2d   )
+            ALLOCATE( ffastca2d(1:jpi, 1:jpj) )
             ffastca2d(:,:)      = 0.0 !!
          ENDIF
 
          IF( med_diag%ATM_PCO2%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,    f_pco2a2d   )
+            ALLOCATE( f_pco2a2d(1:jpi, 1:jpj) )
             f_pco2a2d(:,:)      = 0.0 !!
          ENDIF
@@ -360,5 +359,5 @@
 !!
          IF( med_diag%OCN_PCO2%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,    f_pco2w2d   )
+            ALLOCATE( f_pco2w2d(1:jpi, 1:jpj) )
             f_pco2w2d(:,:)      = 0.0 !!
          ENDIF
@@ -367,5 +366,5 @@
 !!
          IF( med_diag%CO2FLUX%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,   f_co2flux2d    )
+            ALLOCATE( f_co2flux2d(1:jpi, 1:jpj) )
             f_co2flux2d(:,:)      = 0.0 !!
          ENDIF
@@ -374,25 +373,25 @@
 !!
          IF( med_diag%TCO2%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,   f_TDIC2d    )
+            ALLOCATE( f_TDIC2d(1:jpi, 1:jpj) )
             f_TDIC2d(:,:)      = 0.0 !!
          ENDIF
          IF( med_diag%TALK%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,    f_TALK2d   )
+            ALLOCATE( f_TALK2d(1:jpi, 1:jpj) )
             f_TALK2d(:,:)      = 0.0 !!
          ENDIF
          IF( med_diag%KW660%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,    f_kw6602d   )
+            ALLOCATE( f_kw6602d(1:jpi, 1:jpj) )
             f_kw6602d(:,:)      = 0.0 !!
          ENDIF
          IF( med_diag%ATM_PP0%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,    f_pp02d   )
+            ALLOCATE( f_pp02d(1:jpi, 1:jpj) )
             f_pp02d(:,:)      = 0.0 !!
          ENDIF
          IF( med_diag%O2FLUX%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,   f_o2flux2d    )
+            ALLOCATE( f_o2flux2d(1:jpi, 1:jpj) )
             f_o2flux2d(:,:)      = 0.0 !!
          ENDIF
          IF( med_diag%O2SAT%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,    f_o2sat2d   )
+            ALLOCATE( f_o2sat2d(1:jpi, 1:jpj) )
             f_o2sat2d(:,:)      = 0.0 !!
          ENDIF 
@@ -401,9 +400,9 @@
 !! 
          IF( med_diag%SFR_OCAL%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,    sfr_ocal2d  )
+            ALLOCATE( sfr_ocal2d(1:jpi, 1:jpj) )
             sfr_ocal2d(:,:)      = 0.0 !!
          ENDIF
          IF( med_diag%SFR_OARG%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,    sfr_oarg2d  )
+            ALLOCATE( sfr_oarg2d(1:jpi, 1:jpj) )
             sfr_oarg2d(:,:)      = 0.0 !!
          ENDIF
@@ -412,41 +411,41 @@
 !! 
          IF( med_diag%IBEN_N%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,    iben_n2d  )
+            ALLOCATE( iben_n2d(1:jpi, 1:jpj) )
             iben_n2d(:,:)      = 0.0 !!
          ENDIF
          IF( med_diag%IBEN_FE%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,   iben_fe2d   )
+            ALLOCATE( iben_fe2d(1:jpi, 1:jpj) )
             iben_fe2d(:,:)      = 0.0 !!
          ENDIF
          IF( med_diag%IBEN_C%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,   iben_c2d   )
+            ALLOCATE( iben_c2d(1:jpi, 1:jpj) )
             iben_c2d(:,:)      = 0.0 !!
          ENDIF
          IF( med_diag%IBEN_SI%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,   iben_si2d   )
+            ALLOCATE( iben_si2d(1:jpi, 1:jpj) )
             iben_si2d(:,:)      = 0.0 !!
          ENDIF
          IF( med_diag%IBEN_CA%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,   iben_ca2d   )
+            ALLOCATE( iben_ca2d(1:jpi, 1:jpj) )
             iben_ca2d(:,:)      = 0.0 !!
          ENDIF
          IF( med_diag%OBEN_N%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,    oben_n2d  )
+            ALLOCATE( oben_n2d(1:jpi, 1:jpj) )
             oben_n2d(:,:)      = 0.0 !!
          ENDIF
          IF( med_diag%OBEN_FE%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,    oben_fe2d  )
+            ALLOCATE( oben_fe2d(1:jpi, 1:jpj) )
             oben_fe2d(:,:)      = 0.0 !!
          ENDIF
          IF( med_diag%OBEN_C%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,    oben_c2d  )
+            ALLOCATE( oben_c2d(1:jpi, 1:jpj) )
             oben_c2d(:,:)      = 0.0 !!
          ENDIF
          IF( med_diag%OBEN_SI%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,    oben_si2d  )
+            ALLOCATE( oben_si2d(1:jpi, 1:jpj) )
             oben_si2d(:,:)      = 0.0 !!
          ENDIF
          IF( med_diag%OBEN_CA%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,    oben_ca2d  )
+            ALLOCATE( oben_ca2d(1:jpi, 1:jpj) )
             oben_ca2d(:,:)      = 0.0 !!
          ENDIF
@@ -456,21 +455,21 @@
 
          IF( med_diag%RIV_N%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,    rivn2d   )
+            ALLOCATE( rivn2d(1:jpi, 1:jpj) )
             rivn2d(:,:)      = 0.0 !!
          ENDIF
          IF( med_diag%RIV_SI%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,    rivsi2d   )
+            ALLOCATE( rivsi2d(1:jpi, 1:jpj) )
             rivsi2d(:,:)      = 0.0 !!
          ENDIF
          IF( med_diag%RIV_C%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,   rivc2d    )
+            ALLOCATE( rivc2d(1:jpi, 1:jpj) )
             rivc2d(:,:)      = 0.0 !!
          ENDIF
          IF( med_diag%RIV_ALK%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,    rivalk2d   )
+            ALLOCATE( rivalk2d(1:jpi, 1:jpj) )
             rivalk2d(:,:)      = 0.0 !!
          ENDIF
          IF( med_diag%DETC%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,    fslowc2d   )
+            ALLOCATE( fslowc2d(1:jpi, 1:jpj) )
             fslowc2d(:,:)      = 0.0 !!
          ENDIF 
@@ -479,5 +478,5 @@
 !!
          IF( med_diag%LYSO_CA%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,    lyso_ca2d  )
+            ALLOCATE( lyso_ca2d(1:jpi, 1:jpj) )
             lyso_ca2d(:,:)      = 0.0 !!
          ENDIF
@@ -486,85 +485,85 @@
 !!
          IF( med_diag%PN_LLOSS%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,    fdpn22d   )
+            ALLOCATE( fdpn22d(1:jpi, 1:jpj) )
             fdpn22d(:,:)      = 0.0 !!
          ENDIF
          IF( med_diag%PD_LLOSS%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,    fdpd22d   )
+            ALLOCATE( fdpd22d(1:jpi, 1:jpj) )
             fdpd22d(:,:)      = 0.0 !!
          ENDIF
          IF( med_diag%ZI_LLOSS%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,    fdzmi22d   )
+            ALLOCATE( fdzmi22d(1:jpi, 1:jpj) )
             fdzmi22d(:,:)      = 0.0 !!
          ENDIF
          IF( med_diag%ZE_LLOSS%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,   fdzme22d    )
+            ALLOCATE( fdzme22d(1:jpi, 1:jpj) )
             fdzme22d(:,:)      = 0.0 !!
          ENDIF
          IF( med_diag%ZI_MES_N%dgsave ) THEN   
-            CALL wrk_alloc( jpi, jpj,   zimesn2d    )
+            ALLOCATE( zimesn2d(1:jpi, 1:jpj) )
             zimesn2d(:,:)      = 0.0 !!
          ENDIF
          IF( med_diag%ZI_MES_D%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,    zimesd2d   )
+            ALLOCATE( zimesd2d(1:jpi, 1:jpj) )
             zimesd2d(:,:)      = 0.0 !!
          ENDIF
          IF( med_diag%ZI_MES_C%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,    zimesc2d   )
+            ALLOCATE( zimesc2d(1:jpi, 1:jpj) )
             zimesc2d(:,:)      = 0.0 !!
          ENDIF
          IF( med_diag%ZI_MESDC%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,    zimesdc2d   )
+            ALLOCATE( zimesdc2d(1:jpi, 1:jpj) )
             zimesdc2d(:,:)      = 0.0 !!
          ENDIF
          IF( med_diag%ZI_EXCR%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,     ziexcr2d  )
+            ALLOCATE( ziexcr2d(1:jpi, 1:jpj) )
             ziexcr2d(:,:)      = 0.0 !!
          ENDIF
          IF( med_diag%ZI_RESP%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,    ziresp2d   )
+            ALLOCATE( ziresp2d(1:jpi, 1:jpj) )
             ziresp2d(:,:)      = 0.0 !!
          ENDIF
          IF( med_diag%ZI_GROW%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,    zigrow2d   )
+            ALLOCATE( zigrow2d(1:jpi, 1:jpj) )
             zigrow2d(:,:)      = 0.0 !!
          ENDIF
          IF( med_diag%ZE_MES_N%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,   zemesn2d    )
+            ALLOCATE( zemesn2d(1:jpi, 1:jpj) )
             zemesn2d(:,:)      = 0.0 !!
          ENDIF
          IF( med_diag%ZE_MES_D%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,    zemesd2d   )
+            ALLOCATE( zemesd2d(1:jpi, 1:jpj) )
             zemesd2d(:,:)      = 0.0 !!
          ENDIF
          IF( med_diag%ZE_MES_C%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,    zemesc2d   )
+            ALLOCATE( zemesc2d(1:jpi, 1:jpj) )
             zemesc2d(:,:)      = 0.0 !!
          ENDIF
          IF( med_diag%ZE_MESDC%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,    zemesdc2d   )
+            ALLOCATE( zemesdc2d(1:jpi, 1:jpj) )
             zemesdc2d(:,:)      = 0.0 !!
          ENDIF
          IF( med_diag%ZE_EXCR%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,    zeexcr2d   )
+            ALLOCATE( zeexcr2d(1:jpi, 1:jpj) )
             zeexcr2d(:,:)      = 0.0 !!
          ENDIF                  
          IF( med_diag%ZE_RESP%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,    zeresp2d   )
+            ALLOCATE( zeresp2d(1:jpi, 1:jpj) )
             zeresp2d(:,:)      = 0.0 !!
          ENDIF
          IF( med_diag%ZE_GROW%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,    zegrow2d   )
+            ALLOCATE( zegrow2d(1:jpi, 1:jpj) )
             zegrow2d(:,:)      = 0.0 !!
          ENDIF
          IF( med_diag%MDETC%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,   mdetc2d    )
+            ALLOCATE( mdetc2d(1:jpi, 1:jpj) )
             mdetc2d(:,:)      = 0.0 !!
          ENDIF
          IF( med_diag%GMIDC%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,    gmidc2d   )
+            ALLOCATE( gmidc2d(1:jpi, 1:jpj) )
             gmidc2d(:,:)      = 0.0 !!
          ENDIF
          IF( med_diag%GMEDC%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,    gmedc2d   )
+            ALLOCATE( gmedc2d(1:jpi, 1:jpj) )
             gmedc2d(:,:)      = 0.0 !!
          ENDIF
@@ -574,21 +573,21 @@
          IF (jdms .eq. 1) THEN
             IF( med_diag%DMS_SURF%dgsave ) THEN
-               CALL wrk_alloc( jpi, jpj,   dms_surf2d    )
+               ALLOCATE( dms_surf2d(1:jpi, 1:jpj) )
                dms_surf2d(:,:)      = 0.0 !!
             ENDIF
             IF( med_diag%DMS_ANDR%dgsave ) THEN
-               CALL wrk_alloc( jpi, jpj,   dms_andr2d    )
+               ALLOCATE( dms_andr2d(1:jpi, 1:jpj) )
                dms_andr2d(:,:)      = 0.0 !!
             ENDIF
             IF( med_diag%DMS_SIMO%dgsave ) THEN
-               CALL wrk_alloc( jpi, jpj,  dms_simo2d     )
+               ALLOCATE( dms_simo2d(1:jpi, 1:jpj) )
                dms_simo2d(:,:)      = 0.0 !!
             ENDIF
             IF( med_diag%DMS_ARAN%dgsave ) THEN
-               CALL wrk_alloc( jpi, jpj,   dms_aran2d    )
+               ALLOCATE( dms_aran2d(1:jpi, 1:jpj) )
                dms_aran2d(:,:)      = 0.0 !!
             ENDIF
             IF( med_diag%DMS_HALL%dgsave ) THEN
-               CALL wrk_alloc( jpi, jpj,   dms_hall2d    )
+               ALLOCATE( dms_hall2d(1:jpi, 1:jpj) )
                dms_hall2d(:,:)      = 0.0 !!
             ENDIF
@@ -597,50 +596,50 @@
          !! AXY (24/11/16): extra MOCSY diagnostics, 2D
          IF( med_diag%ATM_XCO2%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj, f_xco2a_2d      )
+            ALLOCATE( f_xco2a_2d(1:jpi, 1:jpj) )
             f_xco2a_2d(:,:)      = 0.0 !!
          ENDIF
          IF( med_diag%OCN_FCO2%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj, f_fco2w_2d      )
+            ALLOCATE( f_fco2w_2d(1:jpi, 1:jpj) )
             f_fco2w_2d(:,:)      = 0.0 !!
          ENDIF
          IF( med_diag%ATM_FCO2%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj, f_fco2a_2d      )
+            ALLOCATE( f_fco2a_2d(1:jpi, 1:jpj) )
             f_fco2a_2d(:,:)      = 0.0 !!
          ENDIF
          IF( med_diag%OCN_RHOSW%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj, f_ocnrhosw_2d   )
+            ALLOCATE( f_ocnrhosw_2d(1:jpi, 1:jpj) )
             f_ocnrhosw_2d(:,:)      = 0.0 !!
          ENDIF
          IF( med_diag%OCN_SCHCO2%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj, f_ocnschco2_2d  )
+            ALLOCATE( f_ocnschco2_2d(1:jpi, 1:jpj) )
             f_ocnschco2_2d(:,:)      = 0.0 !!
          ENDIF
          IF( med_diag%OCN_KWCO2%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj, f_ocnkwco2_2d   )
+            ALLOCATE( f_ocnkwco2_2d(1:jpi, 1:jpj) )
             f_ocnkwco2_2d(:,:)      = 0.0 !!
          ENDIF
          IF( med_diag%OCN_K0%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj, f_ocnk0_2d      )
+            ALLOCATE( f_ocnk0_2d(1:jpi, 1:jpj) )
             f_ocnk0_2d(:,:)      = 0.0 !!
          ENDIF
          IF( med_diag%CO2STARAIR%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj, f_co2starair_2d )
+            ALLOCATE( f_co2starair_2d(1:jpi, 1:jpj) )
             f_co2starair_2d(:,:)      = 0.0 !!
          ENDIF
          IF( med_diag%OCN_DPCO2%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj, f_ocndpco2_2d   )
+            ALLOCATE( f_ocndpco2_2d(1:jpi, 1:jpj) )
             f_ocndpco2_2d(:,:)      = 0.0 !!
          ENDIF
 # endif  
          IF( med_diag%TPP3%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj, jpk,       tpp3d )
+            ALLOCATE( tpp3d(1:jpi, 1:jpj, 1:jpk) )
             tpp3d(:,:,:)      = 0.0 !! 
          ENDIF
          IF( med_diag%DETFLUX3%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj, jpk,        detflux3d )
+            ALLOCATE( detflux3d(1:jpi, 1:jpj, 1:jpk) )
             detflux3d(:,:,:)      = 0.0 !! 
          ENDIF
          IF( med_diag%REMIN3N%dgsave ) THEN
-             CALL wrk_alloc( jpi, jpj, jpk,        remin3dn )
+             ALLOCATE( remin3dn(1:jpi, 1:jpj, 1:jpk) )
              remin3dn(:,:,:)      = 0.0 !! 
          ENDIF
@@ -650,49 +649,49 @@
          !!                   needed for coupling/passed through restart
          !! IF( med_diag%FGCO2%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,   fgco2    )
+            ALLOCATE( fgco2(1:jpi, 1:jpj) )
             fgco2(:,:)      = 0.0 !!
          !! ENDIF
          IF( med_diag%INTDISSIC%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,   intdissic    )
+            ALLOCATE( intdissic(1:jpi, 1:jpj) )
             intdissic(:,:)  = 0.0 !!
          ENDIF          
          IF( med_diag%INTDISSIN%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,   intdissin    )
+            ALLOCATE( intdissin(1:jpi, 1:jpj) )
             intdissin(:,:)  = 0.0 !!
          ENDIF          
          IF( med_diag%INTDISSISI%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,   intdissisi    )
+            ALLOCATE( intdissisi(1:jpi, 1:jpj) )
             intdissisi(:,:)  = 0.0 !!
          ENDIF          
          IF( med_diag%INTTALK%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,   inttalk    )
+            ALLOCATE( inttalk(1:jpi, 1:jpj) )
             inttalk(:,:)  = 0.0 !!
          ENDIF          
          IF( med_diag%O2min%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,   o2min    )
+            ALLOCATE( o2min(1:jpi, 1:jpj) )
             o2min(:,:)  = 1.e3 !! set to high value as we're looking for min(o2)
          ENDIF          
          IF( med_diag%ZO2min%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj,   zo2min    )
+            ALLOCATE( zo2min(1:jpi, 1:jpj) )
             zo2min(:,:)  = 0.0 !!
          ENDIF          
          IF( med_diag%FBDDTALK%dgsave  ) THEN
-            CALL wrk_alloc( jpi, jpj, fbddtalk  )
+            ALLOCATE( fbddtalk(1:jpi, 1:jpj) )
             fbddtalk(:,:)  = 0.0 !! 
          ENDIF
          IF( med_diag%FBDDTDIC%dgsave  ) THEN
-            CALL wrk_alloc( jpi, jpj, fbddtdic  )
+            ALLOCATE( fbddtdic(1:jpi, 1:jpj) )
             fbddtdic(:,:)  = 0.0 !! 
          ENDIF
          IF( med_diag%FBDDTDIFE%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj, fbddtdife )
+            ALLOCATE( fbddtdife(1:jpi, 1:jpj) )
             fbddtdife(:,:) = 0.0 !! 
          ENDIF
          IF( med_diag%FBDDTDIN%dgsave  ) THEN
-            CALL wrk_alloc( jpi, jpj, fbddtdin  )
+            ALLOCATE( fbddtdin(1:jpi, 1:jpj) )
             fbddtdin(:,:)  = 0.0 !! 
          ENDIF
          IF( med_diag%FBDDTDISI%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj, fbddtdisi )
+            ALLOCATE( fbddtdisi(1:jpi, 1:jpj) )
             fbddtdisi(:,:) = 0.0 !! 
          ENDIF
@@ -700,125 +699,125 @@
          !! AXY (10/11/16): CMIP6 diagnostics, 3D
          IF( med_diag%TPPD3%dgsave     ) THEN
-            CALL wrk_alloc( jpi, jpj, jpk, tppd3     )
+            ALLOCATE( tppd3(1:jpi, 1:jpj, 1:jpk) )
             tppd3(:,:,:)     = 0.0 !! 
          ENDIF
          IF( med_diag%BDDTALK3%dgsave  ) THEN
-            CALL wrk_alloc( jpi, jpj, jpk, bddtalk3  )
+            ALLOCATE( bddtalk3(1:jpi, 1:jpj, 1:jpk) )
             bddtalk3(:,:,:)  = 0.0 !! 
          ENDIF
          IF( med_diag%BDDTDIC3%dgsave  ) THEN
-            CALL wrk_alloc( jpi, jpj, jpk, bddtdic3  )
+            ALLOCATE( bddtdic3(1:jpi, 1:jpj, 1:jpk) )
             bddtdic3(:,:,:)  = 0.0 !! 
          ENDIF
          IF( med_diag%BDDTDIFE3%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj, jpk, bddtdife3 )
+            ALLOCATE( bddtdife3(1:jpi, 1:jpj, 1:jpk) )
             bddtdife3(:,:,:) = 0.0 !! 
          ENDIF
          IF( med_diag%BDDTDIN3%dgsave  ) THEN
-            CALL wrk_alloc( jpi, jpj, jpk, bddtdin3  )
+            ALLOCATE( bddtdin3(1:jpi, 1:jpj, 1:jpk) )
             bddtdin3(:,:,:)  = 0.0 !! 
          ENDIF
          IF( med_diag%BDDTDISI3%dgsave ) THEN
-            CALL wrk_alloc( jpi, jpj, jpk, bddtdisi3 )
+            ALLOCATE( bddtdisi3(1:jpi, 1:jpj, 1:jpk) )
             bddtdisi3(:,:,:) = 0.0 !! 
          ENDIF
          IF( med_diag%FD_NIT3%dgsave   ) THEN
-            CALL wrk_alloc( jpi, jpj, jpk, fd_nit3   )
+            ALLOCATE( fd_nit3(1:jpi, 1:jpj, 1:jpk) )
             fd_nit3(:,:,:)   = 0.0 !! 
          ENDIF
          IF( med_diag%FD_SIL3%dgsave   ) THEN
-            CALL wrk_alloc( jpi, jpj, jpk, fd_sil3   )
+            ALLOCATE( fd_sil3(1:jpi, 1:jpj, 1:jpk) )
             fd_sil3(:,:,:)   = 0.0 !! 
          ENDIF
          IF( med_diag%FD_CAR3%dgsave   ) THEN
-            CALL wrk_alloc( jpi, jpj, jpk, fd_car3   )
+            ALLOCATE( fd_car3(1:jpi, 1:jpj, 1:jpk) )
             fd_car3(:,:,:)   = 0.0 !! 
          ENDIF
          IF( med_diag%FD_CAL3%dgsave   ) THEN
-            CALL wrk_alloc( jpi, jpj, jpk, fd_cal3   )
+            ALLOCATE( fd_cal3(1:jpi, 1:jpj, 1:jpk) )
             fd_cal3(:,:,:)   = 0.0 !! 
          ENDIF
          IF( med_diag%DCALC3%dgsave    ) THEN
-            CALL wrk_alloc( jpi, jpj, jpk, dcalc3    )
+            ALLOCATE( dcalc3(1:jpi, 1:jpj, 1:jpk) )
             dcalc3(:,:,: )   = 0.0 !! 
          ENDIF
          IF( med_diag%EXPC3%dgsave     ) THEN
-            CALL wrk_alloc( jpi, jpj, jpk, expc3   )
+            ALLOCATE( expc3(1:jpi, 1:jpj, 1:jpk) )
             expc3(:,:,: )    = 0.0 !! 
          ENDIF
          IF( med_diag%EXPN3%dgsave     ) THEN
-            CALL wrk_alloc( jpi, jpj, jpk, expn3   )
+            ALLOCATE( expn3(1:jpi, 1:jpj, 1:jpk) )
             expn3(:,:,: )    = 0.0 !! 
          ENDIF
          IF( med_diag%FEDISS3%dgsave   ) THEN
-            CALL wrk_alloc( jpi, jpj, jpk, fediss3   )
+            ALLOCATE( fediss3(1:jpi, 1:jpj, 1:jpk) )
             fediss3(:,:,: )  = 0.0 !! 
          ENDIF
          IF( med_diag%FESCAV3%dgsave   ) THEN
-            CALL wrk_alloc( jpi, jpj, jpk, fescav3   )
+            ALLOCATE( fescav3(1:jpi, 1:jpj, 1:jpk) )
             fescav3(:,:,: )  = 0.0 !! 
          ENDIF
          IF( med_diag%MIGRAZP3%dgsave   ) THEN
-            CALL wrk_alloc( jpi, jpj, jpk, migrazp3  )
+            ALLOCATE( migrazp3(1:jpi, 1:jpj, 1:jpk) )
             migrazp3(:,:,: )  = 0.0 !! 
          ENDIF
          IF( med_diag%MIGRAZD3%dgsave   ) THEN
-            CALL wrk_alloc( jpi, jpj, jpk, migrazd3  )
+            ALLOCATE( migrazd3(1:jpi, 1:jpj, 1:jpk) )
             migrazd3(:,:,: )  = 0.0 !! 
          ENDIF
          IF( med_diag%MEGRAZP3%dgsave   ) THEN
-            CALL wrk_alloc( jpi, jpj, jpk, megrazp3  )
+            ALLOCATE( megrazp3(1:jpi, 1:jpj, 1:jpk) )
             megrazp3(:,:,: )  = 0.0 !! 
          ENDIF
          IF( med_diag%MEGRAZD3%dgsave   ) THEN
-            CALL wrk_alloc( jpi, jpj, jpk, megrazd3  )
+            ALLOCATE( megrazd3(1:jpi, 1:jpj, 1:jpk) )
             megrazd3(:,:,: )  = 0.0 !! 
          ENDIF
          IF( med_diag%MEGRAZZ3%dgsave   ) THEN
-            CALL wrk_alloc( jpi, jpj, jpk, megrazz3  )
+            ALLOCATE( megrazz3(1:jpi, 1:jpj, 1:jpk) )
             megrazz3(:,:,: )  = 0.0 !! 
          ENDIF
          IF( med_diag%O2SAT3%dgsave     ) THEN
-            CALL wrk_alloc( jpi, jpj, jpk, o2sat3    )
+            ALLOCATE( o2sat3(1:jpi, 1:jpj, 1:jpk) )
             o2sat3(:,:,: )    = 0.0 !! 
          ENDIF
          IF( med_diag%PBSI3%dgsave      ) THEN
-            CALL wrk_alloc( jpi, jpj, jpk, pbsi3     )
+            ALLOCATE( pbsi3(1:jpi, 1:jpj, 1:jpk) )
             pbsi3(:,:,: )     = 0.0 !! 
          ENDIF
          IF( med_diag%PCAL3%dgsave      ) THEN
-            CALL wrk_alloc( jpi, jpj, jpk, pcal3     )
+            ALLOCATE( pcal3(1:jpi, 1:jpj, 1:jpk) )
             pcal3(:,:,: )     = 0.0 !! 
          ENDIF
          IF( med_diag%REMOC3%dgsave     ) THEN
-            CALL wrk_alloc( jpi, jpj, jpk, remoc3    )
+            ALLOCATE( remoc3(1:jpi, 1:jpj, 1:jpk) )
             remoc3(:,:,: )    = 0.0 !! 
          ENDIF
          IF( med_diag%PNLIMJ3%dgsave    ) THEN
-            CALL wrk_alloc( jpi, jpj, jpk, pnlimj3   )
+            ALLOCATE( pnlimj3(1:jpi, 1:jpj, 1:jpk) )
             pnlimj3(:,:,: )   = 0.0 !! 
          ENDIF
          IF( med_diag%PNLIMN3%dgsave    ) THEN
-            CALL wrk_alloc( jpi, jpj, jpk, pnlimn3   )
+            ALLOCATE( pnlimn3(1:jpi, 1:jpj, 1:jpk) )
             pnlimn3(:,:,: )   = 0.0 !! 
          ENDIF
          IF( med_diag%PNLIMFE3%dgsave   ) THEN
-            CALL wrk_alloc( jpi, jpj, jpk, pnlimfe3  )
+            ALLOCATE( pnlimfe3(1:jpi, 1:jpj, 1:jpk) )
             pnlimfe3(:,:,: )  = 0.0 !! 
          ENDIF
          IF( med_diag%PDLIMJ3%dgsave    ) THEN
-            CALL wrk_alloc( jpi, jpj, jpk, pdlimj3   )
+            ALLOCATE( pdlimj3(1:jpi, 1:jpj, 1:jpk) )
             pdlimj3(:,:,: )   = 0.0 !! 
          ENDIF
          IF( med_diag%PDLIMN3%dgsave    ) THEN
-            CALL wrk_alloc( jpi, jpj, jpk, pdlimn3   )
+            ALLOCATE( pdlimn3(1:jpi, 1:jpj, 1:jpk) )
             pdlimn3(:,:,: )   = 0.0 !! 
          ENDIF
          IF( med_diag%PDLIMFE3%dgsave   ) THEN
-            CALL wrk_alloc( jpi, jpj, jpk, pdlimfe3  )
+            ALLOCATE( pdlimfe3(1:jpi, 1:jpj, 1:jpk) )
             pdlimfe3(:,:,: )  = 0.0 !! 
          ENDIF
          IF( med_diag%PDLIMSI3%dgsave   ) THEN
-            CALL wrk_alloc( jpi, jpj, jpk, pdlimsi3  )
+            ALLOCATE( pdlimsi3(1:jpi, 1:jpj, 1:jpk) )
             pdlimsi3(:,:,: )  = 0.0 !! 
          ENDIF
Index: /branches/UKMO/dev_r5518_medusa_chg_trc_bio_medusa/NEMOGCM/NEMO/TOP_SRC/MEDUSA/bio_medusa_mod.F90
===================================================================
--- /branches/UKMO/dev_r5518_medusa_chg_trc_bio_medusa/NEMOGCM/NEMO/TOP_SRC/MEDUSA/bio_medusa_mod.F90	(revision 8075)
+++ /branches/UKMO/dev_r5518_medusa_chg_trc_bio_medusa/NEMOGCM/NEMO/TOP_SRC/MEDUSA/bio_medusa_mod.F90	(revision 8076)
@@ -187,44 +187,44 @@
    !! Jpalm -- 11-10-2015 -- adapt diag to iom_use
    !! 2D var for diagnostics.
-   REAL(wp), POINTER, DIMENSION(:,:) :: fprn2d, fdpn2d, fprd2d, fdpd2d
-   REAL(wp), POINTER, DIMENSION(:,:) :: fprds2d, fsdiss2d, fgmipn2d
-   REAL(wp), POINTER, DIMENSION(:,:) :: fgmid2d, fdzmi2d, fgmepn2d
-   REAL(wp), POINTER, DIMENSION(:,:) :: fgmepd2d, fgmezmi2d, fgmed2d
-   REAL(wp), POINTER, DIMENSION(:,:) :: fdzme2d, fslown2d, fdd2d
-   REAL(wp), POINTER, DIMENSION(:,:) :: ffetop2d, ffebot2d, ffescav2d
-   REAL(wp), POINTER, DIMENSION(:,:) :: fjln2d, fnln2d, ffln2d, fjld2d
-   REAL(wp), POINTER, DIMENSION(:,:) :: fnld2d, ffld2d, fsld2d2
-   REAL(wp), POINTER, DIMENSION(:,:) :: fsld2d, fregen2d, fregensi2d
-   REAL(wp), POINTER, DIMENSION(:,:) :: ftempn2d, ftempsi2d, ftempfe2d
-   REAL(wp), POINTER, DIMENSION(:,:) :: ftempc2d, ftempca2d, freminn2d
-   REAL(wp), POINTER, DIMENSION(:,:) :: freminsi2d, freminfe2d
-   REAL(wp), POINTER, DIMENSION(:,:) :: freminc2d, freminca2d
-   REAL(wp), POINTER, DIMENSION(:,:) :: zw2d
-# if defined key_roam
-   REAL(wp), POINTER, DIMENSION(:,:) :: ffastca2d, rivn2d, rivsi2d
-   REAL(wp), POINTER, DIMENSION(:,:) :: rivc2d, rivalk2d, fslowc2d
-   REAL(wp), POINTER, DIMENSION(:,:) :: fdpn22d, fdpd22d, fdzmi22d
-   REAL(wp), POINTER, DIMENSION(:,:) :: fdzme22d, zimesn2d, zimesd2d
-   REAL(wp), POINTER, DIMENSION(:,:) :: zimesc2d, zimesdc2d, ziexcr2d
-   REAL(wp), POINTER, DIMENSION(:,:) :: ziresp2d, zigrow2d, zemesn2d
-   REAL(wp), POINTER, DIMENSION(:,:) :: zemesd2d, zemesc2d, zemesdc2d
-   REAL(wp), POINTER, DIMENSION(:,:) :: zeexcr2d, zeresp2d, zegrow2d
-   REAL(wp), POINTER, DIMENSION(:,:) :: mdetc2d, gmidc2d, gmedc2d
-   REAL(wp), POINTER, DIMENSION(:,:) :: f_pco2a2d, f_pco2w2d, f_co2flux2d
-   REAL(wp), POINTER, DIMENSION(:,:) :: f_TDIC2d, f_TALK2d, f_kw6602d
-   REAL(wp), POINTER, DIMENSION(:,:) :: f_pp02d, f_o2flux2d, f_o2sat2d
-   REAL(wp), POINTER, DIMENSION(:,:) :: dms_andr2d, dms_simo2d, dms_aran2d
-   REAL(wp), POINTER, DIMENSION(:,:) :: dms_hall2d, dms_surf2d
-   REAL(wp), POINTER, DIMENSION(:,:) :: iben_n2d, iben_fe2d, iben_c2d
-   REAL(wp), POINTER, DIMENSION(:,:) :: iben_si2d, iben_ca2d, oben_n2d
-   REAL(wp), POINTER, DIMENSION(:,:) :: oben_fe2d, oben_c2d, oben_si2d
-   REAL(wp), POINTER, DIMENSION(:,:) :: oben_ca2d, sfr_ocal2d
-   REAL(wp), POINTER, DIMENSION(:,:) :: sfr_oarg2d, lyso_ca2d 
+   REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fprn2d, fdpn2d, fprd2d, fdpd2d
+   REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fprds2d, fsdiss2d, fgmipn2d
+   REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fgmid2d, fdzmi2d, fgmepn2d
+   REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fgmepd2d, fgmezmi2d, fgmed2d
+   REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fdzme2d, fslown2d, fdd2d
+   REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: ffetop2d, ffebot2d, ffescav2d
+   REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fjln2d, fnln2d, ffln2d, fjld2d
+   REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fnld2d, ffld2d, fsld2d2
+   REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fsld2d, fregen2d, fregensi2d
+   REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: ftempn2d, ftempsi2d, ftempfe2d
+   REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: ftempc2d, ftempca2d, freminn2d
+   REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: freminsi2d, freminfe2d
+   REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: freminc2d, freminca2d
+   REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: zw2d
+# if defined key_roam
+   REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: ffastca2d, rivn2d, rivsi2d
+   REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: rivc2d, rivalk2d, fslowc2d
+   REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fdpn22d, fdpd22d, fdzmi22d
+   REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fdzme22d, zimesn2d, zimesd2d
+   REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: zimesc2d, zimesdc2d, ziexcr2d
+   REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: ziresp2d, zigrow2d, zemesn2d
+   REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: zemesd2d, zemesc2d, zemesdc2d
+   REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: zeexcr2d, zeresp2d, zegrow2d
+   REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: mdetc2d, gmidc2d, gmedc2d
+   REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: f_pco2a2d, f_pco2w2d, f_co2flux2d
+   REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: f_TDIC2d, f_TALK2d, f_kw6602d
+   REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: f_pp02d, f_o2flux2d, f_o2sat2d
+   REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: dms_andr2d, dms_simo2d, dms_aran2d
+   REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: dms_hall2d, dms_surf2d
+   REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: iben_n2d, iben_fe2d, iben_c2d
+   REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: iben_si2d, iben_ca2d, oben_n2d
+   REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: oben_fe2d, oben_c2d, oben_si2d
+   REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: oben_ca2d, sfr_ocal2d
+   REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: sfr_oarg2d, lyso_ca2d 
    !! AXY (23/11/16): extra MOCSY diagnostics
-   REAL(wp), POINTER, DIMENSION(:,:) :: f_xco2a_2d, f_fco2w_2d, f_fco2a_2d
-   REAL(wp), POINTER, DIMENSION(:,:) :: f_ocnrhosw_2d, f_ocnschco2_2d
-   REAL(wp), POINTER, DIMENSION(:,:) :: f_ocnkwco2_2d
-   REAL(wp), POINTER, DIMENSION(:,:) :: f_ocnk0_2d, f_co2starair_2d
-   REAL(wp), POINTER, DIMENSION(:,:) :: f_ocndpco2_2d
+   REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: f_xco2a_2d, f_fco2w_2d, f_fco2a_2d
+   REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: f_ocnrhosw_2d, f_ocnschco2_2d
+   REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: f_ocnkwco2_2d
+   REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: f_ocnk0_2d, f_co2starair_2d
+   REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: f_ocndpco2_2d
 # endif
    !!
@@ -236,22 +236,23 @@
    !! 2D var for new CMIP6 diagnostics (behind a key_roam ifdef 
    !! for simplicity)
-   REAL(wp), POINTER, DIMENSION(:,:) :: fgco2,intdissic,intdissin
-   REAL(wp), POINTER, DIMENSION(:,:) :: intdissisi,inttalk,o2min,zo2min
-   REAL(wp), POINTER, DIMENSION(:,:) :: fbddtalk,fbddtdic,fbddtdife
-   REAL(wp), POINTER, DIMENSION(:,:) :: fbddtdin,fbddtdisi
+   REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fgco2,intdissic,intdissin
+   REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: intdissisi,inttalk,o2min,zo2min
+   REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fbddtalk,fbddtdic,fbddtdife
+   REAL(wp), ALLOCATABLE, DIMENSION(:,:) :: fbddtdin,fbddtdisi
    !!
    !! 3D var for new CMIP6 diagnostics
-   REAL(wp), POINTER, DIMENSION(:,:,:) :: tppd3
-   REAL(wp), POINTER, DIMENSION(:,:,:) :: bddtalk3,bddtdic3,bddtdife3
-   REAL(wp), POINTER, DIMENSION(:,:,:) :: bddtdin3, bddtdisi3
-   REAL(wp), POINTER, DIMENSION(:,:,:) :: fd_nit3,fd_sil3,fd_car3,fd_cal3
-   REAL(wp), POINTER, DIMENSION(:,:,:) :: co33,co3satarag3,co3satcalc3,dcalc3
-   REAL(wp), POINTER, DIMENSION(:,:,:) :: expc3,expn3
-   REAL(wp), POINTER, DIMENSION(:,:,:) :: fediss3,fescav3
-   REAL(wp), POINTER, DIMENSION(:,:,:) :: migrazp3,migrazd3,megrazp3
-   REAL(wp), POINTER, DIMENSION(:,:,:) :: megrazd3, megrazz3
-   REAL(wp), POINTER, DIMENSION(:,:,:) :: o2sat3,pbsi3,pcal3,remoc3
-   REAL(wp), POINTER, DIMENSION(:,:,:) :: pnlimj3,pnlimn3,pnlimfe3
-   REAL(wp), POINTER, DIMENSION(:,:,:) :: pdlimj3,pdlimn3,pdlimfe3,pdlimsi3
+   REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: tppd3
+   REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: bddtalk3,bddtdic3,bddtdife3
+   REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: bddtdin3, bddtdisi3
+   REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: fd_nit3,fd_sil3,fd_car3,fd_cal3
+   REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: co33,co3satarag3
+   REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: co3satcalc3,dcalc3
+   REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: expc3,expn3
+   REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: fediss3,fescav3
+   REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: migrazp3,migrazd3,megrazp3
+   REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: megrazd3, megrazz3
+   REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: o2sat3,pbsi3,pcal3,remoc3
+   REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: pnlimj3,pnlimn3,pnlimfe3
+   REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) :: pdlimj3,pdlimn3,pdlimfe3,pdlimsi3
 # endif
    !!----------------------------------------------------------------------
Index: /branches/UKMO/dev_r5518_medusa_chg_trc_bio_medusa/NEMOGCM/NEMO/TOP_SRC/MEDUSA/detritus.F90
===================================================================
--- /branches/UKMO/dev_r5518_medusa_chg_trc_bio_medusa/NEMOGCM/NEMO/TOP_SRC/MEDUSA/detritus.F90	(revision 8075)
+++ /branches/UKMO/dev_r5518_medusa_chg_trc_bio_medusa/NEMOGCM/NEMO/TOP_SRC/MEDUSA/detritus.F90	(revision 8076)
@@ -60,5 +60,4 @@
             !! OPEN wet point IF..THEN loop
             if (tmask(ji,jj,jk) == 1) then
-
                !!
                if (jmd.eq.1) then
Index: /branches/UKMO/dev_r5518_medusa_chg_trc_bio_medusa/NEMOGCM/NEMO/TOP_SRC/MEDUSA/zooplankton.F90
===================================================================
--- /branches/UKMO/dev_r5518_medusa_chg_trc_bio_medusa/NEMOGCM/NEMO/TOP_SRC/MEDUSA/zooplankton.F90	(revision 8075)
+++ /branches/UKMO/dev_r5518_medusa_chg_trc_bio_medusa/NEMOGCM/NEMO/TOP_SRC/MEDUSA/zooplankton.F90	(revision 8076)
@@ -298,5 +298,4 @@
                                   fmeexcr(ji,jj) + ((1.0 - xbetan) *        &
                                                     finme(ji,jj)) )
-
             ENDIF
          ENDDO
