Extract satellite data in an ERDDAP dataset from national marine sanctuary polygon for a given year and month.
ply2erddap(sanctuary_code, erddap_id, erddap_fld, year, month, stats)
The sanctuary code based on prefix to Sanctuary GIS files, e.g. "cinms"
for Channel Islands Marine Sanctuary
The dataset ID of ERDDAP dataset (see coastwatch.pfeg.noaa.gov/erddap), e.g. "jplMURSST41mday"
for Multi-scale Ultra-high Resolution SST Analysis
The variable of ERDDAP dataset to extract, e.g. "sst"
4-digit year.
integer month (1-12).
The statistics to be calculated.
A list of values by statistic.
if (FALSE) {
ply2erddap("cinms", "jplMURSST41mday", "sst", year = 2010, month = 6, c("mean", "sd"))
}