Skip to content

Commit

Permalink
Swap order of elev model cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
SorooshMani-NOAA committed Dec 19, 2023
1 parent 4d82917 commit 5364e2c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -673,10 +673,10 @@ 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'])
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
training_set = numpy.fmax(training_set, -training_set['depth'])

ds1, ds2 = xarray.broadcast(training_set, surrogate_prob_field['level'])
modeled_prob_field = (ds1 >= ds2).sum(dim='run') / len(training_set.run)
Expand Down

0 comments on commit 5364e2c

Please sign in to comment.