- subroutine pgrad
- Description
- Subroutine Arguments
- Local variables
- Global variables changed
- Logical units
- Order of Things
- Calls
- Called By
- Options - Logical
- Options - Compiler
- Known Issues

- subroutine pgrad_sigma
- Description
- Subroutine Arguments
- Local variables
- Global variables changed
- Logical units
- Order of Things
- Calls
- Called By
- Options - Logical
- Options - Compiler
- Known Issues

- subroutine pgrad_spline
- Description
- Subroutine Arguments
- Local variables
- Global variables changed
- Logical units
- Order of Things
- Calls
- Called By
- Options - Logical
- Options - Compiler
- Known Issues

- subroutine spline_fit(c,cpp)

pgrad.F

subroutine pgrad

**The pressure is written
**

(42) |

(43) |

**The pressure gradients along the edges of the plane are
**

(44) |

(45) |

**This technique allows a straightforward
treatment of cases where the sea bed lies above the plane at one or
more of the surrounding -points; if either of the corners on an edge
are below the sea bed then the corresponding pressure gradient takes the
last defined value above it. Alternatively these edges can be removed from the
calculation.
**

- none

**i,j,k, ip, jp, kp, ks**local indices**icg,jcg**global indices**i4**loop count**icliff, it**which points are below the sea bed /above the surface**inextp,jnextp(4), ipnt, jpnt, kpnt**direction of b-point from u-point**tagh,tagzet,tagb,tagdi**tags for exchanges**press**pressure contribution between -level and z-level.**di**pressure contribution at a -level**dp**pressure gradient along an edge**dp0**last non-zero pressure gradient along an edge**r**relative vertical coordinate within a grid cell**sigp zz**vertical position of the horizontal plane-
**first**.true. the first time the subroutine is called

**u v****kpgrad****b, pressure**

- none

- add pressure dependence to equation of state and iterate pressure (if used)
- set
**b**at sea surface and sea bed - integrate density on sigma levels
- calculate extra pressure between -level and z-level.
- calculate pressure difference along edges
- remember last non-zero difference
- update velocity

- bcalcP
- bcalc
- Exch3DS
- Exch3DR

- baroc

**compress**use compressibility in equation of state

**SCOORD**use horizontal varying vertical coordinates**NOTEVENSIG**-level are not evenly spaced

subroutine pgrad_sigma

- none

- none

- none

subroutine pgrad_spline

**In this case the pressure at
can be estimated to be
**

(46) |

**Apart from this, the subroutine is identical to
pgrad,
where a full description can be found.
**

- none

**i,j,k, ip, jp, kp, ks**local indices**icg,jcg**global indices**i4**loop count**icliff, it**which points are below the sea bed /above the surface**inextp,jnextp(4), ipnt, jpnt, kpnt**direction of b-point from u-point**tagh,tagzet,tagb,tagdi,tagbpp**tags for exchanges**press**pressure contribution between -level and z-level.**di**pressure contribution at a -level**Bpp**second deivative of b from spline calculation**dp**pressure gradient along an edge**dp0**last non-zero pressure gradient along an edge**r**relative vertical coordinate within a grid cell**sigp zz**vertical position of the horizontal plane-
**first**.true. the first time the subroutine is called

**u v****kpgrad****b, pressure**

- none

- add pressure dependence to equation of state and iterate pressure (if used)
- set
**b**at sea surface and sea bed - fitspline to b
- integrate density on sigma levels
- calculate extra pressure between -level and z-level.
- calculate pressure difference along edges
- remember last non-zero difference
- update velocity

- bcalcP
- bcalc
- Exch3DS
- Exch3DR

- baroc

**compress**use compressibility in equation of state

**SCOORD**use horizontal varying vertical coordinates**NOTEVENSIG**-level are not evenly spaced

subroutine spline_fit(c,cpp)

- none

- none

- none