38 latest_timestep, write_timestep)
39 real,
intent(in) :: latest_time, output_frequency, write_time
40 integer,
intent(in) :: latest_timestep, write_timestep
54 type(
data_values_type) function perform_instantaneous_time_manipulation(instant_values, output_frequency, &
55 field_name, timestep, time)
56 real(kind=DEFAULT_PRECISION),
dimension(:),
intent(in) :: instant_values
57 real,
intent(in) :: output_frequency
58 real(kind=DEFAULT_PRECISION),
intent(in) :: time
59 character(len=*),
intent(in) :: field_name
60 integer,
intent(in) :: timestep
63 allocate(perform_instantaneous_time_manipulation%values(
size(instant_values)))
64 perform_instantaneous_time_manipulation%values=instant_values
74 character(len=*),
intent(in) :: field_name
75 real,
intent(in) :: output_frequency
76 real(kind=DEFAULT_PRECISION),
intent(in) :: time
78 real(kind=DEFAULT_PRECISION) :: previous_time_write, time_difference
83 time_difference=(aint(time*10000000.0)-aint(previous_time_write*10000000.0))/10000000.0
88 if (time_difference .ge. output_frequency)
then 100 real(kind=DEFAULT_PRECISION) :: a
111 character,
dimension(:),
allocatable,
intent(inout) :: byte_data
113 integer :: current_data_point
122 current_data_point=
pack_scalar_field(byte_data, current_data_point, string_value=map_entry%key)
131 character,
dimension(:),
allocatable,
intent(in) :: byte_data
133 integer :: current_data_point, number_entries, i
137 if (number_entries .gt. 0)
then 138 do i=1, number_entries
subroutine, public finalise_instantaneous_manipulation()
Finalises the instantaneous time manipulation.
integer function forthread_mutex_unlock(mutex_id)
type(data_values_type) function, public perform_instantaneous_time_manipulation(instant_values, output_frequency, field_name, timestep, time)
Performs the instantaneous time manipulation and returns data only if this is to be written to the st...
logical function deduce_whether_to_issue_values(field_name, output_frequency, time)
Determines whether to issue values for write or not. This depends on the time and output frequency...
subroutine, public unserialise_instantaneous_state(byte_data)
Unpacks some serialised byte data to initialise this manipulator to some previous state...
integer function forthread_mutex_destroy(mutex_id)
Contains functionality for managing and extracting data from the raw data dumps that the IO server re...
Performs instantaneous time manipulation and only returns a value if the output frequency determines ...
integer, parameter, public default_precision
MPI communication type which we use for the prognostic and calculation data.
Contains common definitions for the data and datatypes used by MONC.
A hashmap structure, the same as a map but uses hashing for greatly improved performance when storing...
integer function forthread_mutex_init(mutex_id, attr_id)
Conversion between common inbuilt FORTRAN data types.
This defines some constants and procedures that are useful to the IO server and clients that call it...
type(hashmap_type), volatile existing_instantaneous_writes
This is a thread pool and the single management "main" thread will spawn out free threads in the pool...
integer(kind=8) function, public prepare_to_serialise_instantaneous_state()
Prepares to serialise the instantaneous state, both determines the byte storage size and issues any l...
Returns the number of elements in the collection.
real(kind=double_precision) function, public unpack_scalar_dp_real_from_bytedata(data, start_point)
Unpacks a double precision scalar real from some byte data, this is a very simple unpack routine wrap...
subroutine, public check_thread_status(ierr)
Checks the error status of any thread operation and reports an error if it failed.
subroutine, public init_instantaneous_manipulation()
Initialises the instantaneous time manipulation.
integer function forthread_mutex_lock(mutex_id)
Collection data structures.
character(len=string_length) function, public unpack_scalar_string_from_bytedata(data, start_point)
Unpacks a string from some byte data with default length, this is a very simple unpack routine wrappi...
integer, parameter, public string_length
Default length of strings.
subroutine, public serialise_instantaneous_state(byte_data)
Will serialise the state of this manipulator so that it can be later restarted. Any locks issued duri...
integer function, public unpack_scalar_integer_from_bytedata(data, start_point)
Unpacks a scalar integer from some byte data, this is a very simple unpack routine wrapping the trans...
logical function, public is_instantaneous_time_manipulation_ready_to_write(latest_time, output_frequency, write_time, latest_timestep, write_timestep)
integer, volatile existing_instantaneous_writes_mutex
Determines whether or not a map contains a specific key.
Gets a specific double precision real element out of the list, stack, queue or map with the correspon...
Parses the XML configuration file to produce the io configuration description which contains the data...
real(kind=double_precision) function, public conv_single_real_to_double(input_real)
Converts from a single to double precision real. This applies some rounding to a certain number of de...
Puts a double precision real key-value pair into the map.
integer function, public pack_scalar_field(buffer, start_offset, int_value, real_value, single_real_value, double_real_value, string_value, logical_value)
Packs the data of a scalar field into a buffer.