chaosmagpy.data_utils.load_shcfile(filepath, leap_year=None, comment=None)[source]

Load shc-file and return coefficient arrays.


File path to spherical harmonic coefficient shc-file.

leap_year{True, False}, optional

Take leap year in time conversion into account (default). Otherwise, use conversion factor of 365.25 days per year.

commentstr, optional

Character at the start of a line to indicate a comment (defaults to #). This can also be a tuple of characters.

timendarray, shape (N,)

Array containing N times for each model snapshot in modified Julian dates with origin January 1, 2000 0:00 UTC.

coeffsndarray, shape (nmax(nmax+2), N)

Coefficients of model snapshots. Each column is a snapshot up to spherical degree and order nmax.

parametersdict, {‘SHC’, ‘nmin’, ‘nmax’, ‘N’, ‘order’, ‘step’}

Dictionary containing parameters of the model snapshots and the following keys: 'SHC' shc-file name, 'nmin' minimum degree, 'nmax' maximum degree, 'N' number of snapshot models, 'order' piecewise polynomial order and 'step' number of snapshots until next break point. Extract break points of the piecewise polynomial with breaks = time[::step].