The salinity equation (Source File: salinity.F90)


    subroutine salinity(nlev,dt,cnpar,nus,gams)

This subroutine computes the balance of salinity in the form

$\displaystyle \dot{S} = {\cal D}_S - \frac{1}{\tau^S_R}(S-S_{obs}) \; , \quad$ (30)

where $ \dot{S}$ denotes the material derivative of the salinity $ S$, and $ {\cal D}_S$ is the sum of the turbulent and viscous transport terms modelled according to

$\displaystyle {\cal D}_S = \dfrac{\partial}{\partial {z}} \left( \left( \nu^S_t...
...S \right) \dfrac{\partial {S}}{\partial {z}} - \tilde{\Gamma}_S \right) \quad .$ (31)

In this equation, $ \nu^S_t$ and $ \nu^S$ are the turbulent and molecular diffusivities of salinity, respectively, and $ \tilde{\Gamma}_S$ denotes the non-local flux of salinity, see section 4. In the current version of GOTM, we set $ \nu^S_t = \nu^\Theta_t$ for simplicity.

Horizontal advection is optionally included (see obs.nml) by means of prescribed horizontal gradients $ \partial_xS$ and $ \partial_yS$ and calculated horizontal mean velocities $ U$ and $ V$. Relaxation with the time scale $ \tau^S_R$ towards a precribed (changing in time) profile $ S_{obs}$ is possible.

Inner sources or sinks are not considered. The surface freshwater flux is given by means of the precipitation - evaporation data read in as $ P-E$ through the airsea.nml namelist:

$\displaystyle {\cal D}_S = S (P-E),$   at $\displaystyle z=\zeta,$ (32)

with $ P-E$ given as a velocity (note that $ {\cal D}_S$ is the flux in the direction of $ z$, and thus positive for a loss of salinity) . Diffusion is numerically treated implicitly, see equations (7)-(9). The tri-diagonal matrix is solved then by a simplified Gauss elimination. Vertical advection is included, and it must be non-conservative, which is ensured by setting the local variable adv_mode=0, see section 8.2.3 on page [*].


    use meanflow,     only: avmols
    use meanflow,     only: h,u,v,w,S,avh
    use observations, only: dsdx,dsdy,s_adv
    use observations, only: w_adv_discr,w_adv_method
    use observations, only: sprof,SRelaxTau
    use airsea,       only: precip,evap
    use util,         only: Dirichlet,Neumann
    use util,         only: oneSided,zeroDivergence
    number of vertical layers
    integer, intent(in)                 :: nlev
     time step (s)
    REALTYPE, intent(in)                :: dt
    numerical "implicitness" parameter
    REALTYPE, intent(in)                :: cnpar
    diffusivity of salinity (m^2/s)
    REALTYPE, intent(in)                :: nus(0:nlev)
    non-local salinity flux (psu m/s)
    REALTYPE, intent(in)                :: gams(0:nlev)
    Original author(s): Hans Burchard & Karsten Bolding
    $Log: salinity.F90,v $
    Revision 1.14  2008-04-09 11:56:31  kb
    GOTM/GETM concensus on signs for precip and evap - both positive into the ocean
    Revision 1.13  2008-03-07 17:57:49  hb
    AdvBcup changed to oneSided
    Revision 1.12  2007-12-07 10:12:20  kb
    replaced p_e with precip and included evap
    Revision 1.11  2007-01-06 11:49:15  kbk
    namelist file extension changed .inp --> .nml
    Revision 1.10  2006-11-06 13:36:45  hb
    Option for conservative vertical advection added to adv_center
    Revision 1.9  2005-11-17 09:58:20  hb
    explicit argument for positive definite variables in diff_center()
    Revision 1.8  2005/06/27 13:44:07  kbk
    modified + removed traling blanks
    Revision 1.7  2004/08/18 11:43:10  lars
    updated documentation
    Revision 1.6  2004/01/07 12:17:47  lars
    Removed latex bug
    Revision 1.5  2003/06/13 09:27:15  hb
    Implemented freshwater fluxes
    Revision 1.4  2003/03/28 09:20:35  kbk
    added new copyright to files
    Revision 1.3  2003/03/28 08:56:56  kbk
    removed tabs
    Revision 1.2  2003/03/10 08:50:07  gotm
    Improved documentation and cleaned up code
    Revision  2001/02/12 15:55:57  gotm
    initial import into CVS

Karsten Bolding 2012-01-24