Repository: DHI/mikeio
Pull request #487 (2022-11-30 14:52:26)

refactor Pfs making Pfs subclass PfsSection


Patch:
diff --git a/docs/pfs.md b/docs/pfs.md
index cf776e79..bafdd5d7 100644
--- a/docs/pfs.md
+++ b/docs/pfs.md
@@ -28,16 +28,18 @@ EndSect  // TARGET2
 
 ## Read
 
-When a PFS file is read with MIKE IO, a `Pfs` object is created. It will contain one or more `PfsSection` objects - one for each target. The PfsSections will typically contain other PfsSections together with a number of key-value pairs. 
+When a PFS file is read with MIKE IO, a `PfsDocument` object is created. It will contain one or more `PfsSection` objects - one for each target. The PfsSections will typically contain other PfsSections together with a number of key-value pairs. 
 
-A PFS file is read using `mikeio.read_pfs()` (or equivalently `mikeio.Pfs()`):
+A PFS file is read using `mikeio.read_pfs()`:
 
 ```python
 >>> import mikeio
 >>> pfs = mikeio.read_pfs("concat.mzt")
 ```
 
-The targets can be accessed by their name (as properties), like this:  
+### PfsDocument
+
+The `PfsDocument` is the MIKE IO equivalent to a PFS file. Its targets can be accessed by their name (as properties), like this:  
 
 ```python
 >>> pfs.txconc
@@ -47,12 +49,14 @@ CREATEDTIME: '2020-03-11T15:24:45'
 (...)
 ```
 
-Or by the `pfs.data` object (which will be a list of PfsSections if the PFS file contains multiple targets). Each of the targets is a `PfsSection` object consisting of key-value pairs (keyword-parameter) and other PfsSections. 
+Or by the `pfs.targets` object (which is a list of PfsSections). Each of the targets is a `PfsSection` object consisting of key-value pairs (keyword-parameter) and other PfsSections. 
+
+The `PfsDocument` object is similar to a dictionary. You can loop over its contents with `items()`, `keys()` and `values()` like a dictionary. 
 
 
 ### PfsSection
 
-The PfsSection object is similar to a dictionary. You can loop over its contents with `items()`, `keys()` and `values()` like a dictionary. 
+The `PfsSection` object is also similar to a dictionary. You can loop over its contents with `items()`, `keys()` and `values()` like a dictionary. 
 
 ```python
 >>> pfs.txconc.keys()
@@ -172,7 +176,7 @@ A new PFS file can be created from dictionary in the following way:
         file_name=r"|path\file.dfs0|",
         start_time=datetime(2019, 7, 1, 0, 0, 0),        
     )
->>> pfs = mikeio.Pfs(d, names="MYTOOL")
+>>> pfs = mikeio.PfsDocument({"MYTOOL": d})
 >>> pfs.write("new.pfs")
 ```
 
@@ -181,11 +185,11 @@ Multiple targets can be achieved by providing list of dictionaries.
 
 
 
-## Pfs API
+## PfsDocument API
 
 ```{eval-rst}
 .. autofunction:: mikeio.read_pfs
-.. autoclass:: mikeio.Pfs
+.. autoclass:: mikeio.PfsDocument
 	:members:
 	:inherited-members:
 ```
diff --git a/mikeio/__init__.py b/mikeio/__init__.py
index 4f78949e..35f18c19 100644
--- a/mikeio/__init__.py
+++ b/mikeio/__init__.py
@@ -32,7 +32,7 @@ from .dfs2 import Dfs2
 from .dfs3 import Dfs3
 from .dfsu_factory import Dfsu
 from .dfsu import Mesh
-from .pfs import read_pfs, Pfs, PfsSection
+from .pfs import read_pfs, Pfs, PfsSection, PfsDocument
 from .xyz import read_xyz
 from .dataset import Dataset, DataArray
 from .spatial.grid_geometry import Grid1D, Grid2D, Grid3D
diff --git a/mikeio/pfs.py b/mikeio/pfs.py
index 0f2c97fa..f82681a0 100644
--- a/mikeio/pfs.py
+++ b/mikeio/pfs.py
@@ -1,6 +1,16 @@
 from pathlib import Path
 from types import SimpleNamespace
-from typing import List, Sequence, Tuple, Sequence, Mapping, Union, Callable
+from typing import (
+    Any,
+    List,
+    MutableMapping,
+    Sequence,
+    Tuple,
+    Sequence,
+    Mapping,
+    Union,
+    Callable,
+)
 from collections import Counter
 from datetime import datetime
 import re
@@ -30,22 +40,13 @@ def read_pfs(filename, encoding="cp1252", unique_keywords=False):
     mikeio.Pfs
         Pfs object which can be used for inspection, manipulation and writing
     """
-    return Pfs(filename, encoding=encoding, unique_keywords=unique_keywords)
+    return PfsDocument(filename, encoding=encoding, unique_keywords=unique_keywords)
 
 
 class PfsNonUniqueList(list):
     pass
 
 
-def _merge_PfsSections(sections: Sequence[Mapping]):
-    """Merge a list of PfsSections/dict"""
-    assert len(sections) > 0
-    a = sections[0]
-    for b in sections[1:]:
-        a = _merge_dict(a, b)
-    return PfsSection(a)
-
-
 def _merge_dict(a: Mapping, b: Mapping, path: Sequence = None):
     """merges dict b into dict a; handling non-unique keys"""
     if path is None:
@@ -64,7 +65,7 @@ def _merge_dict(a: Mapping, b: Mapping, path: Sequence = None):
     return a
 
 
-class PfsSection(SimpleNamespace):
+class _PfsBase(SimpleNamespace, MutableMapping):
     def __init__(self, dictionary, **kwargs):
         super().__init__(**kwargs)
         for key, value in dictionary.items():
@@ -175,15 +176,23 @@ class PfsSection(SimpleNamespace):
     def update_recursive(self, key, value):
         """Update recursively all matches of key with value"""
         for k, v in self.items():
-            if isinstance(v, self.__class__):
+            if isinstance(v, _PfsBase):
                 self[k].update_recursive(key, value)
             elif k == key:
                 self[k] = value
 
-    def search(self, text:str=None, *, key:str=None, section:str=None, param=None, case:bool=False):
-        """Find recursively all keys, sections or parameters 
+    def search(
+        self,
+        text: str = None,
+        *,
+        key: str = None,
+        section: str = None,
+        param=None,
+        case: bool = False,
+    ):
+        """Find recursively all keys, sections or parameters
            matching a pattern
-        
+
         NOTE: logical OR between multiple conditions
 
         Parameters
@@ -214,27 +223,37 @@ class PfsSection(SimpleNamespace):
             param = text
         key = key if (key is None or case) else key.lower()
         section = section if (section is None or case) else section.lower()
-        param = param if (param is None or not isinstance(param, str) or case) else param.lower()
-        for item in self._find_patterns_generator(keypat=key, parampat=param, secpat=section, case=case):
+        param = (
+            param
+            if (param is None or not isinstance(param, str) or case)
+            else param.lower()
+        )
+        for item in self._find_patterns_generator(
+            keypat=key, parampat=param, secpat=section, case=case
+        ):
             results.append(item)
-        return _merge_PfsSections(results) if len(results) > 0 else None
-    
-    def _find_patterns_generator(self, keypat=None, parampat=None, secpat=None, keylist=[], case=False):
+        return self.__class__._merge_PfsSections(results) if len(results) > 0 else None
+
+    def _find_patterns_generator(
+        self, keypat=None, parampat=None, secpat=None, keylist=[], case=False
+    ):
         """Look for patterns in either keys, params or sections"""
         for k, v in self.items():
             kk = str(k) if case else str(k).lower()
 
-            if isinstance(v, self.__class__):
+            if isinstance(v, _PfsBase):
                 if secpat and secpat in kk:
                     yield from self._yield_deep_dict(keylist + [k], v)
                 else:
-                    yield from v._find_patterns_generator(keypat, parampat, secpat, keylist=keylist + [k], case=case)
+                    yield from v._find_patterns_generator(
+                        keypat, parampat, secpat, keylist=keylist + [k], case=case
+                    )
             else:
                 if keypat and keypat in kk:
-                    yield from self._yield_deep_dict(keylist + [k], v)   
+                    yield from self._yield_deep_dict(keylist + [k], v)
                 if self._param_match(parampat, v, case):
-                    yield from self._yield_deep_dict(keylist + [k], v)                    
-    
+                    yield from self._yield_deep_dict(keylist + [k], v)
+
     @staticmethod
     def _yield_deep_dict(keys, val):
         """yield a deep nested dict with keys with a single deep value val"""
@@ -242,7 +261,7 @@ class PfsSection(SimpleNamespace):
             d = {keys[j]: val}
             val = d
         yield d
-                
+
     @staticmethod
     def _param_match(parampat, v, case):
         if parampat is None:
@@ -253,22 +272,22 @@ class PfsSection(SimpleNamespace):
             vv = str(v) if case else str(v).lower()
             return parampat in vv
         else:
-            return parampat == v 
+            return parampat == v
 
     def find_replace(self, old_value, new_value):
         """Update recursively all old_value with new_value"""
         for k, v in self.items():
-            if isinstance(v, self.__class__):
+            if isinstance(v, _PfsBase):
                 self[k].find_replace(old_value, new_value)
             elif self[k] == old_value:
                 self[k] = new_value
 
-    def copy(self):
+    def copy(self) -> "_PfsBase":
         """Return a copy of the PfsSection."""
         # is all this necessary???
         d = self.__dict__.copy()
         for key, value in d.items():
-            if isinstance(value, self.__class__):
+            if isinstance(value, _PfsBase):
                 d[key] = value.to_dict().copy()
         return self.__class__(d)
 
@@ -279,7 +298,7 @@ class PfsSection(SimpleNamespace):
 
     def _write_with_func(self, func: Callable, level: int = 0, newline: str = "\n"):
         """Write pfs nested objects
-        
+
         Parameters
         ----------
         func : Callable
@@ -290,7 +309,7 @@ class PfsSection(SimpleNamespace):
             newline string, by default "\n"
         """
         lvl_prefix = "   "
-        for k, v in vars(self).items():
+        for k, v in self.items():
 
             # check for empty sections
             NoneType = type(None)
@@ -298,18 +317,16 @@ class PfsSection(SimpleNamespace):
                 func(f"{lvl_prefix * level}[{k}]{newline}")
                 func(f"{lvl_prefix * level}EndSect  // {k}{newline}{newline}")
 
-            elif isinstance(v, List) and any(
-                isinstance(subv, PfsSection) for subv in v
-            ):
+            elif isinstance(v, List) and any(isinstance(subv, _PfsBase) for subv in v):
                 # duplicate sections
                 for subv in v:
-                    if isinstance(subv, PfsSection):
+                    if isinstance(subv, _PfsBase):
                         subsec = PfsSection({k: subv})
                         subsec._write_with_func(func, level=level, newline=newline)
                     else:
                         subv = self._prepare_value_for_write(subv)
                         func(f"{lvl_prefix * level}{k} = {subv}{newline}")
-            elif isinstance(v, PfsSection):
+            elif isinstance(v, _PfsBase):
                 func(f"{lvl_prefix * level}[{k}]{newline}")
                 v._write_with_func(func, level=(level + 1), newline=newline)
                 func(f"{lvl_prefix * level}EndSect  // {k}{newline}{newline}")
@@ -331,11 +348,12 @@ class PfsSection(SimpleNamespace):
 
         Parameters
         ----------
-        v : str 
+        v : str
             value from one pfs line
 
-        Returns:
-            v: modified value
+        Returns
+        -------
+            modified value
         """
         # some crude checks and corrections
         if isinstance(v, str):
@@ -366,26 +384,7 @@ class PfsSection(SimpleNamespace):
 
         return v
 
-    def to_Pfs(self, name: str):
-        """Convert to a Pfs object (with this PfsSection as the target)
-
-        Parameters
-        ----------
-        name : str
-            Name of the target (=key that refer to this PfsSection)
-
-        Returns
-        -------
-        Pfs
-            A Pfs object
-        """
-        return Pfs(self, names=[name])
-
-    def to_file(self, filename, name: str) -> None:
-        """Write to a Pfs file (providing a target name)"""
-        Pfs(self, names=[name]).write(filename)
-
-    def to_dict(self):
+    def to_dict(self) -> dict:
         """Convert to (nested) dict (as a copy)"""
         d = self.__dict__.copy()
         for key, value in d.items():
@@ -399,12 +398,19 @@ class PfsSection(SimpleNamespace):
         Parameters
         ----------
         prefix : str, optional
-            The prefix of the enumerated sections, e.g. "File_", by default None
+            The prefix of the enumerated sections, e.g. "File_",
+            which can be supplied if it fails without this argument,
+            by default None (will try to "guess" the prefix)
 
         Returns
         -------
         pd.DataFrame
             The enumerated subsections as a DataFrame
+
+        Examples
+        --------
+        >>> pfs = mikeio.read_pfs("lake.sw")
+        >>> df = pfs.SW.OUTPUTS.to_dataframe(prefix="OUTPUT_")
         """
         if prefix is not None:
             sections = [
@@ -433,6 +439,38 @@ class PfsSection(SimpleNamespace):
             res.append(self[k].to_dict())
         return pd.DataFrame(res, index=range(1, n_sections + 1))
 
+    @classmethod
+    def _merge_PfsSections(cls, sections: Sequence[Mapping]) -> "_PfsBase":
+        """Merge a list of PfsSections/dict"""
+        assert len(sections) > 0
+        a = sections[0]
+        for b in sections[1:]:
+            a = _merge_dict(a, b)
+        return cls(a)
+
+
+class PfsSection(_PfsBase):
+    def to_PfsDocument(self, name: str = None) -> "PfsDocument":
+        """Convert to a PfsDocument in one of two ways:
+
+        1) All key:value pairs will be targets (require all values to be PfsSections)
+        2) Make this PfsSection the only target (requires a name)
+
+        Parameters
+        ----------
+        name : str, optional
+            Name of the target (=key that refer to this PfsSection)
+
+        Returns
+        -------
+        PfsDocument
+            A PfsDocument object
+        """
+        if name is None:
+            return PfsDocument(self)
+        else:
+            return PfsDocument({name: self})
+
     @classmethod
     def from_dataframe(cls, df: pd.DataFrame, prefix: str) -> "PfsSection":
         """Create a PfsSection from a DataFrame"""
@@ -495,8 +533,8 @@ def parse_yaml_preserving_duplicates(src, unique_keywords=False):
     return yaml.load(src, PreserveDuplicatesLoader)
 
 
-class Pfs:
-    """Create a Pfs object for reading, writing and manipulating pfs files
+class PfsDocument(_PfsBase):
+    """Create a PfsDocument object for reading, writing and manipulating pfs files
 
     Parameters
     ----------
@@ -505,11 +543,6 @@ class Pfs:
         to be read or dictionary-like structure.
     encoding: str, optional
         How is the pfs file encoded? By default cp1252
-    names: List[str], optional
-        If the input is dictionary or PfsSection object the
-        name of the root element (=target) MUST be specified.
-        If the input is a file, the names are instead read from the file,
-        by default None.
     unique_keywords: bool, optional
         Should the keywords in a section be unique? Some tools e.g. the
         MIKE Plot Composer allows non-unique keywords.
@@ -519,142 +552,92 @@ class Pfs:
     """
 
     def __init__(self, input, encoding="cp1252", names=None, unique_keywords=False):
-        self._names = []
-        self._targets = []
 
         if isinstance(input, (str, Path)) or hasattr(input, "read"):
             if names is not None:
                 raise ValueError("names cannot be given as argument if input is a file")
-            sections, names = self._read_pfs_file(input, encoding, unique_keywords)
+            names, sections = self._read_pfs_file(input, encoding, unique_keywords)
         else:
-            sections, names = self._parse_non_file_input(input, names)
+            names, sections = self._parse_non_file_input(input, names)
+
+        d = self._to_nonunique_key_dict(names, sections)
+        super().__init__(d)
 
-        self._targets = sections
-        self._names = names
-        self._set_all_target_attr()
+        self._ALIAS_LIST = ["_ALIAS_LIST"]  # ignore these in key list
+        if self._is_FM_engine:
+            self._add_all_FM_aliases()
 
-        self._add_all_FM_aliases()
+    @staticmethod
+    def _to_nonunique_key_dict(keys, vals):
+        key_count = Counter(keys)
+        data = {}
+        for key, val in zip(keys, vals):
+            if key_count[key] > 1:
+                if key not in data:
+                    data[key] = PfsNonUniqueList()
+                data[key].append(val)
+            else:
+                data[key] = val
+        return data
+
+    def keys(self) -> List[str]:
+        """Return a list of the PfsDocument's keys (target names)"""
+        return [k for k, _ in self.items()]
+
+    def values(self) -> List[Any]:
+        """Return a list of the PfsDocument's values (targets)."""
+        return [v for _, v in self.items()]
+
+    def items(self) -> List[Tuple[str, Any]]:
+        """Return a new view of the PfsDocument's items ((key, value) pairs)"""
+        return [(k, v) for k, v in self.__dict__.items() if k not in self._ALIAS_LIST]
+
+    @staticmethod
+    def _unravel_items(items):
+        rkeys = []
+        rvals = []
+        for k, v in items():
+            if isinstance(v, PfsNonUniqueList):
+                for subval in v:
+                    rkeys.append(k)
+                    rvals.append(subval)
+            else:
+                rkeys.append(k)
+                rvals.append(v)
+        return rkeys, rvals
 
     @property
     def data(self) -> Union[PfsSection, List[PfsSection]]:
