Skip to content

'TransientCurveGrid' object has no attribute 'getWeights' #23

Description

@yyplanton

Hi,
I am trying to use the cdutil.averager function on cmip5 datasets.
Out of 43 models tested, 6 (BBC and GFDL models) return the same error when averaging oceanic variables (like 'tos')
I am using Transient Variables (MV2s) so weights must be generated:
Traceback (most recent call last):
File "test.py", line 15, in
d_ave_xy = CDUTILaverager(tos, axis='xy')
File "/usr/local/uvcdat/2.4.0/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/genutil/averager.py", line 1078, in averager
filled_wtoptions = __check_weightoptions(V, axis, weights)
File "/usr/local/uvcdat/2.4.0/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/genutil/averager.py", line 359, in __check_weightoptions
weightoptions = area_weights(x,axisoptions)
File "/usr/local/uvcdat/2.4.0/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/genutil/averager.py", line 159, in area_weights
latwts, lonwts = dsgr.getWeights()
AttributeError: 'TransientCurveGrid' object has no attribute 'getWeights'

Here is the grid:

tos.getGrid()
<TransientCurveGrid, id: grid_1, shape: (232, 360)>

I do not have the same problem when using other TransientCurveGrid models like CNRM-CM5

Models returning errors:
bcc-csm1-1-m, bcc-csm1-1, GFDL-CM2p1, GFDL-CM3, GFDL-ESM2G, GFDL-ESM2M
A common point between these models is that they use GFDL’s Modular Ocean Model (MOM) or Generalized Ocean Layer Dynamics (GOLD) (only GFDL-ESM2G).

Is there a problem with GFDL's ocean models? Is this error known?

Thanks
Yann

Activity

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

Metadata

Metadata

Assignees

Labels

kind/bugBug in the software

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions