Check for point source release#600
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is
@@ Coverage Diff @@
## main #600 +/- ##
==========================================
- Coverage 89.47% 89.39% -0.08%
==========================================
Files 28 28
Lines 6130 6141 +11
Branches 1093 1096 +3
==========================================
+ Hits 5485 5490 +5
- Misses 365 369 +4
- Partials 280 282 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Some plotting near the coasts shows up all gray when using
cdr_forcing.plot_distribution(). When the release will be treated as a point source in ROMS, it causes issues when trying to visualize. Two issues are addressed and changed as follows:Currently, RT considers cells with > 1e-3 a fraction of the total. If the all cell fractions are < 1e-3, the integral of the field sums to 0. This results in a distribution of all nans (when all values are normalized by the integral - in this case, divided by 0). This PR checks if any cells have fraction > 1e-3, if none, then the release is treated as a point source.
If hsc (horizont scaling for the gaussian) is too low, the function
fcn = np.exp(-((dist / hsc)^2))evaluates to 0. for values ofdist/hsc >=28fcnevaluates to 0 in python. A check is added to treat cases like this as a point source.pre-commit run --all-filesdocs/releases.md