-
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: datawc does not work on a time axis.
This happened because datawc is converted to cdtime.reltime type.
- Loading branch information
Showing
3 changed files
with
52 additions
and
12 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import cdms2, os, sys, vcs, cdtime, testing.regression as regression | ||
|
||
# Test that we can restrict the plot using datawc along a time axis | ||
dataFile = cdms2.open(os.path.join(vcs.sample_data, "clt.nc")) | ||
clt = dataFile("clt") | ||
clt = clt(latitude=(-90.0, 90.0), longitude=(0.), squeeze=1, | ||
time=('1979-1-1 0:0:0.0', '1988-12-1 0:0:0.0')) | ||
|
||
# Initialize canvas: | ||
canvas = regression.init() | ||
|
||
# Create and plot quick boxfill with default settings: | ||
boxfill=canvas.createboxfill() | ||
|
||
# Change the type | ||
boxfill.boxfill_type = 'custom' | ||
boxfill.datawc_y1 = 12 | ||
|
||
canvas.plot(clt, boxfill, bg=1) | ||
|
||
# Load the image testing module: | ||
# Create the test image and compare: | ||
regression.run(canvas, "test_vcs_boxfill_datawc_time.png") |