set_thermodynamic_active_species_mapping Subroutine

subroutine set_thermodynamic_active_species_mapping()

Uses

    • string_utils
    • air_composition
    • cam_logfile
  • proc~~set_thermodynamic_active_species_mapping~~UsesGraph proc~set_thermodynamic_active_species_mapping set_thermodynamic_active_species_mapping air_composition air_composition proc~set_thermodynamic_active_species_mapping->air_composition cam_logfile cam_logfile proc~set_thermodynamic_active_species_mapping->cam_logfile string_utils string_utils proc~set_thermodynamic_active_species_mapping->string_utils

Inform CAM-SIMA about the index mapping between MPAS scalars and CAM-SIMA constituents. (KCW, 2025-07-17)

Arguments

None

Calls

proc~~set_thermodynamic_active_species_mapping~~CallsGraph proc~set_thermodynamic_active_species_mapping set_thermodynamic_active_species_mapping interface~dyn_debug_print dyn_debug_print proc~set_thermodynamic_active_species_mapping->interface~dyn_debug_print proc~dyn_mpas_map_mpas_scalar_index mpas_dynamical_core_type%dyn_mpas_map_mpas_scalar_index proc~set_thermodynamic_active_species_mapping->proc~dyn_mpas_map_mpas_scalar_index stringify stringify proc~set_thermodynamic_active_species_mapping->stringify thermodynamic_active_species_ice_idx thermodynamic_active_species_ice_idx proc~set_thermodynamic_active_species_mapping->thermodynamic_active_species_ice_idx thermodynamic_active_species_ice_idx_dycore thermodynamic_active_species_ice_idx_dycore proc~set_thermodynamic_active_species_mapping->thermodynamic_active_species_ice_idx_dycore thermodynamic_active_species_idx thermodynamic_active_species_idx proc~set_thermodynamic_active_species_mapping->thermodynamic_active_species_idx thermodynamic_active_species_idx_dycore thermodynamic_active_species_idx_dycore proc~set_thermodynamic_active_species_mapping->thermodynamic_active_species_idx_dycore thermodynamic_active_species_liq_idx thermodynamic_active_species_liq_idx proc~set_thermodynamic_active_species_mapping->thermodynamic_active_species_liq_idx thermodynamic_active_species_liq_idx_dycore thermodynamic_active_species_liq_idx_dycore proc~set_thermodynamic_active_species_mapping->thermodynamic_active_species_liq_idx_dycore proc~dyn_debug_print dyn_debug_print interface~dyn_debug_print->proc~dyn_debug_print proc~dyn_debug_print->stringify

Called by

proc~~set_thermodynamic_active_species_mapping~~CalledByGraph proc~set_thermodynamic_active_species_mapping set_thermodynamic_active_species_mapping proc~dyn_init dyn_init proc~dyn_init->proc~set_thermodynamic_active_species_mapping interface~dyn_init dyn_init interface~dyn_init->proc~dyn_init

Variables

Type Visibility Attributes Name Initial
integer, private :: i
character(len=*), private, parameter :: subname = 'dyn_comp::set_thermodynamic_active_species_mapping'

Source Code

    subroutine set_thermodynamic_active_species_mapping()
        ! Module(s) from CAM-SIMA.
        use air_composition, only: thermodynamic_active_species_num, &
                                   thermodynamic_active_species_liq_num, &
                                   thermodynamic_active_species_ice_num, &
                                   thermodynamic_active_species_idx, thermodynamic_active_species_idx_dycore, &
                                   thermodynamic_active_species_liq_idx, thermodynamic_active_species_liq_idx_dycore, &
                                   thermodynamic_active_species_ice_idx, thermodynamic_active_species_ice_idx_dycore
        use cam_logfile, only: debugout_debug
        use string_utils, only: stringify

        character(*), parameter :: subname = 'dyn_comp::set_thermodynamic_active_species_mapping'
        integer :: i

        call dyn_debug_print(debugout_debug, subname // ' entered')

        do i = 1, thermodynamic_active_species_num
            thermodynamic_active_species_idx_dycore(i) = &
                mpas_dynamical_core % map_mpas_scalar_index(thermodynamic_active_species_idx(i))
        end do

        do i = 1, thermodynamic_active_species_liq_num
            thermodynamic_active_species_liq_idx_dycore(i) = &
                mpas_dynamical_core % map_mpas_scalar_index(thermodynamic_active_species_liq_idx(i))
        end do

        do i = 1, thermodynamic_active_species_ice_num
            thermodynamic_active_species_ice_idx_dycore(i) = &
                mpas_dynamical_core % map_mpas_scalar_index(thermodynamic_active_species_ice_idx(i))
        end do

        call dyn_debug_print(debugout_debug, 'thermodynamic_active_species_num = ' // &
            stringify([thermodynamic_active_species_num]))
        call dyn_debug_print(debugout_debug, 'thermodynamic_active_species_liq_num = ' // &
            stringify([thermodynamic_active_species_liq_num]))
        call dyn_debug_print(debugout_debug, 'thermodynamic_active_species_ice_num = ' // &
            stringify([thermodynamic_active_species_ice_num]))

        call dyn_debug_print(debugout_debug, 'thermodynamic_active_species_idx_dycore = [' // &
            stringify(thermodynamic_active_species_idx_dycore) // ']')
        call dyn_debug_print(debugout_debug, 'thermodynamic_active_species_liq_idx_dycore = [' // &
            stringify(thermodynamic_active_species_liq_idx_dycore) // ']')
        call dyn_debug_print(debugout_debug, 'thermodynamic_active_species_ice_idx_dycore = [' // &
            stringify(thermodynamic_active_species_ice_idx_dycore) // ']')

        call dyn_debug_print(debugout_debug, subname // ' completed')
    end subroutine set_thermodynamic_active_species_mapping