Climate data come in many different formats, and I've found it useful to automate MATLAB retrieval of most things so that I only have to do it once. Here are some tools I've developed to do this in as painless a way as possible. Note: MATLAB has been gradually adding support for XML and other important formats/web services. My current versions of all of these routines use custom JSON parsing. Once MATLAB supports JSON natively, I will provide all of these routines in a form which runs with no dependencies. Since most NOAA data centers now support REST/JSON, this is clearly the best route in the long-term.
update_indicesAR -- Loads the most recent version of essentially every climate timeseries of interest.
getsoundingAR -- Retrieves radiosonde sounding from UWYO server.
plotsoundingAR -- Makes a skew-T plot of the sounding from getsoundingAR.
get_usgs_streamflowAR -- Retrieves daily USGS streamflow data.
get_usgs_infoAR -- Retrieves information about USGS gauge site.
commonobsAR -- Finds overlapping observations from a pair of timeseries (useful for statistical analyses of heterogeneous data with missing values).
commontimesAR -- Like commonobsAR, but returns only the time indices and not the resampled data. Useful if you have big 4D arrays and you don't want too many of them eating up memory.
indexdatesAR -- Given a vector of dates, returns a structure which indexes which dates correspond to, e.g., strong El Nino events, which are in winter vs. summer, and many other categories of climatological interest.
svdAR -- Performs singular value decomposition analysis of the covariance between two coupled fields.
getwatermap -- Retrieves a USGS gauge decile map or runoff model output for a given date.
plotwatermap -- Calls getwatermap and produces a MATLAB figure to display the figure.
cloudPlotAR -- Makes a density plot of 2D scatter data (like a 2D histogram).
weighted_2dhist -- Similar to cloudPlotAR, but allows weighting of the data.
weighted_hist -- Previous in 1d.
wateryear -- Returns the first and last dates of the water year.
flat -- Flattens an array.
centerlonAR -- Rotates the longitude dimension of an array to center the map on a given region. Useful for switching between (-180,180) and (0,360) conventions.
nmin -- Finds the n smallest values in an array.
exciserows -- Removes any rows with NaNs.
excisecols -- Removes any columns with NaNs.
yrev -- Reverse the y-axis direction.
notick -- Removes tick marks on axes.
update_indicesAR -- Loads the most recent version of essentially every climate timeseries of interest.
getsoundingAR -- Retrieves radiosonde sounding from UWYO server.
plotsoundingAR -- Makes a skew-T plot of the sounding from getsoundingAR.
get_usgs_streamflowAR -- Retrieves daily USGS streamflow data.
get_usgs_infoAR -- Retrieves information about USGS gauge site.
commonobsAR -- Finds overlapping observations from a pair of timeseries (useful for statistical analyses of heterogeneous data with missing values).
commontimesAR -- Like commonobsAR, but returns only the time indices and not the resampled data. Useful if you have big 4D arrays and you don't want too many of them eating up memory.
indexdatesAR -- Given a vector of dates, returns a structure which indexes which dates correspond to, e.g., strong El Nino events, which are in winter vs. summer, and many other categories of climatological interest.
svdAR -- Performs singular value decomposition analysis of the covariance between two coupled fields.
getwatermap -- Retrieves a USGS gauge decile map or runoff model output for a given date.
plotwatermap -- Calls getwatermap and produces a MATLAB figure to display the figure.
cloudPlotAR -- Makes a density plot of 2D scatter data (like a 2D histogram).
weighted_2dhist -- Similar to cloudPlotAR, but allows weighting of the data.
weighted_hist -- Previous in 1d.
wateryear -- Returns the first and last dates of the water year.
flat -- Flattens an array.
centerlonAR -- Rotates the longitude dimension of an array to center the map on a given region. Useful for switching between (-180,180) and (0,360) conventions.
nmin -- Finds the n smallest values in an array.
exciserows -- Removes any rows with NaNs.
excisecols -- Removes any columns with NaNs.
yrev -- Reverse the y-axis direction.
notick -- Removes tick marks on axes.
update_indicesAR.m -- Loads the most recent version of essentially every climate timeseries of interest (from their original source), saves them locally, and (optionally) plots the timeseries for quick inspection. These data are required by some of the other tools. Time is referenced to MATLAB's standard date format, which makes the use of these heterogeneously-sourced data together seamless.
The current list of supported sources is:
Note: if MathWorks adds native OPeNDAP support as they have netCDF support, I will add automated retrievals from NCEP, other reanalyses, and a number of satellite-based products.
The current list of supported sources is:
- ENSO MEI (1950 -- )
- ENSO monthly (1982 -- )
- Nino 1+2 and anomaly.
- Nino 3 and anomaly.
- Nino 4 and anomaly.
- Nino 3.4 and anomaly.
- ENSO weekly (1990 -- )
- Nino 1+2 and anomaly.
- Nino 3 and anomaly.
- Nino 4 and anomaly.
- Nino 3.4 and anomaly.
- Northern Annular Mode (NAM) (1948 -- )
- Arctic Oscillation (AO) (1950 -- )
- Southern Annular Mode (SAM) (1948 -- )
- Pacific Decadal Oscillation (PDO) (1900 -- )
- Pacific-North American Pattern (PNA) (1950 -- )
- North Atlantic Oscillation (NAO) (1950 -- )
- Antarctic Oscillation (AAO) (1979 -- )
- JAXA Sea Ice Extent (2002 -- )
- Mauna Loa CO2 (1958 -- )
- Greenwich Sun Spot Number (1749 -- )
- Total Solar Irradiance (proxy-based) (1611 -- )
- Global Mean Sea Level (1992 -- )
- Hadley Centre Global Mean SST (1850 -- )
- Hadley Centre Global Mean Surface Temperature (1850 -- )
- NOAA Global Mean Land Temperature (1880 -- )
- UAH MSU Lower Tropospheric Temperature (1978 -- )
Note: if MathWorks adds native OPeNDAP support as they have netCDF support, I will add automated retrievals from NCEP, other reanalyses, and a number of satellite-based products.
Radiosonde data access and plotting: These functions access IGRA soundings and plot them. To be added soon are a script to load the full radiosonde record from an IGRA station (rather than retrieving individual soundings from UWYO), and the ability to locate the n nearest stations to a given lat-lon point and plot the soundings from each.
getsoundingAR.m -- Retrieves radiosonde sounding from UWYO server.
plotsoundingAR.m -- Makes a skew-T plot of the sounding from getsoundingAR.
igra-stations.txt -- List of radiosonde stations and their positions.
getsoundingAR.m -- Retrieves radiosonde sounding from UWYO server.
plotsoundingAR.m -- Makes a skew-T plot of the sounding from getsoundingAR.
igra-stations.txt -- List of radiosonde stations and their positions.