From 43029621410b504fa7d5b1bfbd0d6ad34508cd4a Mon Sep 17 00:00:00 2001 From: Brendan Murphy Date: Fri, 17 May 2024 11:03:05 -0400 Subject: [PATCH 1/2] Removed function that used matplotlib julian2num The function `julian2num` was deprecated by matplotlib. I just removed the code in inversions that depends on it. This code is available in `acrg/acrg/time/convert.py` --- openghg_inversions/convert.py | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/openghg_inversions/convert.py b/openghg_inversions/convert.py index 0f5954bf..95de1e6a 100644 --- a/openghg_inversions/convert.py +++ b/openghg_inversions/convert.py @@ -36,7 +36,6 @@ import dateutil import time as tm import datetime as dt -from matplotlib.dates import julian2num, num2date # from openghg_inversions.utils import synonyms @@ -324,19 +323,6 @@ def decimal2time(frac): return return_iter(dates, notIter) -def julian2time(dates): - """ - Convert Julian dates (e.g. from IDL) to datetime - """ - dates, notIter = check_iter(dates) - - dates_julian = [] - for date in dates: - dates_julian.append(num2date(julian2num(date))) - - return return_iter(dates_julian, notIter) - - def convert_to_hours(time): """ Convert to hours From efbbd03c4dcc7d56bd7f2d377cbd6a40141d6839 Mon Sep 17 00:00:00 2001 From: Brendan Murphy Date: Fri, 17 May 2024 11:22:37 -0400 Subject: [PATCH 2/2] Updated changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f3aec617..d3cea5c7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ # Version 0.2.0 +- removed `julian2time` function from `convert.py` because it used code that was deprecated by `matplotlib`. This function is still available at `github.com/ACRG-Bristol/acrg/acrg/time/convert.py`. [#PR 129](https://github.com/openghg/openghg_inversions/pull/129) + - `met_model` is now used by `data_processing_surface_notracer`; it is an optional argument, passed as a list with the same length as the number of sites. [#PR 125](https://github.com/openghg/openghg_inversions/pull/125) - Updated `pblh` filter to work with new variable names in footprints. [#PR 101](https://github.com/openghg/openghg_inversions/pull/101)