Ticket #773 (closed defect: fixed)

Opened 12 years ago

Last modified 12 years ago

subsetToGridSeries cannot handle longitude wrap-around

Reported by: spascoe Owned by: domlowe
Priority: blocker Milestone: PROD Step1
Component: CSML Version:
Keywords: Cc:

Description

If a variable is defined on the domain longitude=(0,360) subsetToGridSeries will fail if longitude=(-180,180) is selected.

Commit [2587] was supposed to fix this but I still get a failure. E.g. on a feature in the DDC data granule "clim_10.csml":

>>> d = csml.parser.Dataset()
>>> d.parse('clim_10.csml')
>>> f = d.getFeature(d.getFeatureList()[0])
>>> f.subsetToGridSeries(outputdir='.', ncname='tmp.nc', time='1915-09-15T00:00:00.0', longitude=(-180, 180), latitude=(-90,90))
...
['cld']
subsetting
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/research/saturn2/spascoe/svn/csml_trunk/csml/API/ops_GridSeriesFeature.py", line 224, in subsetToGridSeries
    nc.genWriteVar(self.name.CONTENT,ords, times, caltype, axislist, units, fulldata, fillvalue)
  File "/research/saturn2/spascoe/svn/csml_trunk/csml/csmllibs/netCDFWriter.py", line 134, in genWriteVar
    self.addVariable(fulldata,varid, axisorder, fillvalue, units=unitlist[-1] ) #to do, units attribute for CF compliance
  File "/research/saturn2/spascoe/svn/csml_trunk/csml/csmllibs/netCDFWriter.py", line 76, in addVariable
    dataarray.setAxis(axisCount,ax)
  File "/usr/lib/python2.4/site-packages/cdat_lite-4.1.2_0.2.2-py2.4-linux-i686.egg/cdms/tvariable.py", line 148, in setAxis
    raise CDMSError,"axis length %d does not match corresponding dimension %d"%(len(axis),axislen)
cdms.error.CDMSError: axis length 721 does not match corresponding dimension 1

Change History

comment:1 Changed 12 years ago by domlowe

  • Status changed from new to closed
  • Resolution set to fixed

Fixed in [2598].

Note: See TracTickets for help on using tickets.