  We investigate the in-medium masses of $D$ and $\bar{D}$ mesons in the
isospin-asymmetric nuclear matter at finite temperatures arising due to the
interactions with the nucleons, the scalar isoscalar meson $\sigma$, and the
scalar iso-vector meson $\delta$ within a SU(4) model. The in-medium masses of
$J/\psi$ and the excited charmonium states ($\psi(3686)$ and $\psi(3770)$) are
also calculated in the hot isospin asymmetric nuclear matter in the present
investigation. These mass modifications arise due to the interaction of the
charmonium states with the gluon condensates of QCD, simulated by a scalar
dilaton field introduced to incorporate the broken scale invariance of QCD
within the effective chiral model. The change in the mass of $J/\psi$ in the
nuclear matter with the density is seen to be rather small, as has been shown
in the literature by using various approaches, whereas, the masses of the
excited states of charmonium ($\psi(3686)$ and $\psi(3770)$) are seen to have
considerable drop at high densities. The present study of the in-medium masses
of $D$ ($\bar{D}$) mesons as well as of the charmonium states will be of
relevance for the observables from the compressed baryonic matter, like the
production and collective flow of the $D$ ($\bar D$) mesons, resulting from the
asymmetric heavy ion collision experiments planned at the future facility of
the FAIR, GSI. The mass modifications of $D$ and $\bar{D}$ mesons as well as of
the charmonium states in hot nuclear medium can modify the decay of the
charmonium states ($\Psi^{'}, \chi_{c}, J/\Psi$) to $D\bar{D}$ pairs in the hot
dense hadronic matter. The small attractive potentials observed for the
$\bar{D}$ mesons may lead to formation of the $\bar{D}$ mesic nuclei.
