Skip to content

Commit ee0d9c7

Browse files
committed
bugfix in out_movie_file.f90
proper values for n_r_mov_tot
1 parent 7005175 commit ee0d9c7

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

src/movie.f90

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ module movie_data
2727
character(len=80), public :: movie(n_movies_max) ! Only for input
2828
character(len=72), public :: movie_file(n_movies_max)
2929

30-
logical, public :: lGeosField(n_movies_max)
30+
logical, public :: lICField(n_movies_max), lGeosField(n_movies_max)
3131
logical :: lPhaseField(n_movies_max)
3232
integer, public :: n_movies
3333
integer, public :: n_movie_surface(n_movies_max)
@@ -1119,6 +1119,7 @@ subroutine get_movie_type
11191119
!--- Now store the necessary information:
11201120
!------ Increase number of movies:
11211121
n_movies=n_movies+1
1122+
lICField(n_movies)=lIC
11221123
lGeosField(n_movies)=lGeos
11231124
lPhaseField(n_movies)=lPhase
11241125

src/out_movie_file.f90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ module out_movie
1313
use movie_data, only: frames, n_movie_fields, n_movies, n_movie_surface, &
1414
& n_movie_const, n_movie_field_type, lGeosField, &
1515
& n_movie_field_start,n_movie_field_stop, &
16-
& movie_const, movie_file, n_movie_file, &
16+
& movie_const, movie_file, n_movie_file, lICField, &
1717
& n_movie_fields_ic
1818
use radial_data, only: n_r_icb, n_r_cmb
1919
use radial_functions, only: orho1, orho2, or1, or2, or3, or4, beta, &
@@ -214,7 +214,7 @@ subroutine write_movie_frame(n_frame, time)
214214
n_r_mov_tot=n_r_max
215215
r_mov_tot(:n_r_max)=r(:)
216216
if ( n_r_ic_max > 0 ) then
217-
n_r_mov_tot=n_r_mov_tot+n_r_ic_max
217+
if ( lICField(n_movie) ) n_r_mov_tot=n_r_mov_tot+n_r_ic_max
218218
r_mov_tot(n_r_max+1:)=r_ic(:)
219219
end if
220220

0 commit comments

Comments
 (0)