Skip to content

oned plots wrong when levels are flipped #832

@doutriaux1

Description

@doutriaux1

1000 level in following is 288 but shown as last level 231

>>> f=cdms2.open("/lgm/uvcdat/2014-10-21/sample_data/ta_ncep_87-6-88-4.nc")
>>> s=f("ta")
>>> cdutil.times.setTimeBoundsMonthly(s)
>>> prof = cdutil.averager(s,axis="tyx")
>>> prof
variable_24
masked_array(data = [288.27231405034973 284.30932052620835 280.88756235862184
 273.35591865742265 266.73424715080756 258.37956505472926
 247.78358085521606 233.96956653769485 226.5883521449616 219.84668430531468
 213.02949950621755 206.60788661421552 207.7630171842873 211.58796476699297
 217.42072196420935 221.91150441968372 231.46751381742072],
             mask = [False False False False False False False False False False False False
 False False False False False],
       fill_value = 1.00000002004e+20)


>>> prof.getLevel()[:]
array([ 1000.,   925.,   850.,   700.,   600.,   500.,   400.,   300.,
         250.,   200.,   150.,   100.,    70.,    50.,    30.,    20.,
          10.], dtype=float32)
>>> x.plot(prof)
<vcs.displayplot.Dp object at 0x7fc4193e73d0>
>>> x.png("bad_profile")

bad_profile

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions