Commit 1d3db1b9 authored by Maximilian Schanner's avatar Maximilian Schanner
Browse files

Add GGFSS70 model

parent db1cc619
......@@ -28,7 +28,7 @@ from scipy.interpolate import BSpline
from pymagglobal.utils import nez2dif, REARTH, i2lm_l, i2lm_m, lmax2N, lm2i, \
dsh_basis, grad_d, grad_i, grad_f, geodetic2geocentric, _rot_mat
from pymagglobal._commands import lt2yr
__all__ = ['built_in_models', 'Model', 'local_curve', 'coefficients',
'dipole_series', 'file2splines', 'field']
......@@ -106,6 +106,14 @@ class Model(object):
# read the appropriate number of coefficients
coeffs = input_array[n_spl+4+3:n_spl*(lmax2N(self.l_max)+1)+4+3]
self.coeffs = coeffs.reshape(n_spl, lmax2N(self.l_max))
# GGFSS70 data file contains the knots as ka BP
# convert this to have a consistent format over all models
if fname == built_in_models()['GGFSS70']:
self.knots = np.flip(lt2yr(self.knots))
t_min = self.t_min
self.t_min = lt2yr(self.t_max)
self.t_max = lt2yr(t_min)
self.coeffs = np.flip(self.coeffs, axis=0)
# initialize the BSpline object
self.splines = BSpline(self.knots,
self.coeffs,
......
This diff is collapsed.
This is a data file complementing pymagglobal.
It is licensed under CC-BY 4.0 (https://creativecommons.org/licenses/by/4.0/)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment