Skip to content

Commit

Permalink
Remove outline entirely
Browse files Browse the repository at this point in the history
  • Loading branch information
xylar committed Jan 22, 2022
1 parent b6462d4 commit acbc9fa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 26 deletions.
27 changes: 2 additions & 25 deletions mpas_analysis/ocean/plot_transect_subtask.py
Original file line number Diff line number Diff line change
Expand Up @@ -445,31 +445,14 @@ def _plot_transect(self, remappedModelClimatology, remappedRefClimatology):

if remap:
triangulation_args = None
dOutlineModel = None
zOutlineModel = None
else:
triangulation_args = self._get_ds_triangulation(
remappedModelClimatology)
dOutlineModel, zOutlineModel = \
get_outline_segments(remappedModelClimatology)

if self.controlConfig is None:
dOutlineRef = None
zOutlineRef = None
dOutlineDiff = None
zOutlineDiff = None
else:
dOutlineRef = dOutlineModel
zOutlineRef = zOutlineModel
dOutlineDiff = dOutlineModel
zOutlineDiff = zOutlineModel

if remappedRefClimatology is None:
refOutput = None
bias = None
else:
# todo: add a check to make sure the reference is on the same MPAS
# mesh
refOutput = remappedRefClimatology[self.refFieldName]
bias = modelOutput - refOutput

Expand Down Expand Up @@ -588,12 +571,6 @@ def _plot_transect(self, remappedModelClimatology, remappedRefClimatology):
xCoords=xs,
zCoord=z,
triangulation_args=triangulation_args,
xOutlineModel=dOutlineModel,
zOutlineModel=zOutlineModel,
xOutlineRef=dOutlineRef,
zOutlineRef=zOutlineRef,
xOutlineDiff=dOutlineDiff,
zOutlineDiff=zOutlineDiff,
colorbarLabel=self.unitsLabel,
xlabels=xLabels,
ylabel=yLabel,
Expand All @@ -606,6 +583,7 @@ def _plot_transect(self, remappedModelClimatology, remappedRefClimatology):
invertYAxis=False,
backgroundColor='#d9bf96',
invalidColor='#d9bf96',
outlineValid=False,
xLim=self.horizontalBounds,
yLim=self.verticalBounds,
compareAsContours=compareAsContours,
Expand Down Expand Up @@ -636,8 +614,7 @@ def _plot_transect(self, remappedModelClimatology, remappedRefClimatology):
mask = ssh < 0.
for ax in axes:
ax.fill_between(d, ssh, numpy.zeros(ssh.shape), where=mask,
interpolate=True, color=color,
edgecolor='black', linewidth=1.)
interpolate=True, color=color)

# make a red start axis and green end axis to correspond to the dots
# in the inset
Expand Down
3 changes: 2 additions & 1 deletion mpas_analysis/shared/plot/vertical_section.py
Original file line number Diff line number Diff line change
Expand Up @@ -928,7 +928,8 @@ def plot_vertical_section(
# also outline the domain if provided
plt.plot(xOutline, zOutline, color='black', linewidth=1)
else:
# do a contour to outline the boundary between valid and invalid values
# do a contour to outline the boundary between valid and invalid
# values
landMask = np.isnan(field.values).ravel()
plt.tricontour(unmaskedTriangulation, landMask, levels=[0.0001],
colors='black', linewidths=1)
Expand Down

0 comments on commit acbc9fa

Please sign in to comment.