extract_submodel#

URL: /processes/extract_submodel/execution

Method: POST

Description:

ripple1d.ops.subset_gpkg.extract_submodel(source_model_directory, submodel_directory, nwm_id, model_name, min_flow_multiplier_ras=1, max_flow_multiplier_ras=1, ignore_ras_flows=False, ignore_nwm_flows=False)

Use ripple conflation data to create a new GPKG from an existing ras geopackage.

Create a new geopackage with information for a specific NWM reach. The new geopackage contains layer for the river centerline, cross-sections, and structures.

Parameters:
  • source_model_directory (str) – The path to the directory containing HEC-RAS project, plan, geometry, and flow files.

  • submodel_directory (str) – The path to export submodel HEC-RAS files to.

  • nwm_id (int) – The id of the NWM reach to create a submodel for

  • model_name (str) – The name of the HEC-RAS model.

  • min_flow_multiplier_ras (float) – Number that will be multiplied by the RAS min modeled flow. Default is 1

  • max_flow_multiplier_ras (float) – Number that will be multiplied by the RAS max modeled flow. Default is 1

  • ignore_ras_flows (bool) – Whether to ignore HEC-RAS min and max flow when defining flow ranges. Default is False

  • ignore_nwm_flows (bool) – Whether to ignore NWM min and max flow when defining flow ranges. Default is False

Returns:

Metadata for the submodel

Return type:

dict

Raises:
  • FileNotFoundError – Raised when no geopackage is found in the source model directory

  • FileNotFoundError – Raised when no .conflation.json is found in the source model directory