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

Dependency on bounds for block fill. Is it necessary? #6

Closed
bnlawrence opened this issue Oct 17, 2014 · 2 comments
Closed

Dependency on bounds for block fill. Is it necessary? #6

bnlawrence opened this issue Oct 17, 2014 · 2 comments
Assignees
Labels

Comments

@bnlawrence
Copy link
Collaborator

This code

import cf
import cfplot as cfp
#
# script generated by cfgui version 0.0.1
#
                    #
dataset=cf.read('../../Data/ggap199006200600.nc')
#
fields=[dataset[i] for i in [9]]
sfield=fields[0]
kwargs={}
kwargs['dim2']=cf.wi(-89.1415,89.1415)
kwargs['dim3']=cf.wi(0.0,358.875)
kwargs['dim0']=cf.wi(0.0,0.0)
kwargs['dim1']=cf.wi(1.0,1000.0)
sfield=sfield.subspace(**kwargs)
plotOptions={'mapset': {'proj': 'cyl'}, 'gopen': {'rows': 1, 'columns': 2}, 'nup': 2,
 'con': {'colorbar': None, 'blockfill': 1, 'fill': None, 'ylog': None, 'negative_line
style': None, 'xlog': None, 'colorbar_orientation': None, 'lines': None, 'ptype': Non
e, 'line_labels': True}}
cfp.gopen(**plotOptions['gopen'])
plotOptions['con']['title']=sfield.file
cfp.gpos(1)
plotOptions['con']['title']=' long_name:p:1000.0 '
slicer={'dim1': 1000.0}
cfp.con(sfield.subspace(**slicer),**plotOptions['con'])

generates the error

python2.7 debug.py 
Traceback (most recent call last):
  File "debug.py", line 24, in <module>
    cfp.con(sfield.subspace(**slicer),**plotOptions['con'])
  File "/usr/lib/python2.7/site-packages/cfplot/cfplot.py", line 312, in con
    if f[0].coord('lon').isbounded:
AttributeError: 'DimensionCoordinate' object has no attribute 'isbounded'
@ajheaps
Copy link
Collaborator

ajheaps commented Oct 20, 2014

Hi Bryan,

I think David changed cf-python hasbounds to isbounded a while back. If
you are using the latest cf-python then I think you shouldn't see this
error.

Cheers
Andy

On 10/17/14 21:13, Bryan Lawrence wrote:

This code

|import cf
import cfplot as cfp

script generated by cfgui version 0.0.1

                 #

dataset=cf.read('../../Data/ggap199006200600.nc')

fields=[dataset[i] for i in [9]]
sfield=fields[0]
kwargs={}
kwargs['dim2']=cf.wi(-89.1415,89.1415)
kwargs['dim3']=cf.wi(0.0,358.875)
kwargs['dim0']=cf.wi(0.0,0.0)
kwargs['dim1']=cf.wi(1.0,1000.0)
sfield=sfield.subspace(**kwargs)
plotOptions={'mapset': {'proj': 'cyl'}, 'gopen': {'rows': 1, 'columns': 2}, 'nup': 2,
'con': {'colorbar': None, 'blockfill': 1, 'fill': None, 'ylog': None, 'negative_line
style': None, 'xlog': None, 'colorbar_orientation': None, 'lines': None, 'ptype': Non
e, 'line_labels': True}}
cfp.gopen(**plotOptions['gopen'])
plotOptions['con']['title']=sfield.file
cfp.gpos(1)
plotOptions['con']['title']=' long_name:p:1000.0 '
slicer={'dim1': 1000.0}
cfp.con(sfield.subspace(**slicer),**plotOptions['con'])
|

generates the error

|python2.7 debug.py
Traceback (most recent call last):
File "debug.py", line 24, in
cfp.con(sfield.subspace(**slicer),**plotOptions['con'])
File "/usr/lib/python2.7/site-packages/cfplot/cfplot.py", line 312, in con
if f[0].coord('lon').isbounded:
AttributeError: 'DimensionCoordinate' object has no attribute 'isbounded'
|


Reply to this email directly or view it on GitHub
#6.

Andy Heaps
National Centre for Atmospheric Science (NCAS)
Meteorology Department,
Reading University,
Earley Gate,
PO Box 243,
Reading RG6 6BB,
U.K.

tel: 0118 378 7840
fax: 0118 378 8316
e-mail: [email protected]

@bnlawrence bnlawrence self-assigned this Oct 20, 2014
@bnlawrence bnlawrence added the bug label Oct 20, 2014
@ajheaps
Copy link
Collaborator

ajheaps commented Sep 19, 2016

Closed as this no longer occurs as per previous comment.

@ajheaps ajheaps closed this as completed Sep 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants