279 type(io_configuration_type),
intent(inout) :: io_configuration
280 character(len=*),
intent(in) :: field_name, field_namespace
281 integer,
intent(in) :: timestep, frequency, source
282 type(data_values_type),
intent(inout) :: field_values
284 logical,
intent(in),
optional :: terminated_case
286 type(field_ordering_type),
pointer :: field_ordering
287 class(*),
pointer :: generic
288 logical :: this_is_termination
290 if (
present(terminated_case))
then
291 this_is_termination=terminated_case
293 this_is_termination=.false.
296 field_ordering=>get_or_add_field_ordering(field_name, field_namespace, frequency, source)
297 call check_thread_status(forthread_mutex_lock(field_ordering%access_mutex))
298 if (timestep == field_ordering%last_timestep_access + frequency .or. this_is_termination)
then
299 if (.not. this_is_termination) field_ordering%last_timestep_access=timestep
300 call provide_ordered_field_to_writer_federator(io_configuration, field_name, field_namespace, &
301 field_values, timestep, time, source)
302 if (
allocated(field_values%values))
deallocate(field_values%values)
304 generic=>generate_value_container(field_name, field_namespace, field_values, timestep, time, frequency, source)
305 call c_put_generic(field_ordering%timestep_to_value, conv_to_string(timestep), generic, .false.)
307 call process_queued_items(io_configuration, field_ordering)
308 call check_thread_status(forthread_mutex_unlock(field_ordering%access_mutex))