Skip to content
Merged
Show file tree
Hide file tree
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 @@ -158,7 +158,7 @@ def _create_multi_site_forecast_parquet_file(tmp_path, representation=None):
[ALTITUDE_LOOKUP[_id] for _id in wmo_ids], dtype=np.float32
),
"blend_time": [pd.Timestamp("2017-01-02 00:00:00", tz="utc")] * 5,
"forecast_period": [int(6 * 3.6e9)] * 5,
"forecast_period": [int(6 * 3600)] * 5,
"forecast_reference_time": [pd.Timestamp("2017-01-02 00:00:00", tz="utc")] * 5,
"latitude": np.array(
[LATITUDE_LOOKUP[_id] for _id in wmo_ids], dtype=np.float32
Expand Down Expand Up @@ -211,7 +211,7 @@ def _create_multi_percentile_forecast_parquet_file(tmp_path, representation=None
[ALTITUDE_LOOKUP[_id] for _id in wmo_ids], dtype=np.float32
),
"blend_time": [pd.Timestamp("2017-01-02 00:00:00", tz="utc")] * 5,
"forecast_period": [int(6 * 3.6e9)] * 5,
"forecast_period": [int(6 * 3600)] * 5,
"forecast_reference_time": [pd.Timestamp("2017-01-02 00:00:00", tz="utc")] * 5,
"latitude": np.array(
[LATITUDE_LOOKUP[_id] for _id in wmo_ids], dtype=np.float32
Expand Down Expand Up @@ -262,13 +262,7 @@ def _create_multi_forecast_period_forecast_parquet_file(tmp_path, representation
[ALTITUDE_LOOKUP[_id] for _id in wmo_ids], dtype=np.float32
),
"blend_time": [pd.Timestamp("2017-01-02 00:00:00")] * 4,
"forecast_period": np.repeat(
[
[int(6 * 3.6e9)],
[int(12 * 3.6e9)],
],
2,
),
"forecast_period": np.repeat([[6 * 3600], [12 * 3600]], 2),
"forecast_reference_time": [pd.Timestamp("2017-01-02 00:00:00")] * 4,
"latitude": np.array(
[LATITUDE_LOOKUP[_id] for _id in wmo_ids], dtype=np.float32
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ def test_prep_features_from_config(feature_config):
"realization": np.tile([1, 2], 3),
"distance_to_water": np.tile([2.0, 3.0], 3),
"blend_time": pd.Timestamp("2017-01-02 00:00:00", tz="utc"),
"forecast_period": int(6 * 3.6e9),
"forecast_period": int(6 * 3600),
"forecast_reference_time": pd.Timestamp("2017-01-02 00:00:00", tz="utc"),
}
df = pd.DataFrame(data_dict)
Expand Down
2 changes: 1 addition & 1 deletion improver_tests/calibration/test_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -712,7 +712,7 @@ def create_multi_site_forecast_parquet_file(tmp_path, include_forecast_period=Tr

parquet_type = "truth"
if include_forecast_period:
data_dict["forecast_period"] = [int(6 * 3.6e9)] * 5
data_dict["forecast_period"] = [int(6 * 3600)] * 5
parquet_type = "forecast"

data_df = pd.DataFrame(data_dict)
Expand Down
Loading