-        return self._targets[0] if self.n_targets == 1 else self._targets
+        warnings.warn(
+            FutureWarning(
+                "The data attribute has been deprecated, please access the targets by their names instead."
+            )
+        )
+        return self.targets[0] if self.n_targets == 1 else self.targets
 
     @property
-    def _targets_as_dict(self):
-        target_key_count = Counter(self.names)
-        d = dict()
-        for n, target in zip(self.names, self._targets):
-            if target_key_count[n] > 1:
-                if n not in d:
-                    d[n] = []
-                d[n].append(target)
-            else:
-                d[n] = target
-        return d
+    def targets(self) -> List[PfsSection]:
+        """List of targets (root sections)"""
+        _, rvals = self._unravel_items(self.items)
+        return rvals
 
     @property
     def n_targets(self) -> int:
         """Number of targets (root sections)"""
-        return len(self._targets)
-
-    @property
-    def names(self) -> List[str]:
-        """Names of the targets (root sections) as a list"""
-        return self._names
-
-    # TODO remove?
-    #@names.setter
-    #def names(self, new_names: Union[str, Sequence[str]]) -> None:
-    #    new_names = [new_names] if isinstance(new_names, str) else new_names
-    #    if len(new_names) != self.n_targets:
-    #        raise ValueError(
-    #            f"Number of target names must match number of targets ({self.n_targets})"
-    #        )
-    #    self._remove_all_target_attr()
-    #    self._names = new_names
-    #    self._set_all_target_attr()
+        return len(self.targets)
 
     @property
     def is_unique(self) -> bool:
         """Are the target (root) names unique?"""
-        return len(set(self.names)) == len(self.names)
-
-    # TODO consider the best way to create a Pfs with multiple targets
-    #def add_target(self, section: PfsSection, name: str) -> None:
-    #    if name is None:
-    #        raise ValueError("name must be provided")
-    #    section = PfsSection(section) if isinstance(section, dict) else section
-    #    if not isinstance(section, PfsSection):
-    #        raise ValueError("section wrong type; must be dict or PfsSection")
-    #    self._targets.append(section)
-    #    self._names.append(name)
-    #    self._set_all_target_attr()
-
-    #def _remove_all_target_attr(self):
-    #    """When renaming targets we need to remove all old target attr"""
-    #    for n in set(self.names):
-    #        delattr(self, n)
-
-    def _set_all_target_attr(self):
-        for n, section in self._targets_as_dict.items():
-            setattr(self, n, section)
-
-    def __repr__(self) -> str:
-        out = ["<mikeio.Pfs>"]
-        for n, sct in zip(self.names, self._targets):
-            sct_str = str(sct).replace("\n", "")
-            if len(sct_str) < 50:
-                out.append(f"{n}: {sct_str}")
-            else:
-                out.append(f"{n}: {sct_str[:45]}...")
-        return "\n".join(out)
-
-    def to_dict(self):
-        """Convert to nested dictionary"""
-        d = dict()
-        target_key_count = Counter(self.names)
-        for n, target in zip(self.names, self._targets):
-            if target_key_count[n] > 1:
-                if n not in d:
-                    d[n] = []
-                d[n].append(target.to_dict())
-            else:
-                d[n] = target.to_dict()
-        return d
-
-    def search(self, text:str=None, *, key:str=None, section:str=None, param=None, case:bool=False) -> PfsSection:
-        """Find recursively all keys, sections or parameters 
-           matching a pattern
-        
-        NOTE: logical OR between multiple conditions
-
-        Parameters
-        ----------
-        text : str, optional
-            Search for text in either key, section or parameter, by default None
-        key : str, optional
-            text pattern to seach for in keywords, by default None
-        section : str, optional
-            text pattern to seach for in sections, by default None
-        param : str, bool, float, int, optional
-            text or value in a parameter, by default None
-        case : bool, optional
-            should the text search be case-sensitive?, by default False
+        return len(self.keys()) == len(self.names)
 
-        Returns
-        -------
-        PfsSection
-            Search result as a nested PfsSection
-        """
-        results = []
-        for n, target in zip(self.names, self._targets):
-            res = target.search(text=text, key=key, section=section, param=param, case=case)
-            if res:
-                results.append({n:res})
-        return _merge_PfsSections(results) if len(results) > 0 else None    
+    @property
+    def names(self) -> List[str]:
+        """Names of the targets (root sections) as a list"""
+        rkeys, _ = self._unravel_items(self.items)
+        return rkeys
 
     def _read_pfs_file(self, filename, encoding, unique_keywords=False):
-        self._filename = filename
         try:
             yml = self._pfs2yaml(filename, encoding)
             target_list = parse_yaml_preserving_duplicates(yml, unique_keywords)
@@ -666,22 +649,34 @@ class Pfs:
             raise ValueError(f"{filename} could not be parsed. " + str(e))
         sections = [PfsSection(list(d.values())[0]) for d in target_list]
         names = [list(d.keys())[0] for d in target_list]
-        return sections, names
+        return names, sections
 
     @staticmethod
-    def _parse_non_file_input(input, names):
+    def _parse_non_file_input(input, names=None):
         """dict/PfsSection or lists of these can be parsed"""
         if names is None:
-            raise ValueError("'names' must be provided if input is not a file")
+            assert isinstance(input, Mapping), "input must be a mapping"
+            names, sections = PfsDocument._unravel_items(input.items)
+            for sec in sections:
+                assert isinstance(
+                    sec, Mapping
+                ), "all targets must be PfsSections/dict (no key-value pairs allowed in the root)"
+            return names, sections
+        # else:
+        #     warnings.warn(
+        #         "Creating a PfsDocument with names argument is deprecated, provide instead the names as keys in a dictionary",
+        #         FutureWarning,
+        #     )
+
         if isinstance(names, str):
             names = [names]
 
-        if isinstance(input, PfsSection):
+        if isinstance(input, _PfsBase):
             sections = [input]
         elif isinstance(input, dict):
             sections = [PfsSection(input)]
         elif isinstance(input, (List, Tuple)):
-            if isinstance(input[0], PfsSection):
+            if isinstance(input[0], _PfsBase):
                 sections = input
             elif isinstance(input[0], dict):
                 sections = [PfsSection(d) for d in input]
@@ -695,7 +690,11 @@ class Pfs:
             raise ValueError(
                 f"Length of names ({len(names)}) does not match length of target sections ({len(sections)})"
             )
-        return sections, names
+        return names, sections
+
+    @property
+    def _is_FM_engine(self):
+        return "FemEngine" in self.names[0]
 
     def _add_all_FM_aliases(self) -> None:
         """create MIKE FM module aliases"""
@@ -710,11 +709,14 @@ class Pfs:
 
     def _add_FM_alias(self, alias: str, module: str) -> None:
         """Add short-hand alias for MIKE FM module, e.g. SW, but only if active!"""
-        if hasattr(self.data, module):
+        if hasattr(self.targets[0], module) and hasattr(
+            self.targets[0], "MODULE_SELECTION"
+        ):
             mode_name = f"mode_of_{module.lower()}"
-            mode_of = int(self.data.MODULE_SELECTION.get(mode_name, 0))
+            mode_of = int(self.targets[0].MODULE_SELECTION.get(mode_name, 0))
             if mode_of > 0:
-                setattr(self, alias, self.data[module])
+                setattr(self, alias, self.targets[0][module])
+                self._ALIAS_LIST.append(alias)
 
     def _pfs2yaml(self, filename, encoding=None) -> str:
 
@@ -729,15 +731,15 @@ class Pfs:
         output = []
         output.append("---")
 
-        self._level = 0
+        _level = 0
 
         for line in lines:
-            adj_line = self._parse_line(line)
+            adj_line, _level = self._parse_line(line, _level)
             output.append(adj_line)
 
         return "\n".join(output)
 
-    def _parse_line(self, line: str) -> str:
+    def _parse_line(self, line: str, level: int = 0) -> str:
         section_header = False
         s = line.strip()
         s = re.sub(r"\s*//.*", "", s)  # remove comments
@@ -748,7 +750,7 @@ class Pfs:
                 s = s.replace("[", "")
 
                 # This could be an option to create always create a list to handle multiple identical root elements
-                if self._level == 0:
+                if level == 0:
                     s = f"- {s}"
 
             if s[-1] == "]":
@@ -775,17 +777,17 @@ class Pfs:
         if "EndSect" in line:
             s = ""
 
-        ws = " " * 2 * self._level
-        if self._level > 0:
+        ws = " " * 2 * level
+        if level > 0:
             ws = "  " + ws  # TODO
         adj_line = ws + s
 
         if section_header:
-            self._level += 1
+            level += 1
         if "EndSect" in line:
-            self._level -= 1
+            level -= 1
 
-        return adj_line
+        return adj_line, level
 
     def _parse_param(self, value: str) -> str:
         if len(value) == 0:
@@ -829,79 +831,6 @@ class Pfs:
 
         return s
 
-    def _prepare_value_for_write(self, v):
-        """catch peculiarities of string formatted pfs data
-
-        Args:
-            v (str): value from one pfs line
-
-        Returns:
-            v: modified value
-        """
-        # some crude checks and corrections
-        if isinstance(v, str):
-
-            if len(v) > 5 and not ("PROJ" in v or "<CLOB:" in v):
-                v = v.replace('"', "''")
-                v = v.replace("\U0001F600", "'")
-
-            if v == "":
-                # add either '' or || as pre- and suffix to strings depending on path definition
-                v = "''"
-            elif v.count("|") == 2:
-                v = f"{v}"
-            else:
-                v = f"'{v}'"
-
-        elif isinstance(v, bool):
-            v = str(v).lower()  # stick to MIKE lowercase bool notation
-
-        elif isinstance(v, datetime):
-            v = v.strftime("%Y, %m, %d, %H, %M, %S").replace(" 0", " ")
-
-        elif isinstance(v, list):
-            out = []
-            for subv in v:
-                out.append(str(self._prepare_value_for_write(subv)))
-            v = ", ".join(out)
-
-        return v
-
-    def _write_nested_PfsSections(self, f, nested_data, lvl):
-        """
-        write pfs nested objects
-        Args:
-            f (file object): file object (to write to)
-            nested_data (mikeio.pfs.PfsSection)
-            lvl (int): level of indentation, add a tab \t for each
-        """
-        lvl_prefix = "   "
-        for k, v in vars(nested_data).items():
-
-            # check for empty sections
-            NoneType = type(None)
-            if isinstance(v, NoneType):
-                f.write(f"{lvl_prefix * lvl}[{k}]\n")
-                f.write(f"{lvl_prefix * lvl}EndSect  // {k}\n\n")
-
-            elif isinstance(v, PfsSection):
-                f.write(f"{lvl_prefix * lvl}[{k}]\n")
-                self._write_nested_PfsSections(f, v, lvl + 1)
-                f.write(f"{lvl_prefix * lvl}EndSect  // {k}\n\n")
-            elif isinstance(v, PfsNonUniqueList):
-                if len(v) == 0:
-                    # empty list -> keyword with no parameter
-                    f.write(f"{lvl_prefix * lvl}{k} = \n")
-                for subv in v:
-                    if isinstance(subv, PfsSection):
-                        self._write_nested_PfsSections(f, PfsSection({k: subv}), lvl)
-                    else:
-                        subv = self._prepare_value_for_write(subv)
-                        f.write(f"{lvl_prefix * lvl}{k} = {subv}\n")
-            else:
-                v = self._prepare_value_for_write(v)
-                f.write(f"{lvl_prefix * lvl}{k} = {v}\n")
-
     def write(self, filename=None):
         """Write object to a pfs file
 
@@ -909,13 +838,13 @@ class Pfs:
         ----------
         filename: str, optional
             Full path and filename of pfs to be created.
-            If filename is None, the content will be returned 
-            as a list of strings. 
+            If None, the content will be returned
+            as a list of strings.
         """
         from mikeio import __version__ as mikeio_version
 
         if filename is None:
-            return self._to_txt_lines()            
+            return self._to_txt_lines()
 
         with open(filename, "w") as f:
             now = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
@@ -925,15 +854,8 @@ class Pfs:
             f.write(rf"// Version     : {mikeio_version}")
             f.write("\n\n")
 
-            for name, target in zip(self.names, self._targets):
-                f.write(f"[{name}]\n")
-                target._write_with_func(f.write, level=1)
-                f.write(f"EndSect  // {name}\n\n")
+            self._write_with_func(f.write, level=0)
 
-    def _to_txt_lines(self):
-        lines = []
-        for name, target in zip(self.names, self._targets):
-            lines.append(f"[{name}]")
-            target._write_with_func(lines.append, level=1, newline="")
-            lines.append(f"EndSect  // {name}")
-        return lines
+
+class Pfs(PfsDocument):
+    pass
diff --git a/notebooks/PFS.ipynb b/notebooks/PFS.ipynb
index eef7014c..3d93916e 100644
--- a/notebooks/PFS.ipynb
+++ b/notebooks/PFS.ipynb
@@ -33,8 +33,992 @@
     {
      "data": {
       "text/plain": [
-       "<mikeio.Pfs>\n",
-       "FemEngineSW: [DOMAIN]   Touched = 1   discretization = 2  ..."
+       "[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,
@@ -103,18 +1087,51 @@
   },
   {
    "cell_type": "code",
-   "execution_count": null,
+   "execution_count": 5,
    "metadata": {},
-   "outputs": [],
+   "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": null,
+   "execution_count": 6,
    "metadata": {},
-   "outputs": [],
+   "outputs": [
+    {
+     "data": {
+      "text/plain": [
+       "2"
+      ]
+     },
+     "execution_count": 6,
+     "metadata": {},
+     "output_type": "execute_result"
+    }
+   ],
    "source": [
     "pfs.FemEngineSW.MODULE_SELECTION.mode_of_spectral_wave_module"
    ]
@@ -130,7 +1147,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 22,
+   "execution_count": 7,
    "metadata": {},
    "outputs": [
     {
@@ -168,7 +1185,7 @@
        "EndSect  // FemEngineSW"
       ]
      },
-     "execution_count": 22,
+     "execution_count": 7,
      "metadata": {},
      "output_type": "execute_result"
     }
@@ -186,7 +1203,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 25,
+   "execution_count": 8,
    "metadata": {},
    "outputs": [
     {
@@ -214,7 +1231,7 @@
        "EndSect  // OUTPUT_4"
       ]
      },
-     "execution_count": 25,
+     "execution_count": 8,
      "metadata": {},
      "output_type": "execute_result"
     }
@@ -225,7 +1242,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 30,
+   "execution_count": 9,
    "metadata": {},
    "outputs": [
     {
@@ -235,7 +1252,7 @@
        "Charnock_parameter = 0.01"
       ]
      },
-     "execution_count": 30,
+     "execution_count": 9,
      "metadata": {},
      "output_type": "execute_result"
     }
@@ -253,18 +1270,40 @@
   },
   {
    "cell_type": "code",
-   "execution_count": null,
+   "execution_count": 10,
    "metadata": {},
-   "outputs": [],
+   "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": null,
+   "execution_count": 11,
    "metadata": {},
-   "outputs": [],
+   "outputs": [
+    {
+     "data": {
+      "text/plain": [
+       "0.5959088268863615"
+      ]
+     },
+     "execution_count": 11,
+     "metadata": {},
+     "output_type": "execute_result"
+    }
+   ],
    "source": [
     "pfs.SW.SPECTRAL.maximum_threshold_frequency"
    ]
@@ -278,9 +1317,224 @@
   },
   {
    "cell_type": "code",
-   "execution_count": null,
+   "execution_count": 12,
    "metadata": {},
-   "outputs": [],
+   "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"
@@ -297,7 +1551,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": null,
+   "execution_count": 13,
    "metadata": {},
    "outputs": [],
    "source": [
@@ -306,9 +1560,32 @@
   },
   {
    "cell_type": "code",
-   "execution_count": null,
+   "execution_count": 14,
    "metadata": {},
-   "outputs": [],
+   "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"
    ]
@@ -322,7 +1599,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": null,
+   "execution_count": 15,
    "metadata": {},
    "outputs": [],
    "source": [
@@ -331,7 +1608,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 29,
+   "execution_count": 16,
    "metadata": {},
    "outputs": [
     {
@@ -353,7 +1630,7 @@
        "new_keyword = 'new_value'"
       ]
      },
-     "execution_count": 29,
+     "execution_count": 16,
      "metadata": {},
      "output_type": "execute_result"
     }
@@ -373,7 +1650,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 30,
+   "execution_count": 17,
    "metadata": {},
    "outputs": [],
    "source": [
@@ -382,7 +1659,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 31,
+   "execution_count": 18,
    "metadata": {},
    "outputs": [],
    "source": [
@@ -391,7 +1668,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 32,
+   "execution_count": 19,
    "metadata": {},
    "outputs": [],
    "source": [
@@ -402,7 +1679,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 33,
+   "execution_count": 20,
    "metadata": {},
    "outputs": [],
    "source": [
@@ -411,7 +1688,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": 34,
+   "execution_count": 21,
    "metadata": {},
    "outputs": [
     {
@@ -420,7 +1697,7 @@
        "dict_keys(['Touched', 'MzSEPfsListItemCount', 'number_of_outputs', 'OUTPUT_1', 'OUTPUT_2', 'OUTPUT_3', 'OUTPUT_4', 'OUTPUT_5'])"
       ]
      },
-     "execution_count": 34,
+     "execution_count": 21,
      "metadata": {},
      "output_type": "execute_result"
     }
@@ -440,7 +1717,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": null,
+   "execution_count": 22,
    "metadata": {},
    "outputs": [],
    "source": [
@@ -449,16 +1726,2261 @@
   },
   {
    "cell_type": "code",
-   "execution_count": null,
+   "execution_count": 23,
    "metadata": {},
-   "outputs": [],
+   "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": null,
+   "execution_count": 24,
    "metadata": {},
    "outputs": [],
    "source": [
@@ -478,9 +4000,27 @@
   },
   {
    "cell_type": "code",
-   "execution_count": null,
+   "execution_count": 25,
    "metadata": {},
-   "outputs": [],
+   "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",
@@ -496,27 +4036,39 @@
   },
   {
    "cell_type": "code",
-   "execution_count": null,
-   "metadata": {},
-   "outputs": [],
-   "source": [
-    "section = mikeio.PfsSection(t1_t0)\n",
-    "section"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": null,
+   "execution_count": 26,
    "metadata": {},
-   "outputs": [],
+   "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 = section.to_Pfs(name=\"t1_t0\")\n",
+    "pfs = mikeio.PfsDocument({\"t1_t0\": t1_t0})\n",
     "pfs"
    ]
   },
   {
    "cell_type": "code",
-   "execution_count": null,
+   "execution_count": 27,
    "metadata": {},
    "outputs": [],
    "source": [
@@ -532,7 +4084,7 @@
   },
   {
    "cell_type": "code",
-   "execution_count": null,
+   "execution_count": 28,
    "metadata": {},
    "outputs": [],
    "source": [
@@ -545,7 +4097,7 @@
  ],
  "metadata": {
   "kernelspec": {
-   "display_name": "Python 3.10.6 ('base')",
+   "display_name": "base",
    "language": "python",
    "name": "python3"
   },
@@ -559,11 +4111,11 @@
    "name": "python",
    "nbconvert_exporter": "python",
    "pygments_lexer": "ipython3",
-   "version": "3.10.6"
+   "version": "3.10.8"
   },
   "vscode": {
    "interpreter": {
-    "hash": "29241bd0f6dcdc7baf6ca7a8c63eed3702f363cfda55e5fb2434992ede57da6b"
+    "hash": "7aec4f91c09090e98e6ae8203c38529831bb4a3ce54cd1b69639b53cb01a6aa9"
    }
   }
  },


Test patch:
diff --git a/tests/test_pfs.py b/tests/test_pfs.py
index e82c0ba6..87aed05a 100644
--- a/tests/test_pfs.py
+++ b/tests/test_pfs.py
@@ -34,19 +34,33 @@ def test_pfssection(d1):
     assert len(sct.lst) == 2
     assert sct.dt == datetime(1979, 2, 3, 3, 5, 0)
 
+
 def test_pfssection_repr(d1):
     sct = mikeio.PfsSection(d1)
     txt = repr(sct)
-    assert len(txt)>1
+    assert len(txt) > 1
     assert "dt = 1979, 2, 3, 3, 5, 0" in txt
     assert "EndSect" in txt
 
+
 def test_pfs_repr(d1):
-    pfs = mikeio.Pfs(d1, names="ROOT")
+    pfs = mikeio.PfsDocument(d1, names="ROOT")
     txt = repr(pfs)
-    assert len(txt)>1
+    assert len(txt) > 1
     assert "SMILE = |file" in txt
 
+
+def test_create_pfsdocument_from_dict(d1):
+    sct = mikeio.PfsDocument({"root": d1})
+    assert sct.root.key1 == 1
+
+    with pytest.raises(AssertionError, match="all targets must be PfsSections"):
+        mikeio.PfsDocument(d1)
+
+    sct = mikeio.PfsDocument(d1, names="root")
+    assert sct.root.key1 == 1
+
+
 def test_pfssection_keys_values_items(d1):
     sct = mikeio.PfsSection(d1)
     vals = list(sct.values())
@@ -210,12 +224,12 @@ def test_pfssection_find_replace(d1):
 
 def test_pfssection_write(d1, tmpdir):
     sct = mikeio.PfsSection(d1)
-    pfs = sct.to_Pfs(name="root")
+    pfs = sct.to_PfsDocument(name="root")
     fn = os.path.join(tmpdir.dirname, "pfssection.pfs")
     pfs.write(fn)
 
-    pfs2 = mikeio.Pfs(fn)
-    assert pfs2.data.key1 == sct.key1
+    pfs2 = mikeio.PfsDocument(fn)
+    assert pfs2.root.key1 == sct.key1
 
 
 def test_str_is_scientific_float(d1):
@@ -233,9 +247,9 @@ def test_str_is_scientific_float(d1):
 
 def test_basic():
 
-    pfs = mikeio.Pfs("tests/testdata/pfs/simple.pfs")
+    pfs = mikeio.PfsDocument("tests/testdata/pfs/simple.pfs")
 
-    data = pfs.data
+    data = pfs.targets[0]
     # On a pfs file with a single target, the target is implicit,
     #  i.e. BoundaryExtractor in this case
 
@@ -244,7 +258,7 @@ def test_basic():
 
 
 def test_ecolab():
-    pfs = mikeio.Pfs("tests/testdata/pfs/minimal.ecolab")
+    pfs = mikeio.PfsDocument("tests/testdata/pfs/minimal.ecolab")
     assert pfs.ECO_LAB_SETUP.MISC.DESCRIPTION == "Miscellaneous Description"
     assert pfs.ECO_LAB_SETUP.PROCESSES.PROCESS_1.SCOPE == "WC"
 
@@ -253,9 +267,9 @@ def test_ecolab():
 
 
 def test_mztoolbox():
-    pfs = mikeio.Pfs("tests/testdata/pfs/concat.mzt")
-    assert "tide1.dfs" in pfs.data.Setup.File_1.InputFile
-    assert "|" in pfs.data.Setup.File_1.InputFile
+    pfs = mikeio.PfsDocument("tests/testdata/pfs/concat.mzt")
+    assert "tide1.dfs" in pfs.txconc.Setup.File_1.InputFile
+    assert "|" in pfs.txconc.Setup.File_1.InputFile
 
 
 def assert_files_match(f1, f2):
@@ -289,54 +303,54 @@ def assert_txt_files_match(f1, f2, comment="//") -> None:
 
 def test_read_write(tmpdir):
     infilename = "tests/testdata/pfs/concat.mzt"
-    pfs1 = mikeio.Pfs(infilename)
+    pfs1 = mikeio.PfsDocument(infilename)
     outfilename = os.path.join(tmpdir.dirname, "concat_out.mzt")
     pfs1.write(outfilename)
     assert_txt_files_match(infilename, outfilename)
-    _ = mikeio.Pfs(outfilename)  # try to parse it also
+    _ = mikeio.PfsDocument(outfilename)  # try to parse it also
 
 
 def test_read_write_she(tmpdir):
     infilename = "tests/testdata/pfs/Karup_basic.she"
-    pfs1 = mikeio.Pfs(infilename, unique_keywords=False)
+    pfs1 = mikeio.PfsDocument(infilename, unique_keywords=False)
     outfilename = os.path.join(tmpdir.dirname, "Karup_basic_out.she")
     pfs1.write(outfilename)
     # assert_txt_files_match(infilename, outfilename)
-    pfs2 = mikeio.Pfs(outfilename)
+    pfs2 = mikeio.PfsDocument(outfilename)
     assert pfs1.MIKESHE_FLOWMODEL == pfs2.MIKESHE_FLOWMODEL
 
 
 def test_read_write_she2(tmpdir):
     infilename = "tests/testdata/pfs/Karup_mini.she"
     with pytest.warns(match="contains a single quote character"):
-        pfs1 = mikeio.Pfs(infilename)
+        pfs1 = mikeio.PfsDocument(infilename)
 
     outfilename = os.path.join(tmpdir.dirname, "Karup_mini_out.she")
     pfs1.write(outfilename)
 
     with pytest.warns(match="contains a single quote character"):
-        pfs2 = mikeio.Pfs(outfilename)
+        pfs2 = mikeio.PfsDocument(outfilename)
     assert pfs1.MIKESHE_FLOWMODEL == pfs2.MIKESHE_FLOWMODEL
 
 
 def test_read_write_filenames(tmpdir):
     infilename = "tests/testdata/pfs/filenames.pfs"
-    pfs1 = mikeio.Pfs(infilename)
+    pfs1 = mikeio.PfsDocument(infilename)
     outfilename = os.path.join(tmpdir.dirname, "filenames_out.pfs")
     pfs1.write(outfilename)
     assert_txt_files_match(infilename, outfilename)
-    _ = mikeio.Pfs(outfilename)  # try to parse it also
+    _ = mikeio.PfsDocument(outfilename)  # try to parse it also
 
 
 def test_read_write_filenames_modified(tmpdir):
     infilename = "tests/testdata/pfs/filenames.pfs"
-    pfs1 = mikeio.Pfs(infilename)
+    pfs1 = mikeio.PfsDocument(infilename)
     pfs1.FILE_NAMES.file5 = r"..\..\newfile5.dfs0"
     pfs1.FILE_NAMES.file6 = "|../newfile6.dfs0|"
     outfilename = os.path.join(tmpdir.dirname, "filenames_out.pfs")
     pfs1.write(outfilename)
 
-    pfs2 = mikeio.Pfs(outfilename)
+    pfs2 = mikeio.PfsDocument(outfilename)
     d1 = pfs1.to_dict()
     d2 = pfs2.to_dict()
     assert d1 == d2
@@ -344,28 +358,25 @@ def test_read_write_filenames_modified(tmpdir):
 
 def test_sw():
 
-    pfs = mikeio.Pfs("tests/testdata/pfs/lake.sw")
-    assert pfs.data == pfs.FemEngineSW
-    data = pfs.data
+    pfs = mikeio.PfsDocument("tests/testdata/pfs/lake.sw")
+    assert pfs.targets[0] == pfs.FemEngineSW
+    root = pfs.targets[0]
 
-    # On a pfs file with a single target, the target is implicit,
-    #  i.e. FemEngineSW in this case
-
-    assert data.SPECTRAL_WAVE_MODULE.SPECTRAL.number_of_frequencies == 25
-    assert data.SPECTRAL_WAVE_MODULE.SPECTRAL.number_of_directions == 16
+    assert root.SPECTRAL_WAVE_MODULE.SPECTRAL.number_of_frequencies == 25
+    assert root.SPECTRAL_WAVE_MODULE.SPECTRAL.number_of_directions == 16
 
     # use shorthand alias SW instead of SPECTRAL_WAVE_MODULE
     assert pfs.SW.SPECTRAL.number_of_frequencies == 25
     assert pfs.SW.WIND.format == 1
 
-    assert data.TIME.number_of_time_steps == 450
+    assert root.TIME.number_of_time_steps == 450
 
-    assert data.TIME.start_time.year == 2002
-    assert data.TIME.start_time.month == 1
+    assert root.TIME.start_time.year == 2002
+    assert root.TIME.start_time.month == 1
 
 
 def test_pfssection_to_dataframe():
-    pfs = mikeio.Pfs("tests/testdata/pfs/lake.sw")
+    pfs = mikeio.PfsDocument("tests/testdata/pfs/lake.sw")
     df = pfs.SW.OUTPUTS.to_dataframe()
     assert df["file_name"][1] == "Wave_parameters.dfsu"
     assert df.shape[0] == 4
@@ -374,7 +385,7 @@ def test_pfssection_to_dataframe():
 def test_hd_outputs():
 
     with pytest.warns(match="defined multiple times"):
-        pfs = mikeio.Pfs("tests/testdata/pfs/lake.m21fm", unique_keywords=True)
+        pfs = mikeio.PfsDocument("tests/testdata/pfs/lake.m21fm", unique_keywords=True)
     df = pfs.HD.OUTPUTS.to_dataframe()
 
     assert df["file_name"][2] == "ts.dfs0"
@@ -383,8 +394,8 @@ def test_hd_outputs():
 
 def test_included_outputs():
 
-    pfs = mikeio.Pfs("tests/testdata/pfs/lake.sw")
-    df = pfs.SW.OUTPUTS.to_dataframe()
+    pfs = mikeio.PfsDocument("tests/testdata/pfs/lake.sw")
+    df = pfs.SW.OUTPUTS.to_dataframe(prefix="OUTPUT_")
     df = df[df.include == 1]
 
     assert df["file_name"][1] == "Wave_parameters.dfsu"
@@ -393,7 +404,7 @@ def test_included_outputs():
 
 def test_output_by_id():
 
-    pfs = mikeio.Pfs("tests/testdata/pfs/lake.sw")
+    pfs = mikeio.PfsDocument("tests/testdata/pfs/lake.sw")
     df = pfs.SW.OUTPUTS.to_dataframe()
     # .loc refers to output_id irrespective of included or not
     assert df.loc[3]["file_name"] == "Waves_x20km_y20km.dfs0"
@@ -405,23 +416,23 @@ def test_output_by_id():
 
 def test_encoding():
     with pytest.warns(match="defined multiple times"):
-        pfs = mikeio.Pfs(
+        pfs = mikeio.PfsDocument(
             "tests/testdata/pfs/OresundHD2D_EnKF10.m21fm", unique_keywords=True
         )
-    assert hasattr(pfs, "DA")
+    assert len(pfs.keys()) == 1
 
 
 @pytest.mark.skipif(sys.platform == "win32", reason="does not run on windows")
 def test_encoding_linux():
     with pytest.raises(ValueError):
-        mikeio.Pfs("tests/testdata/pfs/OresundHD2D_EnKF10.m21fm", encoding=None)
+        mikeio.PfsDocument("tests/testdata/pfs/OresundHD2D_EnKF10.m21fm", encoding=None)
 
 
 def test_multiple_identical_roots():
     """Test a file created with Mike Zero toolbox containing two similar extraction tasks"""
     pfs = mikeio.read_pfs("tests/testdata/pfs/t1_t0.mzt")
-    assert pfs.data[0].Setup.X == 0
-    assert pfs.data[1].Setup.X == 2
+    assert pfs.targets[0].Setup.X == 0
+    assert pfs.targets[1].Setup.X == 2
     assert pfs.t1_t0[0].Setup.X == 0
     assert pfs.t1_t0[1].Setup.X == 2
     assert pfs.names == ["t1_t0", "t1_t0"]
@@ -442,6 +453,10 @@ def test_multiple_unique_roots():
 def test_multiple_roots_mixed():
     """Test a file created with Mike Zero toolbox containing two similar extraction tasks"""
     pfs = mikeio.read_pfs("tests/testdata/pfs/multiple_root_elements.pfs")
+    assert list(pfs.keys()) == [
+        "MZ_WAVE_SPECTRA_CONVERTER",
+        "SYSTEM",
+    ]
     assert pfs.names == [
         "MZ_WAVE_SPECTRA_CONVERTER",
         "MZ_WAVE_SPECTRA_CONVERTER",
@@ -453,7 +468,7 @@ def test_multiple_roots_mixed():
 def test_non_unique_keywords():
     fn = "tests/testdata/pfs/nonunique.pfs"
     with pytest.warns(match="Keyword z_min defined multiple times"):
-        pfs = mikeio.Pfs(fn, unique_keywords=True)
+        pfs = mikeio.PfsDocument(fn, unique_keywords=True)
 
     assert len(pfs.BoundaryExtractor.POINT_1) == 2
     assert isinstance(pfs.BoundaryExtractor.POINT_1, mikeio.pfs.PfsNonUniqueList)
@@ -465,7 +480,7 @@ def test_non_unique_keywords():
 
 def test_non_unique_keywords_allowed():
     fn = "tests/testdata/pfs/nonunique.pfs"
-    pfs = mikeio.Pfs(fn, unique_keywords=False)
+    pfs = mikeio.PfsDocument(fn, unique_keywords=False)
 
     assert len(pfs.BoundaryExtractor.POINT_1) == 2
     assert isinstance(pfs.BoundaryExtractor.POINT_1[1], mikeio.PfsSection)
@@ -477,12 +492,12 @@ def test_non_unique_keywords_allowed():
 
 def test_non_unique_keywords_read_write(tmpdir):
     fn1 = "tests/testdata/pfs/nonunique.pfs"
-    pfs1 = mikeio.Pfs(fn1, unique_keywords=False)
+    pfs1 = mikeio.PfsDocument(fn1, unique_keywords=False)
 
     fn2 = os.path.join(tmpdir.dirname, "nonunique_out.pfs")
     pfs1.write(fn2)
 
-    pfs2 = mikeio.Pfs(fn2, unique_keywords=False)
+    pfs2 = mikeio.PfsDocument(fn2, unique_keywords=False)
 
     d1 = pfs1.BoundaryExtractor.to_dict()
     d2 = pfs2.BoundaryExtractor.to_dict()
@@ -492,16 +507,16 @@ def test_non_unique_keywords_read_write(tmpdir):
 def test_illegal_pfs():
     fn = "tests/testdata/pfs/illegal.pfs"
     with pytest.raises(ValueError, match="]]"):
-        mikeio.Pfs(fn)
+        mikeio.PfsDocument(fn)
 
 
 def test_mdf():
     """MDF with multiline polygon"""
     fn = "tests/testdata/pfs/oresund.mdf"
 
-    pfs = mikeio.Pfs(fn)
+    pfs = mikeio.PfsDocument(fn)
     assert (
-        pfs.data[2].POLYGONS.Data
+        pfs.targets[2].POLYGONS.Data
         == "8 8 Untitled 359236.79224376212 6168403.076453222 1 0 -1 -1 16711680 65535 3 0 1 0 1 1000 1000 0 0 0 0 0 1 1000 2 2 0 10 3 38 32 25 8 Untitled 367530.58488032949 6174892.7846391136 0 0 -1 -1 16711680 65535 3 1 700000 0 1 1000 1000 0 0 0 0 0 1 1000 2 2 0 10 14 34 25 32 39 1 37 35 31 23 26 17 30 22 24 8 Untitled 358191.86702583247 6164004.5695307152 1 0 -1 -1 16711680 65535 3 0 1 0 1 1000 1000 0 0 0 0 0 1 1000 2 2 0 10 2 1 36 8 Untitled 356300.2080261847 6198016.2887355704 1 0 -1 -1 16711680 65535 3 0 1 0 1 1000 1000 0 0 0 0 0 1 1000 2 2 0 10 2 9 0 9 Ndr Roese 355957.23455536627 6165986.6140259188 0 0 -1 -1 16711680 65535 3 1 180000 0 1 1000 1000 0 0 0 0 0 1 1000 2 2 0 10 6 33 37 36 39 38 34 16 Area of interest 355794.66401566722 6167799.1149176853 0 0 -1 -1 16711680 65535 3 1 50000 0 1 1000 1000 0 0 0 0 0 1 1000 2 2 0 10 1 40 8 Untitled 353529.91916129418 6214840.5979535272 0 0 -1 -1 16711680 65535 3 1 700000 0 1 1000 1000 0 0 0 0 0 1 1000 2 2 0 10 8 41 8 7 27 4 6 11 12 8 Untitled 351165.00127937191 6173083.0605236143 1 0 -1 -1 16711680 65535 3 0 1 0 1 1000 1000 0 0 0 0 0 1 1000 2 2 0 10 1 2 "
     )
 
@@ -513,7 +528,7 @@ def test_read_in_memory_string():
   option = foo,bar
 EndSect // ENGINE
 """
-    pfs = mikeio.Pfs(StringIO(text))
+    pfs = mikeio.PfsDocument(StringIO(text))
 
     assert pfs.ENGINE.option == ["foo", "bar"]
 
@@ -526,7 +541,7 @@ def test_read_mixed_array():
   fill_list = false, 'TEST'
 EndSect // ENGINE
 """
-    pfs = mikeio.Pfs(StringIO(text))
+    pfs = mikeio.PfsDocument(StringIO(text))
 
     assert pfs.ENGINE.advanced == False
     assert isinstance(pfs.ENGINE.fill_list, (list, tuple))
@@ -542,7 +557,7 @@ def test_read_mixed_array2():
   fill_list = 'dsd', 0, 0.0, false
 EndSect // ENGINE
 """
-    pfs = mikeio.Pfs(StringIO(text))
+    pfs = mikeio.PfsDocument(StringIO(text))
     assert isinstance(pfs.ENGINE.fill_list, (list, tuple))
     assert len(pfs.ENGINE.fill_list) == 4
     assert pfs.ENGINE.fill_list[0] == "dsd"
@@ -558,7 +573,7 @@ def test_read_mixed_array3():
   fill_list = 'dsd', 0, 0.0, "str2", false, 'str3'
 EndSect // ENGINE
 """
-    pfs = mikeio.Pfs(StringIO(text))
+    pfs = mikeio.PfsDocument(StringIO(text))
     assert isinstance(pfs.ENGINE.fill_list, (list, tuple))
     assert len(pfs.ENGINE.fill_list) == 6
     assert pfs.ENGINE.fill_list[0] == "dsd"
@@ -576,7 +591,7 @@ def test_read_array():
   fill_list = 1, 2
 EndSect // ENGINE
 """
-    pfs = mikeio.Pfs(StringIO(text))
+    pfs = mikeio.PfsDocument(StringIO(text))
 
     assert isinstance(pfs.ENGINE.fill_list, (list, tuple))
     assert len(pfs.ENGINE.fill_list) == 2
@@ -593,7 +608,7 @@ def test_empty(tmpdir):
   EndSect // B  
 EndSect // ENGINE
 """
-    pfs = mikeio.Pfs(StringIO(text))
+    pfs = mikeio.PfsDocument(StringIO(text))
 
     assert isinstance(pfs.ENGINE.A, list)
     assert len(pfs.ENGINE.A) == 0
@@ -623,7 +638,7 @@ def test_difficult_chars_in_str(tmpdir):
 EndSect // ENGINE
 """
     with pytest.warns(match="contains a single quote character"):
-        pfs = mikeio.Pfs(StringIO(text))
+        pfs = mikeio.PfsDocument(StringIO(text))
 
     assert isinstance(pfs.ENGINE.A, str)
     assert pfs.ENGINE.A == "str,s/d\sd.dfs0"
@@ -660,7 +675,7 @@ def test_difficult_chars_in_str2(tmpdir):
 EndSect // ENGINE"""
 
     with pytest.warns(match="contains a single quote character"):
-        pfs = mikeio.Pfs(StringIO(text))
+        pfs = mikeio.PfsDocument(StringIO(text))
 
     outfile = os.path.join(tmpdir, "difficult_chars_in_str2.pfs")
     pfs.write(outfile)
@@ -683,7 +698,7 @@ def test_end_of_stream():
   rr = ||, '', 1, 0
 EndSect  // Results
 """
-    pfs = mikeio.Pfs(StringIO(text))
+    pfs = mikeio.PfsDocument(StringIO(text))
 
 
 def test_read_string_array():
@@ -693,7 +708,7 @@ def test_read_string_array():
   fill_list = 'foo', 'bar', 'baz'
 EndSect // ENGINE
 """
-    pfs = mikeio.Pfs(StringIO(text))
+    pfs = mikeio.PfsDocument(StringIO(text))
 
     assert isinstance(pfs.ENGINE.fill_list, (list, tuple))
     assert len(pfs.ENGINE.fill_list) == 3
@@ -709,7 +724,7 @@ def test_read_write_list_list(tmpdir):
   RGB_Color_Value = 85, 0, 171
 EndSect // ENGINE
 """
-    pfs = mikeio.Pfs(StringIO(text), unique_keywords=False)
+    pfs = mikeio.PfsDocument(StringIO(text), unique_keywords=False)
     assert len(pfs.ENGINE.RGB_Color_Value) == 2
     assert len(pfs.ENGINE.RGB_Color_Value[0]) == 3
 
@@ -723,6 +738,7 @@ EndSect // ENGINE
     n_rgb_out = len([line for line in outlines if "RGB_Color_Value" in line])
     assert n_rgb_out == 2
 
+
 def test_pfs_repr_contains_name_of_target():
     text = """
 [ENGINE]
@@ -730,12 +746,13 @@ def test_pfs_repr_contains_name_of_target():
   RGB_Color_Value = 85, 0, 171
 EndSect // ENGINE
 """
-    pfs = mikeio.Pfs(StringIO(text), unique_keywords=False)
+    pfs = mikeio.PfsDocument(StringIO(text), unique_keywords=False)
     text = repr(pfs)
 
     # TODO should we be more specific i.e. [ENGINE] ?
     assert "ENGINE" in text
 
+
 def test_double_single_quotes_in_string(tmpdir):
     text = """
 [DERIVED_VARIABLE_106]
@@ -750,7 +767,7 @@ def test_double_single_quotes_in_string(tmpdir):
 EndSect  // DERIVED_VARIABLE_106
 """
 
-    pfs = mikeio.Pfs(StringIO(text))
+    pfs = mikeio.PfsDocument(StringIO(text))
     assert (
         pfs.DERIVED_VARIABLE_106.description
         == 'alfa_PC_T, "light" adjusted alfa_PC, ugC/gC*m2/uE'
@@ -776,7 +793,7 @@ def test_str_in_str_projection(tmpdir):
    EndSect  // ROOT 
 """
 
-    pfs = mikeio.Pfs(StringIO(text))
+    pfs = mikeio.PfsDocument(StringIO(text))
     assert isinstance(pfs.ROOT.Proj, str)
     assert pfs.ROOT.Proj[8] == "E"
 
@@ -801,7 +818,7 @@ def test_number_in_str(tmpdir):
    EndSect  // ROOT 
 """
 
-    pfs = mikeio.Pfs(StringIO(text))
+    pfs = mikeio.PfsDocument(StringIO(text))
     assert isinstance(pfs.ROOT.ID1, str)
     assert isinstance(pfs.ROOT.ID2, str)
     assert not isinstance(pfs.ROOT.Number, str)
@@ -825,7 +842,7 @@ def test_floatlike_strings(tmpdir):
       ID_C = '1-E3'
     EndSect  // WELLNO_424
 """
-    pfs = mikeio.Pfs(StringIO(text))
+    pfs = mikeio.PfsDocument(StringIO(text))
     # assert pfs.WELLNO_424.ID_A == "1E-3"  # not possible to distinguish
     assert pfs.WELLNO_424.ID_B == "1-E"
     assert pfs.WELLNO_424.ID_C == "1-E3"
@@ -844,7 +861,7 @@ def test_nested_quotes(tmpdir):
     Properties = '<CLOB:"1495_weir",0,0,false,0.0,0.0,0.0,0.0,1,0,0.5,1.0,1.0,0.5,1.0,1.0,0,0.0,0.0,"00000000-0000-0000-0000-000000000000",15.24018,5.181663,0.0,"","">'
   EndSect  // Weir_0
 """
-    pfs = mikeio.Pfs(StringIO(text))
+    pfs = mikeio.PfsDocument(StringIO(text))
     assert (
         pfs.Weir_0.Properties
         == '<CLOB:"1495_weir",0,0,false,0.0,0.0,0.0,0.0,1,0,0.5,1.0,1.0,0.5,1.0,1.0,0,0.0,0.0,"00000000-0000-0000-0000-000000000000",15.24018,5.181663,0.0,"","">'
@@ -870,7 +887,7 @@ def test_filename_in_list(tmpdir):
       Method_OL = 0
    EndSect  // EcolabTemplateSpecification 
 """
-    pfs = mikeio.Pfs(StringIO(text))
+    pfs = mikeio.PfsDocument(StringIO(text))
     assert len(pfs.EcolabTemplateSpecification.TemplateFile_OL) == 7
     assert (
         pfs.EcolabTemplateSpecification.TemplateFile_OL[0]
@@ -897,7 +914,7 @@ def test_multiple_empty_strings_in_list(tmpdir):
    EndSect  // Engine 
 """
 
-    pfs = mikeio.Pfs(StringIO(text))
+    pfs = mikeio.PfsDocument(StringIO(text))
     assert len(pfs.Engine.A) == 4
     assert pfs.Engine.A[0] == ""
     assert pfs.Engine.A[-1] == ""
@@ -925,7 +942,7 @@ def test_vertical_lines_in_list(tmpdir):
    EndSect  // EcolabTemplateSpecification 
 """
 
-    pfs = mikeio.Pfs(StringIO(text))
+    pfs = mikeio.PfsDocument(StringIO(text))
     assert len(pfs.EcolabTemplateSpecification.TemplateFile_OL) == 7
     assert pfs.EcolabTemplateSpecification.TemplateFile_OL[0] == "||"
     assert pfs.EcolabTemplateSpecification.TemplateFile_OL[3] == "||"
@@ -953,7 +970,7 @@ def test_nonunique_mixed_keywords_sections1(tmpdir):
    EndSect  // ROOT 
 """
 
-    pfs = mikeio.Pfs(StringIO(text))
+    pfs = mikeio.PfsDocument(StringIO(text))
     assert len(pfs.ROOT.A) == 4
     assert isinstance(pfs.ROOT.A[2], mikeio.PfsSection)
     assert isinstance(pfs.ROOT.A[2].B, mikeio.pfs.PfsNonUniqueList)
@@ -990,7 +1007,7 @@ def test_nonunique_mixed_keywords_sections2(tmpdir):
    EndSect  // ROOT 
 """
 
-    pfs = mikeio.Pfs(StringIO(text))
+    pfs = mikeio.PfsDocument(StringIO(text))
     assert len(pfs.ROOT.A) == 4
     assert isinstance(pfs.ROOT.A, mikeio.pfs.PfsNonUniqueList)
     assert isinstance(pfs.ROOT.A[0], mikeio.PfsSection)
@@ -1005,7 +1022,7 @@ def test_nonunique_mixed_keywords_sections2(tmpdir):
 
 def test_parse_mike_she_pfs():
 
-    pfs = mikeio.Pfs("tests/testdata/pfs/Karup_basic.she")
+    pfs = mikeio.PfsDocument("tests/testdata/pfs/Karup_basic.she")
 
     assert pfs.n_targets == 2
     assert (
@@ -1016,7 +1033,7 @@ def test_parse_mike_she_pfs():
 def test_read_write_grid_editor_color_palette(tmpdir):
     infile = "tests/testdata/pfs/grid1.gsf"
     outfile = os.path.join(tmpdir, "grid.gsf")
-    pfs = mikeio.Pfs(infile)
+    pfs = mikeio.PfsDocument(infile)
     pal = pfs.GRID_EDITOR.GRID_EDIT_VIEW.MIKEZero_Palette_Definition
     assert len(pal.RGB_Color_Value) == 16
 
@@ -1029,7 +1046,6 @@ def test_read_write_grid_editor_color_palette(tmpdir):
     assert n_rgb_out == 16
 
 
-
 @pytest.fixture
 def pfs_ABC_text() -> str:
     text = """
@@ -1049,15 +1065,14 @@ def pfs_ABC_text() -> str:
 """
     return text
 
-    
 
 def test_search_keyword(pfs_ABC_text):
-    pfs = mikeio.Pfs(StringIO(pfs_ABC_text))
+    pfs = mikeio.PfsDocument(StringIO(pfs_ABC_text))
     assert "A2" in pfs.ROOT
 
     r0 = pfs.search(key="not_there")
     assert r0 is None
-    
+
     r1 = pfs.search(key="float")
     assert r1.ROOT.A1.B.float_1 == 4.5
     assert "A2" not in r1.ROOT
@@ -1069,50 +1084,54 @@ def test_search_keyword(pfs_ABC_text):
     r3 = pfs.ROOT.search("float")
     assert r2 == r3
 
+
 def test_search_keyword_found_in_multiple_places():
-    pfs = mikeio.Pfs("tests/testdata/pfs/lake.sw")
+    pfs = mikeio.PfsDocument("tests/testdata/pfs/lake.sw")
     subset = pfs.search("charnock")
     # the string "Charnock" occurs 6 times in this file
-    len(subset.FemEngineSW.SPECTRAL_WAVE_MODULE.WIND.keys()) ==2 
-    len(subset.FemEngineSW.SPECTRAL_WAVE_MODULE.OUTPUTS) == 4
-    
 
-    
+    # NOTE: aliases not possible for search output
+    SW = subset.FemEngineSW.SPECTRAL_WAVE_MODULE
+    assert len(SW.WIND.keys()) == 2
+    assert len(SW.OUTPUTS) == 4
+
 
 def test_search_param(pfs_ABC_text):
-    pfs = mikeio.Pfs(StringIO(pfs_ABC_text))
-    
+    pfs = mikeio.PfsDocument(StringIO(pfs_ABC_text))
+
     r0 = pfs.search(param="not_there")
     assert r0 is None
-    
-    r1 = pfs.search(param=0) 
+
+    r1 = pfs.search(param=0)
     assert len(r1.ROOT) == 2
     assert r1.ROOT.A1.int_1 == 0
     assert r1.ROOT.A2.int_2 == 0
-    
+
     r2 = pfs.ROOT.search(param=0)
     assert r2 == r1.ROOT
 
-    r3 = pfs.ROOT.search(param='0')
+    r3 = pfs.ROOT.search(param="0")
     assert len(r3) == 1
-    assert r3.str_1 == '0'
+    assert r3.str_1 == "0"
+
 
 def test_search_section(pfs_ABC_text):
-    pfs = mikeio.Pfs(StringIO(pfs_ABC_text))
-    
+    pfs = mikeio.PfsDocument(StringIO(pfs_ABC_text))
+
     r0 = pfs.search(section="not_there")
     assert r0 is None
-    
-    r1 = pfs.search(section='A') 
+
+    r1 = pfs.search(section="A")
     assert len(r1.ROOT) == 2
     assert r1.ROOT.A1 == pfs.ROOT.A1
     assert r1.ROOT.A2 == pfs.ROOT.A2
-    
-    r2 = pfs.ROOT.search(section='A')
+
+    r2 = pfs.ROOT.search(section="A")
     assert r2 == r1.ROOT
-   
+
+
 def test_search_keyword_or_param(pfs_ABC_text):
-    pfs = mikeio.Pfs(StringIO(pfs_ABC_text))
+    pfs = mikeio.PfsDocument(StringIO(pfs_ABC_text))
     # assert pfs.ROOT.A1.B.float_1 == 4.5
 
     r1 = pfs.search(key="float", param=3)
@@ -1129,8 +1148,8 @@ def test_search_keyword_or_param(pfs_ABC_text):
 
 
 def test_search_and_modify(pfs_ABC_text):
-    # does the original remain un-changed? 
-    pfs = mikeio.Pfs(StringIO(pfs_ABC_text))
+    # does the original remain un-changed?
+    pfs = mikeio.PfsDocument(StringIO(pfs_ABC_text))
     assert pfs.ROOT.A1.B.float_1 == 4.5
 
     r1 = pfs.search(key="float")