|
|
|
@ -30,10 +30,11 @@ Base_period_start = '1986-01-01'
|
|
|
|
|
Base_period_end = '2005-01-01' #use last day that's not included in period as < is used for subsetting
|
|
|
|
|
Estuary = 'Nadgee' # 'Belongil'
|
|
|
|
|
Clim_var_type = "*" # '*' will create pdf for all variables in folder
|
|
|
|
|
Clim_var_type = "tasmean*" # '*' will create pdf for all variables in folder
|
|
|
|
|
Present_Day_Clim_Var = 'Wind' #MaxT, MinT, Rainfall, ET
|
|
|
|
|
Clim_var_type = "pracc*" # '*' will create pdf for all variables in folder
|
|
|
|
|
Present_Day_Clim_Var = 'Rainfall' #MaxT, MinT, Rainfall, ET Wind
|
|
|
|
|
present_day_plot = 'yes'
|
|
|
|
|
Version = "V1"
|
|
|
|
|
Version = "V2"
|
|
|
|
|
Stats = 'dailymax' #maximum takes the annual max Precipitation instead of the sum
|
|
|
|
|
#####################################----------------------------------
|
|
|
|
|
|
|
|
|
|
#set directory path for output files
|
|
|
|
@ -45,7 +46,7 @@ if not os.path.exists(output_directory):
|
|
|
|
|
print("output directory folder didn't exist and was generated")
|
|
|
|
|
print('-------------------------------------------')
|
|
|
|
|
print('-------------------')
|
|
|
|
|
Clim_Var_CSVs = glob.glob('./Output/' + Estuary + '/' + Estuary + '_' + Clim_var_type + '*')
|
|
|
|
|
Clim_Var_CSVs = glob.glob('./Output/' + Estuary + '/' + Estuary + '_' + Clim_var_type[:-1] + '_' + Stats + '*')
|
|
|
|
|
#read CSV file
|
|
|
|
|
clim_var_csv_path = Clim_Var_CSVs[0]
|
|
|
|
|
Filename = os.path.basename(os.path.normpath(clim_var_csv_path))
|
|
|
|
@ -99,12 +100,12 @@ else:
|
|
|
|
|
#create seasonal sums etc.
|
|
|
|
|
if (Clim_var_type == 'pracc' or Clim_var_type == 'evspsblmean' or Clim_var_type == 'potevpmean'
|
|
|
|
|
or Clim_var_type == 'pr1Hmaxtstep' or Clim_var_type == 'wss1Hmaxtstep'):
|
|
|
|
|
if Stats == 'dailymax':
|
|
|
|
|
Present_day_df_annual = Present_day_df.resample('A').max()
|
|
|
|
|
Present_day_df_annual = Present_day_df_annual.replace(0, np.nan)
|
|
|
|
|
else:
|
|
|
|
|
Present_day_df_annual = Present_day_df.resample('A').sum()
|
|
|
|
|
Present_day_df_annual = Present_day_df_annual.replace(0, np.nan)
|
|
|
|
|
Present_day_df_monthly = Present_day_df.resample('M').sum()
|
|
|
|
|
Present_day_df_monthly = Present_day_df_monthly.replace(0, np.nan)
|
|
|
|
|
Present_day_df_weekly = Present_day_df.resample('W').sum()
|
|
|
|
|
Present_day_df_weekly = Present_day_df_weekly.replace(0, np.nan)
|
|
|
|
|
Fdf_Seas_means = Present_day_df.resample('Q-NOV').sum() #seasonal means
|
|
|
|
|
Fdf_Seas_means = Fdf_Seas_means.replace(0, np.nan)
|
|
|
|
|
else:
|
|
|
|
@ -205,7 +206,7 @@ for temp in times:
|
|
|
|
|
print(i)
|
|
|
|
|
|
|
|
|
|
plt.show()
|
|
|
|
|
out_file_name = Estuary + '_' + Clim_var_type + '_CC_prio_plot' + Version + '.png'
|
|
|
|
|
out_file_name = Estuary + '_' + Clim_var_type + '_' + Stats + '_' + '_CC_prio_plot' + Version + '.png'
|
|
|
|
|
out_path = output_directory + '/' + out_file_name
|
|
|
|
|
fig.savefig(out_path)
|
|
|
|
|
|
|
|
|
|