Index: /trunk/NEMOGCM/ARCH/arch-X64_MOBILIS.fcm
===================================================================
--- /trunk/NEMOGCM/ARCH/arch-X64_MOBILIS.fcm	(revision 4624)
+++ /trunk/NEMOGCM/ARCH/arch-X64_MOBILIS.fcm	(revision 4624)
@@ -0,0 +1,58 @@
+# Mobilis - ClusterVision X86_64 cluster at NOCS
+#
+# Currently Loaded Modulefiles:
+#   1) gcc/4.8.1                               
+#   2) intel/compiler/64/14.0/2013_sp1.1.106
+#   3) openmpi/intel/64/1.6.5
+#
+# NCDF_HOME   root directory containing lib and include subdirectories for netcdf4
+# HDF5_HOME   root directory containing lib and include subdirectories for HDF5
+# XIOS_HOME   root directory containing lib for XIOS
+# OASIS_HOME  root directory containing lib for OASIS
+#
+# NCDF_INC    netcdf4 include file
+# NCDF_LIB    netcdf4 library
+# XIOS_INC    xios include file    (taken into accound only if key_iomput is activated)
+# XIOS_LIB    xios library         (taken into accound only if key_iomput is activated)
+# OASIS_INC   oasis include file   (taken into accound only if key_oasis3 is activated)
+# OASIS_LIB   oasis library        (taken into accound only if key_oasis3 is activated)
+#
+# FC          Fortran compiler command
+# FCFLAGS     Fortran compiler flags
+# FFLAGS      Fortran 77 compiler flags
+# LD          linker
+# LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries
+# FPPFLAGS    pre-processing flags
+# AR          assembler
+# ARFLAGS     assembler flags
+# MK          make
+# USER_INC    complete list of include files
+# USER_LIB    complete list of libraries to pass to the linker
+#
+# Note that:
+#  - unix variables "$..." are accpeted and will be evaluated before calling fcm.
+#  - fcm variables are starting with a % (and not a $)
+#
+%NCDF_HOME           /home/acc/shared
+%HDF5_HOME           /home/acc/shared
+%XIOS_HOME           /home/acc/XIOS
+%OASIS_HOME          
+
+%NCDF_INC            -I%NCDF_HOME/include 
+%NCDF_LIB            -L%NCDF_HOME/lib -lnetcdf -lnetcdff -lnetcdf -L%HDF5_HOME/lib -lhdf5_hl -lhdf5 -lhdf5 -lcurl
+%XIOS_INC            -I%XIOS_HOME/inc 
+%XIOS_LIB            -L%XIOS_HOME/lib -lxios
+%OASIS_INC           
+%OASIS_LIB           
+
+%FC                  mpif90 -c -cpp
+%FCFLAGS             -i4 -r8 -O3 -fp-model source -xAVX
+%FFLAGS              %FCFLAGS
+%LD                  mpif90
+%LDFLAGS             -lstdc++
+%FPPFLAGS            -P -C -traditional
+%AR                  ar
+%ARFLAGS             rs
+%MK                  gmake
+%USER_INC            %XIOS_INC %OASIS_INC %NCDF_INC
+%USER_LIB            %XIOS_LIB %OASIS_LIB %NCDF_LIB
Index: /trunk/NEMOGCM/ARCH/arch-XC_ARCHER.fcm
===================================================================
--- /trunk/NEMOGCM/ARCH/arch-XC_ARCHER.fcm	(revision 4623)
+++ /trunk/NEMOGCM/ARCH/arch-XC_ARCHER.fcm	(revision 4624)
@@ -31,5 +31,5 @@
 %NCDF_HOME           $NETCDF_DIR
 %HDF5_HOME           $HDF5_DIR
-%XIOS_HOME           /work/n01/n01/acc/XIOS
+%XIOS_HOME           /work/n01/n01/acc/XIOS_r474
 #OASIS_HOME          
 
@@ -44,6 +44,6 @@
 #FCFLAGS             -em -s integer32 -s real64 -O3
 #FFLAGS              -em -s integer32 -s real64 -O3
-%FCFLAGS             -em -s integer32 -O0 -R b -s real64  -e0 -eZ
-%FFLAGS              -em -s integer32 -O0 -R b -s real64  -e0 -eZ
+%FCFLAGS             -em -s integer32 -s real64 -O0 -e0 -eZ
+%FFLAGS              -em -s integer32 -s real64 -O0 -e0 -eZ
 %LD                  CC -Wl,"--allow-multiple-definition"
 %FPPFLAGS            -P -C -traditional
Index: /trunk/NEMOGCM/NEMO/LIM_SRC_2/iceini_2.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/LIM_SRC_2/iceini_2.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/LIM_SRC_2/iceini_2.F90	(revision 4624)
@@ -82,5 +82,5 @@
       CALL ctl_opn( numnam_ice_ref, 'namelist_ice_ref',    'OLD',     'FORMATTED', 'SEQUENTIAL', -1, numout, lwp ) 
       CALL ctl_opn( numnam_ice_cfg, 'namelist_ice_cfg',    'OLD',     'FORMATTED', 'SEQUENTIAL', -1, numout, lwp )
-      CALL ctl_opn( numoni,         'output.namelist.ice', 'UNKNOWN', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, 1 )
+      IF(lwm) CALL ctl_opn( numoni, 'output.namelist.ice', 'UNKNOWN', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, 1 )
 
       !                                ! Open the namelist file 
@@ -134,5 +134,5 @@
       READ  ( numnam_ice_cfg, namicerun, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namicerun in configuration namelist', lwp )
-      WRITE ( numoni, namicerun )
+      IF(lwm) WRITE ( numoni, namicerun )
       !
       IF(lwp) THEN                              ! control print
Index: /trunk/NEMOGCM/NEMO/LIM_SRC_2/limdia_2.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/LIM_SRC_2/limdia_2.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/LIM_SRC_2/limdia_2.F90	(revision 4624)
@@ -188,5 +188,5 @@
        READ  ( numnam_ice_cfg, namicedia, IOSTAT = ios, ERR = 902 )
 902    IF( ios /= 0 ) CALL ctl_nam ( ios , 'namicedia in configuration namelist', lwp )
-       WRITE ( numoni, namicedia )
+       IF(lwm) WRITE ( numoni, namicedia )
        
        IF(lwp) THEN                             ! control print
Index: /trunk/NEMOGCM/NEMO/LIM_SRC_2/limdmp_2.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/LIM_SRC_2/limdmp_2.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/LIM_SRC_2/limdmp_2.F90	(revision 4624)
@@ -118,5 +118,5 @@
       READ  ( numnam_ice_cfg, namice_dmp, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namice_dmp in configuration namelist', lwp )
-      WRITE ( numoni, namice_dmp )
+      IF(lwm) WRITE ( numoni, namice_dmp )
       !
       IF ( lwp ) THEN                     !* control print
Index: /trunk/NEMOGCM/NEMO/LIM_SRC_2/limdyn_2.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/LIM_SRC_2/limdyn_2.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/LIM_SRC_2/limdyn_2.F90	(revision 4624)
@@ -238,5 +238,5 @@
       READ  ( numnam_ice_cfg, namicedyn, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namicedyn in configuration namelist', lwp )
-      WRITE ( numoni, namicedyn )
+      IF(lwm) WRITE ( numoni, namicedyn )
 
       IF(lwp) THEN                                ! Control print
Index: /trunk/NEMOGCM/NEMO/LIM_SRC_2/limistate_2.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/LIM_SRC_2/limistate_2.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/LIM_SRC_2/limistate_2.F90	(revision 4624)
@@ -176,5 +176,5 @@
       READ  ( numnam_ice_cfg, namiceini, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namiceini in configuration namelist', lwp )
-      WRITE ( numoni, namiceini )
+      IF(lwm) WRITE ( numoni, namiceini )
       !
       IF(lwp) THEN
Index: /trunk/NEMOGCM/NEMO/LIM_SRC_2/limthd_2.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/LIM_SRC_2/limthd_2.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/LIM_SRC_2/limthd_2.F90	(revision 4624)
@@ -550,5 +550,5 @@
       READ  ( numnam_ice_cfg, namicethd, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namicethd in configuration namelist', lwp )
-      WRITE ( numoni, namicethd )
+      IF(lwm) WRITE ( numoni, namicethd )
 
       IF( lk_cpl .AND. parsub /= 0.0 )   CALL ctl_stop( 'In coupled mode, use parsub = 0. or send dqla' )
Index: /trunk/NEMOGCM/NEMO/LIM_SRC_2/limtrp_2.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/LIM_SRC_2/limtrp_2.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/LIM_SRC_2/limtrp_2.F90	(revision 4624)
@@ -308,5 +308,5 @@
       READ  ( numnam_ice_cfg, namicetrp, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namicetrp in configuration namelist', lwp )
-      WRITE ( numoni, namicetrp )
+      IF(lwm) WRITE ( numoni, namicetrp )
 
       IF(lwp) THEN
Index: /trunk/NEMOGCM/NEMO/LIM_SRC_2/limwri_2.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/LIM_SRC_2/limwri_2.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/LIM_SRC_2/limwri_2.F90	(revision 4624)
@@ -264,5 +264,5 @@
       READ  ( numnam_ice_cfg, namiceout, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namiceout in configuration namelist', lwp )
-      WRITE ( numoni, namiceout )
+      IF(lwm) WRITE ( numoni, namiceout )
       
       zfield( 1) = field_1
Index: /trunk/NEMOGCM/NEMO/LIM_SRC_3/iceini.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/LIM_SRC_3/iceini.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/LIM_SRC_3/iceini.F90	(revision 4624)
@@ -74,5 +74,5 @@
       CALL ctl_opn( numnam_ice_ref, 'namelist_ice_ref',    'OLD',     'FORMATTED', 'SEQUENTIAL', -1, numout, lwp ) 
       CALL ctl_opn( numnam_ice_cfg, 'namelist_ice_cfg',    'OLD',     'FORMATTED', 'SEQUENTIAL', -1, numout, lwp )
-      CALL ctl_opn( numoni,         'output.namelist.ice', 'UNKNOWN', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, 1 )
+      IF(lwm) CALL ctl_opn( numoni, 'output.namelist.ice', 'UNKNOWN', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, 1 )
       !
       CALL ice_run                     ! set some ice run parameters
@@ -141,5 +141,5 @@
       READ  ( numnam_ice_cfg, namicerun, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namicerun in configuration namelist', lwp )
-      WRITE ( numoni, namicerun )
+      IF(lwm) WRITE ( numoni, namicerun )
       !
       !IF( lk_mpp .AND. ln_nicep ) THEN
Index: /trunk/NEMOGCM/NEMO/LIM_SRC_3/limdyn.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/LIM_SRC_3/limdyn.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/LIM_SRC_3/limdyn.F90	(revision 4624)
@@ -282,5 +282,5 @@
       READ  ( numnam_ice_cfg, namicedyn, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namicedyn in configuration namelist', lwp )
-      WRITE ( numoni, namicedyn )
+      IF(lwm) WRITE ( numoni, namicedyn )
       
       IF(lwp) THEN                        ! control print
Index: /trunk/NEMOGCM/NEMO/LIM_SRC_3/limistate.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/LIM_SRC_3/limistate.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/LIM_SRC_3/limistate.F90	(revision 4624)
@@ -507,5 +507,5 @@
       READ  ( numnam_ice_cfg, namiceini, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namiceini in configuration namelist', lwp )
-      WRITE ( numoni, namiceini )
+      IF(lwm) WRITE ( numoni, namiceini )
 
       ! Define the initial parameters
Index: /trunk/NEMOGCM/NEMO/LIM_SRC_3/limitd_me.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/LIM_SRC_3/limitd_me.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/LIM_SRC_3/limitd_me.F90	(revision 4624)
@@ -1418,5 +1418,5 @@
       READ  ( numnam_ice_cfg, namiceitdme, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namiceitdme in configuration namelist', lwp )
-      WRITE ( numoni, namiceitdme )
+      IF(lwm) WRITE ( numoni, namiceitdme )
       !
       IF (lwp) THEN                          ! control print
Index: /trunk/NEMOGCM/NEMO/LIM_SRC_3/limthd.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/LIM_SRC_3/limthd.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/LIM_SRC_3/limthd.F90	(revision 4624)
@@ -837,5 +837,5 @@
       READ  ( numnam_ice_cfg, namicethd, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namicethd in configuration namelist', lwp )
-      WRITE ( numoni, namicethd )
+      IF(lwm) WRITE ( numoni, namicethd )
       !
       IF(lwp) THEN                          ! control print
Index: /trunk/NEMOGCM/NEMO/LIM_SRC_3/limthd_sal.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/LIM_SRC_3/limthd_sal.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/LIM_SRC_3/limthd_sal.F90	(revision 4624)
@@ -193,5 +193,5 @@
       READ  ( numnam_ice_cfg, namicesal, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namicesal in configuration namelist', lwp )
-      WRITE ( numoni, namicesal )
+      IF(lwm) WRITE ( numoni, namicesal )
       !
       IF(lwp) THEN                           ! control print
Index: /trunk/NEMOGCM/NEMO/LIM_SRC_3/limwri.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/LIM_SRC_3/limwri.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/LIM_SRC_3/limwri.F90	(revision 4624)
@@ -469,5 +469,5 @@
       READ  ( numnam_ice_cfg, namiceout, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namiceout in configuration namelist', lwp )
-      WRITE ( numoni, namiceout )
+      IF(lwm) WRITE ( numoni, namiceout )
 
       zfield(1)  = field_1
Index: /trunk/NEMOGCM/NEMO/NST_SRC/agrif_user.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/NST_SRC/agrif_user.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/NST_SRC/agrif_user.F90	(revision 4624)
@@ -624,5 +624,5 @@
       READ  ( numnam_cfg, namagrif, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namagrif in configuration namelist', lwp )
-      WRITE ( numond, namagrif )
+      IF(lwm) WRITE ( numond, namagrif )
    !
    IF(lwp) THEN                    ! control print
Index: /trunk/NEMOGCM/NEMO/OFF_SRC/domain.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OFF_SRC/domain.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/OFF_SRC/domain.F90	(revision 4624)
@@ -139,5 +139,5 @@
       READ  ( numnam_cfg, namrun, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namrun in configuration namelist', lwp )
-      WRITE ( numond, namrun )
+      IF(lwm) WRITE ( numond, namrun )
       !
       IF(lwp) THEN                  ! control print
@@ -215,5 +215,5 @@
       READ  ( numnam_cfg, namdom, IOSTAT = ios, ERR = 904 )
 904   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namdom in configuration namelist', lwp )
-      WRITE ( numond, namdom )
+      IF(lwm) WRITE ( numond, namdom )
 
       IF(lwp) THEN
@@ -276,5 +276,5 @@
       READ  ( numnam_cfg, namcla, IOSTAT = ios, ERR = 906 )
 906   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namcla in configuration namelist', lwp )
-      WRITE( numond, namcla )
+      IF(lwm) WRITE( numond, namcla )
 
       IF(lwp) THEN
@@ -293,5 +293,5 @@
       READ  ( numnam_cfg, namnc4, IOSTAT = ios, ERR = 908 )
 908   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namnc4 in configuration namelist', lwp )
-      WRITE( numond, namnc4 )
+      IF(lwm) WRITE( numond, namnc4 )
       IF(lwp) THEN                        ! control print
          WRITE(numout,*)
@@ -345,5 +345,5 @@
       READ  ( numnam_cfg, namzgr, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namzgr in configuration namelist', lwp )
-      WRITE ( numond, namzgr )
+      IF(lwm) WRITE ( numond, namzgr )
 
       IF(lwp) THEN                     ! Control print
Index: /trunk/NEMOGCM/NEMO/OFF_SRC/dtadyn.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OFF_SRC/dtadyn.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/OFF_SRC/dtadyn.F90	(revision 4624)
@@ -350,5 +350,5 @@
       READ  ( numnam_cfg, namdta_dyn, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namdta_dyn in configuration namelist', lwp )
-      WRITE ( numond, namdta_dyn )
+      IF(lwm) WRITE ( numond, namdta_dyn )
       !                                         ! store namelist information in an array
       !                                         ! Control print
Index: /trunk/NEMOGCM/NEMO/OFF_SRC/nemogcm.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OFF_SRC/nemogcm.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/OFF_SRC/nemogcm.F90	(revision 4624)
@@ -155,5 +155,4 @@
       CALL ctl_opn( numnam_ref, 'namelist_ref', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. )
       CALL ctl_opn( numnam_cfg, 'namelist_cfg', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. )
-      CALL ctl_opn( numond, 'output.namelist.dyn', 'UNKNOWN', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. , 1 )
       !
       REWIND( numnam_ref )              ! Namelist namctl in reference namelist : Control prints & Benchmark
@@ -164,5 +163,4 @@
       READ  ( numnam_cfg, namctl, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namctl in configuration namelist', .TRUE. )
-      WRITE( numond, namctl )
 
       !
@@ -174,12 +172,13 @@
       READ  ( numnam_cfg, namcfg, IOSTAT = ios, ERR = 904 )
 904   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namcfg in configuration namelist', .TRUE. )   
-      WRITE( numond, namcfg )
 
       !
       !                             !--------------------------------------------!
       !                             !  set communicator & select the local node  !
+      !                             !  NB: mynode also opens output.namelist.dyn !
+      !                             !      on unit number numond on first proc   !
       !                             !--------------------------------------------!
 #if defined key_iomput
-         CALL  xios_initialize( "nemo",return_comm=ilocal_comm )
+      CALL  xios_initialize( "nemo",return_comm=ilocal_comm )
       narea = mynode( cltxt, numnam_ref, numnam_cfg, numond , nstop, ilocal_comm )   ! Nodes selection
 #else
@@ -190,5 +189,14 @@
       narea = narea + 1                       ! mynode return the rank of proc (0 --> jpnij -1 )
 
+      lwm = (narea == 1)                      ! control of output namelists
       lwp = (narea == 1) .OR. ln_ctl          ! control of all listing output print
+
+      IF(lwm) THEN
+         ! write merged namelists from earlier to output namelist now that the
+         ! file has been opened in call to mynode. nammpp has already been
+         ! written in mynode (if lk_mpp_mpi)
+         WRITE( numond, namctl )
+         WRITE( numond, namcfg )
+      ENDIF
 
       ! If dimensions of processor grid weren't specified in the namelist file 
Index: /trunk/NEMOGCM/NEMO/OOO_SRC/nemogcm.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OOO_SRC/nemogcm.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/OOO_SRC/nemogcm.F90	(revision 4624)
@@ -141,5 +141,4 @@
       CALL ctl_opn( numnam_ref, 'namelist_ref', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. )
       CALL ctl_opn( numnam_cfg, 'namelist_cfg', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. )
-      CALL ctl_opn( numond, 'output.namelist.dyn', 'UNKNOWN', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. , 1 )
       !
       REWIND( numnam_ref )              ! Namelist namctl in reference namelist : Control prints & Benchmark
@@ -150,5 +149,4 @@
       READ  ( numnam_cfg, namctl, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namctl in configuration namelist', .TRUE. )
-      WRITE( numond, namctl )
 
       !
@@ -160,8 +158,9 @@
       READ  ( numnam_cfg, namcfg, IOSTAT = ios, ERR = 904 )
 904   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namcfg in configuration namelist', .TRUE. )   
-      WRITE( numond, namcfg )
 
       !                             !--------------------------------------------!
       !                             !  set communicator & select the local node  !
+      !                             !  NB: mynode also opens output.namelist.dyn !
+      !                             !      on unit number numond on first proc   !
       !                             !--------------------------------------------!
 #if defined key_iomput
@@ -174,5 +173,5 @@
 # endif
       ENDIF
-      narea = mynode( cltxt, numnam, nstop, ilocal_comm )   ! Nodes selection
+      narea = mynode( cltxt, numnam_ref, numnam_cfg, numond , nstop, ilocal_comm )   ! Nodes selection
 #else
 # if defined key_oasis3 || defined key_oasis4
@@ -180,13 +179,22 @@
          CALL cpl_prism_init( ilocal_comm )                 ! nemo local communicator given by oasis
       ENDIF
-      narea = mynode( cltxt, numnam, nstop, ilocal_comm )   ! Nodes selection (control print return in cltxt)
+      narea = mynode( cltxt, numnam_ref, numnam_cfg, numond , nstop, ilocal_comm )   ! Nodes selection (control print return in cltxt)
 # else
       ilocal_comm = 0
-      narea = mynode( cltxt, numnam, nstop )                 ! Nodes selection (control print return in cltxt)
+      narea = mynode( cltxt, numnam_ref, numnam_cfg, numond , nstop )                ! Nodes selection (control print return in cltxt)
 # endif
 #endif
       narea = narea + 1                                     ! mynode return the rank of proc (0 --> jpnij -1 )
 
+      lwm = (narea == 1)                                    ! control of output namelists
       lwp = (narea == 1) .OR. ln_ctl                        ! control of all listing output print
+
+      IF(lwm) THEN
+         ! write merged namelists from earlier to output namelist now that the
+         ! file has been opened in call to mynode. nammpp has already been
+         ! written in mynode (if lk_mpp_mpi)
+         WRITE( numond, namctl )
+         WRITE( numond, namcfg )
+      ENDIF
 
       ! If dimensions of processor grid weren't specified in the namelist file
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/ASM/asminc.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/ASM/asminc.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/ASM/asminc.F90	(revision 4624)
@@ -154,5 +154,5 @@
       READ  ( numnam_cfg, nam_asminc, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_asminc in configuration namelist', lwp )
-      WRITE ( numond, nam_asminc )
+      IF(lwm) WRITE ( numond, nam_asminc )
 
       ! Control print
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/BDY/bdydta.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/BDY/bdydta.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/BDY/bdydta.F90	(revision 4624)
@@ -532,5 +532,5 @@
             READ  ( numnam_cfg, nambdy_dta, IOSTAT = ios, ERR = 902 )
 902         IF( ios /= 0 ) CALL ctl_nam ( ios , 'nambdy_dta in configuration namelist', lwp )
-            WRITE ( numond, nambdy_dta )
+            IF(lwm) WRITE ( numond, nambdy_dta )
 
             cn_dir_array(ib_bdy) = cn_dir
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/BDY/bdyini.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/BDY/bdyini.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/BDY/bdyini.F90	(revision 4624)
@@ -132,5 +132,5 @@
       READ  ( numnam_cfg, nambdy, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nambdy in configuration namelist', lwp )
-      WRITE ( numond, nambdy )
+      IF(lwm) WRITE ( numond, nambdy )
 
       ! -----------------------------------------
@@ -418,5 +418,5 @@
             READ  ( numnam_cfg, nambdy_index, IOSTAT = ios, ERR = 904 )
 904         IF( ios /= 0 ) CALL ctl_nam ( ios , 'nambdy_index in configuration namelist', lwp )
-            WRITE ( numond, nambdy_index )
+            IF(lwm) WRITE ( numond, nambdy_index )
 
             SELECT CASE ( TRIM(ctypebdy) )
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/BDY/bdytides.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/BDY/bdytides.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/BDY/bdytides.F90	(revision 4624)
@@ -117,5 +117,5 @@
             READ  ( numnam_cfg, nambdy_tide, IOSTAT = ios, ERR = 902 )
 902         IF( ios /= 0 ) CALL ctl_nam ( ios , 'nambdy_tide in configuration namelist', lwp )
-            WRITE ( numond, nambdy_tide )
+            IF(lwm) WRITE ( numond, nambdy_tide )
             !                                               ! Parameter control and print
             IF(lwp) WRITE(numout,*) '  '
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/C1D/c1d.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/C1D/c1d.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/C1D/c1d.F90	(revision 4624)
@@ -55,5 +55,5 @@
       READ  ( numnam_cfg, namc1d, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namc1d in configuration namelist', lwp )
-      WRITE ( numond, namc1d )
+      IF(lwm) WRITE ( numond, namc1d )
 
       !
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/C1D/dtauvd.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/C1D/dtauvd.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/C1D/dtauvd.F90	(revision 4624)
@@ -73,5 +73,5 @@
       READ  ( numnam_cfg, namc1d_uvd, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namc1d_uvd in configuration namelist', lwp )
-      WRITE ( numond, namc1d_uvd )
+      IF(lwm) WRITE ( numond, namc1d_uvd )
 
       !                             ! force the initialization when dyndmp is used
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/C1D/dyndmp.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/C1D/dyndmp.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/C1D/dyndmp.F90	(revision 4624)
@@ -84,5 +84,5 @@
       READ  ( numnam_cfg, namc1d_dyndmp, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namc1d_dyndmp in configuration namelist', lwp )
-      WRITE ( numond, namc1d_dyndmp )
+      IF(lwm) WRITE ( numond, namc1d_dyndmp )
 
       IF(lwp) THEN                           ! control print
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/CRS/crsini.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/CRS/crsini.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/CRS/crsini.F90	(revision 4624)
@@ -92,5 +92,5 @@
       READ  ( numnam_cfg, namcrs, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namcrs in configuration namelist', lwp )
-      WRITE ( numond, namcrs )
+      IF(lwm) WRITE ( numond, namcrs )
 
      IF(lwp) THEN
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/DIA/diadct.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/DIA/diadct.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/DIA/diadct.F90	(revision 4624)
@@ -151,5 +151,5 @@
      READ  ( numnam_cfg, namdct, IOSTAT = ios, ERR = 902 )
 902  IF( ios /= 0 ) CALL ctl_nam ( ios , 'namdct in configuration namelist', lwp )
-     WRITE ( numond, namdct )
+     IF(lwm) WRITE ( numond, namdct )
 
      IF( lwp ) THEN
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/DIA/diaharm.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/DIA/diaharm.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/DIA/diaharm.F90	(revision 4624)
@@ -94,5 +94,5 @@
       READ  ( numnam_cfg, nam_diaharm, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_diaharm in configuration namelist', lwp )
-      WRITE ( numond, nam_diaharm )
+      IF(lwm) WRITE ( numond, nam_diaharm )
       !
       IF(lwp) THEN
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/DIA/diahsb.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/DIA/diahsb.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/DIA/diahsb.F90	(revision 4624)
@@ -221,5 +221,5 @@
       READ  ( numnam_cfg, namhsb, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namhsb in configuration namelist', lwp )
-      WRITE ( numond, namhsb )
+      IF(lwm) WRITE ( numond, namhsb )
 
       !
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/DIA/diaptr.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/DIA/diaptr.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/DIA/diaptr.F90	(revision 4624)
@@ -467,5 +467,5 @@
       READ  ( numnam_cfg, namptr, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namptr in configuration namelist', lwp )
-      WRITE ( numond, namptr )
+      IF(lwm) WRITE ( numond, namptr )
 
       IF(lwp) THEN                     ! Control print
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/DOM/domain.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/DOM/domain.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/DOM/domain.F90	(revision 4624)
@@ -159,5 +159,5 @@
       READ  ( numnam_cfg, namrun, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namrun in configuration namelist', lwp )
-      WRITE ( numond, namrun )
+      IF(lwm) WRITE ( numond, namrun )
       !
       IF(lwp) THEN                  ! control print
@@ -241,5 +241,5 @@
       READ  ( numnam_cfg, namdom, IOSTAT = ios, ERR = 904 )
 904   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namdom in configuration namelist', lwp )
-      WRITE ( numond, namdom )
+      IF(lwm) WRITE ( numond, namdom )
 
       IF(lwp) THEN
@@ -303,5 +303,5 @@
       READ  ( numnam_cfg, namcla, IOSTAT = ios, ERR = 906 )
 906   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namcla in configuration namelist', lwp )
-      WRITE( numond, namcla )
+      IF(lwm) WRITE( numond, namcla )
 
       IF(lwp) THEN
@@ -327,5 +327,5 @@
       READ  ( numnam_cfg, namnc4, IOSTAT = ios, ERR = 908 )
 908   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namnc4 in configuration namelist', lwp )
-      WRITE( numond, namnc4 )
+      IF(lwm) WRITE( numond, namnc4 )
 
       IF(lwp) THEN                        ! control print
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/DOM/dommsk.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/DOM/dommsk.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/DOM/dommsk.F90	(revision 4624)
@@ -152,5 +152,5 @@
       READ  ( numnam_cfg, namlbc, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namlbc in configuration namelist', lwp )
-      WRITE ( numond, namlbc )
+      IF(lwm) WRITE ( numond, namlbc )
       
       IF(lwp) THEN                  ! control print
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/DOM/domvvl.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/DOM/domvvl.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/DOM/domvvl.F90	(revision 4624)
@@ -922,5 +922,5 @@
       READ  ( numnam_cfg, nam_vvl, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_vvl in configuration namelist', lwp )
-      WRITE ( numond, nam_vvl )
+      IF(lwm) WRITE ( numond, nam_vvl )
 
       IF(lwp) THEN                    ! Namelist print
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/DOM/domzgr.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/DOM/domzgr.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/DOM/domzgr.F90	(revision 4624)
@@ -113,5 +113,5 @@
       READ  ( numnam_cfg, namzgr, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namzgr in configuration namelist', lwp )
-      WRITE ( numond, namzgr )
+      IF(lwm) WRITE ( numond, namzgr )
 
       IF(lwp) THEN                     ! Control print
@@ -1140,5 +1140,5 @@
       READ  ( numnam_cfg, namzgr_sco, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namzgr_sco in configuration namelist', lwp )
-      WRITE ( numond, namzgr_sco )
+      IF(lwm) WRITE ( numond, namzgr_sco )
 
       IF(lwp) THEN                           ! control print
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/DOM/dtatsd.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/DOM/dtatsd.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/DOM/dtatsd.F90	(revision 4624)
@@ -77,5 +77,5 @@
       READ  ( numnam_cfg, namtsd, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtsd in configuration namelist', lwp )
-      WRITE ( numond, namtsd )
+      IF(lwm) WRITE ( numond, namtsd )
 
       IF( PRESENT( ld_tradmp ) )   ln_tsd_tradmp = .TRUE.     ! forces the initialization when tradmp is used
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/DYN/dynadv.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/DYN/dynadv.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/DYN/dynadv.F90	(revision 4624)
@@ -101,5 +101,5 @@
       READ  ( numnam_cfg, namdyn_adv, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namdyn_adv in configuration namelist', lwp )
-      WRITE ( numond, namdyn_adv )
+      IF(lwm) WRITE ( numond, namdyn_adv )
 
       IF(lwp) THEN                    ! Namelist print
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/DYN/dynhpg.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/DYN/dynhpg.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/DYN/dynhpg.F90	(revision 4624)
@@ -135,5 +135,5 @@
       READ  ( numnam_cfg, namdyn_hpg, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namdyn_hpg in configuration namelist', lwp )
-      WRITE ( numond, namdyn_hpg )
+      IF(lwm) WRITE ( numond, namdyn_hpg )
       !
       IF(lwp) THEN                   ! Control print
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/DYN/dynnept.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/DYN/dynnept.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/DYN/dynnept.F90	(revision 4624)
@@ -125,5 +125,5 @@
       READ  ( numnam_cfg, namdyn_nept, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namdyn_nept in configuration namelist', lwp )
-      WRITE ( numond, namdyn_nept )
+      IF(lwm) WRITE ( numond, namdyn_nept )
 
       IF(lwp) THEN                      ! Control print
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_ts.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_ts.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_ts.F90	(revision 4624)
@@ -1062,5 +1062,5 @@
       READ  ( numnam_cfg, namsplit, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsplit in configuration namelist', lwp )
-      WRITE ( numond, namsplit )
+      IF(lwm) WRITE ( numond, namsplit )
       !
       !         ! Max courant number for ext. grav. waves
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/DYN/dynvor.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/DYN/dynvor.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/DYN/dynvor.F90	(revision 4624)
@@ -725,5 +725,5 @@
       READ  ( numnam_cfg, namdyn_vor, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namdyn_vor in configuration namelist', lwp )
-      WRITE ( numond, namdyn_vor )
+      IF(lwm) WRITE ( numond, namdyn_vor )
 
       IF(lwp) THEN                    ! Namelist print
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/FLO/floats.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/FLO/floats.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/FLO/floats.F90	(revision 4624)
@@ -96,5 +96,5 @@
       READ  ( numnam_cfg, namflo, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namflo in configuration namelist', lwp )
-      WRITE ( numond, namflo )
+      IF(lwm) WRITE ( numond, namflo )
       !
       IF(lwp) THEN                  ! control print
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/ICB/icbini.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/ICB/icbini.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/ICB/icbini.F90	(revision 4624)
@@ -363,5 +363,5 @@
       READ  ( numnam_cfg, namberg, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namberg in configuration namelist', lwp )
-      WRITE ( numond, namberg )
+      IF(lwm) WRITE ( numond, namberg )
 #else
       IF(lwp) THEN
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/IOM/in_out_manager.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/IOM/in_out_manager.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/IOM/in_out_manager.F90	(revision 4624)
@@ -138,5 +138,6 @@
    CHARACTER(lc) ::   cform_err = "(/,' ===>>> : E R R O R',     /,'         ===========',/)"       !:
    CHARACTER(lc) ::   cform_war = "(/,' ===>>> : W A R N I N G', /,'         ===============',/)"   !:
-   LOGICAL       ::   lwp      = .FALSE.    !: boolean : true on the 1st processor only
+   LOGICAL       ::   lwm      = .FALSE.    !: boolean : true on the 1st processor only (always)
+   LOGICAL       ::   lwp      = .FALSE.    !: boolean : true on the 1st processor only .OR. ln_ctl
    LOGICAL       ::   lsp_area = .TRUE.     !: to make a control print over a specific area
 
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/LBC/lib_mpp.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/LBC/lib_mpp.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/LBC/lib_mpp.F90	(revision 4624)
@@ -170,5 +170,5 @@
       INTEGER                      , INTENT(in   ) ::   kumnam_ref     ! logical unit for reference namelist
       INTEGER                      , INTENT(in   ) ::   kumnam_cfg     ! logical unit for configuration namelist
-      INTEGER                      , INTENT(in   ) ::   kumond         ! logical unit for namelist output
+      INTEGER                      , INTENT(inout) ::   kumond         ! logical unit for namelist output
       INTEGER                      , INTENT(inout) ::   kstop          ! stop indicator
       INTEGER, OPTIONAL            , INTENT(in   ) ::   localComm
@@ -193,5 +193,4 @@
       READ  ( kumnam_cfg, nammpp, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nammpp in configuration namelist', lwp )
-      WRITE(kumond, nammpp)      
 
       !                              ! control print
@@ -293,4 +292,9 @@
       CALL mpi_comm_size( mpi_comm_opa, mppsize, ierr )
       mynode = mpprank
+
+      IF( mynode == 0 ) THEN
+        CALL ctl_opn( kumond, 'output.namelist.dyn', 'UNKNOWN', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. , 1 )
+        WRITE(kumond, nammpp)      
+      ENDIF
       !
       CALL MPI_OP_CREATE(DDPDD_MPI, .TRUE., MPI_SUMDD, ierr)
@@ -2924,4 +2928,5 @@
       IF( PRESENT( localComm ) .OR. .NOT.PRESENT( localComm ) )   function_value = 0
       IF( .FALSE. )   ldtxt(:) = 'never done'
+      CALL ctl_opn( kumond, 'output.namelist.dyn', 'UNKNOWN', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. , 1 )
    END FUNCTION mynode
 
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/LBC/mppini_2.h90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/LBC/mppini_2.h90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/LBC/mppini_2.h90	(revision 4624)
@@ -86,5 +86,5 @@
       READ  ( numnam_cfg, namzgr, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namzgr in configuration namelist', lwp )
-      WRITE ( numond, namzgr )
+      IF(lwm) WRITE ( numond, namzgr )
 
       IF(lwp)WRITE(numout,*)
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/LDF/ldfdyn.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/LDF/ldfdyn.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/LDF/ldfdyn.F90	(revision 4624)
@@ -81,5 +81,5 @@
       READ  ( numnam_cfg, namdyn_ldf, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namdyn_ldf in configuration namelist', lwp )
-      WRITE ( numond, namdyn_ldf )
+      IF(lwm) WRITE ( numond, namdyn_ldf )
 
       IF(lwp) THEN                      ! Parameter print
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/LDF/ldftra.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/LDF/ldftra.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/LDF/ldftra.F90	(revision 4624)
@@ -85,5 +85,5 @@
       READ  ( numnam_cfg, namtra_ldf, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtra_ldf in configuration namelist', lwp )
-      WRITE ( numond, namtra_ldf )
+      IF(lwm) WRITE ( numond, namtra_ldf )
 
       IF(lwp) THEN                      ! control print
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/OBS/diaobs.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/OBS/diaobs.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/OBS/diaobs.F90	(revision 4624)
@@ -221,5 +221,5 @@
       READ  ( numnam_cfg, namobs, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namobs in configuration namelist', lwp )
-      WRITE ( numond, namobs )
+      IF(lwm) WRITE ( numond, namobs )
 
       ! Count number of files for each type
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/SBC/albedo.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/SBC/albedo.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/SBC/albedo.F90	(revision 4624)
@@ -212,5 +212,5 @@
       READ  ( numnam_cfg, namsbc_alb, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc_alb in configuration namelist', lwp )
-      WRITE ( numond, namsbc_alb )
+      IF(lwm) WRITE ( numond, namsbc_alb )
       !
       IF(lwp) THEN                      ! Control print
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbcana.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbcana.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbcana.F90	(revision 4624)
@@ -81,5 +81,5 @@
          READ  ( numnam_cfg, namsbc_ana, IOSTAT = ios, ERR = 902 )
 902      IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc_ana in configuration namelist', lwp )
-         WRITE ( numond, namsbc_ana )
+         IF(lwm) WRITE ( numond, namsbc_ana )
          !
          IF(lwp) WRITE(numout,*)' '
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbcapr.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbcapr.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbcapr.F90	(revision 4624)
@@ -83,5 +83,5 @@
          READ  ( numnam_cfg, namsbc_apr, IOSTAT = ios, ERR = 902 )
 902      IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc_apr in configuration namelist', lwp )
-         WRITE ( numond, namsbc_apr )
+         IF(lwm) WRITE ( numond, namsbc_apr )
          !
          ALLOCATE( sf_apr(1), STAT=ierror )           !* allocate and fill sf_sst (forcing structure) with sn_sst
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_clio.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_clio.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_clio.F90	(revision 4624)
@@ -148,5 +148,5 @@
          READ  ( numnam_cfg, namsbc_clio, IOSTAT = ios, ERR = 902 )
 902      IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc_clio in configuration namelist', lwp )
-         WRITE ( numond, namsbc_clio )
+         IF(lwm) WRITE ( numond, namsbc_clio )
 
          ! store namelist information in an array
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_core.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_core.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_core.F90	(revision 4624)
@@ -154,5 +154,5 @@
 902      IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc_core in configuration namelist', lwp )
 
-         WRITE ( numond, namsbc_core )
+         IF(lwm) WRITE ( numond, namsbc_core )
          !                                         ! check: do we plan to use ln_dm2dc with non-daily forcing?
          IF( ln_dm2dc .AND. sn_qsr%nfreqh /= 24 )   & 
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_mfs.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_mfs.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbcblk_mfs.F90	(revision 4624)
@@ -141,5 +141,5 @@
          READ  ( numnam_cfg, namsbc_mfs, IOSTAT = ios, ERR = 902 )
 902      IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc_mfs in configuration namelist', lwp )
-         WRITE ( numond, namsbc_mfs )
+         IF(lwm) WRITE ( numond, namsbc_mfs )
          !
          ! store namelist information in an array
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90	(revision 4624)
@@ -244,5 +244,5 @@
       READ  ( numnam_cfg, namsbc_cpl, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc_cpl in configuration namelist', lwp )
-      WRITE ( numond, namsbc_cpl )
+      IF(lwm) WRITE ( numond, namsbc_cpl )
 
       IF(lwp) THEN                        ! control print
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbcflx.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbcflx.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbcflx.F90	(revision 4624)
@@ -98,5 +98,5 @@
          READ  ( numnam_cfg, namsbc_flx, IOSTAT = ios, ERR = 902 )
 902      IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc_flx in configuration namelist', lwp )
-         WRITE ( numond, namsbc_flx ) 
+         IF(lwm) WRITE ( numond, namsbc_flx ) 
          !
          !                                         ! check: do we plan to use ln_dm2dc with non-daily forcing?
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_cice.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_cice.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_cice.F90	(revision 4624)
@@ -747,5 +747,5 @@
          READ  ( numnam_cfg, namsbc_cice, IOSTAT = ios, ERR = 902 )
 902      IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc_cice in configuration namelist', lwp )
-         WRITE ( numond, namsbc_cice )
+         IF(lwm) WRITE ( numond, namsbc_cice )
 
          ! store namelist information in an array
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_if.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_if.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_if.F90	(revision 4624)
@@ -78,5 +78,5 @@
          READ  ( numnam_cfg, namsbc_iif, IOSTAT = ios, ERR = 902 )
 902      IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc_iif in configuration namelist', lwp )
-         WRITE ( numond, namsbc_iif )
+         IF(lwm) WRITE ( numond, namsbc_iif )
 
          ALLOCATE( sf_ice(1), STAT=ierror )
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbcmod.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbcmod.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbcmod.F90	(revision 4624)
@@ -101,5 +101,5 @@
       READ  ( numnam_cfg, namsbc, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc in configuration namelist', lwp )
-      WRITE ( numond, namsbc )
+      IF(lwm) WRITE ( numond, namsbc )
 
       !                          ! overwrite namelist parameter using CPP key information
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbcrnf.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbcrnf.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbcrnf.F90	(revision 4624)
@@ -263,5 +263,5 @@
       READ  ( numnam_cfg, namsbc_rnf, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc_rnf in configuration namelist', lwp )
-      WRITE ( numond, namsbc_rnf )
+      IF(lwm) WRITE ( numond, namsbc_rnf )
       !
       !                                         ! Control print
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbcssr.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbcssr.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbcssr.F90	(revision 4624)
@@ -174,5 +174,5 @@
       READ  ( numnam_cfg, namsbc_ssr, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc_ssr in configuration namelist', lwp )
-      WRITE ( numond, namsbc_ssr )
+      IF(lwm) WRITE ( numond, namsbc_ssr )
 
       IF(lwp) THEN                 !* control print
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbcwave.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbcwave.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbcwave.F90	(revision 4624)
@@ -90,5 +90,5 @@
          READ  ( numnam_cfg, namsbc_wave, IOSTAT = ios, ERR = 902 )
 902      IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc_wave in configuration namelist', lwp )
-         WRITE ( numond, namsbc_wave )
+         IF(lwm) WRITE ( numond, namsbc_wave )
          !
 
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/SBC/tideini.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/SBC/tideini.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/SBC/tideini.F90	(revision 4624)
@@ -72,5 +72,5 @@
        READ  ( numnam_cfg, nam_tide, IOSTAT = ios, ERR = 902 )
 902    IF( ios /= 0 ) CALL ctl_nam ( ios , 'nam_tide in configuration namelist', lwp )
-       WRITE ( numond, nam_tide )
+       IF(lwm) WRITE ( numond, nam_tide )
        !
        nb_harmo=0
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/SOL/solver.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/SOL/solver.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/SOL/solver.F90	(revision 4624)
@@ -70,5 +70,5 @@
       READ  ( numnam_cfg, namsol, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsol in configuration namelist', lwp )
-      WRITE ( numond, namsol )
+      IF(lwm) WRITE ( numond, namsol )
 
       IF(lwp) THEN                  !* Control print
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/TRA/eosbn2.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/TRA/eosbn2.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/TRA/eosbn2.F90	(revision 4624)
@@ -723,5 +723,5 @@
       READ  ( numnam_cfg, nameos, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nameos in configuration namelist', lwp )
-      WRITE( numond, nameos )
+      IF(lwm) WRITE( numond, nameos )
       !
       IF(lwp) THEN                ! Control print
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/TRA/traadv.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/TRA/traadv.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/TRA/traadv.F90	(revision 4624)
@@ -176,5 +176,5 @@
       READ  ( numnam_cfg, namtra_adv, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtra_adv in configuration namelist', lwp )
-      WRITE ( numond, namtra_adv )
+      IF(lwm) WRITE ( numond, namtra_adv )
 
       IF(lwp) THEN                    ! Namelist print
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_mle.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_mle.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_mle.F90	(revision 4624)
@@ -285,5 +285,5 @@
       READ  ( numnam_cfg, namtra_adv_mle, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtra_adv_mle in configuration namelist', lwp )
-      WRITE ( numond, namtra_adv_mle )
+      IF(lwm) WRITE ( numond, namtra_adv_mle )
 
       IF(lwp) THEN                     ! Namelist print
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/TRA/trabbc.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/TRA/trabbc.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/TRA/trabbc.F90	(revision 4624)
@@ -141,5 +141,5 @@
       READ  ( numnam_cfg, nambbc, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nambbc in configuration namelist', lwp )
-      WRITE ( numond, nambbc )
+      IF(lwm) WRITE ( numond, nambbc )
 
       IF(lwp) THEN                     ! Control print
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/TRA/trabbl.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/TRA/trabbl.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/TRA/trabbl.F90	(revision 4624)
@@ -577,5 +577,5 @@
       READ  ( numnam_cfg, nambbl, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nambbl in configuration namelist', lwp )
-      WRITE ( numond, nambbl )
+      IF(lwm) WRITE ( numond, nambbl )
       !
       l_bbl = .TRUE.                 !* flag to compute bbl coef and transport
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/TRA/tradmp.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/TRA/tradmp.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/TRA/tradmp.F90	(revision 4624)
@@ -205,5 +205,5 @@
       READ  ( numnam_cfg, namtra_dmp, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtra_dmp in configuration namelist', lwp )
-      WRITE ( numond, namtra_dmp )
+      IF(lwm) WRITE ( numond, namtra_dmp )
       
       IF( lzoom .AND. .NOT. lk_c1d )   nn_zdmp = 0          ! restoring to climatology at closed north or south boundaries
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/TRA/traqsr.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/TRA/traqsr.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/TRA/traqsr.F90	(revision 4624)
@@ -399,5 +399,5 @@
       READ  ( numnam_cfg, namtra_qsr, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtra_qsr in configuration namelist', lwp )
-      WRITE ( numond, namtra_qsr )
+      IF(lwm) WRITE ( numond, namtra_qsr )
       !
       IF(lwp) THEN                ! control print
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/TRD/trdmod.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/TRD/trdmod.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/TRD/trdmod.F90	(revision 4624)
@@ -266,5 +266,5 @@
          READ  ( numnam_cfg, namtrd, IOSTAT = ios, ERR = 902 )
 902      IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrd in configuration namelist', lwp )
-         WRITE ( numond, namtrd )
+         IF(lwm) WRITE ( numond, namtrd )
 
          IF(lwp) THEN
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfbfr.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfbfr.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfbfr.F90	(revision 4624)
@@ -203,5 +203,5 @@
       READ  ( numnam_cfg, nambfr, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nambfr in configuration namelist', lwp )
-      WRITE ( numond, nambfr )
+      IF(lwm) WRITE ( numond, nambfr )
       IF(lwp) WRITE(numout,*)
       IF(lwp) WRITE(numout,*) 'zdf_bfr_init : momentum bottom friction'
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfddm.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfddm.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfddm.F90	(revision 4624)
@@ -223,5 +223,5 @@
       READ  ( numnam_cfg, namzdf_ddm, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namzdf_ddm in configuration namelist', lwp )
-      WRITE ( numond, namzdf_ddm )
+      IF(lwm) WRITE ( numond, namzdf_ddm )
       !
       IF(lwp) THEN                    ! Parameter print
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfgls.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfgls.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfgls.F90	(revision 4624)
@@ -948,5 +948,5 @@
       READ  ( numnam_cfg, namzdf_gls, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namzdf_gls in configuration namelist', lwp )
-      WRITE ( numond, namzdf_gls )
+      IF(lwm) WRITE ( numond, namzdf_gls )
 
       IF(lwp) THEN                     !* Control print
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfini.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfini.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfini.F90	(revision 4624)
@@ -64,5 +64,5 @@
       READ  ( numnam_cfg, namzdf, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namzdf in configuration namelist', lwp )
-      WRITE ( numond, namzdf )
+      IF(lwm) WRITE ( numond, namzdf )
 
       IF(lwp) THEN               !* Parameter print
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfkpp.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfkpp.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfkpp.F90	(revision 4624)
@@ -1399,5 +1399,5 @@
       READ  ( numnam_cfg, namzdf_kpp, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namzdf_kpp in configuration namelist', lwp )
-      WRITE ( numond, namzdf_kpp )
+      IF(lwm) WRITE ( numond, namzdf_kpp )
 
       IF(lwp) THEN                    ! Control print
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfric.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfric.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfric.F90	(revision 4624)
@@ -260,5 +260,5 @@
       READ  ( numnam_cfg, namzdf_ric, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namzdf_ric in configuration namelist', lwp )
-      WRITE ( numond, namzdf_ric )
+      IF(lwm) WRITE ( numond, namzdf_ric )
       !
       IF(lwp) THEN                   ! Control print
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/ZDF/zdftke.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/ZDF/zdftke.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/ZDF/zdftke.F90	(revision 4624)
@@ -707,5 +707,5 @@
       READ  ( numnam_cfg, namzdf_tke, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namzdf_tke in configuration namelist', lwp )
-      WRITE ( numond, namzdf_tke )
+      IF(lwm) WRITE ( numond, namzdf_tke )
       !
       ri_cri   = 2._wp    / ( 2._wp + rn_ediss / rn_ediff )   ! resulting critical Richardson number
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/ZDF/zdftmx.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/ZDF/zdftmx.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/ZDF/zdftmx.F90	(revision 4624)
@@ -377,5 +377,5 @@
       READ  ( numnam_cfg, namzdf_tmx, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namzdf_tmx in configuration namelist', lwp )
-      WRITE ( numond, namzdf_tmx )
+      IF(lwm) WRITE ( numond, namzdf_tmx )
 
       IF(lwp) THEN                   ! Control print
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/nemogcm.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/nemogcm.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/nemogcm.F90	(revision 4624)
@@ -240,5 +240,4 @@
       CALL ctl_opn( numnam_ref, 'namelist_ref', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. )
       CALL ctl_opn( numnam_cfg, 'namelist_cfg', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. )
-      CALL ctl_opn( numond, 'output.namelist.dyn', 'UNKNOWN', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. , 1 )
       !
       REWIND( numnam_ref )              ! Namelist namctl in reference namelist : Control prints & Benchmark
@@ -249,5 +248,4 @@
       READ  ( numnam_cfg, namctl, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namctl in configuration namelist', .TRUE. )
-      WRITE( numond, namctl )
 
       !
@@ -259,5 +257,4 @@
       READ  ( numnam_cfg, namcfg, IOSTAT = ios, ERR = 904 )
 904   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namcfg in configuration namelist', .TRUE. )   
-      WRITE( numond, namcfg )
 
 ! Force values for AGRIF zoom (cf. agrif_user.F90)
@@ -279,4 +276,6 @@
       !                             !--------------------------------------------!
       !                             !  set communicator & select the local node  !
+      !                             !  NB: mynode also opens output.namelist.dyn !
+      !                             !      on unit number numond on first proc   !
       !                             !--------------------------------------------!
 #if defined key_iomput
@@ -303,5 +302,14 @@
       narea = narea + 1                                     ! mynode return the rank of proc (0 --> jpnij -1 )
 
+      lwm = (narea == 1)                                    ! control of output namelists
       lwp = (narea == 1) .OR. ln_ctl                        ! control of all listing output print
+
+      IF(lwm) THEN
+         ! write merged namelists from earlier to output namelist now that the
+         ! file has been opened in call to mynode. nammpp has already been
+         ! written in mynode (if lk_mpp_mpi)
+         WRITE( numond, namctl )
+         WRITE( numond, namcfg )
+      ENDIF
 
       ! If dimensions of processor grid weren't specified in the namelist file
@@ -586,8 +594,8 @@
       IF( numnam_ref      /= -1 )   CLOSE( numnam_ref      )   ! oce reference namelist
       IF( numnam_cfg      /= -1 )   CLOSE( numnam_cfg      )   ! oce configuration namelist
-      IF( numond          /= -1 )   CLOSE( numond          )   ! oce output namelist
+      IF( lwm.AND.numond  /= -1 )   CLOSE( numond          )   ! oce output namelist
       IF( numnam_ice_ref  /= -1 )   CLOSE( numnam_ice_ref  )   ! ice reference namelist
       IF( numnam_ice_cfg  /= -1 )   CLOSE( numnam_ice_cfg  )   ! ice configuration namelist
-      IF( numoni          /= -1 )   CLOSE( numoni          )   ! ice output namelist
+      IF( lwm.AND.numoni  /= -1 )   CLOSE( numoni          )   ! ice output namelist
       IF( numevo_ice      /= -1 )   CLOSE( numevo_ice      )   ! ice variables (temp. evolution)
       IF( numout          /=  6 )   CLOSE( numout          )   ! standard model output file
Index: /trunk/NEMOGCM/NEMO/OPA_SRC/step.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/OPA_SRC/step.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/OPA_SRC/step.F90	(revision 4624)
@@ -312,7 +312,7 @@
       ENDIF
       IF( kstp == nit000   )   THEN
-         CALL iom_close( numror )     ! close input  ocean restart file
-         CALL FLUSH    ( numond )     ! flush output namelist oce
-         CALL FLUSH    ( numoni )     ! flush output namelist ice    
+                 CALL iom_close( numror )     ! close input  ocean restart file
+         IF(lwm) CALL FLUSH    ( numond )     ! flush output namelist oce
+         IF(lwm) CALL FLUSH    ( numoni )     ! flush output namelist ice    
       ENDIF
       IF( lrst_oce         )   CALL rst_write    ( kstp )   ! write output ocean restart file
Index: /trunk/NEMOGCM/NEMO/SAS_SRC/nemogcm.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/SAS_SRC/nemogcm.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/SAS_SRC/nemogcm.F90	(revision 4624)
@@ -168,5 +168,4 @@
       CALL ctl_opn( numnam_ref, 'namelist_ref', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. )
       CALL ctl_opn( numnam_cfg, 'namelist_cfg', 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. )
-      CALL ctl_opn( numond, 'output.namelist.dyn', 'UNKNOWN', 'FORMATTED', 'SEQUENTIAL', -1, 6, .FALSE. , 1 )
       !
       REWIND( numnam_ref )              ! Namelist namctl in reference namelist : Control prints & Benchmark
@@ -177,5 +176,4 @@
       READ  ( numnam_cfg, namctl, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namctl in configuration namelist', .TRUE. )
-      WRITE( numond, namctl )
 
       !
@@ -187,8 +185,9 @@
       READ  ( numnam_cfg, namcfg, IOSTAT = ios, ERR = 904 )
 904   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namcfg in configuration namelist', .TRUE. )   
-      WRITE( numond, namcfg )
 
       !                             !--------------------------------------------!
       !                             !  set communicator & select the local node  !
+      !                             !  NB: mynode also opens output.namelist.dyn !
+      !                             !      on unit number numond on first proc   !
       !                             !--------------------------------------------!
 #if defined key_iomput
@@ -203,5 +202,14 @@
       narea = narea + 1                                     ! mynode return the rank of proc (0 --> jpnij -1 )
 
+      lwm = (narea == 1)                                    ! control of output namelists
       lwp = (narea == 1) .OR. ln_ctl                        ! control of all listing output print
+
+      IF(lwm) THEN
+         ! write merged namelists from earlier to output namelist now that the
+         ! file has been opened in call to mynode. nammpp has already been
+         ! written in mynode (if lk_mpp_mpi)
+         WRITE( numond, namctl )
+         WRITE( numond, namcfg )
+      ENDIF
 
       ! If dimensions of processor grid weren't specified in the namelist file 
@@ -405,8 +413,8 @@
       IF( numnam_ref      /= -1 )   CLOSE( numnam_ref      )   ! oce reference namelist
       IF( numnam_cfg      /= -1 )   CLOSE( numnam_cfg      )   ! oce configuration namelist
-      IF( numond          /= -1 )   CLOSE( numond          )   ! oce output namelist
+      IF( lwm.AND.numond  /= -1 )   CLOSE( numond          )   ! oce output namelist
       IF( numnam_ice_ref  /= -1 )   CLOSE( numnam_ice_ref  )   ! ice reference namelist
       IF( numnam_ice_cfg  /= -1 )   CLOSE( numnam_ice_cfg  )   ! ice configuration namelist
-      IF( numoni          /= -1 )   CLOSE( numoni          )   ! ice output namelist
+      IF( lwm.AND.numoni  /= -1 )   CLOSE( numoni          )   ! ice output namelist
       IF( numevo_ice      /= -1 )   CLOSE( numevo_ice  )   ! ice variables (temp. evolution)
       IF( numout          /=  6 )   CLOSE( numout      )   ! standard model output file
Index: /trunk/NEMOGCM/NEMO/SAS_SRC/sbcssm.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/SAS_SRC/sbcssm.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/SAS_SRC/sbcssm.F90	(revision 4624)
@@ -150,5 +150,5 @@
       READ  ( numnam_cfg, namsbc_sas, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namsbc_sas in configuration namelist', lwp )
-      WRITE ( numond, namsbc_sas )
+      IF(lwm) WRITE ( numond, namsbc_sas )
 
       !                                         ! store namelist information in an array
Index: /trunk/NEMOGCM/NEMO/TOP_SRC/C14b/trcnam_c14b.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/TOP_SRC/C14b/trcnam_c14b.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/TOP_SRC/C14b/trcnam_c14b.F90	(revision 4624)
@@ -58,5 +58,5 @@
       CALL ctl_opn( numnatb_ref, 'namelist_c14b_ref'  ,     'OLD', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. )
       CALL ctl_opn( numnatb_cfg, 'namelist_c14b_cfg'  ,     'OLD', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. )   
-      CALL ctl_opn( numonb     , 'output.namelist.c14', 'UNKNOWN', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. )     
+      IF(lwm) CALL ctl_opn( numonb, 'output.namelist.c14', 'UNKNOWN', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. )     
       REWIND( numnatb_ref )              ! Namelist namc14date in reference namelist : c14b parameters
       READ  ( numnatb_ref, namc14date, IOSTAT = ios, ERR = 901)
@@ -66,5 +66,5 @@
       READ  ( numnatb_cfg, namc14date, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namc14date in configuration namelist', lwp )
-      WRITE ( numonb, namc14date )
+      IF(lwm) WRITE ( numonb, namc14date )
       IF(lwp) THEN                  ! control print
          WRITE(numout,*)
@@ -88,5 +88,5 @@
          READ  ( numnatb_cfg, namc14dia, IOSTAT = ios, ERR = 904 )
 904      IF( ios /= 0 ) CALL ctl_nam ( ios , 'namc14dia in configuration namelist', lwp )
-         WRITE ( numonb, namc14dia )
+         IF(lwm) WRITE ( numonb, namc14dia )
 
          DO jl = 1, jp_c14b_2d
@@ -124,5 +124,5 @@
       ENDIF
 
-   CALL FLUSH ( numonb )     ! flush output namelist C14b
+   IF(lwm) CALL FLUSH ( numonb )     ! flush output namelist C14b
 
    END SUBROUTINE trc_nam_c14b
Index: /trunk/NEMOGCM/NEMO/TOP_SRC/CFC/trcnam_cfc.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/TOP_SRC/CFC/trcnam_cfc.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/TOP_SRC/CFC/trcnam_cfc.F90	(revision 4624)
@@ -55,5 +55,5 @@
       CALL ctl_opn( numnatc_ref, 'namelist_cfc_ref'   ,     'OLD', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. )
       CALL ctl_opn( numnatc_cfg, 'namelist_cfc_cfg'   ,     'OLD', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. )
-      CALL ctl_opn( numonc     , 'output.namelist.cfc', 'UNKNOWN', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. )
+      IF(lwm) CALL ctl_opn( numonc, 'output.namelist.cfc', 'UNKNOWN', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. )
 
       REWIND( numnatc_ref )              ! Namelist namcfcdate in reference namelist : CFC parameters
@@ -64,5 +64,5 @@
       READ  ( numnatc_cfg, namcfcdate, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namcfcdate in configuration namelist', lwp )
-      WRITE ( numonc, namcfcdate )
+      IF(lwm) WRITE ( numonc, namcfcdate )
 
       IF(lwp) THEN                  ! control print
@@ -88,5 +88,5 @@
          READ  ( numnatc_cfg, namcfcdia, IOSTAT = ios, ERR = 904 )
 904      IF( ios /= 0 ) CALL ctl_nam ( ios , 'namcfcdia in configuration namelist', lwp )
-         WRITE ( numonc, namcfcdia )
+         IF(lwm) WRITE ( numonc, namcfcdia )
 
          DO jl = 1, jp_cfc_2d
@@ -110,5 +110,5 @@
       ENDIF
 
-   CALL FLUSH ( numonc )     ! flush output namelist CFC
+   IF(lwm) CALL FLUSH ( numonc )     ! flush output namelist CFC
 
    END SUBROUTINE trc_nam_cfc
Index: /trunk/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zbio.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zbio.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zbio.F90	(revision 4624)
@@ -500,5 +500,5 @@
       READ  ( numnatp_cfg, namlobphy, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namlobphy in configuration namelist', lwp )
-      WRITE ( numonp, namlobphy )
+      IF(lwm) WRITE ( numonp, namlobphy )
 
       IF(lwp) THEN
@@ -519,5 +519,5 @@
       READ  ( numnatp_cfg, namlobnut, IOSTAT = ios, ERR = 904 )
 904   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namlobnut in configuration namelist', lwp )
-      WRITE ( numonp, namlobnut )
+      IF(lwm) WRITE ( numonp, namlobnut )
 
       IF(lwp) THEN
@@ -537,5 +537,5 @@
       READ  ( numnatp_cfg, namlobzoo, IOSTAT = ios, ERR = 906 )
 906   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namlobzoo in configuration namelist', lwp )
-      WRITE ( numonp, namlobzoo )
+      IF(lwm) WRITE ( numonp, namlobzoo )
 
       IF(lwp) THEN
@@ -560,5 +560,5 @@
       READ  ( numnatp_cfg, namlobdet, IOSTAT = ios, ERR = 908 )
 908   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namlobdet in configuration namelist', lwp )
-      WRITE ( numonp, namlobdet )
+      IF(lwm) WRITE ( numonp, namlobdet )
 
       IF(lwp) THEN
@@ -576,5 +576,5 @@
       READ  ( numnatp_cfg, namlobdom, IOSTAT = ios, ERR = 910 )
 910   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namlobdom in configuration namelist', lwp )
-      WRITE ( numonp, namlobdom )
+      IF(lwm) WRITE ( numonp, namlobdom )
 
       IF(lwp) THEN
Index: /trunk/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zopt.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zopt.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zopt.F90	(revision 4624)
@@ -174,5 +174,5 @@
       READ  ( numnatp_cfg, namlobopt, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namlobopt in configuration namelist', lwp )
-      WRITE ( numonp, namlobopt )
+      IF(lwm) WRITE ( numonp, namlobopt )
 
       IF(lwp) THEN
@@ -196,5 +196,5 @@
       READ  ( numnatp_cfg, namlobrat, IOSTAT = ios, ERR = 904 )
 904   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namlobrat in configuration namelist', lwp )
-      WRITE ( numonp, namlobrat )
+      IF(lwm) WRITE ( numonp, namlobrat )
 
       IF(lwp) THEN
Index: /trunk/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zsed.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zsed.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zsed.F90	(revision 4624)
@@ -161,5 +161,5 @@
       READ  ( numnatp_cfg, namlobsed, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namlobsed in configuration namelist', lwp )
-      WRITE ( numonp, namlobsed )
+      IF(lwm) WRITE ( numonp, namlobsed )
 
       IF(lwp) THEN
Index: /trunk/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zsms.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zsms.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/TOP_SRC/PISCES/P2Z/p2zsms.F90	(revision 4624)
@@ -67,5 +67,5 @@
       IF( lk_trdmld_trc )  CALL trd_mld_bio( kt )   ! trends: Mixed-layer
       !
-      IF ( kt == nittrc000 ) CALL FLUSH    ( numonp )     ! flush output namelist PISCES
+      IF ( lwm .AND. kt == nittrc000 ) CALL FLUSH    ( numonp )     ! flush output namelist PISCES
       IF( nn_timing == 1 )  CALL timing_stop('p2z_sms')
       !
Index: /trunk/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zfechem.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zfechem.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zfechem.F90	(revision 4624)
@@ -351,5 +351,5 @@
       READ  ( numnatp_cfg, nampisfer, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampisfer in configuration namelist', lwp )
-      WRITE ( numonp, nampisfer )
+      IF(lwm) WRITE ( numonp, nampisfer )
 
       IF(lwp) THEN                         ! control print
Index: /trunk/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zflx.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zflx.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zflx.F90	(revision 4624)
@@ -250,5 +250,5 @@
       READ  ( numnatp_cfg, nampisext, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampisext in configuration namelist', lwp )
-      WRITE ( numonp, nampisext )
+      IF(lwm) WRITE ( numonp, nampisext )
       !
       IF(lwp) THEN                         ! control print
@@ -326,5 +326,5 @@
          READ  ( numnatp_cfg, nampisatm, IOSTAT = ios, ERR = 902 )
 902      IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampisatm in configuration namelist', lwp )
-         WRITE ( numonp, nampisatm )
+         IF(lwm) WRITE ( numonp, nampisatm )
          !
          !
Index: /trunk/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zlim.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zlim.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zlim.F90	(revision 4624)
@@ -228,5 +228,5 @@
       READ  ( numnatp_cfg, nampislim, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampislim in configuration namelist', lwp )
-      WRITE ( numonp, nampislim )
+      IF(lwm) WRITE ( numonp, nampislim )
 
       IF(lwp) THEN                         ! control print
Index: /trunk/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zlys.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zlys.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zlys.F90	(revision 4624)
@@ -202,5 +202,5 @@
       READ  ( numnatp_cfg, nampiscal, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampiscal in configuration namelist', lwp )
-      WRITE ( numonp, nampiscal )
+      IF(lwm) WRITE ( numonp, nampiscal )
 
       IF(lwp) THEN                         ! control print
Index: /trunk/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zmeso.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zmeso.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zmeso.F90	(revision 4624)
@@ -293,5 +293,5 @@
       READ  ( numnatp_cfg, nampismes, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampismes in configuration namelist', lwp )
-      WRITE ( numonp, nampismes )
+      IF(lwm) WRITE ( numonp, nampismes )
 
 
Index: /trunk/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zmicro.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zmicro.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zmicro.F90	(revision 4624)
@@ -235,5 +235,5 @@
       READ  ( numnatp_cfg, nampiszoo, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampiszoo in configuration namelist', lwp )
-      WRITE ( numonp, nampiszoo )
+      IF(lwm) WRITE ( numonp, nampiszoo )
 
       IF(lwp) THEN                         ! control print
Index: /trunk/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zmort.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zmort.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zmort.F90	(revision 4624)
@@ -252,5 +252,5 @@
       READ  ( numnatp_cfg, nampismort, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampismort in configuration namelist', lwp )
-      WRITE ( numonp, nampismort )
+      IF(lwm) WRITE ( numonp, nampismort )
 
       IF(lwp) THEN                         ! control print
Index: /trunk/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zopt.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zopt.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zopt.F90	(revision 4624)
@@ -338,5 +338,5 @@
       READ  ( numnatp_cfg, nampisopt, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampisopt in configuration namelist', lwp )
-      WRITE ( numonp, nampisopt )
+      IF(lwm) WRITE ( numonp, nampisopt )
 
       IF(lwp) THEN
Index: /trunk/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zprod.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zprod.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zprod.F90	(revision 4624)
@@ -486,5 +486,5 @@
       READ  ( numnatp_cfg, nampisprod, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampisprod in configuration namelist', lwp )
-      WRITE ( numonp, nampisprod )
+      IF(lwm) WRITE ( numonp, nampisprod )
 
       IF(lwp) THEN                         ! control print
Index: /trunk/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zrem.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zrem.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zrem.F90	(revision 4624)
@@ -358,5 +358,5 @@
       READ  ( numnatp_cfg, nampisrem, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampisrem in configuration namelist', lwp )
-      WRITE ( numonp, nampisrem )
+      IF(lwm) WRITE ( numonp, nampisrem )
 
       IF(lwp) THEN                         ! control print
Index: /trunk/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsbc.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsbc.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsbc.F90	(revision 4624)
@@ -218,5 +218,5 @@
       READ  ( numnatp_cfg, nampissbc, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampissbc in configuration namelist', lwp )
-      WRITE ( numonp, nampissbc )
+      IF(lwm) WRITE ( numonp, nampissbc )
 
       IF(lwp) THEN
Index: /trunk/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsink.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsink.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsink.F90	(revision 4624)
@@ -554,5 +554,5 @@
       READ  ( numnatp_cfg, nampiskrs, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampiskrs in configuration namelist', lwp )
-      WRITE ( numonp, nampiskrs )
+      IF(lwm) WRITE ( numonp, nampiskrs )
 
       IF(lwp) THEN
Index: /trunk/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsms.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsms.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsms.F90	(revision 4624)
@@ -153,5 +153,5 @@
       CALL p4z_chk_mass( kt ) ! Mass conservation checking
 
-      IF ( kt == nittrc000 ) CALL FLUSH    ( numonp )     ! flush output namelist PISCES
+      IF ( lwm .AND. kt == nittrc000 ) CALL FLUSH    ( numonp )     ! flush output namelist PISCES
       IF( nn_timing == 1 )  CALL timing_stop('p4z_sms')
       !
@@ -185,5 +185,5 @@
       READ  ( numnatp_cfg, nampisbio, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampisbio in configuration namelist', lwp )
-      WRITE ( numonp, nampisbio )
+      IF(lwm) WRITE ( numonp, nampisbio )
 
       IF(lwp) THEN                         ! control print
@@ -209,5 +209,5 @@
       READ  ( numnatp_cfg, nampiskrp, IOSTAT = ios, ERR = 904 )
 904   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampiskrp in configuration namelist', lwp )
-      WRITE ( numonp, nampiskrp )
+      IF(lwm) WRITE ( numonp, nampiskrp )
 
       IF(lwp) THEN
@@ -235,5 +235,5 @@
       READ  ( numnatp_cfg, nampisdmp, IOSTAT = ios, ERR = 906 )
 906   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampisdmp in configuration namelist', lwp )
-      WRITE ( numonp, nampisdmp )
+      IF(lwm) WRITE ( numonp, nampisdmp )
 
       IF(lwp) THEN                         ! control print
@@ -252,5 +252,5 @@
       READ  ( numnatp_cfg, nampismass, IOSTAT = ios, ERR = 908 )
 908   IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampismass in configuration namelist', lwp )
-      WRITE ( numonp, nampismass )
+      IF(lwm) WRITE ( numonp, nampismass )
 
       IF(lwp) THEN                         ! control print
Index: /trunk/NEMOGCM/NEMO/TOP_SRC/PISCES/trcnam_pisces.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/TOP_SRC/PISCES/trcnam_pisces.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/TOP_SRC/PISCES/trcnam_pisces.F90	(revision 4624)
@@ -72,5 +72,5 @@
       CALL ctl_opn( numnatp_ref, TRIM( clname )//'_ref', 'OLD'    , 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. )
       CALL ctl_opn( numnatp_cfg, TRIM( clname )//'_cfg', 'OLD'    , 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. )
-      CALL ctl_opn( numonp     , 'output.namelist.pis' , 'UNKNOWN', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. )
+      IF(lwm) CALL ctl_opn( numonp     , 'output.namelist.pis' , 'UNKNOWN', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. )
       !
       IF( .NOT.lk_iomput .AND. ln_diatrc ) THEN
@@ -85,5 +85,5 @@
          READ  ( numnatp_cfg, nampisdia, IOSTAT = ios, ERR = 902 )
 902      IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampisdia in configuration namelist', lwp )
-         WRITE ( numonp, nampisdia )
+         IF(lwm) WRITE ( numonp, nampisdia )
 
          DO jl = 1, jp_pisces_2d
@@ -134,5 +134,5 @@
          READ  ( numnatp_cfg, nampisdbi, IOSTAT = ios, ERR = 904 )
 904      IF( ios /= 0 ) CALL ctl_nam ( ios , 'nampisdbi in configuration namelist', lwp )
-         WRITE ( numonp, nampisdbi )
+         IF(lwm) WRITE ( numonp, nampisdbi )
 
          DO jl = 1, jp_pisces_trd
Index: /trunk/NEMOGCM/NEMO/TOP_SRC/TRP/trcnam_trp.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/TOP_SRC/TRP/trcnam_trp.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/TOP_SRC/TRP/trcnam_trp.F90	(revision 4624)
@@ -97,5 +97,5 @@
       READ  ( numnat_cfg, namtrc_adv, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_adv in configuration namelist', lwp )
-      WRITE ( numont, namtrc_adv )
+      IF(lwm) WRITE ( numont, namtrc_adv )
 
       IF(lwp) THEN                    ! Namelist print
@@ -119,5 +119,5 @@
       READ  ( numnat_cfg, namtrc_ldf, IOSTAT = ios, ERR = 904 )
 904   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_ldf in configuration namelist', lwp )
-      WRITE ( numont, namtrc_ldf )
+      IF(lwm) WRITE ( numont, namtrc_ldf )
 
       IF(lwp) THEN                    ! Namelist print
@@ -144,5 +144,5 @@
       READ  ( numnat_cfg, namtrc_zdf, IOSTAT = ios, ERR = 906 )
 906   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_zdf in configuration namelist', lwp )
-      WRITE ( numont, namtrc_zdf )
+      IF(lwm) WRITE ( numont, namtrc_zdf )
 
       IF(lwp) THEN                     !   ! Control print
@@ -161,5 +161,5 @@
       READ  ( numnat_cfg, namtrc_rad, IOSTAT = ios, ERR = 908 )
 908   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_rad in configuration namelist', lwp )
-      WRITE ( numont, namtrc_rad )
+      IF(lwm) WRITE ( numont, namtrc_rad )
 
       IF(lwp) THEN                     !   ! Control print
@@ -177,5 +177,5 @@
       READ  ( numnat_cfg, namtrc_dmp, IOSTAT = ios, ERR = 910)
 910   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_dmp in configuration namelist', lwp )
-      WRITE ( numont, namtrc_dmp )
+      IF(lwm) WRITE ( numont, namtrc_dmp )
 
       IF(lwp) THEN                       ! Namelist print
Index: /trunk/NEMOGCM/NEMO/TOP_SRC/trcbc.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/TOP_SRC/trcbc.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/TOP_SRC/trcbc.F90	(revision 4624)
@@ -141,5 +141,5 @@
       READ  ( numnat_cfg, namtrc_bc, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_bc in configuration namelist', lwp )
-      WRITE ( numont, namtrc_bc )
+      IF(lwm) WRITE ( numont, namtrc_bc )
 
       ! print some information for each 
Index: /trunk/NEMOGCM/NEMO/TOP_SRC/trcdta.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/TOP_SRC/trcdta.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/TOP_SRC/trcdta.F90	(revision 4624)
@@ -102,5 +102,5 @@
       READ  ( numnat_cfg, namtrc_dta, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_dta in configuration namelist', lwp )
-      WRITE ( numont, namtrc_dta )
+      IF(lwm) WRITE ( numont, namtrc_dta )
 
       IF( lwp ) THEN
Index: /trunk/NEMOGCM/NEMO/TOP_SRC/trcnam.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/TOP_SRC/trcnam.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/TOP_SRC/trcnam.F90	(revision 4624)
@@ -128,5 +128,5 @@
          READ  ( numnat_cfg, namtrc_trd, IOSTAT = ios, ERR = 906 )
 906      IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_trd in configuration namelist', lwp )
-         WRITE ( numont, namtrc_trd )
+         IF(lwm) WRITE ( numont, namtrc_trd )
 
          IF(lwp) THEN
@@ -187,5 +187,5 @@
       CALL ctl_opn( numnat_ref, 'namelist_top_ref'   , 'OLD'    , 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. )
       CALL ctl_opn( numnat_cfg, 'namelist_top_cfg'   , 'OLD'    , 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. )
-      CALL ctl_opn( numont    , 'output.namelist.top', 'UNKNOWN', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE., 1 )
+      IF(lwm) CALL ctl_opn( numont, 'output.namelist.top', 'UNKNOWN', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE., 1 )
 
       REWIND( numnat_ref )              ! Namelist namtrc in reference namelist : Passive tracer variables
@@ -196,5 +196,5 @@
       READ  ( numnat_cfg, namtrc_run, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc in configuration namelist', lwp )
-      WRITE ( numont, namtrc_run )
+      IF(lwm) WRITE ( numont, namtrc_run )
 
       !  computes the first time step of tracer model
@@ -242,5 +242,5 @@
       READ  ( numnat_cfg, namtrc, IOSTAT = ios, ERR = 902 )
 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc in configuration namelist', lwp )
-      WRITE ( numont, namtrc )
+      IF(lwm) WRITE ( numont, namtrc )
 
       DO jn = 1, jptra
@@ -291,5 +291,5 @@
       READ  ( numnat_cfg, namtrc_dia, IOSTAT = ios, ERR = 904 )
 904   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namtrc_dia in configuration namelist', lwp )
-      WRITE ( numont, namtrc_dia )
+      IF(lwm) WRITE ( numont, namtrc_dia )
 
       IF(lwp) THEN
Index: /trunk/NEMOGCM/NEMO/TOP_SRC/trcstp.F90
===================================================================
--- /trunk/NEMOGCM/NEMO/TOP_SRC/trcstp.F90	(revision 4623)
+++ /trunk/NEMOGCM/NEMO/TOP_SRC/trcstp.F90	(revision 4624)
@@ -97,5 +97,5 @@
          IF( kt == nittrc000 ) THEN
             CALL iom_close( numrtr )       ! close input tracer restart file
-            CALL FLUSH    ( numont )       ! flush namelist output
+            IF(lwm) CALL FLUSH( numont )   ! flush namelist output
          ENDIF
          IF( lrst_trc )            CALL trc_rst_wri  ( kt )       ! write tracer restart file
