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

add function to overwrite several mdu keywords with coastal 2D/3D values #951

Closed
6 tasks done
veenstrajelmer opened this issue Aug 13, 2024 · 0 comments · Fixed by #1074
Closed
6 tasks done

add function to overwrite several mdu keywords with coastal 2D/3D values #951

veenstrajelmer opened this issue Aug 13, 2024 · 0 comments · Fixed by #1074

Comments

@veenstrajelmer
Copy link
Collaborator

veenstrajelmer commented Aug 13, 2024

Workflow was:

  • improve mdu keywords (email FZ/SR 27-6-2024)
  • resulted in jupyter notebook code
  • manually edited in mdu file later on

Todo:

  • discuss values for all settings to be changed from their defaults (two blocks and bullet list below)
  • add keywords from 2D block below to modelbuilder notebook
  • also temporarily use stretchtype=-1 for 3D models until there is a new hydrolib-core release containing mdu stretchtype should be -1 or 0 instead of 1 HYDROLIB-core#691 (and minimal version is updated in the dfm_tools pyproject.toml)
  • consider adding nchisdataprecision and ncmapdataprecision and others, but this will fail for old software versions >> no
  • consider adding computedAirdensity, but this will fail for old software versions >> no
  • create function to overwrite 3D-specific settings? >> added to notebook instead

The defaults that were changed independent of whether the model is 2D/3D:

mdu.geometry.openboundarytolerance = 0.1
mdu.geometry.bedlevuni = 5
mdu.geometry.dxwuimin2d = 0.1 # improved stability in triangular network cells

mdu.numerics.izbndpos = 1 # boundary points are on network boundary
# mdu.numerics.tlfsmo = 86400. # smoothing can improve stability
mdu.numerics.mintimestepbreak = 0.1 # causes instable model to crash
mdu.numerics.keepstbndonoutflow = 1 # s/t on outflow boundaries, should be new default
mdu.numerics.barocponbnd = 1 # enable baroclinic pressure gradient on open boundaries, should be new default

mdu.physics.rhomean = 1023. # for coastal models
# mdu.physics.tidalforcing = 1 # gravitational tide, for large models
# mdu.physics.itcap = 1 # IT capping, not generic

mdu.wind.icdtyp = 4 # Charnock in case of ERA5
mdu.wind.cdbreakpoints = [0.025] # important if icdtyp=4, but 0.018 or 0.041 might be better. Value is overwritten by spacevarying charnock from ERA5.
mdu.wind.pavbnd = 101330 # for inverse barometer correction, important in case of CMEMS boundary conditions
# mdu.wind.relativewind = 0.5 # use default
# mdu.wind.rhoair = 1.2265 # not generic

The 3D-specific settings are the following:

# z-sigma layer setup
mdu.geometry.kmx = 20
mdu.geometry.layertype = 2 # z-layers
mdu.geometry.numtopsig = 20
mdu.geometry.numtopsiguniform = 1
mdu.geometry.sigmagrowthfactor = 1.19
mdu.geometry.dztop = 5.0
mdu.geometry.floorlevtoplay = -5.0
mdu.geometry.dztopuniabovez = -100.0
mdu.geometry.keepzlayeringatbed = 2

>> instead
mdu.geometry.kmx = 10
mdu.geometry.layertype = 1 # sigma-layers, is default

mdu.numerics.vertadvtypsal = 4 # should be new default (default is 6)
mdu.numerics.vertadvtyptem = 4 # should be new default (default is 6)

# mdu.physics.vicoww = 0.0001 # generic? (default is 1e-6)
# mdu.physics.dicoww = 0.00001 # generic? (default is 1e-6)
# support for initial sal/tem fields via iniwithnudge, this requires 3D model
mdu.physics.iniwithnudge = 2
mdu.physics.salinity = 1
mdu.physics.temperature = 5
mdu.physics.initialsalinity = 30 # generic (default is 0)
# mdu.physics.backgroundsalinity = 30 # generic? (default is 30) >> comment
# mdu.physics.initialtemperature = 5.5 # generic? (default is 6) >> comment
# mdu.physics.backgroundwatertemperature = 20. # generic? (default is 20) >> comment
# mdu.physics.tempmin = -999 >> not generic, comment
# mdu.physics.tempmax = 50. >> not generic, comment
mdu.physics.heat_eachstep = 1
mdu.physics.rhoairrhowater = 1

Some 2D keywords were already updated in #1068.

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

Successfully merging a pull request may close this issue.

1 participant