Skip to content

Commit

Permalink
remove 2025 from annual average
Browse files Browse the repository at this point in the history
  • Loading branch information
veronikasamborska1994 committed Feb 11, 2025
1 parent 34991b7 commit 2516676
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,12 @@ def run(dest_dir: str) -> None:
# Replace the decadal values with NaN for all years except the start of each decade
combined.loc[combined["year"] % 10 != 0, ["temperature_anomaly_decadal", "temperature_2m_decadal"]] = np.nan
combined = combined.drop(columns=["decade"])
# Filter rows where the year is less than or equal to 2024
# Remove the latest as it's often not representation of the full year
latest_year = combined["year"].max()
combined = combined[combined["year"] != latest_year]

# Set decadal values to NaN for non-decadal years
combined.loc[combined["year"] % 10 != 0, ["temperature_anomaly_decadal", "temperature_2m_decadal"]] = np.nan
combined = combined.set_index(["year", "country"], verify_integrity=True)

# Save outputs.
Expand Down

0 comments on commit 2516676

Please sign in to comment.