File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -108,8 +108,16 @@ function TimeVaryingInputs.TimeVaryingInput(
108
108
109
109
if extrapolation_bc (method) isa PeriodicCalendar
110
110
if extrapolation_bc (method) isa PeriodicCalendar{Nothing}
111
+ if eltype (times) <: ITime
112
+ t0 = times[begin ]
113
+ if ! (isnothing (t0. epoch) || all (t -> t. epoch == t0. epoch, times))
114
+ # promote if times have inconsistent epochs
115
+ # this is a slow operation
116
+ times = promote (times... )
117
+ end
118
+ end
111
119
if ! isequispaced (
112
- eltype (times) <: ITime ? [ float .( promote (times ... )) ... ] : times,
120
+ eltype (times) <: ITime ? floats .(time) : times,
113
121
)
114
122
error (
115
123
" PeriodicCalendar() boundary condition cannot be used because data is defined at non uniform intervals of time" ,
You can’t perform that action at this time.
0 commit comments