Skip to content

Commit

Permalink
📊 Fix sea ice anomalies (#3252)
Browse files Browse the repository at this point in the history
* 📊 Fix sea ice anomalies

* Fix condition
  • Loading branch information
pabloarosado authored Sep 6, 2024
1 parent 6d7a5c5 commit 9c129f4
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def run(dest_dir: str) -> None:

# For each month's sea ice extent, subtract a certain baseline sea ice extent, calculated as an average value (for that month) between two reference years (defined above as REFERENCE_YEAR_MIN and REFERENCE_YEAR_MAX)
tb_reference = (
tb[(tb["year"] >= REFERENCE_YEAR_MIN) & (tb["year"] >= REFERENCE_YEAR_MAX)]
tb[(tb["year"] >= REFERENCE_YEAR_MIN) & (tb["year"] <= REFERENCE_YEAR_MAX)]
.groupby(["location", "month_name"], as_index=False)
.agg({"sea_ice_extent": "mean"})
.rename(columns={"sea_ice_extent": "sea_ice_extent_reference"}, errors="raise")
Expand Down

0 comments on commit 9c129f4

Please sign in to comment.