RMNLIB

(EXTRAP1D_SURFACE_X)





SUBROUTINE EXTRAP1D_SURFACE_X(numInterpSets, srcNumLevels, destNumLevels, src_ijDim, dst_ijDim, vLevelSource, stateSource, stateDerivSource, posnDestInSrc, vLevelDestn, stateDestn, stateDerivDestn, extrapEnableDown, extrapEnableUp, extrapGuideDown, extrapGuideUp, m_slStateValue, 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 m_slStateValue 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 that is between the two lowest source levels, a state value (but not a derivative) is extrapolated. It is presumed that the lowest level supplied represents the Earth's surface, and that that value is a true value, not the one that is obtained from GEM. Technically, that makes this an interpolation, or perhaps a guided extrapolation of the results from the forecast model. Other values that would be interpolated, or extrapolated upward, are untouched by the routine. Through the routine that is passed as an argument, this extrapolation takes into account the physics that governs diffusion near the Earth's surface. Thus, it is not applied to extrapolation above the highest vertical level. Moreover, it should not be used for a general mathematical extrapolation; the algorithm makes sense only when considering the surface of the Earth. N.B.: It must be noted that the routine passed as an argument probably (This cannot be stated absolutely, because the user is free to supply whatever routine he sees fit, provided that it respects the interface.) presumes that the location of each vertical level is given as z (meters above the Earth's surface). If this is the case, vLevelSource and vLevelDestn must be in z. Furthermore, that same routine presumes that the lowest level represents the Earth's surface. The stateSource values given for that level should be true values and not those given by the model (GEM). The 'extrapolation' performed by this routine is thus an interpolation over the interval between the Earth's surface and the next vertical level.
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:
extrapGuideDown unused
extrapGuideUp unused
ExtArraysIn only the first 4 entries are used
Output:
stateDerivDestn(dst_ijDim, dstNumLevels) unused
ExtArraysOut unused

SEE ALSO

Interp1D_FindPos, Interp1D_NearestNeighbour_X, Interp1D_Linear_X, Interp1D_CubicLagrange_X, Interp1D_CubicWithDerivs_X, Extrap1D_LapseRate_X, Extrap1D_SurfaceWind_X

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