@@ -109,6 +109,8 @@ def add(self, field, values):
109109 @classmethod
110110 def mars_date_time_steps (cls , dates , step1 , step2 , frequency , base_times , adjust_step ):
111111
112+ # assert step1 > 0, (step1, step2, frequency)
113+
112114 for valid_date in dates :
113115 base_date = valid_date - datetime .timedelta (hours = step2 )
114116 add_step = 0
@@ -191,9 +193,10 @@ def compute(self, values, startStep, endStep):
191193 @classmethod
192194 def _mars_date_time_step (cls , base_date , step1 , step2 , add_step , frequency ):
193195 assert frequency > 0 , frequency
196+ # assert step1 > 0, (step1, step2, frequency, add_step, base_date)
194197
195198 steps = []
196- for step in range (step1 , step2 , frequency ):
199+ for step in range (step1 + frequency , step2 + frequency , frequency ):
197200 steps .append (step + add_step )
198201 return (
199202 base_date .year * 10000 + base_date .month * 100 + base_date .day ,
@@ -286,6 +289,7 @@ def compute_accumulations(
286289 ds = cml .load_source ("empty" )
287290 for r in compressed .iterate ():
288291 request .update (r )
292+ print ("🌧️" , request )
289293 ds = ds + cml .load_source ("mars" , ** request )
290294
291295 accumulations = defaultdict (list )
@@ -382,6 +386,8 @@ def accumulations(context, dates, **request):
382386
383387 kwargs = KWARGS .get ((class_ , stream ), {})
384388
389+ context .trace ('🌧️' , f"accumulations { request } { user_accumulation_period } { kwargs } " )
390+
385391 return compute_accumulations (
386392 dates ,
387393 request ,
0 commit comments