The sensor location and selection of model noise parameters play an utmost important role in the performance of data assimilation methods. Suboptimal sensor placement may lead to incomplete information and incorrectly chosen noise parameters can cause filter divergence. Till now, these issues were addressed separately, but in this work, we consider both. We present an algorithm that finds the optimal sensor location and non-Gaussian model noise parameters not only separately but also simultaneously. The optimal location was determined for a fixed number of sensors and the root mean square error was used to assess the accuracy of the data assimilation scheme. A direct search method was implemented and, due to the stochastic nature of the filtering method, we used a sample average approximation approach. To prove the usefulness of the algorithm, we selected Riemann problems in one and two dimensions, where the solutions contain shock waves, rarefaction waves, and contact discontinuities. A high order finite volume weighted essentially non-oscillatory scheme was used for the numerical approximation. We used the Rusanov Riemann solver for the numerical flux and the three-stage third-order strong stability preserving Runge-Kutta scheme for the time advancing. Numerical experiments showed that optimizing both sensor location and model noise parameters gives more accurate results without suffering from filter divergence. Uniform distribution of the sensors and manually setting the noise parameters caused the filter to fail to track the truth, especially near the discontinuities.