Skip to content

Commit 90c5769

Browse files
committed
DOC: Improve dipole docs. add .ipynb with plots, etc.
1 parent f97eb6f commit 90c5769

File tree

7 files changed

+343
-6
lines changed

7 files changed

+343
-6
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ doc/generated
1717

1818
# Python extras
1919
__pycache__
20+
.ipynb_checkpoints
2021

2122
# autogenerated files
2223
tags

doc/internals/coordinates.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@
2121
## Dipole Coordinates
2222
- Longitude (radians) - radians east of the meridian that contains the north magnetic pole and north rotation axis
2323
- P (meters) - Identifies the field line. This is the same as L-shell and is constant along wach field line.
24-
- Q (dimensionless) - parameterizes the distance along the field line, related to magnetic latitude & radius. This varies along the field line, but the values are idential for all field lines within each node. q=0 at the equator, and approaches positive (negative) infinity as theta points towards the north (south) pole.
24+
- Q (dimensionless) - parameterizes the distance along the field line, related to magnetic latitude & radius. This varies along the field line, but the values are idential for all field lines within each node. q=0 at the equator, and approaches positive (negative) infinity as theta points towards the north (south) pole. Thus, q values will be negative in the southern hemisphere and the change in q "upwards" will be negative in the northern hemisphere. See [../../edu/examples/Dipole](../../edu/examples/Dipole) for more information.
2525

2626
## More Dipole Coordinates
2727
- L-shell (Planetary Radii) - The distance from the planet's center at which the magnetic field encounters the dipole's equatorial plane
2828
- Magnetic Latitude (radians) - angle between the dipole's equatorial plane and a point.
2929
- Invariant Latitude (radians) - angle between the dipole's equatorial plane and the point at which the field-line passes through a reference radius of the planet ([specified in the inputs](../internals/grid.md#inputs)). This is constant along the field-line and is related to the L-Shell.
3030
- Magnetic Local Time (hours) - Angle between the sun, the north magnetic pole, and the point. Explicitly, this is done in PSE XY coordinates, ignoring the Z coorinate.
3131

32-
> The dipole `(i,j,k)` coordinates are (magnetic longitude, magnetic latitude, radius).
32+
> The dipole `(i,j,k)` coordinates are (magnetic longitude, p, q).
3333
3434
# Coordinates in Aether
3535

@@ -53,7 +53,7 @@ For the (perfectly) spherical grid, the i-coordinate is longitude, the j-coordin
5353

5454
For the Cubedsphere grid, the i-coordinate is RIGHT, the j-coodinate is UP, and the k-coordinate is radius. Each face of the cubedsphere has the same coordinate system, but only with reference to that face. This means that if each face is looked at independently, the lower left corner is at (about) i = -45, j = -45 deg, while the upper right corner is at i = +45, j = +45 deg. Radius is treated the same as in a spherical grid.
5555

56-
For the dipole coordinate system, the i-coordinate is magnetic longitude, the j-coordinate is magnetic latitude, and the k-coordinate is radius. The dipole is orthogonal to a dipolar magnetic field.
56+
For the dipole coordinate system, the i-coordinate is magnetic longitude, the j-coordinate is L-shell, and the k-coordinate is Q: a dimensionless parameter, normalized to the planet radius, representing diatance along a magnetic field line. The dipole is orthogonal to a dipolar magnetic field.
5757

5858

5959
Should the official coordinates be in the native coordinates (which could be different for each system), or should the coordinates be in meters, such that when gradients are taken, they are in /m?

edu/examples/Dipole/MoreDipoleInfo.ipynb

Lines changed: 334 additions & 0 deletions
Large diffs are not rendered by default.

edu/examples/Dipole/dipole.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,12 @@ def main(alt_minRE, alt_maxRE, lat_min, lat_max, origins, extent, nLatsPerBlock,
111111
qs[:, iAlt] = ((q_min_center + (iAlt - nGCs + 0.5) * delQ))
112112

113113
# If we were in South hemisphere, multiply by -1
114-
# (and reverse so the points are ascending in q, same order as NH)
114+
# And put data in the same order as we get back from Aether
115115
if isSouth:
116-
qs = -1*np.flip(qs)
117-
qcenters[n,:] = qs
116+
qs = -1.0*qs
117+
pcenters2d = np.flip(pcenters2d, axis=0)
118+
119+
qcenters[n,:] = np.flip(qs, axis=1)
118120
pcenters[n,:] = pcenters2d
119121

120122
return qcenters, pcenters
99.6 KB
Loading
Loading
Loading

0 commit comments

Comments
 (0)