In [1]:
%matplotlib inline
import numpy as np
import matplotlib.pyplot as plt
import pyshtools
import pyshtools.constant as shconstant
In [2]:
lmaxin = 2190
file = 'EGM2008_to2190_ZeroTide.shm'
coeffs,errors,lmax = pyshtools.shio.SHReadError(file, lmaxin)
coeffs[0,0,0] = 1.0
In [3]:
geoid = pyshtools.gravmag.MakeGeoidGridDH(coeffs,
r0pot = shconstant.r0_pot_earth,
GM = shconstant.wgs84_gm,
PotRef = shconstant.wgs84_u0,
omega=shconstant.wgs84_omega,
a = shconstant.wgs84_a,
f = shconstant.wgs84_f,
order=1,
lmax_calc = 720)
In [4]:
g = pyshtools.SHGrid.from_array(geoid)
In [5]:
g.plot()
Out[5]:
In [6]:
rad, theta, phi, total, pot = pyshtools.gravmag.MakeGravGridDH (coeffs,
gm = shconstant.wgs84_gm,
r0=shconstant.r0_pot_earth,
a=shconstant.wgs84_a,
f=shconstant.wgs84_f,
sampling=2,
normal_gravity=1,
omega=shconstant.wgs84_omega,
lmax_calc=720)
In [7]:
p = pyshtools.SHGrid.from_array(pot)
In [8]:
p.plot()
Out[8]:
In [9]:
pyshtools.SHGrid.from_array(rad).plot()
Out[9]:
In [10]:
pyshtools.SHGrid.from_array(theta).plot()
Out[10]:
In [11]:
pyshtools.SHGrid.from_array(phi).plot()
Out[11]:
In [12]:
pyshtools.SHGrid.from_array(total).plot()
Out[12]:
In [ ]: