/[escript]/trunk/downunder/py_src/datasources.py
ViewVC logotype

Diff of /trunk/downunder/py_src/datasources.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 4151 by caltinay, Fri Jan 18 00:51:49 2013 UTC revision 4152 by caltinay, Tue Jan 22 00:29:03 2013 UTC
# Line 52  def LatLonToUTM(lon, lat, wkt_string=Non Line 52  def LatLonToUTM(lon, lat, wkt_string=Non
52             assumed to be given in the Clarke 1866 projection.             assumed to be given in the Clarke 1866 projection.
53    
54      :param lon: longitude value(s)      :param lon: longitude value(s)
55      :type lon: `float`, `list`, `tuple`, or ``numpy.array``      :type lon: ``float``, ``list``, ``tuple``, or ``numpy.array``
56      :param lat: latitude value(s)      :param lat: latitude value(s)
57      :type lat: `float`, `list`, `tuple`, or ``numpy.array``      :type lat: ``float``, ``list``, ``tuple``, or ``numpy.array``
58      :rtype: ``numpy.array``      :rtype: ``numpy.array``
59      """      """
60    
# Line 81  def LatLonToUTM(lon, lat, wkt_string=Non Line 81  def LatLonToUTM(lon, lat, wkt_string=Non
81      return x,y      return x,y
82    
83  def simpleGeoMagneticFluxDensity(latitude, longitude=0.):  def simpleGeoMagneticFluxDensity(latitude, longitude=0.):
84        """
85        Returns an approximation of the geomagnetic flux density B at the given
86        `latitude`. The parameter `longitude` is currently ignored.
87    
88        :rtype: ``tuple``
89        """
90      theta = (90-latitude)/180.*np.pi      theta = (90-latitude)/180.*np.pi
91      B_0=U.Mu_0  * U.Magnetic_Dipole_Moment_Earth / (4 * np.pi *  U.R_Earth**3)      B_0=U.Mu_0  * U.Magnetic_Dipole_Moment_Earth / (4 * np.pi *  U.R_Earth**3)
92      B_theta= B_0 * sin(theta)      B_theta= B_0 * sin(theta)

Legend:
Removed from v.4151  
changed lines
  Added in v.4152

  ViewVC Help
Powered by ViewVC 1.1.26