From 784ed8a03b9ffad7adbf259e612bbd2ab3718a1f Mon Sep 17 00:00:00 2001 From: craigmillernz Date: Wed, 15 Apr 2020 16:09:29 +1200 Subject: [PATCH 1/2] Update gravity_corrections.py --- harmonica/gravity_corrections.py | 139 ++++++++++++++++++++++++++++++- 1 file changed, 137 insertions(+), 2 deletions(-) diff --git a/harmonica/gravity_corrections.py b/harmonica/gravity_corrections.py index 46cb3faff..2f3b5d3cc 100644 --- a/harmonica/gravity_corrections.py +++ b/harmonica/gravity_corrections.py @@ -1,5 +1,10 @@ """ -Gravity corrections like Normal Gravity and Bouguer corrections. +Gravity corrections like Bouguer corrections, free air, spherical cap and +atmospheric. + +Refer to Hinze(2005) for formula. +http://library.seg.org/doi/10.1190/1.1988183 + """ import numpy as np @@ -7,7 +12,7 @@ def bouguer_correction(topography, density_crust=2670, density_water=1040): - r""" + """ Gravitational effect of topography using a Bouguer plate approximation Used to remove the gravitational attraction of topography above the @@ -69,3 +74,133 @@ def bouguer_correction(topography, density_crust=2670, density_water=1040): density[oceans] = -1 * (density_water - density_crust) bouguer = 1e5 * 2 * np.pi * GRAVITATIONAL_CONST * density * topography return bouguer + +def atmospheric_correction(topography): + """ + Calculates atmospheric correction as per Hinze 2005 eqn 5. + + .. math:: + + g_{atm} = 0.874 - 9.9E-5 h + 3.56E-9 h^2 + + in which :math:`h` is the elevation of the station above the ellipsoid + and :math:`g_{atm}` is the gravitational effect of the atmospheric the air + mass in mGal. + + Parameters + ---------- + topography : array or :class:`xarray.DataArray` + Topography height and bathymetry depth in meters. + Should be referenced to the ellipsoid (ie, geometric heights). + + + Returns + ------- + atmos_correction : array or :class:`xarray.DataArray` + The gravitational effect of the atmosphere in mGal + + """ + atmos_correction = 0.874 - 9.9e-05 * topography + 3.56e-09 * topography**2 + + return atmos_correction + + +def spherical_bouguer_cap_correction(topography): + """ + Calculates spherical cap correction for the Bouguer slab as per Hinze 2013. + + Gravity and Magnetic Exploration, Cambridge Press 2013 + + .. math:: + + g_{spher} = 0.001464139 h - 3.533047e-07 h^{2} + 1.002709e-13 h^{3} + + 3.002407E-18 h^{4} + + in which :math:`h` is the elevation of the station above the ellipsoid + and :math:`g_{spher}` is the gravitational effect of the spherical cap to + 166.7 km in mGal. + + Parameters + ---------- + topography : array or :class:`xarray.DataArray` + Topography height and bathymetry depth in meters. + Should be referenced to the ellipsoid (ie, geometric heights). + + + Returns + ------- + spher_cap_corr : array or :class:`xarray.DataArray` + The gravitational effect of the spherical cap in mGal + + """ + spher_cap_corr = 0.001464139 * topography - 3.533047e-07 * topography**2 + + 1.002709e-13 * topography**3 + 3.002407E-18 * topography**4 + + return spher_cap_corr + + +def free_air_correction(topography, latitude): + """ + Calculates free air correction as per Hinze 2005 eqn 5, including 2nd order + terms. + + Note if the normal gravity is calculated using the station elevation, not + on the ellipsoid (0 m), then the free air correction is not required. + + .. math:: + + g_{fac} = -(0.3087691 - 0.0004398 sin^{2}\phi)h + 7.2125E-08 h^{2} + + in which :math:`h` is the elevation of the station above the ellipsoid, + :math: `\phi` is the station latitude and :math:`g_{fac}` is the + gravitational effect of the "free air" in mGal. + + Parameters + ---------- + topography : array or :class:`xarray.DataArray` + Topography height and bathymetry depth in meters. + Should be referenced to the ellipsoid (ie, geometric heights). + + latitude : array or :class:`xarray.DataArray` + + Returns + ------- + free_air_corr : array or :class:`xarray.DataArray` + The gravitational effect of the elevation of the station above the ellipsoid + in the absence of topographic mass + + """ + + free_air_corr = -(0.3087691 - 0.0004398*(np.sin(np.radians(latitude)))**2) + * topography + 7.2125e-08 * topography**2 + + return free_air_corr + +def eotvos_correction(latitude, velocity, azimuth): + """ + Calculates the eotvos correction for a moving gravity meter. + + Parameters + ---------- + latitude : array or :class:`xarray.DataArray` + + velocity : array or :class:`xarray.DataArray` + DESCRIPTION. in knots + + azimuth : array or :class:`xarray.DataArray` + direction of movement of fhe vehicle measured clockwise from true north + + Returns + ------- + eotvos correction in mGal + as per Blakely 1995 page 142/143 + + """ + eotvos_corr = 7.503 * velocity * np.sin(np.radians(azimuth)) * + np.cos(np.radians(latitude)) + 0.004154 * velocity**2 + + return eotvos_corr + + + + \ No newline at end of file From 5341d63debc0478908851d5ca07366468ce4c5b1 Mon Sep 17 00:00:00 2001 From: craigmillernz Date: Thu, 16 Apr 2020 16:41:41 +1200 Subject: [PATCH 2/2] Update gravity_corrections.py deleted free air and eotvos for now --- harmonica/gravity_corrections.py | 61 -------------------------------- 1 file changed, 61 deletions(-) diff --git a/harmonica/gravity_corrections.py b/harmonica/gravity_corrections.py index 2f3b5d3cc..09bc00e31 100644 --- a/harmonica/gravity_corrections.py +++ b/harmonica/gravity_corrections.py @@ -139,68 +139,7 @@ def spherical_bouguer_cap_correction(topography): return spher_cap_corr -def free_air_correction(topography, latitude): - """ - Calculates free air correction as per Hinze 2005 eqn 5, including 2nd order - terms. - - Note if the normal gravity is calculated using the station elevation, not - on the ellipsoid (0 m), then the free air correction is not required. - - .. math:: - - g_{fac} = -(0.3087691 - 0.0004398 sin^{2}\phi)h + 7.2125E-08 h^{2} - - in which :math:`h` is the elevation of the station above the ellipsoid, - :math: `\phi` is the station latitude and :math:`g_{fac}` is the - gravitational effect of the "free air" in mGal. - - Parameters - ---------- - topography : array or :class:`xarray.DataArray` - Topography height and bathymetry depth in meters. - Should be referenced to the ellipsoid (ie, geometric heights). - - latitude : array or :class:`xarray.DataArray` - - Returns - ------- - free_air_corr : array or :class:`xarray.DataArray` - The gravitational effect of the elevation of the station above the ellipsoid - in the absence of topographic mass - """ - - free_air_corr = -(0.3087691 - 0.0004398*(np.sin(np.radians(latitude)))**2) - * topography + 7.2125e-08 * topography**2 - - return free_air_corr - -def eotvos_correction(latitude, velocity, azimuth): - """ - Calculates the eotvos correction for a moving gravity meter. - - Parameters - ---------- - latitude : array or :class:`xarray.DataArray` - - velocity : array or :class:`xarray.DataArray` - DESCRIPTION. in knots - - azimuth : array or :class:`xarray.DataArray` - direction of movement of fhe vehicle measured clockwise from true north - - Returns - ------- - eotvos correction in mGal - as per Blakely 1995 page 142/143 - - """ - eotvos_corr = 7.503 * velocity * np.sin(np.radians(azimuth)) * - np.cos(np.radians(latitude)) + 0.004154 * velocity**2 - - return eotvos_corr - \ No newline at end of file