Skip to content

interpolate_1d not properly working on ND arrays #2714

@dopplershift

Description

@dopplershift

While interpolate_1d advertises support for doing a 1D interpolation across a given axis for a multidimension array, this doesn't appear to be working correctly for k_index:

p = units.Quantity([850, 700, 500], 'hPa')
t = np.random.randn(3, 151, 151) * units.degC
td = np.random.randn(3, 151, 151) * units.degC

mpcalc.k_index(p[:, None, None], t, td)

returns a single value. This is caused by interpolate_1d where:

mpcalc.tools.interpolate_1d(units.Quantity([850, 700, 500],'hPa'), p[:, None, None], t, td)

also returns a single value.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: CalcPertains to calculationsType: BugSomething is not working like it should

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions