Skip to content

Commit

Permalink
finish edits on bottomS scorecard
Browse files Browse the repository at this point in the history
  • Loading branch information
jn533213 committed Oct 15, 2024
1 parent 79f0d27 commit ce330f3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion azmp_genReport2024.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@
# bottom scorecards (arange year+1)
azrt.bottom_scorecards(path='~/data/CABOTS/csv_averages/', years=[1980, int(yoi)], clim_year=[1991, 2020])
azrt.bottomS_scorecards(path='~/data/CABOTS/csv_averages/', years=[1980, int(yoi)], clim_year=[1991, 2020])
os.system('cp scorecards_botT_spring.png scorecards_botT_spring_FR.png scorecards_botT_fall_FR.png scorecards_botT_fall.png '+yoi+'')
os.system('cp scorecards_botT_spring.png scorecards_botT_spring_FR.png scorecards_botT_fall_FR.png scorecards_botT_fall.png scorecards_botS_spring.png scorecards_botS_spring_FR.png '+yoi+'')
os.system('mv *.png *.csv bottom_temp_stats/')

# bottom temperature bar plots [need to flag years if coverage insufficient] (FINISHED/WORKING - 2023)
Expand Down
4 changes: 2 additions & 2 deletions azmp_modules/azmp_report_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -3780,7 +3780,7 @@ def bottomS_scorecards(path, years, clim_year=[2006, 2021]):
df = df.rename(columns={'Unnamed: 0': 'year'})
df.index = [datetime.datetime.strptime(str(year),'%Y') for year in df['year'].values]
df = df[(df.index.year>=years[0]) & (df.index.year<=years[-1])]
percent_coverage = df.T_percent_coverage.values.copy().round(0)
percent_coverage = df.S_percent_coverage.values.copy().round(0)
# Flag bad years (no or weak sampling):
bad_years = df.index.year.values[percent_coverage < 80]
for i in bad_years:
Expand Down Expand Up @@ -3925,7 +3925,7 @@ def bottomS_scorecards(path, years, clim_year=[2006, 2021]):
df = df.rename(columns={'Unnamed: 0': 'year'})
df.index = [datetime.datetime.strptime(str(year),'%Y') for year in df['year'].values]
df = df[(df.index.year>=years[0]) & (df.index.year<=years[-1])]
percent_coverage = df.T_percent_coverage.values.copy().round(0)
percent_coverage = df.S_percent_coverage.values.copy().round(0)
# Flag bad years (no or weak sampling):
bad_years = df.index.year.values[percent_coverage < 80]
for i in bad_years:
Expand Down

0 comments on commit ce330f3

Please sign in to comment.