S5.tests.test_readgrib#

Test Strategy: - Single end to end test, compare with previous output. - Minimal testing on xarray and reading of grib file as they were tested externally. - TODO: Test for ssr_to_direct_and_diffuse to be added when function is finalised.

Functions

grib_df()

mock_extract_df(grib_df, monkeypatch)

test_calculate_wind()

Test if the logic is correct u10 and v10 are in m/s u10 is eastward +ve, v10 is northward +ve

test_cumulative_ssr_to_hourly_complex()

test_cumulative_ssr_to_hourly_one_day()

test_era5_spot(mock_extract_df, tmp_path, ...)

test_from_era5(mock_extract_df, tmp_path, ...)

test_from_era5_backfill(grib_df, ...)

test_from_era5_no_solar(mock_extract_df, ...)