R: Read a Topo File

read.topo {oce} | R Documentation

## Read a Topo File

### Description

Read a file that contains topographic data in the ETOPO dataset, as provided by the NOAA website (see `download.topo` for a good server for such files.

### Usage

    read.topo(file, debug = getOption("oceDebug"))

### Arguments

`file` | Name of a file containing an ETOPO-format dataset. Three types are permitted; see “Details”.
`debug` | an integer specifying whether debugging information is to be printed during the processing. This is a general parameter that is used by many `oce` functions. Generally, setting `debug=0` turns off the printing, while higher values suggest that more information be printed. If one function calls another, it usually reduces the value of `debug` first, so that a user can often obtain deeper debugging by specifying higher `debug` values.

### Details

The three permitted file types are as follows: (1) an ascii type described by NOAA as "?"; (2) a NetCDF format described by NOAA as "GMT NetCDF" (recognized by the presence of a variable named ), and (3) another NetCDF format described by NOAA as "NetCDF" (recognized by the presence of a variable called ). Files in each of these formats can be downloaded with `download.topo`.

### Value

An object of type `topo-class` that which has the following slots.

``data`` | : a data frame containing `lat`, `lon`, and `z`
``metadata`` | : a list containing the source filename
``processingLog`` | : a log, in the standard `oce` format.

### Author(s)

Dan Kelley

### See Also

Other things related to topo data: `[[,topo-method`, `[[<-,topo-method`, `as.topo`, `download.topo`, `plot,topo-method`, `subset,topo-method`, `summary,topo-method`, `topo-class`, `topoInterpolate`, `topoWorld`

### Examples

    ## Not run:
    library(oce)
    topoMaritimes <- read.topo("topoMaritimes.asc")
    plot(topographyMaritimes)

    ## End(Not run)

[Package oce version 1.1-1 Index]