Skip to content

Commit

Permalink
Updates to paper plotting scripts and readme
Browse files Browse the repository at this point in the history
  • Loading branch information
cjvogl committed Mar 22, 2019
1 parent aa87996 commit 5db8953
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 4 deletions.
4 changes: 3 additions & 1 deletion components/homme/scripts_for_paper/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,6 @@ As a convenience to the reader, the data folder is pre-populated with
post-processed results.

The scripts in this directory with a "plot" prefix can be used to generate the
plots in Vogl et al. (2019) from the results in the data directory.
plots in Vogl et al. "Evaluation of Implicit-Explicit Additive Runge-Kutta
Integrators for the HOMME-NH Dynamical Core" JAMES (2019) from the results in
the data directory.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@
ax.loglog(dtPlot, roundoff*np.ones(np.shape(dtPlot)), '--k', label=None, linewidth=2)

# finalize plots and save without legend but show with legend
x = np.array([6e-3, 9e-2])
ax.loglog(x, (3e-10/x[0]**2)*x**2, '-', color='tab:gray', linewidth=3)
x = np.array([1e-1, 5e-1])
ax.loglog(x, (3e-10/x[0]**3)*x**3, '--', color='tab:gray', linewidth=3)
x = np.array([4e-1, 1.5])
ax.loglog(x, (3e-10/x[0]**4)*x**4, '-.', color='tab:gray', linewidth=3)

ax.set_ylabel('maximum relative error', fontsize='xx-large')
ax.set_xlabel('dt (s)', fontsize='xx-large')
ax.set_xlim(6e-4,7e0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@
ax.loglog(dtPlot, roundoff*np.ones(np.shape(dtPlot)), '--k', label=None, linewidth=2)

# finalize plots and save without legend but show with legend
x = np.array([6e-3, 1])
ax.loglog(x, (3e-10/x[0])*x, ':', color='tab:gray', linewidth=3)

ax.set_ylabel('maximum relative error', fontsize='xx-large')
ax.set_xlabel('dt (s)', fontsize='xx-large')
ax.set_xlim(6e-4,7e0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,34 @@
f1, ax1 = pyplot.subplots(figsize=(10,5))
f2, ax2 = pyplot.subplots(figsize=(10,5))
f3, ax3 = pyplot.subplots(figsize=(10,5))
bmap = Basemap(lon_0=180)

tmp = np.loadtxt('./data/surface_pressure_reference_data.txt')
X = tmp[0:256:]
Y = tmp[256:512,:]
val = tmp[512:768,:]

bmap = Basemap(projection='robin', lon_0=180)
X,Y = bmap(X,Y)
bmap.ax = ax1
tmp = bmap.pcolor(X, Y, val, cmap='bwr', vmin=-10, vmax=10)
cb = f1.colorbar(tmp, ax=ax1)
bmap.drawcoastlines()
#bmap.drawcoastlines(color='tab:gray')
bmap.drawmeridians(np.arange(0,360,60))
bmap.drawparallels(np.arange(-90,90,60))

tmp = np.loadtxt('./data/surface_pressure_tolerance_spatial_data.txt')
X = tmp[0:256:]
Y = tmp[256:512,:]
val = tmp[512:768,:]

bmap = Basemap(projection='robin', lon_0=180)
X,Y = bmap(X,Y)
bmap.ax = ax2
tmp = bmap.pcolor(X, Y, val, cmap='bwr', vmin=-0.05, vmax=0.05)
f2.colorbar(tmp, ax=ax2)
bmap.drawcoastlines()
#bmap.drawcoastlines(color='tab:gray')
bmap.drawmeridians(np.arange(0,360,60))
bmap.drawparallels(np.arange(-90,90,60))

tmp = np.loadtxt('./data/surface_pressure_tolerance_rms_data.txt')
t = tmp[0,:]
Expand Down

0 comments on commit 5db8953

Please sign in to comment.