Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_ts.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_ts.F90	(revision 2626)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_ts.F90	(revision 2627)
@@ -47,5 +47,5 @@
    PUBLIC dyn_spg_ts        ! routine called by step.F90
    PUBLIC ts_rst            ! routine called by istate.F90
-   PUBLIC dyn_spg_ts_alloc  ! routine called by nemogcm.F90
+   PUBLIC dyn_spg_ts_alloc  ! routine called by dynspg.F90
 
 
@@ -144,7 +144,4 @@
          IF(lwp) WRITE(numout,*) ' Number of sub cycle in 1 time-step (2 rdt) : icycle = ',  2*nn_baro
          !
-         !                                      ! allocate dyn_spg_ts arrays
-         IF( dyn_spg_ts_alloc() /= 0 )   CALL ctl_stop('STOP', 'dyn_spg_ts_alloc: failed to allocate arrays')
-         !
          CALL ts_rst( nit000, 'READ' )   ! read or initialize the following fields: un_b, vn_b  
          !
@@ -667,9 +664,12 @@
    !!----------------------------------------------------------------------
 CONTAINS
-   SUBROUTINE dyn_spg_ts( kt )       ! Empty routine
+   INTEGER FUNCTION dyn_spg_ts_alloc()    ! Dummy function
+      dyn_spg_ts_alloc = 0
+   END FUNCTION dyn_spg_ts_alloc
+   SUBROUTINE dyn_spg_ts( kt )            ! Empty routine
       INTEGER, INTENT(in) :: kt
       WRITE(*,*) 'dyn_spg_ts: You should not have seen this print! error?', kt
    END SUBROUTINE dyn_spg_ts
-   SUBROUTINE ts_rst( kt, cdrw )     ! Empty routine
+   SUBROUTINE ts_rst( kt, cdrw )          ! Empty routine
       INTEGER         , INTENT(in) ::   kt         ! ocean time-step
       CHARACTER(len=*), INTENT(in) ::   cdrw       ! "READ"/"WRITE" flag
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/LBC/lib_mpp.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/LBC/lib_mpp.F90	(revision 2626)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/LBC/lib_mpp.F90	(revision 2627)
@@ -2009,5 +2009,5 @@
 
 
-   SUBROUTINE mpp_ini_znl ( kumout )
+   SUBROUTINE mpp_ini_znl( kumout )
       !!----------------------------------------------------------------------
       !!               ***  routine mpp_ini_znl  ***
@@ -2494,11 +2494,13 @@
 CONTAINS
 
-   INTEGER FUNCTION lib_mpp_alloc()          ! Dummy function
+   INTEGER FUNCTION lib_mpp_alloc(kumout)          ! Dummy function
+      INTEGER, INTENT(in) ::   kumout
       lib_mpp_alloc = 0
    END FUNCTION lib_mpp_alloc
 
-   FUNCTION mynode( ldtxt, localComm ) RESULT (function_value)
-      CHARACTER(len=*),DIMENSION(:), INTENT(  out) ::   ldtxt 
+   FUNCTION mynode( ldtxt, kumnam, kstop, localComm ) RESULT (function_value)
       INTEGER, OPTIONAL            , INTENT(in   ) ::   localComm
+      CHARACTER(len=*),DIMENSION(:) ::   ldtxt 
+      INTEGER ::   kumnam, kstop
       IF( PRESENT( localComm ) .OR. .NOT.PRESENT( localComm ) )   function_value = 0
       IF( .FALSE. )   ldtxt(:) = 'never done'
@@ -2593,26 +2595,26 @@
    END SUBROUTINE mppmin_int
 
-   SUBROUTINE mppobc_1d( parr, kd1, kd2, kl, kk, ktype, kij )
-      INTEGER  ::   kd1, kd2, kl , kk, ktype, kij
+   SUBROUTINE mppobc_1d( parr, kd1, kd2, kl, kk, ktype, kij, knum )
+      INTEGER  ::   kd1, kd2, kl , kk, ktype, kij, knum
       REAL, DIMENSION(:) ::   parr           ! variable array
-      WRITE(*,*) 'mppobc: You should not have seen this print! error?', parr(1), kd1, kd2, kl, kk, ktype, kij
+      WRITE(*,*) 'mppobc: You should not have seen this print! error?', parr(1), kd1, kd2, kl, kk, ktype, kij, knum
    END SUBROUTINE mppobc_1d
 
-   SUBROUTINE mppobc_2d( parr, kd1, kd2, kl, kk, ktype, kij )
-      INTEGER  ::   kd1, kd2, kl , kk, ktype, kij
+   SUBROUTINE mppobc_2d( parr, kd1, kd2, kl, kk, ktype, kij, knum )
+      INTEGER  ::   kd1, kd2, kl , kk, ktype, kij, knum
       REAL, DIMENSION(:,:) ::   parr           ! variable array
