Closed ritviksahajpal closed 1 year ago
When I execute the icclim index function, it sometimes returns index output split over time when it should not be the case
ds = icclim.index( index_name="GD4", in_files=dx, base_period_time_range=[start_br, end_br], time_range=[start_tr, end_tr], )
aa = dx.to_dataframe().reset_index()
Here, start_br, end_br, start_tr, end_tr is ('2000-01-01 00:00:00', '2020-12-31 00:00:00', '2000-12-01T00:00:00.000000000', '2001-02-14T00:00:00.000000000')
start_br, end_br, start_tr, end_tr is ('2000-01-01 00:00:00', '2020-12-31 00:00:00', '2000-12-01T00:00:00.000000000', '2001-02-14T00:00:00.000000000')
dx can be read from here: https://www.dropbox.com/scl/fi/dx4ggxge6ywrohak2s3x0/dx.nc?rlkey=rsun1ec478bqfz83qsxsnctig&dl=0
dx
lat lon time bounds GD4 time_bounds 0 0 0 2000-07-01 12:00:00 0 584.043315 2000-01-01 1 0 0 2000-07-01 12:00:00 1 584.043315 2000-12-31 2 0 0 2001-07-02 00:00:00 0 859.969056 2001-01-01 3 0 0 2001-07-02 00:00:00 1 859.969056 2001-12-31
However, I would like to have a single output for the entire time-period rather than having it split over the two years. Is there a way to have the icclim index command return a single value rather than 2 different values for the two years?
thanks!
Ahh, my bad. Should have been using slice_mode
slice_mode
Description
When I execute the icclim index function, it sometimes returns index output split over time when it should not be the case
Minimal reproducible example
ds = icclim.index( index_name="GD4", in_files=dx, base_period_time_range=[start_br, end_br], time_range=[start_tr, end_tr], )
aa = dx.to_dataframe().reset_index()
Here,
start_br, end_br, start_tr, end_tr is ('2000-01-01 00:00:00', '2020-12-31 00:00:00', '2000-12-01T00:00:00.000000000', '2001-02-14T00:00:00.000000000')
dx
can be read from here: https://www.dropbox.com/scl/fi/dx4ggxge6ywrohak2s3x0/dx.nc?rlkey=rsun1ec478bqfz83qsxsnctig&dl=0Output received
However, I would like to have a single output for the entire time-period rather than having it split over the two years. Is there a way to have the icclim index command return a single value rather than 2 different values for the two years?
thanks!