aggregator_mod Module

This module defines the aggregator_t type and its extensions, which are used to perform various types of time aggregations (e.g., mean, sum, min, max) on source data arrays.

Aggregators are utilised by first initialising an aggregator via new_aggregator which accepts as its argument a source data array to be sampled. The source data array argument is then associated with a pointer which is used to sample the source data array to compute the time aggregated value. The source data array argument must be an allocated pointer or allocatable array. The source data array argument is typically a CABLE working variable whos memory remains allocated throughout the duration of the simulation. Aggregator instances can be represented using a polymorphic aggregator_t type or a concrete type corresponding to the data type and rank of the source data array (e.g., aggregator_real32_2d_t for a 2D 32-bit real source data array). For example:

real(kind=real32), dimension(:,:), allocatable :: source_data_array
class(aggregator_t), allocatable :: aggregator_polymorphic
type(aggregator_real32_2d_t) :: aggregator_concrete

allocate(source_data_array(42, 42))

aggregator_polymorphic = new_aggregator(source_data_array)
aggregator_concrete = new_aggregator(source_data_array)

Aggregator instances must then be initialised by calling their init method, which will allocate the necessary memory for the aggregated data and set the accumulation and reset methods according to the specified aggregation method (e.g., mean, sum, min, max). For example:

call aggregator_polymorphic%init('mean')
call aggregator_concrete%init('sum')

Once initialised, the aggregator can be accumulated any number of times throughout a simulation by calling its accumulate method, which will update the aggregated data from the source data using the appropriate aggregation method. Once the aggregator has accumulated enough values over the time interval of interest, the aggregated data can then be accessed via the aggregated_data component of the specific aggregator type (e.g., aggregator_real32_2d_t%aggregated_data). To reset the aggregator back to its initial state for the next time interval, the reset method can be called, which will reset the aggregator according to the specified aggregation method.

Resources allocated by the aggregator on initialisation will automatically be deallocated when the aggregator instance goes out of scope.


Uses

  • module~~aggregator_mod~~UsesGraph module~aggregator_mod aggregator_mod iso_fortran_env iso_fortran_env module~aggregator_mod->iso_fortran_env module~cable_error_handler_mod cable_error_handler_mod module~aggregator_mod->module~cable_error_handler_mod module~cable_error_handler_base_mod cable_error_handler_base_mod module~cable_error_handler_mod->module~cable_error_handler_base_mod module~cable_error_handler_base_mod->iso_fortran_env

