Skip to content

Commit

Permalink
Update adf_dataset.py
Browse files Browse the repository at this point in the history
  • Loading branch information
justin-richling authored Feb 18, 2025
1 parent 8976fbe commit 870c1d4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/adf_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ def get_reference_climo_file(self, var):
fils = self.ref_var_loc.get(var, None)
return [fils] if fils is not None else None
#ref_loc = self.adf.get_baseline_info("cam_climo_loc")
ref_loc = Path(self.adf.climo_locs.baseline)
ref_loc = Path(self.adf.climo_locs["baseline"])
# NOTE: originally had this looking for *_baseline.nc
fils = sorted(ref_loc.glob(f"{self.ref_case_label}_{var}_climo.nc"))
if fils:
Expand Down Expand Up @@ -408,4 +408,4 @@ def get_time_slice_by_year(self, time, startyear, endyear):
return slice(startyear, endyear)
start_time_index = np.argwhere((time.dt.year >= startyear).values).flatten().min()
end_time_index = np.argwhere((time.dt.year <= endyear).values).flatten().max()
return slice(start_time_index, end_time_index+1)
return slice(start_time_index, end_time_index+1)

0 comments on commit 870c1d4

Please sign in to comment.