@@ -408,7 +408,7 @@ void Grid::init_dipole_grid(Quadtree quadtree, Planets planet)
408
408
// - nF=nLats/2 (so nLarts MUST be even)
409
409
// - nZ=nAlts
410
410
// - nZby2 = nZ/2
411
- int64_t nF = nLats / 2 , nZ = nAlts, nZby2 = nAlts / 2 ;
411
+ int64_t nF = nLats / 2 , nZ = nAlts* 2 , nZby2 = nAlts;
412
412
// lShells and baseLats are currently set for southern hemisphere then mirrored
413
413
arma_vec Lshells (nF), baseLats (nF);
414
414
@@ -462,7 +462,7 @@ void Grid::init_dipole_grid(Quadtree quadtree, Planets planet)
462
462
// temp holding of results from q,p -> r,theta conversion:
463
463
std::pair<precision_t , precision_t > r_theta;
464
464
465
- for (int i = 0 ; i < nZ ; i++)
465
+ for (int i = 0 ; i < nAlts ; i++)
466
466
exp_q_dist (i) = Gamma + (1 - Gamma) * exp (-pow (((i - nZby2) / (nZ / 10.0 )), 2.0 ));
467
467
468
468
for (int i_nF = 0 ; i_nF < nF; i_nF++)
@@ -474,7 +474,7 @@ void Grid::init_dipole_grid(Quadtree quadtree, Planets planet)
474
474
// calculate const. stride similar to sami2/3 (huba & joyce 2000)
475
475
// == >> sinh(gamma*qi)/sinh(gamma*q_S) << ==
476
476
// inlo loop thru southern hemisphere, mirror in north.
477
- for (int i_nZ = 0 ; i_nZ < nZ ; i_nZ++)
477
+ for (int i_nZ = 0 ; i_nZ < nAlts ; i_nZ++)
478
478
{
479
479
// Should be using lshell_to_qn_qs, but it wasn't working right.
480
480
// This does the same, but won't work for offset dipoles.
0 commit comments