From 273ca2262cee05c76585b74125c60c03f23c3af9 Mon Sep 17 00:00:00 2001 From: Kyle Mandli Date: Sat, 16 Jun 2018 21:42:10 -0500 Subject: [PATCH] Move num_dim determination futher up" --- src/2d/valout.f90 | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/2d/valout.f90 b/src/2d/valout.f90 index 9769aae5a..be3c0fc62 100644 --- a/src/2d/valout.f90 +++ b/src/2d/valout.f90 @@ -78,6 +78,13 @@ subroutine valout(level_begin, level_end, time, num_eqn, num_aux) ! Output timing call system_clock(clock_start,clock_rate) call cpu_time(cpu_start) + + ! Handle special case of using 2D AMR to do 1D AMR + if (num_cells(2) > 1) then + num_dim = 2 + else + num_dim = 1 + end if ! Count how many aux components requested output_aux_num = 0 @@ -351,13 +358,6 @@ subroutine valout(level_begin, level_end, time, num_eqn, num_aux) ! Write fort.t file open(unit=out_unit, file=file_name(2), status='unknown', form='formatted') - ! Handle special case of using 2D AMR to do 1D AMR - if (num_cells(2) > 1) then - num_dim = 2 - else - num_dim = 1 - end if - ! Note: We need to print out num_ghost too in order to strip ghost cells ! from q array when reading in pyclaw.io.binary write(out_unit, t_file_format) time, num_eqn, num_grids, num_aux, num_dim, &