Constant dimension codes (CDCs), as special subspace codes, have received a lot of attention due to their application in random network coding. This paper introduces a family of new codes, called rank metric codes with given ranks (GRMCs), to generalize the parallel construction in [Xu and Chen, IEEE Trans. Inf. Theory, 64 (2018), 6315-6319] and the classic multilevel construction. A Singleton-like upper bound and a lower bound for GRMCs derived from Gabidulin codes are given. Via GRMCs, two effective constructions for CDCs are presented by combining the parallel construction and the multilevel construction. Many CDCs with larger size than the previously best known codes are given. The ratio between the new lower bound and the known upper bound for (4δ, 2δ, 2δ) q -CDCs is calculated. It is greater than 0.99926 for any prime power q and any δ ≥ 3.