A gas analyzer comprising at least one elongated cavity and a light source module: wherein a partition plate is arranged parallel to the central axis of elongation of the cavity so as to divide the cavity into a reference gas chamber and a measurement gas chamber of the same shape and size, the partition plate having the same length as the cavity; the light source module comprises a light source disposed externally to, and at one end of, the cavity and configured to alternatively transmit light from the source through the reference gas chamber and the measurement gas chamber; and wherein the gas analyser further comprises a micro-flow infrared gas detection device configured to detect the intensity of light emitted by the light source module which has passed through the cavity, the micro-flow infrared gas detection device being arranged externally to, and at the other end of, the cavity; wherein the micro-flow infrared gas detection device comprises a front gas chamber, a rear gas chamber, a micro-flow infrared sensor disposed between and within the front and rear gas chambers, and a water compensating device for eliminating the influence of moisture; wherein the water compensating device comprises a sheet-shaped opaque partition, a water compensation buffer gas chamber, and a connection pipe for connecting the water compensation buffer gas chamber to the rear gas chamber 123b; and wherein the front gas chamber, the rear gas chamber, the sheet-shaped opaque partition, and the water compensation buffer gas chamber are sequentially arranged in this order along the propagation direction of the light emitted by the light source module, wherein the gas analyzer is configured according to a water adjustment method which comprises the following steps: S1: filling a measurement gas into the front gas chamber, the rear gas chamber and the water compensation buffer gas chamber; S2: filling a reference gas into the measurement gas chamber and obtaining the magnitude of an electrical signal detected by the micro-flow infrared sensor corresponding to the reference gas in the measurement gas chamber; S3: refilling the measurement gas chamber with a reference gas containing non-condensed water, and adjusting the position of the sheet-shaped opaque partition such that the magnitude of an electrical signal detected by the micro-flow infrared sensor corresponding to the reference gas containing non-condensed water in the measurement gas chamber is the same as the electrical signal in step S2. wherein a partition plate is arranged parallel to the central axis of elongation of the cavity so as to divide the cavity into a reference gas chamber and a measurement gas chamber of the same shape and size, the partition plate having the same length as the cavity; the light source module comprises a light source disposed externally to, and at one end of, the cavity and configured to alternatively transmit light from the source through the reference gas chamber and the measurement gas chamber; and wherein the gas analyser further comprises a micro-flow infrared gas detection device configured to detect the intensity of light emitted by the light source module which has passed through the cavity, the micro-flow infrared gas detection device being arranged externally to, and at the other end of, the cavity; wherein the micro-flow infrared gas detection device comprises a front gas chamber, a rear gas chamber, a micro-flow infrared sensor disposed between and within the front and rear gas chambers, and a water compensating device for eliminating the influence of moisture; wherein the water compensating device comprises a sheet-shaped opaque partition, a water compensation buffer gas chamber, and a connection pipe for connecting the water compensation buffer gas chamber to the rear gas chamber 123b; and wherein the front gas chamber, the rear gas chamber, the sheet-shaped opaque partition, and the water compensation buffer gas chamber are sequentially arranged in this order along the propagation direction of the light emitted by the light source module, wherein the gas analyzer is configured according to a water adjustment method which comprises the following steps: S1: filling a measurement gas into the front gas chamber, the rear gas chamber and the water compensation buffer gas chamber; S2: filling a reference gas into the measurement gas chamber and obtaining the magnitude of an electrical signal detected by the micro-flow infrared sensor corresponding to the reference gas in the measurement gas chamber; S3: refilling the measurement gas chamber with a reference gas containing non-condensed water, and adjusting the position of the sheet-shaped opaque partition such that the magnitude of an electrical signal detected by the micro-flow infrared sensor corresponding to the reference gas containing non-condensed water in the measurement gas chamber is the same as the electrical signal in step S2. S1: filling a measurement gas into the front gas chamber, the rear gas chamber and the water compensation buffer gas chamber; S2: filling a reference gas into the measurement gas chamber and obtaining the magnitude of an electrical signal detected by the micro-flow infrared sensor corresponding to the reference gas in the measurement gas chamber; S3: refilling the measurement gas chamber with a reference gas containing non-condensed water, and adjusting the position of the sheet-shaped opaque partition such that the magnitude of an electrical signal detected by the micro-flow infrared sensor corresponding to the reference gas containing non-condensed water in the measurement gas chamber is the same as the electrical signal in step S2.