From ef33a0ffd7110f7a1d94275de34e48cd62ee19d0 Mon Sep 17 00:00:00 2001
From: Philippe WAUTELET <philippe.wautelet@aero.obs-mip.fr>
Date: Fri, 2 Jun 2017 15:45:00 +0200
Subject: [PATCH] Philippe 02/06/2017: IO: error code is now an optional
 argument of IO_WRITE_FIELD

---
 src/LIB/SURCOUCHE/src/fmwrit_ll.f90      | 313 ++++++++------
 src/LIB/SURCOUCHE/src/io_write_field.f90 |  54 ++-
 src/MNH/advection_metsv.f90              |   8 +-
 src/MNH/c2r2_adjust.f90                  |   2 +-
 src/MNH/call_rttov11.f90                 |   8 +-
 src/MNH/call_rttov8.f90                  |  16 +-
 src/MNH/compute_r00.f90                  |  10 +-
 src/MNH/free_atm_profile.f90             |   8 +-
 src/MNH/khko_notadjust.f90               |   4 +-
 src/MNH/lima_adjust.f90                  |   4 +-
 src/MNH/menu_diachro.f90                 |   4 +-
 src/MNH/mnhwrite_zs_dummyn.f90           |  24 +-
 src/MNH/paspol.f90                       |   3 +-
 src/MNH/prandtl.f90                      |  20 +-
 src/MNH/prep_ideal_case.f90              |   8 +-
 src/MNH/prep_nest_pgd.f90                |  20 +-
 src/MNH/prep_pgd.f90                     |  26 +-
 src/MNH/prep_surfex.f90                  |   8 +-
 src/MNH/radiations.f90                   |  98 ++---
 src/MNH/rain_c2r2_khko.f90               |   9 +-
 src/MNH/shallow_mf_pack.f90              |  11 +-
 src/MNH/tke_eps_sources.f90              |   9 +-
 src/MNH/turb.f90                         |  17 +-
 src/MNH/turb_cloud_index.f90             |  17 +-
 src/MNH/turb_hor_dyn_corr.f90            |   7 +-
 src/MNH/turb_hor_sv_flux.f90             |   5 +-
 src/MNH/turb_hor_thermo_corr.f90         |   7 +-
 src/MNH/turb_hor_thermo_flux.f90         |  13 +-
 src/MNH/turb_hor_uv.f90                  |   3 +-
 src/MNH/turb_hor_uw.f90                  |   3 +-
 src/MNH/turb_hor_vw.f90                  |   3 +-
 src/MNH/turb_ver.f90                     |   7 +-
 src/MNH/turb_ver_dyn_flux.f90            |   7 +-
 src/MNH/turb_ver_sv_flux.f90             |   3 +-
 src/MNH/turb_ver_thermo_corr.f90         |   7 +-
 src/MNH/turb_ver_thermo_flux.f90         |   7 +-
 src/MNH/uv_to_zonal_and_merid.f90        |   8 +-
 src/MNH/ver_thermo.f90                   |   2 +-
 src/MNH/write_balloonn.f90               |  12 +-
 src/MNH/write_budget.f90                 |   9 +-
 src/MNH/write_diachro.f90                |  30 +-
 src/MNH/write_dummy_gr_fieldn.f90        |   6 +-
 src/MNH/write_hgrid.f90                  |  24 +-
 src/MNH/write_hgridn.f90                 |  24 +-
 src/MNH/write_lbn.f90                    | 128 +++---
 src/MNH/write_lfifm1_for_diag.f90        | 484 ++++++++++-----------
 src/MNH/write_lfifm1_for_diag_supp.f90   | 134 +++---
 src/MNH/write_lfifmn_fordiachron.f90     |  76 ++--
 src/MNH/write_lfin.f90                   | 508 +++++++++++------------
 src/MNH/write_surf_mnh.f90               |  65 +--
 src/MNH/zoom_pgd.f90                     |  20 +-
 src/MNH/zsmt_pgd.f90                     |   4 +-
 52 files changed, 1157 insertions(+), 1150 deletions(-)

diff --git a/src/LIB/SURCOUCHE/src/fmwrit_ll.f90 b/src/LIB/SURCOUCHE/src/fmwrit_ll.f90
index 6d242bcbf..4b87a5079 100644
--- a/src/LIB/SURCOUCHE/src/fmwrit_ll.f90
+++ b/src/LIB/SURCOUCHE/src/fmwrit_ll.f90
@@ -317,8 +317,6 @@ CONTAINS
     CHARACTER(LEN=*),         INTENT(IN)  :: HLUOUT   ! File for prints in FM
     CHARACTER(LEN=*),OPTIONAL,INTENT(IN)  :: HDAD_NAME
     !
-    INTEGER :: IRESP
-    !
     CALL PRINT_MSG(NVERB_DEBUG,'IO','IO_WRITE_HEADER','called')
     !
     IF ( ASSOCIATED(TPFILE%TDADFILE) .AND. PRESENT(HDAD_NAME) ) THEN
@@ -329,19 +327,19 @@ CONTAINS
     !
     CALL IO_WRITE_HEADER_NC4(TPFILE,HLUOUT)
     !
-    CALL IO_WRITE_FIELD(TPFILE,'MASDEV',      HLUOUT,IRESP,NMASDEV)
-    CALL IO_WRITE_FIELD(TPFILE,'BUGFIX',      HLUOUT,IRESP,NBUGFIX)
-    CALL IO_WRITE_FIELD(TPFILE,'BIBUSER',     HLUOUT,IRESP,CBIBUSER)
-    CALL IO_WRITE_FIELD(TPFILE,'PROGRAM',     HLUOUT,IRESP,CPROGRAM)
-    CALL IO_WRITE_FIELD(TPFILE,'STORAGE_TYPE',HLUOUT,IRESP,CSTORAGE_TYPE)
-    CALL IO_WRITE_FIELD(TPFILE,'MY_NAME',     HLUOUT,IRESP,TPFILE%CNAME)
+    CALL IO_WRITE_FIELD(TPFILE,'MASDEV',      HLUOUT,NMASDEV)
+    CALL IO_WRITE_FIELD(TPFILE,'BUGFIX',      HLUOUT,NBUGFIX)
+    CALL IO_WRITE_FIELD(TPFILE,'BIBUSER',     HLUOUT,CBIBUSER)
+    CALL IO_WRITE_FIELD(TPFILE,'PROGRAM',     HLUOUT,CPROGRAM)
+    CALL IO_WRITE_FIELD(TPFILE,'STORAGE_TYPE',HLUOUT,CSTORAGE_TYPE)
+    CALL IO_WRITE_FIELD(TPFILE,'MY_NAME',     HLUOUT,TPFILE%CNAME)
     IF ( ASSOCIATED(TPFILE%TDADFILE) ) THEN
-      CALL IO_WRITE_FIELD(TPFILE,'DAD_NAME',HLUOUT,IRESP,TPFILE%TDADFILE%CNAME)
+      CALL IO_WRITE_FIELD(TPFILE,'DAD_NAME',HLUOUT,TPFILE%TDADFILE%CNAME)
     ELSE IF (PRESENT(HDAD_NAME)) THEN
-      CALL IO_WRITE_FIELD(TPFILE,'DAD_NAME',HLUOUT,IRESP,HDAD_NAME)
+      CALL IO_WRITE_FIELD(TPFILE,'DAD_NAME',HLUOUT,HDAD_NAME)
     ELSE
       CALL PRINT_MSG(NVERB_WARNING,'IO','IO_WRITE_HEADER','TPFILE%TDADFILE not associated and HDAD_NAME not provided')
-      CALL IO_WRITE_FIELD(TPFILE,'DAD_NAME',HLUOUT,IRESP,' ')
+      CALL IO_WRITE_FIELD(TPFILE,'DAD_NAME',HLUOUT,' ')
     ENDIF
     !
   END SUBROUTINE IO_WRITE_HEADER
@@ -440,7 +438,7 @@ CONTAINS
     KRESP = IRESP
   END SUBROUTINE FMWRITX0_ll
 
-  SUBROUTINE IO_WRITE_FIELD_BYNAME_X0(TPFILE,HNAME,HFIPRI,KRESP,PFIELD)
+  SUBROUTINE IO_WRITE_FIELD_BYNAME_X0(TPFILE,HNAME,HFIPRI,PFIELD,KRESP)
     !
     USE MODD_IO_ll, ONLY : TFILEDATA
     !
@@ -449,22 +447,25 @@ CONTAINS
     TYPE(TFILEDATA),           INTENT(IN) :: TPFILE
     CHARACTER(LEN=*),          INTENT(IN) :: HNAME    ! name of the field to write
     CHARACTER(LEN=*),          INTENT(IN) :: HFIPRI   ! output file for error messages
-    INTEGER,                   INTENT(OUT):: KRESP    ! return-code 
     REAL,                      INTENT(IN) :: PFIELD   ! array containing the data field
+    INTEGER,OPTIONAL,          INTENT(OUT):: KRESP    ! return-code 
     !
     !*      0.2   Declarations of local variables
     !
     INTEGER :: ID ! Index of the field
+    INTEGER :: IRESP ! return_code
     !
     CALL PRINT_MSG(NVERB_DEBUG,'IO','IO_WRITE_FIELD_BYNAME_X0','writing '//TRIM(HNAME))
     !
-    CALL FIND_FIELD_ID_FROM_MNHNAME(HNAME,ID,KRESP)
+    CALL FIND_FIELD_ID_FROM_MNHNAME(HNAME,ID,IRESP)
+    !
+    IF(IRESP==0) CALL IO_WRITE_FIELD(TPFILE,TFIELDLIST(ID),HFIPRI,PFIELD,IRESP)
     !
-    IF(KRESP==0) CALL IO_WRITE_FIELD(TPFILE,TFIELDLIST(ID),HFIPRI,KRESP,PFIELD)
+    IF (PRESENT(KRESP)) KRESP = IRESP
     !
   END SUBROUTINE IO_WRITE_FIELD_BYNAME_X0
 
-  SUBROUTINE IO_WRITE_FIELD_BYFIELD_X0(TPFILE,TPFIELD,HFIPRI,KRESP,PFIELD)
+  SUBROUTINE IO_WRITE_FIELD_BYFIELD_X0(TPFILE,TPFIELD,HFIPRI,PFIELD,KRESP)
     USE MODD_IO_ll
     USE MODE_FD_ll, ONLY : GETFD,JPFINL,FD_LL
     USE MODE_IO_MANAGE_STRUCT, ONLY: IO_FILE_FIND_BYNAME
@@ -476,8 +477,8 @@ CONTAINS
     TYPE(TFILEDATA),             INTENT(IN) :: TPFILE
     TYPE(TFIELDDATA),            INTENT(IN) :: TPFIELD
     CHARACTER(LEN=*),            INTENT(IN) :: HFIPRI   ! output file for error messages
-    INTEGER,                     INTENT(OUT):: KRESP    ! return-code 
     REAL,TARGET,                 INTENT(IN) :: PFIELD   ! array containing the data field
+    INTEGER,OPTIONAL,            INTENT(OUT):: KRESP    ! return-code 
     !
     !*      0.2   Declarations of local variables
     !
@@ -548,7 +549,7 @@ CONTAINS
     IF (IRESP.NE.0) THEN
        CALL FM_WRIT_ERR("IO_WRITE_FIELD_BYFIELD_X0",YFILEM,HFIPRI,YRECFM,YDIR,TPFIELD%NGRID,LEN(TPFIELD%CCOMMENT),IRESP)
     END IF
-    KRESP = IRESP
+    IF (PRESENT(KRESP)) KRESP = IRESP
   END SUBROUTINE IO_WRITE_FIELD_BYFIELD_X0
 
   SUBROUTINE FMWRITX1_ll(HFILEM,HRECFM,HFIPRI,HDIR,PFIELD,KGRID,&
@@ -635,7 +636,7 @@ CONTAINS
     KRESP = IRESP
   END SUBROUTINE FMWRITX1_ll
 
-  SUBROUTINE IO_WRITE_FIELD_BYNAME_X1(TPFILE,HNAME,HFIPRI,KRESP,PFIELD)
+  SUBROUTINE IO_WRITE_FIELD_BYNAME_X1(TPFILE,HNAME,HFIPRI,PFIELD,KRESP)
     !
     USE MODD_IO_ll, ONLY : TFILEDATA
     !
@@ -644,22 +645,25 @@ CONTAINS
     TYPE(TFILEDATA),           INTENT(IN) :: TPFILE
     CHARACTER(LEN=*),          INTENT(IN) :: HNAME    ! name of the field to write
     CHARACTER(LEN=*),          INTENT(IN) :: HFIPRI   ! output file for error messages
-    INTEGER,                   INTENT(OUT):: KRESP    ! return-code 
     REAL,DIMENSION(:),         INTENT(IN) :: PFIELD   ! array containing the data field
+    INTEGER,OPTIONAL,          INTENT(OUT):: KRESP    ! return-code 
     !
     !*      0.2   Declarations of local variables
     !
     INTEGER :: ID ! Index of the field
+    INTEGER :: IRESP ! return-code 
     !
     CALL PRINT_MSG(NVERB_DEBUG,'IO','IO_WRITE_FIELD_BYNAME_X1','writing '//TRIM(HNAME))
     !
-    CALL FIND_FIELD_ID_FROM_MNHNAME(HNAME,ID,KRESP)
+    CALL FIND_FIELD_ID_FROM_MNHNAME(HNAME,ID,IRESP)
     !
-    IF(KRESP==0) CALL IO_WRITE_FIELD(TPFILE,TFIELDLIST(ID),HFIPRI,KRESP,PFIELD)
+    IF(IRESP==0) CALL IO_WRITE_FIELD(TPFILE,TFIELDLIST(ID),HFIPRI,PFIELD,IRESP)
+    !
+    IF (PRESENT(KRESP)) KRESP = IRESP
     !
   END SUBROUTINE IO_WRITE_FIELD_BYNAME_X1
 
-  SUBROUTINE IO_WRITE_FIELD_BYFIELD_X1(TPFILE,TPFIELD,HFIPRI,KRESP,PFIELD)
+  SUBROUTINE IO_WRITE_FIELD_BYFIELD_X1(TPFILE,TPFIELD,HFIPRI,PFIELD,KRESP)
     USE MODD_IO_ll
     USE MODE_FD_ll, ONLY : GETFD,JPFINL,FD_LL
     USE MODE_ALLOCBUFFER_ll
@@ -673,8 +677,8 @@ CONTAINS
     TYPE(TFILEDATA),             INTENT(IN) :: TPFILE
     TYPE(TFIELDDATA),            INTENT(IN) :: TPFIELD
     CHARACTER(LEN=*),            INTENT(IN) :: HFIPRI   ! output file for error messages
-    INTEGER,                     INTENT(OUT):: KRESP    ! return-code 
     REAL,DIMENSION(:),TARGET,    INTENT(IN) :: PFIELD   ! array containing the data field
+    INTEGER,OPTIONAL,            INTENT(OUT):: KRESP    ! return-code 
     !
     !*      0.2   Declarations of local variables
     !
@@ -741,7 +745,7 @@ CONTAINS
        CALL FM_WRIT_ERR("IO_WRITE_FIELD_BYFIELD_X1",YFILEM,HFIPRI,YRECFM,YDIR,TPFIELD%NGRID,LEN(TPFIELD%CCOMMENT),IRESP)
     END IF
     IF (GALLOC) DEALLOCATE(ZFIELDP)
-    KRESP = IRESP
+    IF (PRESENT(KRESP)) KRESP = IRESP
   END SUBROUTINE IO_WRITE_FIELD_BYFIELD_X1
 
   SUBROUTINE FMWRITX2_ll(HFILEM,HRECFM,HFIPRI,HDIR,PFIELD,KGRID,&
@@ -921,7 +925,7 @@ CONTAINS
     TIMEZ%T_WRIT2D_ALL=TIMEZ%T_WRIT2D_ALL + T22 - T11
   END SUBROUTINE FMWRITX2_ll
 
-  SUBROUTINE IO_WRITE_FIELD_BYNAME_X2(TPFILE,HNAME,HFIPRI,KRESP,PFIELD)
+  SUBROUTINE IO_WRITE_FIELD_BYNAME_X2(TPFILE,HNAME,HFIPRI,PFIELD,KRESP)
     !
     USE MODD_IO_ll, ONLY : TFILEDATA
     !
@@ -930,22 +934,25 @@ CONTAINS
     TYPE(TFILEDATA),           INTENT(IN) :: TPFILE
     CHARACTER(LEN=*),          INTENT(IN) :: HNAME    ! name of the field to write
     CHARACTER(LEN=*),          INTENT(IN) :: HFIPRI   ! output file for error messages
-    INTEGER,                   INTENT(OUT):: KRESP    ! return-code 
     REAL,DIMENSION(:,:),       INTENT(IN) :: PFIELD   ! array containing the data field
+    INTEGER,OPTIONAL,          INTENT(OUT):: KRESP    ! return-code 
     !
     !*      0.2   Declarations of local variables
     !
     INTEGER :: ID ! Index of the field
+    INTEGER :: IRESP ! return-code 
     !
     CALL PRINT_MSG(NVERB_DEBUG,'IO','IO_WRITE_FIELD_BYNAME_X2','writing '//TRIM(HNAME))
     !
-    CALL FIND_FIELD_ID_FROM_MNHNAME(HNAME,ID,KRESP)
+    CALL FIND_FIELD_ID_FROM_MNHNAME(HNAME,ID,IRESP)
     !
-    IF(KRESP==0) CALL IO_WRITE_FIELD(TPFILE,TFIELDLIST(ID),HFIPRI,KRESP,PFIELD)
+    IF(IRESP==0) CALL IO_WRITE_FIELD(TPFILE,TFIELDLIST(ID),HFIPRI,PFIELD,IRESP)
+    !
+    IF (PRESENT(KRESP)) KRESP = IRESP
     !
   END SUBROUTINE IO_WRITE_FIELD_BYNAME_X2
 
-  SUBROUTINE IO_WRITE_FIELD_BYFIELD_X2(TPFILE,TPFIELD,HFIPRI,KRESP,PFIELD)
+  SUBROUTINE IO_WRITE_FIELD_BYFIELD_X2(TPFILE,TPFIELD,HFIPRI,PFIELD,KRESP)
     USE MODD_IO_ll
     USE MODD_PARAMETERS_ll,ONLY : JPHEXT
     USE MODE_FD_ll, ONLY : GETFD,JPFINL,FD_LL
@@ -966,8 +973,8 @@ CONTAINS
     TYPE(TFILEDATA),             INTENT(IN) :: TPFILE
     TYPE(TFIELDDATA),            INTENT(IN) :: TPFIELD
     CHARACTER(LEN=*),            INTENT(IN) :: HFIPRI   ! output file for error messages
-    INTEGER,                     INTENT(OUT):: KRESP    ! return-code 
     REAL,DIMENSION(:,:),TARGET,  INTENT(IN) :: PFIELD   ! array containing the data field
+    INTEGER,OPTIONAL,            INTENT(OUT):: KRESP    ! return-code 
     !
     !*      0.2   Declarations of local variables
     !
@@ -1110,7 +1117,7 @@ CONTAINS
        CALL FM_WRIT_ERR("IO_WRITE_FIELD_BYFIELD_X2",YFILEM,HFIPRI,YRECFM,YDIR,TPFIELD%NGRID,LEN(TPFIELD%CCOMMENT),IRESP)
     END IF
     IF (GALLOC) DEALLOCATE(ZFIELDP)
-    KRESP = IRESP
+    IF (PRESENT(KRESP)) KRESP = IRESP
     IF (ASSOCIATED(TZFD)) CALL MPI_BARRIER(TZFD%COMM,IERR)
     CALL SECOND_MNH2(T22)
     TIMEZ%T_WRIT2D_ALL=TIMEZ%T_WRIT2D_ALL + T22 - T11
@@ -1480,7 +1487,7 @@ CONTAINS
     TIMEZ%T_WRIT3D_ALL=TIMEZ%T_WRIT3D_ALL + T22 - T11
   END SUBROUTINE FMWRITX3_ll
 
-  SUBROUTINE IO_WRITE_FIELD_BYNAME_X3(TPFILE,HNAME,HFIPRI,KRESP,PFIELD)
+  SUBROUTINE IO_WRITE_FIELD_BYNAME_X3(TPFILE,HNAME,HFIPRI,PFIELD,KRESP)
     !
     USE MODD_IO_ll, ONLY : TFILEDATA
     !
@@ -1489,22 +1496,25 @@ CONTAINS
     TYPE(TFILEDATA),             INTENT(IN) :: TPFILE
     CHARACTER(LEN=*),            INTENT(IN) :: HNAME    ! name of the field to write
     CHARACTER(LEN=*),            INTENT(IN) :: HFIPRI   ! output file for error messages
-    INTEGER,                     INTENT(OUT):: KRESP    ! return-code 
     REAL,DIMENSION(:,:,:),       INTENT(IN) :: PFIELD   ! array containing the data field
+    INTEGER,OPTIONAL,            INTENT(OUT):: KRESP    ! return-code 
     !
     !*      0.2   Declarations of local variables
     !
     INTEGER :: ID ! Index of the field
+    INTEGER :: IRESP ! return_code
     !
     CALL PRINT_MSG(NVERB_DEBUG,'IO','IO_WRITE_FIELD_BYNAME_X3','writing '//TRIM(HNAME))
     !
-    CALL FIND_FIELD_ID_FROM_MNHNAME(HNAME,ID,KRESP)
+    CALL FIND_FIELD_ID_FROM_MNHNAME(HNAME,ID,IRESP)
     !
-    IF(KRESP==0) CALL IO_WRITE_FIELD(TPFILE,TFIELDLIST(ID),HFIPRI,KRESP,PFIELD)
+    IF(IRESP==0) CALL IO_WRITE_FIELD(TPFILE,TFIELDLIST(ID),HFIPRI,PFIELD,IRESP)
+    !
+    IF (PRESENT(KRESP)) KRESP = IRESP
     !
   END SUBROUTINE IO_WRITE_FIELD_BYNAME_X3
 
-  SUBROUTINE IO_WRITE_FIELD_BYFIELD_X3(TPFILE,TPFIELD,HFIPRI,KRESP,PFIELD)
+  SUBROUTINE IO_WRITE_FIELD_BYFIELD_X3(TPFILE,TPFIELD,HFIPRI,PFIELD,KRESP)
     USE MODD_IO_ll
     USE MODD_PARAMETERS_ll,ONLY : JPHEXT
     USE MODE_FD_ll, ONLY : GETFD,JPFINL,FD_LL
@@ -1526,8 +1536,8 @@ CONTAINS
     TYPE(TFILEDATA),             INTENT(IN) :: TPFILE
     TYPE(TFIELDDATA),            INTENT(IN) :: TPFIELD
     CHARACTER(LEN=*),            INTENT(IN) :: HFIPRI   ! output file for error messages
-    INTEGER,                     INTENT(OUT):: KRESP    ! return-code 
     REAL,DIMENSION(:,:,:),TARGET,INTENT(IN) :: PFIELD   ! array containing the data field
+    INTEGER,OPTIONAL,            INTENT(OUT):: KRESP    ! return-code 
     !
     !*      0.2   Declarations of local variables
     !
@@ -1842,7 +1852,7 @@ CONTAINS
     IF (GALLOC) DEALLOCATE(ZFIELDP)
     IF (GALLOC_ll) DEALLOCATE(ZSLIDE_ll)
     !IF (Associated(ZSLIDE_ll)) DEALLOCATE(ZSLIDE_ll)
-    KRESP = IRESP
+    IF (PRESENT(KRESP)) KRESP = IRESP
     IF (ASSOCIATED(TZFD)) CALL MPI_BARRIER(TZFD%COMM,IERR)
     CALL SECOND_MNH2(T22)
     TIMEZ%T_WRIT3D_ALL=TIMEZ%T_WRIT3D_ALL + T22 - T11
@@ -1950,7 +1960,7 @@ CONTAINS
     KRESP = IRESP
   END SUBROUTINE FMWRITX4_ll
 
-  SUBROUTINE IO_WRITE_FIELD_BYNAME_X4(TPFILE,HNAME,HFIPRI,KRESP,PFIELD)
+  SUBROUTINE IO_WRITE_FIELD_BYNAME_X4(TPFILE,HNAME,HFIPRI,PFIELD,KRESP)
     !
     USE MODD_IO_ll, ONLY : TFILEDATA
     !
@@ -1959,22 +1969,25 @@ CONTAINS
     TYPE(TFILEDATA),             INTENT(IN) :: TPFILE
     CHARACTER(LEN=*),            INTENT(IN) :: HNAME    ! name of the field to write
     CHARACTER(LEN=*),            INTENT(IN) :: HFIPRI   ! output file for error messages
-    INTEGER,                     INTENT(OUT):: KRESP    ! return-code 
     REAL,DIMENSION(:,:,:,:),     INTENT(IN) :: PFIELD   ! array containing the data field
+    INTEGER,OPTIONAL,            INTENT(OUT):: KRESP    ! return-code 
     !
     !*      0.2   Declarations of local variables
     !
     INTEGER :: ID ! Index of the field
+    INTEGER :: IRESP ! return_code
     !
     CALL PRINT_MSG(NVERB_DEBUG,'IO','IO_WRITE_FIELD_BYNAME_X4','writing '//TRIM(HNAME))
     !
-    CALL FIND_FIELD_ID_FROM_MNHNAME(HNAME,ID,KRESP)
+    CALL FIND_FIELD_ID_FROM_MNHNAME(HNAME,ID,IRESP)
     !
-    IF(KRESP==0) CALL IO_WRITE_FIELD(TPFILE,TFIELDLIST(ID),HFIPRI,KRESP,PFIELD)
+    IF(IRESP==0) CALL IO_WRITE_FIELD(TPFILE,TFIELDLIST(ID),HFIPRI,PFIELD,IRESP)
+    !
+    IF (PRESENT(KRESP)) KRESP = IRESP
     !
   END SUBROUTINE IO_WRITE_FIELD_BYNAME_X4
 
-  SUBROUTINE IO_WRITE_FIELD_BYFIELD_X4(TPFILE,TPFIELD,HFIPRI,KRESP,PFIELD)
+  SUBROUTINE IO_WRITE_FIELD_BYFIELD_X4(TPFILE,TPFIELD,HFIPRI,PFIELD,KRESP)
     USE MODD_IO_ll
     USE MODD_PARAMETERS_ll,ONLY : JPHEXT
     USE MODE_FD_ll, ONLY : GETFD,JPFINL,FD_LL
@@ -1993,8 +2006,8 @@ CONTAINS
     TYPE(TFILEDATA),                 INTENT(IN) :: TPFILE
     TYPE(TFIELDDATA),                INTENT(IN) :: TPFIELD
     CHARACTER(LEN=*),                INTENT(IN) :: HFIPRI   ! output file for error messages
-    INTEGER,                         INTENT(OUT):: KRESP    ! return-code 
     REAL,DIMENSION(:,:,:,:),TARGET,  INTENT(IN) :: PFIELD   ! array containing the data field
+    INTEGER,OPTIONAL,                INTENT(OUT):: KRESP    ! return-code 
     !
     !*      0.2   Declarations of local variables
     !
@@ -2071,7 +2084,7 @@ CONTAINS
        CALL FM_WRIT_ERR("IO_WRITE_FIELD_BYFIELD_X4",YFILEM,HFIPRI,YRECFM,YDIR,TPFIELD%NGRID,LEN(TPFIELD%CCOMMENT),IRESP)
     END IF
     IF (GALLOC) DEALLOCATE(ZFIELDP)
-    KRESP = IRESP
+    IF (PRESENT(KRESP)) KRESP = IRESP
   END SUBROUTINE IO_WRITE_FIELD_BYFIELD_X4
 
   SUBROUTINE FMWRITX5_ll(HFILEM,HRECFM,HFIPRI,HDIR,PFIELD,KGRID,&
@@ -2177,7 +2190,7 @@ CONTAINS
     KRESP = IRESP
   END SUBROUTINE FMWRITX5_ll
 
-  SUBROUTINE IO_WRITE_FIELD_BYNAME_X5(TPFILE,HNAME,HFIPRI,KRESP,PFIELD)
+  SUBROUTINE IO_WRITE_FIELD_BYNAME_X5(TPFILE,HNAME,HFIPRI,PFIELD,KRESP)
     !
     USE MODD_IO_ll, ONLY : TFILEDATA
     !
@@ -2186,22 +2199,25 @@ CONTAINS
     TYPE(TFILEDATA),             INTENT(IN) :: TPFILE
     CHARACTER(LEN=*),            INTENT(IN) :: HNAME    ! name of the field to write
     CHARACTER(LEN=*),            INTENT(IN) :: HFIPRI   ! output file for error messages
-    INTEGER,                     INTENT(OUT):: KRESP    ! return-code 
     REAL,DIMENSION(:,:,:,:,:),   INTENT(IN) :: PFIELD   ! array containing the data field
+    INTEGER,OPTIONAL,            INTENT(OUT):: KRESP    ! return-code 
     !
     !*      0.2   Declarations of local variables
     !
     INTEGER :: ID ! Index of the field
+    INTEGER :: IRESP ! return_code
     !
     CALL PRINT_MSG(NVERB_DEBUG,'IO','IO_WRITE_FIELD_BYNAME_X5','writing '//TRIM(HNAME))
     !
-    CALL FIND_FIELD_ID_FROM_MNHNAME(HNAME,ID,KRESP)
+    CALL FIND_FIELD_ID_FROM_MNHNAME(HNAME,ID,IRESP)
+    !
+    IF(IRESP==0) CALL IO_WRITE_FIELD(TPFILE,TFIELDLIST(ID),HFIPRI,PFIELD,IRESP)
     !
-    IF(KRESP==0) CALL IO_WRITE_FIELD(TPFILE,TFIELDLIST(ID),HFIPRI,KRESP,PFIELD)
+    IF (PRESENT(KRESP)) KRESP = IRESP
     !
   END SUBROUTINE IO_WRITE_FIELD_BYNAME_X5
 
-  SUBROUTINE IO_WRITE_FIELD_BYFIELD_X5(TPFILE,TPFIELD,HFIPRI,KRESP,PFIELD)
+  SUBROUTINE IO_WRITE_FIELD_BYFIELD_X5(TPFILE,TPFIELD,HFIPRI,PFIELD,KRESP)
     USE MODD_IO_ll
     USE MODD_PARAMETERS_ll,ONLY : JPHEXT
     USE MODE_FD_ll, ONLY : GETFD,JPFINL,FD_LL
@@ -2220,8 +2236,8 @@ CONTAINS
     TYPE(TFILEDATA),                 INTENT(IN) :: TPFILE
     TYPE(TFIELDDATA),                INTENT(IN) :: TPFIELD
     CHARACTER(LEN=*),                INTENT(IN) :: HFIPRI   ! output file for error messages
-    INTEGER,                         INTENT(OUT):: KRESP    ! return-code 
     REAL,DIMENSION(:,:,:,:,:),TARGET,INTENT(IN) :: PFIELD   ! array containing the data field
+    INTEGER,OPTIONAL,                INTENT(OUT):: KRESP    ! return-code 
     !
     !*      0.2   Declarations of local variables
     !
@@ -2299,7 +2315,7 @@ CONTAINS
        CALL FM_WRIT_ERR("IO_WRITE_FIELD_BYFIELD_X5",YFILEM,HFIPRI,YRECFM,YDIR,TPFIELD%NGRID,LEN(TPFIELD%CCOMMENT),IRESP)
     END IF
     IF (GALLOC) DEALLOCATE(ZFIELDP)
-    KRESP = IRESP
+    IF (PRESENT(KRESP)) KRESP = IRESP
   END SUBROUTINE IO_WRITE_FIELD_BYFIELD_X5
 
   SUBROUTINE FMWRITX6_ll(HFILEM,HRECFM,HFIPRI,HDIR,PFIELD,KGRID,&
@@ -2386,7 +2402,7 @@ CONTAINS
     KRESP = IRESP
   END SUBROUTINE FMWRITX6_ll
 
-  SUBROUTINE IO_WRITE_FIELD_BYNAME_X6(TPFILE,HNAME,HFIPRI,KRESP,PFIELD)
+  SUBROUTINE IO_WRITE_FIELD_BYNAME_X6(TPFILE,HNAME,HFIPRI,PFIELD,KRESP)
     !
     USE MODD_IO_ll, ONLY : TFILEDATA
     !
@@ -2395,22 +2411,25 @@ CONTAINS
     TYPE(TFILEDATA),             INTENT(IN) :: TPFILE
     CHARACTER(LEN=*),            INTENT(IN) :: HNAME    ! name of the field to write
     CHARACTER(LEN=*),            INTENT(IN) :: HFIPRI   ! output file for error messages
-    INTEGER,                     INTENT(OUT):: KRESP    ! return-code 
     REAL,DIMENSION(:,:,:,:,:,:), INTENT(IN) :: PFIELD   ! array containing the data field
+    INTEGER,OPTIONAL,            INTENT(OUT):: KRESP    ! return-code 
     !
     !*      0.2   Declarations of local variables
     !
     INTEGER :: ID ! Index of the field
+    INTEGER :: IRESP ! return_code
     !
     CALL PRINT_MSG(NVERB_DEBUG,'IO','IO_WRITE_FIELD_BYNAME_X6','writing '//TRIM(HNAME))
     !
-    CALL FIND_FIELD_ID_FROM_MNHNAME(HNAME,ID,KRESP)
+    CALL FIND_FIELD_ID_FROM_MNHNAME(HNAME,ID,IRESP)
+    !
+    IF(IRESP==0) CALL IO_WRITE_FIELD(TPFILE,TFIELDLIST(ID),HFIPRI,PFIELD,IRESP)
     !
-    IF(KRESP==0) CALL IO_WRITE_FIELD(TPFILE,TFIELDLIST(ID),HFIPRI,KRESP,PFIELD)
+    IF (PRESENT(KRESP)) KRESP = IRESP
     !
   END SUBROUTINE IO_WRITE_FIELD_BYNAME_X6
 
-  SUBROUTINE IO_WRITE_FIELD_BYFIELD_X6(TPFILE,TPFIELD,HFIPRI,KRESP,PFIELD)
+  SUBROUTINE IO_WRITE_FIELD_BYFIELD_X6(TPFILE,TPFIELD,HFIPRI,PFIELD,KRESP)
     USE MODD_IO_ll
     USE MODD_PARAMETERS_ll,ONLY : JPHEXT
     USE MODE_FD_ll, ONLY : GETFD,JPFINL,FD_LL
@@ -2429,8 +2448,8 @@ CONTAINS
     TYPE(TFILEDATA),                   INTENT(IN) :: TPFILE
     TYPE(TFIELDDATA),                  INTENT(IN) :: TPFIELD
     CHARACTER(LEN=*),                  INTENT(IN) :: HFIPRI   ! output file for error messages
-    INTEGER,                           INTENT(OUT):: KRESP    ! return-code 
     REAL,DIMENSION(:,:,:,:,:,:),TARGET,INTENT(IN) :: PFIELD   ! array containing the data field
+    INTEGER,OPTIONAL,                  INTENT(OUT):: KRESP    ! return-code 
     !
     !*      0.2   Declarations of local variables
     !
@@ -2493,7 +2512,7 @@ CONTAINS
        CALL FM_WRIT_ERR("IO_WRITE_FIELD_BYFIELD_X6",YFILEM,HFIPRI,YRECFM,YDIR,TPFIELD%NGRID,LEN(TPFIELD%CCOMMENT),IRESP)
     END IF
     IF (GALLOC) DEALLOCATE(ZFIELDP)
-    KRESP = IRESP
+    IF (PRESENT(KRESP)) KRESP = IRESP
   END SUBROUTINE IO_WRITE_FIELD_BYFIELD_X6
 
   SUBROUTINE FMWRITN0_ll(HFILEM,HRECFM,HFIPRI,HDIR,KFIELD,KGRID,&
@@ -2589,7 +2608,7 @@ CONTAINS
     KRESP = IRESP
   END SUBROUTINE FMWRITN0_ll
 
-  SUBROUTINE IO_WRITE_FIELD_BYNAME_N0(TPFILE,HNAME,HFIPRI,KRESP,KFIELD)
+  SUBROUTINE IO_WRITE_FIELD_BYNAME_N0(TPFILE,HNAME,HFIPRI,KFIELD,KRESP)
     !
     USE MODD_IO_ll, ONLY : TFILEDATA
     !
@@ -2598,22 +2617,25 @@ CONTAINS
     TYPE(TFILEDATA),             INTENT(IN) :: TPFILE
     CHARACTER(LEN=*),            INTENT(IN) :: HNAME    ! name of the field to write
     CHARACTER(LEN=*),            INTENT(IN) :: HFIPRI   ! output file for error messages
-    INTEGER,                     INTENT(OUT):: KRESP    ! return-code 
     INTEGER,                     INTENT(IN) :: KFIELD   ! array containing the data field
+    INTEGER,OPTIONAL,            INTENT(OUT):: KRESP    ! return-code 
     !
     !*      0.2   Declarations of local variables
     !
     INTEGER :: ID ! Index of the field
+    INTEGER :: IRESP ! return_code
     !
     CALL PRINT_MSG(NVERB_DEBUG,'IO','IO_WRITE_FIELD_BYNAME_N0','writing '//TRIM(HNAME))
     !
-    CALL FIND_FIELD_ID_FROM_MNHNAME(HNAME,ID,KRESP)
+    CALL FIND_FIELD_ID_FROM_MNHNAME(HNAME,ID,IRESP)
+    !
+    IF(IRESP==0) CALL IO_WRITE_FIELD(TPFILE,TFIELDLIST(ID),HFIPRI,KFIELD,IRESP)
     !
-    IF(KRESP==0) CALL IO_WRITE_FIELD(TPFILE,TFIELDLIST(ID),HFIPRI,KRESP,KFIELD)
+    IF (PRESENT(KRESP)) KRESP = IRESP
     !
   END SUBROUTINE IO_WRITE_FIELD_BYNAME_N0
 
-  SUBROUTINE IO_WRITE_FIELD_BYFIELD_N0(TPFILE,TPFIELD,HFIPRI,KRESP,KFIELD)
+  SUBROUTINE IO_WRITE_FIELD_BYFIELD_N0(TPFILE,TPFIELD,HFIPRI,KFIELD,KRESP)
     USE MODD_IO_ll
     USE MODD_FM
     USE MODE_FD_ll, ONLY : GETFD,JPFINL,FD_LL
@@ -2627,8 +2649,8 @@ CONTAINS
     TYPE(TFILEDATA),             INTENT(IN) :: TPFILE
     TYPE(TFIELDDATA),            INTENT(IN) :: TPFIELD
     CHARACTER(LEN=*),            INTENT(IN) :: HFIPRI   ! output file for error messages
-    INTEGER,                     INTENT(OUT):: KRESP    ! return-code 
     INTEGER,                     INTENT(IN) :: KFIELD   ! array containing the data field
+    INTEGER,OPTIONAL,            INTENT(OUT):: KRESP    ! return-code 
     !
     !*      0.2   Declarations of local variables
     !
@@ -2689,7 +2711,7 @@ CONTAINS
        CALL FM_WRIT_ERR("IO_WRITE_FIELD_BYFIELD_N0",TPFILE%CNAME,HFIPRI,TPFIELD%CMNHNAME,TPFIELD%CDIR,TPFIELD%NGRID,&
                         LEN(TPFIELD%CCOMMENT) ,IRESP)
     END IF
-    KRESP = IRESP
+    IF (PRESENT(KRESP)) KRESP = IRESP
   END SUBROUTINE IO_WRITE_FIELD_BYFIELD_N0
 
   SUBROUTINE FMWRITN1_ll(HFILEM,HRECFM,HFIPRI,HDIR,KFIELD,KGRID,&
@@ -2780,7 +2802,7 @@ CONTAINS
   END SUBROUTINE FMWRITN1_ll
 
 
-  SUBROUTINE IO_WRITE_FIELD_BYNAME_N1(TPFILE,HNAME,HFIPRI,KRESP,KFIELD)
+  SUBROUTINE IO_WRITE_FIELD_BYNAME_N1(TPFILE,HNAME,HFIPRI,KFIELD,KRESP)
     !
     USE MODD_IO_ll, ONLY : TFILEDATA
     !
@@ -2789,23 +2811,26 @@ CONTAINS
     TYPE(TFILEDATA),             INTENT(IN) :: TPFILE
     CHARACTER(LEN=*),            INTENT(IN) :: HNAME    ! name of the field to write
     CHARACTER(LEN=*),            INTENT(IN) :: HFIPRI   ! output file for error messages
-    INTEGER,                     INTENT(OUT):: KRESP    ! return-code 
     INTEGER,DIMENSION(:),        INTENT(IN) :: KFIELD   ! array containing the data field
+    INTEGER,OPTIONAL,            INTENT(OUT):: KRESP    ! return-code 
     !
     !*      0.2   Declarations of local variables
     !
     INTEGER :: ID ! Index of the field
+    INTEGER :: IRESP ! return_code
     !
     CALL PRINT_MSG(NVERB_DEBUG,'IO','IO_WRITE_FIELD_BYNAME_N1','writing '//TRIM(HNAME))
     !
-    CALL FIND_FIELD_ID_FROM_MNHNAME(HNAME,ID,KRESP)
+    CALL FIND_FIELD_ID_FROM_MNHNAME(HNAME,ID,IRESP)
+    !
+    IF(IRESP==0) CALL IO_WRITE_FIELD(TPFILE,TFIELDLIST(ID),HFIPRI,KFIELD,IRESP)
     !
-    IF(KRESP==0) CALL IO_WRITE_FIELD(TPFILE,TFIELDLIST(ID),HFIPRI,KRESP,KFIELD)
+    IF (PRESENT(KRESP)) KRESP = IRESP
     !
   END SUBROUTINE IO_WRITE_FIELD_BYNAME_N1
 
 
-  SUBROUTINE IO_WRITE_FIELD_BYFIELD_N1(TPFILE,TPFIELD,HFIPRI,KRESP,KFIELD)
+  SUBROUTINE IO_WRITE_FIELD_BYFIELD_N1(TPFILE,TPFIELD,HFIPRI,KFIELD,KRESP)
     !
     USE MODD_IO_ll, ONLY : ISP,GSMONOPROC,LIOCDF4,LLFIOUT,TFILEDATA
     USE MODE_FD_ll, ONLY : GETFD,JPFINL,FD_LL
@@ -2819,8 +2844,8 @@ CONTAINS
     TYPE(TFILEDATA),              INTENT(IN) :: TPFILE
     TYPE(TFIELDDATA),             INTENT(IN) :: TPFIELD
     CHARACTER(LEN=*),             INTENT(IN) :: HFIPRI   ! output file for error messages
-    INTEGER,                      INTENT(OUT):: KRESP    ! return-code 
     INTEGER,DIMENSION(:),TARGET,  INTENT(IN) :: KFIELD   ! array containing the data field
+    INTEGER,OPTIONAL,             INTENT(OUT):: KRESP    ! return-code 
     !
     !*      0.2   Declarations of local variables
     !
@@ -2880,7 +2905,7 @@ CONTAINS
        CALL FM_WRIT_ERR("IO_WRITE_FIELD_BYFIELD_N1",YFILEM,HFIPRI,YRECFM,YDIR,TPFIELD%NGRID,LEN(TPFIELD%CCOMMENT),IRESP)
     END IF
     IF (GALLOC) DEALLOCATE(IFIELDP)
-    KRESP = IRESP
+    IF (PRESENT(KRESP)) KRESP = IRESP
     IF (ASSOCIATED(TZFD)) CALL MPI_BARRIER(TZFD%COMM,IERR)
     !
   END SUBROUTINE IO_WRITE_FIELD_BYFIELD_N1
@@ -2991,7 +3016,7 @@ CONTAINS
   END SUBROUTINE FMWRITN2_ll
 
 
-  SUBROUTINE IO_WRITE_FIELD_BYNAME_N2(TPFILE,HNAME,HFIPRI,KRESP,KFIELD)
+  SUBROUTINE IO_WRITE_FIELD_BYNAME_N2(TPFILE,HNAME,HFIPRI,KFIELD,KRESP)
     !
     USE MODD_IO_ll, ONLY : TFILEDATA
     !
@@ -3000,23 +3025,26 @@ CONTAINS
     TYPE(TFILEDATA),             INTENT(IN) :: TPFILE
     CHARACTER(LEN=*),            INTENT(IN) :: HNAME    ! name of the field to write
     CHARACTER(LEN=*),            INTENT(IN) :: HFIPRI   ! output file for error messages
-    INTEGER,                     INTENT(OUT):: KRESP    ! return-code 
     INTEGER,DIMENSION(:,:),      INTENT(IN) :: KFIELD   ! array containing the data field
+    INTEGER,OPTIONAL,            INTENT(OUT):: KRESP    ! return-code 
     !
     !*      0.2   Declarations of local variables
     !
     INTEGER :: ID ! Index of the field
+    INTEGER :: IRESP ! return_code
     !
     CALL PRINT_MSG(NVERB_DEBUG,'IO','IO_WRITE_FIELD_BYNAME_N2','writing '//TRIM(HNAME))
     !
-    CALL FIND_FIELD_ID_FROM_MNHNAME(HNAME,ID,KRESP)
+    CALL FIND_FIELD_ID_FROM_MNHNAME(HNAME,ID,IRESP)
+    !
+    IF(IRESP==0) CALL IO_WRITE_FIELD(TPFILE,TFIELDLIST(ID),HFIPRI,KFIELD,IRESP)
     !
-    IF(KRESP==0) CALL IO_WRITE_FIELD(TPFILE,TFIELDLIST(ID),HFIPRI,KRESP,KFIELD)
+    IF (PRESENT(KRESP)) KRESP = IRESP
     !
   END SUBROUTINE IO_WRITE_FIELD_BYNAME_N2
 
 
-  SUBROUTINE IO_WRITE_FIELD_BYFIELD_N2(TPFILE,TPFIELD,HFIPRI,KRESP,KFIELD)
+  SUBROUTINE IO_WRITE_FIELD_BYFIELD_N2(TPFILE,TPFIELD,HFIPRI,KFIELD,KRESP)
     USE MODD_IO_ll
     USE MODD_PARAMETERS_ll,ONLY : JPHEXT
     USE MODE_FD_ll, ONLY : GETFD,JPFINL,FD_LL
@@ -3032,8 +3060,8 @@ CONTAINS
     TYPE(TFILEDATA),              INTENT(IN) :: TPFILE
     TYPE(TFIELDDATA),             INTENT(IN) :: TPFIELD
     CHARACTER(LEN=*),             INTENT(IN) :: HFIPRI   ! output file for error messages
-    INTEGER,                      INTENT(OUT):: KRESP    ! return-code 
     INTEGER,DIMENSION(:,:),TARGET,INTENT(IN) :: KFIELD   ! array containing the data field
+    INTEGER,OPTIONAL,             INTENT(OUT):: KRESP    ! return-code 
     !
     !*      0.2   Declarations of local variables
     !
@@ -3124,7 +3152,7 @@ CONTAINS
        CALL FM_WRIT_ERR("IO_WRITE_FIELD_BYFIELD_N2",YFILEM,HFIPRI,YRECFM,YDIR,TPFIELD%NGRID,LEN(TPFIELD%CCOMMENT),IRESP)
     END IF
     IF (GALLOC) DEALLOCATE(IFIELDP)
-    KRESP = IRESP
+    IF (PRESENT(KRESP)) KRESP = IRESP
     IF (ASSOCIATED(TZFD)) CALL MPI_BARRIER(TZFD%COMM,IERR)
     CALL SECOND_MNH2(T22)
     TIMEZ%T_WRIT2D_ALL=TIMEZ%T_WRIT2D_ALL + T22 - T11
@@ -3132,7 +3160,7 @@ CONTAINS
   END SUBROUTINE IO_WRITE_FIELD_BYFIELD_N2
 
 
-  SUBROUTINE IO_WRITE_FIELD_BYNAME_N3(TPFILE,HNAME,HFIPRI,KRESP,KFIELD)
+  SUBROUTINE IO_WRITE_FIELD_BYNAME_N3(TPFILE,HNAME,HFIPRI,KFIELD,KRESP)
     !
     USE MODD_IO_ll, ONLY : TFILEDATA
     !
@@ -3141,22 +3169,25 @@ CONTAINS
     TYPE(TFILEDATA),             INTENT(IN) :: TPFILE
     CHARACTER(LEN=*),            INTENT(IN) :: HNAME    ! name of the field to write
     CHARACTER(LEN=*),            INTENT(IN) :: HFIPRI   ! output file for error messages
-    INTEGER,                     INTENT(OUT):: KRESP    ! return-code 
     INTEGER,DIMENSION(:,:,:),    INTENT(IN) :: KFIELD   ! array containing the data field
+    INTEGER,OPTIONAL,            INTENT(OUT):: KRESP    ! return-code 
     !
     !*      0.2   Declarations of local variables
     !
     INTEGER :: ID ! Index of the field
+    INTEGER :: IRESP ! return_code
     !
     CALL PRINT_MSG(NVERB_DEBUG,'IO','IO_WRITE_FIELD_BYNAME_N3','writing '//TRIM(HNAME))
     !
-    CALL FIND_FIELD_ID_FROM_MNHNAME(HNAME,ID,KRESP)
+    CALL FIND_FIELD_ID_FROM_MNHNAME(HNAME,ID,IRESP)
     !
-    IF(KRESP==0) CALL IO_WRITE_FIELD(TPFILE,TFIELDLIST(ID),HFIPRI,KRESP,KFIELD)
+    IF(IRESP==0) CALL IO_WRITE_FIELD(TPFILE,TFIELDLIST(ID),HFIPRI,KFIELD,IRESP)
+    !
+    IF (PRESENT(KRESP)) KRESP = IRESP
     !
   END SUBROUTINE IO_WRITE_FIELD_BYNAME_N3
 
-  SUBROUTINE IO_WRITE_FIELD_BYFIELD_N3(TPFILE,TPFIELD,HFIPRI,KRESP,KFIELD)
+  SUBROUTINE IO_WRITE_FIELD_BYFIELD_N3(TPFILE,TPFIELD,HFIPRI,KFIELD,KRESP)
     USE MODD_IO_ll
     USE MODD_PARAMETERS_ll,ONLY : JPHEXT
     USE MODE_FD_ll, ONLY : GETFD,JPFINL,FD_LL
@@ -3172,8 +3203,8 @@ CONTAINS
     TYPE(TFILEDATA),                INTENT(IN) :: TPFILE
     TYPE(TFIELDDATA),               INTENT(IN) :: TPFIELD
     CHARACTER(LEN=*),               INTENT(IN) :: HFIPRI   ! output file for error messages
-    INTEGER,                        INTENT(OUT):: KRESP    ! return-code 
     INTEGER,DIMENSION(:,:,:),TARGET,INTENT(IN) :: KFIELD   ! array containing the data field
+    INTEGER,OPTIONAL,               INTENT(OUT):: KRESP    ! return-code 
     !
     !*      0.2   Declarations of local variables
     !
@@ -3256,7 +3287,7 @@ CONTAINS
        CALL FM_WRIT_ERR("IO_WRITE_FIELD_BYFIELD_N3",YFILEM,HFIPRI,YRECFM,YDIR,TPFIELD%NGRID,LEN(TPFIELD%CCOMMENT),IRESP)
     END IF
     IF (GALLOC) DEALLOCATE(IFIELDP)
-    KRESP = IRESP
+    IF (PRESENT(KRESP)) KRESP = IRESP
     IF (ASSOCIATED(TZFD)) CALL MPI_BARRIER(TZFD%COMM,IERR)
     CALL SECOND_MNH2(T22)
     TIMEZ%T_WRIT3D_ALL=TIMEZ%T_WRIT3D_ALL + T22 - T11
@@ -3340,7 +3371,7 @@ CONTAINS
     KRESP = IRESP
   END SUBROUTINE FMWRITL0_ll
 
-  SUBROUTINE IO_WRITE_FIELD_BYNAME_L0(TPFILE,HNAME,HFIPRI,KRESP,OFIELD)
+  SUBROUTINE IO_WRITE_FIELD_BYNAME_L0(TPFILE,HNAME,HFIPRI,OFIELD,KRESP)
     !
     USE MODD_IO_ll, ONLY : TFILEDATA
     !
@@ -3349,22 +3380,25 @@ CONTAINS
     TYPE(TFILEDATA),             INTENT(IN) :: TPFILE
     CHARACTER(LEN=*),            INTENT(IN) :: HNAME    ! name of the field to write
     CHARACTER(LEN=*),            INTENT(IN) :: HFIPRI   ! output file for error messages
-    INTEGER,                     INTENT(OUT):: KRESP    ! return-code 
     LOGICAL,                     INTENT(IN) :: OFIELD   ! array containing the data field
+    INTEGER,OPTIONAL,            INTENT(OUT):: KRESP    ! return-code 
     !
     !*      0.2   Declarations of local variables
     !
     INTEGER :: ID ! Index of the field
+    INTEGER :: IRESP ! return_code
     !
     CALL PRINT_MSG(NVERB_DEBUG,'IO','IO_WRITE_FIELD_BYNAME_L0','writing '//TRIM(HNAME))
     !
-    CALL FIND_FIELD_ID_FROM_MNHNAME(HNAME,ID,KRESP)
+    CALL FIND_FIELD_ID_FROM_MNHNAME(HNAME,ID,IRESP)
     !
-    IF(KRESP==0) CALL IO_WRITE_FIELD(TPFILE,TFIELDLIST(ID),HFIPRI,KRESP,OFIELD)
+    IF(IRESP==0) CALL IO_WRITE_FIELD(TPFILE,TFIELDLIST(ID),HFIPRI,OFIELD,IRESP)
+    !
+    IF (PRESENT(KRESP)) KRESP = IRESP
     !
   END SUBROUTINE IO_WRITE_FIELD_BYNAME_L0
 
-  SUBROUTINE IO_WRITE_FIELD_BYFIELD_L0(TPFILE,TPFIELD,HFIPRI,KRESP,OFIELD)
+  SUBROUTINE IO_WRITE_FIELD_BYFIELD_L0(TPFILE,TPFIELD,HFIPRI,OFIELD,KRESP)
     USE MODD_IO_ll
     USE MODD_FM
     USE MODE_FD_ll, ONLY : GETFD,JPFINL,FD_LL
@@ -3378,8 +3412,8 @@ CONTAINS
     TYPE(TFILEDATA),             INTENT(IN) :: TPFILE
     TYPE(TFIELDDATA),            INTENT(IN) :: TPFIELD
     CHARACTER(LEN=*),            INTENT(IN) :: HFIPRI   ! output file for error messages
-    INTEGER,                     INTENT(OUT):: KRESP    ! return-code 
     LOGICAL,                     INTENT(IN) :: OFIELD   ! array containing the data field
+    INTEGER,OPTIONAL,            INTENT(OUT):: KRESP    ! return-code 
     !
     !*      0.2   Declarations of local variables
     !
@@ -3440,7 +3474,7 @@ CONTAINS
        CALL FM_WRIT_ERR("IO_WRITE_FIELD_BYFIELD_L0",TPFILE%CNAME,HFIPRI,TPFIELD%CMNHNAME,TPFIELD%CDIR,TPFIELD%NGRID,&
                         LEN(TPFIELD%CCOMMENT) ,IRESP)
     END IF
-    KRESP = IRESP
+    IF (PRESENT(KRESP)) KRESP = IRESP
   END SUBROUTINE IO_WRITE_FIELD_BYFIELD_L0
 
 
@@ -3520,7 +3554,7 @@ CONTAINS
     KRESP = IRESP
   END SUBROUTINE FMWRITL1_ll
 
-  SUBROUTINE IO_WRITE_FIELD_BYNAME_L1(TPFILE,HNAME,HFIPRI,KRESP,OFIELD)
+  SUBROUTINE IO_WRITE_FIELD_BYNAME_L1(TPFILE,HNAME,HFIPRI,OFIELD,KRESP)
     !
     USE MODD_IO_ll, ONLY : TFILEDATA
     !
@@ -3529,22 +3563,25 @@ CONTAINS
     TYPE(TFILEDATA),             INTENT(IN) :: TPFILE
     CHARACTER(LEN=*),            INTENT(IN) :: HNAME    ! name of the field to write
     CHARACTER(LEN=*),            INTENT(IN) :: HFIPRI   ! output file for error messages
-    INTEGER,                     INTENT(OUT):: KRESP    ! return-code 
     LOGICAL,DIMENSION(:),        INTENT(IN) :: OFIELD   ! array containing the data field
+    INTEGER,OPTIONAL,            INTENT(OUT):: KRESP    ! return-code 
     !
     !*      0.2   Declarations of local variables
     !
     INTEGER :: ID ! Index of the field
+    INTEGER :: IRESP ! return_code
     !
     CALL PRINT_MSG(NVERB_DEBUG,'IO','IO_WRITE_FIELD_BYNAME_L1','writing '//TRIM(HNAME))
     !
-    CALL FIND_FIELD_ID_FROM_MNHNAME(HNAME,ID,KRESP)
+    CALL FIND_FIELD_ID_FROM_MNHNAME(HNAME,ID,IRESP)
     !
-    IF(KRESP==0) CALL IO_WRITE_FIELD(TPFILE,TFIELDLIST(ID),HFIPRI,KRESP,OFIELD)
+    IF(IRESP==0) CALL IO_WRITE_FIELD(TPFILE,TFIELDLIST(ID),HFIPRI,OFIELD,IRESP)
+    !
+    IF (PRESENT(KRESP)) KRESP = IRESP
     !
   END SUBROUTINE IO_WRITE_FIELD_BYNAME_L1
 
-  SUBROUTINE IO_WRITE_FIELD_BYFIELD_L1(TPFILE,TPFIELD,HFIPRI,KRESP,OFIELD)
+  SUBROUTINE IO_WRITE_FIELD_BYFIELD_L1(TPFILE,TPFIELD,HFIPRI,OFIELD,KRESP)
     !
     USE MODD_IO_ll, ONLY : ISP,GSMONOPROC,LIOCDF4,LLFIOUT,TFILEDATA
     USE MODE_FD_ll, ONLY : GETFD,JPFINL,FD_LL
@@ -3558,8 +3595,8 @@ CONTAINS
     TYPE(TFILEDATA),              INTENT(IN) :: TPFILE
     TYPE(TFIELDDATA),             INTENT(IN) :: TPFIELD
     CHARACTER(LEN=*),             INTENT(IN) :: HFIPRI   ! output file for error messages
-    INTEGER,                      INTENT(OUT):: KRESP    ! return-code 
     LOGICAL,DIMENSION(:),TARGET,  INTENT(IN) :: OFIELD   ! array containing the data field
+    INTEGER,OPTIONAL,             INTENT(OUT):: KRESP    ! return-code 
     !
     !*      0.2   Declarations of local variables
     !
@@ -3619,7 +3656,7 @@ CONTAINS
        CALL FM_WRIT_ERR("IO_WRITE_FIELD_BYFIELD_L1",YFILEM,HFIPRI,YRECFM,YDIR,TPFIELD%NGRID,LEN(TPFIELD%CCOMMENT),IRESP)
     END IF
     IF (GALLOC) DEALLOCATE(GFIELDP)
-    KRESP = IRESP
+    IF (PRESENT(KRESP)) KRESP = IRESP
     IF (ASSOCIATED(TZFD)) CALL MPI_BARRIER(TZFD%COMM,IERR)
     !
   END SUBROUTINE IO_WRITE_FIELD_BYFIELD_L1
@@ -3710,7 +3747,7 @@ CONTAINS
     KRESP = IRESP
   END SUBROUTINE FMWRITC0_ll
 
-  SUBROUTINE IO_WRITE_FIELD_BYNAME_C0(TPFILE,HNAME,HFIPRI,KRESP,HFIELD)
+  SUBROUTINE IO_WRITE_FIELD_BYNAME_C0(TPFILE,HNAME,HFIPRI,HFIELD,KRESP)
     !
     USE MODD_IO_ll, ONLY : TFILEDATA
     !
@@ -3719,22 +3756,25 @@ CONTAINS
     TYPE(TFILEDATA),             INTENT(IN) :: TPFILE
     CHARACTER(LEN=*),            INTENT(IN) :: HNAME    ! name of the field to write
     CHARACTER(LEN=*),            INTENT(IN) :: HFIPRI   ! output file for error messages
-    INTEGER,                     INTENT(OUT):: KRESP    ! return-code 
     CHARACTER(LEN=*),            INTENT(IN) :: HFIELD   ! array containing the data field
+    INTEGER,OPTIONAL,            INTENT(OUT):: KRESP    ! return-code 
     !
     !*      0.2   Declarations of local variables
     !
     INTEGER :: ID ! Index of the field
+    INTEGER :: IRESP ! return_code
     !
     CALL PRINT_MSG(NVERB_DEBUG,'IO','IO_WRITE_FIELD_BYNAME_C0','writing '//TRIM(HNAME))
     !
-    CALL FIND_FIELD_ID_FROM_MNHNAME(HNAME,ID,KRESP)
+    CALL FIND_FIELD_ID_FROM_MNHNAME(HNAME,ID,IRESP)
     !
-    IF(KRESP==0) CALL IO_WRITE_FIELD(TPFILE,TFIELDLIST(ID),HFIPRI,KRESP,HFIELD)
+    IF(IRESP==0) CALL IO_WRITE_FIELD(TPFILE,TFIELDLIST(ID),HFIPRI,HFIELD,IRESP)
+    !
+    IF (PRESENT(KRESP)) KRESP = IRESP
     !
   END SUBROUTINE IO_WRITE_FIELD_BYNAME_C0
 
-  SUBROUTINE IO_WRITE_FIELD_BYFIELD_C0(TPFILE,TPFIELD,HFIPRI,KRESP,HFIELD)
+  SUBROUTINE IO_WRITE_FIELD_BYFIELD_C0(TPFILE,TPFIELD,HFIPRI,HFIELD,KRESP)
     USE MODD_IO_ll
     USE MODD_FM
     USE MODE_FD_ll, ONLY : GETFD,JPFINL,FD_LL
@@ -3747,8 +3787,8 @@ CONTAINS
     TYPE(TFILEDATA),             INTENT(IN) :: TPFILE
     TYPE(TFIELDDATA),            INTENT(IN) :: TPFIELD
     CHARACTER(LEN=*),            INTENT(IN) :: HFIPRI   ! output file for error messages
-    INTEGER,                     INTENT(OUT):: KRESP    ! return-code 
     CHARACTER(LEN=*),            INTENT(IN) :: HFIELD   ! array containing the data field
+    INTEGER,OPTIONAL,            INTENT(OUT):: KRESP    ! return-code 
     !
     !*      0.2   Declarations of local variables
     !
@@ -3788,7 +3828,7 @@ CONTAINS
        CALL FM_WRIT_ERR("IO_WRITE_FIELD_BYFIELD_C0",TPFILE%CNAME,HFIPRI,TPFIELD%CMNHNAME,TPFIELD%CDIR,TPFIELD%NGRID,&
                         LEN(TPFIELD%CCOMMENT) ,IRESP)
     END IF
-    KRESP = IRESP
+    IF (PRESENT(KRESP)) KRESP = IRESP
   END SUBROUTINE IO_WRITE_FIELD_BYFIELD_C0
 
   SUBROUTINE FMWRITC1_ll(HFILEM,HRECFM,HFIPRI,HDIR,HFIELD,KGRID,&
@@ -3883,7 +3923,7 @@ CONTAINS
     KRESP = IRESP
   END SUBROUTINE FMWRITC1_ll
 
-  SUBROUTINE IO_WRITE_FIELD_BYNAME_C1(TPFILE,HNAME,HFIPRI,KRESP,HFIELD)
+  SUBROUTINE IO_WRITE_FIELD_BYNAME_C1(TPFILE,HNAME,HFIPRI,HFIELD,KRESP)
     !
     USE MODD_IO_ll, ONLY : TFILEDATA
     !
@@ -3892,22 +3932,25 @@ CONTAINS
     TYPE(TFILEDATA),              INTENT(IN) :: TPFILE
     CHARACTER(LEN=*),             INTENT(IN) :: HNAME    ! name of the field to write
     CHARACTER(LEN=*),             INTENT(IN) :: HFIPRI   ! output file for error messages
-    INTEGER,                      INTENT(OUT):: KRESP    ! return-code 
     CHARACTER(LEN=*),DIMENSION(:),INTENT(IN) :: HFIELD   ! array containing the data field
+    INTEGER,OPTIONAL,             INTENT(OUT):: KRESP    ! return-code 
     !
     !*      0.2   Declarations of local variables
     !
     INTEGER :: ID ! Index of the field
+    INTEGER :: IRESP ! return_code
     !
     CALL PRINT_MSG(NVERB_DEBUG,'IO','IO_WRITE_FIELD_BYNAME_C1','writing '//TRIM(HNAME))
     !
-    CALL FIND_FIELD_ID_FROM_MNHNAME(HNAME,ID,KRESP)
+    CALL FIND_FIELD_ID_FROM_MNHNAME(HNAME,ID,IRESP)
+    !
+    IF(IRESP==0) CALL IO_WRITE_FIELD(TPFILE,TFIELDLIST(ID),HFIPRI,HFIELD,IRESP)
     !
-    IF(KRESP==0) CALL IO_WRITE_FIELD(TPFILE,TFIELDLIST(ID),HFIPRI,KRESP,HFIELD)
+    IF (PRESENT(KRESP)) KRESP = IRESP
     !
   END SUBROUTINE IO_WRITE_FIELD_BYNAME_C1
 
-  SUBROUTINE IO_WRITE_FIELD_BYFIELD_C1(TPFILE,TPFIELD,HFIPRI,KRESP,HFIELD)
+  SUBROUTINE IO_WRITE_FIELD_BYFIELD_C1(TPFILE,TPFIELD,HFIPRI,HFIELD,KRESP)
     USE MODD_IO_ll
     USE MODD_FM
     USE MODE_FD_ll, ONLY : GETFD,JPFINL,FD_LL
@@ -3920,8 +3963,8 @@ CONTAINS
     TYPE(TFILEDATA),              INTENT(IN) :: TPFILE
     TYPE(TFIELDDATA),             INTENT(IN) :: TPFIELD
     CHARACTER(LEN=*),             INTENT(IN) :: HFIPRI   ! output file for error messages
-    INTEGER,                      INTENT(OUT):: KRESP    ! return-code 
     CHARACTER(LEN=*),DIMENSION(:),INTENT(IN) :: HFIELD   ! array containing the data field
+    INTEGER,OPTIONAL,             INTENT(OUT):: KRESP    ! return-code 
     !
     !*      0.2   Declarations of local variables
     !
@@ -3982,7 +4025,7 @@ CONTAINS
                         LEN(TPFIELD%CCOMMENT) ,IRESP)
     END IF
     IF (ALLOCATED(IFIELD)) DEALLOCATE(IFIELD)
-    KRESP = IRESP
+    IF (PRESENT(KRESP)) KRESP = IRESP
   END SUBROUTINE IO_WRITE_FIELD_BYFIELD_C1
 
   SUBROUTINE FMWRITT0_ll(HFILEM,HRECFM,HFIPRI,HDIR,TFIELD,KGRID,&
@@ -4066,7 +4109,7 @@ CONTAINS
     KRESP = IRESP
   END SUBROUTINE FMWRITT0_ll
 
-  SUBROUTINE IO_WRITE_FIELD_BYNAME_T0(TPFILE,HNAME,HFIPRI,KRESP,TFIELD)
+  SUBROUTINE IO_WRITE_FIELD_BYNAME_T0(TPFILE,HNAME,HFIPRI,TFIELD,KRESP)
     !
     USE MODD_IO_ll, ONLY : TFILEDATA
     !
@@ -4075,22 +4118,25 @@ CONTAINS
     TYPE(TFILEDATA),             INTENT(IN) :: TPFILE
     CHARACTER(LEN=*),            INTENT(IN) :: HNAME    ! name of the field to write
     CHARACTER(LEN=*),            INTENT(IN) :: HFIPRI   ! output file for error messages
-    INTEGER,                     INTENT(OUT):: KRESP    ! return-code 
     TYPE (DATE_TIME),            INTENT(IN) :: TFIELD   ! array containing the data field
+    INTEGER,OPTIONAL,            INTENT(OUT):: KRESP    ! return-code 
     !
     !*      0.2   Declarations of local variables
     !
     INTEGER :: ID ! Index of the field
+    INTEGER :: IRESP ! return_code
     !
     CALL PRINT_MSG(NVERB_DEBUG,'IO','IO_WRITE_FIELD_BYNAME_T0','writing '//TRIM(HNAME))
     !
-    CALL FIND_FIELD_ID_FROM_MNHNAME(HNAME,ID,KRESP)
+    CALL FIND_FIELD_ID_FROM_MNHNAME(HNAME,ID,IRESP)
+    !
+    IF(IRESP==0) CALL IO_WRITE_FIELD(TPFILE,TFIELDLIST(ID),HFIPRI,TFIELD,IRESP)
     !
-    IF(KRESP==0) CALL IO_WRITE_FIELD(TPFILE,TFIELDLIST(ID),HFIPRI,KRESP,TFIELD)
+    IF (PRESENT(KRESP)) KRESP = IRESP
     !
   END SUBROUTINE IO_WRITE_FIELD_BYNAME_T0
 
-  SUBROUTINE IO_WRITE_FIELD_BYFIELD_T0(TPFILE,TPFIELD,HFIPRI,KRESP,TFIELD)
+  SUBROUTINE IO_WRITE_FIELD_BYFIELD_T0(TPFILE,TPFIELD,HFIPRI,TFIELD,KRESP)
     USE MODD_IO_ll
     USE MODD_FM
     USE MODD_TYPE_DATE
@@ -4104,8 +4150,8 @@ CONTAINS
     TYPE(TFILEDATA),             INTENT(IN) :: TPFILE
     TYPE(TFIELDDATA),            INTENT(IN) :: TPFIELD
     CHARACTER(LEN=*),            INTENT(IN) :: HFIPRI   ! output file for error messages
-    INTEGER,                     INTENT(OUT):: KRESP    ! return-code 
     TYPE (DATE_TIME),            INTENT(IN) :: TFIELD   ! array containing the data field
+    INTEGER,OPTIONAL,            INTENT(OUT):: KRESP    ! return-code 
     !
     !*      0.2   Declarations of local variables
     !
@@ -4141,7 +4187,7 @@ CONTAINS
        CALL FM_WRIT_ERR("IO_WRITE_FIELD_BYFIELD_T0",TPFILE%CNAME,HFIPRI,TPFIELD%CMNHNAME,TPFIELD%CDIR,TPFIELD%NGRID,&
                         LEN(TPFIELD%CCOMMENT) ,IRESP)
     END IF
-    KRESP = IRESP
+    IF (PRESENT(KRESP)) KRESP = IRESP
   END SUBROUTINE IO_WRITE_FIELD_BYFIELD_T0
 
   SUBROUTINE FMWRIT_LB(HFILEM,HRECFM,HFIPRI,HLBTYPE,PLB,KRIM,KL3D,&
@@ -4284,7 +4330,7 @@ CONTAINS
     KRESP = IRESP
   END SUBROUTINE FMWRIT_LB
 
-  SUBROUTINE IO_WRITE_FIELD_BYNAME_LB(TPFILE,HNAME,HFIPRI,KL3D,KRESP,PLB)
+  SUBROUTINE IO_WRITE_FIELD_BYNAME_LB(TPFILE,HNAME,HFIPRI,KL3D,PLB,KRESP)
     !
     USE MODD_IO_ll, ONLY : TFILEDATA
     !
@@ -4294,22 +4340,25 @@ CONTAINS
     CHARACTER(LEN=*),            INTENT(IN) :: HNAME    ! name of the field to write
     CHARACTER(LEN=*),            INTENT(IN) :: HFIPRI   ! output file for error messages
     INTEGER,                     INTENT(IN) :: KL3D     ! size of the LB array in FM
-    INTEGER,                     INTENT(OUT):: KRESP    ! return-code 
     REAL,DIMENSION(:,:,:),       INTENT(IN) :: PLB      ! array containing the LB field
+    INTEGER,OPTIONAL,            INTENT(OUT):: KRESP    ! return-code 
     !
     !*      0.2   Declarations of local variables
     !
     INTEGER :: ID ! Index of the field
+    INTEGER :: IRESP ! return_code
     !
     CALL PRINT_MSG(NVERB_DEBUG,'IO','IO_WRITE_FIELD_BYNAME_LB','writing '//TRIM(HNAME))
     !
-    CALL FIND_FIELD_ID_FROM_MNHNAME(HNAME,ID,KRESP)
+    CALL FIND_FIELD_ID_FROM_MNHNAME(HNAME,ID,IRESP)
+    !
+    IF(IRESP==0) CALL IO_WRITE_FIELD_LB(TPFILE,TFIELDLIST(ID),HFIPRI,KL3D,PLB,IRESP)
     !
-    IF(KRESP==0) CALL IO_WRITE_FIELD_LB(TPFILE,TFIELDLIST(ID),HFIPRI,KL3D,KRESP,PLB)
+    IF (PRESENT(KRESP)) KRESP = IRESP
     !
   END SUBROUTINE IO_WRITE_FIELD_BYNAME_LB
 
-  SUBROUTINE IO_WRITE_FIELD_BYFIELD_LB(TPFILE,TPFIELD,HFIPRI,KL3D,KRESP,PLB)
+  SUBROUTINE IO_WRITE_FIELD_BYFIELD_LB(TPFILE,TPFIELD,HFIPRI,KL3D,PLB,KRESP)
     !
     USE MODD_IO_ll
     USE MODD_PARAMETERS_ll,ONLY : JPHEXT
@@ -4326,8 +4375,8 @@ CONTAINS
     TYPE(TFIELDDATA),            INTENT(INOUT) :: TPFIELD
     CHARACTER(LEN=*),            INTENT(IN)    :: HFIPRI ! file for prints in FM
     INTEGER,                     INTENT(IN)    :: KL3D   ! size of the LB array in FM
-    INTEGER,                     INTENT(OUT)   :: KRESP  ! return-code
     REAL,DIMENSION(:,:,:),TARGET,INTENT(IN)    :: PLB    ! array containing the LB field
+    INTEGER,OPTIONAL,            INTENT(OUT):: KRESP    ! return-code 
     !
     !*      0.2   Declarations of local variables
     !
@@ -4453,7 +4502,7 @@ CONTAINS
     END IF
     !
     IF (ALLOCATED(Z3D)) DEALLOCATE(Z3D)
-    KRESP = IRESP
+    IF (PRESENT(KRESP)) KRESP = IRESP
   END SUBROUTINE IO_WRITE_FIELD_BYFIELD_LB
 
   SUBROUTINE FMWRITBOXX2_ll(HFILEM,HRECFM,HFIPRI,HBUDGET,PFIELD,KGRID,&
@@ -4852,7 +4901,7 @@ CONTAINS
     INTEGER,                         INTENT(IN) :: KXEBOX   ! Global coordinates of the box
     INTEGER,                         INTENT(IN) :: KYOBOX   ! 
     INTEGER,                         INTENT(IN) :: KYEBOX   ! 
-    INTEGER,                         INTENT(OUT):: KRESP    ! return-code 
+    INTEGER,OPTIONAL,                INTENT(OUT):: KRESP    ! return-code 
     !
     !*      0.2   Declarations of local variables
     !
@@ -4913,7 +4962,7 @@ CONTAINS
                         'XY',TPFIELD%NGRID,LEN(TPFIELD%CCOMMENT),IRESP)
     END IF
     IF (GALLOC) DEALLOCATE(ZFIELDP)
-    KRESP = IRESP
+    IF (PRESENT(KRESP)) KRESP = IRESP
   END SUBROUTINE IO_WRITE_FIELD_BOX_BYFIELD_X5
 
   SUBROUTINE FMWRITBOXX6_ll(HFILEM,HRECFM,HFIPRI,HBUDGET,PFIELD,KGRID,&
diff --git a/src/LIB/SURCOUCHE/src/io_write_field.f90 b/src/LIB/SURCOUCHE/src/io_write_field.f90
index 051fe25b7..910ba46ff 100644
--- a/src/LIB/SURCOUCHE/src/io_write_field.f90
+++ b/src/LIB/SURCOUCHE/src/io_write_field.f90
@@ -19,7 +19,6 @@ CHARACTER(LEN=*), INTENT(IN)  :: HFIPRI   !File for prints in FM
 !
 INTEGER :: IDX
 INTEGER :: IMI
-INTEGER :: IRESP
 INTEGER :: JI
 !
 IMI = GET_CURRENT_MODEL_INDEX()
@@ -45,7 +44,7 @@ DO JI = 1,SIZE(TPOUTPUT%NFIELDLIST)
             STOP
           END IF
           IF ( TFIELDLIST(IDX)%CLBTYPE == 'NONE' ) THEN
-            CALL IO_WRITE_FIELD(TPOUTPUT%TFILE,TFIELDLIST(IDX),HFIPRI,IRESP,TFIELDLIST(IDX)%TFIELD_X0D(IMI)%DATA)
+            CALL IO_WRITE_FIELD(TPOUTPUT%TFILE,TFIELDLIST(IDX),HFIPRI,TFIELDLIST(IDX)%TFIELD_X0D(IMI)%DATA)
           ELSE
             CALL PRINT_MSG(NVERB_ERROR,'IO','IO_WRITE_FIELDLIST','CLBTYPE/=NONE not allowed for 0D logical fields')
           END IF
@@ -62,7 +61,7 @@ DO JI = 1,SIZE(TPOUTPUT%NFIELDLIST)
             STOP
           END IF
           IF ( TFIELDLIST(IDX)%CLBTYPE == 'NONE' ) THEN
-            CALL IO_WRITE_FIELD(TPOUTPUT%TFILE,TFIELDLIST(IDX),HFIPRI,IRESP,TFIELDLIST(IDX)%TFIELD_N0D(IMI)%DATA)
+            CALL IO_WRITE_FIELD(TPOUTPUT%TFILE,TFIELDLIST(IDX),HFIPRI,TFIELDLIST(IDX)%TFIELD_N0D(IMI)%DATA)
           ELSE
             CALL PRINT_MSG(NVERB_ERROR,'IO','IO_WRITE_FIELDLIST','CLBTYPE/=NONE not allowed for 0D integer fields')
           END IF
@@ -79,7 +78,7 @@ DO JI = 1,SIZE(TPOUTPUT%NFIELDLIST)
             STOP
           END IF
           IF ( TFIELDLIST(IDX)%CLBTYPE == 'NONE' ) THEN
-            CALL IO_WRITE_FIELD(TPOUTPUT%TFILE,TFIELDLIST(IDX),HFIPRI,IRESP,TFIELDLIST(IDX)%TFIELD_L0D(IMI)%DATA)
+            CALL IO_WRITE_FIELD(TPOUTPUT%TFILE,TFIELDLIST(IDX),HFIPRI,TFIELDLIST(IDX)%TFIELD_L0D(IMI)%DATA)
           ELSE
             CALL PRINT_MSG(NVERB_ERROR,'IO','IO_WRITE_FIELDLIST','CLBTYPE/=NONE not allowed for 0D logical fields')
           END IF
@@ -96,7 +95,7 @@ DO JI = 1,SIZE(TPOUTPUT%NFIELDLIST)
             STOP
           END IF
           IF ( TFIELDLIST(IDX)%CLBTYPE == 'NONE' ) THEN
-            CALL IO_WRITE_FIELD(TPOUTPUT%TFILE,TFIELDLIST(IDX),HFIPRI,IRESP,TFIELDLIST(IDX)%TFIELD_C0D(IMI)%DATA)
+            CALL IO_WRITE_FIELD(TPOUTPUT%TFILE,TFIELDLIST(IDX),HFIPRI,TFIELDLIST(IDX)%TFIELD_C0D(IMI)%DATA)
           ELSE
             CALL PRINT_MSG(NVERB_ERROR,'IO','IO_WRITE_FIELDLIST','CLBTYPE/=NONE not allowed for 0D character fields')
           END IF
@@ -113,7 +112,7 @@ DO JI = 1,SIZE(TPOUTPUT%NFIELDLIST)
             STOP
           END IF
           IF ( TFIELDLIST(IDX)%CLBTYPE == 'NONE' ) THEN
-            CALL IO_WRITE_FIELD(TPOUTPUT%TFILE,TFIELDLIST(IDX),HFIPRI,IRESP,TFIELDLIST(IDX)%TFIELD_T0D(IMI)%DATA)
+            CALL IO_WRITE_FIELD(TPOUTPUT%TFILE,TFIELDLIST(IDX),HFIPRI,TFIELDLIST(IDX)%TFIELD_T0D(IMI)%DATA)
           ELSE
             CALL PRINT_MSG(NVERB_ERROR,'IO','IO_WRITE_FIELDLIST','CLBTYPE/=NONE not allowed for 0D date/time fields')
           END IF
@@ -142,7 +141,7 @@ DO JI = 1,SIZE(TPOUTPUT%NFIELDLIST)
             STOP
           END IF
           IF ( TFIELDLIST(IDX)%CLBTYPE == 'NONE' ) THEN
-            CALL IO_WRITE_FIELD(TPOUTPUT%TFILE,TFIELDLIST(IDX),HFIPRI,IRESP,TFIELDLIST(IDX)%TFIELD_X1D(IMI)%DATA)
+            CALL IO_WRITE_FIELD(TPOUTPUT%TFILE,TFIELDLIST(IDX),HFIPRI,TFIELDLIST(IDX)%TFIELD_X1D(IMI)%DATA)
           ELSE
             CALL PRINT_MSG(NVERB_ERROR,'IO','IO_WRITE_FIELDLIST','CLBTYPE/=NONE not allowed for 1D real fields')
           END IF
@@ -159,7 +158,7 @@ DO JI = 1,SIZE(TPOUTPUT%NFIELDLIST)
 !             STOP
 !           END IF
 !           IF ( TFIELDLIST(IDX)%CLBTYPE == 'NONE' ) THEN
-!             CALL IO_WRITE_FIELD(TPOUTPUT%TFILE,TFIELDLIST(IDX),HFIPRI,IRESP,TFIELDLIST(IDX)%TFIELD_N1D(IMI)%DATA)
+!             CALL IO_WRITE_FIELD(TPOUTPUT%TFILE,TFIELDLIST(IDX),HFIPRI,TFIELDLIST(IDX)%TFIELD_N1D(IMI)%DATA)
 !           ELSE
 !             CALL PRINT_MSG(NVERB_ERROR,'IO','IO_WRITE_FIELDLIST','CLBTYPE/=NONE not allowed for 1D integer fields')
 !           END IF
@@ -176,7 +175,7 @@ DO JI = 1,SIZE(TPOUTPUT%NFIELDLIST)
 !             STOP
 !           END IF
 !           IF ( TFIELDLIST(IDX)%CLBTYPE == 'NONE' ) THEN
-!             CALL IO_WRITE_FIELD(TPOUTPUT%TFILE,TFIELDLIST(IDX),HFIPRI,IRESP,TFIELDLIST(IDX)%TFIELD_L1D(IMI)%DATA)
+!             CALL IO_WRITE_FIELD(TPOUTPUT%TFILE,TFIELDLIST(IDX),HFIPRI,TFIELDLIST(IDX)%TFIELD_L1D(IMI)%DATA)
 !           ELSE
 !             CALL PRINT_MSG(NVERB_ERROR,'IO','IO_WRITE_FIELDLIST','CLBTYPE/=NONE not allowed for 1D logical fields')
 !           END IF
@@ -193,7 +192,7 @@ DO JI = 1,SIZE(TPOUTPUT%NFIELDLIST)
 !             STOP
 !           END IF
 !           IF ( TFIELDLIST(IDX)%CLBTYPE == 'NONE' ) THEN
-!             CALL IO_WRITE_FIELD(TPOUTPUT%TFILE,TFIELDLIST(IDX),HFIPRI,IRESP,TFIELDLIST(IDX)%TFIELD_C1D(IMI)%DATA)
+!             CALL IO_WRITE_FIELD(TPOUTPUT%TFILE,TFIELDLIST(IDX),HFIPRI,TFIELDLIST(IDX)%TFIELD_C1D(IMI)%DATA)
 !           ELSE
 !             CALL PRINT_MSG(NVERB_ERROR,'IO','IO_WRITE_FIELDLIST','CLBTYPE/=NONE not allowed for 1D character fields')
 !           END IF
@@ -222,7 +221,7 @@ DO JI = 1,SIZE(TPOUTPUT%NFIELDLIST)
             STOP
           END IF
           IF ( TFIELDLIST(IDX)%CLBTYPE == 'NONE' ) THEN
-            CALL IO_WRITE_FIELD(TPOUTPUT%TFILE,TFIELDLIST(IDX),HFIPRI,IRESP,TFIELDLIST(IDX)%TFIELD_X2D(IMI)%DATA)
+            CALL IO_WRITE_FIELD(TPOUTPUT%TFILE,TFIELDLIST(IDX),HFIPRI,TFIELDLIST(IDX)%TFIELD_X2D(IMI)%DATA)
           ELSE
             CALL PRINT_MSG(NVERB_ERROR,'IO','IO_WRITE_FIELDLIST','CLBTYPE/=NONE not allowed for 2D real fields')
           END IF
@@ -239,7 +238,7 @@ DO JI = 1,SIZE(TPOUTPUT%NFIELDLIST)
             STOP
           END IF
           IF ( TFIELDLIST(IDX)%CLBTYPE == 'NONE' ) THEN
-            CALL IO_WRITE_FIELD(TPOUTPUT%TFILE,TFIELDLIST(IDX),HFIPRI,IRESP,TFIELDLIST(IDX)%TFIELD_N2D(IMI)%DATA)
+            CALL IO_WRITE_FIELD(TPOUTPUT%TFILE,TFIELDLIST(IDX),HFIPRI,TFIELDLIST(IDX)%TFIELD_N2D(IMI)%DATA)
           ELSE
             CALL PRINT_MSG(NVERB_ERROR,'IO','IO_WRITE_FIELDLIST','CLBTYPE/=NONE not allowed for 2D integer fields')
           END IF
@@ -268,11 +267,11 @@ DO JI = 1,SIZE(TPOUTPUT%NFIELDLIST)
             STOP
           END IF
           IF ( TFIELDLIST(IDX)%CLBTYPE == 'NONE' ) THEN
-            CALL IO_WRITE_FIELD(TPOUTPUT%TFILE,TFIELDLIST(IDX),HFIPRI,IRESP,TFIELDLIST(IDX)%TFIELD_X3D(IMI)%DATA)
+            CALL IO_WRITE_FIELD(TPOUTPUT%TFILE,TFIELDLIST(IDX),HFIPRI,TFIELDLIST(IDX)%TFIELD_X3D(IMI)%DATA)
           ELSE
             CALL PRINT_MSG(NVERB_ERROR,'IO','IO_WRITE_FIELDLIST','CLBTYPE/=NONE not (yet) allowed for 3D real fields')
             !PW: TODO?: add missing field in TFIELDLIST?
-            !CALL IO_WRITE_FIELD_LB(TPOUTPUT%TFILE,TFIELDLIST(IDX),HFIPRI,***,IRESP,TFIELDLIST(IDX)%TFIELD_X3D(IMI)%DATA)
+            !CALL IO_WRITE_FIELD_LB(TPOUTPUT%TFILE,TFIELDLIST(IDX),HFIPRI,***,TFIELDLIST(IDX)%TFIELD_X3D(IMI)%DATA)
           END IF
         !
         !3D integer
@@ -287,11 +286,11 @@ DO JI = 1,SIZE(TPOUTPUT%NFIELDLIST)
             STOP
           END IF
           IF ( TFIELDLIST(IDX)%CLBTYPE == 'NONE' ) THEN
-            CALL IO_WRITE_FIELD(TPOUTPUT%TFILE,TFIELDLIST(IDX),HFIPRI,IRESP,TFIELDLIST(IDX)%TFIELD_N3D(IMI)%DATA)
+            CALL IO_WRITE_FIELD(TPOUTPUT%TFILE,TFIELDLIST(IDX),HFIPRI,TFIELDLIST(IDX)%TFIELD_N3D(IMI)%DATA)
           ELSE
             CALL PRINT_MSG(NVERB_ERROR,'IO','IO_WRITE_FIELDLIST','CLBTYPE/=NONE not (yet) allowed for 3D integer fields')
             !PW: TODO?: add missing field in TFIELDLIST?
-            !CALL IO_WRITE_FIELD_LB(TPOUTPUT%TFILE,TFIELDLIST(IDX),HFIPRI,***,IRESP,TFIELDLIST(IDX)%TFIELD_N3D(IMI)%DATA)
+            !CALL IO_WRITE_FIELD_LB(TPOUTPUT%TFILE,TFIELDLIST(IDX),HFIPRI,***,TFIELDLIST(IDX)%TFIELD_N3D(IMI)%DATA)
           END IF
         !
         !3D other types
@@ -318,11 +317,11 @@ DO JI = 1,SIZE(TPOUTPUT%NFIELDLIST)
             STOP
           END IF
           IF ( TFIELDLIST(IDX)%CLBTYPE == 'NONE' ) THEN
-            CALL IO_WRITE_FIELD(TPOUTPUT%TFILE,TFIELDLIST(IDX),HFIPRI,IRESP,TFIELDLIST(IDX)%TFIELD_X4D(IMI)%DATA)
+            CALL IO_WRITE_FIELD(TPOUTPUT%TFILE,TFIELDLIST(IDX),HFIPRI,TFIELDLIST(IDX)%TFIELD_X4D(IMI)%DATA)
           ELSE
             CALL PRINT_MSG(NVERB_ERROR,'IO','IO_WRITE_FIELDLIST','CLBTYPE/=NONE not (yet) allowed for 4D real fields')
             !PW: TODO?: add missing field in TFIELDLIST?
-            !CALL IO_WRITE_FIELD_LB(TPOUTPUT%TFILE,TFIELDLIST(IDX),HFIPRI,***,IRESP,TFIELDLIST(IDX)%TFIELD_X4D(IMI)%DATA)
+            !CALL IO_WRITE_FIELD_LB(TPOUTPUT%TFILE,TFIELDLIST(IDX),HFIPRI,***,TFIELDLIST(IDX)%TFIELD_X4D(IMI)%DATA)
           END IF
         !
         !4D other types
@@ -349,11 +348,11 @@ DO JI = 1,SIZE(TPOUTPUT%NFIELDLIST)
 !             STOP
 !           END IF
 !           IF ( TFIELDLIST(IDX)%CLBTYPE == 'NONE' ) THEN
-!             CALL IO_WRITE_FIELD(TPOUTPUT%TFILE,TFIELDLIST(IDX),HFIPRI,IRESP,TFIELDLIST(IDX)%TFIELD_X5D(IMI)%DATA)
+!             CALL IO_WRITE_FIELD(TPOUTPUT%TFILE,TFIELDLIST(IDX),HFIPRI,TFIELDLIST(IDX)%TFIELD_X5D(IMI)%DATA)
 !           ELSE
 !             CALL PRINT_MSG(NVERB_ERROR,'IO','IO_WRITE_FIELDLIST','CLBTYPE/=NONE not (yet) allowed for 5D real fields')
 !             !PW: TODO?: add missing field in TFIELDLIST?
-!             !CALL IO_WRITE_FIELD_LB(TPOUTPUT%TFILE,TFIELDLIST(IDX),HFIPRI,***,IRESP,TFIELDLIST(IDX)%TFIELD_X5D(IMI)%DATA)
+!             !CALL IO_WRITE_FIELD_LB(TPOUTPUT%TFILE,TFIELDLIST(IDX),HFIPRI,***,TFIELDLIST(IDX)%TFIELD_X5D(IMI)%DATA)
 !           END IF
 !         !
 !         !5D other types
@@ -380,11 +379,11 @@ DO JI = 1,SIZE(TPOUTPUT%NFIELDLIST)
 !             STOP
 !           END IF
 !           IF ( TFIELDLIST(IDX)%CLBTYPE == 'NONE' ) THEN
-!             CALL IO_WRITE_FIELD(TPOUTPUT%TFILE,TFIELDLIST(IDX),HFIPRI,IRESP,TFIELDLIST(IDX)%TFIELD_X6D(IMI)%DATA)
+!             CALL IO_WRITE_FIELD(TPOUTPUT%TFILE,TFIELDLIST(IDX),HFIPRI,TFIELDLIST(IDX)%TFIELD_X6D(IMI)%DATA)
 !           ELSE
 !             CALL PRINT_MSG(NVERB_ERROR,'IO','IO_WRITE_FIELDLIST','CLBTYPE/=NONE not (yet) allowed for 6D real fields')
 !             !PW: TODO?: add missing field in TFIELDLIST?
-!             !CALL IO_WRITE_FIELD_LB(TPOUTPUT%TFILE,TFIELDLIST(IDX),HFIPRI,***,IRESP,TFIELDLIST(IDX)%TFIELD_X6D(IMI)%DATA)
+!             !CALL IO_WRITE_FIELD_LB(TPOUTPUT%TFILE,TFIELDLIST(IDX),HFIPRI,***,TFIELDLIST(IDX)%TFIELD_X6D(IMI)%DATA)
 !           END IF
 !         !
 !         !6D other types
@@ -420,7 +419,6 @@ IMPLICIT NONE
 TYPE(TOUTBAK),    INTENT(IN)  :: TPOUTPUT !Output structure
 CHARACTER(LEN=*), INTENT(IN)  :: HFIPRI   ! File for prints in FM
 !
-INTEGER          :: IRESP
 TYPE(TFIELDDATA) :: TZFIELD
 !
 #if 0
@@ -437,7 +435,7 @@ TZFIELD%CCOMMENT   = 'X_Y_Z_U component of wind (m/s) at lowest physical level'
 TZFIELD%NGRID      = 2
 TZFIELD%NTYPE      = TYPEREAL
 TZFIELD%NDIMS      = 2
-CALL IO_WRITE_FIELD(TPOUTPUT%TFILE,TZFIELD,HFIPRI,IRESP,XUT(:,:,IKB))
+CALL IO_WRITE_FIELD(TPOUTPUT%TFILE,TZFIELD,HFIPRI,XUT(:,:,IKB))
 !
 TZFIELD%CMNHNAME   = 'VTLOW'
 TZFIELD%CSTDNAME   = 'y_wind'
@@ -448,7 +446,7 @@ TZFIELD%CCOMMENT   = 'X_Y_Z_V component of wind (m/s) at lowest physical level'
 TZFIELD%NGRID      = 3
 TZFIELD%NTYPE      = TYPEREAL
 TZFIELD%NDIMS      = 2
-CALL IO_WRITE_FIELD(TPOUTPUT%TFILE,TZFIELD,HFIPRI,IRESP,XVT(:,:,IKB))
+CALL IO_WRITE_FIELD(TPOUTPUT%TFILE,TZFIELD,HFIPRI,XVT(:,:,IKB))
 !
 TZFIELD%CMNHNAME   = 'THTLOW'
 TZFIELD%CSTDNAME   = 'air_potential_temperature'
@@ -459,7 +457,7 @@ TZFIELD%CCOMMENT   = 'X_Y_Z_potential temperature (K) at lowest physical level'
 TZFIELD%NGRID      = 1
 TZFIELD%NTYPE      = TYPEREAL
 TZFIELD%NDIMS      = 2
-CALL IO_WRITE_FIELD(TPOUTPUT%TFILE,TZFIELD,HFIPRI,IRESP,XTHT(:,:,IKB))
+CALL IO_WRITE_FIELD(TPOUTPUT%TFILE,TZFIELD,HFIPRI,XTHT(:,:,IKB))
 !
 TZFIELD%CMNHNAME   = 'RVTLOW'
 !TZFIELD%CSTDNAME   = 'humidity_mixing_ratio' !ratio of the mass of water vapor to the mass of dry air
@@ -471,7 +469,7 @@ TZFIELD%CCOMMENT   = 'X_Y_Z_Vapor mixing Ratio (KG/KG) at lowest physical level'
 TZFIELD%NGRID      = 1
 TZFIELD%NTYPE      = TYPEREAL
 TZFIELD%NDIMS      = 2
-CALL IO_WRITE_FIELD(TPOUTPUT%TFILE,TZFIELD,HFIPRI,IRESP,XRT(:,:,IKB,1))
+CALL IO_WRITE_FIELD(TPOUTPUT%TFILE,TZFIELD,HFIPRI,XRT(:,:,IKB,1))
 !
 TZFIELD%CMNHNAME   = 'ACPRRSTEP'
 TZFIELD%CSTDNAME   = 'rainfall_amount'
@@ -483,7 +481,7 @@ TZFIELD%NGRID      = 1
 TZFIELD%NTYPE      = TYPEREAL
 TZFIELD%NDIMS      = 2
 !XACPRR is multiplied by 1000. to convert from m to kg m-2 (water density is assumed to be 1000 kg m-3)
-CALL IO_WRITE_FIELD(TPOUTPUT%TFILE,TZFIELD,HFIPRI,IRESP,XINPRR*XTSTEP*1.0E3)
+CALL IO_WRITE_FIELD(TPOUTPUT%TFILE,TZFIELD,HFIPRI,XINPRR*XTSTEP*1.0E3)
 #endif
 !
 END SUBROUTINE IO_WRITE_FIELD_USER
diff --git a/src/MNH/advection_metsv.f90 b/src/MNH/advection_metsv.f90
index 0e16e2b23..5138248ec 100644
--- a/src/MNH/advection_metsv.f90
+++ b/src/MNH/advection_metsv.f90
@@ -316,7 +316,7 @@ IF (OCLOSE_OUT .AND. OCFL_WRIT .AND. (.NOT. L1D)) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZCFLU)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZCFLU)
 !
     TZFIELD%CMNHNAME   = 'CFLV'
     TZFIELD%CSTDNAME   = ''
@@ -327,7 +327,7 @@ IF (OCLOSE_OUT .AND. OCFL_WRIT .AND. (.NOT. L1D)) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZCFLV)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZCFLV)
 !
     TZFIELD%CMNHNAME   = 'CFLW'
     TZFIELD%CSTDNAME   = ''
@@ -338,7 +338,7 @@ IF (OCLOSE_OUT .AND. OCFL_WRIT .AND. (.NOT. L1D)) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZCFLW)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZCFLW)
 !
     TZFIELD%CMNHNAME   = 'CFL'
     TZFIELD%CSTDNAME   = ''
@@ -349,7 +349,7 @@ IF (OCLOSE_OUT .AND. OCFL_WRIT .AND. (.NOT. L1D)) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZCFL)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZCFL)
 END IF
 !
 !* prints in the output file the maximum CFL
diff --git a/src/MNH/c2r2_adjust.f90 b/src/MNH/c2r2_adjust.f90
index 48587b612..194b00a98 100644
--- a/src/MNH/c2r2_adjust.f90
+++ b/src/MNH/c2r2_adjust.f90
@@ -432,7 +432,7 @@ IF ( OCLOSE_OUT ) THEN
   TZFIELD%NGRID      = 1
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 3
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZW1)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZW1)
 END IF
 !
 !
diff --git a/src/MNH/call_rttov11.f90 b/src/MNH/call_rttov11.f90
index 30a17674a..4bc195d4b 100644
--- a/src/MNH/call_rttov11.f90
+++ b/src/MNH/call_rttov11.f90
@@ -217,8 +217,6 @@ REAL, DIMENSION(:), ALLOCATABLE :: ZQVSAT, ZVINT !Array used in interpolation
 REAL, DIMENSION(:), ALLOCATABLE :: ZPSUM, ZTSUM, ZQVSUM, ZO3SUM !Array used in interpolation
 REAL :: zconst, ZPS, ZTGRAD, ZQGRAD, ZOGRAD !variables used in interpolation
 REAL, DIMENSION(:), ALLOCATABLE :: ZPIN, ZFIN, ZOUT
-! variables for FMWRIT
-INTEGER           :: IRESP          ! IRESP  : return-code if a problem appears
 !  at the open of the file LFI routines 
 CHARACTER(LEN=8)  :: YINST  
 CHARACTER(LEN=4)  :: YBEG, YEND
@@ -323,14 +321,14 @@ DO JSAT=1,IJSAT ! loop over sensors
   CALL rttov_read_coefs (errorstatus, coef_rttov, opts, instrument=instrument)
   IF(errorstatus /= 0) THEN
     WRITE(*,*) 'error rttov_readcoeffs :',errorstatus
-    CALL CLOSE_ll(CLUOUT,IOSTAT=IRESP)
+    CALL CLOSE_ll(CLUOUT)
     CALL ABORT
     STOP "error rttov_readcoeffs"
   ENDIF
 !  CALL rttov_initcoeffs (errorstatus,coef_rttov)
 !  IF( errorstatus/= 0) THEN
 !    WRITE(*,*) 'error rttov_initcoeffs :',errorstatus
-!    CALL CLOSE_ll(CLUOUT,IOSTAT=IRESP)
+!    CALL CLOSE_ll(CLUOUT)
 !    CALL ABORT
 !    STOP "error rttov_initcoeffs"
 !  ENDIF
@@ -578,7 +576,7 @@ DO JSAT=1,IJSAT ! loop over sensors
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 2
     PRINT *,'YRECFM='//TRIM(TZFIELD%CMNHNAME)
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZBT(:,:,JCH))
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZBT(:,:,JCH))
   END DO
   DEALLOCATE(chanprof,frequencies,emissivity,calcemis,profiles,cld_profiles)
   DEALLOCATE(ZBT)
diff --git a/src/MNH/call_rttov8.f90 b/src/MNH/call_rttov8.f90
index 5c758099e..792b857a0 100644
--- a/src/MNH/call_rttov8.f90
+++ b/src/MNH/call_rttov8.f90
@@ -620,8 +620,6 @@ REAL, DIMENSION(:), ALLOCATABLE :: ZQVSAT, ZVINT !Array used in interpolation
 REAL, DIMENSION(:), ALLOCATABLE :: ZPSUM, ZTSUM, ZQVSUM, ZO3SUM !Array used in interpolation
 REAL :: zconst, ZPS, ZTGRAD, ZQGRAD, ZOGRAD !variables used in interpolation
 REAL, DIMENSION(:), ALLOCATABLE :: ZPIN, ZFIN, ZOUT
-! variables for FMWRIT
-INTEGER           :: IRESP          ! IRESP  : return-code if a problem appears
 !  at the open of the file LFI routines 
 CHARACTER(LEN=8)  :: YINST  
 CHARACTER(LEN=4)  :: YBEG, YEND
@@ -1163,7 +1161,7 @@ DO JSAT=1,IJSAT ! loop over sensors
   IF(errorstatus /= 0) THEN
     WRITE(*,*) 'error rttov_readcoeffs :',errorstatus
 !callabortstop
-    CALL CLOSE_ll(CLUOUT,IOSTAT=IRESP)
+    CALL CLOSE_ll(CLUOUT)
     CALL ABORT
     STOP "error rttov_readcoeffs"
   ENDIF
@@ -1171,7 +1169,7 @@ DO JSAT=1,IJSAT ! loop over sensors
   IF(errorstatus /= 0) THEN
     WRITE(*,*) 'error rttov_initcoeffs :',errorstatus
 !callabortstop
-    CALL CLOSE_ll(CLUOUT,IOSTAT=IRESP)
+    CALL CLOSE_ll(CLUOUT)
     CALL ABORT
     STOP "error rttov_initcoeffs"
   ENDIF
@@ -1586,7 +1584,7 @@ DO JSAT=1,IJSAT ! loop over sensors
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 2
     PRINT *,TZFIELD%CMNHNAME//TZFIELD%CCOMMENT
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZANTMP)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZANTMP)
   END IF
   DEALLOCATE(ZANTMP)
 ! -----------------------------------------------------------------------------
@@ -1644,7 +1642,7 @@ DO JSAT=1,IJSAT ! loop over sensors
     PRINT *,TZFIELD%CMNHNAME//TZFIELD%CCOMMENT, &
          MINVAL(ZTBTMP(:,:,JCH),ZTBTMP(:,:,JCH)/=XUNDEF), &
          MAXVAL(ZTBTMP(:,:,JCH),ZTBTMP(:,:,JCH)/=XUNDEF)
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZTBTMP(:,:,JCH))
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZTBTMP(:,:,JCH))
     IF (KRTTOVINFO(3,JSAT) == 4.AND. JCH==3 ) THEN ! AMSU-B
       TZFIELD%CMNHNAME   = TRIM(YBEG)//'_UTH'
       TZFIELD%CSTDNAME   = ''
@@ -1672,7 +1670,7 @@ DO JSAT=1,IJSAT ! loop over sensors
           END IF
         END DO
       END DO
-      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZUTH)
+      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZUTH)
       DEALLOCATE(ZUTH)
     END IF
   END DO
@@ -1738,7 +1736,7 @@ DO JSAT=1,IJSAT ! loop over sensors
       PRINT *,TZFIELD%CMNHNAME//TZFIELD%CCOMMENT, &
            MINVAL(ZTEMPK(:,:,:),ZTEMPK(:,:,:)/=XUNDEF), &
            MAXVAL(ZTEMPK(:,:,:),ZTEMPK(:,:,:)/=XUNDEF)
-      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZTEMPK(:,:,:))
+      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZTEMPK(:,:,:))
       !
       TZFIELD%CMNHNAME   = TRIM(YBEG)//'_'//TRIM(YEND)//'JAV'
       TZFIELD%CSTDNAME   = ''
@@ -1754,7 +1752,7 @@ DO JSAT=1,IJSAT ! loop over sensors
       PRINT *,TZFIELD%CMNHNAME//TZFIELD%CCOMMENT, &
            MINVAL(ZWVAPK(:,:,:),ZWVAPK(:,:,:)/=XUNDEF), &
            MAXVAL(ZWVAPK(:,:,:),ZWVAPK(:,:,:)/=XUNDEF)
-      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWVAPK(:,:,:))
+      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWVAPK(:,:,:))
     END DO
     DEALLOCATE(ZTEMPKP,ZWVAPKP,ZFIN)
   ENDIF
diff --git a/src/MNH/compute_r00.f90 b/src/MNH/compute_r00.f90
index a537e5e55..a584591f2 100644
--- a/src/MNH/compute_r00.f90
+++ b/src/MNH/compute_r00.f90
@@ -307,7 +307,7 @@ DO JFILECUR=1,NFILES
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZX00(:,:,:))
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZX00(:,:,:))
     !
     WRITE(TZFIELD%CMNHNAME,'(A2,I2.2)')'Y0',INBR_START
     TZFIELD%CSTDNAME   = ''
@@ -319,7 +319,7 @@ DO JFILECUR=1,NFILES
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZY00(:,:,:))
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZY00(:,:,:))
     !
     WRITE(TZFIELD%CMNHNAME,'(A2,I2.2)')'Z0',INBR_START
     TZFIELD%CSTDNAME   = ''
@@ -331,7 +331,7 @@ DO JFILECUR=1,NFILES
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZZ00(:,:,:))
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZZ00(:,:,:))
   END IF
 !
 !
@@ -359,7 +359,7 @@ DO JFILECUR=1,NFILES
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK1(:,:,:))
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK1(:,:,:))
     !
     WRITE(TZFIELD%CMNHNAME,'(A3,I2.2)')'RV0',INBR_START
     TZFIELD%CSTDNAME   = ''
@@ -371,7 +371,7 @@ DO JFILECUR=1,NFILES
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK2(:,:,:))
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK2(:,:,:))
   ENDIF
 !*       4.4   compute the origin of the particules using one more segment
 !
diff --git a/src/MNH/free_atm_profile.f90 b/src/MNH/free_atm_profile.f90
index a7b8c0592..87dcf6e5e 100644
--- a/src/MNH/free_atm_profile.f90
+++ b/src/MNH/free_atm_profile.f90
@@ -491,7 +491,7 @@ IF (CPROGRAM == 'DIAG  ' ) THEN
   TZFIELD%NGRID      = 4
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 2
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT0,IRESP,Z2D)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT0,Z2D)
 !
 !*      11.2  Writing of level of boundary layer top
 !             --------------------------------------
@@ -506,7 +506,7 @@ IF (CPROGRAM == 'DIAG  ' ) THEN
   TZFIELD%NGRID      = 4
   TZFIELD%NTYPE      = TYPEINT
   TZFIELD%NDIMS      = 2
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT0,IRESP,IK_BL_TOP)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT0,IK_BL_TOP)
 END IF
 !
 IF (CPROGRAM /= 'DIAG  ' .AND. CPROGRAM /= 'IDEAL ' ) THEN
@@ -525,7 +525,7 @@ IF (CPROGRAM /= 'DIAG  ' .AND. CPROGRAM /= 'IDEAL ' ) THEN
   TZFIELD%NGRID      = 4
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 2
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT0,IRESP,Z2D)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT0,Z2D)
 !
 !*      11.4  Writing of free atmosphere 3D profiles
 !             --------------------------------------
@@ -545,7 +545,7 @@ IF (CPROGRAM /= 'DIAG  ' .AND. CPROGRAM /= 'IDEAL ' ) THEN
   TZFIELD%NGRID      = 4
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 3
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT0,IRESP,Z3D)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT0,Z3D)
 !
 END IF
 !-------------------------------------------------------------------------------
diff --git a/src/MNH/khko_notadjust.f90 b/src/MNH/khko_notadjust.f90
index b3f7f9605..b7ac1531f 100644
--- a/src/MNH/khko_notadjust.f90
+++ b/src/MNH/khko_notadjust.f90
@@ -401,7 +401,7 @@ IF ( OCLOSE_OUT ) THEN
   TZFIELD%NGRID      = 1
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 3
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZWORK)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZWORK)
   !
   TZFIELD%CMNHNAME   = 'ACT_OD'
   TZFIELD%CSTDNAME   = ''
@@ -412,7 +412,7 @@ IF ( OCLOSE_OUT ) THEN
   TZFIELD%NGRID      = 1
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 3
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZACT)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZACT)
 END IF
 !
 !*       7.  STORE THE BUDGET TERMS
diff --git a/src/MNH/lima_adjust.f90 b/src/MNH/lima_adjust.f90
index 2ee163edd..f875ad35d 100644
--- a/src/MNH/lima_adjust.f90
+++ b/src/MNH/lima_adjust.f90
@@ -1129,7 +1129,7 @@ IF ( OCLOSE_OUT ) THEN
   TZFIELD%NGRID      = 1
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 3
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZW)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZW)
 END IF
 !
 !
@@ -1183,7 +1183,7 @@ IF ( OCLOSE_OUT ) THEN
   TZFIELD%NGRID      = 1
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 3
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZW)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZW)
 END IF
 !
 !
diff --git a/src/MNH/menu_diachro.f90 b/src/MNH/menu_diachro.f90
index c508e80bc..a0b98ce9f 100644
--- a/src/MNH/menu_diachro.f90
+++ b/src/MNH/menu_diachro.f90
@@ -113,7 +113,7 @@ IF(HGROUP == 'END')THEN
   TZFIELD%NGRID      = 0
   TZFIELD%NTYPE      = TYPEINT
   TZFIELD%NDIMS      = 0
-  CALL IO_WRITE_FIELD(TPDIAFILE,TZFIELD,HLUOUTDIA,IRESPDIA,ILENG)
+  CALL IO_WRITE_FIELD(TPDIAFILE,TZFIELD,HLUOUTDIA,ILENG)
 
   ALLOCATE(ITABCHAR(ILENG))
   DO JJ=1,IGROUP
@@ -131,7 +131,7 @@ IF(HGROUP == 'END')THEN
   TZFIELD%NGRID      = 0
   TZFIELD%NTYPE      = TYPEINT
   TZFIELD%NDIMS      = 1
-  CALL IO_WRITE_FIELD(TPDIAFILE,TZFIELD,HLUOUTDIA,IRESPDIA,ITABCHAR)
+  CALL IO_WRITE_FIELD(TPDIAFILE,TZFIELD,HLUOUTDIA,ITABCHAR)
 
   DEALLOCATE(ITABCHAR)
 
diff --git a/src/MNH/mnhwrite_zs_dummyn.f90 b/src/MNH/mnhwrite_zs_dummyn.f90
index 00e0a465f..3482f54bd 100644
--- a/src/MNH/mnhwrite_zs_dummyn.f90
+++ b/src/MNH/mnhwrite_zs_dummyn.f90
@@ -82,14 +82,6 @@ TYPE(TFILEDATA),   INTENT(IN) :: TPFILE ! File characteristics
 !*       0.2   Declarations of local variables
 !              -------------------------------
 !
-INTEGER           :: IRESP          ! IRESP  : return-code if a problem appears 
-                                    ! at the open of the file in LFI  routines 
-INTEGER           :: IGRID          ! IGRID : grid indicator
-INTEGER           :: ILENCH         ! ILENCH : length of comment string 
-CHARACTER(LEN=16) :: YRECFM         ! Name of the article to be read
-CHARACTER(LEN=100):: YCOMMENT       ! Comment string
-!
-!
 !-------------------------------------------------------------------------------
 !
 !*       1.     Orography :
@@ -105,14 +97,14 @@ IF (CSURF /='EXTE') RETURN
 !*       2.     Orographic characteristics :
 !               --------------------------
 !
-CALL IO_WRITE_FIELD(TPFILE,'SSO_ANIS', CLUOUT,IRESP,XSSO_ANISOTROPY)
-CALL IO_WRITE_FIELD(TPFILE,'SSO_SLOPE',CLUOUT,IRESP,XSSO_SLOPE)
-CALL IO_WRITE_FIELD(TPFILE,'SSO_DIR',  CLUOUT,IRESP,XSSO_DIRECTION)
-CALL IO_WRITE_FIELD(TPFILE,'AVG_ZS',   CLUOUT,IRESP,XAVG_ZS)
-CALL IO_WRITE_FIELD(TPFILE,'SIL_ZS',   CLUOUT,IRESP,XSIL_ZS)
-CALL IO_WRITE_FIELD(TPFILE,'MAX_ZS',   CLUOUT,IRESP,XMAX_ZS)
-CALL IO_WRITE_FIELD(TPFILE,'MIN_ZS',   CLUOUT,IRESP,XMIN_ZS)
-CALL IO_WRITE_FIELD(TPFILE,'SSO_STDEV',CLUOUT,IRESP,XSSO_STDEV)
+CALL IO_WRITE_FIELD(TPFILE,'SSO_ANIS', CLUOUT,XSSO_ANISOTROPY)
+CALL IO_WRITE_FIELD(TPFILE,'SSO_SLOPE',CLUOUT,XSSO_SLOPE)
+CALL IO_WRITE_FIELD(TPFILE,'SSO_DIR',  CLUOUT,XSSO_DIRECTION)
+CALL IO_WRITE_FIELD(TPFILE,'AVG_ZS',   CLUOUT,XAVG_ZS)
+CALL IO_WRITE_FIELD(TPFILE,'SIL_ZS',   CLUOUT,XSIL_ZS)
+CALL IO_WRITE_FIELD(TPFILE,'MAX_ZS',   CLUOUT,XMAX_ZS)
+CALL IO_WRITE_FIELD(TPFILE,'MIN_ZS',   CLUOUT,XMIN_ZS)
+CALL IO_WRITE_FIELD(TPFILE,'SSO_STDEV',CLUOUT,XSSO_STDEV)
 !
 !-------------------------------------------------------------------------------
 !
diff --git a/src/MNH/paspol.f90 b/src/MNH/paspol.f90
index ee02db536..2d62e56ab 100644
--- a/src/MNH/paspol.f90
+++ b/src/MNH/paspol.f90
@@ -143,7 +143,6 @@ REAL    :: ZP, ZTH, ZT, ZRHO, ZMASAIR
 REAL,  DIMENSION(:,:,:), ALLOCATABLE :: ZRHOM  ! 
 REAL,  DIMENSION(:,:,:), ALLOCATABLE :: ZTEMPO, ZSVT ! Work arrays
 !
-INTEGER           :: IRESP
 TYPE(TFIELDDATA)  :: TZFIELD
 !
 !
@@ -592,7 +591,7 @@ IF (OCLOSE_OUT) THEN
     TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
     WRITE(TZFIELD%CCOMMENT,'(A6,A3,I3.3)')'X_Y_Z_','ATC',JSV+NSV_PPBEG-1
     !
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZTEMPO)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZTEMPO)
   END DO
   !
   DEALLOCATE(ZTEMPO)
diff --git a/src/MNH/prandtl.f90 b/src/MNH/prandtl.f90
index a49b24f6f..ffc9c150d 100644
--- a/src/MNH/prandtl.f90
+++ b/src/MNH/prandtl.f90
@@ -275,13 +275,6 @@ REAL, DIMENSION(SIZE(PTHLM,1),SIZE(PTHLM,2),SIZE(PTHLM,3)) ::  &
 !                                                     
 INTEGER :: IKB      ! vertical index value for the first inner mass point
 INTEGER :: IKE      ! vertical index value for the last inner mass point
-INTEGER             :: IRESP        ! Return code of FM routines
-INTEGER             :: ILENG        ! Length of the data field in LFIFM file
-INTEGER             :: IGRID        ! C-grid indicator in LFIFM file
-INTEGER             :: ILENCH       ! Length of comment string in LFIFM file
-CHARACTER (LEN=28)  :: YFMFILE      ! Name of FM-file to write
-CHARACTER (LEN=100) :: YCOMMENT     ! comment string in LFIFM file
-CHARACTER (LEN=16)  :: YRECFM       ! Name of the desired field in LFIFM file
 INTEGER::  ISV                      ! number of scalar variables       
 INTEGER::  JSV                      ! loop index for the scalar variables  
 
@@ -290,14 +283,11 @@ REAL    :: ZMINVAL
 TYPE(TFIELDDATA)  :: TZFIELD
 ! ---------------------------------------------------------------------------
 !
-YFMFILE = TPFILE%CNAME
-!
 !*      1.  DEFAULT VALUES,  1D REDELSPERGER NUMBERS 
 !           ----------------------------------------
 !
 IKB = KKA+JPVEXT_TURB*KKL
 IKE = KKU-JPVEXT_TURB*KKL 
-ILENG=SIZE(PTHLM,1)*SIZE(PTHLM,2)*SIZE(PTHLM,3)
 ISV  =SIZE(PSVM,4)
 !
 PETHETA(:,:,:) = MZM(KKA,KKU,KKL, ETHETA(KRR,KRRI,PTHLM,PRM,PLOCPEXNM,PATHETA,PSRCM) )
@@ -539,7 +529,7 @@ IF ( OTURB_DIAG .AND. OCLOSE_OUT ) THEN
   TZFIELD%NGRID      = 4
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 3
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,PREDTH1)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,PREDTH1)
   !
   ! stores the RED_R1
   TZFIELD%CMNHNAME   = 'RED_R1'
@@ -551,7 +541,7 @@ IF ( OTURB_DIAG .AND. OCLOSE_OUT ) THEN
   TZFIELD%NGRID      = 4
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 3
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,PREDR1)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,PREDR1)
   !
   ! stores the RED2_TH3
   TZFIELD%CMNHNAME   = 'RED2_TH3'
@@ -563,7 +553,7 @@ IF ( OTURB_DIAG .AND. OCLOSE_OUT ) THEN
   TZFIELD%NGRID      = 4
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 3
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,PRED2TH3)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,PRED2TH3)
   !
   ! stores the RED2_R3
   TZFIELD%CMNHNAME   = 'RED2_R3'
@@ -575,7 +565,7 @@ IF ( OTURB_DIAG .AND. OCLOSE_OUT ) THEN
   TZFIELD%NGRID      = 4
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 3
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,PRED2R3)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,PRED2R3)
   !
   ! stores the RED2_THR3
   TZFIELD%CMNHNAME   = 'RED2_THR3'
@@ -587,7 +577,7 @@ IF ( OTURB_DIAG .AND. OCLOSE_OUT ) THEN
   TZFIELD%NGRID      = 4
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 3
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,PRED2THR3)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,PRED2THR3)
   !
 END IF
 !
diff --git a/src/MNH/prep_ideal_case.f90 b/src/MNH/prep_ideal_case.f90
index bc6f8c9d8..9f20000f1 100644
--- a/src/MNH/prep_ideal_case.f90
+++ b/src/MNH/prep_ideal_case.f90
@@ -1863,10 +1863,10 @@ IF (CSURF =='EXTE') THEN
     CALL IO_FILE_OPEN_ll(TZINIFILEPGD,CLUOUT,NRESP)
     !
     CALL IO_WRITE_HEADER(TZINIFILEPGD,CLUOUT)
-    CALL IO_WRITE_FIELD(TZINIFILEPGD,'SURF',CLUOUT,IRESP,'EXTE')
-    CALL IO_WRITE_FIELD(TZINIFILEPGD,'L1D', CLUOUT,IRESP,L1D)
-    CALL IO_WRITE_FIELD(TZINIFILEPGD,'L2D', CLUOUT,IRESP,L2D)
-    CALL IO_WRITE_FIELD(TZINIFILEPGD,'PACK',CLUOUT,IRESP,LPACK)
+    CALL IO_WRITE_FIELD(TZINIFILEPGD,'SURF',CLUOUT,'EXTE')
+    CALL IO_WRITE_FIELD(TZINIFILEPGD,'L1D', CLUOUT,L1D)
+    CALL IO_WRITE_FIELD(TZINIFILEPGD,'L2D', CLUOUT,L2D)
+    CALL IO_WRITE_FIELD(TZINIFILEPGD,'PACK',CLUOUT,LPACK)
     CALL WRITE_HGRID(1,TZINIFILEPGD)
     TFILE_SURFEX => TZINIFILEPGD
     CALL WRITE_PGD_SURF_ATM_n(YSURF_CUR,'MESONH')
diff --git a/src/MNH/prep_nest_pgd.f90 b/src/MNH/prep_nest_pgd.f90
index 41f2b91e9..1fe61ace9 100644
--- a/src/MNH/prep_nest_pgd.f90
+++ b/src/MNH/prep_nest_pgd.f90
@@ -354,7 +354,7 @@ DO JPGD=1,NMODEL
   TFILE_SURFEX => TZFILENESTPGD(JPGD)
   CALL WRITE_PGD_SURF_ATM_n(YSURF_CUR,'MESONH')
   NULLIFY(TFILE_SURFEX)
-  CALL IO_WRITE_FIELD(TZFILENESTPGD(JPGD),'ZSMT',CLUOUT0,IRESP,XZSMT)
+  CALL IO_WRITE_FIELD(TZFILENESTPGD(JPGD),'ZSMT',CLUOUT0,XZSMT)
 END DO
 !
 !-------------------------------------------------------------------------------
@@ -366,16 +366,16 @@ END DO
 DO JPGD=1,NMODEL
   CALL IO_WRITE_HEADER(TZFILENESTPGD(JPGD),CLUOUT0)
   IF ( ASSOCIATED(TZFILENESTPGD(JPGD)%TDADFILE) ) THEN
-    CALL IO_WRITE_FIELD(TZFILENESTPGD(JPGD),'DXRATIO',CLUOUT0,IRESP,NDXRATIO_ALL(JPGD))
-    CALL IO_WRITE_FIELD(TZFILENESTPGD(JPGD),'DYRATIO',CLUOUT0,IRESP,NDYRATIO_ALL(JPGD))
-    CALL IO_WRITE_FIELD(TZFILENESTPGD(JPGD),'XOR',    CLUOUT0,IRESP,NXOR_ALL(JPGD))
-    CALL IO_WRITE_FIELD(TZFILENESTPGD(JPGD),'YOR',    CLUOUT0,IRESP,NYOR_ALL(JPGD))
+    CALL IO_WRITE_FIELD(TZFILENESTPGD(JPGD),'DXRATIO',CLUOUT0,NDXRATIO_ALL(JPGD))
+    CALL IO_WRITE_FIELD(TZFILENESTPGD(JPGD),'DYRATIO',CLUOUT0,NDYRATIO_ALL(JPGD))
+    CALL IO_WRITE_FIELD(TZFILENESTPGD(JPGD),'XOR',    CLUOUT0,NXOR_ALL(JPGD))
+    CALL IO_WRITE_FIELD(TZFILENESTPGD(JPGD),'YOR',    CLUOUT0,NYOR_ALL(JPGD))
   END IF
-  CALL IO_WRITE_FIELD(TZFILENESTPGD(JPGD),'SURF',  CLUOUT0,IRESP,'EXTE')
-  CALL IO_WRITE_FIELD(TZFILENESTPGD(JPGD),'L1D',   CLUOUT0,IRESP,L1D_ALL(JPGD))
-  CALL IO_WRITE_FIELD(TZFILENESTPGD(JPGD),'L2D',   CLUOUT0,IRESP,L2D_ALL(JPGD))
-  CALL IO_WRITE_FIELD(TZFILENESTPGD(JPGD),'PACK',  CLUOUT0,IRESP,LPACK_ALL(JPGD))
-  CALL IO_WRITE_FIELD(TZFILENESTPGD(JPGD),'JPHEXT',CLUOUT0,IRESP,JPHEXT)
+  CALL IO_WRITE_FIELD(TZFILENESTPGD(JPGD),'SURF',  CLUOUT0,'EXTE')
+  CALL IO_WRITE_FIELD(TZFILENESTPGD(JPGD),'L1D',   CLUOUT0,L1D_ALL(JPGD))
+  CALL IO_WRITE_FIELD(TZFILENESTPGD(JPGD),'L2D',   CLUOUT0,L2D_ALL(JPGD))
+  CALL IO_WRITE_FIELD(TZFILENESTPGD(JPGD),'PACK',  CLUOUT0,LPACK_ALL(JPGD))
+  CALL IO_WRITE_FIELD(TZFILENESTPGD(JPGD),'JPHEXT',CLUOUT0,JPHEXT)
 END DO
 !
 !-------------------------------------------------------------------------------
diff --git a/src/MNH/prep_pgd.f90 b/src/MNH/prep_pgd.f90
index 2418d89bf..af6528e6c 100644
--- a/src/MNH/prep_pgd.f90
+++ b/src/MNH/prep_pgd.f90
@@ -261,10 +261,10 @@ CALL IO_FILE_OPEN_ll(TZFILE,CLUOUT0,IRESP,OPARALLELIO=.FALSE.)
 !
 CALL IO_WRITE_HEADER(TZFILE,CLUOUT0)
 !
-CALL IO_WRITE_FIELD(TZFILE,'SURF',CLUOUT0,IRESP,'EXTE')
-CALL IO_WRITE_FIELD(TZFILE,'L1D', CLUOUT0,IRESP,L1D)
-CALL IO_WRITE_FIELD(TZFILE,'L2D', CLUOUT0,IRESP,L2D)
-CALL IO_WRITE_FIELD(TZFILE,'PACK',CLUOUT0,IRESP,LPACK)
+CALL IO_WRITE_FIELD(TZFILE,'SURF',CLUOUT0,'EXTE')
+CALL IO_WRITE_FIELD(TZFILE,'L1D', CLUOUT0,L1D)
+CALL IO_WRITE_FIELD(TZFILE,'L2D', CLUOUT0,L2D)
+CALL IO_WRITE_FIELD(TZFILE,'PACK',CLUOUT0,LPACK)
 IF ( NDXRATIO <= 0 .AND. NDYRATIO <= 0 ) THEN
   NDXRATIO = 1
   NDYRATIO = 1
@@ -277,13 +277,13 @@ IF ( NXOR <= 0 .AND. NYOR <= 0 ) THEN
   NXOR = 1
   NYOR = 1
 ENDIF
-CALL IO_WRITE_FIELD(TZFILE,'DXRATIO',CLUOUT0,IRESP,NDXRATIO)
-CALL IO_WRITE_FIELD(TZFILE,'DYRATIO',CLUOUT0,IRESP,NDYRATIO)
-CALL IO_WRITE_FIELD(TZFILE,'XSIZE',  CLUOUT0,IRESP,NXSIZE)
-CALL IO_WRITE_FIELD(TZFILE,'YSIZE',  CLUOUT0,IRESP,NYSIZE)
-CALL IO_WRITE_FIELD(TZFILE,'XOR',    CLUOUT0,IRESP,NXOR)
-CALL IO_WRITE_FIELD(TZFILE,'YOR',    CLUOUT0,IRESP,NYOR)
-CALL IO_WRITE_FIELD(TZFILE,'JPHEXT', CLUOUT0,IRESP,JPHEXT)
+CALL IO_WRITE_FIELD(TZFILE,'DXRATIO',CLUOUT0,NDXRATIO)
+CALL IO_WRITE_FIELD(TZFILE,'DYRATIO',CLUOUT0,NDYRATIO)
+CALL IO_WRITE_FIELD(TZFILE,'XSIZE',  CLUOUT0,NXSIZE)
+CALL IO_WRITE_FIELD(TZFILE,'YSIZE',  CLUOUT0,NYSIZE)
+CALL IO_WRITE_FIELD(TZFILE,'XOR',    CLUOUT0,NXOR)
+CALL IO_WRITE_FIELD(TZFILE,'YOR',    CLUOUT0,NYOR)
+CALL IO_WRITE_FIELD(TZFILE,'JPHEXT', CLUOUT0,JPHEXT)
 !
 TFILE_SURFEX => TZFILE
 CALL WRITE_PGD_SURF_ATM_n(YSURF_CUR,'MESONH')
@@ -319,8 +319,8 @@ IF (.NOT.LCARTESIAN) THEN
      ZWORK_LON(:,1) = ZWORK_LON(:,2)
      ZWORK_LON(:,IJMAX+2) = ZWORK_LON(:,IJMAX+1)           
    ENDIF   
-   CALL IO_WRITE_FIELD(TZFILE,'LAT',CLUOUT0,IRESP,ZWORK_LAT)
-   CALL IO_WRITE_FIELD(TZFILE,'LON',CLUOUT0,IRESP,ZWORK_LON)
+   CALL IO_WRITE_FIELD(TZFILE,'LAT',CLUOUT0,ZWORK_LAT)
+   CALL IO_WRITE_FIELD(TZFILE,'LON',CLUOUT0,ZWORK_LON)
    !
    DEALLOCATE(ZWORK,ZWORK_LAT,ZWORK_LON)
 END IF
diff --git a/src/MNH/prep_surfex.f90 b/src/MNH/prep_surfex.f90
index 701baacf3..4ec85e838 100644
--- a/src/MNH/prep_surfex.f90
+++ b/src/MNH/prep_surfex.f90
@@ -207,10 +207,10 @@ NULLIFY(TFILE_SURFEX)
 !-------------------------------------------------------------------------------
 !
 CALL IO_WRITE_HEADER(TZFILE,CLUOUT0)
-CALL IO_WRITE_FIELD(TZFILE,'SURF',CLUOUT0,IRESP,'EXTE')
-CALL IO_WRITE_FIELD(TZFILE,'L1D', CLUOUT0,IRESP,L1D)
-CALL IO_WRITE_FIELD(TZFILE,'L2D', CLUOUT0,IRESP,L2D)
-CALL IO_WRITE_FIELD(TZFILE,'PACK',CLUOUT0,IRESP,LPACK)
+CALL IO_WRITE_FIELD(TZFILE,'SURF',CLUOUT0,'EXTE')
+CALL IO_WRITE_FIELD(TZFILE,'L1D', CLUOUT0,L1D)
+CALL IO_WRITE_FIELD(TZFILE,'L2D', CLUOUT0,L2D)
+CALL IO_WRITE_FIELD(TZFILE,'PACK',CLUOUT0,LPACK)
 !
 !-------------------------------------------------------------------------------
 WRITE(ILUOUT0,*) ' '
diff --git a/src/MNH/radiations.f90 b/src/MNH/radiations.f90
index acb209da2..6ac3428b4 100644
--- a/src/MNH/radiations.f90
+++ b/src/MNH/radiations.f90
@@ -2593,7 +2593,7 @@ IF( OCLOSE_OUT .AND. (KRAD_DIAG >= 1) ) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZSTORE_3D)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZSTORE_3D)
 !
     DO JK=IKB,IKE
       JKRAD = JK - JPVEXT
@@ -2613,7 +2613,7 @@ IF( OCLOSE_OUT .AND. (KRAD_DIAG >= 1) ) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZSTORE_3D)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZSTORE_3D)
 !
     DO JK=IKB,IKE
       JKRAD = JK - JPVEXT
@@ -2633,7 +2633,7 @@ IF( OCLOSE_OUT .AND. (KRAD_DIAG >= 1) ) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZSTORE_3D)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZSTORE_3D)
 !
     DO JK=IKB,IKE
       JKRAD = JK - JPVEXT
@@ -2653,7 +2653,7 @@ IF( OCLOSE_OUT .AND. (KRAD_DIAG >= 1) ) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZSTORE_3D)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZSTORE_3D)
 !
     DO JK=IKB,IKE
       JKRAD = JK - JPVEXT
@@ -2673,7 +2673,7 @@ IF( OCLOSE_OUT .AND. (KRAD_DIAG >= 1) ) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZSTORE_3D)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZSTORE_3D)
 !
     DO JK=IKB,IKE
       JKRAD = JK - JPVEXT
@@ -2693,7 +2693,7 @@ IF( OCLOSE_OUT .AND. (KRAD_DIAG >= 1) ) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZSTORE_3D)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZSTORE_3D)
 !
     DO JK=IKB,IKE
       DO JJ=IJB,IJE
@@ -2711,7 +2711,7 @@ IF( OCLOSE_OUT .AND. (KRAD_DIAG >= 1) ) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZSTORE_3D)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZSTORE_3D)
 !
     DO JK=IKB,IKE
       DO JJ=IJB,IJE
@@ -2729,7 +2729,7 @@ IF( OCLOSE_OUT .AND. (KRAD_DIAG >= 1) ) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZSTORE_3D)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZSTORE_3D)
 !
     DO JJ=IJB,IJE
       DO JI=IIB,IIE
@@ -2746,7 +2746,7 @@ IF( OCLOSE_OUT .AND. (KRAD_DIAG >= 1) ) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 2
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZSTORE_2D)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZSTORE_2D)
 !
     DO JJ=IJB,IJE
       DO JI=IIB,IIE
@@ -2763,7 +2763,7 @@ IF( OCLOSE_OUT .AND. (KRAD_DIAG >= 1) ) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 2
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZSTORE_2D)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZSTORE_2D)
     !
     DO JJ=IJB,IJE
       DO JI=IIB,IIE
@@ -2780,7 +2780,7 @@ IF( OCLOSE_OUT .AND. (KRAD_DIAG >= 1) ) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 2
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZSTORE_2D)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZSTORE_2D)
   END IF
   !
   !
@@ -2803,7 +2803,7 @@ IF( OCLOSE_OUT .AND. (KRAD_DIAG >= 1) ) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZSTORE_3D)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZSTORE_3D)
     !
     DO JK=IKB,IKE
       JKRAD = JK - JPVEXT
@@ -2823,7 +2823,7 @@ IF( OCLOSE_OUT .AND. (KRAD_DIAG >= 1) ) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZSTORE_3D)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZSTORE_3D)
     !
     DO JK=IKB,IKE
       JKRAD = JK - JPVEXT
@@ -2843,7 +2843,7 @@ IF( OCLOSE_OUT .AND. (KRAD_DIAG >= 1) ) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZSTORE_3D)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZSTORE_3D)
     !
     DO JK=IKB,IKE
       JKRAD = JK - JPVEXT
@@ -2863,7 +2863,7 @@ IF( OCLOSE_OUT .AND. (KRAD_DIAG >= 1) ) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZSTORE_3D)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZSTORE_3D)
     !
     DO JK=IKB,IKE
       JKRAD = JK - JPVEXT
@@ -2883,7 +2883,7 @@ IF( OCLOSE_OUT .AND. (KRAD_DIAG >= 1) ) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZSTORE_3D)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZSTORE_3D)
     !
     DO JK=IKB,IKE
       JKRAD = JK - JPVEXT
@@ -2903,7 +2903,7 @@ IF( OCLOSE_OUT .AND. (KRAD_DIAG >= 1) ) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZSTORE_3D)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZSTORE_3D)
     !
     DO JK=IKB,IKE
       JKRAD = JK-JPVEXT
@@ -2923,7 +2923,7 @@ IF( OCLOSE_OUT .AND. (KRAD_DIAG >= 1) ) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZSTORE_3D)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZSTORE_3D)
     !
     DO JK=IKB,IKE
       JKRAD = JK-JPVEXT
@@ -2943,7 +2943,7 @@ IF( OCLOSE_OUT .AND. (KRAD_DIAG >= 1) ) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZSTORE_3D)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZSTORE_3D)
     !
     DO JJ=IJB,IJE
       DO JI=IIB,IIE
@@ -2960,7 +2960,7 @@ IF( OCLOSE_OUT .AND. (KRAD_DIAG >= 1) ) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 2
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZSTORE_2D)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZSTORE_2D)
     !
     DO JJ=IJB,IJE
       DO JI=IIB,IIE
@@ -2977,7 +2977,7 @@ IF( OCLOSE_OUT .AND. (KRAD_DIAG >= 1) ) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 2
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZSTORE_2D)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZSTORE_2D)
     !
     DO JJ=IJB,IJE
       DO JI=IIB,IIE
@@ -2994,7 +2994,7 @@ IF( OCLOSE_OUT .AND. (KRAD_DIAG >= 1) ) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 2
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZSTORE_2D)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZSTORE_2D)
   END IF
   !
   !
@@ -3014,7 +3014,7 @@ IF( OCLOSE_OUT .AND. (KRAD_DIAG >= 1) ) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 2
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZSTORE_2D)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZSTORE_2D)
     !
     DO JJ=IJB,IJE
       DO JI=IIB,IIE
@@ -3031,7 +3031,7 @@ IF( OCLOSE_OUT .AND. (KRAD_DIAG >= 1) ) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 2
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZSTORE_2D)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZSTORE_2D)
     !
     DO JJ=IJB,IJE
       DO JI=IIB,IIE
@@ -3048,7 +3048,7 @@ IF( OCLOSE_OUT .AND. (KRAD_DIAG >= 1) ) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 2
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZSTORE_2D)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZSTORE_2D)
     !
     DO JJ=IJB,IJE
       DO JI=IIB,IIE
@@ -3065,7 +3065,7 @@ IF( OCLOSE_OUT .AND. (KRAD_DIAG >= 1) ) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 2
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZSTORE_2D)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZSTORE_2D)
     !
     DO JJ=IJB,IJE
       DO JI=IIB,IIE
@@ -3082,7 +3082,7 @@ IF( OCLOSE_OUT .AND. (KRAD_DIAG >= 1) ) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 2
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZSTORE_2D)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZSTORE_2D)
     !
     DO JJ=IJB,IJE
       DO JI=IIB,IIE
@@ -3099,7 +3099,7 @@ IF( OCLOSE_OUT .AND. (KRAD_DIAG >= 1) ) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 2
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZSTORE_2D)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZSTORE_2D)
     !
     !
   END IF
@@ -3124,7 +3124,7 @@ IF( OCLOSE_OUT .AND. (KRAD_DIAG >= 1) ) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZSTORE_3D)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZSTORE_3D)
     !
     DO JK=IKB,IKE
       JKRAD = JK - JPVEXT
@@ -3144,7 +3144,7 @@ IF( OCLOSE_OUT .AND. (KRAD_DIAG >= 1) ) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZSTORE_3D)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZSTORE_3D)
     !
     DO JK=IKB,IKE
       JKRAD = JK - JPVEXT
@@ -3164,7 +3164,7 @@ IF( OCLOSE_OUT .AND. (KRAD_DIAG >= 1) ) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZSTORE_3D)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZSTORE_3D)
     !
     DO JK=IKB,IKE
       JKRAD = JK - JPVEXT
@@ -3184,7 +3184,7 @@ IF( OCLOSE_OUT .AND. (KRAD_DIAG >= 1) ) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZSTORE_3D)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZSTORE_3D)
     !
     DO JK=IKB,IKE
       JKRAD = JK - JPVEXT
@@ -3204,7 +3204,7 @@ IF( OCLOSE_OUT .AND. (KRAD_DIAG >= 1) ) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZSTORE_3D)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZSTORE_3D)
     ! 
     DO JK=IKB,IKE
       JKRAD = JK - JPVEXT
@@ -3224,7 +3224,7 @@ IF( OCLOSE_OUT .AND. (KRAD_DIAG >= 1) ) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZSTORE_3D)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZSTORE_3D)
     !
     DO JK=IKB,IKE
       JKRAD = JK - JPVEXT
@@ -3244,7 +3244,7 @@ IF( OCLOSE_OUT .AND. (KRAD_DIAG >= 1) ) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZSTORE_3D)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZSTORE_3D)
     !
     DO JK=IKB,IKE
       JKRAD = JK - JPVEXT
@@ -3264,7 +3264,7 @@ IF( OCLOSE_OUT .AND. (KRAD_DIAG >= 1) ) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZSTORE_3D)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZSTORE_3D)
     !
     ! spectral bands
     IF (KSWB==6) THEN
@@ -3290,7 +3290,7 @@ IF( OCLOSE_OUT .AND. (KRAD_DIAG >= 1) ) THEN
       TZFIELD%NGRID      = 1
       TZFIELD%NTYPE      = TYPEREAL
       TZFIELD%NDIMS      = 3
-      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZTAUAZ(:,:,:,JBAND))
+      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZTAUAZ(:,:,:,JBAND))
       !
       TZFIELD%CMNHNAME   = 'SSAAER_'//YBAND_NAME(JBAND)
       TZFIELD%CSTDNAME   = ''
@@ -3301,7 +3301,7 @@ IF( OCLOSE_OUT .AND. (KRAD_DIAG >= 1) ) THEN
       TZFIELD%NGRID      = 1
       TZFIELD%NTYPE      = TYPEREAL
       TZFIELD%NDIMS      = 3
-      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZPIZAZ(:,:,:,JBAND))
+      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZPIZAZ(:,:,:,JBAND))
       !
       TZFIELD%CMNHNAME   = 'GAER_'//YBAND_NAME(JBAND)
       TZFIELD%CSTDNAME   = ''
@@ -3312,7 +3312,7 @@ IF( OCLOSE_OUT .AND. (KRAD_DIAG >= 1) ) THEN
       TZFIELD%NGRID      = 1
       TZFIELD%NTYPE      = TYPEREAL
       TZFIELD%NDIMS      = 3
-      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZCGAZ(:,:,:,JBAND))
+      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZCGAZ(:,:,:,JBAND))
     ENDDO
 
     DO JBAND=1,KSWB
@@ -3334,7 +3334,7 @@ IF( OCLOSE_OUT .AND. (KRAD_DIAG >= 1) ) THEN
       TZFIELD%NGRID      = 1
       TZFIELD%NTYPE      = TYPEREAL
       TZFIELD%NDIMS      = 3
-      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZSTORE_3D)
+      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZSTORE_3D)
       !
       DO JK=IKB,IKE
         JKRAD = JK - JPVEXT
@@ -3354,7 +3354,7 @@ IF( OCLOSE_OUT .AND. (KRAD_DIAG >= 1) ) THEN
       TZFIELD%NGRID      = 1
       TZFIELD%NTYPE      = TYPEREAL
       TZFIELD%NDIMS      = 3
-      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZSTORE_3D)
+      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZSTORE_3D)
       !
       DO JK=IKB,IKE
         JKRAD = JK - JPVEXT
@@ -3374,7 +3374,7 @@ IF( OCLOSE_OUT .AND. (KRAD_DIAG >= 1) ) THEN
       TZFIELD%NGRID      = 1
       TZFIELD%NTYPE      = TYPEREAL
       TZFIELD%NDIMS      = 3
-      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZSTORE_3D)
+      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZSTORE_3D)
     END DO
   END IF
   !
@@ -3401,7 +3401,7 @@ IF( OCLOSE_OUT .AND. (KRAD_DIAG >= 1) ) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZSTORE_3D)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZSTORE_3D)
 ! 
 !cumulated optical thickness of aerosols
 !cumul begin from the top of the domain, not from the TOA !      
@@ -3431,7 +3431,7 @@ IF( OCLOSE_OUT .AND. (KRAD_DIAG >= 1) ) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZSTORE_3D2)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZSTORE_3D2)
 !
 ! sea
     DO JK=IKB,IKE
@@ -3459,7 +3459,7 @@ IF( OCLOSE_OUT .AND. (KRAD_DIAG >= 1) ) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZSTORE_3D2)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZSTORE_3D2)
 !
 ! desert
     DO JK=IKB,IKE
@@ -3487,7 +3487,7 @@ IF( OCLOSE_OUT .AND. (KRAD_DIAG >= 1) ) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZSTORE_3D2)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZSTORE_3D2)
 !
 ! urban
     DO JK=IKB,IKE
@@ -3515,7 +3515,7 @@ IF( OCLOSE_OUT .AND. (KRAD_DIAG >= 1) ) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZSTORE_3D2)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZSTORE_3D2)
 !
 ! Volcanoes
     DO JK=IKB,IKE
@@ -3543,7 +3543,7 @@ IF( OCLOSE_OUT .AND. (KRAD_DIAG >= 1) ) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZSTORE_3D2)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZSTORE_3D2)
 !
 ! stratospheric background
     DO JK=IKB,IKE
@@ -3571,7 +3571,7 @@ IF( OCLOSE_OUT .AND. (KRAD_DIAG >= 1) ) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZSTORE_3D2)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZSTORE_3D2)
   ENDIF
 END IF
 !
diff --git a/src/MNH/rain_c2r2_khko.f90 b/src/MNH/rain_c2r2_khko.f90
index f90b32de3..f532d367d 100644
--- a/src/MNH/rain_c2r2_khko.f90
+++ b/src/MNH/rain_c2r2_khko.f90
@@ -324,7 +324,6 @@ INTEGER :: IJE           !
 INTEGER :: IKB           ! 
 INTEGER :: IKE           !
 INTEGER :: ISIZE         !
-INTEGER :: IRESP      ! Return code of FM routines
 !
 REAL    :: ZTSPLITR      ! Small time step for rain sedimentation
 REAL    :: ZEPS          ! molar mass ratio
@@ -605,7 +604,7 @@ INTEGER                           :: J1
 !   TZFIELD%NGRID      = 1
 !   TZFIELD%NTYPE      = TYPEREAL
 !   TZFIELD%NDIMS      = 3
-!   CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZCHEN)
+!   CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZCHEN)
 ! END IF
 !
 !-------------------------------------------------------------------------------
@@ -888,7 +887,7 @@ IF ( OCLOSE_OUT ) THEN
   TZFIELD%NGRID      = 1
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 3
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZZW1LOG)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZZW1LOG)
 END IF
 !
 !*       3.4   budget storage
@@ -1911,7 +1910,7 @@ DO JN = 1 , KSPLITR
   TZFIELD%NGRID      = 1
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 3
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZWSEDC)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZWSEDC)
   !
   TZFIELD%CMNHNAME   = 'SEDFLUXR'
   TZFIELD%CSTDNAME   = ''
@@ -1922,7 +1921,7 @@ DO JN = 1 , KSPLITR
   TZFIELD%NGRID      = 1
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 3
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZWSEDR)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZWSEDR)
  END IF
 END DO
 !
diff --git a/src/MNH/shallow_mf_pack.f90 b/src/MNH/shallow_mf_pack.f90
index 637071ad2..1604f23a9 100644
--- a/src/MNH/shallow_mf_pack.f90
+++ b/src/MNH/shallow_mf_pack.f90
@@ -255,7 +255,6 @@ REAL, DIMENSION(SIZE(PTHM,1),SIZE(PTHM,2),SIZE(PTHM,3),SIZE(PSVM,4)) ::  ZDSVDT
 INTEGER :: IIU, IJU, IKU, IKB, IKE, IRR, ISV  
 INTEGER :: JK,JRR,JSV                          ! Loop counters
 
-INTEGER          :: IRESP        ! Return code of FM routines 
 TYPE(TFIELDDATA) :: TZFIELD
 !------------------------------------------------------------------------
 
@@ -391,7 +390,7 @@ IF ( OMF_FLX .AND. OCLOSE_OUT ) THEN
   TZFIELD%NGRID      = 4
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 3
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZWORK)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZWORK)
   !
   ! stores the conservative mixing ratio vertical flux
   ZWORK(:,:,:)=RESHAPE(ZFLXZRMF(:,:),(/ IIU,IJU,IKU /) )
@@ -404,7 +403,7 @@ IF ( OMF_FLX .AND. OCLOSE_OUT ) THEN
   TZFIELD%NGRID      = 4
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 3
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZWORK)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZWORK)
   !
   ! stores the theta_v vertical flux
   TZFIELD%CMNHNAME   = 'MF_THVW_FLX'
@@ -416,7 +415,7 @@ IF ( OMF_FLX .AND. OCLOSE_OUT ) THEN
   TZFIELD%NGRID      = 4
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 3
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,PFLXZTHVMF)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,PFLXZTHVMF)
   !
  IF (OMIXUV) THEN
   ! stores the U momentum vertical flux
@@ -430,7 +429,7 @@ IF ( OMF_FLX .AND. OCLOSE_OUT ) THEN
   TZFIELD%NGRID      = 4
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 3
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZWORK)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZWORK)
   !
   ! stores the V momentum vertical flux
   ZWORK(:,:,:)=RESHAPE(ZFLXZVMF(:,:),(/ IIU,IJU,IKU /) )
@@ -443,7 +442,7 @@ IF ( OMF_FLX .AND. OCLOSE_OUT ) THEN
   TZFIELD%NGRID      = 4
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 3
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZWORK)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZWORK)
   !
  END IF
 END IF
diff --git a/src/MNH/tke_eps_sources.f90 b/src/MNH/tke_eps_sources.f90
index 8d3dc9ad8..951488e0a 100644
--- a/src/MNH/tke_eps_sources.f90
+++ b/src/MNH/tke_eps_sources.f90
@@ -267,7 +267,6 @@ INTEGER             :: IIB,IIE,IJB,IJE,IKB,IKE
                                     ! Index values for the Beginning and End
                                     ! mass points of the domain 
 INTEGER             :: IIU,IJU,IKU  ! array size in the 3 dimensions 
-INTEGER             :: IRESP        ! Return code of FM routines
 !
 TYPE(LIST_ll), POINTER :: TZFIELDDISS_ll ! list of fields to exchange
 INTEGER                :: IINFO_ll       ! return code of parallel routine
@@ -436,7 +435,7 @@ IF ( OTURB_DIAG .AND. OCLOSE_OUT ) THEN
   TZFIELD%NGRID      = 1
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 3
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,PDP)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,PDP)
 !
 ! stores the thermal production 
 !
@@ -449,7 +448,7 @@ IF ( OTURB_DIAG .AND. OCLOSE_OUT ) THEN
   TZFIELD%NGRID      = 1
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 3
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,PTP)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,PTP)
 !
 ! stores the whole turbulent transport
 !
@@ -462,7 +461,7 @@ IF ( OTURB_DIAG .AND. OCLOSE_OUT ) THEN
   TZFIELD%NGRID      = 1
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 3
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,PTR)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,PTR)
 !
 ! stores the dissipation of TKE 
 !
@@ -475,7 +474,7 @@ IF ( OTURB_DIAG .AND. OCLOSE_OUT ) THEN
   TZFIELD%NGRID      = 1
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 3
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,PDISS)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,PDISS)
 END IF
 !
 ! Storage in the LES configuration of the Dynamic Production of TKE and
diff --git a/src/MNH/turb.f90 b/src/MNH/turb.f90
index 0af10e62d..996b9cfdc 100644
--- a/src/MNH/turb.f90
+++ b/src/MNH/turb.f90
@@ -536,7 +536,6 @@ INTEGER             :: IKT          ! array size in k direction
 INTEGER             :: IKTB,IKTE    ! start, end of k loops in physical domain 
 INTEGER             :: JRR,JK,JSV   ! loop counters
 INTEGER             :: JI,JJ        ! loop counters
-INTEGER             :: IRESP        ! Return code of FM routines
 REAL                :: ZL0          ! Max. Mixing Length in Blakadar formula
 REAL                :: ZALPHA       ! proportionnality constant between Dz/2 and 
 !                                   ! BL89 mixing length near the surface
@@ -689,7 +688,7 @@ IF (KRRL >=1) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZATHETA)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZATHETA)
 ! 
     TZFIELD%CMNHNAME   = 'AMOIST'
     TZFIELD%CSTDNAME   = ''
@@ -700,7 +699,7 @@ IF (KRRL >=1) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZAMOIST)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZAMOIST)
   END IF
 !
 ELSE
@@ -1036,7 +1035,7 @@ IF ( OTURB_DIAG .AND. OCLOSE_OUT ) THEN
   TZFIELD%NGRID      = 1
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 3
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZLM)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZLM)
 !
   IF (KRR /= 0) THEN
 !
@@ -1051,7 +1050,7 @@ IF ( OTURB_DIAG .AND. OCLOSE_OUT ) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,PTHLT)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,PTHLT)
 !
 ! stores the conservative mixing ratio
 !
@@ -1064,7 +1063,7 @@ IF ( OTURB_DIAG .AND. OCLOSE_OUT ) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,PRT(:,:,:,1))
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,PRT(:,:,:,1))
    END IF
 END IF
 !
@@ -1663,7 +1662,7 @@ IF ( OTURB_DIAG .AND. OCLOSE_OUT ) THEN
   TZFIELD%NGRID      = 1
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 3
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZLM)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZLM)
 ENDIF
 !
 ! Amplification of the mixing length when the criteria are verified
@@ -1688,7 +1687,7 @@ IF ( OTURB_DIAG .AND. OCLOSE_OUT ) THEN
   TZFIELD%NGRID      = 1
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 3
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZCOEF_AMPL)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZCOEF_AMPL)
   !
   TZFIELD%CMNHNAME   = 'LM_CLOUD'
   TZFIELD%CSTDNAME   = ''
@@ -1699,7 +1698,7 @@ IF ( OTURB_DIAG .AND. OCLOSE_OUT ) THEN
   TZFIELD%NGRID      = 1
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 3
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZLM_CLOUD)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZLM_CLOUD)
   !
 ENDIF
 !
diff --git a/src/MNH/turb_cloud_index.f90 b/src/MNH/turb_cloud_index.f90
index 0d49ad711..37f9ec80c 100644
--- a/src/MNH/turb_cloud_index.f90
+++ b/src/MNH/turb_cloud_index.f90
@@ -145,7 +145,6 @@ INTEGER             :: IIE,IJE,IKE  ! End   of physical dimensions
 INTEGER             :: IKU          ! array size in k
 INTEGER, DIMENSION(SIZE(PRM,1),SIZE(PRM,2),SIZE(PRM,3)) :: IMASK_CLOUD
                              ! 0 except cloudy points or adjacent points (1)
-INTEGER             :: IRESP        ! Return code of FM routines
 TYPE(TFIELDDATA)    :: TZFIELD
 !
 !-------------------------------------------------------------------------------
@@ -267,7 +266,7 @@ IF ( OTURB_DIAG .AND. OCLOSE_OUT ) THEN
   TZFIELD%NGRID      = 1
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 3
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZRVCI)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZRVCI)
   !
   TZFIELD%CMNHNAME   = 'GX_RVCI'
   TZFIELD%CSTDNAME   = ''
@@ -278,7 +277,7 @@ IF ( OTURB_DIAG .AND. OCLOSE_OUT ) THEN
   TZFIELD%NGRID      = 1
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 3
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZG_RVCI(:,:,:,1))
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZG_RVCI(:,:,:,1))
   !
   TZFIELD%CMNHNAME   = 'GY_RVCI'
   TZFIELD%CSTDNAME   = ''
@@ -289,7 +288,7 @@ IF ( OTURB_DIAG .AND. OCLOSE_OUT ) THEN
   TZFIELD%NGRID      = 1
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 3
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZG_RVCI(:,:,:,2))
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZG_RVCI(:,:,:,2))
   !
   TZFIELD%CMNHNAME   = 'GNORM_RVCI'
   TZFIELD%CSTDNAME   = ''
@@ -300,7 +299,7 @@ IF ( OTURB_DIAG .AND. OCLOSE_OUT ) THEN
   TZFIELD%NGRID      = 1
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 3
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZGNORM_RVCI)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZGNORM_RVCI)
   !
   TZFIELD%CMNHNAME   = 'QX_RVCI'
   TZFIELD%CSTDNAME   = ''
@@ -311,7 +310,7 @@ IF ( OTURB_DIAG .AND. OCLOSE_OUT ) THEN
   TZFIELD%NGRID      = 1
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 3
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZQ_RVCI(:,:,:,1))
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZQ_RVCI(:,:,:,1))
   !
   TZFIELD%CMNHNAME   = 'QY_RVCI'
   TZFIELD%CSTDNAME   = ''
@@ -322,7 +321,7 @@ IF ( OTURB_DIAG .AND. OCLOSE_OUT ) THEN
   TZFIELD%NGRID      = 1
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 3
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZQ_RVCI(:,:,:,2))
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZQ_RVCI(:,:,:,2))
   !
   TZFIELD%CMNHNAME   = 'QNORM_RVCI'
   TZFIELD%CSTDNAME   = ''
@@ -333,7 +332,7 @@ IF ( OTURB_DIAG .AND. OCLOSE_OUT ) THEN
   TZFIELD%NGRID      = 1
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 3
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZQNORM_RVCI)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZQNORM_RVCI)
   !
   TZFIELD%CMNHNAME   = 'CEI'
   TZFIELD%CSTDNAME   = ''
@@ -344,7 +343,7 @@ IF ( OTURB_DIAG .AND. OCLOSE_OUT ) THEN
   TZFIELD%NGRID      = 1
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 3
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,PCEI)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,PCEI)
 END IF
 !
 END SUBROUTINE TURB_CLOUD_INDEX
diff --git a/src/MNH/turb_hor_dyn_corr.f90 b/src/MNH/turb_hor_dyn_corr.f90
index 68f8bc93a..24d74e009 100644
--- a/src/MNH/turb_hor_dyn_corr.f90
+++ b/src/MNH/turb_hor_dyn_corr.f90
@@ -236,7 +236,6 @@ REAL, DIMENSION(SIZE(PUM,1),SIZE(PUM,2),SIZE(PUM,3))       &
 !   
 REAL, DIMENSION(SIZE(PUM,1),SIZE(PUM,2)) ::ZDIRSINZW 
       ! sinus of the angle between the vertical and the normal to the orography
-INTEGER             :: IRESP        ! Return code of FM routines 
 INTEGER             :: IKB,IKE
                                     ! Index values for the Beginning and End
                                     ! mass points of the domain  
@@ -392,7 +391,7 @@ IF ( OCLOSE_OUT .AND. OTURB_FLX ) THEN
   TZFIELD%NGRID      = 1
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 3
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZFLX)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZFLX)
 END IF
 !
 ! Complete the U tendency
@@ -487,7 +486,7 @@ IF ( OCLOSE_OUT .AND. OTURB_FLX ) THEN
   TZFIELD%NGRID      = 1
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 3
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZFLX)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZFLX)
 END IF
 !
 ! Complete the V tendency
@@ -573,7 +572,7 @@ IF ( OCLOSE_OUT .AND. OTURB_FLX ) THEN
   TZFIELD%NGRID      = 1
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 3
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZFLX)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZFLX)
 END IF
 !
 ! Complete the W tendency
diff --git a/src/MNH/turb_hor_sv_flux.f90 b/src/MNH/turb_hor_sv_flux.f90
index 261b3da0a..f2f31e975 100644
--- a/src/MNH/turb_hor_sv_flux.f90
+++ b/src/MNH/turb_hor_sv_flux.f90
@@ -185,7 +185,6 @@ REAL, DIMENSION(SIZE(PSVM,1),SIZE(PSVM,2),SIZE(PSVM,3))       &
     ! work arrays
 REAL, DIMENSION(SIZE(PSVM,1),SIZE(PSVM,2),1) :: ZWORK2D
 !
-INTEGER             :: IRESP        ! Return code of FM routines 
 INTEGER             :: IKB,IKE
                                     ! Index values for the Beginning and End
                                     ! mass points of the domain  
@@ -261,7 +260,7 @@ DO JSV=1,ISV
     TZFIELD%NGRID      = 2
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZFLXX)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZFLXX)
   END IF
 !
   IF (LLES_CALL .AND. KSPLT==1) THEN
@@ -311,7 +310,7 @@ DO JSV=1,ISV
       TZFIELD%NGRID      = 3
       TZFIELD%NTYPE      = TYPEREAL
       TZFIELD%NDIMS      = 3
-      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZFLXY)
+      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZFLXY)
     END IF
 !
   ELSE
diff --git a/src/MNH/turb_hor_thermo_corr.f90 b/src/MNH/turb_hor_thermo_corr.f90
index 3dad384b8..f241c93d3 100644
--- a/src/MNH/turb_hor_thermo_corr.f90
+++ b/src/MNH/turb_hor_thermo_corr.f90
@@ -203,7 +203,6 @@ REAL, DIMENSION(SIZE(PTHLM,1),SIZE(PTHLM,2),SIZE(PTHLM,3))       &
                                      :: ZFLX,ZWORK,ZA
     ! work arrays
 !   
-INTEGER             :: IRESP        ! Return code of FM routines 
 INTEGER             :: IKB,IKE,IKU
                                     ! Index values for the Beginning and End
                                     ! mass points of the domain  
@@ -290,7 +289,7 @@ IF ( ( KRRL > 0 .AND. OSUBG_COND) .OR. ( OTURB_FLX .AND. OCLOSE_OUT ) &
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZFLX)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZFLX)
   END IF
 !
 ! Storage in the LES configuration (addition to TURB_VER computation)
@@ -377,7 +376,7 @@ IF ( ( KRRL > 0 .AND. OSUBG_COND) .OR. ( OTURB_FLX .AND. OCLOSE_OUT ) &
       TZFIELD%NGRID      = 1
       TZFIELD%NTYPE      = TYPEREAL
       TZFIELD%NDIMS      = 3
-      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZFLX)
+      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZFLX)
     END IF
 !
 !   Storage in the LES configuration (addition to TURB_VER computation)
@@ -444,7 +443,7 @@ IF ( ( KRRL > 0 .AND. OSUBG_COND) .OR. ( OTURB_FLX .AND. OCLOSE_OUT ) &
       TZFIELD%NGRID      = 1
       TZFIELD%NTYPE      = TYPEREAL
       TZFIELD%NDIMS      = 3
-      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZFLX)
+      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZFLX)
     END IF
     !
     !   Storage in the LES configuration (addition to TURB_VER computation)
diff --git a/src/MNH/turb_hor_thermo_flux.f90 b/src/MNH/turb_hor_thermo_flux.f90
index 9207b3894..96427e33c 100644
--- a/src/MNH/turb_hor_thermo_flux.f90
+++ b/src/MNH/turb_hor_thermo_flux.f90
@@ -218,7 +218,6 @@ REAL, DIMENSION(SIZE(PTHLM,1),SIZE(PTHLM,2),SIZE(PTHLM,3))       &
     ! work arrays
 !   
 !! REAL, DIMENSION(SIZE(PTHLM,1),SIZE(PTHLM,2),SIZE(PTHLM,3))  :: ZVPTV
-INTEGER             :: IRESP        ! Return code of FM routines 
 INTEGER             :: IKB,IKE,IKU
                                     ! Index values for the Beginning and End
                                     ! mass points of the domain  
@@ -333,7 +332,7 @@ IF ( OCLOSE_OUT .AND. OTURB_FLX ) THEN
   TZFIELD%NGRID      = 2
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 3
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZFLX)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZFLX)
 END IF
 !
 IF (KSPLT==1 .AND. LLES_CALL) THEN
@@ -435,7 +434,7 @@ IF (KRR/=0) THEN
     TZFIELD%NGRID      = 2
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZFLX)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZFLX)
   END IF
   !
   IF (KSPLT==1 .AND. LLES_CALL) THEN
@@ -483,7 +482,7 @@ END IF
 !!    TZFIELD%NGRID      = 2
 !!    TZFIELD%NTYPE      = TYPEREAL
 !!    TZFIELD%NDIMS      = 3
-!!    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZVPTU)
+!!    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZVPTU)
 !!  END IF
 !!!
 !!ELSE
@@ -585,7 +584,7 @@ IF ( OCLOSE_OUT .AND. OTURB_FLX ) THEN
   TZFIELD%NGRID      = 3
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 3
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZFLX)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZFLX)
 END IF
 !
 IF (KSPLT==1 .AND. LLES_CALL) THEN
@@ -696,7 +695,7 @@ IF (KRR/=0) THEN
     TZFIELD%NGRID      = 3
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZFLX)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZFLX)
   END IF
   !
   IF (KSPLT==1 .AND. LLES_CALL) THEN
@@ -748,7 +747,7 @@ END IF
 !!    TZFIELD%NGRID      = 3
 !!    TZFIELD%NTYPE      = TYPEREAL
 !!    TZFIELD%NDIMS      = 3
-!!    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZVPTV)
+!!    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZVPTV)
 !!  END IF
 !!!
 !!ELSE
diff --git a/src/MNH/turb_hor_uv.f90 b/src/MNH/turb_hor_uv.f90
index 924053d35..aac215c83 100644
--- a/src/MNH/turb_hor_uv.f90
+++ b/src/MNH/turb_hor_uv.f90
@@ -212,7 +212,6 @@ REAL, DIMENSION(SIZE(PUM,1),SIZE(PUM,2),SIZE(PUM,3))       &
 !   
 REAL, DIMENSION(SIZE(PUM,1),SIZE(PUM,2)) ::ZDIRSINZW 
       ! sinus of the angle between the vertical and the normal to the orography
-INTEGER             :: IRESP        ! Return code of FM routines 
 INTEGER             :: IKB,IKE,IKU
                                     ! Index values for the Beginning and End
                                     ! mass points of the domain  
@@ -293,7 +292,7 @@ IF ( OCLOSE_OUT .AND. OTURB_FLX ) THEN
   TZFIELD%NGRID      = 5
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 3
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZFLX)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZFLX)
 END IF
 !
 !
diff --git a/src/MNH/turb_hor_uw.f90 b/src/MNH/turb_hor_uw.f90
index 146e972f0..feed91a92 100644
--- a/src/MNH/turb_hor_uw.f90
+++ b/src/MNH/turb_hor_uw.f90
@@ -191,7 +191,6 @@ REAL, DIMENSION(SIZE(PWM,1),SIZE(PWM,2),SIZE(PWM,3))       &
                                      :: ZFLX,ZWORK
     ! work arrays
 !   
-INTEGER             :: IRESP        ! Return code of FM routines 
 INTEGER             :: IKB,IKE,IKU
                                     ! Index values for the Beginning and End
                                     ! mass points of the domain  
@@ -242,7 +241,7 @@ IF ( OCLOSE_OUT .AND. OTURB_FLX ) THEN
   TZFIELD%NGRID      = 6
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 3
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZFLX)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZFLX)
 END IF
 !
 !
diff --git a/src/MNH/turb_hor_vw.f90 b/src/MNH/turb_hor_vw.f90
index 5cfd834c1..8855269fa 100644
--- a/src/MNH/turb_hor_vw.f90
+++ b/src/MNH/turb_hor_vw.f90
@@ -186,7 +186,6 @@ REAL, DIMENSION(SIZE(PWM,1),SIZE(PWM,2),SIZE(PWM,3))       &
     ! work arrays
 !   
 !! REAL, DIMENSION(SIZE(PWM,1),SIZE(PWM,2),SIZE(PWM,3))  :: ZVPTV
-INTEGER             :: IRESP        ! Return code of FM routines 
 INTEGER             :: IKB,IKE,IKU
                                     ! Index values for the Beginning and End
                                     ! mass points of the domain  
@@ -244,7 +243,7 @@ IF ( OCLOSE_OUT .AND. OTURB_FLX ) THEN
   TZFIELD%NGRID      = 7
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 3
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZFLX)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZFLX)
 END IF
 !
 ! compute the source for rho*V due to this residual flux ( the other part is
diff --git a/src/MNH/turb_ver.f90 b/src/MNH/turb_ver.f90
index 131b99ee2..a182304dd 100644
--- a/src/MNH/turb_ver.f90
+++ b/src/MNH/turb_ver.f90
@@ -485,7 +485,6 @@ REAL, ALLOCATABLE, DIMENSION(:,:,:,:)  ::  &
        ZREDS1,   & ! 1D Redeslperger number R_sv
        ZRED2THS, & ! 3D Redeslperger number R*2_thsv
        ZRED2RS     ! 3D Redeslperger number R*2_rsv
-INTEGER             :: IRESP        ! Return code of FM routines 
 !
 LOGICAL :: GUSERV    ! flag to use water vapor
 INTEGER :: IKB,IKE   ! index value for the Beginning
@@ -722,7 +721,7 @@ IF ( OTURB_FLX .AND. OCLOSE_OUT ) THEN
   TZFIELD%NGRID      = 4
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 3
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZPHI3)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZPHI3)
 !
 ! stores the Turbulent Schmidt number
 ! 
@@ -735,7 +734,7 @@ IF ( OTURB_FLX .AND. OCLOSE_OUT ) THEN
   TZFIELD%NGRID      = 4
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 3
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZPSI3)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZPSI3)
 !
 !
 ! stores the Turbulent Schmidt number for the scalar variables
@@ -750,7 +749,7 @@ IF ( OTURB_FLX .AND. OCLOSE_OUT ) THEN
     WRITE(TZFIELD%CMNHNAME, '("PSI_SV_",I3.3)') JSV
     TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
     TZFIELD%CCOMMENT   = 'X_Y_Z_'//TRIM(TZFIELD%CMNHNAME)
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZPSI_SV(:,:,:,JSV))
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZPSI_SV(:,:,:,JSV))
   END DO
 !
 END IF
diff --git a/src/MNH/turb_ver_dyn_flux.f90 b/src/MNH/turb_ver_dyn_flux.f90
index fe9cca182..bcece1bbf 100644
--- a/src/MNH/turb_ver_dyn_flux.f90
+++ b/src/MNH/turb_ver_dyn_flux.f90
@@ -395,7 +395,6 @@ REAL, DIMENSION(SIZE(PUM,1),SIZE(PUM,2),SIZE(PUM,3))  ::  &
        ZFLXZ,  &   ! vertical flux of the treated variable
        ZSOURCE,  & ! source of evolution for the treated variable
        ZKEFF       ! effectif diffusion coeff = LT * SQRT( TKE )
-INTEGER             :: IRESP        ! Return code of FM routines 
 INTEGER             :: IIB,IIE, &   ! I index values for the Beginning and End
                        IJB,IJE, &   ! mass points of the domain in the 3 direct.
                        IKB,IKE      !
@@ -527,7 +526,7 @@ IF ( OTURB_FLX .AND. OCLOSE_OUT ) THEN
   TZFIELD%NGRID      = 4
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 3
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZFLXZ)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZFLXZ)
 END IF
 !
 ! first part of total momentum flux
@@ -701,7 +700,7 @@ IF ( OTURB_FLX .AND. OCLOSE_OUT ) THEN
   TZFIELD%NGRID      = 4
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 3
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZFLXZ)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZFLXZ)
 END IF
 !
 ! second part of total momentum flux
@@ -821,7 +820,7 @@ IF ( OTURB_FLX .AND. OCLOSE_OUT .AND. HTURBDIM == '1DIM') THEN
   TZFIELD%NGRID      = 1
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 3
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZFLXZ)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZFLXZ)
 END IF
 !
 !----------------------------------------------------------------------------
diff --git a/src/MNH/turb_ver_sv_flux.f90 b/src/MNH/turb_ver_sv_flux.f90
index ece1d9884..3b9d8ba3d 100644
--- a/src/MNH/turb_ver_sv_flux.f90
+++ b/src/MNH/turb_ver_sv_flux.f90
@@ -355,7 +355,6 @@ REAL, DIMENSION(SIZE(PSVM,1),SIZE(PSVM,2),SIZE(PSVM,3))  ::  &
        ZFLXZ,  &   ! vertical flux of the treated variable
        ZSOURCE,  & ! source of evolution for the treated variable
        ZKEFF       ! effectif diffusion coeff = LT * SQRT( TKE )
-INTEGER             :: IRESP        ! Return code of FM routines 
 INTEGER             :: IKB,IKE      ! I index values for the Beginning and End
                                     ! mass points of the domain in the 3 direct.
 INTEGER             :: IKT          ! array size in k direction
@@ -463,7 +462,7 @@ DO JSV=1,ISV
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
     !
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZFLXZ)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZFLXZ)
   END IF
   !
   ! Storage in the LES configuration
diff --git a/src/MNH/turb_ver_thermo_corr.f90 b/src/MNH/turb_ver_thermo_corr.f90
index e7eb6cbd5..ea8aea763 100644
--- a/src/MNH/turb_ver_thermo_corr.f90
+++ b/src/MNH/turb_ver_thermo_corr.f90
@@ -436,7 +436,6 @@ REAL, DIMENSION(SIZE(PTHLM,1),SIZE(PTHLM,2),SIZE(PTHLM,3))  ::  &
        ZDFDDTDZ, & ! dF/d(dTh/dz)
        ZDFDDRDZ, & ! dF/d(dr/dz)
        Z3RDMOMENT  ! 3 order term in flux or variance equation
-INTEGER             :: IRESP        ! Return code of FM routines 
 INTEGER             :: IKB,IKE      ! I index values for the Beginning and End
                                     ! mass points of the domain in the 3 direct.
 INTEGER             :: I1,I2        ! For ZCOEFF allocation
@@ -590,7 +589,7 @@ END IF
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZFLXZ)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZFLXZ)
   END IF
 !
 ! and we store in LES configuration
@@ -716,7 +715,7 @@ END IF
       TZFIELD%NGRID      = 1
       TZFIELD%NTYPE      = TYPEREAL
       TZFIELD%NDIMS      = 3
-      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZFLXZ)
+      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZFLXZ)
     END IF
 !
 ! and we store in LES configuration
@@ -822,7 +821,7 @@ END IF
       TZFIELD%NGRID      = 1
       TZFIELD%NTYPE      = TYPEREAL
       TZFIELD%NDIMS      = 3
-      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZFLXZ)
+      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZFLXZ)
     END IF
     !
     ! and we store in LES configuration
diff --git a/src/MNH/turb_ver_thermo_flux.f90 b/src/MNH/turb_ver_thermo_flux.f90
index 8534d59fd..65dee0384 100644
--- a/src/MNH/turb_ver_thermo_flux.f90
+++ b/src/MNH/turb_ver_thermo_flux.f90
@@ -464,7 +464,6 @@ REAL, DIMENSION(SIZE(PTHLM,1),SIZE(PTHLM,2),SIZE(PTHLM,3))  ::  &
        ZDFDDTDZ, & ! dF/d(dTh/dz)
        ZDFDDRDZ, & ! dF/d(dr/dz)
        Z3RDMOMENT  ! 3 order term in flux or variance equation
-INTEGER             :: IRESP        ! Return code of FM routines 
 INTEGER             :: IKB,IKE      ! I index values for the Beginning and End
                                     ! mass points of the domain in the 3 direct.
 INTEGER             :: IKT          ! array size in k direction
@@ -624,7 +623,7 @@ IF ( OTURB_FLX .AND. OCLOSE_OUT ) THEN
   TZFIELD%NGRID      = 4
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 3
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZFLXZ)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZFLXZ)
 END IF
 !
 ! Contribution of the conservative temperature flux to the buoyancy flux
@@ -801,7 +800,7 @@ IF (KRR /= 0) THEN
     TZFIELD%NGRID      = 4
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZFLXZ)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZFLXZ)
   END IF
   !
   ! Contribution of the conservative water flux to the Buoyancy flux
@@ -882,7 +881,7 @@ IF ( ((OTURB_FLX .AND. OCLOSE_OUT) .OR. LLES_CALL) .AND. (KRRL > 0) ) THEN
     TZFIELD%NGRID      = 4
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,IRESP,ZFLXZ)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,HLUOUT,ZFLXZ)
   END IF
   !  
 ! and we store in LES configuration this subgrid flux <w'rc'>
diff --git a/src/MNH/uv_to_zonal_and_merid.f90 b/src/MNH/uv_to_zonal_and_merid.f90
index c47045258..afbfcba4c 100644
--- a/src/MNH/uv_to_zonal_and_merid.f90
+++ b/src/MNH/uv_to_zonal_and_merid.f90
@@ -223,8 +223,8 @@ IF(PRESENT(TPFILE)) THEN
     CALL PRINT_MSG(NVERB_WARNING,'IO','UV_TO_ZONAL_AND_MERID3D','inconsistent values for TZFIELDS(x)%HDIR')
   END IF
   !
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELDS(1),CLUOUT,IRESP,ZZC(:,:,:))
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELDS(2),CLUOUT,IRESP,ZMC(:,:,:))
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELDS(1),CLUOUT,ZZC(:,:,:))
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELDS(2),CLUOUT,ZMC(:,:,:))
 ELSE IF (PRESENT(PZC).AND.PRESENT(PMC)) THEN
   PZC(:,:,:)=ZZC(:,:,:)
   PMC(:,:,:)=ZMC(:,:,:)
@@ -336,8 +336,8 @@ IF(PRESENT(TPFILE)) THEN
     CALL PRINT_MSG(NVERB_WARNING,'IO','UV_TO_ZONAL_AND_MERID2D','inconsistent values for TZFIELDS(x)%HDIR')
   END IF
   !
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELDS(1),CLUOUT,IRESP,ZZC3D(:,:,1))
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELDS(2),CLUOUT,IRESP,ZMC3D(:,:,1))
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELDS(1),CLUOUT,ZZC3D(:,:,1))
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELDS(2),CLUOUT,ZMC3D(:,:,1))
 ELSE IF (PRESENT(PZC).AND.PRESENT(PMC)) THEN
   PZC(:,:)=ZZC3D(:,:,1)
   PMC(:,:)=ZMC3D(:,:,1)
diff --git a/src/MNH/ver_thermo.f90 b/src/MNH/ver_thermo.f90
index c2b758fe4..a001bda3d 100644
--- a/src/MNH/ver_thermo.f90
+++ b/src/MNH/ver_thermo.f90
@@ -314,7 +314,7 @@ IF (NVERB>=10) THEN
   TZFIELD%NGRID      = 4
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 3
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT0,IRESP,ZTHV)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT0,ZTHV)
 END IF
 !-------------------------------------------------------------------------------
 !
diff --git a/src/MNH/write_balloonn.f90 b/src/MNH/write_balloonn.f90
index 745c8255d..e66378693 100644
--- a/src/MNH/write_balloonn.f90
+++ b/src/MNH/write_balloonn.f90
@@ -108,8 +108,6 @@ TYPE(FLYER),        INTENT(IN)       :: TPFLYER
 !
 !*       0.2   Declarations of local variables
 !
-INTEGER            :: IRESP         ! IRESP  : return-code for fmwrit
-!
 REAL               :: ZLAT          ! latitude of the balloon
 REAL               :: ZLON          ! longitude of the balloon
 TYPE(TFIELDDATA)   :: TZFIELD
@@ -128,7 +126,7 @@ TZFIELD%CCOMMENT   = ''
 TZFIELD%NGRID      = 0
 TZFIELD%NTYPE      = TYPEREAL
 TZFIELD%NDIMS      = 0
-CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZLAT)
+CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZLAT)
 !
 TZFIELD%CMNHNAME   = TRIM(TPFLYER%TITLE)//'LON'
 TZFIELD%CSTDNAME   = ''
@@ -139,7 +137,7 @@ TZFIELD%CCOMMENT   = ''
 TZFIELD%NGRID      = 0
 TZFIELD%NTYPE      = TYPEREAL
 TZFIELD%NDIMS      = 0
-CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZLON)
+CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZLON)
 !
 TZFIELD%CMNHNAME   = TRIM(TPFLYER%TITLE)//'ALT'
 TZFIELD%CSTDNAME   = ''
@@ -150,7 +148,7 @@ TZFIELD%CCOMMENT   = ''
 TZFIELD%NGRID      = 0
 TZFIELD%NTYPE      = TYPEREAL
 TZFIELD%NDIMS      = 0
-CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,TPFLYER%Z_CUR)
+CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,TPFLYER%Z_CUR)
 !
 TZFIELD%CMNHNAME   = TRIM(TPFLYER%TITLE)//'WASCENT'
 TZFIELD%CSTDNAME   = ''
@@ -161,7 +159,7 @@ TZFIELD%CCOMMENT   = ''
 TZFIELD%NGRID      = 0
 TZFIELD%NTYPE      = TYPEREAL
 TZFIELD%NDIMS      = 0
-CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,TPFLYER%WASCENT)
+CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,TPFLYER%WASCENT)
 !
 TZFIELD%CMNHNAME   = TRIM(TPFLYER%TITLE)//'RHO'
 TZFIELD%CSTDNAME   = ''
@@ -172,7 +170,7 @@ TZFIELD%CCOMMENT   = ''
 TZFIELD%NGRID      = 0
 TZFIELD%NTYPE      = TYPEREAL
 TZFIELD%NDIMS      = 0
-CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,TPFLYER%RHO)
+CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,TPFLYER%RHO)
 !
 !
 !
diff --git a/src/MNH/write_budget.f90 b/src/MNH/write_budget.f90
index 81b52ee41..f6284127d 100644
--- a/src/MNH/write_budget.f90
+++ b/src/MNH/write_budget.f90
@@ -164,9 +164,6 @@ INTEGER,            INTENT(IN) :: KSV          ! Number of Scalar Variables
 !  
 !*       0.2   Declarations of local variables :
 !
-INTEGER           :: IRESP          ! IRESP  : return-code if a problem appears 
-                                    !  at the open of the file
-                                    !  LFI  routines 
 CHARACTER(LEN=16) :: YRECFM         ! Name of the article to be written
 INTEGER           :: JT,JPROC,JMASK
 !
@@ -207,7 +204,7 @@ TZFIELD%CCOMMENT   = 'Time step'
 TZFIELD%NGRID      = 0
 TZFIELD%NTYPE      = TYPEREAL
 TZFIELD%NDIMS      = 0
-CALL IO_WRITE_FIELD(TPDIAFILE,TZFIELD,HLUOUT,IRESP,PTSTEP)
+CALL IO_WRITE_FIELD(TPDIAFILE,TZFIELD,HLUOUT,PTSTEP)
 !
 TZFIELD%CMNHNAME   = 'BULEN'
 TZFIELD%CSTDNAME   = ''
@@ -218,7 +215,7 @@ TZFIELD%CCOMMENT   = 'Time step'
 TZFIELD%NGRID      = 0
 TZFIELD%NTYPE      = TYPEREAL
 TZFIELD%NDIMS      = 0
-CALL IO_WRITE_FIELD(TPDIAFILE,TZFIELD,HLUOUT,IRESP,XBULEN)
+CALL IO_WRITE_FIELD(TPDIAFILE,TZFIELD,HLUOUT,XBULEN)
 !
 !*   1.1   initialize NBUTSHIFT
 !           ---------------------
@@ -1043,7 +1040,7 @@ SELECT CASE (CBUTYPE)
         TZFIELD%NGRID      = 0
         TZFIELD%NTYPE      = TYPEREAL
         TZFIELD%NDIMS      = 6
-        CALL IO_WRITE_FIELD(TPDIAFILE,TZFIELD,HLUOUT,IRESP,ZWORKMASK(:,:,:,:,:,:))
+        CALL IO_WRITE_FIELD(TPDIAFILE,TZFIELD,HLUOUT,ZWORKMASK(:,:,:,:,:,:))
         WRITE(YRECFM,FMT="('MASK_',I4.4)") NBUTSHIFT
         CALL MENU_DIACHRO(TPDIAFILE,HLUOUT,YRECFM)
         DEALLOCATE(ZWORKMASK)
diff --git a/src/MNH/write_diachro.f90 b/src/MNH/write_diachro.f90
index a6f9c873e..deb859ad7 100644
--- a/src/MNH/write_diachro.f90
+++ b/src/MNH/write_diachro.f90
@@ -243,7 +243,7 @@ TZFIELD%CCOMMENT   = TRIM(YCOMMENT)
 TZFIELD%NGRID      = KGRID(1)
 TZFIELD%NTYPE      = TYPECHAR
 TZFIELD%NDIMS      = 0
-CALL IO_WRITE_FIELD(TPDIAFILE,TZFIELD,HLUOUTDIA,IRESPDIA,HTYPE)
+CALL IO_WRITE_FIELD(TPDIAFILE,TZFIELD,HLUOUTDIA,HTYPE)
 
 IF (NVERB>=5) THEN
   WRITE(ILUOUTDIA,*)'  1st record (',TRIM(TZFIELD%CMNHNAME),'): OK'
@@ -286,7 +286,7 @@ SELECT CASE(HTYPE)
     ITABCHAR(29)=IIMASK; ITABCHAR(30)=IJMASK
     ITABCHAR(31)=IKMASK; ITABCHAR(32)=ITMASK
     ITABCHAR(33)=INMASK; ITABCHAR(34)=IPMASK
-    CALL IO_WRITE_FIELD(TPDIAFILE,TZFIELD,HLUOUTDIA,IRESPDIA,ITABCHAR)
+    CALL IO_WRITE_FIELD(TPDIAFILE,TZFIELD,HLUOUTDIA,ITABCHAR)
     DEALLOCATE(ITABCHAR)
     IF (NVERB>=5) THEN
       WRITE(ILUOUTDIA,*)' ILENTITRE,ILENUNITE,ILENCOMMENT ',ILENTITRE,ILENUNITE,ILENCOMMENT
@@ -307,7 +307,7 @@ SELECT CASE(HTYPE)
     ITABCHAR(20)=IIMASK; ITABCHAR(21)=IJMASK
     ITABCHAR(22)=IKMASK; ITABCHAR(23)=ITMASK
     ITABCHAR(24)=INMASK; ITABCHAR(25)=IPMASK
-    CALL IO_WRITE_FIELD(TPDIAFILE,TZFIELD,HLUOUTDIA,IRESPDIA,ITABCHAR)
+    CALL IO_WRITE_FIELD(TPDIAFILE,TZFIELD,HLUOUTDIA,ITABCHAR)
     DEALLOCATE(ITABCHAR)
 END SELECT
 IF (NVERB>=5) THEN
@@ -325,7 +325,7 @@ TZFIELD%CCOMMENT   = TRIM(YCOMMENT)
 TZFIELD%NGRID      = KGRID(1)
 TZFIELD%NTYPE      = TYPECHAR
 TZFIELD%NDIMS      = 1
-CALL IO_WRITE_FIELD(TPDIAFILE,TZFIELD,HLUOUTDIA,IRESPDIA,HTITRE(1:IP))
+CALL IO_WRITE_FIELD(TPDIAFILE,TZFIELD,HLUOUTDIA,HTITRE(1:IP))
 
 IF (NVERB>=5) THEN
   WRITE(ILUOUTDIA,*)'  3rd record (',TRIM(TZFIELD%CMNHNAME),'): OK'
@@ -342,7 +342,7 @@ TZFIELD%CCOMMENT   = TRIM(YCOMMENT)
 TZFIELD%NGRID      = KGRID(1)
 TZFIELD%NTYPE      = TYPECHAR
 TZFIELD%NDIMS      = 1
-CALL IO_WRITE_FIELD(TPDIAFILE,TZFIELD,HLUOUTDIA,IRESPDIA,HUNITE(1:IP))
+CALL IO_WRITE_FIELD(TPDIAFILE,TZFIELD,HLUOUTDIA,HUNITE(1:IP))
 
 IF (NVERB>=5) THEN
   WRITE(ILUOUTDIA,*)'  4th record (',TRIM(TZFIELD%CMNHNAME),'): OK'
@@ -359,7 +359,7 @@ TZFIELD%CCOMMENT   = TRIM(YCOMMENT)
 TZFIELD%NGRID      = KGRID(1)
 TZFIELD%NTYPE      = TYPECHAR
 TZFIELD%NDIMS      = 1
-CALL IO_WRITE_FIELD(TPDIAFILE,TZFIELD,HLUOUTDIA,IRESPDIA,HCOMMENT(1:IP))
+CALL IO_WRITE_FIELD(TPDIAFILE,TZFIELD,HLUOUTDIA,HCOMMENT(1:IP))
 
 IF (NVERB>=5) THEN
   WRITE(ILUOUTDIA,*)'  5th record (',TRIM(TZFIELD%CMNHNAME),'): OK'
@@ -393,7 +393,7 @@ IF (PRESENT(OICP) .AND. PRESENT(OJCP)) THEN
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 5
     CALL IO_WRITE_FIELD_BOX(TPDIAFILE,TZFIELD,HLUOUTDIA,'BUDGET',PVAR(:,:,:,:,:,J), &
-                            KIL+JPHEXT,KIH+JPHEXT,KJL+JPHEXT,KJH+JPHEXT,IRESPDIA)
+                            KIL+JPHEXT,KIH+JPHEXT,KJL+JPHEXT,KJH+JPHEXT)
   ELSE
     TZFIELD%CMNHNAME   = TRIM(HGROUP)//'.PROC'//YJ
     TZFIELD%CSTDNAME   = ''
@@ -404,7 +404,7 @@ IF (PRESENT(OICP) .AND. PRESENT(OJCP)) THEN
     TZFIELD%NGRID      = KGRID(J)
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 5
-    CALL IO_WRITE_FIELD(TPDIAFILE,TZFIELD,HLUOUTDIA,IRESPDIA,PVAR(:,:,:,:,:,J))
+    CALL IO_WRITE_FIELD(TPDIAFILE,TZFIELD,HLUOUTDIA,PVAR(:,:,:,:,:,J))
   ENDIF
 ELSE
   TZFIELD%CMNHNAME   = TRIM(HGROUP)//'.PROC'//YJ
@@ -416,7 +416,7 @@ ELSE
   TZFIELD%NGRID      = KGRID(J)
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 5
-  CALL IO_WRITE_FIELD(TPDIAFILE,TZFIELD,HLUOUTDIA,IRESPDIA,PVAR(:,:,:,:,:,J))
+  CALL IO_WRITE_FIELD(TPDIAFILE,TZFIELD,HLUOUTDIA,PVAR(:,:,:,:,:,J))
 END IF
   IF (NVERB>=5) THEN
     WRITE(ILUOUTDIA,*)J,TRIM(TZFIELD%CMNHNAME)
@@ -437,7 +437,7 @@ TZFIELD%CCOMMENT   = TRIM(YCOMMENT)
 TZFIELD%NGRID      = KGRID(1)
 TZFIELD%NTYPE      = TYPEREAL
 TZFIELD%NDIMS      = 2
-CALL IO_WRITE_FIELD(TPDIAFILE,TZFIELD,HLUOUTDIA,IRESPDIA,PTRAJT)
+CALL IO_WRITE_FIELD(TPDIAFILE,TZFIELD,HLUOUTDIA,PTRAJT)
 
 IF (NVERB>=5) THEN
   WRITE(ILUOUTDIA,*)'  7th record (',TRIM(TZFIELD%CMNHNAME),'): OK'
@@ -458,7 +458,7 @@ IF(PRESENT(PTRAJX))THEN
   TZFIELD%NGRID      = KGRID(1)
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 3
-  CALL IO_WRITE_FIELD(TPDIAFILE,TZFIELD,HLUOUTDIA,IRESPDIA,PTRAJX)
+  CALL IO_WRITE_FIELD(TPDIAFILE,TZFIELD,HLUOUTDIA,PTRAJX)
 ENDIF
 !
 !                        ou
@@ -473,7 +473,7 @@ IF(PRESENT(PMASK))THEN
   TZFIELD%NGRID      = KGRID(1)
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 6
-  CALL IO_WRITE_FIELD(TPDIAFILE,TZFIELD,HLUOUTDIA,IRESPDIA,PMASK)
+  CALL IO_WRITE_FIELD(TPDIAFILE,TZFIELD,HLUOUTDIA,PMASK)
 ENDIF
 !
 ! 9eme enregistrement TRAJY
@@ -488,7 +488,7 @@ IF(PRESENT(PTRAJY))THEN
   TZFIELD%NGRID      = KGRID(1)
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 3
-  CALL IO_WRITE_FIELD(TPDIAFILE,TZFIELD,HLUOUTDIA,IRESPDIA,PTRAJY)
+  CALL IO_WRITE_FIELD(TPDIAFILE,TZFIELD,HLUOUTDIA,PTRAJY)
 ENDIF
 !
 ! 10eme enregistrement TRAJZ
@@ -503,7 +503,7 @@ IF(PRESENT(PTRAJZ))THEN
   TZFIELD%NGRID      = KGRID(1)
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 3
-  CALL IO_WRITE_FIELD(TPDIAFILE,TZFIELD,HLUOUTDIA,IRESPDIA,PTRAJZ)
+  CALL IO_WRITE_FIELD(TPDIAFILE,TZFIELD,HLUOUTDIA,PTRAJZ)
 ENDIF
 !
 ! 11eme enregistrement PDATIME
@@ -517,7 +517,7 @@ TZFIELD%CCOMMENT   = TRIM(YCOMMENT)
 TZFIELD%NGRID      = KGRID(1)
 TZFIELD%NTYPE      = TYPEREAL
 TZFIELD%NDIMS      = 2
-CALL IO_WRITE_FIELD(TPDIAFILE,TZFIELD,HLUOUTDIA,IRESPDIA,PDATIME)
+CALL IO_WRITE_FIELD(TPDIAFILE,TZFIELD,HLUOUTDIA,PDATIME)
 !
 CALL MENU_DIACHRO(TPDIAFILE,HLUOUTDIA,HGROUP)
 LPACK=GPACK
diff --git a/src/MNH/write_dummy_gr_fieldn.f90 b/src/MNH/write_dummy_gr_fieldn.f90
index dd1e0b090..39118ad55 100644
--- a/src/MNH/write_dummy_gr_fieldn.f90
+++ b/src/MNH/write_dummy_gr_fieldn.f90
@@ -83,8 +83,6 @@ TYPE(TFILEDATA),   INTENT(IN) :: TPFILE ! File characteristics
 !*       0.2   Declarations of local variables
 !              -------------------------------
 !
-INTEGER           :: IRESP          ! IRESP  : return-code if a problem appears 
-                                    ! at the open of the file in LFI  routines 
 INTEGER           :: JDUMMY         ! loop counter
 !
 CHARACTER(LEN=16) :: YRECFM         ! Name of the article to be written
@@ -119,7 +117,7 @@ TZFIELD%CCOMMENT   = 'number of dummy pgd fields chosen by user'
 TZFIELD%NGRID      = 0
 TZFIELD%NTYPE      = TYPEINT
 TZFIELD%NDIMS      = 0
-CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,NDUMMY_GR_NBR)
+CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,NDUMMY_GR_NBR)
 !
 DO JDUMMY=1,NDUMMY_GR_NBR
   WRITE(YRECFM,'(A8,I3.3,A5)') 'DUMMY_GR',JDUMMY,'     '
@@ -138,7 +136,7 @@ DO JDUMMY=1,NDUMMY_GR_NBR
   !
   ZWORK2D(:,:) = XDUMMY_GR_FIELDS(:,:,JDUMMY)
   !
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK2D)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK2D)
 END DO
 !
 !-------------------------------------------------------------------------------
diff --git a/src/MNH/write_hgrid.f90 b/src/MNH/write_hgrid.f90
index 314215609..86e9645ff 100644
--- a/src/MNH/write_hgrid.f90
+++ b/src/MNH/write_hgrid.f90
@@ -110,20 +110,20 @@ END IF
 !*       2.     WRITING FROM MODD_PGD...
 !	        ----------------------
 !
-CALL IO_WRITE_FIELD(TPFILE,'LAT0',  CLUOUT0,IRESP,XLAT0)
-CALL IO_WRITE_FIELD(TPFILE,'LON0',  CLUOUT0,IRESP,XLON0)
-CALL IO_WRITE_FIELD(TPFILE,'RPK',   CLUOUT0,IRESP,XRPK)
-CALL IO_WRITE_FIELD(TPFILE,'BETA',  CLUOUT0,IRESP,XBETA)
-CALL IO_WRITE_FIELD(TPFILE,'LATORI',CLUOUT0,IRESP,XPGDLATOR)
-CALL IO_WRITE_FIELD(TPFILE,'LONORI',CLUOUT0,IRESP,XPGDLONOR)
-CALL IO_WRITE_FIELD(TPFILE,'IMAX',  CLUOUT0,IRESP,NPGDIMAX)
-CALL IO_WRITE_FIELD(TPFILE,'JMAX',  CLUOUT0,IRESP,NPGDJMAX)
-CALL IO_WRITE_FIELD(TPFILE,'XHAT',  CLUOUT0,IRESP,XPGDXHAT)
-CALL IO_WRITE_FIELD(TPFILE,'YHAT',  CLUOUT0,IRESP,XPGDYHAT)
+CALL IO_WRITE_FIELD(TPFILE,'LAT0',  CLUOUT0,XLAT0)
+CALL IO_WRITE_FIELD(TPFILE,'LON0',  CLUOUT0,XLON0)
+CALL IO_WRITE_FIELD(TPFILE,'RPK',   CLUOUT0,XRPK)
+CALL IO_WRITE_FIELD(TPFILE,'BETA',  CLUOUT0,XBETA)
+CALL IO_WRITE_FIELD(TPFILE,'LATORI',CLUOUT0,XPGDLATOR)
+CALL IO_WRITE_FIELD(TPFILE,'LONORI',CLUOUT0,XPGDLONOR)
+CALL IO_WRITE_FIELD(TPFILE,'IMAX',  CLUOUT0,NPGDIMAX)
+CALL IO_WRITE_FIELD(TPFILE,'JMAX',  CLUOUT0,NPGDJMAX)
+CALL IO_WRITE_FIELD(TPFILE,'XHAT',  CLUOUT0,XPGDXHAT)
+CALL IO_WRITE_FIELD(TPFILE,'YHAT',  CLUOUT0,XPGDYHAT)
 !
 IF (CSTORAGE_TYPE=='TT') THEN
-  CALL IO_WRITE_FIELD(TPFILE,'THINSHELL',CLUOUT0,IRESP,LTHINSHELL)
-  CALL IO_WRITE_FIELD(TPFILE,'CARTESIAN',CLUOUT0,IRESP,LCARTESIAN)
+  CALL IO_WRITE_FIELD(TPFILE,'THINSHELL',CLUOUT0,LTHINSHELL)
+  CALL IO_WRITE_FIELD(TPFILE,'CARTESIAN',CLUOUT0,LCARTESIAN)
 END IF
 !-------------------------------------------------------------------------------
 !
diff --git a/src/MNH/write_hgridn.f90 b/src/MNH/write_hgridn.f90
index 96c29456c..e0bd7cee6 100644
--- a/src/MNH/write_hgridn.f90
+++ b/src/MNH/write_hgridn.f90
@@ -103,20 +103,20 @@ INTEGER               :: IRESP
 !
 CALL FMLOOK_ll(CLUOUT,CLUOUT,ILUOUT,IRESP)
 !
-CALL IO_WRITE_FIELD(TPFILE,'LAT0',  CLUOUT,IRESP,XLAT0)
-CALL IO_WRITE_FIELD(TPFILE,'LON0',  CLUOUT,IRESP,XLON0)
-CALL IO_WRITE_FIELD(TPFILE,'RPK',   CLUOUT,IRESP,XRPK)
-CALL IO_WRITE_FIELD(TPFILE,'BETA',  CLUOUT,IRESP,XBETA)
-CALL IO_WRITE_FIELD(TPFILE,'LATORI',CLUOUT,IRESP,XLATORI)
-CALL IO_WRITE_FIELD(TPFILE,'LONORI',CLUOUT,IRESP,XLONORI)
-CALL IO_WRITE_FIELD(TPFILE,'IMAX',  CLUOUT,IRESP,NIMAX)
-CALL IO_WRITE_FIELD(TPFILE,'JMAX',  CLUOUT,IRESP,NJMAX)
-CALL IO_WRITE_FIELD(TPFILE,'XHAT',  CLUOUT,IRESP,XXHAT)
-CALL IO_WRITE_FIELD(TPFILE,'YHAT',  CLUOUT,IRESP,XYHAT)
+CALL IO_WRITE_FIELD(TPFILE,'LAT0',  CLUOUT,XLAT0)
+CALL IO_WRITE_FIELD(TPFILE,'LON0',  CLUOUT,XLON0)
+CALL IO_WRITE_FIELD(TPFILE,'RPK',   CLUOUT,XRPK)
+CALL IO_WRITE_FIELD(TPFILE,'BETA',  CLUOUT,XBETA)
+CALL IO_WRITE_FIELD(TPFILE,'LATORI',CLUOUT,XLATORI)
+CALL IO_WRITE_FIELD(TPFILE,'LONORI',CLUOUT,XLONORI)
+CALL IO_WRITE_FIELD(TPFILE,'IMAX',  CLUOUT,NIMAX)
+CALL IO_WRITE_FIELD(TPFILE,'JMAX',  CLUOUT,NJMAX)
+CALL IO_WRITE_FIELD(TPFILE,'XHAT',  CLUOUT,XXHAT)
+CALL IO_WRITE_FIELD(TPFILE,'YHAT',  CLUOUT,XYHAT)
 !
 IF (CSTORAGE_TYPE=='TT') THEN
-  CALL IO_WRITE_FIELD(TPFILE,'THINSHELL',CLUOUT,IRESP,LTHINSHELL)
-  CALL IO_WRITE_FIELD(TPFILE,'CARTESIAN',CLUOUT,IRESP,LCARTESIAN)
+  CALL IO_WRITE_FIELD(TPFILE,'THINSHELL',CLUOUT,LTHINSHELL)
+  CALL IO_WRITE_FIELD(TPFILE,'CARTESIAN',CLUOUT,LCARTESIAN)
 END IF
 !-------------------------------------------------------------------------------
 !
diff --git a/src/MNH/write_lbn.f90 b/src/MNH/write_lbn.f90
index 3f2304d86..3e58191ac 100644
--- a/src/MNH/write_lbn.f90
+++ b/src/MNH/write_lbn.f90
@@ -169,23 +169,23 @@ YFMFILE = TPFILE%CNAME
 !        2.  WRITE THE DIMENSION OF LB FIELDS
 !            --------------------------------
 !
-CALL IO_WRITE_FIELD(TPFILE,'RIMX',CLUOUT,IRESP,NRIMX)
-CALL IO_WRITE_FIELD(TPFILE,'RIMY',CLUOUT,IRESP,NRIMY)
+CALL IO_WRITE_FIELD(TPFILE,'RIMX',CLUOUT,NRIMX)
+CALL IO_WRITE_FIELD(TPFILE,'RIMY',CLUOUT,NRIMY)
 !
 !*       3.  BASIC VARIABLES
 !            --------------
 !
-CALL IO_WRITE_FIELD(TPFILE,'HORELAX_UVWTH',CLUOUT,IRESP,LHORELAX_UVWTH)
+CALL IO_WRITE_FIELD(TPFILE,'HORELAX_UVWTH',CLUOUT,LHORELAX_UVWTH)
 !
 !gathering and writing of the LB fields
-IF(NSIZELBXU_ll /= 0) CALL IO_WRITE_FIELD_LB(TPFILE,'LBXUM', CLUOUT,NSIZELBXU_ll,IRESP,XLBXUM)
-IF(NSIZELBX_ll  /= 0) CALL IO_WRITE_FIELD_LB(TPFILE,'LBXVM', CLUOUT,NSIZELBX_ll, IRESP,XLBXVM)
-IF(NSIZELBX_ll  /= 0) CALL IO_WRITE_FIELD_LB(TPFILE,'LBXWM', CLUOUT,NSIZELBX_ll, IRESP,XLBXWM)
-IF(NSIZELBY_ll  /= 0) CALL IO_WRITE_FIELD_LB(TPFILE,'LBYUM', CLUOUT,NSIZELBY_ll, IRESP,XLBYUM)
-IF(NSIZELBYV_ll /= 0) CALL IO_WRITE_FIELD_LB(TPFILE,'LBYVM', CLUOUT,NSIZELBYV_ll,IRESP,XLBYVM)
-IF(NSIZELBY_ll  /= 0) CALL IO_WRITE_FIELD_LB(TPFILE,'LBYWM', CLUOUT,NSIZELBY_ll, IRESP,XLBYWM)
-IF(NSIZELBX_ll  /= 0) CALL IO_WRITE_FIELD_LB(TPFILE,'LBXTHM',CLUOUT,NSIZELBX_ll, IRESP,XLBXTHM)
-IF(NSIZELBY_ll  /= 0) CALL IO_WRITE_FIELD_LB(TPFILE,'LBYTHM',CLUOUT,NSIZELBY_ll, IRESP,XLBYTHM)
+IF(NSIZELBXU_ll /= 0) CALL IO_WRITE_FIELD_LB(TPFILE,'LBXUM', CLUOUT,NSIZELBXU_ll,XLBXUM)
+IF(NSIZELBX_ll  /= 0) CALL IO_WRITE_FIELD_LB(TPFILE,'LBXVM', CLUOUT,NSIZELBX_ll,XLBXVM)
+IF(NSIZELBX_ll  /= 0) CALL IO_WRITE_FIELD_LB(TPFILE,'LBXWM', CLUOUT,NSIZELBX_ll,XLBXWM)
+IF(NSIZELBY_ll  /= 0) CALL IO_WRITE_FIELD_LB(TPFILE,'LBYUM', CLUOUT,NSIZELBY_ll,XLBYUM)
+IF(NSIZELBYV_ll /= 0) CALL IO_WRITE_FIELD_LB(TPFILE,'LBYVM', CLUOUT,NSIZELBYV_ll,XLBYVM)
+IF(NSIZELBY_ll  /= 0) CALL IO_WRITE_FIELD_LB(TPFILE,'LBYWM', CLUOUT,NSIZELBY_ll,XLBYWM)
+IF(NSIZELBX_ll  /= 0) CALL IO_WRITE_FIELD_LB(TPFILE,'LBXTHM',CLUOUT,NSIZELBX_ll,XLBXTHM)
+IF(NSIZELBY_ll  /= 0) CALL IO_WRITE_FIELD_LB(TPFILE,'LBYTHM',CLUOUT,NSIZELBY_ll,XLBYTHM)
 !
 !*        4  LB-TKE
 !            ------
@@ -196,10 +196,10 @@ YCOMMENT=''
 ILENCH=LEN(YCOMMENT)
 !
 IF(CTURB/='NONE') THEN
-  CALL IO_WRITE_FIELD(TPFILE,'HORELAX_TKE',CLUOUT,IRESP,LHORELAX_TKE)
+  CALL IO_WRITE_FIELD(TPFILE,'HORELAX_TKE',CLUOUT,LHORELAX_TKE)
 !
-  IF(NSIZELBXTKE_ll /= 0) CALL IO_WRITE_FIELD_LB(TPFILE,'LBXTKEM',CLUOUT,NSIZELBXTKE_ll,IRESP,XLBXTKEM)
-  IF(NSIZELBYTKE_ll /= 0) CALL IO_WRITE_FIELD_LB(TPFILE,'LBYTKEM',CLUOUT,NSIZELBYTKE_ll,IRESP,XLBYTKEM)
+  IF(NSIZELBXTKE_ll /= 0) CALL IO_WRITE_FIELD_LB(TPFILE,'LBXTKEM',CLUOUT,NSIZELBXTKE_ll,XLBXTKEM)
+  IF(NSIZELBYTKE_ll /= 0) CALL IO_WRITE_FIELD_LB(TPFILE,'LBYTKEM',CLUOUT,NSIZELBYTKE_ll,XLBYTKEM)
 END IF
 !
 !
@@ -222,7 +222,7 @@ IF (NRR >=1) THEN
   TZFIELD%NTYPE      = TYPELOG
   TZFIELD%NDIMS      = 0
   !
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,GHORELAX_R)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,GHORELAX_R)
   !
   GUSER(:)=(/LUSERV,LUSERC,LUSERR,LUSERI,LUSERS,LUSERG,LUSERH/)
   YC(:)=(/"V","C","R","I","S","G","H"/)
@@ -243,7 +243,7 @@ IF (NRR >=1) THEN
         TZFIELD%CLONGNAME  = 'MesoNH: LBXR'//YC(JRR)//'M'
         TZFIELD%CLBTYPE    = 'LBX'
         TZFIELD%CCOMMENT   = '2_Y_Z_LBXR'//YC(JRR)//'M'
-        CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBXR_ll,IRESP,XLBXRM(:,:,:,IRR))
+        CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBXR_ll,XLBXRM(:,:,:,IRR))
       END IF
       !
       IF(NSIZELBYR_ll /= 0) THEN
@@ -251,7 +251,7 @@ IF (NRR >=1) THEN
         TZFIELD%CLONGNAME  = 'MesoNH: LBYR'//YC(JRR)//'M'
         TZFIELD%CLBTYPE    = 'LBY'
         TZFIELD%CCOMMENT   = '2_Y_Z_LBYR'//YC(JRR)//'M'
-        CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBXR_ll,IRESP,XLBYRM(:,:,:,IRR))
+        CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBXR_ll,XLBYRM(:,:,:,IRR))
       END IF
     END IF
   END DO
@@ -274,7 +274,7 @@ IF (NSV >=1) THEN
   TZFIELD%NGRID      = 0
   TZFIELD%NTYPE      = TYPELOG
   TZFIELD%NDIMS      = 0
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,GHORELAX_SV)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,GHORELAX_SV)
 !
   IGRID=1
   IRIMX =(NSIZELBXSV_ll-2*JPHEXT)/2
@@ -293,7 +293,7 @@ IF (NSV >=1) THEN
         TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
         TZFIELD%CLBTYPE    = 'LBX'
         WRITE(TZFIELD%CCOMMENT,'(A6,A6,I3.3,A8)')'2_Y_Z_','LBXSVM',JSV
-        CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBXSV_ll,IRESP,XLBXSVM(:,:,:,JSV))
+        CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBXSV_ll,XLBXSVM(:,:,:,JSV))
       END IF
       !
       IF(NSIZELBYSV_ll /= 0) THEN
@@ -301,7 +301,7 @@ IF (NSV >=1) THEN
         TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
         TZFIELD%CLBTYPE    = 'LBY'
         WRITE(TZFIELD%CCOMMENT,'(A6,A6,I3.3,A8)')'X_2_Z_','LBYSVM',JSV
-        CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBYSV_ll,IRESP,XLBYSVM(:,:,:,JSV))
+        CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBYSV_ll,XLBYSVM(:,:,:,JSV))
       END IF
     END DO
   END IF
@@ -320,7 +320,7 @@ IF (NSV >=1) THEN
         TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
         TZFIELD%CLBTYPE    = 'LBX'
         WRITE(TZFIELD%CCOMMENT,'(A6,A6,I3.3)')'2_Y_Z_','LBXSVM',JSV
-        CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBXSV_ll,IRESP,XLBXSVM(:,:,:,JSV))
+        CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBXSV_ll,XLBXSVM(:,:,:,JSV))
       END IF
       !
       IF(NSIZELBYSV_ll /= 0) THEN
@@ -328,7 +328,7 @@ IF (NSV >=1) THEN
         TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
         TZFIELD%CLBTYPE    = 'LBY'
         WRITE(TZFIELD%CCOMMENT,'(A6,A6,I3.3)')'X_2_Z_','LBYSVM',JSV
-        CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBYSV_ll,IRESP,XLBYSVM(:,:,:,JSV))
+        CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBYSV_ll,XLBYSVM(:,:,:,JSV))
       END IF
     END DO
   END IF
@@ -347,7 +347,7 @@ IF (NSV >=1) THEN
         TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
         TZFIELD%CLBTYPE    = 'LBX'
         WRITE(TZFIELD%CCOMMENT,'(A6,A6,I3.3)')'2_Y_Z_','LBXSVM',JSV
-        CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBXSV_ll,IRESP,XLBXSVM(:,:,:,JSV))
+        CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBXSV_ll,XLBXSVM(:,:,:,JSV))
       END IF
       !
       IF(NSIZELBYSV_ll /= 0) THEN
@@ -355,7 +355,7 @@ IF (NSV >=1) THEN
         TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
         TZFIELD%CLBTYPE    = 'LBY'
         WRITE(TZFIELD%CCOMMENT,'(A6,A6,I3.3)')'X_2_Z_','LBYSVM',JSV
-        CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBYSV_ll,IRESP,XLBYSVM(:,:,:,JSV))
+        CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBYSV_ll,XLBYSVM(:,:,:,JSV))
       END IF
     END DO
   END IF
@@ -377,7 +377,7 @@ IF (NSV >=1) THEN
         TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
         TZFIELD%CLBTYPE    = 'LBX'
         WRITE(TZFIELD%CCOMMENT,'(A6,A6,I3.3)')'2_Y_Z_','LBXSVM',JSV
-        CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBXSV_ll,IRESP,XLBXSVM(:,:,:,JSV))
+        CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBXSV_ll,XLBXSVM(:,:,:,JSV))
       END IF
       !
       IF(NSIZELBYSV_ll /= 0) THEN
@@ -385,7 +385,7 @@ IF (NSV >=1) THEN
         TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
         TZFIELD%CLBTYPE    = 'LBY'
         WRITE(TZFIELD%CCOMMENT,'(A6,A6,I3.3)')'X_2_Z_','LBYSVM',JSV
-        CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBYSV_ll,IRESP,XLBYSVM(:,:,:,JSV))
+        CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBYSV_ll,XLBYSVM(:,:,:,JSV))
       END IF
     END DO
     !
@@ -396,7 +396,7 @@ IF (NSV >=1) THEN
         TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
         TZFIELD%CLBTYPE    = 'LBX'
         WRITE(TZFIELD%CCOMMENT,'(A6,A6,I3.3)')'2_Y_Z_','LBXSVM',JSV
-        CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBXSV_ll,IRESP,XLBXSVM(:,:,:,JSV))
+        CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBXSV_ll,XLBXSVM(:,:,:,JSV))
       END IF
       !
       IF(NSIZELBYSV_ll /= 0) THEN
@@ -404,7 +404,7 @@ IF (NSV >=1) THEN
         TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
         TZFIELD%CLBTYPE    = 'LBY'
         WRITE(TZFIELD%CCOMMENT,'(A6,A6,I3.3)')'X_2_Z_','LBYSVM',JSV
-        CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBYSV_ll,IRESP,XLBYSVM(:,:,:,JSV))
+        CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBYSV_ll,XLBYSVM(:,:,:,JSV))
       END IF
     END DO
   END IF
@@ -425,7 +425,7 @@ IF (NSV >=1) THEN
         TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
         TZFIELD%CLBTYPE    = 'LBX'
         WRITE(TZFIELD%CCOMMENT,'(A6,A6,I3.3)')'2_Y_Z_','LBXSVM',JSV
-        CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBXSV_ll,IRESP,XLBXSVM(:,:,:,JSV))
+        CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBXSV_ll,XLBXSVM(:,:,:,JSV))
       END IF
       !
       IF(NSIZELBYSV_ll /= 0) THEN
@@ -433,7 +433,7 @@ IF (NSV >=1) THEN
         TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
         TZFIELD%CLBTYPE    = 'LBY'
         WRITE(TZFIELD%CCOMMENT,'(A6,A6,I3.3)')'X_2_Z_','LBYSVM',JSV
-        CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBYSV_ll,IRESP,XLBYSVM(:,:,:,JSV))
+        CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBYSV_ll,XLBYSVM(:,:,:,JSV))
       END IF
     END DO
   END IF
@@ -477,7 +477,7 @@ IF (NSV >=1) THEN
         TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
         TZFIELD%CLBTYPE    = 'LBX'
         WRITE(TZFIELD%CCOMMENT,'(A6,A6,I3.3)')'2_Y_Z_','LBXSVM',JSV
-        CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBXSV_ll,IRESP,XLBXSVM(:,:,:,JSV))
+        CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBXSV_ll,XLBXSVM(:,:,:,JSV))
       END IF
       !
       IF(NSIZELBYSV_ll /= 0) THEN
@@ -485,7 +485,7 @@ IF (NSV >=1) THEN
         TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
         TZFIELD%CLBTYPE    = 'LBY'
         WRITE(TZFIELD%CCOMMENT,'(A6,A6,I3.3)')'X_2_Z_','LBYSVM',JSV
-        CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBYSV_ll,IRESP,XLBYSVM(:,:,:,JSV))
+        CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBYSV_ll,XLBYSVM(:,:,:,JSV))
       END IF
     END DO
     !
@@ -496,7 +496,7 @@ IF (NSV >=1) THEN
           TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
           TZFIELD%CLBTYPE    = 'LBX'
           WRITE(TZFIELD%CCOMMENT,'(A6,A6,I3.3)')'2_Y_Z_','LBXSVM',JSV
-          CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBXSV_ll,IRESP,XLBXSVM(:,:,:,JSV))
+          CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBXSV_ll,XLBXSVM(:,:,:,JSV))
         END IF             
         !
         IF(NSIZELBYSV_ll /= 0) THEN
@@ -504,7 +504,7 @@ IF (NSV >=1) THEN
           TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
           TZFIELD%CLBTYPE    = 'LBY'
           WRITE(TZFIELD%CCOMMENT,'(A6,A6,I3.3)')'X_2_Z_','LBYSVM',JSV
-          CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBYSV_ll,IRESP,XLBYSVM(:,:,:,JSV))
+          CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBYSV_ll,XLBYSVM(:,:,:,JSV))
         END IF             
       END DO      
     END IF  
@@ -516,7 +516,7 @@ IF (NSV >=1) THEN
       TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
       TZFIELD%CLBTYPE    = 'LBX'
       WRITE(TZFIELD%CCOMMENT,'(A6,A6,I3.3)')'2_Y_Z_','LBXSVM',JSV
-      CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBXSV_ll,IRESP,XLBXSVM(:,:,:,JSV))
+      CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBXSV_ll,XLBXSVM(:,:,:,JSV))
     END IF
     !
     IF(NSIZELBYSV_ll /= 0) THEN
@@ -524,7 +524,7 @@ IF (NSV >=1) THEN
       TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
       TZFIELD%CLBTYPE    = 'LBY'
       WRITE(TZFIELD%CCOMMENT,'(A6,A6,I3.3)')'X_2_Z_','LBYSVM',JSV
-      CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBYSV_ll,IRESP,XLBYSVM(:,:,:,JSV))
+      CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBYSV_ll,XLBYSVM(:,:,:,JSV))
     END IF
   END DO
   !
@@ -534,7 +534,7 @@ IF (NSV >=1) THEN
       TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
       TZFIELD%CLBTYPE    = 'LBX'
       WRITE(TZFIELD%CCOMMENT,'(A6,A6,I3.3)')'2_Y_Z_','LBXSVM',JSV
-      CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBXSV_ll,IRESP,XLBXSVM(:,:,:,JSV))
+      CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBXSV_ll,XLBXSVM(:,:,:,JSV))
     END IF
     !
     IF(NSIZELBYSV_ll /= 0) THEN
@@ -542,7 +542,7 @@ IF (NSV >=1) THEN
       TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
       TZFIELD%CLBTYPE    = 'LBY'
       WRITE(TZFIELD%CCOMMENT,'(A6,A6,I3.3)')'X_2_Z_','LBYSVM',JSV
-      CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBYSV_ll,IRESP,XLBYSVM(:,:,:,JSV))
+      CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBYSV_ll,XLBYSVM(:,:,:,JSV))
     END IF
   END DO
   !
@@ -552,7 +552,7 @@ IF (NSV >=1) THEN
       TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
       TZFIELD%CLBTYPE    = 'LBX'
       WRITE(TZFIELD%CCOMMENT,'(A6,A6,I3.3)')'2_Y_Z_','LBXSVM',JSV
-      CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBXSV_ll,IRESP,XLBXSVM(:,:,:,JSV))
+      CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBXSV_ll,XLBXSVM(:,:,:,JSV))
     END IF
     !
     IF(NSIZELBYSV_ll /= 0) THEN
@@ -560,7 +560,7 @@ IF (NSV >=1) THEN
       TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
       TZFIELD%CLBTYPE    = 'LBY'
       WRITE(TZFIELD%CCOMMENT,'(A6,A6,I3.3)')'X_2_Z_','LBYSVM',JSV
-      CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBYSV_ll,IRESP,XLBYSVM(:,:,:,JSV))
+      CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBYSV_ll,XLBYSVM(:,:,:,JSV))
     END IF
   END DO
   !
@@ -626,14 +626,14 @@ IF (NSV >=1) THEN
             TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
             TZFIELD%CLBTYPE    = 'LBX'
             WRITE(TZFIELD%CCOMMENT,'(A6,A6,I3.3,A8)')'2_Y_Z_','LBXSVM',JSV
-            CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBXSV_ll,IRESP,XLBXSVM(:,:,:,JSV))
+            CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBXSV_ll,XLBXSVM(:,:,:,JSV))
           ENDIF !Check on border points in X direction
           IF(NSIZELBYSV_ll /= 0) THEN
             TZFIELD%CMNHNAME   = 'LBY_'//TRIM(YPDUST_INI(ISV_NAME_IDX))
             TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
             TZFIELD%CLBTYPE    = 'LBY'
             WRITE(TZFIELD%CCOMMENT,'(A6,A6,I3.3,A8)')'X_2_Z_','LBYSVM',JSV
-            CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBYSV_ll,IRESP,XLBYSVM(:,:,:,JSV))
+            CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBYSV_ll,XLBYSVM(:,:,:,JSV))
           ENDIF  !Check on points in Y direction
         ENDDO ! Loop on mode
       ELSE  ! valeur IMOMENTS =/ 1
@@ -649,14 +649,14 @@ IF (NSV >=1) THEN
               TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
               TZFIELD%CLBTYPE    = 'LBX'
               WRITE(TZFIELD%CCOMMENT,'(A6,A6,I3.3,A8)')'2_Y_Z_','LBXSVM',JSV
-              CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBXSV_ll,IRESP,XLBXSVM(:,:,:,JSV))
+              CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBXSV_ll,XLBXSVM(:,:,:,JSV))
             ENDIF !Check on border points in X direction
             IF(NSIZELBYSV_ll /= 0) THEN
               TZFIELD%CMNHNAME   = 'LBY_'//TRIM(YPDUST_INI(ISV_NAME_IDX))
               TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
               TZFIELD%CLBTYPE    = 'LBY'
               WRITE(TZFIELD%CCOMMENT,'(A6,A6,I3.3,A8)')'X_2_Z_','LBYSVM',JSV
-              CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBYSV_ll,IRESP,XLBYSVM(:,:,:,JSV))
+              CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBYSV_ll,XLBYSVM(:,:,:,JSV))
             ENDIF  !Check on points in Y direction
           ENDDO ! Loop on moments
         ENDDO    ! Loop on modes
@@ -679,7 +679,7 @@ IF (NSV >=1) THEN
           TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
           TZFIELD%CLBTYPE    = 'LBX'
           WRITE(TZFIELD%CCOMMENT,'(A6,A6,I3.3)')'2_Y_Z_','LBXSVM',JSV
-          CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBXSV_ll,IRESP,XLBXSVM(:,:,:,JSV))
+          CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBXSV_ll,XLBXSVM(:,:,:,JSV))
         END IF             
         !
         IF(NSIZELBYSV_ll /= 0) THEN
@@ -687,7 +687,7 @@ IF (NSV >=1) THEN
           TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
           TZFIELD%CLBTYPE    = 'LBY'
           WRITE(TZFIELD%CCOMMENT,'(A6,A6,I3.3)')'X_2_Z_','LBYSVM',JSV
-          CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBYSV_ll,IRESP,XLBYSVM(:,:,:,JSV))
+          CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBYSV_ll,XLBYSVM(:,:,:,JSV))
         END IF
       END DO
       IF (LDEPOS_DST(IMI)) THEN
@@ -697,7 +697,7 @@ IF (NSV >=1) THEN
             TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
             TZFIELD%CLBTYPE    = 'LBX'
             WRITE(TZFIELD%CCOMMENT,'(A6,A6,I3.3)')'2_Y_Z_','LBXSVM',JSV
-            CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBXSV_ll,IRESP,XLBXSVM(:,:,:,JSV))
+            CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBXSV_ll,XLBXSVM(:,:,:,JSV))
           END IF             
           !
           IF(NSIZELBYSV_ll /= 0) THEN
@@ -705,7 +705,7 @@ IF (NSV >=1) THEN
             TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
             TZFIELD%CLBTYPE    = 'LBY'
             WRITE(TZFIELD%CCOMMENT,'(A6,A6,I3.3)')'X_2_Z_','LBYSVM',JSV
-            CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBYSV_ll,IRESP,XLBYSVM(:,:,:,JSV))
+            CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBYSV_ll,XLBYSVM(:,:,:,JSV))
           END IF             
         END DO      
       END IF  
@@ -776,14 +776,14 @@ IF (NSV >=1) THEN
             TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
             TZFIELD%CLBTYPE    = 'LBX'
             WRITE(TZFIELD%CCOMMENT,'(A6,A6,I3.3)')'2_Y_Z_','LBXSVM',JSV
-            CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBXSV_ll,IRESP,XLBXSVM(:,:,:,JSV))
+            CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBXSV_ll,XLBXSVM(:,:,:,JSV))
           ENDIF !Check on border points in X direction
           IF(NSIZELBYSV_ll /= 0) THEN
             TZFIELD%CMNHNAME   = 'LBY_'//TRIM(YPSALT_INI(ISV_NAME_IDX))
             TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
             TZFIELD%CLBTYPE    = 'LBY'
             WRITE(TZFIELD%CCOMMENT,'(A6,A6,I3.3)')'X_2_Z_','LBYSVM',JSV
-            CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBYSV_ll,IRESP,XLBYSVM(:,:,:,JSV))
+            CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBYSV_ll,XLBYSVM(:,:,:,JSV))
           ENDIF  !Check on points in Y direction
         ENDDO ! Loop on mode
       ELSE  ! valeur IMOMENTS =/ 1
@@ -799,14 +799,14 @@ IF (NSV >=1) THEN
               TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
               TZFIELD%CLBTYPE    = 'LBX'
               WRITE(TZFIELD%CCOMMENT,'(A6,A6,I3.3)')'2_Y_Z_','LBXSVM',JSV
-              CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBXSV_ll,IRESP,XLBXSVM(:,:,:,JSV))
+              CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBXSV_ll,XLBXSVM(:,:,:,JSV))
             ENDIF !Check on border points in X direction
             IF(NSIZELBYSV_ll /= 0) THEN
               TZFIELD%CMNHNAME   = 'LBY_'//TRIM(YPSALT_INI(ISV_NAME_IDX))
               TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
               TZFIELD%CLBTYPE    = 'LBY'
               WRITE(TZFIELD%CCOMMENT,'(A6,A6,I3.3)')'X_2_Z_','LBYSVM',JSV
-              CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBYSV_ll,IRESP,XLBYSVM(:,:,:,JSV))
+              CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBYSV_ll,XLBYSVM(:,:,:,JSV))
             ENDIF  !Check on points in Y direction
           ENDDO ! Loop on moments
         ENDDO    ! Loop on modes
@@ -827,7 +827,7 @@ IF (NSV >=1) THEN
           TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
           TZFIELD%CLBTYPE    = 'LBX'
           WRITE(TZFIELD%CCOMMENT,'(A6,A6,I3.3)')'2_Y_Z_','LBXSVM',JSV
-          CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBXSV_ll,IRESP,XLBXSVM(:,:,:,JSV))
+          CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBXSV_ll,XLBXSVM(:,:,:,JSV))
         END IF             
         !
         IF(NSIZELBYSV_ll /= 0) THEN
@@ -835,7 +835,7 @@ IF (NSV >=1) THEN
           TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
           TZFIELD%CLBTYPE    = 'LBY'
           WRITE(TZFIELD%CCOMMENT,'(A6,A6,I3.3)')'X_2_Z_','LBYSVM',JSV
-          CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBYSV_ll,IRESP,XLBYSVM(:,:,:,JSV))
+          CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBYSV_ll,XLBYSVM(:,:,:,JSV))
         END IF            
       END DO
       IF (LDEPOS_SLT(IMI)) THEN
@@ -845,7 +845,7 @@ IF (NSV >=1) THEN
             TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
             TZFIELD%CLBTYPE    = 'LBX'
             WRITE(TZFIELD%CCOMMENT,'(A6,A6,I3.3)')'2_Y_Z_','LBXSVM',JSV
-            CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBXSV_ll,IRESP,XLBXSVM(:,:,:,JSV))
+            CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBXSV_ll,XLBXSVM(:,:,:,JSV))
           END IF             
           !
           IF(NSIZELBYSV_ll /= 0) THEN
@@ -853,7 +853,7 @@ IF (NSV >=1) THEN
             TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
             TZFIELD%CLBTYPE    = 'LBY'
             WRITE(TZFIELD%CCOMMENT,'(A6,A6,I3.3)')'X_2_Z_','LBYSVM',JSV
-            CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBYSV_ll,IRESP,XLBYSVM(:,:,:,JSV))
+            CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBYSV_ll,XLBYSVM(:,:,:,JSV))
           END IF             
         END DO      
       END IF  
@@ -875,7 +875,7 @@ IF (NSV >=1) THEN
         TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
         TZFIELD%CLBTYPE    = 'LBX'
         WRITE(TZFIELD%CCOMMENT,'(A6,A6,I3.3)')'2_Y_Z_','LBXSVM',JSV
-        CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBXSV_ll,IRESP,XLBXSVM(:,:,:,JSV))
+        CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBXSV_ll,XLBXSVM(:,:,:,JSV))
       END IF
 !
       IF(NSIZELBYSV_ll /= 0) THEN
@@ -883,7 +883,7 @@ IF (NSV >=1) THEN
         TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
         TZFIELD%CLBTYPE    = 'LBY'
         WRITE(TZFIELD%CCOMMENT,'(A6,A6,I3.3)')'X_2_Z_','LBYSVM',JSV
-        CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBYSV_ll,IRESP,XLBYSVM(:,:,:,JSV))
+        CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBYSV_ll,XLBYSVM(:,:,:,JSV))
       END IF
     END DO
   END IF
@@ -902,7 +902,7 @@ IF (NSV >=1) THEN
         TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
         TZFIELD%CLBTYPE    = 'LBX'
         WRITE(TZFIELD%CCOMMENT,'(A6,A6,I3.3)')'2_Y_Z_','LBXSVM',JSV
-        CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBXSV_ll,IRESP,XLBXSVM(:,:,:,JSV))
+        CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBXSV_ll,XLBXSVM(:,:,:,JSV))
       END IF
       !
       IF(NSIZELBYSV_ll /= 0) THEN
@@ -910,7 +910,7 @@ IF (NSV >=1) THEN
         TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
         TZFIELD%CLBTYPE    = 'LBY'
         WRITE(TZFIELD%CCOMMENT,'(A6,A6,I3.3)')'X_2_Z_','LBYSVM',JSV
-        CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBYSV_ll,IRESP,XLBYSVM(:,:,:,JSV))
+        CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBYSV_ll,XLBYSVM(:,:,:,JSV))
       END IF
     END DO
   END IF
@@ -929,7 +929,7 @@ IF (NSV >=1) THEN
         TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
         TZFIELD%CLBTYPE    = 'LBX'
         WRITE(TZFIELD%CCOMMENT,'(A6,A6,I3.3)')'2_Y_Z_','LBXSVM',JSV
-        CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBXSV_ll,IRESP,XLBXSVM(:,:,:,JSV))
+        CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBXSV_ll,XLBXSVM(:,:,:,JSV))
       END IF
       !
       IF(NSIZELBYSV_ll /= 0) THEN
@@ -937,7 +937,7 @@ IF (NSV >=1) THEN
         TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
         TZFIELD%CLBTYPE    = 'LBY'
         WRITE(TZFIELD%CCOMMENT,'(A6,A6,I3.3)')'X_2_Z_','LBYSVM',JSV
-        CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBYSV_ll,IRESP,XLBYSVM(:,:,:,JSV))
+        CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBYSV_ll,XLBYSVM(:,:,:,JSV))
       END IF
     END DO
   END IF
@@ -957,7 +957,7 @@ IF (NSV >=1) THEN
         TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
         TZFIELD%CLBTYPE    = 'LBX'
         WRITE(TZFIELD%CCOMMENT,'(A6,A6,I3.3)')'2_Y_Z_','LBXSVM',JSV
-        CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBXSV_ll,IRESP,XLBXSVM(:,:,:,JSV))
+        CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBXSV_ll,XLBXSVM(:,:,:,JSV))
       END IF
       !
       IF(NSIZELBYSV_ll /= 0) THEN
@@ -965,7 +965,7 @@ IF (NSV >=1) THEN
         TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
         TZFIELD%CLBTYPE    = 'LBY'
         WRITE(TZFIELD%CCOMMENT,'(A6,A6,I3.3)')'X_2_Z_','LBYSVM',JSV
-        CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBYSV_ll,IRESP,XLBYSVM(:,:,:,JSV))
+        CALL IO_WRITE_FIELD_LB(TPFILE,TZFIELD,CLUOUT,NSIZELBYSV_ll,XLBYSVM(:,:,:,JSV))
       END IF
     END DO
   END IF
diff --git a/src/MNH/write_lfifm1_for_diag.f90 b/src/MNH/write_lfifm1_for_diag.f90
index 2e72cd5c7..0e35605c8 100644
--- a/src/MNH/write_lfifm1_for_diag.f90
+++ b/src/MNH/write_lfifm1_for_diag.f90
@@ -344,43 +344,43 @@ CALL FMLOOK_ll(CLUOUT0,CLUOUT0,ILUOUT0,IRESP)
 !
 !*       1.0    TPFILE%CNAME and HDADFILE :
 !
-CALL IO_WRITE_FIELD(TPFILE,'MASDEV',   CLUOUT,IRESP,NMASDEV)
-CALL IO_WRITE_FIELD(TPFILE,'BUGFIX',   CLUOUT,IRESP,NBUGFIX)
-CALL IO_WRITE_FIELD(TPFILE,'BIBUSER',  CLUOUT,IRESP,CBIBUSER)
-CALL IO_WRITE_FIELD(TPFILE,'PROGRAM',  CLUOUT,IRESP,CPROGRAM)
+CALL IO_WRITE_FIELD(TPFILE,'MASDEV',   CLUOUT,NMASDEV)
+CALL IO_WRITE_FIELD(TPFILE,'BUGFIX',   CLUOUT,NBUGFIX)
+CALL IO_WRITE_FIELD(TPFILE,'BIBUSER',  CLUOUT,CBIBUSER)
+CALL IO_WRITE_FIELD(TPFILE,'PROGRAM',  CLUOUT,CPROGRAM)
 !
-CALL IO_WRITE_FIELD(TPFILE,'L1D',      CLUOUT,IRESP,L1D)
-CALL IO_WRITE_FIELD(TPFILE,'L2D',      CLUOUT,IRESP,L2D)
-CALL IO_WRITE_FIELD(TPFILE,'PACK',     CLUOUT,IRESP,LPACK)
+CALL IO_WRITE_FIELD(TPFILE,'L1D',      CLUOUT,L1D)
+CALL IO_WRITE_FIELD(TPFILE,'L2D',      CLUOUT,L2D)
+CALL IO_WRITE_FIELD(TPFILE,'PACK',     CLUOUT,LPACK)
 !
-CALL IO_WRITE_FIELD(TPFILE,'MY_NAME',  CLUOUT,IRESP,TPFILE%CNAME)
-CALL IO_WRITE_FIELD(TPFILE,'DAD_NAME', CLUOUT,IRESP,HDADFILE)
+CALL IO_WRITE_FIELD(TPFILE,'MY_NAME',  CLUOUT,TPFILE%CNAME)
+CALL IO_WRITE_FIELD(TPFILE,'DAD_NAME', CLUOUT,HDADFILE)
 !
 IF (LEN_TRIM(HDADFILE)>0) THEN
-  CALL IO_WRITE_FIELD(TPFILE,'DXRATIO',CLUOUT,IRESP,NDXRATIO_ALL(1))
-  CALL IO_WRITE_FIELD(TPFILE,'DYRATIO',CLUOUT,IRESP,NDYRATIO_ALL(1))
-  CALL IO_WRITE_FIELD(TPFILE,'XOR',    CLUOUT,IRESP,NXOR_ALL(1))
-  CALL IO_WRITE_FIELD(TPFILE,'YOR',    CLUOUT,IRESP,NYOR_ALL(1))
+  CALL IO_WRITE_FIELD(TPFILE,'DXRATIO',CLUOUT,NDXRATIO_ALL(1))
+  CALL IO_WRITE_FIELD(TPFILE,'DYRATIO',CLUOUT,NDYRATIO_ALL(1))
+  CALL IO_WRITE_FIELD(TPFILE,'XOR',    CLUOUT,NXOR_ALL(1))
+  CALL IO_WRITE_FIELD(TPFILE,'YOR',    CLUOUT,NYOR_ALL(1))
 END IF
 !
-CALL IO_WRITE_FIELD(TPFILE,'SURF',     CLUOUT,IRESP,CSURF)
+CALL IO_WRITE_FIELD(TPFILE,'SURF',     CLUOUT,CSURF)
 !
 !*       1.1    Type and Dimensions :
 !
-CALL IO_WRITE_FIELD(TPFILE,'STORAGE_TYPE',CLUOUT,IRESP,'DI')
+CALL IO_WRITE_FIELD(TPFILE,'STORAGE_TYPE',CLUOUT,'DI')
 !
-CALL IO_WRITE_FIELD(TPFILE,'IMAX',CLUOUT,IRESP,NIMAX_ll)
-CALL IO_WRITE_FIELD(TPFILE,'JMAX',CLUOUT,IRESP,NJMAX_ll)
-CALL IO_WRITE_FIELD(TPFILE,'KMAX',CLUOUT,IRESP,NKMAX)
+CALL IO_WRITE_FIELD(TPFILE,'IMAX',CLUOUT,NIMAX_ll)
+CALL IO_WRITE_FIELD(TPFILE,'JMAX',CLUOUT,NJMAX_ll)
+CALL IO_WRITE_FIELD(TPFILE,'KMAX',CLUOUT,NKMAX)
 !
-CALL IO_WRITE_FIELD(TPFILE,'JPHEXT',CLUOUT,IRESP,JPHEXT)
+CALL IO_WRITE_FIELD(TPFILE,'JPHEXT',CLUOUT,JPHEXT)
 !
 !*       1.2    Grid variables :
 !
 IF (.NOT.LCARTESIAN) THEN
-  CALL IO_WRITE_FIELD(TPFILE,'RPK',   CLUOUT,IRESP,XRPK)
-  CALL IO_WRITE_FIELD(TPFILE,'LONORI',CLUOUT,IRESP,XLONORI)
-  CALL IO_WRITE_FIELD(TPFILE,'LATORI',CLUOUT,IRESP,XLATORI)
+  CALL IO_WRITE_FIELD(TPFILE,'RPK',   CLUOUT,XRPK)
+  CALL IO_WRITE_FIELD(TPFILE,'LONORI',CLUOUT,XLONORI)
+  CALL IO_WRITE_FIELD(TPFILE,'LATORI',CLUOUT,XLATORI)
 ! 
 !* diagnostic of 1st mass point
 !
@@ -402,43 +402,43 @@ IF (.NOT.LCARTESIAN) THEN
   TZFIELD%NGRID      = 0
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 0
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZLONOR)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZLONOR)
 !
   TZFIELD%CMNHNAME   = 'LATOR'
   TZFIELD%CLONGNAME  = 'MesoNH: LATOR'
   TZFIELD%CCOMMENT   = 'Latitude of 1st mass point'
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZLATOR)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZLATOR)
 !
 END IF 
 !
-CALL IO_WRITE_FIELD(TPFILE,'THINSHELL',CLUOUT,IRESP,LTHINSHELL)
-CALL IO_WRITE_FIELD(TPFILE,'LAT0',CLUOUT,IRESP,XLAT0)
-CALL IO_WRITE_FIELD(TPFILE,'LON0',CLUOUT,IRESP,XLON0)
-CALL IO_WRITE_FIELD(TPFILE,'BETA',CLUOUT,IRESP,XBETA)
+CALL IO_WRITE_FIELD(TPFILE,'THINSHELL',CLUOUT,LTHINSHELL)
+CALL IO_WRITE_FIELD(TPFILE,'LAT0',CLUOUT,XLAT0)
+CALL IO_WRITE_FIELD(TPFILE,'LON0',CLUOUT,XLON0)
+CALL IO_WRITE_FIELD(TPFILE,'BETA',CLUOUT,XBETA)
 !
-CALL IO_WRITE_FIELD(TPFILE,'XHAT',CLUOUT,IRESP,XXHAT)
-CALL IO_WRITE_FIELD(TPFILE,'YHAT',CLUOUT,IRESP,XYHAT)
-CALL IO_WRITE_FIELD(TPFILE,'ZHAT',CLUOUT,IRESP,XZHAT)
+CALL IO_WRITE_FIELD(TPFILE,'XHAT',CLUOUT,XXHAT)
+CALL IO_WRITE_FIELD(TPFILE,'YHAT',CLUOUT,XYHAT)
+CALL IO_WRITE_FIELD(TPFILE,'ZHAT',CLUOUT,XZHAT)
 !
-CALL IO_WRITE_FIELD(TPFILE,'ZS',   CLUOUT,IRESP,XZS)
-CALL IO_WRITE_FIELD(TPFILE,'ZSMT', CLUOUT,IRESP,XZSMT)
-CALL IO_WRITE_FIELD(TPFILE,'SLEVE',CLUOUT,IRESP,LSLEVE)
+CALL IO_WRITE_FIELD(TPFILE,'ZS',   CLUOUT,XZS)
+CALL IO_WRITE_FIELD(TPFILE,'ZSMT', CLUOUT,XZSMT)
+CALL IO_WRITE_FIELD(TPFILE,'SLEVE',CLUOUT,LSLEVE)
 !
 IF (LSLEVE) THEN
-  CALL IO_WRITE_FIELD(TPFILE,'LEN1',CLUOUT,IRESP,XLEN1)
-  CALL IO_WRITE_FIELD(TPFILE,'LEN2',CLUOUT,IRESP,XLEN2)
+  CALL IO_WRITE_FIELD(TPFILE,'LEN1',CLUOUT,XLEN1)
+  CALL IO_WRITE_FIELD(TPFILE,'LEN2',CLUOUT,XLEN2)
 END IF
 !
 !
-CALL IO_WRITE_FIELD(TPFILE,'DTMOD',CLUOUT,IRESP,TDTMOD)
-CALL IO_WRITE_FIELD(TPFILE,'DTCUR',CLUOUT,IRESP,TDTCUR)
-CALL IO_WRITE_FIELD(TPFILE,'DTEXP',CLUOUT,IRESP,TDTEXP)
-CALL IO_WRITE_FIELD(TPFILE,'DTSEG',CLUOUT,IRESP,TDTSEG)
+CALL IO_WRITE_FIELD(TPFILE,'DTMOD',CLUOUT,TDTMOD)
+CALL IO_WRITE_FIELD(TPFILE,'DTCUR',CLUOUT,TDTCUR)
+CALL IO_WRITE_FIELD(TPFILE,'DTEXP',CLUOUT,TDTEXP)
+CALL IO_WRITE_FIELD(TPFILE,'DTSEG',CLUOUT,TDTSEG)
 !
 !*       1.3    Configuration  variables :
 !
-CALL IO_WRITE_FIELD(TPFILE,'CARTESIAN',CLUOUT,IRESP,LCARTESIAN)
-CALL IO_WRITE_FIELD(TPFILE,'LBOUSS',   CLUOUT,IRESP,LBOUSS)
+CALL IO_WRITE_FIELD(TPFILE,'CARTESIAN',CLUOUT,LCARTESIAN)
+CALL IO_WRITE_FIELD(TPFILE,'LBOUSS',   CLUOUT,LBOUSS)
 !
 IF (LCARTESIAN .AND. LWIND_ZM) THEN
   LWIND_ZM=.FALSE.
@@ -446,12 +446,12 @@ IF (LCARTESIAN .AND. LWIND_ZM) THEN
 END IF
 !*       1.4    Reference state variables :
 !
-CALL IO_WRITE_FIELD(TPFILE,'RHOREFZ',CLUOUT,IRESP,XRHODREFZ)
-CALL IO_WRITE_FIELD(TPFILE,'THVREFZ',CLUOUT,IRESP,XTHVREFZ)
-CALL IO_WRITE_FIELD(TPFILE,'EXNTOP', CLUOUT,IRESP,XEXNTOP)
+CALL IO_WRITE_FIELD(TPFILE,'RHOREFZ',CLUOUT,XRHODREFZ)
+CALL IO_WRITE_FIELD(TPFILE,'THVREFZ',CLUOUT,XTHVREFZ)
+CALL IO_WRITE_FIELD(TPFILE,'EXNTOP', CLUOUT,XEXNTOP)
 !
-CALL IO_WRITE_FIELD(TPFILE,'RHODREF',CLUOUT,IRESP,XRHODREF)
-CALL IO_WRITE_FIELD(TPFILE,'THVREF', CLUOUT,IRESP,XTHVREF)
+CALL IO_WRITE_FIELD(TPFILE,'RHODREF',CLUOUT,XRHODREF)
+CALL IO_WRITE_FIELD(TPFILE,'THVREF', CLUOUT,XTHVREF)
 !
 !
 !*       1.5    Variables necessary for plots
@@ -460,11 +460,11 @@ CALL IO_WRITE_FIELD(TPFILE,'THVREF', CLUOUT,IRESP,XTHVREF)
 ! level or constant theta level or constant PV level
 !
 IF (INDEX(CISO,'PR') /= 0) THEN
-  CALL IO_WRITE_FIELD(TPFILE,'PABST',CLUOUT,IRESP,XPABST)
+  CALL IO_WRITE_FIELD(TPFILE,'PABST',CLUOUT,XPABST)
 END IF
 !
 IF (INDEX(CISO,'TK') /= 0) THEN
-  CALL IO_WRITE_FIELD(TPFILE,'THT',CLUOUT,IRESP,XTHT)
+  CALL IO_WRITE_FIELD(TPFILE,'THT',CLUOUT,XTHT)
 END IF
 !
 ZCORIOZ(:,:,:)=SPREAD( XCORIOZ(:,:),DIM=3,NCOPIES=IKU )
@@ -494,13 +494,13 @@ IF (INDEX(CISO,'EV') /= 0) THEN
   TZFIELD%NGRID      = 1
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 3
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZPOVO)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZPOVO)
 END IF
 !
 !
 IF (LVAR_RS) THEN
-  CALL IO_WRITE_FIELD(TPFILE,'UT',CLUOUT,IRESP,XUT)
-  CALL IO_WRITE_FIELD(TPFILE,'VT',CLUOUT,IRESP,XVT)
+  CALL IO_WRITE_FIELD(TPFILE,'UT',CLUOUT,XUT)
+  CALL IO_WRITE_FIELD(TPFILE,'VT',CLUOUT,XVT)
   !
   IF (LWIND_ZM) THEN
     TZFIELD2(1)%CMNHNAME   = 'UM_ZM'
@@ -526,20 +526,20 @@ IF (LVAR_RS) THEN
     CALL UV_TO_ZONAL_AND_MERID(XUT,XVT,23,TPFILE=TPFILE,TZFIELDS=TZFIELD2)
   END IF
   !
-  CALL IO_WRITE_FIELD(TPFILE,'WT',CLUOUT,IRESP,XWT)
+  CALL IO_WRITE_FIELD(TPFILE,'WT',CLUOUT,XWT)
   !
   !   write mixing ratio for water vapor required to plot radio-soundings
   !
   IF (LUSERV) THEN
-    CALL IO_WRITE_FIELD(TPFILE,'RVT',CLUOUT,IRESP,XRT(:,:,:,IDX_RVT))
+    CALL IO_WRITE_FIELD(TPFILE,'RVT',CLUOUT,XRT(:,:,:,IDX_RVT))
   END IF
 END IF
 !
 !*   Latitude and Longitude arrays
 !
 IF (.NOT.LCARTESIAN) THEN
-  CALL IO_WRITE_FIELD(TPFILE,'LAT',CLUOUT,IRESP,XLAT)
-  CALL IO_WRITE_FIELD(TPFILE,'LON',CLUOUT,IRESP,XLON)
+  CALL IO_WRITE_FIELD(TPFILE,'LAT',CLUOUT,XLAT)
+  CALL IO_WRITE_FIELD(TPFILE,'LON',CLUOUT,XLON)
 END IF
 !
 !
@@ -551,15 +551,15 @@ ZTEMP(:,:,:)=XTHT(:,:,:)*(XPABST(:,:,:)/ XP00) **(XRD/XCPD)
 !
 IF (LVAR_TURB) THEN
   IF (CTURB /= 'NONE') THEN
-    CALL IO_WRITE_FIELD(TPFILE,'TKET',CLUOUT,IRESP,XTKET)
+    CALL IO_WRITE_FIELD(TPFILE,'TKET',CLUOUT,XTKET)
     !
     IF( NRR > 1 ) THEN
-      CALL IO_WRITE_FIELD(TPFILE,'SRCT',CLUOUT,IRESP,XSRCT)
-      CALL IO_WRITE_FIELD(TPFILE,'SIGS',CLUOUT,IRESP,XSIGS)
+      CALL IO_WRITE_FIELD(TPFILE,'SRCT',CLUOUT,XSRCT)
+      CALL IO_WRITE_FIELD(TPFILE,'SIGS',CLUOUT,XSIGS)
     END IF
     ! 
     IF(CTOM=='TM06') THEN
-      CALL IO_WRITE_FIELD(TPFILE,'BL_DEPTH',CLUOUT,IRESP,XBL_DEPTH)
+      CALL IO_WRITE_FIELD(TPFILE,'BL_DEPTH',CLUOUT,XBL_DEPTH)
     END IF
   END IF
 END IF
@@ -573,15 +573,15 @@ IF (LVAR_PR .AND. LUSERR .AND. SIZE(XINPRR)>0 ) THEN
   CALL FIND_FIELD_ID_FROM_MNHNAME('INPRR',IID,IRESP)
   TZFIELD = TFIELDLIST(IID)
   TZFIELD%CUNITS = 'mm hour-1'
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XINPRR*3.6E6)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XINPRR*3.6E6)
   !
-  CALL IO_WRITE_FIELD(TPFILE,'INPRR3D',CLUOUT,IRESP,XINPRR3D)
-  CALL IO_WRITE_FIELD(TPFILE,'EVAP3D', CLUOUT,IRESP,XEVAP3D)
+  CALL IO_WRITE_FIELD(TPFILE,'INPRR3D',CLUOUT,XINPRR3D)
+  CALL IO_WRITE_FIELD(TPFILE,'EVAP3D', CLUOUT,XEVAP3D)
   !
   CALL FIND_FIELD_ID_FROM_MNHNAME('ACPRR',IID,IRESP)
   TZFIELD = TFIELDLIST(IID)
   TZFIELD%CUNITS = 'mm'
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XACPRR*1.0E3)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XACPRR*1.0E3)
   !
   IF (CCLOUD(1:3) == 'ICE' .OR. CCLOUD == 'C2R2' .OR. CCLOUD == 'C3R5' .OR.&
       CCLOUD == 'KHKO' .OR. CCLOUD == 'LIMA') THEN 
@@ -589,56 +589,56 @@ IF (LVAR_PR .AND. LUSERR .AND. SIZE(XINPRR)>0 ) THEN
       CALL FIND_FIELD_ID_FROM_MNHNAME('INPRC',IID,IRESP)
       TZFIELD = TFIELDLIST(IID)
       TZFIELD%CUNITS = 'mm hour-1'
-      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XINPRC*3.6E6)
+      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XINPRC*3.6E6)
       !
       CALL FIND_FIELD_ID_FROM_MNHNAME('ACPRC',IID,IRESP)
       TZFIELD = TFIELDLIST(IID)
       TZFIELD%CUNITS = 'mm'
-      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XACPRC*1.0E3)
+      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XACPRC*1.0E3)
     END IF 
     IF (SIZE(XINDEP) /= 0 ) THEN
       CALL FIND_FIELD_ID_FROM_MNHNAME('INDEP',IID,IRESP)
       TZFIELD = TFIELDLIST(IID)
       TZFIELD%CUNITS = 'mm hour-1'
-      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XINDEP*3.6E6)
+      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XINDEP*3.6E6)
       !
       CALL FIND_FIELD_ID_FROM_MNHNAME('ACDEP',IID,IRESP)
       TZFIELD = TFIELDLIST(IID)
       TZFIELD%CUNITS = 'mm'
-      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XACDEP*1.0E3)
+      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XACDEP*1.0E3)
     END IF 
   END IF 
   IF (CCLOUD(1:3) == 'ICE' .OR. CCLOUD == 'C3R5' .OR. CCLOUD == 'LIMA') THEN
     CALL FIND_FIELD_ID_FROM_MNHNAME('INPRS',IID,IRESP)
     TZFIELD = TFIELDLIST(IID)
     TZFIELD%CUNITS = 'mm hour-1'
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XINPRS*3.6E6)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XINPRS*3.6E6)
     !
     CALL FIND_FIELD_ID_FROM_MNHNAME('ACPRS',IID,IRESP)
     TZFIELD = TFIELDLIST(IID)
     TZFIELD%CUNITS = 'mm'
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XACPRS*1.0E3)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XACPRS*1.0E3)
     !
     CALL FIND_FIELD_ID_FROM_MNHNAME('INPRG',IID,IRESP)
     TZFIELD = TFIELDLIST(IID)
     TZFIELD%CUNITS = 'mm hour-1'
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XINPRG*3.6E6)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XINPRG*3.6E6)
     !
     CALL FIND_FIELD_ID_FROM_MNHNAME('ACPRG',IID,IRESP)
     TZFIELD = TFIELDLIST(IID)
     TZFIELD%CUNITS = 'mm'
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XACPRG*1.0E3)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XACPRG*1.0E3)
   !
     IF (SIZE(XINPRH) /= 0 ) THEN
       CALL FIND_FIELD_ID_FROM_MNHNAME('INPRH',IID,IRESP)
       TZFIELD = TFIELDLIST(IID)
       TZFIELD%CUNITS = 'mm hour-1'
-      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XINPRH*3.6E6)
+      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XINPRH*3.6E6)
       !
       CALL FIND_FIELD_ID_FROM_MNHNAME('ACPRH',IID,IRESP)
       TZFIELD = TFIELDLIST(IID)
       TZFIELD%CUNITS = 'mm'
-      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XACPRH*1.0E3)
+      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XACPRH*1.0E3)
     ENDIF
   !
     ZWORK21(:,:) = XINPRR(:,:) + XINPRS(:,:) + XINPRG(:,:)
@@ -649,7 +649,7 @@ IF (LVAR_PR .AND. LUSERR .AND. SIZE(XINPRR)>0 ) THEN
     CALL FIND_FIELD_ID_FROM_MNHNAME('INPRT',IID,IRESP)
     TZFIELD = TFIELDLIST(IID)
     TZFIELD%CUNITS = 'mm hour-1'
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK21*3.6E6)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK21*3.6E6)
   !
     ZWORK21(:,:) = (XACPRR(:,:) + XACPRS(:,:) + XACPRG(:,:))*1.0E3
     IF (SIZE(XINPRC) /= 0 ) &      
@@ -660,7 +660,7 @@ IF (LVAR_PR .AND. LUSERR .AND. SIZE(XINPRR)>0 ) THEN
     CALL FIND_FIELD_ID_FROM_MNHNAME('ACPRT',IID,IRESP)
     TZFIELD = TFIELDLIST(IID)
     TZFIELD%CUNITS = 'mm'
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK21*1.0E3)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK21*1.0E3)
   !
   END IF
   !
@@ -670,17 +670,17 @@ IF (LVAR_PR .AND. LUSERR .AND. SIZE(XINPRR)>0 ) THEN
     CALL FIND_FIELD_ID_FROM_MNHNAME('PRCONV',IID,IRESP)
     TZFIELD = TFIELDLIST(IID)
     TZFIELD%CUNITS = 'mm hour-1'
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XPRCONV*3.6E6)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XPRCONV*3.6E6)
     !
     CALL FIND_FIELD_ID_FROM_MNHNAME('PACCONV',IID,IRESP)
     TZFIELD = TFIELDLIST(IID)
     TZFIELD%CUNITS = 'mm'
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XPACCONV*1.0E3)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XPACCONV*1.0E3)
     !
     CALL FIND_FIELD_ID_FROM_MNHNAME('PRSCONV',IID,IRESP)
     TZFIELD = TFIELDLIST(IID)
     TZFIELD%CUNITS = 'mm hour-1'
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XPRSCONV*3.6E6)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XPRSCONV*3.6E6)
   END IF
 END IF
 IF (LVAR_PR ) THEN
@@ -717,7 +717,7 @@ IF (LVAR_PR ) THEN
   TZFIELD%NGRID      = 1
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 2
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK22)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK22)
 ENDIF
 !
 !
@@ -795,7 +795,7 @@ IF (LHU_FLX) THEN
   TZFIELD%NGRID      = 2
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 3
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK31)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK31)
   !  
   TZFIELD%CMNHNAME   = 'VM90'
   TZFIELD%CSTDNAME   = ''
@@ -806,7 +806,7 @@ IF (LHU_FLX) THEN
   TZFIELD%NGRID      = 3
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 3
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK32)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK32)
   !  composantes U et V du flux d'humidité intégré sur 3000 metres
   TZFIELD%CMNHNAME   = 'UM91'
   TZFIELD%CSTDNAME   = ''
@@ -817,7 +817,7 @@ IF (LHU_FLX) THEN
   TZFIELD%NGRID      = 2
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 2
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK21)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK21)
   !
   TZFIELD%CMNHNAME   = 'VM91'
   TZFIELD%CSTDNAME   = ''
@@ -828,7 +828,7 @@ IF (LHU_FLX) THEN
   TZFIELD%NGRID      = 3
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 2
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK22)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK22)
   !
   !   Convergence d'humidité
   TZFIELD%CMNHNAME   = 'HMCONV'
@@ -840,7 +840,7 @@ IF (LHU_FLX) THEN
   TZFIELD%NGRID      = 1
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 3
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,-ZWORK35)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,-ZWORK35)
   !
   !   Convergence d'humidité intégré sur 3000 mètres
   TZFIELD%CMNHNAME   = 'HMCONV3000'
@@ -852,7 +852,7 @@ IF (LHU_FLX) THEN
   TZFIELD%NGRID      = 1
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 2
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,-ZWORK25)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,-ZWORK25)
   !
   IF  (CCLOUD(1:3) == 'ICE' .OR. CCLOUD == 'LIMA') THEN
     !  composantes U et V du flux surfacique d'hydrométéores  
@@ -865,7 +865,7 @@ IF (LHU_FLX) THEN
     TZFIELD%NGRID      = 2
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK33)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK33)
     ! 
     TZFIELD%CMNHNAME   = 'VM92'
     TZFIELD%CSTDNAME   = ''
@@ -876,7 +876,7 @@ IF (LHU_FLX) THEN
     TZFIELD%NGRID      = 3
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK34)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK34)
     !  composantes U et V du flux d'hydrométéores intégré sur 3000 metres
     TZFIELD%CMNHNAME   = 'UM93'
     TZFIELD%CSTDNAME   = ''
@@ -887,7 +887,7 @@ IF (LHU_FLX) THEN
     TZFIELD%NGRID      = 2
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 2
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK23)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK23)
     ! 
     TZFIELD%CMNHNAME   = 'VM93'
     TZFIELD%CSTDNAME   = ''
@@ -898,7 +898,7 @@ IF (LHU_FLX) THEN
     TZFIELD%NGRID      = 3
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 2
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK24)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK24)
     !   Convergence d'hydrométéores
     TZFIELD%CMNHNAME   = 'HMCONV_TT'
     TZFIELD%CSTDNAME   = ''
@@ -909,7 +909,7 @@ IF (LHU_FLX) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,-ZWORK36)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,-ZWORK36)
     !   Convergence d'hydrométéores intégré sur 3000 mètres
     TZFIELD%CMNHNAME   = 'HMCONV3000_TT'
     TZFIELD%CSTDNAME   = ''
@@ -920,7 +920,7 @@ IF (LHU_FLX) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 2
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,-ZWORK26)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,-ZWORK26)
   ENDIF
 ENDIF
 !
@@ -939,43 +939,43 @@ IF (LVAR_MRW .OR. LLIMA_DIAG) THEN
       TZFIELD%CLONGNAME  = 'MesoNH: MRV'
       TZFIELD%CUNITS     = 'g kg-1'
       TZFIELD%CCOMMENT   = 'X_Y_Z_MRV'
-      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XRT(:,:,:,IDX_RVT)*1.E3)
+      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XRT(:,:,:,IDX_RVT)*1.E3)
     END IF
     IF (LUSERC) THEN
       TZFIELD%CMNHNAME   = 'MRC'
       TZFIELD%CLONGNAME  = 'MesoNH: MRC'
       TZFIELD%CUNITS     = 'g kg-1'
       TZFIELD%CCOMMENT   = 'X_Y_Z_MRC'
-      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XRT(:,:,:,IDX_RCT)*1.E3)
+      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XRT(:,:,:,IDX_RCT)*1.E3)
 !
       TZFIELD%CMNHNAME   = 'VRC'
       TZFIELD%CLONGNAME  = 'MesoNH: VRC'
       TZFIELD%CUNITS     = '' !vol/vol
       TZFIELD%CCOMMENT   = 'X_Y_Z_VRC (vol/vol)'
-      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XRT(:,:,:,IDX_RCT)*XRHODREF(:,:,:)/1.E3)
+      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XRT(:,:,:,IDX_RCT)*XRHODREF(:,:,:)/1.E3)
     END IF
     IF (LUSERR) THEN
       TZFIELD%CMNHNAME   = 'MRR'
       TZFIELD%CLONGNAME  = 'MesoNH: MRR'
       TZFIELD%CUNITS     = 'g kg-1'
       TZFIELD%CCOMMENT   = 'X_Y_Z_MRR'
-      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XRT(:,:,:,IDX_RRT)*1.E3)
+      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XRT(:,:,:,IDX_RRT)*1.E3)
 !
       TZFIELD%CMNHNAME   = 'VRR'
       TZFIELD%CLONGNAME  = 'MesoNH: VRR'
       TZFIELD%CUNITS     = '' !vol/vol
       TZFIELD%CCOMMENT   = 'X_Y_Z_VRR (vol/vol)'
-      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XRT(:,:,:,IDX_RRT)*XRHODREF(:,:,:)/1.E3)
+      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XRT(:,:,:,IDX_RRT)*XRHODREF(:,:,:)/1.E3)
     END IF
     IF (LUSERI) THEN
       TZFIELD%CMNHNAME   = 'MRI'
       TZFIELD%CLONGNAME  = 'MesoNH: MRI'
       TZFIELD%CUNITS     = 'g kg-1'
       TZFIELD%CCOMMENT   = 'X_Y_Z_MRI'
-      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XRT(:,:,:,IDX_RIT)*1.E3)
+      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XRT(:,:,:,IDX_RIT)*1.E3)
 !
       IF (LUSECI) THEN
-        CALL IO_WRITE_FIELD(TPFILE,'CIT',CLUOUT,IRESP,XCIT(:,:,:))
+        CALL IO_WRITE_FIELD(TPFILE,'CIT',CLUOUT,XCIT(:,:,:))
       END IF
     END IF
     IF (LUSERS) THEN
@@ -983,21 +983,21 @@ IF (LVAR_MRW .OR. LLIMA_DIAG) THEN
       TZFIELD%CLONGNAME  = 'MesoNH: MRS'
       TZFIELD%CUNITS     = 'g kg-1'
       TZFIELD%CCOMMENT   = 'X_Y_Z_MRS'
-      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XRT(:,:,:,IDX_RST)*1.E3)
+      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XRT(:,:,:,IDX_RST)*1.E3)
     END IF
     IF (LUSERG) THEN
       TZFIELD%CMNHNAME   = 'MRG'
       TZFIELD%CLONGNAME  = 'MesoNH: MRG'
       TZFIELD%CUNITS     = 'g kg-1'
       TZFIELD%CCOMMENT   = 'X_Y_Z_MRG'
-      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XRT(:,:,:,IDX_RGT)*1.E3)
+      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XRT(:,:,:,IDX_RGT)*1.E3)
     END IF
     IF (LUSERH) THEN
       TZFIELD%CMNHNAME   = 'MRH'
       TZFIELD%CLONGNAME  = 'MesoNH: MRH'
       TZFIELD%CUNITS     = 'g kg-1'
       TZFIELD%CCOMMENT   = 'X_Y_Z_MRH'
-      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XRT(:,:,:,IDX_RHT)*1.E3)
+      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XRT(:,:,:,IDX_RHT)*1.E3)
     END IF
   END IF
 END IF
@@ -1018,7 +1018,7 @@ IF (LVAR_MRSV) THEN
     WRITE(TZFIELD%CMNHNAME,'(A4,I3.3)')'MRSV',JSV
     TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
     WRITE(TZFIELD%CCOMMENT,'(A6,A4,I3.3)')'X_Y_Z_','MRSV',JSV
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XSVT(:,:,:,JSV)*1.E3)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XSVT(:,:,:,JSV)*1.E3)
   END DO
 END IF
 ! microphysical C2R2 scheme scalar variables
@@ -1041,7 +1041,7 @@ IF(LVAR_MRW) THEN
         ZWORK31(:,:,:)=XSVT(:,:,:,JSV)*1.E-3
       END IF
       WRITE(TZFIELD%CCOMMENT,'(A6,A4,I3.3)')'X_Y_Z_','MRSV',JSV
-      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK31)
+      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK31)
     END DO
   END IF
   ! microphysical C3R5 scheme additional scalar variables
@@ -1057,7 +1057,7 @@ IF(LVAR_MRW) THEN
       TZFIELD%CMNHNAME   = TRIM(C1R3NAMES(JSV-NSV_C1R3BEG+1))//'T'
       TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
       WRITE(TZFIELD%CCOMMENT,'(A6,A3,I3.3)')'X_Y_Z_','SVT',JSV
-      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XSVT(:,:,:,JSV)*1.E-3)
+      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XSVT(:,:,:,JSV)*1.E-3)
     END DO
   END IF
 END IF
@@ -1129,7 +1129,7 @@ IF (LLIMA_DIAG) THEN
     !
     TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
     ZWORK31(:,:,:)=XSVT(:,:,:,JSV)*1.E-6*XRHODREF(:,:,:)
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK31)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK31)
   END DO
 !
   IF (LUSERC) THEN
@@ -1143,7 +1143,7 @@ IF (LLIMA_DIAG) THEN
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
     ZWORK31(:,:,:)=XRT(:,:,:,2)*1.E3*XRHODREF(:,:,:)
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK31)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK31)
   END IF
 !
   IF (LUSERI) THEN
@@ -1157,7 +1157,7 @@ IF (LLIMA_DIAG) THEN
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
     ZWORK31(:,:,:)=XRT(:,:,:,4)*1.E3*XRHODREF(:,:,:)
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK31)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK31)
   END IF
 !
 END IF
@@ -1174,7 +1174,7 @@ IF (LCHEMDIAG) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XSVT(:,:,:,JSV)*1.E9)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XSVT(:,:,:,JSV)*1.E9)
   END DO
 END IF
 IF (LCHAQDIAG) THEN    !aqueous concentration in M
@@ -1194,7 +1194,7 @@ IF (LCHAQDIAG) THEN    !aqueous concentration in M
     WHERE(((XRT(:,:,:,2)*XRHODREF(:,:,:))/1.e3) .GE. XRTMIN_AQ)
       ZWORK31(:,:,:)=(XSVT(:,:,:,JSV)*1000.)/(XMD*1.E+3*XRT(:,:,:,2))
     ENDWHERE
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK31)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK31)
   END DO
   !
   ZWORK31(:,:,:)=0.
@@ -1205,7 +1205,7 @@ IF (LCHAQDIAG) THEN    !aqueous concentration in M
     WHERE(((XRT(:,:,:,3)*XRHODREF(:,:,:))/1.e3) .GE. XRTMIN_AQ)
       ZWORK31(:,:,:)=(XSVT(:,:,:,JSV)*1000.)/(XMD*1.E+3*XRT(:,:,:,3))
     ENDWHERE
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK31)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK31)
   END DO
 !  ZWORK31(:,:,:)=0.
 !  DO JSV = NSV_CHICBEG,NSV_CHICEND   ! ice phase
@@ -1215,7 +1215,7 @@ IF (LCHAQDIAG) THEN    !aqueous concentration in M
 !    WHERE(((XRT(:,:,:,3)*XRHODREF(:,:,:))/1.e3) .GE. XRTMIN_AQ)
 !      ZWORK31(:,:,:)=(XSVT(:,:,:,JSV)*1000.)/(XMD*1.E+3*XRT(:,:,:,3))
 !    ENDWHERE
-!    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK31)
+!    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK31)
 !  END DO
 END IF
 
@@ -1244,7 +1244,7 @@ IF (LPASPOL) THEN
     WRITE(TZFIELD%CMNHNAME,'(A3,I3.3)')'PPT',JSV
     TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
     TZFIELD%CCOMMENT   = 'X_Y_Z_'//TRIM(TZFIELD%CMNHNAME)
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZTMP)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZTMP)
   END DO
   DEALLOCATE(ZTMP)
   DEALLOCATE(ZRHOT)
@@ -1262,7 +1262,7 @@ IF (LCONDSAMP) THEN
     WRITE(TZFIELD%CMNHNAME,'(A3,I3.3)')'CST',JSV
     TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
     TZFIELD%CCOMMENT   = 'X_Y_Z_'//TRIM(TZFIELD%CMNHNAME)
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XSVT(:,:,:,JSV))
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XSVT(:,:,:,JSV))
   END DO
 END IF
 
@@ -1281,7 +1281,7 @@ IF (LTRAJ) THEN
     TZFIELD%CMNHNAME   = TRIM(CLGNAMES(JSV-NSV_LGBEG+1))//'T'
     TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
     WRITE(TZFIELD%CCOMMENT,'(A6,A20,I3.3,A4)')'X_Y_Z_','Lagrangian variable ',JSV,' (M)'
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XSVT(:,:,:,JSV))
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XSVT(:,:,:,JSV))
   END DO
   ! X coordinate
   DO JK=1,IKU
@@ -1295,7 +1295,7 @@ IF (LTRAJ) THEN
   TZFIELD%CMNHNAME   = 'X'
   TZFIELD%CLONGNAME  = 'MesoNH: X'
   TZFIELD%CCOMMENT   = 'X_Y_Z_X coordinate'
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK31)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK31)
   ! Y coordinate
   DO JK=1,IKU
     DO JI=1,IIU
@@ -1308,7 +1308,7 @@ IF (LTRAJ) THEN
   TZFIELD%CMNHNAME   = 'Y'
   TZFIELD%CLONGNAME  = 'MesoNH: Y'
   TZFIELD%CCOMMENT   = 'X_Y_Z_Y coordinate'
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK31)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK31)
 END IF
 ! linox scalar variables
 IF (.NOT.(LUSECHEM .OR. LCHEMDIAG) .AND. LCH_CONV_LINOX) THEN
@@ -1322,7 +1322,7 @@ IF (.NOT.(LUSECHEM .OR. LCHEMDIAG) .AND. LCH_CONV_LINOX) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XSVT(:,:,:,JSV)*1.E9)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XSVT(:,:,:,JSV)*1.E9)
   END DO
 END IF
 IF (LELECDIAG .AND. CELEC .NE. "NONE") THEN
@@ -1343,7 +1343,7 @@ IF (LELECDIAG .AND. CELEC .NE. "NONE") THEN
       WRITE(TZFIELD%CCOMMENT,'(A6,A3,I3.3,A8)')'X_Y_Z_','SVT',JSV,' (nb ions/m3)'
     END IF
     ZWORK31(:,:,:)=XSVT(:,:,:,JSV) * XRHODREF(:,:,:)  ! C/kg --> C/m3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK31)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK31)
   END DO
 END IF
 ! Sea Salt variables
@@ -1366,7 +1366,7 @@ IF (LSALT) THEN
     TZFIELD%CMNHNAME   = TRIM(UPCASE(CSALTNAMES(JSV-NSV_SLTBEG+1)))//'T'
     TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
     WRITE(TZFIELD%CCOMMENT,'(A6,A4,I3.3)')'X_Y_Z_','SALT',JSV
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XSVT(:,:,:,JSV)*1.E9)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XSVT(:,:,:,JSV)*1.E9)
   END DO
   !
   CALL PPP2SALT(XSVT(:,:,:,NSV_SLTBEG:NSV_SLTEND),XRHODREF,&
@@ -1383,26 +1383,26 @@ IF (LSALT) THEN
     TZFIELD%CLONGNAME  = 'MesoNH: SLTRGA'
     TZFIELD%CUNITS     = 'um'
     WRITE(TZFIELD%CCOMMENT,'(A18,I1)')'RG (nb) SALT MODE ',JJ
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZRG_SLT(:,:,:,JJ))
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZRG_SLT(:,:,:,JJ))
     !
     TZFIELD%CMNHNAME   = 'SLTRGAM'
     TZFIELD%CLONGNAME  = 'MesoNH: SLTRGAM'
     TZFIELD%CUNITS     = 'um'
     WRITE(TZFIELD%CCOMMENT,'(A17,I1)')'RG (m) SALT MODE ',JJ
     ZWORK31(:,:,:)=ZRG_SLT(:,:,:,JJ) / (EXP(-3.*(LOG(ZSIG_SLT(:,:,:,JJ)))**2))
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK31)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK31)
     !
     WRITE(TZFIELD%CMNHNAME,'(A6,I1)')'SLTN0A',JJ
     TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
     TZFIELD%CUNITS     = 'm-3'
     WRITE(TZFIELD%CCOMMENT,'(A13,I1)')'N0 SALT MODE ',JJ
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZN0_SLT(:,:,:,JJ))
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZN0_SLT(:,:,:,JJ))
     !
     WRITE(TZFIELD%CMNHNAME,'(A7,I1)')'SLTSIGA',JJ
     TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
     TZFIELD%CUNITS     = '1'
     WRITE(TZFIELD%CCOMMENT,'(A16,I1)')'SIGMA SALT MODE ',JJ
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZSIG_SLT(:,:,:,JJ))
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZSIG_SLT(:,:,:,JJ))
     !SALT MASS CONCENTRATION
     WRITE(TZFIELD%CMNHNAME,'(A4,I1)')'SLTMSS',JJ
     TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
@@ -1411,7 +1411,7 @@ IF (LSALT) THEN
     ZWORK31(:,:,:)= ZN0_SLT(:,:,:,JJ)*4./3.*3.14*2500.*1e9 & !kg-->ug
        * (ZRG_SLT(:,:,:,JJ)**3)*1.d-18 &  !um-->m
        * exp(4.5*log(ZSIG_SLT(:,:,:,JJ))*log(ZSIG_SLT(:,:,:,JJ)))
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK31)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK31)
     !SALT BURDEN (g/m2)
     ZWORK21(:,:)=0.0
     DO JK=IKB,IKE
@@ -1430,7 +1430,7 @@ IF (LSALT) THEN
     TZFIELD%CUNITS     = 'g m-2'
     WRITE(TZFIELD%CCOMMENT,'(A6,I1)')'BURDEN',JJ
     TZFIELD%NDIMS      = 2
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK21)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK21)
     !
     TZFIELD%NDIMS      = 3
   ENDDO
@@ -1450,7 +1450,7 @@ IF (LSALT.AND.LDEPOS_SLT(IMI)) THEN
     TZFIELD%CMNHNAME   = TRIM(UPCASE(CDESLTNAMES(JSV)))//'T'
     TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
     WRITE(TZFIELD%CCOMMENT,'(A6,A4,I3.3)')'X_Y_Z_','SALTDEP',JSV
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZSSLTDEP(:,:,:,JSV)*1.E9)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZSSLTDEP(:,:,:,JSV)*1.E9)
   END DO
   !
   DO JJ=1,NMODE_SLT
@@ -1480,7 +1480,7 @@ IF (LSALT.AND.LDEPOS_SLT(IMI)) THEN
                     * XAVOGADRO       & !==>#/mole
                     / XMD             & !==>#/kg_{air}
                     * XRHODREF(:,:,:)   !==>#/m3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK31)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK31)
     ! CLOUD:   DUST MASS CONCENTRATION
     WRITE(TZFIELD%CMNHNAME,'(A9,I1)')'SLTDEPMSS',JJ
     TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
@@ -1489,7 +1489,7 @@ IF (LSALT.AND.LDEPOS_SLT(IMI)) THEN
     ZWORK31(:,:,:)= ZWORK31(:,:,:)*4./3.*3.14*2500.*1e9 & !kg-->ug
                     * (ZRG_SLT(:,:,:,JJ)**3)*1.d-18     &  !um-->m
                     * exp(4.5*log(ZSIG_SLT(:,:,:,JJ))*log(ZSIG_SLT(:,:,:,JJ)))
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK31)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK31)
     !   FOR RAIN DROPS
     WRITE(TZFIELD%CMNHNAME,'(A9,I1)')'SLTDEPN0A',JJ+NMODE_SLT
     TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
@@ -1516,7 +1516,7 @@ IF (LSALT.AND.LDEPOS_SLT(IMI)) THEN
                     * XAVOGADRO       & !==>#/mole
                     / XMD             & !==>#/kg_{air}
                     * XRHODREF(:,:,:)   !==>#/m3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK31)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK31)
     ! RAIN:   DUST MASS CONCENTRATION
     WRITE(TZFIELD%CMNHNAME,'(A9,I1)')'SLTDEPMSS',JJ+NMODE_SLT
     TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
@@ -1525,7 +1525,7 @@ IF (LSALT.AND.LDEPOS_SLT(IMI)) THEN
     ZWORK31(:,:,:)= ZWORK31(:,:,:)*4./3.*3.14*2500.*1e9 & !kg-->ug
                     * (ZRG_SLT(:,:,:,JJ)**3)*1.d-18     &  !um-->m
                     * exp(4.5*log(ZSIG_SLT(:,:,:,JJ))*log(ZSIG_SLT(:,:,:,JJ)))
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK31)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK31)
   END DO
 !
 END IF
@@ -1549,7 +1549,7 @@ IF (LDUST) THEN
     TZFIELD%CMNHNAME   = TRIM(UPCASE(CDUSTNAMES(JSV-NSV_DSTBEG+1)))//'T'
     TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
     WRITE(TZFIELD%CCOMMENT,'(A6,A4,I3.3)')'X_Y_Z_','DUST',JSV
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XSVT(:,:,:,JSV)*1.E9)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XSVT(:,:,:,JSV)*1.E9)
   END DO
   !
   CALL PPP2DUST(XSVT(:,:,:,NSV_DSTBEG:NSV_DSTEND),XRHODREF,&
@@ -1559,26 +1559,26 @@ IF (LDUST) THEN
     TZFIELD%CLONGNAME  = 'MesoNH: DSTRGA'
     TZFIELD%CUNITS     = 'um'
     WRITE(TZFIELD%CCOMMENT,'(A18,I1)')'RG (nb) DUST MODE ',JJ
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZRG_DST(:,:,:,JJ))
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZRG_DST(:,:,:,JJ))
     !
     TZFIELD%CMNHNAME   = 'DSTRGAM'
     TZFIELD%CLONGNAME  = 'MesoNH: DSTRGAM'
     TZFIELD%CUNITS     = 'um'
     WRITE(TZFIELD%CCOMMENT,'(A17,I1)')'RG (m) DUST MODE ',JJ
     ZWORK31(:,:,:)=ZRG_DST(:,:,:,JJ) / (EXP(-3.*(LOG(ZSIG_DST(:,:,:,JJ)))**2))
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK31)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK31)
     !
     WRITE(TZFIELD%CMNHNAME,'(A6,I1)')'DSTN0A',JJ
     TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
     TZFIELD%CUNITS     = 'm-3'
     WRITE(TZFIELD%CCOMMENT,'(A13,I1)')'N0 DUST MODE ',JJ
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZN0_DST(:,:,:,JJ))
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZN0_DST(:,:,:,JJ))
     !
     WRITE(TZFIELD%CMNHNAME,'(A7,I1)')'DSTSIGA',JJ
     TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
     TZFIELD%CUNITS     = '1'
     WRITE(TZFIELD%CCOMMENT,'(A16,I1)')'SIGMA DUST MODE ',JJ
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZSIG_DST(:,:,:,JJ))
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZSIG_DST(:,:,:,JJ))
     !DUST MASS CONCENTRATION
     WRITE(TZFIELD%CMNHNAME,'(A4,I1)')'DSTMSS',JJ
     TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
@@ -1587,7 +1587,7 @@ IF (LDUST) THEN
     ZWORK31(:,:,:)= ZN0_DST(:,:,:,JJ)*4./3.*3.14*2500.*1e9 & !kg-->ug
        * (ZRG_DST(:,:,:,JJ)**3)*1.d-18 &  !um-->m
        * exp(4.5*log(ZSIG_DST(:,:,:,JJ))*log(ZSIG_DST(:,:,:,JJ)))
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK31)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK31)
     !DUST BURDEN (g/m2)
     ZWORK21(:,:)=0.0
     DO JK=IKB,IKE
@@ -1606,7 +1606,7 @@ IF (LDUST) THEN
     TZFIELD%CUNITS     = 'g m-2'
     WRITE(TZFIELD%CCOMMENT,'(A6,I1)')'BURDEN',JJ
     TZFIELD%NDIMS      = 2
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK21)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK21)
     !
     TZFIELD%NDIMS      = 3
   ENDDO
@@ -1626,7 +1626,7 @@ IF (LDUST.AND.LDEPOS_DST(IMI)) THEN
     TZFIELD%CMNHNAME   = TRIM(UPCASE(CDEDSTNAMES(JSV)))//'T'
     TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
     WRITE(TZFIELD%CCOMMENT,'(A6,A4,I3.3)')'X_Y_Z_','DUSTDEP',JSV
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZSDSTDEP(:,:,:,JSV)*1.E9)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZSDSTDEP(:,:,:,JSV)*1.E9)
   END DO
   !
   DO JJ=1,NMODE_DST
@@ -1656,7 +1656,7 @@ IF (LDUST.AND.LDEPOS_DST(IMI)) THEN
                     * XAVOGADRO                     & !==>#/mole
                     / XMD                           & !==>#/kg_{air}
                     * XRHODREF(:,:,:)                 !==>#/m3  
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK31)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK31)
     ! CLOUD:   DUST MASS CONCENTRATION
     WRITE(TZFIELD%CMNHNAME,'(A9,I1)')'DSTDEPMSS',JJ
     TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
@@ -1665,7 +1665,7 @@ IF (LDUST.AND.LDEPOS_DST(IMI)) THEN
     ZWORK31(:,:,:)= ZWORK31(:,:,:)*4./3.*3.14*2500.*1e9 & !kg-->ug
           * (ZRG_DST(:,:,:,JJ)**3)*1.d-18               &  !um-->m
           * exp(4.5*log(ZSIG_DST(:,:,:,JJ))*log(ZSIG_DST(:,:,:,JJ)))
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK31)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK31)
     !   FOR RAIN DROPS
     WRITE(TZFIELD%CMNHNAME,'(A9,I1)')'DSTDEPN0A',JJ+NMODE_DST
     TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
@@ -1692,7 +1692,7 @@ IF (LDUST.AND.LDEPOS_DST(IMI)) THEN
                     * XAVOGADRO       & !==>#/mole
                     / XMD             & !==>#/kg_{air}
                     * XRHODREF(:,:,:)   !==>#/m3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK31)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK31)
     ! RAIN:   DUST MASS CONCENTRATION
     WRITE(TZFIELD%CMNHNAME,'(A9,I1)')'DSTDEPMSS',JJ+NMODE_DST
     TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
@@ -1701,7 +1701,7 @@ IF (LDUST.AND.LDEPOS_DST(IMI)) THEN
     ZWORK31(:,:,:)= ZWORK31(:,:,:)*4./3.*3.14*2500.*1e9 & !kg-->ug
                     * (ZRG_DST(:,:,:,JJ)**3)*1.d-18     &  !um-->m
                     * exp(4.5*log(ZSIG_DST(:,:,:,JJ))*log(ZSIG_DST(:,:,:,JJ)))
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK31)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK31)
   END DO
 !
 END IF
@@ -1718,7 +1718,7 @@ IF ((LCHEMDIAG).AND.(LORILAM).AND.(LUSECHEM)) THEN
     TZFIELD%CMNHNAME   = TRIM(UPCASE(CAERONAMES(JSV-NSV_AERBEG+1)))//'T'
     TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
     WRITE(TZFIELD%CCOMMENT,'(A6,A4,I3.3)')'X_Y_Z_','AERO',JSV
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XSVT(:,:,:,JSV)*1.E9)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XSVT(:,:,:,JSV)*1.E9)
   END DO
   !
   IF (.NOT.(ASSOCIATED(XN3D)))   &
@@ -1735,132 +1735,132 @@ IF ((LCHEMDIAG).AND.(LORILAM).AND.(LUSECHEM)) THEN
     TZFIELD%CLONGNAME  = 'MesoNH: RGA'
     TZFIELD%CUNITS     = 'um'
     WRITE(TZFIELD%CCOMMENT,'(A21,I1)')'RG (nb) AEROSOL MODE ',JJ
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XRG3D(:,:,:,JJ))
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XRG3D(:,:,:,JJ))
     !
     TZFIELD%CMNHNAME   = 'RGAM'
     TZFIELD%CLONGNAME  = 'MesoNH: RGAM'
     TZFIELD%CUNITS     = 'um'
     WRITE(TZFIELD%CCOMMENT,'(A20,I1)')'RG (m) AEROSOL MODE ',JJ
     ZWORK31(:,:,:)=XRG3D(:,:,:,JJ) / (EXP(-3.*(LOG(XSIG3D(:,:,:,JJ)))**2))
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK31)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK31)
     !
     WRITE(TZFIELD%CMNHNAME,'(A3,I1)')'N0A',JJ
     TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
     TZFIELD%CUNITS     = 'cm-3'
     WRITE(TZFIELD%CCOMMENT,'(A16,I1)')'N0 AEROSOL MODE ',JJ
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XN3D(:,:,:,JJ)*1.E-6)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XN3D(:,:,:,JJ)*1.E-6)
     !
     WRITE(TZFIELD%CMNHNAME,'(A4,I1)')'SIGA',JJ
     TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
     TZFIELD%CUNITS     = '1'
     WRITE(TZFIELD%CCOMMENT,'(A19,I1)')'SIGMA AEROSOL MODE ',JJ
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XSIG3D(:,:,:,JJ))
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XSIG3D(:,:,:,JJ))
     !
     WRITE(TZFIELD%CMNHNAME,'(A4,I1)')'MSO4',JJ
     TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
     TZFIELD%CUNITS     = 'ug m-3'
     WRITE(TZFIELD%CCOMMENT,'(A22,I1)')'MASS SO4 AEROSOL MODE ',JJ
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZPTOTA(:,:,:,JP_AER_SO4,JJ))
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZPTOTA(:,:,:,JP_AER_SO4,JJ))
     !
     WRITE(TZFIELD%CMNHNAME,'(A4,I1)')'MNO3',JJ
     TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
     TZFIELD%CUNITS     = 'ug m-3'
     WRITE(TZFIELD%CCOMMENT,'(A22,I1)')'MASS NO3 AEROSOL MODE ',JJ
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZPTOTA(:,:,:,JP_AER_NO3,JJ))
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZPTOTA(:,:,:,JP_AER_NO3,JJ))
     !
     WRITE(TZFIELD%CMNHNAME,'(A4,I1)')'MNH3',JJ
     TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
     TZFIELD%CUNITS     = 'ug m-3'
     WRITE(TZFIELD%CCOMMENT,'(A22,I1)')'MASS NH3 AEROSOL MODE ',JJ
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZPTOTA(:,:,:,JP_AER_NH3,JJ))
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZPTOTA(:,:,:,JP_AER_NH3,JJ))
     !
     WRITE(TZFIELD%CMNHNAME,'(A4,I1)')'MH2O',JJ
     TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
     TZFIELD%CUNITS     = 'ug m-3'
     WRITE(TZFIELD%CCOMMENT,'(A22,I1)')'MASS H2O AEROSOL MODE ',JJ
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZPTOTA(:,:,:,JP_AER_H2O,JJ))
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZPTOTA(:,:,:,JP_AER_H2O,JJ))
     !
     IF (NSOA .EQ. 10) THEN
       WRITE(TZFIELD%CMNHNAME,'(A5,I1)')'MSOA1',JJ
       TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
       TZFIELD%CUNITS     = 'ug m-3'
       WRITE(TZFIELD%CCOMMENT,'(A23,I1)')'MASS SOA1 AEROSOL MODE ',JJ
-      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZPTOTA(:,:,:,JP_AER_SOA1,JJ))
+      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZPTOTA(:,:,:,JP_AER_SOA1,JJ))
       !
       WRITE(TZFIELD%CMNHNAME,'(A5,I1)')'MSOA2',JJ
       TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
       TZFIELD%CUNITS     = 'ug m-3'
       WRITE(TZFIELD%CCOMMENT,'(A23,I1)')'MASS SOA2 AEROSOL MODE ',JJ
-      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZPTOTA(:,:,:,JP_AER_SOA2,JJ))
+      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZPTOTA(:,:,:,JP_AER_SOA2,JJ))
       !
       WRITE(TZFIELD%CMNHNAME,'(A5,I1)')'MSOA3',JJ
       TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
       TZFIELD%CUNITS     = 'ug m-3'
       WRITE(TZFIELD%CCOMMENT,'(A23,I1)')'MASS SOA3 AEROSOL MODE ',JJ
-      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZPTOTA(:,:,:,JP_AER_SOA3,JJ))
+      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZPTOTA(:,:,:,JP_AER_SOA3,JJ))
       !
       WRITE(TZFIELD%CMNHNAME,'(A5,I1)')'MSOA4',JJ
       TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
       TZFIELD%CUNITS     = 'ug m-3'
       WRITE(TZFIELD%CCOMMENT,'(A23,I1)')'MASS SOA4 AEROSOL MODE ',JJ
-      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZPTOTA(:,:,:,JP_AER_SOA4,JJ))
+      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZPTOTA(:,:,:,JP_AER_SOA4,JJ))
       !
       WRITE(TZFIELD%CMNHNAME,'(A5,I1)')'MSOA5',JJ
       TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
       TZFIELD%CUNITS     = 'ug m-3'
       WRITE(TZFIELD%CCOMMENT,'(A23,I1)')'MASS SOA5 AEROSOL MODE ',JJ
-      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZPTOTA(:,:,:,JP_AER_SOA5,JJ))
+      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZPTOTA(:,:,:,JP_AER_SOA5,JJ))
       !
       WRITE(TZFIELD%CMNHNAME,'(A5,I1)')'MSOA6',JJ
       TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
       TZFIELD%CUNITS     = 'ug m-3'
       WRITE(TZFIELD%CCOMMENT,'(A23,I1)')'MASS SOA6 AEROSOL MODE ',JJ
-      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZPTOTA(:,:,:,JP_AER_SOA6,JJ))
+      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZPTOTA(:,:,:,JP_AER_SOA6,JJ))
       !
       WRITE(TZFIELD%CMNHNAME,'(A5,I1)')'MSOA7',JJ
       TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
       TZFIELD%CUNITS     = 'ug m-3'
       WRITE(TZFIELD%CCOMMENT,'(A23,I1)')'MASS SOA7 AEROSOL MODE ',JJ
-      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZPTOTA(:,:,:,JP_AER_SOA7,JJ))
+      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZPTOTA(:,:,:,JP_AER_SOA7,JJ))
       !
       WRITE(TZFIELD%CMNHNAME,'(A5,I1)')'MSOA8',JJ
       TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
       TZFIELD%CUNITS     = 'ug m-3'
       WRITE(TZFIELD%CCOMMENT,'(A23,I1)')'MASS SOA8 AEROSOL MODE ',JJ
-      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZPTOTA(:,:,:,JP_AER_SOA8,JJ))
+      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZPTOTA(:,:,:,JP_AER_SOA8,JJ))
       !
       WRITE(TZFIELD%CMNHNAME,'(A5,I1)')'MSOA9',JJ
       TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
       TZFIELD%CUNITS     = 'ug m-3'
       WRITE(TZFIELD%CCOMMENT,'(A23,I1)')'MASS SOA9 AEROSOL MODE ',JJ
-      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZPTOTA(:,:,:,JP_AER_SOA9,JJ))
+      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZPTOTA(:,:,:,JP_AER_SOA9,JJ))
       !
       WRITE(TZFIELD%CMNHNAME,'(A6,I1)')'MSOA10',JJ
       TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
       TZFIELD%CUNITS     = 'ug m-3'
       WRITE(TZFIELD%CCOMMENT,'(A24,I1)')'MASS SOA10 AEROSOL MODE ',JJ
-      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZPTOTA(:,:,:,JP_AER_SOA10,JJ))
+      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZPTOTA(:,:,:,JP_AER_SOA10,JJ))
     END IF
     !
     WRITE(TZFIELD%CMNHNAME,'(A3,I1)')'MOC',JJ
     TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
     TZFIELD%CUNITS     = 'ug m-3'
     WRITE(TZFIELD%CCOMMENT,'(A21,I1)')'MASS OC AEROSOL MODE ',JJ
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZPTOTA(:,:,:,JP_AER_OC,JJ))
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZPTOTA(:,:,:,JP_AER_OC,JJ))
     !
     WRITE(TZFIELD%CMNHNAME,'(A3,I1)')'MBC',JJ
     TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
     TZFIELD%CUNITS     = 'ug m-3'
     WRITE(TZFIELD%CCOMMENT,'(A21,I1)')'MASS BC AEROSOL MODE ',JJ
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZPTOTA(:,:,:,JP_AER_BC,JJ))
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZPTOTA(:,:,:,JP_AER_BC,JJ))
   ENDDO
 END IF
 !
 !* Large Scale variables
 !
 IF (LVAR_LS) THEN
-  CALL IO_WRITE_FIELD(TPFILE,'LSUM', CLUOUT,IRESP,XLSUM)
-  CALL IO_WRITE_FIELD(TPFILE,'LSVM', CLUOUT,IRESP,XLSVM)
+  CALL IO_WRITE_FIELD(TPFILE,'LSUM', CLUOUT,XLSUM)
+  CALL IO_WRITE_FIELD(TPFILE,'LSVM', CLUOUT,XLSVM)
   !
   IF (LWIND_ZM) THEN
     TZFIELD2(1)%CMNHNAME   = 'LSUM_ZM'
@@ -1886,14 +1886,14 @@ IF (LVAR_LS) THEN
     CALL UV_TO_ZONAL_AND_MERID(XLSUM,XLSVM,23,TPFILE=TPFILE,TZFIELDS=TZFIELD2)
   ENDIF
   !
-  CALL IO_WRITE_FIELD(TPFILE,'LSWM', CLUOUT,IRESP,XLSWM)
-  CALL IO_WRITE_FIELD(TPFILE,'LSTHM',CLUOUT,IRESP,XLSTHM)
+  CALL IO_WRITE_FIELD(TPFILE,'LSWM', CLUOUT,XLSWM)
+  CALL IO_WRITE_FIELD(TPFILE,'LSTHM',CLUOUT,XLSTHM)
 !
   IF (LUSERV) THEN
     CALL FIND_FIELD_ID_FROM_MNHNAME('LSRVM',IID,IRESP)
     TZFIELD = TFIELDLIST(IID)
     TZFIELD%CUNITS = 'g kg-1'
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XLSRVM(:,:,:)*1.E3)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XLSRVM(:,:,:)*1.E3)
   END IF
 END IF
 !
@@ -1913,7 +1913,7 @@ IF (LVAR_FRC .AND. LFORCING) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 1
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XUFRC(:,JT))
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XUFRC(:,JT))
 !
     TZFIELD%CMNHNAME   = 'VFRC'//YFRC
     TZFIELD%CSTDNAME   = ''
@@ -1924,7 +1924,7 @@ IF (LVAR_FRC .AND. LFORCING) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 1
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XVFRC(:,JT))
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XVFRC(:,JT))
 !
     TZFIELD%CMNHNAME   = 'WFRC'//YFRC
     TZFIELD%CSTDNAME   = ''
@@ -1935,7 +1935,7 @@ IF (LVAR_FRC .AND. LFORCING) THEN
     TZFIELD%NGRID      = 4
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 1
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XWFRC(:,JT))
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XWFRC(:,JT))
 !
     TZFIELD%CMNHNAME   = 'THFRC'//YFRC
     TZFIELD%CSTDNAME   = ''
@@ -1946,7 +1946,7 @@ IF (LVAR_FRC .AND. LFORCING) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 1
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XTHFRC(:,JT))
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XTHFRC(:,JT))
 !
     TZFIELD%CMNHNAME   = 'RVFRC'//YFRC
     TZFIELD%CSTDNAME   = ''
@@ -1957,7 +1957,7 @@ IF (LVAR_FRC .AND. LFORCING) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 1
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XRVFRC(:,JT))
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XRVFRC(:,JT))
 !
     TZFIELD%CMNHNAME   = 'TENDTHFRC'//YFRC
     TZFIELD%CSTDNAME   = ''
@@ -1968,7 +1968,7 @@ IF (LVAR_FRC .AND. LFORCING) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 1
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XTENDTHFRC(:,JT))
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XTENDTHFRC(:,JT))
 !
     TZFIELD%CMNHNAME   = 'TENDRVFRC'//YFRC
     TZFIELD%CSTDNAME   = ''
@@ -1979,7 +1979,7 @@ IF (LVAR_FRC .AND. LFORCING) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 1
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XTENDRVFRC(:,JT))
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XTENDRVFRC(:,JT))
 !
     TZFIELD%CMNHNAME   = 'GXTHFRC'//YFRC
     TZFIELD%CSTDNAME   = ''
@@ -1990,7 +1990,7 @@ IF (LVAR_FRC .AND. LFORCING) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 1
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XGXTHFRC(:,JT))
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XGXTHFRC(:,JT))
 !
     TZFIELD%CMNHNAME   = 'GYTHFRC'//YFRC
     TZFIELD%CSTDNAME   = ''
@@ -2001,7 +2001,7 @@ IF (LVAR_FRC .AND. LFORCING) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 1
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XGYTHFRC(:,JT))
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XGYTHFRC(:,JT))
 !
     TZFIELD%CMNHNAME   = 'PGROUNDFRC'//YFRC
     TZFIELD%CSTDNAME   = ''
@@ -2012,7 +2012,7 @@ IF (LVAR_FRC .AND. LFORCING) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 0
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XPGROUNDFRC(JT))
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XPGROUNDFRC(JT))
 !
   END DO
 END IF
@@ -2034,16 +2034,16 @@ IF (LTPZH .OR. LCOREF) THEN
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 3
   ZWORK31(:,:,:)=ZTEMP(:,:,:) - XTT
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK31)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK31)
 !
 !* Pressure in hPa        
   CALL FIND_FIELD_ID_FROM_MNHNAME('PABST',IID,IRESP)
   TZFIELD = TFIELDLIST(IID)
   TZFIELD%CUNITS = 'hPa'
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XPABST(:,:,:)*1E-2)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XPABST(:,:,:)*1E-2)
 !
 !* Geopotential in meters
-  CALL IO_WRITE_FIELD(TPFILE,'ALT',CLUOUT,IRESP,XZZ)
+  CALL IO_WRITE_FIELD(TPFILE,'ALT',CLUOUT,XZZ)
 !
 !* Relative humidity in percent
   IF (LUSERV) THEN
@@ -2070,7 +2070,7 @@ IF (LTPZH .OR. LCOREF) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK32)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK32)
     !
     TZFIELD%CMNHNAME   = 'VPRES'
     TZFIELD%CSTDNAME   = 'water_vapor_partial_pressure_in_air'
@@ -2082,7 +2082,7 @@ IF (LTPZH .OR. LCOREF) THEN
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
     ZWORK33(:,:,:)=ZWORK33(:,:,:)*ZWORK32(:,:,:)*1E-4
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK33)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK33)
     !
     IF (LCOREF) THEN
       ZWORK33(:,:,:)=(77.6*( XPABST(:,:,:)*1E-2                &
@@ -2097,7 +2097,7 @@ IF (LTPZH .OR. LCOREF) THEN
       TZFIELD%NGRID      = 1
       TZFIELD%NTYPE      = TYPEREAL
       TZFIELD%NDIMS      = 3
-      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK33)
+      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK33)
       !
       ZWORK33(:,:,:)=ZWORK33(:,:,:)+MZF(1,IKU,1,XZZ(:,:,:))*1E6/XRADIUS
       TZFIELD%CMNHNAME   = 'MCOREF'
@@ -2109,7 +2109,7 @@ IF (LTPZH .OR. LCOREF) THEN
       TZFIELD%NGRID      = 1
       TZFIELD%NTYPE      = TYPEREAL
       TZFIELD%NDIMS      = 3
-      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK33)
+      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK33)
     END IF
   ELSE
     PRINT*, 'NO WATER VAPOR IN ',TPFILE%CNAME,' RELATIVE HUMIDITY IS NOT COMPUTED'
@@ -2149,7 +2149,7 @@ IF ( LMOIST_V .OR. LMSLP .OR. LBLTOP ) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZTHETAV)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZTHETAV)
   END IF
 !
 END IF
@@ -2181,7 +2181,7 @@ IF (LVISI) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZVISIKUN)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZVISIKUN)
 !
     IF ((CCLOUD == 'C2R2') .OR. (CCLOUD =='KHKO')) THEN
       ZVISIGUL(:,:,:) = 10000.
@@ -2200,7 +2200,7 @@ IF (LVISI) THEN
       TZFIELD%NGRID      = 1
       TZFIELD%NTYPE      = TYPEREAL
       TZFIELD%NDIMS      = 3
-      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZVISIGUL)
+      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZVISIGUL)
 ! Visibity Zhang                      
       TZFIELD%CMNHNAME   = 'VISIZHA'
       TZFIELD%CSTDNAME   = ''
@@ -2211,7 +2211,7 @@ IF (LVISI) THEN
       TZFIELD%NGRID      = 1
       TZFIELD%NTYPE      = TYPEREAL
       TZFIELD%NDIMS      = 3
-      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZVISIZHA)
+      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZVISIZHA)
 !
       DEALLOCATE(ZVISIGUL,ZVISIZHA)
     END IF
@@ -2245,7 +2245,7 @@ IF (( LMOIST_E .OR. LBV_FR ) .AND. (NRR>0)) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZTHETAE)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZTHETAE)
   END IF
 END IF
 !-------------------------------------------------------------------------------
@@ -2270,7 +2270,7 @@ IF (LMOIST_ES .AND. (NRR>0)) THEN
   TZFIELD%NGRID      = 1
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 3
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZTHETAES)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZTHETAES)
 ENDIF
 !
 !-------------------------------------------------------------------------------
@@ -2289,7 +2289,7 @@ IF (LVORT) THEN
   TZFIELD%NGRID      = 2
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 3
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK31)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK31)
 !    
 ! Vorticity y
   ZWORK32(:,:,:)=MZF(1,IKU,1,MXF(MYM(ZVOY(:,:,:))))
@@ -2302,7 +2302,7 @@ IF (LVORT) THEN
   TZFIELD%NGRID      = 3
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 3
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK32)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK32)
   !
   IF (LWIND_ZM) THEN
     TZFIELD2(1)%CMNHNAME   = 'UM1_ZM'
@@ -2339,7 +2339,7 @@ IF (LVORT) THEN
   TZFIELD%NGRID      = 4
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 3
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK31)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK31)
 !
 ! Absolute Vorticity 
   ZWORK31(:,:,:)=MYF(MXF(ZVOZ(:,:,:))) + ZCORIOZ(:,:,:)
@@ -2352,7 +2352,7 @@ IF (LVORT) THEN
   TZFIELD%NGRID      = 1
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 3
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK31)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK31)
 !
 END IF
 !    
@@ -2383,7 +2383,7 @@ IF ( LMEAN_POVO ) THEN
   TZFIELD%NGRID      = 4
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 2
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK21)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK21)
 END IF
 !
 ! Virtual Potential Vorticity in PV units
@@ -2404,7 +2404,7 @@ IF (LMOIST_V .AND. (NRR>0) ) THEN
   TZFIELD%NGRID      = 1
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 3
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK34)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK34)
 !
   IF (LMEAN_POVO) THEN
     IWORK1(:,:)=0
@@ -2425,7 +2425,7 @@ IF (LMOIST_V .AND. (NRR>0) ) THEN
     TZFIELD%NGRID      = 4
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 2
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK21)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK21)
   END IF
 END IF
 !
@@ -2448,7 +2448,7 @@ IF (LMOIST_E .AND. (NRR>0) ) THEN
   TZFIELD%NGRID      = 1
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 3
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK34)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK34)
 !
   IF (LMEAN_POVO) THEN
     IWORK1(:,:)=0
@@ -2469,7 +2469,7 @@ IF (LMOIST_E .AND. (NRR>0) ) THEN
     TZFIELD%NGRID      = 4
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 2
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK21)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK21)
     DEALLOCATE(IWORK1)
   END IF 
   !
@@ -2493,7 +2493,7 @@ IF (LMOIST_ES .AND. (NRR>0) ) THEN
   TZFIELD%NGRID      = 1
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 3
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK34)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK34)
 ENDIF
 !
 !
@@ -2513,7 +2513,7 @@ IF (LDIV) THEN
   TZFIELD%NGRID      = 1
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 3
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK31)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK31)
 !
   IF (LUSERV) THEN
     TZFIELD%CMNHNAME   = 'HMDIV'
@@ -2528,7 +2528,7 @@ IF (LDIV) THEN
     ZWORK31=MXM(XRHODREF*XRT(:,:,:,1))*XUT
     ZWORK32=MYM(XRHODREF*XRT(:,:,:,1))*XVT
     ZWORK33=GX_U_M(1,IKU,1,ZWORK31,XDXX,XDZZ,XDZX) + GY_V_M(1,IKU,1,ZWORK32,XDYY,XDZZ,XDZY)
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK33)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK33)
   END IF
 !
 ENDIF
@@ -2582,7 +2582,7 @@ IF (LGEO .OR. LAGEO) THEN
     TZFIELD%NGRID      = 2
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK31)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK31)
 ! 
     TZFIELD%CMNHNAME   = 'VM88'
     TZFIELD%CSTDNAME   = ''
@@ -2593,7 +2593,7 @@ IF (LGEO .OR. LAGEO) THEN
     TZFIELD%NGRID      = 3
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK32)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK32)
     !
     IF (LWIND_ZM) THEN
       TZFIELD2(1)%CMNHNAME   = 'UM88_ZM'
@@ -2624,7 +2624,7 @@ IF (LGEO .OR. LAGEO) THEN
     TZFIELD = TFIELDLIST(IID)
     TZFIELD%CMNHNAME  = 'WM88'
     TZFIELD%CLONGNAME = 'MesoNH: WM88'
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XWT)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XWT)
   END IF
 !
   IF (LAGEO) THEN
@@ -2640,7 +2640,7 @@ IF (LGEO .OR. LAGEO) THEN
     TZFIELD%NGRID      = 2
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK31)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK31)
     !
     TZFIELD%CMNHNAME   = 'VM89'
     TZFIELD%CSTDNAME   = ''
@@ -2651,7 +2651,7 @@ IF (LGEO .OR. LAGEO) THEN
     TZFIELD%NGRID      = 3
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK32)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK32)
     !
     IF (LWIND_ZM) THEN
       TZFIELD2(1)%CMNHNAME   = 'UM89_ZM'
@@ -2682,7 +2682,7 @@ IF (LGEO .OR. LAGEO) THEN
     TZFIELD = TFIELDLIST(IID)
     TZFIELD%CMNHNAME  = 'WM89'
     TZFIELD%CLONGNAME = 'MesoNH: WM89'
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XWT)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XWT)
   END IF
 !
 END IF
@@ -2717,7 +2717,7 @@ IF (LMSLP) THEN
   TZFIELD%NGRID      = 1
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 2
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK22)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK22)
 END IF
 !-------------------------------------------------------------------------------
 !
@@ -2741,7 +2741,7 @@ IF (LTHW) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 2
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK21)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK21)
   END IF
   !
   ZWORK21(:,:) = 0.
@@ -2760,7 +2760,7 @@ IF (LTHW) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 2
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK21)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK21)
   END IF
   !
   ZWORK21(:,:) = 0.
@@ -2779,7 +2779,7 @@ IF (LTHW) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 2
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK21)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK21)
   END IF
   !
   ZWORK21(:,:)   = 0.
@@ -2798,7 +2798,7 @@ IF (LTHW) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 2
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK21)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK21)
   END IF
   !
   ZWORK21(:,:)   = 0.
@@ -2817,7 +2817,7 @@ IF (LTHW) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 2
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK21)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK21)
   END IF
   !
   ZWORK21(:,:)   = 0.
@@ -2836,7 +2836,7 @@ IF (LTHW) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 2
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK21)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK21)
   END IF
   !
   ZWORK21(:,:)   = 0.
@@ -2894,7 +2894,7 @@ IF (LTOTAL_PR .AND. SIZE (XACPRR)>0 ) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 2
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK21)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK21)
   ELSE
     PRINT * ,'YOU WANT TO COMPUTE THE ACCUMULATED RAIN'
     PRINT * ,'BUT NO RAIN IS PRESENT IN THE MODEL' 
@@ -2919,7 +2919,7 @@ IF (LTOTAL_PR .AND. SIZE (XACPRR)>0 ) THEN
         JJ=INT(XMEAN_PR(JK+1))
         WRITE(TZFIELD%CMNHNAME,'(A9,2I2.2)')'LS_ACTOPR',JI,JJ
         TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
-        CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK22)
+        CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK22)
       END IF
     END DO
     !
@@ -2957,7 +2957,7 @@ IF (LTOTAL_PR .AND. SIZE (XACPRR)>0 ) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 2
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK21)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK21)
   ELSE
     PRINT * ,'YOU WANT TO COMPUTE THE RAIN RATE'
     PRINT * ,'BUT NO RAIN IS PRESENT IN THE MODEL' 
@@ -2976,7 +2976,7 @@ IF (LTOTAL_PR .AND. SIZE (XACPRR)>0 ) THEN
     TZFIELD%CCOMMENT   = 'X_Y_Large Scale INstantaneous TOtal Precipitation Rate'
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 2
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK22)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK22)
   END IF
 !
 END IF
@@ -3004,7 +3004,7 @@ IF (NCAPE >=0 .AND. LUSERV) THEN
   TZFIELD%NGRID      = 1
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 2
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK21)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK21)
   !
   TZFIELD%CMNHNAME   = 'CINMAX'
   TZFIELD%CSTDNAME   = ''
@@ -3015,7 +3015,7 @@ IF (NCAPE >=0 .AND. LUSERV) THEN
   TZFIELD%NGRID      = 1
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 2
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK22)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK22)
   !
   IF (NCAPE >=1) THEN
     TZFIELD%CMNHNAME   = 'CAPE3D'
@@ -3027,7 +3027,7 @@ IF (NCAPE >=0 .AND. LUSERV) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK32)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK32)
     !
     TZFIELD%CMNHNAME   = 'CIN3D'
     TZFIELD%CSTDNAME   = 'atmosphere_convective_inhibition'
@@ -3038,7 +3038,7 @@ IF (NCAPE >=0 .AND. LUSERV) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK33)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK33)
     !
     TZFIELD%CMNHNAME   = 'DCAPE3D'
     TZFIELD%CSTDNAME   = ''
@@ -3049,7 +3049,7 @@ IF (NCAPE >=0 .AND. LUSERV) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK34)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK34)
   END IF
   !
   IF (NCAPE >=2) THEN
@@ -3066,7 +3066,7 @@ IF (NCAPE >=0 .AND. LUSERV) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK31)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK31)
   END IF
 ENDIF
 !
@@ -3097,7 +3097,7 @@ IF (LBV_FR) THEN
   TZFIELD%NGRID      = 4
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 3
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK31)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK31)
 !  
   IF (NRR > 0) THEN
     ZWORK32(:,:,:)=DZM(1,IKU,1,ZTHETAE(:,:,:))/ MZM(1,IKU,1,ZTHETAE(:,:,:))
@@ -3122,7 +3122,7 @@ IF (LBV_FR) THEN
     TZFIELD%NGRID      = 4
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK31)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK31)
   END IF
 END IF
 !
@@ -3149,7 +3149,7 @@ IF ( NGPS>=0 ) THEN
   TZFIELD%NGRID      = 1
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 2
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK22)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK22)
   !
   IF (NGPS>=1) THEN
     TZFIELD%CMNHNAME   = 'ZHD'
@@ -3161,7 +3161,7 @@ IF ( NGPS>=0 ) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 2
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK23)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK23)
     !
     TZFIELD%CMNHNAME   = 'ZWD'
     TZFIELD%CSTDNAME   = ''
@@ -3172,7 +3172,7 @@ IF ( NGPS>=0 ) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 2
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK24)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK24)
     !
   END IF
   !
@@ -3216,7 +3216,7 @@ IF(LRADAR .AND. LUSERR) THEN
   TZFIELD%NGRID      = 1
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 3
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK31)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK31)
 !
   TZFIELD%CMNHNAME   = 'VDOP'
   TZFIELD%CSTDNAME   = ''
@@ -3227,7 +3227,7 @@ IF(LRADAR .AND. LUSERR) THEN
   TZFIELD%NGRID      = 1
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 3
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK32)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK32)
 !
   TZFIELD%CMNHNAME   = 'ZDR'
   TZFIELD%CSTDNAME   = ''
@@ -3238,7 +3238,7 @@ IF(LRADAR .AND. LUSERR) THEN
   TZFIELD%NGRID      = 1
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 3
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK33)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK33)
 !
   TZFIELD%CMNHNAME   = 'KDP'
   TZFIELD%CSTDNAME   = ''
@@ -3249,7 +3249,7 @@ IF(LRADAR .AND. LUSERR) THEN
   TZFIELD%NGRID      = 1
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 3
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK34)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK34)
 !
    ELSE 
     !
@@ -3520,7 +3520,7 @@ IF (LLIDAR) THEN
   TZFIELD%NGRID      = 1
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 3
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK31)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK31)
 !
   TZFIELD%CMNHNAME   = 'LIPAR'
   TZFIELD%CSTDNAME   = ''
@@ -3531,7 +3531,7 @@ IF (LLIDAR) THEN
   TZFIELD%NGRID      = 1
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 3
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK32)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK32)
 !
 END IF
 !
@@ -3555,10 +3555,10 @@ IF (ALLOCATED(ZTHETAV)) DEALLOCATE(ZTHETAV)
 !* Ligthning
 !
 IF ( LCH_CONV_LINOX ) THEN 
-  CALL IO_WRITE_FIELD(TPFILE,'IC_RATE',    CLUOUT,IRESP,XIC_RATE)
-  CALL IO_WRITE_FIELD(TPFILE,'CG_RATE',    CLUOUT,IRESP,XCG_RATE)
-  CALL IO_WRITE_FIELD(TPFILE,'IC_TOTAL_NB',CLUOUT,IRESP,XIC_TOTAL_NUMBER)
-  CALL IO_WRITE_FIELD(TPFILE,'CG_TOTAL_NB',CLUOUT,IRESP,XCG_TOTAL_NUMBER)
+  CALL IO_WRITE_FIELD(TPFILE,'IC_RATE',    CLUOUT,XIC_RATE)
+  CALL IO_WRITE_FIELD(TPFILE,'CG_RATE',    CLUOUT,XCG_RATE)
+  CALL IO_WRITE_FIELD(TPFILE,'IC_TOTAL_NB',CLUOUT,XIC_TOTAL_NUMBER)
+  CALL IO_WRITE_FIELD(TPFILE,'CG_TOTAL_NB',CLUOUT,XCG_TOTAL_NUMBER)
 END IF
 !-------------------------------------------------------------------------------
 !-------------------------------------------------------------------------------
diff --git a/src/MNH/write_lfifm1_for_diag_supp.f90 b/src/MNH/write_lfifm1_for_diag_supp.f90
index c49ddf0aa..85f7e8747 100644
--- a/src/MNH/write_lfifm1_for_diag_supp.f90
+++ b/src/MNH/write_lfifm1_for_diag_supp.f90
@@ -165,8 +165,6 @@ TYPE(TFILEDATA),   INTENT(IN) :: TPFILE ! Output file
 !
 !*       0.2   Declarations of local variables
 !
-INTEGER           :: IRESP          ! IRESP  : return-code if a problem appears 
-                                    !  at the open of the file LFI routines 
 INTEGER           :: IIU,IJU,IKU,IIB,IJB,IKB,IIE,IJE,IKE ! Arrays bounds
 INTEGER           :: IKRAD  
 ! 
@@ -221,8 +219,8 @@ ZTEMP(:,:,:)=XTHT(:,:,:)*(XPABST(:,:,:)/ XP00) **(XRD/XCPD)
 !
 ! #ifdef MNH_NCWRIT
 ! IF (LNETCDF.AND..NOT.LCARTESIAN) THEN
-!   CALL IO_WRITE_FIELD(TPFILE,'LAT',CLUOUT,IRESP,XLAT)
-!   CALL IO_WRITE_FIELD(TPFILE,'LON',CLUOUT,IRESP,XLON)
+!   CALL IO_WRITE_FIELD(TPFILE,'LAT',CLUOUT,XLAT)
+!   CALL IO_WRITE_FIELD(TPFILE,'LON',CLUOUT,XLON)
 ! END IF
 ! #endif
 !
@@ -235,7 +233,7 @@ ZTEMP(:,:,:)=XTHT(:,:,:)*(XPABST(:,:,:)/ XP00) **(XRD/XCPD)
 !
 IF (NCONV_KF >= 0) THEN
 !
-  CALL IO_WRITE_FIELD(TPFILE,'CAPE',CLUOUT,IRESP,XCAPE)
+  CALL IO_WRITE_FIELD(TPFILE,'CAPE',CLUOUT,XCAPE)
 !
   ! top height (km) of convective clouds
   ZWORK21(:,:)= 0.
@@ -253,7 +251,7 @@ IF (NCONV_KF >= 0) THEN
   TZFIELD%NGRID      = 4
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 2
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK21)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK21)
 !
   ! base height (km) of convective clouds
   ZWORK21(:,:)= 0.
@@ -271,15 +269,15 @@ IF (NCONV_KF >= 0) THEN
   TZFIELD%NGRID      = 4
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 2
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK21)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK21)
 !
 END IF
 IF (NCONV_KF >= 1) THEN
 !
-  CALL IO_WRITE_FIELD(TPFILE,'DTHCONV',CLUOUT,IRESP,XDTHCONV)
-  CALL IO_WRITE_FIELD(TPFILE,'DRVCONV',CLUOUT,IRESP,XDRVCONV)
-  CALL IO_WRITE_FIELD(TPFILE,'DRCCONV',CLUOUT,IRESP,XDRCCONV)
-  CALL IO_WRITE_FIELD(TPFILE,'DRICONV',CLUOUT,IRESP,XDRICONV)
+  CALL IO_WRITE_FIELD(TPFILE,'DTHCONV',CLUOUT,XDTHCONV)
+  CALL IO_WRITE_FIELD(TPFILE,'DRVCONV',CLUOUT,XDRVCONV)
+  CALL IO_WRITE_FIELD(TPFILE,'DRCCONV',CLUOUT,XDRCCONV)
+  CALL IO_WRITE_FIELD(TPFILE,'DRICONV',CLUOUT,XDRICONV)
 !  
   IF ( LCHTRANS .AND. NSV > 0 ) THEN
     ! User scalar variables
@@ -295,7 +293,7 @@ IF (NCONV_KF >= 1) THEN
         WRITE(TZFIELD%CMNHNAME,'(A7,I3.3)')'DSVCONV',JSV
         TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
         WRITE(TZFIELD%CCOMMENT,'(A6,A2,I3.3,A20)')'X_Y_Z_','SV',JSV,' CONVective tendency'
-        CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XDSVCONV(:,:,:,JSV))
+        CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XDSVCONV(:,:,:,JSV))
       END DO
     END IF
     ! microphysical C2R2 scheme scalar variables
@@ -311,7 +309,7 @@ IF (NCONV_KF >= 1) THEN
         TZFIELD%CMNHNAME   = 'DSVCONV_'//TRIM(C2R2NAMES(JSV-NSV_C2R2BEG+1))
         TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
         TZFIELD%CCOMMENT   = 'X_Y_Z_'//TRIM(C2R2NAMES(JSV-NSV_C2R2BEG+1))//' CONVective tendency (1/s)'
-        CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XDSVCONV(:,:,:,JSV))
+        CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XDSVCONV(:,:,:,JSV))
       END DO
     END IF
     ! microphysical C3R5 scheme additional scalar variables
@@ -327,7 +325,7 @@ IF (NCONV_KF >= 1) THEN
         TZFIELD%CMNHNAME   = 'DSVCONV_'//TRIM(C1R3NAMES(JSV-NSV_C1R3BEG+1))
         TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
         TZFIELD%CCOMMENT   = 'X_Y_Z_'//TRIM(C1R3NAMES(JSV-NSV_C1R3BEG+1))//' CONVective tendency (1/s)'
-        CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XDSVCONV(:,:,:,JSV))
+        CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XDSVCONV(:,:,:,JSV))
       END DO
     END IF
     ! electrical scalar variables
@@ -343,7 +341,7 @@ IF (NCONV_KF >= 1) THEN
         TZFIELD%CMNHNAME   = 'DSVCONV_'//TRIM(CELECNAMES(JSV-NSV_ELECBEG+1))
         TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
         TZFIELD%CCOMMENT   = 'X_Y_Z_'//TRIM(CELECNAMES(JSV-NSV_ELECBEG+1))//' CONVective tendency (1/s)'
-        CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XDSVCONV(:,:,:,JSV))
+        CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XDSVCONV(:,:,:,JSV))
       END DO
     END IF
     ! chemical scalar variables
@@ -359,7 +357,7 @@ IF (NCONV_KF >= 1) THEN
         TZFIELD%CMNHNAME   = 'DSVCONV_'//TRIM(CNAMES(JSV-NSV_CHEMBEG+1))
         TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
         TZFIELD%CCOMMENT   = 'X_Y_Z_'//TRIM(CNAMES(JSV-NSV_CHEMBEG+1))//' CONVective tendency (1/s)'
-        CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XDSVCONV(:,:,:,JSV))
+        CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XDSVCONV(:,:,:,JSV))
       END DO
     END IF
     ! lagrangian variables
@@ -375,17 +373,17 @@ IF (NCONV_KF >= 1) THEN
         TZFIELD%CMNHNAME   = 'DSVCONV_'//TRIM(CLGNAMES(JSV-NSV_LGBEG+1))
         TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
         TZFIELD%CCOMMENT   = 'X_Y_Z_'//TRIM(CLGNAMES(JSV-NSV_LGBEG+1))//' CONVective tendency (1/s)'
-        CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XDSVCONV(:,:,:,JSV))
+        CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XDSVCONV(:,:,:,JSV))
       END DO
     END IF
   END IF
 !
 END IF
 IF (NCONV_KF >= 2) THEN
-  CALL IO_WRITE_FIELD(TPFILE,'PRLFLXCONV',CLUOUT,IRESP,XPRLFLXCONV)
-  CALL IO_WRITE_FIELD(TPFILE,'PRSFLXCONV',CLUOUT,IRESP,XPRSFLXCONV)
-  CALL IO_WRITE_FIELD(TPFILE,'UMFCONV',   CLUOUT,IRESP,XUMFCONV)
-  CALL IO_WRITE_FIELD(TPFILE,'DMFCONV',   CLUOUT,IRESP,XDMFCONV)
+  CALL IO_WRITE_FIELD(TPFILE,'PRLFLXCONV',CLUOUT,XPRLFLXCONV)
+  CALL IO_WRITE_FIELD(TPFILE,'PRSFLXCONV',CLUOUT,XPRSFLXCONV)
+  CALL IO_WRITE_FIELD(TPFILE,'UMFCONV',   CLUOUT,XUMFCONV)
+  CALL IO_WRITE_FIELD(TPFILE,'DMFCONV',   CLUOUT,XDMFCONV)
 END IF
 !-------------------------------------------------------------------------------
 !
@@ -445,7 +443,7 @@ IF (LCLD_COV .AND. LUSERC) THEN
   TZFIELD%NGRID      = 4
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 2
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK21)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK21)
 !
 !  Higher top of the different species of clouds
 !
@@ -481,7 +479,7 @@ IF (LCLD_COV .AND. LUSERC) THEN
     TZFIELD%NGRID      = 4
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 2
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK21)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK21)
   ENDIF
 !
   TZFIELD%CMNHNAME   = 'TCL'
@@ -493,9 +491,9 @@ IF (LCLD_COV .AND. LUSERC) THEN
   TZFIELD%NGRID      = 4
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 2
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK22)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK22)
 !
-  CALL IO_WRITE_FIELD(TPFILE,'CLDFR',CLUOUT,IRESP,XCLDFR)
+  CALL IO_WRITE_FIELD(TPFILE,'CLDFR',CLUOUT,XCLDFR)
 !
 !  Visibility                                    
 !
@@ -513,7 +511,7 @@ IF (LCLD_COV .AND. LUSERC) THEN
   TZFIELD%NGRID      = 1
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 2
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK31)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK31)
 !
   DEALLOCATE(IWORK1,IWORK2,ICL_HE_ST,GMASK2,ZWORK22)
 END IF
@@ -525,18 +523,18 @@ END IF
 !
 IF (NRAD_3D >= 0) THEN
   IF (CRAD /= 'NONE') THEN
-    CALL IO_WRITE_FIELD(TPFILE,'DTHRAD',      CLUOUT,IRESP,XDTHRAD)
-    CALL IO_WRITE_FIELD(TPFILE,'FLALWD',      CLUOUT,IRESP,XFLALWD)
-    CALL IO_WRITE_FIELD(TPFILE,'DIRFLASWD',   CLUOUT,IRESP,XDIRFLASWD)
-    CALL IO_WRITE_FIELD(TPFILE,'SCAFLASWD',   CLUOUT,IRESP,XSCAFLASWD)
-    CALL IO_WRITE_FIELD(TPFILE,'DIRSRFSWD',   CLUOUT,IRESP,XDIRSRFSWD)
-    CALL IO_WRITE_FIELD(TPFILE,'CLEARCOL_TM1',CLUOUT,IRESP,NCLEARCOL_TM1)
-    CALL IO_WRITE_FIELD(TPFILE,'ZENITH',      CLUOUT,IRESP,XZENITH)
-    CALL IO_WRITE_FIELD(TPFILE,'AZIM',        CLUOUT,IRESP,XAZIM)
-    CALL IO_WRITE_FIELD(TPFILE,'DIR_ALB',     CLUOUT,IRESP,XDIR_ALB)
-    CALL IO_WRITE_FIELD(TPFILE,'SCA_ALB',     CLUOUT,IRESP,XSCA_ALB)
-    CALL IO_WRITE_FIELD(TPFILE,'EMIS',        CLUOUT,IRESP,XEMIS)
-    CALL IO_WRITE_FIELD(TPFILE,'TSRAD',       CLUOUT,IRESP,XTSRAD)
+    CALL IO_WRITE_FIELD(TPFILE,'DTHRAD',      CLUOUT,XDTHRAD)
+    CALL IO_WRITE_FIELD(TPFILE,'FLALWD',      CLUOUT,XFLALWD)
+    CALL IO_WRITE_FIELD(TPFILE,'DIRFLASWD',   CLUOUT,XDIRFLASWD)
+    CALL IO_WRITE_FIELD(TPFILE,'SCAFLASWD',   CLUOUT,XSCAFLASWD)
+    CALL IO_WRITE_FIELD(TPFILE,'DIRSRFSWD',   CLUOUT,XDIRSRFSWD)
+    CALL IO_WRITE_FIELD(TPFILE,'CLEARCOL_TM1',CLUOUT,NCLEARCOL_TM1)
+    CALL IO_WRITE_FIELD(TPFILE,'ZENITH',      CLUOUT,XZENITH)
+    CALL IO_WRITE_FIELD(TPFILE,'AZIM',        CLUOUT,XAZIM)
+    CALL IO_WRITE_FIELD(TPFILE,'DIR_ALB',     CLUOUT,XDIR_ALB)
+    CALL IO_WRITE_FIELD(TPFILE,'SCA_ALB',     CLUOUT,XSCA_ALB)
+    CALL IO_WRITE_FIELD(TPFILE,'EMIS',        CLUOUT,XEMIS)
+    CALL IO_WRITE_FIELD(TPFILE,'TSRAD',       CLUOUT,XTSRAD)
   ELSE
     PRINT*,'YOU WANT DIAGNOSTICS RELATED TO RADIATION'
     PRINT*,' BUT NO RADIATIVE SCHEME WAS ACTIVATED IN THE MODEL'
@@ -559,7 +557,7 @@ IF (NRAD_3D >= 1) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK31)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK31)
 !Dust optical depth
     ZWORK21(:,:)=0.0
     DO JK=IKB,IKE
@@ -579,7 +577,7 @@ IF (NRAD_3D >= 1) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 2
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK21)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK21)
 !Dust extinction (optical depth per km)
     DO JK=IKB,IKE
       IKRAD = JK - JPVEXT
@@ -594,7 +592,7 @@ IF (NRAD_3D >= 1) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK31)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK31)
   END IF
   IF (LSALT) THEN
 !Salt optical depth between two vertical levels
@@ -612,7 +610,7 @@ IF (NRAD_3D >= 1) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK31)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK31)
 !Salt optical depth
     ZWORK21(:,:)=0.0
     DO JK=IKB,IKE
@@ -632,7 +630,7 @@ IF (NRAD_3D >= 1) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 2
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK21)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK21)
 !Salt extinction (optical depth per km)
     DO JK=IKB,IKE
       IKRAD = JK - JPVEXT
@@ -647,7 +645,7 @@ IF (NRAD_3D >= 1) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK31)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK31)
   END IF
   IF (LORILAM) THEN
 !Orilam anthropogenic optical depth between two vertical levels
@@ -665,7 +663,7 @@ IF (NRAD_3D >= 1) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK31)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK31)
 !Orilam anthropogenic optical depth
     ZWORK21(:,:)=0.0
     DO JK=IKB,IKE
@@ -685,7 +683,7 @@ IF (NRAD_3D >= 1) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 2
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK21)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK21)
 !Orilam anthropogenic extinction (optical depth per km)
     DO JK=IKB,IKE
       IKRAD = JK - JPVEXT
@@ -700,7 +698,7 @@ IF (NRAD_3D >= 1) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK31)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK31)
   END IF
 END IF
 !
@@ -761,7 +759,7 @@ IF (LEN_TRIM(CRAD_SAT) /= 0 .AND. NRR /=0) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 2
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZIRBT)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZIRBT)
     !
     TZFIELD%CMNHNAME   = TRIM(YNAM_SAT(JI))//'_WVBT'
     TZFIELD%CSTDNAME   = ''
@@ -772,7 +770,7 @@ IF (LEN_TRIM(CRAD_SAT) /= 0 .AND. NRR /=0) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 2
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWVBT)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWVBT)
   END DO
   DEALLOCATE(ZIRBT,ZWVBT)
 END IF
@@ -866,7 +864,7 @@ IF (CSURF=='EXTE') THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 2
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XCURRENT_ZON10M)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XCURRENT_ZON10M)
     !
     TZFIELD%CMNHNAME   = 'VM10'
     TZFIELD%CSTDNAME   = ''
@@ -877,7 +875,7 @@ IF (CSURF=='EXTE') THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 2
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XCURRENT_MER10M)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XCURRENT_MER10M)
   ENDIF
   !
   IF (SIZE(XTKET)>0) THEN
@@ -892,7 +890,7 @@ IF (CSURF=='EXTE') THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 2
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK21)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK21)
   END IF
   !
   IF(ANY(XCURRENT_SFCO2/=XUNDEF))THEN
@@ -905,7 +903,7 @@ IF (CSURF=='EXTE') THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 2
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XCURRENT_SFCO2)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XCURRENT_SFCO2)
   END IF
   !
   IF(ANY(XCURRENT_SW/=XUNDEF))THEN
@@ -918,7 +916,7 @@ IF (CSURF=='EXTE') THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 2
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XCURRENT_SW)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XCURRENT_SW)
   END IF
   !
   IF(ANY(XCURRENT_LW/=XUNDEF))THEN
@@ -931,7 +929,7 @@ IF (CSURF=='EXTE') THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 2
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XCURRENT_LW)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XCURRENT_LW)
   END IF
 END IF
 
@@ -989,7 +987,7 @@ ALLOCATE(ZWORK34(IIU,IJU,IKU))
     TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
     TZFIELD%CUNITS     = 'K'
     TZFIELD%CCOMMENT   = 'X_Y_potential temperature '//TRIM(YPRES(JK))//' hPa'
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWRES(:,:,JK))
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWRES(:,:,JK))
   END DO
 ! *********************
 ! Wind
@@ -1002,7 +1000,7 @@ ALLOCATE(ZWORK34(IIU,IJU,IKU))
     TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
     TZFIELD%CUNITS     = 'm s-1'
     TZFIELD%CCOMMENT   = 'X_Y_U component of wind '//TRIM(YPRES(JK))//' hPa'
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWRES(:,:,JK))
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWRES(:,:,JK))
   END DO
   !
   ZWORK31(:,:,:) = MYF(XVT(:,:,:))
@@ -1013,7 +1011,7 @@ ALLOCATE(ZWORK34(IIU,IJU,IKU))
     TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
     TZFIELD%CUNITS     = 'm s-1'
     TZFIELD%CCOMMENT   = 'X_Y_V component of wind '//TRIM(YPRES(JK))//' hPa'
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWRES(:,:,JK))
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWRES(:,:,JK))
   END DO
 ! *********************
 ! Water Vapour Mixing Ratio
@@ -1025,7 +1023,7 @@ ALLOCATE(ZWORK34(IIU,IJU,IKU))
     TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
     TZFIELD%CUNITS     = 'g kg-1'
     TZFIELD%CCOMMENT   = 'X_Y_Vapor Mixing Ratio '//TRIM(YPRES(JK))//' hPa'
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWRES(:,:,JK)*1.E3)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWRES(:,:,JK)*1.E3)
   END DO
 ! *********************
 ! Geopotential in meters
@@ -1038,7 +1036,7 @@ ALLOCATE(ZWORK34(IIU,IJU,IKU))
     TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
     TZFIELD%CUNITS     = 'm'
     TZFIELD%CCOMMENT   = 'X_Y_ALTitude '//TRIM(YPRES(JK))//' hPa'
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWRES(:,:,JK))
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWRES(:,:,JK))
   END DO
 !
   DEALLOCATE(ZWRES,ZPRES,ZWORK32,ZWORK33,ZWORK34)
@@ -1092,7 +1090,7 @@ ALLOCATE(ZWORK34(IIU,IJU,IKU))
     TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
     TZFIELD%CUNITS     = 'Pa'
     TZFIELD%CCOMMENT   = 'X_Y_pressure '//TRIM(YTH(JK))//' K'
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWTH(:,:,JK))
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWTH(:,:,JK))
   END DO
 ! *********************
 ! Potential Vorticity
@@ -1120,7 +1118,7 @@ ALLOCATE(ZWORK34(IIU,IJU,IKU))
     TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
     TZFIELD%CUNITS     = 'PVU'
     TZFIELD%CCOMMENT   = 'X_Y_POtential VOrticity '//TRIM(YTH(JK))//' K'
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWTH(:,:,JK))
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWTH(:,:,JK))
   END DO
 ! *********************
 ! Wind
@@ -1132,7 +1130,7 @@ ALLOCATE(ZWORK34(IIU,IJU,IKU))
     TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
     TZFIELD%CUNITS     = 'm s-1'
     TZFIELD%CCOMMENT   = 'X_Y_U component of wind '//TRIM(YTH(JK))//' K'
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWTH(:,:,JK))
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWTH(:,:,JK))
   END DO
   !
   ZWORK31(:,:,:) = MYF(XVT(:,:,:))
@@ -1142,7 +1140,7 @@ ALLOCATE(ZWORK34(IIU,IJU,IKU))
     TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
     TZFIELD%CUNITS     = 'm s-1'
     TZFIELD%CCOMMENT   = 'X_Y_V component of wind '//TRIM(YTH(JK))//' K'
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWTH(:,:,JK))
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWTH(:,:,JK))
   END DO
 !
   DEALLOCATE(ZWTH,ZTH,ZWORK32,ZWORK33,ZWORK34)
@@ -1166,7 +1164,7 @@ IF (NEQ_BUDGET>0) THEN
     TZFIELD%CMNHNAME   = TRIM(CNAMES_BUDGET(JSV))//'_BUDGET'
     TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
     TZFIELD%CCOMMENT   = 'X_Y_Z_'//TRIM(CNAMES_BUDGET(JSV))//'_BUDGET'
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XTCHEM(JSV)%XB_REAC(:,:,:,:))
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XTCHEM(JSV)%XB_REAC(:,:,:,:))
   END DO
   !
   TZFIELD%CUNITS     = ''
@@ -1177,7 +1175,7 @@ IF (NEQ_BUDGET>0) THEN
     TZFIELD%CMNHNAME   = TRIM(CNAMES_BUDGET(JSV))//'_CHREACLIST'
     TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
     TZFIELD%CCOMMENT   = TRIM(CNAMES_BUDGET(JSV))//'_REACTION_LIST'
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XTCHEM(JSV)%NB_REAC(:))
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XTCHEM(JSV)%NB_REAC(:))
   END DO
 END IF
 !
@@ -1195,12 +1193,12 @@ IF (NEQ_PLT>0) THEN
     TZFIELD%CMNHNAME   = TRIM(CNAMES_PRODLOSST(JSV))//'_PROD'
     TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
     TZFIELD%CCOMMENT   = 'X_Y_Z_'//TRIM(CNAMES_PRODLOSST(JSV))//'_PROD'
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XPROD(:,:,:,JSV))
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XPROD(:,:,:,JSV))
     !
     TZFIELD%CMNHNAME   = TRIM(CNAMES_PRODLOSST(JSV))//'_LOSS'
     TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
     TZFIELD%CCOMMENT   = 'X_Y_Z_'//TRIM(CNAMES_PRODLOSST(JSV))//'_LOSS'
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XLOSS(:,:,:,JSV))
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XLOSS(:,:,:,JSV))
   END DO
 END IF
 !
diff --git a/src/MNH/write_lfifmn_fordiachron.f90 b/src/MNH/write_lfifmn_fordiachron.f90
index 611c3c022..7a6d41bd6 100644
--- a/src/MNH/write_lfifmn_fordiachron.f90
+++ b/src/MNH/write_lfifmn_fordiachron.f90
@@ -136,26 +136,26 @@ LPACK=.FALSE.
 !
 !*       1.0    Version :
 !
-CALL IO_WRITE_FIELD(TPFILE,'L1D', CLUOUT,IRESP,L1D)
-CALL IO_WRITE_FIELD(TPFILE,'L2D', CLUOUT,IRESP,L2D)
-CALL IO_WRITE_FIELD(TPFILE,'PACK',CLUOUT,IRESP,LPACK)
-CALL IO_WRITE_FIELD(TPFILE,'SURF',CLUOUT,IRESP,CSURF)
+CALL IO_WRITE_FIELD(TPFILE,'L1D', CLUOUT,L1D)
+CALL IO_WRITE_FIELD(TPFILE,'L2D', CLUOUT,L2D)
+CALL IO_WRITE_FIELD(TPFILE,'PACK',CLUOUT,LPACK)
+CALL IO_WRITE_FIELD(TPFILE,'SURF',CLUOUT,CSURF)
 !
 !*       1.1    Dimensions :
 !
-CALL IO_WRITE_FIELD(TPFILE,'IMAX',CLUOUT,IRESP,NIMAX_ll)
-CALL IO_WRITE_FIELD(TPFILE,'JMAX',CLUOUT,IRESP,NJMAX_ll)
-CALL IO_WRITE_FIELD(TPFILE,'KMAX',CLUOUT,IRESP,NKMAX)
+CALL IO_WRITE_FIELD(TPFILE,'IMAX',CLUOUT,NIMAX_ll)
+CALL IO_WRITE_FIELD(TPFILE,'JMAX',CLUOUT,NJMAX_ll)
+CALL IO_WRITE_FIELD(TPFILE,'KMAX',CLUOUT,NKMAX)
 !
-CALL IO_WRITE_FIELD(TPFILE,'JPHEXT',CLUOUT,IRESP,JPHEXT)
+CALL IO_WRITE_FIELD(TPFILE,'JPHEXT',CLUOUT,JPHEXT)
 !
 !*       1.2    Grid variables :
 !
 IF (.NOT.LCARTESIAN) THEN
 !
-  CALL IO_WRITE_FIELD(TPFILE,'RPK',   CLUOUT,IRESP,XRPK)
-  CALL IO_WRITE_FIELD(TPFILE,'LONORI',CLUOUT,IRESP,XLONORI)
-  CALL IO_WRITE_FIELD(TPFILE,'LATORI',CLUOUT,IRESP,XLATORI)
+  CALL IO_WRITE_FIELD(TPFILE,'RPK',   CLUOUT,XRPK)
+  CALL IO_WRITE_FIELD(TPFILE,'LONORI',CLUOUT,XLONORI)
+  CALL IO_WRITE_FIELD(TPFILE,'LATORI',CLUOUT,XLATORI)
   !
   !* diagnostic of 1st mass point
   !
@@ -177,59 +177,59 @@ IF (.NOT.LCARTESIAN) THEN
   TZFIELD%NGRID      = 0
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 0
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZLONOR)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZLONOR)
 !
   TZFIELD%CMNHNAME   = 'LATOR'
   TZFIELD%CLONGNAME  = 'MesoNH: LATOR'
   TZFIELD%CCOMMENT   = 'Latitude of 1st mass point'
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZLATOR)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZLATOR)
 !
 ! #ifdef MNH_NCWRIT
 !   IF (LNETCDF) THEN
 !     LLFIFM = .FALSE.
-!     CALL IO_WRITE_FIELD(TPFILE,'LAT',CLUOUT,IRESP,XLAT)
-!     CALL IO_WRITE_FIELD(TPFILE,'LON',CLUOUT,IRESP,XLON)
+!     CALL IO_WRITE_FIELD(TPFILE,'LAT',CLUOUT,XLAT)
+!     CALL IO_WRITE_FIELD(TPFILE,'LON',CLUOUT,XLON)
 !     LLFIFM = .TRUE.
 !   END IF
 ! #endif
 END IF
 !
-CALL IO_WRITE_FIELD(TPFILE,'THINSHELL',CLUOUT,IRESP,LTHINSHELL)
-CALL IO_WRITE_FIELD(TPFILE,'LAT0',CLUOUT,IRESP,XLAT0)
-CALL IO_WRITE_FIELD(TPFILE,'LON0',CLUOUT,IRESP,XLON0)
-CALL IO_WRITE_FIELD(TPFILE,'BETA',CLUOUT,IRESP,XBETA)
+CALL IO_WRITE_FIELD(TPFILE,'THINSHELL',CLUOUT,LTHINSHELL)
+CALL IO_WRITE_FIELD(TPFILE,'LAT0',CLUOUT,XLAT0)
+CALL IO_WRITE_FIELD(TPFILE,'LON0',CLUOUT,XLON0)
+CALL IO_WRITE_FIELD(TPFILE,'BETA',CLUOUT,XBETA)
 !
-CALL IO_WRITE_FIELD(TPFILE,'XHAT',CLUOUT,IRESP,XXHAT)
-CALL IO_WRITE_FIELD(TPFILE,'YHAT',CLUOUT,IRESP,XYHAT)
-CALL IO_WRITE_FIELD(TPFILE,'ZHAT',CLUOUT,IRESP,XZHAT)
+CALL IO_WRITE_FIELD(TPFILE,'XHAT',CLUOUT,XXHAT)
+CALL IO_WRITE_FIELD(TPFILE,'YHAT',CLUOUT,XYHAT)
+CALL IO_WRITE_FIELD(TPFILE,'ZHAT',CLUOUT,XZHAT)
 !
-CALL IO_WRITE_FIELD(TPFILE,'ZS',   CLUOUT,IRESP,XZS)
-CALL IO_WRITE_FIELD(TPFILE,'ZSMT', CLUOUT,IRESP,XZSMT)
-CALL IO_WRITE_FIELD(TPFILE,'SLEVE',CLUOUT,IRESP,LSLEVE)
+CALL IO_WRITE_FIELD(TPFILE,'ZS',   CLUOUT,XZS)
+CALL IO_WRITE_FIELD(TPFILE,'ZSMT', CLUOUT,XZSMT)
+CALL IO_WRITE_FIELD(TPFILE,'SLEVE',CLUOUT,LSLEVE)
 !
 IF (LSLEVE) THEN
-  CALL IO_WRITE_FIELD(TPFILE,'LEN1',CLUOUT,IRESP,XLEN1)
-  CALL IO_WRITE_FIELD(TPFILE,'LEN2',CLUOUT,IRESP,XLEN2)
+  CALL IO_WRITE_FIELD(TPFILE,'LEN1',CLUOUT,XLEN1)
+  CALL IO_WRITE_FIELD(TPFILE,'LEN2',CLUOUT,XLEN2)
 END IF
 !
-CALL IO_WRITE_FIELD(TPFILE,'DTMOD',CLUOUT,IRESP,TDTMOD)
-CALL IO_WRITE_FIELD(TPFILE,'DTCUR',CLUOUT,IRESP,TDTCUR)
-CALL IO_WRITE_FIELD(TPFILE,'DTEXP',CLUOUT,IRESP,TDTEXP)
-CALL IO_WRITE_FIELD(TPFILE,'DTSEG',CLUOUT,IRESP,TDTSEG)
+CALL IO_WRITE_FIELD(TPFILE,'DTMOD',CLUOUT,TDTMOD)
+CALL IO_WRITE_FIELD(TPFILE,'DTCUR',CLUOUT,TDTCUR)
+CALL IO_WRITE_FIELD(TPFILE,'DTEXP',CLUOUT,TDTEXP)
+CALL IO_WRITE_FIELD(TPFILE,'DTSEG',CLUOUT,TDTSEG)
 !
 !*       1.3    Configuration  variables :
 !
-CALL IO_WRITE_FIELD(TPFILE,'CARTESIAN',CLUOUT,IRESP,LCARTESIAN)
-CALL IO_WRITE_FIELD(TPFILE,'LBOUSS',   CLUOUT,IRESP,LBOUSS)
+CALL IO_WRITE_FIELD(TPFILE,'CARTESIAN',CLUOUT,LCARTESIAN)
+CALL IO_WRITE_FIELD(TPFILE,'LBOUSS',   CLUOUT,LBOUSS)
 !
 !*       1.6    Reference state variables :
 !
-CALL IO_WRITE_FIELD(TPFILE,'RHOREFZ',CLUOUT,IRESP,XRHODREFZ)
-CALL IO_WRITE_FIELD(TPFILE,'THVREFZ',CLUOUT,IRESP,XTHVREFZ)
-CALL IO_WRITE_FIELD(TPFILE,'EXNTOP', CLUOUT,IRESP,XEXNTOP)
+CALL IO_WRITE_FIELD(TPFILE,'RHOREFZ',CLUOUT,XRHODREFZ)
+CALL IO_WRITE_FIELD(TPFILE,'THVREFZ',CLUOUT,XTHVREFZ)
+CALL IO_WRITE_FIELD(TPFILE,'EXNTOP', CLUOUT,XEXNTOP)
 !
-CALL IO_WRITE_FIELD(TPFILE,'RHODREF',CLUOUT,IRESP,XRHODREF)
-CALL IO_WRITE_FIELD(TPFILE,'THVREF', CLUOUT,IRESP,XTHVREF)
+CALL IO_WRITE_FIELD(TPFILE,'RHODREF',CLUOUT,XRHODREF)
+CALL IO_WRITE_FIELD(TPFILE,'THVREF', CLUOUT,XTHVREF)
 !
 LPACK=GPACK
 !
diff --git a/src/MNH/write_lfin.f90 b/src/MNH/write_lfin.f90
index b462e2647..6a8ed887a 100644
--- a/src/MNH/write_lfin.f90
+++ b/src/MNH/write_lfin.f90
@@ -337,29 +337,29 @@ IKE=IKU-JPVEXT
 !
 !*       1.0    File and HDADFILE writing :
 !
-CALL IO_WRITE_FIELD(TPFILE,'FILETYPE',CLUOUT,IRESP,TPFILE%CTYPE)
+CALL IO_WRITE_FIELD(TPFILE,'FILETYPE',CLUOUT,TPFILE%CTYPE)
 !
 IF (LEN_TRIM(HDADFILE)>0) THEN
-  CALL IO_WRITE_FIELD(TPFILE,'DXRATIO',CLUOUT,IRESP,NDXRATIO_ALL(IMI))
-  CALL IO_WRITE_FIELD(TPFILE,'DYRATIO',CLUOUT,IRESP,NDYRATIO_ALL(IMI))
-  CALL IO_WRITE_FIELD(TPFILE,'XOR',    CLUOUT,IRESP,NXOR_ALL(IMI))
-  CALL IO_WRITE_FIELD(TPFILE,'YOR',    CLUOUT,IRESP,NYOR_ALL(IMI))
+  CALL IO_WRITE_FIELD(TPFILE,'DXRATIO',CLUOUT,NDXRATIO_ALL(IMI))
+  CALL IO_WRITE_FIELD(TPFILE,'DYRATIO',CLUOUT,NDYRATIO_ALL(IMI))
+  CALL IO_WRITE_FIELD(TPFILE,'XOR',    CLUOUT,NXOR_ALL(IMI))
+  CALL IO_WRITE_FIELD(TPFILE,'YOR',    CLUOUT,NYOR_ALL(IMI))
 END IF
 !
 !*       1.1    Type and Dimensions :
 !
-CALL IO_WRITE_FIELD(TPFILE,'IMAX',CLUOUT,IRESP,NIMAX_ll)
-CALL IO_WRITE_FIELD(TPFILE,'JMAX',CLUOUT,IRESP,NJMAX_ll)
-CALL IO_WRITE_FIELD(TPFILE,'KMAX',CLUOUT,IRESP,NKMAX)
+CALL IO_WRITE_FIELD(TPFILE,'IMAX',CLUOUT,NIMAX_ll)
+CALL IO_WRITE_FIELD(TPFILE,'JMAX',CLUOUT,NJMAX_ll)
+CALL IO_WRITE_FIELD(TPFILE,'KMAX',CLUOUT,NKMAX)
 !
-CALL IO_WRITE_FIELD(TPFILE,'JPHEXT',CLUOUT,IRESP,JPHEXT)
+CALL IO_WRITE_FIELD(TPFILE,'JPHEXT',CLUOUT,JPHEXT)
 !
 !*       1.2    Grid variables :
 !
 IF (.NOT.LCARTESIAN) THEN
-  CALL IO_WRITE_FIELD(TPFILE,'RPK',   CLUOUT,IRESP,XRPK)
-  CALL IO_WRITE_FIELD(TPFILE,'LONORI',CLUOUT,IRESP,XLONORI)
-  CALL IO_WRITE_FIELD(TPFILE,'LATORI',CLUOUT,IRESP,XLATORI)
+  CALL IO_WRITE_FIELD(TPFILE,'RPK',   CLUOUT,XRPK)
+  CALL IO_WRITE_FIELD(TPFILE,'LONORI',CLUOUT,XLONORI)
+  CALL IO_WRITE_FIELD(TPFILE,'LATORI',CLUOUT,XLATORI)
 ! 
 !* diagnostic of 1st mass point
 !
@@ -381,61 +381,61 @@ IF (.NOT.LCARTESIAN) THEN
   TZFIELD%NGRID      = 0
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 0
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZLONOR)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZLONOR)
 !
   TZFIELD%CMNHNAME   = 'LATOR'
   TZFIELD%CLONGNAME  = 'MesoNH: LATOR'
   TZFIELD%CCOMMENT   = 'Latitude of 1st mass point'
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZLATOR)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZLATOR)
 END IF 
 !
-CALL IO_WRITE_FIELD(TPFILE,'THINSHELL',CLUOUT,IRESP,LTHINSHELL)
-CALL IO_WRITE_FIELD(TPFILE,'LAT0',CLUOUT,IRESP,XLAT0)
-CALL IO_WRITE_FIELD(TPFILE,'LON0',CLUOUT,IRESP,XLON0)
-CALL IO_WRITE_FIELD(TPFILE,'BETA',CLUOUT,IRESP,XBETA)
+CALL IO_WRITE_FIELD(TPFILE,'THINSHELL',CLUOUT,LTHINSHELL)
+CALL IO_WRITE_FIELD(TPFILE,'LAT0',CLUOUT,XLAT0)
+CALL IO_WRITE_FIELD(TPFILE,'LON0',CLUOUT,XLON0)
+CALL IO_WRITE_FIELD(TPFILE,'BETA',CLUOUT,XBETA)
 !
-CALL IO_WRITE_FIELD(TPFILE,'XHAT',CLUOUT,IRESP,XXHAT)
-CALL IO_WRITE_FIELD(TPFILE,'YHAT',CLUOUT,IRESP,XYHAT)
-CALL IO_WRITE_FIELD(TPFILE,'ZHAT',CLUOUT,IRESP,XZHAT)
+CALL IO_WRITE_FIELD(TPFILE,'XHAT',CLUOUT,XXHAT)
+CALL IO_WRITE_FIELD(TPFILE,'YHAT',CLUOUT,XYHAT)
+CALL IO_WRITE_FIELD(TPFILE,'ZHAT',CLUOUT,XZHAT)
 !
 ! #ifdef MNH_NCWRIT
 ! !
 ! !*SB*MAY2012
 ! !*SB* * WRITE ALT
-! IF (LNETCDF) CALL IO_WRITE_FIELD(TPFILE,'ALT',CLUOUT,IRESP,XZZ)
+! IF (LNETCDF) CALL IO_WRITE_FIELD(TPFILE,'ALT',CLUOUT,XZZ)
 ! #endif 
 !
 IF (.NOT.LCARTESIAN) THEN
-  CALL IO_WRITE_FIELD(TPFILE,'LAT',CLUOUT,IRESP,XLAT)
-  CALL IO_WRITE_FIELD(TPFILE,'LON',CLUOUT,IRESP,XLON)
+  CALL IO_WRITE_FIELD(TPFILE,'LAT',CLUOUT,XLAT)
+  CALL IO_WRITE_FIELD(TPFILE,'LON',CLUOUT,XLON)
 END IF
 !
-CALL IO_WRITE_FIELD(TPFILE,'ZS',   CLUOUT,IRESP,XZS)
-CALL IO_WRITE_FIELD(TPFILE,'ZSMT', CLUOUT,IRESP,XZSMT)
-CALL IO_WRITE_FIELD(TPFILE,'SLEVE',CLUOUT,IRESP,LSLEVE)
+CALL IO_WRITE_FIELD(TPFILE,'ZS',   CLUOUT,XZS)
+CALL IO_WRITE_FIELD(TPFILE,'ZSMT', CLUOUT,XZSMT)
+CALL IO_WRITE_FIELD(TPFILE,'SLEVE',CLUOUT,LSLEVE)
 !
 IF (LSLEVE) THEN
-  CALL IO_WRITE_FIELD(TPFILE,'LEN1',CLUOUT,IRESP,XLEN1)
-  CALL IO_WRITE_FIELD(TPFILE,'LEN2',CLUOUT,IRESP,XLEN2)
+  CALL IO_WRITE_FIELD(TPFILE,'LEN1',CLUOUT,XLEN1)
+  CALL IO_WRITE_FIELD(TPFILE,'LEN2',CLUOUT,XLEN2)
 END IF
 !
 !
-CALL IO_WRITE_FIELD(TPFILE,'DTMOD',CLUOUT,IRESP,TDTMOD)
-CALL IO_WRITE_FIELD(TPFILE,'DTCUR',CLUOUT,IRESP,TDTCUR)
-CALL IO_WRITE_FIELD(TPFILE,'DTEXP',CLUOUT,IRESP,TDTEXP)
-CALL IO_WRITE_FIELD(TPFILE,'DTSEG',CLUOUT,IRESP,TDTSEG)
+CALL IO_WRITE_FIELD(TPFILE,'DTMOD',CLUOUT,TDTMOD)
+CALL IO_WRITE_FIELD(TPFILE,'DTCUR',CLUOUT,TDTCUR)
+CALL IO_WRITE_FIELD(TPFILE,'DTEXP',CLUOUT,TDTEXP)
+CALL IO_WRITE_FIELD(TPFILE,'DTSEG',CLUOUT,TDTSEG)
 !
 !*       1.3    Configuration  variables :
 !
-CALL IO_WRITE_FIELD(TPFILE,'L1D',      CLUOUT,IRESP,L1D)
-CALL IO_WRITE_FIELD(TPFILE,'L2D',      CLUOUT,IRESP,L2D)
-CALL IO_WRITE_FIELD(TPFILE,'PACK',     CLUOUT,IRESP,LPACK)
-CALL IO_WRITE_FIELD(TPFILE,'CARTESIAN',CLUOUT,IRESP,LCARTESIAN)
-CALL IO_WRITE_FIELD(TPFILE,'LBOUSS',   CLUOUT,IRESP,LBOUSS)
+CALL IO_WRITE_FIELD(TPFILE,'L1D',      CLUOUT,L1D)
+CALL IO_WRITE_FIELD(TPFILE,'L2D',      CLUOUT,L2D)
+CALL IO_WRITE_FIELD(TPFILE,'PACK',     CLUOUT,LPACK)
+CALL IO_WRITE_FIELD(TPFILE,'CARTESIAN',CLUOUT,LCARTESIAN)
+CALL IO_WRITE_FIELD(TPFILE,'LBOUSS',   CLUOUT,LBOUSS)
 !
-CALL IO_WRITE_FIELD(TPFILE,'SURF',     CLUOUT,IRESP,CSURF)
-CALL IO_WRITE_FIELD(TPFILE,'CPL_AROME',CLUOUT,IRESP,LCPL_AROME)
-CALL IO_WRITE_FIELD(TPFILE,'COUPLING', CLUOUT,IRESP,LCOUPLING)
+CALL IO_WRITE_FIELD(TPFILE,'SURF',     CLUOUT,CSURF)
+CALL IO_WRITE_FIELD(TPFILE,'CPL_AROME',CLUOUT,LCPL_AROME)
+CALL IO_WRITE_FIELD(TPFILE,'COUPLING', CLUOUT,LCOUPLING)
 !
 !*       1.4    Prognostic variables :
 !
@@ -448,26 +448,26 @@ CALL IO_WRITE_FIELD(TPFILE,'COUPLING', CLUOUT,IRESP,LCOUPLING)
 !  CALL EXTRAPOL('N',XUT)
 !  CALL EXTRAPOL('S',XUT)
 CALL MPPDB_CHECK3D(XUT,"write_lfifmn before IO_WRITE_FIELD::XUT",PRECISION)
-CALL IO_WRITE_FIELD(TPFILE,'UT',CLUOUT,IRESP,XUT)
+CALL IO_WRITE_FIELD(TPFILE,'UT',CLUOUT,XUT)
 CALL MPPDB_CHECK3D(XUT,"write_lfifmn after IO_WRITE_FIELD::XUT",PRECISION)
 !
 !20131128 check XVT-> X_Y_W_V wind component for PRC
 CALL MPPDB_CHECK3D(XVT,"write_lfifmn::XVT",PRECISION)
 !
-CALL IO_WRITE_FIELD(TPFILE,'VT',CLUOUT,IRESP,XVT)
-CALL IO_WRITE_FIELD(TPFILE,'WT',CLUOUT,IRESP,XWT)
+CALL IO_WRITE_FIELD(TPFILE,'VT',CLUOUT,XVT)
+CALL IO_WRITE_FIELD(TPFILE,'WT',CLUOUT,XWT)
 !
-CALL IO_WRITE_FIELD(TPFILE,'THT',CLUOUT,IRESP,XTHT)
+CALL IO_WRITE_FIELD(TPFILE,'THT',CLUOUT,XTHT)
 !
 !*       1.4.2  Time t-dt:
 !
 IF ( (CUVW_ADV_SCHEME == 'CEN4TH') .AND. (CTEMP_SCHEME == 'LEFR') ) THEN
-  CALL IO_WRITE_FIELD(TPFILE,'UM', CLUOUT,IRESP,XUM)
-  CALL IO_WRITE_FIELD(TPFILE,'VM', CLUOUT,IRESP,XVM)
-  CALL IO_WRITE_FIELD(TPFILE,'WM', CLUOUT,IRESP,XWM)
-  CALL IO_WRITE_FIELD(TPFILE,'DUM',CLUOUT,IRESP,XDUM)
-  CALL IO_WRITE_FIELD(TPFILE,'DVM',CLUOUT,IRESP,XDVM)
-  CALL IO_WRITE_FIELD(TPFILE,'DWM',CLUOUT,IRESP,XDWM)
+  CALL IO_WRITE_FIELD(TPFILE,'UM', CLUOUT,XUM)
+  CALL IO_WRITE_FIELD(TPFILE,'VM', CLUOUT,XVM)
+  CALL IO_WRITE_FIELD(TPFILE,'WM', CLUOUT,XWM)
+  CALL IO_WRITE_FIELD(TPFILE,'DUM',CLUOUT,XDUM)
+  CALL IO_WRITE_FIELD(TPFILE,'DVM',CLUOUT,XDVM)
+  CALL IO_WRITE_FIELD(TPFILE,'DWM',CLUOUT,XDWM)
 END IF
 !
 IF (MEAN_COUNT /= 0) THEN
@@ -484,20 +484,20 @@ IF (MEAN_COUNT /= 0) THEN
   TZFIELD%CUNITS     = 'm s-1'
   TZFIELD%CCOMMENT   = 'X_Y_Z_U component of mean wind'
   ZWORK3D = XUM_MEAN/MEAN_COUNT
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK3D)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK3D)
 !
   TZFIELD%CMNHNAME   = 'U2ME'
   TZFIELD%CLONGNAME  = 'MesoNH: U2ME'
   TZFIELD%CUNITS     = 'm2 s-2'
   TZFIELD%CCOMMENT   = 'X_Y_Z_U component of mean wind variance'
   ZWORK3D = XU2_MEAN/MEAN_COUNT-XUM_MEAN**2/MEAN_COUNT**2
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK3D)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK3D)
   !
   TZFIELD%CMNHNAME   = 'UMMA'
   TZFIELD%CLONGNAME  = 'MesoNH: UMMA'
   TZFIELD%CUNITS     = 'm s-1'
   TZFIELD%CCOMMENT   = 'X_Y_Z_U component of max wind'
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XUM_MAX)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XUM_MAX)
 !
   TZFIELD%NGRID      = 3
 !
@@ -506,20 +506,20 @@ IF (MEAN_COUNT /= 0) THEN
   TZFIELD%CUNITS     = 'm s-1'
   TZFIELD%CCOMMENT   = 'X_Y_Z_V component of mean wind'
   ZWORK3D = XVM_MEAN/MEAN_COUNT
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK3D)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK3D)
 !
   TZFIELD%CMNHNAME   = 'V2ME'
   TZFIELD%CLONGNAME  = 'MesoNH: V2ME'
   TZFIELD%CUNITS     = 'm2 s-2'
   TZFIELD%CCOMMENT   = 'X_Y_Z_V component of mean wind variance'
   ZWORK3D = XV2_MEAN/MEAN_COUNT-XVM_MEAN**2/MEAN_COUNT**2
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK3D)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK3D)
   !
   TZFIELD%CMNHNAME   = 'VMMA'
   TZFIELD%CLONGNAME  = 'MesoNH: VMMA'
   TZFIELD%CUNITS     = 'm s-1'
   TZFIELD%CCOMMENT   = 'X_Y_Z_V component of max wind'
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XVM_MAX)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XVM_MAX)
 !
   TZFIELD%NGRID      = 4
 !
@@ -528,20 +528,20 @@ IF (MEAN_COUNT /= 0) THEN
   TZFIELD%CUNITS     = 'm s-1'
   TZFIELD%CCOMMENT   = 'X_Y_Z_vertical mean wind'
   ZWORK3D = XWM_MEAN/MEAN_COUNT
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK3D)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK3D)
 !
   TZFIELD%CMNHNAME   = 'W2ME'
   TZFIELD%CLONGNAME  = 'MesoNH: W2ME'
   TZFIELD%CUNITS     = 'm2 s-2'
   TZFIELD%CCOMMENT   = 'X_Y_Z_vertical mean wind variance'
   ZWORK3D = XW2_MEAN/MEAN_COUNT-XWM_MEAN**2/MEAN_COUNT**2
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK3D)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK3D)
   !
   TZFIELD%CMNHNAME   = 'WMMA'
   TZFIELD%CLONGNAME  = 'MesoNH: WMMA'
   TZFIELD%CUNITS     = 'm s-1'
   TZFIELD%CCOMMENT   = 'X_Y_Z_vertical max wind'
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XWM_MAX)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XWM_MAX)
 !
   TZFIELD%NGRID      = 1
 !
@@ -550,60 +550,60 @@ IF (MEAN_COUNT /= 0) THEN
   TZFIELD%CUNITS     = 'K'
   TZFIELD%CCOMMENT   = 'X_Y_Z_mean potential temperature'
   ZWORK3D = XTHM_MEAN/MEAN_COUNT
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK3D)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK3D)
 !
   TZFIELD%CMNHNAME   = 'TH2ME'
   TZFIELD%CLONGNAME  = 'MesoNH: TH2ME'
   TZFIELD%CUNITS     = 'K2'
   TZFIELD%CCOMMENT   = 'X_Y_Z_mean potential temperature variance'
   ZWORK3D = XTH2_MEAN/MEAN_COUNT-XTHM_MEAN**2/MEAN_COUNT**2
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK3D)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK3D)
   !
   TZFIELD%CMNHNAME   = 'THMMA'
   TZFIELD%CLONGNAME  = 'MesoNH: THMMA'
   TZFIELD%CUNITS     = 'K'
   TZFIELD%CCOMMENT   = 'X_Y_Z_max potential temperature'
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XTHM_MAX)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XTHM_MAX)
 !
   TZFIELD%CMNHNAME   = 'TEMPMME'
   TZFIELD%CLONGNAME  = 'MesoNH: TEMPMME'
   TZFIELD%CUNITS     = 'K'
   TZFIELD%CCOMMENT   = 'X_Y_Z_mean temperature'
   ZWORK3D = XTEMPM_MEAN/MEAN_COUNT
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK3D)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK3D)
 !
   TZFIELD%CMNHNAME   = 'TEMP2ME'
   TZFIELD%CLONGNAME  = 'MesoNH: TEMP2ME'
   TZFIELD%CUNITS     = 'K2'
   TZFIELD%CCOMMENT   = 'X_Y_Z_mean temperature variance'
   ZWORK3D = XTEMP2_MEAN/MEAN_COUNT-XTEMPM_MEAN**2/MEAN_COUNT**2
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK3D)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK3D)
   !
   TZFIELD%CMNHNAME   = 'TEMPMMA'
   TZFIELD%CLONGNAME  = 'MesoNH: TEMPMMA'
   TZFIELD%CUNITS     = 'K'
   TZFIELD%CCOMMENT   = 'X_Y_Z_max temperature'
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XTEMPM_MAX)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XTEMPM_MAX)
 !
   TZFIELD%CMNHNAME   = 'PABSMME'
   TZFIELD%CLONGNAME  = 'MesoNH: PABSMME'
   TZFIELD%CUNITS     = 'Pa'
   TZFIELD%CCOMMENT   = 'X_Y_Z_mean ABSolute Pressure'
   ZWORK3D = XPABSM_MEAN/MEAN_COUNT
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK3D)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK3D)
 !
   TZFIELD%CMNHNAME   = 'PABS2ME'
   TZFIELD%CLONGNAME  = 'MesoNH: PABS2ME'
   TZFIELD%CUNITS     = 'Pa2'
   TZFIELD%CCOMMENT   = 'X_Y_Z_mean ABSolute Pressure variance'
   ZWORK3D = XPABS2_MEAN/MEAN_COUNT-XPABSM_MEAN**2/MEAN_COUNT**2
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK3D)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK3D)
   !
   TZFIELD%CMNHNAME   = 'PABSMMA'
   TZFIELD%CLONGNAME  = 'MesoNH: PABSMMA'
   TZFIELD%CUNITS     = 'Pa'
   TZFIELD%CCOMMENT   = 'X_Y_Z_max ABSolute Pressure'
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XPABSM_MAX)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XPABSM_MAX)
 !
   IF (CTURB /= 'NONE') THEN
     TZFIELD%CMNHNAME   = 'TKEMME'
@@ -611,52 +611,52 @@ IF (MEAN_COUNT /= 0) THEN
     TZFIELD%CUNITS     = 'm2 s-2'
     TZFIELD%CCOMMENT   = 'X_Y_Z_mean kinetic energy'
     ZWORK3D= XTKEM_MEAN/MEAN_COUNT
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK3D)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK3D)
 !
     TZFIELD%CMNHNAME   = 'TKEMMA'
     TZFIELD%CLONGNAME  = 'MesoNH: TKEMMA'
     TZFIELD%CUNITS     = 'm2 s-2'
     TZFIELD%CCOMMENT   = 'X_Y_Z_max kinetic energy'
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XTKEM_MAX)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XTKEM_MAX)
   END IF
 !
 END IF
 !
 !
 IF (CTURB /= 'NONE') THEN
-  CALL IO_WRITE_FIELD(TPFILE,'TKET',CLUOUT,IRESP,XTKET)
-  IF (CPROGRAM == 'MESONH') CALL IO_WRITE_FIELD(TPFILE,'TKEMS',CLUOUT,IRESP,XRTKEMS)
+  CALL IO_WRITE_FIELD(TPFILE,'TKET',CLUOUT,XTKET)
+  IF (CPROGRAM == 'MESONH') CALL IO_WRITE_FIELD(TPFILE,'TKEMS',CLUOUT,XRTKEMS)
 END IF
 !
 !
-CALL IO_WRITE_FIELD(TPFILE,'PABST',CLUOUT,IRESP,XPABST)
+CALL IO_WRITE_FIELD(TPFILE,'PABST',CLUOUT,XPABST)
 !
 IF (NRR >=1) THEN
-  IF (LUSERV) CALL IO_WRITE_FIELD(TPFILE,'RVT',CLUOUT,IRESP,XRT(:,:,:,IDX_RVT))
+  IF (LUSERV) CALL IO_WRITE_FIELD(TPFILE,'RVT',CLUOUT,XRT(:,:,:,IDX_RVT))
   IF (LUSERC) THEN
-    CALL IO_WRITE_FIELD(TPFILE,'RCT',CLUOUT,IRESP,XRT(:,:,:,IDX_RCT))
+    CALL IO_WRITE_FIELD(TPFILE,'RCT',CLUOUT,XRT(:,:,:,IDX_RCT))
     WRITE (ILUOUT,*) IDX_RCT,' RC min-max ',MIN_ll(XRT(:,:,:,IDX_RCT),INFO_ll),MAX_ll(XRT(:,:,:,IDX_RCT),INFO_ll)
   END IF
   IF (LUSERR) THEN
-    CALL IO_WRITE_FIELD(TPFILE,'RRT',CLUOUT,IRESP,XRT(:,:,:,IDX_RRT))
+    CALL IO_WRITE_FIELD(TPFILE,'RRT',CLUOUT,XRT(:,:,:,IDX_RRT))
     WRITE (ILUOUT,*) IDX_RRT,' RR min-max ',MIN_ll(XRT(:,:,:,IDX_RRT),INFO_ll),MAX_ll(XRT(:,:,:,IDX_RRT),INFO_ll)
   END IF 
   IF (LUSERI) THEN
-    CALL IO_WRITE_FIELD(TPFILE,'RIT',CLUOUT,IRESP,XRT(:,:,:,IDX_RIT))
+    CALL IO_WRITE_FIELD(TPFILE,'RIT',CLUOUT,XRT(:,:,:,IDX_RIT))
     WRITE (ILUOUT,*) IDX_RIT,' RI min-max ',MIN_ll(XRT(:,:,:,IDX_RIT),INFO_ll),MAX_ll(XRT(:,:,:,IDX_RIT),INFO_ll)
     IF ( CPROGRAM == 'MESONH' .AND. CCLOUD(1:3) == 'ICE') THEN
-      CALL IO_WRITE_FIELD(TPFILE,'CIT',CLUOUT,IRESP,XCIT(:,:,:))
+      CALL IO_WRITE_FIELD(TPFILE,'CIT',CLUOUT,XCIT(:,:,:))
     END IF
   END IF 
   IF (LUSERS) THEN
-    CALL IO_WRITE_FIELD(TPFILE,'RST',CLUOUT,IRESP,XRT(:,:,:,IDX_RST))
+    CALL IO_WRITE_FIELD(TPFILE,'RST',CLUOUT,XRT(:,:,:,IDX_RST))
     WRITE (ILUOUT,*) IDX_RST,' RS min-max ',MINVAL(XRT(:,:,:,IDX_RST)),MAXVAL(XRT(:,:,:,IDX_RST))
   END IF
   IF (LUSERG) THEN
-    CALL IO_WRITE_FIELD(TPFILE,'RGT',CLUOUT,IRESP,XRT(:,:,:,IDX_RGT))
+    CALL IO_WRITE_FIELD(TPFILE,'RGT',CLUOUT,XRT(:,:,:,IDX_RGT))
     WRITE (ILUOUT,*) IDX_RGT,' RG min-max ',MINVAL(XRT(:,:,:,IDX_RGT)),MAXVAL(XRT(:,:,:,IDX_RGT))
   END IF 
-  IF (LUSERH) CALL IO_WRITE_FIELD(TPFILE,'RHT',CLUOUT,IRESP,XRT(:,:,:,IDX_RHT))
+  IF (LUSERH) CALL IO_WRITE_FIELD(TPFILE,'RHT',CLUOUT,XRT(:,:,:,IDX_RHT))
 END IF
 !
 IF (NSV >=1) THEN
@@ -674,7 +674,7 @@ IF (NSV >=1) THEN
       WRITE(TZFIELD%CMNHNAME,'(A3,I3.3)')'SVT',JSV
       TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
       TZFIELD%CCOMMENT   = 'X_Y_Z_'//TRIM(TZFIELD%CMNHNAME)
-      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XSVT(:,:,:,JSV))
+      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XSVT(:,:,:,JSV))
       JSA=JSA+1
     END DO
   END IF
@@ -691,7 +691,7 @@ IF (NSV >=1) THEN
       TZFIELD%CMNHNAME   = TRIM(C2R2NAMES(JSV-NSV_C2R2BEG+1))//'T'
       TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
       WRITE(TZFIELD%CCOMMENT,'(A6,A3,I3.3)')'X_Y_Z_','SVT',JSV
-      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XSVT(:,:,:,JSV))
+      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XSVT(:,:,:,JSV))
       JSA=JSA+1
     END DO
   END IF
@@ -708,7 +708,7 @@ IF (NSV >=1) THEN
       TZFIELD%CMNHNAME   = TRIM(C1R3NAMES(JSV-NSV_C1R3BEG+1))//'T'
       TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
       WRITE(TZFIELD%CCOMMENT,'(A6,A3,I3.3)')'X_Y_Z_','SVT',JSV
-      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XSVT(:,:,:,JSV))
+      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XSVT(:,:,:,JSV))
       JSA=JSA+1
     END DO
   END IF
@@ -778,7 +778,7 @@ IF (NSV >=1) THEN
     END IF
     !
     TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XSVT(:,:,:,JSV))
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XSVT(:,:,:,JSV))
 !
     JSA=JSA+1
   END DO
@@ -786,7 +786,7 @@ IF (NSV >=1) THEN
   IF (LSCAV .AND. LAERO_MASS) THEN
   IF (ASSOCIATED(XINPAP)) THEN
   IF (SIZE(XINPAP) /= 0 ) THEN
-    CALL IO_WRITE_FIELD(TPFILE,'INPAP',CLUOUT,IRESP,XINPAP)
+    CALL IO_WRITE_FIELD(TPFILE,'INPAP',CLUOUT,XINPAP)
     !
     ZWORK2D(:,:)  = XRHOLW*XINPRR(:,:)*XSVT(:,:,2,NSV_LIMA_SCAVMASS)/ &
                                         max( 1.e-20,XRT(:,:,2,3) ) !~2=at ground level
@@ -799,9 +799,9 @@ IF (NSV >=1) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 2
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK2D)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK2D)
     !
-    CALL IO_WRITE_FIELD(TPFILE,'ACPAP',CLUOUT,IRESP,XACPAP)
+    CALL IO_WRITE_FIELD(TPFILE,'ACPAP',CLUOUT,XACPAP)
   END IF
   END IF
   END IF
@@ -826,15 +826,15 @@ IF (NSV >=1) THEN
         WRITE(TZFIELD%CCOMMENT,'(A6,A3,I3.3,A8)')'X_Y_Z_','SVT',JSV,' (nb ions/m3)'
       END IF
       ZWORK3D(:,:,:) = XSVT(:,:,:,JSV) * XRHODREF(:,:,:) ! C/kg --> C/m3
-      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK3D)
+      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK3D)
       JSA=JSA+1
     END DO
   END IF
   !
   IF (CELEC /= 'NONE') THEN
-    CALL IO_WRITE_FIELD(TPFILE,'EFIELDU',CLUOUT,IRESP,XEFIELDU)
-    CALL IO_WRITE_FIELD(TPFILE,'EFIELDV',CLUOUT,IRESP,XEFIELDV)
-    CALL IO_WRITE_FIELD(TPFILE,'EFIELDW',CLUOUT,IRESP,XEFIELDW)
+    CALL IO_WRITE_FIELD(TPFILE,'EFIELDU',CLUOUT,XEFIELDU)
+    CALL IO_WRITE_FIELD(TPFILE,'EFIELDV',CLUOUT,XEFIELDV)
+    CALL IO_WRITE_FIELD(TPFILE,'EFIELDW',CLUOUT,XEFIELDW)
  !
     TZFIELD%CMNHNAME   = 'EMODULE'
     TZFIELD%CSTDNAME   = ''
@@ -846,34 +846,34 @@ IF (NSV >=1) THEN
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
     ZWORK3D(:,:,:) = (XEFIELDU**2 + XEFIELDV**2 + XEFIELDW**2)**0.5
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK3D)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK3D)
  !
     CALL FIND_FIELD_ID_FROM_MNHNAME('NI_IAGGS',IID,IRESP)
     TZFIELD = TFIELDLIST(IID)
     TZFIELD%CUNITS = 'pC m-3 s-1'
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XNI_IAGGS*1.E12)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XNI_IAGGS*1.E12)
  !
     CALL FIND_FIELD_ID_FROM_MNHNAME('NI_IDRYG',IID,IRESP)
     TZFIELD = TFIELDLIST(IID)
     TZFIELD%CUNITS = 'pC m-3 s-1'
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XNI_IDRYG*1.E12)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XNI_IDRYG*1.E12)
  !
     CALL FIND_FIELD_ID_FROM_MNHNAME('NI_SDRYG',IID,IRESP)
     TZFIELD = TFIELDLIST(IID)
     TZFIELD%CUNITS = 'pC m-3 s-1'
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XNI_SDRYG*1.E12)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XNI_SDRYG*1.E12)
  !
     CALL FIND_FIELD_ID_FROM_MNHNAME('INDUC_CG',IID,IRESP)
     TZFIELD = TFIELDLIST(IID)
     TZFIELD%CUNITS = 'pC m-3 s-1'
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XIND_RATE*1.E12)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XIND_RATE*1.E12)
  !
-    CALL IO_WRITE_FIELD(TPFILE,'TRIG_IC',   CLUOUT,IRESP,NMAP_TRIG_IC)
-    CALL IO_WRITE_FIELD(TPFILE,'IMPACT_CG', CLUOUT,IRESP,NMAP_IMPACT_CG)
-    CALL IO_WRITE_FIELD(TPFILE,'AREA_CG',   CLUOUT,IRESP,NMAP_2DAREA_CG)
-    CALL IO_WRITE_FIELD(TPFILE,'AREA_IC',   CLUOUT,IRESP,NMAP_2DAREA_IC)
-    CALL IO_WRITE_FIELD(TPFILE,'FLASH_3DCG',CLUOUT,IRESP,NMAP_3DCG)
-    CALL IO_WRITE_FIELD(TPFILE,'FLASH_3DIC',CLUOUT,IRESP,NMAP_3DIC)
+    CALL IO_WRITE_FIELD(TPFILE,'TRIG_IC',   CLUOUT,NMAP_TRIG_IC)
+    CALL IO_WRITE_FIELD(TPFILE,'IMPACT_CG', CLUOUT,NMAP_IMPACT_CG)
+    CALL IO_WRITE_FIELD(TPFILE,'AREA_CG',   CLUOUT,NMAP_2DAREA_CG)
+    CALL IO_WRITE_FIELD(TPFILE,'AREA_IC',   CLUOUT,NMAP_2DAREA_IC)
+    CALL IO_WRITE_FIELD(TPFILE,'FLASH_3DCG',CLUOUT,NMAP_3DCG)
+    CALL IO_WRITE_FIELD(TPFILE,'FLASH_3DIC',CLUOUT,NMAP_3DIC)
  !
     IF (LLNOX_EXPLICIT) THEN
       TZFIELD%CMNHNAME   = 'LINOX'
@@ -885,7 +885,7 @@ IF (NSV >=1) THEN
       TZFIELD%NGRID      = 1
       TZFIELD%NTYPE      = TYPEREAL
       TZFIELD%NDIMS      = 3
-      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XSVT(:,:,:,NSV_LNOXEND))
+      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XSVT(:,:,:,NSV_LNOXEND))
       JSA=JSA+1
     END IF
   END IF
@@ -902,7 +902,7 @@ IF (NSV >=1) THEN
       TZFIELD%CMNHNAME   = TRIM(CLGNAMES(JSV-NSV_LGBEG+1))//'T'
       TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
       WRITE(TZFIELD%CCOMMENT,'(A6,A3,I3.3)')'X_Y_Z_','SVT',JSV
-      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XSVT(:,:,:,JSV))
+      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XSVT(:,:,:,JSV))
       JSA=JSA+1
     END DO
   END IF
@@ -919,18 +919,18 @@ IF (NSV >=1) THEN
       WRITE(TZFIELD%CMNHNAME,'(A3,I3.3)')'SVT',JSV
       TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
       TZFIELD%CCOMMENT   = 'X_Y_Z_'//TRIM(TZFIELD%CMNHNAME)
-      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XSVT(:,:,:,JSV))
+      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XSVT(:,:,:,JSV))
       JSA=JSA+1
     END DO
   END IF
 !
   IF ( ((CCLOUD == 'KHKO') .OR.(CCLOUD == 'C2R2')) .AND. (.NOT. LSUPSAT)) THEN
-    CALL IO_WRITE_FIELD(TPFILE,'SUPSATMAX',CLUOUT,IRESP,XSUPSAT(:,:,:))
-    CALL IO_WRITE_FIELD(TPFILE,'NACT',     CLUOUT,IRESP,XNACT(:,:,:))
+    CALL IO_WRITE_FIELD(TPFILE,'SUPSATMAX',CLUOUT,XSUPSAT(:,:,:))
+    CALL IO_WRITE_FIELD(TPFILE,'NACT',     CLUOUT,XNACT(:,:,:))
   END IF
   IF ( ((CCLOUD == 'KHKO') .OR.(CCLOUD == 'C2R2')) .AND. LSUPSAT) THEN
-    CALL IO_WRITE_FIELD(TPFILE,'SSPRO',CLUOUT,IRESP,XSSPRO(:,:,:))
-    CALL IO_WRITE_FIELD(TPFILE,'NPRO', CLUOUT,IRESP,XNPRO(:,:,:))
+    CALL IO_WRITE_FIELD(TPFILE,'SSPRO',CLUOUT,XSSPRO(:,:,:))
+    CALL IO_WRITE_FIELD(TPFILE,'NPRO', CLUOUT,XNPRO(:,:,:))
   END IF
 !
 #ifdef MNH_FOREFIRE
@@ -947,7 +947,7 @@ IF (NSV >=1) THEN
       WRITE(TZFIELD%CMNHNAME,'(A3,I3.3)')'SVT',JSV
       TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
       TZFIELD%CCOMMENT   = 'X_Y_Z_'//TRIM(TZFIELD%CMNHNAME)
-      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XSVT(:,:,:,JSV))
+      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XSVT(:,:,:,JSV))
       JSA=JSA+1
     END DO
   END IF
@@ -965,7 +965,7 @@ IF (NSV >=1) THEN
       WRITE(TZFIELD%CMNHNAME,'(A3,I3.3)')'SVT',JSV
       TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
       TZFIELD%CCOMMENT   = 'X_Y_Z_'//TRIM(TZFIELD%CMNHNAME)
-      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XSVT(:,:,:,JSV))
+      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XSVT(:,:,:,JSV))
       JSA=JSA+1
     END DO
   !
@@ -996,7 +996,7 @@ IF (NSV >=1) THEN
       TZFIELD%CMNHNAME   = TRIM(UPCASE(CNAMES(JSV-NSV_CHEMBEG+1)))//'T'
       TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
       WRITE(TZFIELD%CCOMMENT,'(A6,A3,I3.3,A8)')'X_Y_Z_','SVT',JSV,' (ppp)'
-      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XSVT(:,:,:,JSV))
+      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XSVT(:,:,:,JSV))
       !
       YCHNAMES(JSV-JSA)=TZFIELD%CMNHNAME(1:LEN_TRIM(TZFIELD%CMNHNAME)-1) ! without T
     END DO
@@ -1006,7 +1006,7 @@ IF (NSV >=1) THEN
         TZFIELD%CMNHNAME   = TRIM(UPCASE(CICNAMES(JSV-NSV_CHICBEG+1)))//'T'
         TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
         WRITE(TZFIELD%CCOMMENT,'(A6,A3,I3.3,A8)')'X_Y_Z_','SVT',JSV,' (ppp)'
-        CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XSVT(:,:,:,JSV))
+        CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XSVT(:,:,:,JSV))
         !
         YCHNAMES(JSV-JSA)=TZFIELD%CMNHNAME(1:LEN_TRIM(TZFIELD%CMNHNAME)-1) ! without M
       END DO
@@ -1019,14 +1019,14 @@ IF (NSV >=1) THEN
         TZFIELD%CUNITS     = 'mol i m-2'
         TZFIELD%CCOMMENT   = 'X_Y_Accumulated moles of aqueous species at the surface'
         ZWORK2D(:,:)  = XACPRAQ(:,:,JSV-NSV_CHACBEG-NSV_CHAC/2+1)
-        CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK2D)
+        CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK2D)
       END DO
       TZFIELD%NDIMS = 3
     END IF
     IF (LUSECHAQ.AND.LCH_PH) THEN  ! pH values in cloud
-      CALL IO_WRITE_FIELD(TPFILE,'PHC',CLUOUT,IRESP,XPHC)
+      CALL IO_WRITE_FIELD(TPFILE,'PHC',CLUOUT,XPHC)
       IF (NRR>=3) THEN
-        CALL IO_WRITE_FIELD(TPFILE,'PHR',CLUOUT,IRESP,XPHR)
+        CALL IO_WRITE_FIELD(TPFILE,'PHR',CLUOUT,XPHR)
         ! compute mean pH in accumulated surface water
         !ZWORK2D(:,:) = 10**(-XCH_PHINIT)
         WHERE (XACPRR > 0.)
@@ -1046,7 +1046,7 @@ IF (NSV >=1) THEN
         TZFIELD%NGRID      = 1
         TZFIELD%NTYPE      = TYPEREAL
         TZFIELD%NDIMS      = 2
-        CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK2D)
+        CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK2D)
       ENDIF
     ENDIF
   ELSE IF (LCH_CONV_LINOX) THEN
@@ -1061,7 +1061,7 @@ IF (NSV >=1) THEN
       TZFIELD%CMNHNAME   = 'LINOXT'
       TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
       WRITE(TZFIELD%CCOMMENT,'(A6,A3,I3.3)') 'X_Y_Z_','SVT',JSV
-      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XSVT(:,:,:,JSV))
+      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XSVT(:,:,:,JSV))
       YCHNAMES(JSV-JSA)=TZFIELD%CMNHNAME(1:LEN_TRIM(TZFIELD%CMNHNAME)-1)
     END DO
   ENDIF  
@@ -1083,7 +1083,7 @@ IF (NSV >=1) THEN
         TZFIELD%CMNHNAME   = TRIM(UPCASE(CAERONAMES(JSV-NSV_AERBEG+1)))//'T'
         TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
         WRITE(TZFIELD%CCOMMENT,'(A6,A3,I3.3)')'X_Y_Z_','SVT',JSV
-        CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XSVT(:,:,:,JSV))
+        CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XSVT(:,:,:,JSV))
         IF (JSV==NSV_AERBEG) WRITE(ILUOUT,*)'MNHC: write_lfin:NSV_AERBEG ',JSV
         IF (JSV==NSV_AEREND) WRITE(ILUOUT,*)'MNHC: write_lfin:NSV_AEREND ',JSV
         YCHNAMES(JSV-JSA)=  TZFIELD%CMNHNAME(1:LEN_TRIM(TZFIELD%CMNHNAME)-1)
@@ -1101,7 +1101,7 @@ IF (NSV >=1) THEN
         TZFIELD%CMNHNAME   = TRIM(CDEAERNAMES(JSV-NSV_AERDEPBEG+1))//'T'
         TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
         WRITE(TZFIELD%CCOMMENT,'(A6,A3,I3.3)')'X_Y_Z_','SVT',JSV
-        CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XSVT(:,:,:,JSV))
+        CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XSVT(:,:,:,JSV))
         IF (JSV==NSV_AERDEPBEG) WRITE(ILUOUT,*)'MNHC: write_lfin:NSV_AERDEPBEG ',JSV
         IF (JSV==NSV_AERDEPEND) WRITE(ILUOUT,*)'MNHC: write_lfin:NSV_AERDEPEND ',JSV
         YCHNAMES(JSV-JSA) = TZFIELD%CMNHNAME(1:LEN_TRIM(TZFIELD%CMNHNAME)-1)
@@ -1148,7 +1148,7 @@ IF (NSV >=1) THEN
           TZFIELD%CMNHNAME   = TRIM(YPDUST_INI(ISV_NAME_IDX))//'T'
           TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
           WRITE(TZFIELD%CCOMMENT,'(A6,A3,I3.3)')'X_Y_Z_','SVT',JSV
-          CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XSVT(:,:,:,JSV))
+          CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XSVT(:,:,:,JSV))
           YDSTNAMES((JMODE-1)*IMOMENTS+1)=TZFIELD%CMNHNAME(1:LEN_TRIM(TZFIELD%CMNHNAME)-1)
         END DO ! Loop on mode
       ELSE
@@ -1161,7 +1161,7 @@ IF (NSV >=1) THEN
             TZFIELD%CMNHNAME   = TRIM(YPDUST_INI(ISV_NAME_IDX))//'T'  !The refererence which will be written to file
             TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
             WRITE(TZFIELD%CCOMMENT,'(A6,A3,I3.3)')'X_Y_Z_','SVT',JSV
-            CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XSVT(:,:,:,JSV))
+            CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XSVT(:,:,:,JSV))
             YDSTNAMES((JMODE-1)*IMOMENTS+JMOM)=TZFIELD%CMNHNAME(1:LEN_TRIM(TZFIELD%CMNHNAME)-1)
           END DO ! Loop on moment
         END DO ! loop on mode
@@ -1186,7 +1186,7 @@ IF (NSV >=1) THEN
         TZFIELD%CMNHNAME   = TRIM(CDUSTNAMES(JSV-NSV_DSTBEG+1))//'T'
         TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
         WRITE(TZFIELD%CCOMMENT,'(A6,A3,I3.3)')'X_Y_Z_','SVT',JSV
-        CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XSVT(:,:,:,JSV))
+        CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XSVT(:,:,:,JSV))
         IF (JSV==NSV_DSTBEG) WRITE(ILUOUT,*)'MNHC: write_lfin:NSV_DSTBEG ',JSV
         IF (JSV==NSV_DSTEND) WRITE(ILUOUT,*)'MNHC: write_lfin:NSV_DSTEND ',JSV
         YCHNAMES(JSV-JSA) = TZFIELD%CMNHNAME(1:LEN_TRIM(TZFIELD%CMNHNAME)-1)
@@ -1204,7 +1204,7 @@ IF (NSV >=1) THEN
         TZFIELD%CMNHNAME   = TRIM(CDEDSTNAMES(JSV-NSV_DSTDEPBEG+1))//'T'
         TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
         WRITE(TZFIELD%CCOMMENT,'(A6,A3,I3.3)')'X_Y_Z_','SVT',JSV
-        CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XSVT(:,:,:,JSV))
+        CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XSVT(:,:,:,JSV))
         IF (JSV==NSV_DSTDEPBEG) WRITE(ILUOUT,*)'MNHC: write_lfin:NSV_DSTDEPBEG ',JSV
         IF (JSV==NSV_DSTDEPEND) WRITE(ILUOUT,*)'MNHC: write_lfin:NSV_DSTDEPEND ',JSV
         YCHNAMES(JSV-JSA) = TZFIELD%CMNHNAME(1:LEN_TRIM(TZFIELD%CMNHNAME)-1)
@@ -1252,7 +1252,7 @@ IF (NSV >=1) THEN
           TZFIELD%CMNHNAME   = TRIM(YPSALT_INI(ISV_NAME_IDX))//'T'  !The refererence which will be written to file
           TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
           WRITE(TZFIELD%CCOMMENT,'(A6,A3,I3.3)')'X_Y_Z_','SVT',JSV
-          CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XSVT(:,:,:,JSV))
+          CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XSVT(:,:,:,JSV))
           YSLTNAMES((JMODE-1)*IMOMENTS+JMOM)=TZFIELD%CMNHNAME(1:LEN_TRIM(TZFIELD%CMNHNAME)-1)
         END DO ! Loop on moments
       END DO   ! Loop on modes
@@ -1275,7 +1275,7 @@ IF (NSV >=1) THEN
         TZFIELD%CMNHNAME   = TRIM(CSALTNAMES(JSV-NSV_SLTBEG+1))//'T'
         TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
         WRITE(TZFIELD%CCOMMENT,'(A6,A3,I3.3)')'X_Y_Z_','SVT',JSV
-        CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XSVT(:,:,:,JSV))
+        CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XSVT(:,:,:,JSV))
         IF (JSV==NSV_SLTBEG) WRITE(ILUOUT,*)'MNHC: write_lfin:NSV_SLTBEG ',JSV
         IF (JSV==NSV_SLTEND) WRITE(ILUOUT,*)'MNHC: write_lfin:NSV_SLTEND ',JSV
         YCHNAMES(JSV-JSA) = TZFIELD%CMNHNAME(1:LEN_TRIM(TZFIELD%CMNHNAME)-1)
@@ -1293,7 +1293,7 @@ IF (NSV >=1) THEN
         TZFIELD%CMNHNAME   = TRIM(CDESLTNAMES(JSV-NSV_SLTDEPBEG+1))//'T'
         TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
         WRITE(TZFIELD%CCOMMENT,'(A6,A3,I3.3)')'X_Y_Z_','SVT',JSV
-        CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XSVT(:,:,:,JSV))
+        CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XSVT(:,:,:,JSV))
         IF (JSV==NSV_SLTDEPBEG) WRITE(ILUOUT,*)'MNHC: write_lfin:NSV_SLTDEPBEG ',JSV
         IF (JSV==NSV_SLTDEPEND) WRITE(ILUOUT,*)'MNHC: write_lfin:NSV_SLTDEPEND ',JSV
         YCHNAMES(JSV-JSA) = TZFIELD%CMNHNAME(1:LEN_TRIM(TZFIELD%CMNHNAME)-1)
@@ -1313,7 +1313,7 @@ IF (NSV >=1) THEN
   TZFIELD%NGRID      = 0
   TZFIELD%NTYPE      = TYPEINT
   TZFIELD%NDIMS      = 0
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ICH_NBR)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ICH_NBR)
   !
   IF (ICH_NBR/=0) THEN
     TZFIELD%CMNHNAME   = 'NSV.TITRE'
@@ -1333,7 +1333,7 @@ IF (NSV >=1) THEN
         ICH_NAMES(ILREC*(JSV-1)+JT) = ICHAR(YCHNAMES(JSV)(JT:JT))
       ENDDO
     ENDDO
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ICH_NAMES)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ICH_NAMES)
     DEALLOCATE(YCHNAMES,ICH_NAMES)
   END IF 
   !
@@ -1350,63 +1350,63 @@ IF (NSV >=1) THEN
       TZFIELD%CMNHNAME   = TRIM(CLGNAMES(JSV-NSV_LGBEG+1))//'T'
       TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
       WRITE(TZFIELD%CCOMMENT,'(A6,A3,I3.3)')'X_Y_Z_','SVT',JSV
-      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XSVT(:,:,:,JSV))
+      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XSVT(:,:,:,JSV))
     END DO
   END IF
 END IF
 !
 !
-CALL IO_WRITE_FIELD(TPFILE,'LSUM', CLUOUT,IRESP,XLSUM)
-CALL IO_WRITE_FIELD(TPFILE,'LSVM', CLUOUT,IRESP,XLSVM)
-CALL IO_WRITE_FIELD(TPFILE,'LSWM', CLUOUT,IRESP,XLSWM)
-CALL IO_WRITE_FIELD(TPFILE,'LSTHM',CLUOUT,IRESP,XLSTHM)
-IF (LUSERV) CALL IO_WRITE_FIELD(TPFILE,'LSRVM',CLUOUT,IRESP,XLSRVM)
+CALL IO_WRITE_FIELD(TPFILE,'LSUM', CLUOUT,XLSUM)
+CALL IO_WRITE_FIELD(TPFILE,'LSVM', CLUOUT,XLSVM)
+CALL IO_WRITE_FIELD(TPFILE,'LSWM', CLUOUT,XLSWM)
+CALL IO_WRITE_FIELD(TPFILE,'LSTHM',CLUOUT,XLSTHM)
+IF (LUSERV) CALL IO_WRITE_FIELD(TPFILE,'LSRVM',CLUOUT,XLSRVM)
 !
 CALL WRITE_LB_n(TPFILE)
 !
 !
-CALL IO_WRITE_FIELD(TPFILE,'DRYMASST',CLUOUT,IRESP,XDRYMASST)
+CALL IO_WRITE_FIELD(TPFILE,'DRYMASST',CLUOUT,XDRYMASST)
 !
 IF( CTURB /= 'NONE' .AND. CTOM=='TM06') THEN
-  CALL IO_WRITE_FIELD(TPFILE,'BL_DEPTH',CLUOUT,IRESP,XBL_DEPTH)
+  CALL IO_WRITE_FIELD(TPFILE,'BL_DEPTH',CLUOUT,XBL_DEPTH)
 END IF
 !
 IF( CTURB /= 'NONE' .AND. LRMC01) THEN
-  CALL IO_WRITE_FIELD(TPFILE,'SBL_DEPTH',CLUOUT,IRESP,XBL_DEPTH)
+  CALL IO_WRITE_FIELD(TPFILE,'SBL_DEPTH',CLUOUT,XBL_DEPTH)
 END IF
 !
 IF( CTURB /= 'NONE' .AND. (CPROGRAM == 'MESONH' .OR. CPROGRAM == 'DIAG')) THEN
-  CALL IO_WRITE_FIELD(TPFILE,'WTHVMF',CLUOUT,IRESP,XWTHVMF)
+  CALL IO_WRITE_FIELD(TPFILE,'WTHVMF',CLUOUT,XWTHVMF)
 END IF
 !
 IF( NRR > 1 .AND. CTURB /= 'NONE' ) THEN
-  CALL IO_WRITE_FIELD(TPFILE,'SRCT',CLUOUT,IRESP,XSRCT)
-  CALL IO_WRITE_FIELD(TPFILE,'SIGS',CLUOUT,IRESP,XSIGS)
+  CALL IO_WRITE_FIELD(TPFILE,'SRCT',CLUOUT,XSRCT)
+  CALL IO_WRITE_FIELD(TPFILE,'SIGS',CLUOUT,XSIGS)
 END IF
 !
 !*       1.5    Reference state variables :
 !
-CALL IO_WRITE_FIELD(TPFILE,'RHOREFZ',CLUOUT,IRESP,XRHODREFZ)
-CALL IO_WRITE_FIELD(TPFILE,'THVREFZ',CLUOUT,IRESP,XTHVREFZ)
-CALL IO_WRITE_FIELD(TPFILE,'EXNTOP', CLUOUT,IRESP,XEXNTOP)
+CALL IO_WRITE_FIELD(TPFILE,'RHOREFZ',CLUOUT,XRHODREFZ)
+CALL IO_WRITE_FIELD(TPFILE,'THVREFZ',CLUOUT,XTHVREFZ)
+CALL IO_WRITE_FIELD(TPFILE,'EXNTOP', CLUOUT,XEXNTOP)
 !
 !
 !*       1.6  Tendencies                                         
 !
 IF (CPROGRAM == 'MESONH') THEN
-  CALL IO_WRITE_FIELD(TPFILE,'US_PRES',CLUOUT,IRESP,XRUS_PRES)
-  CALL IO_WRITE_FIELD(TPFILE,'VS_PRES',CLUOUT,IRESP,XRVS_PRES)
-  CALL IO_WRITE_FIELD(TPFILE,'WS_PRES',CLUOUT,IRESP,XRWS_PRES)
-  CALL IO_WRITE_FIELD(TPFILE,'THS_CLD',CLUOUT,IRESP,XRTHS_CLD)
+  CALL IO_WRITE_FIELD(TPFILE,'US_PRES',CLUOUT,XRUS_PRES)
+  CALL IO_WRITE_FIELD(TPFILE,'VS_PRES',CLUOUT,XRVS_PRES)
+  CALL IO_WRITE_FIELD(TPFILE,'WS_PRES',CLUOUT,XRWS_PRES)
+  CALL IO_WRITE_FIELD(TPFILE,'THS_CLD',CLUOUT,XRTHS_CLD)
 !
  IF (NRR >=1) THEN
-   IF (LUSERV) CALL IO_WRITE_FIELD(TPFILE,'RVS_CLD',CLUOUT,IRESP,XRRS_CLD(:,:,:,IDX_RVT))
-   IF (LUSERC) CALL IO_WRITE_FIELD(TPFILE,'RCS_CLD',CLUOUT,IRESP,XRRS_CLD(:,:,:,IDX_RCT))
-   IF (LUSERR) CALL IO_WRITE_FIELD(TPFILE,'RRS_CLD',CLUOUT,IRESP,XRRS_CLD(:,:,:,IDX_RRT))
-   IF (LUSERI) CALL IO_WRITE_FIELD(TPFILE,'RIS_CLD',CLUOUT,IRESP,XRRS_CLD(:,:,:,IDX_RIT))
-   IF (LUSERS) CALL IO_WRITE_FIELD(TPFILE,'RSS_CLD',CLUOUT,IRESP,XRRS_CLD(:,:,:,IDX_RST))
-   IF (LUSERG) CALL IO_WRITE_FIELD(TPFILE,'RGS_CLD',CLUOUT,IRESP,XRRS_CLD(:,:,:,IDX_RGT))
-   IF (LUSERH) CALL IO_WRITE_FIELD(TPFILE,'RHS_CLD',CLUOUT,IRESP,XRRS_CLD(:,:,:,IDX_RHT))
+   IF (LUSERV) CALL IO_WRITE_FIELD(TPFILE,'RVS_CLD',CLUOUT,XRRS_CLD(:,:,:,IDX_RVT))
+   IF (LUSERC) CALL IO_WRITE_FIELD(TPFILE,'RCS_CLD',CLUOUT,XRRS_CLD(:,:,:,IDX_RCT))
+   IF (LUSERR) CALL IO_WRITE_FIELD(TPFILE,'RRS_CLD',CLUOUT,XRRS_CLD(:,:,:,IDX_RRT))
+   IF (LUSERI) CALL IO_WRITE_FIELD(TPFILE,'RIS_CLD',CLUOUT,XRRS_CLD(:,:,:,IDX_RIT))
+   IF (LUSERS) CALL IO_WRITE_FIELD(TPFILE,'RSS_CLD',CLUOUT,XRRS_CLD(:,:,:,IDX_RST))
+   IF (LUSERG) CALL IO_WRITE_FIELD(TPFILE,'RGS_CLD',CLUOUT,XRRS_CLD(:,:,:,IDX_RGT))
+   IF (LUSERH) CALL IO_WRITE_FIELD(TPFILE,'RHS_CLD',CLUOUT,XRRS_CLD(:,:,:,IDX_RHT))
  END IF 
 END IF 
 !
@@ -1423,7 +1423,7 @@ END IF
 !       TZFIELD%NGRID      = 1
 !       TZFIELD%NTYPE      = TYPEREAL
 !       TZFIELD%NDIMS      = 3
-!       CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XRRS_CLD(:,:,:,IRR))
+!       CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XRRS_CLD(:,:,:,IRR))
 !     END IF
 !     IF (JSV == NSV_C2R2END ) THEN
 !       TZFIELD%CMNHNAME   = 'RSVS_CLD2'
@@ -1435,7 +1435,7 @@ END IF
 !       TZFIELD%NGRID      = 1
 !       TZFIELD%NTYPE      = TYPEREAL
 !       TZFIELD%NDIMS      = 3
-!       CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XRRS_CLD(:,:,:,IRR))
+!       CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XRRS_CLD(:,:,:,IRR))
 !     END IF
 !    END DO
 ! END IF
@@ -1444,25 +1444,25 @@ END IF
 !
 !
 IF (CRAD /= 'NONE') THEN
-  CALL IO_WRITE_FIELD(TPFILE,'DTRAD_FULL',CLUOUT,IRESP,TDTRAD_FULL)
-  CALL IO_WRITE_FIELD(TPFILE,'DTRAD_CLLY',CLUOUT,IRESP,TDTRAD_CLONLY)
-!
-  CALL IO_WRITE_FIELD(TPFILE,'DTHRAD',      CLUOUT,IRESP,XDTHRAD)
-  CALL IO_WRITE_FIELD(TPFILE,'FLALWD',      CLUOUT,IRESP,XFLALWD)
-  CALL IO_WRITE_FIELD(TPFILE,'DIRFLASWD',   CLUOUT,IRESP,XDIRFLASWD)
-  CALL IO_WRITE_FIELD(TPFILE,'SCAFLASWD',   CLUOUT,IRESP,XSCAFLASWD)
-  CALL IO_WRITE_FIELD(TPFILE,'DIRSRFSWD',   CLUOUT,IRESP,XDIRSRFSWD)
-  CALL IO_WRITE_FIELD(TPFILE,'CLEARCOL_TM1',CLUOUT,IRESP,NCLEARCOL_TM1)
-  CALL IO_WRITE_FIELD(TPFILE,'ZENITH',      CLUOUT,IRESP,XZENITH)
-  CALL IO_WRITE_FIELD(TPFILE,'AZIM',        CLUOUT,IRESP,XAZIM)
-  CALL IO_WRITE_FIELD(TPFILE,'DIR_ALB',     CLUOUT,IRESP,XDIR_ALB)
-  CALL IO_WRITE_FIELD(TPFILE,'SCA_ALB',     CLUOUT,IRESP,XSCA_ALB)
-  CALL IO_WRITE_FIELD(TPFILE,'EMIS',        CLUOUT,IRESP,XEMIS)
-  CALL IO_WRITE_FIELD(TPFILE,'TSRAD',       CLUOUT,IRESP,XTSRAD)
+  CALL IO_WRITE_FIELD(TPFILE,'DTRAD_FULL',CLUOUT,TDTRAD_FULL)
+  CALL IO_WRITE_FIELD(TPFILE,'DTRAD_CLLY',CLUOUT,TDTRAD_CLONLY)
+!
+  CALL IO_WRITE_FIELD(TPFILE,'DTHRAD',      CLUOUT,XDTHRAD)
+  CALL IO_WRITE_FIELD(TPFILE,'FLALWD',      CLUOUT,XFLALWD)
+  CALL IO_WRITE_FIELD(TPFILE,'DIRFLASWD',   CLUOUT,XDIRFLASWD)
+  CALL IO_WRITE_FIELD(TPFILE,'SCAFLASWD',   CLUOUT,XSCAFLASWD)
+  CALL IO_WRITE_FIELD(TPFILE,'DIRSRFSWD',   CLUOUT,XDIRSRFSWD)
+  CALL IO_WRITE_FIELD(TPFILE,'CLEARCOL_TM1',CLUOUT,NCLEARCOL_TM1)
+  CALL IO_WRITE_FIELD(TPFILE,'ZENITH',      CLUOUT,XZENITH)
+  CALL IO_WRITE_FIELD(TPFILE,'AZIM',        CLUOUT,XAZIM)
+  CALL IO_WRITE_FIELD(TPFILE,'DIR_ALB',     CLUOUT,XDIR_ALB)
+  CALL IO_WRITE_FIELD(TPFILE,'SCA_ALB',     CLUOUT,XSCA_ALB)
+  CALL IO_WRITE_FIELD(TPFILE,'EMIS',        CLUOUT,XEMIS)
+  CALL IO_WRITE_FIELD(TPFILE,'TSRAD',       CLUOUT,XTSRAD)
 ENDIF
 !
 IF (NRR > 1 .AND. CPROGRAM == 'MESONH') THEN
-  CALL IO_WRITE_FIELD(TPFILE,'CLDFR',CLUOUT,IRESP,XCLDFR)
+  CALL IO_WRITE_FIELD(TPFILE,'CLDFR',CLUOUT,XCLDFR)
 END IF
 !
 !
@@ -1473,33 +1473,33 @@ IF (CDCONV /= 'NONE' .OR. CSCONV == 'KAFR') THEN
 !
 ! 
 !
-  CALL IO_WRITE_FIELD(TPFILE,'DTDCONV',  CLUOUT,IRESP,TDTDCONV)
-  CALL IO_WRITE_FIELD(TPFILE,'COUNTCONV',CLUOUT,IRESP,NCOUNTCONV)
-  CALL IO_WRITE_FIELD(TPFILE,'DTHCONV',  CLUOUT,IRESP,XDTHCONV)
-  CALL IO_WRITE_FIELD(TPFILE,'DRVCONV',  CLUOUT,IRESP,XDRVCONV)
-  CALL IO_WRITE_FIELD(TPFILE,'DRCCONV',  CLUOUT,IRESP,XDRCCONV)
-  CALL IO_WRITE_FIELD(TPFILE,'DRICONV',  CLUOUT,IRESP,XDRICONV)
+  CALL IO_WRITE_FIELD(TPFILE,'DTDCONV',  CLUOUT,TDTDCONV)
+  CALL IO_WRITE_FIELD(TPFILE,'COUNTCONV',CLUOUT,NCOUNTCONV)
+  CALL IO_WRITE_FIELD(TPFILE,'DTHCONV',  CLUOUT,XDTHCONV)
+  CALL IO_WRITE_FIELD(TPFILE,'DRVCONV',  CLUOUT,XDRVCONV)
+  CALL IO_WRITE_FIELD(TPFILE,'DRCCONV',  CLUOUT,XDRCCONV)
+  CALL IO_WRITE_FIELD(TPFILE,'DRICONV',  CLUOUT,XDRICONV)
 !
   CALL FIND_FIELD_ID_FROM_MNHNAME('PRCONV',IID,IRESP)
   TZFIELD = TFIELDLIST(IID)
   TZFIELD%CUNITS = 'mm hour-1'
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XPRCONV*3.6E6)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XPRCONV*3.6E6)
 !
   CALL FIND_FIELD_ID_FROM_MNHNAME('PACCONV',IID,IRESP)
   TZFIELD = TFIELDLIST(IID)
   TZFIELD%CUNITS = 'mm'
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XPACCONV*1.0E3)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XPACCONV*1.0E3)
 !
   CALL FIND_FIELD_ID_FROM_MNHNAME('PRSCONV',IID,IRESP)
   TZFIELD = TFIELDLIST(IID)
   TZFIELD%CUNITS = 'mm hour-1'
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XPRSCONV*3.6E6)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XPRSCONV*3.6E6)
 !
   IF ( LCH_CONV_LINOX ) THEN
-    CALL IO_WRITE_FIELD(TPFILE,'IC_RATE',    CLUOUT,IRESP,XIC_RATE)
-    CALL IO_WRITE_FIELD(TPFILE,'CG_RATE',    CLUOUT,IRESP,XCG_RATE)
-    CALL IO_WRITE_FIELD(TPFILE,'IC_TOTAL_NB',CLUOUT,IRESP,XIC_TOTAL_NUMBER)
-    CALL IO_WRITE_FIELD(TPFILE,'CG_TOTAL_NB',CLUOUT,IRESP,XCG_TOTAL_NUMBER)
+    CALL IO_WRITE_FIELD(TPFILE,'IC_RATE',    CLUOUT,XIC_RATE)
+    CALL IO_WRITE_FIELD(TPFILE,'CG_RATE',    CLUOUT,XCG_RATE)
+    CALL IO_WRITE_FIELD(TPFILE,'IC_TOTAL_NB',CLUOUT,XIC_TOTAL_NUMBER)
+    CALL IO_WRITE_FIELD(TPFILE,'CG_TOTAL_NB',CLUOUT,XCG_TOTAL_NUMBER)
   END IF
 !
   IF ( LCHTRANS .AND. NSV > 0 ) THEN
@@ -1516,31 +1516,31 @@ IF (CDCONV /= 'NONE' .OR. CSCONV == 'KAFR') THEN
       WRITE(TZFIELD%CMNHNAME,'(A7,I3.3)')'DSVCONV',JSV
       TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
       WRITE(TZFIELD%CCOMMENT,'(A6,A7,I3.3)')'X_Y_Z_','DSVCONV',JSV
-      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XDSVCONV(:,:,:,JSV))
+      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XDSVCONV(:,:,:,JSV))
     END DO
     DO JSV = NSV_C2R2BEG, NSV_C2R2END
       TZFIELD%CMNHNAME   = 'DSVCONV_'//TRIM(C2R2NAMES(JSV-NSV_C2R2BEG+1))
       TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
       WRITE(TZFIELD%CCOMMENT,'(A6,A7,I3.3)')'X_Y_Z_','DSVCONV',JSV
-      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XDSVCONV(:,:,:,JSV))
+      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XDSVCONV(:,:,:,JSV))
     END DO
     DO JSV = NSV_C1R3BEG, NSV_C1R3END
       TZFIELD%CMNHNAME   = 'DSVCONV_'//TRIM(C1R3NAMES(JSV-NSV_C1R3BEG+1))
       TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
       WRITE(TZFIELD%CCOMMENT,'(A6,A7,I3.3)')'X_Y_Z_','DSVCONV',JSV
-      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XDSVCONV(:,:,:,JSV))
+      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XDSVCONV(:,:,:,JSV))
     END DO
     DO JSV = NSV_ELECBEG, NSV_ELECEND
       TZFIELD%CMNHNAME   = 'DSVCONV_'//TRIM(CELECNAMES(JSV-NSV_ELECBEG+1))
       TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
       WRITE(TZFIELD%CCOMMENT,'(A6,A7,I3.3)')'X_Y_Z_','DSVCONV',JSV
-      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XDSVCONV(:,:,:,JSV))
+      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XDSVCONV(:,:,:,JSV))
     END DO
     DO JSV = NSV_PPBEG, NSV_PPEND
       WRITE(TZFIELD%CMNHNAME,'(A7,I3.3)')'DSVCONV',JSV
       TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
       WRITE(TZFIELD%CCOMMENT,'(A6,A7,I3.3)')'X_Y_Z_','DSVCONV',JSV
-      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XDSVCONV(:,:,:,JSV))
+      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XDSVCONV(:,:,:,JSV))
     END DO
 #ifdef MNH_FOREFIRE
     IF (LFOREFIRE) THEN
@@ -1548,7 +1548,7 @@ IF (CDCONV /= 'NONE' .OR. CSCONV == 'KAFR') THEN
         WRITE(TZFIELD%CMNHNAME,'(A7,I3.3)')'DSVCONV',JSV
         TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
         WRITE(TZFIELD%CCOMMENT,'(A6,A7,I3.3)')'X_Y_Z_','DSVCONV',JSV
-        CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XDSVCONV(:,:,:,JSV))
+        CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XDSVCONV(:,:,:,JSV))
       END DO
     END IF
 #endif
@@ -1557,14 +1557,14 @@ IF (CDCONV /= 'NONE' .OR. CSCONV == 'KAFR') THEN
         TZFIELD%CMNHNAME   = 'DSVCONV_'//TRIM(UPCASE(CNAMES(JSV-NSV_CHEMBEG+1)))
         TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
         WRITE(TZFIELD%CCOMMENT,'(A6,A7,I3.3)')'X_Y_Z_','DSVCONV',JSV
-        CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XDSVCONV(:,:,:,JSV))
+        CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XDSVCONV(:,:,:,JSV))
       END DO
       IF (LORILAM) THEN
         DO JSV = NSV_AERBEG, NSV_AEREND
           TZFIELD%CMNHNAME   = 'DSVCONV_'//TRIM(UPCASE(CAERONAMES(JSV-NSV_AERBEG+1)))
           TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
           WRITE(TZFIELD%CCOMMENT,'(A6,A7,I3.3)')'X_Y_Z_','DSVCONV',JSV
-          CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XDSVCONV(:,:,:,JSV))
+          CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XDSVCONV(:,:,:,JSV))
         END DO
       END IF
 ! linox scalar variables
@@ -1573,26 +1573,26 @@ IF (CDCONV /= 'NONE' .OR. CSCONV == 'KAFR') THEN
         TZFIELD%CMNHNAME   = 'DSVCONV_LINOX'
         TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
         WRITE(TZFIELD%CCOMMENT,'(A6,A7,I3.3)')'X_Y_Z_','DSVCONV',JSV
-        CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XDSVCONV(:,:,:,JSV))
+        CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XDSVCONV(:,:,:,JSV))
       END DO
     END IF
     DO JSV = NSV_LGBEG, NSV_LGEND
       TZFIELD%CMNHNAME   = 'DSVCONV_'//TRIM(CLGNAMES(JSV-NSV_LGBEG+1))
       TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
       WRITE(TZFIELD%CCOMMENT,'(A6,A7,I3.3)')'X_Y_Z_','DSVCONV',JSV
-      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XDSVCONV(:,:,:,JSV))
+      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XDSVCONV(:,:,:,JSV))
     END DO
     DO JSV = NSV_DSTBEG, NSV_DSTEND
       TZFIELD%CMNHNAME   = 'DSVCONV_'//TRIM(CDUSTNAMES(JSV-NSV_DSTBEG+1))
       TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
       WRITE(TZFIELD%CCOMMENT,'(A6,A7,I3.3)')'X_Y_Z_','DSVCONV',JSV
-      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XDSVCONV(:,:,:,JSV))
+      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XDSVCONV(:,:,:,JSV))
     END DO
     DO JSV = NSV_SLTBEG, NSV_SLTEND
       TZFIELD%CMNHNAME   = 'DSVCONV_'//TRIM(CSALTNAMES(JSV-NSV_SLTBEG+1))
       TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
       WRITE(TZFIELD%CCOMMENT,'(A6,A7,I3.3)')'X_Y_Z_','DSVCONV',JSV
-      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XDSVCONV(:,:,:,JSV))
+      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XDSVCONV(:,:,:,JSV))
     END DO
   END IF
 !
@@ -1607,12 +1607,12 @@ IF (CPROGRAM /= 'IDEAL') THEN
     CALL FIND_FIELD_ID_FROM_MNHNAME('INPRC',IID,IRESP)
     TZFIELD = TFIELDLIST(IID)
     TZFIELD%CUNITS = 'mm hour-1'
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XINPRC*3.6E6)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XINPRC*3.6E6)
 !
     CALL FIND_FIELD_ID_FROM_MNHNAME('ACPRC',IID,IRESP)
     TZFIELD = TFIELDLIST(IID)
     TZFIELD%CUNITS = 'mm'
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XACPRC*1.0E3)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XACPRC*1.0E3)
   ENDIF
   ENDIF
 !
@@ -1621,15 +1621,15 @@ IF (CPROGRAM /= 'IDEAL') THEN
     CALL FIND_FIELD_ID_FROM_MNHNAME('INPRR',IID,IRESP)
     TZFIELD = TFIELDLIST(IID)
     TZFIELD%CUNITS = 'mm hour-1'
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XINPRR*3.6E6)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XINPRR*3.6E6)
 !
-    CALL IO_WRITE_FIELD(TPFILE,'INPRR3D',CLUOUT,IRESP,XINPRR3D)
-    CALL IO_WRITE_FIELD(TPFILE,'EVAP3D', CLUOUT,IRESP,XEVAP3D)
+    CALL IO_WRITE_FIELD(TPFILE,'INPRR3D',CLUOUT,XINPRR3D)
+    CALL IO_WRITE_FIELD(TPFILE,'EVAP3D', CLUOUT,XEVAP3D)
 !
     CALL FIND_FIELD_ID_FROM_MNHNAME('ACPRR',IID,IRESP)
     TZFIELD = TFIELDLIST(IID)
     TZFIELD%CUNITS = 'mm'
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XACPRR*1.0E3)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XACPRR*1.0E3)
 !
   ENDIF
   ENDIF
@@ -1639,12 +1639,12 @@ IF (CPROGRAM /= 'IDEAL') THEN
     CALL FIND_FIELD_ID_FROM_MNHNAME('INPRS',IID,IRESP)
     TZFIELD = TFIELDLIST(IID)
     TZFIELD%CUNITS = 'mm hour-1'
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XINPRS*3.6E6)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XINPRS*3.6E6)
 !
     CALL FIND_FIELD_ID_FROM_MNHNAME('ACPRS',IID,IRESP)
     TZFIELD = TFIELDLIST(IID)
     TZFIELD%CUNITS = 'mm'
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XACPRS*1.0E3)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XACPRS*1.0E3)
   END IF
   END IF
 !
@@ -1653,12 +1653,12 @@ IF (CPROGRAM /= 'IDEAL') THEN
     CALL FIND_FIELD_ID_FROM_MNHNAME('INPRG',IID,IRESP)
     TZFIELD = TFIELDLIST(IID)
     TZFIELD%CUNITS = 'mm hour-1'
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XINPRG*3.6E6)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XINPRG*3.6E6)
 !
     CALL FIND_FIELD_ID_FROM_MNHNAME('ACPRG',IID,IRESP)
     TZFIELD = TFIELDLIST(IID)
     TZFIELD%CUNITS = 'mm'
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XACPRG*1.0E3)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XACPRG*1.0E3)
   END IF
   END IF
 !
@@ -1667,12 +1667,12 @@ IF (CPROGRAM /= 'IDEAL') THEN
     CALL FIND_FIELD_ID_FROM_MNHNAME('INPRH',IID,IRESP)
     TZFIELD = TFIELDLIST(IID)
     TZFIELD%CUNITS = 'mm hour-1'
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XINPRH*3.6E6)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XINPRH*3.6E6)
 !
     CALL FIND_FIELD_ID_FROM_MNHNAME('ACPRH',IID,IRESP)
     TZFIELD = TFIELDLIST(IID)
     TZFIELD%CUNITS = 'mm'
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XACPRH*1.0E3)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XACPRH*1.0E3)
   ENDIF
   ENDIF
 !
@@ -1685,7 +1685,7 @@ IF (CPROGRAM /= 'IDEAL') THEN
     CALL FIND_FIELD_ID_FROM_MNHNAME('INPRT',IID,IRESP)
     TZFIELD = TFIELDLIST(IID)
     TZFIELD%CUNITS = 'mm hour-1'
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK2D*3.6E6)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK2D*3.6E6)
 !
     ZWORK2D = XACPRR + XACPRS
     IF (SIZE(XINPRG) /= 0 ) ZWORK2D = ZWORK2D + XACPRG
@@ -1694,7 +1694,7 @@ IF (CPROGRAM /= 'IDEAL') THEN
     CALL FIND_FIELD_ID_FROM_MNHNAME('ACPRT',IID,IRESP)
     TZFIELD = TFIELDLIST(IID)
     TZFIELD%CUNITS = 'mm'
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,ZWORK2D*1.0E3)
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,ZWORK2D*1.0E3)
   END IF
   END IF
 !
@@ -1715,7 +1715,7 @@ IF (LFORCING) THEN
   TZFIELD%NGRID      = 0
   TZFIELD%NTYPE      = TYPEINT
   TZFIELD%NDIMS      = 0
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,NFRC)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,NFRC)
 !
   DO JT=1,NFRC
 !
@@ -1730,7 +1730,7 @@ IF (LFORCING) THEN
     TZFIELD%NGRID      = 0
     TZFIELD%NTYPE      = TYPEDATE
     TZFIELD%NDIMS      = 0
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,TDTFRC(JT))
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,TDTFRC(JT))
 !
     TZFIELD%CMNHNAME   = 'UFRC'//YFRC
     TZFIELD%CSTDNAME   = ''
@@ -1741,7 +1741,7 @@ IF (LFORCING) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 1
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XUFRC(:,JT))
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XUFRC(:,JT))
 !
     TZFIELD%CMNHNAME   = 'VFRC'//YFRC
     TZFIELD%CSTDNAME   = ''
@@ -1752,7 +1752,7 @@ IF (LFORCING) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 1
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XVFRC(:,JT))
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XVFRC(:,JT))
 !
     TZFIELD%CMNHNAME   = 'WFRC'//YFRC
     TZFIELD%CSTDNAME   = ''
@@ -1763,7 +1763,7 @@ IF (LFORCING) THEN
     TZFIELD%NGRID      = 4
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 1
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XWFRC(:,JT))
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XWFRC(:,JT))
 !
     TZFIELD%CMNHNAME   = 'THFRC'//YFRC
     TZFIELD%CSTDNAME   = ''
@@ -1774,7 +1774,7 @@ IF (LFORCING) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 1
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XTHFRC(:,JT))
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XTHFRC(:,JT))
 !
     TZFIELD%CMNHNAME   = 'RVFRC'//YFRC
     TZFIELD%CSTDNAME   = ''
@@ -1785,7 +1785,7 @@ IF (LFORCING) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 1
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XRVFRC(:,JT))
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XRVFRC(:,JT))
 !
     TZFIELD%CMNHNAME   = 'TENDTHFRC'//YFRC
     TZFIELD%CSTDNAME   = ''
@@ -1796,7 +1796,7 @@ IF (LFORCING) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 1
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XTENDTHFRC(:,JT))
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XTENDTHFRC(:,JT))
 !
     TZFIELD%CMNHNAME   = 'TENDRVFRC'//YFRC
     TZFIELD%CSTDNAME   = ''
@@ -1807,7 +1807,7 @@ IF (LFORCING) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 1
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XTENDRVFRC(:,JT))
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XTENDRVFRC(:,JT))
 !
     TZFIELD%CMNHNAME   = 'GXTHFRC'//YFRC
     TZFIELD%CSTDNAME   = ''
@@ -1818,7 +1818,7 @@ IF (LFORCING) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 1
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XGXTHFRC(:,JT))
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XGXTHFRC(:,JT))
 !
     TZFIELD%CMNHNAME   = 'GYTHFRC'//YFRC
     TZFIELD%CSTDNAME   = ''
@@ -1829,7 +1829,7 @@ IF (LFORCING) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 1
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XGYTHFRC(:,JT))
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XGYTHFRC(:,JT))
 !
     TZFIELD%CMNHNAME   = 'PGROUNDFRC'//YFRC
     TZFIELD%CSTDNAME   = ''
@@ -1840,7 +1840,7 @@ IF (LFORCING) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 0
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XPGROUNDFRC(JT))
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XPGROUNDFRC(JT))
 !
   END DO
 !
@@ -1859,7 +1859,7 @@ IF ( L2D_ADV_FRC ) THEN
   TZFIELD%NGRID      = 0
   TZFIELD%NTYPE      = TYPEINT
   TZFIELD%NDIMS      = 0
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,NADVFRC)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,NADVFRC)
 !
   DO JT=1,NADVFRC
 !
@@ -1874,7 +1874,7 @@ IF ( L2D_ADV_FRC ) THEN
     TZFIELD%NGRID      = 0
     TZFIELD%NTYPE      = TYPEDATE
     TZFIELD%NDIMS      = 0
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,TDTADVFRC(JT))
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,TDTADVFRC(JT))
 !                                                                
     TZFIELD%CMNHNAME   = 'TH_ADV'//YFRC
     TZFIELD%CSTDNAME   = ''
@@ -1885,7 +1885,7 @@ IF ( L2D_ADV_FRC ) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XDTHFRC(:,:,:,JT))
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XDTHFRC(:,:,:,JT))
 !    
     TZFIELD%CMNHNAME   = 'Q_ADV'//YFRC
     TZFIELD%CSTDNAME   = ''
@@ -1896,7 +1896,7 @@ IF ( L2D_ADV_FRC ) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XDRVFRC(:,:,:,JT))
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XDRVFRC(:,:,:,JT))
 !
   ENDDO
 ENDIF
@@ -1912,7 +1912,7 @@ IF ( L2D_REL_FRC ) THEN
   TZFIELD%NGRID      = 0
   TZFIELD%NTYPE      = TYPEINT
   TZFIELD%NDIMS      = 0
-  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,NRELFRC)
+  CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,NRELFRC)
 !
   DO JT=1,NRELFRC
 !
@@ -1927,7 +1927,7 @@ IF ( L2D_REL_FRC ) THEN
     TZFIELD%NGRID      = 0
     TZFIELD%NTYPE      = TYPEDATE
     TZFIELD%NDIMS      = 0
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,TDTRELFRC(JT))
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,TDTRELFRC(JT))
 !                                                                
     TZFIELD%CMNHNAME   = 'TH_REL'//YFRC
     TZFIELD%CSTDNAME   = ''
@@ -1938,7 +1938,7 @@ IF ( L2D_REL_FRC ) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XTHREL(:,:,:,JT))
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XTHREL(:,:,:,JT))
 !    
     TZFIELD%CMNHNAME   = 'Q_REL'//YFRC
     TZFIELD%CSTDNAME   = ''
@@ -1949,7 +1949,7 @@ IF ( L2D_REL_FRC ) THEN
     TZFIELD%NGRID      = 1
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
-    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XRVREL(:,:,:,JT))
+    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XRVREL(:,:,:,JT))
 !
   ENDDO
 ENDIF
@@ -1957,11 +1957,11 @@ ENDIF
 !*       1.11bis   Eddy Fluxes variables    ! Modif PP
 !
 IF ( LTH_FLX ) THEN
-   CALL IO_WRITE_FIELD(TPFILE,'VT_FLX',CLUOUT,IRESP,XVTH_FLUX_M)
-   CALL IO_WRITE_FIELD(TPFILE,'WT_FLX',CLUOUT,IRESP,XWTH_FLUX_M)
+   CALL IO_WRITE_FIELD(TPFILE,'VT_FLX',CLUOUT,XVTH_FLUX_M)
+   CALL IO_WRITE_FIELD(TPFILE,'WT_FLX',CLUOUT,XWTH_FLUX_M)
 END IF
 !
-IF ( LUV_FLX) CALL IO_WRITE_FIELD(TPFILE,'VU_FLX',CLUOUT,IRESP,XVU_FLUX_M)
+IF ( LUV_FLX) CALL IO_WRITE_FIELD(TPFILE,'VU_FLX',CLUOUT,XVU_FLUX_M)
 !
 !*       1.12   Balloon variables
 !
@@ -1979,36 +1979,36 @@ IF ( CPROGRAM=='REAL  ' ) THEN
 !
 !             i) Total fields (TOT=BASIC+TOTDIS)
 !
-      CALL IO_WRITE_FIELD(TPFILE,'UT15',   CLUOUT,IRESP,XUTOT)
-      CALL IO_WRITE_FIELD(TPFILE,'VT15',   CLUOUT,IRESP,XVTOT)
-      CALL IO_WRITE_FIELD(TPFILE,'TEMPTOT',CLUOUT,IRESP,XTTOT)
-      IF (INDEX(CFILTERING,'P')/=0) CALL IO_WRITE_FIELD(TPFILE,'PRESTOT',CLUOUT,IRESP,XPTOT)
-      IF (INDEX(CFILTERING,'Q')/=0) CALL IO_WRITE_FIELD(TPFILE,'HUMTOT', CLUOUT,IRESP,XQTOT)
+      CALL IO_WRITE_FIELD(TPFILE,'UT15',   CLUOUT,XUTOT)
+      CALL IO_WRITE_FIELD(TPFILE,'VT15',   CLUOUT,XVTOT)
+      CALL IO_WRITE_FIELD(TPFILE,'TEMPTOT',CLUOUT,XTTOT)
+      IF (INDEX(CFILTERING,'P')/=0) CALL IO_WRITE_FIELD(TPFILE,'PRESTOT',CLUOUT,XPTOT)
+      IF (INDEX(CFILTERING,'Q')/=0) CALL IO_WRITE_FIELD(TPFILE,'HUMTOT', CLUOUT,XQTOT)
 !
 !             ii) Environmental fields (ENV=TOT-VORDIS)
 !
-      CALL IO_WRITE_FIELD(TPFILE,'UT16',   CLUOUT,IRESP,XUENV)
-      CALL IO_WRITE_FIELD(TPFILE,'VT16',   CLUOUT,IRESP,XVENV)
-      CALL IO_WRITE_FIELD(TPFILE,'TEMPENV',CLUOUT,IRESP,XTENV)
-      IF (INDEX(CFILTERING,'P')/=0) CALL IO_WRITE_FIELD(TPFILE,'PRESENV',CLUOUT,IRESP,XPENV)
-      IF (INDEX(CFILTERING,'Q')/=0) CALL IO_WRITE_FIELD(TPFILE,'HUMENV', CLUOUT,IRESP,XQENV)
+      CALL IO_WRITE_FIELD(TPFILE,'UT16',   CLUOUT,XUENV)
+      CALL IO_WRITE_FIELD(TPFILE,'VT16',   CLUOUT,XVENV)
+      CALL IO_WRITE_FIELD(TPFILE,'TEMPENV',CLUOUT,XTENV)
+      IF (INDEX(CFILTERING,'P')/=0) CALL IO_WRITE_FIELD(TPFILE,'PRESENV',CLUOUT,XPENV)
+      IF (INDEX(CFILTERING,'Q')/=0) CALL IO_WRITE_FIELD(TPFILE,'HUMENV', CLUOUT,XQENV)
 !
     END IF
     IF (NDIAG_FILT >=1) THEN
 !
 !             iii) Basic (filtered) fields
 !
-      CALL IO_WRITE_FIELD(TPFILE,'UT17',   CLUOUT,IRESP,XUBASIC)
-      CALL IO_WRITE_FIELD(TPFILE,'VT17',   CLUOUT,IRESP,XVBASIC)
-      CALL IO_WRITE_FIELD(TPFILE,'TEMPBAS',CLUOUT,IRESP,XTBASIC)
-      IF (INDEX(CFILTERING,'P')/=0) CALL IO_WRITE_FIELD(TPFILE,'PRESBAS',CLUOUT,IRESP,XPBASIC)
-      IF (INDEX(CFILTERING,'Q')/=0) CALL IO_WRITE_FIELD(TPFILE,'HUMBAS', CLUOUT,IRESP,XQBASIC)
+      CALL IO_WRITE_FIELD(TPFILE,'UT17',   CLUOUT,XUBASIC)
+      CALL IO_WRITE_FIELD(TPFILE,'VT17',   CLUOUT,XVBASIC)
+      CALL IO_WRITE_FIELD(TPFILE,'TEMPBAS',CLUOUT,XTBASIC)
+      IF (INDEX(CFILTERING,'P')/=0) CALL IO_WRITE_FIELD(TPFILE,'PRESBAS',CLUOUT,XPBASIC)
+      IF (INDEX(CFILTERING,'Q')/=0) CALL IO_WRITE_FIELD(TPFILE,'HUMBAS', CLUOUT,XQBASIC)
     END IF
     IF (NDIAG_FILT >=2) THEN
 !
 !             iv) Total disturbance tangential wind
 !
-      CALL IO_WRITE_FIELD(TPFILE,'VTDIS',CLUOUT,IRESP,XVTDIS)
+      CALL IO_WRITE_FIELD(TPFILE,'VTDIS',CLUOUT,XVTDIS)
 !
     END IF
 !
@@ -2028,7 +2028,7 @@ IF ( CPROGRAM=='REAL  ' ) THEN
       TZFIELD%CMNHNAME   = ADJUSTL(CDUMMY_2D(JSA))
       TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
       TZFIELD%CCOMMENT   = 'X_Y_Z_'//TRIM(TZFIELD%CMNHNAME)
-      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,IRESP,XDUMMY_2D(:,:,JSA))
+      CALL IO_WRITE_FIELD(TPFILE,TZFIELD,CLUOUT,XDUMMY_2D(:,:,JSA))
     END DO
   END IF
 !
diff --git a/src/MNH/write_surf_mnh.f90 b/src/MNH/write_surf_mnh.f90
index f61451634..f324aa212 100644
--- a/src/MNH/write_surf_mnh.f90
+++ b/src/MNH/write_surf_mnh.f90
@@ -98,7 +98,7 @@ ELSE
   TZFIELD%NGRID      = 0
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 0
-  CALL IO_WRITE_FIELD(TFILE_SURFEX,TZFIELD,COUT,KRESP,PFIELD)
+  CALL IO_WRITE_FIELD(TFILE_SURFEX,TZFIELD,COUT,PFIELD,KRESP)
 !
   IF (KRESP /=0) THEN
     WRITE ( YMSG, '( I5 )' ) KRESP
@@ -306,7 +306,7 @@ IF (      (CSTORAGE_TYPE=='PG' .OR. CSTORAGE_TYPE=='SU')  &
     TZFIELD%NGRID      = 4
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 1
-    CALL IO_WRITE_FIELD(TFILE_SURFEX,TZFIELD,COUT,KRESP,ZW1D(:))
+    CALL IO_WRITE_FIELD(TFILE_SURFEX,TZFIELD,COUT,ZW1D(:),KRESP)
   END IF
   IF (HDIR=='H') THEN
     TZFIELD%CMNHNAME   = 'XHAT'
@@ -318,7 +318,7 @@ IF (      (CSTORAGE_TYPE=='PG' .OR. CSTORAGE_TYPE=='SU')  &
     TZFIELD%NGRID      = 4
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 1
-    CALL IO_WRITE_FIELD(TFILE_SURFEX,TZFIELD,COUT,KRESP,ZW1D(1+NHALO:IIU-NHALO))
+    CALL IO_WRITE_FIELD(TFILE_SURFEX,TZFIELD,COUT,ZW1D(1+NHALO:IIU-NHALO),KRESP)
   END IF
   DEALLOCATE(ZW1D)
 ELSE IF ( (CSTORAGE_TYPE=='PG' .OR. CSTORAGE_TYPE=='SU')  &
@@ -346,7 +346,7 @@ ELSE IF ( (CSTORAGE_TYPE=='PG' .OR. CSTORAGE_TYPE=='SU')  &
     TZFIELD%NGRID      = 4
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 1
-    CALL IO_WRITE_FIELD(TFILE_SURFEX,TZFIELD,COUT,KRESP,ZW1D(:))
+    CALL IO_WRITE_FIELD(TFILE_SURFEX,TZFIELD,COUT,ZW1D(:),KRESP)
   END IF
   IF (HDIR=='H') THEN
     TZFIELD%CMNHNAME   = 'YHAT'
@@ -358,7 +358,7 @@ ELSE IF ( (CSTORAGE_TYPE=='PG' .OR. CSTORAGE_TYPE=='SU')  &
     TZFIELD%NGRID      = 4
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 1
-    CALL IO_WRITE_FIELD(TFILE_SURFEX,TZFIELD,COUT,KRESP,ZW1D(1+NHALO:IJU-NHALO))
+    CALL IO_WRITE_FIELD(TFILE_SURFEX,TZFIELD,COUT,ZW1D(1+NHALO:IJU-NHALO),KRESP)
   END IF
   DEALLOCATE(ZW1D)
 ELSE IF (HDIR=='H') THEN
@@ -371,7 +371,7 @@ ELSE IF (HDIR=='H') THEN
   TZFIELD%NGRID      = 4
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 2
-  CALL IO_WRITE_FIELD(TFILE_SURFEX,TZFIELD,COUT,KRESP,ZWORK(1+NHALO:IIU-NHALO,1+NHALO:IJU-NHALO))
+  CALL IO_WRITE_FIELD(TFILE_SURFEX,TZFIELD,COUT,ZWORK(1+NHALO:IIU-NHALO,1+NHALO:IJU-NHALO),KRESP)
 ELSE IF (HDIR=='A') THEN
   TZFIELD%CMNHNAME   = TRIM(HREC)
   TZFIELD%CSTDNAME   = ''
@@ -382,7 +382,7 @@ ELSE IF (HDIR=='A') THEN
   TZFIELD%NGRID      = 4
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 2
-  CALL IO_WRITE_FIELD(TFILE_SURFEX,TZFIELD,COUT,KRESP,ZWORK(:,:))
+  CALL IO_WRITE_FIELD(TFILE_SURFEX,TZFIELD,COUT,ZWORK(:,:),KRESP)
 ELSE
   TZFIELD%CMNHNAME   = TRIM(HREC)
   TZFIELD%CSTDNAME   = ''
@@ -393,7 +393,7 @@ ELSE
   TZFIELD%NGRID      = 4
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 1
-  CALL IO_WRITE_FIELD(TFILE_SURFEX,TZFIELD,COUT,KRESP,PFIELD(:))
+  CALL IO_WRITE_FIELD(TFILE_SURFEX,TZFIELD,COUT,PFIELD(:),KRESP)
 END IF
 !
 IF (KRESP /=0) THEN
@@ -550,8 +550,12 @@ TZFIELD%CCOMMENT   = ''
 TZFIELD%NGRID      = 0
 TZFIELD%NTYPE      = TYPELOG
 TZFIELD%NDIMS      = 0
-CALL IO_WRITE_FIELD(TFILE_SURFEX,TZFIELD,COUT,KRESP,GCOVER_PACKED)
-
+CALL IO_WRITE_FIELD(TFILE_SURFEX,TZFIELD,COUT,GCOVER_PACKED,KRESP)
+!
+IF (KRESP /=0) THEN
+  WRITE ( YMSG, '( I5 )' ) KRESP
+  CALL PRINT_MSG(NVERB_ERROR,'IO','WRITE_SURFX2COV_MNH','error when writing article '//TRIM(HREC)//' KRESP='//YMSG)
+END IF
 !
 ALLOCATE(ZWORK(IIU,IJU))
 ZWORK(:,:) = XUNDEF
@@ -579,7 +583,7 @@ IF (.NOT. GCOVER_PACKED) THEN
     TZFIELD%CDIR       = YDIR
     IF (OFLAG(JL2)) THEN
       ICOVER=ICOVER+1
-      CALL IO_WRITE_FIELD(TFILE_SURFEX,TZFIELD,COUT,KRESP,ZWORK3D(1+NHALO:IIU-NHALO,1+NHALO:IJU-NHALO,ICOVER))
+      CALL IO_WRITE_FIELD(TFILE_SURFEX,TZFIELD,COUT,ZWORK3D(1+NHALO:IIU-NHALO,1+NHALO:IJU-NHALO,ICOVER),KRESP)
     END IF
   END DO
 ELSE 
@@ -592,7 +596,7 @@ ELSE
   TZFIELD%NGRID      = 4
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 3
-  CALL IO_WRITE_FIELD(TFILE_SURFEX,TZFIELD,COUT,KRESP,ZWORK3D(1+NHALO:IIU-NHALO,1+NHALO:IJU-NHALO,:))
+  CALL IO_WRITE_FIELD(TFILE_SURFEX,TZFIELD,COUT,ZWORK3D(1+NHALO:IIU-NHALO,1+NHALO:IJU-NHALO,:),KRESP)
 END IF
 !
 DEALLOCATE(ZWORK3D)
@@ -738,7 +742,7 @@ IF (HDIR=='H' .OR. HDIR=='A') THEN
     TZFIELD%NGRID      = 4
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
-    CALL IO_WRITE_FIELD(TFILE_SURFEX,TZFIELD,COUT,KRESP,ZWORK(1+NHALO:IIU-NHALO,1+NHALO:IJU-NHALO,:))
+    CALL IO_WRITE_FIELD(TFILE_SURFEX,TZFIELD,COUT,ZWORK(1+NHALO:IIU-NHALO,1+NHALO:IJU-NHALO,:),KRESP)
   END IF
   IF (HDIR=='A') THEN
     TZFIELD%CMNHNAME   = TRIM(HREC)
@@ -750,7 +754,7 @@ IF (HDIR=='H' .OR. HDIR=='A') THEN
     TZFIELD%NGRID      = 4
     TZFIELD%NTYPE      = TYPEREAL
     TZFIELD%NDIMS      = 3
-    CALL IO_WRITE_FIELD(TFILE_SURFEX,TZFIELD,COUT,KRESP,ZWORK(:,:,:))
+    CALL IO_WRITE_FIELD(TFILE_SURFEX,TZFIELD,COUT,ZWORK(:,:,:),KRESP)
   END IF
 !
   DEALLOCATE(ZWORK)
@@ -769,7 +773,7 @@ ELSE IF (HDIR=='-') THEN
   TZFIELD%NGRID      = 4
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 2
-  CALL IO_WRITE_FIELD(TFILE_SURFEX,TZFIELD,COUT,KRESP,ZFIELD(:,:))
+  CALL IO_WRITE_FIELD(TFILE_SURFEX,TZFIELD,COUT,ZFIELD(:,:),KRESP)
 !
   DEALLOCATE(ZFIELD)
 END IF
@@ -869,7 +873,7 @@ ELSE
   TZFIELD%NGRID      = 0
   TZFIELD%NTYPE      = TYPEINT
   TZFIELD%NDIMS      = 0
-  CALL IO_WRITE_FIELD(TFILE_SURFEX,TZFIELD,COUT,KRESP,IFIELD)
+  CALL IO_WRITE_FIELD(TFILE_SURFEX,TZFIELD,COUT,IFIELD,KRESP)
 END IF
 !
 IF (KRESP /=0) THEN
@@ -967,7 +971,7 @@ IF (HDIR=='-') THEN
   TZFIELD%NGRID      = 0
   TZFIELD%NTYPE      = TYPEINT
   TZFIELD%NDIMS      = 1
-  CALL IO_WRITE_FIELD(TFILE_SURFEX,TZFIELD,COUT,KRESP,KFIELD)
+  CALL IO_WRITE_FIELD(TFILE_SURFEX,TZFIELD,COUT,KFIELD,KRESP)
 !
 ELSE IF (HDIR=='H') THEN
 !
@@ -985,7 +989,7 @@ ELSE IF (HDIR=='H') THEN
   TZFIELD%NGRID      = 4
   TZFIELD%NTYPE      = TYPEINT
   TZFIELD%NDIMS      = 2
-  CALL IO_WRITE_FIELD(TFILE_SURFEX,TZFIELD,COUT,KRESP,IWORK(:,:))
+  CALL IO_WRITE_FIELD(TFILE_SURFEX,TZFIELD,COUT,IWORK(:,:),KRESP)
 !
   DEALLOCATE(IWORK)
 END IF
@@ -1071,7 +1075,7 @@ IF ( (CSTORAGE_TYPE=='PG' .OR. CSTORAGE_TYPE=='SU')  &
   ELSE IF (HFIELD(1:10)=='CARTESIAN ') THEN
     GCARTESIAN = .TRUE.
   END IF
-!
+  !
   TZFIELD%CMNHNAME   = 'CARTESIAN'
   TZFIELD%CSTDNAME   = ''
   TZFIELD%CLONGNAME  = 'SURFEX: CARTESIAN'
@@ -1081,8 +1085,13 @@ IF ( (CSTORAGE_TYPE=='PG' .OR. CSTORAGE_TYPE=='SU')  &
   TZFIELD%NGRID      = 0
   TZFIELD%NTYPE      = TYPELOG
   TZFIELD%NDIMS      = 0
-  CALL IO_WRITE_FIELD(TFILE_SURFEX,TZFIELD,COUT,KRESP,GCARTESIAN)
-!
+  CALL IO_WRITE_FIELD(TFILE_SURFEX,TZFIELD,COUT,GCARTESIAN,KRESP)
+  !
+  IF (KRESP /=0) THEN
+    WRITE ( YMSG, '( I5 )' ) KRESP
+    CALL PRINT_MSG(NVERB_ERROR,'IO','WRITE_SURFC0_MNH','error when writing article '//TRIM(HREC)//' KRESP='//YMSG)
+  END IF
+  !
 END IF
 !
 TZFIELD%CMNHNAME   = TRIM(HREC)
@@ -1094,7 +1103,7 @@ TZFIELD%CCOMMENT   = TRIM(HCOMMENT)
 TZFIELD%NGRID      = 0
 TZFIELD%NTYPE      = TYPECHAR
 TZFIELD%NDIMS      = 0
-CALL IO_WRITE_FIELD(TFILE_SURFEX,TZFIELD,COUT,KRESP,HFIELD)
+CALL IO_WRITE_FIELD(TFILE_SURFEX,TZFIELD,COUT,HFIELD,KRESP)
 !
 IF (KRESP /=0) THEN
   WRITE ( YMSG, '( I5 )' ) KRESP
@@ -1195,7 +1204,7 @@ IF (HDIR=='-') THEN
     TZFIELD%NGRID      = 0
     TZFIELD%NTYPE      = TYPELOG
     TZFIELD%NDIMS      = 1
-    CALL IO_WRITE_FIELD(TFILE_SURFEX,TZFIELD,COUT,KRESP,OFIELD(:))
+    CALL IO_WRITE_FIELD(TFILE_SURFEX,TZFIELD,COUT,OFIELD(:),KRESP)
   END IF
 !
 ELSE IF (HDIR=='H') THEN
@@ -1218,7 +1227,7 @@ ELSE IF (HDIR=='H') THEN
   TZFIELD%NGRID      = 4
   TZFIELD%NTYPE      = TYPEINT
   TZFIELD%NDIMS      = 2
-  CALL IO_WRITE_FIELD(TFILE_SURFEX,TZFIELD,COUT,KRESP,IWORK(:,:))
+  CALL IO_WRITE_FIELD(TFILE_SURFEX,TZFIELD,COUT,IWORK(:,:),KRESP)
   !
   DEALLOCATE(IWORK)
   DEALLOCATE(GWORK)
@@ -1311,7 +1320,7 @@ ELSE
   TZFIELD%NGRID      = 0
   TZFIELD%NTYPE      = TYPELOG
   TZFIELD%NDIMS      = 0
-  CALL IO_WRITE_FIELD(TFILE_SURFEX,TZFIELD,COUT,KRESP,OFIELD)
+  CALL IO_WRITE_FIELD(TFILE_SURFEX,TZFIELD,COUT,OFIELD,KRESP)
 END IF
 !
 IF (KRESP /=0) THEN
@@ -1414,7 +1423,7 @@ ELSE
   TZFIELD%NTYPE      = TYPEDATE
   TZFIELD%NDIMS      = 0
   !
-  CALL IO_WRITE_FIELD(TFILE_SURFEX,TZFIELD,COUT,KRESP,TZDATA)
+  CALL IO_WRITE_FIELD(TFILE_SURFEX,TZFIELD,COUT,TZDATA,KRESP)
 END IF
 !
 IF (KRESP /=0) THEN
@@ -1516,7 +1525,7 @@ ELSE
   TZFIELD%NTYPE      = TYPEINT
   TZFIELD%NDIMS      = 2
   !
-  CALL IO_WRITE_FIELD(TFILE_SURFEX,TZFIELD,COUT,KRESP,ITDATE(:,:))
+  CALL IO_WRITE_FIELD(TFILE_SURFEX,TZFIELD,COUT,ITDATE(:,:),KRESP)
   !
   IF (KRESP /=0) THEN
     WRITE ( YMSG, '( I5 )' ) KRESP
@@ -1533,7 +1542,7 @@ ELSE
   TZFIELD%NTYPE      = TYPEREAL
   TZFIELD%NDIMS      = 1
   !
-  CALL IO_WRITE_FIELD(TFILE_SURFEX,TZFIELD,COUT,KRESP,PTIME(:))
+  CALL IO_WRITE_FIELD(TFILE_SURFEX,TZFIELD,COUT,PTIME(:),KRESP)
 !
   IF (KRESP /=0) THEN
     WRITE ( YMSG, '( I5 )' ) KRESP
diff --git a/src/MNH/zoom_pgd.f90 b/src/MNH/zoom_pgd.f90
index d3289e3c6..b9d8632fd 100644
--- a/src/MNH/zoom_pgd.f90
+++ b/src/MNH/zoom_pgd.f90
@@ -248,25 +248,25 @@ IF (CSURF=='EXTE') THEN
 ELSE
   ALLOCATE(ZZS2(NIMAX+2*JPHEXT,NJMAX+2*JPHEXT))
   ZZS2(:,:)=ZZS1(IXOR:IXOR+NIMAX+2*JPHEXT-1,IYOR:IYOR+NJMAX+2*JPHEXT-1)
-  CALL IO_WRITE_FIELD(TZZOOMFILE,'ZS',CLUOUT0,IRESP,ZZS2)
+  CALL IO_WRITE_FIELD(TZZOOMFILE,'ZS',CLUOUT0,ZZS2)
 END IF
 !
 ALLOCATE(ZZSMT2(NIMAX+2*JPHEXT,NJMAX+2*JPHEXT))
 ZZSMT2(:,:)=ZZSMT1(IXOR:IXOR+NIMAX+2*JPHEXT-1,IYOR:IYOR+NJMAX+2*JPHEXT-1)
-CALL IO_WRITE_FIELD(TZZOOMFILE,'ZSMT',CLUOUT0,IRESP,ZZSMT2)
+CALL IO_WRITE_FIELD(TZZOOMFILE,'ZSMT',CLUOUT0,ZZSMT2)
 !
 !*    2.7     Write configuration variables in the output file
 !             ------------------------------------------------
 !
 CALL IO_WRITE_HEADER(TZZOOMFILE,CLUOUT0)
-CALL IO_WRITE_FIELD(TZZOOMFILE,'DXRATIO',CLUOUT0,IRESP,IDXRATIO)
-CALL IO_WRITE_FIELD(TZZOOMFILE,'DYRATIO',CLUOUT0,IRESP,IDYRATIO)
-CALL IO_WRITE_FIELD(TZZOOMFILE,'XOR',    CLUOUT0,IRESP,IXOR_DAD)
-CALL IO_WRITE_FIELD(TZZOOMFILE,'YOR',    CLUOUT0,IRESP,IYOR_DAD)
-CALL IO_WRITE_FIELD(TZZOOMFILE,'L1D',    CLUOUT0,IRESP,L1D)
-CALL IO_WRITE_FIELD(TZZOOMFILE,'L2D',    CLUOUT0,IRESP,L2D)
-CALL IO_WRITE_FIELD(TZZOOMFILE,'PACK',   CLUOUT0,IRESP,LPACK)
-CALL IO_WRITE_FIELD(TZZOOMFILE,'SURF',   CLUOUT0,IRESP,CSURF)
+CALL IO_WRITE_FIELD(TZZOOMFILE,'DXRATIO',CLUOUT0,IDXRATIO)
+CALL IO_WRITE_FIELD(TZZOOMFILE,'DYRATIO',CLUOUT0,IDYRATIO)
+CALL IO_WRITE_FIELD(TZZOOMFILE,'XOR',    CLUOUT0,IXOR_DAD)
+CALL IO_WRITE_FIELD(TZZOOMFILE,'YOR',    CLUOUT0,IYOR_DAD)
+CALL IO_WRITE_FIELD(TZZOOMFILE,'L1D',    CLUOUT0,L1D)
+CALL IO_WRITE_FIELD(TZZOOMFILE,'L2D',    CLUOUT0,L2D)
+CALL IO_WRITE_FIELD(TZZOOMFILE,'PACK',   CLUOUT0,LPACK)
+CALL IO_WRITE_FIELD(TZZOOMFILE,'SURF',   CLUOUT0,CSURF)
 CALL IO_FILE_CLOSE_ll(TZZOOMFILE,CLUOUT0,IRESP)
 !
 !*    2.8     Shift to new PGD file
diff --git a/src/MNH/zsmt_pgd.f90 b/src/MNH/zsmt_pgd.f90
index 3ee676016..969a27aa8 100644
--- a/src/MNH/zsmt_pgd.f90
+++ b/src/MNH/zsmt_pgd.f90
@@ -213,8 +213,8 @@ END IF
 !              ---------------------------------------
 !
 !
-CALL IO_WRITE_FIELD(TPFILE,'ZS',  CLUOUT0,IRESP,ZFINE_ZS)
-CALL IO_WRITE_FIELD(TPFILE,'ZSMT',CLUOUT0,IRESP,ZSLEVE_ZS)
+CALL IO_WRITE_FIELD(TPFILE,'ZS',  CLUOUT0,ZFINE_ZS)
+CALL IO_WRITE_FIELD(TPFILE,'ZSMT',CLUOUT0,ZSLEVE_ZS)
 !
 DEALLOCATE(ZZS)
 DEALLOCATE(ZFINE_ZS)
-- 
GitLab