This subroutine determines which ascii output files are enabled (i.e., opened, flushed at each write, and then closed). If an ascii file is not enabled here, writing to it will cause some indeterminate unpleasant behaviour
Note that the .out file is always enabled
subroutine set_ascii_file_switches
implicit none
gnostics%ascii_files%write_to_out = gnostics%write_ascii
!gnostics%ascii_files%write_to_fields = gnostics%write_fields .and. gnostics%write_ascii
gnostics%ascii_files%write_to_heat = gnostics%write_heating .and. gnostics%write_ascii
gnostics%ascii_files%write_to_heat2 = gnostics%write_heating .and. gnostics%write_ascii
gnostics%ascii_files%write_to_lpc = gnostics%write_verr .and. gnostics%write_ascii
gnostics%ascii_files%write_to_vres = gnostics%write_verr .and. gnostics%write_ascii
gnostics%ascii_files%write_to_vres2 = gnostics%write_verr .and. gnostics%write_ascii
gnostics%ascii_files%write_to_cres = gnostics%write_cerr .and. gnostics%write_ascii
gnostics%ascii_files%write_to_dist = gnostics%write_g .and. gnostics%write_ascii
gnostics%ascii_files%write_to_yxdist = gnostics%write_gyx .and. gnostics%write_ascii
gnostics%ascii_files%write_to_phase = gnostics%write_cross_phase .and. gnostics%write_ascii
gnostics%ascii_files%write_to_jext = gnostics%write_jext .and. gnostics%write_ascii
gnostics%ascii_files%write_to_parity = gnostics%write_parity .and. gnostics%write_ascii
gnostics%ascii_files%write_to_eigenfunc = gnostics%write_eigenfunc .and. gnostics%write_ascii
end subroutine set_ascii_file_switches