Equation of state approximation

Four options for computing the density from salinity and potential temperature are available. The first is an equation of state introduced by McDougall, Wright, Jackett and Feistel (MWJF [16]) which is a faster and more accurate alternative to the UNESCO equation of state. The second is a UNESCO equation of state based on potential temperature from Jackett and McDougall (JMCD [12]). The third is a polynomial fit to the full UNESCO equation of state. The advantage of the polynomial form is that it is faster; the disadvantage is that the polynomial is only valid over a specified temperature and salinity range and exceeding that range will have unpredictable results. This is a particular issue with the KPP vertical mixing scheme which often computes buoyancy by displacing water near the surface to deep water where the EOS range has been restricted. The last option is a linear eos which is supplied for use only in special situations where such an approximation is appropriate.

For the polynomial option, there are two methods for determining
the polynomial coefficients and these are determined by the value
of `state_file`. If this variable is defined as 'internal',
the code will determine the polynomial coefficients internally
based on the vertical grid. The internal routines currently use
hard-wired profiles for the limits of validity of the polynomial
eos; if the user wishes to change these limits, they can be changed
in an off-line coefficient generator (in the **tools/eos**
directory) and the coefficients can be read in from a file.
The value of `state_file` will be the name of the coefficient
input file. As mentioned above, the polynomial eos has a certain
temperature and salinity range over which the polynomial is valid.
The `state_range_opt` variable determines what to do if
these limits are exceeded during a simulation. The first option
is to simply 'ignore' when these occur; this is generally not as
bad as it sounds as the range is valid for nearly all normal cases.
The second option is to 'check' whether the range is exceeded and
print a warning if such problems are detected. The last option,
'enforce', simply makes sure the polynomial is evaluated within
the correct range without changing the values of T or S.
For example, if the temperature drops below -2C, the code will
compute a density based on a temperature of -2C without actually
changing the temperature. The `state_range_freq` can be
used to perform the checks infrequently to save computational
time.

&state_nml |
LANL default | CESM default | Valid values | equation of state approximation |

state_choice | 'mwjf' | 'mwjf' | 'mwjf', 'jmcd', 'polynomial', 'linear' | McDougall et al. eos or Jackett and McDougall eos or
polynomial fit to UNESCO eos or linear eos |

state_file | 'internal' | 'internal' | 'internal', filename (≤ 256 characters) | compute polynomial coefficients internally or
read from file filename |

state_range_opt | 'ignore' | 'enforce' | 'ignore', 'check', 'enforce' | ignore when T,S outside valid polynomial range
or check and report or compute eos as if T,S were
in valid range (but don't alter T,S) |

state_range_freq | 1 | 100000 | frequency (steps) for checking T,S range | |

/ |