Used by

  • module~~aggregator_mod~~UsedByGraph module~aggregator_mod aggregator_mod module~cable_def_types_mod cable_def_types_mod module~cable_def_types_mod->module~aggregator_mod module~cable_diagnostics_casa_mod cable_diagnostics_casa_mod module~cable_diagnostics_casa_mod->module~aggregator_mod module~cable_output_mod cable_output_mod module~cable_diagnostics_casa_mod->module~cable_output_mod module~cable_checks_module cable_checks_module module~cable_diagnostics_casa_mod->module~cable_checks_module module~cable_io_vars_module cable_IO_vars_module module~cable_diagnostics_casa_mod->module~cable_io_vars_module module~cable_timing_mod cable_timing_mod module~cable_diagnostics_casa_mod->module~cable_timing_mod module~casaparm casaparm module~cable_diagnostics_casa_mod->module~casaparm module~casavariable casavariable module~cable_diagnostics_casa_mod->module~casavariable module~cable_diagnostics_mod cable_diagnostics_mod module~cable_diagnostics_mod->module~aggregator_mod module~cable_diagnostics_mod->module~cable_def_types_mod module~cable_diagnostics_mod->module~cable_output_mod module~cable_diagnostics_mod->module~cable_checks_module module~cable_diagnostics_mod->module~cable_io_vars_module module~cable_output_common_smod cable_output_common_smod module~cable_output_common_smod->module~aggregator_mod module~cable_output_common_smod->module~cable_output_mod module~cable_output_common_smod->module~cable_checks_module module~cable_output_common_smod->module~cable_io_vars_module module~cable_output_mod->module~aggregator_mod module~cable_output_mod->module~cable_def_types_mod module~cable_output_mod->module~cable_io_vars_module module~cable_output_write_smod cable_output_write_smod module~cable_output_write_smod->module~aggregator_mod module~cable_output_write_smod->module~cable_output_common_smod module~cable_grid_reductions_mod cable_grid_reductions_mod module~cable_output_write_smod->module~cable_grid_reductions_mod module~cable_checks_module->module~cable_def_types_mod module~cable_checks_module->module~cable_io_vars_module module~cable_abort_module cable_abort_module module~cable_checks_module->module~cable_abort_module module~cable_climate_mod cable_climate_mod module~cable_climate_mod->module~cable_def_types_mod module~cable_climate_mod->module~cable_io_vars_module module~cable_init_module cable_init_module module~cable_init_module->module~cable_def_types_mod module~cable_init_module->module~cable_io_vars_module module~cable_read_module cable_read_module module~cable_init_module->module~cable_read_module module~cable_init_module->module~cable_abort_module module~cable_input_module cable_input_module module~cable_input_module->module~cable_def_types_mod module~cable_input_module->module~cable_checks_module module~cable_input_module->module~cable_init_module module~cable_input_module->module~cable_io_vars_module module~cable_param_module cable_param_module module~cable_input_module->module~cable_param_module module~cable_input_module->module~cable_read_module module~casadimension casadimension module~cable_input_module->module~casadimension module~cable_input_module->module~cable_abort_module module~cable_input_module->module~casaparm module~cable_input_module->module~casavariable module~phenvariable phenvariable module~cable_input_module->module~phenvariable module~casa_inout_module casa_inout_module module~cable_input_module->module~casa_inout_module module~cable_io_vars_module->module~cable_def_types_mod module~cable_luc_expt CABLE_LUC_EXPT module~cable_luc_expt->module~cable_def_types_mod module~cable_luc_expt->module~cable_io_vars_module module~cable_mpicommon cable_mpicommon module~cable_mpicommon->module~cable_def_types_mod module~cable_mpimaster~2 cable_mpimaster module~cable_mpimaster~2->module~cable_diagnostics_casa_mod module~cable_mpimaster~2->module~cable_diagnostics_mod module~cable_mpimaster~2->module~cable_output_mod module~cable_mpimaster~2->module~cable_checks_module module~cable_mpimaster~2->module~cable_io_vars_module module~cable_mpimaster~2->module~cable_mpicommon module~cable_driver_common_mod cable_driver_common_mod module~cable_mpimaster~2->module~cable_driver_common_mod module~cable_mpimaster~2->module~cable_timing_mod module~cable_mpimaster~2->module~casa_inout_module module~cable_output_decomp_smod cable_output_decomp_smod module~cable_output_decomp_smod->module~cable_def_types_mod module~cable_output_decomp_smod->module~cable_output_common_smod module~cable_output_decomp_smod->module~cable_io_vars_module module~cable_output_define_smod cable_output_define_smod module~cable_output_define_smod->module~cable_def_types_mod module~cable_output_define_smod->module~cable_output_common_smod module~cable_output_define_smod->module~cable_io_vars_module module~cable_output_impl_smod cable_output_impl_smod module~cable_output_impl_smod->module~cable_output_common_smod module~cable_output_impl_smod->module~cable_io_vars_module module~cable_output_impl_smod->module~cable_timing_mod module~cable_output_reduction_buffers_smod cable_output_reduction_buffers_smod module~cable_output_reduction_buffers_smod->module~cable_def_types_mod module~cable_output_reduction_buffers_smod->module~cable_output_common_smod module~cable_param_module->module~cable_def_types_mod module~cable_param_module->module~cable_io_vars_module module~cable_param_module->module~cable_luc_expt module~cable_param_module->module~casadimension module~cable_param_module->module~cable_abort_module module~cable_param_module->module~casavariable module~cable_param_module->module~phenvariable module~cable_phenology_module cable_phenology_module module~cable_phenology_module->module~cable_def_types_mod module~cable_phenology_module->module~cable_io_vars_module module~cable_psm cable_psm module~cable_psm->module~cable_def_types_mod module~cable_read_module->module~cable_def_types_mod module~cable_read_module->module~cable_io_vars_module module~cable_read_module->module~cable_abort_module module~cable_serial cable_serial module~cable_serial->module~cable_def_types_mod module~cable_serial->module~cable_diagnostics_casa_mod module~cable_serial->module~cable_diagnostics_mod module~cable_serial->module~cable_output_mod module~cable_serial->module~cable_checks_module module~cable_serial->module~cable_climate_mod module~cable_serial->module~cable_input_module module~cable_serial->module~cable_io_vars_module module~cable_serial->module~cable_luc_expt module~cable_serial->module~casadimension module~landuse_constant landuse_constant module~cable_serial->module~landuse_constant module~cable_cru CABLE_CRU module~cable_serial->module~cable_cru module~cable_serial->module~cable_driver_common_mod module~cable_plume_mip CABLE_PLUME_MIP module~cable_serial->module~cable_plume_mip module~cable_site CABLE_site module~cable_serial->module~cable_site module~cable_serial->module~cable_timing_mod module~cable_serial->module~casavariable module~cbl_soil_snow_init_special_module cbl_soil_snow_init_special_module module~cable_serial->module~cbl_soil_snow_init_special_module module~landuse_variable landuse_variable module~cable_serial->module~landuse_variable module~cable_serial->module~phenvariable module~popluc_module POPLUC_Module module~cable_serial->module~popluc_module module~cable_serial->module~casa_inout_module module~casa_offline_inout_module casa_offline_inout_module module~cable_serial->module~casa_offline_inout_module module~casa_cnp_module casa_cnp_module module~casa_cnp_module->module~cable_def_types_mod module~casa_cnp_module->module~casadimension module~casa_cnp_module->module~landuse_constant module~casa_cnp_module->module~casaparm module~casa_cnp_module->module~casavariable module~casa_cnp_module->module~phenvariable module~casa_rplant_module casa_rplant_module module~casa_rplant_module->module~cable_def_types_mod module~casa_rplant_module->module~casadimension module~casa_rplant_module->module~landuse_constant module~casa_rplant_module->module~casaparm module~casa_rplant_module->module~casavariable module~casa_rplant_module->module~phenvariable module~casadimension->module~cable_def_types_mod module~cbl_ssnow_data_mod cbl_ssnow_data_mod module~cbl_ssnow_data_mod->module~cable_def_types_mod module~landuse_constant->module~cable_def_types_mod module~landuse_constant->module~casadimension module~sli_numbers sli_numbers module~sli_numbers->module~cable_def_types_mod module~sli_roots sli_roots module~sli_roots->module~cable_def_types_mod module~sli_roots->module~sli_numbers module~sli_solve sli_solve module~sli_solve->module~cable_def_types_mod module~sli_solve->module~cable_io_vars_module module~sli_solve->module~sli_numbers module~sli_utils sli_utils module~sli_solve->module~sli_utils module~sli_utils->module~cable_def_types_mod module~sli_utils->module~sli_numbers proc~analyticpool analyticpool proc~analyticpool->module~cable_def_types_mod proc~analyticpool->module~casadimension proc~analyticpool->module~casaparm proc~analyticpool->module~casavariable proc~analyticpool->module~phenvariable proc~bgcdriver bgcdriver proc~bgcdriver->module~cable_def_types_mod proc~bgcdriver->module~cable_phenology_module proc~bgcdriver->module~casadimension proc~bgcdriver->module~casaparm proc~bgcdriver->module~casavariable proc~bgcdriver->module~phenvariable proc~biogeochem biogeochem proc~biogeochem->module~cable_def_types_mod proc~biogeochem->module~casa_cnp_module proc~biogeochem->module~casa_rplant_module proc~biogeochem->module~casadimension proc~biogeochem->module~casa_inout_module proc~cable_pft_params cable_pft_params proc~cable_pft_params->module~cable_def_types_mod proc~cable_soil_params cable_soil_params proc~cable_soil_params->module~cable_def_types_mod proc~carbon_pl carbon_pl proc~carbon_pl->module~cable_def_types_mod proc~casa_cnpflux casa_cnpflux proc~casa_cnpflux->module~cable_def_types_mod proc~casa_cnpflux->module~casadimension proc~casa_cnpflux->module~casaparm proc~casa_cnpflux->module~casavariable proc~casa_feedback casa_feedback proc~casa_feedback->module~cable_def_types_mod proc~casa_feedback->module~casa_cnp_module proc~casa_feedback->module~casadimension proc~casa_feedback->module~casaparm proc~casa_feedback->module~casavariable proc~casa_feedback~2 casa_feedback proc~casa_feedback~2->module~cable_def_types_mod proc~casa_feedback~2->module~casa_cnp_module proc~casa_feedback~2->module~casadimension proc~casa_feedback~2->module~casaparm proc~casa_feedback~2->module~casavariable proc~casa_fluxout casa_fluxout proc~casa_fluxout->module~cable_def_types_mod proc~casa_fluxout->module~casadimension proc~casa_fluxout->module~casaparm proc~casa_fluxout->module~casavariable proc~casa_fluxout->module~phenvariable proc~casa_init casa_init proc~casa_init->module~cable_def_types_mod proc~casa_init->module~cable_io_vars_module proc~casa_init->module~casadimension proc~casa_init->module~casaparm proc~casa_init->module~casavariable proc~casa_init->module~phenvariable proc~casa_init->module~casa_offline_inout_module proc~casa_poolout casa_poolout proc~casa_poolout->module~cable_def_types_mod proc~casa_poolout->module~casadimension proc~casa_poolout->module~casaparm proc~casa_poolout->module~casavariable proc~casa_poolout->module~phenvariable proc~casa_readbiome casa_readbiome proc~casa_readbiome->module~cable_def_types_mod proc~casa_readbiome->module~casadimension proc~casa_readbiome->module~casaparm proc~casa_readbiome->module~casavariable proc~casa_readbiome->module~phenvariable proc~casa_readphen casa_readphen proc~casa_readphen->module~cable_def_types_mod proc~casa_readphen->module~casadimension proc~casa_readphen->module~casaparm proc~casa_readphen->module~casavariable proc~casa_readphen->module~phenvariable proc~casaonly_luc CASAONLY_LUC proc~casaonly_luc->module~cable_def_types_mod proc~casaonly_luc->module~cable_io_vars_module proc~casaonly_luc->module~cable_luc_expt proc~casaonly_luc->module~casadimension proc~casaonly_luc->module~casaparm proc~casaonly_luc->module~casavariable proc~casaonly_luc->module~phenvariable proc~casaonly_luc->module~popluc_module proc~casaonly_luc->module~casa_inout_module proc~casaonly_luc->module~casa_offline_inout_module proc~cbm cbm proc~cbm->module~cable_def_types_mod proc~cbm->module~casadimension proc~create_landuse_cable_restart create_landuse_cable_restart proc~create_landuse_cable_restart->module~cable_def_types_mod proc~create_landuse_cable_restart->module~cable_checks_module proc~create_landuse_cable_restart->module~cable_io_vars_module proc~create_landuse_cable_restart->module~cable_abort_module proc~create_landuse_cable_restart->module~landuse_variable proc~create_new_gridinfo create_new_gridinfo proc~create_new_gridinfo->module~cable_def_types_mod proc~create_new_gridinfo->module~cable_io_vars_module proc~create_new_gridinfo->module~landuse_constant proc~create_new_gridinfo->module~cable_abort_module proc~cru_get_subdiurnal_met CRU_GET_SUBDIURNAL_MET proc~cru_get_subdiurnal_met->module~cable_def_types_mod proc~cru_get_subdiurnal_met->module~cable_checks_module proc~cru_get_subdiurnal_met->module~cable_io_vars_module proc~cru_init CRU_INIT proc~cru_init->module~cable_def_types_mod proc~cru_init->module~cable_io_vars_module proc~define_air define_air proc~define_air->module~cable_def_types_mod proc~define_canopy define_canopy proc~define_canopy->module~cable_def_types_mod proc~dryleaf dryLeaf proc~dryleaf->module~cable_def_types_mod module~remove_trans_mod remove_trans_mod proc~dryleaf->module~remove_trans_mod proc~find_extents find_extents proc~find_extents->module~cable_def_types_mod proc~fwsoil_calc_lai_ktaul fwsoil_calc_Lai_Ktaul proc~fwsoil_calc_lai_ktaul->module~cable_def_types_mod proc~fwsoil_calc_non_linear fwsoil_calc_non_linear proc~fwsoil_calc_non_linear->module~cable_def_types_mod proc~fwsoil_calc_sli fwsoil_calc_sli proc~fwsoil_calc_sli->module~cable_def_types_mod proc~fwsoil_calc_std fwsoil_calc_std proc~fwsoil_calc_std->module~cable_def_types_mod proc~get_gw_2d_var get_gw_2d_var proc~get_gw_2d_var->module~cable_def_types_mod proc~get_gw_2d_var_constdef get_gw_2d_var_constdef proc~get_gw_2d_var_constdef->module~cable_def_types_mod proc~get_gw_3d_var get_gw_3d_var proc~get_gw_3d_var->module~cable_def_types_mod proc~get_gw_3d_var_constdef get_gw_3d_var_constdef proc~get_gw_3d_var_constdef->module~cable_def_types_mod proc~get_gw_4d_var get_gw_4d_var proc~get_gw_4d_var->module~cable_def_types_mod proc~get_gw_4d_var_constdef get_gw_4d_var_constdef proc~get_gw_4d_var_constdef->module~cable_def_types_mod proc~get_var_ncr2 get_var_ncr2 proc~get_var_ncr2->module~cable_def_types_mod proc~get_var_ncr3 get_var_ncr3 proc~get_var_ncr3->module~cable_def_types_mod proc~getrex_1d~2 getrex_1d proc~getrex_1d~2->module~cable_def_types_mod proc~igamma igamma proc~igamma->module~cable_def_types_mod proc~init_veg_from_vegin init_veg_from_vegin proc~init_veg_from_vegin->module~cable_def_types_mod proc~initialize_wetfac initialize_wetfac proc~initialize_wetfac->module~cable_def_types_mod proc~landuse_checks landuse_checks proc~landuse_checks->module~cable_def_types_mod proc~landuse_checks->module~landuse_constant proc~landuse_checks->module~landuse_variable proc~landuse_data landuse_data proc~landuse_data->module~cable_def_types_mod proc~landuse_data->module~landuse_constant proc~landuse_data->module~cable_abort_module proc~landuse_driver landuse_driver proc~landuse_driver->module~cable_def_types_mod proc~landuse_driver->module~cable_io_vars_module proc~landuse_driver->module~casadimension proc~landuse_driver->module~casavariable proc~landuse_driver->module~landuse_variable proc~landuse_driver->module~phenvariable proc~landuse_getdata landuse_getdata proc~landuse_getdata->module~cable_def_types_mod proc~landuse_getdata->module~landuse_constant proc~landuse_getxluh2 landuse_getxluh2 proc~landuse_getxluh2->module~cable_def_types_mod proc~landuse_getxluh2->module~landuse_constant proc~landuse_land2mpx landuse_land2mpx proc~landuse_land2mpx->module~cable_def_types_mod proc~landuse_land2mpx->module~landuse_constant proc~landuse_land2mpx->module~landuse_variable proc~landuse_redistribution landuse_redistribution proc~landuse_redistribution->module~cable_def_types_mod proc~landuse_transitx landuse_transitx proc~landuse_transitx->module~cable_def_types_mod proc~landuse_transitx->module~casadimension proc~landuse_transitx->module~landuse_constant proc~landuse_transitx->module~casaparm proc~landuse_transitx->module~casavariable proc~landuse_transitx->module~landuse_variable proc~latent_heat_flux Latent_heat_flux proc~latent_heat_flux->module~cable_def_types_mod proc~lucdriver LUCdriver proc~lucdriver->module~cable_def_types_mod proc~lucdriver->module~cable_io_vars_module proc~lucdriver->module~cable_luc_expt proc~lucdriver->module~casadimension proc~lucdriver->module~casaparm proc~lucdriver->module~casavariable proc~lucdriver->module~popluc_module proc~massman_sparse_1d massman_sparse_1d proc~massman_sparse_1d->module~cable_def_types_mod proc~massman_sparse_1d->module~sli_numbers proc~massman_sparse_2d massman_sparse_2d proc~massman_sparse_2d->module~cable_def_types_mod proc~massman_sparse_2d->module~sli_numbers proc~master_cable_params master_cable_params proc~master_cable_params->module~cable_def_types_mod proc~master_cable_params->module~cable_io_vars_module proc~master_casa_dump_types master_casa_dump_types proc~master_casa_dump_types->module~cable_def_types_mod proc~master_casa_dump_types->module~casavariable proc~master_casa_dump_types->module~phenvariable proc~master_casa_params master_casa_params proc~master_casa_params->module~cable_def_types_mod proc~master_casa_params->module~casavariable proc~master_casa_params->module~phenvariable proc~master_casa_types master_casa_types proc~master_casa_types->module~cable_def_types_mod proc~master_casa_types->module~casadimension proc~master_casa_types->module~casavariable proc~master_casa_types->module~phenvariable proc~master_casaonly_luc master_CASAONLY_LUC proc~master_casaonly_luc->module~cable_def_types_mod proc~master_casaonly_luc->module~cable_io_vars_module proc~master_casaonly_luc->module~cable_luc_expt proc~master_casaonly_luc->module~casadimension proc~master_casaonly_luc->module~casaparm proc~master_casaonly_luc->module~casavariable proc~master_casaonly_luc->module~phenvariable proc~master_casaonly_luc->module~popluc_module proc~master_casaonly_luc->module~casa_offline_inout_module proc~master_climate_types master_climate_types proc~master_climate_types->module~cable_def_types_mod proc~master_climate_types->module~cable_climate_mod proc~master_intypes master_intypes proc~master_intypes->module~cable_def_types_mod proc~master_outtypes master_outtypes proc~master_outtypes->module~cable_def_types_mod proc~master_restart_types master_restart_types proc~master_restart_types->module~cable_def_types_mod proc~master_restart_types->module~casadimension proc~master_restart_types->module~casavariable proc~master_spincasacnp master_spincasacnp proc~master_spincasacnp->module~cable_def_types_mod proc~master_spincasacnp->module~casadimension proc~master_spincasacnp->module~casaparm proc~master_spincasacnp->module~casavariable proc~master_spincasacnp->module~phenvariable proc~master_spincasacnp->module~casa_offline_inout_module proc~mpidrv_master~2 mpidrv_master proc~mpidrv_master~2->module~cable_def_types_mod proc~mpidrv_master~2->module~cable_climate_mod proc~mpidrv_master~2->module~cable_input_module proc~mpidrv_master~2->module~cable_io_vars_module proc~mpidrv_master~2->module~cable_luc_expt proc~mpidrv_master~2->module~casadimension proc~mpidrv_master~2->module~landuse_constant proc~mpidrv_master~2->module~cable_cru proc~mpidrv_master~2->module~cable_plume_mip proc~mpidrv_master~2->module~casavariable proc~mpidrv_master~2->module~landuse_variable proc~mpidrv_master~2->module~phenvariable proc~mpidrv_master~2->module~popluc_module proc~mpidrv_master~2->module~casa_inout_module proc~mpidrv_master~2->module~casa_offline_inout_module proc~mpidrv_worker mpidrv_worker proc~mpidrv_worker->module~cable_def_types_mod proc~mpidrv_worker->module~cable_checks_module proc~mpidrv_worker->module~cable_climate_mod proc~mpidrv_worker->module~cable_input_module proc~mpidrv_worker->module~cable_io_vars_module proc~mpidrv_worker->module~casadimension proc~mpidrv_worker->module~casavariable proc~mpidrv_worker->module~cbl_soil_snow_init_special_module proc~mpidrv_worker->module~phenvariable proc~photosynthesis photosynthesis proc~photosynthesis->module~cable_def_types_mod proc~plantcarb plantcarb proc~plantcarb->module~cable_def_types_mod proc~plume_mip_get_met PLUME_MIP_GET_MET proc~plume_mip_get_met->module~cable_def_types_mod proc~plume_mip_get_met->module~cable_checks_module proc~plume_mip_get_met->module~cable_io_vars_module proc~plume_mip_init PLUME_MIP_INIT proc~plume_mip_init->module~cable_def_types_mod proc~plume_mip_init->module~cable_io_vars_module proc~popdriver POPdriver proc~popdriver->module~cable_def_types_mod proc~popdriver->module~casadimension proc~popdriver->module~casaparm proc~popdriver->module~casavariable proc~popdriver->module~phenvariable proc~popluc_init POPLUC_Init proc~popluc_init->module~cable_def_types_mod proc~popluc_init->module~casaparm proc~put_var_ncr1 put_var_ncr1 proc~put_var_ncr1->module~cable_def_types_mod proc~put_var_ncr2 put_var_ncr2 proc~put_var_ncr2->module~cable_def_types_mod proc~put_var_ncr3 put_var_ncr3 proc~put_var_ncr3->module~cable_def_types_mod proc~radiation radiation proc~radiation->module~cable_def_types_mod proc~range_abort range_abort proc~range_abort->module~cable_def_types_mod proc~range_abort->module~cable_io_vars_module proc~rangechk2 rangechk2 proc~rangechk2->module~cable_def_types_mod proc~rangechk3 rangechk3 proc~rangechk3->module~cable_def_types_mod proc~read_casa_dump read_casa_dump proc~read_casa_dump->module~cable_def_types_mod proc~read_casa_dump->module~casadimension proc~read_casa_dump->module~casavariable proc~read_casa_dump->module~phenvariable proc~read_casa_restart_nc READ_CASA_RESTART_NC proc~read_casa_restart_nc->module~cable_def_types_mod proc~read_casa_restart_nc->module~casavariable proc~read_casa_restart_nc->module~phenvariable proc~ruff_resist ruff_resist proc~ruff_resist->module~cable_def_types_mod proc~sli_main sli_main proc~sli_main->module~cable_def_types_mod proc~sli_main->module~cable_io_vars_module proc~sli_main->module~sli_numbers proc~sli_main->module~sli_roots proc~sli_main->module~sli_solve proc~sli_main->module~sli_utils proc~soilcarb soilcarb proc~soilcarb->module~cable_def_types_mod proc~soilcol_albedo soilcol_albedo proc~soilcol_albedo->module~cable_def_types_mod proc~sort sort proc~sort->module~cable_def_types_mod proc~spincasacnp spincasacnp proc~spincasacnp->module~cable_def_types_mod proc~spincasacnp->module~casadimension proc~spincasacnp->module~casaparm proc~spincasacnp->module~casavariable proc~spincasacnp->module~phenvariable proc~spincasacnp->module~casa_inout_module proc~sumcflux sumcflux proc~sumcflux->module~cable_def_types_mod proc~sumcflux->module~casadimension proc~sumcflux->module~casaparm proc~sumcflux->module~casavariable proc~sumcflux~2 sumcflux proc~sumcflux~2->module~cable_def_types_mod proc~sumcflux~2->module~casadimension proc~sumcflux~2->module~casaparm proc~sumcflux~2->module~casavariable proc~surf_wetness_fact Surf_wetness_fact proc~surf_wetness_fact->module~cable_def_types_mod proc~totcnppools totcnppools proc~totcnppools->module~cable_def_types_mod proc~totcnppools->module~casadimension proc~totcnppools->module~casaparm proc~totcnppools->module~casavariable proc~wetleaf wetLeaf proc~wetleaf->module~cable_def_types_mod proc~within_canopy within_canopy proc~within_canopy->module~cable_def_types_mod proc~worker_cable_params worker_cable_params proc~worker_cable_params->module~cable_def_types_mod proc~worker_cable_params->module~cable_input_module proc~worker_cable_params->module~cable_io_vars_module proc~worker_casa_dump_types worker_casa_dump_types proc~worker_casa_dump_types->module~cable_def_types_mod proc~worker_casa_dump_types->module~casavariable proc~worker_casa_dump_types->module~phenvariable proc~worker_casa_params worker_casa_params proc~worker_casa_params->module~cable_def_types_mod proc~worker_casa_params->module~casavariable proc~worker_casa_params->module~phenvariable proc~worker_casa_type worker_casa_type proc~worker_casa_type->module~cable_def_types_mod proc~worker_casa_type->module~casadimension proc~worker_casa_type->module~casavariable proc~worker_casa_type->module~phenvariable proc~worker_casaonly_luc worker_CASAONLY_LUC proc~worker_casaonly_luc->module~cable_def_types_mod proc~worker_casaonly_luc->module~cable_io_vars_module proc~worker_casaonly_luc->module~casadimension proc~worker_casaonly_luc->module~casaparm proc~worker_casaonly_luc->module~casavariable proc~worker_casaonly_luc->module~phenvariable proc~worker_climate_types worker_climate_types proc~worker_climate_types->module~cable_def_types_mod proc~worker_climate_types->module~cable_climate_mod proc~worker_decomp worker_decomp proc~worker_decomp->module~cable_def_types_mod proc~worker_intype worker_intype proc~worker_intype->module~cable_def_types_mod proc~worker_outtype worker_outtype proc~worker_outtype->module~cable_def_types_mod proc~worker_pop_types worker_pop_types proc~worker_pop_types->module~cable_def_types_mod proc~worker_pop_types->module~casavariable proc~worker_restart_type worker_restart_type proc~worker_restart_type->module~cable_def_types_mod proc~worker_spincasacnp worker_spincasacnp proc~worker_spincasacnp->module~cable_def_types_mod proc~worker_spincasacnp->module~cable_io_vars_module proc~worker_spincasacnp->module~casadimension proc~worker_spincasacnp->module~casaparm proc~worker_spincasacnp->module~casavariable proc~worker_spincasacnp->module~phenvariable proc~write_casa_dump write_casa_dump proc~write_casa_dump->module~cable_def_types_mod proc~write_casa_dump->module~casadimension proc~write_casa_dump->module~casavariable proc~write_casa_dump->module~phenvariable proc~write_casa_output_nc WRITE_CASA_OUTPUT_NC proc~write_casa_output_nc->module~cable_def_types_mod proc~write_casa_output_nc->module~casavariable proc~write_casa_restart_nc WRITE_CASA_RESTART_NC proc~write_casa_restart_nc->module~cable_def_types_mod proc~write_casa_restart_nc->module~casavariable proc~write_casa_restart_nc->module~phenvariable module~cable_abort_module->module~cable_io_vars_module module~cable_cru->module~cable_io_vars_module module~cable_driver_common_mod->module~cable_input_module module~cable_driver_common_mod->module~cable_io_vars_module module~cable_driver_common_mod->module~casadimension module~cable_driver_common_mod->module~cable_cru module~cable_driver_common_mod->module~cable_plume_mip module~cable_driver_common_mod->module~cable_site module~cable_driver_common_mod->module~casavariable module~cable_grid_reductions_mod->module~cable_io_vars_module module~cable_mpiworker~2 cable_mpiworker module~cable_mpiworker~2->module~cable_mpicommon module~cable_mpiworker~2->module~cable_driver_common_mod module~cable_mpiworker~2->module~casa_inout_module module~cable_plume_mip->module~cable_io_vars_module module~cable_site->module~cable_io_vars_module module~cable_timing_mod->module~cable_io_vars_module module~casaparm->module~casadimension module~casavariable->module~casadimension module~cbl_soil_snow_init_special_module->module~cbl_ssnow_data_mod module~gwstempv_mod GWstempv_mod module~gwstempv_mod->module~cbl_ssnow_data_mod module~hydraulic_redistribution_mod hydraulic_redistribution_mod module~hydraulic_redistribution_mod->module~cbl_ssnow_data_mod module~landuse_variable->module~landuse_constant module~old_soil_conductivity_mod old_soil_conductivity_mod module~old_soil_conductivity_mod->module~cbl_ssnow_data_mod module~phenvariable->module~casadimension module~popluc_module->module~cable_io_vars_module module~popluc_module->module~cable_luc_expt module~popluc_module->module~casavariable module~remove_trans_mod->module~cbl_ssnow_data_mod module~smoisturev_mod smoisturev_mod module~smoisturev_mod->module~cbl_ssnow_data_mod module~snow_accum_mod snow_accum_mod module~snow_accum_mod->module~cbl_ssnow_data_mod module~snow_melting_mod snow_melting_mod module~snow_melting_mod->module~cbl_ssnow_data_mod module~snow_processes_soil_thermal_mod snow_processes_soil_thermal_mod module~snow_processes_soil_thermal_mod->module~cbl_ssnow_data_mod module~snowcheck_mod snowcheck_mod module~snowcheck_mod->module~cbl_ssnow_data_mod module~snowdensity_mod snowdensity_mod module~snowdensity_mod->module~cbl_ssnow_data_mod module~snowl_adjust_mod snowl_adjust_mod module~snowl_adjust_mod->module~cbl_ssnow_data_mod module~soilfreeze_mod soilfreeze_mod module~soilfreeze_mod->module~cbl_ssnow_data_mod module~stempv_mod stempv_mod module~stempv_mod->module~cbl_ssnow_data_mod module~surfbv_mod surfbv_mod module~surfbv_mod->module~cbl_ssnow_data_mod module~total_soil_conductivity_mod total_soil_conductivity_mod module~total_soil_conductivity_mod->module~cbl_ssnow_data_mod module~trimb_mod trimb_mod module~trimb_mod->module~cbl_ssnow_data_mod proc~bcast_start_time bcast_start_time proc~bcast_start_time->module~cable_io_vars_module proc~cable_driver_init_default cable_driver_init_default proc~cable_driver_init_default->module~cable_io_vars_module proc~cable_phenology_clim cable_phenology_clim proc~cable_phenology_clim->module~casadimension proc~cable_phenology_clim->module~casaparm proc~cable_phenology_clim->module~casavariable proc~cable_phenology_clim->module~phenvariable proc~casa_rplant casa_rplant proc~casa_rplant->module~casa_cnp_module proc~csat csat proc~csat->module~sli_numbers proc~csoil csoil proc~csoil->module~sli_numbers proc~decomp_types decomp_types proc~decomp_types->module~cable_io_vars_module proc~dthetalmaxdt dthetalmaxdT proc~dthetalmaxdt->module~sli_numbers proc~dthetalmaxdth dthetalmaxdTh proc~dthetalmaxdth->module~sli_numbers proc~esat esat proc~esat->module~sli_numbers proc~esat_ice esat_ice proc~esat_ice->module~sli_numbers proc~generic_thomas_1d generic_thomas_1d proc~generic_thomas_1d->module~sli_numbers proc~generic_thomas_2d generic_thomas_2d proc~generic_thomas_2d->module~sli_numbers proc~gtfrozen GTfrozen proc~gtfrozen->module~sli_numbers proc~is_casa_time IS_CASA_TIME proc~is_casa_time->module~cable_io_vars_module proc~jsoillayer JSoilLayer proc~jsoillayer->module~sli_numbers proc~landuse_allocate_mland landuse_allocate_mland proc~landuse_allocate_mland->module~landuse_constant proc~load_parameters load_parameters proc~load_parameters->module~cable_luc_expt proc~load_parameters->module~popluc_module proc~master_decomp master_decomp proc~master_decomp->module~cable_io_vars_module proc~open_cru_met OPEN_CRU_MET proc~open_cru_met->module~cable_io_vars_module proc~open_plume_met OPEN_PLUME_MET proc~open_plume_met->module~cable_io_vars_module proc~phi phi proc~phi->module~sli_numbers proc~slope_csat slope_csat proc~slope_csat->module~sli_numbers proc~slope_esat slope_esat proc~slope_esat->module~sli_numbers proc~slope_esat_ice slope_esat_ice proc~slope_esat_ice->module~sli_numbers proc~soil_snow soil_snow proc~soil_snow->module~cbl_ssnow_data_mod proc~soil_snow->module~hydraulic_redistribution_mod proc~soil_snow->module~remove_trans_mod proc~soil_snow->module~snow_accum_mod proc~soil_snow->module~snow_melting_mod proc~soil_snow->module~snowcheck_mod proc~soil_snow->module~snowdensity_mod proc~soil_snow->module~snowl_adjust_mod proc~soil_snow->module~soilfreeze_mod proc~soil_snow->module~stempv_mod proc~soil_snow->module~surfbv_mod proc~tfrozen Tfrozen proc~tfrozen->module~sli_numbers proc~tfrz Tfrz proc~tfrz->module~sli_numbers proc~thetalmax thetalmax proc~thetalmax->module~sli_numbers proc~tthetalmax Tthetalmax proc~tthetalmax->module~sli_numbers proc~write_landuse_casa_restart_nc WRITE_LANDUSE_CASA_RESTART_NC proc~write_landuse_casa_restart_nc->module~cable_io_vars_module proc~write_landuse_casa_restart_nc->module~casavariable proc~write_landuse_casa_restart_nc->module~landuse_variable proc~write_luc_output_grid_nc WRITE_LUC_OUTPUT_GRID_NC proc~write_luc_output_grid_nc->module~cable_io_vars_module program~cable_offline_driver cable_offline_driver program~cable_offline_driver->module~cable_serial program~cable_offline_driver->module~cable_cru program~cable_offline_driver->module~cable_driver_common_mod program~cable_offline_driver->module~cable_mpiworker~2 program~cable_offline_driver->module~cable_plume_mip program~cable_offline_driver->module~cable_site module~cable_mpimaster cable_mpimaster program~cable_offline_driver->module~cable_mpimaster module~cable_mpimaster->module~cable_cru module~cable_mpimaster->module~cable_plume_mip module~casa_inout_module->module~casavariable module~casa_offline_inout_module->module~casavariable proc~alloc_casavariable alloc_casavariable proc~alloc_casavariable->module~casaparm proc~alloc_sum_casavariable alloc_sum_casavariable proc~alloc_sum_casavariable->module~casaparm proc~gwstempv GWstempv proc~gwstempv->module~old_soil_conductivity_mod proc~gwstempv->module~total_soil_conductivity_mod proc~gwstempv->module~trimb_mod proc~landuse_mp2land landuse_mp2land proc~landuse_mp2land->module~landuse_variable proc~landuse_update_mland landuse_update_mland proc~landuse_update_mland->module~landuse_variable proc~master_casa_luc_types master_casa_LUC_types proc~master_casa_luc_types->module~casavariable proc~pop_io POP_IO proc~pop_io->module~casavariable proc~smoisturev smoisturev proc~smoisturev->module~trimb_mod proc~snow_processes_soil_thermal snow_processes_soil_thermal proc~snow_processes_soil_thermal->module~gwstempv_mod proc~snow_processes_soil_thermal->module~snow_accum_mod proc~snow_processes_soil_thermal->module~snow_melting_mod proc~snow_processes_soil_thermal->module~snowcheck_mod proc~snow_processes_soil_thermal->module~snowdensity_mod proc~snow_processes_soil_thermal->module~snowl_adjust_mod proc~stempv stempv proc~stempv->module~old_soil_conductivity_mod proc~stempv->module~total_soil_conductivity_mod proc~stempv->module~trimb_mod proc~surfbv surfbv proc~surfbv->module~smoisturev_mod proc~worker_casa_luc_types worker_casa_LUC_types proc~worker_casa_luc_types->module~casavariable proc~write_cnp_params write_cnp_params proc~write_cnp_params->module~casaparm

Interfaces

public interface new_aggregator

Factory interface for creating new aggregator instances. The specific type of aggregator created is determined by the type of the source data array provided.

  • private function new_aggregator_int32_0d_t(source_data) result(agg)

    Create a new 0D integer aggregator.

    Arguments

    Type IntentOptional Attributes Name
    integer(kind=int32), intent(inout), target :: source_data

    The source data array to be sampled by the aggregator.

    Return Value type(aggregator_int32_0d_t)

  • private function new_aggregator_int32_1d_t(source_data) result(agg)

    Create a new 1D integer aggregator.

    Arguments

    Type IntentOptional Attributes Name
    integer(kind=int32), intent(inout), dimension(:), target :: source_data

    The source data array to be sampled by the aggregator.

    Return Value type(aggregator_int32_1d_t)

  • private function new_aggregator_int32_2d_t(source_data) result(agg)

    Create a new 2D integer aggregator.

    Arguments

    Type IntentOptional Attributes Name
    integer(kind=int32), intent(inout), dimension(:,:), target :: source_data

    The source data array to be sampled by the aggregator.

    Return Value type(aggregator_int32_2d_t)

  • private function new_aggregator_int32_3d_t(source_data) result(agg)

    Create a new 3D integer aggregator.

    Arguments

    Type IntentOptional Attributes Name
    integer(kind=int32), intent(inout), dimension(:,:,:), target :: source_data

    The source data array to be sampled by the aggregator.

    Return Value type(aggregator_int32_3d_t)

  • private function new_aggregator_real32_0d(source_data) result(agg)

    Create a new 0D 32-bit real aggregator.

    Arguments

    Type IntentOptional Attributes Name
    real(kind=real32), intent(inout), target :: source_data

    The source data array to be sampled by the aggregator.

    Return Value type(aggregator_real32_0d_t)

  • private function new_aggregator_real32_1d(source_data) result(agg)

    Create a new 1D 32-bit real aggregator.

    Arguments

    Type IntentOptional Attributes Name
    real(kind=real32), intent(inout), dimension(:), target :: source_data

    The source data array to be sampled by the aggregator.

    Return Value type(aggregator_real32_1d_t)

  • private function new_aggregator_real32_2d(source_data) result(agg)

    Create a new 2D 32-bit real aggregator.

    Arguments

    Type IntentOptional Attributes Name
    real(kind=real32), intent(inout), dimension(:,:), target :: source_data

    The source data array to be sampled by the aggregator.

    Return Value type(aggregator_real32_2d_t)

  • private function new_aggregator_real32_3d(source_data) result(agg)

    Create a new 3D 32-bit real aggregator.

    Arguments

    Type IntentOptional Attributes Name
    real(kind=real32), intent(inout), dimension(:,:,:), target :: source_data

    The source data array to be sampled by the aggregator.

    Return Value type(aggregator_real32_3d_t)

  • private function new_aggregator_real64_0d(source_data) result(agg)

    Create a new 0D 64-bit real aggregator.

    Arguments

    Type IntentOptional Attributes Name
    real(kind=real64), intent(inout), target :: source_data

    The source data array to be sampled by the aggregator.

    Return Value type(aggregator_real64_0d_t)

  • private function new_aggregator_real64_1d(source_data) result(agg)

    Create a new 1D 64-bit real aggregator.

    Arguments

    Type IntentOptional Attributes Name
    real(kind=real64), intent(inout), dimension(:), target :: source_data

    The source data array to be sampled by the aggregator.

    Return Value type(aggregator_real64_1d_t)

  • private function new_aggregator_real64_2d(source_data) result(agg)

    Create a new 2D 64-bit real aggregator.

    Arguments

    Type IntentOptional Attributes Name
    real(kind=real64), intent(inout), dimension(:,:), target :: source_data

    The source data array to be sampled by the aggregator.

    Return Value type(aggregator_real64_2d_t)

  • private function new_aggregator_real64_3d(source_data) result(agg)

    Create a new 3D 64-bit real aggregator.

    Arguments

    Type IntentOptional Attributes Name
    real(kind=real64), intent(inout), dimension(:,:,:), target :: source_data

    The source data array to be sampled by the aggregator.

    Return Value type(aggregator_real64_3d_t)


