#============
# Contents
#============
* CMEM ascii I/O
* Input
  - Input
  - Contain required forcing for CMEM
  - Main (soil moisuture, soil temperature, snow)
  - Soil Condition
  - Vegetation
  - 2m air temperature
  - Vegetation LAI
  - Atmospheric optical thickness and TB
  - Snow (single-layer)
  - Snow (multi-layer) 
  - Incident Angle

* Output 

  - Output
  - file format
  - Output: Level-1
  - Output: Level-2
  - Output: Level-3
  - Output: Level-4



#==================
# CMEM ascii I/O
#==================
input config : input # configuration of namelists
input files  : forcing*.asc
output files : out*.asc


put option CFINOUT='ascii' in file 'input'.



#=========
# Input
#=========
* Prepare the forcing file according to your run config. Here ascii input required
* Each name of input file starts with 'forcing'
* forcing files must be consistent in terms of number of inputs (checked in rdcmemasciiinfo.F90)

* Mandatory input file:

   forcing_cmem_main.asc # main (soil moisuture, soil temperature, snow params) (time series required)


* Optional files:

   forcing_cmem_soil_constant.asc          # soil conditions                        (constant: 1 point data)
   forcing_cmem_veg-tessel_constant.asc    # veg type (tessel)                      (constant: 1 point data)
   forcing_cmem_veg-ecoclimap_constant.asc # veg type (ecoclimap)                   (constant: 1 point data)
   forcing_cmem_soil.asc                   # soil conditions                        (time series required)
   forcing_cmem_veg-tessel.asc             # veg type (tessel)                      (time series required)
   forcing_cmem_veg-ecoclimap.asc          # veg type (ecoclimap)                   (time series required)
   forcing_cmem_tair.asc                   # 2m air temperature                     (time series required)
   forcing_cmem_lai.asc                    # leaf area index                        (time series required)
   forcing_cmem_atm.asc                    # atmospheric optical thickness and TB   (time series required)
   forcing_cmem_tsnow.asc                  # single-layer snow temperature          (time series required) 
   forcing_cmem_slw.asc                    # single-layer snow liquid water content (time series required)
   forcing_cmem_snow_ml_snow_weq.asc       # multi-layer snow water equivalent      (time series required)
   forcing_cmem_snow_ml_snow_lwc.asc       # multi-layer snow liquid water content  (time series required)
   forcing_cmem_snow_ml_snow_dense.asc     # multi-layer snow density               (time series required)
   forcing_cmem_snow_ml_snow_t.asc         # multi-layer snow temperature           (time series required)
   forcing_cmem_angle.asc                  # incident angle                         (time series required)


#============================================
# Input: Contain required forcing for CMEM
#============================================
* Dates are expressed as YYYY (year), MM (month), DD (Day) and DOY (idecimal Day of year)
* Hour is in HHMM (hour Minutes)
* Grid point number is indicated (stay 1 if only 1 point considered)
* time series File (e.g. forcing_cmem_main.asc) contains N lines which is the number of point for which Tb is computed.
* N results from (number of gridpoint) * (number of timestep)


#========================================================
# Input: Main (soil moisuture, soil temperature, snow)
#========================================================
* 1 file required for any option

  #-------------------------
  # forcing_cmem_main.asc
  #-------------------------
  * main (soil moisuture, soil temperature, snow params) (time series required)
  * required for any option
  * Dimension of vectors = number of lines = N
  * N lines, 13 columns (if number of soil layer (NLAY_SOIL_LS) = 3):

    GRIDPOINT : first 3 col might contain any information. Not used in CMEM, but writen in output files.
    YYYYMMDD  :
    HHMM      :
    FWC       : Volumetric soil moisture level1 (m3/m3)
    FWC2      : Volumetric soil moisture level2 (m3/m3)
    FWC3      : Volumetric soil moisture level3 (m3/m3)
    FTSKIN    : Skin temperature (K)
    FTSURF    : Soil temperature level1 (K)
    FTL2      : Soil temperature level2 (K)
    FTDEEP    : Soil temperature level3 (K)
    FSNOWD    : Snow depth in water equivalent (m)        (if CMEMSNOWSET /= 'Single', set dummy value)
    FRSNOW    : SNOW density (kg/m3)                      (if CMEMSNOWSET /= 'Single', set dummy value)                 
    DOY       : Day of Year. Will be used in output file

#=========================
# Input: Soil Condition
#=========================
* 1 file required for any option
* required file depends on options LSURF_TYPE_CONST:

  #----------------------------------
  # forcing_cmem_soil_constant.asc
  #----------------------------------
  * soil conditions (constant: 1 point data)
  * required if LSURF_TYPE_CONST = .TRUE..
    In this case only 1 point is considered and soil parameters are constant.
    This option allows providing only once the constant soil parameters.
  * 1 line, 3 columns:

    ZSAND     : Fraction of sandy textured soil (%) range 0-100
    ZCLAY     : Fraction of clay textured soil (%) range 0-100
    fZ        : Geopotential at surface (m2/s2)

  #-------------------------
  # forcing_cmem_soil.asc
  #-------------------------
  * soil conditions (time series required)
  * required if LSURF_TYPE_CONST = .FALSE..
    In this case several data may be considered. N values are required as in main forcing file.
  * N line, 7 columns:

    GRIDPOINT : first 3 col might contain any information. Not used in CMEM, but writen in output files.
    YYYYMMDD  :
    HHMM      :
    ZSAND     : Fraction of sandy textured soil (%) range 0-100
    ZCLAY     : Fraction of clay textured soil (%) range 0-100
    fZ        : Geopotential at surface (m2/s2)
    DOY       : Day of Year. Will be used in output file


#=====================
# Input: Vegetation
#=====================
* 1 file required for any option
* required file depends on options LSURF_TYPE_CONST and CIVEG:

  #----------------------------------------
  # forcing_cmem_veg-tessel_constant.asc
  #----------------------------------------
  * required if LSURF_TYPE_CONST = .TRUE. and (CIVEG = 'Tessel' or 'HTessel')
    In this case only 1 point is considered and land cover type.
    This option allows providing only once the constant vegetation parameters
  * 1 line, 5 columns:

    ZFTVL     : Low vegetation type following Tessel classification
    ZFTVH     : High vegetation type following Tessel classification
    zfvegl    : Low vegetation fraction (-)
    zfvegh    : High vegetation fraction (-)
    zfwater   : Water fraction (-)

  #------------------------------------------
  # forcing_cmem_veg-ecocimap_constant.asc
  #------------------------------------------
  * required if LSURF_TYPE_CONST = .TRUE. and CIVEG = 'Ecoclimap'
    In this case only 1 point is considered and land cover type.
    This option allows providing only once the constant vegetation parameters
  * 1 line, 5 columns:

    ZFTVL     : Low vegetation type following ECOCLIMAP-ECMWF classification
    ZFTVH     : High vegetation type following ECOCLIMAP-ECMWF classification
    zfvegl    : Low vegetation fraction (-)
    zfvegh    : High vegetation fraction (-)
    zfwater   : Water fraction (-)

  #-------------------------------
  # forcing_cmem_veg-tessel.asc
  #-------------------------------
  * required if LSURF_TYPE_CONST = .FALSE. and (CIVEG = 'Tessel' or 'HTessel')
    In this case several data might be considered. N values are required as in main forcing file.
  * N lines, 9 columns:

    GRIDPOINT : first 3 col might contain any information. Not used in CMEM, but writen in output files.
    YYYYMMDD  :
    HHMM      :
    ZFTVL     : Low vegetation type following Tessel classification
    ZFTVH     : High vegetation type following Tessel classification
    zfvegl    : Low vegetation fraction (-)
    zfvegh    : High vegetation fraction (-)
    zfwater   : Water fraction (-)
    DOY       : Day of Year. Will be used in output file

  #----------------------------------
  # forcing_cmem_veg-ecoclimap.asc
  #----------------------------------
  * required if LSURF_TYPE_CONST = .FALSE. and CIVEG = 'Ecoclimap'
    In this case several data might be considered. N values are required as in main forcing file.
  * N lines, 9 columns:

    GRIDPOINT : first 3 col might contain any information. Not used in CMEM, but writen in output files.
    YYYYMMDD  :
    HHMM      :
    ZFTVL     : Low vegetation type following ECOCLIMAP-ECMWF classification
    ZFTVH     : High vegetation type following ECOCLIMAP-ECMWF classification
    zfvegl    : Low vegetation fraction (-)
    zfvegh    : High vegetation fraction (-)
    zfwater   : Water fraction (-)


  #-----------------------
  # Useful information:
  #-----------------------
  ECOCLIMAP types are:
    No vegetation:   0
    High vegetation: 1 Decidious forests; 2 Coniferous forests; 3 Rain forests
    Low vegetation:  4 C3 Grasslands;     5 C4 Grasslands;      6 C3 Crops;
                     7 C4 Crops

  TESSEL types are:
    High vegetation: 3 Evergreen Needleleaf Trees;  4 Deciduous Needleleaf Trees; 5 eciduous Broadleaf Trees;
                     6 Evergreen Broadleaf  Trees; 18 Mixed Forest/woodland;     19 Interrupted Forest
    Low vegetation:  1 Crops, Mixed Farming;        2 Short Grass;                7 Tall Grass;
                     9 Tundra;                     10 Irrigated Crops;           11 Semidesert;
                    13 Bogs and Marshes;           16 Evergreen Shrubs;          17 Deciduous Shrubs;
                    20 Water and Land Mixtures

  Vegetation tables are provided in vegtable.F90


#=============================
# Input: 2m air temperature
#=============================
* required if
       (CITVEG = 'Tair'     or 'Da_dual_all' or 'Ds_dual_onlysnow')
    or (CIATM  = 'Pellarin' or 'Ulaby'       or 'Input')

  #-------------------------
  # forcing_cmem_tair.asc
  #-------------------------
  * N lines, 5 columns: (N values are required as in main forcing file)

    GRIDPOINT : first 3 col might contain any information. Not used in CMEM, but writen in output files.
    YYYYMMDD  :
    HHMM      :
    ftair     : 2m air temperature (K)
    DOY       : Day of Year. Will be used in output file


