A procedure to objectively adjust the error covariance matrices of a variational data assimilation system is presented. It is based on popular diagnostics that utilize differences between observations and prior and posterior model solutions at the observation locations. In the application to a data assimilation system that combines a three-dimensional, physical-biogeochemical ocean model with large datasets of physical and chlorophyll a observations, the tuning procedure leads to a decrease in the posterior model-observation misfit and small improvements in short-term forecasting skill. It also increases the consistency of the data assimilation system with respect to diagnostics, based on linear estimation theory, and reduces signs of overfitting. The tuning procedure is easy to implement and only relies on information that is either prescribed to the data assimilation system or can be obtained from a series of short data assimilation experiments. The implementation includes a lognormal representation for biogeochemical variables and associated modifications to the diagnostics. Furthermore, the effect of the length of the observation window (number and distribution of observations) used to compute the diagnostics and the effect of neglecting model dynamics in the tuning procedure are examined.