Skip to content

Conversation

abukowski21
Copy link
Collaborator

Description

Addresses #152 , #153 , and some other things.

Couple changes here. Putting this all into one PR for ease of merging, but a lot of changes were made:

  • Dipole grid
  • 1D neutral grid implementation
  • Documentation updates
  • And tests for the above!

NOTE: Do we want to implement a test to run with the new dipole grid before merging this? Creating the PR now & can add that if necessary…

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality
    to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

A lot.

  • Tested dipole grid with various input params, couldn’t break it using sensible inputs:

    • nLats needs to be even
    • LatMax needs to be < 90 deg.
    • AltMin needs to be < minApex. this is checked by the code.
  • Aaron R tested the 1D runs with neutrals.

Test configuration

  • g++ on WSL/Ubuntu and
  • on MacOS (aaron R).
  • Tested multiple versions so it shoudn’t break with any…

Checklist:

  • Make sure you are merging into the develop (not master) branch
  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • [N/A] Add a note to CHANGELOG.md, summarizing the changes

abukowski21 and others added 28 commits July 24, 2024 10:31
Moving the files grid.md, ensembles.md, indices.md to new folder `docs/internal`.

Should organize things a little better, but the folder name might need to be changed.

ALSO:
- Update the README's with the updated TOC's.
- Consistent Markdown syntax:
  - consistent use of dashes/equals & hashtags for header level
  - no double empty lines
  - headings in descending-by-one order
  - denote links with <>'s
  - Add a language to each fenced (three backticks) code blocks
This commit adds ionGrid to the default aether.json file (in share/run/aether.json).

The ionGrid specs set here hold no importance, but these three values need to be set to enable the tests to pass. Ideally, this is moved from the settings file to a function which reads the inputs (and either sets the default values or catches the error), but for now this works.
Drafted first in python. This code makes plots & is adjustable.

I commented everything so it's hopefully understandable... Reach out with questions.

Similar to SAMI2/3 grid. It's B_par & B_perp aligned, made in dipole (p,q) coords, and specified w/ (nf, nz). Code hands back (r,lat) though, not (q,p) or anything like that...

Code needs to be able to be modified for tilted, offset dipole so I left all the for-loops and didn't spend any time optimizing.
Working. Need to port to init_mag_grid.cpp
Couple issues remain:
- Longitudes are sometimes nan in output files?
- nLats needs to be even. And it's not checked.
- Ghost cells probably not implemented correctly.
Netcdf files can't be ready by xarray (python) when a dimension has the same name as a variable. This is a problem for "z".

Renames all `(x,y,z,time)` -> `(n_x, n_y, n_z, n_time)`

> there are two output_netcdf files. I dont think the other is used?
clean out old comments, improve comments that are gonna be left, refactor a bit.

- Some nan's in lon are removed by changing the transform.cpp. It's not a bug so I included it in this commit.

- Style in transform.coo too.
- not all ionGrid options are used for sphere/dipole grid. I'll add a doc page on this in the next commit...
! I removed the section about passing btwn N/S hemispheres, since that's undecided.
> Probably won't work. But a decent starting point, I hope.

Feel free to revert this commit if it's broken.
Though I could do something clever. It's wasn't. Glad I caught this, geez
## Documentation changes:

- Update description of geographic & dipole grids
- Rearrange `.md` files, complete docs might be easier to generate with this

## test passing

- I found an issue that caused tests to fail. this was a quick fix to the input files. 

## DIPOLE GRID

> big one here

- I rewrote the magnetic grid to be in dipole coordinates. *should* be field-aligned.
- Very similar to SAMI2/3 grid
- Changed inputs, docs, etc. to support this.
@abukowski21 abukowski21 merged commit ba8e858 into develop Sep 27, 2024
6 checks passed
@abukowski21 abukowski21 deleted the dipole_again branch September 27, 2024 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants