diff --git a/src/calc_quantities.f90 b/src/calc_quantities.f90 index 2fb9f14d..aaca9f18 100644 --- a/src/calc_quantities.f90 +++ b/src/calc_quantities.f90 @@ -30,6 +30,7 @@ module calcquantities implicit none public :: calc_quantities,setup_calculated_quantities public :: calc_quantities_use_x0,get_calc_data_dependencies + public :: print_example_quantities integer, parameter, private :: maxcalc = 35 character(len=lenlabel), dimension(maxcalc) :: calcstring = ' ' diff --git a/src/set_options_from_dataread.f90 b/src/set_options_from_dataread.f90 index a696dad8..53ff8c3b 100644 --- a/src/set_options_from_dataread.f90 +++ b/src/set_options_from_dataread.f90 @@ -28,12 +28,15 @@ subroutine set_options_dataread() use exact, only:read_exactparams use settings_part, only:iplotpartoftype,PlotonRenderings use particle_data, only:npartoftype - use settings_data, only:ndim,ncolumns,ntypes,iexact,iverbose,UseTypeInRenderings,idefaults_file_read - use filenames, only:rootname,nsteps,ifileopen,fileprefix + use settings_data, only:ndim,ncolumns,ncalc,ntypes,iexact,iverbose,UseTypeInRenderings,& + idefaults_file_read,iCalcQuantities,DataIsBuffered + use filenames, only:rootname,nsteps,nstepsinfile,ifileopen,fileprefix use labels, only:labeltype,irho,ih,get_sink_type use asciiutils, only:ucase use settings_render, only:icolour_particles use settings_xsecrot, only:xsec_nomulti + use calcquantities, only:print_example_quantities,calc_quantities + use limits, only:set_limits integer :: itype,nplot,ierr,idash logical :: iexist ! @@ -101,7 +104,20 @@ subroutine set_options_dataread() if (iexist) iexact = 2 inquire(file=trim(rootname(ifileopen)(1:idash-1))//'.profile',exist=iexist) - if (iexist) iexact = 2 + if (iexist) then + iexact = 2 + call print_example_quantities(.true.,ncalc) + iCalcQuantities = .true. + if (DataIsBuffered) then + call calc_quantities(1,nsteps) + call set_limits(1,nsteps,ncolumns+1,ncolumns+ncalc) + else + if (ifileopen > 0) then + call calc_quantities(1,nstepsinfile(ifileopen)) + call set_limits(1,nstepsinfile(ifileopen),ncolumns+1,ncolumns+ncalc) + endif + endif + endif inquire(file=trim(rootname(ifileopen))//'.spirals',exist=iexist) if (iexist) iexact = 17