collate.bathy: Collates two bathy matrices with data from either sides of...

View source: R/collate.bathy.R

collate.bathyR Documentation

Collates two bathy matrices with data from either sides of the antimeridian

Description

Collates two bathy matrices, one with longitude 0 to 180 degrees East, and the other with longitude 0 to 180 degrees West

Usage

collate.bathy(east,west)

Arguments

east

matrix of class bathy with eastern data (West of antimeridian)

west

matrix of class bathy with western data (East of antimeridian)

Details

This function is meant to be used with read.bathy() or readGEBCO.bathy(), when data is downloaded from either sides of the antimeridian line (180 degrees longitude). If, for example, data is downloaded from GEBCO for longitudes of 170E-180 and 180-170W, collate.bathy() will create a single matrix of class bathy with a coordinate system going from 170 to 190 degrees longitude.

getNOAA.bathy() deals with data from both sides of the antimeridian and does not need further processing with collate.bathy().

Value

A single matrix of class bathy that can be interpreted by plot.bathy. When plotting collated data (with longitudes 0 to 180 and 180 to 360 degrees), plots can be modified to display the conventional coordinate system (with longitudes 0 to 180 and -180 to 0 degrees) using function antimeridian.box().

Author(s)

Eric Pante

See Also

getNOAA.bathy, summary.bathy, plot.bathy, antimeridian.box

Examples

## faking two datasets using aleutians, for this example
## "a" and "b" simulate two datasets downloaded from GEBCO, for ex.
	data(aleutians)
	aleutians[1:181,] -> a ; "bathy" -> class(a)
	aleutians[182:601,] -> b ; "bathy" -> class(b)
	-(360-as.numeric(rownames(b))) -> rownames(b) 

## check these objects with summary(): pay attention of the Longitudinal range
	summary(aleutians)
	summary(a)
	summary(b)

## merge datasets:
	collate.bathy(a,b) -> collated
	summary(collated) # should be identical to summary(aleutians)

ericpante/marmap documentation built on April 4, 2023, 2:56 p.m.