MAIN_DIR = "";

# sometimes you have to set main directory, e.g. on Lengau working in Lustre:
# MAIN_DIR = "/mnt/lustre/users/my_account/build/";

domain
{
#
# domain setup in [meters]
#   x - streamwise, y - spanwise, z - wall-normal directions
#
    x = 0.0; y = 0.0; z = 0.0;              # point of origin
    length = 400.0; width = 200.0; height = 80.0;   # domain length(x), width(y) and height(z)
}
# -----------------------------------------------------------------------------

time
{
    begin = 0.0; 
    end = 50.0 * 3600.0;    # start and end time of integration [s]

    dt = 0.2;       # time step [s]

    # use_calendar = false;     # optional, default = false
    calendar 
    {
        mode = "local"; 
        # mode = "local" - local time
        # mode = "local-UTC" - local UTC time
        # mode = "set" - prescribed time & date as 
        #       [year, month, day, hour, min, sec, UTC_offset] values

        year = 2020;
        month = 9;
        day = 1;
        hour = 12;
        min = 0;
        sec = 0.0;
        UTC_offset = 3;
    }
}
# -----------------------------------------------------------------------------

grid
{
    type = "uniform";       # type = "uniform" || "stretched" || "stretched-up" || "z-coord-ascii"

    filename = "z-coord.txt";   # argument for type = "z-coord-ascii"

    cx = 80; cy = 40; cz = 16;  # number of cells in each direction

    ksi_z = 1.2;            # near-wall grid stretching parameter

    adaptive {
        # mode = false;     # enable adaptive grid [optional, default = false]

        beta = 0.3;     # relaxation time scale [<= 1]

        dz_min = 0.25 * (domain.height / grid.cz);  # min grid step
        dz_max = 4.0 * (domain.height / grid.cz);   # max grid step

        # --- adaptation parameters
        TKE_threshold_coeff = 0.1;  # threshold coeff. to define hbl
        hbl_max_coeff = 1.1;        # boundary layer height multiplier
        C_smooth_coeff = 5.0;       # number of cells in smoothing region

        # --- begin & end time of adaptation [optional, default: all integration period]
        # begin = time.begin; end = time.end;

        nskip = 1;      # adaptation once in nskip iterations, each iteration := 1
    }
}
# -----------------------------------------------------------------------------

mpi_setup
{
#
# MPI-process distribution
#   in 'mpirun -np [N]' [N] overrides config specs if differs
#
    dimx = 2; dimy = 2; dimz = 1;
}
# -----------------------------------------------------------------------------

phys
{   
    f = 0.0;                # coriolis frequency [1/s]

    nu = 1.25 * 0.00001;            # kinematic viscosity [m^2/s]
    xi = (1.0 / 0.7) * nu;          # thermal diffusivity [m^2/s]
    
    rho_ref = 1.25;             # reference density of air [kg/m^3]

    g = 9.81;               # gravitational acceleration [m/s^2]
    Theta_ref = 288.15;         # reference temperature [K]

    # --- no buoyancy
    beta = 0.0;                 # = g * thermal expansion coefficient = g / Theta_ref [m/(K*s^2)]
}
# -----------------------------------------------------------------------------

# optinally define state variables
#  default defs. depend on model configuration 
state_def
{
    # Theta_p = false;
    # Tabs = false; 

    # Rho = false;
    # Rho_ideal = false;

    # Exner_pz = false;
    # Pressure_ref_pz = false;

    # Qliquid = false;
    # Qsolid = false;
    # Qvapor = false;

    # Qvs_water = false; Pvs_water = false;
    # Qvs_ice = false; Pvs_ice = false;
}
# -----------------------------------------------------------------------------

topography
{
    mode = "hand";  # topography def. mode
                # mode = "hand" -- define only 'patches' in configuration file
                # mode = "ascii-mask" -- read height map from file

    # --- using file height map parameters
    # mode = "ascii-mask";
    # filename = "map-ex.txt";      # filename path
    # xmin = domain.x;          # map -x coordinates in computation domain
    # xmax = domain.x + domain.length;
    # ymin = domain.y;          # map -y coordinates in computation domain
    # ymax = domain.y + domain.width;
    # height_scale = 1.0;           # scale height factor

    npatch = 1;         # number of patches     
    patch_1 {
        type = "box";           # patch type: "box" || "hill"
        
        xmin = 15.0; xmax = 35.0;   # patch dimensions
        ymin = 10.0; ymax = 90.0;
        height = 20.0;

        xperiod = 50.0;         # optional periodicity in -x
        yperiod = 100.0;                # optional periodicity in -y
    }
}
# -----------------------------------------------------------------------------

