Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
lee1043 committed Jan 8, 2025
1 parent 3a02392 commit 541452e
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions pcmdi_metrics/mean_climate/lib/calculate_climatology.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ def calculate_climatology(
# Subset given time period
d = d.sel(
time=slice(
start_yr_str + "-" + start_mo_str + "-" + start_da_str,
end_yr_str + "-" + end_mo_str + "-" + end_da_str,
f"{start_yr_str}-{start_mo_str}-{start_da_str}",
f"{end_yr_str}-{end_mo_str}-{end_da_str}",
)
)

Expand Down Expand Up @@ -113,17 +113,7 @@ def calculate_climatology(
# Save to netcdf file
if periodinname is None:
addf = (
"."
+ start_yr_str
+ start_mo_str
+ "-"
+ end_yr_str
+ end_mo_str
+ "."
+ s
+ "."
+ ver
+ ".nc"
f".{start_yr_str}{start_mo_str}-{end_yr_str}{end_mo_str}.{s}.{ver}.nc"
)
if periodinname is not None:
addf = "." + s + "." + ver + ".nc"
Expand Down

0 comments on commit 541452e

Please sign in to comment.