Search
Example EBAS artic SO4 concentrations
import pyaerocom as pya
pya.const.BASEDIR = '/home/notebook/shared-ns1000k/inputs/pyaerocom-testdata/'
Initiating directories for pyaerocom test dataset
obsdata = pya.io.ReadUngridded().read('EBASMC', 'concso4', lat_range=[66, 90])
Received additional reading constraints, ignoring caching
Retrieving EBAS files for variables
['concso4']
Reading files 1-30 of 291 (ReadEbas) | 18:06:03 (delta = 0 s')
Reading files 30-59 of 291 (ReadEbas) | 18:06:03 (delta = 0 s')
Reading files 59-88 of 291 (ReadEbas) | 18:06:04 (delta = 0 s')
Reading files 88-117 of 291 (ReadEbas) | 18:06:04 (delta = 0 s')
Reading files 117-146 of 291 (ReadEbas) | 18:06:04 (delta = 0 s')
Reading files 146-175 of 291 (ReadEbas) | 18:06:04 (delta = 0 s')
Reading files 175-204 of 291 (ReadEbas) | 18:06:05 (delta = 0 s')
Reading files 204-233 of 291 (ReadEbas) | 18:06:05 (delta = 0 s')
Reading files 233-262 of 291 (ReadEbas) | 18:06:05 (delta = 0 s')
Reading files 262-291 of 291 (ReadEbas) | 18:06:05 (delta = 0 s')
Reading files 291-320 of 291 (ReadEbas) | 18:06:06 (delta = 0 s')
obsdata.plot_station_coordinates(var_name='concso4', start=2010, markersize=50);
obsdata.unique_station_names
['Alert',
 'Ambler',
 'Andøya',
 'Bjørnøya',
 'Esrange',
 'Janiskoski',
 'Jergul',
 'Karasjok',
 'Ny-Ålesund - Gruvebadet',
 'Ny-Ålesund - Nordpolhotellet',
 'Ny-Ålesund - Transformatorbua',
 'Oulanka',
 'Pallas (Matorova)',
 'Svanvik',
 'Villum Research Station, Station Nord',
 'Zeppelin mountain (Ny-Ålesund)',
 'Øverbygd']
station = obsdata.to_station_data('Zeppelin mountain (Ny-Ålesund)')
ax = station.plot_timeseries('concso4')
ax = station.plot_timeseries('concso4', freq='monthly', lw=4, ax=ax)
/opt/conda/lib/python3.7/site-packages/pandas/plotting/_matplotlib/converter.py:103: FutureWarning: Using an implicitly registered datetime converter for a matplotlib plotting method. The converter was registered by pandas on import. Future versions of pandas will require you to explicitly register matplotlib converters.

To register the converters:
	>>> from pandas.plotting import register_matplotlib_converters
	>>> register_matplotlib_converters()
  warnings.warn(msg, FutureWarning)
/home/065403d4-2d5a02-2d46ec-2da0dd-2db878e4b7c040/.local/lib/python3.7/site-packages/pyaerocom-0.8.1.dev4-py3.7.egg/pyaerocom/helpers.py:493: SettingWithCopyWarning: 
A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
  df[how][invalid] = np.nan