Currently, pressurized gas is the leading technology for vehicular on-board hydrogen storage. During refueling, the hydrogen is expanded from the high-pressure fueling station cylinders, into the “empty” vehicle cylinder. The mass of the gas inside a cylinder can be calculated from the knowledge of the pressure and average gas temperature. However, during the fill process, the compression of the gas inside the cylinder leads to a rapid increase in temperature, this phenomenon along with the continuous introduction of cooler gas creates an evolving spatial distribution of gas temperature within the cylinder. In order to determine a correlation between the massaveraged gas temperature and local measurement of gas temperature, this study presents a CFD model of the filling of a hydrogen compressed gas cylinder. The model developed in this study is 2D and axi-symmetric, and solves the governing equations for compressible, unsteady, viscous turbulent flow. The model incorporates real gas effects, convective heat transfer from the gas to the cylinder walls and conduction through the cylinder walls to ambient. The results of the model show a large spatial variation of gas temperature within the cylinder during filling. The modeling results also help to identify the optimum location for the onboard gas temperature sensor such that the local measurement best represents the mass-averaged temperature of the gas within the cylinder. Hence allowing for the calculation of the mass of gas within the cylinder without using an expensive flow meter.