Go to the documentation of this file.
38 latest_timestep, write_timestep)
39 real,
intent(in) :: latest_time, output_frequency, write_time
40 integer,
intent(in) :: latest_timestep, write_timestep
55 field_name, timestep, time)
57 real,
intent(in) :: output_frequency
59 character(len=*),
intent(in) :: field_name
60 integer,
intent(in) :: timestep
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
114 type(mapentry_type) :: map_entry
115 type(iterator_type) :: iterator
120 do while (c_has_next(iterator))
121 map_entry=c_next_mapentry(iterator)
122 current_data_point=pack_scalar_field(byte_data, current_data_point, string_value=map_entry%key)
123 current_data_point=pack_scalar_field(byte_data, current_data_point, double_real_value=c_get_real(map_entry))
131 character,
dimension(:),
allocatable,
intent(in) :: byte_data
133 integer :: current_data_point, number_entries, i
136 number_entries=unpack_scalar_integer_from_bytedata(byte_data, current_data_point)
137 if (number_entries .gt. 0)
then
138 do i=1, number_entries
140 unpack_scalar_dp_real_from_bytedata(byte_data, current_data_point))
Conversion between common inbuilt FORTRAN data types.
integer function forthread_mutex_lock(mutex_id)
subroutine, public init_instantaneous_manipulation()
Initialises the instantaneous time manipulation.
Contains functionality for managing and extracting data from the raw data dumps that the IO server re...
integer function forthread_mutex_init(mutex_id, attr_id)
Collection data structures.
A hashmap structure, the same as a map but uses hashing for greatly improved performance when storing...
Returns the number of elements in the collection.
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...
type(hashmap_type), volatile existing_instantaneous_writes
integer function forthread_mutex_destroy(mutex_id)
This defines some constants and procedures that are useful to the IO server and clients that call it....
Determines whether or not a map contains a specific key.
This is a thread pool and the single management "main" thread will spawn out free threads in the pool...
subroutine, public check_thread_status(ierr)
Checks the error status of any thread operation and reports an error if it failed.
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...
Gets a specific double precision real element out of the list, stack, queue or map with the correspon...
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...
Puts a double precision real key-value pair into the map.
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.
Contains common definitions for the data and datatypes used by MONC.
integer, parameter, public string_length
Default length of strings.
integer function forthread_mutex_unlock(mutex_id)
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 finalise_instantaneous_manipulation()
Finalises the instantaneous time manipulation.
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...
integer, volatile existing_instantaneous_writes_mutex
Parses the XML configuration file to produce the io configuration description which contains the data...
logical function, public is_instantaneous_time_manipulation_ready_to_write(latest_time, output_frequency, write_time, latest_timestep, write_timestep)
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.
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.
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...