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

z-sigma layers not supported by FMModel #474

Closed
SCLaan opened this issue Mar 22, 2023 · 1 comment · Fixed by #476
Closed

z-sigma layers not supported by FMModel #474

SCLaan opened this issue Mar 22, 2023 · 1 comment · Fixed by #476
Assignees
Labels
type: enhancement Improvements to existing functionality
Milestone

Comments

@SCLaan
Copy link

SCLaan commented Mar 22, 2023

Describe the bug
Currently FMModel does not support geometry keywords for (3D) z-sigma layer models. When reading a mdu, these keywords end up in the comments, but are not read correctly. When saving the model, the information is lost. Similarly, it is not possible to initialize a FMModel with z-sigma layers, because the keywords cannot be set. Keywords are:

> Numtopsiguniform                    = 1                                                                   # Number of sigma layers in top of z-layer model
> Dztop                               = 5.0                                                                 # Z-layer thickness of layers above level Dztopuniabovez
> Floorlevtoplay                      = -5.0                                                                # Floor level of top layer
> Dztopuniabovez                      = -100.0                                                              # Above level Dztopuniabovez layers will have uniform Dztop, SigmaGrowthFactor below this level
> Keepzlayeringatbed                  = 2                                                                   #  bedlayerthickness = zlayerthickness at bed 0 or 1
> Dxwuimin2D                          = 0.1                                                                 # Smallest fraction dx/wu , set dx > Dxwuimin2D*wu, Default = 0.1

To Reproduce
Steps to reproduce the behavior:

  1. test = dfm.FMModel(Path(r'p:\i1000668-tcoms\03_newModel\02_simulations\02_3D\tests\A03_coarse_53sigma\SEA_3D_3km.mdu'),path_style='unix')
  2. test.save(Path('test.mdu'),recurse=False)

Expected behavior
Output mdu should contain the same contents.
Related to this, but a bit of a large feature request: I think all existing keywords should be available. In practice, frequently new keywords are added and then immediately used in model applications. FMModel should be able to read this and keep it in memory, so no information gets lost. I know this is against the vision for hydrolib, but it would be good to replace the current ValueError that shows with a 'ValueWarning', so a user can continue if desired.

Version info (please complete the following information):

  • OS: Windows 10
@arthurvd arthurvd added the type: enhancement Improvements to existing functionality label Mar 22, 2023
@arthurvd arthurvd added this to the Release 0.5 milestone Mar 22, 2023
@arthurvd arthurvd self-assigned this Mar 22, 2023
@priscavdsluis priscavdsluis self-assigned this Mar 24, 2023
@priscavdsluis
Copy link
Contributor

This issue is waiting on the merge for #339

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement Improvements to existing functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants