Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/nemogcm.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/nemogcm.F90	(revision 2629)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/nemogcm.F90	(revision 2630)
@@ -36,7 +36,6 @@
    !!   nemo_closefile : close remaining open files
    !!   nemo_alloc     : dynamical allocation
-   !!   nemo_partition : ???
-   !!   nemo_partition : ???
-   !!   factorise      : ???
+   !!   nemo_partition : calculate MPP domain decomposition
+   !!   factorise      : calculate the factors of the no. of MPI processes
    !!----------------------------------------------------------------------
    USE step_oce        ! module used in the ocean time stepping module
@@ -471,5 +470,4 @@
      USE trc_oce,      ONLY: trc_oce_alloc
 
-     
 #if defined key_obc
      USE obcdta ,      ONLY: obc_dta_alloc
@@ -477,5 +475,5 @@
 #endif
 
-      USE wrk_nemo,     ONLY: wrk_alloc
+      USE wrk_nemo,    ONLY: wrk_alloc
 
       INTEGER :: ierr
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/TOP_SRC/C14b/trcsms_c14b.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/TOP_SRC/C14b/trcsms_c14b.F90	(revision 2629)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/TOP_SRC/C14b/trcsms_c14b.F90	(revision 2630)
@@ -4,7 +4,8 @@
    !! TOP : Bomb C14 main module
    !!======================================================================
-   !! History     -   ! 1994-05 ( J. Orr ) origial code
+   !! History     -   ! 1994-05 ( J. Orr ) original code
    !!            1.0  ! 2006-02 ( J.M. Molines )  Free form + modularity
    !!            2.0  ! 2008-12 ( C. Ethe ) reorganisation
+   !!            4.0  ! 2011-02 ( A.R. Porter, STFC Daresbury ) Dynamic memory
    !!----------------------------------------------------------------------
 #if defined key_c14b
@@ -25,5 +26,6 @@
 
    !! * Routine accessibility
-   PUBLIC   trc_sms_c14b       ! called in ???    
+   PUBLIC   trc_sms_c14b       ! called in trcsms.F90
+   PUBLIC   trc_sms_c14b_alloc ! called in nemogcm.F90
 
    !! * Module variables
@@ -37,10 +39,10 @@
    INTEGER , PUBLIC    ::   nyear_beg        ! initial year (aa) 
 
-   REAL(wp), PUBLIC, DIMENSION(jpmaxrec,jpzon) ::  bomb   !: C14 atm data (3 zones)
-   REAL(wp), PUBLIC, DIMENSION(jpi,jpj ,jpzon) ::  fareaz !: Spatial Interpolation Factors
-   REAL(wp), PUBLIC, DIMENSION(jpmaxrec2)      ::  spco2  !: Atmospheric CO2
+   REAL(wp), PUBLIC,           DIMENSION(jpmaxrec,jpzon)  ::  bomb   !: C14 atm data (3 zones)
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:)  ::  fareaz !: Spatial Interpolation Factors
+   REAL(wp), PUBLIC,                DIMENSION(jpmaxrec2)  ::  spco2  !: Atmospheric CO2
   
-   REAL(wp), PUBLIC, DIMENSION(jpi,jpj)     ::   qtr_c14      !: flux at surface
-   REAL(wp), PUBLIC, DIMENSION(jpi,jpj)     ::   qint_c14     !: cumulative flux
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE,   DIMENSION(:,:)  ::   qtr_c14      !: flux at surface
+   REAL(wp), PUBLIC, ALLOCATABLE, SAVE,   DIMENSION(:,:)  ::   qint_c14     !: cumulative flux
 
    REAL(wp) :: xlambda, xdecay, xaccum       ! C14 decay coef.  
@@ -60,4 +62,20 @@
 
 CONTAINS
+
+  FUNCTION trc_sms_c14b_alloc()
+     !!----------------------------------------------------------------------
+     !!                  ***  ROUTINE trc_sms_c14b_alloc  ***
+     !!----------------------------------------------------------------------
+     INTEGER :: trc_sms_c14b_alloc  ! Return value
+     !!----------------------------------------------------------------------
+
+     ALLOCATE(fareaz(jpi,jpj ,jpzon), &
+              qtr_c14(jpi,jpj)      , &
+              qint_c14(jpi,jpj)     , Stat=trc_sms_c14b_alloc)
+
+     IF (trc_sms_c14b_alloc /= 0) CALL ctl_warn('trc_sms_c14b_alloc : failed to allocate arrays.')
+
+  END FUNCTION trc_sms_c14b_alloc
+
 
   SUBROUTINE trc_sms_c14b( kt )
@@ -96,4 +114,7 @@
      !!
      !!----------------------------------------------------------------------
+     USE wrk_nemo, ONLY: wrk_use, wrk_release
+     USE wrk_nemo, ONLY: zatmbc14 => wrk_2d_1
+     USE wrk_nemo, ONLY:     zw3d => wrk_3d_1
      !! * Arguments
      INTEGER, INTENT( in ) ::   kt    ! ocean time-step index
@@ -110,7 +131,4 @@
        imonth2, in1, in2
          
-     REAL(wp), DIMENSION(jpi,jpj) ::  & 
-       zatmbc14
-
      REAL(wp), DIMENSION(jpzon)   ::  &
        zonbc14              !: time interp atm C14
@@ -126,8 +144,10 @@
        zpv  ,        &      !: piston velocity 
        zdemi, ztra
-#if defined key_diatrc  && defined key_iomput
-      REAL(wp), DIMENSION(jpi,jpj,jpk) :: zw3d
-#endif
       !!----------------------------------------------------------------------
+
+      IF( (.NOT. wrk_use(2, 1)) .OR. (.NOT. wrk_use(3, 1)) )THEN
+         CALL ctl_stop('trc_sms_c14b : requested workspace arrays unavailable.')
+         RETURN
+      END IF
 
       IF( kt == nit000 )  THEN
@@ -311,4 +331,8 @@
       END IF
 
+      IF( (.NOT. wrk_release(2, 1)) .OR. (.NOT. wrk_release(3, 1)) )THEN
+         CALL ctl_stop('trc_sms_c14b : failed to release workspace arrays.')
+      END IF
+
     END SUBROUTINE trc_sms_c14b
 
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/TOP_SRC/trcini.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/TOP_SRC/trcini.F90	(revision 2629)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/TOP_SRC/trcini.F90	(revision 2630)
@@ -204,4 +204,7 @@
      USE trcsms_cfc     , ONLY:   trc_sms_cfc_alloc
 #endif
+#if defined key_c14b
+     USE trcsms_c14b    , ONLY:   trc_sms_c14b_alloc
+#endif
 #if defined key_lobster
       USE sms_lobster   , ONLY:   sms_lobster_alloc      ! LOBSTER-related alloc routines...
@@ -228,4 +231,10 @@
       ierr = ierr + trd_mld_trc_alloc()
 #endif
+#if defined key_cfc
+      ierr = ierr + trc_sms_cfc_alloc()
+#endif
+#if defined key_c14b
+      ierr = ierr + trc_sms_c14b_alloc()
+#endif
       !
 #if defined key_lobster
