Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reinstate pp time conversion test #4585

Merged
merged 1 commit into from
Feb 14, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
# importing anything else.
import iris.tests as tests # isort:skip

import unittest

from cf_units import CALENDAR_360_DAY, CALENDAR_GREGORIAN, Unit
from cftime import datetime as nc_datetime
import numpy as np
Expand Down Expand Up @@ -733,7 +731,6 @@ def test_t1_list_t2_scalar(self):


class TestArrayInputWithLBTIM_0_3_1(TestField):
@unittest.skip("#3508 investigate unit test failure")
def test_t1_scalar_t2_list(self):
lbtim = _lbtim(ib=3, ic=1)
lbcode = _lbcode(1)
Expand All @@ -756,17 +753,21 @@ def test_t1_scalar_t2_list(self):
)

# Expected coords.
leap_year_adjust = np.array([0, 24, 24])
points = np.ones_like(years) * lbft
bounds = np.array(
[lbft - ((years - 1970) * 365 * 24 + 2 * 24), points]
[
lbft - ((years - 1970) * 365 * 24 + 2 * 24 + leap_year_adjust),
points,
]
).transpose()
fp_coord = AuxCoord(
points,
standard_name="forecast_period",
units="hours",
bounds=bounds,
)
points = (years - 1970) * 365 * 24 + 10 * 24 + 9
points = (years - 1970) * 365 * 24 + 10 * 24 + 9 + leap_year_adjust
bounds = np.array(
[np.ones_like(points) * (8 * 24 + 9), points]
).transpose()
Expand Down