km2lon               package:clim.pact               R Documentation

_C_o_n_v_e_r_t _l_o_n_g-_l_a_t _t_o _k_m-_k_m

_D_e_s_c_r_i_p_t_i_o_n:

     The function computes the longitude from given the distance from a
     reference point. See also `km2lat' and `COn0E65N'.

_U_s_a_g_e:

     km2lon(x, y, x.centre=0, y.centre=65)

_A_r_g_u_m_e_n_t_s:

       x: not used.

       y: distance from reference latitude in meridional direction.

x.centre: reference longitude.

y.centre: reference latitude.

_V_a_l_u_e:

     real

_A_u_t_h_o_r(_s):

     R.E. Benestad

_E_x_a_m_p_l_e_s:

     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