geo_wind
{
# NOTE: skipped if mode not set
#   forcing priority: [t,z], [t], [const]

    # --- geostrophic wind components
    U = 0.0; V = 0.0;
}
# -----------------------------------------------------------------------------

external_pressure_grad
{
# NOTE: skipped if mode not set
#   forcing priority: [t,z], [t], [const]

    # --- pressure gradient components [optional]
    dPdx = -0.0004;         # [Pa/m]
    # dPdy = 0.0;               # [Pa/m]
}
# -----------------------------------------------------------------------------

subsidence 
{
}
# -----------------------------------------------------------------------------

external_tendency
{
}
# -----------------------------------------------------------------------------

nudging
{
}
# -----------------------------------------------------------------------------

rayleigh_friction
{
}
# -----------------------------------------------------------------------------

surface
{
    Theta {
        mode = "const";

        # --- fixed surface temperature
        value = 288.15;     # initial surface temperature [K]
    }
    Qhum {
        # --- predefined mode [land surface model]
        mode = "lsm";
    }

    z0_m = 0.1;     # aerodynamic roughness [m]
    z0_h = 0.1;     # heat roughness [m]

    kappa = 0.4;        # von Karman constant
    Pr_t_0 = 1.0;       # turbulent Prandt number (neutral)

    # --- stability function coefficients
    Cm = 4.8;
    Ch = 7.8;

    alpha_m = 16.0;
    alpha_h = 16.0;

    # --- latent heat flux alpha/beta model
    lhflux_alpha = 1.0;
    lhflux_beta = 0.025;
}
# -----------------------------------------------------------------------------

initial_conditions
{
    # optional [U], [V]
    #   if not set initial profiles are set to match geostrophic wind

    U {
        # mode = "half-channel";
        # bulk = 6.0;
    }

    Theta { 
        # --- predefined mode
        mode = "const";

        surface_value = 288.15; # initial boundary layer temperature [K]
        height = 0.0;       # boundary layer height [m]
        grad_z = 0.0;       # humidity gradient above boundary layer [kg/(kg*m)]
    }

    Qhum { 
        # --- predefined mode
        mode = "mixed-layer";

        surface_value = 0.0025; # initial boundary layer humidity [kg/kg]
        height = 0.0;       # boundary layer height [m]
        grad_z = 0.0;       # humidity gradient above boundary layer [kg/(kg*m)]
    }
}
# -----------------------------------------------------------------------------

damping
{
    is_enabled = false;

    # use_avgxy_ref = false;        # damp to -xy average profile [optional]

    f = 0.2;                # damping frequency [1/s], = 0.2 (WRF model)

    # --- damping layer [z1, z2]
    z1 = domain.z + 0.75 * domain.height;   # [m]
    z2 = domain.z + domain.height;      # [m]
}
# -----------------------------------------------------------------------------

les
{
    is_dynamic_momentum = true;
    is_dynamic_scalar = true;

    is_ssm_mixed_momentum = false;
    is_ssm_mixed_scalar = false;

    is_amd_model = false;       # use AMD subgrid model 
                    # dynamic, ssm keys not supported, have to be := false


    # --- SSM model params
    C_ssm_momentum = 1.0;
    C_ssm_scalar = 1.0;


    # --- static LES model params
    C_smag = 0.08;          # GABLS-1 fit = 0.08
                    # Lilly = 0.17
    Prandtl_sgs = 0.7;      # subgrid scale Prandtl [0.4, 1.0]  


    # --- dynamic LES model params
    dynamic {
        # --- dynamic coefficient = (C_{s} * delta_{g})^2 clipping
        C_smag_max = 0.25;
        Prandtl_sgs_min = 0.4;

        alpha = 1.73;       # test-to-base filter width ratio

        avg_mode = "lagrange";  # "none", "plane", "filter", "lagrange"

        nskip = 3;
        use_transport = false;

        C_T_lagrange_momentum = 1.5;
        C_T_lagrange_scalar = 3.0;
    }

    base_filter_reset = false;
    test_filter_reset = false;
    clip_filter_reset = false;
}
# -----------------------------------------------------------------------------

passive_tracers
{
    # num = 2;  # number of tracers, skipped if not defined

    # --- each tracer field defines diffusivity & surface values
    tracer_1 { 
        diffusivity = phys.xi;
 
        surface { 
            flux = -0.01;

            # --- setting localized source, all surface if not defined
            xmin = 180.0; xmax = 220.0;
            ymin = 180.0; ymax = 220.0;

            # --- active in [begin, end], [time.begin, time.end] if not defined
            begin = 7.0 * 3600.0;
            # end = time.end;
        }
    }

    tracer_2 {
        # name = "tracer[2]";   # optional tracer name
 
        diffusivity = phys.xi; 

        # --- setting 'life-time' using decay frequency [1/s] [optional]
        # f_decay = 1.0 / 600.0;

        surface {
            flux = -0.02;

            # --- active in [begin, end], [time.begin, time.end] if not defined
            begin = 7.0 * 3600.0;
            # end = time.end;    
        }
    }
}
# -----------------------------------------------------------------------------

# particle simulation setup
#  used only if INCLUDE_PARTICLES is defined, see [model-defines.h]
ptcl
{
    is_passive_transport = false;       # passive particles flag
    
    # --- particle parameters for all sources
    density = 1000.0;           # particle density [kg/m^3]
    diameter = 0.000001;            # particle diameter [m]

    g = -9.81;              # gravity acceleration [m/s^2]

    # f_decay = 1.0 / 100.0;        # optional decay constant [1/s]
                        # half-life = ln(2) / f

    # --- number of sources
    nsources = 1;

    source_1 {
        n = 524288 * 8;             # number of particles to release
        begin = 5.0 * 3600.0;           # release time
        end = time.end;         # instant release if not defined

        # --- setting flux [lower priority than 'n' -- number of particles]
        #   both begin & end must be specified -- not instant source
        # flux = 10.0;
        # flux_direction = "X";

        # --- source volume
        xmin = domain.x + 50.0 - 10.0; xmax = domain.x + 50.0 + 10.0;
        ymin = domain.y;               ymax = domain.y + domain.width;
        zmin = domain.z;               zmax = domain.z + 5.0;
    }

    # --- number of sinks [optional]
    nsinks = 1;

    sink_1 {
        # --- optional, default mode = "inside"
        mode = "outside";       # "inside" || "outside"

        # --- define volume
        xmin = domain.x;              xmax = domain.x + domain.length;
        ymin = domain.y - 0.5 * domain.width; ymax = domain.y + 1.5 * domain.width;
        zmin = domain.z + 0.01;           zmax = domain.z + domain.height;      
    }
}
# -----------------------------------------------------------------------------

# particle tracking setup
#  used only if INCLUDE_PARTICLES_TRACKING is defined, see [model-defines.h]
ptcl_track
{
    is_passive_transport = ptcl.is_passive_transport;
    
    # --- particle parameters for all sources
    density = ptcl.density;     # particle density [kg/m^3]
    diameter = ptcl.diameter;   # particle diameter [m]

    g = ptcl.g;         # gravity acceleration [m/s^2]

    # f_decay = ptcl.f_decay;       # optional decay constant [1/s]
                        # half-life = ln(2) / f

    group_max_size = 256;           # max number of particles per group
    max_memory = 10 * 1024 * 1024;      # max memory in bytes for keeping trajectories in memory

    # --- number of sources
    nsources = 1;

    source_1
    {
        n = 128;        # number of particles to release
        begin = 8.0 * 3600.0;   # release time

        # --- setting flux [lower priority than 'n' -- number of particles]
        #   both begin & end must be specified -- not instant source
        # flux = 100.0;
        # flux_direction = "Z";

        # --- source volume
        xmin = domain.x + 0.4 * domain.length; xmax = domain.x + 0.6 * domain.length;
        ymin = domain.y + 0.4 * domain.width; ymax = domain.y + 0.6 * domain.width;
        zmin = domain.z; zmax = domain.z + 0.1 * domain.height;
    }

    # --- number of sinks [optional]
    nsinks = 0;     
}
# -----------------------------------------------------------------------------