#=========================
# Input: Vegetation LAI
#=========================
* required if CIDVEG = 'HTessel' or 'Ecoclimap'

  #------------------------
  # forcing_cmem_lai.asc
  #------------------------
  * N lines, 6 columns: (N values are required as in main forcing file)

    GRIDPOINT : first 3 col might contain any information. Not used in CMEM, but writen in output files.
    YYYYMMDD  :
    HHMM      :
    fs_laiL   : LAI Low vegetation type
    zlaiH     : LAI High vegetation type (not used in CMEM)
    DOY       : Day of Year. Will be used in output file


#===============================================
# Input: Atmospheric optical thickness and TB
#===============================================
* required if CIATM = 'Input'

  #------------------------
  #  forcing_cmem_atm.asc
  #------------------------
  * N lines, 7 columns: (N values are required as in main forcing file)

    GRIDPOINT   : first 3 col might contain any information. Not used in CMEM, but writen in output files.
    YYYYMMDD    :
    HHMM        :
    ftau_atm_in : optical thickness of atmosphere (zenith opacity / cos(angle))
    ftb_au_in   : upward atmospheric radiation (TB) (K)
    ftb_ad_in   : downward atmospheric radiation (TB) (K)
    DOY         : Day of Year. Will be used in output file


#==============================
# Input: Snow (single-layer)
#==============================
* required if CISNOWSET = 'Single'
* (snow depth in water equivalent and snow density are in forcing_cmem_main.asc)

  #-----------------------------------
  # Snow temperature (single-layer)
  #-----------------------------------
  # forcing_cmem_tsnow.asc
  #-----------------------------------
  * required if CISNOWSET = 'Single' and CISNOWTEMP = 'Snowtemp'
  * N lines, 5 columns: (N values are required as in main forcing file)

  GRIDPOINT : first 3 col might contain any information. Not used in CMEM, but writen in output files.
  YYYYMMDD  :
  HHMM      :
  ftsnow    : snow temperature (K)
  DOY       : Day of Year. Will be used in output file

  #--------------------------------------------
  # Snow liquid water content (single-layer)
  #--------------------------------------------
  # forcing_cmem_slw.asc
  #--------------------------------------------
  * required if CISNOWSET = 'Single' and CISNOWMV = 'Input'
  * N lines, 5 columns: (N values are required as in main forcing file)

  GRIDPOINT : first 3 col might contain any information. Not used in CMEM, but writen in output files.
  YYYYMMDD  :
  HHMM      :
  fslw      : snow liquid water content (kg/m2)
  DOY       : Day of Year. Will be used in output file


