Inform CAM-SIMA about the index mapping between MPAS scalars and CAM-SIMA constituents. (KCW, 2025-07-17)
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | private | :: | i | ||||
character(len=*), | private, | parameter | :: | subname | = | 'dyn_comp::set_thermodynamic_active_species_mapping' |
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