RMNLIB

(INTERP1D_LINEAR_X)





SUBROUTINE INTERP1D_LINEAR_X(numInterpSets, srcNumLevels, destNumLevels, src_ijDim, dst_ijDim, vLevelSource, stateSource, stateDerivSource, posnDestInSrc, vLevelDestn, stateDestn, stateDerivDestn, extrapEnableDown, extrapEnableUp, extrapGuideDown, extrapGuideUp, flux, numExtArraysIn, numExtArraysOut, ExtArraysIn, ExtArraysOut)
integer, intent(in) :: numInterpSets integer, intent(in) :: srcNumLevels integer, intent(in) :: destNumLevels integer, intent(in) :: src_ijDim integer, intent(in) :: dst_ijDim real, dimension(src_ijDim, srcNumLevels), intent(in) :: vLevelSource real, dimension(src_ijDim, srcNumLevels), intent(in) :: stateSource real, dimension(src_ijDim, srcNumLevels), intent(in) :: stateDerivSource integer, dimension(dst_ijDim, destNumLevels), intent(in) :: posnDestInSrc real, dimension(dst_ijDim, destNumLevels), intent(in) :: vLevelDestn real, dimension(dst_ijDim, destNumLevels), intent(out) :: stateDestn real, dimension(dst_ijDim, destNumLevels), intent(out) :: stateDerivDestn logical, intent(in) :: extrapEnableDown, extrapEnableUp real, intent(in) :: extrapGuideDown, extrapGuideUp external flux integer, intent(in) :: numExtArraysIn integer, intent(in) :: numExtArraysOut real, dimension(src_ijDim, numExtArraysIn), intent(in) :: ExtArraysIn real, dimension(dst_ijDim, numExtArraysOut), intent(out) :: ExtArraysOut
DESCRIPTION For each destination level, a state value is interpolated, using a linear method, from the state values at two of the closest source levels. For simplicity of the algorithm, values are also extrapolated using the same algorithm; it is possible instead to clamp the values beyond the source levels to the nearest source value, this being controlled by extrapEnableDown and extrapEnableUp. In either case, these values could be overwritten by any of the extrapolation routines.
Author: Jeff Blezius - revised Oct 2003
ARGUMENTS

It can be noted that the arguments to all of the Interp1D_* and Extrap1D_* routines are identical, for ease of switching a call from one to another of them. You should examine the generic description of the arguments. The following are uses of the generic arguments that are specific to this routine:
Input:
stateDerivSource(src_ijDim, srcNumLevels) unused
extrapEnableDown enables extrapolation at indices below those of vLevelSource. If this argument is .true., the downward extrapolation is performed using the Lagrange algorithm; if .false., the destination state values are set to the nearest source state value.
extrapEnableUp enables extrapolation at indices above those of vLevelSource. If this argument is .true., the upward extrapolation is performed using the Lagrange algorithm; if .false., the destination state values are set to the nearest source state value.
extrapGuideDown unused
extrapGuideUp unused
flux unused
ExtArraysIn unused
Output:
stateDerivDestn(dst_ijDim, dstNumLevels) unused
ExtArraysOut unused

SEE ALSO

Interp1D_FindPos, Interp1D_NearestNeighbour_X, Interp1D_CubicLagrange_X, Interp1D_CubicWithDerivs_X, Extrap1D_LapseRate_X, Extrap1D_Surface_X, Extrap1D_SurfaceWind_X

Return to RPN Libraries home page
Return to product index
Last updated: December 5, 2003