Excruciating details

How the gas exchange works

This can be one of the most confusing parts of the model. But the idea is pretty simple.

The gas exchange rate (between the surface ocean layer and the atmosphere) is the product of a 'piston velocity', Kv, and the difference between the saturation concentration (alpha) and the actual surface concentration (Csurf):

Kv * (alpha - Csurf)

(See the Sarmiento and Gruber book, chapter 3, for more background on this.)

This calculation happens in the coupler, in module ??.F90. But BLING needs to pass the saturation and surface concentrations to the coupler in order for the calculation to take place. In addition, the piston velocity varies between different gases, represented by the Schimdt number. So BLING actually passes the products of the Schmidt number and the concentrations to the coupler, where the calculation happens.

In the generic tracer framework, these variables are passed with the g_tracer_set_values subroutine, associated with the tracer in question, for example:

call g_tracer_set_values(tracer_list,'dic_b','alpha',bling%co2_alpha ,isd,jsd)

Then, the generic tracer module (generic_tracer.F90, I think) picks up the gas exchange fluxes and treats them as a tracer source/sink term.

Nomenclature

Arrays preceded by an f_ (eg f_fed) are 'field' arrays. These are basically local working variables for diagnostic and prognostic tracers, that are only 3 dimensional. They are set by a g_tracer_get_values call, and then used for calculations.

Arrays preceded by a j (eg jo2) are 'source' arrays. They are source/sink rates for the variable in question. This is not done particularly strictly, and is just kind of a weird habit inherited from OCMIP.