swn.modflow.SwnModflow.default_segment_data#

SwnModflow.default_segment_data(hyd_cond1=1.0, hyd_cond_out=None, thickness1=1.0, thickness_out=None, width1=None, width_out=None, roughch=0.024)#

High-level function to set default segment_data for MODFLOW SFR.

Parameters:
hyd_cond1float or pandas.Series, optional

Hydraulic conductivity of the streambed, as a global or per top of each segment. Used for either STRHC1 or HCOND1/HCOND2 outputs. Default 1.

hyd_cond_outNone, float or pandas.Series, optional

Similar to thickness1, but for the hydraulic conductivity of each segment outlet. If None (default), the same hyd_cond1 value for the top of the outlet segment is used for the bottom.

thickness1float or pandas.Series, optional

Thickness of the streambed, as a global or per top of each segment. Used for either STRTHICK or THICKM1/THICKM2 outputs. Default 1.

thickness_outNone, float or pandas.Series, optional

Similar to thickness1, but for the bottom of each segment outlet. If None (default), the same thickness1 value for the top of the outlet segment is used for the bottom.

width1float or pandas.Series, optional

Channel width, as a global or per top of each segment. Used for WIDTH1/WIDTH2 outputs. Default None will first try finding “width” from “segments”, otherwise will use 10.

width_outNone, float or pandas.Series, optional

Similar to width1, but for the bottom of each segment outlet. If None (default), use a constant width1 value for segment.

roughchfloat or pandas.Series, optional

Manning’s roughness coefficient for the channel. If float, then this is a global value, otherwise it is per-segment with a Series. Default 0.024.

Returns:
None

See also

new_segment_data

Create an empty segment data frame.

Examples

>>> import flopy
>>> import geopandas
>>> import swn
>>> lines = geopandas.GeoSeries.from_wkt([
...    "LINESTRING Z (60 100 14, 60  80 12)",
...    "LINESTRING Z (40 130 15, 60 100 14)",
...    "LINESTRING Z (70 130 15, 60 100 14)"])
>>> lines.index += 100
>>> n = swn.SurfaceWaterNetwork.from_lines(lines)
>>> m = flopy.modflow.Modflow(version="mf2005")
>>> _ = flopy.modflow.ModflowDis(
...     m, nrow=3, ncol=2, delr=20.0, delc=20.0, xul=30.0, yul=130.0,
...     top=15.0, botm=10.0)
>>> _ = flopy.modflow.ModflowBas(m)
>>> nm = swn.modflow.SwnModflow.from_swn_flopy(n, m)
>>> nm.default_segment_data()
>>> print(nm)
<SwnModflow: flopy mf2005 'modflowtest'
  7 in reaches (reachID): [1, 2, ..., 6, 7]
  3 in segment_data (nseg): [1, 2, 3]
    3 from segments: [101, 102, 100]
  1 stress period with perlen: [1.0] />
>>> print(nm.segment_data[["segnum", "icalc", "elevup", "elevdn"]])
      segnum  icalc     elevup     elevdn
nseg
1        101      1  14.750000  14.166667
2        102      1  14.666667  14.166667
3        100      1  13.500000  12.500000
>>> nm.default_segment_data(width1=2, width_out=4)
>>> print(nm.segment_data[["segnum", "icalc", "width1", "width2"]])
      segnum  icalc  width1  width2
nseg
1        101      1     2.0     2.0
2        102      1     2.0     2.0
3        100      1     2.0     4.0