SUBROUTINE CBARNES1( NG, LAT, LON, & NP, YLAT, XLON, Z, WL50, GRID ) SUBROUTINE CBARNESN( NG, LAT, LON, & NP, NV, YLAT, XLON, ZN, WL50, GRIDN ) INTEGER NG ! Number of output values (=NCOLS*NROWS) REAL LAT( NG ) ! single-indexed output latitudes REAL LON( NG ) ! single-indexed output longitudes INTEGER NP ! number of input sources INTEGER NV ! number of input variables REAL YLAT( NP ) ! input latitudes REAL XLON( NP ) ! input longitudes REAL Z ( NP ) ! input values REAL ZN ( NP, NV ) ! input values REAL WL50 ! 50 Percent filtered wavelength (KM) REAL GRID( NG ) ! output values REAL GRIDN( NG, NV ) ! output values
There isn't one; however, you can usually call these routines from C if you do it right (all arguments pass by reference; the C caller will see the subroutine as "void cbarnes1_" (etc.) under most UNIX systems, "void cbarnes1" for IBM AIX or HP HP-UX, or "void CBARNES1" for Crays.)
CBARNES1() grids one variable Z and CBARNESN() grids an array ov variables ZN, from locations with lat-lon coordinates <YLAT(1...NP),XLON(1...NP)> and produce output array GRID(1...NG) or GRIDN(1...NG,1...NV) at the locations <LAT(1...NG),LON(1...NG)>. For gridding purposes, NG should be NCOLS*NROWS; the CBARNES routines will regard the corresponding output array as single indexed in the first subscript.These routines are an extension of a spatial analysis technique with scale dependent filtering that was originally proposed by Stanly Barnes in 1964 and was expanded in 1973. The scale dependent response function of the filtering effect is analytically calculable and can be adjusted by the choice of two parameters in the Gaussian weighting function used.
Input data point locations should be specified in latitude and longitude degrees. The separation distances between these data points and the grid points where the estimates are made is calculated from a function that is determined by spherical geometry under the assumption of a spherical Earth.
These routines were modified by Carlie Coats from routines originally produced for the EPA Regional Oxidant Model and adapted also for UAM BEIS. They use "exact" spherical-geometry distance formulas instead of the "flat-earth" approximations used earlier.
Up: Coordinate and Grid Related Routines
To: Models-3/EDSS I/O API: The Help Pages