rotate               package:clim.pact               R Documentation

_R_o_t_a_t_e _s_p_h_e_r_i_c_a_l _c_o_o_r_d_i_n_a_t_e_s

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

     The function uses the 3-dimensional space to find vectors
     describing the locations on a sphere that correspond to a given
     longitude and latitude. Two reference points are given, one for
     the new 'north pole': 

 vec{r}_0 = [cos(phi_0)cos(theta_0),sin(phi_0),cos(phi_0)sin(theta_0)].

     {r0 = [cos(lat.0)*cos(lon.0),sin(lat.0),cos(lat.0)*sin(lon.0).}
     and and one for a point on the same meridian 

                                  rx

     , but closer to the equator. The vector corresponing to each of
     the longitude-latitude point is given by:

 vec{r}_i = [cos(phi_i)cos(theta_i),sin(phi_i),cos(phi_i)sin(theta_i)].

     {r[i]
     =[cos(lats[i])*cos(lons[i]),sin(lats[i]),cos(lats[i])*sin(lons[i])
     .}

     The new spherical coordinates are computed as follows: new
     latitude (`phi') is the angle between the the vectors 

                                  r0

     and 

                                 r[i]

     . The new longitude (`theta') is the angle between the the vectors 

                               r[i]-r0

     and 

                                rx-r0

     . The angles are estimated by taking the inner-product and the
     arc-cosine.

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

     rotate(lons,lats,lon.0=NULL,lat.0=NULL)

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

    lons: Longitude coordinates to be rotated.

    lats: Latitude coordinates to be rotated.

   lon.0: Longitude coordinate of point corresponding to new
          'north'pole.

   lat.0: Latitude coordinate of point corresponding to new
          'north'pole.

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

     list containing `phi' and `theta', the new spherical coordinates.

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

     R.E. Benestad

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

