Commit 5f3f83b1 authored by Carl Schreck's avatar Carl Schreck

Added mkdir to multi maps, plus run for January 2020.

parent 2f7d0625
......@@ -15,10 +15,10 @@ from datetime import datetime
import numpy as np
# These are some parameters that could be useful to have up top
year = 2019
month = 12
first_day = 2
last_day = 8
year = 2020
month = 1
first_day = 24
last_day = 31
clobber = False
time_range = slice(f'{year}-{month:02}-{first_day:02}',
......
......@@ -108,6 +108,7 @@ for first_day, last_day in zip(first_days, last_days):
cjs.tstamp('Save figure')
plt.tight_layout()
os.makedirs(f'figures/prcp-pon/', exist_ok=True)
plt.savefig(f'figures/prcp-pon/prcp-pon-{year}-{month:02}{first_day:02}'
f'-{month:02}{last_day:02}.png', dpi=200)
......
......@@ -15,8 +15,8 @@ import cjs # '~carl/lib/python'
cjs.tstamp('Here we go!')
# These are some parameters that could be useful to have up top
month = 12
year = 2019
month = 1
year = 2020
days_in_month = calendar.monthrange(year, month)[1]
time_range = slice(f'{year}-{month}-01', f'{year}-{month}-{days_in_month}')
clobber = False
......@@ -61,7 +61,7 @@ ax.plot(ax.get_xlim(), [1, 1], '--', color='k', linewidth=0.5)
ax.xaxis.set_minor_locator(mdates.DayLocator(interval=1))
ax.xaxis.set_major_locator(mdates.DayLocator(bymonthday=np.arange(1,35,5)))
ax.xaxis.set_major_formatter(mdates.DateFormatter('%b %-d'))
plt.xlim(time_range.start, time_range.stop)
plt.xlim(sub_ds.time[0], sub_ds.time[-1])
plt.title(f'Standardized teleconnection amplitudes\n'
f' {calendar.month_name[month]} {year}')
plt.ylabel('Standard Deviations')
......
......@@ -15,9 +15,9 @@ import cjs # '~carl/lib/python'
from datetime import datetime
# These are some parameters that could be useful to have up top
year = 2019
month = 12
first_day = 27
year = 2020
month = 1
first_day = 24
last_day = 31
clobber = False
......
......@@ -20,8 +20,8 @@ cjs.tstamp('Here we go!')
year = 2020
month = 1
days_in_month = calendar.monthrange(year, month)[1]
delta_days = 5
start_day = 1
delta_days = 1
first_days = np.arange(start_day, days_in_month - delta_days + 2, 1)
last_days = np.arange(start_day + delta_days - 1, days_in_month + 1, 1)
......@@ -104,6 +104,7 @@ for first_day, last_day in zip(first_days, last_days):
cjs.tstamp('Save figure')
plt.tight_layout()
os.makedirs(f'figures/tave-anom/', exist_ok=True)
plt.savefig(f'figures/tave-anom/tave-anom-{year}-{month:02}{first_day:02}'
f'-{month:02}{last_day:02}.png', dpi=200)
# plt.show()
......
......@@ -17,9 +17,9 @@ import cjs # '~carl/lib/python'
from datetime import datetime
# These are some parameters that could be useful to have up top
year = 2019
month = 12
first_day = 1
year = 2020
month = 1
first_day = 24
last_day = 31
clobber = False
......
......@@ -131,6 +131,7 @@ for first_day, last_day in zip(first_days, last_days):
cjs.tstamp('Save figure')
# plt.tight_layout()
os.makedirs(f'figures/hgt500-{region}/', exist_ok=True)
plt.savefig(f'figures/hgt500-{region}/'
f'hgt500-{region}-{year}-{month:02}{first_day:02}'
f'-{month:02}{last_day:02}.png', dpi=200)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment