anchor.diff:      allocate(this% internal_energy(n_buffer))
       allocate(this% center_of_mass_velocity(3,n_buffer))
   
  -    call e%create_time(datafile%observables, 'temperature', dummy, mode, step, time)
  -    call e%close()
  -    call e%create_time(datafile%observables, 'potential_energy', dummy, mode, step, time)
  -    call e%close()
  -    call e%create_time(datafile%observables, 'kinetic_energy', dummy, mode, step, time)
  -    call e%close()
  -    call e%create_time(datafile%observables, 'internal_energy', dummy, mode, step, time)
  -    call e%close()
  -    call e%create_time(datafile%observables, 'center_of_mass_velocity', dummy_vec, mode, step, time)
  -    call e%close()
  +    if (present(step_offset) .and. present(time_offset)) then
  +       call e%create_time(datafile%observables, 'temperature', dummy, mode, step, time, &
  +            step_offset=step_offset, time_offset=time_offset)
  +       call e%close()
  +       call e%create_time(datafile%observables, 'potential_energy', dummy, mode, step, time, &
  +            step_offset=step_offset, time_offset=time_offset)
  +       call e%close()
  +       call e%create_time(datafile%observables, 'kinetic_energy', dummy, mode, step, time, &
  +            step_offset=step_offset, time_offset=time_offset)
  +       call e%close()
  +       call e%create_time(datafile%observables, 'internal_energy', dummy, mode, step, time, &
  +            step_offset=step_offset, time_offset=time_offset)
  +       call e%close()
  +       call e%create_time(datafile%observables, 'center_of_mass_velocity', dummy_vec, mode, step, time, &
  +            step_offset=step_offset, time_offset=time_offset)
  +       call e%close()
  +    else
  +       call e%create_time(datafile%observables, 'temperature', dummy, mode, step, time)
  +       call e%close()
  +       call e%create_time(datafile%observables, 'potential_energy', dummy, mode, step, time)
  +       call e%close()
  +       call e%create_time(datafile%observables, 'kinetic_energy', dummy, mode, step, time)
  +       call e%close()
  +       call e%create_time(datafile%observables, 'internal_energy', dummy, mode, step, time)
  +       call e%close()
  +       call e%create_time(datafile%observables, 'center_of_mass_velocity', dummy_vec, mode, step, time)
  +       call e%close()
  +    end if
   
     end subroutine thermo_init
   
  
positive.code: 
      if (this%species_info%store) then
         info = this%species_info
         if (iand(info%mode, H5MD_TIME) == H5MD_TIME) then
            call this%species%create_time(this% group, 'species', ps% species, info%mode)
         else if (iand(info%mode, H5MD_LINEAR) == H5MD_LINEAR) then
            call this%species%create_time(this% group, 'species', ps% species, info%mode, info%step, info%time)
         else if (iand(info%mode, H5MD_FIXED) == H5MD_FIXED) then
            call this%species%create_fixed(this% group, 'species', ps% species)
         else
  
negative.code: 
      if (this%image_info%store) then
         info = this%image_info
         if ( (info%step_offset < 0) .and. (info%time_offset > 0) .or. &
              (info%step_offset > 0) .and. (info%time_offset < 0) ) then
            stop 'use both or neither of step_offset and time_offset in ps_init image'
         end if
  
         if (iand(info%mode, H5MD_TIME) == H5MD_TIME) then
            call this%image%create_time(this% group, 'image', ps% image, info%mode)
         else if (iand(info%mode, H5MD_LINEAR) == H5MD_LINEAR) then
            if (info%step_offset > 0) then
               call this%image%create_time(this% group, 'image', ps% image, info%mode, info%step, &
                    info%time, step_offset=info%step_offset, time_offset=info%time_offset)
            else
               call this%image%create_time(this% group, 'image', ps% image, info%mode, info%step, &
                    info%time)
            end if
         else if (iand(info%mode, H5MD_FIXED) == H5MD_FIXED) then
            call this%image%create_fixed(this% group, 'image', ps% image)
         else
  