dyn_debug_print Subroutine

public subroutine dyn_debug_print(level, message, printer)

Uses

    • string_utils
    • cam_logfile
    • spmd_utils
  • proc~~dyn_debug_print~~UsesGraph proc~dyn_debug_print dyn_debug_print cam_logfile cam_logfile proc~dyn_debug_print->cam_logfile spmd_utils spmd_utils proc~dyn_debug_print->spmd_utils string_utils string_utils proc~dyn_debug_print->string_utils

Print a debug message at a debug level. The debug message will be prefixed by "MPAS Interface (N): ", where N is the MPI rank. The debug level is one of the debugout_* constants from the cam_logfile module. If printer is not supplied, the MPI root rank will print. Otherwise, the designated MPI rank will print instead. (KCW, 2024-02-03)

Arguments

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

Calls

proc~~dyn_debug_print~~CallsGraph proc~dyn_debug_print dyn_debug_print stringify stringify proc~dyn_debug_print->stringify

Called by

proc~~dyn_debug_print~~CalledByGraph proc~dyn_debug_print dyn_debug_print none~init_shared_variables init_shared_variables none~init_shared_variables->proc~dyn_debug_print none~init_shared_variables~2 init_shared_variables none~init_shared_variables~2->proc~dyn_debug_print none~init_shared_variables~3 init_shared_variables none~init_shared_variables~3->proc~dyn_debug_print none~set_mpas_physics_tendency_rho set_mpas_physics_tendency_rho none~set_mpas_physics_tendency_rho->proc~dyn_debug_print none~set_mpas_physics_tendency_rtheta set_mpas_physics_tendency_rtheta none~set_mpas_physics_tendency_rtheta->proc~dyn_debug_print none~set_mpas_physics_tendency_ru set_mpas_physics_tendency_ru none~set_mpas_physics_tendency_ru->proc~dyn_debug_print 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_debug_print none~set_mpas_state_rho_theta set_mpas_state_rho_theta none~set_mpas_state_rho_theta->proc~dyn_debug_print none~set_mpas_state_scalars set_mpas_state_scalars none~set_mpas_state_scalars->proc~dyn_debug_print none~set_mpas_state_u set_mpas_state_u none~set_mpas_state_u->proc~dyn_debug_print none~set_mpas_state_w set_mpas_state_w none~set_mpas_state_w->proc~dyn_debug_print none~set_physics_state_external set_physics_state_external none~set_physics_state_external->proc~dyn_debug_print proc~dyn_exchange_constituent_states dyn_exchange_constituent_states none~set_physics_state_external->proc~dyn_exchange_constituent_states proc~check_topography_data check_topography_data proc~check_topography_data->proc~dyn_debug_print proc~define_cam_grid define_cam_grid proc~define_cam_grid->proc~dyn_debug_print proc~dyn_exchange_constituent_states->proc~dyn_debug_print proc~dyn_final dyn_final proc~dyn_final->proc~dyn_debug_print proc~dyn_init dyn_init proc~dyn_init->proc~dyn_debug_print proc~dyn_init->proc~check_topography_data proc~dyn_init->proc~dyn_exchange_constituent_states proc~mark_variables_as_initialized mark_variables_as_initialized proc~dyn_init->proc~mark_variables_as_initialized 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_debug_print proc~dyn_readnl dyn_readnl proc~dyn_readnl->proc~dyn_debug_print proc~dyn_run dyn_run proc~dyn_run->proc~dyn_debug_print proc~dynamics_to_physics_coupling dynamics_to_physics_coupling proc~dynamics_to_physics_coupling->proc~dyn_debug_print proc~dynamics_to_physics_coupling->none~init_shared_variables~2 proc~dynamics_to_physics_coupling->none~set_physics_state_external proc~dynamics_to_physics_coupling->proc~dyn_exchange_constituent_states proc~init_physics_grid init_physics_grid proc~init_physics_grid->proc~dyn_debug_print proc~init_reference_pressure init_reference_pressure proc~init_reference_pressure->proc~dyn_debug_print proc~mark_variables_as_initialized->proc~dyn_debug_print proc~model_grid_init model_grid_init proc~model_grid_init->proc~dyn_debug_print proc~model_grid_init->proc~define_cam_grid proc~model_grid_init->proc~dyn_inquire_mesh_dimensions proc~model_grid_init->proc~init_physics_grid proc~model_grid_init->proc~init_reference_pressure proc~physics_to_dynamics_coupling physics_to_dynamics_coupling proc~physics_to_dynamics_coupling->proc~dyn_debug_print proc~physics_to_dynamics_coupling->none~init_shared_variables~3 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->proc~dyn_debug_print proc~set_analytic_initial_condition->none~init_shared_variables 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_final stepon_final proc~stepon_final->proc~dyn_final proc~stepon_run2 stepon_run2 proc~stepon_run2->proc~physics_to_dynamics_coupling proc~stepon_run3 stepon_run3 proc~stepon_run3->proc~dyn_run proc~stepon_timestep_init stepon_timestep_init proc~stepon_timestep_init->proc~dynamics_to_physics_coupling

Source Code

    subroutine dyn_debug_print(level, message, printer)
        ! Module(s) from CAM-SIMA.
        use cam_logfile, only: debug_output, iulog
        use spmd_utils, only: iam, masterproc
        use string_utils, only: stringify

        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 (debug_output < level) then
            return
        end if

        if (present(printer)) then
            if (iam /= printer) then
                return
            end if
        else
            if (.not. masterproc) then
                return
            end if
        end if

        write(iulog, '(a)') 'MPAS Interface (' // stringify([iam]) // '): ' // message
    end subroutine dyn_debug_print