next up previous
Next: tidmeanout.F Up: The Proudman Oceanographic Laboratory Previous: spm.F

Subsections


tidbndrp2.F


subroutine tideset

Description

This routine is called at the start of the run to read in boundary tidal elevation and current harmonic constituents. Nodal adjustments and equilibrium tide information are also optionally calculated.

Subroutine Arguments

none

Local variables

ncondno. of tidal constituents, read in from unit itidef
sigmamholding array for speeds of constituents
ampe,ahlove,akloveequilibrium tidal amplitudes and love numbers read in
alove,alat,along,amp,speed,phase,aused in calculating lat. and long. factors for equilibrium tide including Love numbers
i,ic,j,jc counters for loops
nobdUV,nobdZno. of boundary UV and Z points derived from grid dimensions l,m.
itide,itideflogical units 14, 43.
mcond =15, used as argument in calling UVSET
mcon array holding the constituent number or array of switches to select individual tidal constituents,NOTE reused in this routine.
indx which nodal correction (1..15) to use for each of ncond tidal constituents. =0 no nodal correction are used for this one (e.g. for residual)
arg phase, including nodal term, of constituent
atde,btdef*cos(arg), f*sin(arg) terms
timh time expressed in hours
z1t,z2t holding variables for initial elevations and U and V currents at each boundary point.
idate(4) hour, day, month, year at start of run read in.
nfac switch for imposition of nodal terms, read in.
ihs,iday,imnth,iyr =idate(1),idate(2),idate(3),idate(4)
ftc,vplu f and v+p nodal corrections -calculated for a fixed number of consituents (15)

Logical units

14 tidal constituent data at Z, UV boundary points, including equilibrium tide information subject to switch
43 control file including switch for nodal factors and starting date

Order of Things

  1. Allocate arrays
  2. Read in harmonic data (equilibrium tide data optional)
  3. Calculate nodal factors and phases (optional)
  4. Adjust constituents for nodal factors (optional)
  5. Compute latitude and longitude factors for equilibrium tide (optional)
  6. Switch off unwanted constituents by multiplying by zero using mcon

Calls

copy1d copy1di
copy2ds copy2dr
Exch3DIS Exch3DIR
gsynchwrk
uvset

Called By

b3dinit

Options - Logical

nfac >0 to invoke nodal corrections
lzbar true to read in and calculate equilibrium tidal factors

Options - Compiler

(none)

Known Issues


subroutine czbar

Description

This uses the information from tideset to calculate the instantaneous equilibrium tide

Subroutine Arguments

none

Local variables

ncondno. of tidal constituents
timh timestep expressed in hours
arg argument of time
sarg argument of time *speed of constituent
cost,sist cos and sin of sarg

Logical units

none

Order of Things

  1. Calculate the instantaneous contribution for each constituent at timestep timh
  2. Calculate the equilibrium tide due to each constituent and sum.

Calls

Called By

barot

Options - Logical

none

Options - Compiler

none

Known Issues

none


subroutine tidndrp3

Description

This uses information from tideset to form the instantaneous elevations and currents along the boundaries.

Subroutine Arguments

none

Local variables

ncondno. of tidal constituents
timh timestep expressed in hours
arg argument of time
sarg argument of time *speed of constituent
cost,sist cos and sin of sarg
z12,u12,v12 accumulator arrays for summing constituents

Logical units

none

Order of Things

  1. Calculate instantaneous argument of time
  2. Allocate summing arrays
  3. Calculate and sum z,u,v constituents
  4. Zero boundary holding arrays
  5. Allocate total z,u,v components to boundary holding arrays

Calls

Called By

barot

Options - Logical

none

Options - Compiler

none

Known Issues

none


subroutine uvset

Description

This derives the nodal factors and the appropriate phases to apply to the mean harmonic constants read in by tideset for the actual start time of the model run.

Subroutine Arguments

ihs,iday,imnth,iyrS tart time, day, month and year of run
sigo Speed of constituents in degrees per hour
f Nodal factor for amplitude of each constituent
vplu Phase of each contituent including nodal factor
incon Number of tidal constituents
mcon array of the constituent numbers

Local variables

year=iyr, year of required data
vd day number in year
ndc Number of constituents
u Nodal factor U for each constituent
v Phase of each constituent at 0h gmt on start day of run
zig speed of constituents in radians per hour
rtd Factor radians to degrees
ss,h,p,en,p1 Astronomical arguments returned from routine shpen

Logical units

none

Order of Things

  1. Calculate day number
  2. Allocate array of tidal contituent speeds
  3. Obtain astronomical arguments for date
  4. Calculate nodal amplitude and phase factors
  5. calculate phase of each constituent at start time
  6. Add nodal phase to start phase

Calls

vday
shpen
ufset
vset

Called By

tideset

Options - Logical

none

Options - Compiler

none

Known Issues

none


subroutine vday

Description

Calculates the day number within the year allowing for leap years and century years.

Subroutine Arguments

iday,imnth,iy,ivdyDay, month, year, day number within year

Local variables

ivdy Day number within year

Logical units

none

Order of Things

  1. Calculate day number allowing for leap years and century years

Calls

Called By

uvset

Options - Logical

none

Options - Compiler

(none)

Known Issues

none


subroutine shpen

Description

This calculates the astronomical arguments for the start of the model run to be supplied to routines ufset, vset and uvset.

Subroutine Arguments

year Year of run
vd Day number in year
s Mean longitude of Moon
h Mean longitude of Sun
p Mean longitude of lunar perigee
en Mean longitude of ascending node
p1 Mean longitude of solar perigee (perihelion)

Local variables

yr Year of run
ilc Indicator of leap years
icent Century count
it Switch if year greater or less than 2000
iday Correction for century days
ild Leap year day counter
ipos Indicates whether current date is positive or negative from time origin 0h 1st Jan 2000
nn Integer number of complete cycles of 360 degrees in s,h,p,en,p1 from time origin
iyd =365*yr
cycle =360
t =icent-20, reused as distance in time from time origin in centuries
td distance in time from time origin in days
delt Values of delta T in seconds for the first 84 years of the 20th century
delta Calculated delta T in seconds for given year and day
deltat Delta T correction included in appropriate formulae

Logical units

none

Order of Things

  1. Declare array of delta T for 20th century
  2. Calculate distance in time from time origin
  3. Calculate appropriate values of delta T from 3 different formulae depending on date
  4. calculate astronomical arguments from formulae
  5. Set arguments in range 0-360 degrees

Calls

Called By

uvset

Options - Logical

ipos Determines whether date before or after time origin 0h 1st Jan 2000

Options - Compiler

none

Known Issues

none


subroutine ufset

Description

This module calculates the nodal factors to apply to the tidal harmonic constants for the start of the run.

Subroutine Arguments

p Mean longitude of lunar perigee
cn Mean longitude of ascending node
b Nodal factor for phase
a Nodal factor for amplitude

Local variables

pw,nw p and cn expressed in radians
w1,w2,w3,w4.....w8 Combinations of trigonemtric functions of pw and nw
b Nodal factor for phase
a Nodal factor for amplitude

Logical units

none

Order of Things

  1. Calculate combinations of p and cn
  2. For each constituent calculate a and b
  3. where necessary set b to the range 0-360 degrees

Calls

Called By

uvset

Options - Logical

none

Options - Compiler

none

Known Issues

none


subroutine vset

Description

This calculates the tidal phases for each of the harmonic constants at 0000gmt on the start day of the run.

Subroutine Arguments

s Mean longitude of Moon
h Mean longitude of Sun
p Mean longitude of lunar perigee
en Mean longitude of ascending node
p1 Mean longitude of solar perigee (perihelion)
v phase of harmonic constant for 0h on start day of run

Local variables

nc Number of constituents, set at 15

Logical units

none

Order of Things

  1. Calculate v for each constituent from s,h,p,en,p1 directly
  2. Set v in the range 0-360 degrees

Calls

Called By

uvset

Options - Logical

none

Options - Compiler

none

Known Issues

None


subroutine tideset_longform

Description

This routine is called at the start of the run to read in boundary tidal elevation and current harmonic constituents. Nodal adjustments and equilibrium tide information are also optionally calculated.

Same a tideset, except old boundary condition format is used

Subroutine Arguments

none

Local variables

ncondno. of tidal constituents, read in from unit itidef
sigmamholding array for speeds of constituents
ampe,ahlove,akloveequilibrium tidal amplitudes and love numbers read in
alove,alat,along,amp,speed,phase,aused in calculating lat. and long. factors for equilibrium tide including Love numbers
i,ic,j,jc counters for loops
nobdUV,nobdZno. of boundary UV and Z points derived from grid dimensions l,m.
itide,itideflogical units 14, 43.
mcond =15, used as argument in calling UVSET
mcon array holding the constituent number or array of switches to select individual tidal constituents,NOTE reused in this routine.
indx which nodal correction (1..15) to use for each of ncond tidal constituents. =0 no nodal correction are used for this one (e.g. for residual)
arg phase, including nodal term, of constituent
atde,btdef*cos(arg), f*sin(arg) terms
timh time expressed in hours
z1t,z2t holding variables for initial elevations and U and V currents at each boundary point.
idate(4) hour, day, month, year at start of run read in.
nfac switch for imposition of nodal terms, read in.
ihs,iday,imnth,iyr =idate(1),idate(2),idate(3),idate(4)
ftc,vplu f and v+p nodal corrections -calculated for a fixed number of consituents (15)

Logical units

14 tidal constituent data at Z, UV boundary points, including equilibrium tide information subject to switch
43 control file including switch for nodal factors and starting date

Order of Things

  1. Allocate arrays
  2. Read in harmonic data (equilibrium tide data optional)
  3. Calculate nodal factors and phases (optional)
  4. Adjust constituents for nodal factors (optional)
  5. Compute latitude and longitude factors for equilibrium tide (optional)
  6. Switch off unwanted constituents by multiplying by zero using mcon

Calls

copy1d copy1di
copy2ds copy2dr
Exch3DIS Exch3DIR
gsynchwrk
uvset

Called By

b3dinit

Options - Logical

nfac >0 to invoke nodal corrections
lzbar true to read in and calculate equilibrium tidal factors

Options - Compiler

(none)


subroutine tidndrp3_longform

Description

This uses information from tideset to form the instantaneous elevations and currents along the boundaries.

Same a tidndrp3, except old boundary condition format is used

Subroutine Arguments

none

Local variables

ncondno. of tidal constituents
nobdUV,nobdZno. of boundary Uv and Z points derived from grid dimensions l,m.
timh timestep expressed in hours
arg argument of time
sarg argument of time *speed of constituent
cost,sist cos and sin of sarg
z12,u12,v12 accumulator arrays for summing constituents

Logical units

none

Order of Things

  1. Calculate instantaneous argument of time
  2. Allocate summing arrays
  3. Calculate and sum z,u,v constituents
  4. Zero boundary holding arrays
  5. Allocate total z,u,v components to boundary holding arrays

Calls

Called By

barot

Options - Logical

none

Options - Compiler

none

Known Issues

none

Known Issues


next up previous
Next: tidmeanout.F Up: The Proudman Oceanographic Laboratory Previous: spm.F
The AMMP Project 2005-04-20