|
15 | 15 | #%% |
16 | 16 |
|
17 | 17 | # Define user |
18 | | -user = 'jryan4' |
| 18 | +user = 'johnnyryan' |
19 | 19 |
|
20 | 20 | # Define path |
21 | 21 | path = '/Users/' + user + '/Dropbox (University of Oregon)/research/feedbacks/data/' |
22 | | -savepath = '/Users/' + user + '/Dropbox (University of Oregon)/research/feedbacks/figures/' |
| 22 | +savepath = '/Users/' + user + '/Library/CloudStorage/OneDrive-DukeUniversity/research/feedbacks/re-revision/' |
23 | 23 |
|
24 | 24 | #%% |
25 | 25 |
|
|
70 | 70 | df = pd.DataFrame(list(zip(ice, snowline, snow))) |
71 | 71 | df.columns = ['ice', 'snowline', 'snow'] |
72 | 72 | df['bulk'] = df['ice'] + df['snowline'] + df['snow'] |
73 | | -df.to_csv(path + 'radiative-forcing-elevation.csv', index=False) |
| 73 | +#df.to_csv(path + 'radiative-forcing-elevation.csv', index=False) |
74 | 74 |
|
75 | 75 | #%% |
76 | 76 |
|
|
96 | 96 | coeffs['snowline_gt_std'] = coeffs['snowline_std']/1e+06*area*92 |
97 | 97 | coeffs['snow_gt_std'] = coeffs['snow_std']/1e+06*area*92 |
98 | 98 |
|
99 | | -coeffs.to_csv(path + 'final-coeffs.csv') |
| 99 | +#coeffs.to_csv(path + 'final-coeffs.csv') |
100 | 100 | #%% |
101 | 101 |
|
102 | 102 | fig, ((ax1, ax2, ax3), (ax4, ax5, ax6)) = plt.subplots(nrows=2, ncols=3, figsize=(16, 10)) |
|
134 | 134 | coeffs['ice_gt']+coeffs['snowline_gt']+coeffs['snow_gt']- |
135 | 135 | (coeffs['ice_gt_std']+coeffs['snowline_gt_std']+coeffs['snow_gt_std']), |
136 | 136 | zorder=1, color=c4, alpha=0.2) |
137 | | -ax3.legend(fontsize=13) |
138 | 137 | ax3.set_yticklabels([]) |
139 | 138 | ax3.axhline(y=1600, ls='dashed', color='k', zorder=1, alpha=0.5) |
140 | 139 | ax3.set_xlim(0, 8.5) |
|
184 | 183 |
|
185 | 184 | ax1.set_xlabel('Radiative forcing (W m$^{-2}$)', fontsize=14) |
186 | 185 | ax2.set_xlabel('Ice sheet area (km$^2$)', fontsize=14) |
187 | | -ax3.set_xlabel('Meltwater melt (Gt yr$^{-1}$)', fontsize=14) |
| 186 | +ax3.set_xlabel('Meltwater production (Gt yr$^{-1}$)', fontsize=14) |
188 | 187 | ax4.set_xlabel('Radiative forcing (W m$^{-2}$)', fontsize=14) |
189 | 188 | ax5.set_xlabel('Meltwater production (mm w.e. d$^{-1}$)', fontsize=14) |
190 | 189 | ax6.set_xlabel('Meltwater production (Gt yr$^{-1}$)', fontsize=14) |
|
204 | 203 | ax5.text(0.03, 0.89, "e", fontsize=24, transform=ax5.transAxes) |
205 | 204 | ax6.text(0.03, 0.89, "f", fontsize=24, transform=ax6.transAxes) |
206 | 205 |
|
207 | | -fig.savefig(savepath + 'radiative-forcing-elevation.png', dpi=200) |
| 206 | +ax1.set_xlim(0, 100) |
| 207 | +ax4.set_xlim(0, 100) |
| 208 | +ax3.set_xlim(0, 8.6) |
| 209 | +ax6.set_xlim(0, 8.6) |
| 210 | + |
| 211 | +fig.savefig(savepath + 'fig2.png', dpi=300) |
208 | 212 |
|
209 | 213 |
|
210 | 214 | #%% |
|
341 | 345 | all_gt_max = np.sum(coeffs['ice_gt_max']) + np.sum(coeffs['snowline_gt_max']) + np.sum(coeffs['snow_gt_max']) |
342 | 346 |
|
343 | 347 |
|
| 348 | +#%% |
| 349 | + |
| 350 | +fig, ((ax1, ax2, ax3), (ax4, ax5, ax6)) = plt.subplots(nrows=2, ncols=3, figsize=(16, 10)) |
| 351 | + |
| 352 | +# Define colour map |
| 353 | +c1 = '#E05861' |
| 354 | +c2 = '#616E96' |
| 355 | +c3 = '#F8A557' |
| 356 | +c4 = '#3CBEDD' |
| 357 | + |
| 358 | +ax1.plot(ice+snowline+snow, elevations[:-1], color=c4, zorder=2, lw=2, |
| 359 | + alpha=0.8, label='Surface radiative forcing') |
| 360 | +ax1.fill_betweenx(elevations[:-1], |
| 361 | + ice+snowline+snow+ice_std+snowline_std+snow_std, |
| 362 | + ice+snowline+snow-(ice_std+snowline_std+snow_std), |
| 363 | + zorder=1, color=c4, alpha=0.2) |
| 364 | +ax1.axhline(y=1600, ls='dashed', color='k', zorder=1, alpha=0.5) |
| 365 | +ax1.legend(fontsize=13) |
| 366 | +ax1.set_xlim(0, 100) |
| 367 | + |
| 368 | +ax2.barh(range(len(area)), area, align='edge', alpha=0.4, color=c4, edgecolor='k') |
| 369 | +ax2.set_ylim(0,17) |
| 370 | +ax2.grid(linestyle='dotted', lw=1, zorder=1) |
| 371 | +ax2.tick_params(axis='both', which='major', labelsize=13) |
| 372 | +ax2.set_yticklabels([]) |
| 373 | + |
| 374 | +#ax3.plot(coeffs['melt_gt'], elevations[:-1], color=c4, zorder=2, |
| 375 | +# lw=2, alpha=0.8, label='Total') |
| 376 | +ax3.plot(coeffs['ice_gt']+coeffs['snowline_gt']+coeffs['snow_gt'], |
| 377 | + elevations[:-1], color=c4, zorder=2, |
| 378 | + lw=2, alpha=0.8, label='') |
| 379 | +ax3.fill_betweenx(elevations[:-1], |
| 380 | + coeffs['ice_gt']+coeffs['snowline_gt']+coeffs['snow_gt']+ |
| 381 | + coeffs['ice_gt_std']+coeffs['snowline_gt_std']+coeffs['snow_gt_std'], |
| 382 | + coeffs['ice_gt']+coeffs['snowline_gt']+coeffs['snow_gt']- |
| 383 | + (coeffs['ice_gt_std']+coeffs['snowline_gt_std']+coeffs['snow_gt_std']), |
| 384 | + zorder=1, color=c4, alpha=0.2) |
| 385 | +ax3.legend(fontsize=13) |
| 386 | +ax3.set_yticklabels([]) |
| 387 | +ax3.axhline(y=1600, ls='dashed', color='k', zorder=1, alpha=0.5) |
| 388 | +ax3.set_xlim(0, 8.5) |
| 389 | + |
| 390 | +ax4.plot(snowline, elevations[:-1], color=c2, lw=2, zorder=2, alpha=0.8, label='Snowline') |
| 391 | +ax4.fill_betweenx(elevations[:-1], snowline+snowline_std, snowline-snowline_std, color=c2, zorder=1, alpha=0.2) |
| 392 | +ax4.set_xlim(0, 60) |
| 393 | +ax4.axhline(y=1600, ls='dashed', color='k', zorder=1, alpha=0.5) |
| 394 | +ax4.legend(fontsize=13) |
| 395 | + |
| 396 | +ax5.plot(coeffs['snowline'], elevations[:-1], color=c2, |
| 397 | + lw=2, zorder=2, alpha=0.8, label='Snowline') |
| 398 | +ax5.fill_betweenx(elevations[:-1], coeffs['snowline']+coeffs['snowline_std'], |
| 399 | + coeffs['snowline']-coeffs['snowline_std'], color=c2, zorder=1, alpha=0.2) |
| 400 | +ax5.set_xlim(0, 2.3) |
| 401 | +ax5.set_yticklabels([]) |
| 402 | +ax5.axhline(y=1600, ls='dashed', color='k', zorder=1, alpha=0.5) |
| 403 | + |
| 404 | +ax6.plot(coeffs['snowline_gt'], elevations[:-1], color=c2, |
| 405 | + lw=2, zorder=2, alpha=0.8, label='Snowline') |
| 406 | +ax6.fill_betweenx(elevations[:-1], coeffs['snowline_gt']+coeffs['snowline_gt_std'], |
| 407 | + coeffs['snowline_gt']-coeffs['snowline_gt_std'], color=c2, zorder=1, alpha=0.2) |
| 408 | +ax6.set_xlim(0, 4) |
| 409 | +ax6.axhline(y=1600, ls='dashed', color='k', zorder=1, alpha=0.5) |
| 410 | +ax6.set_yticklabels([]) |
| 411 | + |
| 412 | + |
| 413 | +ax1.set_xlabel('Radiative forcing (W m$^{-2}$)', fontsize=14) |
| 414 | +ax2.set_xlabel('Ice sheet area (km$^2$)', fontsize=14) |
| 415 | +ax3.set_xlabel('Meltwater melt (Gt yr$^{-1}$)', fontsize=14) |
| 416 | +ax4.set_xlabel('Radiative forcing (W m$^{-2}$)', fontsize=14) |
| 417 | +ax5.set_xlabel('Meltwater production (mm w.e. d$^{-1}$)', fontsize=14) |
| 418 | +ax6.set_xlabel('Meltwater production (Gt yr$^{-1}$)', fontsize=14) |
| 419 | + |
| 420 | +ax1.set_ylabel('Elevation (m a.s.l.)', fontsize=14) |
| 421 | +ax4.set_ylabel('Elevation (m a.s.l.)', fontsize=14) |
| 422 | + |
| 423 | +for ax in [ax1, ax3, ax4, ax5, ax6]: |
| 424 | + ax.grid(linestyle='dotted', lw=1, zorder=1) |
| 425 | + ax.tick_params(axis='both', which='major', labelsize=13) |
| 426 | + ax.set_ylim(0, 3400) |
| 427 | + |
| 428 | +ax1.text(0.03, 0.89, "a", fontsize=24, transform=ax1.transAxes) |
| 429 | +ax2.text(0.03, 0.87, "b", fontsize=24, transform=ax2.transAxes) |
| 430 | +ax3.text(0.03, 0.89, "c", fontsize=24, transform=ax3.transAxes) |
| 431 | +ax4.text(0.03, 0.89, "d", fontsize=24, transform=ax4.transAxes) |
| 432 | +ax5.text(0.03, 0.89, "e", fontsize=24, transform=ax5.transAxes) |
| 433 | +ax6.text(0.03, 0.89, "f", fontsize=24, transform=ax6.transAxes) |
| 434 | + |
| 435 | +#fig.savefig(savepath + 'radiative-forcing-snowline.png', dpi=200) |
344 | 436 |
|
345 | 437 |
|
346 | 438 |
|
|
0 commit comments