Skip to main content

Download Time Series

Description

Download time series from a WaterML2 or WaterML1.1 compatible service for features defined in the input data cart feature class. Input feature class must have the "data cart" fields properly populated. Feature class must have at least these fields:

  • HydroID - unique gage internal identifier
  • HydroCode - unique gage external identifier
  • VarCode - unique time series variable identifier (external identifier)
  • StartTime - date of the first time series data to be downloaded (format MM/DD/YYYY)
  • EndTime - date of the last time series data to be downloaded (format MM/DD/YYYY)
  • ServiceURI - URI of the WaterML2 service
  • VarID - HydroID of the time series variable from VariableDefinition table (internal identifier)
  • IsDone - download indicator (0 - download not done; 1 - download done)

These fields will be used to "compose" a WaterML2 query string of following format (the example below shows USGS daily flow service call):

http://waterservices.usgs.gov/nwis/dv/?format=waterml,2.0&sites=08171300meterCD=00060&startDT=2000-01-01&endDT=2003-12-31

where:

For each feature in the input feature class, time series data defined by the URI, HydroCode, VarCode, StartTime, and EndTime for that feature, will be downloaded from the WaterML2 service and stored in the output time series table.

Only records for which IsDone = 0 will be processed. As data are successfully downloaded for a station, its IsDone field will be set to 1. In case the download process gets interrupted, you can restart it and only stations that have not been completed up to that point will be processed. If you want to reprocess all (or some) stations again, make sure you set their IsDone to 0.

If the output time series table already exists, the newly downloaded data will be appended to the end of the existing table. No checking is performed whether the data for a particular station already exist, so if not careful, it is possible to append duplicate data.

Usage

Parameters

Parameter NameTypeDirectionData TypeDialog Reference
Input Data Cart FCRequiredInputFeature LayerFeature class with feature for which to download time series. Input feature class must have the �data cart� fields properly populated. Feature class must have at least these fields:
  • HydroID - unique gage internal identifier
  • HydroCode - unique gage external identifier
  • VarCode - unique time series variable identifier
  • StartTime - date of the first time series data to be downloaded (format MM/DD/YYYY)
  • EndTime - date of the last time series data to be downloaded (format MM/DD/YYYY)
  • ServiceURI - URI of the WaterML2 or WaterML 1.1 service
  • VarID - HydroID of the time series variable from VariableDefinition table
  • IsDone - download indicator (0 - download not done; 1 - download done)

  • Function will set IsDone to 1 for those records that are successfully processed. Only records with IsDone = 0 will be processed.
    Output Time Series TableRequiredOutputStringTime series table (with standard Arc Hydro data structure). FeatureID relates to the HydroID in the input feature. TSValue contains the time series values downloaded from the WaterML2 service. VarID is variable definition from the input feature, while TSDate contains date and time of the measurement. TSOffset is not required for this function.
    Show InfoRequiredInputStringParameter specifying level of information provided during the download of time series data:
  • None - no information about individual stations being downloaded is reported.
  • Info - reports for each station: station identifier, WaterML2 call, number of records saved, and time it took to download and save the data for that station.
  • Info2 - same as the "Info" option but it also stores the returning WaterML2 file. The file will be stored in the same directory where the function's python script is. This option can generate large output files and doubles the time to process each station, so use this option sparingly.