-
Notifications
You must be signed in to change notification settings - Fork 0
Temporal Functions
gibd edited this page Jun 10, 2017
·
2 revisions
Aggregation performed temporally along the timestamps for each cell location, producing a single grid. These functions are usually used with GROUP BY keyword and combined with other functions, such Avg_S and Render, to produce the result.
- Syntax:
Avg_T(grid)
returns the mean value of each cell location for a specified time resolution. - Example:
/*Calculate the monthly mean land surface temperature(TSURF) for 2010 based on the hourly data. */
SELECT month, Avg_S(Avg_T(grid)), Render(Avg_T(grid)) FROM MST1NXMLD
WHERE variable = "TSURF" AND year = 2010
GROUP BY month ORDER BY month
- Syntax:
Sum_T(grid)
returns the sum of each cell for a specified time resolution. - Example:
SELECT month,day, Max_S(Sum_T(grid)) FROM MST1NXMLD
WHERE variable = "TSURF" AND year = 2010 AND month=5 GROUP BY day
- Syntax:
Std_T(grid)
returns the standard deviation of each cell location for a specified time period. (Note: useStdSample_T(grid)
for sample data). - Example:
/*Calculate the standard deviation of the July precipitation(PRECCU) for each cell location from 1979 to 2015*/
SELECT Render(Std_T(grid)) FROM MATMNXINT
WHERE variable = "PRECCU" AND year BETWEEN 1979 and 2015 AND month = 7
- Syntax:
Variance_T(grid)
returns the variance of each cell location for a specified time period. (Note: useVarianceSample_T(grid)
for sample data). - Example:
/*Calculate the variance of the July precipitation(PRECCU) for each cell location from 1979 to 2015*/
SELECT Render(Variance_T(grid)) FROM MATMNXINT
WHERE variable = "PRECCU" AND year BETWEEN 1979 and 2015 AND month = 7
- Syntax:
Corr_T(grid1,grid2)
returns a correlation coefficient between grid1 and grid2 for cell location. Number of samples equals to then number of timestamps. - Example: