cedadev / cis

Home of the Community Intercomparison Suite.
www.cistools.net
GNU Lesser General Public License v3.0
46 stars 18 forks source link

Incorrect collocation for decreasing latitude coordinate #26

Open duncanwp opened 4 years ago

duncanwp commented 4 years ago

Given a cube with a decreasing latitude (Dim) coordinate Gridded to Ungridded collocation gives incorrect values. The following can reproduce this:

clwc=cis.read_data('test.nc', 'clwc')
points = hyperpoint.HyperPointList([hyperpoint.HyperPoint(lat=-25.8,
                                        lon=-19,val=0)])
res_cis = clwc.collocated_onto(ungridded_data.UngriddedData.from_points_array(points), missing_data_for_missing_sample=False)
assert res_cis[0].data[0] == 0.16651

Using the attached test file.