bluemath_tk.wrappers.delft3d package
Submodules
bluemath_tk.wrappers.delft3d.delft3d_example module
- class bluemath_tk.wrappers.delft3d.delft3d_example.Delft3DfmModelWrapper(*args, **kwargs)[source]
Bases:
Delft3dModelWrapperWrapper for the Delft3D model with flow mode.
bluemath_tk.wrappers.delft3d.delft3d_wrapper module
- class bluemath_tk.wrappers.delft3d.delft3d_wrapper.Delft3dModelWrapper(*args, **kwargs)[source]
Bases:
BaseModelWrapperWrapper for the Delft3d model.
- default_parameters
The default parameters type for the wrapper.
- Type:
dict
- available_launchers
The available launchers for the wrapper.
- Type:
dict
- available_launchers = {'docker_serial': 'docker run --rm -v .:/case_dir -w /case_dir geoocean/rocky8 dimr dimr_config.xml', 'geoocean-cluster': 'launchDelft3d.sh'}
- default_parameters = {}
- monitor_cases(dia_file_name: str, value_counts: str = None) DataFrame | dict[source]
Monitor the cases based on the status of the .dia files.
- Parameters:
dia_file_name (str) – The name of the .dia file to monitor.
- run_case(case_dir: str, launcher: str, output_log_file: str = 'wrapper_out.log', error_log_file: str = 'wrapper_error.log', postprocess: bool = False) None[source]
Run the case based on the launcher specified.
- Parameters:
case_dir (str) – The case directory.
launcher (str) – The launcher to run the case.
output_log_file (str, optional) – The name of the output log file. Default is “wrapper_out.log”.
error_log_file (str, optional) – The name of the error log file. Default is “wrapper_error.log”.
- class bluemath_tk.wrappers.delft3d.delft3d_wrapper.GreenSurgeModelWrapper(*args, **kwargs)[source]
Bases:
Delft3dModelWrapperWrapper for the Delft3d model for Greensurge.
- build_case(case_context: dict, case_dir: str) None[source]
Build the input files for a case.
- Parameters:
case_context (dict) – The case context.
case_dir (str) – The case directory.
- generate_grid_forcing_file_D3DFM(case_context: dict, case_dir: str, ds_GFD_info: Dataset)[source]
Generate the wind files for a case.
- Parameters:
case_context (dict) – The case context.
case_dir (str) – The case directory.
ds_GFD_info (xr.Dataset) – The dataset with the GFD information.
- generate_grid_forcing_file_netCDF_D3DFM(case_context: dict, case_dir: str, ds_GFD_info: Dataset)[source]
Generate the wind files for a case.
- Parameters:
case_context (dict) – The case context.
case_dir (str) – The case directory.
ds_GFD_info (xr.Dataset) – The dataset with the GFD information.
- bluemath_tk.wrappers.delft3d.delft3d_wrapper.actualize_grid_info(path_ds_origin: str, ds_GFD_calc_info: Dataset) None[source]
Actualizes the grid information in the GFD calculation info dataset by adding the node coordinates and triangle connectivity from the original dataset. :param path_ds_origin: Path to the original dataset containing the mesh2d node coordinates. :type path_ds_origin: str :param ds_GFD_calc_info: The dataset containing the GFD calculation information to be updated. :type ds_GFD_calc_info: xr.Dataset
- Returns:
ds_GFD_calc_info – The updated dataset with the node coordinates and triangle connectivity.
- Return type:
xr.Dataset