Repository navigation
Bugs/electrodynamics and logfiles - #100
Merged
Merged
Conversation
Horizontal Momentum Components: Allocated 4D arrays (HorizAdvection, HorizPressureGrad, HorizCoriolis, Centrifugal) to store the East and North acceleration terms.
Vertical Momentum Components: Allocated 3D and 4D arrays (VertAdvection, VertCoriolis, VertCentrifugal, EffectiveGravity) to store per-species advection and bulk vertical acceleration terms.
advance_horizontal.f90
Horizontal Momentum Components: Initialized and assigned the East and North advection and pressure gradient terms by splitting the existing velocity update calculation into separate components without changing the physics.
Vertical Momentum Components: Initialized and assigned the species vertical advection.
advance_vertical.f90
Vertical Momentum Components: Assigned the vertical Coriolis, centrifugal, and effective gravity terms by splitting the existing terms into separate arrays.
output_common.f90
Output Configuration: Increased nValidTypes to 27, added 3DMOH and 3DMOV in the valid types array, and added their respective case statements to define the number of variables to write (nvars_to_write).
Horizontal Momentum Output (3DMOH): Added explicit header definitions for the East and North momentum variables and implemented the output_3dmoh subroutine to write the horizontal data.
Vertical Momentum Output (3DMOV): Added explicit header definitions for the per-species vertical momentum variables and bulk upward components, and implemented the output_3dmov subroutine to write the vertical data.
- some +/- & */(divide) flips - One index swap - one (potentially) out-of-bounds error - Missing **2's
- "chamical" -> "chemical" - Don't convert MLT to radians in 2dmel outputs
Replaces DipAngle approximation in SigmaR with the complete richmond tensor, correctly handling magnetic declination. The old version was only valid for bE=0
If anyone reading this, JFC. This was a tough one! basically: 1. GITM was only putting MLT on the mag grid with APEX=T 2. if apex=F, mlt was nonsense 3. easy fix. Just have it calculate MLT whenever we're on earth, right? wrong! 4. SWMF sets #MAGNETICFIELD, gitm sets #DIPOLE. ok fine whatever. we just have to read it from the swmf or UAM, right? WRONG! 4.5. GITM's default dipole was set in modInputs & not able to be parsed / manipulated by the swmf. need to move to modPlanet 5. thought that was it? think again. To calculate MLT with the apex routine we need the subsolar pt abd the pole's Lon & CoLat, not tilt/offset. 6. Calculate magnetic pole Lon & coLat in init_b0 when apex=F :-) ---- what changed: - Default dipole is now **actually** tilted. Not offset. - All planets set their own dipole (earth =/= other-planets == 0) - We calculate things the same with & without apex - gitm interfaces better with the swmf All this to change one stupid fucking line in calc_electrodynamics.f90
it's field-line-integrated, not altitude integrated!
and uh update solutions therein or whatever
- does not change outputs when not included - Will be documented more soon, but: - allow lat boundary to move - Toggle mirroring (after solve) - Toggle BC's - Toggle eq-avg subtacting
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[BUG/FEAT] A lot of changes to Electrodynamics...