diff --git a/src/data/cam_thermo.F90 b/src/data/cam_thermo.F90 index 2560cc4ee..ab10e3d70 100644 --- a/src/data/cam_thermo.F90 +++ b/src/data/cam_thermo.F90 @@ -1684,16 +1684,16 @@ subroutine get_hydrostatic_energy_1hd(tracer, moist_mixing_ratio, pdel_in, & if (present(dycore_idx))then if (dycore_idx) then - species_idx(:) = thermodynamic_active_species_idx_dycore(:) + species_idx(:) = thermodynamic_active_species_idx_dycore(1:thermodynamic_active_species_num) species_liq_idx(:) = thermodynamic_active_species_liq_idx_dycore(:) species_ice_idx(:) = thermodynamic_active_species_ice_idx_dycore(:) else - species_idx(:) = thermodynamic_active_species_idx(1:) + species_idx(:) = thermodynamic_active_species_idx(1:thermodynamic_active_species_num) species_liq_idx(:) = thermodynamic_active_species_liq_idx(:) species_ice_idx(:) = thermodynamic_active_species_ice_idx(:) end if else - species_idx(:) = thermodynamic_active_species_idx(1:) + species_idx(:) = thermodynamic_active_species_idx(1:thermodynamic_active_species_num) species_liq_idx(:) = thermodynamic_active_species_liq_idx(:) species_ice_idx(:) = thermodynamic_active_species_ice_idx(:) end if