Skip to content

Commit

Permalink
Update based on PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
SorooshMani-NOAA committed Dec 19, 2023
1 parent 5364e2c commit e800654
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions ensembleperturbation/plotting/surrogate.py
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ def plot_selected_probability_fields(
node_prob_field['y'].max(),
]
)
vmax = numpy.round_(levels.sel(source='model').quantile(0.98), decimals=1)
vmax = 1.0
vmin = 0.0
for lvl in level_list:
figure = pyplot.figure()
Expand Down Expand Up @@ -621,15 +621,15 @@ def plot_selected_probability_fields(
axis=map_axis,
add_colorbar=False,
levels=numpy.linspace(vmin, vmax, 25 + 1),
extend='both',
extend='neither',
)

map_axis.set_xlim(xlim)
map_axis.set_ylim(ylim)

pyplot.subplots_adjust(wspace=0.02, right=0.96)
cax = pyplot.axes([0.95, 0.55, 0.015, 0.3])
cbar = figure.colorbar(im, extend='both', cax=cax)
cbar = figure.colorbar(im, extend='neither', cax=cax)

if output_directory is not None:
figure.savefig(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,7 @@ def probability_field_from_surrogate(
)

# before evaluating prob. field for model set null water elevation to the ground elevation
training_set = numpy.fmax(training_set, -training_set['depth'])
#training_set = numpy.fmax(training_set, -training_set['depth'])
if minimum_allowable_value is not None:
too_small = (training_set + training_set['depth']).values < minimum_allowable_value
training_set.values[too_small] = numpy.nan
Expand Down

0 comments on commit e800654

Please sign in to comment.