Skip to content

Commit

Permalink
Merge pull request #321 from metno/release_0_10_1
Browse files Browse the repository at this point in the history
Release branch for version 0.10.1
  • Loading branch information
jgliss authored Feb 24, 2021
2 parents c6ac3a0 + 064936d commit aaa38d6
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 40 deletions.
2 changes: 1 addition & 1 deletion VERSION.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.10.0
0.10.1
17 changes: 7 additions & 10 deletions docs/install.rst
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
Installation
============

You have several options to install pyaerocom, the first one is the easiest, but may not refer to the most recent (non-released) version of pyaerocom. So please check first, which version you are interested in.
You can install pyaerocom via conda, pip or from source.

Via conda
^^^^^^^^^

**NOTE:** This will install the latest release of pyaerocom.

- It hence, may not include the most recent developments.
- Requirements are installed automatically.

If you use *conda* as a package manager, the easiest way to install pyaerocom (and all requirements, see previous section) is to use the build provided in the *nordicesmhub* conda channel::
The easiest way to install pyaerocom and all requirements using conda. You can install pyaerocom into a pre-existing conda environment via::

conda install -c conda-forge pyaerocom

This will install the latest release of pyaerocom including all requirements. Alternatively, you may install from source as described in the following.
Or into a new conda environment (recommended) named *pya* via::

conda create -c conda-forge --name pya pyaerocom

**NOTE**: installation support via conda as described above is quite recent, so please let us know if you run into problems with the installation (best way to do this is by raising an issue `here <https://github.com/metno/pyaerocom/issues>`__).
This will install the latest release of pyaerocom including all requirements. Alternatively, you may install via pip or from source as described in the following.

Via PyPi
^^^^^^^^
Expand All @@ -42,7 +39,7 @@ Alternatively, if you plan to apply local changes to the pyaerocom source code,

python setup.py develop

You may also download and extract (or clone) the `GitHub repo <https://github.com/metno/pyaerocom>`__ to install the very latest (not yet released) version of pyaerocom.
You may also download and extract (or clone) the `GitHub repo <https://github.com/metno/pyaerocom>`__ to install the very latest (not yet released) version of pyaerocom. Note, if you install in develop mode, make sure you do not have pyaerocom installed already in the site packages directory, check e.g. `conda list pyaerocom`.


Requirements
Expand Down
20 changes: 17 additions & 3 deletions pyaerocom/colocation.py
Original file line number Diff line number Diff line change
Expand Up @@ -821,9 +821,23 @@ def colocate_gridded_ungridded(gridded_data, ungridded_data, ts_type=None,
min_num_obs=min_num_obs,
use_climatology_ref=use_climatology_ref)

# assign the unified timeseries data to the colocated data array
coldata[0, :, i] = _df['ref'].values
coldata[1, :, i] = _df['data'].values

# this try/except block was introduced on 23/2/2021 as temporary fix from
# v0.10.0 -> v0.10.1 as a result of multi-weekly obsdata (EBAS) that
# can end up resulting in incorrect number of timestamps after resampling
# (the error was discovered using EBASMC, concpm10, 2019 and colocation
# frequency monthly)
try:
# assign the unified timeseries data to the colocated data array
coldata[0, :, i] = _df['ref'].values
coldata[1, :, i] = _df['data'].values
except ValueError as e:
const.print_log.warning(
f'Failed to colocate time for station {obs_stat.station_name}. '
f'This station will be skipped (error: {e})'
)



lons.append(obs_stat.longitude)
lats.append(obs_stat.latitude)
Expand Down
3 changes: 2 additions & 1 deletion pyaerocom/colocation_auto.py
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,8 @@ def _eval_obs_filters(self):
'Colocator class, which is not a '
'dictionary: {}'.format(obs_filters))
for key, val in obs_filters.items():
if key in self: # can be handled
# keep ts_type filter in remaining (added on 17.2.21, 0.100 -> 0.10.1)
if key in self and not key == 'ts_type': # can be handled
if isinstance(self[key], dict) and isinstance(val, dict):
self[key].update(val)
else:
Expand Down
14 changes: 0 additions & 14 deletions pyaerocom/io/iris_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,20 +100,6 @@ def load_cubes_custom(files, var_name=None, file_convention=None,
- list, list of filenames that were successfully loaded
"""
from pyaerocom import const
# =============================================================================
# if len(files) >= 1000:
# try:
# cubes = _load_cubes_custom_multiproc(files, var_name,
# file_convention,
# perform_fmt_checks,
# **kwargs)
# # if this worked, all input files were successfully loaded and the
# # function terminates, else, the retrieval is done file by file.
# # ... Maybe!
# return (cubes, files)
# except Exception:
# pass
# =============================================================================
cubes = []
loaded_files = []
print_where = False
Expand Down
1 change: 1 addition & 0 deletions pyaerocom/test/test_geodesy.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ def test_is_within_radius_km():
assert geodesy.is_within_radius_km(0, 15, 0, 16, 1000, 111.2)

@geonum_unavail
@pytest.mark.skip(reason='https://github.com/tkrajina/srtm.py/issues/51')
def test_srtm_altitude():
npt.assert_almost_equal(geodesy.get_topo_altitude(TEST_LAT, TEST_LON), 207)

Expand Down
3 changes: 0 additions & 3 deletions pyaerocom/time_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@

# The following import was removed and the information about available unit
# strings was copied from the netCDF4 module directly here
# from netCDF4 import (microsec_units, millisec_units, sec_units, min_units,
# hr_units, day_units)
# from netCDF4._netCDF4 import _dateparse
microsec_units = ['microseconds', 'microsecond', 'microsec', 'microsecs']
millisec_units = ['milliseconds', 'millisecond', 'millisec', 'millisecs']
sec_units = ['second', 'seconds', 'sec', 'secs', 's']
Expand Down
13 changes: 5 additions & 8 deletions pyaerocom_env.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
# This only installs the requirment of pyaerocom, not pyaerocom itself.
# Activate the envoirnment and run python setup.py.

# This only installs the requirments of pyaerocom, not pyaerocom itself.
# Activate the environment and run "python setup.py install".
channels:
- conda-forge
dependencies:
- iris >= 2.1.0
- xarray >= 0.10.8
- iris >= 2.1.0, <3.0.0
- xarray >= 0.16.0
- cartopy >= 0.16.0
- matplotlib >= 3.0.1
- scipy >= 1.1.0
- pandas >= 0.23.0
- pandas >= 0.23.0, <=1.2.2
- seaborn >= 0.8.0
- netcdf4
- geonum
- numpy
- simplejson
- requests
- reverse-geocode
- tqdm

0 comments on commit aaa38d6

Please sign in to comment.