Index: NEMO/trunk/src/TOP/PISCES/P2Z/p2zbio.F90
===================================================================
--- NEMO/trunk/src/TOP/PISCES/P2Z/p2zbio.F90	(revision 10416)
+++ NEMO/trunk/src/TOP/PISCES/P2Z/p2zbio.F90	(revision 10425)
@@ -341,6 +341,6 @@
       !
       IF( lk_iomput ) THEN
-         CALL lbc_lnk( zw2d(:,:,:),'T', 1. )
-         CALL lbc_lnk_multi( zw3d(:,:,:,1),'T', 1., zw3d(:,:,:,2),'T', 1., zw3d(:,:,:,3),'T', 1. )
+         CALL lbc_lnk( 'p2zbio', zw2d(:,:,:),'T', 1. )
+         CALL lbc_lnk_multi( 'p2zbio', zw3d(:,:,:,1),'T', 1., zw3d(:,:,:,2),'T', 1., zw3d(:,:,:,3),'T', 1. )
          ! Save diagnostics
          CALL iom_put( "TNO3PHY", zw2d(:,:,1) )
Index: NEMO/trunk/src/TOP/PISCES/P2Z/p2zexp.F90
===================================================================
--- NEMO/trunk/src/TOP/PISCES/P2Z/p2zexp.F90	(revision 10416)
+++ NEMO/trunk/src/TOP/PISCES/P2Z/p2zexp.F90	(revision 10425)
@@ -113,5 +113,5 @@
       END DO
 
-      CALL lbc_lnk( sedpocn, 'T', 1. )
+      CALL lbc_lnk( 'p2zexp', sedpocn, 'T', 1. )
  
       ! Oa & Ek: diagnostics depending on jpdia2d !          left as example
@@ -229,6 +229,6 @@
          END DO
       END DO
-      CALL lbc_lnk( cmask , 'T', 1. )      ! lateral boundary conditions on cmask   (sign unchanged)
-      areacot = glob_sum( e1e2t(:,:) * cmask(:,:) )
+      CALL lbc_lnk( 'p2zexp', cmask , 'T', 1. )      ! lateral boundary conditions on cmask   (sign unchanged)
+      areacot = glob_sum( 'p2zexp', e1e2t(:,:) * cmask(:,:) )
       !
       IF( ln_rsttr ) THEN
@@ -248,5 +248,5 @@
       ALLOCATE( cmask(jpi,jpj) , dminl(jpi,jpj) , dmin3(jpi,jpj,jpk), &
          &      sedpocb(jpi,jpj) , sedpocn(jpi,jpj),   STAT=p2z_exp_alloc )
-      IF( p2z_exp_alloc /= 0 ) CALL ctl_warn('p2z_exp_alloc : failed to allocate arrays.')
+      IF( p2z_exp_alloc /= 0 ) CALL ctl_stop( 'STOP', 'p2z_exp_alloc : failed to allocate arrays.' )
       !
    END FUNCTION p2z_exp_alloc
Index: NEMO/trunk/src/TOP/PISCES/P4Z/p4zche.F90
===================================================================
--- NEMO/trunk/src/TOP/PISCES/P4Z/p4zche.F90	(revision 10416)
+++ NEMO/trunk/src/TOP/PISCES/P4Z/p4zche.F90	(revision 10425)
@@ -823,5 +823,5 @@
       p4z_che_alloc = MAXVAL( ierr )
       !
-      IF( p4z_che_alloc /= 0 )   CALL ctl_warn('p4z_che_alloc : failed to allocate arrays.')
+      IF( p4z_che_alloc /= 0 )   CALL ctl_stop( 'STOP', 'p4z_che_alloc : failed to allocate arrays.' )
       !
    END FUNCTION p4z_che_alloc
Index: NEMO/trunk/src/TOP/PISCES/P4Z/p4zflx.F90
===================================================================
--- NEMO/trunk/src/TOP/PISCES/P4Z/p4zflx.F90	(revision 10416)
+++ NEMO/trunk/src/TOP/PISCES/P4Z/p4zflx.F90	(revision 10425)
@@ -172,7 +172,9 @@
       END DO
 
-      t_oce_co2_flx     = glob_sum( oce_co2(:,:) )                    !  Total Flux of Carbon
+      IF( iom_use("tcflx") .OR. iom_use("tcflxcum") .OR. kt == nitrst   &
+         &                 .OR. (ln_check_mass .AND. kt == nitend) )    &
+         t_oce_co2_flx  = glob_sum( 'p4zflx', oce_co2(:,:) )                    !  Total Flux of Carbon
       t_oce_co2_flx_cum = t_oce_co2_flx_cum + t_oce_co2_flx       !  Cumulative Total Flux of Carbon
-!      t_atm_co2_flx     = glob_sum( satmco2(:,:) * e1e2t(:,:) )       ! Total atmospheric pCO2
+!      t_atm_co2_flx     = glob_sum( 'p4zflx', satmco2(:,:) * e1e2t(:,:) )       ! Total atmospheric pCO2
       t_atm_co2_flx     =  atcco2      ! Total atmospheric pCO2
  
@@ -205,6 +207,6 @@
            CALL iom_put( "Dpo2"  , zw2d )
          ENDIF
-         IF( iom_use( "tcflx" ) )  CALL iom_put( "tcflx"    , t_oce_co2_flx * rfact2r )   ! molC/s
-         CALL iom_put( "tcflxcum" , t_oce_co2_flx_cum )      ! molC
+         CALL iom_put( "tcflx"    , t_oce_co2_flx * rfact2r )   ! molC/s
+         CALL iom_put( "tcflxcum" , t_oce_co2_flx_cum       )   ! molC
          !
          DEALLOCATE( zw2d )
@@ -376,5 +378,5 @@
       ALLOCATE( satmco2(jpi,jpj), patm(jpi,jpj), STAT=p4z_flx_alloc )
       !
-      IF( p4z_flx_alloc /= 0 )   CALL ctl_warn('p4z_flx_alloc : failed to allocate arrays')
+      IF( p4z_flx_alloc /= 0 )   CALL ctl_stop( 'STOP', 'p4z_flx_alloc : failed to allocate arrays' )
       !
    END FUNCTION p4z_flx_alloc
Index: NEMO/trunk/src/TOP/PISCES/P4Z/p4zlim.F90
===================================================================
--- NEMO/trunk/src/TOP/PISCES/P4Z/p4zlim.F90	(revision 10416)
+++ NEMO/trunk/src/TOP/PISCES/P4Z/p4zlim.F90	(revision 10425)
@@ -293,5 +293,5 @@
       !!                     ***  ROUTINE p5z_lim_alloc  ***
       !!----------------------------------------------------------------------
-      USE lib_mpp , ONLY: ctl_warn
+      USE lib_mpp , ONLY: ctl_stop
       !!----------------------------------------------------------------------
 
@@ -306,5 +306,5 @@
          &      xlimsi  (jpi,jpj,jpk), STAT=p4z_lim_alloc )
       !
-      IF( p4z_lim_alloc /= 0 ) CALL ctl_warn('p4z_lim_alloc : failed to allocate arrays.')
+      IF( p4z_lim_alloc /= 0 ) CALL ctl_stop( 'STOP', 'p4z_lim_alloc : failed to allocate arrays.' )
       !
    END FUNCTION p4z_lim_alloc
Index: NEMO/trunk/src/TOP/PISCES/P4Z/p4zopt.F90
===================================================================
--- NEMO/trunk/src/TOP/PISCES/P4Z/p4zopt.F90	(revision 10416)
+++ NEMO/trunk/src/TOP/PISCES/P4Z/p4zopt.F90	(revision 10425)
@@ -463,5 +463,5 @@
                 ekg(jpi,jpj,jpk), STAT= p4z_opt_alloc  ) 
       !
-      IF( p4z_opt_alloc /= 0 ) CALL ctl_warn('p4z_opt_alloc : failed to allocate arrays.')
+      IF( p4z_opt_alloc /= 0 ) CALL ctl_stop( 'STOP', 'p4z_opt_alloc : failed to allocate arrays.' )
       !
    END FUNCTION p4z_opt_alloc
Index: NEMO/trunk/src/TOP/PISCES/P4Z/p4zprod.F90
===================================================================
--- NEMO/trunk/src/TOP/PISCES/P4Z/p4zprod.F90	(revision 10416)
+++ NEMO/trunk/src/TOP/PISCES/P4Z/p4zprod.F90	(revision 10425)
@@ -340,5 +340,5 @@
     ! Total primary production per year
     IF( iom_use( "tintpp" ) .OR. ( ln_check_mass .AND. kt == nitend .AND. knt == nrdttrc )  )  &
-         & tpp = glob_sum( ( zprorcan(:,:,:) + zprorcad(:,:,:) ) * cvol(:,:,:) )
+         & tpp = glob_sum( 'p4zprod', ( zprorcan(:,:,:) + zprorcad(:,:,:) ) * cvol(:,:,:) )
 
     IF( lk_iomput ) THEN
@@ -529,5 +529,5 @@
       ALLOCATE( quotan(jpi,jpj,jpk), quotad(jpi,jpj,jpk), STAT = p4z_prod_alloc )
       !
-      IF( p4z_prod_alloc /= 0 ) CALL ctl_warn('p4z_prod_alloc : failed to allocate arrays.')
+      IF( p4z_prod_alloc /= 0 ) CALL ctl_stop( 'STOP', 'p4z_prod_alloc : failed to allocate arrays.' )
       !
    END FUNCTION p4z_prod_alloc
Index: NEMO/trunk/src/TOP/PISCES/P4Z/p4zrem.F90
===================================================================
--- NEMO/trunk/src/TOP/PISCES/P4Z/p4zrem.F90	(revision 10416)
+++ NEMO/trunk/src/TOP/PISCES/P4Z/p4zrem.F90	(revision 10425)
@@ -363,5 +363,5 @@
       ALLOCATE( denitr(jpi,jpj,jpk), STAT=p4z_rem_alloc )
       !
-      IF( p4z_rem_alloc /= 0 )   CALL ctl_warn('p4z_rem_alloc: failed to allocate arrays')
+      IF( p4z_rem_alloc /= 0 )   CALL ctl_stop( 'STOP', 'p4z_rem_alloc: failed to allocate arrays' )
       !
    END FUNCTION p4z_rem_alloc
Index: NEMO/trunk/src/TOP/PISCES/P4Z/p4zsbc.F90
===================================================================
--- NEMO/trunk/src/TOP/PISCES/P4Z/p4zsbc.F90	(revision 10416)
+++ NEMO/trunk/src/TOP/PISCES/P4Z/p4zsbc.F90	(revision 10425)
@@ -368,5 +368,5 @@
                ztimes_riv = 1._wp / REAL(ntimes_riv, wp) 
                DO jm = 1, ntimes_riv
-                  rivinput(ifpr) = rivinput(ifpr) + glob_sum( zriver(:,:,jm) * tmask(:,:,1) * ztimes_riv ) 
+                  rivinput(ifpr) = rivinput(ifpr) + glob_sum( 'p4zsbc', zriver(:,:,jm) * tmask(:,:,1) * ztimes_riv ) 
                END DO
                DEALLOCATE( zriver)
@@ -449,5 +449,5 @@
          END DO
          !
-         CALL lbc_lnk( zcmask , 'T', 1. )      ! lateral boundary conditions on cmask   (sign unchanged)
+         CALL lbc_lnk( 'p4zsbc', zcmask , 'T', 1. )      ! lateral boundary conditions on cmask   (sign unchanged)
          !
          DO jk = 1, jpk
Index: NEMO/trunk/src/TOP/PISCES/P4Z/p4zsed.F90
===================================================================
--- NEMO/trunk/src/TOP/PISCES/P4Z/p4zsed.F90	(revision 10416)
+++ NEMO/trunk/src/TOP/PISCES/P4Z/p4zsed.F90	(revision 10425)
@@ -504,5 +504,5 @@
       ALLOCATE( nitrpot(jpi,jpj,jpk), sdenit(jpi,jpj), STAT=p4z_sed_alloc )
       !
-      IF( p4z_sed_alloc /= 0 )   CALL ctl_warn('p4z_sed_alloc: failed to allocate arrays')
+      IF( p4z_sed_alloc /= 0 )   CALL ctl_stop( 'STOP', 'p4z_sed_alloc: failed to allocate arrays' )
       !
    END FUNCTION p4z_sed_alloc
Index: NEMO/trunk/src/TOP/PISCES/P4Z/p4zsink.F90
===================================================================
--- NEMO/trunk/src/TOP/PISCES/P4Z/p4zsink.F90	(revision 10416)
+++ NEMO/trunk/src/TOP/PISCES/P4Z/p4zsink.F90	(revision 10425)
@@ -127,5 +127,5 @@
      ! Total carbon export per year
      IF( iom_use( "tcexp" ) .OR. ( ln_check_mass .AND. kt == nitend .AND. knt == nrdttrc )  )  &
-        &   t_oce_co2_exp = glob_sum( ( sinking(:,:,ik100) + sinking2(:,:,ik100) ) * e1e2t(:,:) * tmask(:,:,1) )
+        &   t_oce_co2_exp = glob_sum( 'p4zsink', ( sinking(:,:,ik100) + sinking2(:,:,ik100) ) * e1e2t(:,:) * tmask(:,:,1) )
      !
      IF( lk_iomput ) THEN
@@ -220,5 +220,5 @@
       !
       p4z_sink_alloc = MAXVAL( ierr )
-      IF( p4z_sink_alloc /= 0 ) CALL ctl_warn('p4z_sink_alloc : failed to allocate arrays.')
+      IF( p4z_sink_alloc /= 0 ) CALL ctl_stop( 'STOP', 'p4z_sink_alloc : failed to allocate arrays.' )
       !
    END FUNCTION p4z_sink_alloc
Index: NEMO/trunk/src/TOP/PISCES/P4Z/p4zsms.F90
===================================================================
--- NEMO/trunk/src/TOP/PISCES/P4Z/p4zsms.F90	(revision 10416)
+++ NEMO/trunk/src/TOP/PISCES/P4Z/p4zsms.F90	(revision 10425)
@@ -361,10 +361,10 @@
             !                                                ! --------------------------- !
             ! set total alkalinity, phosphate, nitrate & silicate
-            zarea          = 1._wp / glob_sum( cvol(:,:,:) ) * 1e6              
-
-            zalksumn = glob_sum( trn(:,:,:,jptal) * cvol(:,:,:)  ) * zarea
-            zpo4sumn = glob_sum( trn(:,:,:,jppo4) * cvol(:,:,:)  ) * zarea * po4r
-            zno3sumn = glob_sum( trn(:,:,:,jpno3) * cvol(:,:,:)  ) * zarea * rno3
-            zsilsumn = glob_sum( trn(:,:,:,jpsil) * cvol(:,:,:)  ) * zarea
+            zarea          = 1._wp / glob_sum( 'p4zsms', cvol(:,:,:) ) * 1e6              
+
+            zalksumn = glob_sum( 'p4zsms', trn(:,:,:,jptal) * cvol(:,:,:)  ) * zarea
+            zpo4sumn = glob_sum( 'p4zsms', trn(:,:,:,jppo4) * cvol(:,:,:)  ) * zarea * po4r
+            zno3sumn = glob_sum( 'p4zsms', trn(:,:,:,jpno3) * cvol(:,:,:)  ) * zarea * rno3
+            zsilsumn = glob_sum( 'p4zsms', trn(:,:,:,jpsil) * cvol(:,:,:)  ) * zarea
  
             IF(lwp) WRITE(numout,*) '       TALKN mean : ', zalksumn
