GeoEco.DataProducts.NOAA.ClimateIndices.PSLClimateIndices.UrlsToList
- classmethod PSLClimateIndices.UrlsToList(urls, setNoDataValuesToNone=True)
Creates and populates a table of climate index values parsed from NOAA PSL climate index time series data downloaded from a list of URLs.
Requires: Python requests module.
- Parameters:
List of URLs to text files containing climate index data in PSL time series format.
https://psl.noaa.gov/data/climateindices/list/ contains a large table that lists the available climate index data produced by PSL. The left column contains hyperlinks to the datasets and the right column contains the descriptions of the datasets. Find the datasets you are interested in, extract the URLs from the hyperlinks, and provide them to this tool.
For example, if you are interested in the Oceanic Niño Index (ONI), scroll down the table until you reach ONI in the left column. Click on the ONI hyperlink to bring up the page https://psl.noaa.gov/data/correlation/oni.data. Copy/paste that URL from your browser. Minimum length꞉ 1.
setNoDataValuesToNone (
bool, optional) – If True, the returned table will contain aNonewherever the original data has a missing_value. If False, the table will contain the missing_value as it appears in the original data.
- Returns:
1.
listoflistofobject: Table of index values parsed from the input data, represented as a list of lists. The outer list contains the rows of the table. Each inner list contains the field values for a row.There are at least two fields:
Date- the date of the first day of the month and year of the climate index value (e.g. 1-March-1960), as adatetime.Value- the index value of the first climate index in the input data, as afloat. This value may beNonerather than the missing_value if setNoDataValuesToNone is True.
There will be one
Valuefield for each climate index that you provide as input. For example, if you provide three climate indices, a table with four fields will be returned:[[datetime.datetime(1948, 1, 1, 0, 0), 2.5, None, 1.0], [datetime.datetime(1948, 2, 1, 0, 0), 1.5, None, -2.0], [datetime.datetime(1948, 3, 1, 0, 0), 2.75, -8.0, 3.0], ...]
The rows will be ordered in ascending date order and all 12 months will be included for every year. If these months occur in the future they will have the missing_value (or
None). If the occur prior to the first month for which data are available, as shown in the example above for the second climate index, they will also have the missing_value (orNone).2.
listoffloat: List of values that mean “no data is available” in the value fields of the returned table. Each item in this list corresponds to one of the climate indices you provide as input. If setNoDataValuesToNone is False, the list items will be the missing_values parsed from the input data. If True, the list items will all beNone.3.
listofstr: List of comments parsed from the input data. Each item in this list corresponds to one of the climate indices you provide as input. If no comment was present in the input data for an index, an empty string will be stored for it in the list.- Return type:
tupleof 3 items