def vdm_b(vdm, lat):
    """
    Converts a virtual dipole moment (VDM) or a virtual axial dipole moment
    (VADM; input in units of Am^2) to a local magnetic field value (output in
    units of tesla)

    Parameters
    ----------
    vdm : V(A)DM in units of Am^2
    lat: latitude of site in degrees

    Returns
    -------
    B: local magnetic field strength in tesla
    """
    rad = old_div(np.pi, 180.)
    # changed radius of the earth from 3.367e6 3/12/2010
    fact = ((6.371e6)**3) * 1e7
    colat = (90. - lat) * rad
    return vdm * (np.sqrt(1 + 3 * (np.cos(colat)**2))) / fact