Commit 2f7d0625 authored by Carl Schreck's avatar Carl Schreck

Adding add_cyclic to cjs.

parent e9be78c4
......@@ -17,10 +17,10 @@ from datetime import datetime
cjs.tstamp('Here we go!')
# These are some parameters that could be useful to have up top
# mpl.use('Agg')
year = 2019
month = 12
year = 2020
month = 1
days_in_month = calendar.monthrange(year, month)[1]
start_day = 15
start_day = 1
delta_days = 5
first_days = np.arange(start_day, days_in_month - delta_days + 2, 1)
......
......@@ -17,11 +17,11 @@ from datetime import datetime
cjs.tstamp('Here we go!')
# These are some parameters that could be useful to have up top
# mpl.use('Agg')
year = 2019
month = 12
year = 2020
month = 1
days_in_month = calendar.monthrange(year, month)[1]
delta_days = 5
start_day = 15
start_day = 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)
......
......@@ -52,6 +52,10 @@ clim_data = clim_ds['hgt500'].sel(year_day=dayofyear.values).mean(
cjs.tstamp('Anomalize')
anom_data = total_data - clim_data
anom_data = cjs.add_cyclic(anom_data)
total_data = cjs.add_cyclic(total_data)
for region in ['nhem', 'namer']:
cjs.tstamp('Draw map')
plt.figure(figsize=[6.4,6.0])
......
......@@ -19,12 +19,12 @@ from datetime import datetime
cjs.tstamp('Here we go!')
# These are some parameters that could be useful to have up top
# mpl.use('Agg')
year = 2019
month = 12
year = 2020
month = 1
days_in_month = calendar.monthrange(year, month)[1]
delta_days = 5
start_day = 15
clobber = False
start_day = 1
clobber = True
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)
......@@ -57,6 +57,9 @@ for first_day, last_day in zip(first_days, last_days):
cjs.tstamp('Anomalize')
anom_data = total_data - clim_data
anom_data = cjs.add_cyclic(anom_data)
total_data = cjs.add_cyclic(total_data)
for region in ['nhem', 'namer']:
cjs.tstamp('Draw map')
plt.figure(figsize=[6.4, 6.0])
......
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