You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# """Load a chunk of three data time steps into the FieldSet.
181
-
# This is used when FieldSet uses data imported from netcdf,
182
-
# with default option deferred_load. The loaded time steps are at or immediatly before time
183
-
# and the two time steps immediately following time if dt is positive (and inversely for negative dt)
184
-
185
-
# Parameters
186
-
# ----------
187
-
# time :
188
-
# Time around which the FieldSet data are to be loaded.
189
-
# Time is provided as a double, relatively to Fieldset.time_origin.
190
-
# Default is 0.
191
-
# dt :
192
-
# time step of the integration scheme, needed to set the direction of time chunk loading.
193
-
# Default is 1.
194
-
# """
195
-
# nextTime = np.inf if dt > 0 else -np.inf
196
-
197
-
# if abs(nextTime) == np.inf or np.isnan(nextTime): # Second happens when dt=0
198
-
# return nextTime
199
-
# else:
200
-
# nSteps = int((nextTime - time) / dt)
201
-
# if nSteps == 0:
202
-
# return nextTime
203
-
# else:
204
-
# return time + nSteps * dt
205
-
206
179
207
180
classCalendarError(Exception): # TODO: Move to a parcels errors module
208
181
"""Exception raised when the calendar of a field is not compatible with the rest of the Fields. The user should ensure that they only add fields to a FieldSet that have compatible CFtime calendars."""
0 commit comments