4D interpolation [message #48044] |
Wed, 22 March 2006 07:19 |
Maarten[1]
Messages: 176 Registered: November 2005
|
Senior Member |
|
|
This must have been asked before, but a search on Google in this group,
as well as the usual sites and code repositories didn't return
something of interest.
I think I need a 4D interpolation to get from a viewing geometry and a
cloud optical thickness (solar azimuth angle, viewing azimuth angle,
azimuth difference and tau) to a reflectance by means to a look-up
table:
R = R ( tau, sza, vza, azimuth_diff ) (28 x 82 x 82 x 19 elements)
The standard interpolate function is helpful up to three dimensions,
and returns interpolated results for each cloud optical thickness. I
think I cloud again interpolate within this result, but I'm unsure how
to proceed. Warning sinful direct for loop ahead (the fractional
indices *_frac_idx are created beforehand):
result = interpolate(R, vza_frac_idx, sza_frac_idx, azi_frac_idx)
s = fltarr(size(tau,/dimensions))
for ii = 0, n_elements(s)-1 do $
s[ii] = interpol(result[*,ii], tau_axis, tau[ii], /spline)
I think this would work, but it seems very silly, which probably means
there is a better way. Suggestions?
Maarten
|
|
|