Different values are returned using keywords to select data versus using cdms.selector.Selector()
i.e.
If I want the data in the longitude range (350, 10)
Using keywords returns values at 350.625 to 9.375, which is as expected (as I would expect).
>>> request={'latitude': (0, 20), 'longitude': (350, 10, 'ccb'), 'time': ('2024-1-15T0:0:0.0', '2024-8-15T0:0:0.0')}
>>> subset=f('pre', **request)
>>> subset.getAxis(2)
id: longitude
Designated a longitude axis.
units: degrees_east
Length: 92
First: 350.625
Last: 9.375
Other axis attributes:
axis: X
modulo: [ 360.,]
topology: linear
Python id: -0x490bbeb4
Using a Selector() returns 346.874 to 13.125:
>>> request={'latitude': (0, 20), 'longitude': (350, 10), 'time': ('2024-1-15T0:0:0.0', '2024-8-15T0:0:0.0')}
>>> sel=cdms.selectors.Selector(**request)
>>> subset=f('pre', sel)
>>> subset.getAxis(2)
id: longitude
Designated a longitude axis.
units: degrees_east
Length: 90
First: 346.875
Last: 13.125
Other axis attributes:
axis: X
modulo: [ 360.,]
topology: linear
Python id: -0x490bb154
I can get the same values by using 'ccb' as the 'mysterious 3rd argument' detailed here: http://www-pcmdi.llnl.gov/software-portal/cdat/tips_and_tricks/file_IO/third_argument.html/?searchterm=ccn
i.e.
>>> request={'latitude': (0, 20), 'longitude': (350, 10, 'ccb'), 'time': ('2024-1-15T0:0:0.0', '2024-8-15T0:0:0.0')}
But it seems to me that the default behavior of both mechanisms should be the same?
Regards
Dominic Lowe (BADC)
Logged In: NO
From: d.lowe at rl.ac.uk