Abstract Interfaces

abstract interface

Interfaces for the procedure pointers in the aggregator_t type to be implemented by the specific aggregation methods (e.g., mean, sum, min, max).

  • private subroutine accumulate_data(this, scale, div, offset)

    Accumulate the aggregated data from the source data.

    Arguments

    Type IntentOptional Attributes Name
    class(aggregator_t), intent(inout) :: this
    real, intent(in), optional :: scale

    An optional scaling factor to apply to the source data before accumulation. Defaults to 1.0 if not provided.

    real, intent(in), optional :: div

    An optional division factor to apply to the source data before accumulation. Defaults to 1.0 if not provided.

    real, intent(in), optional :: offset

    An optional offset to add to the source data before accumulation. Defaults to 0.0 if not provided.

abstract interface

Interfaces for the procedure pointers in the aggregator_t type to be implemented by the specific aggregation methods (e.g., mean, sum, min, max).

  • private subroutine reset_data(this)

    Reset the aggregated data to its initial state.

    Arguments

    Type IntentOptional Attributes Name
    class(aggregator_t), intent(inout) :: this

Derived Types

type, public, abstract ::  aggregator_t

The aggregator_t type is an abstract base type for performing time aggregations on source data arrays. Support for different data types and array ranks is provided through extensions of this type.

Components

Type Visibility Attributes Name Initial
integer, public :: counter = 0

The number of times the source data has been accumulated.

procedure(accumulate_data), public, pointer :: accumulate

A procedure pointer to the accumulation method used to compute the time aggregated quantity. The specific method (e.g., mean, sum, min, max) is set by the set_method procedure.

procedure(reset_data), public, pointer :: reset

A procedure pointer to the reset method used to reset the aggregated data. The specific method (e.g., mean, sum, min, max) is set by the set_method procedure.

Type-Bound Procedures

procedure, public :: init => aggregator_init

Initialise the aggregator.

procedure, public :: type => aggregator_type

Return a string identifier of the aggregator type.

procedure, public :: rank => aggregator_rank

Return the rank of the aggregator.

procedure, public :: shape => aggregator_shape

Return the shape of the aggregator.

procedure, public :: scale => aggregator_scale

Scale the aggregated data by a specified factor.

procedure, public :: div => aggregator_div

Divide the aggregated data by a specified factor.

procedure, public :: offset => aggregator_offset

Add a specified offset to the aggregated data.

procedure, private :: set_method => aggregator_set_method

Set the aggregation method.

type, public, extends(aggregator_t) ::  aggregator_int32_0d_t

An aggregator for 0-dimensional (scalar) 32-bit integer data.

Components

Type Visibility Attributes Name Initial
integer, public :: counter = 0

The number of times the source data has been accumulated.

procedure(accumulate_data), public, pointer :: accumulate

A procedure pointer to the accumulation method used to compute the time aggregated quantity. The specific method (e.g., mean, sum, min, max) is set by the set_method procedure.

procedure(reset_data), public, pointer :: reset

A procedure pointer to the reset method used to reset the aggregated data. The specific method (e.g., mean, sum, min, max) is set by the set_method procedure.

integer(kind=int32), public, allocatable :: aggregated_data
integer(kind=int32), public, pointer :: source_data => null()

Type-Bound Procedures

procedure, public :: init => aggregator_init

Initialise the aggregator.

procedure, public :: type => aggregator_type

Return a string identifier of the aggregator type.

procedure, public :: rank => aggregator_rank

Return the rank of the aggregator.

procedure, public :: shape => aggregator_shape

Return the shape of the aggregator.

procedure, public :: scale => aggregator_scale

Scale the aggregated data by a specified factor.

procedure, public :: div => aggregator_div

Divide the aggregated data by a specified factor.

procedure, public :: offset => aggregator_offset

Add a specified offset to the aggregated data.

type, public, extends(aggregator_t) ::  aggregator_int32_1d_t

An aggregator for 1-dimensional 32-bit integer data.

Components

Type Visibility Attributes Name Initial
integer, public :: counter = 0

The number of times the source data has been accumulated.

procedure(accumulate_data), public, pointer :: accumulate

A procedure pointer to the accumulation method used to compute the time aggregated quantity. The specific method (e.g., mean, sum, min, max) is set by the set_method procedure.

procedure(reset_data), public, pointer :: reset

A procedure pointer to the reset method used to reset the aggregated data. The specific method (e.g., mean, sum, min, max) is set by the set_method procedure.

integer(kind=int32), public, dimension(:), allocatable :: aggregated_data
integer(kind=int32), public, dimension(:), pointer :: source_data => null()

Type-Bound Procedures

procedure, public :: init => aggregator_init

Initialise the aggregator.

procedure, public :: type => aggregator_type

Return a string identifier of the aggregator type.

procedure, public :: rank => aggregator_rank

Return the rank of the aggregator.

procedure, public :: shape => aggregator_shape

Return the shape of the aggregator.

procedure, public :: scale => aggregator_scale

Scale the aggregated data by a specified factor.

procedure, public :: div => aggregator_div

Divide the aggregated data by a specified factor.

procedure, public :: offset => aggregator_offset

Add a specified offset to the aggregated data.

type, public, extends(aggregator_t) ::  aggregator_int32_2d_t

An aggregator for 2-dimensional 32-bit integer data.

Components

Type Visibility Attributes Name Initial
integer, public :: counter = 0

The number of times the source data has been accumulated.

procedure(accumulate_data), public, pointer :: accumulate

A procedure pointer to the accumulation method used to compute the time aggregated quantity. The specific method (e.g., mean, sum, min, max) is set by the set_method procedure.

procedure(reset_data), public, pointer :: reset

A procedure pointer to the reset method used to reset the aggregated data. The specific method (e.g., mean, sum, min, max) is set by the set_method procedure.

integer(kind=int32), public, dimension(:,:), allocatable :: aggregated_data
integer(kind=int32), public, dimension(:,:), pointer :: source_data => null()

Type-Bound Procedures

procedure, public :: init => aggregator_init

Initialise the aggregator.

procedure, public :: type => aggregator_type

Return a string identifier of the aggregator type.

procedure, public :: rank => aggregator_rank

Return the rank of the aggregator.

procedure, public :: shape => aggregator_shape

Return the shape of the aggregator.

procedure, public :: scale => aggregator_scale

Scale the aggregated data by a specified factor.

procedure, public :: div => aggregator_div

Divide the aggregated data by a specified factor.

procedure, public :: offset => aggregator_offset

Add a specified offset to the aggregated data.

type, public, extends(aggregator_t) ::  aggregator_int32_3d_t

An aggregator for 3-dimensional 32-bit integer data.

Components

Type Visibility Attributes Name Initial
integer, public :: counter = 0

The number of times the source data has been accumulated.

procedure(accumulate_data), public, pointer :: accumulate

A procedure pointer to the accumulation method used to compute the time aggregated quantity. The specific method (e.g., mean, sum, min, max) is set by the set_method procedure.

procedure(reset_data), public, pointer :: reset

A procedure pointer to the reset method used to reset the aggregated data. The specific method (e.g., mean, sum, min, max) is set by the set_method procedure.

integer(kind=int32), public, dimension(:,:,:), allocatable :: aggregated_data
integer(kind=int32), public, dimension(:,:,:), pointer :: source_data => null()

Type-Bound Procedures

procedure, public :: init => aggregator_init

Initialise the aggregator.

procedure, public :: type => aggregator_type

Return a string identifier of the aggregator type.

procedure, public :: rank => aggregator_rank

Return the rank of the aggregator.

procedure, public :: shape => aggregator_shape

Return the shape of the aggregator.

procedure, public :: scale => aggregator_scale

Scale the aggregated data by a specified factor.

procedure, public :: div => aggregator_div

Divide the aggregated data by a specified factor.

procedure, public :: offset => aggregator_offset

Add a specified offset to the aggregated data.

type, public, extends(aggregator_t) ::  aggregator_real32_0d_t

An aggregator for 0-dimensional (scalar) 32-bit real data.

Components

Type Visibility Attributes Name Initial
integer, public :: counter = 0

The number of times the source data has been accumulated.

procedure(accumulate_data), public, pointer :: accumulate

A procedure pointer to the accumulation method used to compute the time aggregated quantity. The specific method (e.g., mean, sum, min, max) is set by the set_method procedure.

procedure(reset_data), public, pointer :: reset

A procedure pointer to the reset method used to reset the aggregated data. The specific method (e.g., mean, sum, min, max) is set by the set_method procedure.

real(kind=real32), public, allocatable :: aggregated_data
real(kind=real32), public, pointer :: source_data => null()

Type-Bound Procedures

procedure, public :: init => aggregator_init

Initialise the aggregator.

procedure, public :: type => aggregator_type

Return a string identifier of the aggregator type.

procedure, public :: rank => aggregator_rank

Return the rank of the aggregator.

procedure, public :: shape => aggregator_shape

Return the shape of the aggregator.

procedure, public :: scale => aggregator_scale

Scale the aggregated data by a specified factor.

procedure, public :: div => aggregator_div

Divide the aggregated data by a specified factor.

procedure, public :: offset => aggregator_offset

Add a specified offset to the aggregated data.

type, public, extends(aggregator_t) ::  aggregator_real32_1d_t

An aggregator for 1-dimensional 32-bit real data.

Components

Type Visibility Attributes Name Initial
integer, public :: counter = 0

The number of times the source data has been accumulated.

procedure(accumulate_data), public, pointer :: accumulate

A procedure pointer to the accumulation method used to compute the time aggregated quantity. The specific method (e.g., mean, sum, min, max) is set by the set_method procedure.

procedure(reset_data), public, pointer :: reset

A procedure pointer to the reset method used to reset the aggregated data. The specific method (e.g., mean, sum, min, max) is set by the set_method procedure.

real(kind=real32), public, dimension(:), allocatable :: aggregated_data
real(kind=real32), public, dimension(:), pointer :: source_data => null()

Type-Bound Procedures

procedure, public :: init => aggregator_init

Initialise the aggregator.

procedure, public :: type => aggregator_type

Return a string identifier of the aggregator type.

procedure, public :: rank => aggregator_rank

Return the rank of the aggregator.

procedure, public :: shape => aggregator_shape

Return the shape of the aggregator.

procedure, public :: scale => aggregator_scale

Scale the aggregated data by a specified factor.

procedure, public :: div => aggregator_div

Divide the aggregated data by a specified factor.

procedure, public :: offset => aggregator_offset

Add a specified offset to the aggregated data.

type, public, extends(aggregator_t) ::  aggregator_real32_2d_t

An aggregator for 2-dimensional 32-bit real data.

Components

Type Visibility Attributes Name Initial
integer, public :: counter = 0

The number of times the source data has been accumulated.

procedure(accumulate_data), public, pointer :: accumulate

A procedure pointer to the accumulation method used to compute the time aggregated quantity. The specific method (e.g., mean, sum, min, max) is set by the set_method procedure.

procedure(reset_data), public, pointer :: reset

A procedure pointer to the reset method used to reset the aggregated data. The specific method (e.g., mean, sum, min, max) is set by the set_method procedure.

real(kind=real32), public, dimension(:,:), allocatable :: aggregated_data
real(kind=real32), public, dimension(:,:), pointer :: source_data => null()

Type-Bound Procedures

procedure, public :: init => aggregator_init

Initialise the aggregator.

procedure, public :: type => aggregator_type

Return a string identifier of the aggregator type.

procedure, public :: rank => aggregator_rank

Return the rank of the aggregator.

procedure, public :: shape => aggregator_shape

Return the shape of the aggregator.

procedure, public :: scale => aggregator_scale

Scale the aggregated data by a specified factor.

procedure, public :: div => aggregator_div

Divide the aggregated data by a specified factor.

procedure, public :: offset => aggregator_offset

Add a specified offset to the aggregated data.

type, public, extends(aggregator_t) ::  aggregator_real32_3d_t

An aggregator for 3-dimensional 32-bit real data.

Components

Type Visibility Attributes Name Initial
integer, public :: counter = 0

The number of times the source data has been accumulated.

procedure(accumulate_data), public, pointer :: accumulate

A procedure pointer to the accumulation method used to compute the time aggregated quantity. The specific method (e.g., mean, sum, min, max) is set by the set_method procedure.

procedure(reset_data), public, pointer :: reset

A procedure pointer to the reset method used to reset the aggregated data. The specific method (e.g., mean, sum, min, max) is set by the set_method procedure.

real(kind=real32), public, dimension(:,:,:), allocatable :: aggregated_data
real(kind=real32), public, dimension(:,:,:), pointer :: source_data => null()

Type-Bound Procedures

procedure, public :: init => aggregator_init

Initialise the aggregator.

procedure, public :: type => aggregator_type

Return a string identifier of the aggregator type.

procedure, public :: rank => aggregator_rank

Return the rank of the aggregator.

procedure, public :: shape => aggregator_shape

Return the shape of the aggregator.

procedure, public :: scale => aggregator_scale

Scale the aggregated data by a specified factor.

procedure, public :: div => aggregator_div

Divide the aggregated data by a specified factor.

procedure, public :: offset => aggregator_offset

Add a specified offset to the aggregated data.

type, public, extends(aggregator_t) ::  aggregator_real64_0d_t

An aggregator for 0-dimensional (scalar) 64-bit real data.

Components

Type Visibility Attributes Name Initial
integer, public :: counter = 0

The number of times the source data has been accumulated.

procedure(accumulate_data), public, pointer :: accumulate

A procedure pointer to the accumulation method used to compute the time aggregated quantity. The specific method (e.g., mean, sum, min, max) is set by the set_method procedure.

procedure(reset_data), public, pointer :: reset

A procedure pointer to the reset method used to reset the aggregated data. The specific method (e.g., mean, sum, min, max) is set by the set_method procedure.

real(kind=real32), public, allocatable :: aggregated_data
real(kind=real64), public, allocatable :: aggregated_data
real(kind=real64), public, pointer :: source_data => null()

Type-Bound Procedures

procedure, public :: init => aggregator_init

Initialise the aggregator.

procedure, public :: type => aggregator_type

Return a string identifier of the aggregator type.

procedure, public :: rank => aggregator_rank

Return the rank of the aggregator.

procedure, public :: shape => aggregator_shape

Return the shape of the aggregator.

procedure, public :: scale => aggregator_scale

Scale the aggregated data by a specified factor.

procedure, public :: div => aggregator_div

Divide the aggregated data by a specified factor.

procedure, public :: offset => aggregator_offset

Add a specified offset to the aggregated data.

type, public, extends(aggregator_t) ::  aggregator_real64_1d_t

An aggregator for 1-dimensional 64-bit real data.

Components

Type Visibility Attributes Name Initial
integer, public :: counter = 0

The number of times the source data has been accumulated.

procedure(accumulate_data), public, pointer :: accumulate

A procedure pointer to the accumulation method used to compute the time aggregated quantity. The specific method (e.g., mean, sum, min, max) is set by the set_method procedure.

procedure(reset_data), public, pointer :: reset

A procedure pointer to the reset method used to reset the aggregated data. The specific method (e.g., mean, sum, min, max) is set by the set_method procedure.

real(kind=real32), public, dimension(:), allocatable :: aggregated_data
real(kind=real64), public, dimension(:), allocatable :: aggregated_data
real(kind=real64), public, dimension(:), pointer :: source_data => null()

Type-Bound Procedures

procedure, public :: init => aggregator_init

Initialise the aggregator.

procedure, public :: type => aggregator_type

Return a string identifier of the aggregator type.

procedure, public :: rank => aggregator_rank

Return the rank of the aggregator.

procedure, public :: shape => aggregator_shape

Return the shape of the aggregator.

procedure, public :: scale => aggregator_scale

Scale the aggregated data by a specified factor.

procedure, public :: div => aggregator_div

Divide the aggregated data by a specified factor.

procedure, public :: offset => aggregator_offset

Add a specified offset to the aggregated data.

type, public, extends(aggregator_t) ::  aggregator_real64_2d_t

An aggregator for 2-dimensional 64-bit real data.

Components

Type Visibility Attributes Name Initial
integer, public :: counter = 0

The number of times the source data has been accumulated.

procedure(accumulate_data), public, pointer :: accumulate

A procedure pointer to the accumulation method used to compute the time aggregated quantity. The specific method (e.g., mean, sum, min, max) is set by the set_method procedure.

procedure(reset_data), public, pointer :: reset

A procedure pointer to the reset method used to reset the aggregated data. The specific method (e.g., mean, sum, min, max) is set by the set_method procedure.

real(kind=real32), public, dimension(:,:), allocatable :: aggregated_data
real(kind=real64), public, dimension(:,:), allocatable :: aggregated_data
real(kind=real64), public, dimension(:,:), pointer :: source_data => null()

Type-Bound Procedures

procedure, public :: init => aggregator_init

Initialise the aggregator.

procedure, public :: type => aggregator_type

Return a string identifier of the aggregator type.

procedure, public :: rank => aggregator_rank

Return the rank of the aggregator.

procedure, public :: shape => aggregator_shape

Return the shape of the aggregator.

procedure, public :: scale => aggregator_scale

Scale the aggregated data by a specified factor.

procedure, public :: div => aggregator_div

Divide the aggregated data by a specified factor.

procedure, public :: offset => aggregator_offset

Add a specified offset to the aggregated data.

type, public, extends(aggregator_t) ::  aggregator_real64_3d_t

An aggregator for 3-dimensional 64-bit real data.

Components

Type Visibility Attributes Name Initial
integer, public :: counter = 0

The number of times the source data has been accumulated.

procedure(accumulate_data), public, pointer :: accumulate

A procedure pointer to the accumulation method used to compute the time aggregated quantity. The specific method (e.g., mean, sum, min, max) is set by the set_method procedure.

procedure(reset_data), public, pointer :: reset

A procedure pointer to the reset method used to reset the aggregated data. The specific method (e.g., mean, sum, min, max) is set by the set_method procedure.

real(kind=real32), public, dimension(:,:,:), allocatable :: aggregated_data
real(kind=real64), public, dimension(:,:,:), allocatable :: aggregated_data
real(kind=real64), public, dimension(:,:,:), pointer :: source_data => null()

Type-Bound Procedures

procedure, public :: init => aggregator_init

Initialise the aggregator.

procedure, public :: type => aggregator_type

Return a string identifier of the aggregator type.

procedure, public :: rank => aggregator_rank

Return the rank of the aggregator.

procedure, public :: shape => aggregator_shape

Return the shape of the aggregator.

procedure, public :: scale => aggregator_scale

Scale the aggregated data by a specified factor.

procedure, public :: div => aggregator_div

Divide the aggregated data by a specified factor.

procedure, public :: offset => aggregator_offset

Add a specified offset to the aggregated data.


Functions

private function aggregator_type(this)

Return a string identifier of the aggregator type (e.g., "int32", "real32", "real64").

Arguments

Type IntentOptional Attributes Name
class(aggregator_t), intent(in) :: this

Return Value character(len=16)

private function aggregator_rank(this)

Return the rank of the aggregator.

Arguments

Type IntentOptional Attributes Name
class(aggregator_t), intent(in) :: this

Return Value integer

private function aggregator_shape(this) result(agg_shape)

Return the shape of the aggregator.

Arguments

Type IntentOptional Attributes Name
class(aggregator_t), intent(in) :: this

Return Value integer, allocatable, (:)

private function new_aggregator_int32_0d_t(source_data) result(agg)

