Single lat-lon point from CDS API

I’m trying understand what the extraction of single latitude-longitude points from the CDS API produces. The value returned in the dataset when the area selected is limited to 1 point appears to be from linear interpolation, but it doesn’t always agree well with the expected linear interpolation value from metview for example. Can someone please help me understand what type of interpolation is performed when a 1-point sub-area is queried?

Here is a snippet of code that illustrates the situation:

import cdsapi
import metview as mv

# Select a locations as a lat, lon pair
loc_1  = (46.2379989624, 6.109000206)

# Obtain a grib file for a day from the 
# CDS ERA5 dataset through the API
c = cdsapi.Client()

c.retrieve(
    'reanalysis-era5-single-levels',
    {
        'product_type': 'reanalysis',
        'format': 'grib',
        'variable': '2m_temperature',
        'year': '2022',
        'month': '01',
        'day': '12',
        'time': [
            '00:00', '01:00', '02:00',
            '03:00', '04:00', '05:00',
            '06:00', '07:00', '08:00',
            '09:00', '10:00', '11:00',
            '12:00', '13:00', '14:00',
            '15:00', '16:00', '17:00',
            '18:00', '19:00', '20:00',
            '21:00', '22:00', '23:00',
        ],
        'area': [
            90, -180, -90,
            180,
        ],
    },
    'cds_2t_20220112_area.grib')

c.retrieve(
    'reanalysis-era5-single-levels',
    {
        'product_type': 'reanalysis',
        'format': 'grib',
        'variable': '2m_temperature',
        'year': '2022',
        'month': '01',
        'day': '12',
        'time': [
            '00:00', '01:00', '02:00',
            '03:00', '04:00', '05:00',
            '06:00', '07:00', '08:00',
            '09:00', '10:00', '11:00',
            '12:00', '13:00', '14:00',
            '15:00', '16:00', '17:00',
            '18:00', '19:00', '20:00',
            '21:00', '22:00', '23:00',
        ],
        'area': [
            loc_1[0], loc_1[1],
            loc_1[0], loc_1[1],
        ],
    },
    'cds_2t_20220112_point_1.grib')


# Load the datasets into metview
# Full grid
t = mv.read('cds_2t_20220112_area.grib')
# Single point
t_p1 = mv.read('cds_2t_20220112_point_1.grib')


# Compare the value for the first time slice
# from the donwloaded one-point dataset and 
# linear interpolation from the full dataset
zero_area_loc_1 = t_p1[0]

interp_loc_1 = mv.interpolate(t[0], loc_1)

difference_loc_1 = interp_loc_1 - zero_area_loc_1['2t'].values()[0]

print(f'Loc 1 difference: {difference_loc_1}')
1 Like