External forcings file¶
The external forcing .ext file contains the forcing data for a D-Flow FM model.
This includes open boundaries, lateral discharges and meteorological forcings.
The documentation below only concerns the 'old' format (ExtForceFile
in the MDU file).
Model¶
Enum class containing the valid values for the Spatial parameter category of the external forcings.
for more details check D-Flow FM User Manual 1D2D, Chapter D.3.1, Table D.2 https://content.oss.deltares.nl/delft3d/D-Flow_FM_User_Manual_1D2D.pdf
ExtOldForcing
¶
Bases: BaseModel
Class holding the external forcing values.
Source code in hydrolib/core/dflowfm/extold/models.py
160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 |
|
area = Field(None, alias='AREA')
class-attribute
instance-attribute
¶
Optional[float]: The area for sources and sinks.
averagingtype = Field(None, alias='AVERAGINGTYPE')
class-attribute
instance-attribute
¶
Optional[float]: The averaging type.
extrapolation_method = Field(None, alias='EXTRAPOLATION_METHOD')
class-attribute
instance-attribute
¶
Optional[ExtOldExtrapolationMethod]: The extrapolation method.
Options: 0. No spatial extrapolation. 1. Do spatial extrapolation outside of source data bounding box.
extrapoltol = Field(None, alias='EXTRAPOLTOL')
class-attribute
instance-attribute
¶
Optional[float]: The extrapolation tolerance.
factor = Field(None, alias='FACTOR')
class-attribute
instance-attribute
¶
Optional[float]: The conversion factor.
filename = Field(None, alias='FILENAME')
class-attribute
instance-attribute
¶
Union[PolyFile, TimModel, DiskOnlyFileModel]: The file associated to this forcing.
filetype = Field(alias='FILETYPE')
class-attribute
instance-attribute
¶
FileType: Indication of the file type.
Options: 1. Time series 2. Time series magnitude and direction 3. Spatially varying weather 4. ArcInfo 5. Spiderweb data (cyclones) 6. Curvilinear data 7. Samples (C.3) 8. Triangulation magnitude and direction 9. Polyline (<*.pli>-file, C.2) 11. NetCDF grid data (e.g. meteo fields) 14. NetCDF wave data
ifrctyp = Field(None, alias='IFRCTYP')
class-attribute
instance-attribute
¶
Optional[float]: The friction type.
maxsearchradius = Field(None, alias='MAXSEARCHRADIUS')
class-attribute
instance-attribute
¶
Optional[float]: Search radius (in m) for model grid points that lie outside of the source data bounding box.
method = Field(alias='METHOD')
class-attribute
instance-attribute
¶
ExtOldMethod: The method of interpolation.
Options: 1. Pass through (no interpolation) 2. Interpolate time and space 3. Interpolate time and space, save weights 4. Interpolate space 5. Interpolate time 6. Averaging space 7. Interpolate/Extrapolate time
nummin = Field(None, alias='NUMMIN')
class-attribute
instance-attribute
¶
Optional[int]: The minimum required number of source data points in each target cell.
operand = Field(alias='OPERAND')
class-attribute
instance-attribute
¶
Operand: The operand to use for adding the provided values.
Options: 'O' Existing values are overwritten with the provided values. 'A' Provided values are used where existing values are missing. '+' Existing values are summed with the provided values. '*' Existing values are multiplied with the provided values. 'X' The maximum values of the existing values and provided values are used. 'N' The minimum values of the existing values and provided values are used.
percentileminmax = Field(None, alias='PERCENTILEMINMAX')
class-attribute
instance-attribute
¶
Optional[float]: Changes the min/max operator to an average of the highest/lowest data points. The value sets the percentage of the total set that is to be included..
quantity = Field(alias='QUANTITY')
class-attribute
instance-attribute
¶
Union[Quantity, str]: The name of the quantity.
relativesearchcellsize = Field(None, alias='RELATIVESEARCHCELLSIZE')
class-attribute
instance-attribute
¶
Optional[float]: The relative search cell size for samples inside a cell.
sourcemask = Field(default_factory=lambda: DiskOnlyFileModel(None), alias='SOURCEMASK')
class-attribute
instance-attribute
¶
DiskOnlyFileModel: The file containing a mask.
value = Field(None, alias='VALUE')
class-attribute
instance-attribute
¶
Optional[float]: Custom coefficients for transformation.
varname = Field(None, alias='VARNAME')
class-attribute
instance-attribute
¶
Optional[str]: The variable name used in filename
associated with this forcing; some input files may contain multiple variables.
choose_file_model(values)
¶
Root-level validator to the right class for the filename parameter based on the filetype.
The validator chooses the right class for the filename parameter based on the FileType_FileModel_mapping dictionary.
FileType_FileModel_mapping = { 1: TimModel, 2: TimModel, 3: DiskOnlyFileModel, 4: DiskOnlyFileModel, 5: DiskOnlyFileModel, 6: DiskOnlyFileModel, 7: DiskOnlyFileModel, 8: DiskOnlyFileModel, 9: PolyFile, 10: PolyFile, 11: DiskOnlyFileModel, 12: DiskOnlyFileModel, }
Source code in hydrolib/core/dflowfm/extold/models.py
421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 |
|
handle_case_insensitive_tracer_fields(values)
¶
Handle case-insensitive matching for tracer fields.
Source code in hydrolib/core/dflowfm/extold/models.py
269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 |
|
ExtOldModel
¶
Bases: ParsableFileModel
The overall external forcings model that contains the contents of one external forcings file (old format).
This model is typically referenced under a FMModel.external_forcing.extforcefile
.
Source code in hydrolib/core/dflowfm/extold/models.py
461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 |
|
comment = Field(default=HEADER.splitlines()[1:])
class-attribute
instance-attribute
¶
List[str]: The comments in the header of the external forcing file.
forcing = Field(default_factory=list)
class-attribute
instance-attribute
¶
List[ExtOldForcing]: The external forcing/QUANTITY blocks in the external forcing file.
quantities
property
¶
List all the quantities in the external forcings file.