@@ -63,14 +63,17 @@ function interpolate_atmosphere_state!(interfaces, atmosphere::PrescribedAtmosph
63
63
64
64
# Assumption, should be generalized
65
65
ua = atmosphere. velocities. u
66
+ times = ua. times
67
+ time_indexing = ua. time_indexing
68
+ t = clock. time
69
+ @assert times isa StepRangeLen
70
+ time_interpolator = TimeInterpolator (ua. time_indexing, times, clock. time)
66
71
67
72
launch! (arch, grid, kernel_parameters,
68
73
_interpolate_primary_atmospheric_state!,
69
74
atmosphere_data,
70
75
space_fractional_indices,
71
- clock. time,
72
- ua. times,
73
- ua. time_indexing,
76
+ time_interpolator,
74
77
exchange_grid,
75
78
atmosphere_velocities,
76
79
atmosphere_tracers,
120
123
121
124
@kernel function _interpolate_primary_atmospheric_state! (surface_atmos_state,
122
125
space_fractional_indices,
123
- time,
124
- atmos_times,
125
- time_indexing,
126
+ time_interpolator,
126
127
exchange_grid,
127
128
atmos_velocities,
128
129
atmos_tracers,
140
141
fj = get_fractional_index (i, j, jj)
141
142
142
143
x_itp = FractionalIndices (fi, fj, nothing )
143
- t_itp = TimeInterpolator (time_indexing, atmos_times, time)
144
+ t_itp = time_interpolator
144
145
atmos_args = (x_itp, t_itp, atmos_backend, atmos_time_indexing)
145
146
146
147
uₐ = interp_atmos_time_series (atmos_velocities. u, atmos_args... )
0 commit comments