0
$\begingroup$

Earth science often uses a different convention for spherical coordinates than the spherical coordinates Mathematica defines by "Spherical". "Spherical" uses (radius, colatitude, longitude). The common Earth science convention is (radius, latitude, longitude). Colatitude is the angle from the North Pole, latitude is the angle from the Equator with positive being north, and latitude = pi/2 - colatitude.

Is there a name like "Spherical" that I can use to work with the Earth science convention? If not, can I define a new coordinate system that I can use everywhere I use coordinate transforms like "Spherical", in coordinate transforms, Laplacians, etc?

More detail added:

Let's call this new coordinate system "GeoSpherical", with coordinates {radius, latitude, longitude}. Suppose I have a function in these coordinates F[r, latitude, longitude]. I want to do vector calculus in these coordinates, taking the Laplacian, Curl, Div, and Grad of F using the same syntax as other coordinate systems. The Laplacian would then be

Laplacian[F[r, latitude, longitude],{r, latitude, longitude},"GeoSpherical"]

I also want to transform a function, say 8 x y z, using

TransformedField["Cartesian" -> "GeoSpherical", 8 x y z, {x, y,z} -> {r, latitude, longitude}]

CoordinateChartData[] gives a list of coordinate systems but it doesn't look like any of them are what I want. I would be happy if I was wrong and the coordinate system is already predefined.

The transformation from "Spherical" to "GeoSpherical" is mathematically simple, just latitude = pi/2 - colatitude. If I knew the syntax I could calculate and define all the data CoordinateChartData needs to define a coordinate system.

$\endgroup$
6
  • $\begingroup$ Have you looked at GeoProjectionData[]? $\endgroup$
    – Syed
    Commented Feb 10, 2023 at 22:55
  • $\begingroup$ Thanks, that's an interesting idea. I don't see how I can use it in functions like Laplacian though. $\endgroup$
    – jeff
    Commented Feb 11, 2023 at 16:27
  • $\begingroup$ Please upload a concrete example that needs such a transformation for its solution. I thought that a standard projection would be helpful or perhaps your problem could be tackled by one of the Geo* functions. What about TransformedField and CoordinateTransform? $\endgroup$
    – Syed
    Commented Feb 12, 2023 at 11:49
  • $\begingroup$ I do want to use TransformedField and CoordinateTransfrom. They use a named coordinate system, e.g. CoordinateTransform[ "Spherical" -> "Cartesian", {r, [Theta], [Phi]}]. I need the name corresponding to the Earth science spherical coordinates. I did't see it in the output from CoordinateChartData[] but maybe, hopefully, I'm just missing it. $\endgroup$
    – jeff
    Commented Feb 12, 2023 at 19:47
  • $\begingroup$ Please update your question with relevant info you mentioned above. I don't know the name of the Coordinate system you are looking for, but someone else will likely know it. Adding an example will go a long way, especially if it is a routine calculation in the field of Earth Sciences. $\endgroup$
    – Syed
    Commented Feb 12, 2023 at 20:01

1 Answer 1

1
$\begingroup$

Is the answer to this question perhaps what you're looking for?

geoSphericalPatch = 
  SymbolicTensors`ScaleFactorGeometryPatch[{1, r, r Sin[π/2 - θ]}, {r, θ, φ}];

Simplify[Laplacian[u @@ {r, θ, ϕ}, {r, θ, ϕ}, geoSphericalPatch], r > 0]

Note this won't work for TransformedField though.

$\endgroup$
1
  • $\begingroup$ Thanks. That's very helpful. $\endgroup$
    – jeff
    Commented Feb 13, 2023 at 16:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.