chaosmagpy.chaos.load_CALS7K_txtfile¶
- chaosmagpy.chaos.load_CALS7K_txtfile(filepath, name=None)[source]¶
Load the model parameter file of the CALS7K model.
- Parameters:
- filepathstr
Path to TXT-file (available from the modellers).
- namestr, optional
User defined name of the model. Defaults to the filename.
- Returns:
References
More information about the model and a list of relevant publications can be found at https://igppweb.ucsd.edu/~cathy/Projects/Holocene/CALS7K/. The model coefficients file can be downloaded from https://earthref.org/ERDA/413/.
Examples
import chaosmagpy as cp import matplotlib.pyplot as plt import numpy as np model = cp.load_CALS7K_txtfile('CALS7K.2') # load model TXT-file fig, ax = plt.subplots(1, 1, figsize=(10, 6)) time = np.linspace(-5000., 1950., 1000) # decimal years mjd = cp.data_utils.dyear_to_mjd(time, leap_year=False) coeffs = model.synth_coeffs(mjd, nmax=1) ax.plot(time, coeffs) ax.set_title(model.name) ax.set_xlabel('years') ax.set_ylabel('nT') ax.legend(['$g_1^0$', '$g_1^1$', '$h_1^1$']) plt.tight_layout() plt.show()