-      WRITE(*,*) 'mppobc: You should not have seen this print! error?', parr(1,1), kd1, kd2, kl, kk, ktype, kij
+      WRITE(*,*) 'mppobc: You should not have seen this print! error?', parr(1,1), kd1, kd2, kl, kk, ktype, kij, knum
    END SUBROUTINE mppobc_2d
 
-   SUBROUTINE mppobc_3d( parr, kd1, kd2, kl, kk, ktype, kij )
-      INTEGER  ::   kd1, kd2, kl , kk, ktype, kij
+   SUBROUTINE mppobc_3d( parr, kd1, kd2, kl, kk, ktype, kij, knum )
+      INTEGER  ::   kd1, kd2, kl , kk, ktype, kij, knum
       REAL, DIMENSION(:,:,:) ::   parr           ! variable array
-      WRITE(*,*) 'mppobc: You should not have seen this print! error?', parr(1,1,1), kd1, kd2, kl, kk, ktype, kij
+      WRITE(*,*) 'mppobc: You should not have seen this print! error?', parr(1,1,1), kd1, kd2, kl, kk, ktype, kij, knum
    END SUBROUTINE mppobc_3d
 
-   SUBROUTINE mppobc_4d( parr, kd1, kd2, kl, kk, ktype, kij )
-      INTEGER  ::   kd1, kd2, kl , kk, ktype, kij
+   SUBROUTINE mppobc_4d( parr, kd1, kd2, kl, kk, ktype, kij, knum )
+      INTEGER  ::   kd1, kd2, kl , kk, ktype, kij, knum
       REAL, DIMENSION(:,:,:,:) ::   parr           ! variable array
-      WRITE(*,*) 'mppobc: You should not have seen this print! error?', parr(1,1,1,1), kd1, kd2, kl, kk, ktype, kij
+      WRITE(*,*) 'mppobc: You should not have seen this print! error?', parr(1,1,1,1), kd1, kd2, kl, kk, ktype, kij, knum
    END SUBROUTINE mppobc_4d
 
@@ -2649,11 +2651,12 @@
    END SUBROUTINE mppstop
 
-   SUBROUTINE mpp_ini_ice( kcom )
-      INTEGER :: kcom
-      WRITE(*,*) 'mpp_ini_ice: You should not have seen this print! error?', kcom
+   SUBROUTINE mpp_ini_ice( kcom, knum )
+      INTEGER :: kcom, knum
+      WRITE(*,*) 'mpp_ini_ice: You should not have seen this print! error?', kcom, knum
    END SUBROUTINE mpp_ini_ice
 
-   SUBROUTINE mpp_ini_znl
-      WRITE(*,*) 'mpp_ini_znl: You should not have seen this print! error?'
+   SUBROUTINE mpp_ini_znl( knum )
+      INTEGER :: knum
+      WRITE(*,*) 'mpp_ini_znl: You should not have seen this print! error?', knum
    END SUBROUTINE mpp_ini_znl
 
Index: /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/OBC/obcdta.F90
===================================================================
--- /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/OBC/obcdta.F90	(revision 2626)
+++ /branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/OBC/obcdta.F90	(revision 2627)
@@ -10,5 +10,4 @@
    !!   obc_dta           : read u, v, t, s data along each open boundary
    !!------------------------------------------------------------------------------
-   !! * Modules used
    USE oce             ! ocean dynamics and tracers 
    USE dom_oce         ! ocean space and time domain
@@ -19,5 +18,5 @@
    USE in_out_manager  ! I/O logical units
    USE lib_mpp         ! distributed memory computing
-   USE dynspg_oce
+   USE dynspg_oce      ! ocean: surface pressure gradient
    USE ioipsl          ! now only for  ymds2ju function 
    USE iom             ! 
@@ -26,13 +25,11 @@
    PRIVATE
 
-   !! * Accessibility
-   PUBLIC obc_dta      ! routines called by step.F90
-   PUBLIC obc_dta_bt   ! routines called by dynspg_ts.F90
-   PUBLIC obc_dta_alloc
+   PUBLIC   obc_dta      ! routines called by step.F90
+   PUBLIC   obc_dta_bt   ! routines called by dynspg_ts.F90
+   PUBLIC   obc_dta_alloc
    
 
-   !! * Shared module variables
-   REAL(wp),  DIMENSION(2)              ::  zjcnes_obc   ! 
-   REAL(wp),  DIMENSION(:), ALLOCATABLE :: ztcobc
+   REAL(wp),  DIMENSION(2)              ::   zjcnes_obc   ! 
+   REAL(wp),  DIMENSION(:), ALLOCATABLE ::   ztcobc
    REAL(wp) :: rdt_obc
    REAL(wp) :: zjcnes
@@ -41,22 +38,20 @@
    INTEGER ::  itobce, itobcw, itobcs, itobcn, itobc_b  ! number of time steps in OBC files
 
-   INTEGER ::   &
-      ntobc      , &     !:  where we are in the obc file
-      ntobc_b    , &     !:  first record used
-      ntobc_a            !:  second record used
-
-   CHARACTER (len=40) :: &    ! name of data files
-      cl_obc_eTS   , cl_obc_eU,  &
-      cl_obc_wTS   , cl_obc_wU,  &
-      cl_obc_nTS   , cl_obc_nV,  &
-      cl_obc_sTS   , cl_obc_sV
+   INTEGER ::   ntobc        ! where we are in the obc file
+   INTEGER ::   ntobc_b      ! first record used
+   INTEGER ::   ntobc_a      ! second record used
+
+   CHARACTER (len=40) ::   cl_obc_eTS, cl_obc_eU   ! name of data files
+   CHARACTER (len=40) ::   cl_obc_wTS, cl_obc_wU   !   -       -
+   CHARACTER (len=40) ::   cl_obc_nTS, cl_obc_nV   !   -       -
+   CHARACTER (len=40) ::   cl_obc_sTS, cl_obc_sV   !   -       -
 
 # if defined key_dynspg_ts
    ! bt arrays for interpolating time dependent data on the boundaries
-   INTEGER :: nt_m=0, ntobc_m
-   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: ubtedta, vbtedta, sshedta       ! East
-   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: ubtwdta, vbtwdta, sshwdta	! West
-   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: ubtndta, vbtndta, sshndta	! North
-   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: ubtsdta, vbtsdta, sshsdta	! South
+   INTEGER ::   nt_m=0, ntobc_m
+   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   :: ubtedta, vbtedta, sshedta       ! East
+   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   :: ubtwdta, vbtwdta, sshwdta	! West
+   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   :: ubtndta, vbtndta, sshndta	! North
+   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   :: ubtsdta, vbtsdta, sshsdta	! South
    ! arrays used for interpolating time dependent data on the boundaries
    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: uedta, vedta, tedta, sedta    ! East
@@ -66,8 +61,8 @@
 # else
    ! bt arrays for interpolating time dependent data on the boundaries
-   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: ubtedta, vbtedta, sshedta        ! East
-   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: ubtwdta, vbtwdta, sshwdta        ! West
-   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: ubtndta, vbtndta, sshndta        ! North
-   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: ubtsdta, vbtsdta, sshsdta        ! South
+   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   :: ubtedta, vbtedta, sshedta        ! East
+   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   :: ubtwdta, vbtwdta, sshwdta        ! West
+   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   :: ubtndta, vbtndta, sshndta        ! North
+   REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   :: ubtsdta, vbtsdta, sshsdta        ! South
    ! arrays used for interpolating time dependent data on the boundaries
    REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: uedta, vedta, tedta, sedta    ! East
@@ -77,8 +72,8 @@
 # endif
    ! Masks set to .TRUE. after successful allocation below
-   LOGICAL, ALLOCATABLE, SAVE, DIMENSION (:,: ) :: ltemsk, luemsk, lvemsk  ! boolean msks
-   LOGICAL, ALLOCATABLE, SAVE, DIMENSION (:,: ) :: ltwmsk, luwmsk, lvwmsk  ! used for outliers
-   LOGICAL, ALLOCATABLE, SAVE, DIMENSION (:,: ) :: ltnmsk, lunmsk, lvnmsk  ! checks
-   LOGICAL, ALLOCATABLE, SAVE, DIMENSION (:,: ) :: ltsmsk, lusmsk, lvsmsk
+   LOGICAL , ALLOCATABLE, SAVE, DIMENSION(:,:)   :: ltemsk, luemsk, lvemsk  ! boolean msks
+   LOGICAL , ALLOCATABLE, SAVE, DIMENSION(:,:)   :: ltwmsk, luwmsk, lvwmsk  ! used for outliers
+   LOGICAL , ALLOCATABLE, SAVE, DIMENSION(:,:)   :: ltnmsk, lunmsk, lvnmsk  ! checks
+   LOGICAL , ALLOCATABLE, SAVE, DIMENSION(:,:)   :: ltsmsk, lusmsk, lvsmsk
 
    !! * Substitutions
@@ -88,7 +83,6 @@
    !! NEMO/OPA 3.3 , NEMO Consortium (2010)
    !! $Id$
-   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt)
+   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
    !!----------------------------------------------------------------------
-
 CONTAINS
 
