:=============================================================================
:         MODULE SUBSTANCE NAMELIST with  CPP key : SUBSTANCE 
:=============================================================================
:
:-----------------------------------------------------------------------------
: nmlnbvar : number of each type of substance to be defined (other than T & S)
:-----------------------------------------------------------------------------
:    nv_dis : number of dissolved susbtances
:    nv_ncp : number of  Non Constitutive Particulate subtances
:    nv_fix : number of  fixed susbtances (not advected)
:    nv_bent : number of benthic susbtances
:    nv_grav : number of susbtances type GRAVELS (only if key_sed_MUSTANG)
:    nv_sand : number of susbtances type SAND (only if key_sed_MUSTANG)
:    nv_mud : number of susbtances type MUD (only if key_sed_MUSTANG)
:    nv_sorb : number of particulate susbtances sorbed on an other particule
:
 &nmlnbvar
    nv_dis=0
    nv_ncp=0
    nv_fix=0
    nv_bent=0 
    nv_grav=0
    nv_sand=2
    nv_mud=1
    nv_sorb=0 /

:-----------------------------------------------------------------------------
: nmlsands : Characterization of SAND substances (used only if defined 
:            MUSTANG)
:            If nv_sand = 0 this namelist is not read
:-----------------------------------------------------------------------------
:    name_var_n() : string, name of variable
:    long_name_var_n() : string, long name of variable
:    standard_name_var_n() : string, standard name of variable
:    unit_var_n() : string, unit of concentration of variable
:    flx_atm_n() : real, uniform atmospherical deposition (unit/m2/s) 
:    cv_rain_n() : real, concentration in rainwater (unit/m3 of water)
:    cini_wat_n() : real, initial concentration in water column (unit/m3)
:    cini_air_n() : real, initial concentration in air
:    l_out_subs_n() : boolean, saving in output file if TRUE
:    init_cv_name_n() : string, name of substance read from initial condition 
:                       file
:    obc_cv_name_n() : string, name of substance read from obc file
:    cini_sed_n() : real, initial concentration in sediment (quantity/kg of 
:                   dry sediment)  (only if cppkey MUSTANG)
:    tocd_n() : real, critical stress of deposition (N/m2) 
:    ros_n()  : real, density of particle (kg/m3)
:    l_bedload_n() : boolean, allow bedload transport
:    diam_n() : diameter of particles
:    l_sand2D() : boolean, to treat sand variable as 2D variable (used only if 
:                 key_sand2D)
:    l_outsandrouse()  : boolean, to use a reconstitution of a ROUSE profil 
:                        for output in water column (used only if key_sand2D 
:                        and l_sand2D is TRUE for this variable)
:
:  WARNING if several sands: start with the coarser sands and continue more 
:  and more finely
:
 &nmlsands
    name_var_n(1)='GRAV'
      long_name_var_n(1)='GRAV'
      standard_name_var_n(1)='GRAV'
      unit_var_n(1)='kg.m-3'
      flx_atm_n(1)=0.0
      cv_rain_n(1)=0.0
      cini_wat_n(1)=0.0
      cini_sed_n(1)=0.4
      cini_air_n(1)=0.0
      l_out_subs_n(1)=.TRUE.
      l_bedload_n(1)=.FALSE.
      init_cv_name_n(1)='GRAV'
      obc_cv_name_n(1)='GRAV'
      tocd_n(1)=0.5
      ros_n(1)=2600.0
      diam_n(1)=0.0002
      l_sand2D_n(1)=.FALSE.
      l_outsandrouse_n(1)=.FALSE. 
    name_var_n(2)='SAND'
      long_name_var_n(2)='SAND'
      standard_name_var_n(2)='SAND'
      unit_var_n(2)='kg.m-3'
      flx_atm_n(2)=0.0
      cv_rain_n(2)=0.0
      cini_wat_n(2)=0.0
      cini_sed_n(2)=0.4
      cini_air_n(2)=0.0
      l_out_subs_n(2)=.TRUE.
      l_bedload_n(2)=.FALSE.
      init_cv_name_n(2)='SAND'
      obc_cv_name_n(2)='SAND'
      tocd_n(2)=1.0
      ros_n(2)=2600.0
      diam_n(2)=0.0001
      l_sand2D_n(2)=.FALSE.
      l_outsandrouse_n(2)=.FALSE.  /
:-----------------------------------------------------------------------------    
: nmlmuds : Characterization of MUD substances (used only if defined MUSTANG)
:           If nv_mud = 0 this namelist is not read
:-----------------------------------------------------------------------------
:    name_var_n() : string, name of variable
:    long_name_var_n() : string, long name of variable
:    standard_name_var_n() : string, standard name of variable
:    unit_var_n() : string, unit of concentration of variable
:    flx_atm_n() : real, uniform atmospherical deposition (unit/m2/s) 
:    cv_rain_n() : real, concentration in rainwater (unit/m3 of water)
:    cini_wat_n() : real, initial concentration in water column (unit/m3)
:    cini_air_n() : real, initial concentration in air
:    l_out_subs_n() : boolean, saving in output file if TRUE
:    init_cv_name_n() : string, name of substance read from initial condition 
:                       file
:    obc_cv_name_n() : string, name of substance read from obc file
:    cini_sed_n() : real, initial concentration in sediment (quantity/kg of 
:                   dry sediment)  (only if cppkey MUSTANG)
:    cobc_wat_n() : real, boundaries uniform and constant concentration 
:                   (kg/m3)
:    tocd_n() : real, critical stress of deposition (N/m2) 
:    ros_n()  : real, density of particle (kg/m3)
:    ws_free_opt_n() : integer, choice of free settling formulation : 
:                      0 constant, 1 Van Leussen, 2 Winterwerp, 3 Wolanski
:    ws_free_min_n() : real, minimum setling velocity (m/s)
:    ws_free_max_n() : real, maximum setling velocity (m/s)
:    ws_free_para_n(1:4,num substance) : 4 additional parameters
:    ws_hind_opt_n() : choice of hindered settling formulation : 
:                      0 no hindered settling, 1 Scott, 2 Winterwerp, 
:                      3 Wolanski
:    ws_hind_para_n(1:2,num substance) : 2 additional parameters 
:
&nmlmuds
    name_var_n(1)='MUD'
      long_name_var_n(1)='MUD'
      standard_name_var_n(1)='MUD'
      unit_var_n(1)='kg.m-3'
      flx_atm_n(1)=0.0
      cv_rain_n(1)=0.0
      cini_wat_n(1)=0.02
      cobc_wat_n(1)=0.02
      cini_sed_n(1)=0.2
      cini_air_n(1)=0.0
      l_out_subs_n(1)=.TRUE.
      init_cv_name_n(1)='MUD'
      obc_cv_name_n(1)='MUD'
      tocd_n(1)=1.
      diam_n(1)=0.
      ros_n(1)=2600.0
      ws_free_opt_n(1)=0
      ws_free_min_n(1)=0.0005
      ws_free_max_n(1)=0.0005
      ws_free_para_n(1,1)=0.0,  
      ws_free_para_n(2,1)=0.0, 
      ws_free_para_n(3,1)=0.0, 
      ws_free_para_n(4,1)=0.0
      ws_hind_opt_n(1)=0
      ws_hind_para_n(1,1)=0.0 ,  
      ws_hind_para_n(2,1)=0.0 /
