diff --git a/__pycache__/dearpygui.cpython-311.pyc b/__pycache__/dearpygui.cpython-311.pyc deleted file mode 100644 index 3ffc01fc82928ad4bb9532d76ca322d277dcf84f..0000000000000000000000000000000000000000 Binary files a/__pycache__/dearpygui.cpython-311.pyc and /dev/null differ diff --git a/__pycache__/dpg_gui_styles.cpython-311.pyc b/__pycache__/dpg_gui_styles.cpython-311.pyc deleted file mode 100644 index ea53eb3543091e296ae5e391615f415e06bb4b2e..0000000000000000000000000000000000000000 Binary files a/__pycache__/dpg_gui_styles.cpython-311.pyc and /dev/null differ diff --git a/config-parser/parser-cli.exe b/config-parser/parser-cli.exe index 24af2e40907862e1c80186593d25c5e10edb24fc..55c8e34fa0a08e91616caab205c747882ed83a71 100644 Binary files a/config-parser/parser-cli.exe and b/config-parser/parser-cli.exe differ diff --git a/config.txt b/config.txt index 29f214ffaf6ddad1be603feed86951e8aed13083..ccd18ce4fd3ac017333c962d8008fde5c36075eb 100644 --- a/config.txt +++ b/config.txt @@ -9,68 +9,66 @@ 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) + 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] + begin = 0.0; + end = 50.0 * 3600.0; # start and end time of integration [s] - dt = 0.2; # time step [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 + # 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; - } + year = 2020; + month = 9; + day = 1; + hour = 12; + min = 0; + sec = 0.0; + UTC_offset = 3; + } } # ----------------------------------------------------------------------------- grid { - type = "uniform"; # grid type = "uniform" || - # "stretched" || "stretched-up" || - # "z-coord-ascii" + type = "uniform"; # type = "uniform" || "stretched" || "stretched-up" || "z-coord-ascii" - filename = "z-coord.txt"; # argument for type = "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 + cx = 80; cy = 40; cz = 16; # number of cells in each direction - ksi_z = 1.2; # near-wall grid stretching parameter + ksi_z = 1.2; # near-wall grid stretching parameter - adaptive { - # mode = false; # enable adaptive grid [optional, default = false] + adaptive { + # mode = false; # enable adaptive grid [optional, default = false] - beta = 0.3; # relaxation time scale [<= 1] + 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 + 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 + # --- 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; + # --- 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 - } + nskip = 1; # adaptation once in nskip iterations, each iteration := 1 + } } # ----------------------------------------------------------------------------- @@ -80,24 +78,24 @@ mpi_setup # MPI-process distribution # in 'mpirun -np [N]' [N] overrides config specs if differs # - dimx = 2; dimy = 2; dimz = 1; + dimx = 2; dimy = 2; dimz = 1; } # ----------------------------------------------------------------------------- phys -{ - f = 0.0; # coriolis frequency [1/s] +{ + 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] + 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] + 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)] + # --- no buoyancy + beta = 0.0; # = g * thermal expansion coefficient = g / Theta_ref [m/(K*s^2)] } # ----------------------------------------------------------------------------- @@ -105,71 +103,71 @@ phys # default defs. depend on model configuration state_def { - # Theta_p = false; - # Tabs = false; + # Theta_p = false; + # Tabs = false; - # Rho = false; - # Rho_ideal = false; + # Rho = false; + # Rho_ideal = false; - # Exner_pz = false; - # Pressure_ref_pz = false; + # Exner_pz = false; + # Pressure_ref_pz = false; - # Qliquid = false; - # Qsolid = false; - # Qvapor = false; + # Qliquid = false; + # Qsolid = false; + # Qvapor = false; - # Qvs_water = false; Pvs_water = false; - # Qvs_ice = false; Pvs_ice = 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 + 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 + # --- 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; + 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 - } + 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] +# forcing priority: [t,z], [t], [const] - # --- geostrophic wind components - U = 0.0; V = 0.0; + # --- geostrophic wind components + U = 0.0; V = 0.0; } # ----------------------------------------------------------------------------- external_pressure_grad { # NOTE: skipped if mode not set -# forcing priority: [t,z], [t], [const] +# forcing priority: [t,z], [t], [const] - # --- pressure gradient components [optional] - dPdx = -0.0004; # [Pa/m] - # dPdy = 0.0; # [Pa/m] + # --- pressure gradient components [optional] + dPdx = -0.0004; # [Pa/m] + # dPdy = 0.0; # [Pa/m] } # ----------------------------------------------------------------------------- @@ -195,163 +193,163 @@ rayleigh_friction surface { - Theta { - mode = "const"; + Theta { + mode = "const"; - # --- fixed surface temperature - value = 288.15; # initial surface temperature [K] - } - Qhum { - # --- predefined mode [land surface model] - mode = "lsm"; - } + # --- 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] + 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) + kappa = 0.4; # von Karman constant + Pr_t_0 = 1.0; # turbulent Prandt number (neutral) - # --- stability function coefficients - Cm = 4.8; - Ch = 7.8; + # --- stability function coefficients + Cm = 4.8; + Ch = 7.8; - alpha_m = 16.0; - alpha_h = 16.0; + alpha_m = 16.0; + alpha_h = 16.0; - # --- latent heat flux alpha/beta model - lhflux_alpha = 1.0; - lhflux_beta = 0.025; + # --- 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 + # optional [U], [V] + # if not set initial profiles are set to match geostrophic wind - U { - # mode = "half-channel"; - # bulk = 6.0; - } + U { + # mode = "half-channel"; + # bulk = 6.0; + } - Theta { - # --- predefined mode - mode = "const"; + 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)] - } + 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"; + 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)] - } + 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; + is_enabled = false; - # use_avgxy_ref = false; # damp to -xy average profile [optional] + # use_avgxy_ref = false; # damp to -xy average profile [optional] - f = 0.2; # damping frequency [1/s], = 0.2 (WRF model) + 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] + # --- 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_dynamic_momentum = true; + is_dynamic_scalar = true; - is_ssm_mixed_momentum = false; - is_ssm_mixed_scalar = false; + 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 + 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; + # --- 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] + # --- 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; + # --- 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 + alpha = 1.73; # test-to-base filter width ratio - avg_mode = "lagrange"; # "none", "plane", "filter", "lagrange" + avg_mode = "lagrange"; # "none", "plane", "filter", "lagrange" - nskip = 3; - use_transport = false; + nskip = 3; + use_transport = false; - C_T_lagrange_momentum = 1.5; - C_T_lagrange_scalar = 3.0; - } + C_T_lagrange_momentum = 1.5; + C_T_lagrange_scalar = 3.0; + } - base_filter_reset = false; - test_filter_reset = false; - clip_filter_reset = false; + base_filter_reset = false; + test_filter_reset = false; + clip_filter_reset = false; } # ----------------------------------------------------------------------------- passive_tracers { - # num = 2; # number of tracers, skipped if not defined + # num = 2; # number of tracers, skipped if not defined - # --- each tracer field defines diffusivity & surface values - tracer_1 { - diffusivity = phys.xi; + # --- each tracer field defines diffusivity & surface values + tracer_1 { + diffusivity = phys.xi; - surface { - flux = -0.01; + surface { + flux = -0.01; - # --- setting localized source, all surface if not defined - xmin = 180.0; xmax = 220.0; - ymin = 180.0; ymax = 220.0; + # --- 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; - } - } + # --- 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 + tracer_2 { + # name = "tracer[2]"; # optional tracer name - diffusivity = phys.xi; + diffusivity = phys.xi; - # --- setting 'life-time' using decay frequency [1/s] [optional] - # f_decay = 1.0 / 600.0; + # --- setting 'life-time' using decay frequency [1/s] [optional] + # f_decay = 1.0 / 600.0; - surface { - flux = -0.02; + surface { + flux = -0.02; - # --- active in [begin, end], [time.begin, time.end] if not defined - begin = 7.0 * 3600.0; - # end = time.end; - } - } + # --- active in [begin, end], [time.begin, time.end] if not defined + begin = 7.0 * 3600.0; + # end = time.end; + } + } } # ----------------------------------------------------------------------------- @@ -359,48 +357,48 @@ passive_tracers # 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] + 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] + g = -9.81; # gravity acceleration [m/s^2] - # f_decay = 1.0 / 100.0; # optional decay constant [1/s] - # half-life = ln(2) / f + # f_decay = 1.0 / 100.0; # optional decay constant [1/s] + # half-life = ln(2) / f - # --- number of sources - nsources = 1; + # --- 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 + 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"; + # --- 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; - } + # --- 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; + # --- number of sinks [optional] + nsinks = 1; - sink_1 { - # --- optional, default mode = "inside" - mode = "outside"; # "inside" || "outside" + 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; - } + # --- 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; + } } # ----------------------------------------------------------------------------- @@ -408,41 +406,41 @@ ptcl # 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] + 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] + g = ptcl.g; # gravity acceleration [m/s^2] - # f_decay = ptcl.f_decay; # optional decay constant [1/s] - # half-life = ln(2) / f + # 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 + 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; + # --- number of sources + nsources = 1; - source_1 - { - n = 128; # number of particles to release - begin = 8.0 * 3600.0; # release time + 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"; + # --- 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; - } + # --- 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; + # --- number of sinks [optional] + nsinks = 0; } # ----------------------------------------------------------------------------- @@ -450,34 +448,34 @@ ptcl_track # used only if INCLUDE_CANOPY_DRAG is defined, see [model-defines.h] canopy { - Cd = 0.15; - drag_type = "non-linear"; # || "linearized" || "mean" + Cd = 0.15; + drag_type = "non-linear"; # || "linearized" || "mean" - num = 0; - patch_1 { - type = "sharp"; # || "fancy" || "obs" + 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; + # --- 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; + # --- 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); + 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"; + # --- 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] - } + # switch_ij_order = false; # [optional, default = false] + # normalize_height = 1.0; # [optional, default = 1.0] + } } # ----------------------------------------------------------------------------- @@ -486,24 +484,24 @@ poisson # # Poisson equation solver setup # - # use_cg_solver = false; # use CG as base solver [optional, default = BiCGstab] + # 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 + 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 + piters = 1; # number of preconditioner (multigrid) iterations - multigrid - { - ngrid = 5; # number of grids in multigrid sequence (= [0] - auto definition) + 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 + 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 - } + smooth_up_omega = 1.84; # relaxation value on coarse->fine traverse + smooth_up_omega_fine = 1.64; # relaxation value on reaching finest grid + } } # ----------------------------------------------------------------------------- @@ -511,220 +509,220 @@ 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 + 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 + 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 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 + # --- 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_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_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_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_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_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_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 + 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; } + # --- 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; + # --- 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; + # 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; + # --- 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; - } + # 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 + # --- 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; } + # --- 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; } - } + # --- 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 + 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' + # 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; - } + # --- 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 + # --- 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' + 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 + 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 + 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 + DIR = MAIN_DIR + "init/"; # initial conditions directory } # ----------------------------------------------------------------------------- series { - begin = 60.0; # start time [s] + 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' + # 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" + # --- 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; } + # 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"; + # --- 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; + # --- 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; - } + # --- 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 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; - } + # --- [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; + # --- 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; + # --- 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' + 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 + # 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; } + # --- 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; + # --- max length to hold data in memory [optional] + # max_mem_length = 100 * 1024; } # ----------------------------------------------------------------------------- @@ -732,248 +730,248 @@ time_scan { # NOTE: dump is not supported for time scans - begin = 60.0; # scan start time [s] + 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' + # 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 + # --- optionally set output variables - cntrl_grid = false; # all keys, optional, default = all 'false' - cntrl_grid { - # dz = true; + cntrl_grid = false; # all keys, optional, default = all 'false' + cntrl_grid { + # dz = true; - # --- cell center & edge coordinates - # pz = true; - # ez = true; + # --- cell center & edge coordinates + # pz = true; + # ez = true; - # --- only in adaptive grid mode - # monitor_function = 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; + cntrl_avgxy = true; # all keys, optional, default = all 'false' + cntrl_avgxy { + # U = true; + # V = true; + # W = true; - # Theta = true; - # Theta_p = true; - # Tabs = true; + # Theta = true; + # Theta_p = true; + # Tabs = true; - # Q = true; - # Qvapor = true; + # Q = true; + # Qvapor = true; - # UW_flux = true; - # VW_flux = true; - # TW_flux = true; - # QW_flux = 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; - } + # 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; + 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; + # 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; } + # 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; + 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 + 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"; + nskip = 10; + axis = "XYZ"; + type = "energy-eq"; - output.SUBDIR = "stat_end/"; - dump.SUBDIR = "stat_end/"; + output.SUBDIR = "stat_end/"; + dump.SUBDIR = "stat_end/"; - # --- regular mode [optional] -- shifts accumulation window - # is_regular = false; + # --- 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 + # --- 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"; + nskip = 10; + axis = "XYZ"; + type = "energy-eq"; - output.SUBDIR = "stat_end-1/"; - dump.SUBDIR = "stat_end-1"; + output.SUBDIR = "stat_end-1/"; + dump.SUBDIR = "stat_end-1"; - # --- regular mode [optional] -- shifts accumulation window - # is_regular = false; + # --- regular mode [optional] -- shifts accumulation window + # is_regular = false; - # --- ensemble mode [optional] -- ensemble averaging - # is_ensemble = false; - } + # --- ensemble mode [optional] -- ensemble averaging + # is_ensemble = false; + } } # ----------------------------------------------------------------------------- pdf { - # num = 1; + # num = 1; - unit_1 { - begin = 7.5 * 3600.0; - end = 9.0 * 3600.0; - dt = 1.0; + unit_1 { + begin = 7.5 * 3600.0; + end = 9.0 * 3600.0; + dt = 1.0; - zp = domain.z + 0.25 * domain.height; + zp = domain.z + 0.25 * domain.height; - output.SUBDIR = "pdf/"; - dump.SUBDIR = "pdf/"; + output.SUBDIR = "pdf/"; + dump.SUBDIR = "pdf/"; - cntrl_default = true; - nbins_default = 256; + 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) + # --- 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; + # --- 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; + # --- 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; - # - # } + # --- 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 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; } - } + # --- setting number of bins for any variable, e.g.: + # U { nbins = 512; } + } } # ----------------------------------------------------------------------------- joint_pdf { - # num = 1; + # num = 1; - unit_1 { - begin = 7.5 * 3600.0; - end = 9.0 * 3600.0; - dt = 1.0; + unit_1 { + begin = 7.5 * 3600.0; + end = 9.0 * 3600.0; + dt = 1.0; - zp = domain.z + 0.25 * domain.height; + zp = domain.z + 0.25 * domain.height; - output.SUBDIR = "joint-pdf/"; - dump.SUBDIR = "joint-pdf/"; + output.SUBDIR = "joint-pdf/"; + dump.SUBDIR = "joint-pdf/"; - cntrl_default = true; - nxbins_default = 256; - nybins_default = 256; + 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) + # --- 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; + # --- 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; + # --- 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; - # - # } + # --- 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 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; } - } + # --- 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; + # 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 + 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 + # 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; + unit_1 { + # --- keep some rolls + mode = "include"; + is_remove_mean = false; - kxmin = 0; kxmax = 0; - kymin = 0; kymax = 5; - } + kxmin = 0; kxmax = 0; + kymin = 0; kymax = 5; + } - unit_2 { - # --- add small scale disturbances - mode = "exclude"; # adding (u - u_f) - is_remove_mean = false; + unit_2 { + # --- add small scale disturbances + mode = "exclude"; # adding (u - u_f) + is_remove_mean = false; - kxmin = 0; kxmax = 10; - kymin = 0; kymax = 10; - } + kxmin = 0; kxmax = 10; + kymin = 0; kymax = 10; + } } # ----------------------------------------------------------------------------- diff --git a/config_manager.py b/config_manager.py index ba5a454373931a29717691b9ef7a584b877b7ef1..567d99ff25b26cc1ebb34245d87fac4cc7d2c225 100644 --- a/config_manager.py +++ b/config_manager.py @@ -2,32 +2,43 @@ import re import subprocess class ConfigManager: - def __init__(self, file_path, func): - self.file_path = file_path + def __init__(self, func): + self.file_path = "" self.get_value_func = func + self.lines = [] + self.config_data = {} + + def is_initialized(self): + return self.file_path != "" + def init(self, file_path): + self.lines = [] self.config_data = {} - self.parse_config() + self.file_path = file_path - def parse_config(self): output = subprocess.run(["config-parser/parser-cli", self.file_path], capture_output=True, text=True) for line in output.stdout.split("\n"): match = re.match(r" > (\w+) '(.*)' = *(.*)", line) if match: - value_type, path, value = match.groups() + self.lines.append(match.groups()) + + def construct_dict(self): + if self.config_data: + return - nss = path.split(".") + for value_type, path, value in self.lines: + nss = path.split(".") - cur_ns = self.config_data + cur_ns = self.config_data - for ns in nss[:-1]: - if ns not in cur_ns: - cur_ns[ns] = {} + for ns in nss[:-1]: + if ns not in cur_ns: + cur_ns[ns] = {} - cur_ns = cur_ns[ns] + cur_ns = cur_ns[ns] - cur_ns[nss[-1]] = (path, value_type) + cur_ns[nss[-1]] = (path, value_type) def get_value_str(self, path, value_type): value = self.get_value_func(path, value_type) @@ -40,6 +51,13 @@ class ConfigManager: return '0.0' elif value_type == 'BOOLEAN': return 'false' + else: + if value_type == 'STRING': + return f'"{value}"' + elif value_type == 'BOOLEAN': + return str(value).lower() + elif value_type == 'DOUBLE': + return "{:.7f}".format(value) return str(value) def write_namespace(self, file, ns, ns_name, indent): @@ -54,9 +72,11 @@ class ConfigManager: file.write(" " * indent + "}\n") file.write("\n") - def save_config(self, file_path=None): - if not file_path: - file_path = self.file_path + def save(self): + self.save_as(self.file_path) + + def save_as(self, file_path): + self.construct_dict() indent = 0 with open(file_path, "w", encoding="utf-8") as file: @@ -66,8 +86,6 @@ class ConfigManager: else: file.write(f"{key} = {self.get_value_str(*self.config_data[key])};\n") -file_path = "config.txt" - -cfg_manager = ConfigManager(file_path, lambda p, t: t[0]) - -cfg_manager.save_config("config_my.txt") \ No newline at end of file +# file_path = "config.txt" +# cfg_manager = ConfigManager(file_path, lambda p, t: t[0]) +# cfg_manager.save_config("config_my.txt") \ No newline at end of file diff --git a/config_my.txt b/config_my.txt deleted file mode 100644 index c4c5bd2245ab3411282b1b0b58a230d51487276b..0000000000000000000000000000000000000000 --- a/config_my.txt +++ /dev/null @@ -1,680 +0,0 @@ -MAIN_DIR = S; - -domain -{ - x = D; - y = D; - z = D; - length = D; - width = D; - height = D; -} - - -time -{ - begin = D; - end = D; - dt = D; - - calendar - { - mode = S; - year = I; - month = I; - day = I; - hour = I; - min = I; - sec = D; - UTC_offset = I; - } - -} - - -grid -{ - type = S; - filename = S; - cx = I; - cy = I; - cz = I; - ksi_z = D; - - adaptive - { - beta = D; - dz_min = D; - dz_max = D; - TKE_threshold_coeff = D; - hbl_max_coeff = D; - C_smooth_coeff = D; - nskip = I; - } - -} - - -mpi_setup -{ - dimx = I; - dimy = I; - dimz = I; -} - - -phys -{ - f = D; - nu = D; - xi = D; - rho_ref = D; - g = D; - Theta_ref = D; - beta = D; -} - - -topography -{ - mode = S; - npatch = I; - - patch_1 - { - type = S; - xmin = D; - xmax = D; - ymin = D; - ymax = D; - height = D; - xperiod = D; - yperiod = D; - } - -} - - -geo_wind -{ - U = D; - V = D; -} - - -external_pressure_grad -{ - dPdx = D; -} - - -surface -{ - - Theta - { - mode = S; - value = D; - } - - - Qhum - { - mode = S; - } - - z0_m = D; - z0_h = D; - kappa = D; - Pr_t_0 = D; - Cm = D; - Ch = D; - alpha_m = D; - alpha_h = D; - lhflux_alpha = D; - lhflux_beta = D; -} - - -initial_conditions -{ - - Theta - { - mode = S; - surface_value = D; - height = D; - grad_z = D; - } - - - Qhum - { - mode = S; - surface_value = D; - height = D; - grad_z = D; - } - -} - - -damping -{ - is_enabled = B; - f = D; - z1 = D; - z2 = D; -} - - -les -{ - is_dynamic_momentum = B; - is_dynamic_scalar = B; - is_ssm_mixed_momentum = B; - is_ssm_mixed_scalar = B; - is_amd_model = B; - C_ssm_momentum = D; - C_ssm_scalar = D; - C_smag = D; - Prandtl_sgs = D; - - dynamic - { - C_smag_max = D; - Prandtl_sgs_min = D; - alpha = D; - avg_mode = S; - nskip = I; - use_transport = B; - C_T_lagrange_momentum = D; - C_T_lagrange_scalar = D; - } - - base_filter_reset = B; - test_filter_reset = B; - clip_filter_reset = B; -} - - -passive_tracers -{ - - tracer_1 - { - diffusivity = D; - - surface - { - flux = D; - xmin = D; - xmax = D; - ymin = D; - ymax = D; - begin = D; - } - - } - - - tracer_2 - { - diffusivity = D; - - surface - { - flux = D; - begin = D; - } - - } - -} - - -ptcl -{ - is_passive_transport = B; - density = D; - diameter = D; - g = D; - nsources = I; - - source_1 - { - n = I; - begin = D; - end = D; - xmin = D; - xmax = D; - ymin = D; - ymax = D; - zmin = D; - zmax = D; - } - - nsinks = I; - - sink_1 - { - mode = S; - xmin = D; - xmax = D; - ymin = D; - ymax = D; - zmin = D; - zmax = D; - } - -} - - -ptcl_track -{ - is_passive_transport = B; - density = D; - diameter = D; - g = D; - group_max_size = I; - max_memory = I; - nsources = I; - - source_1 - { - n = I; - begin = D; - xmin = D; - xmax = D; - ymin = D; - ymax = D; - zmin = D; - zmax = D; - } - - nsinks = I; -} - - -canopy -{ - Cd = D; - drag_type = S; - num = I; - - patch_1 - { - type = S; - xmin = D; - xmax = D; - ymin = D; - ymax = D; - zmin = D; - zmax = D; - LAI = D; - } - -} - - -poisson -{ - retol = D; - abstol = D; - miniters = I; - maxiters = I; - piters = I; - - multigrid - { - ngrid = I; - down_iters = I; - up_iters = I; - direct_iters = I; - smooth_up_omega = D; - smooth_up_omega_fine = D; - } - -} - - -output -{ - DIR = S; - make_unique_DIR = B; - convert_dsq_to_tecplot = B; - num = I; - - unit_1 - { - SUBDIR = S; - begin = D; - dt = D; - xmin = D; - xmax = D; - ymin = D; - ymax = D; - zmin = D; - zmax = D; - cntrl_avgxy_plt = B; - cntrl_avgxy_netcdf = B; - cntrl_3d_plt = B; - cntrl_3d_bin = B; - cntrl_3d_netcdf = B; - cntrl_geometry_3d_plt = B; - cntrl_geometry_3d_netcdf = B; - cntrl_topography_plt = B; - cntrl_topography_netcdf = B; - cntrl_2d_plt = B; - cntrl_2d_netcdf = B; - cntrl_surface_plt = B; - cntrl_surface_netcdf = B; - cntrl_grid_plt = B; - cntrl_grid_netcdf = B; - cntrl_meteo_avgxy_plt = B; - cntrl_meteo_all_plt = B; - cntrl_filtered_3d_plt = B; - - spectrum - { - x_cntrl = B; - y_cntrl = B; - xy_cntrl = B; - z_1 = D; - z_2 = D; - } - - cntrl_ptcl_bin = B; - cntrl_ptcl_plt = B; - cntrl_ptcl_coords_plt = B; - cntrl_ptcl_traj_bin = B; - cntrl_ptcl_traj_plt = B; - x_profile_num = I; - y_profile_num = I; - z_profile_num = I; - - x_profile_1 - { - y = D; - z = D; - } - - xy_slice_num = I; - xz_slice_num = I; - yz_slice_num = I; - - xy_slice_1 - { - z = D; - } - - } - - - screen - { - begin = D; - dt = D; - } - -} - - -checkup -{ - begin = D; - nskip = I; -} - - -dump -{ - DIR = S; - begin = D; - dt = D; -} - - -startup -{ - DIR = S; -} - - -series -{ - begin = D; - dt = D; - - point_set - { - - point_1 - { - x = D; - y = D; - z = D; - } - - - point_2 - { - x = D; - y = D; - z = D; - } - - - point_3 - { - x = D; - y = D; - z = D; - } - - } - - - energy_avgxy_set - { - z_1 = D; - z_2 = D; - } - - - flux_avgxy_set - { - z_1 = D; - z_2 = D; - } - -} - - -spectrum_series -{ - begin = D; - nskip = I; - - unit_1 - { - zp = D; - kxmax = I; - kymax = I; - } - - - unit_2 - { - zp = D; - kxmax = I; - kymax = I; - } - - - unit_3 - { - zp = D; - kxmax = I; - kymax = I; - } - -} - - -time_scan -{ - begin = D; - dt = D; - cntrl_grid = B; - cntrl_avgxy = B; - cntrl_z_profile = B; - z_profile_num = I; - - z_profile_1 - { - x = D; - y = D; - } - -} - - -stats -{ - num = I; - - unit_1 - { - begin = D; - end = D; - nskip = I; - axis = S; - type = S; - - output - { - SUBDIR = S; - } - - - dump - { - SUBDIR = S; - } - - } - - - unit_2 - { - begin = D; - end = D; - nskip = I; - axis = S; - type = S; - - output - { - SUBDIR = S; - } - - - dump - { - SUBDIR = S; - } - - } - -} - - -pdf -{ - - unit_1 - { - begin = D; - end = D; - dt = D; - zp = D; - - output - { - SUBDIR = S; - } - - - dump - { - SUBDIR = S; - } - - cntrl_default = B; - nbins_default = I; - reset_time = D; - reset_safety = D; - } - -} - - -joint_pdf -{ - - unit_1 - { - begin = D; - end = D; - dt = D; - zp = D; - - output - { - SUBDIR = S; - } - - - dump - { - SUBDIR = S; - } - - cntrl_default = B; - nxbins_default = I; - nybins_default = I; - reset_time = D; - reset_safety = D; - } - -} - - -runtime_filter -{ - mark = D; - - unit_1 - { - mode = S; - is_remove_mean = B; - kxmin = I; - kxmax = I; - kymin = I; - kymax = I; - } - - - unit_2 - { - mode = S; - is_remove_mean = B; - kxmin = I; - kxmax = I; - kymin = I; - kymax = I; - } - -} - diff --git a/configparsed.txt b/configparsed.txt deleted file mode 100644 index 4d0f6ef783b392c4d7f7fe108d3b4ef023989617..0000000000000000000000000000000000000000 --- a/configparsed.txt +++ /dev/null @@ -1,310 +0,0 @@ - > STRING 'MAIN_DIR' = - > DOUBLE 'domain.x' = 0.000000 - > DOUBLE 'domain.y' = 0.000000 - > DOUBLE 'domain.z' = 0.000000 - > DOUBLE 'domain.length' = 400.000000 - > DOUBLE 'domain.width' = 200.000000 - > DOUBLE 'domain.height' = 80.000000 - > DOUBLE 'time.begin' = 0.000000 - > DOUBLE 'time.end' = 180000.000000 - > DOUBLE 'time.dt' = 0.200000 - > STRING 'time.calendar.mode' = local - > INT 'time.calendar.year' = 2020 - > INT 'time.calendar.month' = 9 - > INT 'time.calendar.day' = 1 - > INT 'time.calendar.hour' = 12 - > INT 'time.calendar.min' = 0 - > DOUBLE 'time.calendar.sec' = 0.000000 - > INT 'time.calendar.UTC_offset' = 3 - > STRING 'grid.type' = uniform - > STRING 'grid.filename' = z-coord.txt - > INT 'grid.cx' = 80 - > INT 'grid.cy' = 40 - > INT 'grid.cz' = 16 - > DOUBLE 'grid.ksi_z' = 1.200000 - > DOUBLE 'grid.adaptive.beta' = 0.300000 - > DOUBLE 'grid.adaptive.dz_min' = 1.250000 - > DOUBLE 'grid.adaptive.dz_max' = 20.000000 - > DOUBLE 'grid.adaptive.TKE_threshold_coeff' = 0.100000 - > DOUBLE 'grid.adaptive.hbl_max_coeff' = 1.100000 - > DOUBLE 'grid.adaptive.C_smooth_coeff' = 5.000000 - > INT 'grid.adaptive.nskip' = 1 - > INT 'mpi_setup.dimx' = 2 - > INT 'mpi_setup.dimy' = 2 - > INT 'mpi_setup.dimz' = 1 - > DOUBLE 'phys.f' = 0.000000 - > DOUBLE 'phys.nu' = 0.000013 - > DOUBLE 'phys.xi' = 0.000018 - > DOUBLE 'phys.rho_ref' = 1.250000 - > DOUBLE 'phys.g' = 9.810000 - > DOUBLE 'phys.Theta_ref' = 288.150000 - > DOUBLE 'phys.beta' = 0.000000 - > STRING 'topography.mode' = hand - > INT 'topography.npatch' = 1 - > STRING 'topography.patch_1.type' = box - > DOUBLE 'topography.patch_1.xmin' = 15.000000 - > DOUBLE 'topography.patch_1.xmax' = 35.000000 - > DOUBLE 'topography.patch_1.ymin' = 10.000000 - > DOUBLE 'topography.patch_1.ymax' = 90.000000 - > DOUBLE 'topography.patch_1.height' = 20.000000 - > DOUBLE 'topography.patch_1.xperiod' = 50.000000 - > DOUBLE 'topography.patch_1.yperiod' = 100.000000 - > DOUBLE 'geo_wind.U' = 0.000000 - > DOUBLE 'geo_wind.V' = 0.000000 - > DOUBLE 'external_pressure_grad.dPdx' = -0.000400 - > STRING 'surface.Theta.mode' = const - > DOUBLE 'surface.Theta.value' = 288.150000 - > STRING 'surface.Qhum.mode' = lsm - > DOUBLE 'surface.z0_m' = 0.100000 - > DOUBLE 'surface.z0_h' = 0.100000 - > DOUBLE 'surface.kappa' = 0.400000 - > DOUBLE 'surface.Pr_t_0' = 1.000000 - > DOUBLE 'surface.Cm' = 4.800000 - > DOUBLE 'surface.Ch' = 7.800000 - > DOUBLE 'surface.alpha_m' = 16.000000 - > DOUBLE 'surface.alpha_h' = 16.000000 - > DOUBLE 'surface.lhflux_alpha' = 1.000000 - > DOUBLE 'surface.lhflux_beta' = 0.025000 - > STRING 'initial_conditions.Theta.mode' = const - > DOUBLE 'initial_conditions.Theta.surface_value' = 288.150000 - > DOUBLE 'initial_conditions.Theta.height' = 0.000000 - > DOUBLE 'initial_conditions.Theta.grad_z' = 0.000000 - > STRING 'initial_conditions.Qhum.mode' = mixed-layer - > DOUBLE 'initial_conditions.Qhum.surface_value' = 0.002500 - > DOUBLE 'initial_conditions.Qhum.height' = 0.000000 - > DOUBLE 'initial_conditions.Qhum.grad_z' = 0.000000 - > BOOLEAN 'damping.is_enabled' = false - > DOUBLE 'damping.f' = 0.200000 - > DOUBLE 'damping.z1' = 60.000000 - > DOUBLE 'damping.z2' = 80.000000 - > BOOLEAN 'les.is_dynamic_momentum' = true - > BOOLEAN 'les.is_dynamic_scalar' = true - > BOOLEAN 'les.is_ssm_mixed_momentum' = false - > BOOLEAN 'les.is_ssm_mixed_scalar' = false - > BOOLEAN 'les.is_amd_model' = false - > DOUBLE 'les.C_ssm_momentum' = 1.000000 - > DOUBLE 'les.C_ssm_scalar' = 1.000000 - > DOUBLE 'les.C_smag' = 0.080000 - > DOUBLE 'les.Prandtl_sgs' = 0.700000 - > DOUBLE 'les.dynamic.C_smag_max' = 0.250000 - > DOUBLE 'les.dynamic.Prandtl_sgs_min' = 0.400000 - > DOUBLE 'les.dynamic.alpha' = 1.730000 - > STRING 'les.dynamic.avg_mode' = lagrange - > INT 'les.dynamic.nskip' = 3 - > BOOLEAN 'les.dynamic.use_transport' = false - > DOUBLE 'les.dynamic.C_T_lagrange_momentum' = 1.500000 - > DOUBLE 'les.dynamic.C_T_lagrange_scalar' = 3.000000 - > BOOLEAN 'les.base_filter_reset' = false - > BOOLEAN 'les.test_filter_reset' = false - > BOOLEAN 'les.clip_filter_reset' = false - > DOUBLE 'passive_tracers.tracer_1.diffusivity' = 0.000018 - > DOUBLE 'passive_tracers.tracer_1.surface.flux' = -0.010000 - > DOUBLE 'passive_tracers.tracer_1.surface.xmin' = 180.000000 - > DOUBLE 'passive_tracers.tracer_1.surface.xmax' = 220.000000 - > DOUBLE 'passive_tracers.tracer_1.surface.ymin' = 180.000000 - > DOUBLE 'passive_tracers.tracer_1.surface.ymax' = 220.000000 - > DOUBLE 'passive_tracers.tracer_1.surface.begin' = 25200.000000 - > DOUBLE 'passive_tracers.tracer_2.diffusivity' = 0.000018 - > DOUBLE 'passive_tracers.tracer_2.surface.flux' = -0.020000 - > DOUBLE 'passive_tracers.tracer_2.surface.begin' = 25200.000000 - > BOOLEAN 'ptcl.is_passive_transport' = false - > DOUBLE 'ptcl.density' = 1000.000000 - > DOUBLE 'ptcl.diameter' = 0.000001 - > DOUBLE 'ptcl.g' = -9.810000 - > INT 'ptcl.nsources' = 1 - > INT 'ptcl.source_1.n' = 4194304 - > DOUBLE 'ptcl.source_1.begin' = 18000.000000 - > DOUBLE 'ptcl.source_1.end' = 180000.000000 - > DOUBLE 'ptcl.source_1.xmin' = 40.000000 - > DOUBLE 'ptcl.source_1.xmax' = 60.000000 - > DOUBLE 'ptcl.source_1.ymin' = 0.000000 - > DOUBLE 'ptcl.source_1.ymax' = 200.000000 - > DOUBLE 'ptcl.source_1.zmin' = 0.000000 - > DOUBLE 'ptcl.source_1.zmax' = 5.000000 - > INT 'ptcl.nsinks' = 1 - > STRING 'ptcl.sink_1.mode' = outside - > DOUBLE 'ptcl.sink_1.xmin' = 0.000000 - > DOUBLE 'ptcl.sink_1.xmax' = 400.000000 - > DOUBLE 'ptcl.sink_1.ymin' = -100.000000 - > DOUBLE 'ptcl.sink_1.ymax' = 300.000000 - > DOUBLE 'ptcl.sink_1.zmin' = 0.010000 - > DOUBLE 'ptcl.sink_1.zmax' = 80.000000 - > BOOLEAN 'ptcl_track.is_passive_transport' = false - > DOUBLE 'ptcl_track.density' = 1000.000000 - > DOUBLE 'ptcl_track.diameter' = 0.000001 - > DOUBLE 'ptcl_track.g' = -9.810000 - > INT 'ptcl_track.group_max_size' = 256 - > INT 'ptcl_track.max_memory' = 10485760 - > INT 'ptcl_track.nsources' = 1 - > INT 'ptcl_track.source_1.n' = 128 - > DOUBLE 'ptcl_track.source_1.begin' = 28800.000000 - > DOUBLE 'ptcl_track.source_1.xmin' = 160.000000 - > DOUBLE 'ptcl_track.source_1.xmax' = 240.000000 - > DOUBLE 'ptcl_track.source_1.ymin' = 80.000000 - > DOUBLE 'ptcl_track.source_1.ymax' = 120.000000 - > DOUBLE 'ptcl_track.source_1.zmin' = 0.000000 - > DOUBLE 'ptcl_track.source_1.zmax' = 8.000000 - > INT 'ptcl_track.nsinks' = 0 - > DOUBLE 'canopy.Cd' = 0.150000 - > STRING 'canopy.drag_type' = non-linear - > INT 'canopy.num' = 0 - > STRING 'canopy.patch_1.type' = sharp - > DOUBLE 'canopy.patch_1.xmin' = 0.000000 - > DOUBLE 'canopy.patch_1.xmax' = 400.000000 - > DOUBLE 'canopy.patch_1.ymin' = 0.000000 - > DOUBLE 'canopy.patch_1.ymax' = 200.000000 - > DOUBLE 'canopy.patch_1.zmin' = 0.000000 - > DOUBLE 'canopy.patch_1.zmax' = 50.000000 - > DOUBLE 'canopy.patch_1.LAI' = 1.000000 - > DOUBLE 'poisson.retol' = 0.000100 - > DOUBLE 'poisson.abstol' = 0.000010 - > INT 'poisson.miniters' = 1 - > INT 'poisson.maxiters' = 100 - > INT 'poisson.piters' = 1 - > INT 'poisson.multigrid.ngrid' = 5 - > INT 'poisson.multigrid.down_iters' = 2 - > INT 'poisson.multigrid.up_iters' = 3 - > INT 'poisson.multigrid.direct_iters' = 5 - > DOUBLE 'poisson.multigrid.smooth_up_omega' = 1.840000 - > DOUBLE 'poisson.multigrid.smooth_up_omega_fine' = 1.640000 - > STRING 'output.DIR' = output/ - > BOOLEAN 'output.make_unique_DIR' = true - > BOOLEAN 'output.convert_dsq_to_tecplot' = true - > INT 'output.num' = 1 - > STRING 'output.unit_1.SUBDIR' = - > DOUBLE 'output.unit_1.begin' = 3600.000000 - > DOUBLE 'output.unit_1.dt' = 3600.000000 - > DOUBLE 'output.unit_1.xmin' = 0.000000 - > DOUBLE 'output.unit_1.xmax' = 400.000000 - > DOUBLE 'output.unit_1.ymin' = 0.000000 - > DOUBLE 'output.unit_1.ymax' = 200.000000 - > DOUBLE 'output.unit_1.zmin' = 0.000000 - > DOUBLE 'output.unit_1.zmax' = 80.000000 - > BOOLEAN 'output.unit_1.cntrl_avgxy_plt' = true - > BOOLEAN 'output.unit_1.cntrl_avgxy_netcdf' = false - > BOOLEAN 'output.unit_1.cntrl_3d_plt' = true - > BOOLEAN 'output.unit_1.cntrl_3d_bin' = false - > BOOLEAN 'output.unit_1.cntrl_3d_netcdf' = false - > BOOLEAN 'output.unit_1.cntrl_geometry_3d_plt' = false - > BOOLEAN 'output.unit_1.cntrl_geometry_3d_netcdf' = false - > BOOLEAN 'output.unit_1.cntrl_topography_plt' = true - > BOOLEAN 'output.unit_1.cntrl_topography_netcdf' = false - > BOOLEAN 'output.unit_1.cntrl_2d_plt' = false - > BOOLEAN 'output.unit_1.cntrl_2d_netcdf' = false - > BOOLEAN 'output.unit_1.cntrl_surface_plt' = true - > BOOLEAN 'output.unit_1.cntrl_surface_netcdf' = false - > BOOLEAN 'output.unit_1.cntrl_grid_plt' = false - > BOOLEAN 'output.unit_1.cntrl_grid_netcdf' = false - > BOOLEAN 'output.unit_1.cntrl_meteo_avgxy_plt' = false - > BOOLEAN 'output.unit_1.cntrl_meteo_all_plt' = false - > BOOLEAN 'output.unit_1.cntrl_filtered_3d_plt' = false - > BOOLEAN 'output.unit_1.spectrum.x_cntrl' = true - > BOOLEAN 'output.unit_1.spectrum.y_cntrl' = true - > BOOLEAN 'output.unit_1.spectrum.xy_cntrl' = true - > DOUBLE 'output.unit_1.spectrum.z_1' = 50.000000 - > DOUBLE 'output.unit_1.spectrum.z_2' = 100.000000 - > BOOLEAN 'output.unit_1.cntrl_ptcl_bin' = false - > BOOLEAN 'output.unit_1.cntrl_ptcl_plt' = true - > BOOLEAN 'output.unit_1.cntrl_ptcl_coords_plt' = false - > BOOLEAN 'output.unit_1.cntrl_ptcl_traj_bin' = false - > BOOLEAN 'output.unit_1.cntrl_ptcl_traj_plt' = false - > INT 'output.unit_1.x_profile_num' = 0 - > INT 'output.unit_1.y_profile_num' = 0 - > INT 'output.unit_1.z_profile_num' = 0 - > DOUBLE 'output.unit_1.x_profile_1.y' = 100.000000 - > DOUBLE 'output.unit_1.x_profile_1.z' = 40.000000 - > INT 'output.unit_1.xy_slice_num' = 0 - > INT 'output.unit_1.xz_slice_num' = 0 - > INT 'output.unit_1.yz_slice_num' = 0 - > DOUBLE 'output.unit_1.xy_slice_1.z' = 40.000000 - > DOUBLE 'output.screen.begin' = 0.000000 - > DOUBLE 'output.screen.dt' = 180.000000 - > DOUBLE 'checkup.begin' = 0.000000 - > INT 'checkup.nskip' = 3600 - > STRING 'dump.DIR' = dump/ - > DOUBLE 'dump.begin' = 36000.000000 - > DOUBLE 'dump.dt' = 36000.000000 - > STRING 'startup.DIR' = init/ - > DOUBLE 'series.begin' = 60.000000 - > DOUBLE 'series.dt' = 1.000000 - > DOUBLE 'series.point_set.point_1.x' = 200.000000 - > DOUBLE 'series.point_set.point_1.y' = 100.000000 - > DOUBLE 'series.point_set.point_1.z' = 25.000000 - > DOUBLE 'series.point_set.point_2.x' = 200.000000 - > DOUBLE 'series.point_set.point_2.y' = 100.000000 - > DOUBLE 'series.point_set.point_2.z' = 50.000000 - > DOUBLE 'series.point_set.point_3.x' = 200.000000 - > DOUBLE 'series.point_set.point_3.y' = 100.000000 - > DOUBLE 'series.point_set.point_3.z' = 100.000000 - > DOUBLE 'series.energy_avgxy_set.z_1' = 50.000000 - > DOUBLE 'series.energy_avgxy_set.z_2' = 100.000000 - > DOUBLE 'series.flux_avgxy_set.z_1' = 50.000000 - > DOUBLE 'series.flux_avgxy_set.z_2' = 100.000000 - > DOUBLE 'spectrum_series.begin' = 0.000000 - > INT 'spectrum_series.nskip' = 1 - > DOUBLE 'spectrum_series.unit_1.zp' = 24.000000 - > INT 'spectrum_series.unit_1.kxmax' = 3 - > INT 'spectrum_series.unit_1.kymax' = 3 - > DOUBLE 'spectrum_series.unit_2.zp' = 16.000000 - > INT 'spectrum_series.unit_2.kxmax' = 3 - > INT 'spectrum_series.unit_2.kymax' = 3 - > DOUBLE 'spectrum_series.unit_3.zp' = 8.000000 - > INT 'spectrum_series.unit_3.kxmax' = 3 - > INT 'spectrum_series.unit_3.kymax' = 3 - > DOUBLE 'time_scan.begin' = 60.000000 - > DOUBLE 'time_scan.dt' = 60.000000 - > BOOLEAN 'time_scan.cntrl_grid' = false - > BOOLEAN 'time_scan.cntrl_avgxy' = true - > BOOLEAN 'time_scan.cntrl_z_profile' = false - > INT 'time_scan.z_profile_num' = 0 - > DOUBLE 'time_scan.z_profile_1.x' = 200.000000 - > DOUBLE 'time_scan.z_profile_1.y' = 100.000000 - > INT 'stats.num' = 2 - > DOUBLE 'stats.unit_1.begin' = 165600.000000 - > DOUBLE 'stats.unit_1.end' = 180000.000000 - > INT 'stats.unit_1.nskip' = 10 - > STRING 'stats.unit_1.axis' = XYZ - > STRING 'stats.unit_1.type' = energy-eq - > STRING 'stats.unit_1.output.SUBDIR' = stat_end/ - > STRING 'stats.unit_1.dump.SUBDIR' = stat_end/ - > DOUBLE 'stats.unit_2.begin' = 151200.000000 - > DOUBLE 'stats.unit_2.end' = 165600.000000 - > INT 'stats.unit_2.nskip' = 10 - > STRING 'stats.unit_2.axis' = XYZ - > STRING 'stats.unit_2.type' = energy-eq - > STRING 'stats.unit_2.output.SUBDIR' = stat_end-1/ - > STRING 'stats.unit_2.dump.SUBDIR' = stat_end-1 - > DOUBLE 'pdf.unit_1.begin' = 27000.000000 - > DOUBLE 'pdf.unit_1.end' = 32400.000000 - > DOUBLE 'pdf.unit_1.dt' = 1.000000 - > DOUBLE 'pdf.unit_1.zp' = 20.000000 - > STRING 'pdf.unit_1.output.SUBDIR' = pdf/ - > STRING 'pdf.unit_1.dump.SUBDIR' = pdf/ - > BOOLEAN 'pdf.unit_1.cntrl_default' = true - > INT 'pdf.unit_1.nbins_default' = 256 - > DOUBLE 'pdf.unit_1.reset_time' = 28800.000000 - > DOUBLE 'pdf.unit_1.reset_safety' = 0.250000 - > DOUBLE 'joint_pdf.unit_1.begin' = 27000.000000 - > DOUBLE 'joint_pdf.unit_1.end' = 32400.000000 - > DOUBLE 'joint_pdf.unit_1.dt' = 1.000000 - > DOUBLE 'joint_pdf.unit_1.zp' = 20.000000 - > STRING 'joint_pdf.unit_1.output.SUBDIR' = joint-pdf/ - > STRING 'joint_pdf.unit_1.dump.SUBDIR' = joint-pdf/ - > BOOLEAN 'joint_pdf.unit_1.cntrl_default' = true - > INT 'joint_pdf.unit_1.nxbins_default' = 256 - > INT 'joint_pdf.unit_1.nybins_default' = 256 - > DOUBLE 'joint_pdf.unit_1.reset_time' = 28800.000000 - > DOUBLE 'joint_pdf.unit_1.reset_safety' = 0.250000 - > DOUBLE 'runtime_filter.mark' = 600.000000 - > STRING 'runtime_filter.unit_1.mode' = include - > BOOLEAN 'runtime_filter.unit_1.is_remove_mean' = false - > INT 'runtime_filter.unit_1.kxmin' = 0 - > INT 'runtime_filter.unit_1.kxmax' = 0 - > INT 'runtime_filter.unit_1.kymin' = 0 - > INT 'runtime_filter.unit_1.kymax' = 5 - > STRING 'runtime_filter.unit_2.mode' = exclude - > BOOLEAN 'runtime_filter.unit_2.is_remove_mean' = false - > INT 'runtime_filter.unit_2.kxmin' = 0 - > INT 'runtime_filter.unit_2.kxmax' = 10 - > INT 'runtime_filter.unit_2.kymin' = 0 - > INT 'runtime_filter.unit_2.kymax' = 10 \ No newline at end of file diff --git a/dpg_gui_styles.py b/dpg_gui_styles.py index eadb9d9729d4e0638c3627faf7c6d934f139230a..c449d189a47f14778f832fbfbb0dfed80463c5b1 100644 --- a/dpg_gui_styles.py +++ b/dpg_gui_styles.py @@ -4,7 +4,7 @@ FONT_PATH = "D:\\fonts\\Montserrat\\static\\Montserrat-Medium.ttf" ACCENT_COLOR = (0, 119, 200, 100) ROUNDING = 10 SPACE = 10 -INDENT = 30 +INDENT = 40 class GuiStyle: def __init__(self): diff --git a/dpg_gui_tabs.py b/dpg_gui_tabs.py index 18b081f62fdc134043a3cdab211e8532ade2590e..8c7712179cf8361802c1f2aab0160d97f3994657 100644 --- a/dpg_gui_tabs.py +++ b/dpg_gui_tabs.py @@ -10,107 +10,115 @@ class ConfigEditor: def __init__(self): dpg.create_context() - self.construct_main_window() - self.styles = GuiStyle() - # self.cfg_manager = ConfigManager() + self.cfg_manager = ConfigManager(self.get_value) + + self.construct_main_window() dpg.bind_font(self.styles.montserrat_font) dpg.bind_theme(self.styles.main_theme) - self.config_data = [] - - dpg.create_viewport(title='config file editor', width=800, height=600) + dpg.create_viewport(title='config file editor', width=800, height=600, small_icon='icon.ico') dpg.setup_dearpygui() dpg.show_viewport() dpg.set_primary_window("main", True) - def open_file(self, sender, app_data, user_data): + def manage_file(self, sender, app_data, user_data): file_path = app_data['file_path_name'] - if file_path: - for line in open(file_path, 'r', encoding='utf-8'): - match = re.match(r" > (\w+) '([\w.]+)' = (.*)", line) - if match: - self.config_data.append(match.groups()) - self.construct_config_window(file_path) + if user_data == "open": + if self.cfg_manager.is_initialized(): + dpg.delete_item(self.cfg_manager.file_path) + if dpg.does_alias_exist(self.cfg_manager.file_path): + dpg.remove_alias(self.cfg_manager.file_path) + for _, path, _ in self.cfg_manager.lines: + namespaces = path.split('.') + for i in range(len(namespaces)): + path = '.'.join(namespaces[:i+1]) + if dpg.does_alias_exist(path): + dpg.remove_alias(path) + + self.cfg_manager.init(file_path) + self.construct_config_window() + elif user_data == "save_as": + self.cfg_manager.save_as(file_path) + + def set_file_path(self, sender, app_data, user_data): + file_path = app_data['file_path_name'] + dpg.set_value(user_data, file_path) - def check_tabview(self, root): - for uuid in dpg.get_item_children(root, 1): - if dpg.get_item_type(uuid) == "mvAppItemType::mvTabBar": - return True, uuid - return False, None + def get_value(self, path, value_type): + return dpg.get_value(path) + + def open_file_dialog(self, sender, app_data, user_data): + dpg.show_item("file_dialog") + dpg.set_item_user_data("file_dialog", user_data) + + def open_folder_dialog(self, sender, app_data, user_data): + dpg.show_item("folder_dialog") + dpg.set_item_user_data("folder_dialog", user_data) def construct_main_window(self): - with dpg.window(label="config file editor", width=800, height=600, tag="main"): + with dpg.window(label="config file editor", width=800, height=600, tag="main", menubar=True, no_resize=False, no_close=False, no_move=False, no_collapse=False): with dpg.menu_bar(): with dpg.menu(label="file"): - dpg.add_menu_item(label="open config file", callback=lambda _: dpg.show_item("file_dialog"), tag="open_file_btn") + dpg.add_menu_item(label="open", callback=self.open_file_dialog, tag="open_btn", user_data="open") + dpg.add_menu_item(label="save", callback=self.cfg_manager.save, tag="save_btn") + dpg.add_menu_item(label="save as", callback=self.open_file_dialog, tag="save_as_btn", user_data="save_as") with dpg.menu(label="view"): dpg.add_menu_item(label="use default theme", check=True, callback=lambda _, v: dpg.bind_theme(None if v else self.styles.main_theme), default_value=False) dpg.add_menu_item(label="use default font", check=True, callback=lambda _, v: dpg.bind_font(None if v else self.styles.montserrat_font), default_value=False) dpg.add_menu_item(label="show theme editor", callback=dpg.show_style_editor) - with dpg.file_dialog(directory_selector=False, show=False, callback=self.open_file, tag="file_dialog", width=500, height=400): + with dpg.menu(label="settings"): + dpg.add_menu_item(label="auto save [not impl]", check=True, callback=lambda: print("TODO"), default_value=False) + + with dpg.file_dialog(directory_selector=False, show=False, callback=self.manage_file, tag="file_dialog", width=500, height=400): dpg.add_file_extension(".txt", color=(0, 255, 0, 255)) dpg.add_file_extension(".*", color=(255, 255, 255, 255)) - def construct_config_window(self, filename): - for var_type, full_path, value in self.config_data: - namespaces = full_path.split('.') - root = "main" - for level in range(len(namespaces) - 1): - path = '.'.join(namespaces[:level+1]) - - if not dpg.does_item_exist(path): - dpg.add_collapsing_header(label=namespaces[level], parent=root, tag=path, indent=INDENT) - - root = path + with dpg.file_dialog(directory_selector=True, show=False, callback=self.set_file_path, tag="folder_dialog", width=500, height=400): + dpg.add_file_extension(".*", color=(255, 255, 255, 255)) - self.create_widget('.'.join(namespaces[:-1]), namespaces[-1], value, var_type) + def construct_config_window(self): + dpg.add_collapsing_header(label=self.cfg_manager.file_path, parent="main", tag=self.cfg_manager.file_path, indent=0, default_open=True) - def construct_config_window_tabs(self, filename): - for var_type, full_path, value in self.config_data: + for var_type, full_path, value in self.cfg_manager.lines: namespaces = full_path.split('.') - root = "main" + parent = self.cfg_manager.file_path for level in range(len(namespaces) - 1): path = '.'.join(namespaces[:level+1]) - tab_bar_exists, tab_bar_uuid = self.check_tabview(root) - - if not tab_bar_exists: - tab_bar_uuid = dpg.add_tab_bar(parent=root, tag=f"{path}_tb") - if not dpg.does_item_exist(path): - dpg.add_tab(label=namespaces[level], parent=tab_bar_uuid, tag=f"{path}_tab") - dpg.add_child_window(parent=f"{path}_tab", tag=path, border=True, autosize_x=True, autosize_y=True) + dpg.add_collapsing_header(label=namespaces[level], parent=parent, tag=path, indent=INDENT) - root = path + parent = path self.create_widget('.'.join(namespaces[:-1]), namespaces[-1], value, var_type) def create_widget(self, path, key, value, value_type): - parent = path - - with dpg.group(horizontal=True, parent=parent): + if path: + parent = path + tag = f"{path}.{key}" + else: + parent = self.cfg_manager.file_path + tag = key + + with dpg.group(horizontal=True, parent=parent, indent=INDENT): dpg.add_text(key) if value_type == 'BOOLEAN': - dpg.add_checkbox(default_value=(value.lower() == "true")) + dpg.add_checkbox(default_value=(value.lower() == "true"), tag=tag) elif value_type == 'DOUBLE': - dpg.add_input_float(default_value=float(value)) + dpg.add_input_double(default_value=float(value), tag=tag, format="%.10f") elif value_type == 'INT': - dpg.add_input_int(default_value=int(value)) + dpg.add_input_int(default_value=int(value), tag=tag) elif "dir" in key.lower(): - dpg.add_input_text(default_value=value, tag=f"{path}.{key}") - dpg.add_button(label="...", callback=lambda s, a, u: self.file_dialog(f"{path}.{key}")) + dpg.add_input_text(default_value=value, tag=tag) + dpg.add_button(label="...", callback=self.open_folder_dialog, user_data=tag) else: - dpg.add_input_text(default_value=value) - - def file_dialog(self, var_tag): - with dpg.file_dialog(directory_selector=True, show=True, callback=lambda s, a, u: dpg.set_value(var_tag, a['file_path_name'])): - dpg.add_file_extension(".*", color=(255, 255, 255, 255)) + dpg.add_input_text(default_value=value, tag=tag) def run(self): dpg.start_dearpygui() diff --git a/dpg_gui_windows.py b/dpg_gui_windows.py deleted file mode 100644 index fb2fc994be8b3a71033f2196fe7f72872cb69e23..0000000000000000000000000000000000000000 --- a/dpg_gui_windows.py +++ /dev/null @@ -1,137 +0,0 @@ -import dearpygui.dearpygui as dpg -import re -import ctypes - -ctypes.windll.shcore.SetProcessDpiAwareness(1) - -FONT_PATH = "D:\\fonts\\Montserrat\\static\\Montserrat-Medium.ttf" - -class ConfigEditor: - def __init__(self): - self.config_data = {} - - dpg.create_context() - - with dpg.window(label="Config File Editor", width=800, height=600, tag="main"): - dpg.add_button(label="Open Config File", callback=self.open_file_dialog) - - with dpg.file_dialog(directory_selector=False, show=False, callback=self.open_file, tag="file_dialog", width=700 ,height=400): - dpg.add_file_extension(".txt", color=(0, 255, 0, 255)) - dpg.add_file_extension(".*", color=(255, 255, 255, 255)) - - with dpg.font_registry(): - default_font = dpg.add_font(FONT_PATH, 30) - second_font = dpg.add_font(FONT_PATH, 15) - - dpg.bind_font(default_font) - - with dpg.theme() as global_theme: - with dpg.theme_component(dpg.mvAll): - dpg.add_theme_color(dpg.mvThemeCol_Separator, (255, 0, 0), category=dpg.mvThemeCat_Core) - dpg.add_theme_style(dpg.mvStyleVar_ChildRounding, 5, category=dpg.mvThemeCat_Core) - dpg.add_theme_style(dpg.mvStyleVar_ItemSpacing, 10, 10, category=dpg.mvThemeCat_Core) - dpg.add_theme_style(dpg.mvStyleVar_ItemInnerSpacing, 10, 10, category=dpg.mvThemeCat_Core) - dpg.add_theme_style(dpg.mvStyleVar_WindowPadding, 10, 10, category=dpg.mvThemeCat_Core) - dpg.add_theme_style(dpg.mvStyleVar_FramePadding, 10, 10, category=dpg.mvThemeCat_Core) - - - with dpg.theme() as self.tab_theme: - with dpg.theme_component(dpg.mvAll): - # dpg.add_theme_color(dpg.mvThemeCol_ChildBg, (255, 0, 255), category=dpg.mvThemeCat_Core) - dpg.add_theme_style(dpg.mvStyleVar_ChildBorderSize, 3, category=dpg.mvThemeCat_Core) - - # with dpg.theme_component(dpg.mvInputInt): - # dpg.add_theme_color(dpg.mvThemeCol_FrameBg, (100, 150, 100), category=dpg.mvThemeCat_Core) - # dpg.add_theme_style(dpg.mvStyleVar_FrameRounding, 5, category=dpg.mvThemeCat_Core) - dpg.bind_theme(global_theme) - - dpg.show_style_editor() - # dpg.set_global_font_scale(2.0) - - dpg.create_viewport(title='Config File Editor', width=800, height=600) - dpg.setup_dearpygui() - dpg.show_viewport() - dpg.set_primary_window("main", True) - - self.tabs = {} - self.rows = {} - - def open_file_dialog(self): - dpg.show_item("file_dialog") - - def open_file(self, sender, app_data, user_data): - file_path = app_data['file_path_name'] - if file_path: - self.parse_config(file_path) - - def check_tabview(self, root): - for uuid in dpg.get_item_children(root, 1): - if dpg.get_item_type(uuid) == "mvAppItemType::mvTabBar": - return True, uuid - return False, None - - def parse_config(self, filename): - for widget in dpg.get_item_children("main", 1): - dpg.delete_item(widget) - - with open(filename, 'r', encoding='utf-8') as file: - lines = file.readlines() - - output = ''.join(lines) - lines = output.splitlines() - - for line in lines: - match = re.match(r" > (\w+) '([\w.]+)' = (.*)", line) - if match: - var_type, full_path, value = match.groups() - namespaces = full_path.split('.') - root = "main" - for level in range(len(namespaces) - 1): - path = '.'.join(namespaces[:level+1]) - - # tab_bar_exists, tab_bar_uuid = self.check_tabview(root) - - # if not tab_bar_exists: - # tab_bar_uuid = dpg.add_tab_bar(parent=root, tag=f"{path}_tb") - # dpg.add_separator(parent=root) - - print(path) - - if not dpg.does_item_exist(path): - print("here") - # dpg.add_tab(label=namespaces[level], parent=tab_bar_uuid, tag=f"{path}_tab") - dpg.add_child_window(parent=root, tag=path, height=300, border=True, menubar=True, autosize_x=True) - dpg.add_menu_bar(parent=path, tag=f"{path}_menu") - dpg.add_menu(label=namespaces[level], parent=f"{path}_menu") - dpg.bind_item_theme(path, self.tab_theme) - - root = path - - self.create_widget('.'.join(namespaces[:-1]), namespaces[-1], value, var_type) - - def create_widget(self, path, key, value, value_type): - parent = path - - with dpg.group(horizontal=True, parent=parent): - dpg.add_text(key) - if value_type == 'BOOLEAN': - dpg.add_checkbox(default_value=(value.lower() == "true")) - elif value.replace(".", "", 1).isdigit(): - dpg.add_input_float(default_value=float(value)) - elif "dir" in key.lower(): - dpg.add_input_text(default_value=value, tag=f"{path}.{key}") - dpg.add_button(label="...", callback=lambda s, a, u: self.file_dialog(f"{path}.{key}")) - else: - dpg.add_input_text(default_value=value) - - def file_dialog(self, var_tag): - with dpg.file_dialog(directory_selector=False, show=True, callback=lambda s, a, u: dpg.set_value(var_tag, a['file_path_name'])): - dpg.add_file_extension(".*", color=(255, 255, 255, 255)) - - def run(self): - dpg.start_dearpygui() - dpg.destroy_context() - -if __name__ == "__main__": - app = ConfigEditor() - app.run() diff --git a/icon.ico b/icon.ico new file mode 100644 index 0000000000000000000000000000000000000000..53f6e779b0a47924601020ed0792a7a66154128a Binary files /dev/null and b/icon.ico differ