From efe1efbbcae8f7f838e83f3be27f09ed459e4f80 Mon Sep 17 00:00:00 2001 From: James Fulton Date: Wed, 18 Sep 2024 16:15:00 +0000 Subject: [PATCH 1/3] reduce the val 2022 samples with min gap of 1 hour --- examples/find_test_2022_t0_times.py | 23 ++++++++++++++---- pyproject.toml | 2 +- .../data/test_2022_t0_times.csv.zip | Bin 36212 -> 9688 bytes src/cloudcasting/validation.py | 6 ++--- tests/test_dataset.py | 2 +- 5 files changed, 23 insertions(+), 10 deletions(-) diff --git a/examples/find_test_2022_t0_times.py b/examples/find_test_2022_t0_times.py index af80be6..74764f9 100644 --- a/examples/find_test_2022_t0_times.py +++ b/examples/find_test_2022_t0_times.py @@ -18,6 +18,9 @@ # The current FORECAST_HORIZON_MINUTES is 3 hours so we'll set this conservatively to 6 hours MAX_HISTORY_MINUTES = 6 * 60 +# We filter t0 times so they have to have a gap of at least this long between consecutive times +MIN_GAP_SIZE = pd.Timedelta("1hour") + # Open the 2022 dataset ds = xr.open_zarr(_get_sat_public_dataset_path(2022, is_hrv=False)) @@ -30,17 +33,27 @@ ds = ds.sel(time=mask) -# Find the valid t0 times -valid_t0_times = find_valid_t0_times( +# Find the t0 times that we have satellite data for +available_t0_times = find_valid_t0_times( datetimes=pd.DatetimeIndex(ds.time), history_mins=MAX_HISTORY_MINUTES, forecast_mins=FORECAST_HORIZON_MINUTES, sample_freq_mins=DATA_INTERVAL_SPACING_MINUTES, ) +# Filter the t0 times so they have gaps of at least 1 hour +filtered_t0_times = [available_t0_times[0]] + +for t in available_t0_times[1:]: + if (t - filtered_t0_times[-1]) >= MIN_GAP_SIZE: + filtered_t0_times.append(t) + +filtered_t0_times = pd.DatetimeIndex(filtered_t0_times) + + # Print the valid t0 times to sanity check -print(f"Number of available t0 times: {len(valid_t0_times)}") -print(f"Actual available t0 times: {valid_t0_times}") +print(f"Number of available t0 times: {len(filtered_t0_times)}") +print(f"Actual available t0 times: {filtered_t0_times}") # Find the path of the cloudcasting package so we can save the valid times into it @@ -53,7 +66,7 @@ # Save the valid t0 times filename = "test_2022_t0_times.csv" -df = pd.DataFrame(valid_t0_times, columns=["t0_time"]).set_index("t0_time") +df = pd.DataFrame(filtered_t0_times, columns=["t0_time"]).set_index("t0_time") df.to_csv( f"{package_path}/data/{filename}.zip", compression={ diff --git a/pyproject.toml b/pyproject.toml index b0651b9..5dd71da 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta" [project] name = "cloudcasting" -version = "0.2.1" +version = "0.3.0" authors = [ { name = "cloudcasting Maintainers", email = "nsimpson@turing.ac.uk" }, ] diff --git a/src/cloudcasting/data/test_2022_t0_times.csv.zip b/src/cloudcasting/data/test_2022_t0_times.csv.zip index af14c19dda46280155c455df2cc139ea74553a38..21630bad85ff9d6f9a62dd6b67fb7d4fbc933b67 100644 GIT binary patch literal 9688 zcmeHN4Ny~87Df=Yjn?TO)?(F4)t!o>v}=aa6zfo#U9>nmQ*EFnx<-B$VpJ%UU|x!D zojNV3bt}42urhXk8pH+=6_dx-s#pz>b(@sGJf~EN4dhiw@*t0w?78;^M1>07o$c-x zn0fcUdvngc@7#ONckVfNb!@=+$Nc>KCi(fl6E5C;e$~=n&-L?r@0oFaLC~7HF(XqF zzBoKwlDSxtnJU|uv1mg^maJt-!Q9gy&RwlsV+{Vq?9>$@H_H$1jelZ&g(YfUi1qWZ zs(^~jz@QJN^{VT-w|l$Wy?ymwPUYpuZ{og)QeBAJ;4v3FNpD{-tMY!iRJ)_&W@FEe z^w|RGuJkzzqz5*vE69tOaAVSyhYy4-j;VBMh0*XjixfeJ;f1h6*kC^P|L_X zB7nPp!#wvYhuSJM%8ydf)>n$jYGS+>9Y!Zwb>7 zk*!jmuTIsS3`66}Bu!NpK<_H#`ILrf26j6m6eQ|7P%^~pH|E353QVVi(aI5zkagF` zEtvXxPR*AAYi6G4dgr5wnit2K#w79Y*%R|a=dEAz!27>?edXuBeI#h#i37hs|IAp^ zm?VC7d!o0#7+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 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/find_test_2022_t0_times.py b/examples/find_test_2022_t0_times.py index 74764f9..0eac60a 100644 --- a/examples/find_test_2022_t0_times.py +++ b/examples/find_test_2022_t0_times.py @@ -42,13 +42,13 @@ ) # Filter the t0 times so they have gaps of at least 1 hour -filtered_t0_times = [available_t0_times[0]] +_filtered_t0_times = [available_t0_times[0]] for t in available_t0_times[1:]: - if (t - filtered_t0_times[-1]) >= MIN_GAP_SIZE: - filtered_t0_times.append(t) - -filtered_t0_times = pd.DatetimeIndex(filtered_t0_times) + if (t - _filtered_t0_times[-1]) >= MIN_GAP_SIZE: + _filtered_t0_times.append(t) + +filtered_t0_times = pd.DatetimeIndex(_filtered_t0_times) # Print the valid t0 times to sanity check From 338849062ff75f909f33c0a3f6a349a53e64ecc2 Mon Sep 17 00:00:00 2001 From: Isabel Fenton Date: Thu, 19 Sep 2024 12:18:27 +0100 Subject: [PATCH 3/3] Update comment to reflect new size --- tests/test_dataset.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_dataset.py b/tests/test_dataset.py index 930239f..6190f5d 100644 --- a/tests/test_dataset.py +++ b/tests/test_dataset.py @@ -164,7 +164,7 @@ def test_validation_dataset(val_sat_zarr_path, val_dataset_hyperparams): sample_freq_mins=DATA_INTERVAL_SPACING_MINUTES, ) - # There are 14949 init times which all models must make predictions for + # There are 3744 init times which all models must make predictions for assert len(dataset) == 3744 X, y = dataset[0]