def harmonize_ocean(ocean, elevation, ocean_level):

    shallow_sea = ocean_level * 0.85
    midpoint = shallow_sea / 2.0

    ocean_points = numpy.logical_and(elevation < shallow_sea, ocean)

    shallow_ocean = numpy.logical_and(elevation < midpoint, ocean_points)
    elevation[shallow_ocean] = midpoint - ((midpoint - elevation[shallow_ocean]) / 5.0)

    deep_ocean = numpy.logical_and(elevation > midpoint, ocean_points)
    elevation[deep_ocean] = midpoint + ((elevation[deep_ocean] - midpoint) / 5.0)

# ----
# Misc
# ----
Build a block of testing data from a seeded RandomState.
dataset/ETHPy150Open Mindwerks/worldengine/worldengine/generation.py/harmonize_ocean--crossover with--dataset/ETHPy150Open quantopian/zipline/tests/pipeline/base.py/BasePipelineTestCase.randn_data