#===========================
# Input: Multi-layer Snow
#===========================
* required if CISNOWSET = 'Multi'
* NLAY_SNOW: number of snow layers

  #-------------------
  # Layer structure
  #-------------------

  AIR
  ----------------------------------
  snow layer 1 (top layer)
  ----------------------------------
  snow layer 2
  ----------------------------------
  ...
  ----------------------------------
  snow layer NLAY_SNOW (bottom)
  ==================================
  SOIL

  (Note: see 'Ignored data' and 'Ignored layer')

  #------------------------------------------------------------------
  # Snow depth (WEQ) (multi-layer)
  #   Take care that this is in [kg/m2] for multi-layer input,
  #   while [m] are used for single-layer input (forcing_main.asc)
  #------------------------------------------------------------------
  # forcing_cmem_snow_ml_snow_weq.asc
  #------------------------------------------------------------------
  * required if CISNOWSET = 'Multi'
  * N lines, 4+NLAY_SNOW columns: (N values are required as in main forcing file)

    GRIDPOINT          : first 3 col might contain any information. Not used in CMEM, but writen in output files.
    YYYYMMDD           :
    HHMM               :
    fsdweq_l_1         : snow water equivalent (kg/m2) : layer 1 (top)
    fsdweq_l_2         : snow water equivalent (kg/m2) : layer 2
    ...                : snow water equivalent (kg/m2) : layer ...
    fsdweq_l_NLAY_SNOW : snow water equivalent (kg/m2) : layer NLAY_SNOW (bottom)
    DOY                : Day of Year. Will be used in output file

  #------------------------------------------
  # Snow liquid water content: multi-layer
  #------------------------------------------
  # forcing_cmem_snow_ml_snow_lwc.asc
  #------------------------------------------
  * required if CISNOWSET = 'Multi'
  * N lines, 4+NLAY_SNOW columns: (N values are required as in main forcing file)

    GRIDPOINT        : first 3 col might contain any information. Not used in CMEM, but writen in output files.
    YYYYMMDD         :
    HHMM             :
    fslw_l_1         : snow liquid water content (kg/m2) : layer 1 (top)
    fslw_l_2         : snow liquid water content (kg/m2) : layer 2
    ...              : snow liquid water content (kg/m2) : layre ...
    fslw_l_NLAY_SNOW : snow liquid water content (kg/m2) : layer NLAY_SNOW (bottom)
    DOY              : Day of Year. Will be used in output file

  #---------------------------------------
  # Snow density: multi-layer
  #---------------------------------------
  # forcing_cmem_snow_ml_snow_dense.asc
  #---------------------------------------
  * required if CISNOWSET = 'Multi'
  * N lines, 4+NLAY_SNOW columns: (N values are required as in main forcing file)

    GRIDPOINT          : first 3 col might contain any information. Not used in CMEM, but writen in output files.
    YYYYMMDD           :
    HHMM               :
    frsnow_l_1         : snow density (kg/m3) : layer 1 (top)
    frsnow_l_2         : snow density (kg/m3) : layer 2
    ...                : snow density (kg/m3) : layre ...
    frsnow_l_NLAY_SNOW : snow density (kg/m3) : layer NLAY_SNOW (bottom)
    DOY                : Day of Year. Will be used in output file

  #-----------------------------------
  # Snow temperature: multi-layer
  #-----------------------------------
  # forcing_cmem_snow_ml_snow_t.asc
  #-----------------------------------
  * required if CISNOWSET = 'Multi'
  * N lines, 4+NLAY_SNOW columns: (N values are required as in main forcing file)

    GRIDPOINT          : first 3 col might contain any information. Not used in CMEM, but writen in output files.
    YYYYMMDD           :
    HHMM               :
    ftsnow_l_1         : snow temperature (K) : layer 1 (top)
    ftsnow_l_2         : snow temperature (K) : layer 2
    ...                : snow temperature (K) : layre ...
    ftsnow_l_NLAY_SNOW : snow temperature (K) : layer NLAY_SNOW (bottom)
    DOY                : Day of Year. Will be used in output file

  #----------------------
  # NOTE: Ignored data
  #----------------------
  * if total snow water equivalent < 0.01 (m), the point is treated as without snow.

  #-----------------------
  # NOTE: Ignored layer
  #-----------------------
  * if fsdweq_l_? >= 9999 or fsdweq_l_? <= 0, the layer (about snow_weq, snow_lwc, snow_dense, snow_t) is ignored at the point.
  * if frsnow_l_? >= 9999 or frsnow_l_? <= 0, the layer (about snow_weq, snow_lwc, snow_dense, snow_t) is ignored at the point.

  * Sample (forcing_cmem_snow_ml_snow_weq.asc: NLAY_SNOW=5)

    # <-- top of snow ----------------------- bottom of snow -->
    # GP  YYYYMMDD HHMM fsdweq_l_1 fsdweq_l_2 fsdweq_l_3 fsdweq_l_4 fsdweq_l_5 DOY
    23577 20171104 0000 0          0          0          0          0          308.00     # actual number of snow layers = 0 (without snow)
    23577 20171104 0600 0          0          0          0          0          308.25     # actual number of snow layers = 0 (without snow)
    23577 20171104 1200 3.0221     0          0          0          0          308.50     # actual number of snow layers = 1
    23577 20171104 1800 7.0221     0          0          0          0          308.75     # actual number of snow layers = 1
    23577 20171105 0000 17.0176    0          0          0          0          309.00     # actual number of snow layers = 1
    23577 20171105 0600 17.8242    0          0          0          0          309.25     # actual number of snow layers = 1
    23577 20171105 1200 9.18359    9.12891    0          0          0          309.50     # actual number of snow layers = 2
    23577 20171105 1800 9.85156    9.43164    0          0          0          309.75     # actual number of snow layers = 2
    23577 20171106 0000 9.5293     10.7656    0          0          0          310.00     # actual number of snow layers = 2
    23577 20171106 0600 9.50977    10.9473    11.0742    0          0          310.25     # actual number of snow layers = 3


#=========================
# Input: Incident Angle
#=========================
* required if LTHETA_CONST = .False.

  #--------------------------
  # forcing_cmem_angle.asc
  #--------------------------
  * N lines, 5 columns: (N values are required as in main forcing file)

    GRIDPOINT : first 3 col might contain any information. Not used in CMEM, but writen in output files.
    YYYYMMDD  :
    HHMM      :
    ftheta    : Incident angle (degrees)
    DOY       : Day of Year. Will be used in output file


#==========
# Output
#==========
* option JPHISTLEV in file 'input' defines levels of outputs
* variables in output filename

    $CNAMEID : Summarize of options          # e.g. WaWiFrWiWiPeTsHTTeWaNoNoHsSiTsCoEf  
    $FREQ    : frequency      [0.1GHz]       # e.g. 0014 (1.4[GHz])
    $ANGLE   : Incident angle [degree]       # e.g. 040  (40[degree])
    $TILE    : surface kind   [tile number]  # e.g. 1 (bare soil without snow)

* details of $CNAMEID

    Option CNAMEIDTYPE in file 'input' defines the length of $CNAMEID

    if CNAMEIDTYPE = 'CI-0'

      $CNAMEID = ''

    if CNAMEIDTYPE = 'CI-8' # as CMEM.v5.1

      $CNAMEID =  CIDIEL(1:2) # first and second characters about option CIDIEL (e.g. 'Wa' if CIDIEL='Wang')
                + CITEFF(1:2) # same as above
                + CISMR (1:2) # same as above
                + CIRGHR(1:2) # same as above
                + CIVEG (1:2) # same as above
                + CIATM (1:2) # same as above
                + CITVEG(1:2) # same as above
                + CIDVEG(1:2) # same as above

    if CNAMEIDTYPE = 'CI-ALL'

      $CNAMEID =  CIDIEL    (1:2) # same as above
                + CITEFF    (1:2)
                + CISMR     (1:2)
                + CIRGHR    (1:2)
                + CIVEG     (1:2)
                + CIATM     (1:2)
                + CITVEG    (1:2)
                + CIDVEG    (1:2)
                + CITDIEL   (1:2)
                + CIVEGDW   (1:2)
                + CIVEGDI   (1:2)
                + CIDESERT  (1:2)
                + CISNOW    (1:2)
                + CISNOWSET (1:2)
                + CISNOWTEMP(1:2)
                + CISNOWMV  (1:2)
                + CIOTEFF   (1:2)

* details of $TILE

    $TILE = 1 : bare soil       (without snow)
    $TILE = 2 : bare soil       (with snow)
    $TILE = 3 : low  vegetation (without snow)
    $TILE = 4 : low  vegetation (with snow)
    $TILE = 5 : high vegetation (without snow)
    $TILE = 6 : high vegetation (with snow)
    $TILE = 7 : water


#=======================
# Output: file format
#=======================
* N+1 lines, 4+n columns:

  N: same as input main forcing file
  n: number of output variables (>=1)

* first line is comment
* columns:

  GRIDPOINT : (common) number of grid point
  YYYYMMDD  : (common) year/month/day
  HHMM      : (common) hour/minute
  DOY       : (common) day of Year
  var_1     : output variable(1)
  var_2     : output variable(2)
  ...       : ...
  var_n     : output variable(n)


#====================================
# Output: Level-1 (JPHISTLEV >= 1)
#====================================

  #--------------------------------------
  # out_tbtoat_$OPTID_$FREQ_$ANGLE.asc
  #--------------------------------------
  * N+1 lines, 8 columns:

    GRIDPOINT : number of grid point
    YYYYMMDD  : year/month/day
    HHMM      : hour/minute
    DOY       : day of Year
    TBH       : simulated brightness temperature (H-pol) [K]
    TBV       : simulated brightness temperature (V-pol) [K]
    TEFF_H    : effective temperature            (H-pol) [K]
    TEFF_V    : effective temperature            (V-pol) [K]


#====================================
# Output: Level-2 (JPHISTLEV >= 2)
#====================================

  #--------------------------------------
  # out_VWCsum_$OPTID_$FREQ_$ANGLE.asc
  #--------------------------------------
  * N+1 lines, 5 columns:

    GRIDPOINT : number of grid point
    YYYYMMDD  : year/month/day
    HHMM      : hour/minute
    DOY       : day of Year
    VWCsum    : total vegetation water content [kg/m2]

  #--------------------------------------
  # out_frbare_$OPTID_$FREQ_$ANGLE.asc
  #--------------------------------------
  * N+1 lines, 5 columns:

    GRIDPOINT : number of grid point
    YYYYMMDD  : year/month/day
    HHMM      : hour/minute
    DOY       : day of Year
    frbare    : total bare soil fraction [-]

  #--------------------------------------
  # out_tau_at_$OPTID_$FREQ_$ANGLE.asc
  #--------------------------------------
  * N+1 lines, 5 columns:

    GRIDPOINT : number of grid point
    YYYYMMDD  : year/month/day
    HHMM      : hour/minute
    DOY       : day of Year
    tau_at    : atmospheric optical depth

  #--------------------------------------
  # out_tauveg_$OPTID_$FREQ_$ANGLE.asc
  #--------------------------------------
  * N+1 lines, 6 columns:

    GRIDPOINT : number of grid point
    YYYYMMDD  : year/month/day
    HHMM      : hour/minute
    DOY       : day of Year
    tauveg_H  : effective vegetation opacity (H-pol) [-]
    tauveg_V  : effective vegetation opacity (V-pol) [-]

  #--------------------------------------
  # out_tb_adw_$OPTID_$FREQ_$ANGLE.asc
  #--------------------------------------
  *  N+1 lines, 5 columns:

     GRIDPOINT : number of grid point
     YYYYMMDD  : year/month/day
     HHMM      : hour/minute
     DOY       : day of Year
     tb_adw    : atmospheric TB (downward) [K]

  #--------------------------------------
  # out_tb_aup_$OPTID_$FREQ_$ANGLE.asc
  #--------------------------------------
  * N+1 lines, 5 columns:

    GRIDPOINT : number of grid point
    YYYYMMDD  : year/month/day
    HHMM      : hour/minute
    DOY       : day of Year
    tb_aup    : atmospheric TB (upward) [K]


