Skip to content

Commit 1971a5a

Browse files
committed
Change depreciated resampling parameters
1 parent c6460f3 commit 1971a5a

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

message_ix_models/model/water/data/pre_processing/hydro_agg_raster.py

+4-5
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
isimipvers = "3b"
2929

3030
#: Monthly scale
31-
monthlyscale = True
31+
monthlyscale = False
3232

3333
#: Type of data
3434
#: Options: "historical", "future"
@@ -209,8 +209,7 @@ def process_raster(user, isimip, cl, scen, var, data):
209209
{"lat": latchunk, "lon": lonchunk, "time": len(da.dis.time)}
210210
)
211211
# Resample daily data to monthly (by summing daily values)
212-
da = da.resample(time="Y").mean()
213-
212+
da = da.resample(time="YE").mean()
214213
da["dis"] = da.dis.chunk(
215214
{"lat": latchunk, "lon": lonchunk, "time": len(da.dis.time)}
216215
)
@@ -241,7 +240,7 @@ def process_raster(user, isimip, cl, scen, var, data):
241240
{"lat": latchunk, "lon": lonchunk, "time": len(da.qtot.time)}
242241
)
243242
# Resample daily data to monthly (by summing daily values)
244-
da = da.resample(time="Y").mean()
243+
da = da.resample(time="YE").mean()
245244
da["qtot"] = da.qtot.chunk(
246245
{"lat": latchunk, "lon": lonchunk, "time": len(da.qtot.time)}
247246
)
@@ -265,7 +264,7 @@ def process_raster(user, isimip, cl, scen, var, data):
265264
{"lat": latchunk, "lon": lonchunk, "time": len(da.qr.time)}
266265
)
267266
# Resample daily data to monthly (by summing daily values)
268-
da = da.resample(time="Y").mean()
267+
da = da.resample(time="YE").mean()
269268
da["qr"] = da.qr.chunk(
270269
{"lat": latchunk, "lon": lonchunk, "time": len(da.qr.time)}
271270
)

0 commit comments

Comments
 (0)