# canopy setup
#  used only if INCLUDE_CANOPY_DRAG is defined, see [model-defines.h]
canopy
{
    Cd = 0.15;
    drag_type = "non-linear"; # || "linearized" || "mean"

    num = 0;
    patch_1 { 
        type = "sharp"; # || "fancy" || "obs"

        # --- patch volume
        xmin = domain.x; xmax = domain.x + domain.length;
        ymin = domain.y; ymax = domain.y + domain.width;
        zmin = domain.z; zmax = domain.z + 50.0;

        # --- make patch 'periodic' in -x and/or -y directions
        #   single patch if not defined
        # xperiod = 1.0;
        # yperiod = 1.0;

        LAI = 1.0;
        # --- set zm - height of max(LAD) for type = "obs":
        # zm = zmin + 0.8 * (zmax - zmin);

        # --- OR: set a file
        # type = "sharp-map";
        # filename = "map-ex.txt";

        # switch_ij_order = false;  # [optional, default = false]
        # normalize_height = 1.0;   # [optional, default = 1.0]
    }
}
# -----------------------------------------------------------------------------

poisson
{
#
# Poisson equation solver setup
#
    # use_cg_solver = false;        # use CG as base solver [optional, default = BiCGstab]

    retol = 0.0001; abstol = 0.00001;   # relative and absolute tolerance
    miniters = 1; maxiters = 100;       # minimum and maximum number of iterations

    piters = 1;             # number of preconditioner (multigrid) iterations

    multigrid 
    {
        ngrid = 5;          # number of grids in multigrid sequence (= [0] - auto definition)

        down_iters = 2;         # number of smoother iterations on fine->coarse traverse
        up_iters = 3;           # number of smoother iterations on coarse->fine traverse
        direct_iters = 5;       # number of smoother iterations on coarsest grid

        smooth_up_omega = 1.84;     # relaxation value on coarse->fine traverse
        smooth_up_omega_fine = 1.64;    # relaxation value on reaching finest grid
    }
}
# -----------------------------------------------------------------------------

output 
{
# NOTE: netcdf output is enabled only if INCLUDE_NETCDF is defined in [nse-sys.h]

    DIR = MAIN_DIR + "output/";     # output directory
    make_unique_DIR = true;     # make output directory unique for each run

    convert_dsq_to_tecplot = true;  # convert series .dsq output to .plt [tecplot] format
                        #   *: on model completion only
    # convert_dsq_to_netcdf = false;    # convert series .dsq output to .nc [netcdf] format
                        #   *: on model completion only

    num = 1;            # number of output units

    unit_1 
    {
        SUBDIR = "";                # unit sub-directory

        begin = 1.0 * 3600.0;           # start time [s] for writing output
        dt = 1.0 * 3600.0;          # time step [s] for writing output

        # --- output subdomain [optional, applicable in 3D output only]
        xmin = domain.x; xmax = domain.x + domain.length;   # -x output domain setup
        ymin = domain.y; ymax = domain.y + domain.width;    # -y output domain setup
        zmin = domain.z; zmax = domain.z + domain.height;   # -z output domain setup

        # --- output controls [default, if not defined, value is 'false']
        cntrl_avgxy_plt = true;     # 1D -xy averaged .plt fields
        cntrl_avgxy_netcdf = false;     # 1D -xy averaged netcdf fields

        cntrl_3d_plt = true;            # 3D .plt fields
        cntrl_3d_bin = false;           # 3D .nsx fields
        cntrl_3d_netcdf = false;        # 3D netcdf fields

        cntrl_geometry_3d_plt = false;      # geometry 3D .plt fields
        cntrl_geometry_3d_netcdf = false;   # geometry 3D netcdf fields

        cntrl_topography_plt = true;        # topography .plt fields
        cntrl_topography_netcdf = false;    # topography netcdf fields

        cntrl_2d_plt = false;           # 2D .plt fields
        cntrl_2d_netcdf = false;        # 2D netcdf fields

        cntrl_surface_plt = true;       # surface .plt fields
        cntrl_surface_netcdf = false;       # surface netcdf fields

        cntrl_grid_plt = false;         # grid .plt data
        cntrl_grid_netcdf = false;      # grid netcdf data

        cntrl_meteo_avgxy_plt = false;      # 1D -xy averaged meteo forcing .plt fields
        cntrl_meteo_all_plt = false;        # all meteo forcing .plt fields

        # --- output keys for filtered fields
        cntrl_filtered_3d_plt = false;
        # filter { kxmin = 0; kxmax = 0; kymin = 0; kymax = 5; is_remove_mean = true; }

        # --- spectrum output
        spectrum
        {
            # --- controls
            x_cntrl = true;
            y_cntrl = true;
            xy_cntrl = true;

            # np = 2;       # number of z planes, skipped if not defined
            z_1 = 50.0; 
            z_2 = 100.0;

            # --- additional options for 1d & 2d spectrum, default all = true if not defined
            # is_remove_mean_1d = true;
            # is_centered_fft_1d = true;

            # is_remove_mean_2d = true;
            # is_centered_fft_2d = true;
            # is_log10_2d = true;
        }

        # --- particles & trajectories output
        #  used only if INCLUDE_PARTICLES is defined
        cntrl_ptcl_bin = false;         # particles binary output
        cntrl_ptcl_plt = true;          # particles .plt output
        cntrl_ptcl_coords_plt = false;      # particles coordinates .plt output
        #  used only if INCLUDE_PARTICLES_TRACKING is defined
        cntrl_ptcl_traj_bin = false;        # particles trajectories binary output
        cntrl_ptcl_traj_plt = false;        # particles trajectories .plt output

        # --- profiles [= 0 if not defined]
        x_profile_num = 0;
        y_profile_num = 0;
        z_profile_num = 0;
        # --- e.g.:
        x_profile_1 { y = domain.y + 0.5 * domain.width; z = domain.z + 0.5 * domain.height; }

        # --- slices [ = 0 if not defined]
        xy_slice_num = 0;
        xz_slice_num = 0;
        yz_slice_num = 0;
        # --- e.g.: 
        xy_slice_1 { z = domain.z + 0.5 * domain.height; }
    }

    screen {
        begin = time.begin; # start time [s] of onscreen output

        # nskip = 360;      # output once in nskip iterations, each iteration := 1
        dt = 0.05 * 3600.0; # output time step [s], --higher-- priority than 'nskip'

        # --- screen controls [optional, default = true]
        # cntrl_status = true;
        # cntrl_progress_bar = true;
        
        # --- screen controls [optional, default = false]
        # cntrl_terminal_mode = false;
    }
}
# -----------------------------------------------------------------------------

