Skip to content

Added the baroclinic vorticity as a new output for the derivatives casefile

Donovan Allum requested to merge dallum/SPINS_main:master into master

The goal for this change was to edit derivatives.cpp so that users can also calculate the baroclinic vorticity under the boussinesq approximation.

The following files were added:

  1. compute_baroclinic_vort.cpp: Calculates the magnitude of the baroclinic vorticity
  2. compute_baroclinic_vort_x.cpp: Calculates the x-component of the baroclinic vorticity
  3. compute_baroclinic_vort_y.cpp: Calculates the y-component of the baroclinic vorticity

The following files were edited:

  1. Science.hpp: Adding the new files above to this header file. Also added inline functions eqn_of_state_dT and eqn_of_state_dS to calculate the derivative of the equation of state with respect to temperature and salinity (The latter inline function was written but not used but could be required for future work).
  2. derivatives.cpp: Changed this casefile to calculate the magnitude and components of the baroclinic vorticity using the new files above for each output as defined in /cases/derivatives/spins.conf

Note: There is no z-component for the baroclinic vorticity assuming that gravity is limited to the z-direction.

Merge request reports