Skip to content

Commit

Permalink
Remove unused subroutines
Browse files Browse the repository at this point in the history
  • Loading branch information
cbegeman committed Jul 31, 2023
1 parent 2bc3b46 commit d2ff30d
Showing 1 changed file with 0 additions and 45 deletions.
45 changes: 0 additions & 45 deletions polaris/ocean/tests/sphere_transport/process_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -491,31 +491,6 @@ def make_convergence_arrays(tcdata):
u2, o2, u3, o3, mass1, mass2, mass3


def make_filament_array(tcdata):
"""
Collects data from a set of test case runs at different resolutions
to use for convergence data analysis and plotting.
Parameters
----------
tcdata : dict
a dictionary whose keys are the resolution values for a
``sphere_transport`` test case
Returns
-------
filament : list
the "filament norm" for tracer2 at t=T/2.
See Sec. 3.3 of LSPT2012.
"""
rvals = sorted(tcdata.keys())
rvals.reverse()
filament = []
for r in rvals:
filament.append(tcdata[r]['err']['tracer2']['filament'])
return filament


def print_data_as_csv(tcname, tcdata):
"""
Print test case data in csv format
Expand Down Expand Up @@ -702,23 +677,3 @@ def plot_filament(ax, tcname, resvals, filament):
ax.set_ylim([0, 1.5])
ax.grid()
ax.legend(bbox_to_anchor=(1, 0.5), loc="center left")


def plot_over_and_undershoot_errors(
ax, tcname, resvals, u1, o1, u2, o2, u3, o3):
"""
Plots over- and under-shoot error as a function of time.
"""
if len(u1[0]) == 13:
time = np.array(range(13))
for i, r in enumerate(resvals):
ax.plot(time, u1[i], label=f'QU{r}_u1')
ax.plot(time, o1[i], label=f'QU{r}_o1')
ax.plot(time, u2[i], label=f'QU{r}_u2')
ax.plot(time, o2[i], label=f'QU{r}_o2')
ax.plot(time, u3[i], label=f'QU{r}_u3')
ax.plot(time, o3[i], label=f'QU{r}_o3')
ax.set(
title=tcname,
xlabel='time (day)',
ylabel='rel. over/undershoot')

0 comments on commit d2ff30d

Please sign in to comment.