RMNLIB |
(EXTRAP1D_SURFACEWIND_X) |
|
SUBROUTINE EXTRAP1D_SURFACEWIND_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 This routine has the same effect for vectors (i.e. the wind) as Extrap1D_Surface_X has for scalars. 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; however, the value at that level is ignored and the value of zero is used by the passed routine. 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 probably 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 | maximum wind direction change, in radians, between the surface and the top of the surface layer. This parameter guides the extrapolation. The value of this parameter is typically received from the routine, sltop_uv, of the physical library. |
extrapGuideUp | unused |
ExtArraysIn | all 6 entries are used |
Output: | |
stateDerivDestn(dst_ijDim, dstNumLevels) | unused |
ExtArraysOut | both entries are used |