dyn_mpas_debug_print Subroutine

private subroutine dyn_mpas_debug_print(self, level, message, printer)

This subroutine prints a debug message at a debug level. The debug message will be prefixed by "MPAS Subdriver (N): ", where N is the MPI rank. The debug level is one of the log_level_* constants. If printer is not supplied, the MPI root rank will print. Otherwise, the designated MPI rank will print instead.

Type Bound

mpas_dynamical_core_type

Arguments

Type IntentOptional Attributes Name
class(mpas_dynamical_core_type), intent(in) :: self
integer, intent(in) :: level
character(len=*), intent(in) :: message
integer, intent(in), optional :: printer

Calls

proc~~dyn_mpas_debug_print~~CallsGraph proc~dyn_mpas_debug_print mpas_dynamical_core_type%dyn_mpas_debug_print proc~stringify stringify proc~dyn_mpas_debug_print->proc~stringify

Called by

proc~~dyn_mpas_debug_print~~CalledByGraph proc~dyn_mpas_debug_print mpas_dynamical_core_type%dyn_mpas_debug_print none~add_stream_attribute_0d add_stream_attribute_0d none~add_stream_attribute_0d->proc~dyn_mpas_debug_print none~add_stream_attribute_1d add_stream_attribute_1d none~add_stream_attribute_1d->proc~dyn_mpas_debug_print proc~dyn_mpas_check_variable_status mpas_dynamical_core_type%dyn_mpas_check_variable_status proc~dyn_mpas_check_variable_status->proc~dyn_mpas_debug_print proc~dyn_mpas_compute_edge_wind mpas_dynamical_core_type%dyn_mpas_compute_edge_wind proc~dyn_mpas_compute_edge_wind->proc~dyn_mpas_debug_print proc~dyn_mpas_exchange_halo mpas_dynamical_core_type%dyn_mpas_exchange_halo proc~dyn_mpas_compute_edge_wind->proc~dyn_mpas_exchange_halo proc~dyn_mpas_compute_unit_vector mpas_dynamical_core_type%dyn_mpas_compute_unit_vector proc~dyn_mpas_compute_unit_vector->proc~dyn_mpas_debug_print proc~dyn_mpas_define_scalar mpas_dynamical_core_type%dyn_mpas_define_scalar proc~dyn_mpas_define_scalar->proc~dyn_mpas_debug_print proc~dyn_mpas_exchange_halo->proc~dyn_mpas_debug_print proc~dyn_mpas_final mpas_dynamical_core_type%dyn_mpas_final proc~dyn_mpas_final->proc~dyn_mpas_debug_print proc~dyn_mpas_get_global_mesh_dimension mpas_dynamical_core_type%dyn_mpas_get_global_mesh_dimension proc~dyn_mpas_get_global_mesh_dimension->proc~dyn_mpas_debug_print proc~dyn_mpas_get_local_mesh_dimension mpas_dynamical_core_type%dyn_mpas_get_local_mesh_dimension proc~dyn_mpas_get_local_mesh_dimension->proc~dyn_mpas_debug_print proc~dyn_mpas_init_phase1 mpas_dynamical_core_type%dyn_mpas_init_phase1 proc~dyn_mpas_init_phase1->proc~dyn_mpas_debug_print proc~dyn_mpas_init_phase2 mpas_dynamical_core_type%dyn_mpas_init_phase2 proc~dyn_mpas_init_phase2->proc~dyn_mpas_debug_print proc~dyn_mpas_init_phase3 mpas_dynamical_core_type%dyn_mpas_init_phase3 proc~dyn_mpas_init_phase3->proc~dyn_mpas_debug_print proc~dyn_mpas_init_phase4 mpas_dynamical_core_type%dyn_mpas_init_phase4 proc~dyn_mpas_init_phase4->proc~dyn_mpas_debug_print proc~dyn_mpas_init_stream_with_pool mpas_dynamical_core_type%dyn_mpas_init_stream_with_pool proc~dyn_mpas_init_stream_with_pool->proc~dyn_mpas_debug_print proc~dyn_mpas_init_stream_with_pool->proc~dyn_mpas_check_variable_status none~add_stream_attribute add_stream_attribute proc~dyn_mpas_init_stream_with_pool->none~add_stream_attribute proc~dyn_mpas_read_namelist mpas_dynamical_core_type%dyn_mpas_read_namelist proc~dyn_mpas_read_namelist->proc~dyn_mpas_debug_print proc~dyn_mpas_read_write_stream mpas_dynamical_core_type%dyn_mpas_read_write_stream proc~dyn_mpas_read_write_stream->proc~dyn_mpas_debug_print proc~dyn_mpas_read_write_stream->proc~dyn_mpas_exchange_halo proc~dyn_mpas_read_write_stream->proc~dyn_mpas_init_stream_with_pool proc~dyn_mpas_run mpas_dynamical_core_type%dyn_mpas_run proc~dyn_mpas_run->proc~dyn_mpas_debug_print none~add_stream_attribute->none~add_stream_attribute_0d none~add_stream_attribute->none~add_stream_attribute_1d none~set_mpas_physics_tendency_rho set_mpas_physics_tendency_rho none~set_mpas_physics_tendency_rho->proc~dyn_mpas_exchange_halo none~set_mpas_physics_tendency_rtheta set_mpas_physics_tendency_rtheta none~set_mpas_physics_tendency_rtheta->proc~dyn_mpas_exchange_halo none~set_mpas_physics_tendency_ru set_mpas_physics_tendency_ru none~set_mpas_physics_tendency_ru->proc~dyn_mpas_compute_edge_wind none~set_mpas_state_rho_base_theta_base set_mpas_state_rho_base_theta_base none~set_mpas_state_rho_base_theta_base->proc~dyn_mpas_exchange_halo none~set_mpas_state_rho_theta set_mpas_state_rho_theta none~set_mpas_state_rho_theta->proc~dyn_mpas_exchange_halo none~set_mpas_state_scalars set_mpas_state_scalars none~set_mpas_state_scalars->proc~dyn_mpas_exchange_halo none~set_mpas_state_u set_mpas_state_u none~set_mpas_state_u->proc~dyn_mpas_compute_edge_wind none~set_mpas_state_w set_mpas_state_w none~set_mpas_state_w->proc~dyn_mpas_exchange_halo proc~dyn_exchange_constituent_states dyn_exchange_constituent_states proc~dyn_exchange_constituent_states->proc~dyn_mpas_exchange_halo proc~dyn_init dyn_init proc~dyn_init->proc~dyn_mpas_define_scalar proc~dyn_init->proc~dyn_mpas_init_phase4 proc~dyn_init->proc~dyn_mpas_read_write_stream proc~dyn_init->proc~dyn_exchange_constituent_states proc~set_analytic_initial_condition set_analytic_initial_condition proc~dyn_init->proc~set_analytic_initial_condition proc~dyn_inquire_mesh_dimensions dyn_inquire_mesh_dimensions proc~dyn_inquire_mesh_dimensions->proc~dyn_mpas_get_global_mesh_dimension proc~dyn_inquire_mesh_dimensions->proc~dyn_mpas_get_local_mesh_dimension proc~dyn_readnl dyn_readnl proc~dyn_readnl->proc~dyn_mpas_init_phase1 proc~dyn_readnl->proc~dyn_mpas_init_phase2 proc~dyn_readnl->proc~dyn_mpas_read_namelist proc~dyn_run dyn_run proc~dyn_run->proc~dyn_mpas_run proc~dyn_variable_dump dyn_variable_dump proc~dyn_variable_dump->proc~dyn_mpas_exchange_halo proc~dyn_variable_dump->proc~dyn_mpas_read_write_stream proc~model_grid_init model_grid_init proc~model_grid_init->proc~dyn_mpas_compute_unit_vector proc~model_grid_init->proc~dyn_mpas_init_phase3 proc~model_grid_init->proc~dyn_mpas_read_write_stream proc~model_grid_init->proc~dyn_inquire_mesh_dimensions none~set_physics_state_external set_physics_state_external none~set_physics_state_external->proc~dyn_exchange_constituent_states proc~dyn_final dyn_final proc~dyn_final->proc~dyn_variable_dump proc~dynamics_to_physics_coupling dynamics_to_physics_coupling proc~dynamics_to_physics_coupling->proc~dyn_exchange_constituent_states proc~dynamics_to_physics_coupling->none~set_physics_state_external proc~physics_to_dynamics_coupling physics_to_dynamics_coupling proc~physics_to_dynamics_coupling->none~set_mpas_physics_tendency_rho proc~physics_to_dynamics_coupling->none~set_mpas_physics_tendency_rtheta proc~physics_to_dynamics_coupling->none~set_mpas_physics_tendency_ru proc~physics_to_dynamics_coupling->proc~dyn_exchange_constituent_states proc~set_analytic_initial_condition->none~set_mpas_state_rho_base_theta_base proc~set_analytic_initial_condition->none~set_mpas_state_rho_theta proc~set_analytic_initial_condition->none~set_mpas_state_scalars proc~set_analytic_initial_condition->none~set_mpas_state_u proc~set_analytic_initial_condition->none~set_mpas_state_w proc~stepon_run3 stepon_run3 proc~stepon_run3->proc~dyn_run proc~stepon_final stepon_final proc~stepon_final->proc~dyn_final proc~stepon_run2 stepon_run2 proc~stepon_run2->proc~physics_to_dynamics_coupling proc~stepon_timestep_init stepon_timestep_init proc~stepon_timestep_init->proc~dynamics_to_physics_coupling

Source Code

    subroutine dyn_mpas_debug_print(self, level, message, printer)
        class(mpas_dynamical_core_type), intent(in) :: self
        integer, intent(in) :: level
        character(*), intent(in) :: message
        integer, optional, intent(in) :: printer

        ! Bail out early if the log level is less verbose than the debug level.
        if (self % log_level < level) then
            return
        end if

        if (present(printer)) then
            if (self % mpi_rank /= printer) then
                return
            end if
        else
            if (.not. self % mpi_rank_root) then
                return
            end if
        end if

        write(self % log_unit, '(a)') 'MPAS Subdriver (' // stringify([self % mpi_rank]) // '): ' // message
    end subroutine dyn_mpas_debug_print