Loading py/utopya_index.py +13 −0 Original line number Diff line number Diff line Loading @@ -5,6 +5,9 @@ # 2020-06, Arjo Segers # New module with classes to create index pages. # # 2022-06, Arjo Segers, Met-Norway # Support index timeseries over years. # #------------------------------------------------- Loading Loading @@ -875,6 +878,12 @@ class IndexPart( utopya.UtopyaRc ) : NL1235;Laagwater : * ``Range( 0, 23, 1, '%2.2i00' )`` Return list of formatted integer values. The arguments included in the function description are evaluated to a start, end, step increment, and a formatting template. * ``TimeSeries( '2017-01', '2017-12', '1 month', 'conc_timeseries_%Y-%m' )`` Return list of formatted time values. Loading Loading @@ -1014,6 +1023,10 @@ class IndexPart( utopya.UtopyaRc ) : elif units in ['hour','hours'] : # next: t = t + datetime.timedelta(0,3600) #~ years: elif units in ['year','years'] : # next: t = datetime.datetime(t.year+1,1,1) #~ else : logging.error( 'unsupported time step units "%s"' % units ) Loading Loading
py/utopya_index.py +13 −0 Original line number Diff line number Diff line Loading @@ -5,6 +5,9 @@ # 2020-06, Arjo Segers # New module with classes to create index pages. # # 2022-06, Arjo Segers, Met-Norway # Support index timeseries over years. # #------------------------------------------------- Loading Loading @@ -875,6 +878,12 @@ class IndexPart( utopya.UtopyaRc ) : NL1235;Laagwater : * ``Range( 0, 23, 1, '%2.2i00' )`` Return list of formatted integer values. The arguments included in the function description are evaluated to a start, end, step increment, and a formatting template. * ``TimeSeries( '2017-01', '2017-12', '1 month', 'conc_timeseries_%Y-%m' )`` Return list of formatted time values. Loading Loading @@ -1014,6 +1023,10 @@ class IndexPart( utopya.UtopyaRc ) : elif units in ['hour','hours'] : # next: t = t + datetime.timedelta(0,3600) #~ years: elif units in ['year','years'] : # next: t = datetime.datetime(t.year+1,1,1) #~ else : logging.error( 'unsupported time step units "%s"' % units ) Loading