Skip to content

Commit

Permalink
570: Add MDU keywords: computedAirdensity, wrihis_airdensity, wrimap_…
Browse files Browse the repository at this point in the history
…windstress, wrimap_airdensity
  • Loading branch information
veenstrajelmer authored Nov 2, 2023
1 parent 98b3d48 commit 7613224
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
17 changes: 17 additions & 0 deletions hydrolib/core/dflowfm/mdu/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,9 @@ class Comments(INIBasedModel.Comments):
pavini: Optional[str] = Field(
"Initial air pressure [N/m2], only applied if value > 0.", alias="pavIni"
)
computedairdensity: Optional[str] = Field(
"Compute air density yes/no (), 1/0, default 0.", alias="computedAirdensity"
)

comments: Comments = Comments()

Expand All @@ -564,6 +567,7 @@ class Comments(INIBasedModel.Comments):
windpartialdry: bool = Field(True, alias="windPartialDry")
pavbnd: float = Field(0.0, alias="pavBnd")
pavini: float = Field(0.0, alias="pavIni")
computedairdensity: bool = Field(False, alias="computedAirdensity")

@classmethod
def list_delimiter(cls) -> str:
Expand Down Expand Up @@ -1016,6 +1020,9 @@ class Comments(INIBasedModel.Comments):
wrihis_wind: Optional[str] = Field(
"Write wind velocities to his file (1: yes, 0: no)'", alias="wrihis_wind"
)
wrihis_airdensity: Optional[str] = Field(
"Write air density to his file (1: yes, 0: no)", alias="wrihis_airdensity"
)
wrihis_rain: Optional[str] = Field(
"Write precipitation to his file (1: yes, 0: no)'", alias="wrihis_rain"
)
Expand Down Expand Up @@ -1155,6 +1162,13 @@ class Comments(INIBasedModel.Comments):
wrimap_wind: Optional[str] = Field(
"Write winds to map file, (1: yes, 0: no).", alias="wrimap_wind"
)
wrimap_windstress: Optional[str] = Field(
"Write wind stress to map file (1: yes, 0: no)", alias="wrimap_windstress"
)
wrimap_airdensity: Optional[str] = Field(
"Write air density rates to map file (1: yes, 0: no)",
alias="wrimap_airdensity",
)
writek_cdwind: Optional[str] = Field(
"Write wind friction coefficients to tek file (1: yes, 0: no).",
alias="writek_CdWind",
Expand Down Expand Up @@ -1314,6 +1328,7 @@ class Comments(INIBasedModel.Comments):
wrihis_structure_compound: bool = Field(True, alias="wrihis_structure_compound")
wrihis_turbulence: bool = Field(True, alias="wrihis_turbulence")
wrihis_wind: bool = Field(True, alias="wrihis_wind")
wrihis_airdensity: bool = Field(False, alias="wrihis_airdensity")
wrihis_rain: bool = Field(True, alias="wrihis_rain")
wrihis_infiltration: bool = Field(True, alias="wrihis_infiltration")
wrihis_temperature: bool = Field(True, alias="wrihis_temperature")
Expand Down Expand Up @@ -1367,6 +1382,8 @@ class Comments(INIBasedModel.Comments):
wrimap_turbulence: bool = Field(True, alias="wrimap_turbulence")
wrimap_rain: bool = Field(False, alias="wrimap_rain")
wrimap_wind: bool = Field(True, alias="wrimap_wind")
wrimap_windstress: bool = Field(False, alias="wrimap_windstress")
wrimap_airdensity: bool = Field(False, alias="wrimap_airdensity")
writek_cdwind: bool = Field(False, alias="writek_CdWind")
wrimap_heat_fluxes: bool = Field(False, alias="wrimap_heat_fluxes")
wrimap_wet_waterdepth_threshold: float = Field(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ Wrimap_turbulence = 1 # Write vicww, k
Wrimap_rain = 1 # Write rainfall rates to map file (1: yes, 0: no)
Wrimap_interception = 1 # Write interception to map file (1: yes, 0: no)
Wrimap_wind = 1 # Write wind velocities to map file (1: yes, 0: no)
Wrimap_windstress = 1 # Write wind stress to map file (1: yes, 0: no)
Wrimap_windstress = 0 # Write wind stress to map file (1: yes, 0: no)
Writek_CdWind = 0 # Write wind friction coeffs to tek file (1: yes, 0: no)
Wrimap_heat_fluxes = 1 # Write heat fluxes to map file (1: yes, 0: no)
Wrimap_DTcell = 1 # Write time step per cell based on CFL (1: yes, 0: no)
Expand Down
4 changes: 4 additions & 0 deletions tests/data/reference/fm/special_3d_settings.mdu
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ relativeWind = 0.5 # Wind speed relative to top-layer water speed,
windPartialDry = 1 # Reduce windstress on water if link partially dry, only for bedlevtyp=3, 0 = no, 1 = yes = default
pavBnd = 101330.0 # Average air pressure on open boundaries (N/m2) (only applied if > 0)
pavIni = 0.0 # Initial air pressure [N/m2], only applied if value > 0.
computedAirdensity = 0 # Compute air density yes/no (), 1/0, default 0.

[Time]
refDate = 19971222 # Reference date (yyyymmdd)
Expand Down Expand Up @@ -249,6 +250,7 @@ wrihis_structure_uniWeir = 0
wrihis_structure_compound = 0 # compound structure parameters
wrihis_turbulence = 1 # k, eps and vicww
wrihis_wind = 1 # wind velocities
wrihis_airdensity = 0 # Write air density to his file (1: yes, 0: no)
wrihis_rain = 1 # precipitation
wrihis_infiltration = 1 # Write infiltration to his file (1: yes, 0: no)'
wrihis_temperature = 1 # temperature
Expand Down Expand Up @@ -288,6 +290,8 @@ wrimap_chezy = 1
wrimap_turbulence = 1 # Write vicww, k and eps to map file (1: yes, 0: no)
wrimap_rain = 1 # Write rainfall rates to map file (1: yes, 0: no)
wrimap_wind = 1 # Write wind velocities to map file (1: yes, 0: no)
wrimap_windstress = 0 # Write wind stress to map file (1: yes, 0: no)
wrimap_airdensity = 0 # Write air density rates to map file (1: yes, 0: no)
writek_CdWind = 0 # Write wind friction coeffs to tek file (1: yes, 0: no)
wrimap_heat_fluxes = 1 # Write heat fluxes to map file (1: yes, 0: no)
wrimap_wet_waterDepth_threshold = 2e-05 # Waterdepth threshold above which a grid point counts as 'wet'. Defaults to 0.2·Epshu. It is used for Wrimap_time_water_on_ground, Wrimap_waterdepth_on_ground and Wrimap_volume_on_ground.
Expand Down

0 comments on commit 7613224

Please sign in to comment.