Skip to content

Commit

Permalink
Change depreciated resampling parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
measrainsey committed Sep 2, 2024
1 parent 09f01fe commit e9024a0
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
isimipvers = "3b"

#: Monthly scale
monthlyscale = True
monthlyscale = False

#: Type of data
#: Options: "historical", "future"
Expand Down Expand Up @@ -209,8 +209,7 @@ def process_raster(user, isimip, cl, scen, var, data):
{"lat": latchunk, "lon": lonchunk, "time": len(da.dis.time)}
)
# Resample daily data to monthly (by summing daily values)
da = da.resample(time="Y").mean()

da = da.resample(time="YE").mean()
da["dis"] = da.dis.chunk(
{"lat": latchunk, "lon": lonchunk, "time": len(da.dis.time)}
)
Expand Down Expand Up @@ -241,7 +240,7 @@ def process_raster(user, isimip, cl, scen, var, data):
{"lat": latchunk, "lon": lonchunk, "time": len(da.qtot.time)}
)
# Resample daily data to monthly (by summing daily values)
da = da.resample(time="Y").mean()
da = da.resample(time="YE").mean()
da["qtot"] = da.qtot.chunk(
{"lat": latchunk, "lon": lonchunk, "time": len(da.qtot.time)}
)
Expand All @@ -265,7 +264,7 @@ def process_raster(user, isimip, cl, scen, var, data):
{"lat": latchunk, "lon": lonchunk, "time": len(da.qr.time)}
)
# Resample daily data to monthly (by summing daily values)
da = da.resample(time="Y").mean()
da = da.resample(time="YE").mean()
da["qr"] = da.qr.chunk(
{"lat": latchunk, "lon": lonchunk, "time": len(da.qr.time)}
)
Expand Down

0 comments on commit e9024a0

Please sign in to comment.