Skip to content

Commit

Permalink
Tweaks to ice shelf figures
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaitlin Naughten committed Aug 9, 2017
1 parent 25070e1 commit 302343e
Show file tree
Hide file tree
Showing 10 changed files with 248 additions and 65 deletions.
12 changes: 12 additions & 0 deletions file_guide.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1436,6 +1436,18 @@ mip_iceshelf_figures.py: This is the giant monster script to generate 8
GridSpec arguments, colourbar axes, etc. so
that the positioning looks okay.

mip_seasonal_cycle.py: Calculate the average amplitude of the seasonal cycle in
total basal mass loss over 2002-2016, in MetROMS, low-res
FESOM, and high-res FESOM. Print results to the screen.
To run: First make sure you have run
timeseries_massloss.py for the entire MetROMS
simulation, and the equivalent fesomtools
script for both FESOM simulations. Then open
python or ipython and type
"run mip_seasonal_cycle.py". The script will
prompt you for the paths to the
timeseries_massloss logfiles for each simulation.


***UTILITY FUNCTIONS***

Expand Down
18 changes: 12 additions & 6 deletions mip_aice_minmax_nsidc.py
Original file line number Diff line number Diff line change
Expand Up @@ -306,15 +306,17 @@ def mip_aice_minmax_nsidc (cice_file, cice_log, fesom_mesh_path, fesom_output_di
img = pcolor(nsidc_x, nsidc_y, nsidc_feb, vmin=0, vmax=1, cmap='jet')
xlim([bdry1, bdry2])
ylim([bdry3, bdry4])
axis('off')
ax.set_xticks([])
ax.set_yticks([])
title('NSIDC', fontsize=24)
text(-39, 0, 'February', fontsize=24, ha='right')
# MetROMS, February
ax = subplot(gs1[0, 1], aspect='equal')
img = pcolor(cice_x, cice_y, cice_feb, vmin=0, vmax=1, cmap='jet')
xlim([bdry1, bdry2])
ylim([bdry3, bdry4])
axis('off')
ax.set_xticks([])
ax.set_yticks([])
title('MetROMS', fontsize=24)
# FESOM, February
ax = subplot(gs1[0, 2], aspect='equal')
Expand All @@ -325,7 +327,8 @@ def mip_aice_minmax_nsidc (cice_file, cice_log, fesom_mesh_path, fesom_output_di
ax.add_collection(img)
xlim([bdry1, bdry2])
ylim([bdry3, bdry4])
axis('off')
ax.set_xticks([])
ax.set_yticks([])
title('FESOM (high-res)', fontsize=24)
# Main title
text(-170, 47, 'a) Sea ice concentration ('+str(start_year)+'-'+str(end_year)+' average)', fontsize=30)
Expand All @@ -334,14 +337,16 @@ def mip_aice_minmax_nsidc (cice_file, cice_log, fesom_mesh_path, fesom_output_di
img = pcolor(nsidc_x, nsidc_y, nsidc_sep, vmin=0, vmax=1, cmap='jet')
xlim([bdry1, bdry2])
ylim([bdry3, bdry4])
axis('off')
ax.set_xticks([])
ax.set_yticks([])
text(-39, 0, 'September', fontsize=24, ha='right')
# MetROMS, September
ax = subplot(gs1[1, 1], aspect='equal')
img = pcolor(cice_x, cice_y, cice_sep, vmin=0, vmax=1, cmap='jet')
xlim([bdry1, bdry2])
ylim([bdry3, bdry4])
axis('off')
ax.set_xticks([])
ax.set_yticks([])
# FESOM, September
ax = subplot(gs1[1, 2], aspect='equal')
img = PatchCollection(patches, cmap='jet')
Expand All @@ -351,7 +356,8 @@ def mip_aice_minmax_nsidc (cice_file, cice_log, fesom_mesh_path, fesom_output_di
ax.add_collection(img)
xlim([bdry1, bdry2])
ylim([bdry3, bdry4])
axis('off')
ax.set_xticks([])
ax.set_yticks([])
# Add a colourbar at the bottom
cbaxes = fig.add_axes([0.26, 0.04, 0.3, 0.04])
cbar = colorbar(img, orientation='horizontal', ticks=arange(0,1+0.25,0.25), cax=cbaxes)
Expand Down
9 changes: 6 additions & 3 deletions mip_grid_res.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ def mip_grid_res (roms_grid_file, fesom_mesh_low, fesom_mesh_high, save=False, f
pcolor(roms_x, roms_y, roms_res, vmin=limits[0], vmax=limits[1], cmap='jet')
xlim([-lat_max, lat_max])
ylim([-lat_max, lat_max])
axis('off')
ax1.set_xticks([])
ax1.set_yticks([])
title('a) MetROMS', fontsize=28)
# FESOM low-res
ax2 = fig.add_subplot(1,3,2, aspect='equal')
Expand All @@ -80,7 +81,8 @@ def mip_grid_res (roms_grid_file, fesom_mesh_low, fesom_mesh_high, save=False, f
ax2.add_collection(img_low)
xlim([-lat_max, lat_max])
ylim([-lat_max, lat_max])
axis('off')
ax2.set_xticks([])
ax2.set_yticks([])
title('b) FESOM low-res', fontsize=28)
# FESOM high-res
ax3 = fig.add_subplot(1,3,3, aspect='equal')
Expand All @@ -91,7 +93,8 @@ def mip_grid_res (roms_grid_file, fesom_mesh_low, fesom_mesh_high, save=False, f
ax3.add_collection(img_high)
xlim([-lat_max, lat_max])
ylim([-lat_max, lat_max])
axis('off')
ax3.set_xticks([])
ax3.set_yticks([])
title('c) FESOM high-res', fontsize=28)
cbaxes = fig.add_axes([0.92, 0.2, 0.01, 0.6])
cbar = colorbar(img_high, cax=cbaxes, extend='max', ticks=arange(limits[0], limits[1]+5, 5))
Expand Down
21 changes: 13 additions & 8 deletions mip_hi_seasonal.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,11 @@
# "fesomtools" repository
def mip_hi_seasonal (cice_seasonal_file, fesom_mesh_path, fesom_seasonal_file):

# Northern boundary of plot 50S
nbdry = -50 + 90
# Boundaries on plot (under polar coordinate transformation)
x_min = -36.25
x_max = 36.25
y_min = -34.5
y_max = 38
# Degrees to radians conversion factor
deg2rad = pi/180.0
# FESOM parameters
Expand Down Expand Up @@ -89,19 +92,21 @@ def mip_hi_seasonal (cice_seasonal_file, fesom_mesh_path, fesom_seasonal_file):
if season == 0:
text(-43, 0, 'MetROMS', fontsize=24, ha='right')
title(season_names[season], fontsize=24)
xlim([-nbdry, nbdry])
ylim([-nbdry, nbdry])
axis('off')
xlim([x_min, x_max])
ylim([y_min, y_max])
ax.set_xticks([])
ax.set_yticks([])
# FESOM
ax = fig.add_subplot(2, 4, season+5, aspect='equal')
img = PatchCollection(patches, cmap='jet')
img.set_array(fesom_hi[season,:])
img.set_clim(vmin=bounds[0], vmax=bounds[1])
img.set_edgecolor('face')
ax.add_collection(img)
xlim([-nbdry, nbdry])
ylim([-nbdry, nbdry])
axis('off')
xlim([x_min, x_max])
ylim([y_min, y_max])
ax.set_xticks([])
ax.set_yticks([])
if season == 0:
text(-43, 0, 'FESOM', fontsize=24, ha='right')
text(-43, -10, '(high-res)', fontsize=24,ha='right')
Expand Down
Loading

0 comments on commit 302343e

Please sign in to comment.