Skip to content

Commit

Permalink
Minor fix for gridded->ungridded interpolation to ensure all the coor…
Browse files Browse the repository at this point in the history
…dinates are picked up
  • Loading branch information
duncanwp committed Aug 9, 2016
1 parent 7de92f7 commit ac7e2e7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cis/collocation/gridded_interpolation.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,11 @@ def __init__(self, _data, sample, method='linear', missing_data_for_missing_samp

sample_points = [sample.coord(c).data_flattened for c in coords]

if len(data.coords('altitude', dim_coords=False)) > 0 and sample.coords('altitude'):
if len(data.coords('altitude', dim_coords=False)) > 0 and sample.coords(standard_name='altitude'):
hybrid_coord = data.coord('altitude').points
hybrid_dims = data.coord_dims(data.coord('altitude'))
sample_points.append(sample.coord("altitude").data_flattened)
elif len(data.coords('air_pressure', dim_coords=False)) > 0 and sample.coords('air_pressure'):
elif len(data.coords('air_pressure', dim_coords=False)) > 0 and sample.coords(standard_name='air_pressure'):
hybrid_coord = data.coord('air_pressure').points
hybrid_dims = data.coord_dims(data.coord('air_pressure'))
sample_points.append(sample.coord("air_pressure").data_flattened)
Expand Down

0 comments on commit ac7e2e7

Please sign in to comment.