ERDDAP Easier access to scientific data | Brought to you by NOAA NMFS SFSC ERD |
griddap request URLs must be in the form
http://coastwatch.pfeg.noaa.gov/erddap/griddap/ datasetID fileType {?query}
For example,
http://coastwatch.pfeg.noaa.gov/erddap/griddap/erdBAssta5day.htmlTable?sst[(2007-10-21T00:00:00)][0][(-75):100:(75)][(180):100:(360)]
Details:
Data fileTypes | Description | Info | Example |
---|---|---|---|
.asc | View the data as OPeNDAP-style comma-separated ASCII text. | info | example |
.csv | Download the data as comma-separated ASCII text table (missing value = 'NaN'; times are ISO 8601 strings). | info | example |
.das | View the data's metadata via an OPeNDAP Dataset Attribute Structure (DAS). | info | example |
.dds | View the data's structure via an OPeNDAP Dataset Descriptor Structure (DDS). | info | example |
.dods | OPeNDAP clients use this to download the data in the DODS binary format. | info | example |
.esriAscii | Download an ESRI ASCII file (for lat lon data only; lon values can't be below and above 180). | info | example |
.graph | View a Make A Graph web page. | info | example |
.html | View an OPeNDAP-style HTML data access form. | info | example |
.htmlTable | View an HTML file with the data in a table (times are ISO 8601 strings). | info | example |
.json | View the data as a JSON table (missing value = 'null'; times are ISO 8601 strings). | info | example |
.mat | Download a MATLAB binary file. | info | example |
.nc | Download a NetCDF binary file with COARDS/CF/THREDDS metadata. | info | example |
.ncHeader | View the header (the metadata) for the NetCDF file. | info | example |
.tsv | Download the data as tab-separated ASCII text table (missing value = 'NaN'; times are ISO 8601 strings). | info | example |
.xhtml | View an XHTML file with the data in a table (times are ISO 8601 strings). | info | example |
MATLAB
MATLAB users can download data from within MATLAB.
Here is a one line example:
load(urlwrite('http://coastwatch.pfeg.noaa.gov/erddap/griddap/erdBAssta5day.mat?sst[(2007-10-21)][0][(-75):50:(75)][(180):50:(360)]&.draw=surface&.vars=longitude|latitude|sst&.colorBar=Rainbow|C|Linear|0|32|', 'test.mat'));The data will be in a MATLAB structure. The structure's name will be the datasetID (for example, "erdBAssta5day").
imagesc(erdBAssta5day.longitude, erdBAssta5day.latitude, squeeze(erdBAssta5day.sst), [0 32]) set(gca, 'YDir', 'normal')The numbers at the end of the first line specify the range for the color mapping. The 'set' command flips the map to make it upright.
Making an Image with a Graph or Map of Gridded Data
If a griddap request URL specifies a subset of data which is suitable for making a graph or a map,
and the fileType is an image fileType, griddap will return an image with a graph or map.
griddap request URLs can include optional graphics commands which let you customize the graph or map.
As with other griddap request URLs, you can create these URLs by hand or have a computer program do it.
Or, you can use the Make A Graph web pages, which simplify creating these URLs (see the "graph" links in the table of griddap datasets).
The fileType options for downloading images of graphs and maps of grid data are:
Image fileTypes | Description | Info | Example |
---|---|---|---|
.geotif | Download a georeferenced .tif (GeoTIFF) image file (for lat lon data only; lon values can't be below and above 180). | info | example |
.kml | Download a Google Earth .kml file (for lat, lon, [time] results only) | info | example |
.smallPdf | Download a small .pdf image file with a graph/map of the data you selected. | info | example |
Download a standard, medium-sized, .pdf image file with a graph/map of the data you selected. | info | example | |
.largePdf | Download a large .pdf image file with a graph/map of the data you selected. | info | example |
.smallPng | Download a small .png image file with a map of the data you selected. | info | example |
.png | Download a standard, medium-sized .png image file with a map of the data you selected. | info | example |
.largePng | Download a large .png image file with a map of the data you selected. | info | example |
.transparentPng | Download a .png image file with the data you selected (a geographic map without axes, landmask, or legend). | info | example |
Using [start:stride:stop]
When requesting dimension (axis) variables or data variables, the query may specify a subset
of a given dimension by identifying the [start{{:stride}:stop}] indices for that dimension.
Or, if you change the fileType in the URL from .png to .graph, you can see a Make A Graph web page with that request loaded:
http://coastwatch.pfeg.noaa.gov/erddap/griddap/erdBAssta5day.graph?sst[(2007-07-01):(2007-10-21)][0][(29)][(225)]&.draw=linesAndMarkers&.vars=time|sst|&.marker=1|3&.color=0xFF9900&.colorBar=|C|Linear|||
That makes it easy for humans to modify an image request to make a similar graph or map.
Or, if you change the fileType in the URL from .png to a data fileType (e.g., .htmlTable), you can download the data that was graphed:
http://coastwatch.pfeg.noaa.gov/erddap/griddap/erdBAssta5day.htmlTable?sst[(2007-07-01):(2007-10-21)][0][(29)][(225)]&.draw=linesAndMarkers&.vars=time|sst|&.marker=1|3&.color=0xFF9900&.colorBar=|C|Linear|||
Or, if you change the fileType in the URL from .png to .graph, you can see a Make A Graph web page with that request loaded:
http://coastwatch.pfeg.noaa.gov/erddap/griddap/erdBAssta5day.graph?sst[(2007-10-21)][0][(-75):50:(75)][(180):50:(360)]&.draw=surface&.vars=longitude|latitude|sst&.colorBar=Rainbow|C|Linear|0|32|
Or, if you change the fileType in the URL from .png to a data fileType (e.g., .htmlTable), you can download the data that was mapped:
http://coastwatch.pfeg.noaa.gov/erddap/griddap/erdBAssta5day.htmlTable?sst[(2007-10-21)][0][(-75):50:(75)][(180):50:(360)]&.draw=surface&.vars=longitude|latitude|sst&.colorBar=Rainbow|C|Linear|0|32|