{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# PFS \n",
    "\n",
    "The support for PFS files have been extended with MIKE IO release 1.2. It was previously only possible to *read* PFS files. It is now also possible to *modify* and *create* new PFS files. "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import mikeio"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Read"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[FemEngineSW]\n",
       "   [DOMAIN]\n",
       "      Touched = 1\n",
       "      discretization = 2\n",
       "      number_of_dimensions = 2\n",
       "      number_of_meshes = 1\n",
       "      file_name = |.\\Lake_Mesh.mesh|\n",
       "      type_of_reordering = 1\n",
       "      number_of_domains = 16\n",
       "      coordinate_type = 'UTM-32'\n",
       "      minimum_depth = 0.0\n",
       "      datum_depth = 0.0\n",
       "      vertical_mesh_type_overall = 1\n",
       "      number_of_layers = 11\n",
       "      z_sigma = 0.0\n",
       "      vertical_mesh_type = 1\n",
       "      layer_thickness = 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.0\n",
       "      sigma_c = 0.0\n",
       "      theta = 2.0\n",
       "      b = 0.0\n",
       "      number_of_layers_zlevel = 10\n",
       "      vertical_mesh_type_zlevel = 1\n",
       "      constant_layer_thickness_zlevel = 0.0\n",
       "      variable_layer_thickness_zlevel = 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0\n",
       "      type_of_bathymetry_adjustment = 1\n",
       "      minimum_layer_thickness_zlevel = 0.0\n",
       "      type_of_mesh = 0\n",
       "      type_of_gauss = 3\n",
       "      [BOUNDARY_NAMES]\n",
       "         Touched = 0\n",
       "         MzSEPfsListItemCount = 0\n",
       "      EndSect  // BOUNDARY_NAMES\n",
       "   EndSect  // DOMAIN\n",
       "   [TIME]\n",
       "      Touched = 1\n",
       "      start_time = 2002, 1, 1, 0, 0, 0\n",
       "      time_step_interval = 120.0\n",
       "      number_of_time_steps = 450\n",
       "   EndSect  // TIME\n",
       "   [MODULE_SELECTION]\n",
       "      Touched = 0\n",
       "      mode_of_hydrodynamic_module = 0\n",
       "      hydrodynamic_features = 1\n",
       "      fluid_property = 1\n",
       "      mode_of_spectral_wave_module = 2\n",
       "      mode_of_transport_module = 0\n",
       "      mode_of_mud_transport_module = 0\n",
       "      mode_of_eco_lab_module = 0\n",
       "      mode_of_sand_transport_module = 0\n",
       "      mode_of_particle_tracking_module = 0\n",
       "      mode_of_oil_spill_module = 0\n",
       "      mode_of_shoreline_module = 0\n",
       "   EndSect  // MODULE_SELECTION\n",
       "   [SPECTRAL_WAVE_MODULE]\n",
       "      mode = 2\n",
       "      [SPACE]\n",
       "         number_of_mesh_geometry = 1\n",
       "      EndSect  // SPACE\n",
       "      [EQUATION]\n",
       "         Touched = 1\n",
       "         formulation = 2\n",
       "         time_formulation = 2\n",
       "         JONSWAP_factor_1 = 0.92\n",
       "         JONSWAP_factor_2 = 0.83\n",
       "      EndSect  // EQUATION\n",
       "      [TIME]\n",
       "         Touched = 0\n",
       "         start_time_step = 0\n",
       "         time_step_factor = 1\n",
       "         time_step_factor_AD = 1\n",
       "      EndSect  // TIME\n",
       "      [SPECTRAL]\n",
       "         Touched = 1\n",
       "         type_of_frequency_discretization = 2\n",
       "         number_of_frequencies = 25\n",
       "         minimum_frequency = 0.055\n",
       "         frequency_interval = 0.02\n",
       "         frequency_factor = 1.1\n",
       "         type_of_directional_discretization = 1\n",
       "         number_of_directions = 16\n",
       "         minimum_direction = 0.0\n",
       "         maximum_direction = 0.0\n",
       "         separation_of_wind_sea_and_swell = 0\n",
       "         threshold_frequency = 0.125\n",
       "         maximum_threshold_frequency = 0.5959088268863615\n",
       "      EndSect  // SPECTRAL\n",
       "      [SOLUTION_TECHNIQUE]\n",
       "         Touched = 1\n",
       "         error_level = 0\n",
       "         maximum_number_of_errors = 200\n",
       "         minimum_period = 0.1\n",
       "         maximum_period = 25.0\n",
       "         initial_period = 8.0\n",
       "         scheme_of_space_discretization_geographical = 1\n",
       "         scheme_of_space_discretization_direction = 1\n",
       "         scheme_of_space_discretization_frequency = 1\n",
       "         method = 2\n",
       "         number_of_iterations = 10\n",
       "         tolerance1 = 0.0001\n",
       "         tolerance2 = 0.001\n",
       "         relaxation_factor = 0.1\n",
       "         number_of_levels_in_transport_calc = 32\n",
       "         number_of_steps_in_source_calc = 1\n",
       "         maximum_CFL_number = 1.0\n",
       "         dt_min = 0.01\n",
       "         dt_max = 120.0\n",
       "         type_overall = 0\n",
       "         file_name_overall = |.\\convergence_overall.dfs0|\n",
       "         input_format = 1\n",
       "         coordinate_type = ''\n",
       "         input_file_name = ||\n",
       "         number_of_points = 0\n",
       "         type_domain = 0\n",
       "         file_name_domain = |.\\convergence_domain.dfsu|\n",
       "         output_frequency = 5\n",
       "      EndSect  // SOLUTION_TECHNIQUE\n",
       "      [DEPTH]\n",
       "         Touched = 1\n",
       "         type = 0\n",
       "         minimum_depth = 0.01\n",
       "         format = 0\n",
       "         soft_time_interval = 0.0\n",
       "         constant_level = 0.0\n",
       "         file_name = ||\n",
       "         item_number = 1\n",
       "         item_name = ''\n",
       "      EndSect  // DEPTH\n",
       "      [CURRENT]\n",
       "         Touched = 1\n",
       "         type = 0\n",
       "         type_blocking = 1\n",
       "         factor_blocking = 0.1\n",
       "         format = 0\n",
       "         soft_time_interval = 0.0\n",
       "         constant_x_velocity = 0.0\n",
       "         constant_y_velocity = 0.0\n",
       "         file_name = ||\n",
       "         item_number_for_x_velocity = 0\n",
       "         item_number_for_y_velocity = 0\n",
       "         item_name_for_x_velocity = ''\n",
       "         item_name_for_y_velocity = ''\n",
       "      EndSect  // CURRENT\n",
       "      [WIND]\n",
       "         Touched = 1\n",
       "         type = 1\n",
       "         format = 1\n",
       "         constant_speed = 15.0\n",
       "         constant_direction = 270.0\n",
       "         file_name = |.\\Wind.dfs0|\n",
       "         item_number_for_speed = 1\n",
       "         item_number_for_direction = 2\n",
       "         item_name_for_speed = 'Speed'\n",
       "         item_name_for_direction = 'Direction'\n",
       "         soft_time_interval = 0.0\n",
       "         formula = 1\n",
       "         type_of_drag = 1\n",
       "         linear_growth_coefficient = 0.0015\n",
       "         type_of_air_sea_interaction = 1\n",
       "         background_Charnock_parameter = 0.01\n",
       "         Charnock_parameter = 0.01\n",
       "         alpha_drag = 0.00063\n",
       "         beta_drag = 6.6e-05\n",
       "      EndSect  // WIND\n",
       "      [ICE]\n",
       "         Touched = 1\n",
       "         type = 0\n",
       "         format = 3\n",
       "         c_cut_off = 0.33\n",
       "         file_name = ||\n",
       "         item_number = 1\n",
       "         item_name = ''\n",
       "      EndSect  // ICE\n",
       "      [DIFFRACTION]\n",
       "         Touched = 1\n",
       "         type = 0\n",
       "         minimum_delta = -0.75\n",
       "         maximum_delta = 3.0\n",
       "         type_of_smoothing = 1\n",
       "         smoothing_factor = 1.0\n",
       "         number_of_smoothing_steps = 1\n",
       "      EndSect  // DIFFRACTION\n",
       "      [TRANSFER]\n",
       "         Touched = 1\n",
       "         type = 1\n",
       "         type_triad = 0\n",
       "         alpha_EB = 0.25\n",
       "      EndSect  // TRANSFER\n",
       "      [WAVE_BREAKING]\n",
       "         Touched = 1\n",
       "         type = 0\n",
       "         type_of_gamma = 1\n",
       "         alpha = 1.0\n",
       "         gamma_steepness = 1.0\n",
       "         type_of_effect_on_frequency = 1\n",
       "         type_of_roller = 0\n",
       "         roller_propagation_factor = 1.0\n",
       "         roller_dissipation_factor = 0.15\n",
       "         roller_density = 1000.0\n",
       "         [GAMMA]\n",
       "            Touched = 1\n",
       "            type = 1\n",
       "            format = 0\n",
       "            constant_value = 0.55\n",
       "            file_name = ||\n",
       "            item_number = 1\n",
       "            item_name = ''\n",
       "            type_of_soft_start = 2\n",
       "            soft_time_interval = 0.0\n",
       "            reference_value = 0.0\n",
       "            type_of_time_interpolation = 1\n",
       "         EndSect  // GAMMA\n",
       "      EndSect  // WAVE_BREAKING\n",
       "      [BOTTOM_FRICTION]\n",
       "         Touched = 1\n",
       "         type = 0\n",
       "         constant_fc = 0.0\n",
       "         type_of_effect_on_frequency = 0\n",
       "         [FRICTION_COEFFICIENT]\n",
       "            Touched = 1\n",
       "            type = 1\n",
       "            format = 0\n",
       "            constant_value = 0.0775\n",
       "            file_name = ||\n",
       "            item_number = 1\n",
       "            item_name = ''\n",
       "            type_of_soft_start = 2\n",
       "            soft_time_interval = 0.0\n",
       "            reference_value = 0.0\n",
       "            type_of_time_interpolation = 1\n",
       "         EndSect  // FRICTION_COEFFICIENT\n",
       "         [FRICTION_FACTOR]\n",
       "            Touched = 1\n",
       "            type = 1\n",
       "            format = 0\n",
       "            constant_value = 0.0212\n",
       "            file_name = ||\n",
       "            item_number = 1\n",
       "            item_name = ''\n",
       "            type_of_soft_start = 2\n",
       "            soft_time_interval = 0.0\n",
       "            reference_value = 0.0\n",
       "            type_of_time_interpolation = 1\n",
       "         EndSect  // FRICTION_FACTOR\n",
       "         [NIKURADSE_ROUGHNESS]\n",
       "            Touched = 1\n",
       "            type = 1\n",
       "            format = 0\n",
       "            constant_value = 0.04\n",
       "            file_name = ||\n",
       "            item_number = 1\n",
       "            item_name = ''\n",
       "            type_of_soft_start = 2\n",
       "            soft_time_interval = 0.0\n",
       "            reference_value = 0.0\n",
       "            type_of_time_interpolation = 1\n",
       "         EndSect  // NIKURADSE_ROUGHNESS\n",
       "         [SAND_GRAIN_SIZE]\n",
       "            Touched = 1\n",
       "            type = 1\n",
       "            format = 0\n",
       "            constant_value = 0.00025\n",
       "            file_name = ||\n",
       "            item_number = 1\n",
       "            item_name = ''\n",
       "            type_of_soft_start = 2\n",
       "            soft_time_interval = 0.0\n",
       "            reference_value = 0.0\n",
       "            type_of_time_interpolation = 1\n",
       "         EndSect  // SAND_GRAIN_SIZE\n",
       "      EndSect  // BOTTOM_FRICTION\n",
       "      [WHITECAPPING]\n",
       "         Touched = 1\n",
       "         type = 1\n",
       "         type_of_spectrum = 3\n",
       "         mean_frequency_power = -1\n",
       "         mean_wave_number_power = -1\n",
       "         [dissipation_cdiss]\n",
       "            Touched = 1\n",
       "            type = 1\n",
       "            format = 0\n",
       "            constant_value = 4.5\n",
       "            file_name = ||\n",
       "            item_number = 1\n",
       "            item_name = ''\n",
       "            type_of_soft_start = 2\n",
       "            soft_time_interval = 0.0\n",
       "            reference_value = 0.0\n",
       "            type_of_time_interpolation = 1\n",
       "         EndSect  // dissipation_cdiss\n",
       "         [dissipation_delta]\n",
       "            Touched = 1\n",
       "            type = 1\n",
       "            format = 0\n",
       "            constant_value = 0.5\n",
       "            file_name = ||\n",
       "            item_number = 1\n",
       "            item_name = ''\n",
       "            type_of_soft_start = 2\n",
       "            soft_time_interval = 0.0\n",
       "            reference_value = 0.0\n",
       "            type_of_time_interpolation = 1\n",
       "         EndSect  // dissipation_delta\n",
       "      EndSect  // WHITECAPPING\n",
       "      [STRUCTURES]\n",
       "         type = 0\n",
       "         input_format = 1\n",
       "         coordinate_type = ''\n",
       "         number_of_structures = 0\n",
       "         input_file_name = ||\n",
       "         [LINE_STRUCTURES]\n",
       "            Touched = 1\n",
       "            MzSEPfsListItemCount = 0\n",
       "            output_of_link_data = 0\n",
       "            file_name_section = 'line_section.xyz'\n",
       "            number_of_structures = 0\n",
       "         EndSect  // LINE_STRUCTURES\n",
       "      EndSect  // STRUCTURES\n",
       "      [INITIAL_CONDITIONS]\n",
       "         Touched = 1\n",
       "         type = 0\n",
       "         type_additional = 1\n",
       "         type_of_spectra = 1\n",
       "         fetch = 40000.0\n",
       "         max_peak_frequency = 0.4\n",
       "         max_Phillips_constant = 0.0081\n",
       "         shape_parameter_sigma_a = 0.07\n",
       "         shape_parameter_sigma_b = 0.09\n",
       "         peakednes_parameter_gamma = 3.3\n",
       "         file_name_m = ||\n",
       "         item_number_m0 = 1\n",
       "         item_number_m1 = 1\n",
       "         item_name_m0 = ''\n",
       "         item_name_m1 = ''\n",
       "         file_name_A = ||\n",
       "         item_number_A = 1\n",
       "         item_name_A = ''\n",
       "      EndSect  // INITIAL_CONDITIONS\n",
       "      [BOUNDARY_CONDITIONS]\n",
       "         Touched = 0\n",
       "         MzSEPfsListItemCount = 0\n",
       "         [CODE_1]\n",
       "         EndSect  // CODE_1\n",
       "      EndSect  // BOUNDARY_CONDITIONS\n",
       "      [OUTPUTS]\n",
       "         Touched = 1\n",
       "         MzSEPfsListItemCount = 4\n",
       "         number_of_outputs = 4\n",
       "         [OUTPUT_1]\n",
       "            Touched = 1\n",
       "            include = 1\n",
       "            title = 'Wave parameters in domain'\n",
       "            file_name = 'Wave_parameters.dfsu'\n",
       "            type = 1\n",
       "            format = 2\n",
       "            flood_and_dry = 2\n",
       "            coordinate_type = 'UTM-32'\n",
       "            zone = 0\n",
       "            input_file_name = ||\n",
       "            input_format = 1\n",
       "            interpolation_type = 1\n",
       "            use_end_time = 1\n",
       "            first_time_step = 0\n",
       "            last_time_step = 450\n",
       "            time_step_frequency = 10\n",
       "            number_of_points = 1\n",
       "            [POINT_1]\n",
       "               name = 'POINT_1'\n",
       "               x = 20000.0\n",
       "               y = 20000.0\n",
       "            EndSect  // POINT_1\n",
       "            [LINE]\n",
       "               npoints = 3\n",
       "               x_first = 0.0\n",
       "               y_first = 0.0\n",
       "               x_last = 40000.0\n",
       "               y_last = 40000.0\n",
       "            EndSect  // LINE\n",
       "            [AREA]\n",
       "               number_of_points = 4\n",
       "               [POINT_1]\n",
       "                  x = -400.0\n",
       "                  y = -400.0\n",
       "               EndSect  // POINT_1\n",
       "               [POINT_2]\n",
       "                  x = -400.0\n",
       "                  y = 40400.0\n",
       "               EndSect  // POINT_2\n",
       "               [POINT_3]\n",
       "                  x = 40400.0\n",
       "                  y = 40400.0\n",
       "               EndSect  // POINT_3\n",
       "               [POINT_4]\n",
       "                  x = 40400.0\n",
       "                  y = -400.0\n",
       "               EndSect  // POINT_4\n",
       "               orientation = 0.0\n",
       "               x_origo = 0.0\n",
       "               x_ds = 2105.263157894737\n",
       "               x_npoints = 20\n",
       "               y_origo = 0.0\n",
       "               y_ds = 2105.263157894737\n",
       "               y_npoints = 20\n",
       "               z_origo = -15.00000000000001\n",
       "               z_ds = 2.000000000000001\n",
       "               z_npoints = 10\n",
       "            EndSect  // AREA\n",
       "            [INTEGRAL_WAVE_PARAMETERS]\n",
       "               Touched = 1\n",
       "               type_of_spectrum = 1\n",
       "               minimum_frequency = 0.055\n",
       "               maximum_frequency = 0.5959088268863617\n",
       "               separation_of_wind_sea_and_swell = 3\n",
       "               threshold_frequency = 0.125\n",
       "               maximum_threshold_frequency = 0.125\n",
       "               hm0_minimum = 0.01\n",
       "               type_of_h_max = 3\n",
       "               duration = 10800.0\n",
       "               distance_above_bed_for_particle_velocity = 0.0\n",
       "               minimum_direction = 0.0\n",
       "               maximum_direction = 360.0\n",
       "               [Total_wave_parameters]\n",
       "                  Significant_wave_height = 1\n",
       "                  Maximum_wave_height = 0\n",
       "                  Peak_wave_period = 1\n",
       "                  Wave_period_t01 = 0\n",
       "                  Wave_period_t02 = 1\n",
       "                  Wave_period_tm10 = 0\n",
       "                  Peak_wave_direction = 0\n",
       "                  Mean_wave_direction = 1\n",
       "                  Directional_standard_deviation = 0\n",
       "                  Wave_velocity_components = 1\n",
       "                  Radiation_stresses = 0\n",
       "                  Particle_velocities = 0\n",
       "                  Wave_power = 0\n",
       "               EndSect  // Total_wave_parameters\n",
       "               [Wind_sea_parameters]\n",
       "                  Significant_wave_height = 0\n",
       "                  Maximum_wave_height = 0\n",
       "                  Peak_wave_period = 0\n",
       "                  Wave_period_t01 = 0\n",
       "                  Wave_period_t02 = 0\n",
       "                  Wave_period_tm10 = 0\n",
       "                  Peak_wave_direction = 0\n",
       "                  Mean_wave_direction = 0\n",
       "                  Directional_standard_deviation = 0\n",
       "                  Wave_velocity_components = 0\n",
       "                  Radiation_stresses = 0\n",
       "                  Particle_velocities = 0\n",
       "                  Wave_power = 0\n",
       "               EndSect  // Wind_sea_parameters\n",
       "               [Swell_parameters]\n",
       "                  Significant_wave_height = 0\n",
       "                  Maximum_wave_height = 0\n",
       "                  Peak_wave_period = 0\n",
       "                  Wave_period_t01 = 0\n",
       "                  Wave_period_t02 = 0\n",
       "                  Wave_period_tm10 = 0\n",
       "                  Peak_wave_direction = 0\n",
       "                  Mean_wave_direction = 0\n",
       "                  Directional_standard_deviation = 0\n",
       "                  Wave_velocity_components = 0\n",
       "                  Radiation_stresses = 0\n",
       "                  Particle_velocities = 0\n",
       "                  Wave_power = 0\n",
       "               EndSect  // Swell_parameters\n",
       "            EndSect  // INTEGRAL_WAVE_PARAMETERS\n",
       "            [INPUT_PARAMETERS]\n",
       "               Touched = 1\n",
       "               Surface_elevation = 0\n",
       "               Water_depth = 0\n",
       "               Current_velocity_components = 0\n",
       "               Wind_speed = 0\n",
       "               Wind_direction = 0\n",
       "               Ice_concentration = 0\n",
       "            EndSect  // INPUT_PARAMETERS\n",
       "            [MODEL_PARAMETERS]\n",
       "               Touched = 1\n",
       "               Wind_friction_speed = 0\n",
       "               Roughness_length = 0\n",
       "               Drag_coefficient = 0\n",
       "               Charnock_constant = 0\n",
       "               Friction_coefficient = 0\n",
       "               Breaking_parameter_gamma = 0\n",
       "               Courant_number = 1\n",
       "               Time_step_factor = 1\n",
       "               Convergence_angle = 0\n",
       "               Length = 0\n",
       "               Area = 0\n",
       "               Threshold_period = 0\n",
       "               Roller_area = 0\n",
       "               Roller_dissipation = 0\n",
       "               Breaking_index = 0\n",
       "            EndSect  // MODEL_PARAMETERS\n",
       "            [SPECTRAL_PARAMETERS]\n",
       "               Touched = 1\n",
       "               separation_of_wind_sea_and_swell = 3.0\n",
       "               threshold_frequency = 0.125\n",
       "               maximum_threshold_frequency = 0.125\n",
       "               wave_energy = 1\n",
       "               wave_action = 0\n",
       "               zeroth_moment_of_wave_action = 0\n",
       "               first_moment_of_wave_action = 0\n",
       "               wave_energy_wind_sea = 0\n",
       "               wave_energy_swell = 0\n",
       "            EndSect  // SPECTRAL_PARAMETERS\n",
       "         EndSect  // OUTPUT_1\n",
       "         [OUTPUT_2]\n",
       "            Touched = 1\n",
       "            include = 0\n",
       "            title = 'Wave parameters along line'\n",
       "            file_name = 'Wave_line.dfs1'\n",
       "            type = 1\n",
       "            format = 1\n",
       "            flood_and_dry = 2\n",
       "            coordinate_type = 'UTM-32'\n",
       "            zone = 0\n",
       "            input_file_name = ||\n",
       "            input_format = 1\n",
       "            interpolation_type = 2\n",
       "            use_end_time = 1\n",
       "            first_time_step = 0\n",
       "            last_time_step = 450\n",
       "            time_step_frequency = 10\n",
       "            number_of_points = 1\n",
       "            [POINT_1]\n",
       "               name = 'POINT_1'\n",
       "               x = 20000.0\n",
       "               y = 20000.0\n",
       "            EndSect  // POINT_1\n",
       "            [LINE]\n",
       "               npoints = 41\n",
       "               x_first = 0.0\n",
       "               y_first = 20000.0\n",
       "               x_last = 40000.0\n",
       "               y_last = 20000.0\n",
       "            EndSect  // LINE\n",
       "            [AREA]\n",
       "               number_of_points = 4\n",
       "               [POINT_1]\n",
       "                  x = -400.0\n",
       "                  y = -400.0\n",
       "               EndSect  // POINT_1\n",
       "               [POINT_2]\n",
       "                  x = -400.0\n",
       "                  y = 40400.0\n",
       "               EndSect  // POINT_2\n",
       "               [POINT_3]\n",
       "                  x = 40400.0\n",
       "                  y = 40400.0\n",
       "               EndSect  // POINT_3\n",
       "               [POINT_4]\n",
       "                  x = 40400.0\n",
       "                  y = -400.0\n",
       "               EndSect  // POINT_4\n",
       "               orientation = 0.0\n",
       "               x_origo = 0.0\n",
       "               x_ds = 2105.263157894737\n",
       "               x_npoints = 20\n",
       "               y_origo = 0.0\n",
       "               y_ds = 2105.263157894737\n",
       "               y_npoints = 20\n",
       "               z_origo = -15.00000000000001\n",
       "               z_ds = 2.000000000000001\n",
       "               z_npoints = 10\n",
       "            EndSect  // AREA\n",
       "            [INTEGRAL_WAVE_PARAMETERS]\n",
       "               Touched = 1\n",
       "               type_of_spectrum = 1\n",
       "               minimum_frequency = 0.055\n",
       "               maximum_frequency = 0.5959088268863617\n",
       "               separation_of_wind_sea_and_swell = 3\n",
       "               threshold_frequency = 0.125\n",
       "               maximum_threshold_frequency = 0.125\n",
       "               hm0_minimum = 0.01\n",
       "               type_of_h_max = 3\n",
       "               duration = 10800.0\n",
       "               distance_above_bed_for_particle_velocity = 0.0\n",
       "               minimum_direction = 0.0\n",
       "               maximum_direction = 360.0\n",
       "               [Total_wave_parameters]\n",
       "                  Significant_wave_height = 1\n",
       "                  Maximum_wave_height = 0\n",
       "                  Peak_wave_period = 1\n",
       "                  Wave_period_t01 = 0\n",
       "                  Wave_period_t02 = 1\n",
       "                  Wave_period_tm10 = 0\n",
       "                  Peak_wave_direction = 0\n",
       "                  Mean_wave_direction = 1\n",
       "                  Directional_standard_deviation = 0\n",
       "                  Wave_velocity_components = 0\n",
       "                  Radiation_stresses = 0\n",
       "                  Particle_velocities = 0\n",
       "                  Wave_power = 0\n",
       "               EndSect  // Total_wave_parameters\n",
       "               [Wind_sea_parameters]\n",
       "                  Significant_wave_height = 0\n",
       "                  Maximum_wave_height = 0\n",
       "                  Peak_wave_period = 0\n",
       "                  Wave_period_t01 = 0\n",
       "                  Wave_period_t02 = 0\n",
       "                  Wave_period_tm10 = 0\n",
       "                  Peak_wave_direction = 0\n",
       "                  Mean_wave_direction = 0\n",
       "                  Directional_standard_deviation = 0\n",
       "                  Wave_velocity_components = 0\n",
       "                  Radiation_stresses = 0\n",
       "                  Particle_velocities = 0\n",
       "                  Wave_power = 0\n",
       "               EndSect  // Wind_sea_parameters\n",
       "               [Swell_parameters]\n",
       "                  Significant_wave_height = 0\n",
       "                  Maximum_wave_height = 0\n",
       "                  Peak_wave_period = 0\n",
       "                  Wave_period_t01 = 0\n",
       "                  Wave_period_t02 = 0\n",
       "                  Wave_period_tm10 = 0\n",
       "                  Peak_wave_direction = 0\n",
       "                  Mean_wave_direction = 0\n",
       "                  Directional_standard_deviation = 0\n",
       "                  Wave_velocity_components = 0\n",
       "                  Radiation_stresses = 0\n",
       "                  Particle_velocities = 0\n",
       "                  Wave_power = 0\n",
       "               EndSect  // Swell_parameters\n",
       "            EndSect  // INTEGRAL_WAVE_PARAMETERS\n",
       "            [INPUT_PARAMETERS]\n",
       "               Touched = 1\n",
       "               Surface_elevation = 0\n",
       "               Water_depth = 0\n",
       "               Current_velocity_components = 0\n",
       "               Wind_speed = 0\n",
       "               Wind_direction = 0\n",
       "               Ice_concentration = 0\n",
       "            EndSect  // INPUT_PARAMETERS\n",
       "            [MODEL_PARAMETERS]\n",
       "               Touched = 1\n",
       "               Wind_friction_speed = 0\n",
       "               Roughness_length = 0\n",
       "               Drag_coefficient = 0\n",
       "               Charnock_constant = 0\n",
       "               Friction_coefficient = 0\n",
       "               Breaking_parameter_gamma = 0\n",
       "               Courant_number = 0\n",
       "               Time_step_factor = 0\n",
       "               Convergence_angle = 0\n",
       "               Length = 0\n",
       "               Area = 0\n",
       "               Threshold_period = 0\n",
       "               Roller_area = 0\n",
       "               Roller_dissipation = 0\n",
       "               Breaking_index = 0\n",
       "            EndSect  // MODEL_PARAMETERS\n",
       "            [SPECTRAL_PARAMETERS]\n",
       "               Touched = 1\n",
       "               separation_of_wind_sea_and_swell = 3.0\n",
       "               threshold_frequency = 0.125\n",
       "               maximum_threshold_frequency = 0.125\n",
       "               wave_energy = 1\n",
       "               wave_action = 0\n",
       "               zeroth_moment_of_wave_action = 0\n",
       "               first_moment_of_wave_action = 0\n",
       "               wave_energy_wind_sea = 0\n",
       "               wave_energy_swell = 0\n",
       "            EndSect  // SPECTRAL_PARAMETERS\n",
       "         EndSect  // OUTPUT_2\n",
       "         [OUTPUT_3]\n",
       "            Touched = 1\n",
       "            include = 1\n",
       "            title = 'Wave parameters  in a point'\n",
       "            file_name = 'Waves_x20km_y20km.dfs0'\n",
       "            type = 1\n",
       "            format = 0\n",
       "            flood_and_dry = 2\n",
       "            coordinate_type = 'UTM-32'\n",
       "            zone = 0\n",
       "            input_file_name = ||\n",
       "            input_format = 1\n",
       "            interpolation_type = 2\n",
       "            use_end_time = 1\n",
       "            first_time_step = 0\n",
       "            last_time_step = 450\n",
       "            time_step_frequency = 1\n",
       "            number_of_points = 1\n",
       "            [POINT_1]\n",
       "               name = 'POINT_1'\n",
       "               x = 38000.0\n",
       "               y = 20000.0\n",
       "            EndSect  // POINT_1\n",
       "            [LINE]\n",
       "               npoints = 3\n",
       "               x_first = 0.0\n",
       "               y_first = 0.0\n",
       "               x_last = 40000.0\n",
       "               y_last = 40000.0\n",
       "            EndSect  // LINE\n",
       "            [AREA]\n",
       "               number_of_points = 4\n",
       "               [POINT_1]\n",
       "                  x = -400.0\n",
       "                  y = -400.0\n",
       "               EndSect  // POINT_1\n",
       "               [POINT_2]\n",
       "                  x = -400.0\n",
       "                  y = 40400.0\n",
       "               EndSect  // POINT_2\n",
       "               [POINT_3]\n",
       "                  x = 40400.0\n",
       "                  y = 40400.0\n",
       "               EndSect  // POINT_3\n",
       "               [POINT_4]\n",
       "                  x = 40400.0\n",
       "                  y = -400.0\n",
       "               EndSect  // POINT_4\n",
       "               orientation = 0.0\n",
       "               x_origo = 0.0\n",
       "               x_ds = 2105.263157894737\n",
       "               x_npoints = 20\n",
       "               y_origo = 0.0\n",
       "               y_ds = 2105.263157894737\n",
       "               y_npoints = 20\n",
       "               z_origo = -15.00000000000001\n",
       "               z_ds = 2.000000000000001\n",
       "               z_npoints = 10\n",
       "            EndSect  // AREA\n",
       "            [INTEGRAL_WAVE_PARAMETERS]\n",
       "               Touched = 1\n",
       "               type_of_spectrum = 1\n",
       "               minimum_frequency = 0.055\n",
       "               maximum_frequency = 0.5959088268863617\n",
       "               separation_of_wind_sea_and_swell = 3\n",
       "               threshold_frequency = 0.125\n",
       "               maximum_threshold_frequency = 0.125\n",
       "               hm0_minimum = 0.01\n",
       "               type_of_h_max = 3\n",
       "               duration = 10800.0\n",
       "               distance_above_bed_for_particle_velocity = 0.0\n",
       "               minimum_direction = 0.0\n",
       "               maximum_direction = 360.0\n",
       "               [Total_wave_parameters]\n",
       "                  Significant_wave_height = 1\n",
       "                  Maximum_wave_height = 0\n",
       "                  Peak_wave_period = 1\n",
       "                  Wave_period_t01 = 0\n",
       "                  Wave_period_t02 = 1\n",
       "                  Wave_period_tm10 = 0\n",
       "                  Peak_wave_direction = 0\n",
       "                  Mean_wave_direction = 1\n",
       "                  Directional_standard_deviation = 0\n",
       "                  Wave_velocity_components = 0\n",
       "                  Radiation_stresses = 0\n",
       "                  Particle_velocities = 0\n",
       "                  Wave_power = 0\n",
       "               EndSect  // Total_wave_parameters\n",
       "               [Wind_sea_parameters]\n",
       "                  Significant_wave_height = 0\n",
       "                  Maximum_wave_height = 0\n",
       "                  Peak_wave_period = 0\n",
       "                  Wave_period_t01 = 0\n",
       "                  Wave_period_t02 = 0\n",
       "                  Wave_period_tm10 = 0\n",
       "                  Peak_wave_direction = 0\n",
       "                  Mean_wave_direction = 0\n",
       "                  Directional_standard_deviation = 0\n",
       "                  Wave_velocity_components = 0\n",
       "                  Radiation_stresses = 0\n",
       "                  Particle_velocities = 0\n",
       "                  Wave_power = 0\n",
       "               EndSect  // Wind_sea_parameters\n",
       "               [Swell_parameters]\n",
       "                  Significant_wave_height = 0\n",
       "                  Maximum_wave_height = 0\n",
       "                  Peak_wave_period = 0\n",
       "                  Wave_period_t01 = 0\n",
       "                  Wave_period_t02 = 0\n",
       "                  Wave_period_tm10 = 0\n",
       "                  Peak_wave_direction = 0\n",
       "                  Mean_wave_direction = 0\n",
       "                  Directional_standard_deviation = 0\n",
       "                  Wave_velocity_components = 0\n",
       "                  Radiation_stresses = 0\n",
       "                  Particle_velocities = 0\n",
       "                  Wave_power = 0\n",
       "               EndSect  // Swell_parameters\n",
       "            EndSect  // INTEGRAL_WAVE_PARAMETERS\n",
       "            [INPUT_PARAMETERS]\n",
       "               Touched = 1\n",
       "               Surface_elevation = 0\n",
       "               Water_depth = 0\n",
       "               Current_velocity_components = 0\n",
       "               Wind_speed = 0\n",
       "               Wind_direction = 0\n",
       "               Ice_concentration = 0\n",
       "            EndSect  // INPUT_PARAMETERS\n",
       "            [MODEL_PARAMETERS]\n",
       "               Touched = 1\n",
       "               Wind_friction_speed = 0\n",
       "               Roughness_length = 0\n",
       "               Drag_coefficient = 0\n",
       "               Charnock_constant = 0\n",
       "               Friction_coefficient = 0\n",
       "               Breaking_parameter_gamma = 0\n",
       "               Courant_number = 0\n",
       "               Time_step_factor = 0\n",
       "               Convergence_angle = 0\n",
       "               Length = 0\n",
       "               Area = 0\n",
       "               Threshold_period = 0\n",
       "               Roller_area = 0\n",
       "               Roller_dissipation = 0\n",
       "               Breaking_index = 0\n",
       "            EndSect  // MODEL_PARAMETERS\n",
       "            [SPECTRAL_PARAMETERS]\n",
       "               Touched = 1\n",
       "               separation_of_wind_sea_and_swell = 3.0\n",
       "               threshold_frequency = 0.125\n",
       "               maximum_threshold_frequency = 0.125\n",
       "               wave_energy = 1\n",
       "               wave_action = 0\n",
       "               zeroth_moment_of_wave_action = 0\n",
       "               first_moment_of_wave_action = 0\n",
       "               wave_energy_wind_sea = 0\n",
       "               wave_energy_swell = 0\n",
       "            EndSect  // SPECTRAL_PARAMETERS\n",
       "         EndSect  // OUTPUT_3\n",
       "         [OUTPUT_4]\n",
       "            Touched = 1\n",
       "            include = 1\n",
       "            title = 'Spectrum in a point'\n",
       "            file_name = 'spectrum_x20km_y20km.dfsu'\n",
       "            type = 4\n",
       "            format = 0\n",
       "            flood_and_dry = 2\n",
       "            coordinate_type = 'UTM-32'\n",
       "            zone = 0\n",
       "            input_file_name = ||\n",
       "            input_format = 1\n",
       "            interpolation_type = 2\n",
       "            use_end_time = 1\n",
       "            first_time_step = 0\n",
       "            last_time_step = 450\n",
       "            time_step_frequency = 10\n",
       "            number_of_points = 1\n",
       "            [POINT_1]\n",
       "               name = 'POINT_1'\n",
       "               x = 38000.0\n",
       "               y = 20000.0\n",
       "            EndSect  // POINT_1\n",
       "            [LINE]\n",
       "               npoints = 3\n",
       "               x_first = 0.0\n",
       "               y_first = 0.0\n",
       "               x_last = 40000.0\n",
       "               y_last = 40000.0\n",
       "            EndSect  // LINE\n",
       "            [AREA]\n",
       "               number_of_points = 4\n",
       "               [POINT_1]\n",
       "                  x = -400.0\n",
       "                  y = -400.0\n",
       "               EndSect  // POINT_1\n",
       "               [POINT_2]\n",
       "                  x = -400.0\n",
       "                  y = 40400.0\n",
       "               EndSect  // POINT_2\n",
       "               [POINT_3]\n",
       "                  x = 40400.0\n",
       "                  y = 40400.0\n",
       "               EndSect  // POINT_3\n",
       "               [POINT_4]\n",
       "                  x = 40400.0\n",
       "                  y = -400.0\n",
       "               EndSect  // POINT_4\n",
       "               orientation = 0.0\n",
       "               x_origo = 0.0\n",
       "               x_ds = 2105.263157894737\n",
       "               x_npoints = 20\n",
       "               y_origo = 0.0\n",
       "               y_ds = 2105.263157894737\n",
       "               y_npoints = 20\n",
       "               z_origo = -15.00000000000001\n",
       "               z_ds = 2.000000000000001\n",
       "               z_npoints = 10\n",
       "            EndSect  // AREA\n",
       "            [INTEGRAL_WAVE_PARAMETERS]\n",
       "               Touched = 1\n",
       "               type_of_spectrum = 1\n",
       "               minimum_frequency = 0.054321\n",
       "               maximum_frequency = 0.0987654321\n",
       "               separation_of_wind_sea_and_swell = 3\n",
       "               threshold_frequency = 0.125\n",
       "               maximum_threshold_frequency = 0.125\n",
       "               hm0_minimum = 0.01\n",
       "               type_of_h_max = 3\n",
       "               duration = 10800.0\n",
       "               distance_above_bed_for_particle_velocity = 0.0\n",
       "               minimum_direction = 0.0\n",
       "               maximum_direction = 360.0\n",
       "               [Total_wave_parameters]\n",
       "                  Significant_wave_height = 1\n",
       "                  Maximum_wave_height = 1\n",
       "                  Peak_wave_period = 0\n",
       "                  Wave_period_t01 = 0\n",
       "                  Wave_period_t02 = 1\n",
       "                  Wave_period_tm10 = 0\n",
       "                  Peak_wave_direction = 0\n",
       "                  Mean_wave_direction = 1\n",
       "                  Directional_standard_deviation = 0\n",
       "                  Wave_velocity_components = 1\n",
       "                  Radiation_stresses = 0\n",
       "                  Particle_velocities = 0\n",
       "                  Wave_power = 0\n",
       "               EndSect  // Total_wave_parameters\n",
       "               [Wind_sea_parameters]\n",
       "                  Significant_wave_height = 0\n",
       "                  Maximum_wave_height = 0\n",
       "                  Peak_wave_period = 0\n",
       "                  Wave_period_t01 = 0\n",
       "                  Wave_period_t02 = 0\n",
       "                  Wave_period_tm10 = 0\n",
       "                  Peak_wave_direction = 0\n",
       "                  Mean_wave_direction = 0\n",
       "                  Directional_standard_deviation = 0\n",
       "                  Wave_velocity_components = 0\n",
       "                  Radiation_stresses = 0\n",
       "                  Particle_velocities = 0\n",
       "                  Wave_power = 0\n",
       "               EndSect  // Wind_sea_parameters\n",
       "               [Swell_parameters]\n",
       "                  Significant_wave_height = 0\n",
       "                  Maximum_wave_height = 0\n",
       "                  Peak_wave_period = 0\n",
       "                  Wave_period_t01 = 0\n",
       "                  Wave_period_t02 = 0\n",
       "                  Wave_period_tm10 = 0\n",
       "                  Peak_wave_direction = 0\n",
       "                  Mean_wave_direction = 0\n",
       "                  Directional_standard_deviation = 0\n",
       "                  Wave_velocity_components = 0\n",
       "                  Radiation_stresses = 0\n",
       "                  Particle_velocities = 0\n",
       "                  Wave_power = 0\n",
       "               EndSect  // Swell_parameters\n",
       "            EndSect  // INTEGRAL_WAVE_PARAMETERS\n",
       "            [INPUT_PARAMETERS]\n",
       "               Touched = 1\n",
       "               Surface_elevation = 0\n",
       "               Water_depth = 0\n",
       "               Current_velocity_components = 0\n",
       "               Wind_speed = 0\n",
       "               Wind_direction = 0\n",
       "               Ice_concentration = 0\n",
       "            EndSect  // INPUT_PARAMETERS\n",
       "            [MODEL_PARAMETERS]\n",
       "               Touched = 1\n",
       "               Wind_friction_speed = 0\n",
       "               Roughness_length = 0\n",
       "               Drag_coefficient = 0\n",
       "               Charnock_constant = 0\n",
       "               Friction_coefficient = 0\n",
       "               Breaking_parameter_gamma = 0\n",
       "               Courant_number = 0\n",
       "               Time_step_factor = 0\n",
       "               Convergence_angle = 0\n",
       "               Length = 0\n",
       "               Area = 0\n",
       "               Threshold_period = 0\n",
       "               Roller_area = 0\n",
       "               Roller_dissipation = 0\n",
       "               Breaking_index = 0\n",
       "            EndSect  // MODEL_PARAMETERS\n",
       "            [SPECTRAL_PARAMETERS]\n",
       "               Touched = 1\n",
       "               separation_of_wind_sea_and_swell = 3.0\n",
       "               threshold_frequency = 0.125\n",
       "               maximum_threshold_frequency = 0.125\n",
       "               wave_energy = 1\n",
       "               wave_action = 0\n",
       "               zeroth_moment_of_wave_action = 0\n",
       "               first_moment_of_wave_action = 0\n",
       "               wave_energy_wind_sea = 0\n",
       "               wave_energy_swell = 0\n",
       "            EndSect  // SPECTRAL_PARAMETERS\n",
       "         EndSect  // OUTPUT_4\n",
       "      EndSect  // OUTPUTS\n",
       "   EndSect  // SPECTRAL_WAVE_MODULE\n",
       "EndSect  // FemEngineSW"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pfs = mikeio.read_pfs(\"../tests/testdata/pfs/lake.sw\")\n",
    "pfs"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The \"target\" (root section) is in this case called FemEngineSW. `pfs.FemEngineSW` is a PfsSection object that contains other PfsSection objects. Let's print the names of it's subsections:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "dict_keys(['DOMAIN', 'TIME', 'MODULE_SELECTION', 'SPECTRAL_WAVE_MODULE'])"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pfs.FemEngineSW.keys()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "It is possible to navigate to each section and keyword in the pfs file:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'|.\\\\Lake_Mesh.mesh|'"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pfs.FemEngineSW.DOMAIN.file_name"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Touched = 0\n",
       "mode_of_hydrodynamic_module = 0\n",
       "hydrodynamic_features = 1\n",
       "fluid_property = 1\n",
       "mode_of_spectral_wave_module = 2\n",
       "mode_of_transport_module = 0\n",
       "mode_of_mud_transport_module = 0\n",
       "mode_of_eco_lab_module = 0\n",
       "mode_of_sand_transport_module = 0\n",
       "mode_of_particle_tracking_module = 0\n",
       "mode_of_oil_spill_module = 0\n",
       "mode_of_shoreline_module = 0"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pfs.FemEngineSW.MODULE_SELECTION"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "2"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pfs.FemEngineSW.MODULE_SELECTION.mode_of_spectral_wave_module"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "If you are unsure the name of a section, it is also possible to search for a specific string in the file, to find the name of a specific section.\n",
    "\n",
    "In the example below we do an case-insensitive search for the string 'charnock', which occurs at 6 different places in this file."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[FemEngineSW]\n",
       "   [SPECTRAL_WAVE_MODULE]\n",
       "      [WIND]\n",
       "         background_Charnock_parameter = 0.01\n",
       "         Charnock_parameter = 0.01\n",
       "      EndSect  // WIND\n",
       "      [OUTPUTS]\n",
       "         [OUTPUT_1]\n",
       "            [MODEL_PARAMETERS]\n",
       "               Charnock_constant = 0\n",
       "            EndSect  // MODEL_PARAMETERS\n",
       "         EndSect  // OUTPUT_1\n",
       "         [OUTPUT_2]\n",
       "            [MODEL_PARAMETERS]\n",
       "               Charnock_constant = 0\n",
       "            EndSect  // MODEL_PARAMETERS\n",
       "         EndSect  // OUTPUT_2\n",
       "         [OUTPUT_3]\n",
       "            [MODEL_PARAMETERS]\n",
       "               Charnock_constant = 0\n",
       "            EndSect  // MODEL_PARAMETERS\n",
       "         EndSect  // OUTPUT_3\n",
       "         [OUTPUT_4]\n",
       "            [MODEL_PARAMETERS]\n",
       "               Charnock_constant = 0\n",
       "            EndSect  // MODEL_PARAMETERS\n",
       "         EndSect  // OUTPUT_4\n",
       "      EndSect  // OUTPUTS\n",
       "   EndSect  // SPECTRAL_WAVE_MODULE\n",
       "EndSect  // FemEngineSW"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pfs.search(\"charnock\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The same search can be done at any level of the hierarchy, i.e. to search only within the OUTPUTS section:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[OUTPUT_1]\n",
       "   [MODEL_PARAMETERS]\n",
       "      Charnock_constant = 0\n",
       "   EndSect  // MODEL_PARAMETERS\n",
       "EndSect  // OUTPUT_1\n",
       "[OUTPUT_2]\n",
       "   [MODEL_PARAMETERS]\n",
       "      Charnock_constant = 0\n",
       "   EndSect  // MODEL_PARAMETERS\n",
       "EndSect  // OUTPUT_2\n",
       "[OUTPUT_3]\n",
       "   [MODEL_PARAMETERS]\n",
       "      Charnock_constant = 0\n",
       "   EndSect  // MODEL_PARAMETERS\n",
       "EndSect  // OUTPUT_3\n",
       "[OUTPUT_4]\n",
       "   [MODEL_PARAMETERS]\n",
       "      Charnock_constant = 0\n",
       "   EndSect  // MODEL_PARAMETERS\n",
       "EndSect  // OUTPUT_4"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pfs.FemEngineSW.SPECTRAL_WAVE_MODULE.OUTPUTS.search(\"charnock\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "background_Charnock_parameter = 0.01\n",
       "Charnock_parameter = 0.01"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pfs.FemEngineSW.SPECTRAL_WAVE_MODULE.WIND.search(\"charnock\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "MIKE FM PFS files has a specific structure and active FM modules can be accessed by an alias on the Pfs object. In this case, `pfs.SW` can be used as a short-hand for `pfs.FemEngineSW.SPECTRAL_WAVE_MODULE`."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "16"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pfs.SW.SPECTRAL.number_of_directions"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "0.5959088268863615"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pfs.SW.SPECTRAL.maximum_threshold_frequency"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Enumerated sections (e.g. [OUTPUT_1], [OUTPUT_2], ...) can be outputted in tabular form (dataframe)."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>Touched</th>\n",
       "      <th>include</th>\n",
       "      <th>title</th>\n",
       "      <th>file_name</th>\n",
       "      <th>type</th>\n",
       "      <th>format</th>\n",
       "      <th>flood_and_dry</th>\n",
       "      <th>coordinate_type</th>\n",
       "      <th>zone</th>\n",
       "      <th>input_file_name</th>\n",
       "      <th>...</th>\n",
       "      <th>last_time_step</th>\n",
       "      <th>time_step_frequency</th>\n",
       "      <th>number_of_points</th>\n",
       "      <th>POINT_1</th>\n",
       "      <th>LINE</th>\n",
       "      <th>AREA</th>\n",
       "      <th>INTEGRAL_WAVE_PARAMETERS</th>\n",
       "      <th>INPUT_PARAMETERS</th>\n",
       "      <th>MODEL_PARAMETERS</th>\n",
       "      <th>SPECTRAL_PARAMETERS</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>Wave parameters in domain</td>\n",
       "      <td>Wave_parameters.dfsu</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>2</td>\n",
       "      <td>UTM-32</td>\n",
       "      <td>0</td>\n",
       "      <td>||</td>\n",
       "      <td>...</td>\n",
       "      <td>450</td>\n",
       "      <td>10</td>\n",
       "      <td>1</td>\n",
       "      <td>{'name': 'POINT_1', 'x': 20000.0, 'y': 20000.0}</td>\n",
       "      <td>{'npoints': 3, 'x_first': 0.0, 'y_first': 0.0,...</td>\n",
       "      <td>{'number_of_points': 4, 'POINT_1': {'x': -400....</td>\n",
       "      <td>{'Touched': 1, 'type_of_spectrum': 1, 'minimum...</td>\n",
       "      <td>{'Touched': 1, 'Surface_elevation': 0, 'Water_...</td>\n",
       "      <td>{'Touched': 1, 'Wind_friction_speed': 0, 'Roug...</td>\n",
       "      <td>{'Touched': 1, 'separation_of_wind_sea_and_swe...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>Wave parameters along line</td>\n",
       "      <td>Wave_line.dfs1</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>2</td>\n",
       "      <td>UTM-32</td>\n",
       "      <td>0</td>\n",
       "      <td>||</td>\n",
       "      <td>...</td>\n",
       "      <td>450</td>\n",
       "      <td>10</td>\n",
       "      <td>1</td>\n",
       "      <td>{'name': 'POINT_1', 'x': 20000.0, 'y': 20000.0}</td>\n",
       "      <td>{'npoints': 41, 'x_first': 0.0, 'y_first': 200...</td>\n",
       "      <td>{'number_of_points': 4, 'POINT_1': {'x': -400....</td>\n",
       "      <td>{'Touched': 1, 'type_of_spectrum': 1, 'minimum...</td>\n",
       "      <td>{'Touched': 1, 'Surface_elevation': 0, 'Water_...</td>\n",
       "      <td>{'Touched': 1, 'Wind_friction_speed': 0, 'Roug...</td>\n",
       "      <td>{'Touched': 1, 'separation_of_wind_sea_and_swe...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>Wave parameters  in a point</td>\n",
       "      <td>Waves_x20km_y20km.dfs0</td>\n",
       "      <td>1</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>UTM-32</td>\n",
       "      <td>0</td>\n",
       "      <td>||</td>\n",
       "      <td>...</td>\n",
       "      <td>450</td>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>{'name': 'POINT_1', 'x': 38000.0, 'y': 20000.0}</td>\n",
       "      <td>{'npoints': 3, 'x_first': 0.0, 'y_first': 0.0,...</td>\n",
       "      <td>{'number_of_points': 4, 'POINT_1': {'x': -400....</td>\n",
       "      <td>{'Touched': 1, 'type_of_spectrum': 1, 'minimum...</td>\n",
       "      <td>{'Touched': 1, 'Surface_elevation': 0, 'Water_...</td>\n",
       "      <td>{'Touched': 1, 'Wind_friction_speed': 0, 'Roug...</td>\n",
       "      <td>{'Touched': 1, 'separation_of_wind_sea_and_swe...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>1</td>\n",
       "      <td>1</td>\n",
       "      <td>Spectrum in a point</td>\n",
       "      <td>spectrum_x20km_y20km.dfsu</td>\n",
       "      <td>4</td>\n",
       "      <td>0</td>\n",
       "      <td>2</td>\n",
       "      <td>UTM-32</td>\n",
       "      <td>0</td>\n",
       "      <td>||</td>\n",
       "      <td>...</td>\n",
       "      <td>450</td>\n",
       "      <td>10</td>\n",
       "      <td>1</td>\n",
       "      <td>{'name': 'POINT_1', 'x': 38000.0, 'y': 20000.0}</td>\n",
       "      <td>{'npoints': 3, 'x_first': 0.0, 'y_first': 0.0,...</td>\n",
       "      <td>{'number_of_points': 4, 'POINT_1': {'x': -400....</td>\n",
       "      <td>{'Touched': 1, 'type_of_spectrum': 1, 'minimum...</td>\n",
       "      <td>{'Touched': 1, 'Surface_elevation': 0, 'Water_...</td>\n",
       "      <td>{'Touched': 1, 'Wind_friction_speed': 0, 'Roug...</td>\n",
       "      <td>{'Touched': 1, 'separation_of_wind_sea_and_swe...</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>4 rows × 24 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "   Touched  include                        title                  file_name  \\\n",
       "1        1        1    Wave parameters in domain       Wave_parameters.dfsu   \n",
       "2        1        0   Wave parameters along line             Wave_line.dfs1   \n",
       "3        1        1  Wave parameters  in a point     Waves_x20km_y20km.dfs0   \n",
       "4        1        1          Spectrum in a point  spectrum_x20km_y20km.dfsu   \n",
       "\n",
       "   type  format  flood_and_dry coordinate_type  zone input_file_name  ...  \\\n",
       "1     1       2              2          UTM-32     0              ||  ...   \n",
       "2     1       1              2          UTM-32     0              ||  ...   \n",
       "3     1       0              2          UTM-32     0              ||  ...   \n",
       "4     4       0              2          UTM-32     0              ||  ...   \n",
       "\n",
       "   last_time_step  time_step_frequency  number_of_points  \\\n",
       "1             450                   10                 1   \n",
       "2             450                   10                 1   \n",
       "3             450                    1                 1   \n",
       "4             450                   10                 1   \n",
       "\n",
       "                                           POINT_1  \\\n",
       "1  {'name': 'POINT_1', 'x': 20000.0, 'y': 20000.0}   \n",
       "2  {'name': 'POINT_1', 'x': 20000.0, 'y': 20000.0}   \n",
       "3  {'name': 'POINT_1', 'x': 38000.0, 'y': 20000.0}   \n",
       "4  {'name': 'POINT_1', 'x': 38000.0, 'y': 20000.0}   \n",
       "\n",
       "                                                LINE  \\\n",
       "1  {'npoints': 3, 'x_first': 0.0, 'y_first': 0.0,...   \n",
       "2  {'npoints': 41, 'x_first': 0.0, 'y_first': 200...   \n",
       "3  {'npoints': 3, 'x_first': 0.0, 'y_first': 0.0,...   \n",
       "4  {'npoints': 3, 'x_first': 0.0, 'y_first': 0.0,...   \n",
       "\n",
       "                                                AREA  \\\n",
       "1  {'number_of_points': 4, 'POINT_1': {'x': -400....   \n",
       "2  {'number_of_points': 4, 'POINT_1': {'x': -400....   \n",
       "3  {'number_of_points': 4, 'POINT_1': {'x': -400....   \n",
       "4  {'number_of_points': 4, 'POINT_1': {'x': -400....   \n",
       "\n",
       "                            INTEGRAL_WAVE_PARAMETERS  \\\n",
       "1  {'Touched': 1, 'type_of_spectrum': 1, 'minimum...   \n",
       "2  {'Touched': 1, 'type_of_spectrum': 1, 'minimum...   \n",
       "3  {'Touched': 1, 'type_of_spectrum': 1, 'minimum...   \n",
       "4  {'Touched': 1, 'type_of_spectrum': 1, 'minimum...   \n",
       "\n",
       "                                    INPUT_PARAMETERS  \\\n",
       "1  {'Touched': 1, 'Surface_elevation': 0, 'Water_...   \n",
       "2  {'Touched': 1, 'Surface_elevation': 0, 'Water_...   \n",
       "3  {'Touched': 1, 'Surface_elevation': 0, 'Water_...   \n",
       "4  {'Touched': 1, 'Surface_elevation': 0, 'Water_...   \n",
       "\n",
       "                                    MODEL_PARAMETERS  \\\n",
       "1  {'Touched': 1, 'Wind_friction_speed': 0, 'Roug...   \n",
       "2  {'Touched': 1, 'Wind_friction_speed': 0, 'Roug...   \n",
       "3  {'Touched': 1, 'Wind_friction_speed': 0, 'Roug...   \n",
       "4  {'Touched': 1, 'Wind_friction_speed': 0, 'Roug...   \n",
       "\n",
       "                                 SPECTRAL_PARAMETERS  \n",
       "1  {'Touched': 1, 'separation_of_wind_sea_and_swe...  \n",
       "2  {'Touched': 1, 'separation_of_wind_sea_and_swe...  \n",
       "3  {'Touched': 1, 'separation_of_wind_sea_and_swe...  \n",
       "4  {'Touched': 1, 'separation_of_wind_sea_and_swe...  \n",
       "\n",
       "[4 rows x 24 columns]"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df = pfs.SW.OUTPUTS.to_dataframe()\n",
    "df"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Modify\n",
    "\n",
    "The PfsSection object can be modified. Existing values can be changes, new key-value pairs can be added, subsections can added or removed. "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [],
   "source": [
    "pfs.SW.SPECTRAL.number_of_directions = 32"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Touched = 1\n",
       "type_of_frequency_discretization = 2\n",
       "number_of_frequencies = 25\n",
       "minimum_frequency = 0.055\n",
       "frequency_interval = 0.02\n",
       "frequency_factor = 1.1\n",
       "type_of_directional_discretization = 1\n",
       "number_of_directions = 32\n",
       "minimum_direction = 0.0\n",
       "maximum_direction = 0.0\n",
       "separation_of_wind_sea_and_swell = 0\n",
       "threshold_frequency = 0.125\n",
       "maximum_threshold_frequency = 0.5959088268863615"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pfs.SW.SPECTRAL"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Add a new keyword"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [],
   "source": [
    "pfs.SW.SPECTRAL[\"new_keyword\"] = \"new_value\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Touched = 1\n",
       "type_of_frequency_discretization = 2\n",
       "number_of_frequencies = 25\n",
       "minimum_frequency = 0.055\n",
       "frequency_interval = 0.02\n",
       "frequency_factor = 1.1\n",
       "type_of_directional_discretization = 1\n",
       "number_of_directions = 32\n",
       "minimum_direction = 0.0\n",
       "maximum_direction = 0.0\n",
       "separation_of_wind_sea_and_swell = 0\n",
       "threshold_frequency = 0.125\n",
       "maximum_threshold_frequency = 0.5959088268863615\n",
       "new_keyword = 'new_value'"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pfs.SW.SPECTRAL"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Add a section\n",
    "\n",
    "Let's create an additional output, by copying OUTPUT_4 and modifying some parameters."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [],
   "source": [
    "pfs.SW.OUTPUTS.number_of_outputs += 1"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [],
   "source": [
    "new_output = pfs.SW.OUTPUTS.OUTPUT_4.copy()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [],
   "source": [
    "new_output.file_name = 'spectrum_x10km_y40km.dfsu'\n",
    "new_output.POINT_1.x = 10000\n",
    "new_output.POINT_1.y = 40000"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [],
   "source": [
    "pfs.SW.OUTPUTS[\"OUTPUT_5\"] = new_output"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "dict_keys(['Touched', 'MzSEPfsListItemCount', 'number_of_outputs', 'OUTPUT_1', 'OUTPUT_2', 'OUTPUT_3', 'OUTPUT_4', 'OUTPUT_5'])"
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pfs.SW.OUTPUTS.keys()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Output\n",
    "\n",
    "The Pfs object can be written to pfs file, but can also be exported to a dictionary (which in turn can be written to a yaml or json file)."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [],
   "source": [
    "pfs.write(\"lake_modified.pfs\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'FemEngineSW': [DOMAIN]\n",
       "    Touched = 1\n",
       "    discretization = 2\n",
       "    number_of_dimensions = 2\n",
       "    number_of_meshes = 1\n",
       "    file_name = |.\\Lake_Mesh.mesh|\n",
       "    type_of_reordering = 1\n",
       "    number_of_domains = 16\n",
       "    coordinate_type = 'UTM-32'\n",
       "    minimum_depth = 0.0\n",
       "    datum_depth = 0.0\n",
       "    vertical_mesh_type_overall = 1\n",
       "    number_of_layers = 11\n",
       "    z_sigma = 0.0\n",
       "    vertical_mesh_type = 1\n",
       "    layer_thickness = 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.0\n",
       "    sigma_c = 0.0\n",
       "    theta = 2.0\n",
       "    b = 0.0\n",
       "    number_of_layers_zlevel = 10\n",
       "    vertical_mesh_type_zlevel = 1\n",
       "    constant_layer_thickness_zlevel = 0.0\n",
       "    variable_layer_thickness_zlevel = 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0\n",
       "    type_of_bathymetry_adjustment = 1\n",
       "    minimum_layer_thickness_zlevel = 0.0\n",
       "    type_of_mesh = 0\n",
       "    type_of_gauss = 3\n",
       "    [BOUNDARY_NAMES]\n",
       "       Touched = 0\n",
       "       MzSEPfsListItemCount = 0\n",
       "    EndSect  // BOUNDARY_NAMES\n",
       " EndSect  // DOMAIN\n",
       " [TIME]\n",
       "    Touched = 1\n",
       "    start_time = 2002, 1, 1, 0, 0, 0\n",
       "    time_step_interval = 120.0\n",
       "    number_of_time_steps = 450\n",
       " EndSect  // TIME\n",
       " [MODULE_SELECTION]\n",
       "    Touched = 0\n",
       "    mode_of_hydrodynamic_module = 0\n",
       "    hydrodynamic_features = 1\n",
       "    fluid_property = 1\n",
       "    mode_of_spectral_wave_module = 2\n",
       "    mode_of_transport_module = 0\n",
       "    mode_of_mud_transport_module = 0\n",
       "    mode_of_eco_lab_module = 0\n",
       "    mode_of_sand_transport_module = 0\n",
       "    mode_of_particle_tracking_module = 0\n",
       "    mode_of_oil_spill_module = 0\n",
       "    mode_of_shoreline_module = 0\n",
       " EndSect  // MODULE_SELECTION\n",
       " [SPECTRAL_WAVE_MODULE]\n",
       "    mode = 2\n",
       "    [SPACE]\n",
       "       number_of_mesh_geometry = 1\n",
       "    EndSect  // SPACE\n",
       "    [EQUATION]\n",
       "       Touched = 1\n",
       "       formulation = 2\n",
       "       time_formulation = 2\n",
       "       JONSWAP_factor_1 = 0.92\n",
       "       JONSWAP_factor_2 = 0.83\n",
       "    EndSect  // EQUATION\n",
       "    [TIME]\n",
       "       Touched = 0\n",
       "       start_time_step = 0\n",
       "       time_step_factor = 1\n",
       "       time_step_factor_AD = 1\n",
       "    EndSect  // TIME\n",
       "    [SPECTRAL]\n",
       "       Touched = 1\n",
       "       type_of_frequency_discretization = 2\n",
       "       number_of_frequencies = 25\n",
       "       minimum_frequency = 0.055\n",
       "       frequency_interval = 0.02\n",
       "       frequency_factor = 1.1\n",
       "       type_of_directional_discretization = 1\n",
       "       number_of_directions = 32\n",
       "       minimum_direction = 0.0\n",
       "       maximum_direction = 0.0\n",
       "       separation_of_wind_sea_and_swell = 0\n",
       "       threshold_frequency = 0.125\n",
       "       maximum_threshold_frequency = 0.5959088268863615\n",
       "       new_keyword = 'new_value'\n",
       "    EndSect  // SPECTRAL\n",
       "    [SOLUTION_TECHNIQUE]\n",
       "       Touched = 1\n",
       "       error_level = 0\n",
       "       maximum_number_of_errors = 200\n",
       "       minimum_period = 0.1\n",
       "       maximum_period = 25.0\n",
       "       initial_period = 8.0\n",
       "       scheme_of_space_discretization_geographical = 1\n",
       "       scheme_of_space_discretization_direction = 1\n",
       "       scheme_of_space_discretization_frequency = 1\n",
       "       method = 2\n",
       "       number_of_iterations = 10\n",
       "       tolerance1 = 0.0001\n",
       "       tolerance2 = 0.001\n",
       "       relaxation_factor = 0.1\n",
       "       number_of_levels_in_transport_calc = 32\n",
       "       number_of_steps_in_source_calc = 1\n",
       "       maximum_CFL_number = 1.0\n",
       "       dt_min = 0.01\n",
       "       dt_max = 120.0\n",
       "       type_overall = 0\n",
       "       file_name_overall = |.\\convergence_overall.dfs0|\n",
       "       input_format = 1\n",
       "       coordinate_type = ''\n",
       "       input_file_name = ||\n",
       "       number_of_points = 0\n",
       "       type_domain = 0\n",
       "       file_name_domain = |.\\convergence_domain.dfsu|\n",
       "       output_frequency = 5\n",
       "    EndSect  // SOLUTION_TECHNIQUE\n",
       "    [DEPTH]\n",
       "       Touched = 1\n",
       "       type = 0\n",
       "       minimum_depth = 0.01\n",
       "       format = 0\n",
       "       soft_time_interval = 0.0\n",
       "       constant_level = 0.0\n",
       "       file_name = ||\n",
       "       item_number = 1\n",
       "       item_name = ''\n",
       "    EndSect  // DEPTH\n",
       "    [CURRENT]\n",
       "       Touched = 1\n",
       "       type = 0\n",
       "       type_blocking = 1\n",
       "       factor_blocking = 0.1\n",
       "       format = 0\n",
       "       soft_time_interval = 0.0\n",
       "       constant_x_velocity = 0.0\n",
       "       constant_y_velocity = 0.0\n",
       "       file_name = ||\n",
       "       item_number_for_x_velocity = 0\n",
       "       item_number_for_y_velocity = 0\n",
       "       item_name_for_x_velocity = ''\n",
       "       item_name_for_y_velocity = ''\n",
       "    EndSect  // CURRENT\n",
       "    [WIND]\n",
       "       Touched = 1\n",
       "       type = 1\n",
       "       format = 1\n",
       "       constant_speed = 15.0\n",
       "       constant_direction = 270.0\n",
       "       file_name = |.\\Wind.dfs0|\n",
       "       item_number_for_speed = 1\n",
       "       item_number_for_direction = 2\n",
       "       item_name_for_speed = 'Speed'\n",
       "       item_name_for_direction = 'Direction'\n",
       "       soft_time_interval = 0.0\n",
       "       formula = 1\n",
       "       type_of_drag = 1\n",
       "       linear_growth_coefficient = 0.0015\n",
       "       type_of_air_sea_interaction = 1\n",
       "       background_Charnock_parameter = 0.01\n",
       "       Charnock_parameter = 0.01\n",
       "       alpha_drag = 0.00063\n",
       "       beta_drag = 6.6e-05\n",
       "    EndSect  // WIND\n",
       "    [ICE]\n",
       "       Touched = 1\n",
       "       type = 0\n",
       "       format = 3\n",
       "       c_cut_off = 0.33\n",
       "       file_name = ||\n",
       "       item_number = 1\n",
       "       item_name = ''\n",
       "    EndSect  // ICE\n",
       "    [DIFFRACTION]\n",
       "       Touched = 1\n",
       "       type = 0\n",
       "       minimum_delta = -0.75\n",
       "       maximum_delta = 3.0\n",
       "       type_of_smoothing = 1\n",
       "       smoothing_factor = 1.0\n",
       "       number_of_smoothing_steps = 1\n",
       "    EndSect  // DIFFRACTION\n",
       "    [TRANSFER]\n",
       "       Touched = 1\n",
       "       type = 1\n",
       "       type_triad = 0\n",
       "       alpha_EB = 0.25\n",
       "    EndSect  // TRANSFER\n",
       "    [WAVE_BREAKING]\n",
       "       Touched = 1\n",
       "       type = 0\n",
       "       type_of_gamma = 1\n",
       "       alpha = 1.0\n",
       "       gamma_steepness = 1.0\n",
       "       type_of_effect_on_frequency = 1\n",
       "       type_of_roller = 0\n",
       "       roller_propagation_factor = 1.0\n",
       "       roller_dissipation_factor = 0.15\n",
       "       roller_density = 1000.0\n",
       "       [GAMMA]\n",
       "          Touched = 1\n",
       "          type = 1\n",
       "          format = 0\n",
       "          constant_value = 0.55\n",
       "          file_name = ||\n",
       "          item_number = 1\n",
       "          item_name = ''\n",
       "          type_of_soft_start = 2\n",
       "          soft_time_interval = 0.0\n",
       "          reference_value = 0.0\n",
       "          type_of_time_interpolation = 1\n",
       "       EndSect  // GAMMA\n",
       "    EndSect  // WAVE_BREAKING\n",
       "    [BOTTOM_FRICTION]\n",
       "       Touched = 1\n",
       "       type = 0\n",
       "       constant_fc = 0.0\n",
       "       type_of_effect_on_frequency = 0\n",
       "       [FRICTION_COEFFICIENT]\n",
       "          Touched = 1\n",
       "          type = 1\n",
       "          format = 0\n",
       "          constant_value = 0.0775\n",
       "          file_name = ||\n",
       "          item_number = 1\n",
       "          item_name = ''\n",
       "          type_of_soft_start = 2\n",
       "          soft_time_interval = 0.0\n",
       "          reference_value = 0.0\n",
       "          type_of_time_interpolation = 1\n",
       "       EndSect  // FRICTION_COEFFICIENT\n",
       "       [FRICTION_FACTOR]\n",
       "          Touched = 1\n",
       "          type = 1\n",
       "          format = 0\n",
       "          constant_value = 0.0212\n",
       "          file_name = ||\n",
       "          item_number = 1\n",
       "          item_name = ''\n",
       "          type_of_soft_start = 2\n",
       "          soft_time_interval = 0.0\n",
       "          reference_value = 0.0\n",
       "          type_of_time_interpolation = 1\n",
       "       EndSect  // FRICTION_FACTOR\n",
       "       [NIKURADSE_ROUGHNESS]\n",
       "          Touched = 1\n",
       "          type = 1\n",
       "          format = 0\n",
       "          constant_value = 0.04\n",
       "          file_name = ||\n",
       "          item_number = 1\n",
       "          item_name = ''\n",
       "          type_of_soft_start = 2\n",
       "          soft_time_interval = 0.0\n",
       "          reference_value = 0.0\n",
       "          type_of_time_interpolation = 1\n",
       "       EndSect  // NIKURADSE_ROUGHNESS\n",
       "       [SAND_GRAIN_SIZE]\n",
       "          Touched = 1\n",
       "          type = 1\n",
       "          format = 0\n",
       "          constant_value = 0.00025\n",
       "          file_name = ||\n",
       "          item_number = 1\n",
       "          item_name = ''\n",
       "          type_of_soft_start = 2\n",
       "          soft_time_interval = 0.0\n",
       "          reference_value = 0.0\n",
       "          type_of_time_interpolation = 1\n",
       "       EndSect  // SAND_GRAIN_SIZE\n",
       "    EndSect  // BOTTOM_FRICTION\n",
       "    [WHITECAPPING]\n",
       "       Touched = 1\n",
       "       type = 1\n",
       "       type_of_spectrum = 3\n",
       "       mean_frequency_power = -1\n",
       "       mean_wave_number_power = -1\n",
       "       [dissipation_cdiss]\n",
       "          Touched = 1\n",
       "          type = 1\n",
       "          format = 0\n",
       "          constant_value = 4.5\n",
       "          file_name = ||\n",
       "          item_number = 1\n",
       "          item_name = ''\n",
       "          type_of_soft_start = 2\n",
       "          soft_time_interval = 0.0\n",
       "          reference_value = 0.0\n",
       "          type_of_time_interpolation = 1\n",
       "       EndSect  // dissipation_cdiss\n",
       "       [dissipation_delta]\n",
       "          Touched = 1\n",
       "          type = 1\n",
       "          format = 0\n",
       "          constant_value = 0.5\n",
       "          file_name = ||\n",
       "          item_number = 1\n",
       "          item_name = ''\n",
       "          type_of_soft_start = 2\n",
       "          soft_time_interval = 0.0\n",
       "          reference_value = 0.0\n",
       "          type_of_time_interpolation = 1\n",
       "       EndSect  // dissipation_delta\n",
       "    EndSect  // WHITECAPPING\n",
       "    [STRUCTURES]\n",
       "       type = 0\n",
       "       input_format = 1\n",
       "       coordinate_type = ''\n",
       "       number_of_structures = 0\n",
       "       input_file_name = ||\n",
       "       [LINE_STRUCTURES]\n",
       "          Touched = 1\n",
       "          MzSEPfsListItemCount = 0\n",
       "          output_of_link_data = 0\n",
       "          file_name_section = 'line_section.xyz'\n",
       "          number_of_structures = 0\n",
       "       EndSect  // LINE_STRUCTURES\n",
       "    EndSect  // STRUCTURES\n",
       "    [INITIAL_CONDITIONS]\n",
       "       Touched = 1\n",
       "       type = 0\n",
       "       type_additional = 1\n",
       "       type_of_spectra = 1\n",
       "       fetch = 40000.0\n",
       "       max_peak_frequency = 0.4\n",
       "       max_Phillips_constant = 0.0081\n",
       "       shape_parameter_sigma_a = 0.07\n",
       "       shape_parameter_sigma_b = 0.09\n",
       "       peakednes_parameter_gamma = 3.3\n",
       "       file_name_m = ||\n",
       "       item_number_m0 = 1\n",
       "       item_number_m1 = 1\n",
       "       item_name_m0 = ''\n",
       "       item_name_m1 = ''\n",
       "       file_name_A = ||\n",
       "       item_number_A = 1\n",
       "       item_name_A = ''\n",
       "    EndSect  // INITIAL_CONDITIONS\n",
       "    [BOUNDARY_CONDITIONS]\n",
       "       Touched = 0\n",
       "       MzSEPfsListItemCount = 0\n",
       "       [CODE_1]\n",
       "       EndSect  // CODE_1\n",
       "    EndSect  // BOUNDARY_CONDITIONS\n",
       "    [OUTPUTS]\n",
       "       Touched = 1\n",
       "       MzSEPfsListItemCount = 4\n",
       "       number_of_outputs = 5\n",
       "       [OUTPUT_1]\n",
       "          Touched = 1\n",
       "          include = 1\n",
       "          title = 'Wave parameters in domain'\n",
       "          file_name = 'Wave_parameters.dfsu'\n",
       "          type = 1\n",
       "          format = 2\n",
       "          flood_and_dry = 2\n",
       "          coordinate_type = 'UTM-32'\n",
       "          zone = 0\n",
       "          input_file_name = ||\n",
       "          input_format = 1\n",
       "          interpolation_type = 1\n",
       "          use_end_time = 1\n",
       "          first_time_step = 0\n",
       "          last_time_step = 450\n",
       "          time_step_frequency = 10\n",
       "          number_of_points = 1\n",
       "          [POINT_1]\n",
       "             name = 'POINT_1'\n",
       "             x = 20000.0\n",
       "             y = 20000.0\n",
       "          EndSect  // POINT_1\n",
       "          [LINE]\n",
       "             npoints = 3\n",
       "             x_first = 0.0\n",
       "             y_first = 0.0\n",
       "             x_last = 40000.0\n",
       "             y_last = 40000.0\n",
       "          EndSect  // LINE\n",
       "          [AREA]\n",
       "             number_of_points = 4\n",
       "             [POINT_1]\n",
       "                x = -400.0\n",
       "                y = -400.0\n",
       "             EndSect  // POINT_1\n",
       "             [POINT_2]\n",
       "                x = -400.0\n",
       "                y = 40400.0\n",
       "             EndSect  // POINT_2\n",
       "             [POINT_3]\n",
       "                x = 40400.0\n",
       "                y = 40400.0\n",
       "             EndSect  // POINT_3\n",
       "             [POINT_4]\n",
       "                x = 40400.0\n",
       "                y = -400.0\n",
       "             EndSect  // POINT_4\n",
       "             orientation = 0.0\n",
       "             x_origo = 0.0\n",
       "             x_ds = 2105.263157894737\n",
       "             x_npoints = 20\n",
       "             y_origo = 0.0\n",
       "             y_ds = 2105.263157894737\n",
       "             y_npoints = 20\n",
       "             z_origo = -15.00000000000001\n",
       "             z_ds = 2.000000000000001\n",
       "             z_npoints = 10\n",
       "          EndSect  // AREA\n",
       "          [INTEGRAL_WAVE_PARAMETERS]\n",
       "             Touched = 1\n",
       "             type_of_spectrum = 1\n",
       "             minimum_frequency = 0.055\n",
       "             maximum_frequency = 0.5959088268863617\n",
       "             separation_of_wind_sea_and_swell = 3\n",
       "             threshold_frequency = 0.125\n",
       "             maximum_threshold_frequency = 0.125\n",
       "             hm0_minimum = 0.01\n",
       "             type_of_h_max = 3\n",
       "             duration = 10800.0\n",
       "             distance_above_bed_for_particle_velocity = 0.0\n",
       "             minimum_direction = 0.0\n",
       "             maximum_direction = 360.0\n",
       "             [Total_wave_parameters]\n",
       "                Significant_wave_height = 1\n",
       "                Maximum_wave_height = 0\n",
       "                Peak_wave_period = 1\n",
       "                Wave_period_t01 = 0\n",
       "                Wave_period_t02 = 1\n",
       "                Wave_period_tm10 = 0\n",
       "                Peak_wave_direction = 0\n",
       "                Mean_wave_direction = 1\n",
       "                Directional_standard_deviation = 0\n",
       "                Wave_velocity_components = 1\n",
       "                Radiation_stresses = 0\n",
       "                Particle_velocities = 0\n",
       "                Wave_power = 0\n",
       "             EndSect  // Total_wave_parameters\n",
       "             [Wind_sea_parameters]\n",
       "                Significant_wave_height = 0\n",
       "                Maximum_wave_height = 0\n",
       "                Peak_wave_period = 0\n",
       "                Wave_period_t01 = 0\n",
       "                Wave_period_t02 = 0\n",
       "                Wave_period_tm10 = 0\n",
       "                Peak_wave_direction = 0\n",
       "                Mean_wave_direction = 0\n",
       "                Directional_standard_deviation = 0\n",
       "                Wave_velocity_components = 0\n",
       "                Radiation_stresses = 0\n",
       "                Particle_velocities = 0\n",
       "                Wave_power = 0\n",
       "             EndSect  // Wind_sea_parameters\n",
       "             [Swell_parameters]\n",
       "                Significant_wave_height = 0\n",
       "                Maximum_wave_height = 0\n",
       "                Peak_wave_period = 0\n",
       "                Wave_period_t01 = 0\n",
       "                Wave_period_t02 = 0\n",
       "                Wave_period_tm10 = 0\n",
       "                Peak_wave_direction = 0\n",
       "                Mean_wave_direction = 0\n",
       "                Directional_standard_deviation = 0\n",
       "                Wave_velocity_components = 0\n",
       "                Radiation_stresses = 0\n",
       "                Particle_velocities = 0\n",
       "                Wave_power = 0\n",
       "             EndSect  // Swell_parameters\n",
       "          EndSect  // INTEGRAL_WAVE_PARAMETERS\n",
       "          [INPUT_PARAMETERS]\n",
       "             Touched = 1\n",
       "             Surface_elevation = 0\n",
       "             Water_depth = 0\n",
       "             Current_velocity_components = 0\n",
       "             Wind_speed = 0\n",
       "             Wind_direction = 0\n",
       "             Ice_concentration = 0\n",
       "          EndSect  // INPUT_PARAMETERS\n",
       "          [MODEL_PARAMETERS]\n",
       "             Touched = 1\n",
       "             Wind_friction_speed = 0\n",
       "             Roughness_length = 0\n",
       "             Drag_coefficient = 0\n",
       "             Charnock_constant = 0\n",
       "             Friction_coefficient = 0\n",
       "             Breaking_parameter_gamma = 0\n",
       "             Courant_number = 1\n",
       "             Time_step_factor = 1\n",
       "             Convergence_angle = 0\n",
       "             Length = 0\n",
       "             Area = 0\n",
       "             Threshold_period = 0\n",
       "             Roller_area = 0\n",
       "             Roller_dissipation = 0\n",
       "             Breaking_index = 0\n",
       "          EndSect  // MODEL_PARAMETERS\n",
       "          [SPECTRAL_PARAMETERS]\n",
       "             Touched = 1\n",
       "             separation_of_wind_sea_and_swell = 3.0\n",
       "             threshold_frequency = 0.125\n",
       "             maximum_threshold_frequency = 0.125\n",
       "             wave_energy = 1\n",
       "             wave_action = 0\n",
       "             zeroth_moment_of_wave_action = 0\n",
       "             first_moment_of_wave_action = 0\n",
       "             wave_energy_wind_sea = 0\n",
       "             wave_energy_swell = 0\n",
       "          EndSect  // SPECTRAL_PARAMETERS\n",
       "       EndSect  // OUTPUT_1\n",
       "       [OUTPUT_2]\n",
       "          Touched = 1\n",
       "          include = 0\n",
       "          title = 'Wave parameters along line'\n",
       "          file_name = 'Wave_line.dfs1'\n",
       "          type = 1\n",
       "          format = 1\n",
       "          flood_and_dry = 2\n",
       "          coordinate_type = 'UTM-32'\n",
       "          zone = 0\n",
       "          input_file_name = ||\n",
       "          input_format = 1\n",
       "          interpolation_type = 2\n",
       "          use_end_time = 1\n",
       "          first_time_step = 0\n",
       "          last_time_step = 450\n",
       "          time_step_frequency = 10\n",
       "          number_of_points = 1\n",
       "          [POINT_1]\n",
       "             name = 'POINT_1'\n",
       "             x = 20000.0\n",
       "             y = 20000.0\n",
       "          EndSect  // POINT_1\n",
       "          [LINE]\n",
       "             npoints = 41\n",
       "             x_first = 0.0\n",
       "             y_first = 20000.0\n",
       "             x_last = 40000.0\n",
       "             y_last = 20000.0\n",
       "          EndSect  // LINE\n",
       "          [AREA]\n",
       "             number_of_points = 4\n",
       "             [POINT_1]\n",
       "                x = -400.0\n",
       "                y = -400.0\n",
       "             EndSect  // POINT_1\n",
       "             [POINT_2]\n",
       "                x = -400.0\n",
       "                y = 40400.0\n",
       "             EndSect  // POINT_2\n",
       "             [POINT_3]\n",
       "                x = 40400.0\n",
       "                y = 40400.0\n",
       "             EndSect  // POINT_3\n",
       "             [POINT_4]\n",
       "                x = 40400.0\n",
       "                y = -400.0\n",
       "             EndSect  // POINT_4\n",
       "             orientation = 0.0\n",
       "             x_origo = 0.0\n",
       "             x_ds = 2105.263157894737\n",
       "             x_npoints = 20\n",
       "             y_origo = 0.0\n",
       "             y_ds = 2105.263157894737\n",
       "             y_npoints = 20\n",
       "             z_origo = -15.00000000000001\n",
       "             z_ds = 2.000000000000001\n",
       "             z_npoints = 10\n",
       "          EndSect  // AREA\n",
       "          [INTEGRAL_WAVE_PARAMETERS]\n",
       "             Touched = 1\n",
       "             type_of_spectrum = 1\n",
       "             minimum_frequency = 0.055\n",
       "             maximum_frequency = 0.5959088268863617\n",
       "             separation_of_wind_sea_and_swell = 3\n",
       "             threshold_frequency = 0.125\n",
       "             maximum_threshold_frequency = 0.125\n",
       "             hm0_minimum = 0.01\n",
       "             type_of_h_max = 3\n",
       "             duration = 10800.0\n",
       "             distance_above_bed_for_particle_velocity = 0.0\n",
       "             minimum_direction = 0.0\n",
       "             maximum_direction = 360.0\n",
       "             [Total_wave_parameters]\n",
       "                Significant_wave_height = 1\n",
       "                Maximum_wave_height = 0\n",
       "                Peak_wave_period = 1\n",
       "                Wave_period_t01 = 0\n",
       "                Wave_period_t02 = 1\n",
       "                Wave_period_tm10 = 0\n",
       "                Peak_wave_direction = 0\n",
       "                Mean_wave_direction = 1\n",
       "                Directional_standard_deviation = 0\n",
       "                Wave_velocity_components = 0\n",
       "                Radiation_stresses = 0\n",
       "                Particle_velocities = 0\n",
       "                Wave_power = 0\n",
       "             EndSect  // Total_wave_parameters\n",
       "             [Wind_sea_parameters]\n",
       "                Significant_wave_height = 0\n",
       "                Maximum_wave_height = 0\n",
       "                Peak_wave_period = 0\n",
       "                Wave_period_t01 = 0\n",
       "                Wave_period_t02 = 0\n",
       "                Wave_period_tm10 = 0\n",
       "                Peak_wave_direction = 0\n",
       "                Mean_wave_direction = 0\n",
       "                Directional_standard_deviation = 0\n",
       "                Wave_velocity_components = 0\n",
       "                Radiation_stresses = 0\n",
       "                Particle_velocities = 0\n",
       "                Wave_power = 0\n",
       "             EndSect  // Wind_sea_parameters\n",
       "             [Swell_parameters]\n",
       "                Significant_wave_height = 0\n",
       "                Maximum_wave_height = 0\n",
       "                Peak_wave_period = 0\n",
       "                Wave_period_t01 = 0\n",
       "                Wave_period_t02 = 0\n",
       "                Wave_period_tm10 = 0\n",
       "                Peak_wave_direction = 0\n",
       "                Mean_wave_direction = 0\n",
       "                Directional_standard_deviation = 0\n",
       "                Wave_velocity_components = 0\n",
       "                Radiation_stresses = 0\n",
       "                Particle_velocities = 0\n",
       "                Wave_power = 0\n",
       "             EndSect  // Swell_parameters\n",
       "          EndSect  // INTEGRAL_WAVE_PARAMETERS\n",
       "          [INPUT_PARAMETERS]\n",
       "             Touched = 1\n",
       "             Surface_elevation = 0\n",
       "             Water_depth = 0\n",
       "             Current_velocity_components = 0\n",
       "             Wind_speed = 0\n",
       "             Wind_direction = 0\n",
       "             Ice_concentration = 0\n",
       "          EndSect  // INPUT_PARAMETERS\n",
       "          [MODEL_PARAMETERS]\n",
       "             Touched = 1\n",
       "             Wind_friction_speed = 0\n",
       "             Roughness_length = 0\n",
       "             Drag_coefficient = 0\n",
       "             Charnock_constant = 0\n",
       "             Friction_coefficient = 0\n",
       "             Breaking_parameter_gamma = 0\n",
       "             Courant_number = 0\n",
       "             Time_step_factor = 0\n",
       "             Convergence_angle = 0\n",
       "             Length = 0\n",
       "             Area = 0\n",
       "             Threshold_period = 0\n",
       "             Roller_area = 0\n",
       "             Roller_dissipation = 0\n",
       "             Breaking_index = 0\n",
       "          EndSect  // MODEL_PARAMETERS\n",
       "          [SPECTRAL_PARAMETERS]\n",
       "             Touched = 1\n",
       "             separation_of_wind_sea_and_swell = 3.0\n",
       "             threshold_frequency = 0.125\n",
       "             maximum_threshold_frequency = 0.125\n",
       "             wave_energy = 1\n",
       "             wave_action = 0\n",
       "             zeroth_moment_of_wave_action = 0\n",
       "             first_moment_of_wave_action = 0\n",
       "             wave_energy_wind_sea = 0\n",
       "             wave_energy_swell = 0\n",
       "          EndSect  // SPECTRAL_PARAMETERS\n",
       "       EndSect  // OUTPUT_2\n",
       "       [OUTPUT_3]\n",
       "          Touched = 1\n",
       "          include = 1\n",
       "          title = 'Wave parameters  in a point'\n",
       "          file_name = 'Waves_x20km_y20km.dfs0'\n",
       "          type = 1\n",
       "          format = 0\n",
       "          flood_and_dry = 2\n",
       "          coordinate_type = 'UTM-32'\n",
       "          zone = 0\n",
       "          input_file_name = ||\n",
       "          input_format = 1\n",
       "          interpolation_type = 2\n",
       "          use_end_time = 1\n",
       "          first_time_step = 0\n",
       "          last_time_step = 450\n",
       "          time_step_frequency = 1\n",
       "          number_of_points = 1\n",
       "          [POINT_1]\n",
       "             name = 'POINT_1'\n",
       "             x = 38000.0\n",
       "             y = 20000.0\n",
       "          EndSect  // POINT_1\n",
       "          [LINE]\n",
       "             npoints = 3\n",
       "             x_first = 0.0\n",
       "             y_first = 0.0\n",
       "             x_last = 40000.0\n",
       "             y_last = 40000.0\n",
       "          EndSect  // LINE\n",
       "          [AREA]\n",
       "             number_of_points = 4\n",
       "             [POINT_1]\n",
       "                x = -400.0\n",
       "                y = -400.0\n",
       "             EndSect  // POINT_1\n",
       "             [POINT_2]\n",
       "                x = -400.0\n",
       "                y = 40400.0\n",
       "             EndSect  // POINT_2\n",
       "             [POINT_3]\n",
       "                x = 40400.0\n",
       "                y = 40400.0\n",
       "             EndSect  // POINT_3\n",
       "             [POINT_4]\n",
       "                x = 40400.0\n",
       "                y = -400.0\n",
       "             EndSect  // POINT_4\n",
       "             orientation = 0.0\n",
       "             x_origo = 0.0\n",
       "             x_ds = 2105.263157894737\n",
       "             x_npoints = 20\n",
       "             y_origo = 0.0\n",
       "             y_ds = 2105.263157894737\n",
       "             y_npoints = 20\n",
       "             z_origo = -15.00000000000001\n",
       "             z_ds = 2.000000000000001\n",
       "             z_npoints = 10\n",
       "          EndSect  // AREA\n",
       "          [INTEGRAL_WAVE_PARAMETERS]\n",
       "             Touched = 1\n",
       "             type_of_spectrum = 1\n",
       "             minimum_frequency = 0.055\n",
       "             maximum_frequency = 0.5959088268863617\n",
       "             separation_of_wind_sea_and_swell = 3\n",
       "             threshold_frequency = 0.125\n",
       "             maximum_threshold_frequency = 0.125\n",
       "             hm0_minimum = 0.01\n",
       "             type_of_h_max = 3\n",
       "             duration = 10800.0\n",
       "             distance_above_bed_for_particle_velocity = 0.0\n",
       "             minimum_direction = 0.0\n",
       "             maximum_direction = 360.0\n",
       "             [Total_wave_parameters]\n",
       "                Significant_wave_height = 1\n",
       "                Maximum_wave_height = 0\n",
       "                Peak_wave_period = 1\n",
       "                Wave_period_t01 = 0\n",
       "                Wave_period_t02 = 1\n",
       "                Wave_period_tm10 = 0\n",
       "                Peak_wave_direction = 0\n",
       "                Mean_wave_direction = 1\n",
       "                Directional_standard_deviation = 0\n",
       "                Wave_velocity_components = 0\n",
       "                Radiation_stresses = 0\n",
       "                Particle_velocities = 0\n",
       "                Wave_power = 0\n",
       "             EndSect  // Total_wave_parameters\n",
       "             [Wind_sea_parameters]\n",
       "                Significant_wave_height = 0\n",
       "                Maximum_wave_height = 0\n",
       "                Peak_wave_period = 0\n",
       "                Wave_period_t01 = 0\n",
       "                Wave_period_t02 = 0\n",
       "                Wave_period_tm10 = 0\n",
       "                Peak_wave_direction = 0\n",
       "                Mean_wave_direction = 0\n",
       "                Directional_standard_deviation = 0\n",
       "                Wave_velocity_components = 0\n",
       "                Radiation_stresses = 0\n",
       "                Particle_velocities = 0\n",
       "                Wave_power = 0\n",
       "             EndSect  // Wind_sea_parameters\n",
       "             [Swell_parameters]\n",
       "                Significant_wave_height = 0\n",
       "                Maximum_wave_height = 0\n",
       "                Peak_wave_period = 0\n",
       "                Wave_period_t01 = 0\n",
       "                Wave_period_t02 = 0\n",
       "                Wave_period_tm10 = 0\n",
       "                Peak_wave_direction = 0\n",
       "                Mean_wave_direction = 0\n",
       "                Directional_standard_deviation = 0\n",
       "                Wave_velocity_components = 0\n",
       "                Radiation_stresses = 0\n",
       "                Particle_velocities = 0\n",
       "                Wave_power = 0\n",
       "             EndSect  // Swell_parameters\n",
       "          EndSect  // INTEGRAL_WAVE_PARAMETERS\n",
       "          [INPUT_PARAMETERS]\n",
       "             Touched = 1\n",
       "             Surface_elevation = 0\n",
       "             Water_depth = 0\n",
       "             Current_velocity_components = 0\n",
       "             Wind_speed = 0\n",
       "             Wind_direction = 0\n",
       "             Ice_concentration = 0\n",
       "          EndSect  // INPUT_PARAMETERS\n",
       "          [MODEL_PARAMETERS]\n",
       "             Touched = 1\n",
       "             Wind_friction_speed = 0\n",
       "             Roughness_length = 0\n",
       "             Drag_coefficient = 0\n",
       "             Charnock_constant = 0\n",
       "             Friction_coefficient = 0\n",
       "             Breaking_parameter_gamma = 0\n",
       "             Courant_number = 0\n",
       "             Time_step_factor = 0\n",
       "             Convergence_angle = 0\n",
       "             Length = 0\n",
       "             Area = 0\n",
       "             Threshold_period = 0\n",
       "             Roller_area = 0\n",
       "             Roller_dissipation = 0\n",
       "             Breaking_index = 0\n",
       "          EndSect  // MODEL_PARAMETERS\n",
       "          [SPECTRAL_PARAMETERS]\n",
       "             Touched = 1\n",
       "             separation_of_wind_sea_and_swell = 3.0\n",
       "             threshold_frequency = 0.125\n",
       "             maximum_threshold_frequency = 0.125\n",
       "             wave_energy = 1\n",
       "             wave_action = 0\n",
       "             zeroth_moment_of_wave_action = 0\n",
       "             first_moment_of_wave_action = 0\n",
       "             wave_energy_wind_sea = 0\n",
       "             wave_energy_swell = 0\n",
       "          EndSect  // SPECTRAL_PARAMETERS\n",
       "       EndSect  // OUTPUT_3\n",
       "       [OUTPUT_4]\n",
       "          Touched = 1\n",
       "          include = 1\n",
       "          title = 'Spectrum in a point'\n",
       "          file_name = 'spectrum_x20km_y20km.dfsu'\n",
       "          type = 4\n",
       "          format = 0\n",
       "          flood_and_dry = 2\n",
       "          coordinate_type = 'UTM-32'\n",
       "          zone = 0\n",
       "          input_file_name = ||\n",
       "          input_format = 1\n",
       "          interpolation_type = 2\n",
       "          use_end_time = 1\n",
       "          first_time_step = 0\n",
       "          last_time_step = 450\n",
       "          time_step_frequency = 10\n",
       "          number_of_points = 1\n",
       "          [POINT_1]\n",
       "             name = 'POINT_1'\n",
       "             x = 38000.0\n",
       "             y = 20000.0\n",
       "          EndSect  // POINT_1\n",
       "          [LINE]\n",
       "             npoints = 3\n",
       "             x_first = 0.0\n",
       "             y_first = 0.0\n",
       "             x_last = 40000.0\n",
       "             y_last = 40000.0\n",
       "          EndSect  // LINE\n",
       "          [AREA]\n",
       "             number_of_points = 4\n",
       "             [POINT_1]\n",
       "                x = -400.0\n",
       "                y = -400.0\n",
       "             EndSect  // POINT_1\n",
       "             [POINT_2]\n",
       "                x = -400.0\n",
       "                y = 40400.0\n",
       "             EndSect  // POINT_2\n",
       "             [POINT_3]\n",
       "                x = 40400.0\n",
       "                y = 40400.0\n",
       "             EndSect  // POINT_3\n",
       "             [POINT_4]\n",
       "                x = 40400.0\n",
       "                y = -400.0\n",
       "             EndSect  // POINT_4\n",
       "             orientation = 0.0\n",
       "             x_origo = 0.0\n",
       "             x_ds = 2105.263157894737\n",
       "             x_npoints = 20\n",
       "             y_origo = 0.0\n",
       "             y_ds = 2105.263157894737\n",
       "             y_npoints = 20\n",
       "             z_origo = -15.00000000000001\n",
       "             z_ds = 2.000000000000001\n",
       "             z_npoints = 10\n",
       "          EndSect  // AREA\n",
       "          [INTEGRAL_WAVE_PARAMETERS]\n",
       "             Touched = 1\n",
       "             type_of_spectrum = 1\n",
       "             minimum_frequency = 0.054321\n",
       "             maximum_frequency = 0.0987654321\n",
       "             separation_of_wind_sea_and_swell = 3\n",
       "             threshold_frequency = 0.125\n",
       "             maximum_threshold_frequency = 0.125\n",
       "             hm0_minimum = 0.01\n",
       "             type_of_h_max = 3\n",
       "             duration = 10800.0\n",
       "             distance_above_bed_for_particle_velocity = 0.0\n",
       "             minimum_direction = 0.0\n",
       "             maximum_direction = 360.0\n",
       "             [Total_wave_parameters]\n",
       "                Significant_wave_height = 1\n",
       "                Maximum_wave_height = 1\n",
       "                Peak_wave_period = 0\n",
       "                Wave_period_t01 = 0\n",
       "                Wave_period_t02 = 1\n",
       "                Wave_period_tm10 = 0\n",
       "                Peak_wave_direction = 0\n",
       "                Mean_wave_direction = 1\n",
       "                Directional_standard_deviation = 0\n",
       "                Wave_velocity_components = 1\n",
       "                Radiation_stresses = 0\n",
       "                Particle_velocities = 0\n",
       "                Wave_power = 0\n",
       "             EndSect  // Total_wave_parameters\n",
       "             [Wind_sea_parameters]\n",
       "                Significant_wave_height = 0\n",
       "                Maximum_wave_height = 0\n",
       "                Peak_wave_period = 0\n",
       "                Wave_period_t01 = 0\n",
       "                Wave_period_t02 = 0\n",
       "                Wave_period_tm10 = 0\n",
       "                Peak_wave_direction = 0\n",
       "                Mean_wave_direction = 0\n",
       "                Directional_standard_deviation = 0\n",
       "                Wave_velocity_components = 0\n",
       "                Radiation_stresses = 0\n",
       "                Particle_velocities = 0\n",
       "                Wave_power = 0\n",
       "             EndSect  // Wind_sea_parameters\n",
       "             [Swell_parameters]\n",
       "                Significant_wave_height = 0\n",
       "                Maximum_wave_height = 0\n",
       "                Peak_wave_period = 0\n",
       "                Wave_period_t01 = 0\n",
       "                Wave_period_t02 = 0\n",
       "                Wave_period_tm10 = 0\n",
       "                Peak_wave_direction = 0\n",
       "                Mean_wave_direction = 0\n",
       "                Directional_standard_deviation = 0\n",
       "                Wave_velocity_components = 0\n",
       "                Radiation_stresses = 0\n",
       "                Particle_velocities = 0\n",
       "                Wave_power = 0\n",
       "             EndSect  // Swell_parameters\n",
       "          EndSect  // INTEGRAL_WAVE_PARAMETERS\n",
       "          [INPUT_PARAMETERS]\n",
       "             Touched = 1\n",
       "             Surface_elevation = 0\n",
       "             Water_depth = 0\n",
       "             Current_velocity_components = 0\n",
       "             Wind_speed = 0\n",
       "             Wind_direction = 0\n",
       "             Ice_concentration = 0\n",
       "          EndSect  // INPUT_PARAMETERS\n",
       "          [MODEL_PARAMETERS]\n",
       "             Touched = 1\n",
       "             Wind_friction_speed = 0\n",
       "             Roughness_length = 0\n",
       "             Drag_coefficient = 0\n",
       "             Charnock_constant = 0\n",
       "             Friction_coefficient = 0\n",
       "             Breaking_parameter_gamma = 0\n",
       "             Courant_number = 0\n",
       "             Time_step_factor = 0\n",
       "             Convergence_angle = 0\n",
       "             Length = 0\n",
       "             Area = 0\n",
       "             Threshold_period = 0\n",
       "             Roller_area = 0\n",
       "             Roller_dissipation = 0\n",
       "             Breaking_index = 0\n",
       "          EndSect  // MODEL_PARAMETERS\n",
       "          [SPECTRAL_PARAMETERS]\n",
       "             Touched = 1\n",
       "             separation_of_wind_sea_and_swell = 3.0\n",
       "             threshold_frequency = 0.125\n",
       "             maximum_threshold_frequency = 0.125\n",
       "             wave_energy = 1\n",
       "             wave_action = 0\n",
       "             zeroth_moment_of_wave_action = 0\n",
       "             first_moment_of_wave_action = 0\n",
       "             wave_energy_wind_sea = 0\n",
       "             wave_energy_swell = 0\n",
       "          EndSect  // SPECTRAL_PARAMETERS\n",
       "       EndSect  // OUTPUT_4\n",
       "       [OUTPUT_5]\n",
       "          Touched = 1\n",
       "          include = 1\n",
       "          title = 'Spectrum in a point'\n",
       "          file_name = 'spectrum_x10km_y40km.dfsu'\n",
       "          type = 4\n",
       "          format = 0\n",
       "          flood_and_dry = 2\n",
       "          coordinate_type = 'UTM-32'\n",
       "          zone = 0\n",
       "          input_file_name = ||\n",
       "          input_format = 1\n",
       "          interpolation_type = 2\n",
       "          use_end_time = 1\n",
       "          first_time_step = 0\n",
       "          last_time_step = 450\n",
       "          time_step_frequency = 10\n",
       "          number_of_points = 1\n",
       "          [POINT_1]\n",
       "             name = 'POINT_1'\n",
       "             x = 10000\n",
       "             y = 40000\n",
       "          EndSect  // POINT_1\n",
       "          [LINE]\n",
       "             npoints = 3\n",
       "             x_first = 0.0\n",
       "             y_first = 0.0\n",
       "             x_last = 40000.0\n",
       "             y_last = 40000.0\n",
       "          EndSect  // LINE\n",
       "          [AREA]\n",
       "             number_of_points = 4\n",
       "             [POINT_1]\n",
       "                x = -400.0\n",
       "                y = -400.0\n",
       "             EndSect  // POINT_1\n",
       "             [POINT_2]\n",
       "                x = -400.0\n",
       "                y = 40400.0\n",
       "             EndSect  // POINT_2\n",
       "             [POINT_3]\n",
       "                x = 40400.0\n",
       "                y = 40400.0\n",
       "             EndSect  // POINT_3\n",
       "             [POINT_4]\n",
       "                x = 40400.0\n",
       "                y = -400.0\n",
       "             EndSect  // POINT_4\n",
       "             orientation = 0.0\n",
       "             x_origo = 0.0\n",
       "             x_ds = 2105.263157894737\n",
       "             x_npoints = 20\n",
       "             y_origo = 0.0\n",
       "             y_ds = 2105.263157894737\n",
       "             y_npoints = 20\n",
       "             z_origo = -15.00000000000001\n",
       "             z_ds = 2.000000000000001\n",
       "             z_npoints = 10\n",
       "          EndSect  // AREA\n",
       "          [INTEGRAL_WAVE_PARAMETERS]\n",
       "             Touched = 1\n",
       "             type_of_spectrum = 1\n",
       "             minimum_frequency = 0.054321\n",
       "             maximum_frequency = 0.0987654321\n",
       "             separation_of_wind_sea_and_swell = 3\n",
       "             threshold_frequency = 0.125\n",
       "             maximum_threshold_frequency = 0.125\n",
       "             hm0_minimum = 0.01\n",
       "             type_of_h_max = 3\n",
       "             duration = 10800.0\n",
       "             distance_above_bed_for_particle_velocity = 0.0\n",
       "             minimum_direction = 0.0\n",
       "             maximum_direction = 360.0\n",
       "             [Total_wave_parameters]\n",
       "                Significant_wave_height = 1\n",
       "                Maximum_wave_height = 1\n",
       "                Peak_wave_period = 0\n",
       "                Wave_period_t01 = 0\n",
       "                Wave_period_t02 = 1\n",
       "                Wave_period_tm10 = 0\n",
       "                Peak_wave_direction = 0\n",
       "                Mean_wave_direction = 1\n",
       "                Directional_standard_deviation = 0\n",
       "                Wave_velocity_components = 1\n",
       "                Radiation_stresses = 0\n",
       "                Particle_velocities = 0\n",
       "                Wave_power = 0\n",
       "             EndSect  // Total_wave_parameters\n",
       "             [Wind_sea_parameters]\n",
       "                Significant_wave_height = 0\n",
       "                Maximum_wave_height = 0\n",
       "                Peak_wave_period = 0\n",
       "                Wave_period_t01 = 0\n",
       "                Wave_period_t02 = 0\n",
       "                Wave_period_tm10 = 0\n",
       "                Peak_wave_direction = 0\n",
       "                Mean_wave_direction = 0\n",
       "                Directional_standard_deviation = 0\n",
       "                Wave_velocity_components = 0\n",
       "                Radiation_stresses = 0\n",
       "                Particle_velocities = 0\n",
       "                Wave_power = 0\n",
       "             EndSect  // Wind_sea_parameters\n",
       "             [Swell_parameters]\n",
       "                Significant_wave_height = 0\n",
       "                Maximum_wave_height = 0\n",
       "                Peak_wave_period = 0\n",
       "                Wave_period_t01 = 0\n",
       "                Wave_period_t02 = 0\n",
       "                Wave_period_tm10 = 0\n",
       "                Peak_wave_direction = 0\n",
       "                Mean_wave_direction = 0\n",
       "                Directional_standard_deviation = 0\n",
       "                Wave_velocity_components = 0\n",
       "                Radiation_stresses = 0\n",
       "                Particle_velocities = 0\n",
       "                Wave_power = 0\n",
       "             EndSect  // Swell_parameters\n",
       "          EndSect  // INTEGRAL_WAVE_PARAMETERS\n",
       "          [INPUT_PARAMETERS]\n",
       "             Touched = 1\n",
       "             Surface_elevation = 0\n",
       "             Water_depth = 0\n",
       "             Current_velocity_components = 0\n",
       "             Wind_speed = 0\n",
       "             Wind_direction = 0\n",
       "             Ice_concentration = 0\n",
       "          EndSect  // INPUT_PARAMETERS\n",
       "          [MODEL_PARAMETERS]\n",
       "             Touched = 1\n",
       "             Wind_friction_speed = 0\n",
       "             Roughness_length = 0\n",
       "             Drag_coefficient = 0\n",
       "             Charnock_constant = 0\n",
       "             Friction_coefficient = 0\n",
       "             Breaking_parameter_gamma = 0\n",
       "             Courant_number = 0\n",
       "             Time_step_factor = 0\n",
       "             Convergence_angle = 0\n",
       "             Length = 0\n",
       "             Area = 0\n",
       "             Threshold_period = 0\n",
       "             Roller_area = 0\n",
       "             Roller_dissipation = 0\n",
       "             Breaking_index = 0\n",
       "          EndSect  // MODEL_PARAMETERS\n",
       "          [SPECTRAL_PARAMETERS]\n",
       "             Touched = 1\n",
       "             separation_of_wind_sea_and_swell = 3.0\n",
       "             threshold_frequency = 0.125\n",
       "             maximum_threshold_frequency = 0.125\n",
       "             wave_energy = 1\n",
       "             wave_action = 0\n",
       "             zeroth_moment_of_wave_action = 0\n",
       "             first_moment_of_wave_action = 0\n",
       "             wave_energy_wind_sea = 0\n",
       "             wave_energy_swell = 0\n",
       "          EndSect  // SPECTRAL_PARAMETERS\n",
       "       EndSect  // OUTPUT_5\n",
       "    EndSect  // OUTPUTS\n",
       " EndSect  // SPECTRAL_WAVE_MODULE,\n",
       " '_ALIAS_LIST': ['_ALIAS_LIST', 'SW'],\n",
       " 'SW': mode = 2\n",
       " [SPACE]\n",
       "    number_of_mesh_geometry = 1\n",
       " EndSect  // SPACE\n",
       " [EQUATION]\n",
       "    Touched = 1\n",
       "    formulation = 2\n",
       "    time_formulation = 2\n",
       "    JONSWAP_factor_1 = 0.92\n",
       "    JONSWAP_factor_2 = 0.83\n",
       " EndSect  // EQUATION\n",
       " [TIME]\n",
       "    Touched = 0\n",
       "    start_time_step = 0\n",
       "    time_step_factor = 1\n",
       "    time_step_factor_AD = 1\n",
       " EndSect  // TIME\n",
       " [SPECTRAL]\n",
       "    Touched = 1\n",
       "    type_of_frequency_discretization = 2\n",
       "    number_of_frequencies = 25\n",
       "    minimum_frequency = 0.055\n",
       "    frequency_interval = 0.02\n",
       "    frequency_factor = 1.1\n",
       "    type_of_directional_discretization = 1\n",
       "    number_of_directions = 32\n",
       "    minimum_direction = 0.0\n",
       "    maximum_direction = 0.0\n",
       "    separation_of_wind_sea_and_swell = 0\n",
       "    threshold_frequency = 0.125\n",
       "    maximum_threshold_frequency = 0.5959088268863615\n",
       "    new_keyword = 'new_value'\n",
       " EndSect  // SPECTRAL\n",
       " [SOLUTION_TECHNIQUE]\n",
       "    Touched = 1\n",
       "    error_level = 0\n",
       "    maximum_number_of_errors = 200\n",
       "    minimum_period = 0.1\n",
       "    maximum_period = 25.0\n",
       "    initial_period = 8.0\n",
       "    scheme_of_space_discretization_geographical = 1\n",
       "    scheme_of_space_discretization_direction = 1\n",
       "    scheme_of_space_discretization_frequency = 1\n",
       "    method = 2\n",
       "    number_of_iterations = 10\n",
       "    tolerance1 = 0.0001\n",
       "    tolerance2 = 0.001\n",
       "    relaxation_factor = 0.1\n",
       "    number_of_levels_in_transport_calc = 32\n",
       "    number_of_steps_in_source_calc = 1\n",
       "    maximum_CFL_number = 1.0\n",
       "    dt_min = 0.01\n",
       "    dt_max = 120.0\n",
       "    type_overall = 0\n",
       "    file_name_overall = |.\\convergence_overall.dfs0|\n",
       "    input_format = 1\n",
       "    coordinate_type = ''\n",
       "    input_file_name = ||\n",
       "    number_of_points = 0\n",
       "    type_domain = 0\n",
       "    file_name_domain = |.\\convergence_domain.dfsu|\n",
       "    output_frequency = 5\n",
       " EndSect  // SOLUTION_TECHNIQUE\n",
       " [DEPTH]\n",
       "    Touched = 1\n",
       "    type = 0\n",
       "    minimum_depth = 0.01\n",
       "    format = 0\n",
       "    soft_time_interval = 0.0\n",
       "    constant_level = 0.0\n",
       "    file_name = ||\n",
       "    item_number = 1\n",
       "    item_name = ''\n",
       " EndSect  // DEPTH\n",
       " [CURRENT]\n",
       "    Touched = 1\n",
       "    type = 0\n",
       "    type_blocking = 1\n",
       "    factor_blocking = 0.1\n",
       "    format = 0\n",
       "    soft_time_interval = 0.0\n",
       "    constant_x_velocity = 0.0\n",
       "    constant_y_velocity = 0.0\n",
       "    file_name = ||\n",
       "    item_number_for_x_velocity = 0\n",
       "    item_number_for_y_velocity = 0\n",
       "    item_name_for_x_velocity = ''\n",
       "    item_name_for_y_velocity = ''\n",
       " EndSect  // CURRENT\n",
       " [WIND]\n",
       "    Touched = 1\n",
       "    type = 1\n",
       "    format = 1\n",
       "    constant_speed = 15.0\n",
       "    constant_direction = 270.0\n",
       "    file_name = |.\\Wind.dfs0|\n",
       "    item_number_for_speed = 1\n",
       "    item_number_for_direction = 2\n",
       "    item_name_for_speed = 'Speed'\n",
       "    item_name_for_direction = 'Direction'\n",
       "    soft_time_interval = 0.0\n",
       "    formula = 1\n",
       "    type_of_drag = 1\n",
       "    linear_growth_coefficient = 0.0015\n",
       "    type_of_air_sea_interaction = 1\n",
       "    background_Charnock_parameter = 0.01\n",
       "    Charnock_parameter = 0.01\n",
       "    alpha_drag = 0.00063\n",
       "    beta_drag = 6.6e-05\n",
       " EndSect  // WIND\n",
       " [ICE]\n",
       "    Touched = 1\n",
       "    type = 0\n",
       "    format = 3\n",
       "    c_cut_off = 0.33\n",
       "    file_name = ||\n",
       "    item_number = 1\n",
       "    item_name = ''\n",
       " EndSect  // ICE\n",
       " [DIFFRACTION]\n",
       "    Touched = 1\n",
       "    type = 0\n",
       "    minimum_delta = -0.75\n",
       "    maximum_delta = 3.0\n",
       "    type_of_smoothing = 1\n",
       "    smoothing_factor = 1.0\n",
       "    number_of_smoothing_steps = 1\n",
       " EndSect  // DIFFRACTION\n",
       " [TRANSFER]\n",
       "    Touched = 1\n",
       "    type = 1\n",
       "    type_triad = 0\n",
       "    alpha_EB = 0.25\n",
       " EndSect  // TRANSFER\n",
       " [WAVE_BREAKING]\n",
       "    Touched = 1\n",
       "    type = 0\n",
       "    type_of_gamma = 1\n",
       "    alpha = 1.0\n",
       "    gamma_steepness = 1.0\n",
       "    type_of_effect_on_frequency = 1\n",
       "    type_of_roller = 0\n",
       "    roller_propagation_factor = 1.0\n",
       "    roller_dissipation_factor = 0.15\n",
       "    roller_density = 1000.0\n",
       "    [GAMMA]\n",
       "       Touched = 1\n",
       "       type = 1\n",
       "       format = 0\n",
       "       constant_value = 0.55\n",
       "       file_name = ||\n",
       "       item_number = 1\n",
       "       item_name = ''\n",
       "       type_of_soft_start = 2\n",
       "       soft_time_interval = 0.0\n",
       "       reference_value = 0.0\n",
       "       type_of_time_interpolation = 1\n",
       "    EndSect  // GAMMA\n",
       " EndSect  // WAVE_BREAKING\n",
       " [BOTTOM_FRICTION]\n",
       "    Touched = 1\n",
       "    type = 0\n",
       "    constant_fc = 0.0\n",
       "    type_of_effect_on_frequency = 0\n",
       "    [FRICTION_COEFFICIENT]\n",
       "       Touched = 1\n",
       "       type = 1\n",
       "       format = 0\n",
       "       constant_value = 0.0775\n",
       "       file_name = ||\n",
       "       item_number = 1\n",
       "       item_name = ''\n",
       "       type_of_soft_start = 2\n",
       "       soft_time_interval = 0.0\n",
       "       reference_value = 0.0\n",
       "       type_of_time_interpolation = 1\n",
       "    EndSect  // FRICTION_COEFFICIENT\n",
       "    [FRICTION_FACTOR]\n",
       "       Touched = 1\n",
       "       type = 1\n",
       "       format = 0\n",
       "       constant_value = 0.0212\n",
       "       file_name = ||\n",
       "       item_number = 1\n",
       "       item_name = ''\n",
       "       type_of_soft_start = 2\n",
       "       soft_time_interval = 0.0\n",
       "       reference_value = 0.0\n",
       "       type_of_time_interpolation = 1\n",
       "    EndSect  // FRICTION_FACTOR\n",
       "    [NIKURADSE_ROUGHNESS]\n",
       "       Touched = 1\n",
       "       type = 1\n",
       "       format = 0\n",
       "       constant_value = 0.04\n",
       "       file_name = ||\n",
       "       item_number = 1\n",
       "       item_name = ''\n",
       "       type_of_soft_start = 2\n",
       "       soft_time_interval = 0.0\n",
       "       reference_value = 0.0\n",
       "       type_of_time_interpolation = 1\n",
       "    EndSect  // NIKURADSE_ROUGHNESS\n",
       "    [SAND_GRAIN_SIZE]\n",
       "       Touched = 1\n",
       "       type = 1\n",
       "       format = 0\n",
       "       constant_value = 0.00025\n",
       "       file_name = ||\n",
       "       item_number = 1\n",
       "       item_name = ''\n",
       "       type_of_soft_start = 2\n",
       "       soft_time_interval = 0.0\n",
       "       reference_value = 0.0\n",
       "       type_of_time_interpolation = 1\n",
       "    EndSect  // SAND_GRAIN_SIZE\n",
       " EndSect  // BOTTOM_FRICTION\n",
       " [WHITECAPPING]\n",
       "    Touched = 1\n",
       "    type = 1\n",
       "    type_of_spectrum = 3\n",
       "    mean_frequency_power = -1\n",
       "    mean_wave_number_power = -1\n",
       "    [dissipation_cdiss]\n",
       "       Touched = 1\n",
       "       type = 1\n",
       "       format = 0\n",
       "       constant_value = 4.5\n",
       "       file_name = ||\n",
       "       item_number = 1\n",
       "       item_name = ''\n",
       "       type_of_soft_start = 2\n",
       "       soft_time_interval = 0.0\n",
       "       reference_value = 0.0\n",
       "       type_of_time_interpolation = 1\n",
       "    EndSect  // dissipation_cdiss\n",
       "    [dissipation_delta]\n",
       "       Touched = 1\n",
       "       type = 1\n",
       "       format = 0\n",
       "       constant_value = 0.5\n",
       "       file_name = ||\n",
       "       item_number = 1\n",
       "       item_name = ''\n",
       "       type_of_soft_start = 2\n",
       "       soft_time_interval = 0.0\n",
       "       reference_value = 0.0\n",
       "       type_of_time_interpolation = 1\n",
       "    EndSect  // dissipation_delta\n",
       " EndSect  // WHITECAPPING\n",
       " [STRUCTURES]\n",
       "    type = 0\n",
       "    input_format = 1\n",
       "    coordinate_type = ''\n",
       "    number_of_structures = 0\n",
       "    input_file_name = ||\n",
       "    [LINE_STRUCTURES]\n",
       "       Touched = 1\n",
       "       MzSEPfsListItemCount = 0\n",
       "       output_of_link_data = 0\n",
       "       file_name_section = 'line_section.xyz'\n",
       "       number_of_structures = 0\n",
       "    EndSect  // LINE_STRUCTURES\n",
       " EndSect  // STRUCTURES\n",
       " [INITIAL_CONDITIONS]\n",
       "    Touched = 1\n",
       "    type = 0\n",
       "    type_additional = 1\n",
       "    type_of_spectra = 1\n",
       "    fetch = 40000.0\n",
       "    max_peak_frequency = 0.4\n",
       "    max_Phillips_constant = 0.0081\n",
       "    shape_parameter_sigma_a = 0.07\n",
       "    shape_parameter_sigma_b = 0.09\n",
       "    peakednes_parameter_gamma = 3.3\n",
       "    file_name_m = ||\n",
       "    item_number_m0 = 1\n",
       "    item_number_m1 = 1\n",
       "    item_name_m0 = ''\n",
       "    item_name_m1 = ''\n",
       "    file_name_A = ||\n",
       "    item_number_A = 1\n",
       "    item_name_A = ''\n",
       " EndSect  // INITIAL_CONDITIONS\n",
       " [BOUNDARY_CONDITIONS]\n",
       "    Touched = 0\n",
       "    MzSEPfsListItemCount = 0\n",
       "    [CODE_1]\n",
       "    EndSect  // CODE_1\n",
       " EndSect  // BOUNDARY_CONDITIONS\n",
       " [OUTPUTS]\n",
       "    Touched = 1\n",
       "    MzSEPfsListItemCount = 4\n",
       "    number_of_outputs = 5\n",
       "    [OUTPUT_1]\n",
       "       Touched = 1\n",
       "       include = 1\n",
       "       title = 'Wave parameters in domain'\n",
       "       file_name = 'Wave_parameters.dfsu'\n",
       "       type = 1\n",
       "       format = 2\n",
       "       flood_and_dry = 2\n",
       "       coordinate_type = 'UTM-32'\n",
       "       zone = 0\n",
       "       input_file_name = ||\n",
       "       input_format = 1\n",
       "       interpolation_type = 1\n",
       "       use_end_time = 1\n",
       "       first_time_step = 0\n",
       "       last_time_step = 450\n",
       "       time_step_frequency = 10\n",
       "       number_of_points = 1\n",
       "       [POINT_1]\n",
       "          name = 'POINT_1'\n",
       "          x = 20000.0\n",
       "          y = 20000.0\n",
       "       EndSect  // POINT_1\n",
       "       [LINE]\n",
       "          npoints = 3\n",
       "          x_first = 0.0\n",
       "          y_first = 0.0\n",
       "          x_last = 40000.0\n",
       "          y_last = 40000.0\n",
       "       EndSect  // LINE\n",
       "       [AREA]\n",
       "          number_of_points = 4\n",
       "          [POINT_1]\n",
       "             x = -400.0\n",
       "             y = -400.0\n",
       "          EndSect  // POINT_1\n",
       "          [POINT_2]\n",
       "             x = -400.0\n",
       "             y = 40400.0\n",
       "          EndSect  // POINT_2\n",
       "          [POINT_3]\n",
       "             x = 40400.0\n",
       "             y = 40400.0\n",
       "          EndSect  // POINT_3\n",
       "          [POINT_4]\n",
       "             x = 40400.0\n",
       "             y = -400.0\n",
       "          EndSect  // POINT_4\n",
       "          orientation = 0.0\n",
       "          x_origo = 0.0\n",
       "          x_ds = 2105.263157894737\n",
       "          x_npoints = 20\n",
       "          y_origo = 0.0\n",
       "          y_ds = 2105.263157894737\n",
       "          y_npoints = 20\n",
       "          z_origo = -15.00000000000001\n",
       "          z_ds = 2.000000000000001\n",
       "          z_npoints = 10\n",
       "       EndSect  // AREA\n",
       "       [INTEGRAL_WAVE_PARAMETERS]\n",
       "          Touched = 1\n",
       "          type_of_spectrum = 1\n",
       "          minimum_frequency = 0.055\n",
       "          maximum_frequency = 0.5959088268863617\n",
       "          separation_of_wind_sea_and_swell = 3\n",
       "          threshold_frequency = 0.125\n",
       "          maximum_threshold_frequency = 0.125\n",
       "          hm0_minimum = 0.01\n",
       "          type_of_h_max = 3\n",
       "          duration = 10800.0\n",
       "          distance_above_bed_for_particle_velocity = 0.0\n",
       "          minimum_direction = 0.0\n",
       "          maximum_direction = 360.0\n",
       "          [Total_wave_parameters]\n",
       "             Significant_wave_height = 1\n",
       "             Maximum_wave_height = 0\n",
       "             Peak_wave_period = 1\n",
       "             Wave_period_t01 = 0\n",
       "             Wave_period_t02 = 1\n",
       "             Wave_period_tm10 = 0\n",
       "             Peak_wave_direction = 0\n",
       "             Mean_wave_direction = 1\n",
       "             Directional_standard_deviation = 0\n",
       "             Wave_velocity_components = 1\n",
       "             Radiation_stresses = 0\n",
       "             Particle_velocities = 0\n",
       "             Wave_power = 0\n",
       "          EndSect  // Total_wave_parameters\n",
       "          [Wind_sea_parameters]\n",
       "             Significant_wave_height = 0\n",
       "             Maximum_wave_height = 0\n",
       "             Peak_wave_period = 0\n",
       "             Wave_period_t01 = 0\n",
       "             Wave_period_t02 = 0\n",
       "             Wave_period_tm10 = 0\n",
       "             Peak_wave_direction = 0\n",
       "             Mean_wave_direction = 0\n",
       "             Directional_standard_deviation = 0\n",
       "             Wave_velocity_components = 0\n",
       "             Radiation_stresses = 0\n",
       "             Particle_velocities = 0\n",
       "             Wave_power = 0\n",
       "          EndSect  // Wind_sea_parameters\n",
       "          [Swell_parameters]\n",
       "             Significant_wave_height = 0\n",
       "             Maximum_wave_height = 0\n",
       "             Peak_wave_period = 0\n",
       "             Wave_period_t01 = 0\n",
       "             Wave_period_t02 = 0\n",
       "             Wave_period_tm10 = 0\n",
       "             Peak_wave_direction = 0\n",
       "             Mean_wave_direction = 0\n",
       "             Directional_standard_deviation = 0\n",
       "             Wave_velocity_components = 0\n",
       "             Radiation_stresses = 0\n",
       "             Particle_velocities = 0\n",
       "             Wave_power = 0\n",
       "          EndSect  // Swell_parameters\n",
       "       EndSect  // INTEGRAL_WAVE_PARAMETERS\n",
       "       [INPUT_PARAMETERS]\n",
       "          Touched = 1\n",
       "          Surface_elevation = 0\n",
       "          Water_depth = 0\n",
       "          Current_velocity_components = 0\n",
       "          Wind_speed = 0\n",
       "          Wind_direction = 0\n",
       "          Ice_concentration = 0\n",
       "       EndSect  // INPUT_PARAMETERS\n",
       "       [MODEL_PARAMETERS]\n",
       "          Touched = 1\n",
       "          Wind_friction_speed = 0\n",
       "          Roughness_length = 0\n",
       "          Drag_coefficient = 0\n",
       "          Charnock_constant = 0\n",
       "          Friction_coefficient = 0\n",
       "          Breaking_parameter_gamma = 0\n",
       "          Courant_number = 1\n",
       "          Time_step_factor = 1\n",
       "          Convergence_angle = 0\n",
       "          Length = 0\n",
       "          Area = 0\n",
       "          Threshold_period = 0\n",
       "          Roller_area = 0\n",
       "          Roller_dissipation = 0\n",
       "          Breaking_index = 0\n",
       "       EndSect  // MODEL_PARAMETERS\n",
       "       [SPECTRAL_PARAMETERS]\n",
       "          Touched = 1\n",
       "          separation_of_wind_sea_and_swell = 3.0\n",
       "          threshold_frequency = 0.125\n",
       "          maximum_threshold_frequency = 0.125\n",
       "          wave_energy = 1\n",
       "          wave_action = 0\n",
       "          zeroth_moment_of_wave_action = 0\n",
       "          first_moment_of_wave_action = 0\n",
       "          wave_energy_wind_sea = 0\n",
       "          wave_energy_swell = 0\n",
       "       EndSect  // SPECTRAL_PARAMETERS\n",
       "    EndSect  // OUTPUT_1\n",
       "    [OUTPUT_2]\n",
       "       Touched = 1\n",
       "       include = 0\n",
       "       title = 'Wave parameters along line'\n",
       "       file_name = 'Wave_line.dfs1'\n",
       "       type = 1\n",
       "       format = 1\n",
       "       flood_and_dry = 2\n",
       "       coordinate_type = 'UTM-32'\n",
       "       zone = 0\n",
       "       input_file_name = ||\n",
       "       input_format = 1\n",
       "       interpolation_type = 2\n",
       "       use_end_time = 1\n",
       "       first_time_step = 0\n",
       "       last_time_step = 450\n",
       "       time_step_frequency = 10\n",
       "       number_of_points = 1\n",
       "       [POINT_1]\n",
       "          name = 'POINT_1'\n",
       "          x = 20000.0\n",
       "          y = 20000.0\n",
       "       EndSect  // POINT_1\n",
       "       [LINE]\n",
       "          npoints = 41\n",
       "          x_first = 0.0\n",
       "          y_first = 20000.0\n",
       "          x_last = 40000.0\n",
       "          y_last = 20000.0\n",
       "       EndSect  // LINE\n",
       "       [AREA]\n",
       "          number_of_points = 4\n",
       "          [POINT_1]\n",
       "             x = -400.0\n",
       "             y = -400.0\n",
       "          EndSect  // POINT_1\n",
       "          [POINT_2]\n",
       "             x = -400.0\n",
       "             y = 40400.0\n",
       "          EndSect  // POINT_2\n",
       "          [POINT_3]\n",
       "             x = 40400.0\n",
       "             y = 40400.0\n",
       "          EndSect  // POINT_3\n",
       "          [POINT_4]\n",
       "             x = 40400.0\n",
       "             y = -400.0\n",
       "          EndSect  // POINT_4\n",
       "          orientation = 0.0\n",
       "          x_origo = 0.0\n",
       "          x_ds = 2105.263157894737\n",
       "          x_npoints = 20\n",
       "          y_origo = 0.0\n",
       "          y_ds = 2105.263157894737\n",
       "          y_npoints = 20\n",
       "          z_origo = -15.00000000000001\n",
       "          z_ds = 2.000000000000001\n",
       "          z_npoints = 10\n",
       "       EndSect  // AREA\n",
       "       [INTEGRAL_WAVE_PARAMETERS]\n",
       "          Touched = 1\n",
       "          type_of_spectrum = 1\n",
       "          minimum_frequency = 0.055\n",
       "          maximum_frequency = 0.5959088268863617\n",
       "          separation_of_wind_sea_and_swell = 3\n",
       "          threshold_frequency = 0.125\n",
       "          maximum_threshold_frequency = 0.125\n",
       "          hm0_minimum = 0.01\n",
       "          type_of_h_max = 3\n",
       "          duration = 10800.0\n",
       "          distance_above_bed_for_particle_velocity = 0.0\n",
       "          minimum_direction = 0.0\n",
       "          maximum_direction = 360.0\n",
       "          [Total_wave_parameters]\n",
       "             Significant_wave_height = 1\n",
       "             Maximum_wave_height = 0\n",
       "             Peak_wave_period = 1\n",
       "             Wave_period_t01 = 0\n",
       "             Wave_period_t02 = 1\n",
       "             Wave_period_tm10 = 0\n",
       "             Peak_wave_direction = 0\n",
       "             Mean_wave_direction = 1\n",
       "             Directional_standard_deviation = 0\n",
       "             Wave_velocity_components = 0\n",
       "             Radiation_stresses = 0\n",
       "             Particle_velocities = 0\n",
       "             Wave_power = 0\n",
       "          EndSect  // Total_wave_parameters\n",
       "          [Wind_sea_parameters]\n",
       "             Significant_wave_height = 0\n",
       "             Maximum_wave_height = 0\n",
       "             Peak_wave_period = 0\n",
       "             Wave_period_t01 = 0\n",
       "             Wave_period_t02 = 0\n",
       "             Wave_period_tm10 = 0\n",
       "             Peak_wave_direction = 0\n",
       "             Mean_wave_direction = 0\n",
       "             Directional_standard_deviation = 0\n",
       "             Wave_velocity_components = 0\n",
       "             Radiation_stresses = 0\n",
       "             Particle_velocities = 0\n",
       "             Wave_power = 0\n",
       "          EndSect  // Wind_sea_parameters\n",
       "          [Swell_parameters]\n",
       "             Significant_wave_height = 0\n",
       "             Maximum_wave_height = 0\n",
       "             Peak_wave_period = 0\n",
       "             Wave_period_t01 = 0\n",
       "             Wave_period_t02 = 0\n",
       "             Wave_period_tm10 = 0\n",
       "             Peak_wave_direction = 0\n",
       "             Mean_wave_direction = 0\n",
       "             Directional_standard_deviation = 0\n",
       "             Wave_velocity_components = 0\n",
       "             Radiation_stresses = 0\n",
       "             Particle_velocities = 0\n",
       "             Wave_power = 0\n",
       "          EndSect  // Swell_parameters\n",
       "       EndSect  // INTEGRAL_WAVE_PARAMETERS\n",
       "       [INPUT_PARAMETERS]\n",
       "          Touched = 1\n",
       "          Surface_elevation = 0\n",
       "          Water_depth = 0\n",
       "          Current_velocity_components = 0\n",
       "          Wind_speed = 0\n",
       "          Wind_direction = 0\n",
       "          Ice_concentration = 0\n",
       "       EndSect  // INPUT_PARAMETERS\n",
       "       [MODEL_PARAMETERS]\n",
       "          Touched = 1\n",
       "          Wind_friction_speed = 0\n",
       "          Roughness_length = 0\n",
       "          Drag_coefficient = 0\n",
       "          Charnock_constant = 0\n",
       "          Friction_coefficient = 0\n",
       "          Breaking_parameter_gamma = 0\n",
       "          Courant_number = 0\n",
       "          Time_step_factor = 0\n",
       "          Convergence_angle = 0\n",
       "          Length = 0\n",
       "          Area = 0\n",
       "          Threshold_period = 0\n",
       "          Roller_area = 0\n",
       "          Roller_dissipation = 0\n",
       "          Breaking_index = 0\n",
       "       EndSect  // MODEL_PARAMETERS\n",
       "       [SPECTRAL_PARAMETERS]\n",
       "          Touched = 1\n",
       "          separation_of_wind_sea_and_swell = 3.0\n",
       "          threshold_frequency = 0.125\n",
       "          maximum_threshold_frequency = 0.125\n",
       "          wave_energy = 1\n",
       "          wave_action = 0\n",
       "          zeroth_moment_of_wave_action = 0\n",
       "          first_moment_of_wave_action = 0\n",
       "          wave_energy_wind_sea = 0\n",
       "          wave_energy_swell = 0\n",
       "       EndSect  // SPECTRAL_PARAMETERS\n",
       "    EndSect  // OUTPUT_2\n",
       "    [OUTPUT_3]\n",
       "       Touched = 1\n",
       "       include = 1\n",
       "       title = 'Wave parameters  in a point'\n",
       "       file_name = 'Waves_x20km_y20km.dfs0'\n",
       "       type = 1\n",
       "       format = 0\n",
       "       flood_and_dry = 2\n",
       "       coordinate_type = 'UTM-32'\n",
       "       zone = 0\n",
       "       input_file_name = ||\n",
       "       input_format = 1\n",
       "       interpolation_type = 2\n",
       "       use_end_time = 1\n",
       "       first_time_step = 0\n",
       "       last_time_step = 450\n",
       "       time_step_frequency = 1\n",
       "       number_of_points = 1\n",
       "       [POINT_1]\n",
       "          name = 'POINT_1'\n",
       "          x = 38000.0\n",
       "          y = 20000.0\n",
       "       EndSect  // POINT_1\n",
       "       [LINE]\n",
       "          npoints = 3\n",
       "          x_first = 0.0\n",
       "          y_first = 0.0\n",
       "          x_last = 40000.0\n",
       "          y_last = 40000.0\n",
       "       EndSect  // LINE\n",
       "       [AREA]\n",
       "          number_of_points = 4\n",
       "          [POINT_1]\n",
       "             x = -400.0\n",
       "             y = -400.0\n",
       "          EndSect  // POINT_1\n",
       "          [POINT_2]\n",
       "             x = -400.0\n",
       "             y = 40400.0\n",
       "          EndSect  // POINT_2\n",
       "          [POINT_3]\n",
       "             x = 40400.0\n",
       "             y = 40400.0\n",
       "          EndSect  // POINT_3\n",
       "          [POINT_4]\n",
       "             x = 40400.0\n",
       "             y = -400.0\n",
       "          EndSect  // POINT_4\n",
       "          orientation = 0.0\n",
       "          x_origo = 0.0\n",
       "          x_ds = 2105.263157894737\n",
       "          x_npoints = 20\n",
       "          y_origo = 0.0\n",
       "          y_ds = 2105.263157894737\n",
       "          y_npoints = 20\n",
       "          z_origo = -15.00000000000001\n",
       "          z_ds = 2.000000000000001\n",
       "          z_npoints = 10\n",
       "       EndSect  // AREA\n",
       "       [INTEGRAL_WAVE_PARAMETERS]\n",
       "          Touched = 1\n",
       "          type_of_spectrum = 1\n",
       "          minimum_frequency = 0.055\n",
       "          maximum_frequency = 0.5959088268863617\n",
       "          separation_of_wind_sea_and_swell = 3\n",
       "          threshold_frequency = 0.125\n",
       "          maximum_threshold_frequency = 0.125\n",
       "          hm0_minimum = 0.01\n",
       "          type_of_h_max = 3\n",
       "          duration = 10800.0\n",
       "          distance_above_bed_for_particle_velocity = 0.0\n",
       "          minimum_direction = 0.0\n",
       "          maximum_direction = 360.0\n",
       "          [Total_wave_parameters]\n",
       "             Significant_wave_height = 1\n",
       "             Maximum_wave_height = 0\n",
       "             Peak_wave_period = 1\n",
       "             Wave_period_t01 = 0\n",
       "             Wave_period_t02 = 1\n",
       "             Wave_period_tm10 = 0\n",
       "             Peak_wave_direction = 0\n",
       "             Mean_wave_direction = 1\n",
       "             Directional_standard_deviation = 0\n",
       "             Wave_velocity_components = 0\n",
       "             Radiation_stresses = 0\n",
       "             Particle_velocities = 0\n",
       "             Wave_power = 0\n",
       "          EndSect  // Total_wave_parameters\n",
       "          [Wind_sea_parameters]\n",
       "             Significant_wave_height = 0\n",
       "             Maximum_wave_height = 0\n",
       "             Peak_wave_period = 0\n",
       "             Wave_period_t01 = 0\n",
       "             Wave_period_t02 = 0\n",
       "             Wave_period_tm10 = 0\n",
       "             Peak_wave_direction = 0\n",
       "             Mean_wave_direction = 0\n",
       "             Directional_standard_deviation = 0\n",
       "             Wave_velocity_components = 0\n",
       "             Radiation_stresses = 0\n",
       "             Particle_velocities = 0\n",
       "             Wave_power = 0\n",
       "          EndSect  // Wind_sea_parameters\n",
       "          [Swell_parameters]\n",
       "             Significant_wave_height = 0\n",
       "             Maximum_wave_height = 0\n",
       "             Peak_wave_period = 0\n",
       "             Wave_period_t01 = 0\n",
       "             Wave_period_t02 = 0\n",
       "             Wave_period_tm10 = 0\n",
       "             Peak_wave_direction = 0\n",
       "             Mean_wave_direction = 0\n",
       "             Directional_standard_deviation = 0\n",
       "             Wave_velocity_components = 0\n",
       "             Radiation_stresses = 0\n",
       "             Particle_velocities = 0\n",
       "             Wave_power = 0\n",
       "          EndSect  // Swell_parameters\n",
       "       EndSect  // INTEGRAL_WAVE_PARAMETERS\n",
       "       [INPUT_PARAMETERS]\n",
       "          Touched = 1\n",
       "          Surface_elevation = 0\n",
       "          Water_depth = 0\n",
       "          Current_velocity_components = 0\n",
       "          Wind_speed = 0\n",
       "          Wind_direction = 0\n",
       "          Ice_concentration = 0\n",
       "       EndSect  // INPUT_PARAMETERS\n",
       "       [MODEL_PARAMETERS]\n",
       "          Touched = 1\n",
       "          Wind_friction_speed = 0\n",
       "          Roughness_length = 0\n",
       "          Drag_coefficient = 0\n",
       "          Charnock_constant = 0\n",
       "          Friction_coefficient = 0\n",
       "          Breaking_parameter_gamma = 0\n",
       "          Courant_number = 0\n",
       "          Time_step_factor = 0\n",
       "          Convergence_angle = 0\n",
       "          Length = 0\n",
       "          Area = 0\n",
       "          Threshold_period = 0\n",
       "          Roller_area = 0\n",
       "          Roller_dissipation = 0\n",
       "          Breaking_index = 0\n",
       "       EndSect  // MODEL_PARAMETERS\n",
       "       [SPECTRAL_PARAMETERS]\n",
       "          Touched = 1\n",
       "          separation_of_wind_sea_and_swell = 3.0\n",
       "          threshold_frequency = 0.125\n",
       "          maximum_threshold_frequency = 0.125\n",
       "          wave_energy = 1\n",
       "          wave_action = 0\n",
       "          zeroth_moment_of_wave_action = 0\n",
       "          first_moment_of_wave_action = 0\n",
       "          wave_energy_wind_sea = 0\n",
       "          wave_energy_swell = 0\n",
       "       EndSect  // SPECTRAL_PARAMETERS\n",
       "    EndSect  // OUTPUT_3\n",
       "    [OUTPUT_4]\n",
       "       Touched = 1\n",
       "       include = 1\n",
       "       title = 'Spectrum in a point'\n",
       "       file_name = 'spectrum_x20km_y20km.dfsu'\n",
       "       type = 4\n",
       "       format = 0\n",
       "       flood_and_dry = 2\n",
       "       coordinate_type = 'UTM-32'\n",
       "       zone = 0\n",
       "       input_file_name = ||\n",
       "       input_format = 1\n",
       "       interpolation_type = 2\n",
       "       use_end_time = 1\n",
       "       first_time_step = 0\n",
       "       last_time_step = 450\n",
       "       time_step_frequency = 10\n",
       "       number_of_points = 1\n",
       "       [POINT_1]\n",
       "          name = 'POINT_1'\n",
       "          x = 38000.0\n",
       "          y = 20000.0\n",
       "       EndSect  // POINT_1\n",
       "       [LINE]\n",
       "          npoints = 3\n",
       "          x_first = 0.0\n",
       "          y_first = 0.0\n",
       "          x_last = 40000.0\n",
       "          y_last = 40000.0\n",
       "       EndSect  // LINE\n",
       "       [AREA]\n",
       "          number_of_points = 4\n",
       "          [POINT_1]\n",
       "             x = -400.0\n",
       "             y = -400.0\n",
       "          EndSect  // POINT_1\n",
       "          [POINT_2]\n",
       "             x = -400.0\n",
       "             y = 40400.0\n",
       "          EndSect  // POINT_2\n",
       "          [POINT_3]\n",
       "             x = 40400.0\n",
       "             y = 40400.0\n",
       "          EndSect  // POINT_3\n",
       "          [POINT_4]\n",
       "             x = 40400.0\n",
       "             y = -400.0\n",
       "          EndSect  // POINT_4\n",
       "          orientation = 0.0\n",
       "          x_origo = 0.0\n",
       "          x_ds = 2105.263157894737\n",
       "          x_npoints = 20\n",
       "          y_origo = 0.0\n",
       "          y_ds = 2105.263157894737\n",
       "          y_npoints = 20\n",
       "          z_origo = -15.00000000000001\n",
       "          z_ds = 2.000000000000001\n",
       "          z_npoints = 10\n",
       "       EndSect  // AREA\n",
       "       [INTEGRAL_WAVE_PARAMETERS]\n",
       "          Touched = 1\n",
       "          type_of_spectrum = 1\n",
       "          minimum_frequency = 0.054321\n",
       "          maximum_frequency = 0.0987654321\n",
       "          separation_of_wind_sea_and_swell = 3\n",
       "          threshold_frequency = 0.125\n",
       "          maximum_threshold_frequency = 0.125\n",
       "          hm0_minimum = 0.01\n",
       "          type_of_h_max = 3\n",
       "          duration = 10800.0\n",
       "          distance_above_bed_for_particle_velocity = 0.0\n",
       "          minimum_direction = 0.0\n",
       "          maximum_direction = 360.0\n",
       "          [Total_wave_parameters]\n",
       "             Significant_wave_height = 1\n",
       "             Maximum_wave_height = 1\n",
       "             Peak_wave_period = 0\n",
       "             Wave_period_t01 = 0\n",
       "             Wave_period_t02 = 1\n",
       "             Wave_period_tm10 = 0\n",
       "             Peak_wave_direction = 0\n",
       "             Mean_wave_direction = 1\n",
       "             Directional_standard_deviation = 0\n",
       "             Wave_velocity_components = 1\n",
       "             Radiation_stresses = 0\n",
       "             Particle_velocities = 0\n",
       "             Wave_power = 0\n",
       "          EndSect  // Total_wave_parameters\n",
       "          [Wind_sea_parameters]\n",
       "             Significant_wave_height = 0\n",
       "             Maximum_wave_height = 0\n",
       "             Peak_wave_period = 0\n",
       "             Wave_period_t01 = 0\n",
       "             Wave_period_t02 = 0\n",
       "             Wave_period_tm10 = 0\n",
       "             Peak_wave_direction = 0\n",
       "             Mean_wave_direction = 0\n",
       "             Directional_standard_deviation = 0\n",
       "             Wave_velocity_components = 0\n",
       "             Radiation_stresses = 0\n",
       "             Particle_velocities = 0\n",
       "             Wave_power = 0\n",
       "          EndSect  // Wind_sea_parameters\n",
       "          [Swell_parameters]\n",
       "             Significant_wave_height = 0\n",
       "             Maximum_wave_height = 0\n",
       "             Peak_wave_period = 0\n",
       "             Wave_period_t01 = 0\n",
       "             Wave_period_t02 = 0\n",
       "             Wave_period_tm10 = 0\n",
       "             Peak_wave_direction = 0\n",
       "             Mean_wave_direction = 0\n",
       "             Directional_standard_deviation = 0\n",
       "             Wave_velocity_components = 0\n",
       "             Radiation_stresses = 0\n",
       "             Particle_velocities = 0\n",
       "             Wave_power = 0\n",
       "          EndSect  // Swell_parameters\n",
       "       EndSect  // INTEGRAL_WAVE_PARAMETERS\n",
       "       [INPUT_PARAMETERS]\n",
       "          Touched = 1\n",
       "          Surface_elevation = 0\n",
       "          Water_depth = 0\n",
       "          Current_velocity_components = 0\n",
       "          Wind_speed = 0\n",
       "          Wind_direction = 0\n",
       "          Ice_concentration = 0\n",
       "       EndSect  // INPUT_PARAMETERS\n",
       "       [MODEL_PARAMETERS]\n",
       "          Touched = 1\n",
       "          Wind_friction_speed = 0\n",
       "          Roughness_length = 0\n",
       "          Drag_coefficient = 0\n",
       "          Charnock_constant = 0\n",
       "          Friction_coefficient = 0\n",
       "          Breaking_parameter_gamma = 0\n",
       "          Courant_number = 0\n",
       "          Time_step_factor = 0\n",
       "          Convergence_angle = 0\n",
       "          Length = 0\n",
       "          Area = 0\n",
       "          Threshold_period = 0\n",
       "          Roller_area = 0\n",
       "          Roller_dissipation = 0\n",
       "          Breaking_index = 0\n",
       "       EndSect  // MODEL_PARAMETERS\n",
       "       [SPECTRAL_PARAMETERS]\n",
       "          Touched = 1\n",
       "          separation_of_wind_sea_and_swell = 3.0\n",
       "          threshold_frequency = 0.125\n",
       "          maximum_threshold_frequency = 0.125\n",
       "          wave_energy = 1\n",
       "          wave_action = 0\n",
       "          zeroth_moment_of_wave_action = 0\n",
       "          first_moment_of_wave_action = 0\n",
       "          wave_energy_wind_sea = 0\n",
       "          wave_energy_swell = 0\n",
       "       EndSect  // SPECTRAL_PARAMETERS\n",
       "    EndSect  // OUTPUT_4\n",
       "    [OUTPUT_5]\n",
       "       Touched = 1\n",
       "       include = 1\n",
       "       title = 'Spectrum in a point'\n",
       "       file_name = 'spectrum_x10km_y40km.dfsu'\n",
       "       type = 4\n",
       "       format = 0\n",
       "       flood_and_dry = 2\n",
       "       coordinate_type = 'UTM-32'\n",
       "       zone = 0\n",
       "       input_file_name = ||\n",
       "       input_format = 1\n",
       "       interpolation_type = 2\n",
       "       use_end_time = 1\n",
       "       first_time_step = 0\n",
       "       last_time_step = 450\n",
       "       time_step_frequency = 10\n",
       "       number_of_points = 1\n",
       "       [POINT_1]\n",
       "          name = 'POINT_1'\n",
       "          x = 10000\n",
       "          y = 40000\n",
       "       EndSect  // POINT_1\n",
       "       [LINE]\n",
       "          npoints = 3\n",
       "          x_first = 0.0\n",
       "          y_first = 0.0\n",
       "          x_last = 40000.0\n",
       "          y_last = 40000.0\n",
       "       EndSect  // LINE\n",
       "       [AREA]\n",
       "          number_of_points = 4\n",
       "          [POINT_1]\n",
       "             x = -400.0\n",
       "             y = -400.0\n",
       "          EndSect  // POINT_1\n",
       "          [POINT_2]\n",
       "             x = -400.0\n",
       "             y = 40400.0\n",
       "          EndSect  // POINT_2\n",
       "          [POINT_3]\n",
       "             x = 40400.0\n",
       "             y = 40400.0\n",
       "          EndSect  // POINT_3\n",
       "          [POINT_4]\n",
       "             x = 40400.0\n",
       "             y = -400.0\n",
       "          EndSect  // POINT_4\n",
       "          orientation = 0.0\n",
       "          x_origo = 0.0\n",
       "          x_ds = 2105.263157894737\n",
       "          x_npoints = 20\n",
       "          y_origo = 0.0\n",
       "          y_ds = 2105.263157894737\n",
       "          y_npoints = 20\n",
       "          z_origo = -15.00000000000001\n",
       "          z_ds = 2.000000000000001\n",
       "          z_npoints = 10\n",
       "       EndSect  // AREA\n",
       "       [INTEGRAL_WAVE_PARAMETERS]\n",
       "          Touched = 1\n",
       "          type_of_spectrum = 1\n",
       "          minimum_frequency = 0.054321\n",
       "          maximum_frequency = 0.0987654321\n",
       "          separation_of_wind_sea_and_swell = 3\n",
       "          threshold_frequency = 0.125\n",
       "          maximum_threshold_frequency = 0.125\n",
       "          hm0_minimum = 0.01\n",
       "          type_of_h_max = 3\n",
       "          duration = 10800.0\n",
       "          distance_above_bed_for_particle_velocity = 0.0\n",
       "          minimum_direction = 0.0\n",
       "          maximum_direction = 360.0\n",
       "          [Total_wave_parameters]\n",
       "             Significant_wave_height = 1\n",
       "             Maximum_wave_height = 1\n",
       "             Peak_wave_period = 0\n",
       "             Wave_period_t01 = 0\n",
       "             Wave_period_t02 = 1\n",
       "             Wave_period_tm10 = 0\n",
       "             Peak_wave_direction = 0\n",
       "             Mean_wave_direction = 1\n",
       "             Directional_standard_deviation = 0\n",
       "             Wave_velocity_components = 1\n",
       "             Radiation_stresses = 0\n",
       "             Particle_velocities = 0\n",
       "             Wave_power = 0\n",
       "          EndSect  // Total_wave_parameters\n",
       "          [Wind_sea_parameters]\n",
       "             Significant_wave_height = 0\n",
       "             Maximum_wave_height = 0\n",
       "             Peak_wave_period = 0\n",
       "             Wave_period_t01 = 0\n",
       "             Wave_period_t02 = 0\n",
       "             Wave_period_tm10 = 0\n",
       "             Peak_wave_direction = 0\n",
       "             Mean_wave_direction = 0\n",
       "             Directional_standard_deviation = 0\n",
       "             Wave_velocity_components = 0\n",
       "             Radiation_stresses = 0\n",
       "             Particle_velocities = 0\n",
       "             Wave_power = 0\n",
       "          EndSect  // Wind_sea_parameters\n",
       "          [Swell_parameters]\n",
       "             Significant_wave_height = 0\n",
       "             Maximum_wave_height = 0\n",
       "             Peak_wave_period = 0\n",
       "             Wave_period_t01 = 0\n",
       "             Wave_period_t02 = 0\n",
       "             Wave_period_tm10 = 0\n",
       "             Peak_wave_direction = 0\n",
       "             Mean_wave_direction = 0\n",
       "             Directional_standard_deviation = 0\n",
       "             Wave_velocity_components = 0\n",
       "             Radiation_stresses = 0\n",
       "             Particle_velocities = 0\n",
       "             Wave_power = 0\n",
       "          EndSect  // Swell_parameters\n",
       "       EndSect  // INTEGRAL_WAVE_PARAMETERS\n",
       "       [INPUT_PARAMETERS]\n",
       "          Touched = 1\n",
       "          Surface_elevation = 0\n",
       "          Water_depth = 0\n",
       "          Current_velocity_components = 0\n",
       "          Wind_speed = 0\n",
       "          Wind_direction = 0\n",
       "          Ice_concentration = 0\n",
       "       EndSect  // INPUT_PARAMETERS\n",
       "       [MODEL_PARAMETERS]\n",
       "          Touched = 1\n",
       "          Wind_friction_speed = 0\n",
       "          Roughness_length = 0\n",
       "          Drag_coefficient = 0\n",
       "          Charnock_constant = 0\n",
       "          Friction_coefficient = 0\n",
       "          Breaking_parameter_gamma = 0\n",
       "          Courant_number = 0\n",
       "          Time_step_factor = 0\n",
       "          Convergence_angle = 0\n",
       "          Length = 0\n",
       "          Area = 0\n",
       "          Threshold_period = 0\n",
       "          Roller_area = 0\n",
       "          Roller_dissipation = 0\n",
       "          Breaking_index = 0\n",
       "       EndSect  // MODEL_PARAMETERS\n",
       "       [SPECTRAL_PARAMETERS]\n",
       "          Touched = 1\n",
       "          separation_of_wind_sea_and_swell = 3.0\n",
       "          threshold_frequency = 0.125\n",
       "          maximum_threshold_frequency = 0.125\n",
       "          wave_energy = 1\n",
       "          wave_action = 0\n",
       "          zeroth_moment_of_wave_action = 0\n",
       "          first_moment_of_wave_action = 0\n",
       "          wave_energy_wind_sea = 0\n",
       "          wave_energy_swell = 0\n",
       "       EndSect  // SPECTRAL_PARAMETERS\n",
       "    EndSect  // OUTPUT_5\n",
       " EndSect  // OUTPUTS}"
      ]
     },
     "execution_count": 23,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pfs.to_dict()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {},
   "outputs": [],
   "source": [
    "# write to yaml file\n",
    "import yaml\n",
    "yaml.dump(pfs.to_dict(), open('lake_modified.yaml', 'w+'))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Create\n",
    "\n",
    "A PFS file can also be created from a dictionary, like this:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'CLSID': 't1_t0.dll',\n",
       " 'TypeName': 't1_t0',\n",
       " 'Setup': {'Name': 'Extract that',\n",
       "  'InputFileName': '|random.dfs1|',\n",
       "  'FirstTimeStep': 0,\n",
       "  'LastTimeStep': 99,\n",
       "  'X': 2,\n",
       "  'OutputFileName': '|.\\\\out2.dfs0|'}}"
      ]
     },
     "execution_count": 25,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "setup = {\n",
    "    \"Name\": \"Extract that\",\n",
    "    \"InputFileName\": \"|random.dfs1|\",\n",
    "    \"FirstTimeStep\": 0,\n",
    "    \"LastTimeStep\": 99,\n",
    "    \"X\": 2,\n",
    "    \"OutputFileName\": \"|.\\\\out2.dfs0|\",\n",
    "}\n",
    "t1_t0 = {\"CLSID\": \"t1_t0.dll\", \"TypeName\": \"t1_t0\", \"Setup\": setup}\n",
    "t1_t0"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[t1_t0]\n",
       "   CLSID = 't1_t0.dll'\n",
       "   TypeName = 't1_t0'\n",
       "   [Setup]\n",
       "      Name = 'Extract that'\n",
       "      InputFileName = |random.dfs1|\n",
       "      FirstTimeStep = 0\n",
       "      LastTimeStep = 99\n",
       "      X = 2\n",
       "      OutputFileName = |.\\out2.dfs0|\n",
       "   EndSect  // Setup\n",
       "EndSect  // t1_t0"
      ]
     },
     "execution_count": 26,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pfs = mikeio.PfsDocument({\"t1_t0\": t1_t0})\n",
    "pfs"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {},
   "outputs": [],
   "source": [
    "pfs.write(\"extract_point.mzt\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Clean up"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {},
   "outputs": [],
   "source": [
    "import os\n",
    "os.remove(\"lake_modified.pfs\")\n",
    "os.remove('lake_modified.yaml')\n",
    "os.remove(\"extract_point.mzt\")"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "base",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.8"
  },
  "vscode": {
   "interpreter": {
    "hash": "7aec4f91c09090e98e6ae8203c38529831bb4a3ce54cd1b69639b53cb01a6aa9"
   }
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}