diff --git a/src/LIB/SURCOUCHE/src/fmreadwrit.f90 b/src/LIB/SURCOUCHE/src/fmreadwrit.f90
index b39e2eeeef0e80cb8d95ede15209283593bf7a7d..9a208a115ffc550e6e59f58b7b45e0aa6bd854ed 100644
--- a/src/LIB/SURCOUCHE/src/fmreadwrit.f90
+++ b/src/LIB/SURCOUCHE/src/fmreadwrit.f90
@@ -749,7 +749,7 @@ ILENG = 1
 CALL WRITE_PREPARE(TPFIELD,ILENG,IWORK,ITOTAL,IRESP)
 !
 IF (IRESP==0) THEN
-  IWORK(LEN_TRIM(TPFIELD%CCOMMENT)+3) = TRANSFER(PFIELD,IWORK(1))
+  IWORK(LEN(TPFIELD%CCOMMENT)+3) = TRANSFER(PFIELD,IWORK(1))
   YRECFM=TRIM(TPFIELD%CMNHNAME)
   IF( LEN_TRIM(TPFIELD%CMNHNAME) > LEN(YRECFM) ) &
     CALL PRINT_MSG(NVERB_WARNING,'IO','IO_WRITE_FIELD_LFI_X0','field name was truncated to '&
@@ -788,7 +788,7 @@ ILENG = SIZE(PFIELD)
 CALL WRITE_PREPARE(TPFIELD,ILENG,IWORK,ITOTAL,IRESP)
 !
 IF (IRESP==0) THEN
-  IWORK(LEN_TRIM(TPFIELD%CCOMMENT)+3:) = TRANSFER(PFIELD,IWORK(1),SIZE(PFIELD))
+  IWORK(LEN(TPFIELD%CCOMMENT)+3:) = TRANSFER(PFIELD,IWORK(1),SIZE(PFIELD))
   YRECFM=TRIM(TPFIELD%CMNHNAME)
   IF( LEN_TRIM(TPFIELD%CMNHNAME) > LEN(YRECFM) ) &
     CALL PRINT_MSG(NVERB_WARNING,'IO','IO_WRITE_FIELD_LFI_X1','field name was truncated to '&
@@ -847,7 +847,7 @@ CALL PRINT_MSG(NVERB_DEBUG,'IO','IO_WRITE_FIELD_LFI_X2','writing '//TRIM(YVARNAM
 CALL WRITE_PREPARE(TPFIELD,ILENG,IWORK,ITOTAL,IRESP)
 !
 IF (IRESP==0) THEN
-  IWORK(LEN_TRIM(TPFIELD%CCOMMENT)+3:) = TRANSFER(PFIELD,IWORK(1),SIZE(PFIELD))
+  IWORK(LEN(TPFIELD%CCOMMENT)+3:) = TRANSFER(PFIELD,IWORK(1),SIZE(PFIELD))
   YRECFM=TRIM(YVARNAME)
   IF( LEN_TRIM(YVARNAME) > LEN(YRECFM) ) &
     CALL PRINT_MSG(NVERB_WARNING,'IO','IO_WRITE_FIELD_LFI_X2','field name was truncated to '&
@@ -886,7 +886,7 @@ ILENG = SIZE(PFIELD)
 CALL WRITE_PREPARE(TPFIELD,ILENG,IWORK,ITOTAL,IRESP)
 !
 IF (IRESP==0) THEN
-  IWORK(LEN_TRIM(TPFIELD%CCOMMENT)+3:) = TRANSFER(PFIELD,IWORK(1),SIZE(PFIELD))
+  IWORK(LEN(TPFIELD%CCOMMENT)+3:) = TRANSFER(PFIELD,IWORK(1),SIZE(PFIELD))
   YRECFM=TRIM(TPFIELD%CMNHNAME)
   IF( LEN_TRIM(TPFIELD%CMNHNAME) > LEN(YRECFM) ) &
     CALL PRINT_MSG(NVERB_WARNING,'IO','IO_WRITE_FIELD_LFI_X3','field name was truncated to '&
@@ -925,7 +925,7 @@ ILENG = SIZE(PFIELD)
 CALL WRITE_PREPARE(TPFIELD,ILENG,IWORK,ITOTAL,IRESP)
 !
 IF (IRESP==0) THEN
-  IWORK(LEN_TRIM(TPFIELD%CCOMMENT)+3:) = TRANSFER(PFIELD,IWORK(1),SIZE(PFIELD))
+  IWORK(LEN(TPFIELD%CCOMMENT)+3:) = TRANSFER(PFIELD,IWORK(1),SIZE(PFIELD))
   YRECFM=TRIM(TPFIELD%CMNHNAME)
   IF( LEN_TRIM(TPFIELD%CMNHNAME) > LEN(YRECFM) ) &
     CALL PRINT_MSG(NVERB_WARNING,'IO','IO_WRITE_FIELD_LFI_X4','field name was truncated to '&
@@ -964,7 +964,7 @@ ILENG = SIZE(PFIELD)
 CALL WRITE_PREPARE(TPFIELD,ILENG,IWORK,ITOTAL,IRESP)
 !
 IF (IRESP==0) THEN
-  IWORK(LEN_TRIM(TPFIELD%CCOMMENT)+3:) = TRANSFER(PFIELD,IWORK(1),SIZE(PFIELD))
+  IWORK(LEN(TPFIELD%CCOMMENT)+3:) = TRANSFER(PFIELD,IWORK(1),SIZE(PFIELD))
   YRECFM=TRIM(TPFIELD%CMNHNAME)
   IF( LEN_TRIM(TPFIELD%CMNHNAME) > LEN(YRECFM) ) &
     CALL PRINT_MSG(NVERB_WARNING,'IO','IO_WRITE_FIELD_LFI_X5','field name was truncated to '&
@@ -1003,7 +1003,7 @@ ILENG = SIZE(PFIELD)
 CALL WRITE_PREPARE(TPFIELD,ILENG,IWORK,ITOTAL,IRESP)
 !
 IF (IRESP==0) THEN
-  IWORK(LEN_TRIM(TPFIELD%CCOMMENT)+3:) = TRANSFER(PFIELD,IWORK(1),SIZE(PFIELD))
+  IWORK(LEN(TPFIELD%CCOMMENT)+3:) = TRANSFER(PFIELD,IWORK(1),SIZE(PFIELD))
   YRECFM=TRIM(TPFIELD%CMNHNAME)
   IF( LEN_TRIM(TPFIELD%CMNHNAME) > LEN(YRECFM) ) &
     CALL PRINT_MSG(NVERB_WARNING,'IO','IO_WRITE_FIELD_LFI_X6','field name was truncated to '&
@@ -1042,7 +1042,7 @@ ILENG = 1
 CALL WRITE_PREPARE(TPFIELD,ILENG,IWORK,ITOTAL,IRESP)
 !
 IF (IRESP==0) THEN
-  IWORK(LEN_TRIM(TPFIELD%CCOMMENT)+3)=KFIELD
+  IWORK(LEN(TPFIELD%CCOMMENT)+3)=KFIELD
   YRECFM=TRIM(TPFIELD%CMNHNAME)
   IF( LEN_TRIM(TPFIELD%CMNHNAME) > LEN(YRECFM) ) &
     CALL PRINT_MSG(NVERB_WARNING,'IO','IO_WRITE_FIELD_LFI_N0','field name was truncated to '&
@@ -1081,7 +1081,7 @@ ILENG = SIZE(KFIELD)
 CALL WRITE_PREPARE(TPFIELD,ILENG,IWORK,ITOTAL,IRESP)
 !
 IF (IRESP==0) THEN
-  IWORK(LEN_TRIM(TPFIELD%CCOMMENT)+3:) = KFIELD(:)
+  IWORK(LEN(TPFIELD%CCOMMENT)+3:) = KFIELD(:)
   YRECFM=TRIM(TPFIELD%CMNHNAME)
   IF( LEN_TRIM(TPFIELD%CMNHNAME) > LEN(YRECFM) ) &
     CALL PRINT_MSG(NVERB_WARNING,'IO','IO_WRITE_FIELD_LFI_N1','field name was truncated to '&
@@ -1120,7 +1120,7 @@ ILENG = SIZE(KFIELD)
 CALL WRITE_PREPARE(TPFIELD,ILENG,IWORK,ITOTAL,IRESP)
 !
 IF (IRESP==0) THEN
-  IWORK(LEN_TRIM(TPFIELD%CCOMMENT)+3:) = RESHAPE( KFIELD(:,:) , (/ SIZE(KFIELD) /) )
+  IWORK(LEN(TPFIELD%CCOMMENT)+3:) = RESHAPE( KFIELD(:,:) , (/ SIZE(KFIELD) /) )
   YRECFM=TRIM(TPFIELD%CMNHNAME)
   IF( LEN_TRIM(TPFIELD%CMNHNAME) > LEN(YRECFM) ) &
     CALL PRINT_MSG(NVERB_WARNING,'IO','IO_WRITE_FIELD_LFI_N2','field name was truncated to '&
@@ -1159,7 +1159,7 @@ ILENG = SIZE(KFIELD)
 CALL WRITE_PREPARE(TPFIELD,ILENG,IWORK,ITOTAL,IRESP)
 !
 IF (IRESP==0) THEN
-  IWORK(LEN_TRIM(TPFIELD%CCOMMENT)+3:) = RESHAPE( KFIELD(:,:,:) , (/ SIZE(KFIELD) /) )
+  IWORK(LEN(TPFIELD%CCOMMENT)+3:) = RESHAPE( KFIELD(:,:,:) , (/ SIZE(KFIELD) /) )
   YRECFM=TRIM(TPFIELD%CMNHNAME)
   IF( LEN_TRIM(TPFIELD%CMNHNAME) > LEN(YRECFM) ) &
     CALL PRINT_MSG(NVERB_WARNING,'IO','IO_WRITE_FIELD_LFI_N3','field name was truncated to '&
@@ -1206,7 +1206,7 @@ END IF
 CALL WRITE_PREPARE(TPFIELD,ILENG,IWORK,ITOTAL,IRESP)
 !
 IF (IRESP==0) THEN
-  IWORK(LEN_TRIM(TPFIELD%CCOMMENT)+3)=IFIELD
+  IWORK(LEN(TPFIELD%CCOMMENT)+3)=IFIELD
   YRECFM=TRIM(TPFIELD%CMNHNAME)
   IF( LEN_TRIM(TPFIELD%CMNHNAME) > LEN(YRECFM) ) &
     CALL PRINT_MSG(NVERB_WARNING,'IO','IO_WRITE_FIELD_LFI_L0','field name was truncated to '&
@@ -1253,7 +1253,7 @@ END WHERE
 CALL WRITE_PREPARE(TPFIELD,ILENG,IWORK,ITOTAL,IRESP)
 !
 IF (IRESP==0) THEN
-  IWORK(LEN_TRIM(TPFIELD%CCOMMENT)+3:) = IFIELD(:)
+  IWORK(LEN(TPFIELD%CCOMMENT)+3:) = IFIELD(:)
   YRECFM=TRIM(TPFIELD%CMNHNAME)
   IF( LEN_TRIM(TPFIELD%CMNHNAME) > LEN(YRECFM) ) &
     CALL PRINT_MSG(NVERB_WARNING,'IO','IO_WRITE_FIELD_LFI_L1','field name was truncated to '&
@@ -1294,10 +1294,10 @@ CALL WRITE_PREPARE(TPFIELD,ILENG,IWORK,ITOTAL,IRESP)
 !
 IF (IRESP==0) THEN
   IF (ILENG==0) THEN
-    IWORK(LEN_TRIM(TPFIELD%CCOMMENT)+3)=IACHAR(' ')
+    IWORK(LEN(TPFIELD%CCOMMENT)+3)=IACHAR(' ')
   ELSE
     DO JLOOP=1,ILENG
-      IWORK(LEN_TRIM(TPFIELD%CCOMMENT)+2+JLOOP)=IACHAR(HFIELD(JLOOP:JLOOP))
+      IWORK(LEN(TPFIELD%CCOMMENT)+2+JLOOP)=IACHAR(HFIELD(JLOOP:JLOOP))
     END DO
   END IF
   YRECFM=TRIM(TPFIELD%CMNHNAME)
@@ -1351,7 +1351,7 @@ ILENG=SIZE(ITDATE)
 CALL WRITE_PREPARE(TZFIELD,ILENG,IWORK,ITOTAL,IRESP)
 !
 IF (IRESP==0) THEN
-  IWORK(LEN_TRIM(TZFIELD%CCOMMENT)+3:)=ITDATE(:)
+  IWORK(LEN(TZFIELD%CCOMMENT)+3:)=ITDATE(:)
   YRECFM=TRIM(TZFIELD%CMNHNAME)
   IF( LEN_TRIM(TZFIELD%CMNHNAME) > LEN(YRECFM) ) &
     CALL PRINT_MSG(NVERB_WARNING,'IO','IO_WRITE_FIELD_LFI_T0','field name was truncated to '&
@@ -1375,7 +1375,7 @@ ILENG=1
 CALL WRITE_PREPARE(TZFIELD,ILENG,IWORK,ITOTAL,IRESP)
 !
 IF (IRESP==0) THEN
-  IWORK(LEN_TRIM(TZFIELD%CCOMMENT)+3) = TRANSFER(TPDATA%TIME,IWORK(1))
+  IWORK(LEN(TZFIELD%CCOMMENT)+3) = TRANSFER(TPDATA%TIME,IWORK(1))
   YRECFM=TRIM(TZFIELD%CMNHNAME)
   IF( LEN_TRIM(TZFIELD%CMNHNAME) > LEN(YRECFM) ) &
     CALL PRINT_MSG(NVERB_WARNING,'IO','IO_WRITE_FIELD_LFI_T0','field name was truncated to '&
@@ -1401,7 +1401,7 @@ INTEGER                   :: ICOMLEN
 INTEGER                   :: J
 INTEGER,DIMENSION(JPXKRK) :: ICOMMENT
 !
-ICOMLEN = LEN_TRIM(TPFIELD%CCOMMENT)
+ICOMLEN = LEN(TPFIELD%CCOMMENT)
 KRESP = 0
 !
 IF (KLENG.LE.0) THEN