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

Support for old ext file #369

Closed
veenstrajelmer opened this issue Oct 11, 2022 · 5 comments · Fixed by #471
Closed

Support for old ext file #369

veenstrajelmer opened this issue Oct 11, 2022 · 5 comments · Fixed by #471
Assignees
Labels
type: feature Brand new functionality
Milestone

Comments

@veenstrajelmer
Copy link
Collaborator

veenstrajelmer commented Oct 11, 2022

Is your feature request related to a problem? Please describe.
Currently, only the new extfile is supported. The old ext file is not supported yet. Would be nice to have this non-recursive, since it is not convenient if all meteo forcing is read by default. The long-term ambition is to phase out the old ext file, but there are currently many quantities that are not supported by the new ext file yet:

  • initialsalinity
  • horizontaleddydiffusivitycoefficient
  • windxy
  • airpressure_windx_windy
  • airpressure_windx_windy_charnock
  • dewpoint_airtemperature_cloudiness
  • frictioncoefficient
  • internaltidesfrictioncoefficient
  • bedlevel (not possible to use operators in the new ext file, so at least part of bedlevel is currently not supported there)
  • discharge_salinity_temperature_sorsin

Describe the solution you'd like

  • See file format description in https://content.oss.deltares.nl/delft3d/D-Flow_FM_User_Manual.pdf#subsection.C.5.1, the large keyword table.
  • Several keywords are optional.
  • Extra keywords that we should support, but are missing in the PDF documentation:
    • extrapolation_method (type int, optional): read after method <<< NEW, Apr 11, 2022
    • maxsearchradius (type float, optional): read after extrapolation_method <<< NEW, Apr 11, 2022
    • percentileminmax (type float, optional): read after extrapoltol
    • nummin (type int, optional): read after area
  • We will do some light validation on presence or absence of the optional fields. Do this via field validators:
    • varname: only allowed when filetype==11
    • sourcemask: only allowed when filetype==4 or filetype==6
    • extrapolation_method==1: only allowed when method==3 <<< NEW, Apr 11, 2022
    • maxsearchradius: only allowed when method==3 and extrapolation_method==1 <<< NEW, Apr 11, 2022
    • value: only allowed when method==4
    • factor: only allowed when quantity.startswith('initialtracer')
    • ifrctyp: only allowed when quantity.startswith('frictioncoefficient')
    • averagingtype: only allowed when method==6
    • relativesearchcellsize: only allowed when method==6
    • extrapoltol: only allowed when method==5
    • percentileminmax: only allowed when method==6
    • area: only allowed when quantity.startswith('discharge_salinity_temperature_sorsin')
    • nummin: only allowed when method==6
  • For the record: we will deliberately NOT include other optional keywords here. They can come in new issues later. These keywords are: 'layer', 'tracerfallvelocity', 'tracerdecaytime', 'tref', 'startlevelsuctionside', 'stoplevelsuctionside', 'startleveldeliveryside', 'stopleveldeliveryside', 'uniformsalinityabovez', 'uniformsalinitybelowz', 'uniformvalueabovez', 'uniformvaluebelowz'
  • The ORDER of keywords is fixed, cannot be varied
  • The filename value on a filename=... line should maybe ? be of type Union[PolyFile, TimModel, DiskOnlyFileModel].
    As such, we hope to recursively read/store if a .pli file is given, but all other file types are only stored by filename, and copied as-is by the existing functionality in DiskOnlyFileModel. The idea behind this is that we need to also read/store for each .pli file the accompanying .tim or .cmp file. Further design discussion is still needed for this.
  • Once the model class is available, this ExtOldModel should be included in hydrolib.core.dflowfm.mdu.models.ExternalForcing.extforcefile (and replace the current DiskOnlyFileModel over there)

See Excelsheet for overview of all old ext keywords in Python/Fortran/example files:
dflowfm_oldext_keyword_overview.xlsx

@arthurvd arthurvd added this to To do in HYDROLIB-core via automation Oct 12, 2022
@arthurvd arthurvd added this to the Release v0.5.0 milestone Oct 12, 2022
@SCLaan
Copy link

SCLaan commented Dec 13, 2022

also missing this feature for pre-processing

@arthurvd arthurvd added the type: feature Brand new functionality label Mar 10, 2023
@priscavdsluis priscavdsluis moved this from To do to In progress in HYDROLIB-core Mar 17, 2023
@priscavdsluis priscavdsluis self-assigned this Mar 17, 2023
priscavdsluis added a commit that referenced this issue Mar 17, 2023
priscavdsluis added a commit that referenced this issue Mar 17, 2023
priscavdsluis added a commit that referenced this issue Mar 17, 2023
@arthurvd arthurvd moved this from Review in progress to Review/test follow up in HYDROLIB-core Apr 13, 2023
@priscavdsluis priscavdsluis moved this from Review/test follow up to In progress in HYDROLIB-core Apr 13, 2023
priscavdsluis added a commit that referenced this issue Apr 13, 2023
Co-authored-by: Arthur van Dam <arthurvd@gmail.com>
priscavdsluis added a commit that referenced this issue Apr 13, 2023
@priscavdsluis priscavdsluis moved this from In progress to Review in progress in HYDROLIB-core Apr 13, 2023
@priscavdsluis priscavdsluis moved this from Review in progress to In progress in HYDROLIB-core Apr 13, 2023
@priscavdsluis priscavdsluis moved this from In progress to Review in progress in HYDROLIB-core Apr 13, 2023
@priscavdsluis priscavdsluis moved this from Review in progress to Ready to review in HYDROLIB-core Apr 13, 2023
@tim-vd-aardweg tim-vd-aardweg moved this from Ready to review to Review in progress in HYDROLIB-core Apr 13, 2023
@tim-vd-aardweg tim-vd-aardweg moved this from Review in progress to Review/test follow up in HYDROLIB-core Apr 14, 2023
@priscavdsluis priscavdsluis moved this from Review/test follow up to In progress in HYDROLIB-core Apr 14, 2023
priscavdsluis added a commit that referenced this issue Apr 14, 2023
priscavdsluis added a commit that referenced this issue Apr 14, 2023
@priscavdsluis priscavdsluis moved this from In progress to Ready to review in HYDROLIB-core Apr 14, 2023
@tim-vd-aardweg tim-vd-aardweg moved this from Ready to review to Review in progress in HYDROLIB-core Apr 14, 2023
@tim-vd-aardweg tim-vd-aardweg moved this from Review in progress to Test in HYDROLIB-core Apr 14, 2023
@veenstrajelmer veenstrajelmer moved this from Test to Ready to merge in HYDROLIB-core Apr 14, 2023
HYDROLIB-core automation moved this from Ready to merge to Done Apr 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature Brand new functionality
Projects
HYDROLIB-core
  
Done
Development

Successfully merging a pull request may close this issue.

5 participants