Variational assimilation of temperature for the model of hydrodynamics of the Baltic Sea: the solution of the open boundary problem