Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

oned plots wrong when levels are flipped #832

Closed
doutriaux1 opened this issue Oct 21, 2014 · 0 comments · Fixed by #834
Closed

oned plots wrong when levels are flipped #832

doutriaux1 opened this issue Oct 21, 2014 · 0 comments · Fixed by #834
Assignees
Milestone

Comments

@doutriaux1
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant