Version 2
Copyright © 2004-2012 Delaware Environmental Observing System
Published: June 22nd 2004
Revision History | ||
---|---|---|
Revision 1.1 | 2004/06/22 | GEQ |
Initial version | ||
Revision 1.2 | 2005/03/31 | GEQ |
Added network data display description. | ||
Revision 1.3 | 2005/05/23 | GEQ |
Added monthly station summary data display description. Added description of any image displayed. Added description of caching for pages. | ||
Revision 1.4 | 2005/10/18 | GEQ |
Added brief option description to current station conditions page. | ||
Revision 1.5 | 2005/12/02 | GEQ |
Added configuration section. | ||
Revision 1.6 | 2006/01/17 | GEQ |
Added snow network page description section. | ||
Revision 1.7 | 2006/01/24 | GEQ |
Added DelDOT network page description section. Added links to network names section. | ||
Revision 1.8 | 2006/01/31 | GEQ |
Added public ODD-DIVAS interface description. | ||
Revision 2.1 | 2006/09/26 | GEQ |
Updated daily station PHP script to station_daily from station_latest. Incremented version number of this document to 2. | ||
Revision 2.2 | 2006/12/05 | GEQ |
Added current well conditions page. | ||
Revision 2.3 | 2007/06/20 | GEQ |
Added DNERR network page. | ||
Revision 2.4 | 2007/07/27 | GEQ |
Added USACE buoy network page. | ||
Revision 2.1.4 | 2007/11/28 | GEQ |
Added full option to display derived temperature values. | ||
Revision 2.1.7 | 2008/07/29 | GEQ |
Added monthly agricultural page. Added link to getDataCount function. |
Table of Contents
This document summarizes the interface to the ODD-DIVAS component of the DEOS system. Options to the scripts below utilize the HTTP GET request format. Options are separated from their values by an equals sign with no surrounding spaces.
Any of the pages described below may contain an icon, if so, this icon will be a link to the organization with ultimate responsibility for the data on this page.
The ODD-DIVAS system utilizes a configuration file for internal settings.
The ODD-DIVAS
system utilizes a cache to speed delivery of content. This cache is situated
under the odd-divas/cache/
file-system. The cache consists of two types of sub-directory as
described in the following sections.
When pages are requested that generate images and allow pop-ups of the data making up the image, each request generates a directory named with the UNIX time stamp of the initial request. Once the connection by that user is closed, the directory is no longer used and so should be removed from the server.
For pages that take considerable time to generate, once the page has been generated, the next request for that information will be served from the cache. Currently, two page types utilize the cache.
The daily cached files are stored in directory
cache/{network}/{station}/{year}/{month}/
where the items in {} are replaced by the appropriate
values. The file in this directory containing the daily data will be called N.html
where N is the number of the
day of the month.
The monthly cached files are stored in directory
cache/{network}/{station}/{year}/
where the items in {} are replaced by the appropriate
values. The file containing the monthly data will be called N-{unit}.html
where N is the number of the
month and {unit} is either SI or english as appropriate.
The page source is created the first time that that page is accessed after the month has ended.
The monthly Agricultural data cached files are stored in directory
cache/{network}/{station}/{year}/
where the items in {} are replaced by the appropriate
values. The file containing the monthly data will be called N-Ag-{unit}.html
where N is the number of the
month and {unit} is either SI or english as appropriate.
The page source is created the first time that that page is accessed after the month has ended.
The following section describes the generic entry point to the ODD-DIVAS
system. It provides a simple
interface to all the available data displays implemented independent of any direct interface provided by the
organization operating the DEOS
system. If this interface is not required, then the capability can be
removed by deleting the file odd-divas/retrieval_list.php
.
Provide a generic interface to the complete set of dynamic data that ODD-DIVAS can generate, from the current data time back up to 168 hrs ago for individual stations and 24 hours for networks.[1]
This section summarizes the network data display interface to the ODD-DIVAS system.
The following section describes the current network data entry point to the ODD-DIVAS system.
The following are the options understood by this component of the ODD-DIVAS system.
The following items are required.
data_type
; the valid possibilities are:
DEOS
DelDOT
NIDS (NEXRAD radar DPA data)
USGS-Water (USGS stream-flow and tidal stations)
NDBC (buoy data)
MET (METAR and RAWS data)
DNERR (Water quality and buoy data)
US Army Corps of Engineers (USACE) (buoy data)
The pages are built to auto refresh at an appropriate frequency (typically, twice that of the data update.)
The color scheme should be self explanatory.
The "Change to English units" link should be self-explanatory
will display the current conditions for the DEOS network using english units.
The following section describes the current snow data entry point to the ODD-DIVAS system.
To provide an updated textual and graphical snapshot of the current snow conditions of the network.
The following are the options understood by this component of the ODD-DIVAS system.
The pages are built to auto refresh at an appropriate frequency (typically, twice that of the data update.)
The "Change to English units" link should be self-explanatory
will display the current conditions for the DEOS network using english units.
The following section describes the current DGS well data entry point to the ODD-DIVAS system.
To provide an updated textual and graphical snapshot of the current well conditions of the DGS network.
The following are the options understood by this component of the ODD-DIVAS system.
The pages are built to auto refresh at an appropriate frequency (typically, twice that of the data update.)
The "Change to English units" link should be self-explanatory
will display the current conditions for the DEOS network using english units.
This section summarizes the station display interface to the ODD-DIVAS system.
The following section describes the current station data entry point to the ODD-DIVAS system. Current data is that data that is within two data cycles of the current time for the network the station is a part of. For the DEOS stations, that means data will only be displayed if it occurs with 10 minutes of the current time.
To provide a snapshot of the current conditions at a single station. The display and availability of graphic and text pop-ups to display the proceeding 24 hours of data are optional as controlled by the brief option described below.
The following are the options understood by this component of the ODD-DIVAS system.
The following items are required.
station
; name of station (e.g., KDOV, KDEN)
network
; name of network (e.g., DEOS, NWS)
The following items are optional.
units
; what unit types to display (e.g., SI or english, default is SI).
brief
; when set to non-zero a succinct summary page is generated
(e.g., no pop-up graphs and data frames); when brief is zero or omitted entirely, a normal page is generated.
full
; when set to non-zero additional derived temperature data are displayed if available. The
additional values are equivalent temperature, potential temperature and equivalent potential temperature.
The pages are built to auto refresh at an appropriate frequency (typically, twice that of the data update.)
The Chart column generates a pop-up with the 24 hour graph for that variable.
The Data link does the same for the raw data.
The "Change to English units" link should be self-explanatory
Example 5. Station Current Data
[URL]odd-divas/station_current.php?station=KDOV&network=NWS&units=english
will display the current conditions for station KDOV, of the NWS network, using english units.
The following section describes the monthly Agricultural data entry point to the ODD-DIVAS system. Monthly agricultural data is that data that is within a specified month; the data page also includes important year-to-date values of some of the data items reported as monthly values.
To provide a set of agricultural data for a given month for a given station for selected data.
The following are the options understood by this component of the ODD-DIVAS system.
The following items are required.
station
; name of station (e.g., DAGF, DBNG)
network
; name of network (e.g., DEOS)
The day number entries generate a pop-up giving the daily summary a described below.
The "Change to English units" should be self-explanatory.
Example 6. Station Agricultural Data
[URL]odd-divas/station_ag.php?station=DTOW&year=2004&month=3&network=DEOS&units=english
will display one month of agricultural data (for March 2004) for station DTOW.
The following section describes the monthly climatological data entry point to the ODD-DIVAS system. Monthly data is that data that is within a specified month; the data page also includes important year-to-date values of some of the data items reported as monthly values.
To provide a set of climatological data for a given month for a given station for selected climatological data.
The following are the options understood by this component of the ODD-DIVAS system.
The following items are required.
station
; name of station (e.g., KDOV, KDEN)
network
; name of network (e.g., DEOS, NWS)
The day number entries generate a pop-up giving the daily summary a described below.
The "Change to English units" should be self-explanatory.
Example 7. Station Monthly Data
[URL]odd-divas/station_monthly.php?station=DBBB&year=2004&month=3&network=DEOS&units=english
will display one month of data (for March 2004) for station DBBB.
The following section describes the period data entry point to the ODD-DIVAS system. Period data is that data that is within a specified range prior to a given date and time.
To provide a complete set of graphical data for a given station and time period for all recorded meteorological data.
The following are the options understood by this component of the ODD-DIVAS system.
The following items are required.
station
; name of station (e.g., KDOV, KDEN)
network
; name of network (e.g., DEOS, NWS)
The following items are optional.
units
; what unit types to display (e.g. options are SI and english, the default is SI).
range
; how many hours of data to display, default is 24.
The following allow historical data to be displayed
year
; the four-digit year
month
; the month number
day
; the day of the month
hour
; the hour of the day
minute
; the minute of the hour
second
; the second of the hour
Each of the graphs is a link to a pop-up window containing the raw data making up the graph.
The "Current" link brings up the page for the current data settings using #2 above.
The "Change to English units" should be self-explanatory.
Example 8. Station Time Period Data
[URL]odd-divas/station_period.php?station=KBWI&year=2004&month=3&day=31&hour=0&minute=0 &network=NWS&range=168&units=english
will display one week of data for station KBWI ending at midnight on 2004/3/31.
The following section describes the latest data display entry point to the ODD-DIVAS system. Latest data is data from a specific single day tabulated into hourly summarizes.
To provide a complete set of tabulated hourly data for a given station and day period period for all recorded meteorological data.
The following are the options understood by this component of the ODD-DIVAS system.
The following items are required.
station
; name of station (e.g., KDOV, KDEN)
network
; name of network (e.g., DEOS, NWS)
The following items are optional and allow historical data to be displayed.
year
; the four-digit year
month
; the month number
day
; the day of the month
Example 9. Station Daily Tabulated Summary Data
[URL]odd-divas/station_daily.php?station=KDEN&network=NWS
will display one day of hourly tabulated data for station KDEN ending at midnight on the day previous to the current day.
This section describes the published and supported software interface to the PHP functions within the ODD-DIVAS system.
The following sections describe the features available to all functions.
In the discussions below the log file is written to cache/log
.
Error in interactions with Oracle are flagged.
Most functions recognize and use a debug setting to allow the user and software engineer to determine what happened in case of an error. The following table describes the possible values of the debug setting.
The following sections describe the available functions, their calling parameters and related information.
Table 2. Interface Function Summary
Name | Description |
---|---|
environment | Generates an environment data graph and base data page. |
flow | Generates a stream data graph and base data page. |
fuel | Generates a fuel data graph and base data page. |
gage | Generates a stream/tidal gage data graph and base data page. |
getDataCount | Returns a count value as requested by the input parameter. |
o2o2 | Generates a O2 saturation and O2 volume data graph and base data page. |
phsc | Generates a water pH and specific conductance data graph and base data page. |
precip | Generates a rainfall precipitation data graph and base data page. |
pressure | Generates a barometric pressure and barometric pressure trend data graph and base data page. |
read_data_type_db | Returns a set of data of a single data type to be retrieved for a given time period, for a given station. |
read_datatype_metadata | Returns the schema conversion data, if any, for the input data type. |
read_network_data_db | Returns the most recent data for a given station in DEOS native units. |
read_network_list | Returns a list of networks that are known to the system |
read_network_metadata_db | Returns the metadata for a given network. |
read_station_list | Returns a list of stations and which network that station is in. |
read_station_metadata_db | Returns the metadata for a given station. |
snow | Generates a snow depth and snowfall data graph and base data page. |
solar_radiation | Generates a solar radiation data graph and base data page. |
temperature | Generates a temperature data graph and base data page. |
water | Generates a water data graph and base data page. |
wave | Generates a wave data graph and base data page. |
wind | Generates a wind data graph and base data page. |
windrose | Generates a wind data graph, in the form of a wind rose, and base data page. |
This function generates a graphic image in PNG format and HTML files of data used to generate the graphs. Data types plotted are heat index, wind chill, soil temperature and volumetric water content (VWC). If a data item is not available, its graph is not plotted, if no data is available for any of the input types the text "No Data" is plotted in a white rectangle in the middle of a gray background.
This function uses the following ODD-DIVAS global constants. The global constants are
The environment
utilizes the following arguments in the following order.
Table 4. Argument List for Function environment
Name | Type | Values | Description |
---|---|---|---|
$subdir | Input | Subdirectory for the output of the generated files, used in cache/$subdir/ | |
$hours | Input | Number | Not used |
$heat_index_times | Input | Array of times as yyyy/mm/dd hh:mm:ss | |
$heat_index_values | Input | Array of data values | Time index must correspond to value index |
$heat_index_unit | Input | Unit symbol for this data type | |
$wind_chill_times | Input | Array of times as yyyy/mm/dd hh:mm:ss | |
$wind_chill_values | Input | Array of data values | Time index must correspond to value index |
$wind_chill_unit | Input | Unit symbol for this data type | |
$soil_temp_times | Input | Array of times as yyyy/mm/dd hh:mm:ss | |
$soil_temp_values | Input | Array of data values | Time index must correspond to value index |
$soil_temp_unit | Input | Unit symbol for this data type | |
$vwc_times | Input | Array of times as yyyy/mm/dd hh:mm:ss | |
$vwc_values | Input | Array of data values | Time index must correspond to value index |
$vwc_unit | Input | Unit symbol for this data type | |
$units | Input | Either 'SI' or 'english' | |
$debug | Input | See above |
This function generates the following files.
This function generates a graphic image in PNG format and HTML files of data used to generate the graphs. Data types plotted are discharge and stream velocity. If a data item is not available, its graph is not plotted, if no data is available for any of the input types the text "No Data" is plotted in a white rectangle in the middle of a gray background.
This function uses the following ODD-DIVAS global constants. The global constants are
The flow
utilizes the following arguments in the following order.
Table 7. Argument List for Function flow
Name | Type | Values | Description |
---|---|---|---|
$subdir | Input | Subdirectory for the output of the generated files, used in cache/$subdir/ | |
$hours | Input | Number | Not used |
$discharge_times | Input | Array of times as yyyy/mm/dd hh:mm:ss | |
$discharge_values | Input | Array of data values | Time index must correspond to value index |
$discharge_unit | Input | Unit symbol for this data type | |
$stream_velocity_times | Input | Array of times as yyyy/mm/dd hh:mm:ss | |
$stream_velocity_values | Input | Array of data values | Time index must correspond to value index |
$stream_velocity_unit | Input | Unit symbol for this data type | |
$units | Input | Either 'SI' or 'english' | |
$debug | Input | See above |
This function generates the following files.
This function generates a graphic image in PNG format and HTML files of data used to generate the graphs. Data types plotted are fuel temperature and fuel moisture. If a data item is not available, its graph is not plotted, if no data is available for any of the input types the text "No Data" is plotted in a white rectangle in the middle of a gray background.
This function uses the following ODD-DIVAS global constants. The global constants are
The fuel
utilizes the following arguments in the following order.
Table 10. Argument List for Function fuel
Name | Type | Values | Description |
---|---|---|---|
$subdir | Input | Subdirectory for the output of the generated files, used in cache/$subdir/ | |
$hours | Input | Number | Not used |
$fuel_temp_times | Input | Array of times as yyyy/mm/dd hh:mm:ss | |
$fuel_temp_values | Input | Array of data values | Time index must correspond to value index |
$fuel_temp_unit | Input | Unit symbol for this data type | |
$fuel_moisture_times | Input | Array of times as yyyy/mm/dd hh:mm:ss | |
$fuel_moisture_values | Input | Array of data values | Time index must correspond to value index |
$fuel_moisture_unit | Input | Unit symbol for this data type | |
$units | Input | Either 'SI' or 'english' | |
$debug | Input | See above |
This function generates the following files.
This function generates a graphic image in PNG format and HTML files of data used to generate the graphs. Data types plotted are gage height. If a data item is not available, its graph is not plotted, if no data is available for any of the input types the text "No Data" is plotted in a white rectangle in the middle of a gray background.
This function uses the following ODD-DIVAS global constants. The global constants are
The gage
utilizes the following arguments in the following order.
Table 13. Argument List for Function gage
Name | Type | Values | Description |
---|---|---|---|
$subdir | Input | Subdirectory for the output of the generated files, used in cache/$subdir/ | |
$hours | Input | Number | Not used |
$height_times | Input | Array of times as yyyy/mm/dd hh:mm:ss | |
$height_values | Input | Array of data values | Time index must correspond to value index |
$height_unit | Input | Unit symbol for this data type | |
$bankfull | Input | Number | Bankfull value for this gage |
$flood_stage | Input | Number | Flood stage value for this gage |
$critical_level | Input | Number | Critical level value for this gage |
$units | Input | Either 'SI' or 'english' | |
$debug | Input | See above |
This function generates the following files.
This function uses the following ODD-DIVAS global constants. The global constants are
The getDataCount
utilizes the following arguments in the following order.
Table 16. Argument List for Function getDataCount
Name | Type | Values | Description |
---|---|---|---|
$type | Input | Name of the data count to return | This value must be one of DATA_COUNT (number of station data measurements), STATION_COUNT (number of in-use stations) or FIELD_COUNT (number of stored gridded fields.) |
$debug | Input | See above |
This function generates a graphic image in PNG format and HTML files of data used to generate the graphs. Data types plotted are O2 saturation and O2 volume. If a data item is not available, its graph is not plotted, if no data is available for any of the input types the text "No Data" is plotted in a white rectangle in the middle of a gray background.
This function uses the following ODD-DIVAS global constants. The global constants are
The o2o2
utilizes the following arguments in the following order.
Table 18. Argument List for Function o2o2
Name | Type | Values | Description |
---|---|---|---|
$subdir | Input | Subdirectory for the output of the generated files, used in cache/$subdir/ | |
$hours | Input | Number | Not used |
$o2_percent_times | Input | Array of times as yyyy/mm/dd hh:mm:ss | |
$o2_percent_values | Input | Array of data values | Time index must correspond to value index |
$o2_percent_unit | Input | Unit symbol for this data type | |
$o2_volume_times | Input | Array of times as yyyy/mm/dd hh:mm:ss | |
$o2_volume_values | Input | Array of data values | Time index must correspond to value index |
$o2_volume_unit | Input | Unit symbol for this data type | |
$units | Input | Either 'SI' or 'english' | |
$debug | Input | See above |
This function generates the following files.
This function generates a graphic image in PNG format and HTML files of data used to generate the graphs. Data types plotted are water pH and specific conductance. If a data item is not available, its graph is not plotted, if no data is available for any of the input types the text "No Data" is plotted in a white rectangle in the middle of a gray background.
This function uses the following ODD-DIVAS global constants. The global constants are
The phsc
utilizes the following arguments in the following order.
Table 21. Argument List for Function phsc
Name | Type | Values | Description |
---|---|---|---|
$subdir | Input | Subdirectory for the output of the generated files, used in cache/$subdir/ | |
$hours | Input | Number | Not used |
$ph_times | Input | Array of times as yyyy/mm/dd hh:mm:ss | |
$ph_values | Input | Array of data values | Time index must correspond to value index |
$ph_unit | Input | Unit symbol for this data type | |
$sc_times | Input | Array of times as yyyy/mm/dd hh:mm:ss | |
$sc_values | Input | Array of data values | Time index must correspond to value index |
$sc_unit | Input | Unit symbol for this data type | |
$units | Input | Either 'SI' or 'english' | |
$debug | Input | See above |
This function generates the following files.
This function generates a graphic image in PNG format and HTML files of data used to generate the graphs. Data types plotted are rainfall. If a data item is not available, its graph is not plotted, if no data is available for any of the input types the text "No Data" is plotted in a white rectangle in the middle of a gray background.
This function uses the following ODD-DIVAS global constants. The global constants are
The precip
utilizes the following arguments in the following order.
Table 24. Argument List for Function precip
Name | Type | Values | Description |
---|---|---|---|
$subdir | Input | Subdirectory for the output of the generated files, used in cache/$subdir/ | |
$hours | Input | Number | Not used |
$minutes | Input | Number | Time period for measurements. (Not used.) |
$rainfall_times | Input | Array of times as yyyy/mm/dd hh:mm:ss | |
$rainfall_values | Input | Array of data values | Time index must correspond to value index |
$rainfall_unit | Input | Unit symbol for this data type | |
$units | Input | Either 'SI' or 'english' | |
$debug | Input | See above |
This function generates the following files.
This function generates a graphic image in PNG format and HTML files of data used to generate the graphs. Data types plotted are barometric pressure and barometric pressure trend. If a data item is not available, its graph is not plotted, if no data is available for any of the input types the text "No Data" is plotted in a white rectangle in the middle of a gray background.
This function uses the following ODD-DIVAS global constants. The global constants are
The pressure
utilizes the following arguments in the following order.
Table 27. Argument List for Function pressure
Name | Type | Values | Description |
---|---|---|---|
$subdir | Input | Subdirectory for the output of the generated files, used in cache/$subdir/ | |
$hours | Input | Number | Not used |
$pressure_times | Input | Array of times as yyyy/mm/dd hh:mm:ss | |
$pressure_values | Input | Array of data values | Time index must correspond to value index |
$pressure_unit | Input | Unit symbol for this data type | |
$pressure_trend_times | Input | Array of times as yyyy/mm/dd hh:mm:ss | |
$pressure_trend_values | Input | Array of data values | Time index must correspond to value index |
$pressure_trend_unit | Input | Unit symbol for this data type | |
$units | Input | Either 'SI' or 'english' | |
$debug | Input | See above |
This function generates the following files.
This function allows a set of data of a single data type to be retrieved for a given time period, for a given station. The data is returned in the unit schema requested.
This function uses the following ODD-DIVAS global constants.
The read_data_type_db
utilizes the following arguments in the following order.
Table 30. Argument List for Function read_data_type_db
Name | Type | Values | Description |
---|---|---|---|
$start | Input | Time string as yyyy/mm/dd hh:mm:ss | |
$end | Input | Time string as yyyy/mm/dd hh:mm:ss | Has to be earlier than $start |
$units | Input | Either 'SI' or 'english' | |
$station | Input | Name of station | |
$network | Input | Name of network | |
$debug | Input | See above | |
$type | Input | Data type value | See database/data_types.sql for the available values |
$values | Output | A data array of values | Each index in the data array corresponds to the same index in the time array |
$time | Output | An array of time strings as yyyy/mm/dd hh:mm:ss | In descending time order and in local time zone |
$symbol | Output | A string | Unit symbol for this data type |
$precision | Output | A number (default 2) | Number of significant decimal digits appropriate for this data type. |
This function uses the following ODD-DIVAS global constants.
The read_datatype_metadata
utilizes the following arguments in the following order.
Table 32. Argument List for Function read_datatype_metadata
Name | Type | Values | Description |
---|---|---|---|
$data_type | Input | Number | |
$units | Input | Either 'SI' or 'english' | |
$results | Output | An array of data as described below | |
$debug | Output | See above | |
$handle | Input/Output | File handle | A handle as returned by the fopen command. Used for error and debug output. |
The following table indicates the fields available in the output $results
array described above.
Table 33. Network Station Metadata
No. | Key | Type | Description |
---|---|---|---|
1 | NAME | String | Name of data type |
2 | DESCRIPTION | String | Unit type description |
3 | SYMBOL | String | Unit symbol |
4 | PREADDITION | Number | See below |
5 | PRECISION | Number | Number of significant decimal places. |
6 | CONVERSION | Number | See below |
7 | POST | Number | See below |
8 | DTYPE | Number | Data type ID |
9 | FROMUNIT | Number | See below |
10 | TOUNIT | Number | See below |
11 | STYPE | Number | Schema type ID |
12 | UTYPE | Number | Unit type ID |
13 | N | Number | Value of row in data listing. |
The FROMUNIT and TOUNIT are the unit type ID's of the database and requested schema respectively.
This function uses the following ODD-DIVAS global constants.
The read_network_data_db
utilizes the following arguments in the following order.
Table 35. Argument List for Function read_network_data_db
Name | Type | Values | Description |
---|---|---|---|
$network | Input | Name of network | |
$results | Output | Array | An array of database records containing data described below. |
$debug | Input | See above | |
$handle | Input/Output | File handle | A handle as returned by the fopen command. Used for error and debug output. |
The following table indicates the fields available in the output $results
array described above.
Table 36. Network Station Metadata
No. | Key | Type | Description |
---|---|---|---|
1 | NAME | String | Station name |
2 | CITY | String | |
3 | STATE | String | |
4 | DATA_TYPE | Number | |
5 | VALUE | Number | |
6 | ST_ID | Number | Database key from the station_times table for this data item |
7 | TIME | Time string as yyyy/mm/dd hh:mm:ss | |
8 | WATERBODY | String | |
9 | BASIN | String | |
10 | LOCATIONDESC | String | Location description string. Only returns for NDBC and RAWS networks |
11 | N | Number | Value of row in data listing. |
This function uses the following ODD-DIVAS global constants.
The read_network_list
utilizes the following arguments in the following order.
Table 38. Argument List for Function read_network_list
Name | Type | Values | Description |
---|---|---|---|
$networks | Output | An array of network names | Network index and station index correspond. |
$debug | Input | See above |
The data is returned in alphabetical order.
This function uses the following ODD-DIVAS global constants.
The read_network_metadata_db
utilizes the following arguments in the following order.
Table 40. Argument List for Function read_network_metadata_db
Name | Type | Values | Description |
---|---|---|---|
$network | Input | Name of network | |
$debug | Input | See above | |
$type | Output | Name | Network type |
$description | Output | String | |
$update_freq | Output | Number | Network update frequency in minutes |
$tz_offset | Output | Number | Time zone offset from GMT in hours |
$dst_obs | Output | 0 or 1 | Whether this station observes daylight savings time |
$stale_val | Output | Value | Value in minutes for the yellow highlight in network status page display |
$old_val | Output | Value | Value in minutes for the orange highlight in network status page display |
$very_old_val | Output | Value | Value in minutes for the red highlight in network status page display |
The following values may be missing, the description and the highlight values.
This function uses the following ODD-DIVAS global constants.
The read_station_list
utilizes the following arguments in the following order.
Table 42. Argument List for Function read_station_list
Name | Type | Values | Description |
---|---|---|---|
$stations | Output | An array of station names | |
$networks | Output | An array of network names | Network index and station index correspond. |
$radar_omitted | Input | 0 or 1 | If 1 indicates that radar station names are to be omitted |
$debug | Input | See above |
The data is returned sorted by network name and then station name.
This function uses the following ODD-DIVAS global constants.
The read_station_metadata_db
utilizes the following arguments in the following order.
Table 44. Argument List for Function read_station_metadata_db
Name | Type | Values | Description |
---|---|---|---|
$station_name | Input | Name of station | |
$display_name | Output | Display name of station | |
$network | Input | Name of network | |
$debug | Input | See above | |
$latitude | Output | Value | In decimal degrees |
$longitude | Output | Value | In decimal degrees |
$elevation | Output | Value | In meters |
$tz_offset | Output | Value | Time zone offset from GMT in hours |
$dst_obs | Output | 0 or 1 | Whether this station observes daylight savings time |
$water_depth | Output | Value | Ocean depth at station in meters |
$bankfull | Output | Value | In meters |
$flood_stage | Output | Value | In meters |
$critical_level | Output | Value | In meters |
$basin | Output | Name | |
$waterbody | Output | Name | |
$city | Output | Name | |
$state | Output | Name |
All output values except elevation, time zone offset, DST observed, latitude and longitude may be missing.
This function generates a graphic image in PNG format and HTML files of data used to generate the graphs. Data types plotted are snow depth and snow fall. If a data item is not available, its graph is not plotted, if no data is available for any of the input types the text "No Data" is plotted in a white rectangle in the middle of a gray background.
This function uses the following ODD-DIVAS global constants. The global constants are
The snow
utilizes the following arguments in the following order.
Table 46. Argument List for Function snow
Name | Type | Values | Description |
---|---|---|---|
$subdir | Input | Subdirectory for the output of the generated files, used in cache/$subdir/ | |
$hours | Input | Number | Not used. |
$minutes | Input | Number | Time period for measurements. (Not used.) |
$snow_depth_times | Input | Array of times as yyyy/mm/dd hh:mm:ss | |
$snow_depth_values | Input | Array of data values | Time index must correspond to value index |
$snow_depth_unit | Input | Unit symbol for this data type | |
$snow_fall_times | Input | Array of times as yyyy/mm/dd hh:mm:ss | |
$snow_fall_values | Input | Array of data values | Time index must correspond to value index |
$snow_fall_unit | Input | Unit symbol for this data type | |
$units | Input | Either 'SI' or 'english' | |
$debug | Input | See above |
This function generates the following files.
This function generates a graphic image in PNG format and HTML files of data used to generate the graphs. Data types plotted are solar radiation. If a data item is not available, its graph is not plotted, if no data is available for any of the input types the text "No Data" is plotted in a white rectangle in the middle of a gray background.
This function uses the following ODD-DIVAS global constants. The global constants are
The solar_radiation
utilizes the following arguments in the following order.
Table 49. Argument List for Function solar_radiation
Name | Type | Values | Description |
---|---|---|---|
$subdir | Input | Subdirectory for the output of the generated files, used in cache/$subdir/ | |
$hours | Input | Number | Not used |
$solar_rad_times | Input | Array of times as yyyy/mm/dd hh:mm:ss | |
$solar_rad_values | Input | Array of data values | Time index must correspond to value index |
$solar_rad_unit | Input | Unit symbol for this data type | |
$units | Input | Either 'SI' or 'english' | |
$debug | Input | See above |
This function generates the following files.
This function generates a graphic image in PNG format and HTML files of data used to generate the graphs. Data types plotted are air temperature, dew point temperature and relative humidity. If a data item is not available, its graph is not plotted, if no data is available for any of the input types the text "No Data" is plotted in a white rectangle in the middle of a gray background.
This function uses the following ODD-DIVAS global constants. The global constants are
The temperature
utilizes the following arguments in the following order.
Table 52. Argument List for Function temperature
Name | Type | Values | Description |
---|---|---|---|
$subdir | Input | Subdirectory for the output of the generated files, used in cache/$subdir/ | |
$hours | Input | Number | Not used |
$air_temp_times | Input | Array of times as yyyy/mm/dd hh:mm:ss | |
$air_temp_values | Input | Array of data values | Time index must correspond to value index |
$air_temp_unit | Input | Unit symbol for this data type | |
$dew_point_times | Input | Array of times as yyyy/mm/dd hh:mm:ss | |
$dew_point_values | Input | Array of data values | Time index must correspond to value index |
$dew_point_unit | Input | Unit symbol for this data type | |
$rel_hum_times | Input | Array of times as yyyy/mm/dd hh:mm:ss | |
$rel_hum_values | Input | Array of data values | Time index must correspond to value index |
$rel_hum_unit | Input | Unit symbol for this data type | |
$units | Input | Either 'SI' or 'english' | |
$debug | Input | See above |
This function generates the following files.
This function generates a graphic image in PNG format and HTML files of data used to generate the graphs. Data types plotted are water temperature and turbidity. If a data item is not available, its graph is not plotted, if no data is available for any of the input types the text "No Data" is plotted in a white rectangle in the middle of a gray background.
This function uses the following ODD-DIVAS global constants. The global constants are
The water
utilizes the following arguments in the following order.
Table 55. Argument List for Function water
Name | Type | Values | Description |
---|---|---|---|
$subdir | Input | Subdirectory for the output of the generated files, used in cache/$subdir/ | |
$hours | Input | Number | Not used |
$water_temp_times | Input | Array of times as yyyy/mm/dd hh:mm:ss | |
$water_temp_values | Input | Array of data values | Time index must correspond to value index |
$water_temp_unit | Input | Unit symbol for this data type | |
$turbidity_times | Input | Array of times as yyyy/mm/dd hh:mm:ss | |
$turbidity_values | Input | Array of data values | Time index must correspond to value index |
$turbidity_unit | Input | Unit symbol for this data type | |
$units | Input | Either 'SI' or 'english' | |
$debug | Input | See above |
This function generates the following files.
This function generates a graphic image in PNG format and HTML files of data used to generate the graphs. Data types plotted are wave height and dominant wave period. If a data item is not available, its graph is not plotted, if no data is available for any of the input types the text "No Data" is plotted in a white rectangle in the middle of a gray background.
This function uses the following ODD-DIVAS global constants. The global constants are
The wave
utilizes the following arguments in the following order.
Table 58. Argument List for Function wave
Name | Type | Values | Description |
---|---|---|---|
$subdir | Input | Subdirectory for the output of the generated files, used in cache/$subdir/ | |
$hours | Input | Number | Not used |
$wave_height_times | Input | Array of times as yyyy/mm/dd hh:mm:ss | |
$wave_height_values | Input | Array of data values | Time index must correspond to value index |
$wave_height_unit | Input | Unit symbol for this data type | |
$dom_wave_per_times | Input | Array of times as yyyy/mm/dd hh:mm:ss | |
$dom_wave_per_values | Input | Array of data values | Time index must correspond to value index |
$dom_wave_per_unit | Input | Unit symbol for this data type | |
$units | Input | Either 'SI' or 'english' | |
$debug | Input | See above |
This function generates the following files.
This function generates a graphic image in PNG format and HTML files of data used to generate the graphs. Data types plotted are wind speed, direction and gust speed. If a data item is not available, its graph is not plotted, if no data is available for any of the input types the text "No Data" is plotted in a white rectangle in the middle of a gray background.
The wind direction is plotted in the form of a linear plot, rather than a wind rose, if gPRO
is zero; wind direction not plotted otherwise.
This function uses the following ODD-DIVAS global constants. The global constants are
Table 60. Global Constants used by Function wind
Name | Description |
---|---|
gWIDTH | Width in pixels of the generated graph |
gHEIGHT | Height in pixels of the generated graph |
gPRO | Indicates if the professional JpGraph software is installed. |
The wind
utilizes the following arguments in the following order.
Table 61. Argument List for Function wind
Name | Type | Values | Description |
---|---|---|---|
$subdir | Input | Subdirectory for the output of the generated files, used in cache/$subdir/ | |
$hours | Input | Number | Not used |
$minutes | Input | Number | Time period for measurements |
$wind_dir_times | Input | Array of times as yyyy/mm/dd hh:mm:ss | |
$wind_dir_values | Input | Array of data values | Time index must correspond to value index |
$wind_dir_unit | Input | Unit symbol for this data type | |
$wind_speed_times | Input | Array of times as yyyy/mm/dd hh:mm:ss | |
$wind_speed_values | Input | Array of data values | Time index must correspond to value index |
$wind_speed_unit | Input | Unit symbol for this data type | |
$wind_gust_times | Input | Array of times as yyyy/mm/dd hh:mm:ss | |
$wind_gust_values | Input | Array of data values | Time index must correspond to value index |
$wind_gust_unit | Input | Unit symbol for this data type | |
$units | Input | Either 'SI' or 'english' | |
$debug | Input | See above |
This function generates the following files.
This function generates a graphic image in PNG format and HTML files of data used to generate the graphs. Data types plotted are wind direction and speed in the form of a wind rose. If a data item is not available, its graph is not plotted, if no data is available for any of the input types the text "No Data" is plotted in a white rectangle in the middle of a gray background.
The wind direction and speed combination is plotted in the form of a wind rose.
This function uses the following ODD-DIVAS global constants. The global constants are
The windrose
utilizes the following arguments in the following order.
Table 64. Argument List for Function windrose
Name | Type | Values | Description |
---|---|---|---|
$subdir | Input | Subdirectory for the output of the generated files, used in cache/$subdir/ | |
$hours | Input | Number | Not used |
$minutes | Input | Number | Time period for measurements |
$wind_dir_times | Input | Array of times as yyyy/mm/dd hh:mm:ss | |
$wind_dir_values | Input | Array of data values | Time index must correspond to value index |
$wind_dir_unit | Input | Unit symbol for this data type | |
$wind_speed_times | Input | Array of times as yyyy/mm/dd hh:mm:ss | |
$wind_speed_values | Input | Array of data values | Time index must correspond to value index |
$wind_speed_unit | Input | Unit symbol for this data type | |
$units | Input | Either 'SI' or 'english' | |
$debug | Input | See above |
This function generates the following files.
[1] The retrieval is so limited to prevent timeouts in PHP processing for large datasets or stations reporting more frequently than hourly.