Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
125 commits
Select commit Hold shift + click to select a range
0b69f4d
FEAT: Update binary search `search_altitudes`
abukowski21 Mar 10, 2025
235e527
BUG: Complete the change from MagLat to MagInvLat.
abukowski21 Mar 10, 2025
c578a43
BUG: do not fill dipole grid's mag coords in fill_grid_bfield
abukowski21 Mar 10, 2025
464998f
FEAT: Add methods to do dipole interpolation
abukowski21 Mar 11, 2025
955bcf9
FEAT: Inputs for new dipole grid
abukowski21 Mar 14, 2025
c568846
FEAT: Quadtree for new dipole - 4 & 6 root nodes
abukowski21 Mar 14, 2025
3027485
FEAT/DOC: Update Python script to match new dipole grid
abukowski21 Mar 17, 2025
defd757
FEAT: Put pole-most points into python script
abukowski21 Mar 17, 2025
ff16298
STY: more comments, formatting
abukowski21 Mar 18, 2025
c1ee971
Merge branch 'interpolations' into ortho_dipole
abukowski21 Mar 18, 2025
3f8465f
FEAT: New dipole grid is in place. Kinda.
abukowski21 Mar 19, 2025
d64be6b
BUG: Quadtree was dividing dipole into (nonexistent) fourths. Everyth…
abukowski21 Mar 19, 2025
553e6e6
FEAT: Orthogonal dipole grid is working
abukowski21 Mar 19, 2025
4f45367
FEAT: Show which cubes are not all_finite in stdout
abukowski21 Mar 19, 2025
704cdc7
DOC: Start updating dipole writeup. Committing to see if github likes…
abukowski21 Mar 19, 2025
07c42c2
doc: testing github markdown again
abukowski21 Mar 19, 2025
79ec550
BUGS: Fix mismatch max/min & clear up bool logic in init_mag_grid q-l…
abukowski21 Mar 19, 2025
dd9d4e1
DOC: explain how the dipole grid is made.
abukowski21 Mar 19, 2025
c00e905
sty/doc: Change grid.md formatting to make it prettier?
abukowski21 Mar 20, 2025
bc0a276
sty: Does github let me number equations?
abukowski21 Mar 20, 2025
0d1d351
STY: it does not. revert previous commit, fix eq format, change some …
abukowski21 Mar 20, 2025
5b405a8
DOC: Decide what the dipole (i,j,k) coords are!
abukowski21 Mar 20, 2025
42701ee
MAINT: Clean up unused/outdated bits. clear up comments around magnet…
abukowski21 Mar 20, 2025
66e5763
Do not re-define magnetic coords for dipole grid in fill_grid
abukowski21 Mar 20, 2025
9251259
BUG: Rewrite init_mag_grid again. Fix order of points, add in (i,j,k)…
abukowski21 Mar 20, 2025
112ce90
STY: astyle, and make sure grids are addressed consistently
abukowski21 Mar 20, 2025
1ae6be7
BUG/FEAT: Change & correct how dipole grid spacing is done
abukowski21 Mar 21, 2025
c6ddab2
FEAT: Add generic k-direction gradient
abukowski21 Mar 22, 2025
59d32e8
FEAT: Dipole gradient. Might be redundant...
abukowski21 Mar 22, 2025
f61f2a5
MAINT: Remove some unused func's and variables from mag grid things
abukowski21 Mar 23, 2025
b06b008
FEAT: Add bones for converting offset dipole to geo (grid)
abukowski21 Mar 23, 2025
699ce3b
FEAT/STY: Overload get_radius to accept floats & cubes
abukowski21 Mar 23, 2025
77698d4
BUG: Fix dipole grid's radius calculations
abukowski21 Mar 23, 2025
f0b231c
Revert "FEAT/STY: Overload get_radius to accept floats & cubes"
abukowski21 Mar 25, 2025
34f7eb1
BUGS: Fix type issues in mag_to_geo & clarify reporting in solver_gra…
abukowski21 Mar 25, 2025
dd595f5
BUG: Fix order of pts in mag grid (k-direction) & start changing to d…
abukowski21 Mar 31, 2025
dc4045a
sty: clean up error reporting around offset dipole
abukowski21 Apr 3, 2025
2df83cb
BUG/STY: Fix some missing points in dipole grid, formatting
abukowski21 Apr 3, 2025
fd005d5
FEAT: Check for non-physical cells on geo & mag grids
abukowski21 Apr 3, 2025
88fc85a
BUG: Catch errors making any kind of mag grid
abukowski21 Apr 3, 2025
471f5f5
BUG: Fix radius vs alt units & geo/mag lat on dipole grid
abukowski21 Apr 4, 2025
3104072
STY: Minor changes to dipole things
abukowski21 Apr 7, 2025
70796da
BUG: Fix dipole gradients!
abukowski21 Apr 7, 2025
4abac08
STY: Use scale height func in chapman integrals
abukowski21 Apr 7, 2025
fd13016
FEAT: Add cube with boolean "UseThisCell" for dipole grid. default=true
abukowski21 Apr 7, 2025
6b5ba69
SPEED: speed up calc_efield a tiny bit
abukowski21 Apr 7, 2025
218c7a5
STY: remove std namespace from init_mag_grid
abukowski21 Apr 7, 2025
a4724ff
STY/Bugs: Get chapman integrals working on dipole, clean up code a bit.
abukowski21 Apr 7, 2025
f97eb6f
DOC: add explainer on ninja builds, correct some info on installing &…
abukowski21 Apr 8, 2025
90c5769
DOC: Improve dipole docs. add .ipynb with plots, etc.
abukowski21 Apr 8, 2025
ed941f8
BUG: Fix units in dipole dk_*_meters
abukowski21 Apr 8, 2025
1f47579
STY: Limits outputs from grid_match to high verbosity
abukowski21 Apr 8, 2025
f3e7f81
BUG: Fix init_mag_grid gravity unit vector
abukowski21 Apr 9, 2025
aae064f
BUG: Ensure dk is negative for the dipole grid.
abukowski21 Apr 9, 2025
2274a46
BUG: Remove need to do altitude gradient. use k only.
abukowski21 Apr 9, 2025
224a5d4
BUG: um, dk needs to be POSITIVE for dipole. nan_checks pass now
abukowski21 Apr 9, 2025
7bb99ed
DOC: Update dipole ipynb w prev commit change
abukowski21 Apr 9, 2025
d88cd13
FEAT: Remove need to do lat/lon gradients, instead we can use j&i
abukowski21 Apr 9, 2025
0a3e91f
STY: Alter some verbosity when running
abukowski21 Apr 9, 2025
03e521e
BUG: Gravity & b-field on dipole, fixed
abukowski21 Apr 9, 2025
18c6740
FEAT: Create function to read armadillo cubes into Python. Contains i…
abukowski21 Apr 10, 2025
58e2f21
FEAT: Better handling of alt gc's. And add mat of first ghost cell.
abukowski21 Apr 14, 2025
e0db896
FEAT: Add func to read armadillo mats
abukowski21 Apr 14, 2025
6bb4d6d
bug??: Make sure the altitude limits & ghost cells on the dipole grid…
abukowski21 Apr 15, 2025
94fcdea
FEAT: Get vertical neutral (lower) bc's working with new dipole grid
abukowski21 Apr 15, 2025
392dc09
BUG: ammend prev commit: IC's and BCs were missing some important cells.
abukowski21 Apr 15, 2025
89d766c
DOC: Some plots of the dipole corners & their connections
abukowski21 Apr 17, 2025
0dc3e6c
BUG/STY: Astyle! And fixing init_mag_grid to work better for hi-res
abukowski21 Apr 17, 2025
862b40a
BUG: Use radial distance for BC's, not k-distance
abukowski21 Apr 17, 2025
bf53dfe
BUG: something is wrong with gravity!
aaronjridley Apr 23, 2025
6d25699
BUG: need to start at the first physical cell
aaronjridley Apr 23, 2025
f80320e
BUG: first GC + nGCs - 1 = 2, I think
aaronjridley Apr 23, 2025
f4c319f
FEAT: output magnitude of gravity
aaronjridley Apr 23, 2025
9ea7544
BUG: need sphere4 to go along with dipole4
aaronjridley Apr 23, 2025
ae3ce01
BUG: to capture e-region, need 100 points
aaronjridley Apr 23, 2025
3bcd3fa
STY: Astyle, yo
abukowski21 Apr 18, 2025
e12e25e
FEAT: Make ortho dipole4 the default ionGrid in settings files
abukowski21 Apr 18, 2025
7b8f0de
STY: Formatting of share/run/UA/inputs/defaults.json
abukowski21 Apr 18, 2025
6d5a5cc
FEAT: Make sphere4 the default neutral shape. This will require mpi!
abukowski21 Apr 18, 2025
99cb393
FEAT: Framework for adding tests in at runtime
abukowski21 Apr 21, 2025
79a4c85
FEAT: Create (semi-functional) gradient test
abukowski21 Apr 21, 2025
042302f
DOC: Fix MacOS install instructions to use g++ over clang
abukowski21 Apr 21, 2025
3f3fa44
FEAT: Add a globbed run* to .gitignore - supports any name of rundir's
abukowski21 Apr 23, 2025
5ef672e
FEAT: Post processor improvements! Including:
abukowski21 Apr 23, 2025
30fa3dd
BUG: Whoops prev commit on postprocessor was missing two pieces
abukowski21 Apr 23, 2025
febb59b
BUG: Fix radial unit vector typos in init_mag_grid
abukowski21 Apr 23, 2025
fa4c0bb
DOC: added a couple of comments
aaronjridley Apr 24, 2025
b699a5e
BUG: change sign of b-field in north
aaronjridley Apr 24, 2025
5a5204e
BUG: still issues with gravity direction
aaronjridley Apr 24, 2025
7f32743
FEAT: output grid spacing
aaronjridley Apr 25, 2025
cdc8bac
BUG: spacing should have times -1 in south
aaronjridley Apr 25, 2025
0bb93cd
STY: removed a random comment
aaronjridley Apr 25, 2025
5515253
STY: iDim -> iComp + remove int64_t everywhere
aaronjridley Apr 25, 2025
3866b60
FEAT: Add isClosed to all grids & doesTouch(S/N) pole to dipole
abukowski21 Apr 25, 2025
db2d8fb
DOC: Update docs & default input files to be consistent & correct
abukowski21 Apr 27, 2025
beba721
DOC: Add section on OpenMP & toc to running_aether.md
abukowski21 Apr 27, 2025
b6ecccc
BUG: Make check_for_nans TRUE be default. there are some gremlins
abukowski21 Apr 27, 2025
fc39fa0
FEAT: added ability to message pass
aaronjridley Apr 30, 2025
989984c
FEAT: message passing on multiple grids + iDir = 4
aaronjridley Apr 30, 2025
1c2ef28
FEAT: gotta know if dipole and closed!
aaronjridley Apr 30, 2025
9c9ac14
FEAT: dipole quadtree is like sphere quadtree
aaronjridley Apr 30, 2025
1f0622b
FEAT: connectivity for dipole grid
aaronjridley Apr 30, 2025
12ba82c
FEAT: exchange messages for ion grid
aaronjridley Apr 30, 2025
0bb1649
BUG: row/col switched in solver_gradients 4o_j
abukowski21 Apr 30, 2025
4961430
BUG: init_mag_grid wasn't correctly identifying if its touching the pole
abukowski21 May 8, 2025
c740361
STY: astyle, yo
abukowski21 May 8, 2025
eb9e29b
BUG: Dipole missing factor of 2 in number of GCs
abukowski21 May 8, 2025
d8c29af
BUG: need a communicator for members of same ensemble
aaronjridley May 14, 2025
fe71bab
BUG: static causes issues for second grid
aaronjridley May 14, 2025
1655828
FEAT: new communicator for ensemble
aaronjridley May 14, 2025
5fe11f9
FEAT: sync mean across ensemble member
aaronjridley May 14, 2025
f43ddd6
Merge branch 'ortho_dipole' of github.com:AetherModel/Aether into ort…
aaronjridley May 22, 2025
ab076ec
BUG: Fix read_armadillo.py, indexing was weird/inconsistent
abukowski21 May 23, 2025
9037f7e
Merge branch 'develop' into ortho_dipole
aaronjridley Jul 17, 2025
a220761
I hate warnings
aaronjridley Jul 17, 2025
67ef92c
Merge branch 'ortho_dipole' of github.com:AetherModel/Aether into ort…
aaronjridley Jul 17, 2025
260706d
Merge branch 'ortho_dipole' of github.com:aethermodel/Aether into ort…
abukowski21 Jul 17, 2025
e1172ca
BUG: Typo in input/importError in postaether
abukowski21 Aug 13, 2025
c039efd
FEAT: Dipole interpolation coefficients
abukowski21 Aug 13, 2025
fea307e
FEAT: Conversions btwn mag/geo (moved one out of init_mag_grid)
abukowski21 Aug 13, 2025
d310131
add thermoelectric heating=false to defaults.json
abukowski21 Aug 13, 2025
6d5ae64
sty: rename binary > bisect search
abukowski21 Aug 13, 2025
cfd09cf
test: Some stuff for the gradient test on the dipole grid. it doesnt …
abukowski21 Aug 13, 2025
61ed779
STY: ASTYLE, YO
abukowski21 Aug 13, 2025
85f9c87
add radius to bfield output
abukowski21 Aug 13, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,15 @@

# Run and build directories
run/
run.test/
run*/
build/

# Doxygen generated files
doc/generated

# Python extras
__pycache__
.ipynb_checkpoints

# autogenerated files
tags
Expand Down
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ endif()

# Directory variables
file(GLOB SRC_FILES ${PROJECT_SOURCE_DIR}/src/*.cpp)
file(GLOB TEST_FILES ${PROJECT_SOURCE_DIR}/srcTest/*.cpp)
set(MAIN_DIR ${PROJECT_SOURCE_DIR}/src/main)
set(TESTS_DIR ${PROJECT_SOURCE_DIR}/tests)
set(OUT_DIR ${PROJECT_SOURCE_DIR}/src/output)
Expand All @@ -34,7 +35,7 @@ elseif(TEST_EXCHANGE)
elseif(TEST_GRADIENT)
add_executable(aether ${SRC_FILES} ${MSIS_FILES} ${MAIN_DIR}/main_test_gradient.cpp)
else()
add_executable(aether ${SRC_FILES} ${MSIS_FILES} ${IE_FILES} ${MAIN_DIR}/main.cpp)
add_executable(aether ${SRC_FILES} ${TEST_FILES} ${MSIS_FILES} ${IE_FILES} ${MAIN_DIR}/main.cpp)
endif()

if(USE_DOUBLE_PRECISION)
Expand Down
25 changes: 16 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ developed.

## Contents

- [Aether](#aether)
- [Contents](#contents)
- [Quick Start](#quick-start)
- [Dependencies](#dependencies)
- [Getting the Code](#getting-the-code)
- [Compiling \& Running](#compiling--running)
- [Code Manual](#code-manual)
- [Further Documentation](#further-documentation)
- [Contents](#contents)
- [Quick Start](#quick-start)
- [Dependencies](#dependencies)
- [Getting the Code](#getting-the-code)
- [Compiling \& Running](#compiling--running)
- [Inputs](#inputs)
- [Code Manual](#code-manual)
- [Further Documentation](#further-documentation)

## Quick Start

Expand Down Expand Up @@ -141,9 +141,16 @@ structure like this:
cd ..
cp -R share/run ./run.test
cd run.test
./aether
mpirun -np 4 ./aether
```

This will run the default configuration of Aether, which requires four MPI processors.
The default grids are `sphere4` and `dipole4` for the neutrals and ions (respectively),
which both require four "root nodes", or MPI workers. To read more about root nodes and
the available grids, please see [this page in the documentation](doc/internals/grid.md).

### Inputs

There are essentially two input files that specify the settings in the code.
When you are in a run directory, they are:

Expand Down
1 change: 1 addition & 0 deletions doc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Contents within `doc`:
- [Ensembles](internals/ensembles.md)
- [Indices](internals/indices.md)
- [The Grid](internals/grid.md)
- [Coordinate Systems](internals/coordinates.md)
- [Doxyfile](Doxyfile)
- [README (this page)](README.md)
- [Citations](citations.md)
Expand Down
31 changes: 19 additions & 12 deletions doc/installation/dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,28 +21,35 @@ If a path is printed, `cmake` is installed. To check the version, run `cmake
The layout of this page is as follows:

- [Installing Dependencies](#installing-dependencies)
- [Install gcc](#install-gcc)
- [Install Compiler](#install-compiler)
- [Install cmake](#install-cmake)
- [Install JSON libraries](#install-json-libraries)
- [Install Armadillo (and boost)](#install-armadillo-and-boost)
- [Install NetCDF (optional)](#install-netcdf-optional)

## Install gcc
## Install Compiler

This comes installed by default on Ubuntu. On MacOS this can be installed, for
example, using:
On MacOS this can be installed, for example, using:

```bash
sudo port install gcc11
sudo port install g++
```

> As development began, gcc11 was the latest version; there are newer versions
> of `gcc` available now (latest version is gcc14), which have not yet been
> validated.
> NOTE: On Macos, cmake will default to using clang instead of gcc.
You need to set an environmental variable to tell cmake to use g++ instead.
Do this with `export CXX=/opt/local/bin/g++`,
and replace the path if it is placed somewhere different.

On Ubuntu, `gcc` (the C-compiler) is pre-installed, but the C++ compiler is not. This
can be installed with (subsituting your machine's package manager command):

```bash
sudo apt install g++
```

## Install cmake

Aether uses [CMake](https://cmake.org/) instead of `make`. If you don't have it
Aether uses [CMake](https://cmake.org/) instead of GNU make. If you don't have it
installed, you need it.

For MacOS, this can be installed with:
Expand All @@ -57,7 +64,7 @@ For Ubuntu/Debian Linux:
sudo apt install cmake
```

This can be done on RedHat using yum also.
This can be done on RedHat using `yum` also.

## Install JSON libraries

Expand Down Expand Up @@ -100,7 +107,7 @@ sudo port install lapack
sudo port install OpenBLAS
sudo port install boost
sudo port install armadillo
sudo port install openmpi-bin libopenmpi-dev
sudo port install openmpi
```

## Install NetCDF (optional)
Expand All @@ -119,7 +126,7 @@ sudo port install netcdf-cxx4
If you want the gcc version of netcdf, then:

```bash
sudo port install netcdf-cxx4 +gcc10
sudo port install netcdf-cxx4
```

On Ubuntu, gcc is the default compiler, it seems like you can probably just do:
Expand Down
6 changes: 3 additions & 3 deletions doc/installation/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,10 @@ Here `FLAG` is a flag name and `VALUE` is the desired value (note the `-D`). A
more complete discussion of the available compilation flags can be found on the
[Compilation Options](build_opts.md) page.

If your default compiler isn't a GCC compiler, you will likely need to specify
the desired GCC compiler at this step using:
> If your default compiler isn't a GCC compiler, you will likely need to specify
the desired GCC compiler at this step using the environmental variable `$CXX`, or:

```bash
> ```bash
cmake -DCMAKE_CXX_COMPILER=<gcc or mpi executable with full path>
```

Expand Down
16 changes: 10 additions & 6 deletions doc/internals/coordinates.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,16 @@

## Dipole Coordinates
- Longitude (radians) - radians east of the meridian that contains the north magnetic pole and north rotation axis
- P (?) - Identifies the field line, related to L-shell
- Q (meters?) - The distance along the field line from some reference point, related to magnetic latitude.
- P (meters) - Identifies the field line. This is the same as L-shell and is constant along wach field line.
- 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.

## More Dipole Coordinates
- L-shell (Planetary Radii) - The distance from the planet's center at which the magnetic field encounters the dipole's equatorial plane
- Magnetic Latitude (radians) - angle between the dipole's equatorial plane and the point.
- Invariant Latitude (degrees) - angle between the dipole's equatorial plane and the point at which the field-line passes through a reference radius of the planet. This is constant along the field-line and is related to the L-Shell.
- Magnetic Latitude (radians) - angle between the dipole's equatorial plane and a point.
- 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.
- 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.

> The dipole `(i,j,k)` coordinates are (magnetic longitude, p, q).

# Coordinates in Aether

Expand All @@ -46,12 +47,15 @@ Because Aether considers gravity to be a function of radius and explicitly inclu

## i, j, k Coordinates

As described in the grid.md file, Aether uses a logical '(i, j, k)' 3D grid structure. Therefore, we refer to the 'primary' coordinates as the ijk coordinate system. What this means is that the i-coordinate is in the i-direction, the j-coordinate is in the j-direction, and the k-coordinate is in the k-direction.
As described in the grid.md file, Aether uses a logical `(i, j, k)` 3D grid structure. Therefore, we refer to the 'primary' coordinates as the ijk coordinate system. What this means is that the i-coordinate is in the i-direction, the j-coordinate is in the j-direction, and the k-coordinate is in the k-direction.

For the (perfectly) spherical grid, the i-coordinate is longitude, the j-coordinate is latitude, and the k-coordinate is radius.

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.

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.


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?

Maybe we could have:
Expand All @@ -69,6 +73,6 @@ Locations:
All locations should be described in the following coordinates:
- i, j, k
- lon, lat, radius (+alt)
- magnetic lon, invariant lat?
- magnetic lon, invariant lat (only the dipole magnetic grid then has magnetic latitude)


Loading
Loading