Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wrong docstring on dfmmodel.crossections.add_yz_definition #46

Open
LisaWeijers opened this issue Mar 15, 2023 · 2 comments
Open

wrong docstring on dfmmodel.crossections.add_yz_definition #46

LisaWeijers opened this issue Mar 15, 2023 · 2 comments

Comments

@LisaWeijers
Copy link

I was going through the code and docstrings to figure out in which ways I can manually add crosssections, and this specific function doesn't make sense. The actual function parameter are different than the docstring suggests.

From file: https://github.com/openearth/delft3dfmpy/blob/master/delft3dfmpy/core/dfm.py
from line 471 onward:

def add_yz_definition(
        self, yz=None, thalweg=None, roughnesstype=None, roughnessvalue=None, name=None
    ):
        """
        Add xyz crosssection
        Parameters
        ----------
        code : str
            Id of cross section
        branch : str
            Name of branch
        offset : float
            Position of cross section along branch. If not given, the position is determined
            from the branches in the network. These should thus be given in this case.
        crds : np.array
            Nx2 array with y, z coordinates
        """

How does this function work?

@RuudHurkmans
Copy link
Collaborator

De docstring is indeed incorrect. The arguments should be, as the call suggests:

  • an Nx2 array of y-z coordinates
  • thalweg as a float
  • name of the definition (if none it is generated automatically)
  • type and value of the associated roughness definition.

However, delft3dfmpy is (about to be) depracated; Hydrolib-core has newer functionality to generate profiles and does likely better suit your needs.

@LisaWeijers
Copy link
Author

Fair enough!

Is there any documentation available right now on how to replace delft3dfmpy with hydrolib-core? I can't find it around delft3dfmpy documentation, but also not around hydrolib-core documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants