BigDataWUR / AgML-CY-Bench

CY-Bench (Crop Yield Benchmark) is a comprehensive dataset and benchmark to forecast crop yields at subnational level. CY-Bench standardizes selection, processing and spatio-temporal harmonization of public subnational yield statistics with relevant predictors. Contributors include agronomers, climate scientists and machine learning researchers.
https://cybench.agml.org/
Other
18 stars 8 forks source link

crop season alignment for time series has bugs #302

Closed krsnapaudel closed 3 months ago

krsnapaudel commented 3 months ago

The dates are not transformed correctly even when crop season is in the same calendar year. Needs investigation.

One issue seems to be the way EOS date is updated.

df["eos_date"] = np.where(
        (df["date"] > df["eos_date"]), # & (df["sos"] > df["eos"]),
        # select eos_date for the next year
        df["eos_date"] + pd.offsets.DateOffset(years=1),
        df["eos_date"],
    )

Another issue is FPAR has less data than AgERA5 variables. This can happen for 2000 (FPAR time series is shorter), but should not happen for other years.

yield torch.Size([16])                                                                                             f
prec torch.Size([16, 22])
tmin torch.Size([16, 22])
cwb torch.Size([16, 22])
rad torch.Size([16, 22])
awc torch.Size([16])
tavg torch.Size([16, 22])
fpar torch.Size([16, 18])
tmax torch.Size([16, 22])