getgiss {clim.pact} | R Documentation

## Retrieve station record from the GISS data set from URL.

### Description

Reads the data from GISS available at URL: http://www.smhi.se/hfa_coord/nordklim/. Also see `getdnmi` and `getnacd`.

Use eg `options(timeout=120)` if problems with retreaving the data. Some times, the code doesn't manage to read the data, and returns with the message: "cannot open: HTTP status was '404 Not Found'". Try again, since slow connections cause this problem. One trick that often helps is to use the function to get the name of the station (`stations <- getgiss()`), then use a browser (Mozilla) to open the data file from http://www.giss.nasa.gov/data/update/gistemp/station_data/, and then call `getgiss` again with the station details.

### Usage

    getgiss(stnr=NULL,location=NULL,lon=NULL,lat=NULL,stations=NULL,silent=FALSE)

### Arguments

`stnr` | Station number.
`location` | Name of locvation.
`lon` | longitude. If both `lon` and `lat` are specified and the other arguments are not, then find the closest station.
`lat` | latitude.
`stations` | a list object with details of GISS stations (Prescribing this saves time).
`silent` | For verbose use.

### Value

a <- list of "monthly.station.record" class:

val | The monthly values (a 12-column matrix with one column for each year).
station | station number.
yy | The years of observation (vector).
lat,lon | Latitude and longitude of the location.
x.0E65N,y.0E65N | Distance in km from 0E, 65N.
location | Name of location .
wmo.no | WMO number.
start | Start of observatins from this location.
yy0 | First year in current record.
ele | Code of theelement.
obs.name | Name of the element.
unit | Unit of the element.
country | The country in which the location is located.
quality | Code/description for data quality.
found | Flag: T - the data requested was found.
ref | Reference for the data set.

or a list of station details if the requested station was not found.

### Author(s)

R.E. Benestad

### Examples

    ## Not run:
    obs.oxford <- getgiss(location="Oxford")  # Takes longer time
    stations <- getgiss()
    obs.oxford <- getgiss(location="Oxford",stations=stations) #Quicker
    plotStation(obs.oxford)
    obs.broome <- getgiss(stnr="501942030004",stations=stations)
    obs.120E.40S <- getgiss(lon=120,lat=-40,stations=stations)
    ## End(Not run)

[Package Contents]