Institute of Oceanography

University of Hamburg

 | search | contact | imprint
Deutsche version
Institute of Oceanography
University of Hamburg
Bundesstraße 53
D-20146 Hamburg
Tel.: +49 40 42838-2605 / -5449
Fax: +49 40 42838-7488
E-Mail:  waltraut.domke-sommer(at)zmaw.de

Subroutines

SUBROUTINES  OF  HAMSOM

 

4.1. EQUATIONS

 4.1.1. Subroutine estate       

 Subroutine estate computes density anomalies from actual anomalies of salt and temperature  by using the routine sigma(s,t,p). Possible instabilities will be removed by maximum vertical mixing.

 4.1.2. Subroutine moadv

 Calculation of the horizontal advection terms with j7 according to Arakawa and Lamb (1977)

 (equation of motion). Time discretisation according to Mesinger and Arakawa.                                 

 4.1.3. Subroutine motone

 a) solving all parts in the equation of motion which are defined for the old time level n

 b) vertical integration of U,V-results for the equation of motion.

 4.1.4. Subroutine mottwo

 Completes the solution of the eqns. of motion, solving the parts which are defined for time level n+1. Calculation of the vertical eddy viscosity coefficient.

 4.1.5. Subroutine knuity

 Computation of the vertical velocity by means of the equation of continuity of volume.        

 4.1.6. Subroutine solver

 Solves the equation of continuity with an  successive over-relaxation (S.O.R.) algorithm       combining the iterative procedure with a direct elimination step.

 4.1.7. Subroutine sorcof

 Prepares the coefficients for the S.O.R. algorithm.    

 4.1.8. Function sigma

 International unesco equation of state of sea water (1980).

 4.1.9. Subroutine tsavdi

 3-D advection plus vertical diffusion of temperature and salinity anomalies.                         

 4.1.10. Subroutine vecup

 Calculation of the horizontal advection terms with vector-upstream.

4.2. BOUNDARY  CONDITIONS

 4.2.1. Subroutine adjust

 Adjusting the open boundary sea surface elevation values to the density gradient to avoid alongside currents.

 4.2.2. Subroutine fluxes

  Calculates net-heat fluxes (optional).

 4.2.3. Subroutine mombnd

 Sets boundary conditions for momentum and eddy viscosity fields in boundary points. Orlanski computation of phase speed in boundary when kbrad=1.

 4.2.4. Subroutine obound

 Organises the boundary indexing.

 4.2.5. Subroutine selbnd

 Adds known open boundary values for sea surface elevation or cbou1() cbou2() coefficients to set new equations in order to consider boundary elevations as unknowns (absorbing boundary condition). Barotropic adjustment for open boundaries to avoid alongside currents due to boundary values of meteorological origen.

 4.2.6. Subroutine tsbnd

 Applies boundary conditions for salinity and temperature fields. Sets gradients normal to open  boundaries to zero (zero gradient boundary condition)
 

4.3.  INITIALIZATION OF VARIABLES

 4.3.1. Subroutine denref

 Calculates unperturbed structure of density reference.

 4.3.2. Subroutine timspc

 Computation of parameters depending on time and space discretization.

 4.3.3. Subroutine tide 

 Sets time increments for calculating open boundary sea surface elevations due to given phase and amplitude values for tidal constituents.

 4.3.4. Subroutine zeroal

 Sets all arrays at the very beginning equal to zero.

 4.4. CHECK

 4.4.1. Subroutine cntrol

 Checks parameter settings

 4.4.2. Subroutine conchk

 Mass balance check

 4.4.3. Subroutine plint                                                 

 Control print out of 2-dim arrays.

 4.5. INPUT

 4.5.1. Subroutine dcmpr2

 Two-dimensional de-compression of arrays which had been stored on a one dimensional field for saving storage.

 4.5.2. Subroutine dcmpr3

 Three-dimensional de-compression of arrays which had been stored on a one dimensional field for saving storage.

 4.5.3. Subroutine incntl

 Input of control parameters. Input of tidal amplitudes and phases. Input of constant open sea surface elevation values. Sets variables according to control parameters.

 4.5.4. Subroutine inwarm

 Reads backup file from previous model run if the simulation should continue (warm start).

 4.5.5. Subroutine tsinit

 Reads temperature and salinity data at the beginning (cold start).

 4.5.6. Subroutine winput

 Reads meteorological forcing.

 

4.6. OUTPUT

 4.6.1. Subroutine compr2

 Two-dimensional compression of arrays for storing the arrays on a one dimensional field.

 4.6.2. Subroutine compr3

 Three-dimensional compression of arrays for storing the arrays on a one dimensional field.

 4.6.3. Subroutine dmvsum

 Calculation of the sum for daily means and standard deviation of U, V, W and ZETA.

 4.6.4. Subroutine dmvts

 Calculation of the sum for daily means and standard deviation of temperature  and salinity.

 4.6.5. Subroutine dmvprod

 Calculation of the daily means and standard deviation  of U, V, W and ZETA.

 4.6.6. Subroutine dmvpts

 Calculation of the  daily means and standard deviation  of temperature and salinity.      

 4.6.7. Subroutine outcmp

 Performs model-output for HAMSOM  by using compression routines. Only wet grid-points are considered.

 4.6.8. Subroutine outspp

  Performs print out for data at special-points.

 4.6.9. Subroutine spcpnt

 Saves zeta-values at special points.

 5.  INPUT  AND  OUTPUT  FILES

5.1. Input - files: 

        -  include-file SOMINC (parameter and common block definition)

        10  setup - data                                       

        -  13  paramin - data                                     

        11  program-control-parameters                         

        -  12  special grid-points                                

        -  ntid  tidal components for open boundaries             

        -  ntid+1 constant open boundary sea surface values       

        -  nstra initial stratification                           

        -  nauf1   "warm-start-field"                             

        -  nwind meteorological forcing                           

        -  nheat heat radiation forcing                           

 5.2. Output - files:

        -  06  STD-output                                          

        -  55  special points --output                            

        -  nfutd   model results of tide to tape                  

        -  nfuts   model results of T--S to tape                  

        -  nauf2  "warm-start-field" for next model-run