I have a cube of temperatures on theta levels and I need a cube of temperatures on rho levels. Is cube.interpolate able to do this, or do I need something else? The vertical regridding example in the Iris user guide has an example of going from hybrid height to fixed equally spaced altitude sample points but doesn't have an example where the target grid has spatially varying heights. I tried a naive approach to this but it failed.
sample_points = [p_rho_cube.coord('altitude').points]
t_rho_levs = temp.interpolate(sample_points, iris.analysis.Linear())
but this fails:
Traceback (most recent call last):
File "cmip5_lbc_gen_um.py", line 243, in <module>
cmip_lbc_prep_um(pp_um_file, outfile)
File "cmip5_lbc_gen_um.py", line 197, in cmip_lbc_prep_um
t_rho_levs = temp.interpolate(sample_points, iris.analysis.Linear())
File "/opt/scitools/environments/default/2017_06_07/lib/python2.7/site-packages/iris/cube.py", line 3811, in interpolate
coords, points = zip(*sample_points)
ValueError: too many values to unpack
Is there an easy way to do this, or do I have to write my own interpolation for this?