Merge tag 'PACK-MNH-V5-3-1' into MNH-54X-dev-IO
authorPhilippe WAUTELET <philippe.wautelet@aero.obs-mip.fr>
Fri, 27 Oct 2017 12:25:02 +0000 (14:25 +0200)
committerPhilippe WAUTELET <philippe.wautelet@aero.obs-mip.fr>
Fri, 27 Oct 2017 12:25:02 +0000 (14:25 +0200)
Phasage 5.3.1 -> 54X-dev-IO
Warning: not yet fully OK (compilation fails and some old IO subroutines are used)

# Conflicts:
# MY_RUN/KTEST/011_KW78CHEM/002_mesonh/run_mesonh_xyz
# src/LIB/SURCOUCHE/src/modd_io.f90
# src/LIB/SURCOUCHE/src/mode_fm.f90
# src/LIB/SURCOUCHE/src/mode_netcdf.f90
# src/MNH/advection_metsv.f90
# src/MNH/c2r2_adjust.f90
# src/MNH/call_rttov11.f90
# src/MNH/call_rttov8.f90
# src/MNH/check_zhat.f90
# src/MNH/check_zs.f90
# src/MNH/compare_dad.f90
# src/MNH/compute_r00.f90
# src/MNH/default_desfmn.f90
# src/MNH/diag.f90
# src/MNH/free_atm_profile.f90
# src/MNH/ice_adjust.f90
# src/MNH/ice_adjust_elec.f90
# src/MNH/ini_aircraft_balloon.f90
# src/MNH/ini_cpl.f90
# src/MNH/ini_deep_convection.f90
# src/MNH/ini_lb.f90
# src/MNH/ini_ls.f90
# src/MNH/ini_modeln.f90
# src/MNH/ini_param_elec.f90
# src/MNH/ini_prog_var.f90
# src/MNH/ini_radiations.f90
# src/MNH/ini_radiations_ecmwf.f90
# src/MNH/ini_segn.f90
# src/MNH/ini_size_spawn.f90
# src/MNH/ini_sizen.f90
# src/MNH/ini_spectren.f90
# src/MNH/ini_surf_rad.f90
# src/MNH/init_for_convlfi.f90
# src/MNH/khko_notadjust.f90
# src/MNH/lima_adjust.f90
# src/MNH/lima_warm.f90
# src/MNH/ls_coupling.f90
# src/MNH/menu_diachro.f90
# src/MNH/mnh2lpdm.f90
# src/MNH/mnh2lpdm_ech.f90
# src/MNH/mnh2lpdm_ini.f90
# src/MNH/mnhread_zs_dummyn.f90
# src/MNH/mnhwrite_zs_dummyn.f90
# src/MNH/modd_budget.f90
# src/MNH/modd_fmout.f90
# src/MNH/modeln.f90
# src/MNH/modn_backup.f90
# src/MNH/paspol.f90
# src/MNH/phys_paramn.f90
# src/MNH/prandtl.f90
# src/MNH/prep_pgd.f90
# src/MNH/prep_real_case.f90
# src/MNH/radiations.f90
# src/MNH/rain_c2r2_khko.f90
# src/MNH/rain_ice_elec.f90
# src/MNH/read_dummy_gr_fieldn.f90
# src/MNH/read_field.f90
# src/MNH/read_grid_time_mesonh_case.f90
# src/MNH/read_hgrid.f90
# src/MNH/read_hgridn.f90
# src/MNH/read_precip_field.f90
# src/MNH/read_surf_mnh.f90
# src/MNH/resolved_cloud.f90
# src/MNH/set_grid.f90
# src/MNH/set_ref.f90
# src/MNH/set_subdomain.f90
# src/MNH/shallow_mf_pack.f90
# src/MNH/spawn_field2.f90
# src/MNH/tke_eps_sources.f90
# src/MNH/turb.f90
# src/MNH/turb_cloud_index.f90
# src/MNH/turb_hor_dyn_corr.f90
# src/MNH/turb_hor_sv_flux.f90
# src/MNH/turb_hor_thermo_corr.f90
# src/MNH/turb_hor_thermo_flux.f90
# src/MNH/turb_hor_uv.f90
# src/MNH/turb_hor_uw.f90
# src/MNH/turb_hor_vw.f90
# src/MNH/turb_ver.f90
# src/MNH/turb_ver_dyn_flux.f90
# src/MNH/turb_ver_sv_flux.f90
# src/MNH/turb_ver_thermo_corr.f90
# src/MNH/turb_ver_thermo_flux.f90
# src/MNH/ver_thermo.f90
# src/MNH/write_balloonn.f90
# src/MNH/write_budget.f90
# src/MNH/write_diachro.f90
# src/MNH/write_dummy_gr_fieldn.f90
# src/MNH/write_lbn.f90
# src/MNH/write_lfifm1_for_diag.f90
# src/MNH/write_lfifm1_for_diag_supp.f90
# src/MNH/write_lfifmn_fordiachron.f90
# src/MNH/write_lfin.f90
# src/MNH/write_phys_param.f90
# src/MNH/write_zsmt.f90
# src/MNH/zoom_pgd.f90
# src/MNH/zsmt_pgd.f90
# src/Makefile
# src/Makefile.MESONH.mk
# src/SURFEX/zoom_pgd_cover.F90

58 files changed:
1  2 
MY_RUN/KTEST/003_KW78/002_mesonh/EXSEG1.nam
MY_RUN/KTEST/003_KW78/002_mesonh/EXSEG1.nam_CEN4TH
MY_RUN/KTEST/007_16janvier/009_diag/DIAG1.nam1
MY_RUN/KTEST/007_16janvier/009_diag/DIAG1.nam2
conf/profile_mesonh.ihm
src/ARCH_SRC/CPL_WAVE/MNH/ini_modeln.f90
src/LIB/MPIvide/mpivide.c
src/LIB/SURCOUCHE/src/mode_field.f90
src/LIB/SURCOUCHE/src/mode_mppdb.f90
src/MNH/call_rttov11.f90
src/MNH/ch_monitorn.f90
src/MNH/default_desfmn.f90
src/MNH/diag.f90
src/MNH/forcing.f90
src/MNH/goto_model_wrapper.f90
src/MNH/ini_budget.f90
src/MNH/ini_cst.f90
src/MNH/ini_micron.f90
src/MNH/ini_modeln.f90
src/MNH/ini_prog_var.f90
src/MNH/init_aerosol_properties.f90
src/MNH/lima_cold_hom_nucl.f90
src/MNH/lima_cold_slow_processes.f90
src/MNH/lima_mixed.f90
src/MNH/lima_warm.f90
src/MNH/lima_warm_evap.f90
src/MNH/lima_warm_nucl.f90
src/MNH/mnh2lpdm.f90
src/MNH/mnh2lpdm_ini.f90
src/MNH/modeln.f90
src/MNH/phys_paramn.f90
src/MNH/ppm.f90
src/MNH/prandtl.f90
src/MNH/prep_real_case.f90
src/MNH/profilern.f90
src/MNH/radiations.f90
src/MNH/rain_c2r2_khko.f90
src/MNH/rain_ice_elec.f90
src/MNH/read_exsegn.f90
src/MNH/read_field.f90
src/MNH/read_hgrid.f90
src/MNH/read_precip_field.f90
src/MNH/read_surf_mnh.f90
src/MNH/resolved_cloud.f90
src/MNH/seriesn.f90
src/MNH/set_frc.f90
src/MNH/set_mass.f90
src/MNH/shallow_mf_pack.f90
src/MNH/turb_ver_sv_flux.f90
src/MNH/version.f90
src/MNH/write_diachro.f90
src/MNH/write_lfifm1_for_diag.f90
src/MNH/write_lfifm1_for_diag_supp.f90
src/MNH/write_lfin.f90
src/MNH/write_stationn.f90
src/Makefile
src/Makefile.MESONH.mk
src/SURFEX/zoom_pgd_cover.F90

@@@ -4,7 -4,7 +4,7 @@@
  /
  &NAM_LUNITn CINIFILE = "KWRAIN" /
  &NAM_CONFn  LUSERV=T LUSERC=T LUSERR=T /
- &NAM_DYNn XTSTEP =10., 
 -&NAM_DYNn XTSTEP =9., 
++&NAM_DYNn XTSTEP =9.,
            ! CPRESOPT = "ZRESI",
            NITR = 4, XRELAX = 1., LITRADJ=F,
            LHORELAX_UVWTH = T, LHORELAX_RV = T, LVE_RELAX = F,
@@@ -4,7 -4,7 +4,7 @@@
  /
  &NAM_LUNITn CINIFILE = "KWRAIN" /
  &NAM_CONFn  LUSERV=T LUSERC=T LUSERR=T /
- &NAM_DYNn XTSTEP =10., 
 -&NAM_DYNn XTSTEP =9., 
++&NAM_DYNn XTSTEP =9.,
            ! CPRESOPT = "ZRESI",
            NITR = 4, XRELAX = 1., LITRADJ=F,
            LHORELAX_UVWTH = T, LHORELAX_RV = T, LVE_RELAX = F,
@@@ -9,10 -8,10 +9,10 @@@ LHU_FLX=T,LTRAJ=T
    LVAR_TURB=F,
    NCONV_KF=1, 
    LVAR_MRW=T,
 -  LVAR_MRSV=F,
 +  LVAR_MRSV=T,
    LTRAJ=F,
    LTPZH=T,
-   LBLTOP=T,
+   CBLTOP="RICHA",
    LMSLP=T,
    LAGEO=T, 
    LTHW=T, 
Simple merge
@@@ -271,7 -271,11 +271,11 @@@ END MODULE MODI_INI_MODEL_
  !!                   M.Leriche 2016 Chemistry
  !!                   10/2016 M.Mazoyer New KHKO output fields
  !!                      10/2016 (C.Lac) Add max values
- !!       F. Brosse   Oct.  2016 add prod/loss terms computation for chemistry       
 -!!       F. Brosse   Oct.  2016 add prod/loss terms computation for chemistry      
++!!       F. Brosse   Oct.  2016 add prod/loss terms computation for chemistry
+ !!                   M.Leriche 2016 Chemistry
 -!!                   M.Leriche 10/02/17 prevent negative values in LBX(Y)SVS 
++!!                   M.Leriche 10/02/17 prevent negative values in LBX(Y)SVS
+ !!                   M.Leriche 01/07/2017 Add DIAG chimical surface fluxes
+ !!                   09/2017 Q.Rodier add LTEND_UV_FRC
  !---------------------------------------------------------------------------------
  !
  !*       0.    DECLARATIONS
@@@ -708,6 -713,16 +713,16 @@@ IF (LMEAN_FIELD) THE
    ALLOCATE(XTEMP2_MEAN(IIU,IJU,IKU))   ; XTEMP2_MEAN = 0.0
    ALLOCATE(XPABS2_MEAN(IIU,IJU,IKU))   ; XPABS2_MEAN = 0.0
  !
 -     ALLOCATE(XTKEM_MAX(IIU,IJU,IKU))    
+   ALLOCATE(XUM_MAX(IIU,IJU,IKU))      ; XUM_MAX  = -1.E20
+   ALLOCATE(XVM_MAX(IIU,IJU,IKU))      ; XVM_MAX  = -1.E20
+   ALLOCATE(XWM_MAX(IIU,IJU,IKU))      ; XWM_MAX  = -1.E20
+   ALLOCATE(XTHM_MAX(IIU,IJU,IKU))     ; XTHM_MAX = 0.0
+   ALLOCATE(XTEMPM_MAX(IIU,IJU,IKU))   ; XTEMPM_MAX = 0.0
+   IF (CTURB/='NONE') THEN
++     ALLOCATE(XTKEM_MAX(IIU,IJU,IKU))
+      XTKEM_MAX = 0.0
+   END IF
+   ALLOCATE(XPABSM_MAX(IIU,IJU,IKU))   ; XPABSM_MAX = 0.0
  END IF
  !
  IF ((CUVW_ADV_SCHEME(1:3)=='CEN') .AND. (CTEMP_SCHEME == 'LEFR') ) THEN
@@@ -1386,6 -1401,8 +1401,8 @@@ IF (KMI == 1) THE
      ALLOCATE(XGXTHFRC(IKU,NFRC))
      ALLOCATE(XGYTHFRC(IKU,NFRC))
      ALLOCATE(XPGROUNDFRC(NFRC))
 -    ALLOCATE(XTENDVFRC(IKU,NFRC))    
+     ALLOCATE(XTENDUFRC(IKU,NFRC))
++    ALLOCATE(XTENDVFRC(IKU,NFRC))
    ELSE
      ALLOCATE(TDTFRC(0))
      ALLOCATE(XUFRC(0,0))
      ALLOCATE(XGXTHFRC(0,0))
      ALLOCATE(XGYTHFRC(0,0))
      ALLOCATE(XPGROUNDFRC(0))
 -    ALLOCATE(XTENDVFRC(0,0))    
+     ALLOCATE(XTENDUFRC(0,0))
++    ALLOCATE(XTENDVFRC(0,0))
    END IF
    IF ( LFORCING ) THEN
      ALLOCATE(XWTFRC(IIU,IJU,IKU))
@@@ -1604,6 -1627,7 +1627,7 @@@ CALL READ_FIELD(HINIFILE,HLUOUT,IMASDEV
                  NFRC,TDTFRC,XUFRC,XVFRC,XWFRC,XTHFRC,XRVFRC,                  &
                  XTENDTHFRC,XTENDRVFRC,XGXTHFRC,XGYTHFRC,                      &
                  XPGROUNDFRC, XATC,                                            &
 -                XTENDUFRC, XTENDVFRC,                                         &                
++                XTENDUFRC, XTENDVFRC,                                         &
                  NADVFRC,TDTADVFRC,XDTHFRC,XDRVFRC,                            &
                  NRELFRC,TDTRELFRC,XTHREL,XRVREL,                              &
                  XVTH_FLUX_M,XWTH_FLUX_M,XVU_FLUX_M,                           &
@@@ -27,8 -32,13 +32,13 @@@ MNH_LIC for details. version 1
  #define SIZEINTEGER 4
  #define SIZELOGICAL 4
  #endif
 -#define SIZE2PRECISION 8 
 -#else 
+ #if MNH_REALS == 4
+ #define SIZEPRECISION 4
++#define SIZE2PRECISION 8
++#else
  #define SIZEPRECISION 8 
  #define SIZE2PRECISION 16 
+ #endif
  #else
  #define SIZEINTEGER 8 
  #define SIZEPRECISION 8
index 9f23720,0000000..f039d22
mode 100644,000000..100644
--- /dev/null
@@@ -1,4068 -1,0 +1,4068 @@@
- TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_INstantaneous Cloud Precipitation Rain Rate'
 +!MNH_LIC Copyright 2016 CNRS, Meteo-France and Universite Paul Sabatier
 +!MNH_LIC This is part of the Meso-NH software governed by the CeCILL-C licence
 +!MNH_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt  
 +!MNH_LIC for details. version 1.
 +MODULE MODE_FIELD
 +!
 +USE MODD_CONF, ONLY : CPROGRAM
 +USE MODD_IO_ll, ONLY : NVERB_DEBUG,NVERB_INFO,NVERB_WARNING,NVERB_ERROR,NVERB_FATAL
 +USE MODD_PARAMETERS
 +USE MODD_TYPE_DATE
 +USE MODE_MSG
 +!
 +IMPLICIT NONE
 +!
 +INTEGER,PRIVATE,PARAMETER :: MAXFIELDS = 250
 +INTEGER,PARAMETER :: TYPEUNDEF = -1, TYPEINT = 1, TYPELOG = 2, TYPEREAL = 3, TYPECHAR = 4, TYPEDATE = 5
 +!
 +TYPE TFIELDPTR_C0D
 +  CHARACTER(LEN=:),     POINTER :: DATA => NULL()
 +END TYPE TFIELDPTR_C0D
 +!
 +TYPE TFIELDPTR_L0D
 +  LOGICAL,              POINTER :: DATA => NULL()
 +END TYPE TFIELDPTR_L0D
 +!
 +TYPE TFIELDPTR_N0D
 +  INTEGER,              POINTER :: DATA => NULL()
 +END TYPE TFIELDPTR_N0D
 +!
 +TYPE TFIELDPTR_N2D
 +  INTEGER,DIMENSION(:,:), POINTER :: DATA => NULL()
 +END TYPE TFIELDPTR_N2D
 +!
 +TYPE TFIELDPTR_N3D
 +  INTEGER,DIMENSION(:,:,:),POINTER :: DATA => NULL()
 +END TYPE TFIELDPTR_N3D
 +!
 +TYPE TFIELDPTR_X0D
 +  REAL,                 POINTER :: DATA => NULL()
 +END TYPE TFIELDPTR_X0D
 +!
 +TYPE TFIELDPTR_X1D
 +  REAL,DIMENSION(:),    POINTER :: DATA => NULL()
 +END TYPE TFIELDPTR_X1D
 +!
 +TYPE TFIELDPTR_X2D
 +  REAL,DIMENSION(:,:),  POINTER :: DATA => NULL()
 +END TYPE TFIELDPTR_X2D
 +!
 +TYPE TFIELDPTR_X3D
 +  REAL,DIMENSION(:,:,:),POINTER :: DATA => NULL()
 +END TYPE TFIELDPTR_X3D
 +!
 +TYPE TFIELDPTR_X4D
 +  REAL,DIMENSION(:,:,:,:),POINTER :: DATA => NULL()
 +END TYPE TFIELDPTR_X4D
 +!
 +TYPE TFIELDPTR_T0D
 +  TYPE(DATE_TIME),      POINTER :: DATA => NULL()
 +END TYPE TFIELDPTR_T0D
 +!
 +!Structure describing the characteristics of a field
 +TYPE TFIELDDATA
 +  CHARACTER(LEN=NMNHNAMELGTMAX) :: CMNHNAME  = '' !Name of the field (for MesoNH, non CF convention)
 +  CHARACTER(LEN=32)  :: CSTDNAME  = '' !Standard name (CF convention)
 +  CHARACTER(LEN=32)  :: CLONGNAME = '' !Long name (CF convention)
 +  CHARACTER(LEN=40)  :: CUNITS    = '' !Canonical units (CF convention)
 +  CHARACTER(LEN=2)   :: CDIR      = '' !Type of the data field (XX,XY,--...)
 +  CHARACTER(LEN=4)   :: CLBTYPE   = 'NONE' !Type of the lateral boundary (LBX,LBY,LBXU,LBYV)
 +  CHARACTER(LEN=100) :: CCOMMENT  = '' !Comment (for MesoNH, non CF convention)
 +  INTEGER            :: NGRID     = -1 !Localization on the model grid
 +  INTEGER            :: NTYPE     = TYPEUNDEF !Datatype
 +  INTEGER            :: NDIMS     = 0  !Number of dimensions
 +  !
 +  TYPE(TFIELDPTR_C0D),DIMENSION(:),ALLOCATABLE :: TFIELD_C0D !Pointer to the character string fields (one per nested mesh)
 +  !
 +  TYPE(TFIELDPTR_L0D),DIMENSION(:),ALLOCATABLE :: TFIELD_L0D !Pointer to the scalar logical fields (one per nested mesh)
 +  !
 +  TYPE(TFIELDPTR_N0D),DIMENSION(:),ALLOCATABLE :: TFIELD_N0D !Pointer to the scalar integer fields (one per nested mesh)
 +  TYPE(TFIELDPTR_N2D),DIMENSION(:),ALLOCATABLE :: TFIELD_N2D !Pointer to the integer 2D fields (one per nested mesh)
 +  TYPE(TFIELDPTR_N3D),DIMENSION(:),ALLOCATABLE :: TFIELD_N3D !Pointer to the integer 3D fields (one per nested mesh)
 +  !
 +  TYPE(TFIELDPTR_X0D),DIMENSION(:),ALLOCATABLE :: TFIELD_X0D !Pointer to the scalar real fields (one per nested mesh)
 +  TYPE(TFIELDPTR_X1D),DIMENSION(:),ALLOCATABLE :: TFIELD_X1D !Pointer to the real 1D fields (one per nested mesh)
 +  TYPE(TFIELDPTR_X2D),DIMENSION(:),ALLOCATABLE :: TFIELD_X2D !Pointer to the real 2D fields (one per nested mesh)
 +  TYPE(TFIELDPTR_X3D),DIMENSION(:),ALLOCATABLE :: TFIELD_X3D !Pointer to the real 3D fields (one per nested mesh)
 +  TYPE(TFIELDPTR_X4D),DIMENSION(:),ALLOCATABLE :: TFIELD_X4D !Pointer to the real 4D fields (one per nested mesh)
 +  !
 +  TYPE(TFIELDPTR_T0D),DIMENSION(:),ALLOCATABLE :: TFIELD_T0D !Pointer to the scalar date/time fields (one per nested mesh)
 +END TYPE TFIELDDATA
 +!
 +LOGICAL,SAVE :: LFIELDLIST_ISINIT = .FALSE.
 +TYPE(TFIELDDATA),DIMENSION(MAXFIELDS),SAVE :: TFIELDLIST
 +!
 +CONTAINS
 +!
 +SUBROUTINE INI_FIELD_LIST(KMODEL)
 +!
 +USE MODD_CONF, ONLY: NMODEL
 +!
 +INTEGER,INTENT(IN),OPTIONAL :: KMODEL
 +!
 +INTEGER :: IDX, IMODEL
 +CHARACTER(LEN=42) :: YMSG
 +!
 +!F90/95: TFIELDLIST(1) = TFIELDDATA('UT','x_wind','m s-1','XY','X_Y_Z_U component of wind (m/s)',2)
 +!F2003:
 +!TFIELDLIST(1) = TFIELDDATA(CMNHNAME='UT',CSTDNAME='x_wind',CUNITS='m s-1',CDIR='XY',&
 +!                           CCOMMENT='X_Y_Z_U component of wind (m/s)',NGRID=2)
 +!
 +CALL PRINT_MSG(NVERB_DEBUG,'GEN','INI_FIELD_LIST','called')
 +IF (LFIELDLIST_ISINIT) THEN
 +  CALL PRINT_MSG(NVERB_ERROR,'GEN','INI_FIELD_LIST','already called')
 +  RETURN
 +END IF
 +LFIELDLIST_ISINIT = .TRUE.
 +!
 +IF (PRESENT(KMODEL)) THEN
 +  IMODEL = KMODEL
 +ELSE
 +  IF (NMODEL/=1) THEN
 +    IMODEL = NMODEL
 +  ELSE !NMODEL is not necessary known here => allocating for max allowed number of models
 +    IMODEL = JPMODELMAX
 +  END IF
 +END IF
 +IF (IMODEL==0) CALL PRINT_MSG(NVERB_FATAL,'GEN','INI_FIELD_LIST','allocating fields for zero models not allowed')
 +!
 +WRITE(YMSG,'("allocating fields for up to ",I4," model(s)")') IMODEL
 +CALL PRINT_MSG(NVERB_DEBUG,'GEN','INI_FIELD_LIST',YMSG)
 +!
 +IDX = 1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'MNHVERSION'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH version'
 +TFIELDLIST(IDX)%CUNITS     = ''
 +TFIELDLIST(IDX)%CDIR       = '--'
 +TFIELDLIST(IDX)%CCOMMENT   = ''
 +TFIELDLIST(IDX)%NGRID      = 0
 +TFIELDLIST(IDX)%NTYPE      = TYPEINT
 +TFIELDLIST(IDX)%NDIMS      = 1
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'MASDEV'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH version (without bugfix)'
 +TFIELDLIST(IDX)%CUNITS     = ''
 +TFIELDLIST(IDX)%CDIR       = '--'
 +TFIELDLIST(IDX)%CCOMMENT   = ''
 +TFIELDLIST(IDX)%NGRID      = 0
 +TFIELDLIST(IDX)%NTYPE      = TYPEINT
 +TFIELDLIST(IDX)%NDIMS      = 0
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'BUGFIX'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH bugfix number'
 +TFIELDLIST(IDX)%CUNITS     = ''
 +TFIELDLIST(IDX)%CDIR       = ''
 +TFIELDLIST(IDX)%CCOMMENT   = ''
 +TFIELDLIST(IDX)%NGRID      = 0
 +TFIELDLIST(IDX)%NTYPE      = TYPEINT
 +TFIELDLIST(IDX)%NDIMS      = 0
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'BIBUSER'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: user binary library'
 +TFIELDLIST(IDX)%CUNITS     = ''
 +TFIELDLIST(IDX)%CDIR       = ''
 +TFIELDLIST(IDX)%CCOMMENT   = ''
 +TFIELDLIST(IDX)%NGRID      = 0
 +TFIELDLIST(IDX)%NTYPE      = TYPECHAR
 +TFIELDLIST(IDX)%NDIMS      = 0
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'VERSION'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'SURFEX version (without BUG)'
 +TFIELDLIST(IDX)%CUNITS     = ''
 +TFIELDLIST(IDX)%CDIR       = '--'
 +TFIELDLIST(IDX)%CCOMMENT   = ''
 +TFIELDLIST(IDX)%NGRID      = 0
 +TFIELDLIST(IDX)%NTYPE      = TYPEINT
 +TFIELDLIST(IDX)%NDIMS      = 0
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'BUG'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'SURFEX bugfix number'
 +TFIELDLIST(IDX)%CUNITS     = ''
 +TFIELDLIST(IDX)%CDIR       = ''
 +TFIELDLIST(IDX)%CCOMMENT   = ''
 +TFIELDLIST(IDX)%NGRID      = 0
 +TFIELDLIST(IDX)%NTYPE      = TYPEINT
 +TFIELDLIST(IDX)%NDIMS      = 0
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'PROGRAM'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH family: used program'
 +TFIELDLIST(IDX)%CUNITS     = ''
 +TFIELDLIST(IDX)%CDIR       = ''
 +TFIELDLIST(IDX)%CCOMMENT   = ''
 +TFIELDLIST(IDX)%NGRID      = 0
 +TFIELDLIST(IDX)%NTYPE      = TYPECHAR
 +TFIELDLIST(IDX)%NDIMS      = 0
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'FILETYPE'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: type of this file'
 +TFIELDLIST(IDX)%CUNITS     = ''
 +TFIELDLIST(IDX)%CDIR       = ''
 +TFIELDLIST(IDX)%CCOMMENT   = ''
 +TFIELDLIST(IDX)%NGRID      = 0
 +TFIELDLIST(IDX)%NTYPE      = TYPECHAR
 +TFIELDLIST(IDX)%NDIMS      = 0
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'MY_NAME'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: filename (no extension)'
 +TFIELDLIST(IDX)%CUNITS     = ''
 +TFIELDLIST(IDX)%CDIR       = ''
 +TFIELDLIST(IDX)%CCOMMENT   = ''
 +TFIELDLIST(IDX)%NGRID      = 0
 +TFIELDLIST(IDX)%NTYPE      = TYPECHAR
 +TFIELDLIST(IDX)%NDIMS      = 0
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'DAD_NAME'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: filename of the dad file'
 +TFIELDLIST(IDX)%CUNITS     = ''
 +TFIELDLIST(IDX)%CDIR       = ''
 +TFIELDLIST(IDX)%CCOMMENT   = ''
 +TFIELDLIST(IDX)%NGRID      = 0
 +TFIELDLIST(IDX)%NTYPE      = TYPECHAR
 +TFIELDLIST(IDX)%NDIMS      = 0
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'DXRATIO'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: DXRATIO'
 +TFIELDLIST(IDX)%CUNITS     = ''
 +TFIELDLIST(IDX)%CDIR       = '--'
 +TFIELDLIST(IDX)%CCOMMENT   = 'Resolution ratio between this mesh and its father in x-direction'
 +TFIELDLIST(IDX)%NGRID      = 0
 +TFIELDLIST(IDX)%NTYPE      = TYPEINT
 +TFIELDLIST(IDX)%NDIMS      = 0
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'DYRATIO'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: DYRATIO'
 +TFIELDLIST(IDX)%CUNITS     = ''
 +TFIELDLIST(IDX)%CDIR       = '--'
 +TFIELDLIST(IDX)%CCOMMENT   = 'Resolution ratio between this mesh and its father in y-direction'
 +TFIELDLIST(IDX)%NGRID      = 0
 +TFIELDLIST(IDX)%NTYPE      = TYPEINT
 +TFIELDLIST(IDX)%NDIMS      = 0
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'XSIZE'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: XSIZE'
 +TFIELDLIST(IDX)%CUNITS     = ''
 +TFIELDLIST(IDX)%CDIR       = '--'
 +TFIELDLIST(IDX)%CCOMMENT   = 'Number of model 1 grid points in x-direction in the model 2 physical domain'
 +TFIELDLIST(IDX)%NGRID      = 0
 +TFIELDLIST(IDX)%NTYPE      = TYPEINT
 +TFIELDLIST(IDX)%NDIMS      = 0
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'YSIZE'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: YSIZE'
 +TFIELDLIST(IDX)%CUNITS     = ''
 +TFIELDLIST(IDX)%CDIR       = '--'
 +TFIELDLIST(IDX)%CCOMMENT   = 'Number of model 1 grid points in y-direction in the model 2 physical domain'
 +TFIELDLIST(IDX)%NGRID      = 0
 +TFIELDLIST(IDX)%NTYPE      = TYPEINT
 +TFIELDLIST(IDX)%NDIMS      = 0
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'XOR'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: XOR'
 +TFIELDLIST(IDX)%CUNITS     = ''
 +TFIELDLIST(IDX)%CDIR       = '--'
 +TFIELDLIST(IDX)%CCOMMENT   = 'Horizontal position of this mesh relative to its father'
 +TFIELDLIST(IDX)%NGRID      = 0
 +TFIELDLIST(IDX)%NTYPE      = TYPEINT
 +TFIELDLIST(IDX)%NDIMS      = 0
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'YOR'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: YOR'
 +TFIELDLIST(IDX)%CUNITS     = ''
 +TFIELDLIST(IDX)%CDIR       = '--'
 +TFIELDLIST(IDX)%CCOMMENT   = 'Vertical position of this mesh relative to its father'
 +TFIELDLIST(IDX)%NGRID      = 0
 +TFIELDLIST(IDX)%NTYPE      = TYPEINT
 +TFIELDLIST(IDX)%NDIMS      = 0
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'STORAGE_TYPE'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: STORAGE_TYPE'
 +TFIELDLIST(IDX)%CUNITS     = ''
 +TFIELDLIST(IDX)%CDIR       = '--'
 +TFIELDLIST(IDX)%CCOMMENT   = 'Storage type for the information written in the FM files'
 +TFIELDLIST(IDX)%NGRID      = 0
 +TFIELDLIST(IDX)%NTYPE      = TYPECHAR
 +TFIELDLIST(IDX)%NDIMS      = 0
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'IMAX'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: IMAX'
 +TFIELDLIST(IDX)%CUNITS     = ''
 +TFIELDLIST(IDX)%CDIR       = '--'
 +TFIELDLIST(IDX)%CCOMMENT   = 'x-dimension of the physical domain'
 +TFIELDLIST(IDX)%NGRID      = 0
 +TFIELDLIST(IDX)%NTYPE      = TYPEINT
 +TFIELDLIST(IDX)%NDIMS      = 0
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'JMAX'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: JMAX'
 +TFIELDLIST(IDX)%CUNITS     = ''
 +TFIELDLIST(IDX)%CDIR       = '--'
 +TFIELDLIST(IDX)%CCOMMENT   = 'y-dimension of the physical domain'
 +TFIELDLIST(IDX)%NGRID      = 0
 +TFIELDLIST(IDX)%NTYPE      = TYPEINT
 +TFIELDLIST(IDX)%NDIMS      = 0
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'KMAX'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: KMAX'
 +TFIELDLIST(IDX)%CUNITS     = ''
 +TFIELDLIST(IDX)%CDIR       = '--'
 +TFIELDLIST(IDX)%CCOMMENT   = 'z-dimension of the physical domain'
 +TFIELDLIST(IDX)%NGRID      = 0
 +TFIELDLIST(IDX)%NTYPE      = TYPEINT
 +TFIELDLIST(IDX)%NDIMS      = 0
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'JPHEXT'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: JPHEXT'
 +TFIELDLIST(IDX)%CUNITS     = ''
 +TFIELDLIST(IDX)%CDIR       = '--'
 +TFIELDLIST(IDX)%CCOMMENT   = 'Number of horizontal external points on each side'
 +TFIELDLIST(IDX)%NGRID      = 0
 +TFIELDLIST(IDX)%NTYPE      = TYPEINT
 +TFIELDLIST(IDX)%NDIMS      = 0
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'RPK'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: RPK'
 +TFIELDLIST(IDX)%CUNITS     = ''
 +TFIELDLIST(IDX)%CDIR       = '--'
 +TFIELDLIST(IDX)%CCOMMENT   = 'Projection parameter for conformal projection'
 +TFIELDLIST(IDX)%NGRID      = 0
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 0
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'LONORI'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: LONORI'
 +TFIELDLIST(IDX)%CUNITS     = 'degree'
 +TFIELDLIST(IDX)%CDIR       = '--'
 +TFIELDLIST(IDX)%CCOMMENT   = 'Longitude of the point of coordinates x=0, y=0 for conformal projection'
 +TFIELDLIST(IDX)%NGRID      = 0
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 0
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'LATORI'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: LATORI'
 +TFIELDLIST(IDX)%CUNITS     = 'degree'
 +TFIELDLIST(IDX)%CDIR       = '--'
 +TFIELDLIST(IDX)%CCOMMENT   = 'Latitude of the point of coordinates x=0, y=0 for conformal projection'
 +TFIELDLIST(IDX)%NGRID      = 0
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 0
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'THINSHELL'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: THINSHELL'
 +TFIELDLIST(IDX)%CUNITS     = ''
 +TFIELDLIST(IDX)%CDIR       = '--'
 +TFIELDLIST(IDX)%CCOMMENT   = 'Logical for thinshell approximation'
 +TFIELDLIST(IDX)%NGRID      = 0
 +TFIELDLIST(IDX)%NTYPE      = TYPELOG
 +TFIELDLIST(IDX)%NDIMS      = 0
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'LAT0'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: LAT0'
 +TFIELDLIST(IDX)%CUNITS     = 'degree'
 +TFIELDLIST(IDX)%CDIR       = '--'
 +TFIELDLIST(IDX)%CCOMMENT   = 'Reference latitude for conformal projection'
 +TFIELDLIST(IDX)%NGRID      = 0
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 0
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'LON0'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: LON0'
 +TFIELDLIST(IDX)%CUNITS     = 'degree'
 +TFIELDLIST(IDX)%CDIR       = '--'
 +TFIELDLIST(IDX)%CCOMMENT   = 'Reference longitude for conformal projection'
 +TFIELDLIST(IDX)%NGRID      = 0
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 0
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'BETA'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: BETA'
 +TFIELDLIST(IDX)%CUNITS     = 'degree'
 +TFIELDLIST(IDX)%CDIR       = '--'
 +TFIELDLIST(IDX)%CCOMMENT   = 'Rotation angle for conformal projection'
 +TFIELDLIST(IDX)%NGRID      = 0
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 0
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'XHAT'
 +!TODO: check stdname
 +TFIELDLIST(IDX)%CSTDNAME   = 'projection_x_coordinate'
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: XHAT'
 +TFIELDLIST(IDX)%CUNITS     = 'm'
 +TFIELDLIST(IDX)%CDIR       = 'XX'
 +TFIELDLIST(IDX)%CCOMMENT   = 'Position x in the conformal or cartesian plane'
 +TFIELDLIST(IDX)%NGRID      = 4
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 1
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X1D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'YHAT'
 +!TODO: check stdname
 +TFIELDLIST(IDX)%CSTDNAME   = 'projection_y_coordinate'
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: YHAT'
 +TFIELDLIST(IDX)%CUNITS     = 'm'
 +TFIELDLIST(IDX)%CDIR       = 'YY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'Position y in the conformal or cartesian plane'
 +TFIELDLIST(IDX)%NGRID      = 4
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 1
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X1D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'ZHAT'
 +!TODO: check stdname
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: ZHAT'
 +TFIELDLIST(IDX)%CUNITS     = 'm'
 +TFIELDLIST(IDX)%CDIR       = '--'
 +TFIELDLIST(IDX)%CCOMMENT   = 'Height level without orography'
 +TFIELDLIST(IDX)%NGRID      = 4
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 1
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X1D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'DXHAT'
 +!TODO: check stdname
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: DXHAT'
 +TFIELDLIST(IDX)%CUNITS     = 'm'
 +TFIELDLIST(IDX)%CDIR       = 'XX'
 +TFIELDLIST(IDX)%CCOMMENT   = 'Horizontal stretching in x'
 +TFIELDLIST(IDX)%NGRID      = 4
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 1
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X1D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'DYHAT'
 +!TODO: check stdname
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: DYHAT'
 +TFIELDLIST(IDX)%CUNITS     = 'm'
 +TFIELDLIST(IDX)%CDIR       = 'YY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'Horizontal stretching in y'
 +TFIELDLIST(IDX)%NGRID      = 4
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 1
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X1D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'ALT'
 +TFIELDLIST(IDX)%CSTDNAME   = 'altitude'
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: ALT'
 +TFIELDLIST(IDX)%CUNITS     = 'm'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Z_ALTitude'
 +TFIELDLIST(IDX)%NGRID      = 4
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'DIRCOSXW'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: DIRCOSXW'
 +TFIELDLIST(IDX)%CUNITS     = ''
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X director cosinus of the normal to the ground surface'
 +TFIELDLIST(IDX)%NGRID      = 4
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 2
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X2D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'DIRCOSYW'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: DIRCOSYW'
 +TFIELDLIST(IDX)%CUNITS     = ''
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'Y director cosinus of the normal to the ground surface'
 +TFIELDLIST(IDX)%NGRID      = 4
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 2
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X2D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'DIRCOSZW'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: DIRCOSZW'
 +TFIELDLIST(IDX)%CUNITS     = ''
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'Z director cosinus of the normal to the ground surface'
 +TFIELDLIST(IDX)%NGRID      = 4
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 2
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X2D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'COSSLOPE'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: COSSLOPE'
 +TFIELDLIST(IDX)%CUNITS     = ''
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'cosinus of the angle between i and the slope vector'
 +TFIELDLIST(IDX)%NGRID      = 4
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 2
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X2D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'SINSLOPE'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: SINSLOPE'
 +TFIELDLIST(IDX)%CUNITS     = ''
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'sinus of the angle between i and the slope vector'
 +TFIELDLIST(IDX)%NGRID      = 4
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 2
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X2D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'MAP'
 +!TODO: check stdname
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: MAP'
 +TFIELDLIST(IDX)%CUNITS     = ''
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'Map factor'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 2
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X2D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'LAT'
 +TFIELDLIST(IDX)%CSTDNAME   = 'latitude'
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: LAT'
 +TFIELDLIST(IDX)%CUNITS     = 'degree_north'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_latitude'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 2
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X2D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'LON'
 +TFIELDLIST(IDX)%CSTDNAME   = 'longitude'
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: LON'
 +TFIELDLIST(IDX)%CUNITS     = 'degree_east'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_longitude'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 2
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X2D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'ZS'
 +TFIELDLIST(IDX)%CSTDNAME   = 'ground_level_altitude'
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: ZS'
 +TFIELDLIST(IDX)%CUNITS     = 'm'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'orography'
 +TFIELDLIST(IDX)%NGRID      = 4
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 2
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X2D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'ZSMT'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: ZSMT'
 +TFIELDLIST(IDX)%CUNITS     = 'm'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'smooth orography'
 +TFIELDLIST(IDX)%NGRID      = 4
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 2
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X2D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'SLEVE'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: SLEVE'
 +TFIELDLIST(IDX)%CUNITS     = ''
 +TFIELDLIST(IDX)%CDIR       = '--'
 +TFIELDLIST(IDX)%CCOMMENT   = 'Logical for SLEVE coordinate'
 +TFIELDLIST(IDX)%NGRID      = 4
 +TFIELDLIST(IDX)%NTYPE      = TYPELOG
 +TFIELDLIST(IDX)%NDIMS      = 0
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_L0D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'LEN1'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: LEN1'
 +TFIELDLIST(IDX)%CUNITS     = ''
 +TFIELDLIST(IDX)%CDIR       = '--'
 +TFIELDLIST(IDX)%CCOMMENT   = 'Decay scale for smooth topography'
 +TFIELDLIST(IDX)%NGRID      = 4
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 0
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X0D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'LEN2'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: LEN2'
 +TFIELDLIST(IDX)%CUNITS     = ''
 +TFIELDLIST(IDX)%CDIR       = '--'
 +TFIELDLIST(IDX)%CCOMMENT   = 'Decay scale for small-scale topography deviation'
 +TFIELDLIST(IDX)%NGRID      = 4
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 0
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X0D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'DTMOD'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: DTMOD'
 +TFIELDLIST(IDX)%CUNITS     = 'seconds since YYYY-MM-DD HH:MM:SS.S'
 +TFIELDLIST(IDX)%CDIR       = '--'
 +TFIELDLIST(IDX)%CCOMMENT   = 'Time and date of model beginning'
 +TFIELDLIST(IDX)%NGRID      = 0
 +TFIELDLIST(IDX)%NTYPE      = TYPEDATE
 +TFIELDLIST(IDX)%NDIMS      = 0
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_T0D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'DTCUR'
 +TFIELDLIST(IDX)%CSTDNAME   = 'time'
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: DTCUR'
 +TFIELDLIST(IDX)%CUNITS     = 'seconds since YYYY-MM-DD HH:MM:SS.S'
 +TFIELDLIST(IDX)%CDIR       = '--'
 +TFIELDLIST(IDX)%CCOMMENT   = 'Current time and date'
 +TFIELDLIST(IDX)%NGRID      = 0
 +TFIELDLIST(IDX)%NTYPE      = TYPEDATE
 +TFIELDLIST(IDX)%NDIMS      = 0
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_T0D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'DTRAD_FULL'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: DTRAD_FULL'
 +TFIELDLIST(IDX)%CUNITS     = 'seconds since YYYY-MM-DD HH:MM:SS.S'
 +TFIELDLIST(IDX)%CDIR       = '--'
 +TFIELDLIST(IDX)%CCOMMENT   = 'Time and date of last full radiation call'
 +TFIELDLIST(IDX)%NGRID      = 0
 +TFIELDLIST(IDX)%NTYPE      = TYPEDATE
 +TFIELDLIST(IDX)%NDIMS      = 0
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_T0D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'DTRAD_CLLY'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: DTRAD_CLLY'
 +TFIELDLIST(IDX)%CUNITS     = 'seconds since YYYY-MM-DD HH:MM:SS.S'
 +TFIELDLIST(IDX)%CDIR       = '--'
 +TFIELDLIST(IDX)%CCOMMENT   = 'Time and date of last radiation call for only cloudy verticals'
 +TFIELDLIST(IDX)%NGRID      = 0
 +TFIELDLIST(IDX)%NTYPE      = TYPEDATE
 +TFIELDLIST(IDX)%NDIMS      = 0
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_T0D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'DTDCONV'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: DTDCONV'
 +TFIELDLIST(IDX)%CUNITS     = 'seconds since YYYY-MM-DD HH:MM:SS.S'
 +TFIELDLIST(IDX)%CDIR       = '--'
 +TFIELDLIST(IDX)%CCOMMENT   = 'Time and date of the last deep convection call'
 +TFIELDLIST(IDX)%NGRID      = 0
 +TFIELDLIST(IDX)%NTYPE      = TYPEDATE
 +TFIELDLIST(IDX)%NDIMS      = 0
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_T0D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'DTEXP'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: DTEXP'
 +TFIELDLIST(IDX)%CUNITS     = 'seconds since YYYY-MM-DD HH:MM:SS.S'
 +TFIELDLIST(IDX)%CDIR       = '--'
 +TFIELDLIST(IDX)%CCOMMENT   = 'Time and date of experiment beginning'
 +TFIELDLIST(IDX)%NGRID      = 0
 +TFIELDLIST(IDX)%NTYPE      = TYPEDATE
 +TFIELDLIST(IDX)%NDIMS      = 0
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'DTSEG'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: DTSEG'
 +TFIELDLIST(IDX)%CUNITS     = 'seconds since YYYY-MM-DD HH:MM:SS.S'
 +TFIELDLIST(IDX)%CDIR       = '--'
 +TFIELDLIST(IDX)%CCOMMENT   = 'Time and date of segment beginning'
 +TFIELDLIST(IDX)%NGRID      = 0
 +TFIELDLIST(IDX)%NTYPE      = TYPEDATE
 +TFIELDLIST(IDX)%NDIMS      = 0
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'L1D'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: L1D'
 +TFIELDLIST(IDX)%CUNITS     = ''
 +TFIELDLIST(IDX)%CDIR       = '--'
 +TFIELDLIST(IDX)%CCOMMENT   = 'Logical for 1D model version'
 +TFIELDLIST(IDX)%NGRID      = 0
 +TFIELDLIST(IDX)%NTYPE      = TYPELOG
 +TFIELDLIST(IDX)%NDIMS      = 0
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'L2D'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: L2D'
 +TFIELDLIST(IDX)%CUNITS     = ''
 +TFIELDLIST(IDX)%CDIR       = '--'
 +TFIELDLIST(IDX)%CCOMMENT   = 'Logical for 2D model version'
 +TFIELDLIST(IDX)%NGRID      = 0
 +TFIELDLIST(IDX)%NTYPE      = TYPELOG
 +TFIELDLIST(IDX)%NDIMS      = 0
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'PACK'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: PACK'
 +TFIELDLIST(IDX)%CUNITS     = ''
 +TFIELDLIST(IDX)%CDIR       = '--'
 +TFIELDLIST(IDX)%CCOMMENT   = 'Logical to compress 1D or 2D FM files'
 +TFIELDLIST(IDX)%NGRID      = 0
 +TFIELDLIST(IDX)%NTYPE      = TYPELOG
 +TFIELDLIST(IDX)%NDIMS      = 0
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'CARTESIAN'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: CARTESIAN'
 +TFIELDLIST(IDX)%CUNITS     = ''
 +TFIELDLIST(IDX)%CDIR       = '--'
 +TFIELDLIST(IDX)%CCOMMENT   = 'Logical for cartesian geometry'
 +TFIELDLIST(IDX)%NGRID      = 0
 +TFIELDLIST(IDX)%NTYPE      = TYPELOG
 +TFIELDLIST(IDX)%NDIMS      = 0
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'LBOUSS'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: LBOUSS'
 +TFIELDLIST(IDX)%CUNITS     = ''
 +TFIELDLIST(IDX)%CDIR       = '--'
 +TFIELDLIST(IDX)%CCOMMENT   = 'Logical for Boussinesq approximation'
 +TFIELDLIST(IDX)%NGRID      = 0
 +TFIELDLIST(IDX)%NTYPE      = TYPELOG
 +TFIELDLIST(IDX)%NDIMS      = 0
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'SURF'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: SURF'
 +TFIELDLIST(IDX)%CUNITS     = ''
 +TFIELDLIST(IDX)%CDIR       = '--'
 +TFIELDLIST(IDX)%CCOMMENT   = 'Kind of surface processes parameterization'
 +TFIELDLIST(IDX)%NGRID      = 0
 +TFIELDLIST(IDX)%NTYPE      = TYPECHAR
 +TFIELDLIST(IDX)%NDIMS      = 0
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_C0D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'CPL_AROME'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: CPL_AROME'
 +TFIELDLIST(IDX)%CUNITS     = ''
 +TFIELDLIST(IDX)%CDIR       = '--'
 +TFIELDLIST(IDX)%CCOMMENT   = 'Logical for AROME coupling file'
 +TFIELDLIST(IDX)%NGRID      = 0
 +TFIELDLIST(IDX)%NTYPE      = TYPELOG
 +TFIELDLIST(IDX)%NDIMS      = 0
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'COUPLING'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: COUPLING'
 +TFIELDLIST(IDX)%CUNITS     = ''
 +TFIELDLIST(IDX)%CDIR       = '--'
 +TFIELDLIST(IDX)%CCOMMENT   = 'Logical for coupling file'
 +TFIELDLIST(IDX)%NGRID      = 0
 +TFIELDLIST(IDX)%NTYPE      = TYPELOG
 +TFIELDLIST(IDX)%NDIMS      = 0
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'UT'
 +TFIELDLIST(IDX)%CSTDNAME   = 'x_wind'
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: UT'
 +TFIELDLIST(IDX)%CUNITS     = 'm s-1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Z_U component of wind'
 +TFIELDLIST(IDX)%NGRID      = 2
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'VT'
 +TFIELDLIST(IDX)%CSTDNAME   = 'y_wind'
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: VT'
 +TFIELDLIST(IDX)%CUNITS     = 'm s-1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Z_V component of wind'
 +TFIELDLIST(IDX)%NGRID      = 3
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'WT'
 +TFIELDLIST(IDX)%CSTDNAME   = 'upward_air_velocity'
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: WT'
 +TFIELDLIST(IDX)%CUNITS     = 'm s-1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Z_vertical wind'
 +TFIELDLIST(IDX)%NGRID      = 4
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'THT'
 +TFIELDLIST(IDX)%CSTDNAME   = 'air_potential_temperature'
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: THT'
 +TFIELDLIST(IDX)%CUNITS     = 'K'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Z_potential temperature'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'UM'
 +TFIELDLIST(IDX)%CSTDNAME   = 'x_wind'
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: UM'
 +TFIELDLIST(IDX)%CUNITS     = 'm s-1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Z_U component of wind'
 +TFIELDLIST(IDX)%NGRID      = 2
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'VM'
 +TFIELDLIST(IDX)%CSTDNAME   = 'y_wind'
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: VM'
 +TFIELDLIST(IDX)%CUNITS     = 'm s-1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Z_V component of wind'
 +TFIELDLIST(IDX)%NGRID      = 3
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'WM'
 +TFIELDLIST(IDX)%CSTDNAME   = 'upward_air_velocity'
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: WM'
 +TFIELDLIST(IDX)%CUNITS     = 'm s-1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Z_vertical wind'
 +TFIELDLIST(IDX)%NGRID      = 4
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'DUM'
 +TFIELDLIST(IDX)%CSTDNAME   = 'x_wind'
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: DUM'
 +TFIELDLIST(IDX)%CUNITS     = 'm s-1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Z_U component of wind'
 +TFIELDLIST(IDX)%NGRID      = 2
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'DVM'
 +TFIELDLIST(IDX)%CSTDNAME   = 'y_wind'
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: DVM'
 +TFIELDLIST(IDX)%CUNITS     = 'm s-1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Z_V component of wind'
 +TFIELDLIST(IDX)%NGRID      = 3
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'DWM'
 +TFIELDLIST(IDX)%CSTDNAME   = 'upward_air_velocit'
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: DWM'
 +TFIELDLIST(IDX)%CUNITS     = 'm s-1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Z_vertical wind'
 +TFIELDLIST(IDX)%NGRID      = 4
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'TKET'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: TKET'
 +TFIELDLIST(IDX)%CUNITS     = 'm2 s-2'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Z_Turbulent Kinetic Energy'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'TKEMS'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: TKEMS'
 +TFIELDLIST(IDX)%CUNITS     = 'm2 s-3'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Z_Turbulent Kinetic Energy adv source'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'PABST'
 +TFIELDLIST(IDX)%CSTDNAME   = 'air_pressure'
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: PABST'
 +TFIELDLIST(IDX)%CUNITS     = 'Pa'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Z_ABSolute Pressure'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'RT'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: RT'
 +TFIELDLIST(IDX)%CUNITS     = 'kg kg-1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'Moist variables (rho Rn)'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 4
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X4D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'RVT'
 +!TODO: check stdname
 +TFIELDLIST(IDX)%CSTDNAME   = 'humidity_mixing_ratio'
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: RVT'
 +TFIELDLIST(IDX)%CUNITS     = 'kg kg-1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Z_Vapor mixing Ratio'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'RCT'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: RCT'
 +TFIELDLIST(IDX)%CUNITS     = 'kg kg-1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Z_Cloud mixing Ratio'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'RRT'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: RRT'
 +TFIELDLIST(IDX)%CUNITS     = 'kg kg-1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Z_Rain mixing Ratio'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'RIT'
 +!TODO: check stdname
 +TFIELDLIST(IDX)%CSTDNAME   = 'cloud_ice_mixing_ratio'
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: RIT'
 +TFIELDLIST(IDX)%CUNITS     = 'kg kg-1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Z_Ice mixing Ratio'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'RST'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: RST'
 +TFIELDLIST(IDX)%CUNITS     = 'kg kg-1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Z_Snow mixing Ratio'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'RGT'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: RGT'
 +TFIELDLIST(IDX)%CUNITS     = 'kg kg-1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Z_Graupel mixing Ratio'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'RHT'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: RHT'
 +TFIELDLIST(IDX)%CUNITS     = 'kg kg-1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Z_Hail mixing Ratio'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'SUPSATMAX'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: SUPSATMAX'
 +TFIELDLIST(IDX)%CUNITS     = ''
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Z_Supersaturation'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'NACT'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: NACT'
 +TFIELDLIST(IDX)%CUNITS     = ''
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Z_Nact'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'SSPRO'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: SSPRO'
 +TFIELDLIST(IDX)%CUNITS     = ''
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Z_Supersaturation'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'NPRO'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: NPRO'
 +TFIELDLIST(IDX)%CUNITS     = ''
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Z_Nact'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'INPAP'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: INPAP'
 +TFIELDLIST(IDX)%CUNITS     = 'kg m-2 s-1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_INstantaneous Precipitating Aerosol Rate'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 2
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X2D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'ACPAP'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: ACPAP'
 +TFIELDLIST(IDX)%CUNITS     = 'kg m-2'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_ACcumulated Precipitating Aerosol Rate'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 2
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X2D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'EFIELDU'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: EFIELDU'
 +TFIELDLIST(IDX)%CUNITS     = 'V m-1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Z_EFIELDU'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'EFIELDV'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: EFIELDV'
 +TFIELDLIST(IDX)%CUNITS     = 'V m-1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Z_EFIELDV'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'EFIELDW'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: EFIELDW'
 +TFIELDLIST(IDX)%CUNITS     = 'V m-1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Z_EFIELDW'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'NI_IAGGS'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: NI_IAGGS'
 +TFIELDLIST(IDX)%CUNITS     = 'C m-3 s-1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Z_NI_IAGGS'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'NI_IDRYG'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: NI_IDRYG'
 +TFIELDLIST(IDX)%CUNITS     = 'C m-3 s-1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Z_NI_IDRYG'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'NI_SDRYG'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: NI_SDRYG'
 +TFIELDLIST(IDX)%CUNITS     = 'C m-3 s-1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Z_NI_SDRYG'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'INDUC_CG'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: INDUC_CG'
 +TFIELDLIST(IDX)%CUNITS     = 'C m-3 s-1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Z_INDUC_CG'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'TRIG_IC'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: TRIG_IC'
 +TFIELDLIST(IDX)%CUNITS     = '1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_FLASH_MAP_TRIG_IC'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEINT
 +TFIELDLIST(IDX)%NDIMS      = 2
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'IMPACT_CG'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: IMPACT_CG'
 +TFIELDLIST(IDX)%CUNITS     = '1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_FLASH_MAP_IMPACT_CG'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEINT
 +TFIELDLIST(IDX)%NDIMS      = 2
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'AREA_CG'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: AREA_CG'
 +TFIELDLIST(IDX)%CUNITS     = '1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_FLASH_MAP_2DAREA_CG'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEINT
 +TFIELDLIST(IDX)%NDIMS      = 2
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'AREA_IC'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: AREA_IC'
 +TFIELDLIST(IDX)%CUNITS     = '1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_FLASH_MAP_2DAREA_IC'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEINT
 +TFIELDLIST(IDX)%NDIMS      = 2
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'FLASH_3DCG'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: FLASH_3DCG'
 +TFIELDLIST(IDX)%CUNITS     = '1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Z_FLASH_MAP_3DCG'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEINT
 +TFIELDLIST(IDX)%NDIMS      = 3
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'FLASH_3DIC'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: FLASH_3DIC'
 +TFIELDLIST(IDX)%CUNITS     = '1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Z_FLASH_MAP_3DIC'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEINT
 +TFIELDLIST(IDX)%NDIMS      = 3
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'PHC'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: PHC'
 +TFIELDLIST(IDX)%CUNITS     = '1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'pH in cloud'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'PHR'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: PHR'
 +TFIELDLIST(IDX)%CUNITS     = '1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'pH in rain'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'LSUM'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: LSUM'
 +TFIELDLIST(IDX)%CUNITS     = 'm s-1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Z_Large Scale U component'
 +TFIELDLIST(IDX)%NGRID      = 2
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'LSVM'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: LSVM'
 +TFIELDLIST(IDX)%CUNITS     = 'm s-1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Z_Large Scale V component'
 +TFIELDLIST(IDX)%NGRID      = 3
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'LSWM'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: LSWM'
 +TFIELDLIST(IDX)%CUNITS     = 'm s-1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Z_Large Scale vertical wind'
 +TFIELDLIST(IDX)%NGRID      = 4
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'LSTHM'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: LSTHM'
 +TFIELDLIST(IDX)%CUNITS     = 'K'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Z_Large Scale potential Temperature'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'LSRVM'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: LSRVM'
 +TFIELDLIST(IDX)%CUNITS     = 'kg kg-1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Z_Large Scale Vapor Mixing Ratio'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'RIMX'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: RIMX'
 +TFIELDLIST(IDX)%CUNITS     = ''
 +TFIELDLIST(IDX)%CDIR       = '--'
 +TFIELDLIST(IDX)%CCOMMENT   = 'Number of points in the lateral absorbing layer in the x direction'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEINT
 +TFIELDLIST(IDX)%NDIMS      = 0
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_N0D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'RIMY'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: RIMY'
 +TFIELDLIST(IDX)%CUNITS     = ''
 +TFIELDLIST(IDX)%CDIR       = '--'
 +TFIELDLIST(IDX)%CCOMMENT   = 'Number of points in the lateral absorbing layer in the y direction'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEINT
 +TFIELDLIST(IDX)%NDIMS      = 0
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_N0D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'HORELAX_UVWTH'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: HORELAX_UVWTH'
 +TFIELDLIST(IDX)%CUNITS     = ''
 +TFIELDLIST(IDX)%CDIR       = '--'
 +TFIELDLIST(IDX)%CCOMMENT   = 'Switch to activate the HOrizontal RELAXation'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPELOG
 +TFIELDLIST(IDX)%NDIMS      = 0
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_L0D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'LBXUM'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: LBXUM'
 +TFIELDLIST(IDX)%CUNITS     = 'm s-1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CLBTYPE    = 'LBXU'
 +TFIELDLIST(IDX)%CCOMMENT   = '2_Y_Z_LBXUM'
 +TFIELDLIST(IDX)%NGRID      = 2
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'LBXVM'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: LBXVM'
 +TFIELDLIST(IDX)%CUNITS     = 'm s-1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CLBTYPE    = 'LBX'
 +TFIELDLIST(IDX)%CCOMMENT   = '2_Y_Z_LBXVM'
 +TFIELDLIST(IDX)%NGRID      = 3
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'LBXWM'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: LBXWM'
 +TFIELDLIST(IDX)%CUNITS     = 'm s-1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CLBTYPE    = 'LBX'
 +TFIELDLIST(IDX)%CCOMMENT   = '2_Y_Z_LBXWM'
 +TFIELDLIST(IDX)%NGRID      = 4
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'LBYUM'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: LBYUM'
 +TFIELDLIST(IDX)%CUNITS     = 'm s-1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CLBTYPE    = 'LBY'
 +TFIELDLIST(IDX)%CCOMMENT   = '2_Y_Z_LBYUM'
 +TFIELDLIST(IDX)%NGRID      = 2
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'LBYVM'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: LBYVM'
 +TFIELDLIST(IDX)%CUNITS     = 'm s-1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CLBTYPE    = 'LBYV'
 +TFIELDLIST(IDX)%CCOMMENT   = '2_Y_Z_LBYVM'
 +TFIELDLIST(IDX)%NGRID      = 3
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'LBYWM'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: LBYWM'
 +TFIELDLIST(IDX)%CUNITS     = 'm s-1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CLBTYPE    = 'LBY'
 +TFIELDLIST(IDX)%CCOMMENT   = '2_Y_Z_LBYWM'
 +TFIELDLIST(IDX)%NGRID      = 4
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'LBXTHM'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: LBXTHM'
 +TFIELDLIST(IDX)%CUNITS     = 'K'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CLBTYPE    = 'LBX'
 +TFIELDLIST(IDX)%CCOMMENT   = '2_Y_Z_LBXTHM'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'LBYTHM'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: LBYTHM'
 +TFIELDLIST(IDX)%CUNITS     = 'K'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CLBTYPE    = 'LBY'
 +TFIELDLIST(IDX)%CCOMMENT   = '2_Y_Z_LBYTHM'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'HORELAX_TKE'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: HORELAX_TKE'
 +TFIELDLIST(IDX)%CUNITS     = ''
 +TFIELDLIST(IDX)%CDIR       = '--'
 +TFIELDLIST(IDX)%CCOMMENT   = 'Switch to activate the HOrizontal RELAXation'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPELOG
 +TFIELDLIST(IDX)%NDIMS      = 0
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_L0D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'LBXTKEM'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: LBXTKEM'
 +TFIELDLIST(IDX)%CUNITS     = 'm2 s-2'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CLBTYPE    = 'LBX'
 +TFIELDLIST(IDX)%CCOMMENT   = '2_Y_Z_LBXTKEM'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'LBYTKEM'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: LBYTKEM'
 +TFIELDLIST(IDX)%CUNITS     = 'm2 s-2'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CLBTYPE    = 'LBY'
 +TFIELDLIST(IDX)%CCOMMENT   = '2_Y_Z_LBYTKEM'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'DRYMASST'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: DRYMASST'
 +TFIELDLIST(IDX)%CUNITS     = 'kg'
 +TFIELDLIST(IDX)%CDIR       = '--'
 +TFIELDLIST(IDX)%CCOMMENT   = 'Total Dry Mass'
 +TFIELDLIST(IDX)%NGRID      = 0
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 0
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X0D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'BL_DEPTH'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: BL_DEPTH'
 +TFIELDLIST(IDX)%CUNITS     = 'm'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_BL_DEPTH'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 2
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X2D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'SBL_DEPTH'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: SBL_DEPTH'
 +TFIELDLIST(IDX)%CUNITS     = 'm'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_BL_SDEPTH'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 2
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X2D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'WTHVMF'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: WTHVMF'
 +TFIELDLIST(IDX)%CUNITS     = 'm K s-1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_WTHVMF'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'SRCT'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: SRCT'
 +TFIELDLIST(IDX)%CUNITS     = 'kg kg-2'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Z_normalized 2nd_order moment s_r_c/2Sigma_s2'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'SIGS'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: SIGS'
 +TFIELDLIST(IDX)%CUNITS     = 'kg kg-2'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Z_Sigma_s from turbulence scheme'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'RHOREFZ'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: RHOREFZ'
 +TFIELDLIST(IDX)%CUNITS     = 'kg m-3'
 +TFIELDLIST(IDX)%CDIR       = '--'
 +TFIELDLIST(IDX)%CCOMMENT   = 'rhodz for reference state without orography'
 +TFIELDLIST(IDX)%NGRID      = 4
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 1
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X1D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'THVREFZ'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: THVREFZ'
 +TFIELDLIST(IDX)%CUNITS     = 'K'
 +TFIELDLIST(IDX)%CDIR       = '--'
 +TFIELDLIST(IDX)%CCOMMENT   = 'thetavz for reference state without orography'
 +TFIELDLIST(IDX)%NGRID      = 4
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 1
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X1D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'EXNTOP'
 +TFIELDLIST(IDX)%CSTDNAME   = 'dimensionless_exner_function'
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: EXNTOP'
 +TFIELDLIST(IDX)%CUNITS     = ''
 +TFIELDLIST(IDX)%CDIR       = '--'
 +TFIELDLIST(IDX)%CCOMMENT   = 'Exner function at model top'
 +TFIELDLIST(IDX)%NGRID      = 4
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 0
 +IDX = IDX+1
 +!
 +!
 +IF (TRIM(CPROGRAM) == 'MESONH' .OR. TRIM(CPROGRAM) == 'DIAG') THEN
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'US_PRES'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: US_PRES'
 +!TODO: units?
 +TFIELDLIST(IDX)%CUNITS     = ''
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Z_US_PRES'
 +TFIELDLIST(IDX)%NGRID      = 2
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'VS_PRES'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: VS_PRES'
 +!TODO: units?
 +TFIELDLIST(IDX)%CUNITS     = ''
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Z_VS_PRES'
 +TFIELDLIST(IDX)%NGRID      = 3
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'WS_PRES'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: WS_PRES'
 +!TODO: units?
 +TFIELDLIST(IDX)%CUNITS     = ''
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Z_WS_PRES'
 +TFIELDLIST(IDX)%NGRID      = 4
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'THS_CLD'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: THS_CLD'
 +!TODO: units?
 +TFIELDLIST(IDX)%CUNITS     = ''
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Z_THS_CLD'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'RS_CLD'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: RS_CLD'
 +TFIELDLIST(IDX)%CUNITS     = ''
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'Source of Moist variables'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 4
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X4D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'RVS_CLD'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: RVS_CLD'
 +TFIELDLIST(IDX)%CUNITS     = ''
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Z_RVS_CLD'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'RCS_CLD'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: RCS_CLD'
 +TFIELDLIST(IDX)%CUNITS     = ''
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Z_RCS_CLD'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'RRS_CLD'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: RRS_CLD'
 +TFIELDLIST(IDX)%CUNITS     = ''
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Z_RRS_CLD'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'RIS_CLD'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: RIS_CLD'
 +TFIELDLIST(IDX)%CUNITS     = ''
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Z_RIS_CLD'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'RSS_CLD'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: RSS_CLD'
 +TFIELDLIST(IDX)%CUNITS     = ''
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Z_RSS_CLD'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'RGS_CLD'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: RGS_CLD'
 +TFIELDLIST(IDX)%CUNITS     = ''
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Z_RGS_CLD'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'RHS_CLD'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: RHS_CLD'
 +TFIELDLIST(IDX)%CUNITS     = ''
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Z_RHS_CLD'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'CLDFR'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: CLDFR'
 +TFIELDLIST(IDX)%CUNITS     = '1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Z_CLouD FRaction'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'CIT'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: CIT'
 +TFIELDLIST(IDX)%CUNITS     = 'm-3'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Z_Cloud Ice concentration'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +END IF ! CPROGRAM=MESONH .OR. DIAG
 +!
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'RHODREF'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: RHODREF'
 +TFIELDLIST(IDX)%CUNITS     = 'kg m-3'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'Dry density for reference state with orography'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'THVREF'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: THVREF'
 +TFIELDLIST(IDX)%CUNITS     = 'K'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'Thetav for reference state with orography'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +!
 +IF (TRIM(CPROGRAM)=='MESONH' .OR. TRIM(CPROGRAM)=='DIAG') THEN
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'DTHRAD'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: DTHRAD'
 +TFIELDLIST(IDX)%CUNITS     = 'K s-1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Z_RADiative heating/cooling rate'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'FLALWD'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: FLALWD'
 +TFIELDLIST(IDX)%CUNITS     = 'W m-2'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Downward Long Waves on FLAT surface'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 2
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X2D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'DIRFLASWD'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: DIRFLASWD'
 +TFIELDLIST(IDX)%CUNITS     = 'W m-2'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_DIRect Downward Short Waves on FLAT surface'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'SCAFLASWD'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: SCAFLASWD'
 +TFIELDLIST(IDX)%CUNITS     = 'W m-2'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_SCAttered Downward Short Waves on FLAT surface'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'DIRSRFSWD'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: DIRSRFSWD'
 +TFIELDLIST(IDX)%CUNITS     = 'W m-2'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_DIRect Downward Short Waves'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'CLEARCOL_TM1'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: CLEARCOL_TM1'
 +TFIELDLIST(IDX)%CUNITS     = ''
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'TRACE OF CLOUD'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEINT
 +TFIELDLIST(IDX)%NDIMS      = 2
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_N2D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'ZENITH'
 +TFIELDLIST(IDX)%CSTDNAME   = 'zenith_angle'
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: ZENITH'
 +TFIELDLIST(IDX)%CUNITS     = 'rad'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_ZENITH'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 2
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X2D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'AZIM'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: AZIM'
 +TFIELDLIST(IDX)%CUNITS     = 'rad'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_AZIMuth'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 2
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X2D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'DIR_ALB'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: DIR_ALB'
 +TFIELDLIST(IDX)%CUNITS     = '1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_DIRect ALBedo'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'SCA_ALB'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: SCA_ALB'
 +TFIELDLIST(IDX)%CUNITS     = '1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_SCAttered ALBedo'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'EMIS'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: EMIS'
 +TFIELDLIST(IDX)%CUNITS     = '1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_EMISsivity'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 2
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X2D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'TSRAD'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: TSRAD'
 +TFIELDLIST(IDX)%CUNITS     = 'K'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_RADiative Surface Temperature'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 2
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X2D(IMODEL))
 +IDX = IDX+1
 +!
 +END IF !CPROGRAM=MESONH .OR. DIAG
 +!
 +!
 +IF (TRIM(CPROGRAM) /= 'PGD' .AND. TRIM(CPROGRAM) /= 'NESPGD' .AND. TRIM(CPROGRAM) /= 'SPAWN') THEN
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'COUNTCONV'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: COUNTCONV'
 +TFIELDLIST(IDX)%CUNITS     = ''
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_COUNTCONV'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEINT
 +TFIELDLIST(IDX)%NDIMS      = 2
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_N2D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'DTHCONV'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: DTHCONV'
 +TFIELDLIST(IDX)%CUNITS     = 'K s-1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Z_CONVective heating/cooling rate'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'DRVCONV'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: DRVCONV'
 +TFIELDLIST(IDX)%CUNITS     = 's-1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Z_CONVective R_v tendency'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'DRCCONV'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: DRCCONV'
 +TFIELDLIST(IDX)%CUNITS     = 's-1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Z_CONVective R_c tendency'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'DRICONV'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: DRICONV'
 +TFIELDLIST(IDX)%CUNITS     = 's-1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Z_CONVective R_i tendency'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'PRCONV'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: PRCONV'
 +TFIELDLIST(IDX)%CUNITS     = 'm s-1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_CONVective instantaneous Precipitation Rate'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 2
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X2D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'PACCONV'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: PACCONV'
 +TFIELDLIST(IDX)%CUNITS     = 'm'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_CONVective ACcumulated Precipitation rate'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 2
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X2D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'PRSCONV'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: PRSCONV'
 +TFIELDLIST(IDX)%CUNITS     = 'm s-1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_CONVective instantaneous Precipitation Rate for Snow'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 2
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X2D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'DSVCONV'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: DSVCONV'
 +TFIELDLIST(IDX)%CUNITS     = 's-1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'Tracer tendencies'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 4
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X4D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'PRLFLXCONV'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: PRLFLXCONV'
 +TFIELDLIST(IDX)%CUNITS     = 'm s-1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Liquid Precipitation Convective Flux'
 +TFIELDLIST(IDX)%NGRID      = 4
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'PRSFLXCONV'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: PRSFLXCONV'
 +TFIELDLIST(IDX)%CUNITS     = 'm s-1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Solid Precipitation Convective Flux'
 +TFIELDLIST(IDX)%NGRID      = 4
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'UMFCONV'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: UMFCONV'
 +TFIELDLIST(IDX)%CUNITS     = 'kg s-1 m-2'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Updraft Convective Mass Flux'
 +TFIELDLIST(IDX)%NGRID      = 4
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'DMFCONV'
 +TFIELDLIST(IDX)%CSTDNAME   = 'X_Y_Downdraft Convective Mass Flux'
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: DMFCONV'
 +TFIELDLIST(IDX)%CUNITS     = 'kg s-1 m-2'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = ''
 +TFIELDLIST(IDX)%NGRID      = 4
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'MFCONV'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: MFCONV'
 +TFIELDLIST(IDX)%CUNITS     = 'kg s-1 m-2'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Convective Mass Flux'
 +TFIELDLIST(IDX)%NGRID      = 4
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'CAPE'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: CAPE'
 +TFIELDLIST(IDX)%CUNITS     = 'J kg-1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Convective Available Potentiel Energy'
 +TFIELDLIST(IDX)%NGRID      = 4
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 2
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X2D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'CLTOPCONV'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: CLTOPCONV'
 +TFIELDLIST(IDX)%CUNITS     = '1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'Convective cloud top level'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEINT
 +TFIELDLIST(IDX)%NDIMS      = 2
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_N2D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'CLBASCONV'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: CLBASCONV'
 +TFIELDLIST(IDX)%CUNITS     = '1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'Convective cloud base level'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEINT
 +TFIELDLIST(IDX)%NDIMS      = 2
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_N2D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'IC_RATE'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: IC_RATE'
 +TFIELDLIST(IDX)%CUNITS     = 's-1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_IntraCloud lightning Rate'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 2
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X2D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'CG_RATE'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: CG_RATE'
 +TFIELDLIST(IDX)%CUNITS     = 's-1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_CloudGround lightning Rate'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 2
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X2D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'IC_TOTAL_NB'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: IC_TOTAL_NB'
 +TFIELDLIST(IDX)%CUNITS     = '1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_IntraCloud lightning Number'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 2
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X2D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'CG_TOTAL_NB'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: CG_TOTAL_NB'
 +TFIELDLIST(IDX)%CUNITS     = '1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_CloudGround lightning Number'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 2
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X2D(IMODEL))
 +IDX = IDX+1
 +!
 +END IF !CPROGRAM/=PGD , NESPGD, SPAWN
 +!
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'SSO_ANIS'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: SSO_ANIS'
 +TFIELDLIST(IDX)%CUNITS     = 'm'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_SSO_ANISOTROPY'
 +TFIELDLIST(IDX)%NGRID      = 4
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 2
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X2D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'SSO_SLOPE'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: SSO_SLOPE'
 +TFIELDLIST(IDX)%CUNITS     = ''
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_SSO_SLOPE'
 +TFIELDLIST(IDX)%NGRID      = 4
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 2
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X2D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'SSO_DIR'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: SSO_DIR'
 +TFIELDLIST(IDX)%CUNITS     = 'degree'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_SSO_DIR'
 +TFIELDLIST(IDX)%NGRID      = 4
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 2
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X2D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'AVG_ZS'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: AVG_ZS'
 +TFIELDLIST(IDX)%CUNITS     = 'm'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_AVG_ZS'
 +TFIELDLIST(IDX)%NGRID      = 4
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 2
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X2D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'SIL_ZS'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: SIL_ZS'
 +TFIELDLIST(IDX)%CUNITS     = 'm'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_SIL_ZS'
 +TFIELDLIST(IDX)%NGRID      = 4
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 2
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X2D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'MAX_ZS'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: MAX_ZS'
 +TFIELDLIST(IDX)%CUNITS     = 'm'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_MAX_ZS'
 +TFIELDLIST(IDX)%NGRID      = 4
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 2
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X2D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'MIN_ZS'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: MIN_ZS'
 +TFIELDLIST(IDX)%CUNITS     = 'm'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_MIN_ZS'
 +TFIELDLIST(IDX)%NGRID      = 4
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 2
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X2D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'SSO_STDEV'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: SSO_STDEV'
 +TFIELDLIST(IDX)%CUNITS     = 'm'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_SSO_STDEV'
 +TFIELDLIST(IDX)%NGRID      = 4
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 2
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X2D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'INPRC'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: INPRC'
 +TFIELDLIST(IDX)%CUNITS     = 'm s-1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
- TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_ACcumulated Cloud Precipitation Rain Rate'
++TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_INstantaneous Cloud Precipitation Rate'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 2
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X2D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'ACPRC'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: ACPRC'
 +TFIELDLIST(IDX)%CUNITS     = 'm'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
++TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_ACcumulated Cloud Precipitation Rate'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 2
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X2D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'INDEP'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: INDEP'
 +TFIELDLIST(IDX)%CUNITS     = 'm s-1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_INstantaneous Cloud Deposition Rate'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 2
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X2D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'ACDEP'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: ACDEP'
 +TFIELDLIST(IDX)%CUNITS     = 'm'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_ACcumulated Cloud Deposition Rate'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 2
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X2D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'INPRR'
 +TFIELDLIST(IDX)%CSTDNAME   = 'rainfall_rate'
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: INPRR'
 +TFIELDLIST(IDX)%CUNITS     = 'm s-1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_INstantaneous Precipitation Rain Rate'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 2
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X2D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'INPRR3D'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: INPRR3D'
 +TFIELDLIST(IDX)%CUNITS     = 'm s-1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_INstantaneous 3D Rain Precipitation flux'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'EVAP3D'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: EVAP3D'
 +TFIELDLIST(IDX)%CUNITS     = 'kg kg-1 s-1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_INstantaneous 3D Rain Evaporation flux'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'ACPRR'
 +TFIELDLIST(IDX)%CSTDNAME   = 'rainfall_amount'
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: ACPRR'
 +!PW: TODO: CF-convention prefers 'kg m-2'
 +TFIELDLIST(IDX)%CUNITS     = 'm'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_ACcumulated Precipitation Rain Rate'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 2
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X2D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'INPRS'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: INPRS'
 +TFIELDLIST(IDX)%CUNITS     = 'm s-1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_INstantaneous PRecipitation Snow Rate'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 2
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X2D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'ACPRS'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: ACPRS'
 +TFIELDLIST(IDX)%CUNITS     = 'm'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_ACcumulated PRecipitation Snow Rate'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 2
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X2D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'INPRG'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: INPRG'
 +TFIELDLIST(IDX)%CUNITS     = 'm s-1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_INstantaneous PRecipitation Graupel Rate'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 2
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X2D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'ACPRG'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: ACPRG'
 +TFIELDLIST(IDX)%CUNITS     = 'm'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_ACcumulated PRecipitation Graupel Rate'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 2
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X2D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'INPRH'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: INPRH'
 +TFIELDLIST(IDX)%CUNITS     = 'm s-1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_INstantaneous PRecipitation Hail Rate'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 2
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X2D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'ACPRH'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: ACPRH'
 +TFIELDLIST(IDX)%CUNITS     = 'm'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_ACcumulated PRecipitation Hail Rate'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 2
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X2D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'INPRT'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: INPRT'
 +TFIELDLIST(IDX)%CUNITS     = 'm s-1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Total INstantaneaous PRecipitation rate'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 2
 +!No permanent variable associated to this field
 +!ALLOCATE(TFIELDLIST(IDX)%TFIELD_X2D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'ACPRT'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: ACPRT'
 +TFIELDLIST(IDX)%CUNITS     = 'm'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Total ACcumulated PRecipitation rate'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 2
 +!No permanent variable associated to this field
 +!ALLOCATE(TFIELDLIST(IDX)%TFIELD_X2D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'VT_FLX'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: VT_FLX'
 +TFIELDLIST(IDX)%CUNITS     = 'K m s-1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = ''
 +TFIELDLIST(IDX)%NGRID      = 2
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'WT_FLX'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: WT_FLX'
 +TFIELDLIST(IDX)%CUNITS     = 'K m s-1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = ''
 +TFIELDLIST(IDX)%NGRID      = 4
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'RTHS_EDDY_FLUX'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: RTHS_EDDY_FLUX'
 +!TODO PW: units?
 +TFIELDLIST(IDX)%CUNITS     = ''
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = ''
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'VU_FLX'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: VU_FLX'
 +TFIELDLIST(IDX)%CUNITS     = 'm s-2'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = ''
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'RVS_EDDY_FLUX'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: RVS_EDDY_FLUX'
 +!TODO PW: units?
 +TFIELDLIST(IDX)%CUNITS     = ''
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = ''
 +TFIELDLIST(IDX)%NGRID      = 3
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +!
 +IF (TRIM(CPROGRAM)=='REAL') THEN
 +!PW: not yet known: IF (LFILTERING) THEN
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'UT15'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: UT15'
 +TFIELDLIST(IDX)%CUNITS     = 'm s-1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Z_U component of Total wind'
 +TFIELDLIST(IDX)%NGRID      = 2
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'VT15'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: VT15'
 +TFIELDLIST(IDX)%CUNITS     = 'm s-1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Z_V component of Total wind'
 +TFIELDLIST(IDX)%NGRID      = 3
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'TEMPTOT'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: TEMPTOT'
 +TFIELDLIST(IDX)%CUNITS     = 'K'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Z_TOTal TEMPerature'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'PRESTOT'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: PRESTOT'
 +TFIELDLIST(IDX)%CUNITS     = 'Pa'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Z_TOTal PRESsure'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 2
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X2D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'HUMTOT'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: HUMTOT'
 +TFIELDLIST(IDX)%CUNITS     = 'kg kg-1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Z_TOTal specific HUMidity'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'UT16'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: UT16'
 +TFIELDLIST(IDX)%CUNITS     = 'm s-1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Z_U component of Environmental wind'
 +TFIELDLIST(IDX)%NGRID      = 2
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'VT16'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: VT16'
 +TFIELDLIST(IDX)%CUNITS     = 'm s-1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Z_V component of Environmental wind'
 +TFIELDLIST(IDX)%NGRID      = 3
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'TEMPENV'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: TEMPENV'
 +TFIELDLIST(IDX)%CUNITS     = 'K'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Z_ENVironmental TEMPerature'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'PRESENV'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: PRESENV'
 +TFIELDLIST(IDX)%CUNITS     = 'Pa'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Z_ENVironmental PRESsure'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 2
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X2D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'HUMENV'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: HUMENV'
 +TFIELDLIST(IDX)%CUNITS     = 'kg kg-1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Z_ENVironmental specific HUMidity'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'UT17'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: UT17'
 +TFIELDLIST(IDX)%CUNITS     = 'm s-1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Z_U component of Basic wind'
 +TFIELDLIST(IDX)%NGRID      = 2
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'VT17'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: VT17'
 +TFIELDLIST(IDX)%CUNITS     = 'm s-1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Z_V component of Basic wind'
 +TFIELDLIST(IDX)%NGRID      = 3
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'TEMPBAS'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: TEMPBAS'
 +TFIELDLIST(IDX)%CUNITS     = 'K'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Z_BASic TEMPerature'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'PRESBAS'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: PRESBAS'
 +TFIELDLIST(IDX)%CUNITS     = 'Pa'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Z_BASic PRESsure'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'HUMBAS'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: HUMBAS'
 +TFIELDLIST(IDX)%CUNITS     = 'kg kg-1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Z_BASic specific HUMidity'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = 'VTDIS'
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: VTDIS'
 +TFIELDLIST(IDX)%CUNITS     = 'm s-1'
 +TFIELDLIST(IDX)%CDIR       = 'XY'
 +TFIELDLIST(IDX)%CCOMMENT   = 'X_Y_Z_Total disturbance tangential wind'
 +TFIELDLIST(IDX)%NGRID      = 1
 +TFIELDLIST(IDX)%NTYPE      = TYPEREAL
 +TFIELDLIST(IDX)%NDIMS      = 3
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_X3D(IMODEL))
 +IDX = IDX+1
 +!
 +!END IF !LFILTERING
 +END IF !CPROGRAM==REAL
 +!
 +!
 +WRITE(YMSG,'("number of used fields=",I4," out of ",I4)') IDX-1,MAXFIELDS
 +CALL PRINT_MSG(NVERB_INFO,'GEN','INI_FIELD_LIST',TRIM(YMSG))
 +!
 +#if 0
 +!
 +IF(IDX>MAXFIELDS) CALL ERR_INI_FIELD_LIST()
 +TFIELDLIST(IDX)%CMNHNAME   = ''
 +TFIELDLIST(IDX)%CSTDNAME   = ''
 +TFIELDLIST(IDX)%CLONGNAME  = 'MesoNH: '
 +TFIELDLIST(IDX)%CUNITS     = ''
 +TFIELDLIST(IDX)%CDIR       = ''
 +TFIELDLIST(IDX)%CLBTYPE    = ''
 +TFIELDLIST(IDX)%CCOMMENT   = ''
 +TFIELDLIST(IDX)%NGRID      = 
 +TFIELDLIST(IDX)%NTYPE      = 
 +TFIELDLIST(IDX)%NDIMS      = 
 +ALLOCATE(TFIELDLIST(IDX)%TFIELD_xxxD(IMODEL))
 +IDX = IDX+1
 +#endif
 +!
 +CONTAINS
 +SUBROUTINE ERR_INI_FIELD_LIST()
 +  WRITE(YMSG,'( "IDX>MAXFIELDS (",I5,")" )') MAXFIELDS
 +  CALL PRINT_MSG(NVERB_FATAL,'GEN','INI_FIELD_LIST',TRIM(YMSG))
 +END SUBROUTINE ERR_INI_FIELD_LIST
 +!
 +END SUBROUTINE INI_FIELD_LIST
 +!
 +SUBROUTINE FIND_FIELD_ID_FROM_MNHNAME(HMNHNAME,KID,KRESP)
 +!
 +CHARACTER(LEN=*),            INTENT(IN) :: HMNHNAME !Name of the field to find
 +INTEGER,                     INTENT(OUT):: KID      !Index of the field
 +INTEGER,                     INTENT(OUT):: KRESP    !Return-code 
 +!
 +INTEGER :: IDX,JI
 +INTEGER :: ICOUNT
 +INTEGER,SAVE :: IFIRSTGUESS=1 !Store first field to test
 +CHARACTER(LEN=64) :: YMSG
 +!
 +!PW: TODO: possible optimizations:
 +! * Classement alphanumerique + index vers 1er champ commencant par caractere
 +! * Classement dans l'ordre des ecritures + stockage dernier hit + reboucler depuis le debut => DONE
 +!
 +IF (.NOT.LFIELDLIST_ISINIT) THEN
 +  CALL PRINT_MSG(NVERB_FATAL,'GEN','FIND_FIELD_ID_FROM_MNHNAME','TFIELDLIST not yet initialized')
 +END IF
 +!
 +KID = 0
 +KRESP = 0
 +ICOUNT = 0
 +IDX = IFIRSTGUESS
 +!
 +DO
 +  ICOUNT = ICOUNT + 1
 +  IF (TRIM(TFIELDLIST(IDX)%CMNHNAME)=='') THEN !Last entry
 +    IDX = 1
 +  ELSE IF (TRIM(TFIELDLIST(IDX)%CMNHNAME)==TRIM(HMNHNAME)) THEN
 +    KID = IDX
 +    EXIT
 +  ELSE 
 +    IDX = IDX + 1
 +    IF (IDX>MAXFIELDS) IDX = 1
 +  END IF
 +  IF (IDX == IFIRSTGUESS) EXIT !All entries have been tested
 +END DO
 +!
 +IF (KID==0) THEN
 +  !Field not found
 +  KRESP = -1
 +  CALL PRINT_MSG(NVERB_WARNING,'GEN','FIND_FIELD_ID_FROM_MNHNAME','field '//TRIM(HMNHNAME)//' not known')
 +ELSE
 +  IFIRSTGUESS = IDX+1
 +  IF (IFIRSTGUESS>MAXFIELDS) IFIRSTGUESS = 1
 +  WRITE(YMSG,'( "field ",A16," found after ",I4," attempt(s)" )') TRIM(HMNHNAME),ICOUNT
 +  CALL PRINT_MSG(NVERB_DEBUG,'GEN','FIND_FIELD_ID_FROM_MNHNAME',TRIM(YMSG))
 +END IF
 +!
 +END SUBROUTINE FIND_FIELD_ID_FROM_MNHNAME
 +!
 +!
 +SUBROUTINE ALLOC_FIELD_SCALARS
 +!
 +USE MODD_DYN_n
 +USE MODD_PARAM_n
 +!
 +CALL PRINT_MSG(NVERB_DEBUG,'GEN','ALLOC_FIELD_SCALARS','called')
 +!
 +IF (LFIELDLIST_ISINIT) THEN
 +  CALL PRINT_MSG(NVERB_FATAL,'GEN','ALLOC_FIELD_SCALARS','TFIELDLIST already initialized')
 +END IF
 +!
 +!
 +IF (.NOT.ASSOCIATED(NRIMX)) THEN
 +  CALL PRINT_MSG(NVERB_DEBUG,'GEN','ALLOC_FIELD_SCALARS',' NRIMX was not associated')
 +  ALLOCATE(NRIMX)
 +END IF
 +IF (.NOT.ASSOCIATED(NRIMY)) THEN
 +  CALL PRINT_MSG(NVERB_DEBUG,'GEN','ALLOC_FIELD_SCALARS',' NRIMY was not associated')
 +  ALLOCATE(NRIMY)
 +END IF
 +IF (.NOT.ASSOCIATED(LHORELAX_UVWTH)) THEN
 +  CALL PRINT_MSG(NVERB_DEBUG,'GEN','ALLOC_FIELD_SCALARS',' LHORELAX_UVWTH was not associated')
 +  ALLOCATE(LHORELAX_UVWTH)
 +END IF
 +IF (.NOT.ASSOCIATED(LHORELAX_TKE)) THEN
 +  CALL PRINT_MSG(NVERB_DEBUG,'GEN','ALLOC_FIELD_SCALARS',' LHORELAX_TKE was not associated')
 +  ALLOCATE(LHORELAX_TKE)
 +END IF
 +IF (.NOT.ASSOCIATED(CSURF)) THEN
 +  CALL PRINT_MSG(NVERB_DEBUG,'GEN','ALLOC_FIELD_SCALARS',' CSURF was not associated')
 +  ALLOCATE(CHARACTER(LEN=4) :: CSURF)
 +END IF
 +!
 +END SUBROUTINE ALLOC_FIELD_SCALARS
 +!
 +!
 +SUBROUTINE INI_FIELD_SCALARS
 +!
 +USE MODD_DYN_n
 +USE MODD_FIELD_n
 +USE MODD_GRID_n
 +USE MODD_TIME_n
 +USE MODD_PARAM_n
 +!
 +INTEGER :: IID,IRESP
 +!
 +CALL PRINT_MSG(NVERB_DEBUG,'GEN','INI_FIELD_SCALARS','called')
 +!
 +IF (.NOT.LFIELDLIST_ISINIT) THEN
 +  CALL PRINT_MSG(NVERB_FATAL,'GEN','FIND_FIELD_ID_FROM_MNHNAME','TFIELDLIST not yet initialized')
 +END IF
 +!
 +!
 +IF (.NOT.ASSOCIATED(LSLEVE)) THEN
 +  CALL PRINT_MSG(NVERB_DEBUG,'GEN','INI_FIELD_SCALARS',' LSLEVE was not associated')
 +  ALLOCATE(LSLEVE)
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('SLEVE',IID,IRESP)
 +  TFIELDLIST(IID)%TFIELD_L0D(1)%DATA=>LSLEVE
 +END IF
 +!
 +IF (.NOT.ASSOCIATED(XLEN1)) THEN
 +  CALL PRINT_MSG(NVERB_DEBUG,'GEN','INI_FIELD_SCALARS',' XLEN1 was not associated')
 +  ALLOCATE(XLEN1)
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('LEN1',IID,IRESP)
 +  TFIELDLIST(IID)%TFIELD_X0D(1)%DATA=>XLEN1
 +END IF
 +!
 +IF (.NOT.ASSOCIATED(XLEN2)) THEN
 +  CALL PRINT_MSG(NVERB_DEBUG,'GEN','INI_FIELD_SCALARS',' XLEN2 was not associated')
 +  ALLOCATE(XLEN2)
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('LEN2',IID,IRESP)
 +  TFIELDLIST(IID)%TFIELD_X0D(1)%DATA=>XLEN2
 +END IF
 +!
 +IF (.NOT.ASSOCIATED(TDTMOD)) THEN
 +  CALL PRINT_MSG(NVERB_DEBUG,'GEN','INI_FIELD_SCALARS',' TDTMOD was not associated')
 +  ALLOCATE(TDTMOD)
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('DTMOD',IID,IRESP)
 +  TFIELDLIST(IID)%TFIELD_T0D(1)%DATA=>TDTMOD
 +END IF
 +!
 +IF (.NOT.ASSOCIATED(TDTCUR)) THEN
 +  CALL PRINT_MSG(NVERB_DEBUG,'GEN','INI_FIELD_SCALARS',' TDTCUR was not associated')
 +  ALLOCATE(TDTCUR)
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('DTCUR',IID,IRESP)
 +  TFIELDLIST(IID)%TFIELD_T0D(1)%DATA=>TDTCUR
 +END IF
 +!
 +IF (.NOT.ASSOCIATED(TDTRAD_FULL)) THEN
 +  CALL PRINT_MSG(NVERB_DEBUG,'GEN','INI_FIELD_SCALARS',' TDTRAD_FULL was not associated')
 +  ALLOCATE(TDTRAD_FULL)
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('DTRAD_FULL',IID,IRESP)
 +  TFIELDLIST(IID)%TFIELD_T0D(1)%DATA=>TDTRAD_FULL
 +END IF
 +!
 +IF (.NOT.ASSOCIATED(TDTRAD_CLONLY)) THEN
 +  CALL PRINT_MSG(NVERB_DEBUG,'GEN','INI_FIELD_SCALARS',' TDTRAD_CLONLY was not associated')
 +  ALLOCATE(TDTRAD_CLONLY)
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('DTRAD_CLLY',IID,IRESP)
 +  TFIELDLIST(IID)%TFIELD_T0D(1)%DATA=>TDTRAD_CLONLY
 +END IF
 +!
 +IF (.NOT.ASSOCIATED(TDTDCONV)) THEN
 +  CALL PRINT_MSG(NVERB_DEBUG,'GEN','INI_FIELD_SCALARS',' TDTDCONV was not associated')
 +  ALLOCATE(TDTDCONV)
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('DTDCONV',IID,IRESP)
 +  TFIELDLIST(IID)%TFIELD_T0D(1)%DATA=>TDTDCONV
 +END IF
 +!
 +IF (.NOT.ASSOCIATED(CSURF)) THEN
 +  CALL PRINT_MSG(NVERB_DEBUG,'GEN','INI_FIELD_SCALARS',' CSURF was not associated')
 +  ALLOCATE(CHARACTER(LEN=4) :: CSURF)
 +END IF
 +CALL FIND_FIELD_ID_FROM_MNHNAME('SURF',IID,IRESP)
 +TFIELDLIST(IID)%TFIELD_C0D(1)%DATA=>CSURF
 +!
 +IF (.NOT.ASSOCIATED(XDRYMASST)) THEN
 +  CALL PRINT_MSG(NVERB_DEBUG,'GEN','INI_FIELD_SCALARS',' XDRYMASST was not associated')
 +  ALLOCATE(XDRYMASST)
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('DRYMASST',IID,IRESP)
 +  TFIELDLIST(IID)%TFIELD_X0D(1)%DATA=>XDRYMASST
 +END IF
 +!
 +IF (.NOT.ASSOCIATED(NRIMX)) THEN
 +  CALL PRINT_MSG(NVERB_DEBUG,'GEN','INI_FIELD_SCALARS',' NRIMX was not associated')
 +  ALLOCATE(NRIMX)
 +END IF
 +!
 +CALL FIND_FIELD_ID_FROM_MNHNAME('RIMX',IID,IRESP)
 +TFIELDLIST(IID)%TFIELD_N0D(1)%DATA=>NRIMX
 +IF (.NOT.ASSOCIATED(NRIMY)) THEN
 +  CALL PRINT_MSG(NVERB_DEBUG,'GEN','INI_FIELD_SCALARS',' NRIMY was not associated')
 +  ALLOCATE(NRIMY)
 +END IF
 +!
 +CALL FIND_FIELD_ID_FROM_MNHNAME('RIMY',IID,IRESP)
 +TFIELDLIST(IID)%TFIELD_N0D(1)%DATA=>NRIMY
 +!
 +IF (.NOT.ASSOCIATED(LHORELAX_UVWTH)) THEN
 +  CALL PRINT_MSG(NVERB_DEBUG,'GEN','INI_FIELD_SCALARS',' LHORELAX_UVWTH was not associated')
 +  ALLOCATE(LHORELAX_UVWTH)
 +END IF
 +CALL FIND_FIELD_ID_FROM_MNHNAME('HORELAX_UVWTH',IID,IRESP)
 +TFIELDLIST(IID)%TFIELD_L0D(1)%DATA=>LHORELAX_UVWTH
 +!
 +IF (.NOT.ASSOCIATED(LHORELAX_TKE)) THEN
 +  CALL PRINT_MSG(NVERB_DEBUG,'GEN','INI_FIELD_SCALARS',' LHORELAX_TKE was not associated')
 +  ALLOCATE(LHORELAX_TKE)
 +END IF
 +CALL FIND_FIELD_ID_FROM_MNHNAME('HORELAX_TKE',IID,IRESP)
 +TFIELDLIST(IID)%TFIELD_L0D(1)%DATA=>LHORELAX_TKE
 +!
 +END SUBROUTINE INI_FIELD_SCALARS
 +!
 +!
 +SUBROUTINE FIELDLIST_GOTO_MODEL(KFROM, KTO)
 +!
 +USE MODD_REF
 +!
 +USE MODD_ADV_n
 +USE MODD_CONF_n
 +USE MODD_DEEP_CONVECTION_n
 +USE MODD_DEF_EDDY_FLUX_n
 +USE MODD_DEF_EDDYUV_FLUX_n
 +USE MODD_DYN_n
 +USE MODD_ELEC_n
 +USE MODD_FIELD_n
 +USE MODD_GR_FIELD_n
 +USE MODD_GRID_n
 +USE MODD_HURR_FIELD_n
 +USE MODD_LIMA_PRECIP_SCAVENGING_n
 +USE MODD_LSFIELD_n
 +USE MODD_PARAM_n
 +USE MODD_PAST_FIELD_n
 +USE MODD_CH_PH_n
 +USE MODD_PRECIP_n
 +USE MODD_RADIATIONS_n
 +USE MODD_REF_n
 +USE MODD_TIME_n
 +USE MODD_TURB_n
 +!
 +INTEGER, INTENT(IN) :: KFROM, KTO
 +!
 +!LOGICAL,SAVE :: GFIRST_CALL=.TRUE.
 +INTEGER :: IID,IID2,IRESP
 +CHARACTER(LEN=64) :: YMSG
 +!
 +WRITE(YMSG,'( I4,"->",I4 )') KFROM,KTO
 +CALL PRINT_MSG(NVERB_DEBUG,'GEN','FIELDLIST_GOTO_MODEL',TRIM(YMSG))
 +!
 +! IF (GFIRST_CALL) THEN
 +!   !This is necessary because the first time this subroutine is called
 +!   !the TFIELDLIST is not yet initialized.
 +!   !The use of this subroutine is not useful the first timebecause the
 +!   !data for the fields has not yet been allocated.
 +!   GFIRST_CALL = .FALSE.
 +!   RETURN
 +! END IF
 +!
 +IF (.NOT.LFIELDLIST_ISINIT) THEN
 +  CALL PRINT_MSG(NVERB_WARNING,'GEN','FIELDLIST_GOTO_MODEL','TFIELDLIST not yet initialized')
 +  RETURN
 +END IF
 +!
 +! Initialize some pointers
 +!
 +IF (KFROM == KTO) THEN
 +  IF (.NOT.ALLOCATED(XRHODREFZ) .AND. CPROGRAM/='NESPGD' .AND. CPROGRAM/='PGD') THEN
 +    CALL PRINT_MSG(NVERB_FATAL,'GEN','FIELDLIST_GOTO_MODEL','XRHODREFZ not yet allocated')
 +  END IF
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('RHOREFZ',IID,IRESP)
 +  TFIELDLIST(IID)%TFIELD_X1D(KFROM)%DATA=>XRHODREFZ
 +  !
 +  IF (.NOT.ALLOCATED(XTHVREFZ) .AND. CPROGRAM/='NESPGD' .AND. CPROGRAM/='PGD') THEN
 +    CALL PRINT_MSG(NVERB_FATAL,'GEN','FIELDLIST_GOTO_MODEL','XTHVREFZ not yet allocated')
 +  END IF
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('THVREFZ',IID,IRESP)
 +  TFIELDLIST(IID)%TFIELD_X1D(KFROM)%DATA=>XTHVREFZ
 +END IF
 +!
 +!
 +!
 +!
 +! Save current state for allocated arrays
 +!
 +!
 +!
 +!
 +!
 +! MODD_FIELD_n variables
 +!
 +CALL FIND_FIELD_ID_FROM_MNHNAME('UT',   IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XUT
 +CALL FIND_FIELD_ID_FROM_MNHNAME('VT',   IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XVT
 +CALL FIND_FIELD_ID_FROM_MNHNAME('WT',   IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XWT
 +CALL FIND_FIELD_ID_FROM_MNHNAME('THT',  IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XTHT
 +CALL FIND_FIELD_ID_FROM_MNHNAME('TKET', IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XTKET
 +CALL FIND_FIELD_ID_FROM_MNHNAME('PABST',IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XPABST
 +CALL FIND_FIELD_ID_FROM_MNHNAME('RT',   IID,IRESP); TFIELDLIST(IID)%TFIELD_X4D(KFROM)%DATA => XRT
 +!
 +IF (CONF_MODEL(KFROM)%IDX_RVT>0) THEN
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('RVT',  IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA=>XRT(:,:,:,CONF_MODEL(KFROM)%IDX_RVT)
 +END IF
 +IF (CONF_MODEL(KFROM)%IDX_RCT>0) THEN
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('RCT',  IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA=>XRT(:,:,:,CONF_MODEL(KFROM)%IDX_RCT)
 +END IF
 +IF (CONF_MODEL(KFROM)%IDX_RRT>0) THEN
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('RRT',  IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA=>XRT(:,:,:,CONF_MODEL(KFROM)%IDX_RRT)
 +END IF
 +IF (CONF_MODEL(KFROM)%IDX_RIT>0) THEN
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('RIT',  IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA=>XRT(:,:,:,CONF_MODEL(KFROM)%IDX_RIT)
 +END IF
 +IF (CONF_MODEL(KFROM)%IDX_RST>0) THEN
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('RST',  IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA=>XRT(:,:,:,CONF_MODEL(KFROM)%IDX_RST)
 +END IF
 +IF (CONF_MODEL(KFROM)%IDX_RGT>0) THEN
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('RGT',  IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA=>XRT(:,:,:,CONF_MODEL(KFROM)%IDX_RGT)
 +END IF
 +IF (CONF_MODEL(KFROM)%IDX_RHT>0) THEN
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('RHT',  IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA=>XRT(:,:,:,CONF_MODEL(KFROM)%IDX_RHT)
 +END IF
 +!
 +CALL FIND_FIELD_ID_FROM_MNHNAME('SUPSATMAX',IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XSUPSAT
 +CALL FIND_FIELD_ID_FROM_MNHNAME('NACT',     IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XNACT
 +CALL FIND_FIELD_ID_FROM_MNHNAME('SSPRO',    IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XSSPRO
 +CALL FIND_FIELD_ID_FROM_MNHNAME('NPRO',     IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XNPRO
 +CALL FIND_FIELD_ID_FROM_MNHNAME('SRCT',     IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XSRCT
 +CALL FIND_FIELD_ID_FROM_MNHNAME('SIGS',     IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XSIGS
 +!
 +IF (CPROGRAM == 'MESONH') THEN
 +  !
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('US_PRES',IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XRUS_PRES
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('VS_PRES',IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XRVS_PRES
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('WS_PRES',IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XRWS_PRES
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('THS_CLD',IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XRTHS_CLD
 +  !
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('RS_CLD',IID,IRESP); TFIELDLIST(IID)%TFIELD_X4D(KFROM)%DATA => XRRS_CLD
 +  !
 +  IF (CONF_MODEL(KFROM)%IDX_RVT>0) THEN
 +    CALL FIND_FIELD_ID_FROM_MNHNAME('RVS_CLD',IID,IRESP)
 +    TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XRRS_CLD(:,:,:,CONF_MODEL(KFROM)%IDX_RVT)
 +  END IF
 +  IF (CONF_MODEL(KFROM)%IDX_RCT>0) THEN
 +    CALL FIND_FIELD_ID_FROM_MNHNAME('RCS_CLD',IID,IRESP)
 +    TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XRRS_CLD(:,:,:,CONF_MODEL(KFROM)%IDX_RCT)
 +  END IF
 +  IF (CONF_MODEL(KFROM)%IDX_RRT>0) THEN
 +    CALL FIND_FIELD_ID_FROM_MNHNAME('RRS_CLD',IID,IRESP)
 +    TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XRRS_CLD(:,:,:,CONF_MODEL(KFROM)%IDX_RRT)
 +  END IF
 +  IF (CONF_MODEL(KFROM)%IDX_RIT>0) THEN
 +    CALL FIND_FIELD_ID_FROM_MNHNAME('RIS_CLD',IID,IRESP)
 +    TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XRRS_CLD(:,:,:,CONF_MODEL(KFROM)%IDX_RIT)
 +  END IF
 +  IF (CONF_MODEL(KFROM)%IDX_RST>0) THEN
 +    CALL FIND_FIELD_ID_FROM_MNHNAME('RSS_CLD',IID,IRESP)
 +    TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XRRS_CLD(:,:,:,CONF_MODEL(KFROM)%IDX_RST)
 +  END IF
 +  IF (CONF_MODEL(KFROM)%IDX_RGT>0) THEN
 +    CALL FIND_FIELD_ID_FROM_MNHNAME('RGS_CLD',IID,IRESP)
 +    TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XRRS_CLD(:,:,:,CONF_MODEL(KFROM)%IDX_RGT)
 +  END IF
 +  IF (CONF_MODEL(KFROM)%IDX_RHT>0) THEN
 +    CALL FIND_FIELD_ID_FROM_MNHNAME('RHS_CLD',IID,IRESP)
 +    TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XRRS_CLD(:,:,:,CONF_MODEL(KFROM)%IDX_RHT)
 +  END IF
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('CLDFR',IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XCLDFR
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('CIT',  IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XCIT
 +  !
 +END IF
 +!
 +! MODD_PAST_FIELD_n variables
 +!
 +CALL FIND_FIELD_ID_FROM_MNHNAME('UM', IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XUM
 +CALL FIND_FIELD_ID_FROM_MNHNAME('VM', IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XVM
 +CALL FIND_FIELD_ID_FROM_MNHNAME('WM', IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XWM
 +CALL FIND_FIELD_ID_FROM_MNHNAME('DUM',IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XDUM
 +CALL FIND_FIELD_ID_FROM_MNHNAME('DVM',IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XDVM
 +CALL FIND_FIELD_ID_FROM_MNHNAME('DWM',IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XDWM
 +!
 +! MODD_LIMA_PRECIP_SCAVENGING_n variables
 +!
 +CALL FIND_FIELD_ID_FROM_MNHNAME('INPAP',IID,IRESP); TFIELDLIST(IID)%TFIELD_X2D(KFROM)%DATA => XINPAP
 +CALL FIND_FIELD_ID_FROM_MNHNAME('ACPAP',IID,IRESP); TFIELDLIST(IID)%TFIELD_X2D(KFROM)%DATA => XACPAP
 +!
 +! MODD_ELEC_n variables
 +!
 +CALL FIND_FIELD_ID_FROM_MNHNAME('EFIELDU',IID,IRESP);  TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XEFIELDU
 +CALL FIND_FIELD_ID_FROM_MNHNAME('EFIELDV',IID,IRESP);  TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XEFIELDV
 +CALL FIND_FIELD_ID_FROM_MNHNAME('EFIELDW',IID,IRESP);  TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XEFIELDW
 +CALL FIND_FIELD_ID_FROM_MNHNAME('NI_IAGGS',IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XNI_IAGGS
 +CALL FIND_FIELD_ID_FROM_MNHNAME('NI_IDRYG',IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XNI_IDRYG
 +CALL FIND_FIELD_ID_FROM_MNHNAME('NI_SDRYG',IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XNI_SDRYG
 +CALL FIND_FIELD_ID_FROM_MNHNAME('INDUC_CG',IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XIND_RATE
 +!
 +! MODD_CH_PH_n variables
 +!
 +CALL FIND_FIELD_ID_FROM_MNHNAME('PHC',IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XPHC
 +CALL FIND_FIELD_ID_FROM_MNHNAME('PHR',IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XPHR
 +!
 +! MODD_LSFIELD_n variables
 +!
 +CALL FIND_FIELD_ID_FROM_MNHNAME('LSUM', IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XLSUM
 +CALL FIND_FIELD_ID_FROM_MNHNAME('LSVM', IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XLSVM
 +CALL FIND_FIELD_ID_FROM_MNHNAME('LSWM', IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XLSWM
 +CALL FIND_FIELD_ID_FROM_MNHNAME('LSTHM',IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XLSTHM
 +IF(LUSERV) CALL FIND_FIELD_ID_FROM_MNHNAME('LSRVM',IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XLSRVM
 +CALL FIND_FIELD_ID_FROM_MNHNAME('LBXUM', IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XLBXUM
 +CALL FIND_FIELD_ID_FROM_MNHNAME('LBXVM', IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XLBXVM
 +CALL FIND_FIELD_ID_FROM_MNHNAME('LBXWM', IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XLBXWM
 +CALL FIND_FIELD_ID_FROM_MNHNAME('LBYUM', IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XLBYUM
 +CALL FIND_FIELD_ID_FROM_MNHNAME('LBYVM', IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XLBYVM
 +CALL FIND_FIELD_ID_FROM_MNHNAME('LBYWM', IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XLBYWM
 +CALL FIND_FIELD_ID_FROM_MNHNAME('LBXTHM',IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XLBXTHM
 +CALL FIND_FIELD_ID_FROM_MNHNAME('LBYTHM',IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XLBYTHM
 +!
 +! MODD_DYN_n variables
 +!
 +!***NONE***
 +!
 +! MODD_ADV_n variables
 +!
 +CALL FIND_FIELD_ID_FROM_MNHNAME('TKEMS',IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XRTKEMS
 +!
 +! MODD_GRID_n variables
 +!
 +CALL FIND_FIELD_ID_FROM_MNHNAME('ZS',   IID,IRESP); TFIELDLIST(IID)%TFIELD_X2D(KFROM)%DATA => XZS
 +CALL FIND_FIELD_ID_FROM_MNHNAME('ZSMT', IID,IRESP); TFIELDLIST(IID)%TFIELD_X2D(KFROM)%DATA => XZSMT
 +CALL FIND_FIELD_ID_FROM_MNHNAME('XHAT', IID,IRESP); TFIELDLIST(IID)%TFIELD_X1D(KFROM)%DATA => XXHAT
 +CALL FIND_FIELD_ID_FROM_MNHNAME('YHAT', IID,IRESP); TFIELDLIST(IID)%TFIELD_X1D(KFROM)%DATA => XYHAT
 +CALL FIND_FIELD_ID_FROM_MNHNAME('ZHAT', IID,IRESP); TFIELDLIST(IID)%TFIELD_X1D(KFROM)%DATA => XZHAT
 +CALL FIND_FIELD_ID_FROM_MNHNAME('DXHAT',IID,IRESP); TFIELDLIST(IID)%TFIELD_X1D(KFROM)%DATA => XDXHAT
 +CALL FIND_FIELD_ID_FROM_MNHNAME('DYHAT',IID,IRESP); TFIELDLIST(IID)%TFIELD_X1D(KFROM)%DATA => XDYHAT
 +CALL FIND_FIELD_ID_FROM_MNHNAME('ALT',  IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XZZ
 +CALL FIND_FIELD_ID_FROM_MNHNAME('DIRCOSXW',IID,IRESP); TFIELDLIST(IID)%TFIELD_X2D(KFROM)%DATA => XDIRCOSXW
 +CALL FIND_FIELD_ID_FROM_MNHNAME('DIRCOSYW',IID,IRESP); TFIELDLIST(IID)%TFIELD_X2D(KFROM)%DATA => XDIRCOSYW
 +CALL FIND_FIELD_ID_FROM_MNHNAME('DIRCOSZW',IID,IRESP); TFIELDLIST(IID)%TFIELD_X2D(KFROM)%DATA => XDIRCOSZW
 +CALL FIND_FIELD_ID_FROM_MNHNAME('COSSLOPE',IID,IRESP); TFIELDLIST(IID)%TFIELD_X2D(KFROM)%DATA => XCOSSLOPE
 +CALL FIND_FIELD_ID_FROM_MNHNAME('SINSLOPE',IID,IRESP); TFIELDLIST(IID)%TFIELD_X2D(KFROM)%DATA => XSINSLOPE
 +CALL FIND_FIELD_ID_FROM_MNHNAME('MAP',  IID,IRESP); TFIELDLIST(IID)%TFIELD_X2D(KFROM)%DATA => XMAP
 +CALL FIND_FIELD_ID_FROM_MNHNAME('LAT',  IID,IRESP); TFIELDLIST(IID)%TFIELD_X2D(KFROM)%DATA => XLAT
 +CALL FIND_FIELD_ID_FROM_MNHNAME('LON',  IID,IRESP); TFIELDLIST(IID)%TFIELD_X2D(KFROM)%DATA => XLON
 +!
 +! MODD_TIME_n variables
 +!
 +!***NONE***
 +!
 +! MODD_PARAM_n variables
 +!
 +!***NONE***
 +!
 +! MODD_TURB_n variables
 +!
 +CALL FIND_FIELD_ID_FROM_MNHNAME('BL_DEPTH', IID,IRESP); TFIELDLIST(IID)%TFIELD_X2D(KFROM)%DATA => XBL_DEPTH
 +CALL FIND_FIELD_ID_FROM_MNHNAME('SBL_DEPTH',IID,IRESP); TFIELDLIST(IID)%TFIELD_X2D(KFROM)%DATA => XSBL_DEPTH
 +CALL FIND_FIELD_ID_FROM_MNHNAME('WTHVMF',   IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XWTHVMF
 +!
 +! MODD_REF_n variables
 +!
 +CALL FIND_FIELD_ID_FROM_MNHNAME('RHODREF',IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XRHODREF
 +CALL FIND_FIELD_ID_FROM_MNHNAME('THVREF', IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XTHVREF
 +!
 +! MODD_RADIATIONS_n variables
 +!
 +IF (CPROGRAM=='MESONH') THEN
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('DTHRAD',      IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XDTHRAD
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('FLALWD',      IID,IRESP); TFIELDLIST(IID)%TFIELD_X2D(KFROM)%DATA => XFLALWD
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('DIRFLASWD',   IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XDIRFLASWD
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('SCAFLASWD',   IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XSCAFLASWD
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('DIRSRFSWD',   IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XDIRSRFSWD
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('CLEARCOL_TM1',IID,IRESP); TFIELDLIST(IID)%TFIELD_N2D(KFROM)%DATA => NCLEARCOL_TM1
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('ZENITH',      IID,IRESP); TFIELDLIST(IID)%TFIELD_X2D(KFROM)%DATA => XZENITH
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('AZIM',        IID,IRESP); TFIELDLIST(IID)%TFIELD_X2D(KFROM)%DATA => XAZIM
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('DIR_ALB',     IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XDIR_ALB
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('SCA_ALB',     IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XSCA_ALB
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('EMIS',        IID,IRESP); TFIELDLIST(IID)%TFIELD_X2D(KFROM)%DATA => XEMIS
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('TSRAD',       IID,IRESP); TFIELDLIST(IID)%TFIELD_X2D(KFROM)%DATA => XTSRAD
 +END IF
 +!
 +! MODD_DEEP_CONVECTION_n variables
 +!
 +IF (TRIM(CPROGRAM) /= 'PGD' .AND. TRIM(CPROGRAM) /= 'NESPGD' .AND. TRIM(CPROGRAM) /= 'SPAWN') THEN
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('COUNTCONV',  IID,IRESP); TFIELDLIST(IID)%TFIELD_N2D(KFROM)%DATA => NCOUNTCONV
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('DTHCONV',    IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XDTHCONV
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('DRVCONV',    IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XDRVCONV
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('DRCCONV',    IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XDRCCONV
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('DRICONV',    IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XDRICONV
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('PRCONV',     IID,IRESP); TFIELDLIST(IID)%TFIELD_X2D(KFROM)%DATA => XPRCONV
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('PACCONV',    IID,IRESP); TFIELDLIST(IID)%TFIELD_X2D(KFROM)%DATA => XPACCONV
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('PRSCONV',    IID,IRESP); TFIELDLIST(IID)%TFIELD_X2D(KFROM)%DATA => XPRSCONV
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('DSVCONV',    IID,IRESP); TFIELDLIST(IID)%TFIELD_X4D(KFROM)%DATA => XDSVCONV
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('PRLFLXCONV', IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XPRLFLXCONV
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('PRSFLXCONV', IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XPRSFLXCONV
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('UMFCONV',    IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XUMFCONV
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('DMFCONV',    IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XDMFCONV
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('MFCONV',     IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XMFCONV
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('CAPE',       IID,IRESP); TFIELDLIST(IID)%TFIELD_X2D(KFROM)%DATA => XCAPE
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('CLTOPCONV',  IID,IRESP); TFIELDLIST(IID)%TFIELD_N2D(KFROM)%DATA => NCLTOPCONV
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('CLBASCONV',  IID,IRESP); TFIELDLIST(IID)%TFIELD_N2D(KFROM)%DATA => NCLBASCONV
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('IC_RATE',    IID,IRESP); TFIELDLIST(IID)%TFIELD_X2D(KFROM)%DATA => XIC_RATE
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('CG_RATE',    IID,IRESP); TFIELDLIST(IID)%TFIELD_X2D(KFROM)%DATA => XCG_RATE
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('IC_TOTAL_NB',IID,IRESP); TFIELDLIST(IID)%TFIELD_X2D(KFROM)%DATA => XIC_TOTAL_NUMBER
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('CG_TOTAL_NB',IID,IRESP); TFIELDLIST(IID)%TFIELD_X2D(KFROM)%DATA => XCG_TOTAL_NUMBER
 +END IF
 +!
 +! MODD_GR_FIELD_n variables
 +!
 +CALL FIND_FIELD_ID_FROM_MNHNAME('SSO_ANIS', IID,IRESP); TFIELDLIST(IID)%TFIELD_X2D(KFROM)%DATA => XSSO_ANISOTROPY
 +CALL FIND_FIELD_ID_FROM_MNHNAME('SSO_SLOPE',IID,IRESP); TFIELDLIST(IID)%TFIELD_X2D(KFROM)%DATA => XSSO_SLOPE
 +CALL FIND_FIELD_ID_FROM_MNHNAME('SSO_DIR',  IID,IRESP); TFIELDLIST(IID)%TFIELD_X2D(KFROM)%DATA => XSSO_DIRECTION
 +CALL FIND_FIELD_ID_FROM_MNHNAME('AVG_ZS',   IID,IRESP); TFIELDLIST(IID)%TFIELD_X2D(KFROM)%DATA => XAVG_ZS
 +CALL FIND_FIELD_ID_FROM_MNHNAME('SIL_ZS',   IID,IRESP); TFIELDLIST(IID)%TFIELD_X2D(KFROM)%DATA => XSIL_ZS
 +CALL FIND_FIELD_ID_FROM_MNHNAME('MAX_ZS',   IID,IRESP); TFIELDLIST(IID)%TFIELD_X2D(KFROM)%DATA => XMAX_ZS
 +CALL FIND_FIELD_ID_FROM_MNHNAME('MIN_ZS',   IID,IRESP); TFIELDLIST(IID)%TFIELD_X2D(KFROM)%DATA => XMIN_ZS
 +CALL FIND_FIELD_ID_FROM_MNHNAME('SSO_STDEV',IID,IRESP); TFIELDLIST(IID)%TFIELD_X2D(KFROM)%DATA => XSSO_STDEV
 +!
 +! MODD_PRECIP_n variables
 +!
 +CALL FIND_FIELD_ID_FROM_MNHNAME('INPRC',  IID,IRESP); TFIELDLIST(IID)%TFIELD_X2D(KFROM)%DATA => XINPRC
 +CALL FIND_FIELD_ID_FROM_MNHNAME('ACPRC',  IID,IRESP); TFIELDLIST(IID)%TFIELD_X2D(KFROM)%DATA => XACPRC
 +CALL FIND_FIELD_ID_FROM_MNHNAME('INDEP',  IID,IRESP); TFIELDLIST(IID)%TFIELD_X2D(KFROM)%DATA => XINDEP
 +CALL FIND_FIELD_ID_FROM_MNHNAME('ACDEP',  IID,IRESP); TFIELDLIST(IID)%TFIELD_X2D(KFROM)%DATA => XACDEP
 +CALL FIND_FIELD_ID_FROM_MNHNAME('INPRR',  IID,IRESP); TFIELDLIST(IID)%TFIELD_X2D(KFROM)%DATA => XINPRR
 +CALL FIND_FIELD_ID_FROM_MNHNAME('INPRR3D',IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XINPRR3D
 +CALL FIND_FIELD_ID_FROM_MNHNAME('EVAP3D', IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XEVAP3D
 +CALL FIND_FIELD_ID_FROM_MNHNAME('ACPRR',  IID,IRESP); TFIELDLIST(IID)%TFIELD_X2D(KFROM)%DATA => XACPRR
 +CALL FIND_FIELD_ID_FROM_MNHNAME('INPRS',  IID,IRESP); TFIELDLIST(IID)%TFIELD_X2D(KFROM)%DATA => XINPRS
 +CALL FIND_FIELD_ID_FROM_MNHNAME('ACPRS',  IID,IRESP); TFIELDLIST(IID)%TFIELD_X2D(KFROM)%DATA => XACPRS
 +CALL FIND_FIELD_ID_FROM_MNHNAME('INPRG',  IID,IRESP); TFIELDLIST(IID)%TFIELD_X2D(KFROM)%DATA => XINPRG
 +CALL FIND_FIELD_ID_FROM_MNHNAME('ACPRG',  IID,IRESP); TFIELDLIST(IID)%TFIELD_X2D(KFROM)%DATA => XACPRG
 +CALL FIND_FIELD_ID_FROM_MNHNAME('INPRH',  IID,IRESP); TFIELDLIST(IID)%TFIELD_X2D(KFROM)%DATA => XINPRH
 +CALL FIND_FIELD_ID_FROM_MNHNAME('ACPRH',  IID,IRESP); TFIELDLIST(IID)%TFIELD_X2D(KFROM)%DATA => XACPRH
 +!
 +! MODD_DEF_EDDY_FLUX_n variables
 +!
 +CALL FIND_FIELD_ID_FROM_MNHNAME('VT_FLX',IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA         => XVTH_FLUX_M
 +CALL FIND_FIELD_ID_FROM_MNHNAME('WT_FLX',IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA         => XWTH_FLUX_M
 +CALL FIND_FIELD_ID_FROM_MNHNAME('RTHS_EDDY_FLUX',IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XRTHS_EDDY_FLUX
 +!
 +! MODD_DEF_EDDYUV_FLUX_n variables
 +!
 +CALL FIND_FIELD_ID_FROM_MNHNAME('VU_FLX',IID,IRESP);        TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XVU_FLUX_M
 +CALL FIND_FIELD_ID_FROM_MNHNAME('RVS_EDDY_FLUX',IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XRVS_EDDY_FLUX
 +!
 +! MODD_HURR_FIELD_n variables
 +!
 +IF (CPROGRAM=='REAL') THEN
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('UT15',   IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XUTOT
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('VT15',   IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XVTOT
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('TEMPTOT',IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XTTOT
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('PRESTOT',IID,IRESP); TFIELDLIST(IID)%TFIELD_X2D(KFROM)%DATA => XPTOT
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('HUMTOT', IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XQTOT
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('UT16',   IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XUENV
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('VT16',   IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XVENV
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('TEMPENV',IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XTENV
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('PRESENV',IID,IRESP); TFIELDLIST(IID)%TFIELD_X2D(KFROM)%DATA => XPENV
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('HUMENV', IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XQENV
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('UT17',   IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XUBASIC
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('VT17',   IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XVBASIC
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('TEMPBAS',IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XTBASIC
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('PRESBAS',IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XPBASIC
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('HUMBAS', IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XQBASIC
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('VTDIS',  IID,IRESP); TFIELDLIST(IID)%TFIELD_X3D(KFROM)%DATA => XVTDIS
 +END IF
 +!
 +!
 +!
 +!
 +! Current model is set to model KTO
 +!
 +!
 +!
 +!
 +IF( KFROM/=KTO) THEN
 +!
 +! MODD_FIELD_n variables
 +!
 +CALL FIND_FIELD_ID_FROM_MNHNAME('UT',   IID,IRESP); XUT    => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +CALL FIND_FIELD_ID_FROM_MNHNAME('VT',   IID,IRESP); XVT    => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +CALL FIND_FIELD_ID_FROM_MNHNAME('WT',   IID,IRESP); XWT    => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +CALL FIND_FIELD_ID_FROM_MNHNAME('THT',  IID,IRESP); XTHT   => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +CALL FIND_FIELD_ID_FROM_MNHNAME('TKET', IID,IRESP); XTKET  => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +CALL FIND_FIELD_ID_FROM_MNHNAME('PABST',IID,IRESP); XPABST => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +CALL FIND_FIELD_ID_FROM_MNHNAME('RT',   IID,IRESP); XRT    => TFIELDLIST(IID)%TFIELD_X4D(KTO)%DATA
 +!
 +IF (CONF_MODEL(KTO)%IDX_RVT>0) THEN
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('RVT',IID2,IRESP)
 +  TFIELDLIST(IID2)%TFIELD_X3D(KTO)%DATA => TFIELDLIST(IID)%TFIELD_X4D(KTO)%DATA(:,:,:,CONF_MODEL(KTO)%IDX_RVT)
 +END IF
 +IF (CONF_MODEL(KTO)%IDX_RCT>0) THEN
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('RCT',IID2,IRESP)
 +  TFIELDLIST(IID2)%TFIELD_X3D(KTO)%DATA => TFIELDLIST(IID)%TFIELD_X4D(KTO)%DATA(:,:,:,CONF_MODEL(KTO)%IDX_RCT)
 +END IF
 +IF (CONF_MODEL(KTO)%IDX_RRT>0) THEN
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('RRT',IID2,IRESP)
 +  TFIELDLIST(IID2)%TFIELD_X3D(KTO)%DATA => TFIELDLIST(IID)%TFIELD_X4D(KTO)%DATA(:,:,:,CONF_MODEL(KTO)%IDX_RRT)
 +END IF
 +IF (CONF_MODEL(KTO)%IDX_RIT>0) THEN
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('RIT',IID2,IRESP)
 +  TFIELDLIST(IID2)%TFIELD_X3D(KTO)%DATA => TFIELDLIST(IID)%TFIELD_X4D(KTO)%DATA(:,:,:,CONF_MODEL(KTO)%IDX_RIT)
 +END IF
 +IF (CONF_MODEL(KTO)%IDX_RST>0) THEN
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('RST',IID2,IRESP)
 +  TFIELDLIST(IID2)%TFIELD_X3D(KTO)%DATA => TFIELDLIST(IID)%TFIELD_X4D(KTO)%DATA(:,:,:,CONF_MODEL(KTO)%IDX_RST)
 +END IF
 +IF (CONF_MODEL(KTO)%IDX_RGT>0) THEN
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('RGT',IID2,IRESP)
 +  TFIELDLIST(IID2)%TFIELD_X3D(KTO)%DATA => TFIELDLIST(IID)%TFIELD_X4D(KTO)%DATA(:,:,:,CONF_MODEL(KTO)%IDX_RGT)
 +END IF
 +IF (CONF_MODEL(KTO)%IDX_RHT>0) THEN
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('RHT',IID2,IRESP)
 +  TFIELDLIST(IID2)%TFIELD_X3D(KTO)%DATA => TFIELDLIST(IID)%TFIELD_X4D(KTO)%DATA(:,:,:,CONF_MODEL(KTO)%IDX_RHT)
 +END IF
 +!
 +CALL FIND_FIELD_ID_FROM_MNHNAME('SUPSATMAX',IID,IRESP); XSUPSAT => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +CALL FIND_FIELD_ID_FROM_MNHNAME('NACT',     IID,IRESP); XNACT   => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +CALL FIND_FIELD_ID_FROM_MNHNAME('SSPRO',    IID,IRESP); XSSPRO  => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +CALL FIND_FIELD_ID_FROM_MNHNAME('NPRO',     IID,IRESP); XNPRO   => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +CALL FIND_FIELD_ID_FROM_MNHNAME('SRCT',     IID,IRESP); XSRCT   => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +CALL FIND_FIELD_ID_FROM_MNHNAME('SIGS',     IID,IRESP); XSIGS   => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +!
 +IF (CPROGRAM == 'MESONH') THEN
 +  !
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('RS_CLD',IID,IRESP); XRRS_CLD => TFIELDLIST(IID)%TFIELD_X4D(KTO)%DATA
 +  !
 +  IF (CONF_MODEL(KTO)%IDX_RVT>0) THEN
 +    CALL FIND_FIELD_ID_FROM_MNHNAME('RVS_CLD',IID2,IRESP)
 +    TFIELDLIST(IID2)%TFIELD_X3D(KTO)%DATA => TFIELDLIST(IID)%TFIELD_X4D(KTO)%DATA(:,:,:,CONF_MODEL(KTO)%IDX_RVT)
 +  END IF
 +  IF (CONF_MODEL(KTO)%IDX_RCT>0) THEN
 +    CALL FIND_FIELD_ID_FROM_MNHNAME('RCS_CLD',IID2,IRESP)
 +    TFIELDLIST(IID2)%TFIELD_X3D(KTO)%DATA => TFIELDLIST(IID)%TFIELD_X4D(KTO)%DATA(:,:,:,CONF_MODEL(KTO)%IDX_RCT)
 +  END IF
 +  IF (CONF_MODEL(KTO)%IDX_RRT>0) THEN
 +    CALL FIND_FIELD_ID_FROM_MNHNAME('RRS_CLD',IID2,IRESP)
 +    TFIELDLIST(IID2)%TFIELD_X3D(KTO)%DATA => TFIELDLIST(IID)%TFIELD_X4D(KTO)%DATA(:,:,:,CONF_MODEL(KTO)%IDX_RRT)
 +  END IF
 +  IF (CONF_MODEL(KTO)%IDX_RIT>0) THEN
 +    CALL FIND_FIELD_ID_FROM_MNHNAME('RIS_CLD',IID2,IRESP)
 +    TFIELDLIST(IID2)%TFIELD_X3D(KTO)%DATA => TFIELDLIST(IID)%TFIELD_X4D(KTO)%DATA(:,:,:,CONF_MODEL(KTO)%IDX_RIT)
 +  END IF
 +  IF (CONF_MODEL(KTO)%IDX_RST>0) THEN
 +    CALL FIND_FIELD_ID_FROM_MNHNAME('RSS_CLD',IID2,IRESP)
 +    TFIELDLIST(IID2)%TFIELD_X3D(KTO)%DATA => TFIELDLIST(IID)%TFIELD_X4D(KTO)%DATA(:,:,:,CONF_MODEL(KTO)%IDX_RST)
 +  END IF
 +  IF (CONF_MODEL(KTO)%IDX_RGT>0) THEN
 +    CALL FIND_FIELD_ID_FROM_MNHNAME('RGS_CLD',IID2,IRESP)
 +    TFIELDLIST(IID2)%TFIELD_X3D(KTO)%DATA => TFIELDLIST(IID)%TFIELD_X4D(KTO)%DATA(:,:,:,CONF_MODEL(KTO)%IDX_RGT)
 +  END IF
 +  IF (CONF_MODEL(KTO)%IDX_RHT>0) THEN
 +    CALL FIND_FIELD_ID_FROM_MNHNAME('RHS_CLD',IID2,IRESP)
 +    TFIELDLIST(IID2)%TFIELD_X3D(KTO)%DATA => TFIELDLIST(IID)%TFIELD_X4D(KTO)%DATA(:,:,:,CONF_MODEL(KTO)%IDX_RHT)
 +  END IF
 +  !
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('US_PRES',IID,IRESP); XRUS_PRES => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('VS_PRES',IID,IRESP); XRVS_PRES => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('WS_PRES',IID,IRESP); XRWS_PRES => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('THS_CLD',IID,IRESP); XRTHS_CLD => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('CLDFR',  IID,IRESP); XCLDFR    => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('CIT',    IID,IRESP); XCIT      => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +END IF
 +!
 +! MODD_PAST_FIELD_n variables
 +!
 +CALL FIND_FIELD_ID_FROM_MNHNAME('UM', IID,IRESP); XUM  => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +CALL FIND_FIELD_ID_FROM_MNHNAME('VM', IID,IRESP); XVM  => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +CALL FIND_FIELD_ID_FROM_MNHNAME('WM', IID,IRESP); XWM  => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +CALL FIND_FIELD_ID_FROM_MNHNAME('DUM',IID,IRESP); XDUM => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +CALL FIND_FIELD_ID_FROM_MNHNAME('DVM',IID,IRESP); XDVM => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +CALL FIND_FIELD_ID_FROM_MNHNAME('DWM',IID,IRESP); XDWM => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +!
 +! MODD_LIMA_PRECIP_SCAVENGING_n variables
 +!
 +CALL FIND_FIELD_ID_FROM_MNHNAME('INPAP',IID,IRESP); XINPAP => TFIELDLIST(IID)%TFIELD_X2D(KTO)%DATA
 +CALL FIND_FIELD_ID_FROM_MNHNAME('ACPAP',IID,IRESP); XACPAP => TFIELDLIST(IID)%TFIELD_X2D(KTO)%DATA
 +!
 +! MODD_ELEC_n variables
 +!
 +CALL FIND_FIELD_ID_FROM_MNHNAME('EFIELDU',IID,IRESP);  XEFIELDU  => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +CALL FIND_FIELD_ID_FROM_MNHNAME('EFIELDV',IID,IRESP);  XEFIELDV  => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +CALL FIND_FIELD_ID_FROM_MNHNAME('EFIELDW',IID,IRESP);  XEFIELDW  => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +CALL FIND_FIELD_ID_FROM_MNHNAME('NI_IAGGS',IID,IRESP); XNI_IAGGS => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +CALL FIND_FIELD_ID_FROM_MNHNAME('NI_IDRYG',IID,IRESP); XNI_IDRYG => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +CALL FIND_FIELD_ID_FROM_MNHNAME('NI_SDRYG',IID,IRESP); XNI_SDRYG => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +CALL FIND_FIELD_ID_FROM_MNHNAME('INDUC_CG',IID,IRESP); XIND_RATE => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +!
 +! MODD_CH_PH_n variables
 +!
 +CALL FIND_FIELD_ID_FROM_MNHNAME('PHC',IID,IRESP); XPHC => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +CALL FIND_FIELD_ID_FROM_MNHNAME('PHR',IID,IRESP); XPHR => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +!
 +! MODD_LSFIELD_n variables
 +!
 +CALL FIND_FIELD_ID_FROM_MNHNAME('LSUM', IID,IRESP); XLSUM  => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +CALL FIND_FIELD_ID_FROM_MNHNAME('LSVM', IID,IRESP); XLSVM  => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +CALL FIND_FIELD_ID_FROM_MNHNAME('LSWM', IID,IRESP); XLSWM  => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +CALL FIND_FIELD_ID_FROM_MNHNAME('LSTHM',IID,IRESP); XLSTHM => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +IF(LUSERV) CALL FIND_FIELD_ID_FROM_MNHNAME('LSRVM',IID,IRESP); XLSRVM => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +CALL FIND_FIELD_ID_FROM_MNHNAME('LBXUM', IID,IRESP); XLBXUM  => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +CALL FIND_FIELD_ID_FROM_MNHNAME('LBXVM', IID,IRESP); XLBXVM  => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +CALL FIND_FIELD_ID_FROM_MNHNAME('LBXWM', IID,IRESP); XLBXWM  => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +CALL FIND_FIELD_ID_FROM_MNHNAME('LBYUM', IID,IRESP); XLBYUM  => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +CALL FIND_FIELD_ID_FROM_MNHNAME('LBYVM', IID,IRESP); XLBYVM  => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +CALL FIND_FIELD_ID_FROM_MNHNAME('LBYWM', IID,IRESP); XLBYWM  => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +CALL FIND_FIELD_ID_FROM_MNHNAME('LBXTHM',IID,IRESP); XLBXTHM => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +CALL FIND_FIELD_ID_FROM_MNHNAME('LBYTHM',IID,IRESP); XLBYTHM => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +!
 +CALL FIND_FIELD_ID_FROM_MNHNAME('DRYMASST',IID,IRESP)
 +IF (.NOT.ASSOCIATED(TFIELDLIST(IID)%TFIELD_X0D(KTO)%DATA)) THEN
 +  CALL PRINT_MSG(NVERB_DEBUG,'GEN','FIELDLIST_GOTO_MODEL',&
 +                 'TFIELDLIST(IID)%TFIELD_X0D(KTO)%DATA was not associated for '//TFIELDLIST(IID)%CMNHNAME)
 +  ALLOCATE(TFIELDLIST(IID)%TFIELD_X0D(KTO)%DATA)
 +END IF
 +XDRYMASST => TFIELDLIST(IID)%TFIELD_X0D(KTO)%DATA
 +!
 +! MODD_DYN_n variables
 +!
 +CALL FIND_FIELD_ID_FROM_MNHNAME('RIMX',IID,IRESP)
 +IF (.NOT.ASSOCIATED(TFIELDLIST(IID)%TFIELD_N0D(KTO)%DATA)) THEN
 +  CALL PRINT_MSG(NVERB_DEBUG,'GEN','FIELDLIST_GOTO_MODEL',&
 +                 'TFIELDLIST(IID)%TFIELD_N0D(KTO)%DATA was not associated for '//TFIELDLIST(IID)%CMNHNAME)
 +  ALLOCATE(TFIELDLIST(IID)%TFIELD_N0D(KTO)%DATA)
 +END IF
 +NRIMX => TFIELDLIST(IID)%TFIELD_N0D(KTO)%DATA
 +!
 +CALL FIND_FIELD_ID_FROM_MNHNAME('RIMY',IID,IRESP)
 +IF (.NOT.ASSOCIATED(TFIELDLIST(IID)%TFIELD_N0D(KTO)%DATA)) THEN
 +  CALL PRINT_MSG(NVERB_DEBUG,'GEN','FIELDLIST_GOTO_MODEL',&
 +                 'TFIELDLIST(IID)%TFIELD_N0D(KTO)%DATA was not associated for '//TFIELDLIST(IID)%CMNHNAME)
 +  ALLOCATE(TFIELDLIST(IID)%TFIELD_N0D(KTO)%DATA)
 +END IF
 +NRIMY => TFIELDLIST(IID)%TFIELD_N0D(KTO)%DATA
 +!
 +CALL FIND_FIELD_ID_FROM_MNHNAME('HORELAX_UVWTH',IID,IRESP)
 +IF (.NOT.ASSOCIATED(TFIELDLIST(IID)%TFIELD_L0D(KTO)%DATA)) THEN
 +  CALL PRINT_MSG(NVERB_DEBUG,'GEN','FIELDLIST_GOTO_MODEL',&
 +                 'TFIELDLIST(IID)%TFIELD_L0D(KTO)%DATA was not associated for '//TFIELDLIST(IID)%CMNHNAME)
 +  ALLOCATE(TFIELDLIST(IID)%TFIELD_L0D(KTO)%DATA)
 +END IF
 +LHORELAX_UVWTH => TFIELDLIST(IID)%TFIELD_L0D(KTO)%DATA
 +!
 +CALL FIND_FIELD_ID_FROM_MNHNAME('HORELAX_TKE',IID,IRESP)
 +IF (.NOT.ASSOCIATED(TFIELDLIST(IID)%TFIELD_L0D(KTO)%DATA)) THEN
 +  CALL PRINT_MSG(NVERB_DEBUG,'GEN','FIELDLIST_GOTO_MODEL',&
 +                 'TFIELDLIST(IID)%TFIELD_L0D(KTO)%DATA was not associated for '//TFIELDLIST(IID)%CMNHNAME)
 +  ALLOCATE(TFIELDLIST(IID)%TFIELD_L0D(KTO)%DATA)
 +END IF
 +LHORELAX_TKE => TFIELDLIST(IID)%TFIELD_L0D(KTO)%DATA
 +!
 +! MODD_ADV_n variables
 +!
 +CALL FIND_FIELD_ID_FROM_MNHNAME('TKEMS',IID,IRESP); XRTKEMS=>TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +!
 +! MODD_GRID_n variables
 +!
 +CALL FIND_FIELD_ID_FROM_MNHNAME('ZS',   IID,IRESP); XZS    => TFIELDLIST(IID)%TFIELD_X2D(KTO)%DATA
 +CALL FIND_FIELD_ID_FROM_MNHNAME('ZSMT', IID,IRESP); XZSMT  => TFIELDLIST(IID)%TFIELD_X2D(KTO)%DATA
 +CALL FIND_FIELD_ID_FROM_MNHNAME('XHAT', IID,IRESP); XXHAT  => TFIELDLIST(IID)%TFIELD_X1D(KTO)%DATA
 +CALL FIND_FIELD_ID_FROM_MNHNAME('YHAT', IID,IRESP); XYHAT  => TFIELDLIST(IID)%TFIELD_X1D(KTO)%DATA
 +CALL FIND_FIELD_ID_FROM_MNHNAME('ZHAT', IID,IRESP); XZHAT  => TFIELDLIST(IID)%TFIELD_X1D(KTO)%DATA
 +CALL FIND_FIELD_ID_FROM_MNHNAME('DXHAT',IID,IRESP); XDXHAT => TFIELDLIST(IID)%TFIELD_X1D(KTO)%DATA
 +CALL FIND_FIELD_ID_FROM_MNHNAME('DYHAT',IID,IRESP); XDYHAT => TFIELDLIST(IID)%TFIELD_X1D(KTO)%DATA
 +!
 +CALL FIND_FIELD_ID_FROM_MNHNAME('SLEVE',IID,IRESP)
 +IF (.NOT.ASSOCIATED(TFIELDLIST(IID)%TFIELD_L0D(KTO)%DATA)) THEN
 +  CALL PRINT_MSG(NVERB_DEBUG,'GEN','FIELDLIST_GOTO_MODEL',&
 +                 'TFIELDLIST(IID)%TFIELD_L0D(KTO)%DATA was not associated for '//TFIELDLIST(IID)%CMNHNAME)
 +  ALLOCATE(TFIELDLIST(IID)%TFIELD_L0D(KTO)%DATA)
 +END IF
 +LSLEVE => TFIELDLIST(IID)%TFIELD_L0D(KTO)%DATA
 +!
 +CALL FIND_FIELD_ID_FROM_MNHNAME('LEN1',IID,IRESP)
 +IF (.NOT.ASSOCIATED(TFIELDLIST(IID)%TFIELD_X0D(KTO)%DATA)) THEN
 +  CALL PRINT_MSG(NVERB_DEBUG,'GEN','FIELDLIST_GOTO_MODEL',&
 +                 'TFIELDLIST(IID)%TFIELD_X0D(KTO)%DATA was not associated for '//TFIELDLIST(IID)%CMNHNAME)
 +  ALLOCATE(TFIELDLIST(IID)%TFIELD_X0D(KTO)%DATA)
 +END IF
 +XLEN1 => TFIELDLIST(IID)%TFIELD_X0D(KTO)%DATA
 +!
 +CALL FIND_FIELD_ID_FROM_MNHNAME('LEN2',IID,IRESP)
 +IF (.NOT.ASSOCIATED(TFIELDLIST(IID)%TFIELD_X0D(KTO)%DATA)) THEN
 +  CALL PRINT_MSG(NVERB_DEBUG,'GEN','FIELDLIST_GOTO_MODEL',&
 +                 'TFIELDLIST(IID)%TFIELD_X0D(KTO)%DATA was not associated for '//TFIELDLIST(IID)%CMNHNAME)
 +  ALLOCATE(TFIELDLIST(IID)%TFIELD_X0D(KTO)%DATA)
 +END IF
 +XLEN2 => TFIELDLIST(IID)%TFIELD_X0D(KTO)%DATA
 +!
 +CALL FIND_FIELD_ID_FROM_MNHNAME('ALT',     IID,IRESP); XZZ       => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +CALL FIND_FIELD_ID_FROM_MNHNAME('DIRCOSXW',IID,IRESP); XDIRCOSXW => TFIELDLIST(IID)%TFIELD_X2D(KTO)%DATA
 +CALL FIND_FIELD_ID_FROM_MNHNAME('DIRCOSYW',IID,IRESP); XDIRCOSYW => TFIELDLIST(IID)%TFIELD_X2D(KTO)%DATA
 +CALL FIND_FIELD_ID_FROM_MNHNAME('DIRCOSZW',IID,IRESP); XDIRCOSZW => TFIELDLIST(IID)%TFIELD_X2D(KTO)%DATA
 +CALL FIND_FIELD_ID_FROM_MNHNAME('COSSLOPE',IID,IRESP); XCOSSLOPE => TFIELDLIST(IID)%TFIELD_X2D(KTO)%DATA
 +CALL FIND_FIELD_ID_FROM_MNHNAME('SINSLOPE',IID,IRESP); XSINSLOPE => TFIELDLIST(IID)%TFIELD_X2D(KTO)%DATA
 +CALL FIND_FIELD_ID_FROM_MNHNAME('MAP',  IID,IRESP); XMAP => TFIELDLIST(IID)%TFIELD_X2D(KTO)%DATA
 +CALL FIND_FIELD_ID_FROM_MNHNAME('LAT',  IID,IRESP); XLAT => TFIELDLIST(IID)%TFIELD_X2D(KTO)%DATA
 +CALL FIND_FIELD_ID_FROM_MNHNAME('LON',  IID,IRESP); XLON => TFIELDLIST(IID)%TFIELD_X2D(KTO)%DATA
 +!
 +! MODD_TIME_n variables
 +!
 +CALL FIND_FIELD_ID_FROM_MNHNAME('DTMOD',IID,IRESP)
 +IF (.NOT.ASSOCIATED(TFIELDLIST(IID)%TFIELD_T0D(KTO)%DATA)) THEN
 +  CALL PRINT_MSG(NVERB_DEBUG,'GEN','FIELDLIST_GOTO_MODEL',&
 +                 'TFIELDLIST(IID)%TFIELD_T0D(KTO)%DATA was not associated for '//TFIELDLIST(IID)%CMNHNAME)
 +  ALLOCATE(TFIELDLIST(IID)%TFIELD_T0D(KTO)%DATA)
 +END IF
 +TDTMOD => TFIELDLIST(IID)%TFIELD_T0D(KTO)%DATA
 +!
 +CALL FIND_FIELD_ID_FROM_MNHNAME('DTCUR',IID,IRESP)
 +IF (.NOT.ASSOCIATED(TFIELDLIST(IID)%TFIELD_T0D(KTO)%DATA)) THEN
 +  CALL PRINT_MSG(NVERB_DEBUG,'GEN','FIELDLIST_GOTO_MODEL',&
 +                 'TFIELDLIST(IID)%TFIELD_T0D(KTO)%DATA was not associated for '//TFIELDLIST(IID)%CMNHNAME)
 +  ALLOCATE(TFIELDLIST(IID)%TFIELD_T0D(KTO)%DATA)
 +END IF
 +TDTCUR => TFIELDLIST(IID)%TFIELD_T0D(KTO)%DATA
 +!
 +CALL FIND_FIELD_ID_FROM_MNHNAME('DTRAD_FULL',IID,IRESP)
 +IF (.NOT.ASSOCIATED(TFIELDLIST(IID)%TFIELD_T0D(KTO)%DATA)) THEN
 +  CALL PRINT_MSG(NVERB_DEBUG,'GEN','FIELDLIST_GOTO_MODEL',&
 +                 'TFIELDLIST(IID)%TFIELD_T0D(KTO)%DATA was not associated for '//TFIELDLIST(IID)%CMNHNAME)
 +  ALLOCATE(TFIELDLIST(IID)%TFIELD_T0D(KTO)%DATA)
 +END IF
 +TDTRAD_FULL => TFIELDLIST(IID)%TFIELD_T0D(KTO)%DATA
 +!
 +CALL FIND_FIELD_ID_FROM_MNHNAME('DTRAD_CLLY',IID,IRESP)
 +IF (.NOT.ASSOCIATED(TFIELDLIST(IID)%TFIELD_T0D(KTO)%DATA)) THEN
 +  CALL PRINT_MSG(NVERB_DEBUG,'GEN','FIELDLIST_GOTO_MODEL',&
 +                 'TFIELDLIST(IID)%TFIELD_T0D(KTO)%DATA was not associated for '//TFIELDLIST(IID)%CMNHNAME)
 +  ALLOCATE(TFIELDLIST(IID)%TFIELD_T0D(KTO)%DATA)
 +END IF
 +TDTRAD_CLONLY => TFIELDLIST(IID)%TFIELD_T0D(KTO)%DATA
 +!
 +CALL FIND_FIELD_ID_FROM_MNHNAME('DTDCONV',IID,IRESP)
 +IF (.NOT.ASSOCIATED(TFIELDLIST(IID)%TFIELD_T0D(KTO)%DATA)) THEN
 +  CALL PRINT_MSG(NVERB_DEBUG,'GEN','FIELDLIST_GOTO_MODEL',&
 +                 'TFIELDLIST(IID)%TFIELD_T0D(KTO)%DATA was not associated for '//TFIELDLIST(IID)%CMNHNAME)
 +  ALLOCATE(TFIELDLIST(IID)%TFIELD_T0D(KTO)%DATA)
 +END IF
 +TDTDCONV => TFIELDLIST(IID)%TFIELD_T0D(KTO)%DATA
 +!
 +! MODD_PARAM_n variables
 +!
 +CALL FIND_FIELD_ID_FROM_MNHNAME('SURF',IID,IRESP)
 +IF (.NOT.ASSOCIATED(TFIELDLIST(IID)%TFIELD_C0D(KTO)%DATA)) THEN
 +  CALL PRINT_MSG(NVERB_DEBUG,'GEN','FIELDLIST_GOTO_MODEL',&
 +                 'TFIELDLIST(IID)%TFIELD_C0D(KTO)%DATA was not associated for '//TFIELDLIST(IID)%CMNHNAME)
 +  ALLOCATE(CHARACTER(LEN=4) :: TFIELDLIST(IID)%TFIELD_C0D(KTO)%DATA)
 +END IF
 +CSURF => TFIELDLIST(IID)%TFIELD_C0D(KTO)%DATA
 +!
 +! MODD_TURB_n variables
 +!
 +CALL FIND_FIELD_ID_FROM_MNHNAME('BL_DEPTH', IID,IRESP); XBL_DEPTH  => TFIELDLIST(IID)%TFIELD_X2D(KTO)%DATA
 +CALL FIND_FIELD_ID_FROM_MNHNAME('SBL_DEPTH',IID,IRESP); XSBL_DEPTH => TFIELDLIST(IID)%TFIELD_X2D(KTO)%DATA
 +CALL FIND_FIELD_ID_FROM_MNHNAME('WTHVMF',   IID,IRESP); XWTHVMF    => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +!
 +! MODD_REF_n variables
 +!
 +CALL FIND_FIELD_ID_FROM_MNHNAME('RHODREF',IID,IRESP); XRHODREF => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +CALL FIND_FIELD_ID_FROM_MNHNAME('THVREF', IID,IRESP); XTHVREF  => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +!
 +! MODD_RADIATIONS_n variables
 +!
 +IF (CPROGRAM=='MESONH') THEN
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('DTHRAD',      IID,IRESP); XDTHRAD       => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('FLALWD',      IID,IRESP); XFLALWD       => TFIELDLIST(IID)%TFIELD_X2D(KTO)%DATA
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('DIRFLASWD',   IID,IRESP); XDIRFLASWD    => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('SCAFLASWD',   IID,IRESP); XSCAFLASWD    => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('DIRSRFSWD',   IID,IRESP); XDIRSRFSWD    => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('CLEARCOL_TM1',IID,IRESP); NCLEARCOL_TM1 => TFIELDLIST(IID)%TFIELD_N2D(KTO)%DATA
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('ZENITH',      IID,IRESP); XZENITH       => TFIELDLIST(IID)%TFIELD_X2D(KTO)%DATA
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('AZIM',        IID,IRESP); XAZIM         => TFIELDLIST(IID)%TFIELD_X2D(KTO)%DATA
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('DIR_ALB',     IID,IRESP); XDIR_ALB      => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('SCA_ALB',     IID,IRESP); XSCA_ALB      => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('EMIS',        IID,IRESP); XEMIS         => TFIELDLIST(IID)%TFIELD_X2D(KTO)%DATA
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('TSRAD',       IID,IRESP); XTSRAD        => TFIELDLIST(IID)%TFIELD_X2D(KTO)%DATA
 +END IF
 +!
 +! MODD_DEEP_CONVECTION_n variables
 +!
 +IF (TRIM(CPROGRAM) /= 'PGD' .AND. TRIM(CPROGRAM) /= 'NESPGD' .AND. TRIM(CPROGRAM) /= 'SPAWN') THEN
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('COUNTCONV',  IID,IRESP); NCOUNTCONV       => TFIELDLIST(IID)%TFIELD_N2D(KTO)%DATA
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('DTHCONV',    IID,IRESP); XDTHCONV         => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('DRVCONV',    IID,IRESP); XDRVCONV         => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('DRCCONV',    IID,IRESP); XDRCCONV         => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('DRICONV',    IID,IRESP); XDRICONV         => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('PRCONV',     IID,IRESP); XPRCONV          => TFIELDLIST(IID)%TFIELD_X2D(KTO)%DATA
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('PACCONV',    IID,IRESP); XPACCONV         => TFIELDLIST(IID)%TFIELD_X2D(KTO)%DATA
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('PRSCONV',    IID,IRESP); XPRSCONV         => TFIELDLIST(IID)%TFIELD_X2D(KTO)%DATA
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('DSVCONV',    IID,IRESP); XDSVCONV         => TFIELDLIST(IID)%TFIELD_X4D(KTO)%DATA
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('PRLFLXCONV', IID,IRESP); XPRLFLXCONV      => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('PRSFLXCONV', IID,IRESP); XPRSFLXCONV      => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('UMFCONV',    IID,IRESP); XUMFCONV         => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('DMFCONV',    IID,IRESP); XDMFCONV         => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('MFCONV',     IID,IRESP); XMFCONV          => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('CAPE',       IID,IRESP); XCAPE            => TFIELDLIST(IID)%TFIELD_X2D(KTO)%DATA
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('CLTOPCONV',  IID,IRESP); NCLTOPCONV       => TFIELDLIST(IID)%TFIELD_N2D(KTO)%DATA
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('CLBASCONV',  IID,IRESP); NCLBASCONV       => TFIELDLIST(IID)%TFIELD_N2D(KTO)%DATA
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('IC_RATE',    IID,IRESP); XIC_RATE         => TFIELDLIST(IID)%TFIELD_X2D(KTO)%DATA
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('CG_RATE',    IID,IRESP); XCG_RATE         => TFIELDLIST(IID)%TFIELD_X2D(KTO)%DATA
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('IC_TOTAL_NB',IID,IRESP); XIC_TOTAL_NUMBER => TFIELDLIST(IID)%TFIELD_X2D(KTO)%DATA
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('CG_TOTAL_NB',IID,IRESP); XCG_TOTAL_NUMBER => TFIELDLIST(IID)%TFIELD_X2D(KTO)%DATA
 +END IF
 +!
 +! MODD_GR_FIELD_n variables
 +!
 +CALL FIND_FIELD_ID_FROM_MNHNAME('SSO_ANIS', IID,IRESP); XSSO_ANISOTROPY => TFIELDLIST(IID)%TFIELD_X2D(KTO)%DATA
 +CALL FIND_FIELD_ID_FROM_MNHNAME('SSO_SLOPE',IID,IRESP); XSSO_SLOPE      => TFIELDLIST(IID)%TFIELD_X2D(KTO)%DATA
 +CALL FIND_FIELD_ID_FROM_MNHNAME('SSO_DIR',  IID,IRESP); XSSO_DIRECTION  => TFIELDLIST(IID)%TFIELD_X2D(KTO)%DATA
 +CALL FIND_FIELD_ID_FROM_MNHNAME('AVG_ZS',   IID,IRESP); XAVG_ZS         => TFIELDLIST(IID)%TFIELD_X2D(KTO)%DATA
 +CALL FIND_FIELD_ID_FROM_MNHNAME('SIL_ZS',   IID,IRESP); XSIL_ZS         => TFIELDLIST(IID)%TFIELD_X2D(KTO)%DATA
 +CALL FIND_FIELD_ID_FROM_MNHNAME('MAX_ZS',   IID,IRESP); XMAX_ZS         => TFIELDLIST(IID)%TFIELD_X2D(KTO)%DATA
 +CALL FIND_FIELD_ID_FROM_MNHNAME('MIN_ZS',   IID,IRESP); XMIN_ZS         => TFIELDLIST(IID)%TFIELD_X2D(KTO)%DATA
 +CALL FIND_FIELD_ID_FROM_MNHNAME('SSO_STDEV',IID,IRESP); XSSO_STDEV      => TFIELDLIST(IID)%TFIELD_X2D(KTO)%DATA
 +!
 +! MODD_PRECIP_n variables
 +!
 +CALL FIND_FIELD_ID_FROM_MNHNAME('INPRC',  IID,IRESP); XINPRC   => TFIELDLIST(IID)%TFIELD_X2D(KTO)%DATA
 +CALL FIND_FIELD_ID_FROM_MNHNAME('ACPRC',  IID,IRESP); XACPRC   => TFIELDLIST(IID)%TFIELD_X2D(KTO)%DATA
 +CALL FIND_FIELD_ID_FROM_MNHNAME('INDEP',  IID,IRESP); XINDEP   => TFIELDLIST(IID)%TFIELD_X2D(KTO)%DATA
 +CALL FIND_FIELD_ID_FROM_MNHNAME('ACDEP',  IID,IRESP); XACDEP   => TFIELDLIST(IID)%TFIELD_X2D(KTO)%DATA
 +CALL FIND_FIELD_ID_FROM_MNHNAME('INPRR',  IID,IRESP); XINPRR   => TFIELDLIST(IID)%TFIELD_X2D(KTO)%DATA
 +CALL FIND_FIELD_ID_FROM_MNHNAME('INPRR3D',IID,IRESP); XINPRR3D => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +CALL FIND_FIELD_ID_FROM_MNHNAME('EVAP3D', IID,IRESP); XEVAP3D  => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +CALL FIND_FIELD_ID_FROM_MNHNAME('ACPRR',  IID,IRESP); XACPRR   => TFIELDLIST(IID)%TFIELD_X2D(KTO)%DATA
 +CALL FIND_FIELD_ID_FROM_MNHNAME('INPRS',  IID,IRESP); XINPRS   => TFIELDLIST(IID)%TFIELD_X2D(KTO)%DATA
 +CALL FIND_FIELD_ID_FROM_MNHNAME('ACPRS',  IID,IRESP); XACPRS   => TFIELDLIST(IID)%TFIELD_X2D(KTO)%DATA
 +CALL FIND_FIELD_ID_FROM_MNHNAME('INPRG',  IID,IRESP); XINPRG   => TFIELDLIST(IID)%TFIELD_X2D(KTO)%DATA
 +CALL FIND_FIELD_ID_FROM_MNHNAME('ACPRG',  IID,IRESP); XACPRG   => TFIELDLIST(IID)%TFIELD_X2D(KTO)%DATA
 +CALL FIND_FIELD_ID_FROM_MNHNAME('INPRH',  IID,IRESP); XINPRH   => TFIELDLIST(IID)%TFIELD_X2D(KTO)%DATA
 +CALL FIND_FIELD_ID_FROM_MNHNAME('ACPRH',  IID,IRESP); XACPRH   => TFIELDLIST(IID)%TFIELD_X2D(KTO)%DATA
 +!
 +!
 +! MODD_DEF_EDDY_FLUX_n variables
 +!
 +CALL FIND_FIELD_ID_FROM_MNHNAME('VT_FLX',        IID,IRESP); XVTH_FLUX_M     => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +CALL FIND_FIELD_ID_FROM_MNHNAME('WT_FLX',        IID,IRESP); XWTH_FLUX_M     => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +CALL FIND_FIELD_ID_FROM_MNHNAME('RTHS_EDDY_FLUX',IID,IRESP); XRTHS_EDDY_FLUX => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +!
 +! MODD_DEF_EDDYUV_FLUX_n variables
 +!
 +CALL FIND_FIELD_ID_FROM_MNHNAME('VU_FLX',       IID,IRESP); XVU_FLUX_M     => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +CALL FIND_FIELD_ID_FROM_MNHNAME('RVS_EDDY_FLUX',IID,IRESP); XRVS_EDDY_FLUX => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +!
 +!
 +! MODD_HURR_FIELD_n variables
 +!
 +IF (CPROGRAM=='REAL') THEN
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('UT15',   IID,IRESP); XUTOT   => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('VT15',   IID,IRESP); XVTOT   => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('TEMPTOT',IID,IRESP); XTTOT   => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('PRESTOT',IID,IRESP); XPTOT   => TFIELDLIST(IID)%TFIELD_X2D(KTO)%DATA
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('HUMTOT', IID,IRESP); XQTOT   => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('UT16',   IID,IRESP); XUENV   => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('VT16',   IID,IRESP); XVENV   => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('TEMPENV',IID,IRESP); XTENV   => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('PRESENV',IID,IRESP); XPENV   => TFIELDLIST(IID)%TFIELD_X2D(KTO)%DATA
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('HUMENV', IID,IRESP); XQENV   => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('UT17',   IID,IRESP); XUBASIC => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('VT17',   IID,IRESP); XVBASIC => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('TEMPBAS',IID,IRESP); XTBASIC => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('PRESBAS',IID,IRESP); XPBASIC => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('HUMBAS', IID,IRESP); XQBASIC => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +  CALL FIND_FIELD_ID_FROM_MNHNAME('VTDIS',  IID,IRESP); XVTDIS  => TFIELDLIST(IID)%TFIELD_X3D(KTO)%DATA
 +END IF
 +!
 +END IF !KFROM/=KTO
 +!
 +END SUBROUTINE FIELDLIST_GOTO_MODEL
 +!
 +END MODULE MODE_FIELD
Simple merge
@@@ -556,24 -566,18 +560,24 @@@ DO JSAT=1,IJSAT ! loop over sensor
      ELSE
        YEND=YTWO//YCHAN
      END IF
 +
  !    IF (INRAD==1) THEN
 -!      YRECFM      =TRIM(YBEG)//'_'//TRIM(YEND)//'rad'
 -!      YCOMMENT    =TRIM(YBEG)//'_'//TRIM(YEND)//' rad (mw/cm-1/ster/sq.m)'
 +!    TZFIELD%CMNHNAME   = TRIM(YBEG)//'_'//TRIM(YEND)//'rad'
 +!    TZFIELD%CUNITS     = 'mw/cm-1/ster/sq.m'
 +!    TZFIELD%CCOMMENT   = TRIM(YBEG)//'_'//TRIM(YEND)//' rad'
  !    ELSE
 -      YRECFM      =TRIM(YBEG)//'_'//TRIM(YEND)//'BT'
 -      YCOMMENT    =TRIM(YBEG)//'_'//TRIM(YEND)//' BT (K)'
 +    TZFIELD%CMNHNAME   = TRIM(YBEG)//'_'//TRIM(YEND)//'BT'
 +    TZFIELD%CUNITS     = 'K'
 +    TZFIELD%CCOMMENT   = TRIM(YBEG)//'_'//TRIM(YEND)//' BT'
  !    ENDIF
 -    IGRID       =1
 -    ILENCH      =LEN(YCOMMENT)
 -!   PRINT *,'YRECFM='//TRIM(YRECFM)
 -    CALL FMWRIT(HFMFILE,YRECFM,CLUOUT,'XY',ZBT(:,:,JCH), &
 -         IGRID,ILENCH,YCOMMENT,IRESP)
 +    TZFIELD%CSTDNAME   = ''
 +    TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
 +    TZFIELD%CDIR       = 'XY'
 +    TZFIELD%NGRID      = 1
 +    TZFIELD%NTYPE      = TYPEREAL
 +    TZFIELD%NDIMS      = 2
-     PRINT *,'YRECFM='//TRIM(TZFIELD%CMNHNAME)
++!    PRINT *,'YRECFM='//TRIM(TZFIELD%CMNHNAME)
 +    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,ZBT(:,:,JCH))
    END DO
    DEALLOCATE(chanprof,frequencies,emissivity,calcemis,profiles,cld_profiles)
    DEALLOCATE(ZBT)
Simple merge
@@@ -219,6 -219,8 +219,7 @@@ END MODULE MODI_DEFAULT_DESFM_
  !!                    10/2016 (C.Lac) Add droplet deposition
  !!                   10/2016  (R.Honnert and S.Riette) : Improvement of EDKF and adaptation to the grey zone
  !!                   10/2016  (F Brosse) add prod/loss terms computation for chemistry
 -!!                   07/2017  (V. Masson) adds time step for output files writing.
+ !!                   09/2017 Q.Rodier add LTEND_UV_FRC
  !-------------------------------------------------------------------------------
  !
  !*       0.    DECLARATIONS
@@@ -198,9 -205,8 +200,10 @@@ LOGICAL:: GCLOUD_ONLY          ! condit
  INTEGER :: IIU, IJU, IKU
  INTEGER :: IINFO_ll               ! return code for _ll routines 
  REAL, DIMENSION(:,:),ALLOCATABLE          :: ZSEA,ZTOWN
+ REAL, DIMENSION(:,:,:,:),ALLOCATABLE          :: ZWETDEPAER
  !
 +TYPE(TFILEDATA),POINTER :: TZDIACFILE
 +!
  NAMELIST/NAM_DIAG/ CISO, LVAR_RS, LVAR_LS,   &
                     NCONV_KF, NRAD_3D, CRAD_SAT, NRTTOVINFO, LRAD_SUBG_COND,  &
                     LVAR_TURB,LTURBFLX,LTURBDIAG,LMFFLX,XDTSTEP,  &
@@@ -672,10 -714,31 +676,14 @@@ ZCHEM=0
  XTIME_LES=0.
  XTIME_LES_BU_PROCESS=0.
  XTIME_BU_PROCESS=0.
 -#ifdef MNH_NCWRIT
 -IF ( LNETCDF ) THEN
 -  DEF_NC = .TRUE.
 -  NC_WRITE=LNETCDF
 -  NC_FILE='phy'
 -  LLFIFM = .FALSE.
 -  CALL WRITE_PHYS_PARAM(YFMFILE)
 -  DEF_NC=.FALSE.
 -  LLFIFM = .TRUE.
 -END IF
 -!
 -CALL PHYS_PARAM_n(1,YFMFILE,GCLOSE_OUT,                           &
 -                  ZRAD,ZSHADOWS,ZDCONV,ZGROUND,ZMAFL,ZDRAG,       &
 -                  ZTURB,ZTRACER, ZTIME_BU,ZWETDEPAER,GMASKkids,GCLOUD_ONLY)          
 -DEF_NC=.TRUE.
 -#else
 -CALL PHYS_PARAM_n(1,YFMFILE,GCLOSE_OUT,                           &
 -                  ZRAD,ZSHADOWS,ZDCONV,ZGROUND,ZMAFL,ZDRAG,       &
 +CALL PHYS_PARAM_n(1,TINIFILE,GCLOSE_OUT,                      &
 +                  ZRAD,ZSHADOWS,ZDCONV,ZGROUND,ZMAFL,ZDRAG, &
-                   ZTURB,ZTRACER, ZCHEM,ZTIME_BU,GMASKkids)
+                   ZTURB,ZTRACER, ZTIME_BU,ZWETDEPAER,GMASKkids,GCLOUD_ONLY)
 -#endif       
  WRITE(ILUOUT0,*) 'DIAG AFTER PHYS_PARAM1'
+ IF (LCHEMDIAG) THEN
+   CALL CH_MONITOR_n(ZWETDEPAER,1,XTSTEP, ILUOUT0, NVERB)
+ END IF
  !
  !* restores the initial flags
  !
@@@ -732,12 -828,13 +740,13 @@@ ZTIME1=ZTIME
  !*       9.0    Closes the FM files
  !
  DEALLOCATE(GMASKkids)
+ DEALLOCATE(ZWETDEPAER)
  IF (GCLOSE_OUT) THEN
    GCLOSE_OUT=.FALSE.
 -  CALL FMCLOS_ll(YFMFILE,'KEEP',CLUOUT,IRESP)
 +  CALL IO_FILE_CLOSE_ll(TINIFILE)
  END IF
  !
 -CALL CLOSE_ll (CLUOUT,IOSTAT=IRESP)
 +CALL IO_FILE_CLOSE_ll(TLUOUT)
  !
  CALL SECOND_MNH2(ZTIME2)
  ZTIME2=ZTIME2-ZTIME0
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -126,13 -127,12 +129,14 @@@ USE MODI_PGDFILTE
  USE MODI_CH_INIT_SCHEME_n
  USE MODI_CH_AER_INIT_SOA
  !
 -USE MODE_POS
 +USE MODE_FIELD,            ONLY : TFIELDDATA,TYPEREAL
  USE MODE_FM
 -USE MODE_IO_ll
+ USE MODE_MODELN_HANDLER
  USE MODE_FMREAD
 -USE MODD_DIM_n
 +USE MODE_IO_ll
 +USE MODE_IO_MANAGE_STRUCT, ONLY : IO_FILE_ADD2LIST
 +USE MODE_MSG
 +USE MODE_POS
  !
  IMPLICIT NONE
  !
@@@ -158,14 -161,14 +162,16 @@@ INTEGER :: IIU_ll, IJU_l
  INTEGER :: IKU
  INTEGER :: ILBX,ILBY
  INTEGER :: JSV   ! Loop index
- INTEGER :: JMOM, IMOMENTS, JMODE, ISV_NAME_IDX  ! dust modes
+ INTEGER :: JMOM, IMOMENTS, JMODE, ISV_NAME_IDX, IMODEIDX  ! dust and salt modes
  INTEGER :: ILUDES                         !  logical unit numbers of DESFM file
  LOGICAL :: GFOUND                         ! Return code when searching namelist
 +TYPE(TFIELDDATA)        :: TZFIELD
 +TYPE(TFILEDATA),POINTER :: TZCHEMFILE => NULL()
  !-------------------------------------------------------------------------------
  !
- CALL GET_MODEL_NUMBER_ll(IMI)
+ ! get model index
+ IMI = GET_CURRENT_MODEL_INDEX()
+ !
  CALL FMLOOK_ll(HLUOUT,HLUOUT,ILUOUT,IRESP)
  !
  CALL GET_INDICE_ll (IIB,IJB,IIE,IJE)
@@@ -212,42 -215,43 +218,26 @@@ END I
  ALLOCATE(XSVT(0,0,0,0))
  IF(PRESENT(HCHEMFILE)) THEN
    WRITE(ILUOUT,*) 'Routine INI_PROG_VAR: CHEMical species read in ',TRIM(HCHEMFILE)
-   IF (.NOT.LDUST) THEN
-   ! Always initialize chemical scheme variables before INI_NSV call !
-     CALL CH_INIT_SCHEME_n(IMI,LUSECHAQ,LUSECHIC,LCH_PH,ILUOUT,NVERB)
- ! Question CL : Maud a supprime l appel a CH_INIT_CCS ?
-     LUSECHEM = .TRUE.
-   END IF
-   IF (LORILAM) THEN
-     CORGANIC = "MPMPO"
-     LVARSIGI = .TRUE.
-     LVARSIGJ = .TRUE.
-     CALL CH_AER_INIT_SOA(ILUOUT,NVERB)
-   END IF ! lorilam
-   ! initialise NSV_* variables
-   CALL INI_NSV(1)
-   ALLOCATE(XSVT(IIU,IJU,IKU,NSV))
    ! Read dimensions in chem file and checks with output file
 -  CALL FMOPEN_ll(HCHEMFILE,'READ',HLUOUT,0,2,NVERB,ININAR,IRESP)
 -  YRECFM='IMAX'
 -  YDIR='--'
 -  CALL FMREAD(HCHEMFILE,YRECFM,HLUOUT,YDIR,IIMAX,IGRID,ILENCH,         &
 -              YCOMMENT,IRESP)
 +  CALL IO_FILE_ADD2LIST(TZCHEMFILE,TRIM(HCHEMFILE),'UNKNOWN','READ',KLFINPRAR=0,KLFITYPE=2,KLFIVERB=NVERB)
 +  CALL IO_FILE_OPEN_ll(TZCHEMFILE)
 +  !
 +  CALL IO_READ_FIELD(TZCHEMFILE,'IMAX',IIMAX,IRESP)
    IF (IRESP/=0) THEN
 -    WRITE(ILUOUT,FMT=9000) 
 -    WRITE(ILUOUT,*) TRIM(YRECFM),' NOT FOUND IN THE CHEM FILE ',HCHEMFILE
     !callabortstop
 -    CALL CLOSE_ll(HLUOUT,IOSTAT=IRESP)
 -    CALL ABORT
 -    STOP
 +    CALL PRINT_MSG(NVERB_FATAL,'GEN','INI_PROG_VAR','IMAX not found in the CHEM file '//TRIM(HCHEMFILE))
    END IF !IRESP
 -  YRECFM='JMAX'
 -  YDIR='--'
 -  CALL FMREAD(HCHEMFILE,YRECFM,HLUOUT,YDIR,IJMAX,IGRID,ILENCH,         &
 -              YCOMMENT,IRESP)
 +  !
 +  CALL IO_READ_FIELD(TZCHEMFILE,'JMAX',IJMAX,IRESP)
    IF (IRESP/=0) THEN
 -    WRITE(ILUOUT,FMT=9000) 
 -    WRITE(ILUOUT,*) TRIM(YRECFM),'NOT FOUND IN THE CHEM FILE ',HCHEMFILE
  !callabortstop
 -    CALL CLOSE_ll(HLUOUT,IOSTAT=IRESP)
 -    CALL ABORT
 -    STOP
 +    CALL PRINT_MSG(NVERB_FATAL,'GEN','INI_PROG_VAR','JMAX not found in the CHEM file '//TRIM(HCHEMFILE))
    END IF !IRESP
 -  YRECFM='KMAX'
 -  YDIR='--'
 -  CALL FMREAD(HCHEMFILE,YRECFM,HLUOUT,YDIR,IKMAX,IGRID,ILENCH,         &
 -              YCOMMENT,IRESP)
 +  !
 +  CALL IO_READ_FIELD(TZCHEMFILE,'KMAX',IKMAX,IRESP)
    IF (IRESP/=0) THEN
 -    WRITE(ILUOUT,FMT=9000) 
 -    WRITE(ILUOUT,*) TRIM(YRECFM),'NOT FOUND IN THE CHEM FILE ',HCHEMFILE
  !callabortstop
 -    CALL CLOSE_ll(HLUOUT,IOSTAT=IRESP)
 -    CALL ABORT
 -    STOP
 +    CALL PRINT_MSG(NVERB_FATAL,'GEN','INI_PROG_VAR','KMAX not found in the CHEM file '//TRIM(HCHEMFILE))
    END IF !IRESP
    IF ( (IIMAX/=(IIU_ll-2*JPHEXT)) .OR. (IJMAX/=(IJU_ll-2*JPHEXT))      &
                                    .OR. (IKMAX/=(IKU-2*JPVEXT)) ) THEN
      WRITE(ILUOUT,*) 'AND IN THE CHEM FILE :',HCHEMFILE
      WRITE(ILUOUT,*) IIMAX,'*',IJMAX,'*',IKMAX
      !callabortstop
 -    CALL CLOSE_ll(HLUOUT,IOSTAT=IRESP)
 -    CALL ABORT
 -    STOP
 +    CALL PRINT_MSG(NVERB_FATAL,'GEN','INI_PROG_VAR','')
    END IF ! IIMAX
+ ! check nsv to be read  
+   IF (.NOT.LDUST) THEN
+   ! Always initialize chemical scheme variables before INI_NSV call !
+     CALL CH_INIT_SCHEME_n(IMI,LUSECHAQ,LUSECHIC,LCH_PH,ILUOUT,NVERB)
+     LUSECHEM = .TRUE.
+   END IF
+   IF (LORILAM) THEN
+     YDESFM=TRIM(ADJUSTL(HCHEMFILE))//'.des'
+     CALL FMLOOK_ll(YDESFM,HLUOUT,ILUDES,IRESP)
+     CALL POSNAM(ILUDES,'NAM_CH_ORILAM',GFOUND,ILUOUT)
+     IF (GFOUND) READ(UNIT=ILUDES,NML=NAM_CH_ORILAM)
+   ENDIF
+   IF (LDUST) THEN
+     LDSTINIT=.TRUE.
+     LDSTPRES=.FALSE.
+     YDESFM=TRIM(ADJUSTL(HCHEMFILE))//'.des'
+     CALL FMLOOK_ll(YDESFM,HLUOUT,ILUDES,IRESP)
+     CALL POSNAM(ILUDES,'NAM_DUST',GFOUND,ILUOUT)
+     IF (GFOUND) READ(UNIT=ILUDES,NML=NAM_DUST)
+   ENDIF
+   IF (LSALT) THEN
+     LSLTINIT=.TRUE.
+     LSLTPRES=.FALSE.
+     YDESFM=TRIM(ADJUSTL(HCHEMFILE))//'.des'
+     CALL FMLOOK_ll(YDESFM,HLUOUT,ILUDES,IRESP)
+     CALL POSNAM(ILUDES,'NAM_SALT',GFOUND,ILUOUT)
+     IF (GFOUND) READ(UNIT=ILUDES,NML=NAM_SALT)
+   ! initialise NSV_* variables
+   ENDIF
+   CALL INI_NSV(1)
+   ALLOCATE(XSVT(IIU,IJU,IKU,NSV))
+   
+   ! Read scalars in chem file   
    IF (.NOT.LDUST) THEN
-   ! Read scalars in chem file
 +    TZFIELD%CSTDNAME   = ''
 +    TZFIELD%CUNITS     = ''
 +    TZFIELD%CDIR       = 'XY'
 +    TZFIELD%NGRID      = 1
 +    TZFIELD%NTYPE      = TYPEREAL
 +    TZFIELD%NDIMS      = 3
 +    !
      DO JSV = NSV_CHEMBEG,NSV_CHEMEND
 -      YRECFM=TRIM(CNAMES(JSV-NSV_CHEMBEG+1))//'T'
 -      YDIR='XY'
 -      CALL FMREAD(HCHEMFILE,YRECFM,HLUOUT,YDIR,XSVT(:,:,:,JSV),IGRID,ILENCH,  &
 -                  YCOMMENT,IRESP)
 +      TZFIELD%CMNHNAME   = TRIM(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_READ_FIELD(TZCHEMFILE,TZFIELD,XSVT(:,:,:,JSV),IRESP)
        IF (IRESP/=0) THEN
 -        WRITE(ILUOUT,*) TRIM(YRECFM),'NOT FOUND IN THE CHEM FILE ',HCHEMFILE
 +        WRITE(ILUOUT,*) TRIM(TZFIELD%CMNHNAME),' NOT FOUND IN THE CHEM FILE ',HCHEMFILE
          XSVT(:,:,:,JSV) = 0.
        END IF !IRESP
      END DO ! JSV
      END IF
    END IF
  
+   IF (LORILAM) THEN
+     CALL CH_AER_INIT_SOA(ILUOUT,NVERB)
+     DO JSV = NSV_AERBEG,NSV_AEREND
+       YRECFM=TRIM(CAERONAMES(JSV-NSV_AERBEG+1))//'T'
+       YDIR='XY'
+       CALL FMREAD(HCHEMFILE,YRECFM,HLUOUT,YDIR,XSVT(:,:,:,JSV),IGRID,ILENCH,  &
+                 YCOMMENT,IRESP)
+       IF (IRESP/=0) THEN
+       WRITE(ILUOUT,FMT=9000) 
+       WRITE(ILUOUT,*) TRIM(YRECFM),'NOT FOUND IN THE CHEM FILE ',HCHEMFILE
+ !callabortstop
+ !CALL ABORT
+ !      STOP
+         LORILAM=.FALSE.
+       END IF !IRESP
+     END DO ! JSV    
+     IF (LDEPOS_AER(IMI)) THEN   
+       IF(.NOT.ALLOCATED(CDEAERNAMES)) THEN
+         ALLOCATE(CDEAERNAMES(JPMODE*2))
+         CDEAERNAMES(:) = YPDEAER_INI(:)
+       ENDIF    
+       DO JSV = NSV_AERDEPBEG,NSV_AERDEPEND
+         YRECFM=TRIM(CDEAERNAMES(JSV-NSV_AERDEPBEG+1))//'T'
+         YDIR='XY'
+         CALL FMREAD(HCHEMFILE,YRECFM,HLUOUT,YDIR,XSVT(:,:,:,JSV),IGRID,ILENCH,  &
+                 YCOMMENT,IRESP)
+         IF (IRESP/=0) THEN
+           WRITE(ILUOUT,FMT=9000) 
+           WRITE(ILUOUT,*) TRIM(YRECFM),'NOT FOUND IN THE CHEM FILE ',HCHEMFILE
+ !callabortstop
+ !CALL ABORT
+ !      STOP
+           LDEPOS_AER(IMI)=.FALSE.
+         END IF !IRESP
+       END DO ! JSV
+     END IF ! ldepos_aer
+   END IF ! lorilam
+   
    IF (LDUST) THEN
-     LDSTINIT=.TRUE.
-     LDSTPRES=.FALSE.
-     YDESFM=TRIM(ADJUSTL(HCHEMFILE))//'.des'
-     CALL FMLOOK_ll(YDESFM,HLUOUT,ILUDES,IRESP)
-     CALL POSNAM(ILUDES,'NAM_DUST',GFOUND,ILUOUT)
-     IF (GFOUND) READ(UNIT=ILUDES,NML=NAM_DUST)
-     CALL INI_NSV(1)
 +    TZFIELD%CSTDNAME   = ''
 +    TZFIELD%CUNITS     = 'ppp'
 +    TZFIELD%CDIR       = 'XY'
 +    TZFIELD%NGRID      = 1
 +    TZFIELD%NTYPE      = TYPEREAL
 +    TZFIELD%NDIMS      = 3
 +    !
      IMOMENTS = INT(NSV_DSTEND - NSV_DSTBEG+1)/NMODE_DST
      IF (IMOMENTS == 1) THEN
        DO JMODE=1, NMODE_DST
    END IF  ! LDUST
  
    IF (LSALT) THEN
-     LSLTINIT=.TRUE.
-     LSLTPRES=.FALSE.
-     CALL POSNAM(ILUDES,'NAM_SALT',GFOUND,ILUOUT)
-     IF (GFOUND) READ(UNIT=ILUDES,NML=NAM_SALT)
-     CALL INI_NSV(1)
 +    TZFIELD%CSTDNAME   = ''
 +    TZFIELD%CUNITS     = 'ppp'
 +    TZFIELD%CDIR       = 'XY'
 +    TZFIELD%NGRID      = 1
 +    TZFIELD%NTYPE      = TYPEREAL
 +    TZFIELD%NDIMS      = 3
 +    !
      IMOMENTS = INT(NSV_SLTEND - NSV_SLTBEG+1)/NMODE_SLT
      IF (IMOMENTS == 1) THEN
        DO JMODE=1, NMODE_SLT
  !callabortstop
  !CALL ABORT
  !      STOP
-         LORILAM=.FALSE.
-       END IF !IRESP
-     END DO ! JSV
-   END IF
+           LDEPOS_SLT(IMI)=.FALSE.
+         END IF !IRESP
+       END DO ! JSV      
+     ENDIF ! ldepos_slt 
+   END IF  ! LSALT
 -
 -  CALL FMCLOS_ll(HCHEMFILE,'KEEP',HLUOUT,IRESP)
 -
 +  !
 +  CALL IO_FILE_CLOSE_ll(TZCHEMFILE)
 +  !
  ELSE ! HCHEMFILE
    IF (NSV >=1) THEN
      ALLOCATE(XSVT(IIU,IJU,IKU,NSV))
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -3,13 -3,13 +3,13 @@@
  !      #####################
  !
  INTERFACE
 -      SUBROUTINE LIMA_WARM (OACTIT, OSEDC, ORAIN, KSPLITR, PTSTEP, KMI,   &
 -                            HFMFILE, HLUOUT, OCLOSE_OUT, KRR, PZZ, PRHODJ,&
 -                            PRHODREF, PEXNREF, PW_NU, PPABSM, PPABST,     &
 -                            PTHM, PRCM,                                   &
 -                            PTHT, PRT, PSVT,                              &
 -                            PTHS, PRS, PSVS,                              &
 -                            PINPRC, PINPRR, PINDEP, PINPRR3D, PEVAP3D     )
 +      SUBROUTINE LIMA_WARM (OACTIT, OSEDC, ORAIN, KSPLITR, PTSTEP, KMI, &
 +                            KRR, PZZ, PRHODJ,                           &
 +                            PRHODREF, PEXNREF, PW_NU, PPABSM, PPABST,   &
 +                            PTHM, PRCM,                                 &
 +                            PTHT, PRT, PSVT,                            &
 +                            PTHS, PRS, PSVS,                            &
-                             PINPRC, PINPRR, PINPRR3D, PEVAP3D           )
++                            PINPRC, PINPRR, PINDEP, PINPRR3D, PEVAP3D   )
  !
  LOGICAL,                  INTENT(IN)    :: OACTIT     ! Switch to activate the
                                                        ! activation by radiative
@@@ -57,15 -63,15 +58,15 @@@ REAL, DIMENSION(:,:,:),   INTENT(INOUT
  END SUBROUTINE LIMA_WARM
  END INTERFACE
  END MODULE MODI_LIMA_WARM
 -!     #####################################################################
 -      SUBROUTINE LIMA_WARM (OACTIT, OSEDC, ORAIN, KSPLITR, PTSTEP, KMI,   &
 -                            HFMFILE, HLUOUT, OCLOSE_OUT, KRR, PZZ, PRHODJ,&
 -                            PRHODREF, PEXNREF, PW_NU, PPABSM, PPABST,     &
 -                            PTHM, PRCM,                                   &
 -                            PTHT, PRT, PSVT,                              &
 -                            PTHS, PRS, PSVS,                              &
 -                            PINPRC, PINPRR, PINDEP, PINPRR3D, PEVAP3D     )
 -!     #####################################################################
 +!     ###################################################################
 +      SUBROUTINE LIMA_WARM (OACTIT, OSEDC, ORAIN, KSPLITR, PTSTEP, KMI, &
 +                            KRR, PZZ, PRHODJ,                           &
 +                            PRHODREF, PEXNREF, PW_NU, PPABSM, PPABST,   &
 +                            PTHM, PRCM,                                 &
 +                            PTHT, PRT, PSVT,                            &
 +                            PTHS, PRS, PSVS,                            &
-                             PINPRC, PINPRR, PINPRR3D, PEVAP3D           )
++                            PINPRC, PINPRR, PINDEP, PINPRR3D, PEVAP3D   )
 +!     ###################################################################
  !
  !!
  !!    PURPOSE
Simple merge
Simple merge
  !*    0.1 Modules.
  !
  USE MODD_MNH2LPDM
 -USE MODE_IO_LL
  USE MODD_CONF, ONLY : CPROGRAM
 -USE MODN_CONFIO
 +USE MODD_IO_ll,ONLY : TPTR2FILE
 +!
 +USE MODE_FM
 +USE MODE_IO_ll
 +USE MODE_IO_MANAGE_STRUCT, ONLY: IO_FILE_ADD2LIST
+ USE MODE_MODELN_HANDLER
+ USE MODE_POS
  !
  USE MODI_MNH2LPDM_INI
  USE MODI_MNH2LPDM_ECH
  !
++USE MODN_CONFIO
++!
  !
  !*    0.2 Variables locales.
  !
@@@ -42,7 -41,7 +46,8 @@@ CHARACTER(LEN=28) :: YFNML,YFLO
  INTEGER           :: IFNML,IFLOG        ! Unite NAMELIST et LOG.
  INTEGER           :: IFMTO,IFGRI,IFDAT  ! Unite METEO et GRILLE.
  INTEGER           :: IREP,IVERB,JFIC
+ LOGICAL :: GFOUND         ! Return code when searching namelist
 +TYPE(TPTR2FILE),DIMENSION(JPMNHMAX) :: TZFMNH  ! MesoNH files
  !
  !
  !
Simple merge
@@@ -245,7 -245,9 +245,10 @@@ END MODULE MODI_MODEL_
  !!                                  _  Add OSPLIT_WENO
  !!                                  _ Add droplet deposition 
  !!                   10/2016 (M.Mazoyer) New KHKO output fields
 +!!      P.Wautelet : 11/07/2016 : removed MNH_NCWRIT define
+ !!                   09/2017 Q.Rodier add LTEND_UV_FRC
+ !!                   10/2017 (C.Lac) Necessity to have chemistry processes as
+ !!                            the las process modifying XRSVS
  !!-------------------------------------------------------------------------------
  !
  !*       0.     DECLARATIONS
@@@ -520,14 -545,15 +533,20 @@@ REAL, DIMENSION(SIZE(XTHT,1),SIZE(XTHT,
  !
  TYPE(LIST_ll), POINTER :: TZFIELDC_ll   ! list of fields to exchange
  TYPE(HALO2LIST_ll), POINTER :: TZHALO2C_ll   ! list of fields to exchange
+ LOGICAL :: GCLD                     ! conditionnal call for dust wet deposition
+ LOGICAL :: GCLOUD_ONLY              ! conditionnal radiation computations for
+                                 !      the only cloudy columns
+ REAL, DIMENSION(SIZE(XRSVS,1), SIZE(XRSVS,2), SIZE(XRSVS,3), NSV_AER)  :: ZWETDEPAER
  !
 +TYPE(TFILEDATA),POINTER :: TZBAKFILE, TZOUTFILE
 +! TYPE(TFILEDATA),SAVE    :: TZDIACFILE
  !-------------------------------------------------------------------------------
  !
 +TZBAKFILE=> NULL()
 +TZOUTFILE=> NULL()
 +!
  !*       0.    MICROPHYSICAL SCHEME
  !              ------------------- 
  SELECT CASE(CCLOUD)
@@@ -1298,10 -1366,27 +1324,10 @@@ XT_RELAX = XT_RELAX + ZTIME2 - ZTIME1 
  !
  ZTIME1 = ZTIME2
  !
 -#ifdef MNH_NCWRIT
 -IF ( LNETCDF .AND. GCLOSE_OUT ) THEN
 -  DEF_NC = .TRUE.
 -  NC_WRITE=LNETCDF
 -  NC_FILE='phy'
 -  LLFIFM = .FALSE.
 -  CALL WRITE_PHYS_PARAM(YFMFILE)
 -  DEF_NC=.FALSE.
 -  LLFIFM = .TRUE.
 -END IF
 -CALL PHYS_PARAM_n(KTCOUNT,YFMFILE, GCLOSE_OUT,                        &
 -                  XT_RAD,XT_SHADOWS,XT_DCONV,XT_GROUND,XT_MAFL,       &
 -                  XT_DRAG,XT_TURB,XT_TRACER,                          &
 +CALL PHYS_PARAM_n(KTCOUNT,TZBAKFILE, GCLOSE_OUT,                &
 +                  XT_RAD,XT_SHADOWS,XT_DCONV,XT_GROUND,XT_MAFL, &
 +                  XT_DRAG,XT_TURB,XT_TRACER,                    &
-                   XT_CHEM,ZTIME,GMASKkids)
+                   ZTIME,ZWETDEPAER,GMASKkids,GCLOUD_ONLY)
 -DEF_NC=.TRUE.
 -#else
 -CALL PHYS_PARAM_n(KTCOUNT,YFMFILE, GCLOSE_OUT,                        &
 -                  XT_RAD,XT_SHADOWS,XT_DCONV,XT_GROUND,XT_MAFL,       &
 -                  XT_DRAG,XT_TURB,XT_TRACER,                          &
 -                  ZTIME,ZWETDEPAER,GMASKkids,GCLOUD_ONLY)
 -#endif                  
  !
  IF (CDCONV/='NONE') THEN
    XPACCONV = XPACCONV + XPRCONV * XTSTEP
@@@ -9,15 -9,14 +9,14 @@@
  !
  INTERFACE
  !
 -      SUBROUTINE PHYS_PARAM_n(KTCOUNT,HFMFILE,OCLOSE_OUT,                                  &
 +      SUBROUTINE PHYS_PARAM_n(KTCOUNT,TPFILE,OCLOSE_OUT,                                   &
-                               PRAD,PSHADOWS,PKAFR,PGROUND,PMAFL,PDRAG,PTURB,PTRACER,PCHEM, &
-                               PTIME_BU, OMASKkids                                          )           
+                               PRAD,PSHADOWS,PKAFR,PGROUND,PMAFL,PDRAG,PTURB,PTRACER,       &
+                               PTIME_BU, PWETDEPAER, OMASKkids,OCLOUD_ONLY                  )           
 -
 +!
 +USE MODD_IO_ll, ONLY: TFILEDATA
  !
  INTEGER,           INTENT(IN)     :: KTCOUNT   ! temporal iteration count
 -CHARACTER (LEN=28),INTENT(IN)     :: HFMFILE   ! name of the synchronous 
 -                                               ! OUTPUT FM-file
 +TYPE(TFILEDATA),   INTENT(IN)     :: TPFILE    ! Synchronous output file
  LOGICAL,           INTENT(IN)     :: OCLOSE_OUT! conditional closure of the 
                                                 ! OUTPUT FM-file
  ! advection schemes                   
@@@ -35,9 -37,9 +37,9 @@@ END INTERFAC
  END MODULE MODI_PHYS_PARAM_n
  !
  !     ######################################################################
 -      SUBROUTINE PHYS_PARAM_n(KTCOUNT,HFMFILE,OCLOSE_OUT,                                  &
 +      SUBROUTINE PHYS_PARAM_n(KTCOUNT,TPFILE,OCLOSE_OUT,                                   &
-                               PRAD,PSHADOWS,PKAFR,PGROUND,PMAFL,PDRAG,PTURB,PTRACER,PCHEM, &
-                               PTIME_BU, OMASKkids                                          )           
+                               PRAD,PSHADOWS,PKAFR,PGROUND,PMAFL,PDRAG,PTURB,PTRACER,       &
+                               PTIME_BU, PWETDEPAER, OMASKkids,OCLOUD_ONLY                  )           
  !     ######################################################################
  !
  !!****  *PHYS_PARAM_n * -monitor of the parameterizations used by model _n
@@@ -721,8 -726,8 +726,8 @@@ CALL SUNPOS_n   ( XZENITH, ZCOSZEN, ZSI
        XLWD(:,:,:)=0.0
        XDTHRADSW(:,:,:)=0.0
        XDTHRADLW(:,:,:)=0.0
 -      CALL RADIATIONS   ( OCLOSE_OUT, HFMFILE, CLUOUT,                             &
 +      CALL RADIATIONS   ( OCLOSE_OUT, TPFILE, CLUOUT,                               &
-                LCLEAR_SKY,GCLOUD_ONLY, NCLEARCOL_TM1,CEFRADL, CEFRADI,COPWSW,COPISW,&
+                LCLEAR_SKY,OCLOUD_ONLY, NCLEARCOL_TM1,CEFRADL, CEFRADI,COPWSW,COPISW,&
                 COPWLW,COPILW, XFUDG,                                                &
                 NDLON, NFLEV, NRAD_DIAG, NFLUX, NRAD, NAER,NSWB, NSTATM, NRAD_COLNBR,&
                 ZCOSZEN, XSEA, XCORSOL,                                              &
diff --cc src/MNH/ppm.f90
Simple merge
Simple merge
@@@ -745,7 -743,9 +750,9 @@@ IF(LEN_TRIM(YCHEMFILE)>0)THE
    CALL POSNAM(IPRE_REAL1,'NAM_AERO_CONF',GFOUND,ILUOUT0)
    IF (GFOUND) READ(IPRE_REAL1,NAM_AERO_CONF)
    IF(YCHEMFILETYPE=='GRIBEX') &
 -  CALL READ_ALL_DATA_GRIB_CASE('CHEM',YPRE_REAL1,YCHEMFILE,YPGDFILE,ZHORI,NVERB,LDUMMY_REAL)
 +  CALL READ_ALL_DATA_GRIB_CASE('CHEM',YPRE_REAL1,YCHEMFILE,TZPGDFILE,ZHORI,NVERB,LDUMMY_REAL)
+   IF (YCHEMFILETYPE=='NETCDF') &
+   CALL READ_CHEM_DATA_NETCDF_CASE(YPRE_REAL1,YCHEMFILE,YPGDFILE,ZHORI,NVERB,LDUMMY_REAL)
  END IF
  !
  CALL CLOSE_ll(YPRE_REAL1, IOSTAT=IRESP)
Simple merge
@@@ -619,8 -622,13 +623,14 @@@ CHARACTER (LEN=2)               :: YDI
  INTEGER :: ISWB ! number of SW spectral bands (between radiations and surface schemes)
  INTEGER :: JSWB ! loop on SW spectral bands
  INTEGER :: JAE  ! loop on aerosol class
 +TYPE(TFIELDDATA) :: TZFIELD
  !
+ REAL, DIMENSION(SIZE(PTHT,1),SIZE(PTHT,2),SIZE(PTHT,3)) :: ZDZPABST
+ REAL :: ZMINVAL
+ INTEGER, DIMENSION(3) :: IMINLOC
+ INTEGER :: IINFO_ll
+ LOGICAL, DIMENSION(SIZE(PTHT,1),SIZE(PTHT,2)) :: GCLOUD_SURF
+ !
  !-------------------------------------------------------------------------
  !-------------------------------------------------------------------------
  !-------------------------------------------------------------------------
Simple merge
Simple merge
@@@ -282,12 -282,12 +282,14 @@@ END MODULE MODI_READ_EXSEG_
  !!      M.Leriche 18/12/2015 : bug chimie glace dans prep_real_case
  !!      Modification    01/2016  (JP Pinty) Add LIMA
  !!      Modification   02/2016   (M.Leriche) treat gas and aq. chemicals separately
 +!!      P.Wautelet 08/07/2016 : removed MNH_NCWRIT define
  !!      Modification   10/2016    (C.LAC) Add OSPLIT_WENO + Add droplet
  !!                                deposition + Add max values
 +!!      Modification   11/2016   (Ph. Wautelet) Allocate/initialise some output/backup structures
  !!      Modification   03/2017   (JP Chaboureau) Fix the initialization of
  !!                                               LUSERx-type variables for LIMA
+ !!      M.Leriche      06/2017 for spawn and prep_real avoid abort if wet dep for 
+ !!                             aerosol and no cloud scheme defined
  !!------------------------------------------------------------------------------
  !
  !*       0.    DECLARATIONS
@@@ -100,23 -101,24 +101,24 @@@ REAL, DIMENSION(:,:,:),          INTENT
  REAL, DIMENSION(:,:,:,:),        INTENT(OUT) :: PLBXRM  ,PLBXSVM  ! Moisture and SV
  REAL, DIMENSION(:,:,:,:),        INTENT(OUT) :: PLBYRM  ,PLBYSVM  ! in x and y-dir.
  ! Forcing fields
 -INTEGER,              INTENT(IN)  :: KFRC              ! number of forcing
 -TYPE (DATE_TIME), DIMENSION(:), INTENT(OUT) :: TPDTFRC ! date of forcing profs.
 -REAL, DIMENSION(:,:), INTENT(OUT) :: PUFRC,PVFRC,PWFRC ! forcing variables
 -REAL, DIMENSION(:,:), INTENT(OUT) :: PTHFRC,PRVFRC
 -REAL, DIMENSION(:,:), INTENT(OUT) :: PTENDUFRC,PTENDVFRC
 -REAL, DIMENSION(:,:), INTENT(OUT) :: PTENDTHFRC,PTENDRVFRC,PGXTHFRC,PGYTHFRC
 -REAL, DIMENSION(:),   INTENT(OUT) :: PPGROUNDFRC
 -REAL, DIMENSION(:,:,:,:), INTENT(OUT) :: PATC
 -INTEGER,              INTENT(IN)  :: KADVFRC              ! number of forcing
 -TYPE (DATE_TIME), DIMENSION(:), INTENT(OUT) :: TPDTADVFRC ! date of forcing profs.
 -REAL, DIMENSION(:,:,:,:),   INTENT(OUT) :: PDTHFRC, PDRVFRC
 -INTEGER,              INTENT(IN)  :: KRELFRC              ! number of forcing
 -TYPE (DATE_TIME), DIMENSION(:), INTENT(OUT) :: TPDTRELFRC ! date of forcing profs.
 -REAL, DIMENSION(:,:,:,:),   INTENT(OUT) :: PTHREL, PRVREL
 -REAL, DIMENSION(:,:,:),     INTENT(OUT) :: PVTH_FLUX_M,PWTH_FLUX_M,PVU_FLUX_M ! Eddy fluxes
 -REAL, DIMENSION(:,:,:), INTENT(INOUT) :: PRUS_PRES, PRVS_PRES, PRWS_PRES
 -REAL, DIMENSION(:,:,:), INTENT(INOUT) :: PRTHS_CLD
 -REAL, DIMENSION(:,:,:,:), INTENT(INOUT) :: PRRS_CLD, PRSVS_CLD
 +INTEGER,                        INTENT(IN)    :: KFRC              ! number of forcing
 +TYPE (DATE_TIME), DIMENSION(:), INTENT(OUT)   :: TPDTFRC           ! date of forcing profs.
 +REAL, DIMENSION(:,:),           INTENT(OUT)   :: PUFRC,PVFRC,PWFRC ! forcing variables
 +REAL, DIMENSION(:,:),           INTENT(OUT)   :: PTHFRC,PRVFRC
++REAL, DIMENSION(:,:),           INTENT(OUT) :: PTENDUFRC,PTENDVFRC
 +REAL, DIMENSION(:,:),           INTENT(OUT)   :: PTENDTHFRC,PTENDRVFRC,PGXTHFRC,PGYTHFRC
 +REAL, DIMENSION(:),             INTENT(OUT)   :: PPGROUNDFRC
 +REAL, DIMENSION(:,:,:,:),       INTENT(OUT)   :: PATC
 +INTEGER,                        INTENT(IN)    :: KADVFRC           ! number of forcing
 +TYPE (DATE_TIME), DIMENSION(:), INTENT(OUT)   :: TPDTADVFRC        ! date of forcing profs.
 +REAL, DIMENSION(:,:,:,:),       INTENT(OUT)   :: PDTHFRC, PDRVFRC
 +INTEGER,                        INTENT(IN)    :: KRELFRC           ! number of forcing
 +TYPE (DATE_TIME), DIMENSION(:), INTENT(OUT)   :: TPDTRELFRC        ! date of forcing profs.
 +REAL, DIMENSION(:,:,:,:),       INTENT(OUT)   :: PTHREL, PRVREL
 +REAL, DIMENSION(:,:,:),         INTENT(OUT)   :: PVTH_FLUX_M,PWTH_FLUX_M,PVU_FLUX_M ! Eddy fluxes
 +REAL, DIMENSION(:,:,:),         INTENT(INOUT) :: PRUS_PRES, PRVS_PRES, PRWS_PRES
 +REAL, DIMENSION(:,:,:),         INTENT(INOUT) :: PRTHS_CLD
 +REAL, DIMENSION(:,:,:,:),       INTENT(INOUT) :: PRRS_CLD, PRSVS_CLD
  !
  !
  END SUBROUTINE READ_FIELD
@@@ -355,23 -356,25 +359,24 @@@ REAL, DIMENSION(:,:,:,:),        INTENT
  !
  !       
  ! Forcing fields
 -INTEGER,              INTENT(IN)  :: KFRC              ! number of forcing
 -TYPE (DATE_TIME), DIMENSION(:), INTENT(OUT) :: TPDTFRC ! date of forcing profs.
 -REAL, DIMENSION(:,:), INTENT(OUT) :: PUFRC,PVFRC,PWFRC ! forcing variables
 -REAL, DIMENSION(:,:), INTENT(OUT) :: PTHFRC,PRVFRC
 -REAL, DIMENSION(:,:), INTENT(OUT) :: PTENDUFRC,PTENDVFRC
 -REAL, DIMENSION(:,:), INTENT(OUT) :: PTENDTHFRC,PTENDRVFRC,PGXTHFRC,PGYTHFRC
 -REAL, DIMENSION(:),   INTENT(OUT) :: PPGROUNDFRC
 -REAL, DIMENSION(:,:,:,:), INTENT(OUT) :: PATC
 -INTEGER,              INTENT(IN)  :: KADVFRC              ! number of forcing
 -TYPE (DATE_TIME), DIMENSION(:), INTENT(OUT) :: TPDTADVFRC ! date of forcing profs.
 -REAL, DIMENSION(:,:,:,:),   INTENT(OUT) :: PDTHFRC, PDRVFRC
 -INTEGER,              INTENT(IN)  :: KRELFRC              ! number of forcing
 -TYPE (DATE_TIME), DIMENSION(:), INTENT(OUT) :: TPDTRELFRC ! date of forcing profs.
 -REAL, DIMENSION(:,:,:,:),   INTENT(OUT) :: PTHREL, PRVREL
 -REAL, DIMENSION(:,:,:),     INTENT(OUT) :: PVTH_FLUX_M,PWTH_FLUX_M,PVU_FLUX_M ! Eddy fluxes
 -REAL, DIMENSION(:,:,:), INTENT(INOUT) :: PRUS_PRES, PRVS_PRES, PRWS_PRES
 -REAL, DIMENSION(:,:,:), INTENT(INOUT) :: PRTHS_CLD
 -REAL, DIMENSION(:,:,:,:), INTENT(INOUT) :: PRRS_CLD, PRSVS_CLD
 -!
 +INTEGER,                        INTENT(IN)    :: KFRC              ! number of forcing
 +TYPE (DATE_TIME), DIMENSION(:), INTENT(OUT)   :: TPDTFRC           ! date of forcing profs.
 +REAL, DIMENSION(:,:),           INTENT(OUT)   :: PUFRC,PVFRC,PWFRC ! forcing variables
 +REAL, DIMENSION(:,:),           INTENT(OUT)   :: PTHFRC,PRVFRC
++REAL, DIMENSION(:,:),           INTENT(OUT) :: PTENDUFRC,PTENDVFRC
 +REAL, DIMENSION(:,:),           INTENT(OUT)   :: PTENDTHFRC,PTENDRVFRC,PGXTHFRC,PGYTHFRC
 +REAL, DIMENSION(:),             INTENT(OUT)   :: PPGROUNDFRC
 +REAL, DIMENSION(:,:,:,:),       INTENT(OUT)   :: PATC
 +INTEGER,                        INTENT(IN)    :: KADVFRC           ! number of forcing
 +TYPE (DATE_TIME), DIMENSION(:), INTENT(OUT)   :: TPDTADVFRC        ! date of forcing profs.
 +REAL, DIMENSION(:,:,:,:),       INTENT(OUT)   :: PDTHFRC, PDRVFRC
 +INTEGER,                        INTENT(IN)    :: KRELFRC           ! number of forcing
 +TYPE (DATE_TIME), DIMENSION(:), INTENT(OUT)   :: TPDTRELFRC        ! date of forcing profs.
 +REAL, DIMENSION(:,:,:,:),       INTENT(OUT)   :: PTHREL, PRVREL
 +REAL, DIMENSION(:,:,:),         INTENT(OUT)   :: PVTH_FLUX_M,PWTH_FLUX_M,PVU_FLUX_M ! Eddy fluxes
 +REAL, DIMENSION(:,:,:),         INTENT(INOUT) :: PRUS_PRES, PRVS_PRES, PRWS_PRES
 +REAL, DIMENSION(:,:,:),         INTENT(INOUT) :: PRTHS_CLD
 +REAL, DIMENSION(:,:,:,:),       INTENT(INOUT) :: PRRS_CLD, PRSVS_CLD
  !
  !*       0.2   declarations of local variables
  !
@@@ -1226,128 -1181,75 +1231,137 @@@ IF ( LFORCING ) THE
    DO JT=1,KFRC
  !
      WRITE (YFRC,'(I3.3)') JT
 -    YRECFM='DTFRC'//YFRC//'%TDATE' ! array of rank 3 for date
 -    YDIR='--'
 -    CALL FMREAD(HINIFILE,YRECFM,HLUOUT,YDIR,ITDATE,IGRID,ILENCH,YCOMMENT,IRESP)
 -    TPDTFRC(JT)%TDATE%YEAR  = ITDATE(1)
 -    TPDTFRC(JT)%TDATE%MONTH = ITDATE(2)
 -    TPDTFRC(JT)%TDATE%DAY   = ITDATE(3)
 -    YRECFM='DTFRC'//YFRC//'%TIME'
 -    YDIR='--'
 -    CALL FMREAD(HINIFILE,YRECFM,HLUOUT,YDIR,TPDTFRC(JT)%TIME,IGRID,ILENCH, &
 -                YCOMMENT,IRESP)
  !
 -    YRECFM='UFRC'//YFRC
 -    YDIR='--'
 -    CALL FMREAD(HINIFILE,YRECFM,HLUOUT,YDIR,Z1D,IGRID,ILENCH,YCOMMENT,IRESP)
 -    PUFRC(:,JT)=Z1D(:)
 -!
 -    YRECFM='VFRC'//YFRC
 -    YDIR='--'
 -    CALL FMREAD(HINIFILE,YRECFM,HLUOUT,YDIR,Z1D,IGRID,ILENCH,YCOMMENT,IRESP)
 -    PVFRC(:,JT)=Z1D(:)
 -!
 -    YRECFM='WFRC'//YFRC
 -    YDIR='--'
 -    CALL FMREAD(HINIFILE,YRECFM,HLUOUT,YDIR,Z1D,IGRID,ILENCH,YCOMMENT,IRESP)
 -    PWFRC(:,JT)=Z1D(:)
 -!
 -    YRECFM='THFRC'//YFRC
 -    YDIR='--'
 -    CALL FMREAD(HINIFILE,YRECFM,HLUOUT,YDIR,Z1D,IGRID,ILENCH,YCOMMENT,IRESP)
 -    PTHFRC(:,JT)=Z1D(:)
 -!
 -    YRECFM='RVFRC'//YFRC
 -    YDIR='--'
 -    CALL FMREAD(HINIFILE,YRECFM,HLUOUT,YDIR,Z1D,IGRID,ILENCH,YCOMMENT,IRESP)
 -    PRVFRC(:,JT)=Z1D(:)
 -!
 -    YRECFM='TENDTHFRC'//YFRC
 -    YDIR='--'
 -    CALL FMREAD(HINIFILE,YRECFM,HLUOUT,YDIR,Z1D,IGRID,ILENCH,YCOMMENT,IRESP)
 -    PTENDTHFRC(:,JT)=Z1D(:)
 -!
 -    YRECFM='TENDRVFRC'//YFRC
 -    YDIR='--'
 -    CALL FMREAD(HINIFILE,YRECFM,HLUOUT,YDIR,Z1D,IGRID,ILENCH,YCOMMENT,IRESP)
 -    PTENDRVFRC(:,JT)=Z1D(:)
 -!
 -    YRECFM='GXTHFRC'//YFRC
 -    YDIR='--'
 -    CALL FMREAD(HINIFILE,YRECFM,HLUOUT,YDIR,Z1D,IGRID,ILENCH,YCOMMENT,IRESP)
 -    PGXTHFRC(:,JT)=Z1D(:)
 -!
 -    YRECFM='GYTHFRC'//YFRC
 -    YDIR='--'
 -    CALL FMREAD(HINIFILE,YRECFM,HLUOUT,YDIR,Z1D,IGRID,ILENCH,YCOMMENT,IRESP)
 -    PGYTHFRC(:,JT)=Z1D(:)
 -!
 -    YRECFM='PGROUNDFRC'//YFRC
 -    YDIR='--'
 -    CALL FMREAD(HINIFILE,YRECFM,HLUOUT,YDIR,PPGROUNDFRC(JT),IGRID,ILENCH,YCOMMENT,IRESP)
 +    TZFIELD%CMNHNAME   = 'DTFRC'//YFRC
 +    TZFIELD%CSTDNAME   = ''
 +    TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
 +    TZFIELD%CUNITS     = 'seconds since YYYY-MM-DD HH:MM:SS.S'
 +    TZFIELD%CDIR       = '--'
 +    TZFIELD%CCOMMENT   = 'Date of forcing profile '//YFRC
 +    TZFIELD%NGRID      = 0
 +    TZFIELD%NTYPE      = TYPEDATE
 +    TZFIELD%NDIMS      = 0
 +    CALL IO_READ_FIELD(TPINIFILE,TZFIELD,TPDTFRC(JT))
 +!
 +    TZFIELD%CMNHNAME   = 'UFRC'//YFRC
 +    TZFIELD%CSTDNAME   = ''
 +    TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
 +    TZFIELD%CUNITS     = 'm s-1'
 +    TZFIELD%CDIR       = '--'
 +    TZFIELD%CCOMMENT   = 'Zonal component of horizontal forcing wind'
 +    TZFIELD%NGRID      = 1
 +    TZFIELD%NTYPE      = TYPEREAL
 +    TZFIELD%NDIMS      = 1
 +    CALL IO_READ_FIELD(TPINIFILE,TZFIELD,PUFRC(:,JT))
 +!
 +    TZFIELD%CMNHNAME   = 'VFRC'//YFRC
 +    TZFIELD%CSTDNAME   = ''
 +    TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
 +    TZFIELD%CUNITS     = 'm s-1'
 +    TZFIELD%CDIR       = '--'
 +    TZFIELD%CCOMMENT   = 'Meridian component of horizontal forcing wind'
 +    TZFIELD%NGRID      = 1
 +    TZFIELD%NTYPE      = TYPEREAL
 +    TZFIELD%NDIMS      = 1
 +    CALL IO_READ_FIELD(TPINIFILE,TZFIELD,PVFRC(:,JT))
 +!
 +    TZFIELD%CMNHNAME   = 'WFRC'//YFRC
 +    TZFIELD%CSTDNAME   = ''
 +    TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
 +    TZFIELD%CUNITS     = 'm s-1'
 +    TZFIELD%CDIR       = '--'
 +    TZFIELD%CCOMMENT   = 'Vertical forcing wind'
 +    TZFIELD%NGRID      = 4
 +    TZFIELD%NTYPE      = TYPEREAL
 +    TZFIELD%NDIMS      = 1
 +    CALL IO_READ_FIELD(TPINIFILE,TZFIELD,PWFRC(:,JT))
 +!
 +    TZFIELD%CMNHNAME   = 'THFRC'//YFRC
 +    TZFIELD%CSTDNAME   = ''
 +    TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
 +    TZFIELD%CUNITS     = 'K'
 +    TZFIELD%CDIR       = '--'
 +    TZFIELD%CCOMMENT   = 'Forcing potential temperature'
 +    TZFIELD%NGRID      = 1
 +    TZFIELD%NTYPE      = TYPEREAL
 +    TZFIELD%NDIMS      = 1
 +    CALL IO_READ_FIELD(TPINIFILE,TZFIELD,PTHFRC(:,JT))
 +!
 +    TZFIELD%CMNHNAME   = 'RVFRC'//YFRC
 +    TZFIELD%CSTDNAME   = ''
 +    TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
 +    TZFIELD%CUNITS     = 'kg kg-1'
 +    TZFIELD%CDIR       = '--'
 +    TZFIELD%CCOMMENT   = 'Forcing vapor mixing ratio'
 +    TZFIELD%NGRID      = 1
 +    TZFIELD%NTYPE      = TYPEREAL
 +    TZFIELD%NDIMS      = 1
 +    CALL IO_READ_FIELD(TPINIFILE,TZFIELD,PRVFRC(:,JT))
 +!
 +    TZFIELD%CMNHNAME   = 'TENDTHFRC'//YFRC
 +    TZFIELD%CSTDNAME   = ''
 +    TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
 +    TZFIELD%CUNITS     = 'K s-1'
 +    TZFIELD%CDIR       = '--'
 +    TZFIELD%CCOMMENT   = 'Large-scale potential temperature tendency for forcing'
 +    TZFIELD%NGRID      = 1
 +    TZFIELD%NTYPE      = TYPEREAL
 +    TZFIELD%NDIMS      = 1
 +    CALL IO_READ_FIELD(TPINIFILE,TZFIELD,PTENDTHFRC(:,JT))
 +!
 +    TZFIELD%CMNHNAME   = 'TENDRVFRC'//YFRC
 +    TZFIELD%CSTDNAME   = ''
 +    TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
 +    TZFIELD%CUNITS     = 'kg kg-1 s-1'
 +    TZFIELD%CDIR       = '--'
 +    TZFIELD%CCOMMENT   = 'Large-scale vapor mixing ratio tendency for forcing'
 +    TZFIELD%NGRID      = 1
 +    TZFIELD%NTYPE      = TYPEREAL
 +    TZFIELD%NDIMS      = 1
 +    CALL IO_READ_FIELD(TPINIFILE,TZFIELD,PTENDRVFRC(:,JT))
 +!
 +    TZFIELD%CMNHNAME   = 'GXTHFRC'//YFRC
 +    TZFIELD%CSTDNAME   = ''
 +    TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
 +    TZFIELD%CUNITS     = 'K m-1'
 +    TZFIELD%CDIR       = '--'
 +    TZFIELD%CCOMMENT   = 'Large-scale potential temperature gradient for forcing'
 +    TZFIELD%NGRID      = 1
 +    TZFIELD%NTYPE      = TYPEREAL
 +    TZFIELD%NDIMS      = 1
 +    CALL IO_READ_FIELD(TPINIFILE,TZFIELD,PGXTHFRC(:,JT))
 +!
 +    TZFIELD%CMNHNAME   = 'GYTHFRC'//YFRC
 +    TZFIELD%CSTDNAME   = ''
 +    TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
 +    TZFIELD%CUNITS     = 'K m-1'
 +    TZFIELD%CDIR       = '--'
 +    TZFIELD%CCOMMENT   = 'Large-scale potential temperature gradient for forcing'
 +    TZFIELD%NGRID      = 1
 +    TZFIELD%NTYPE      = TYPEREAL
 +    TZFIELD%NDIMS      = 1
 +    CALL IO_READ_FIELD(TPINIFILE,TZFIELD,PGYTHFRC(:,JT))
 +!
 +    TZFIELD%CMNHNAME   = 'PGROUNDFRC'//YFRC
 +    TZFIELD%CSTDNAME   = ''
 +    TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
 +    TZFIELD%CUNITS     = 'Pa'
 +    TZFIELD%CDIR       = '--'
 +    TZFIELD%CCOMMENT   = 'Forcing ground pressure'
 +    TZFIELD%NGRID      = 1
 +    TZFIELD%NTYPE      = TYPEREAL
 +    TZFIELD%NDIMS      = 0
 +    CALL IO_READ_FIELD(TPINIFILE,TZFIELD,PPGROUNDFRC(JT))
  !
+     YRECFM='TENDUFRC'//YFRC
+     YDIR='--'
+     CALL FMREAD(HINIFILE,YRECFM,HLUOUT,YDIR,Z1D,IGRID,ILENCH,YCOMMENT,IRESP)
+     PTENDUFRC(:,JT)=Z1D(:)
+ !
+     YRECFM='TENDVFRC'//YFRC
+     YDIR='--'
+     CALL FMREAD(HINIFILE,YRECFM,HLUOUT,YDIR,Z1D,IGRID,ILENCH,YCOMMENT,IRESP)
+     PTENDVFRC(:,JT)=Z1D(:)
    END DO
  END IF
  !
@@@ -125,15 -127,29 +126,24 @@@ TYPE(TFIELDDATA)       :: TZFIEL
  !               -------------------
  !
  ! KMI may be 0 !
 -IF (KMI<0 .OR. KMI>JPMODELMAX) THEN
 -   !callabortstop
 -  CALL CLOSE_ll(CLUOUT0,IOSTAT=IRESP)
 -  CALL ABORT
 -  STOP
 -ENDIF
 +IF (KMI<0 .OR. KMI>JPMODELMAX) CALL PRINT_MSG(NVERB_FATAL,'GEN','READ_HGRID','KMI<0 .OR. KMI>JPMODELMAX')
  IF (KMI/=0) THEN
-   IMI = GET_CURRENT_MODEL_INDEX()
-   CALL GOTO_MODEL(KMI)
-   CALL GO_TOMODEL_ll(KMI, IINFO_ll)
-   CALL READ_HGRID_n(TPFMFILE,HMY_NAME,HDAD_NAME,HSTORAGE_TYPE)
-   CALL GO_TOMODEL_ll(IMI, IINFO_ll)
-   CALL GOTO_MODEL(IMI)
-   RETURN
+   IF (CPROGRAM/='M2LPDM') THEN
+     IMI = GET_CURRENT_MODEL_INDEX()
+     CALL GOTO_MODEL(KMI)
+     CALL GO_TOMODEL_ll(KMI, IINFO_ll)
 -    CALL READ_HGRID_n(HFMFILE,HMY_NAME,HDAD_NAME,HSTORAGE_TYPE)
++    CALL READ_HGRID_n(TPFMFILE,HMY_NAME,HDAD_NAME,HSTORAGE_TYPE)
+     CALL GO_TOMODEL_ll(IMI, IINFO_ll)
+     CALL GOTO_MODEL(IMI)
+     RETURN
+   ELSE
+     IMI = GET_CURRENT_MODEL_INDEX()
+     CALL GOTO_MODEL(KMI)
 -    CALL READ_HGRID_n(HFMFILE,HMY_NAME,HDAD_NAME,HSTORAGE_TYPE)
++    CALL READ_HGRID_n(TPFMFILE,HMY_NAME,HDAD_NAME,HSTORAGE_TYPE)
+     CALL GOTO_MODEL(IMI)
+     RETURN
+     RETURN    
+   END IF
  END IF
  !
  !*       2.     READING IN MODD_PGD...
@@@ -101,12 -101,11 +101,13 @@@ END MODULE MODI_READ_PRECIP_FIEL
  !-----------------------------------------------------------------------------
  !
  !*       0.    DECLARATIONS
 -USE MODE_FM
 -USE MODD_PARAM_ICE , ONLY : LDEPOSC
 +USE MODD_IO_ll,      ONLY : TFILEDATA
 +USE MODD_PARAM_ICE ONLY : LDEPOSC
  USE MODD_PARAM_C2R2, ONLY : LDEPOC
+ USE MODD_PARAM_LIMA, ONLY : MDEPOC=>LDEPOC                   
  !
 +USE MODE_FIELD,      ONLY : TFIELDDATA,TFIELDLIST,FIND_FIELD_ID_FROM_MNHNAME
 +USE MODE_FM
  USE MODE_FMREAD
  !
  IMPLICIT NONE
@@@ -189,19 -190,14 +190,19 @@@ IF (SIZE(PINPRC) /= 0 ) THE
    END SELECT
  END IF
  !
- IF (SIZE(PINPRC) /= 0 .AND. (LDEPOSC .OR. LDEPOC) ) THEN
+ IF (SIZE(PINPRC) /= 0 .AND. (LDEPOSC .OR. LDEPOC .OR. MDEPOC) ) THEN
    SELECT CASE(YGETRCT)
    CASE ('READ')
 -    YRECFM = 'INDEP'
 -    CALL FMREAD(HINIFILE,YRECFM,HLUOUT,YDIR,Z2D,IGRID,ILENCH,YCOMMENT,IRESP)
 +    CALL FIND_FIELD_ID_FROM_MNHNAME('INDEP',IID,IRESP)
 +    TZFIELD = TFIELDLIST(IID)
 +    TZFIELD%CUNITS = 'mm hour-1'
 +    CALL IO_READ_FIELD(TPINIFILE,TZFIELD,Z2D,IRESP)
      IF (IRESP == 0) PINDEP(:,:)=Z2D(:,:)/(1000.*3600.)
 -    YRECFM = 'ACDEP'
 -    CALL FMREAD(HINIFILE,YRECFM,HLUOUT,YDIR,Z2D,IGRID,ILENCH,YCOMMENT,IRESP)
 +    !
 +    CALL FIND_FIELD_ID_FROM_MNHNAME('ACDEP',IID,IRESP)
 +    TZFIELD = TFIELDLIST(IID)
 +    TZFIELD%CUNITS = 'mm'
 +    CALL IO_READ_FIELD(TPINIFILE,TZFIELD,Z2D,IRESP)
      IF (IRESP == 0) PACDEP(:,:)=Z2D(:,:)/(1000.)
    CASE ('INIT')
      PINDEP(:,:) = 0.0
@@@ -688,12 -588,12 +688,12 @@@ IMPLICIT NON
  !*      0.1   Declarations of arguments
  !
  CHARACTER(LEN=LEN_HREC),   INTENT(IN) :: HREC     ! name of the article to be read
 -INTEGER,             INTENT(IN) :: KL1,KL2  !  number of points
 -REAL, DIMENSION(KL1,KL2), INTENT(OUT):: PFIELD   ! array containing the data field
 -LOGICAL,DIMENSION(JPCOVER),   INTENT(IN) ::OFLAG  ! mask for array filling
 -INTEGER,             INTENT(OUT):: KRESP    ! KRESP  : return-code if a problem appears
 -CHARACTER(LEN=100),  INTENT(OUT):: HCOMMENT ! comment
 -CHARACTER(LEN=1),    INTENT(IN) :: HDIR     ! type of field :
 +INTEGER,                   INTENT(IN) :: KL1,KL2  !  number of points
 +REAL, DIMENSION(KL1,KL2),  INTENT(OUT):: PFIELD   ! array containing the data field
- LOGICAL,DIMENSION(JPCOVER),INTENT(IN) ::OFLAG     ! mask for array filling
++LOGICAL,DIMENSION(JPCOVER),INTENT(IN) :: OFLAG    ! mask for array filling
 +INTEGER,                   INTENT(OUT):: KRESP    ! KRESP  : return-code if a problem appears
 +CHARACTER(LEN=100),        INTENT(OUT):: HCOMMENT ! comment
 +CHARACTER(LEN=1),          INTENT(IN) :: HDIR     ! type of field :
  !                                           ! 'H' for HOR : with hor. dim.; and  distributed.
  !                                           ! 'A' for ALL : with hor. dim.; and not distributed.
  !                                           ! '-' : no horizontal dim.
@@@ -961,35 -958,35 +961,35 @@@ SELECT CASE ( HCLOUD 
  !
    CASE ('LIMA')
  !
 -    IF (OWARM) CALL LIMA_WARM(OACTIT, OSEDC, ORAIN, KSPLITR, PTSTEP, KMI,   &
 -                              HFMFILE, HLUOUT, OCLOSE_OUT, KRR, PZZ, PRHODJ,&
 -                              PRHODREF, PEXNREF, PW_ACT, PPABST, PPABST,    &
 -                              PTHT, PRCM,                                   &
 -                              PTHT, PRT, ZSVT,                              &
 -                              PTHS, PRS, ZSVS,                              &
 -                              PINPRC, PINPRR, PINDEP, PINPRR3D, PEVAP3D     )
 -!
 -IF (LCOLD) CALL LIMA_COLD(OSEDI, OHHONI, KSPLITG, PTSTEP, KMI,               &
 -                          HFMFILE, HLUOUT, OCLOSE_OUT, KRR, PZZ, PRHODJ,     &
 -                          PRHODREF, PEXNREF, PPABST, PW_ACT,                 &
 -                          PTHT, PPABST,                                      &
 -                          PTHT, PRT, ZSVT,                                   &
 -                          PTHS, PRS, ZSVS,                                   &
 +    IF (OWARM) CALL LIMA_WARM(OACTIT, OSEDC, ORAIN, KSPLITR, PTSTEP, KMI, &
 +                              KRR, PZZ, PRHODJ,                           &
-                               PRHODREF, PEXNREF, PW_ACT, PPABSM, PPABST,  &
-                               PTHM, PRCM,                                 &
++                              PRHODREF, PEXNREF, PW_ACT, PPABST, PPABST,  &
++                              PTHT, PRCM,                                 &
 +                              PTHT, PRT, ZSVT,                            &
 +                              PTHS, PRS, ZSVS,                            &
-                               PINPRC, PINPRR, PINPRR3D, PEVAP3D           )
++                              PINPRC, PINPRR, PINDEP, PINPRR3D, PEVAP3D   )
 +!
 +IF (LCOLD) CALL LIMA_COLD(OSEDI, OHHONI, KSPLITG, PTSTEP, KMI,          &
 +                          KRR, PZZ, PRHODJ, &
 +                          PRHODREF, PEXNREF, PPABST, PW_ACT,            &
-                           PTHM, PPABSM,                                 &
++                          PTHT, PPABST,                                 &
 +                          PTHT, PRT, ZSVT,                              &
 +                          PTHS, PRS, ZSVS,                              &
                            PINPRS, PINPRG, PINPRH)
  !
 -IF (OWARM .AND. LCOLD) CALL LIMA_MIXED(OSEDI, OHHONI, KSPLITG, PTSTEP, KMI,    &
 -                                 HFMFILE, HLUOUT, OCLOSE_OUT, KRR, PZZ, PRHODJ,&
 -                                 PRHODREF, PEXNREF, PPABST, PW_ACT,            &
 -                                 PTHT, PPABST,                                 &
 -                                 PTHT, PRT, ZSVT,                              &
 -                                 PTHS, PRS, ZSVS                               )
 +IF (OWARM .AND. LCOLD) CALL LIMA_MIXED(OSEDI, OHHONI, KSPLITG, PTSTEP, KMI, &
 +                                 KRR, PZZ, PRHODJ,                          &
 +                                 PRHODREF, PEXNREF, PPABST, PW_ACT,         &
-                                  PTHM, PPABSM,                              &
++                                 PTHT, PPABST,                              &
 +                                 PTHT, PRT, ZSVT,                           &
 +                                 PTHS, PRS, ZSVS                            )
  !
  !
  !*       12.2   Perform the saturation adjustment
  !
 -CALL LIMA_ADJUST(KRR, KMI, HFMFILE, HLUOUT, HRAD,                  &
 +CALL LIMA_ADJUST(KRR, KMI, TPFILE, HLUOUT, HRAD,                   &
                   HTURBDIM, OCLOSE_OUT, OSUBG_COND, PTSTEP,         &
-                  PRHODREF, PRHODJ, PEXNREF, PPABSM, PSIGS, PPABST, &
+                  PRHODREF, PRHODJ, PEXNREF, PPABST, PSIGS, PPABST, &
                   PRT, PRS, ZSVT, ZSVS,                             &
                   PTHS, PSRCS, PCLDFR                               )
  !
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -277,11 -280,8 +280,11 @@@ USE MODD_IO_ll, ONLY: TFILEDAT
  USE MODD_PARAMETERS
  USE MODD_LES
  USE MODD_CONF
- USE MODD_NSV, ONLY : NSV_LGBEG,NSV_LGEND
+ USE MODD_NSV, ONLY : XSVMIN,NSV_LGBEG,NSV_LGEND
  !
 +USE MODE_FIELD, ONLY: TFIELDDATA,TYPEREAL
 +USE MODE_FMWRIT
 +!
  USE MODI_GRADIENT_U
  USE MODI_GRADIENT_V
  USE MODI_GRADIENT_W
@@@ -42,11 -42,8 +42,11 @@@ USE MODD_CONF, ONLY : NMNHVERSION,NMASD
  !
  IMPLICIT NONE
  !
 +NMNHVERSION(1)=5
 +NMNHVERSION(2)=3
 +NMNHVERSION(3)=0
  NMASDEV=53 
- NBUGFIX=0
+ NBUGFIX=1
  CBIBUSER=''
  !
  END SUBROUTINE VERSION
  !!                                            add the initialization of the dimensions of
  !!                                          MASK array in MASK case with write outside the 
  !!                                          routine.
- !!      J.Escobar       02/10/2015 modif for JPHEXT(JPVEXT) variable 
 -!!      J.Escobar       02/10/2015 modif for JPHEXT(JPVEXT) variable  
++!!      J.Escobar       02/10/2015 modif for JPHEXT(JPVEXT) variable
  !!      D.Gazen+ G.Delautier 06/2016 modif for ncl files
 -!!      P. Wautelet     06-07/2017: improved comment (name of field + true comment + units)
 +!!      P. Wautelet     09/06/2017: name of the variable added to the name of the written field
 +!!                                  and better comment (true comment + units)
  !-------------------------------------------------------------------------------
  !
  !*       0.    DECLARATIONS
@@@ -3530,12 -3324,84 +3539,81 @@@ END I
  !
  !* Height of boundary layer
  !
- IF (LBLTOP) THEN
-   ZGAMREF=3.5E-3 ! K/m
+ IF (CBLTOP == 'THETA') THEN
+   !
+   ! méthode de la parcelle
+   !
+   ALLOCATE(ZSHMIX(IIU,IJU))
    ZWORK31(:,:,1:IKU-1)=0.5*(XZZ(:,:,1:IKU-1)+XZZ(:,:,2:IKU))
    ZWORK31(:,:,IKU)=2.*ZWORK31(:,:,IKU-1)-ZWORK31(:,:,IKU-2)
-   CALL FREE_ATM_PROFILE(TPFILE,ZTHETAV,ZWORK31,XZS,XZSMT,ZGAMREF,ZWORK32,ZWORK33)
- END IF
+   ZWORK21(:,:) = ZTHETAV(:,:,IKB)+0.5
+   ZSHMIX(:,:)  = 0.0
+   DO JJ=1,IJU
+     DO JI=1,IIU 
+       DO JK=IKB,IKE
+         IF ( ZTHETAV(JI,JJ,JK).GT.ZWORK21(JI,JJ) ) THEN
+           ZSHMIX(JI,JJ) =  ZWORK31(JI,JJ,JK-1)  &
+                         +( ZWORK31(JI,JJ,JK) - ZWORK31 (JI,JJ,JK-1) )  &
+                         /( ZTHETAV(JI,JJ,JK) - ZTHETAV(JI,JJ,JK-1) )  &
+                         *( ZWORK21(JI,JJ)    - ZTHETAV(JI,JJ,JK-1) )
+           EXIT
+         END IF
+       END DO
+     END DO
+   END DO
+   ZSHMIX(:,:)=ZSHMIX(:,:)-XZS(:,:)
+   ZSHMIX(:,:)=MAX(ZSHMIX(:,:),50.0)
+   YRECFM='HBLTOP'
+   YCOMMENT='Height of Boundary Layer TOP (M)'
+   ILENCH=LEN(YCOMMENT)
+   IGRID=1
+   CALL FMWRIT(HFMFILE,YRECFM,CLUOUT,'XY',ZSHMIX,IGRID,ILENCH,YCOMMENT,IRESP)  !
+   DEALLOCATE(ZSHMIX)
+ ELSEIF (CBLTOP == 'RICHA') THEN
+   !
+   ! méthode du "bulk Richardson number"
+   !
+   ALLOCATE(ZRIB(IIU,IJU,IKU))
+   ALLOCATE(ZSHMIX(IIU,IJU))
+   ZWORK31(:,:,1:IKU-1)=0.5*(XZZ(:,:,1:IKU-1)+XZZ(:,:,2:IKU))
+   ZWORK31(:,:,IKU)=2.*ZWORK31(:,:,IKU-1)-ZWORK31(:,:,IKU-2)
+   ZWORK32=MXF(XUT)
+   ZWORK33=MYF(XVT)
+   ZWORK34=ZWORK32**2+ZWORK33**2
+   DO JK=IKB,IKE  
+     ZRIB(:,:,JK)=XG*ZWORK31(:,:,JK)*(ZTHETAV(:,:,JK)-ZTHETAV(:,:,IKB))/(ZTHETAV(:,:,IKB)*ZWORK34(:,:,JK))
+   ENDDO
+   ZSHMIX=0.0
+   DO JJ=1,IJU
+     DO JI=1,IIU 
+       DO JK=IKB,IKE
+         IF ( ZRIB(JI,JJ,JK).GT.0.25 ) THEN
+           ZSHMIX(JI,JJ) = ZWORK31(JI,JJ,JK-1)  &
+                         +( ZWORK31(JI,JJ,JK) - ZWORK31(JI,JJ,JK-1) )  &
+                         *( 0.25 - ZRIB(JI,JJ,JK-1) )  &
+                         /( ZRIB(JI,JJ,JK)    - ZRIB(JI,JJ,JK-1) )
+           EXIT
+         END IF
+       END DO
+     END DO
+   END DO
+   ZSHMIX(:,:)=ZSHMIX(:,:)-XZS(:,:)
+   YRECFM='HBLTOP'
+   YCOMMENT='Height of Boundary Layer TOP (M)'
+   ILENCH=LEN(YCOMMENT)
+   IGRID=1
+   CALL FMWRIT(HFMFILE,YRECFM,CLUOUT,'XY',ZSHMIX,IGRID,ILENCH,YCOMMENT,IRESP)  !
+   DEALLOCATE(ZRIB,ZSHMIX)
+ ENDIF
+   ! used before 5-3-1 version
+   !
+   !ZGAMREF=3.5E-3 ! K/m
+   !ZWORK31(:,:,1:IKU-1)=0.5*(XZZ(:,:,1:IKU-1)+XZZ(:,:,2:IKU))
+   !ZWORK31(:,:,IKU)=2.*ZWORK31(:,:,IKU-1)-ZWORK31(:,:,IKU-2)
 -  !YFMFILE=CINIFILE
 -  !CINIFILE=HFMFILE
+   !CALL FREE_ATM_PROFILE(ZTHETAV,ZWORK31,XZS,XZSMT,ZGAMREF,ZWORK32,ZWORK33)
 -  !CINIFILE=YFMFILE
  !
  IF (ALLOCATED(ZTHETAV)) DEALLOCATE(ZTHETAV)
  !
@@@ -85,9 -83,9 +85,10 @@@ END MODULE MODI_WRITE_LFIFM1_FOR_DIAG_S
  !!      J.Escobar : 15/09/2015 : WENO5 & JPHEXT <> 1 
  !!      P.Tulet : Diag for salt and orilam
  !!      J.-P. Chaboureau 07/03/2016 fix the dimensions of local arrays
 +!!      P.Wautelet : 11/07/2016 : removed MNH_NCWRIT define
  !!      J.-P. Chaboureau 31/10/2016 add the call to RTTOV11
  !!      F. Brosse 10/2016 add chemical production destruction terms outputs
+ !!      M.Leriche 01/07/2017 Add DIAG chimical surface fluxes
  !-------------------------------------------------------------------------------
  !
  !*       0.    DECLARATIONS
@@@ -1600,17 -2135,45 +1600,33 @@@ END I
  !*       1.10   Diagnostic variables related to the precipitations
  !
  IF (CPROGRAM /= 'IDEAL') THEN
 -  YDIR='XY'
 -!
    IF (ASSOCIATED(XINPRC)) THEN
    IF (SIZE(XINPRC) /= 0 ) THEN
 -    ZWORK2D(:,:)  = XINPRC(:,:)
 -    YRECFM      = 'INPRC'
 -    YCOMMENT    = 'X_Y_INstantaneous Cloud Precipitation Rate (MM/H)'
 -    IGRID       = 1
 -    ILENCH      = LEN(YCOMMENT)
 -    CALL FMWRIT(HFMFILE,YRECFM,CLUOUT,YDIR,ZWORK2D*3.6E6,IGRID,ILENCH, &
 -                                               YCOMMENT,IRESP) ! unit conversion
 -!
 -    ZWORK2D(:,:)  = XACPRC(:,:)
 -    YRECFM      = 'ACPRC'
 -    YCOMMENT    = 'X_Y_ACcumulated Cloud Precipitation Rate (MM)'
 -    IGRID       = 1
 -    ILENCH      = LEN(YCOMMENT)
 -    CALL FMWRIT(HFMFILE,YRECFM,CLUOUT,YDIR,ZWORK2D*1.0E3,IGRID,ILENCH, &
 -                                                 YCOMMENT,IRESP) ! unit conversion
 +    CALL FIND_FIELD_ID_FROM_MNHNAME('INPRC',IID,IRESP)
 +    TZFIELD = TFIELDLIST(IID)
 +    TZFIELD%CUNITS = 'mm hour-1'
 +    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,XINPRC*3.6E6)
 +!
 +    CALL FIND_FIELD_ID_FROM_MNHNAME('ACPRC',IID,IRESP)
 +    TZFIELD = TFIELDLIST(IID)
 +    TZFIELD%CUNITS = 'mm'
 +    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,XACPRC*1.0E3)
++!
+   ENDIF
+   ENDIF
+ !
+   IF (ASSOCIATED(XINDEP)) THEN
+   IF (SIZE(XINDEP) /= 0 ) THEN
 -    ZWORK2D(:,:)  = XINDEP(:,:)
 -    YRECFM      = 'INDEP'
 -    YCOMMENT    = 'X_Y_INstantaneous Cloud Deposition Rate (MM/H)'
 -    IGRID       = 1
 -    ILENCH      = LEN(YCOMMENT)
 -    CALL FMWRIT(HFMFILE,YRECFM,CLUOUT,YDIR,ZWORK2D*3.6E6,IGRID,ILENCH, &
 -                                               YCOMMENT,IRESP) ! unit conversion
 -!
 -    ZWORK2D(:,:)  = XACDEP(:,:)
 -    YRECFM      = 'ACDEP'
 -    YCOMMENT    = 'X_Y_ACcumulated Cloud Deposition Rate (MM)'
 -    IGRID       = 1
 -    ILENCH      = LEN(YCOMMENT)
 -    CALL FMWRIT(HFMFILE,YRECFM,CLUOUT,YDIR,ZWORK2D*1.0E3,IGRID,ILENCH, &
 -                                                 YCOMMENT,IRESP) ! unit conversion
++    CALL FIND_FIELD_ID_FROM_MNHNAME('INDEP',IID,IRESP)
++    TZFIELD = TFIELDLIST(IID)
++    TZFIELD%CUNITS = 'mm hour-1'
++    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,XINDEP*3.6E6)
++!
++    CALL FIND_FIELD_ID_FROM_MNHNAME('ACDEP',IID,IRESP)
++    TZFIELD = TFIELDLIST(IID)
++    TZFIELD%CUNITS = 'mm'
++    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,XACDEP*1.0E3)
++!
    ENDIF
    ENDIF
  !
@@@ -1719,127 -2319,105 +1735,141 @@@ IF (LFORCING) THE
  !
      WRITE (YFRC,'(I3.3)') JT
  !
 -!
 -    YRECFM='DTFRC'//YFRC
 -    CALL FMWRIT(HFMFILE,YRECFM,CLUOUT,YDIR,TDTFRC(JT),IGRID,ILENCH, &
 -                                                            YCOMMENT,IRESP)
 -!
 -!
 -    YRECFM='UFRC'//YFRC
 -    YCOMMENT=' '
 -    IGRID=1
 -    ILENCH=LEN(YCOMMENT)
 -    CALL FMWRIT(HFMFILE,YRECFM,CLUOUT,YDIR,XUFRC(:,JT),IGRID,ILENCH,     &
 -                                                            YCOMMENT,IRESP)
 -!
 -!
 -    YRECFM='VFRC'//YFRC
 -    YCOMMENT=' '
 -    IGRID=1
 -    ILENCH=LEN(YCOMMENT)
 -    CALL FMWRIT(HFMFILE,YRECFM,CLUOUT,YDIR,XVFRC(:,JT),IGRID,ILENCH,     &
 -                                                            YCOMMENT,IRESP)
 -!
 -!
 -    YRECFM='WFRC'//YFRC
 -    YCOMMENT=' '
 -    IGRID=4
 -    ILENCH=LEN(YCOMMENT)
 -    CALL FMWRIT(HFMFILE,YRECFM,CLUOUT,YDIR,XWFRC(:,JT),IGRID,ILENCH,     &
 -                                                            YCOMMENT,IRESP)
 -!
 -!
 -    YRECFM='THFRC'//YFRC
 -    YCOMMENT=' '
 -    IGRID=1
 -    ILENCH=LEN(YCOMMENT)
 -    CALL FMWRIT(HFMFILE,YRECFM,CLUOUT,YDIR,XTHFRC(:,JT),IGRID,ILENCH,    &
 -                                                            YCOMMENT,IRESP)
 -!
 -!
 -    YRECFM='RVFRC'//YFRC
 -    YCOMMENT=' '
 -    IGRID=1
 -    ILENCH=LEN(YCOMMENT)
 -    CALL FMWRIT(HFMFILE,YRECFM,CLUOUT,YDIR,XRVFRC(:,JT),IGRID,ILENCH,    &
 -                                                            YCOMMENT,IRESP)
 -!
 -!
 -    YRECFM='TENDTHFRC'//YFRC
 -    YCOMMENT=' '
 -    IGRID=1
 -    ILENCH=LEN(YCOMMENT)
 -    CALL FMWRIT(HFMFILE,YRECFM,CLUOUT,YDIR,XTENDTHFRC(:,JT),IGRID,ILENCH,  &
 -                                                            YCOMMENT,IRESP)
 -!
 -!
 -    YRECFM='TENDRVFRC'//YFRC
 -    YCOMMENT=' '
 -    IGRID=1
 -    ILENCH=LEN(YCOMMENT)
 -    CALL FMWRIT(HFMFILE,YRECFM,CLUOUT,YDIR,XTENDRVFRC(:,JT),IGRID,ILENCH,  &
 -                                                            YCOMMENT,IRESP)
 -!
 -!
 -    YRECFM='GXTHFRC'//YFRC
 -    YCOMMENT=' '
 -    IGRID=1
 -    ILENCH=LEN(YCOMMENT)
 -    CALL FMWRIT(HFMFILE,YRECFM,CLUOUT,YDIR,XGXTHFRC(:,JT),IGRID,ILENCH,  &
 -                                                            YCOMMENT,IRESP)
 -!
 -!
 -    YRECFM='GYTHFRC'//YFRC
 -    YCOMMENT=' '
 -    IGRID=1
 -    ILENCH=LEN(YCOMMENT)
 -    CALL FMWRIT(HFMFILE,YRECFM,CLUOUT,YDIR,XGYTHFRC(:,JT),IGRID,ILENCH,  &
 -                                                            YCOMMENT,IRESP)
 -!
 -!
 -    YRECFM='PGROUNDFRC'//YFRC
 -    YCOMMENT=' '
 -    IGRID=0
 -    ILENCH=LEN(YCOMMENT)
 -    CALL FMWRIT(HFMFILE,YRECFM,CLUOUT,YDIR,XPGROUNDFRC(JT),IGRID,ILENCH,  &
 -                                                            YCOMMENT,IRESP)
 +    TZFIELD%CMNHNAME   = 'DTFRC'//YFRC
 +    TZFIELD%CSTDNAME   = ''
 +    TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
 +    TZFIELD%CUNITS     = 'seconds since YYYY-MM-DD HH:MM:SS.S'
 +    TZFIELD%CDIR       = '--'
 +    TZFIELD%CCOMMENT   = 'Date of forcing profile '//YFRC
 +    TZFIELD%NGRID      = 0
 +    TZFIELD%NTYPE      = TYPEDATE
 +    TZFIELD%NDIMS      = 0
 +    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,TDTFRC(JT))
 +!
 +    TZFIELD%CMNHNAME   = 'UFRC'//YFRC
 +    TZFIELD%CSTDNAME   = ''
 +    TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
 +    TZFIELD%CUNITS     = 'm s-1'
 +    TZFIELD%CDIR       = '--'
 +    TZFIELD%CCOMMENT   = 'Zonal component of horizontal forcing wind'
 +    TZFIELD%NGRID      = 1
 +    TZFIELD%NTYPE      = TYPEREAL
 +    TZFIELD%NDIMS      = 1
 +    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,XUFRC(:,JT))
 +!
 +    TZFIELD%CMNHNAME   = 'VFRC'//YFRC
 +    TZFIELD%CSTDNAME   = ''
 +    TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
 +    TZFIELD%CUNITS     = 'm s-1'
 +    TZFIELD%CDIR       = '--'
 +    TZFIELD%CCOMMENT   = 'Meridian component of horizontal forcing wind'
 +    TZFIELD%NGRID      = 1
 +    TZFIELD%NTYPE      = TYPEREAL
 +    TZFIELD%NDIMS      = 1
 +    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,XVFRC(:,JT))
 +!
 +    TZFIELD%CMNHNAME   = 'WFRC'//YFRC
 +    TZFIELD%CSTDNAME   = ''
 +    TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
 +    TZFIELD%CUNITS     = 'm s-1'
 +    TZFIELD%CDIR       = '--'
 +    TZFIELD%CCOMMENT   = 'Vertical forcing wind'
 +    TZFIELD%NGRID      = 4
 +    TZFIELD%NTYPE      = TYPEREAL
 +    TZFIELD%NDIMS      = 1
 +    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,XWFRC(:,JT))
 +!
 +    TZFIELD%CMNHNAME   = 'THFRC'//YFRC
 +    TZFIELD%CSTDNAME   = ''
 +    TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
 +    TZFIELD%CUNITS     = 'K'
 +    TZFIELD%CDIR       = '--'
 +    TZFIELD%CCOMMENT   = 'Forcing potential temperature'
 +    TZFIELD%NGRID      = 1
 +    TZFIELD%NTYPE      = TYPEREAL
 +    TZFIELD%NDIMS      = 1
 +    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,XTHFRC(:,JT))
 +!
 +    TZFIELD%CMNHNAME   = 'RVFRC'//YFRC
 +    TZFIELD%CSTDNAME   = ''
 +    TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
 +    TZFIELD%CUNITS     = 'kg kg-1'
 +    TZFIELD%CDIR       = '--'
 +    TZFIELD%CCOMMENT   = 'Forcing vapor mixing ratio'
 +    TZFIELD%NGRID      = 1
 +    TZFIELD%NTYPE      = TYPEREAL
 +    TZFIELD%NDIMS      = 1
 +    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,XRVFRC(:,JT))
 +!
 +    TZFIELD%CMNHNAME   = 'TENDTHFRC'//YFRC
 +    TZFIELD%CSTDNAME   = ''
 +    TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
 +    TZFIELD%CUNITS     = 'K s-1'
 +    TZFIELD%CDIR       = '--'
 +    TZFIELD%CCOMMENT   = 'Large-scale potential temperature tendency for forcing'
 +    TZFIELD%NGRID      = 1
 +    TZFIELD%NTYPE      = TYPEREAL
 +    TZFIELD%NDIMS      = 1
 +    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,XTENDTHFRC(:,JT))
 +!
 +    TZFIELD%CMNHNAME   = 'TENDRVFRC'//YFRC
 +    TZFIELD%CSTDNAME   = ''
 +    TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
 +    TZFIELD%CUNITS     = 'kg kg-1 s-1'
 +    TZFIELD%CDIR       = '--'
 +    TZFIELD%CCOMMENT   = 'Large-scale vapor mixing ratio tendency for forcing'
 +    TZFIELD%NGRID      = 1
 +    TZFIELD%NTYPE      = TYPEREAL
 +    TZFIELD%NDIMS      = 1
 +    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,XTENDRVFRC(:,JT))
 +!
 +    TZFIELD%CMNHNAME   = 'GXTHFRC'//YFRC
 +    TZFIELD%CSTDNAME   = ''
 +    TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
 +    TZFIELD%CUNITS     = 'K m-1'
 +    TZFIELD%CDIR       = '--'
 +    TZFIELD%CCOMMENT   = 'Large-scale potential temperature gradient for forcing'
 +    TZFIELD%NGRID      = 1
 +    TZFIELD%NTYPE      = TYPEREAL
 +    TZFIELD%NDIMS      = 1
 +    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,XGXTHFRC(:,JT))
 +!
 +    TZFIELD%CMNHNAME   = 'GYTHFRC'//YFRC
 +    TZFIELD%CSTDNAME   = ''
 +    TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
 +    TZFIELD%CUNITS     = 'K m-1'
 +    TZFIELD%CDIR       = '--'
 +    TZFIELD%CCOMMENT   = 'Large-scale potential temperature gradient for forcing'
 +    TZFIELD%NGRID      = 1
 +    TZFIELD%NTYPE      = TYPEREAL
 +    TZFIELD%NDIMS      = 1
 +    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,XGYTHFRC(:,JT))
 +!
 +    TZFIELD%CMNHNAME   = 'PGROUNDFRC'//YFRC
 +    TZFIELD%CSTDNAME   = ''
 +    TZFIELD%CLONGNAME  = 'MesoNH: '//TRIM(TZFIELD%CMNHNAME)
 +    TZFIELD%CUNITS     = 'Pa'
 +    TZFIELD%CDIR       = '--'
 +    TZFIELD%CCOMMENT   = 'Forcing ground pressure'
 +    TZFIELD%NGRID      = 1
 +    TZFIELD%NTYPE      = TYPEREAL
 +    TZFIELD%NDIMS      = 0
 +    CALL IO_WRITE_FIELD(TPFILE,TZFIELD,XPGROUNDFRC(JT))
  !
+     YRECFM='TENDUFRC'//YFRC
+     YCOMMENT=' '
+     IGRID=1
+     ILENCH=LEN(YCOMMENT)
+     CALL FMWRIT(HFMFILE,YRECFM,CLUOUT,YDIR,XTENDUFRC(:,JT),IGRID,ILENCH,  &
+                                                             YCOMMENT,IRESP)
+     YRECFM='TENDVFRC'//YFRC
+     YCOMMENT=' '
+     IGRID=1
+     ILENCH=LEN(YCOMMENT)
+     CALL FMWRIT(HFMFILE,YRECFM,CLUOUT,YDIR,XTENDVFRC(:,JT),IGRID,ILENCH,  &
+                                                             YCOMMENT,IRESP)
+ !
    END DO
  !
  !
@@@ -611,9 -666,8 +669,8 @@@ END I
  ALLOCATE (ZW6(1,1,1,SIZE(TSTATION%TIME),1,JPROC))
  ZW6 = ZWORK6(:,:,:,:,:,:JPROC)
  DEALLOCATE(ZWORK6)
  !
 -  CALL WRITE_DIACHRO(HFMDIAC,CLUOUT0,YGROUP,"CART",IGRID, TSTATION%DATIME,&
 +  CALL WRITE_DIACHRO(TPDIAFILE,CLUOUT0,YGROUP,"CART",IGRID, TSTATION%DATIME,&
                       ZW6,ZTRAJT,YTITLE,YUNIT,YCOMMENT,&
                       .TRUE.,.TRUE.,.FALSE.,                             &
                       KIL=1,KIH=1,KJL=1,KJH=1,KKL=1,KKH=1   )
diff --cc src/Makefile
Simple merge
Simple merge
- !SFX_LIC Copyright 1994-2014 CNRS, Meteo-France and Universite Paul Sabatier\r
- !SFX_LIC This is part of the SURFEX software governed by the CeCILL-C licence\r
- !SFX_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt  \r
- !SFX_LIC for details. version 1.\r
- !     #########\r
-       SUBROUTINE ZOOM_PGD_COVER (DTCO, UG, U,GCP, &\r
-                                  HPROGRAM,HINIFILE,HINIFILETYPE,OECOCLIMAP)\r
- !     ###########################################################\r
\r
- !!\r
- !!    PURPOSE\r
- !!    -------\r
- !!   This program prepares the physiographic data fields.\r
- !!\r
- !!    METHOD\r
- !!    ------\r
- !!   \r
- !!    EXTERNAL\r
- !!    --------\r
- !!\r
- !!\r
- !!    IMPLICIT ARGUMENTS\r
- !!    ------------------\r
- !!\r
- !!\r
- !!    REFERENCE\r
- !!    ---------\r
- !!\r
- !!    AUTHOR\r
- !!    ------\r
- !!\r
- !!    V. Masson                   Meteo-France\r
- !!\r
- !!    MODIFICATION\r
- !!    ------------\r
- !!\r
- !!    Original     13/10/03\r
- !     Modification 17/04/12 M.Tomasini All COVER physiographic fields are now \r
- !!                                     interpolated for spawning => \r
- !!                                     ABOR1_SFX if (.NOT.OECOCLIMAP) in comment\r
- !     Modification 05/02/15 M.Moge : use NSIZE_FULL instead of SIZE(XLAT) (for clarity)\r
- !!      J.Escobar 18/12/2015 : missing interface\r
- !----------------------------------------------------------------------------\r
- !\r
- !*    0.     DECLARATION\r
- !            -----------\r
- !\r
- !\r
- !\r
- !\r
- USE MODD_DATA_COVER_n, ONLY : DATA_COVER_t\r
- USE MODD_SURF_ATM_GRID_n, ONLY : SURF_ATM_GRID_t\r
- USE MODD_SURF_ATM_n, ONLY : SURF_ATM_t\r
- USE MODD_GRID_CONF_PROJ, ONLY : GRID_CONF_PROJ_t\r
- !\r
- USE MODD_SURF_PAR, ONLY : XUNDEF\r
- USE MODD_DATA_COVER_PAR,   ONLY : JPCOVER\r
- USE MODD_PREP,             ONLY : CINGRID_TYPE, CINTERP_TYPE\r
- !\r
- USE MODE_READ_SURF_COV, ONLY : READ_SURF_COV\r
- !\r
- USE MODI_CONVERT_COVER_FRAC\r
- USE MODI_OPEN_AUX_IO_SURF\r
- USE MODI_READ_SURF\r
- USE MODI_CLOSE_AUX_IO_SURF\r
- USE MODI_PREP_GRID_EXTERN\r
- USE MODI_HOR_INTERPOL\r
- USE MODI_HOR_INTERPOL_1COV\r
- USE MODI_PREP_OUTPUT_GRID\r
- USE MODI_OLD_NAME\r
- USE MODI_SUM_ON_ALL_PROCS\r
- USE MODI_GET_LUOUT\r
- USE MODI_CLEAN_PREP_OUTPUT_GRID\r
- USE MODI_GET_1D_MASK\r
- USE MODI_READ_LCOVER\r
- #ifdef SFX_MNH\r
- USE MODI_READ_SURFX2COV_1COV_MNH\r
- #endif\r
- !\r
- USE YOMHOOK   ,ONLY : LHOOK,   DR_HOOK\r
- USE PARKIND1  ,ONLY : JPRB\r
- !\r
- IMPLICIT NONE\r
- !\r
- !*    0.1    Declaration of dummy arguments\r
- !            ------------------------------\r
- !\r
- !\r
- TYPE(DATA_COVER_t), INTENT(INOUT) :: DTCO\r
- TYPE(SURF_ATM_GRID_t), INTENT(INOUT) :: UG\r
- TYPE(SURF_ATM_t), INTENT(INOUT) :: U\r
- TYPE(GRID_CONF_PROJ_t),INTENT(INOUT) :: GCP\r
- !\r
-  CHARACTER(LEN=6),     INTENT(IN)  :: HPROGRAM    ! program calling\r
-  CHARACTER(LEN=28),    INTENT(IN)  :: HINIFILE    ! input atmospheric file name\r
-  CHARACTER(LEN=6),     INTENT(IN)  :: HINIFILETYPE! input atmospheric file type\r
- LOGICAL,              INTENT(OUT) :: OECOCLIMAP  ! flag to use ecoclimap\r
- !\r
- !\r
- !*    0.2    Declaration of local variables\r
- !            ------------------------------\r
- !\r
- INTEGER :: ICPT1, ICPT2\r
- INTEGER :: IRESP\r
- INTEGER :: ILUOUT\r
- INTEGER :: INI     ! total 1D dimension (input grid)\r
- INTEGER :: IL      ! total 1D dimension (output grid)\r
- INTEGER :: JCOVER  ! loop counter\r
- INTEGER :: IVERSION       ! surface version\r
- #ifdef MNH_PARALLEL\r
- REAL, DIMENSION(:), POINTER     :: ZCOVER1D\r
- #endif\r
- REAL, DIMENSION(:,:), POINTER     :: ZCOVER\r
- REAL, DIMENSION(:,:), POINTER :: ZSEA1, ZWATER1, ZNATURE1, ZTOWN1\r
- REAL, DIMENSION(:,:), POINTER :: ZSEA2, ZWATER2, ZNATURE2, ZTOWN2\r
- REAL, DIMENSION(:),   ALLOCATABLE :: ZSUM\r
-  CHARACTER(LEN=LEN_HREC) :: YRECFM         ! Name of the article to be read\r
-  CHARACTER(LEN=100) :: YCOMMENT\r
- REAL(KIND=JPRB) :: ZHOOK_HANDLE\r
- !------------------------------------------------------------------------------\r
- IF (LHOOK) CALL DR_HOOK('ZOOM_PGD_COVER',0,ZHOOK_HANDLE)\r
-  CALL GET_LUOUT(HPROGRAM,ILUOUT)\r
- !\r
- !*      1.     Preparation of IO for reading in the file\r
- !              -----------------------------------------\r
- !\r
- !* Note that all points are read, even those without physical meaning.\r
- !  These points will not be used during the horizontal interpolation step.\r
- !  Their value must be defined as XUNDEF.\r
- !\r
-  CALL OPEN_AUX_IO_SURF(&\r
-                        HINIFILE,HINIFILETYPE,'FULL  ')\r
- !\r
-  CALL READ_SURF(&\r
-                 HPROGRAM,'ECOCLIMAP',OECOCLIMAP,IRESP)\r
- !\r
- !------------------------------------------------------------------------------\r
- !\r
- !*      2.     Reading of grid\r
- !              ---------------\r
- !\r
-  CALL PREP_GRID_EXTERN(GCP,&\r
-                        HINIFILETYPE,ILUOUT,CINGRID_TYPE,CINTERP_TYPE,INI)\r
- !\r
-  CALL PREP_OUTPUT_GRID(UG, U, &\r
-                        ILUOUT,UG%CGRID,UG%XGRID_PAR,UG%XLAT,UG%XLON)\r
- !\r
- !------------------------------------------------------------------------------\r
- !\r
- !*      3.     Reading of cover\r
- !              ----------------\r
- !\r
- YRECFM='VERSION'\r
-  CALL READ_SURF(&\r
-                 HPROGRAM,YRECFM,IVERSION,IRESP)\r
- !\r
- ALLOCATE(U%LCOVER(JPCOVER))\r
- !\r
- ALLOCATE(ZSEA1   (INI,1))\r
- ALLOCATE(ZNATURE1(INI,1))\r
- ALLOCATE(ZWATER1 (INI,1))\r
- ALLOCATE(ZTOWN1  (INI,1))\r
- !\r
- IF (IVERSION>=7) THEN\r
-   CALL READ_SURF(&\r
-                 HPROGRAM,'FRAC_SEA   ',ZSEA1(:,1),   IRESP,HDIR='A')\r
-   CALL READ_SURF(&\r
-                 HPROGRAM,'FRAC_NATURE',ZNATURE1(:,1),IRESP,HDIR='A')\r
-   CALL READ_SURF(&\r
-                 HPROGRAM,'FRAC_WATER ',ZWATER1(:,1), IRESP,HDIR='A')\r
-   CALL READ_SURF(&\r
-                 HPROGRAM,'FRAC_TOWN  ',ZTOWN1(:,1),  IRESP,HDIR='A')\r
-   CALL OLD_NAME(&\r
-                 HPROGRAM,'COVER_LIST      ',YRECFM)\r
-   CALL READ_LCOVER(HPROGRAM,U%LCOVER)       \r
- #ifdef MNH_PARALLEL\r
-   ALLOCATE(ZCOVER1D(INI))\r
- #else\r
-   ALLOCATE(ZCOVER(INI,COUNT(U%LCOVER)))\r
-  CALL READ_SURF_COV(&\r
-                     HPROGRAM,YRECFM,ZCOVER(:,:),U%LCOVER,IRESP,HDIR='A')\r
-   \r
- #endif\r
-       \r
-   !\r
- ELSE\r
- #ifdef MNH_PARALLEL\r
-   ! we assume that IVERSION>=7\r
- #else\r
-  CALL OLD_NAME(&\r
-                HPROGRAM,'COVER_LIST      ',YRECFM)\r
-  CALL READ_LCOVER(HPROGRAM,U%LCOVER) \r
-  !\r
-  ALLOCATE(ZCOVER(INI,COUNT(U%LCOVER)))\r
-  CALL READ_SURF_COV(&\r
-                     HPROGRAM,YRECFM,ZCOVER(:,:),U%LCOVER,IRESP,HDIR='A')\r
\r
-         \r
-   CALL CONVERT_COVER_FRAC(DTCO, &\r
-                           ZCOVER,U%LCOVER,ZSEA1(:,1),ZNATURE1(:,1),ZTOWN1(:,1),ZWATER1(:,1))\r
- #endif                  \r
- ENDIF\r
- !\r
- ! CALL CLOSE_AUX_IO_SURF(HINIFILE,HINIFILETYPE)\r
- !------------------------------------------------------------------------------\r
- !\r
- !*      4.     Reading of cover & Interpolations\r
- !              --------------\r
- !\r
- IL = U%NSIZE_FULL\r
- ALLOCATE(U%XCOVER(IL,COUNT(U%LCOVER)))\r
- !\r
- ! on lit les cover une apres l'autre, et on appelle hor_interpol sur chaque cover separement\r
- !\r
- #ifdef MNH_PARALLEL\r
- IF ( HPROGRAM == 'MESONH' ) THEN\r
-   ICPT1 = 0\r
-   DO JCOVER=1,JPCOVER\r
-     IF ( U%LCOVER( JCOVER ) ) THEN\r
-       ICPT1 = ICPT1 + 1\r
-       CALL READ_SURFX2COV_1COV_MNH(YRECFM,INI,JCOVER,ZCOVER1D(:),IRESP,YCOMMENT,'A')\r
-       CALL HOR_INTERPOL_1COV(DTCO, U,GCP,ILUOUT,ZCOVER1D,U%XCOVER(:,ICPT1))\r
-     ENDIF\r
-     !\r
-   ENDDO \r
- ENDIF\r
- DEALLOCATE(ZCOVER1D)\r
- #else\r
-  CALL HOR_INTERPOL(DTCO, U,GCP, &\r
-                    ILUOUT,ZCOVER,U%XCOVER)\r
-  DEALLOCATE(ZCOVER)           \r
- #endif           \r
- !\r
- ALLOCATE(ZCOVER(IL,COUNT(U%LCOVER)))\r
- ICPT1 = 0\r
- ICPT2 = 0\r
- DO JCOVER = 1,JPCOVER\r
-   IF (U%LCOVER(JCOVER)) THEN\r
-     ICPT1 = ICPT1 + 1\r
-     IF (ALL(U%XCOVER(:,ICPT1)==0.)) THEN\r
-       U%LCOVER(JCOVER) = .FALSE.\r
-     ELSE\r
-       ICPT2 = ICPT2 + 1\r
-       ZCOVER(:,ICPT2) = U%XCOVER(:,ICPT1)\r
-     ENDIF\r
-   ENDIF\r
- ENDDO\r
- !\r
- DEALLOCATE(U%XCOVER)\r
- ALLOCATE(U%XCOVER(IL,ICPT2))\r
- U%XCOVER(:,:) = ZCOVER(:,1:ICPT2)\r
- DEALLOCATE(ZCOVER)\r
- !\r
- CALL CLOSE_AUX_IO_SURF(HINIFILE,HINIFILETYPE)\r
- ALLOCATE(ZSEA2  (IL,1))\r
- ALLOCATE(ZNATURE2(IL,1))\r
- ALLOCATE(ZWATER2 (IL,1))\r
- ALLOCATE(ZTOWN2  (IL,1))\r
- !\r
-  CALL HOR_INTERPOL(DTCO, U,GCP, &\r
-                    ILUOUT,ZSEA1,ZSEA2)\r
-  CALL HOR_INTERPOL(DTCO, U,GCP, &\r
-                    ILUOUT,ZNATURE1,ZNATURE2)\r
-  CALL HOR_INTERPOL(DTCO, U,GCP, &\r
-                    ILUOUT,ZWATER1,ZWATER2)\r
-  CALL HOR_INTERPOL(DTCO, U,GCP, &\r
-                    ILUOUT,ZTOWN1,ZTOWN2)\r
- !\r
- DEALLOCATE(ZSEA1)\r
- DEALLOCATE(ZNATURE1)\r
- DEALLOCATE(ZWATER1)\r
- DEALLOCATE(ZTOWN1)\r
- !\r
- ALLOCATE(U%XSEA   (IL))\r
- ALLOCATE(U%XNATURE(IL))\r
- ALLOCATE(U%XWATER (IL))\r
- ALLOCATE(U%XTOWN  (IL))\r
- !\r
- U%XSEA(:)   = ZSEA2   (:,1)\r
- U%XNATURE(:)= ZNATURE2(:,1)\r
- U%XWATER(:) = ZWATER2 (:,1)\r
- U%XTOWN(:)  = ZTOWN2  (:,1)\r
- !\r
- DEALLOCATE(ZSEA2)\r
- DEALLOCATE(ZNATURE2)\r
- DEALLOCATE(ZWATER2)\r
- DEALLOCATE(ZTOWN2)\r
- !\r
-  CALL CLEAN_PREP_OUTPUT_GRID\r
- !------------------------------------------------------------------------------\r
- !\r
- !*      5.     Coherence check\r
- !              ---------------\r
- ! \r
- ALLOCATE(ZSUM(IL))\r
- ZSUM = 0.\r
- DO JCOVER=1,SIZE(U%XCOVER,2)\r
-   ZSUM(:) = ZSUM(:) + U%XCOVER(:,JCOVER)\r
- END DO\r
- !\r
- DO JCOVER=1,SIZE(U%XCOVER,2)\r
-   WHERE(ZSUM(:)/=0.)  U%XCOVER(:,JCOVER) = U%XCOVER(:,JCOVER)/ZSUM(:)\r
- END DO\r
- !\r
- DO JCOVER=1,SIZE(U%XCOVER,2)\r
-   IF (ALL(U%XCOVER(:,JCOVER)==0.)) U%LCOVER(JCOVER) = .FALSE.\r
- END DO\r
- !------------------------------------------------------------------------------\r
- !\r
- !*      6.     Fractions\r
- !              ---------\r
- !\r
- ! When the model runs in multiproc, NSIZE* represents the number of points\r
- ! on a proc, and NDIM* the total number of points on all procs.\r
- ! The following definition of NDIM* won't be correct any more when the PGD\r
- ! runs in multiproc.\r
- !\r
- U%NSIZE_NATURE    = COUNT(U%XNATURE(:) > 0.0)\r
- U%NSIZE_WATER     = COUNT(U%XWATER (:) > 0.0)\r
- U%NSIZE_SEA       = COUNT(U%XSEA   (:) > 0.0)\r
- U%NSIZE_TOWN      = COUNT(U%XTOWN  (:) > 0.0)\r
- U%NSIZE_FULL      = IL\r
- !\r
- U%NDIM_NATURE    = SUM_ON_ALL_PROCS(HPROGRAM,UG%CGRID,U%XNATURE(:) > 0., 'DIM')\r
- U%NDIM_WATER     = SUM_ON_ALL_PROCS(HPROGRAM,UG%CGRID,U%XWATER (:) > 0., 'DIM')\r
- U%NDIM_SEA       = SUM_ON_ALL_PROCS(HPROGRAM,UG%CGRID,U%XSEA   (:) > 0., 'DIM')\r
- U%NDIM_TOWN      = SUM_ON_ALL_PROCS(HPROGRAM,UG%CGRID,U%XTOWN  (:) > 0., 'DIM')\r
- ZSUM=1.\r
- U%NDIM_FULL      = SUM_ON_ALL_PROCS(HPROGRAM,UG%CGRID,ZSUM   (:) ==1., 'DIM')\r
- DEALLOCATE(ZSUM)\r
- !\r
- ALLOCATE(U%NR_NATURE (U%NSIZE_NATURE))\r
- ALLOCATE(U%NR_TOWN   (U%NSIZE_TOWN  ))\r
- ALLOCATE(U%NR_WATER  (U%NSIZE_WATER ))\r
- ALLOCATE(U%NR_SEA    (U%NSIZE_SEA   ))\r
- !\r
- IF (U%NSIZE_SEA   >0)CALL GET_1D_MASK( U%NSIZE_SEA,    U%NSIZE_FULL, U%XSEA   , U%NR_SEA   )\r
- IF (U%NSIZE_WATER >0)CALL GET_1D_MASK( U%NSIZE_WATER,  U%NSIZE_FULL, U%XWATER , U%NR_WATER )\r
- IF (U%NSIZE_TOWN  >0)CALL GET_1D_MASK( U%NSIZE_TOWN,   U%NSIZE_FULL, U%XTOWN  , U%NR_TOWN  )\r
- IF (U%NSIZE_NATURE>0)CALL GET_1D_MASK( U%NSIZE_NATURE, U%NSIZE_FULL, U%XNATURE, U%NR_NATURE)\r
- IF (LHOOK) CALL DR_HOOK('ZOOM_PGD_COVER',1,ZHOOK_HANDLE)\r
\r
- !_______________________________________________________________________________\r
- !\r
- END SUBROUTINE ZOOM_PGD_COVER\r
+ !SFX_LIC Copyright 1994-2014 CNRS, Meteo-France and Universite Paul Sabatier
+ !SFX_LIC This is part of the SURFEX software governed by the CeCILL-C licence
+ !SFX_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt  
+ !SFX_LIC for details. version 1.
+ !     #########
+       SUBROUTINE ZOOM_PGD_COVER (DTCO, UG, U,GCP, &
+                                  HPROGRAM,HINIFILE,HINIFILETYPE,OECOCLIMAP)
+ !     ###########################################################
+ !!
+ !!    PURPOSE
+ !!    -------
+ !!   This program prepares the physiographic data fields.
+ !!
+ !!    METHOD
+ !!    ------
+ !!   
+ !!    EXTERNAL
+ !!    --------
+ !!
+ !!
+ !!    IMPLICIT ARGUMENTS
+ !!    ------------------
+ !!
+ !!
+ !!    REFERENCE
+ !!    ---------
+ !!
+ !!    AUTHOR
+ !!    ------
+ !!
+ !!    V. Masson                   Meteo-France
+ !!
+ !!    MODIFICATION
+ !!    ------------
+ !!
+ !!    Original     13/10/03
+ !     Modification 17/04/12 M.Tomasini All COVER physiographic fields are now 
+ !!                                     interpolated for spawning => 
+ !!                                     ABOR1_SFX if (.NOT.OECOCLIMAP) in comment
+ !     Modification 05/02/15 M.Moge : MPPDB_CHECK + use NSIZE_FULL instead of SIZE(XLAT) (for clarity)
+ !!      J.Escobar 18/12/2015 : missing interface
 -!!      J.Escobar 12/06/2015 : Bug in SPAWNING in // , compute/update LCOVER in // with SUM_ON_ALL_PROCS
++!!      J.Escobar 12/06/2017 : Bug in SPAWNING in // , compute/update LCOVER in // with SUM_ON_ALL_PROCS
+ !----------------------------------------------------------------------------
+ !
+ !*    0.     DECLARATION
+ !            -----------
+ !
+ !
+ !
+ !
+ USE MODD_DATA_COVER_n, ONLY : DATA_COVER_t
+ USE MODD_SURF_ATM_GRID_n, ONLY : SURF_ATM_GRID_t
+ USE MODD_SURF_ATM_n, ONLY : SURF_ATM_t
+ USE MODD_GRID_CONF_PROJ, ONLY : GRID_CONF_PROJ_t
+ !
+ USE MODD_SURF_PAR, ONLY : XUNDEF
+ USE MODD_DATA_COVER_PAR,   ONLY : JPCOVER
+ USE MODD_PREP,             ONLY : CINGRID_TYPE, CINTERP_TYPE
+ !
+ USE MODE_READ_SURF_COV, ONLY : READ_SURF_COV
+ !
+ USE MODI_CONVERT_COVER_FRAC
+ USE MODI_OPEN_AUX_IO_SURF
+ USE MODI_READ_SURF
+ USE MODI_CLOSE_AUX_IO_SURF
+ USE MODI_PREP_GRID_EXTERN
+ USE MODI_HOR_INTERPOL
+ USE MODI_HOR_INTERPOL_1COV
+ USE MODI_PREP_OUTPUT_GRID
+ USE MODI_OLD_NAME
+ USE MODI_SUM_ON_ALL_PROCS
+ USE MODI_GET_LUOUT
+ USE MODI_CLEAN_PREP_OUTPUT_GRID
+ USE MODI_GET_1D_MASK
+ USE MODI_READ_LCOVER
+ #ifdef SFX_MNH
+ USE MODI_READ_SURFX2COV_1COV_MNH
+ #endif
+ !
+ USE YOMHOOK   ,ONLY : LHOOK,   DR_HOOK
+ USE PARKIND1  ,ONLY : JPRB
+ !
+ #ifdef MNH_PARALLEL
+ USE MODE_MPPDB
+ !
+ #endif
+ IMPLICIT NONE
+ !
+ !*    0.1    Declaration of dummy arguments
+ !            ------------------------------
+ !
+ !
+ TYPE(DATA_COVER_t), INTENT(INOUT) :: DTCO
+ TYPE(SURF_ATM_GRID_t), INTENT(INOUT) :: UG
+ TYPE(SURF_ATM_t), INTENT(INOUT) :: U
+ TYPE(GRID_CONF_PROJ_t),INTENT(INOUT) :: GCP
+ !
+  CHARACTER(LEN=6),     INTENT(IN)  :: HPROGRAM    ! program calling
+  CHARACTER(LEN=28),    INTENT(IN)  :: HINIFILE    ! input atmospheric file name
+  CHARACTER(LEN=6),     INTENT(IN)  :: HINIFILETYPE! input atmospheric file type
+ LOGICAL,              INTENT(OUT) :: OECOCLIMAP  ! flag to use ecoclimap
+ !
+ !
+ !*    0.2    Declaration of local variables
+ !            ------------------------------
+ !
+ INTEGER :: ICPT1, ICPT2
+ INTEGER :: IRESP
+ INTEGER :: ILUOUT
+ INTEGER :: INI     ! total 1D dimension (input grid)
+ INTEGER :: IL      ! total 1D dimension (output grid)
+ INTEGER :: JCOVER  ! loop counter
+ INTEGER :: IVERSION       ! surface version
+ #ifdef MNH_PARALLEL
+ REAL, DIMENSION(:), POINTER     :: ZCOVER1D
+ #endif
+ REAL, DIMENSION(:,:), POINTER     :: ZCOVER
+ REAL, DIMENSION(:,:), POINTER :: ZSEA1, ZWATER1, ZNATURE1, ZTOWN1
+ REAL, DIMENSION(:,:), POINTER :: ZSEA2, ZWATER2, ZNATURE2, ZTOWN2
+ REAL, DIMENSION(:),   ALLOCATABLE :: ZSUM
 - CHARACTER(LEN=LEN_HREC) :: YRECFM         ! Name of the article to be read\r
++ CHARACTER(LEN=LEN_HREC) :: YRECFM         ! Name of the article to be read
+  CHARACTER(LEN=100) :: YCOMMENT
+ REAL(KIND=JPRB) :: ZHOOK_HANDLE
+ !------------------------------------------------------------------------------
+ IF (LHOOK) CALL DR_HOOK('ZOOM_PGD_COVER',0,ZHOOK_HANDLE)
+  CALL GET_LUOUT(HPROGRAM,ILUOUT)
+ !
+ !*      1.     Preparation of IO for reading in the file
+ !              -----------------------------------------
+ !
+ !* Note that all points are read, even those without physical meaning.
+ !  These points will not be used during the horizontal interpolation step.
+ !  Their value must be defined as XUNDEF.
+ !
+  CALL OPEN_AUX_IO_SURF(&
+                        HINIFILE,HINIFILETYPE,'FULL  ')
+ !
+  CALL READ_SURF(&
+                 HPROGRAM,'ECOCLIMAP',OECOCLIMAP,IRESP)
+ !
+ !------------------------------------------------------------------------------
+ !
+ !*      2.     Reading of grid
+ !              ---------------
+ !
+  CALL PREP_GRID_EXTERN(GCP,&
+                        HINIFILETYPE,ILUOUT,CINGRID_TYPE,CINTERP_TYPE,INI)
+ !
+  CALL PREP_OUTPUT_GRID(UG, U, &
+                        ILUOUT,UG%CGRID,UG%XGRID_PAR,UG%XLAT,UG%XLON)
+ #ifdef MNH_PARALLEL
+  CALL MPPDB_CHECK_SURFEX2D(UG%XLAT,"ZOOM_PGD_COVER:XLAT",PRECISION,ILUOUT)
+  CALL MPPDB_CHECK_SURFEX2D(UG%XLON,"ZOOM_PGD_COVER:XLON",PRECISION,ILUOUT)
+ #endif
+ !
+ !------------------------------------------------------------------------------
+ !
+ !*      3.     Reading of cover
+ !              ----------------
+ !
+ YRECFM='VERSION'
+  CALL READ_SURF(&
+                 HPROGRAM,YRECFM,IVERSION,IRESP)
+ !
+ ALLOCATE(U%LCOVER(JPCOVER))
+ !
+ ALLOCATE(ZSEA1   (INI,1))
+ ALLOCATE(ZNATURE1(INI,1))
+ ALLOCATE(ZWATER1 (INI,1))
+ ALLOCATE(ZTOWN1  (INI,1))
+ !
+ IF (IVERSION>=7) THEN
+   CALL READ_SURF(&
+                 HPROGRAM,'FRAC_SEA   ',ZSEA1(:,1),   IRESP,HDIR='A')
+   CALL READ_SURF(&
+                 HPROGRAM,'FRAC_NATURE',ZNATURE1(:,1),IRESP,HDIR='A')
+   CALL READ_SURF(&
+                 HPROGRAM,'FRAC_WATER ',ZWATER1(:,1), IRESP,HDIR='A')
+   CALL READ_SURF(&
+                 HPROGRAM,'FRAC_TOWN  ',ZTOWN1(:,1),  IRESP,HDIR='A')
+   CALL OLD_NAME(&
+                 HPROGRAM,'COVER_LIST      ',YRECFM)
+   CALL READ_LCOVER(HPROGRAM,U%LCOVER)       
+ #ifdef MNH_PARALLEL
+   ALLOCATE(ZCOVER1D(INI))
+ #else
+   ALLOCATE(ZCOVER(INI,COUNT(U%LCOVER)))
+  CALL READ_SURF_COV(&
+                     HPROGRAM,YRECFM,ZCOVER(:,:),U%LCOVER,IRESP,HDIR='A')
+   
+ #endif
+       
+   !
+ ELSE
+ #ifdef MNH_PARALLEL
+   ! we assume that IVERSION>=7
+ #else
+  CALL OLD_NAME(&
+                HPROGRAM,'COVER_LIST      ',YRECFM)
+  CALL READ_LCOVER(HPROGRAM,U%LCOVER) 
+  !
+  ALLOCATE(ZCOVER(INI,COUNT(U%LCOVER)))
+  CALL READ_SURF_COV(&
+                     HPROGRAM,YRECFM,ZCOVER(:,:),U%LCOVER,IRESP,HDIR='A')
+         
+   CALL CONVERT_COVER_FRAC(DTCO, &
+                           ZCOVER,U%LCOVER,ZSEA1(:,1),ZNATURE1(:,1),ZTOWN1(:,1),ZWATER1(:,1))
+ #endif                  
+ ENDIF
+ !
+ ! CALL CLOSE_AUX_IO_SURF(HINIFILE,HINIFILETYPE)
+ !------------------------------------------------------------------------------
+ !
+ !*      4.     Reading of cover & Interpolations
+ !              --------------
+ !
+ IL = U%NSIZE_FULL
+ ALLOCATE(U%XCOVER(IL,COUNT(U%LCOVER)))
+ !
+ ! on lit les cover une apres l'autre, et on appelle hor_interpol sur chaque cover separement
+ !
+ #ifdef MNH_PARALLEL
+ IF ( HPROGRAM == 'MESONH' ) THEN
+   ICPT1 = 0
+   DO JCOVER=1,JPCOVER
+     IF ( U%LCOVER( JCOVER ) ) THEN
+       ICPT1 = ICPT1 + 1
+       CALL READ_SURFX2COV_1COV_MNH(YRECFM,INI,JCOVER,ZCOVER1D(:),IRESP,YCOMMENT,'A')
+       CALL HOR_INTERPOL_1COV(DTCO, U,GCP,ILUOUT,ZCOVER1D,U%XCOVER(:,ICPT1))
+     ENDIF
+     !
+   ENDDO 
+   CALL MPPDB_CHECK_SURFEX3D(U%XCOVER,"ZOOM_PGD_COVER:XCOVER",PRECISION,ILUOUT,'FULL',SIZE(U%XCOVER,2))
+ ENDIF
+ DEALLOCATE(ZCOVER1D)
+ #else
+  CALL HOR_INTERPOL(DTCO, U,GCP, &
+                    ILUOUT,ZCOVER,U%XCOVER)
+  DEALLOCATE(ZCOVER)           
+ #endif           
+ !
+ ALLOCATE(ZCOVER(IL,COUNT(U%LCOVER)))
+ ICPT1 = 0
+ ICPT2 = 0
+ DO JCOVER = 1,JPCOVER
+   IF (U%LCOVER(JCOVER)) THEN
+     ICPT1 = ICPT1 + 1
+     IF ( SUM_ON_ALL_PROCS(HPROGRAM,UG%CGRID,U%XCOVER(:,ICPT1)/=0., 'COV') == 0 ) THEN
+       U%LCOVER(JCOVER) = .FALSE.
+     ELSE
+       ICPT2 = ICPT2 + 1
+       ZCOVER(:,ICPT2) = U%XCOVER(:,ICPT1)
+     ENDIF
+   ENDIF
+ ENDDO
+ !
+ DEALLOCATE(U%XCOVER)
+ ALLOCATE(U%XCOVER(IL,ICPT2))
+ U%XCOVER(:,:) = ZCOVER(:,1:ICPT2)
+ DEALLOCATE(ZCOVER)
+ !
+ CALL CLOSE_AUX_IO_SURF(HINIFILE,HINIFILETYPE)
+ ALLOCATE(ZSEA2  (IL,1))
+ ALLOCATE(ZNATURE2(IL,1))
+ ALLOCATE(ZWATER2 (IL,1))
+ ALLOCATE(ZTOWN2  (IL,1))
+ !
+  CALL HOR_INTERPOL(DTCO, U,GCP, &
+                    ILUOUT,ZSEA1,ZSEA2)
+  CALL HOR_INTERPOL(DTCO, U,GCP, &
+                    ILUOUT,ZNATURE1,ZNATURE2)
+  CALL HOR_INTERPOL(DTCO, U,GCP, &
+                    ILUOUT,ZWATER1,ZWATER2)
+  CALL HOR_INTERPOL(DTCO, U,GCP, &
+                    ILUOUT,ZTOWN1,ZTOWN2)
+ !
+ DEALLOCATE(ZSEA1)
+ DEALLOCATE(ZNATURE1)
+ DEALLOCATE(ZWATER1)
+ DEALLOCATE(ZTOWN1)
+ !
+ ALLOCATE(U%XSEA   (IL))
+ ALLOCATE(U%XNATURE(IL))
+ ALLOCATE(U%XWATER (IL))
+ ALLOCATE(U%XTOWN  (IL))
+ !
+ U%XSEA(:)   = ZSEA2   (:,1)
+ U%XNATURE(:)= ZNATURE2(:,1)
+ U%XWATER(:) = ZWATER2 (:,1)
+ U%XTOWN(:)  = ZTOWN2  (:,1)
+ !
+ DEALLOCATE(ZSEA2)
+ DEALLOCATE(ZNATURE2)
+ DEALLOCATE(ZWATER2)
+ DEALLOCATE(ZTOWN2)
+ !
+  CALL CLEAN_PREP_OUTPUT_GRID
+ !------------------------------------------------------------------------------
+ !
+ !*      5.     Coherence check
+ !              ---------------
+ ! 
+ ALLOCATE(ZSUM(IL))
+ ZSUM = 0.
+ DO JCOVER=1,SIZE(U%XCOVER,2)
+   ZSUM(:) = ZSUM(:) + U%XCOVER(:,JCOVER)
+ END DO
+ #ifdef MNH_PARALLEL
+ CALL MPPDB_CHECK_SURFEX2D(ZSUM,"ZOOM_PGD_COVER:ZSUM",PRECISION,ILUOUT)
+ #endif
+ !
+ DO JCOVER=1,SIZE(U%XCOVER,2)
+   WHERE(ZSUM(:)/=0.)  U%XCOVER(:,JCOVER) = U%XCOVER(:,JCOVER)/ZSUM(:)
+ END DO
+ !
+ DO JCOVER=1,SIZE(U%XCOVER,2)
+    IF ( SUM_ON_ALL_PROCS(HPROGRAM,UG%CGRID,U%XCOVER(:,JCOVER)/=0., 'COV') == 0 ) THEN
+       U%LCOVER(JCOVER) = .FALSE.
+    END IF
+ END DO
+ !------------------------------------------------------------------------------
+ !
+ !*      6.     Fractions
+ !              ---------
+ !
+ ! When the model runs in multiproc, NSIZE* represents the number of points
+ ! on a proc, and NDIM* the total number of points on all procs.
+ ! The following definition of NDIM* won't be correct any more when the PGD
+ ! runs in multiproc.
+ !
+ U%NSIZE_NATURE    = COUNT(U%XNATURE(:) > 0.0)
+ U%NSIZE_WATER     = COUNT(U%XWATER (:) > 0.0)
+ U%NSIZE_SEA       = COUNT(U%XSEA   (:) > 0.0)
+ U%NSIZE_TOWN      = COUNT(U%XTOWN  (:) > 0.0)
+ U%NSIZE_FULL      = IL
+ !
+ U%NDIM_NATURE    = SUM_ON_ALL_PROCS(HPROGRAM,UG%CGRID,U%XNATURE(:) > 0., 'DIM')
+ U%NDIM_WATER     = SUM_ON_ALL_PROCS(HPROGRAM,UG%CGRID,U%XWATER (:) > 0., 'DIM')
+ U%NDIM_SEA       = SUM_ON_ALL_PROCS(HPROGRAM,UG%CGRID,U%XSEA   (:) > 0., 'DIM')
+ U%NDIM_TOWN      = SUM_ON_ALL_PROCS(HPROGRAM,UG%CGRID,U%XTOWN  (:) > 0., 'DIM')
+ ZSUM=1.
+ U%NDIM_FULL      = SUM_ON_ALL_PROCS(HPROGRAM,UG%CGRID,ZSUM   (:) ==1., 'DIM')
+ DEALLOCATE(ZSUM)
+ !
+ ALLOCATE(U%NR_NATURE (U%NSIZE_NATURE))
+ ALLOCATE(U%NR_TOWN   (U%NSIZE_TOWN  ))
+ ALLOCATE(U%NR_WATER  (U%NSIZE_WATER ))
+ ALLOCATE(U%NR_SEA    (U%NSIZE_SEA   ))
+ !
+ IF (U%NSIZE_SEA   >0)CALL GET_1D_MASK( U%NSIZE_SEA,    U%NSIZE_FULL, U%XSEA   , U%NR_SEA   )
+ IF (U%NSIZE_WATER >0)CALL GET_1D_MASK( U%NSIZE_WATER,  U%NSIZE_FULL, U%XWATER , U%NR_WATER )
+ IF (U%NSIZE_TOWN  >0)CALL GET_1D_MASK( U%NSIZE_TOWN,   U%NSIZE_FULL, U%XTOWN  , U%NR_TOWN  )
+ IF (U%NSIZE_NATURE>0)CALL GET_1D_MASK( U%NSIZE_NATURE, U%NSIZE_FULL, U%XNATURE, U%NR_NATURE)
+ #ifdef MNH_PARALLEL
+ CALL MPPDB_CHECK_SURFEX2D(U%XSEA,"ZOOM_PGD_COVER:XSEA",PRECISION,ILUOUT)
+ CALL MPPDB_CHECK_SURFEX2D(U%XWATER,"ZOOM_PGD_COVER:XWATER",PRECISION,ILUOUT)
+ CALL MPPDB_CHECK_SURFEX2D(U%XTOWN,"ZOOM_PGD_COVER:XTOWN",PRECISION,ILUOUT)
+ CALL MPPDB_CHECK_SURFEX2D(U%XNATURE,"ZOOM_PGD_COVER:XNATURE",PRECISION,ILUOUT)
+ #endif
+ IF (LHOOK) CALL DR_HOOK('ZOOM_PGD_COVER',1,ZHOOK_HANDLE)
+ !_______________________________________________________________________________
+ !
+ END SUBROUTINE ZOOM_PGD_COVER