checkup
{
    # --- additional checkups [InF, NaN values etc.]
    begin = 0.0;        # start time of checks

    nskip = 3600;       # check once in nskip iterations, each iteration := 1
    # dt = 1.0 * 3600.0;    # check time step, --higher-- priority than 'nskip'
}
# -----------------------------------------------------------------------------

dump 
{
    DIR = MAIN_DIR + "dump/";   # dump directory

    begin = 10.0 * 3600.0;      # start time [s] for writing model dump
    dt    = 10.0 * 3600.0;      # time step [s] for writing model dump
}
# -----------------------------------------------------------------------------

startup
{
    DIR = MAIN_DIR + "init/";   # initial conditions directory
}
# -----------------------------------------------------------------------------

series
{
    begin = 60.0;       # start time [s]

    # nskip = 2;        # calculate once in nskip iterations, each iteration := 1
    dt = 1.0;       # time step [s], --higher-- priority than 'nskip'

    # --- point flow measurements
    point_set
    {
        # mode = "define";  # optional point set mode
                    #  = "define" [default] || "grid-xy" 

        # np = 3;   # number of points, skipped if not defined
        point_1 { x = domain.x + 0.5 * domain.length; y = domain.y + 0.5 * domain.width; z = 25.0; }
        point_2 { x = domain.x + 0.5 * domain.length; y = domain.y + 0.5 * domain.width; z = 50.0; }
        point_3 { x = domain.x + 0.5 * domain.length; y = domain.y + 0.5 * domain.width; z = 100.0; }

        # --- OR: set point set grid on z=const planes
        # mode = "grid-xy";

        # --- domain
        # x = domain.x; y = domain.y;
        # length = domain.length; width = domain.width;

        # --- grid dimensions, number of edges
        # nx = 7; ny = 5;
        # --- number of z=const planes
        # nz = 3;
        # z_1 = 25.0;
        # z_2 = 50.0;
        # z_3 = 100.0;
    }

    # --- [xy] averaged energy at fixed 'z'
    energy_avgxy_set 
    {
        # np = 2;   # number of z planes, skipped if not defined
        z_1 = 50.0; 
        z_2 = 100.0;
    }

    # --- [xy] averaged fluxes at fixed 'z'
    flux_avgxy_set
    {
        # np = 2;   # number of z planes, skipped if not defined
        z_1 = 50.0;
        z_2 = 100.0;
    }

    # --- additional parameters
    #   --- TKE hbl def. [optional]
    # TKE_hbl_threshold_stable = 0.3;
    # TKE_hbl_threshold_unstable = 0.1;

    #   --- max length to hold data in memory [optional]
    # max_mem_length = 100 * 1024;
}
# -----------------------------------------------------------------------------

