Skip to content

Commit a54494a

Browse files
committed
Add an if-statement to prevent the use of z_domain variables in 2d cases
1 parent 9343be6 commit a54494a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/pre_process/m_initial_condition.fpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,8 +302,10 @@ contains
302302
integer :: i,j,k
303303

304304
Lx = x_domain%end - x_domain%beg
305-
Lz = z_domain%end - z_domain%beg
306-
305+
if (p > 0) then
306+
Lz = z_domain%end - z_domain%beg
307+
end if
308+
307309
wave = 0d0
308310
wave1 = 0d0
309311
wave2 = 0d0

0 commit comments

Comments
 (0)