#====================================
# Output: Level-3 (JPHISTLEV >= 3)
#====================================

  #--------------------------------------
  # out_Bpa_HI_$OPTID_$FREQ_$ANGLE.asc
  #--------------------------------------
  * N+1 lines, 5 columns:

    GRIDPOINT : number of grid point
    YYYYMMDD  : year/month/day
    HHMM      : hour/minute
    DOY       : day of Year
    Bpa_HI    : High vegetation b parameter (if CIVEG=Jackson)

  #--------------------------------------
  # out_Bpa_LO_$OPTID_$FREQ_$ANGLE.asc
  #--------------------------------------
  * N+1 lines, 5 columns:

    GRIDPOINT : number of grid point
    YYYYMMDD  : year/month/day
    HHMM      : hour/minute
    DOY       : day of Year
    Bpa_LO    : Low vegetation b parameter (if CIVEG=Jackson)

  #--------------------------------------
  # out_VWC_HI_$OPTID_$FREQ_$ANGLE.asc
  #--------------------------------------
  * N+1 lines, 5 columns:

    GRIDPOINT : number of grid point
    YYYYMMDD  : year/month/day
    HHMM      : hour/minute
    DOY       : day of Year
    VWC_HI    : high vegetation water content [kg/m2]

  #--------------------------------------
  # out_VWC_LO_$OPTID_$FREQ_$ANGLE.asc
  #--------------------------------------
  * N+1 lines, 5 columns:

    GRIDPOINT : number of grid point
    YYYYMMDD  : year/month/day
    HHMM      : hour/minute
    DOY       : day of Year
    VWC_LO    : low vegetation water content [kg/m2]

  #--------------------------------------
  # out_Wp_par_$OPTID_$FREQ_$ANGLE.asc
  #--------------------------------------
  * N+1 lines, 5 columns:

    GRIDPOINT : number of grid point
    YYYYMMDD  : year/month/day
    HHMM      : hour/minute
    DOY       : day of Year
    Wp_par    : Wilting point soil moisture [cm3/cm3]

  #--------------------------------------
  # out_emHeff_$OPTID_$FREQ_$ANGLE.asc
  #--------------------------------------
  * N+1 lines, 5 columns:

    GRIDPOINT : number of grid point
    YYYYMMDD  : year/month/day
    HHMM      : hour/minute
    DOY       : day of Year
    emHeff    : effective emissivity (H-pol) [-]

  #--------------------------------------
  # out_emVeff_$OPTID_$FREQ_$ANGLE.asc
  #--------------------------------------
  * N+1 lines, 5 columns:

    GRIDPOINT : number of grid point
    YYYYMMDD  : year/month/day
    HHMM      : hour/minute
    DOY       : day of Year
    emVeff    : effective emissivity (V-pol) [-]

  #--------------------------------------
  # out_emissH_$OPTID_$FREQ_$ANGLE.asc
  #--------------------------------------
  * N+1 lines, 5 columns:

    GRIDPOINT : number of grid point
    YYYYMMDD  : year/month/day
    HHMM      : hour/minute
    DOY       : day of Year
    emissH    : soil surface emissivity (H-pol) [-]

  #--------------------------------------
  # out_emissV_$OPTID_$FREQ_$ANGLE.asc
  #--------------------------------------
  * N+1 lines, 5 columns:

    GRIDPOINT : number of grid point
    YYYYMMDD  : year/month/day
    HHMM      : hour/minute
    DOY       : day of Year
    emissV    : soil surface emissivity (V-pol) [-]

  #--------------------------------------
  # out_ffrac1_$OPTID_$FREQ_$ANGLE.asc
  #--------------------------------------
  * N+1 lines, 5 columns:

    GRIDPOINT : number of grid point
    YYYYMMDD  : year/month/day
    HHMM      : hour/minute
    DOY       : day of Year
    ffrac1    : pure (no snow) bare soil fraction [-]

  #--------------------------------------
  # out_ffrac3_$OPTID_$FREQ_$ANGLE.asc
  #--------------------------------------
  * N+1 lines, 5 columns:

    GRIDPOINT : number of grid point
    YYYYMMDD  : year/month/day
    HHMM      : hour/minute
    DOY       : day of Year
    ffrac3    : pure (no snow) low vegetation fraction [-]

  #--------------------------------------
  # out_ffvegh_$OPTID_$FREQ_$ANGLE.asc
  #--------------------------------------
  * N+1 lines, 5 columns:

    GRIDPOINT : number of grid point
    YYYYMMDD  : year/month/day
    HHMM      : hour/minute
    DOY       : day of Year
    ffvegh    : high vegetation fraction (snow + no snow) [-]

  #--------------------------------------
  # out_ffvegl_$OPTID_$FREQ_$ANGLE.asc
  #--------------------------------------
  * N+1 lines, 5 columns:

    GRIDPOINT : number of grid point
    YYYYMMDD  : year/month/day
    HHMM      : hour/minute
    DOY       : day of Year
    ffvegl    : low vegetation fraction (snow + no snow) [-]

  #--------------------------------------
  # out_fh_par_$OPTID_$FREQ_$ANGLE.asc
  #--------------------------------------
  * N+1 lines, 5 columns:

    GRIDPOINT : number of grid point
    YYYYMMDD  : year/month/day
    HHMM      : hour/minute
    DOY       : day of Year
    fh_par    : roughness parameter

  #--------------------------------------
  # out_fracfr_$OPTID_$FREQ_$ANGLE.asc
  #--------------------------------------
  * N+1 lines, 5 columns:

    GRIDPOINT : number of grid point
    YYYYMMDD  : year/month/day
    HHMM      : hour/minute
    DOY       : day of Year
    fracfr    : frozen soil fraction [-]

  #--------------------------------------
  # out_fracsn_$OPTID_$FREQ_$ANGLE.asc
  #--------------------------------------
  * N+1 lines, 5 columns:

    GRIDPOINT : number of grid point
    YYYYMMDD  : year/month/day
    HHMM      : hour/minute
    DOY       : day of Year
    fracfr    : snow cover fraction [-]

  #--------------------------------------
  # out_frcray_$OPTID_$FREQ_$ANGLE.asc
  #--------------------------------------
  * N+1 lines, 5 columns:

    GRIDPOINT : number of grid point
    YYYYMMDD  : year/month/day
    HHMM      : hour/minute
    DOY       : day of Year
    frcray    : cray fraction [%]

  #--------------------------------------
  # out_frsand_$OPTID_$FREQ_$ANGLE.asc
  #--------------------------------------
  * N+1 lines, 5 columns:

    GRIDPOINT : number of grid point
    YYYYMMDD  : year/month/day
    HHMM      : hour/minute
    DOY       : day of Year
    frsand    : sand fraction [%]

  #--------------------------------------
  # out_swmvmx_$OPTID_$FREQ_$ANGLE.asc
  #--------------------------------------
  * N+1 lines, 5 columns:

    GRIDPOINT : number of grid point
    YYYYMMDD  : year/month/day
    HHMM      : hour/minute
    DOY       : day of Year
    swmvmx    : volume fraction of liquid water (maximum value in snowlayers at the point) [-]

  #--------------------------------------
  # out_tbsoiH_$OPTID_$FREQ_$ANGLE.asc
  #--------------------------------------
  * N+1 lines, 5 columns:

    GRIDPOINT : number of grid point
    YYYYMMDD  : year/month/day
    HHMM      : hour/minute
    DOY       : day of Year
    tbsoiH    : soil TB (H-pol) [K]

  #--------------------------------------
  # out_tbsoiV_$OPTID_$FREQ_$ANGLE.asc
  #--------------------------------------
  * N+1 lines, 5 columns:

    GRIDPOINT : number of grid point
    YYYYMMDD  : year/month/day
    HHMM      : hour/minute
    DOY       : day of Year
    tbsoiV    : soil TB (V-pol) [K]

  #--------------------------------------
  # out_tbvegH_$OPTID_$FREQ_$ANGLE.asc
  # --------------------------------------
  * N+1 lines, 5 columns:

    GRIDPOINT : number of grid point
    YYYYMMDD  : year/month/day
    HHMM      : hour/minute
    DOY       : day of Year
    tbvegH    : vegetation TB (H-pol) [K]

  #--------------------------------------
  # out_tbvegV_$OPTID_$FREQ_$ANGLE.asc
  #--------------------------------------
  * N+1 lines, 5 columns:

    GRIDPOINT : number of grid point
    YYYYMMDD  : year/month/day
    HHMM      : hour/minute
    DOY       : day of Year
    tbvegV    : vegetation TB (V-pol) [K]

  #--------------------------------------
  # out_teff_C_$OPTID_$FREQ_$ANGLE.asc
  #--------------------------------------
  * N+1 lines, 5 columns:

    GRIDPOINT : number of grid point
    YYYYMMDD  : year/month/day
    HHMM      : hour/minute
    DOY       : day of Year
    teff_C    : C parameter used for effective temperature

  #--------------------------------------
  # out_teff_o_$OPTID_$FREQ_$ANGLE.asc
  #--------------------------------------
  * N+1 lines, 5 columns:

    GRIDPOINT : number of grid point
    YYYYMMDD  : year/month/day
    HHMM      : hour/minute
    DOY       : day of Year
    teff_o    : effective temperature used for calculating effective emissivity [K]


#====================================
# Output: Level-4 (JPHISTLEV >= 4)
#====================================

  #--------------------------------------
  # out_swmv_l_$OPTID_$FREQ_$ANGLE.asc
  #--------------------------------------
  * N+1 lines, 4+NLAY_SNOW columns:

    GRIDPOINT        : number of grid point
    YYYYMMDD         : year/month/day
    HHMM             : hour/minute
    DOY              : day of Year
    swmv_l_1         : volume fraction of liquid water in snow [-] : layer 1 (top)
    swmv_l_2         : volume fraction of liquid water in snow [-] : layer 2
    ...              : volume fraction of liquid water in snow [-] : layer ...
    swmv_l_NLAY_SNOW : volume fraction of liquid water in snow [-] : layer NLAY_SNOW (bottom)

  #--------------------------------------
  # out_swsg_l_$OPTID_$FREQ_$ANGLE.asc
  #--------------------------------------
  * N+1 lines, 4+NLAY_SNOW columns:

    GRIDPOINT        : number of grid point
    YYYYMMDD         : year/month/day
    HHMM             : hour/minute
    DOY              : day of Year
    swsg_l_1         : snow grain size [mm] : layer 1 (top)
    swsg_l_2         : snow grain size [mm] : layer 2
    ...              : snow grain size [mm] : layer ...
    swsg_l_NLAY_SNOW : snow grain size [mm] : layer NLAY_SNOW (bottom)

  #--------------------------------------
  # out_swht_l_$OPTID_$FREQ_$ANGLE.asc
  #--------------------------------------
  * N+1 lines, 4+NLAY_SNOW columns:

    GRIDPOINT : number of grid point
    YYYYMMDD : year/month/day
    HHMM : hour/minute
    DOY : day of Year
    swht_l_1         : snow thickness [m] : layer 1 (top)
    swht_l_2         : snow thickness [m] : layer 2
    ...              : snow thickness [m] : layer ...
    swht_l_NLAY_SNOW : snow thickness [m] : layer NLAY_SNOW (bottom)

  #--------------------------------------
  # out_swtm_l_$OPTID_$FREQ_$ANGLE.asc
  #--------------------------------------
  * N+1 lines, 4+NLAY_SNOW columns:

    GRIDPOINT        : number of grid point
    YYYYMMDD         : year/month/day
    HHMM             : hour/minute
    DOY              : day of Year
    swtm_l_1         : snow temperature [K] : layer 1 (top)
    swtm_l_2         : snow temperature [K] : layer 2
    ...              : snow temperature [K] : layer ...
    swtm_l_NLAY_SNOW : snow temperature [K] : layer NLAY_SNOW (bottom)

  #--------------------------------------
  # out_swds_l_$OPTID_$FREQ_$ANGLE.asc
  #--------------------------------------
  * N+1 lines, 4+NLAY_SNOW columns:

    GRIDPOINT        : number of grid point
    YYYYMMDD         : year/month/day
    HHMM             : hour/minute
    DOY              : day of Year
    swds_l_1         : snow density [kg/m3] : layer 1 (top)
    swds_l_2         : snow density [kg/m3] : layer 2
    ...              : snow density [kg/m3] : layer ...
    swds_l_NLAY_SNOW : snow density [kg/m3] : layer NLAY_SNOW (bottom)

  #------------------------------------------
  # out_rgh__$TILE_$OPTID_$FREQ_$ANGLE.asc
  #------------------------------------------
  * $TILE = 1 to 7
  * N+1 lines, 5 columns:

    GRIDPOINT : number of grid point
    YYYYMMDD  : year/month/day
    HHMM      : hour/minute
    DOY       : day of Year
    rgh__tile : roughness parameter for $TILE

  #------------------------------------------
  # out_eps_r$TILE_$OPTID_$FREQ_$ANGLE.asc
  #------------------------------------------
  * $TILE = 1 to 7
  * N+1 lines, 5 columns:

    GRIDPOINT : number of grid point
    YYYYMMDD  : year/month/day
    HHMM      : hour/minute
    DOY       : day of Year
    eps_rtile : dielectric constant of soil for $TILE (real part)

  #------------------------------------------
  # out_eps_i$TILE_$OPTID_$FREQ_$ANGLE.asc
  #------------------------------------------
  * $TILE = 1 to 7
  * N+1 lines, 5 columns:

    GRIDPOINT : number of grid point
    YYYYMMDD  : year/month/day
    HHMM      : hour/minute
    DOY       : day of Year
    eps_itile : dielectric constant of soil for $TILE (imaginary part)

  #------------------------------------------
  # out_tbsnH$TILE_$OPTID_$FREQ_$ANGLE.asc
  #------------------------------------------
  * $TILE = 2, 4, 6
  * N+1 lines, 5 columns:

    GRIDPOINT : number of grid point
    YYYYMMDD  : year/month/day
    HHMM      : hour/minute
    DOY       : day of Year
    tbsnHtile : snow TB (H-pol) for $TILE [K]

  #------------------------------------------
  # out_tbsnV$TILE_$OPTID_$FREQ_$ANGLE.asc
  #------------------------------------------
  * $TILE = 2, 4, 6
  * N+1 lines, 5 columns:

    GRIDPOINT : number of grid point
    YYYYMMDD  : year/month/day
    HHMM      : hour/minute
    DOY       : day of Year
    tbsnVtile : snow TB (V-pol) for $TILE [K]

  #------------------------------------------
  # out_rsnwH$TILE_$OPTID_$FREQ_$ANGLE.asc
  #------------------------------------------
  * $TILE = 2, 4, 6
  * N+1 lines, 5 columns:

    GRIDPOINT : number of grid point
    YYYYMMDD  : year/month/day
    HHMM      : hour/minute
    DOY       : day of Year
    rsnwHtile : reflectivity of soil (under snow) (H-pol) for $TILE [-]

  #------------------------------------------
  # out_rsnwV$TILE_$OPTID_$FREQ_$ANGLE.asc
  #------------------------------------------
  * $TILE = 2, 4, 6
  * N+1 lines, 5 columns:

    GRIDPOINT : number of grid point
    YYYYMMDD  : year/month/day
    HHMM      : hour/minute
    DOY       : day of Year
    rsnwVtile : reflectivity of soil (under snow) (V-pol) for $TILE [-]