From a0120aa2f849c874c0382bfea13c5e80e4ecfe3a Mon Sep 17 00:00:00 2001
From: Philippe WAUTELET <philippe.wautelet@aero.obs-mip.fr>
Date: Fri, 2 Dec 2016 15:25:21 +0100
Subject: [PATCH] Philippe 02/12/2016: added NTYPE field to TFIELDDATA type

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

diff --git a/src/LIB/SURCOUCHE/src/mode_field.f90 b/src/LIB/SURCOUCHE/src/mode_field.f90
index 1aaeaac3c..4711e14b5 100644
--- a/src/LIB/SURCOUCHE/src/mode_field.f90
+++ b/src/LIB/SURCOUCHE/src/mode_field.f90
@@ -7,6 +7,7 @@ MODULE MODE_FIELD
 IMPLICIT NONE
 !
 INTEGER,PRIVATE,PARAMETER :: MAXFIELDS = 2
+INTEGER,PARAMETER :: TYPEUNDEF = -1, TYPEINT = 1, TYPELOG = 2, TYPEREAL = 3, TYPECHAR = 4
 !
 !Structure describing the characteristics of a field
 TYPE TFIELDDATA
@@ -17,6 +18,7 @@ TYPE TFIELDDATA
   CHARACTER(LEN=2)   :: CDIR      = '' !Type of the data field (XX,XY,--...)
   CHARACTER(LEN=100) :: CCOMMENT  = '' !Comment (for MesoNH, non CF convention)
   INTEGER            :: NGRID     = -1 !Localization on the model grid
+  INTEGER            :: NTYPE     = TYPEUNDEF !Datatype
 END TYPE TFIELDDATA
 !
 LOGICAL :: LFIELDLIST_ISINIT = .FALSE.
@@ -41,6 +43,7 @@ TFIELDLIST(IDX)%CUNITS     = ''
 TFIELDLIST(IDX)%CDIR       = '--'
 TFIELDLIST(IDX)%CCOMMENT   = ''
 TFIELDLIST(IDX)%NGRID      = 0
+TFIELDLIST(IDX)%NTYPE      = TYPEINT
 IDX = IDX+1
 !
 TFIELDLIST(IDX)%CMNHNAME   = 'UT'
@@ -50,6 +53,7 @@ TFIELDLIST(IDX)%CUNITS     = 'm s-1'
 TFIELDLIST(IDX)%CDIR       = 'XY'
 TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Z_U component of wind (m/s)'
 TFIELDLIST(IDX)%NGRID      = 2
+TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 IDX = IDX+1
 !
 LFIELDLIST_ISINIT = .TRUE.
-- 
GitLab