@@ -382,8 +382,8 @@
             !
             IF( .NOT. ln_top_euler ) THEN
-               zalksumb = glob_sum( trb(:,:,:,jptal) * cvol(:,:,:)  ) * zarea
-               zpo4sumb = glob_sum( trb(:,:,:,jppo4) * cvol(:,:,:)  ) * zarea * po4r
-               zno3sumb = glob_sum( trb(:,:,:,jpno3) * cvol(:,:,:)  ) * zarea * rno3
-               zsilsumb = glob_sum( trb(:,:,:,jpsil) * cvol(:,:,:)  ) * zarea
+               zalksumb = glob_sum( 'p4zsms', trb(:,:,:,jptal) * cvol(:,:,:)  ) * zarea
+               zpo4sumb = glob_sum( 'p4zsms', trb(:,:,:,jppo4) * cvol(:,:,:)  ) * zarea * po4r
+               zno3sumb = glob_sum( 'p4zsms', trb(:,:,:,jpno3) * cvol(:,:,:)  ) * zarea * rno3
+               zsilsumb = glob_sum( 'p4zsms', trb(:,:,:,jpsil) * cvol(:,:,:)  ) * zarea
  
                IF(lwp) WRITE(numout,*) ' '
@@ -449,5 +449,5 @@
         ENDIF
         !
-        no3budget = glob_sum( zwork(:,:,:) * cvol(:,:,:)  )  
+        no3budget = glob_sum( 'p4zsms', zwork(:,:,:) * cvol(:,:,:)  )  
         no3budget = no3budget / areatot
         CALL iom_put( "pno3tot", no3budget )
@@ -467,5 +467,5 @@
         ENDIF
         !
-        po4budget = glob_sum( zwork(:,:,:) * cvol(:,:,:)  )  
+        po4budget = glob_sum( 'p4zsms', zwork(:,:,:) * cvol(:,:,:)  )  
         po4budget = po4budget / areatot
         CALL iom_put( "ppo4tot", po4budget )
@@ -475,5 +475,5 @@
          zwork(:,:,:) =  trn(:,:,:,jpsil) + trn(:,:,:,jpgsi) + trn(:,:,:,jpdsi) 
          !
-         silbudget = glob_sum( zwork(:,:,:) * cvol(:,:,:)  )  
+         silbudget = glob_sum( 'p4zsms', zwork(:,:,:) * cvol(:,:,:)  )  
          silbudget = silbudget / areatot
          CALL iom_put( "psiltot", silbudget )
@@ -483,5 +483,5 @@
          zwork(:,:,:) =  trn(:,:,:,jpno3) * rno3 + trn(:,:,:,jptal) + trn(:,:,:,jpcal) * 2.              
          !
-         alkbudget = glob_sum( zwork(:,:,:) * cvol(:,:,:)  )         !
+         alkbudget = glob_sum( 'p4zsms', zwork(:,:,:) * cvol(:,:,:)  )         !
          alkbudget = alkbudget / areatot
          CALL iom_put( "palktot", alkbudget )
@@ -493,5 +493,5 @@
             &         + ( trn(:,:,:,jpzoo) + trn(:,:,:,jpmes) )  * ferat3    
          !
-         ferbudget = glob_sum( zwork(:,:,:) * cvol(:,:,:)  )  
+         ferbudget = glob_sum( 'p4zsms', zwork(:,:,:) * cvol(:,:,:)  )  
          ferbudget = ferbudget / areatot
          CALL iom_put( "pfertot", ferbudget )
