Index: trunk/NEMOGCM/NEMO/OFF_SRC/domain.F90
===================================================================
--- trunk/NEMOGCM/NEMO/OFF_SRC/domain.F90	(revision 4570)
+++ 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 4570)
+++ 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 4570)
+++ 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 
