COn0E65N {clim.pact}R Documentation

Convert long-lat to km-km

Description

The function returns the distance in km from 0E 65N given the longitude and latitude. See also km2lon and km2lat.

Usage

COn0E65N(lon, lat, lat.0=65,lon.0=0)

Arguments

lon longitude
lat latitude
lon.0 latitude for reference point
lat.0 latitude for reference point

Value

list(y=latitudes distance,x= longitudes distance)

Author(s)

R.E. Benestad

Examples

library(clim.pact)
data(oslo.t2m)
print(c(oslo.t2m$lon,oslo.t2m$lat))
#[1] 10.71667 59.95000
xy<-COn0E65N(oslo.t2m$lon,oslo.t2m$lat)
oslo.t2m$lon<-xy$x
oslo.t2m$lat<-xy$y
print(c(oslo.t2m$lon,oslo.t2m$lat))
#[1]  595.4086 -560.3004
lon<-km2lon(oslo.t2m$lon,oslo.t2m$lat,x.centre=0,y.centre=65)
lat<-km2lat(oslo.t2m$lon,oslo.t2m$lat,x.centre=0,y.centre=65)
print(c(lon,lat))
#[1] 10.71667 59.95000

[Package clim.pact version 2.2-15 Index]