Skip to content

Commit

Permalink
replace t1 with time_end
Browse files Browse the repository at this point in the history
  • Loading branch information
zebengberg committed Dec 12, 2024
1 parent 5303cba commit f494c87
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pycontrails/models/cocipgrid/cocip_grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,7 @@ def eval(
downwash_vectors_this_step = []
for vector in self._generate_new_vectors(time_idx):
t0 = vector["time"].min()
t1 = vector["time"].max()
met, rad = self._maybe_downselect_met_rad(met, rad, t0, t1)
met, rad = self._maybe_downselect_met_rad(met, rad, t0, time_end)
downwash, verbose_dict = _run_downwash(vector, met, rad, self.params)

if downwash:
Expand All @@ -266,8 +265,7 @@ def eval(

for vector in itertools.chain(existing_vectors, downwash_vectors_this_step):
t0 = vector["time"].min()
t1 = time_end
met, rad = self._maybe_downselect_met_rad(met, rad, t0, t1)
met, rad = self._maybe_downselect_met_rad(met, rad, t0, time_end)
contrail, ef = _evolve_vector(
vector,
met=met,
Expand Down Expand Up @@ -2583,4 +2581,6 @@ def _maybe_downselect_mds(
i1 = min(i1 + 1, big_time.size)
ds_concat.append(big_mds.data.isel(time=slice(i0, i1)))

# If little_mds is loaded into memory but big_mds is not,
# the concat operation below will load the slice of big_mds into memory.
return MetDataset(xr.concat(ds_concat, dim="time"), copy=False)

0 comments on commit f494c87

Please sign in to comment.