-
Notifications
You must be signed in to change notification settings - Fork 0
Spatial Functions
gibd edited this page Jun 10, 2017
·
3 revisions
Aggregation performed spatially across the study area, producing a single value.
- Syntax:
Avg_S(grid)
returns the mean of all cell values for each passed grid. - Example:
/*Calculate the global hourly mean land surface temperature(TSURF) for 10/2010.*/
SELECT time, Avg_S(grid) FROM MST1NXMLD
WHERE variable = "TSURF" AND year = 2010 AND month=10 ORDER BY time
- Syntax:
Max_S(grid)
returns the maxima of all cell values for each passed grid. - Example:
/*Caculate the maximum monthly liquid water convective precipitation(PRECCU) in 1998.*/
SELECT month, Max_S(grid) FROM MATMNXINT
WHERE variable = "PRECCU" AND year = 1998 ORDER BY month
- Syntax:
Min_S(grid)
returns the minima of all cell values for each passed grid. - Example:
/*Find the lowest land surface temperature at 6PM(UTC) for each day in July 2000.*/
SELECT day, Min_S(grid) FROM MST1NXMLD
WHERE variable = "TSURF" AND year = 2000 AND month=7 AND hour = 18 ORDER BY day
- Syntax:
Sum_S(grid)
returns the sum of all cell values for each passed grid. - Example:
SELECT Sum_S(grid) FROM MATMNXINT
WHERE variable = "PRECCU" AND year = 1980 AND month = 9
- Syntax:
Count_S(grid)
returns the number of cells for each passed grid. - Example:
SELECT Count_S(grid) FROM MST1NXMLD
WHERE variable = "TSURF" AND time = 2010100104
- Syntax:
Corr_S(grid1,grid2)
returns a correlation coefficient value(Pearson's r) between the cell values of grid1 and grid2. - Example: