File tree Expand file tree Collapse file tree 2 files changed +79
-0
lines changed
Expand file tree Collapse file tree 2 files changed +79
-0
lines changed Original file line number Diff line number Diff line change @@ -291,6 +291,12 @@ cdat_add_test(vcs_test_taylor_2_quads
291291 ${cdat_SOURCE_DIR} /testing/vcs/test_vcs_canvas_background_update.py
292292 "${BASELINE_DIR} /test_canvas_background_update.png"
293293 )
294+ cdat_add_test (vcs_test_boxfill_decreasing_latitude
295+ "${PYTHON_EXECUTABLE} "
296+ ${cdat_SOURCE_DIR} /testing/vcs/test_boxfill_decreasing_latitude.py
297+ "${BASELINE_DIR} /test_vcs_boxfill_decreasing_latitude.png"
298+ "${UVCDAT_GIT_TESTDATA_DIR} /data/decreasing_latitude.nc"
299+ )
294300 cdat_add_test (vcs_test_boxfill_10x10_numpy
295301 "${PYTHON_EXECUTABLE} "
296302 ${cdat_SOURCE_DIR} /testing/vcs/test_boxfill_10x10_numpy.py
Original file line number Diff line number Diff line change 1+ #!/usr/bin/env python
2+ import cdms2
3+ import cdutil
4+ import os
5+ import sys
6+ import vcs
7+
8+ pth = os .path .join (os .path .dirname (__file__ ),".." )
9+ sys .path .append (pth )
10+ import checkimage
11+
12+ f = cdms2 .open (sys .argv [2 ])
13+ ice = f ("variable_6" )
14+ x = vcs .init ()
15+
16+ #gm = x.createisofill()
17+ #gm.label = "y"
18+ gm = x .createboxfill ()
19+ gm .boxfill_type = "custom"
20+
21+ tmpl = x .createtemplate ()
22+ #tmpl.blank()
23+ tmpl .data .priority = 1
24+ tmpl .data .x1 = .05
25+ tmpl .data .x2 = .95
26+ tmpl .data .y1 = .05
27+ tmpl .data .y2 = .90
28+ tmpl .title .priority = 1
29+ tmpl .box2 .priority = 1
30+ tmpl .box2 .x1 = .23
31+ tmpl .box2 .x2 = .815
32+ tmpl .box2 .y1 = .11
33+ tmpl .box2 .y2 = .895
34+ tmpl .title .x = .5
35+ tmpl .title .y = .95
36+
37+ tmpl .legend .priority = 1
38+ tmpl .legend .x1 = tmpl .box2 .x1 - .05
39+ tmpl .legend .x2 = tmpl .box2 .x2 + .05
40+ tmpl .legend .y1 = .03
41+ tmpl .legend .y2 = .055
42+ tmpl .max .priority = 1
43+
44+ #tmpl.crdate.priority=1
45+ #tmpl.crdate.x=.8
46+ #tmpl.crdate.y=.95
47+ txt = x .createtext ()
48+ txt .height = 20
49+ #txt.color=242
50+ txt .valign = "half"
51+ txt .halign = "center"
52+
53+ tmpl .title .textorientation = txt .To_name
54+ tmpl .title .texttable = txt .Tt_name
55+
56+ ice .long_name = "September sea ice fraction: 4xCO2 climate, no ocean albedo alteration "
57+ levs = vcs .mkscale (ice .min (),ice .max ())
58+
59+ cols = vcs .getcolors (levs )
60+ cols [0 ]= 240
61+
62+ gm .levels = levs
63+ gm .fillareacolors = cols
64+ #gm.projection="polar"
65+ gm .datawc_y2 = 30
66+ gm .datawc_y1 = 90
67+
68+ x .plot (ice ,gm ,tmpl ,bg = 1 )
69+ fnm = "test_boxfill_decreasing_latitude.png"
70+ x .png (fnm )
71+ ret = checkimage .check_result_image (fnm ,sys .argv [1 ],checkimage .defaultThreshold )
72+ sys .exit (ret )
73+
You can’t perform that action at this time.
0 commit comments