-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BUG #1947: isofill does not handle out of bounds levels correctly.
When smallest level is bigger than min scalar value or biggest level is smaller than max scalar value isofill creates the wrong image. Also, out of range (white color) was shown black.
- Loading branch information
Showing
4 changed files
with
52 additions
and
11 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import cdms2 | ||
import os | ||
import sys | ||
import testing.regression as regression | ||
import vcs | ||
|
||
data = sys.argv[2] | ||
level = sys.argv[3] | ||
levels = {'0': range(-5,36,5), | ||
'1': [-1000, -15, 35], | ||
'2': [-300, -15, 0, 15, 25]} | ||
|
||
x=regression.init(bg=1) | ||
f=cdms2.open(data) | ||
s=f("sst") | ||
iso=x.createisofill() | ||
iso.levels=levels[level] | ||
x.plot(s,iso) | ||
regression.run(x, "test_vcs_isofill_level%s.png"%level) |