@@ -502,16 +502,16 @@
       ! --------------------------------------------------------------------------------
       IF( iom_use( "tnfix" ) .OR.  ( ln_check_mass .AND. kt == nitend )  ) THEN
-         znitrpottot  = glob_sum ( nitrpot(:,:,:) * nitrfix * cvol(:,:,:) )
+         znitrpottot  = glob_sum ( 'p4zsms', nitrpot(:,:,:) * nitrfix * cvol(:,:,:) )
          CALL iom_put( "tnfix"  , znitrpottot * xfact3 )  ! Global  nitrogen fixation molC/l  to molN/m3 
       ENDIF
       !
       IF( iom_use( "tdenit" ) .OR.  ( ln_check_mass .AND. kt == nitend )  ) THEN
-         zrdenittot = glob_sum ( denitr(:,:,:) * rdenit * xnegtr(:,:,:) * cvol(:,:,:) )
-         zsdenittot = glob_sum ( sdenit(:,:) * e1e2t(:,:) * tmask(:,:,1) )
+         zrdenittot = glob_sum ( 'p4zsms', denitr(:,:,:) * rdenit * xnegtr(:,:,:) * cvol(:,:,:) )
+         zsdenittot = glob_sum ( 'p4zsms', sdenit(:,:) * e1e2t(:,:) * tmask(:,:,1) )
          CALL iom_put( "tdenit" , ( zrdenittot + zsdenittot ) * xfact3 )  ! Total denitrification molC/l to molN/m3 
       ENDIF
       !
       IF( ln_check_mass .AND. kt == nitend ) THEN   ! Compute the budget of NO3, ALK, Si, Fer
-         t_atm_co2_flx  = t_atm_co2_flx / glob_sum( e1e2t(:,:) )
+         t_atm_co2_flx  = t_atm_co2_flx / glob_sum( 'p4zsms', e1e2t(:,:) )
          t_oce_co2_flx  = t_oce_co2_flx         * xfact1 * (-1 )
          tpp            = tpp           * 1000. * xfact1
Index: NEMO/trunk/src/TOP/PISCES/P4Z/p5zlim.F90
===================================================================
--- NEMO/trunk/src/TOP/PISCES/P4Z/p5zlim.F90	(revision 10416)
+++ NEMO/trunk/src/TOP/PISCES/P4Z/p5zlim.F90	(revision 10425)
@@ -535,5 +535,5 @@
       !!                     ***  ROUTINE p5z_lim_alloc  ***
       !!----------------------------------------------------------------------
-      USE lib_mpp , ONLY: ctl_warn
+      USE lib_mpp , ONLY: ctl_stop
       INTEGER ::   ierr(2)        ! Local variables
       !!----------------------------------------------------------------------
@@ -559,5 +559,5 @@
       p5z_lim_alloc = MAXVAL( ierr )
       !
-      IF( p5z_lim_alloc /= 0 ) CALL ctl_warn('p5z_lim_alloc : failed to allocate arrays.')
+      IF( p5z_lim_alloc /= 0 ) CALL ctl_stop( 'STOP', 'p5z_lim_alloc : failed to allocate arrays.' )
       !
    END FUNCTION p5z_lim_alloc
Index: NEMO/trunk/src/TOP/PISCES/P4Z/p5zprod.F90
===================================================================
--- NEMO/trunk/src/TOP/PISCES/P4Z/p5zprod.F90	(revision 10416)
+++ NEMO/trunk/src/TOP/PISCES/P4Z/p5zprod.F90	(revision 10425)
@@ -462,5 +462,5 @@
     ! Total primary production per year
     IF( iom_use( "tintpp" ) .OR. ( ln_check_mass .AND. kt == nitend .AND. knt == nrdttrc )  )  &
-      & tpp = glob_sum( ( zprorcan(:,:,:) + zprorcad(:,:,:) + zprorcap(:,:,:) ) * cvol(:,:,:) )
+      & tpp = glob_sum( 'p5zprod', ( zprorcan(:,:,:) + zprorcad(:,:,:) + zprorcap(:,:,:) ) * cvol(:,:,:) )
 
     IF( lk_iomput ) THEN
@@ -624,5 +624,5 @@
       ALLOCATE( zdaylen(jpi,jpj), STAT = p5z_prod_alloc )
       !
-      IF( p5z_prod_alloc /= 0 ) CALL ctl_warn('p5z_prod_alloc : failed to allocate arrays.')
+      IF( p5z_prod_alloc /= 0 ) CALL ctl_stop( 'STOP', 'p5z_prod_alloc : failed to allocate arrays.' )
       !
    END FUNCTION p5z_prod_alloc
Index: NEMO/trunk/src/TOP/PISCES/SED/sed.F90
===================================================================
--- NEMO/trunk/src/TOP/PISCES/SED/sed.F90	(revision 10416)
+++ NEMO/trunk/src/TOP/PISCES/SED/sed.F90	(revision 10425)
@@ -154,5 +154,5 @@
       !!                    *** ROUTINE sed_alloc ***
       !!-------------------------------------------------------------------
-      USE lib_mpp, ONLY: ctl_warn
+      USE lib_mpp, ONLY: ctl_stop
       !!-------------------------------------------------------------------
       !
@@ -166,5 +166,5 @@
          &      mol_wgt(jpsol),                                           STAT=sed_alloc )
 
-      IF( sed_alloc /= 0 )   CALL ctl_warn('sed_alloc: failed to allocate arrays')
+      IF( sed_alloc /= 0 )   CALL ctl_stop( 'STOP', 'sed_alloc: failed to allocate arrays' )
       !
    END FUNCTION sed_alloc
Index: NEMO/trunk/src/TOP/PISCES/SED/sed_oce.F90
===================================================================
--- NEMO/trunk/src/TOP/PISCES/SED/sed_oce.F90	(revision 10416)
+++ NEMO/trunk/src/TOP/PISCES/SED/sed_oce.F90	(revision 10425)
@@ -25,10 +25,10 @@
       !!                    *** ROUTINE sed_alloc ***
       !!-------------------------------------------------------------------
-      USE lib_mpp, ONLY: ctl_warn
+      USE lib_mpp, ONLY: ctl_stop
       !!-------------------------------------------------------------------
       !
       ALLOCATE( profsed(jpksed) , profsedw(jpksed) , STAT=sed_oce_alloc )
 
-      IF( sed_oce_alloc /= 0 )   CALL ctl_warn('sed_oce_alloc: failed to allocate arrays')
+      IF( sed_oce_alloc /= 0 )   CALL ctl_stop( 'STOP', 'sed_oce_alloc: failed to allocate arrays' )
       !
    END FUNCTION sed_oce_alloc
Index: NEMO/trunk/src/TOP/PISCES/SED/sedadv.F90
===================================================================
--- NEMO/trunk/src/TOP/PISCES/SED/sedadv.F90	(revision 10416)
+++ NEMO/trunk/src/TOP/PISCES/SED/sedadv.F90	(revision 10425)
@@ -436,5 +436,5 @@
       &         ckpor(jpksed) ,           STAT = sed_adv_alloc )
       !
-      IF( sed_adv_alloc /= 0 ) CALL ctl_warn('sed_adv_alloc : failed to allocate arrays.')
+      IF( sed_adv_alloc /= 0 ) CALL ctl_stop( 'STOP', 'sed_adv_alloc : failed to allocate arrays.' )
       !
    END FUNCTION sed_adv_alloc
