Parse soil profile block.

def _parse_soil_profile(block, units, curves, **kwargs):
    """Parse soil profile block."""
    wt_layer, length, _, name = parse_fixed_width(
        3 * [(5, int)] + [(55, to_str)], block)

    layers = []
    soil_types = []
    for i in range(length):
        index, soil_idx, thickness, shear_mod, damping, unit_wt, shear_vel = \
            parse_fixed_width(
                [(5, int), (5, int), (15, to_float)] + 4 * [(10, to_float)],
                block
            )

        st = site.SoilType(
            soil_idx,
            unit_wt,
            curves[(soil_idx, 'mod_reduc')],
            curves[(soil_idx, 'damping')], )
        try:
            # Try to find previously added soil type
            st = soil_types[soil_types.index(st)]
        except ValueError:
            soil_types.append(st)

        layers.append(site.Layer(st, thickness, shear_vel))

    if units == 'english':
        # Convert from English to metric
        for st in soil_types:
            st.unit_wt *= 0.00015708746

        for l in layers:
            l.thickness *= 0.3048
            l.shear_vel *= 0.3048

    p = site.Profile(layers)
    p.update_layers()
    p.wt_depth = p[wt_layer - 1].depth

    return p