C+ C NAME: C Get2Dval C PURPOSE: C 2D linear interpolationInterpolates values from positions C specified as XC,XL (modified Carrington variable, latitude (deg) C CATEGORY: C Data processing C CALLING SEQUENCE: subroutine Get2Dval(XCbeg,XCend,nLng,nLat,F2D,N,XC,XL,FF) C INPUTS: C (all input is read-only) C nLng integer # longitudes C nLat integer # latitudes C F2D(nLng,nLat) real 2D array (longitude, latitude) C N integer # points C C XC(N) real Modified Carrington variable C XL(N) real Heliographic latitude (deg) C OUTPUTS: C FF(N) real Interpolated function values C CALLS: C FLINT C INCLUDE: C include 'mapangles.h' C PROCEDURE: C > The modified Carrington variable is mapped to the range [1,nLng] C The latitude is mapped to the range [1,nLat] C The distance is mapped to the range [1,nRad] C > For each point, if any of the neighbours contains a bad value, or if any of the C coordinates is more than one bin width outside the index ranges, then the value C BadR4() is returned (see FLINT). C MODIFICATION HISTORY: C MAY-1997, Paul Hick (UCSD; pphick@ucsd.edu) C- real F2D(nLng,nLat) real XC(N) real XL(N) real FF(N) integer ND(2) real PP(2) include 'mapangles.h' nLng1 = nLng-1 nLat1 = nLat-1 ND(1) = nLng ND(2) = nLat do I=1,N PP(1) = XCvar(XC(I)) PP(2) = XLindx(XL(I)) FF(I) = FLINT(-2,ND,F2D,PP,0.00002) ! Minus sign forces check for bad values end do return end