From 4f6bd1c2a3faed91380b6e8db23b9c0587a0d76f Mon Sep 17 00:00:00 2001
From: Philippe WAUTELET <philippe.wautelet@aero.obs-mip.fr>
Date: Thu, 24 May 2018 11:01:17 +0200
Subject: [PATCH] Philippe 24/05/2018: add missing fields for SPAWN that were
 ignored in TFIELDLIST

---
 src/LIB/SURCOUCHE/src/mode_field.f90 | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/LIB/SURCOUCHE/src/mode_field.f90 b/src/LIB/SURCOUCHE/src/mode_field.f90
index 9fd927236..69a89af12 100644
--- a/src/LIB/SURCOUCHE/src/mode_field.f90
+++ b/src/LIB/SURCOUCHE/src/mode_field.f90
@@ -2368,7 +2368,8 @@ ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 IDX = IDX+1
 !
 !
-IF (TRIM(CPROGRAM)=='MESONH' .OR. TRIM(CPROGRAM)=='DIAG' .OR. TRIM(CPROGRAM) == 'LFICDF') THEN
+IF (     TRIM(CPROGRAM) =='MESONH' .OR. TRIM(CPROGRAM) == 'DIAG'  &
+    .OR. TRIM(CPROGRAM) == 'LFICDF'.OR. TRIM(CPROGRAM) == 'SPAWN' ) THEN
 !
 IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 TFIELDLIST(IDX)%CMNHNAME   = 'DTHRAD'
@@ -2538,10 +2539,10 @@ TFIELDLIST(IDX)%LTIMEDEP   = .TRUE.
 ALLOCATE(TFIELDLIST(IDX)%TFIELD_X2D(IMODEL))
 IDX = IDX+1
 !
-END IF !CPROGRAM=MESONH .OR. DIAG .OR. LFICDF
+END IF !CPROGRAM=MESONH .OR. DIAG .OR. LFICDF .OR. SPAWN
 !
 !
-IF ( (TRIM(CPROGRAM) /= 'PGD' .AND. TRIM(CPROGRAM) /= 'NESPGD' .AND. TRIM(CPROGRAM) /= 'SPAWN') ) THEN
+IF ( TRIM(CPROGRAM) /= 'PGD' .AND. TRIM(CPROGRAM) /= 'NESPGD' ) THEN
 !
 IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 TFIELDLIST(IDX)%CMNHNAME   = 'COUNTCONV'
@@ -2837,7 +2838,7 @@ TFIELDLIST(IDX)%LTIMEDEP   = .TRUE.
 ALLOCATE(TFIELDLIST(IDX)%TFIELD_X2D(IMODEL))
 IDX = IDX+1
 !
-END IF !CPROGRAM/=PGD , NESPGD, SPAWN
+END IF !CPROGRAM/=PGD , NESPGD
 !
 !
 IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
-- 
GitLab