Skip to content

Commit 07a46bb

Browse files
committed
BUG: have to correct distances before using
1 parent 75eff85 commit 07a46bb

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/init_geo_grid.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -984,6 +984,10 @@ bool Grid::init_geo_grid(Quadtree quadtree,
984984

985985
// Calculate the radius (for spherical or non-spherical)
986986
fill_grid_radius(planet);
987+
// Correct the reference grid with correct length scale:
988+
// (with R = actual radius)
989+
if (input.get_is_cubesphere())
990+
correct_xy_grid(planet);
987991
// Calculate grid spacing
988992
calc_grid_spacing(planet);
989993
//calculate radial unit vector (for spherical or oblate planet)
@@ -994,11 +998,6 @@ bool Grid::init_geo_grid(Quadtree quadtree,
994998
// Calculate magnetic field and magnetic coordinates:
995999
fill_grid_bfield(planet);
9961000

997-
// Correct the reference grid with correct length scale:
998-
// (with R = actual radius)
999-
if (input.get_is_cubesphere())
1000-
correct_xy_grid(planet);
1001-
10021001
// Throw a little message for students:
10031002
report.student_checker_function_name(input.get_is_student(),
10041003
input.get_student_name(),

0 commit comments

Comments
 (0)