From ce330f34c5643f1629199cffb1c377053889938f Mon Sep 17 00:00:00 2001 From: jn533213 Date: Tue, 15 Oct 2024 14:21:19 -0230 Subject: [PATCH] finish edits on bottomS scorecard --- azmp_genReport2024.py | 2 +- azmp_modules/azmp_report_tools.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/azmp_genReport2024.py b/azmp_genReport2024.py index 121254c..9488a12 100644 --- a/azmp_genReport2024.py +++ b/azmp_genReport2024.py @@ -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) diff --git a/azmp_modules/azmp_report_tools.py b/azmp_modules/azmp_report_tools.py index 06d1d61..e7ce0f2 100644 --- a/azmp_modules/azmp_report_tools.py +++ b/azmp_modules/azmp_report_tools.py @@ -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: @@ -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: