RMNLIB |
(N_VISINTIFC_X) |
|
FUNCTION N_VisintIfc_X(r_stateOut, r_stateIn, r_derivOut, r_derivIn, r_extrapGuideDown, r_extrapGuideUp, m_slStateValue, m_slFluxGradient, n_numExtArraysIn, n_numExtArraysOut, r_ExtArraysIn, r_ExtArraysOut)
real, dimension(:,:,:), intent(out) :: r_stateOut real, dimension(:,:,:), intent(in) :: r_stateIn real, dimension(:,:,:), intent(out) :: r_derivOut real, dimension(:,:,:), intent(in) :: r_derivIn real, intent(in) :: r_extrapGuideDown, r_extrapGuideUp external m_slStateValue external m_slFluxGradient integer, intent(in) :: n_numExtArraysIn integer, intent(in) :: n_numExtArraysOut real, dimension(:,:, n_numExtArraysIn), intent(in) :: r_ExtArraysIn real, dimension(:,:, n_numExtArraysOut), intent(out) :: r_ExtArraysOut
DESCRIPTION Perform the selected interpolation and extrapolation. The function name represents Scalar INTerpolation, following the syntax of ezsint. However, it can also perform vector extrapolation. In the case where the extrapolation has been set to surface or surfacewind, the physics of the extrapolation determines what is the gradient of the field at the top of the surface layer. For this reason, if cubicwithderivs or cubiclagrange interpolation has been chosen (along with surface or surfacewind extrapolation), the layer just above the surface layer is treated specially: with either of those interpolation types, cubicwithderivs interpolation is applied in that layer, using the gradient implied by the physics at the top of the surface layer, and the supplied gradient at the next boundary or a calculated gradient if necessary. N.B.: It must be noted that the routines passed as arguments must presume that the location of each vertical level is given as z (meters above the Earth's surface). These are the values supplied in r_ExtArraysIn. NOTE that this implies that the values of r_stateIn are ignored for surface or surfacewind extrapolation; in this case they are used only for the interpolation. Furthermore, those same routines presume that the lowest level represents the Earth's surface. The r_stateIn values given for that level should be true values and not those given by the model (GEM). [In the case of 'surfacewind' extrapolation, the routine supplied probably ignores the r_stateIn values at the surface and presumes them to be zero.]
Author: Jeff Blezius - Sept 2002
ARGUMENTS
Input: dimensions are as defined in N_ViqkdefIfc and N_VidefsetIfc | ||||||||||||||||
r_stateIn | input array of the state | |||||||||||||||
r_derivIn | input array of the derivative | |||||||||||||||
r_extrapGuideDown | value used for extrapolating below the values of
the source grid (set in N_VidefsetIfc) The meaning of these values depends on the selected extrapolation method. |
|||||||||||||||
r_extrapGuideUp | value used for extrapolating above the values of
the source grid (set in N_VidefsetIfc) The meaning of these values depends on the selected extrapolation method. |
|||||||||||||||
m_slStateValue | subroutine to calculate the normalized state value at one vertical level within the surface layer. ('Surface layer' is comprised of the space between the Earth's surface and the first model level above it.) The routine supplied here is usually slfun_tq or slfun_uv from the physical library. Click on the parameter name for a description of its own parameters. | |||||||||||||||
m_slFluxGradientScalar m_slFluxGradientVector |
subroutine to calculate the normalized flux at the surface, and the gradient with respect to z, at the top of the surface layer. The routine supplied here is usually sltop_tq or sltop_uv from the physical library. Click on the parameter name for a description of its own parameters; note that the parameters are different depending on whether this is a scalar or a vector calculation. | |||||||||||||||
n_numExtArraysIn | the number of arrays that are being passed in the
ExtArraysIn variable; i.e. the third dimension of ExtArraysIn.
|
|||||||||||||||
n_numExtArraysOut | the number of arrays that are being passed in the
ExtArraysOut variable; i.e. the third dimension of ExtArraysOut.
|
|||||||||||||||
r_ExtArraysIn(:,:, numExtArraysIn) | extension to this interface to accommodate more
input arrays, where the significance of the array is determined
according to the third index of ExtArraysIn:
|
|||||||||||||||
Output: | ||||||||||||||||
N_VisintIfc_X | error indication: 0 means 'no error'; see $ARMNLIB/include/ViConstants_f90.h for the significance of other values | |||||||||||||||
r_stateOut | output array of the state | |||||||||||||||
r_derivOut | output array of the derivative | |||||||||||||||
ExtArraysOut(:,:,0) | extension to this interface to accommodate more
output arrays, where the significance of the array is determined
according to the third index of ExtArraysOut:
|
*N_kDestDim - the value that was given as
N_numVLevels in the T_VerticalGridIfc (from N_ViqkdefIfc) that was passed
to VidefsetIfc_X as o_vGridDestnIfc
**N_kSrcDim - the value that was given as N_numVLevels in the
T_VerticalGridIfc (from N_ViqkdefIfc) that was passed to VidefsetIfc_X as
o_o_vGridSourceIfc