Commit 95896eb8 authored by Maximilian Schanner's avatar Maximilian Schanner
Browse files

Merge branch 'master' into 'geodetic'

# Conflicts:
#   pymagglobal/__init__.py
parents 1ae816fb a2153a5a
......@@ -29,14 +29,14 @@ used in the geomagnetism community to evaluate global field models. It can be
applied to all cubic-spline based geomagnetic field models stored in the same
file format as gufm1 or the CALSxk model series.
The package exposes several methods that can be applied to models or splines representing
a model. To acces the models, use the `Model` class or its attribute
`Model.splines`. With the `models` dictionary, several built-in models can be
accessed, see also the `list of included models
The package exposes several methods that can be applied to models or splines
representing a model. To acces the models, use the `Model` class or its
attribute `Model.splines`. With the `models` dictionary, several built-in
models can be accessed, see also the `list of included models
<overview.html#included-models>`__.
'''
# expose only utilities and core modules
# expose only utilities and core members
__all__ = ['local_curve', 'dipole_series', 'file2splines', 'field',
'built_in_models', 'coefficients', 'utils', 'secular_variation',
'power_spectrum', 'Model']
......
......@@ -27,6 +27,15 @@ from matplotlib import pyplot as plt
from pymagglobal import core
from pymagglobal import utils
from urllib.error import URLError
from warnings import warn
class TimeOutWarning(Warning):
'''Just to give the warning a meaningful name.
'''
pass
def args2times(args):
'''Read the range of the model and create a linear array to evaluate it.
......@@ -576,7 +585,12 @@ def maps(args, fig=None):
cmap=cmaps[it],
levels=levels[it],
extend=extends[it])
try:
axs[it].coastlines(alpha=0.8, lw=0.5)
except URLError:
warn('Server connection timed out. Coastlines could not be '
'loaded.',
category=TimeOutWarning)
axs[it].set_global()
axs[it].set_title(f'{utils._names[args.type][it]} [{units[it]}]')
colaxs[it].tick_params(labelsize=12)
......
Supports Markdown
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