Index: NEMO/trunk/src/TOP/PISCES/SED/sedrst.F90
===================================================================
--- NEMO/trunk/src/TOP/PISCES/SED/sedrst.F90	(revision 10416)
+++ NEMO/trunk/src/TOP/PISCES/SED/sedrst.F90	(revision 10425)
@@ -78,5 +78,5 @@
          IF(lwp) WRITE(numsed,*) &
              '             open sed restart.output NetCDF file: ',TRIM(clpath)//clname
-         CALL iom_open( TRIM(clpath)//TRIM(clname), numrsw, ldwrt = .TRUE., kiolib = jprstlib, kdlev = jpksed )
+         CALL iom_open( TRIM(clpath)//TRIM(clname), numrsw, ldwrt = .TRUE., kdlev = jpksed )
          lrst_sed = .TRUE.
       ENDIF
@@ -105,5 +105,4 @@
       CHARACTER(len = 20) ::   cltra
       CHARACTER(LEN=20)   ::   name1
-      INTEGER             ::   jlibalt = jprstlib
       LOGICAL             ::   llok
       !--------------------------------------------------------------------
@@ -338,5 +337,4 @@
       CHARACTER(len=*), INTENT(in) ::   cdrw       ! "READ"/"WRITE" flag
       !
-      INTEGER  ::  jlibalt = jprstlib
       LOGICAL  ::  llok
       REAL(wp) ::  zkt, zrdttrc1
@@ -353,5 +351,5 @@
 
          IF( ln_rst_sed ) THEN
-            CALL iom_open( TRIM(cn_sedrst_indir)//'/'//cn_sedrst_in, numrsr, kiolib = jlibalt )
+            CALL iom_open( TRIM(cn_sedrst_indir)//'/'//cn_sedrst_in, numrsr )
             CALL iom_get ( numrsr, 'kt', zkt )   ! last time-step of previous run
 
Index: NEMO/trunk/src/TOP/PISCES/sms_pisces.F90
===================================================================
--- NEMO/trunk/src/TOP/PISCES/sms_pisces.F90	(revision 10416)
+++ NEMO/trunk/src/TOP/PISCES/sms_pisces.F90	(revision 10425)
@@ -131,5 +131,5 @@
       !!        *** ROUTINE sms_pisces_alloc ***
       !!----------------------------------------------------------------------
-      USE lib_mpp , ONLY: ctl_warn
+      USE lib_mpp , ONLY: ctl_stop
       INTEGER ::   ierr(10)        ! Local variables
       !!----------------------------------------------------------------------
@@ -186,5 +186,5 @@
       sms_pisces_alloc = MAXVAL( ierr )
       !
-      IF( sms_pisces_alloc /= 0 )   CALL ctl_warn('sms_pisces_alloc: failed to allocate arrays') 
+      IF( sms_pisces_alloc /= 0 )   CALL ctl_stop( 'STOP', 'sms_pisces_alloc: failed to allocate arrays' ) 
       !
    END FUNCTION sms_pisces_alloc
Index: NEMO/trunk/src/TOP/PISCES/trcini_pisces.F90
===================================================================
--- NEMO/trunk/src/TOP/PISCES/trcini_pisces.F90	(revision 10416)
+++ NEMO/trunk/src/TOP/PISCES/trcini_pisces.F90	(revision 10425)
@@ -118,5 +118,5 @@
       ierr = ierr +  p4z_rem_alloc()
       !
-      IF( lk_mpp    )   CALL mpp_sum( ierr )
+      CALL mpp_sum( 'trcini_pisces', ierr )
       IF( ierr /= 0 )   CALL ctl_stop( 'STOP', 'pisces_alloc: unable to allocate PISCES arrays' )
       !
@@ -311,5 +311,5 @@
       ierr = ierr + p2z_exp_alloc()
       !
-      IF( lk_mpp    )   CALL mpp_sum( ierr )
+      CALL mpp_sum( 'trcini_pisces', ierr )
       IF( ierr /= 0 )   CALL ctl_stop( 'STOP', 'p2z_ini: unable to allocate LOBSTER arrays' )
 
