How to measure CO2, O2, NO2 and NO3 concentration in water?
Q Are there any methods to measure  CO2, O2, NO2 and NO3 concentrations in water? 

A NOT cheaply or made easily.  

Optical sensors for transmission loss or reflection coefficient are cheaply applied to basic element measurements for gas or liquid use a wide range of optical LED wavelengths, but when high resolution is needed for a compound oxygen gas that is orders of magnitude smaller in concentration than oxygen (O2) it becomes noise or difficult. 

Differential methods are needed with an array of sensors using a gas state. The sensitivity for measuring the concentration of a molecule in water is far less than in a gas state.  This is because the best methods used depend on the unique signature or wavelength of light for a given mass of molecule when burned into a gaseous state. This is how gas chromatography works. A high  power RF amplifer burns an inert gas and a measured sample is fed into a vacuum chamber. The color spectrum detected and measured from the results of burning the sample ( phase change from solid or liquid to gas) determine the concentration levels of gases.  

Simple chemical colour indicators are used for basic elements such as ph, O2, N2 CL levels and simple LED transmission loss are not sufficient to isolate  CO2, O2, NO2 and NO3.