Skip to content
Snippets Groups Projects
Commit f9164351 authored by Lionel GUEZ's avatar Lionel GUEZ
Browse files

Bug fix: read `dist_lim` before using it

The bug existed since commit 627df958.
parent ec0fdc1d
No related branches found
No related tags found
No related merge requests found
......@@ -62,14 +62,6 @@ program test_read_snapshot
read(unit, nml = grid_nml)
close(unit)
! As we are requiring the grid spacing to be uniform, the value of
! "periodic" may be deduced from the values of step_deg(1) and nlon:
periodic = nint(360. / step_deg(1)) == nlon
print *, "periodic = ", periodic
if (periodic) call assert(2 * dist_lim * step_deg(1) < 180., &
"test_read_snapshot dist_lim")
copy = merge(dist_lim, 0, periodic)
! main_nml:
k = ssm(1)%d0
write(unit = error_unit, nml = main_nml)
......@@ -77,6 +69,14 @@ program test_read_snapshot
read(unit = *, nml = main_nml)
write(unit = *, nml = main_nml)
! As we are requiring the grid spacing to be uniform, the value of
! "periodic" may be deduced from the values of step_deg(1) and nlon:
periodic = nint(360. / step_deg(1)) == nlon
print *, "test_read_snapshot: periodic = ", periodic
if (periodic) call assert(2 * dist_lim * step_deg(1) < 180., &
"test_read_snapshot dist_lim")
copy = merge(dist_lim, 0, periodic)
call read_snapshot(s, hshp, ssm, nlon, nlat, k, &
corner = corner_deg * deg_to_rad, step = step_deg * deg_to_rad, &
copy = copy)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment