def calc_grv(thickness, height, area, top='slab', g=False):
    """Calculate GRV for given prospect
    Args:
        thickness [float]: average thickness of reservoir
        height [float]: height of hydrocarbon column
        area [float]: area of hydrocarbon prospect
        top: structure shape, one of `{'slab', 'round', 'flat'}`
        g [float]: geometric correction factor
    Returns:
        grv following `thickness * area * geometric_correction_factor`
    """
    if g:
        g = g
    else:
        ratio = thickness / height

        if top == 'round':
            g = -0.6 * ratio + 1
        elif top == 'flat':
            g = -0.3 * ratio + 1
        else:
            g = 1
    return thickness * area * g, g