MONC
Private Member Functions | List of all members
writer_field_manager_mod::provide_field_to_writer_federator Interface Reference

Private Member Functions

subroutine provide_field_to_writer_federator_rvalues_src (io_configuration, field_name, field_namespace, field_values, timestep, time, frequency, source)
 
subroutine provide_field_to_writer_federator_rvalues_nosrc (io_configuration, field_name, field_namespace, field_values, timestep, time, frequency)
 
subroutine provide_field_to_writer_federator_src (io_configuration, field_name, field_namespace, field_values, timestep, time, frequency, source, terminated_case)
 Provides a field to the write federator (a collective diagnostic or prognostic) More...
 
subroutine provide_field_to_writer_federator_nosrc (io_configuration, field_name, field_namespace, field_values, timestep, time, frequency)
 Provides a field to the write federator with no source (a none collective diagnostic) More...
 

Detailed Description

Definition at line 43 of file writer_field_manager.F90.

Member Function/Subroutine Documentation

◆ provide_field_to_writer_federator_nosrc()

subroutine writer_field_manager_mod::provide_field_to_writer_federator::provide_field_to_writer_federator_nosrc ( type(io_configuration_type), intent(inout)  io_configuration,
character(len=*), intent(in)  field_name,
character(len=*), intent(in)  field_namespace,
type(data_values_type), intent(inout)  field_values,
integer, intent(in)  timestep,
real(kind=default_precision), intent(in)  time,
integer, intent(in)  frequency 
)
private

Provides a field to the write federator with no source (a none collective diagnostic)

Parameters
io_configurationThe IO server configuration
field_nameThe field name
field_valuesThe fields values
timestepThe corresponding model timestep
timeCorresponding MONC model time
frequencyConfigured sampling frequency

Definition at line 257 of file writer_field_manager.F90.

259  type(io_configuration_type), intent(inout) :: io_configuration
260  character(len=*), intent(in) :: field_name, field_namespace
261  integer, intent(in) :: timestep, frequency
262  type(data_values_type), intent(inout) :: field_values
263  real(kind=default_precision), intent(in) :: time
264 
265  call provide_field_to_writer_federator_src(io_configuration, field_name, field_namespace, &
266  field_values, timestep, time, frequency, -1)

◆ provide_field_to_writer_federator_rvalues_nosrc()

subroutine writer_field_manager_mod::provide_field_to_writer_federator::provide_field_to_writer_federator_rvalues_nosrc ( type(io_configuration_type), intent(inout)  io_configuration,
character(len=*), intent(in)  field_name,
character(len=*), intent(in)  field_namespace,
real(kind=default_precision), dimension(:), intent(in)  field_values,
integer, intent(in)  timestep,
real(kind=default_precision), intent(in)  time,
integer, intent(in)  frequency 
)
private

Definition at line 238 of file writer_field_manager.F90.

240  type(io_configuration_type), intent(inout) :: io_configuration
241  character(len=*), intent(in) :: field_name, field_namespace
242  integer, intent(in) :: timestep, frequency
243  real(kind=default_precision), dimension(:), intent(in) :: field_values
244  real(kind=default_precision), intent(in) :: time
245 
246  call provide_field_to_writer_federator_rvalues_src(io_configuration, field_name, field_namespace, &
247  field_values, timestep, time, frequency, -1)

◆ provide_field_to_writer_federator_rvalues_src()

subroutine writer_field_manager_mod::provide_field_to_writer_federator::provide_field_to_writer_federator_rvalues_src ( type(io_configuration_type), intent(inout)  io_configuration,
character(len=*), intent(in)  field_name,
character(len=*), intent(in)  field_namespace,
real(kind=default_precision), dimension(:), intent(in)  field_values,
integer, intent(in)  timestep,
real(kind=default_precision), intent(in)  time,
integer, intent(in)  frequency,
integer, intent(in)  source 
)
private

Definition at line 221 of file writer_field_manager.F90.

223  type(io_configuration_type), intent(inout) :: io_configuration
224  character(len=*), intent(in) :: field_name, field_namespace
225  integer, intent(in) :: timestep, frequency, source
226  real(kind=default_precision), dimension(:), intent(in) :: field_values
227  real(kind=default_precision), intent(in) :: time
228 
229  type(data_values_type) :: packaged_data
230 
231  allocate(packaged_data%values(size(field_values)))
232  packaged_data%values=field_values
233  packaged_data%data_type=double_data_type
234  call provide_field_to_writer_federator_src(io_configuration, field_name, field_namespace, packaged_data, &
235  timestep, time, frequency, source)

◆ provide_field_to_writer_federator_src()

subroutine writer_field_manager_mod::provide_field_to_writer_federator::provide_field_to_writer_federator_src ( type(io_configuration_type), intent(inout)  io_configuration,
character(len=*), intent(in)  field_name,
character(len=*), intent(in)  field_namespace,
type(data_values_type), intent(inout)  field_values,
integer, intent(in)  timestep,
real(kind=default_precision), intent(in)  time,
integer, intent(in)  frequency,
integer, intent(in)  source,
logical, intent(in), optional  terminated_case 
)
private

Provides a field to the write federator (a collective diagnostic or prognostic)

Parameters
io_configurationThe IO server configuration
field_nameThe field name
field_valuesThe fields values
timestepThe corresponding model timestep
timeCorresponding MONC model time
frequencyConfigured sampling frequency
sourceThe MONC source ID

Definition at line 277 of file writer_field_manager.F90.

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
283  real(kind=default_precision), intent(in) :: time
284  logical, intent(in), optional :: terminated_case
285 
286  type(field_ordering_type), pointer :: field_ordering
287  class(*), pointer :: generic
288  logical :: this_is_termination
289 
290  if (present(terminated_case)) then
291  this_is_termination=terminated_case
292  else
293  this_is_termination=.false.
294  end if
295 
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)
303  else
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.)
306  end if
307  call process_queued_items(io_configuration, field_ordering)
308  call check_thread_status(forthread_mutex_unlock(field_ordering%access_mutex))

The documentation for this interface was generated from the following file:
datadefn_mod::default_precision
integer, parameter, public default_precision
MPI communication type which we use for the prognostic and calculation data.
Definition: datadefn.F90:17