spectrum_series
{
    begin = time.begin; # start time
    
    nskip = 1;      # calculate once in nskip iterations, each iteration := 1
    # dt = 1.0;     # time step, --higher-- priority than 'nskip'

    # num = 3;      # number of series, skipped if not defined

    # --- wavevenumbers in: - kxmax <= kx <= kmax, 0 <= ky <= kymax 
    unit_1 { zp = domain.z + 0.3 * domain.height; kxmax = 3; kymax = 3; }
    unit_2 { zp = domain.z + 0.2 * domain.height; kxmax = 3; kymax = 3; }
    unit_3 { zp = domain.z + 0.1 * domain.height; kxmax = 3; kymax = 3; }

    #   --- max length to hold data in memory [optional]
    # max_mem_length = 100 * 1024;
}
# -----------------------------------------------------------------------------

time_scan
{
# NOTE: dump is not supported for time scans

    begin = 60.0;       # scan start time [s]

    # nskip = 1000;     # calculate once in nksip iterations, each iteration := 1
    dt = 60.0;      # scan time step [s], --higher-- priority than 'nskip'

    # --- optionally set output variables

    cntrl_grid = false;     # all keys, optional, default = all 'false'
    cntrl_grid {
        # dz = true;

        # --- cell center & edge coordinates
        # pz = true; 
        # ez = true;

        # --- only in adaptive grid mode
        # monitor_function = true;
    }

    cntrl_avgxy = true;     # all keys, optional, default = all 'false'
    cntrl_avgxy {
        # U = true;
        # V = true;
        # W = true;

        # Theta = true;
        # Theta_p = true;
        # Tabs = true;

        # Q = true;
        # Qvapor = true;

        # UW_flux = true;
        # VW_flux = true;
        # TW_flux = true;
        # QW_flux = true;

        # U_variance = true;
        # V_variance = true;
        # W_variance = true;
        # Theta_variance = true;
        # Q_variance = true;
    }

    cntrl_z_profile = false;    # all keys, optional, default = all 'false'
    cntrl_z_profile {
        # U = true;
        # V = true;
        # W = true;

        # Theta = true;
        # Theta_p = true;
        # Tabs = true;

        # Q = true;
        # Qvapor = true;
    }
    
    z_profile_num = 0;
    z_profile_1 { x = domain.x + 0.5 * domain.length; y = domain.y + 0.5 * domain.width; }
}
# -----------------------------------------------------------------------------

stats
{
    num = 2;

    unit_1 {
        begin = time.end - 4.0 * 3600.0;        # start time for averaging
        end = time.end;     # end time for averaging, to \infty if not defined  

        nskip = 10;
        axis = "XYZ";
        type = "energy-eq";     

        output.SUBDIR = "stat_end/";
        dump.SUBDIR = "stat_end/";

        # --- regular mode [optional] -- shifts accumulation window
        # is_regular = false;

        # --- ensemble mode [optional] -- ensemble averaging
        # is_ensemble = false;
    }
    unit_2 {
        begin = time.end - 8.0 * 3600.0;        # start time for averaging
        end = time.end - 4.0 * 3600.0;      # end time for averaging, to \infty if not defined  

        nskip = 10;
        axis = "XYZ";
        type = "energy-eq";     

        output.SUBDIR = "stat_end-1/";
        dump.SUBDIR = "stat_end-1";

        # --- regular mode [optional] -- shifts accumulation window
        # is_regular = false;

        # --- ensemble mode [optional] -- ensemble averaging
        # is_ensemble = false;
    }
}
# -----------------------------------------------------------------------------

pdf
{
    # num = 1;

    unit_1 { 
        begin = 7.5 * 3600.0;
        end = 9.0 * 3600.0;
        dt = 1.0;

        zp = domain.z + 0.25 * domain.height;

        output.SUBDIR = "pdf/";
        dump.SUBDIR = "pdf/";

        cntrl_default = true;
        nbins_default = 256;

        # --- reset options: [begin, reset_time] -- find histogram parameters 
        #   if not defined set min-max range for each variable in controls
        reset_time = 8.0 * 3600.0;
        reset_safety = 0.25;    # relative to min-max found
                    # e.g.: min' = min - reset_safety * (max - min)

        # --- regular mode [optional] -- shifts accumulation window
        # is_regular = false;

        # --- change default control using keys
        # cntrl { 
        #   U = true; V = true; W = true; Pressure = true;
        #   U_grad_x = true; U_grad_y = true; U_grad_z = true;
        #   V_grad_x = true; V_grad_y = true; V_grad_z = true;
        #   W_grad_x = true; W_grad_y = true; W_grad_z = true;
        #   Suv = true; Suw = true; Svw = true;         # strain-tensor
        #   Omega_uv = true; Omega_uw = true; Omega_vw = true;  # vorticity-tensor
        #   Theta = true;
        #   Theta_grad_x = true; Theta_grad_y = true; Theta_grad_z = true;
        #   Q = true;
        #   Q_grad_x = true; Q_grad_y = true; Q_grad_z = true;

        # --- tracers 'C' correspond to passive_tracers {} def. [use index in: 1...passive_tracers.num]
        #   C1 = true;
        #   C1_grad_x = true; C1_grad_y = true; C1_grad_z = true;
        #   C2 = true;
        #
        # }

        # --- setting min-max for any variable
        #   this has to be defined if 'reset_time' is skipped, e.g.:
        # U { min = -1.0; max = 1.0; }

        # --- setting number of bins for any variable, e.g.:
        # U { nbins = 512; }
    }
}
# -----------------------------------------------------------------------------

joint_pdf
{
    # num = 1;

    unit_1 { 
        begin = 7.5 * 3600.0;
        end = 9.0 * 3600.0;
        dt = 1.0;

        zp = domain.z + 0.25 * domain.height;

        output.SUBDIR = "joint-pdf/";
        dump.SUBDIR = "joint-pdf/";

        cntrl_default = true;
        nxbins_default = 256;
        nybins_default = 256;

        # --- reset options: [begin, reset_time] -- find histogram parameters 
        #   if not defined set min-max range for each variable in controls
        reset_time = 8.0 * 3600.0;
        reset_safety = 0.25;    # relative to min-max found
                    # e.g.: min' = min - reset_safety * (max - min)

        # --- regular mode [optional] -- shifts accumulation window
        # is_regular = false;

        # --- change default control using keys
        # cntrl { 
        #   UV = true; UW = true; VW = true;
        #   PSuu = true; PSvv = true; PSww = true;
        #   PSuv = true; PSuw = true; PSvw = true;
        #   TU = true; TV = true; TW = true;
        #   QU = true; QV = true; QW = true;
        #   QT = true;

        # --- tracers 'C' correspond to passive_tracers {} def. [use index in: 1...passive_tracers.num]
        #   C1U = true; C1V = true; C1W = true; 
        #   C1T = true; C1Q = true;
        # --- tracer/tracer joint pdf, using strict upper diagonal notation, e.g.:
        #   C1C2 = true; C1C3 = true; C2C3 = true;
        #
        # }

        # --- setting min-max for any variable
        #   this has to be defined if 'reset_time' is skipped, e.g.:
        # UV { xmin = -1.0; xmax = 1.0; ymin = - 1.0; ymax = 1.0; }

        # --- setting number of bins for any variable, e.g.:
        # UV { nxbins = 512; nybins = 512; }
    }
}
# -----------------------------------------------------------------------------

runtime_filter
{
    # begin = 600.0;    # set a regular filter
    # dt = 600.0;

    mark = 600.0;       # OR: apply filter at time = mark only
                # mark has --higher-- priority than regular mode

    # num = 0;  # number of filters applied, output = sum of all units
            # u = u_f[1] + u_f[2] + ...
            # --- skipped if not defined

    unit_1 { 
        # --- keep some rolls
        mode = "include";
        is_remove_mean = false;

        kxmin = 0; kxmax = 0;
        kymin = 0; kymax = 5;
    }

    unit_2 {
        # --- add small scale disturbances
        mode = "exclude";   # adding (u - u_f)
        is_remove_mean = false;

        kxmin = 0; kxmax = 10;
        kymin = 0; kymax = 10;
    }
}
# -----------------------------------------------------------------------------