Create a new 0D integer aggregator.

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(inout), target :: source_data

The source data array to be sampled by the aggregator.

Return Value type(aggregator_int32_0d_t)

private function new_aggregator_int32_1d_t(source_data) result(agg)

Create a new 1D integer aggregator.

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(inout), dimension(:), target :: source_data

The source data array to be sampled by the aggregator.

Return Value type(aggregator_int32_1d_t)

private function new_aggregator_int32_2d_t(source_data) result(agg)

Create a new 2D integer aggregator.

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(inout), dimension(:,:), target :: source_data

The source data array to be sampled by the aggregator.

Return Value type(aggregator_int32_2d_t)

private function new_aggregator_int32_3d_t(source_data) result(agg)

Create a new 3D integer aggregator.

Arguments

Type IntentOptional Attributes Name
integer(kind=int32), intent(inout), dimension(:,:,:), target :: source_data

The source data array to be sampled by the aggregator.

Return Value type(aggregator_int32_3d_t)

private function new_aggregator_real32_0d(source_data) result(agg)

Create a new 0D 32-bit real aggregator.

Arguments

Type IntentOptional Attributes Name
real(kind=real32), intent(inout), target :: source_data

The source data array to be sampled by the aggregator.

Return Value type(aggregator_real32_0d_t)

private function new_aggregator_real32_1d(source_data) result(agg)

Create a new 1D 32-bit real aggregator.

Arguments

Type IntentOptional Attributes Name
real(kind=real32), intent(inout), dimension(:), target :: source_data

The source data array to be sampled by the aggregator.

Return Value type(aggregator_real32_1d_t)

private function new_aggregator_real32_2d(source_data) result(agg)

Create a new 2D 32-bit real aggregator.

Arguments

Type IntentOptional Attributes Name
real(kind=real32), intent(inout), dimension(:,:), target :: source_data

The source data array to be sampled by the aggregator.

Return Value type(aggregator_real32_2d_t)

private function new_aggregator_real32_3d(source_data) result(agg)

Create a new 3D 32-bit real aggregator.

Arguments

Type IntentOptional Attributes Name
real(kind=real32), intent(inout), dimension(:,:,:), target :: source_data

The source data array to be sampled by the aggregator.

Return Value type(aggregator_real32_3d_t)

private function new_aggregator_real64_0d(source_data) result(agg)

Create a new 0D 64-bit real aggregator.

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(inout), target :: source_data

The source data array to be sampled by the aggregator.

Return Value type(aggregator_real64_0d_t)

private function new_aggregator_real64_1d(source_data) result(agg)

Create a new 1D 64-bit real aggregator.

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(inout), dimension(:), target :: source_data

The source data array to be sampled by the aggregator.

Return Value type(aggregator_real64_1d_t)

private function new_aggregator_real64_2d(source_data) result(agg)

Create a new 2D 64-bit real aggregator.

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(inout), dimension(:,:), target :: source_data

The source data array to be sampled by the aggregator.

Return Value type(aggregator_real64_2d_t)

private function new_aggregator_real64_3d(source_data) result(agg)

Create a new 3D 64-bit real aggregator.

Arguments

Type IntentOptional Attributes Name
real(kind=real64), intent(inout), dimension(:,:,:), target :: source_data

The source data array to be sampled by the aggregator.

Return Value type(aggregator_real64_3d_t)


Subroutines

private subroutine aggregator_init(this, method)

Initialise the aggregator by allocating the aggregated data array and its aggregation method. The values in the aggregated data array are reset according to the specified aggregation method.

Arguments

Type IntentOptional Attributes Name
class(aggregator_t), intent(inout) :: this
character(len=*), intent(in) :: method

The aggregation method to use (e.g., "mean", "sum", "point", "min", "max").

private subroutine aggregator_set_method(this, method)

Set the aggregation method for the aggregator by assigning the appropriate accumulation and reset procedures based on the specified method.

Arguments

Type IntentOptional Attributes Name
class(aggregator_t), intent(inout) :: this
character(len=*), intent(in) :: method

The aggregation method to use (e.g., "mean", "sum", "point", "min", "max").

private subroutine aggregator_scale(this, scale)

Scale the aggregated data by a specified factor.

Arguments

Type IntentOptional Attributes Name
class(aggregator_t), intent(inout) :: this
real, intent(in) :: scale

The factor by which to scale the aggregated data.

private subroutine aggregator_div(this, div)

Divide the aggregated data by a specified factor.

Arguments

Type IntentOptional Attributes Name
class(aggregator_t), intent(inout) :: this
real, intent(in) :: div

The factor by which to divide the aggregated data.

private subroutine aggregator_offset(this, offset)

Offset the aggregated data by a specified value.

Arguments

Type IntentOptional Attributes Name
class(aggregator_t), intent(inout) :: this
real, intent(in) :: offset

The value by which to offset the aggregated data.

private subroutine get_accumulate_args(scale, div, offset, scale_out, div_out, offset_out)

Helper subroutine to get initialise optional scale, div, and offset arguments for accumulate procedures.

Arguments

Type IntentOptional Attributes Name
real, intent(in), optional :: scale

An optional scaling factor to apply to the source data before accumulation. Defaults to 1.0 if not provided.

real, intent(in), optional :: div

An optional division factor to apply to the source data before accumulation. Defaults to 1.0 if not provided.

real, intent(in), optional :: offset

An optional offset to add to the source data before accumulation. Defaults to 0.0 if not provided.

real :: scale_out
real :: div_out
real :: offset_out

private subroutine mean_accumulate(this, scale, div, offset)

Accumulate the aggregated data from the source data using the mean aggregation method.

Arguments

Type IntentOptional Attributes Name
class(aggregator_t), intent(inout) :: this
real, intent(in), optional :: scale

An optional scaling factor to apply to the source data before accumulation. Defaults to 1.0 if not provided.

real, intent(in), optional :: div

An optional division factor to apply to the source data before accumulation. Defaults to 1.0 if not provided.

real, intent(in), optional :: offset

An optional offset to add to the source data before accumulation. Defaults to 0.0 if not provided.

private subroutine sum_accumulate(this, scale, div, offset)

Accumulate the aggregated data from the source data using the sum aggregation method.

Arguments

Type IntentOptional Attributes Name
class(aggregator_t), intent(inout) :: this
real, intent(in), optional :: scale

An optional scaling factor to apply to the source data before accumulation. Defaults to 1.0 if not provided.

real, intent(in), optional :: div

An optional division factor to apply to the source data before accumulation. Defaults to 1.0 if not provided.

real, intent(in), optional :: offset

An optional offset to add to the source data before accumulation. Defaults to 0.0 if not provided.

private subroutine point_accumulate(this, scale, div, offset)

Accumulate the aggregated data from the source data using the point aggregation method.

Arguments

Type IntentOptional Attributes Name
class(aggregator_t), intent(inout) :: this
real, intent(in), optional :: scale

An optional scaling factor to apply to the source data before accumulation. Defaults to 1.0 if not provided.

real, intent(in), optional :: div

An optional division factor to apply to the source data before accumulation. Defaults to 1.0 if not provided.

real, intent(in), optional :: offset

An optional offset to add to the source data before accumulation. Defaults to 0.0 if not provided.

private subroutine min_accumulate(this, scale, div, offset)

Accumulate the aggregated data from the source data using the min aggregation method.

Arguments

Type IntentOptional Attributes Name
class(aggregator_t), intent(inout) :: this
real, intent(in), optional :: scale

An optional scaling factor to apply to the source data before accumulation. Defaults to 1.0 if not provided.

real, intent(in), optional :: div

An optional division factor to apply to the source data before accumulation. Defaults to 1.0 if not provided.

real, intent(in), optional :: offset

An optional offset to add to the source data before accumulation. Defaults to 0.0 if not provided.

private subroutine max_accumulate(this, scale, div, offset)

Accumulate the aggregated data from the source data using the max aggregation method.

Arguments

Type IntentOptional Attributes Name
class(aggregator_t), intent(inout) :: this
real, intent(in), optional :: scale

An optional scaling factor to apply to the source data before accumulation. Defaults to 1.0 if not provided.

real, intent(in), optional :: div

An optional division factor to apply to the source data before accumulation. Defaults to 1.0 if not provided.

real, intent(in), optional :: offset

An optional offset to add to the source data before accumulation. Defaults to 0.0 if not provided.

private subroutine point_reset(this)

Reset the aggregated data for the point aggregation method. This is a no-op since point aggregation always takes the value of the most recent data point.

Arguments

Type IntentOptional Attributes Name
class(aggregator_t), intent(inout) :: this

private subroutine min_reset(this)

Reset the aggregated data for the min aggregation method.

Arguments

Type IntentOptional Attributes Name
class(aggregator_t), intent(inout) :: this

private subroutine max_reset(this)

Reset the aggregated data for the max aggregation method.

Arguments

Type IntentOptional Attributes Name
class(aggregator_t), intent(inout) :: this

private subroutine other_reset(this)

Reset the aggregated data for aggregation methods other than point, min, and max.

Arguments

Type IntentOptional Attributes Name
class(aggregator_t), intent(inout) :: this