,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy...

141
AD-A1O3 892 W 0000 HOLE OCEANOGRAPHIC INSTITUTION MA FIG 8/10 VAX-II PROGRAMS FOR COMPUTING AVAILABLE POTENTIAL ENERGY FROM C--ETC(U) AUG 81 N A BRAY N0001 4-76C-0197 UNCLASSIFIED WHOI-81-70 NL ,1/ ///I/I/// lll///l//l/l/u .E//II//I/II/I /I/II/II//I//u II/I/I///I///E EIII/II/III/// mIIuI///I///I/u

Transcript of ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy...

Page 1: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

AD-A1O3 892 W 0000 HOLE OCEANOGRAPHIC INSTITUTION MA FIG 8/10

VAX-II PROGRAMS FOR COMPUTING AVAILABLE POTENTIAL ENERGY FROM C--ETC(U)

AUG 81 N A BRAY N0001 4-76C-0197

UNCLASSIFIED WHOI-81-70 NL,1/ ///I/I///lll///l//l/l/u.E//II//I/II/I/I/II/II//I//uII/I/I///I///EEIII/II/III///mIIuI///I///I/u

Page 2: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

UNCLASSIFIED 8/81SECURITY CLASSIFICATION OF THIS PAGE (Wihon Date EleRted)

EPOT DOCUETATIO E READ INSTRUCTIONSBEFORE COMPLETING FORM

, LePoT MuiMRZ- 2. GOVT ACCESSION NO: 8. RECIPIENT'S CATALOG NUMBER

WHFOI-81-70 / -1

4. TITLE (and Subtitle) S. TYPE OF REPORT a PERIOD COVERED

U-11IROGRAMS FOR COMPUTING AVAILABLE Technl calf ENTAL ,NERGY FRO9rCTD DAT -9-

7. AUTHOR(s) N01-6C1971--. -. ...- , -A1=00q l#4 r76- i 7li

* e Nancy Amanda ray NO-00 ' 7- -OCE-77-19403

S. PERFORMING ORGANIZATION NAME AND ADDRESS 10. PROGRAM ELEMENT. PROJECT, TASKAREA A WORK UNIT NUMBERS

o! Woods Hole Oceanographic Institution * NR 083-400Woods Hole, Massachusetts 02543 ** NR 083-004

I. CONTROLLIG0 OFFICE NAME AND ADDRESS

NORDA/National Space Technology Laboratory Aua-i 1-811ESBay St. Louis, MS 39529 135 pages

14. MONITORINO-ENCY NAME & ADDRESS(iJ dilffren hoea Conftrolling Office) IS. SECURITY CLASS. (of t. report)

Unclassi fled4 IS&. DECL ASS IrICATION/ DOWNGRADING

SCHEDULE

iS. DISTRIBUTION STATEMENT (of this Report)

Approved for public release; distribution unlimited.

17. DISTRIBUTION STATEMENT (of tihe abstract nte wdh Block 20, It difletl free Report)

Is. SUPPLEMENTARY NOTES

This report should be cited as: Woods Hole Oceanog. Inst. Tech. Rept.WHOI-81-70.

It. KEY WORDS (Continue on reverse sid. In.oc .aa and Ident y Wbak ntumb.er)

1. Oceanic available potential energy2. Definitions of horizontal density surfaces3. Hydrographic data

0, A\TR ACT (Continue an reverse *#de if nelessir aid Ideniip by block 0be)

This report documents the W.H.O.I. VAX-ll programs used to calculateavailable potential energy and related quantities from CTD data using thetechnique described in Bray and Fofonoff (1981). The report includesexamples of how the programs may be used, as well as complete listingsof all the required FORTRAN files. ,,,

00 1473 colrioN OP 1 NOV os 8 OSOLETr UNCLASSIFIED 8/81SIN 0103-016-66011UNLSIED8B

O 4 0 UR*T CLASSIFICATION OF T"Il PAGE (ken De& Rat--- ( n nI

Page 3: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

-Accession ForNTIS GPA&IDTIC TABUnannounced WHOI-8-70Justification_OI -

Distribution/

Availability Codes

Avail and/or VAX-l1 PROGRAMS FOR COMPUTING AVAILABLEIst Special POTENTIAL ENERGY FROM CTD DATA

by

Nancy Amanda Bray

A

WOODS HOLE OCEANOGRAPHIC INSTITUTIONWoods Hole, Massachusetts 02543

August. 1981

TECHNICAL REPORT

Prepared for the Office of Naval Research under ContractsN00014-76-C-197; NR 083-400 and N00014-79-C-0071; NR 083-004 and by the National Science Foundation under GrantOCE-77-19403.

Reproduction in whole or in part is per'mit ted for any pur- ID o kpose of the United States Government. This report should F,.E-CT illbe cited as: Woods Hole Oceacog. Inst. Tech. Rept. WHOI-81-70. -

Approved for public release; distribution unlited.

Approved for Distribution:Dn Valentine Worthington, ChairmanDepartment of Physical Oceanography

Page 4: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

TABLE OF CONTENTS

Page

Abstract ......................................... 3

List of Tables .......................................... 4

List of Figures .......................................... 5

Introduction . ......................................... 6

1. General Structure of programs ........................ 7

2. POTEN Documentation ................................ 13

3. PEPLT Documentation ............................... 27

4. Modification of POTEN to accept data in other than

CTD78 disc format ................................ 51

Acknowledgements ........................................ 53

References .......................................... 54

Appendix A: Command files for generating standard output

from POTEN and PEPLT ...................... 55

Al ENERGY.COM ............................. 56

A2 POTEN.COM ............................... 67

A3 PEPLT.COM .............................. . 68

A4 TABLE.COM ............................... .. 69

A5 DYNHT.COM ...... ......................... .. 70

Appendix 8: Program Listings for POTEN ................. 71

B1 POTEN.DOC ............................... 72

B2 COMPOTEN.FOR .............................. 73

B3 IDXREC.DIM .......... ..................... 74

B4 POTEN.FOR ....................... 75

B5 PTENS.FOR ................................ 76

B6 COMPS.FOR ................. .............. 81

87 AVRCP.FOR ................................ 85

B8 DATA.FOR ................................ 91

89 POTENSUB.FOR ............. ...... 95

M ai,

Page 5: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

2

Page-Appendix C: Program Listings for PEPLT .......... 102

Cl PEPLS .DOC ..................... ....... 103

C 2 PEPLS3. DOC .................... ........ 104

C3 AVRGS.DOC ........................ 105

-. C4 COMPEPLT.FOR ............................... 106C5 PEPLT.FOR .............. . .. .. ............ 107

C6 PEPLS .FOR ............. ......... 108

-,C7 AVRGS.FOR..................0......... 110

C8 TABLE.FOR ........... .......... 118

C9 TDATA.FOR ............................ 121

CI10 PEPLTSUB .FOR ............................ 123

Page 6: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

t3

43Abstract

This report documents the W.H.O.I. VAX-11 programs used to

calculate available potential energy and related quantities from CTD data

using the technique described in Bray and Fofonoff (1981). The reportincludes examples of how the programs may be used, as well as complete

listings of all the required FORTRAN files.

.-

t,, ,nunniiil ~ I ,..

Page 7: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

4

List of Tables

Table Subject Page

1 FORTRAN and Object files... .................. 11

2 Accessory files.. .......................... 12

3 Example of a JSHP.PTN file ... 0...... 16

14 POTEN Data Output Variables ............ 18.

5 POTEN Parameters........................... 22

6 PEPLT Variables . . . . . . . .3

7 PEPLT:PEPLS Parameters .. *. . . . . 40

8 PEPLT:AVRGS Parameters...................... 4

,4

Page 8: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

5

List of Figures

Figure Title Page

1 POTEN Schematic ..................................... 8

2 PEPLT Schematic ..................................... 9

3 AVRGS Schematic ..................................... 10

4 Example plots from TABLE subroutine

-'a. Buoyancy frequency............................... 28

b. Vertical displacements ........................... 29

5 Example plot from ENERGY.COM - APE.................... 59

6 Example plot from ENERGY.COM - Rms displacement .... 60

7 - Salinity............... 61

8 - Potential temperature 62

9 - Buoyancy frequency .... 63

10 - Reference steric anomaly. 64

11 - a vs. S.................. 65

12 - deep e vs S.............. 66

Page 9: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

6

Introduction

This report describes the structure and usage of programs designed

for calculating and displaying available potential energy (APE),

adiabatically leveled steric surfaces, and related variables from a group

of CTD stations. For a general discussion of the technique it is

strongly recommended that the reader refer to Bray and Fofonoff (1981).

The programs have an inherent requirement that the input CTD data be an

even series in pressure, although the input pressure interval may be

specified. This report describes specifically the structure of the

programs as used on the W.H.O.I. VAX-11, with input data in the standard

CTD78 disc format (Millard, et al (1978)). Other input formats can be

accomodated through modification of the data input subroutine as

described in section 4.

The calculation and display are divided into separate programs.

POTential ENergy (POTEN) reads the input data, calculates the

adiabatically leveled reference steric field (see Bray and Fofonoff,

1981) and variables related to the leveled field. Potential Energy PLoT

(PEPLT) calculates variables derived from the leveled field variables and

displays POTEN output in the form of lists and plots.

This report is divided into four sections. The first, General

Structure, covers the non-FORTRAN aspects of the programs: file

structure, linkage and general usage. The second and third sections

contain detailed documentation for POTEN and PEPLT. The fourth section

describes modifications to the data read subroutine in POTEN, to allow

*input data in other than CTD78 disc format. Documented examples of how

to run the programs interactively and in batch mode on the VAX-l1 are

found in Appendix A. Listings of programs appear in Appendices B and C.

il |

Page 10: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

7

1. General Structure of Programs

Both POTEN and PEPLT are accessed through a short main program

which performs initializations of parameters as requested by the user.

Control is then transferred to one of three major subroutines, from which

point the user is free to access different branches within that

subroutine, or request entrance into either of the other two major

subroutines. The various branches are described in detail in thefollowing sections. Schematics of POTEN and PEPLT are shown in Figures

1, 2 and 3. The remainder of POTEN and PEPLT consist of secondary

subroutines: data read, physical properties of seawater, etc., which are

* accessed as part of the various branches available to the user in the

major subroutines. The file structure reflects the program structure

(Table 1). POTEN and PEPLT are linked by linking the object files in

Table 1. Accessory files are listed in Table 2.

The input data in CTD78 disc format is accessed using subroutines

from CTOATA/LIB, and the plots in PEPLT are created using the NCAR plot

package. The plot package creates a file on logical unit 8 which must be

read and translated into plot(s) by a Metacode translator. Those

translators are available both for the high speed Calcomp plotter and for

* various screens, for plot previewing. The absolute plot dimensions may

be altered after the file is created, and the plots can be plotted as

many times as desired. The use of the translators is described at the

end of section 3.

The multiple branch structure of the programs provides an extremely

powerful and flexible framework for computations which are often not

routine; however useful documentation of such programs is correpondingly

difficult. It is suggested that the new user begin by studying Figs. 1.,

2 and 3. A documented command file (ENERGY.COM) for a routine

computation and display is found in Appendix A. This file allows the new

user to become familiar gradually with the options available in the

programs. After studying and experimenting with the command file, the

user may wish to explore other options available by referring to the

detailed branch descriptions found in sections 2 and 3 of this report.

C

Page 11: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

>., - -

4 U-(

V) --m

0 4 0 0 z (nW- LcJ z ,-

Z (D LL Z0- I- .4 x ow

2~~ D - U

wn Cjo D owY co2 ccr <.U

w > V W0

o -j 4

D w

1.- 00 (A

(4-)

2A N

u (f o

L )- w -4-- - - - - - -o 0)

a- -C

z w

z (D-U)i

W a p < U)

0' C"

w

-c -4 4t - - q.s. -a

Page 12: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

0 co w -

0

Ur ) 0u - Lu,

CD 0

fl 0 0 ZUzU z- a

0' V) n- U7:3z Z o0. 5U- . (n <4a

VTz I- i-D I

-i LUuj a-

-J Z<

U) 4a

V0.c-c

LnC)L/

0 _-a:<-ic LU

w 0

a- M

w I0

0L CLLcJ

0 F-

LLU>-rp (n 4 z w-

Page 13: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

10

LI

L) U- L) W

Z ) 0 0

i) c

LO) 0 0 z i

W > - LA4 P- C L

a; S

LAJLJJ~L- lIz~ - a

0~ 0) -O

*z -I

ClLa..

4~

Page 14: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

11

TABLE 1: FORTRAN and Object Files

POTEN Files PEPLT Files

Main program POTEN PEPLT

I

Major subroutines PTENS PEPLS

COMPS AVRGS

AVRCP TABLE

Data read subroutine DATA TDATA

Secondary subroutines POTENSUB PEPLTSUB

POTENSUB

Library subroutines CTDATA/LIB

System subroutines (associated AUTOGRAPH

with the NCAR plot package) DASHCHAR

NCAR

-!t

Page 15: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

12

TABLE 2

Accessory Files POTEN PEPLT

Comnon, dimension and equivalence

required for compilation (FORTRAN) COMPOTEN.FOR COMPEPLT.FOR

Station lists (JSHP.PTN is

generated by COMPS -- unit 12) JSHP.PTN JSHP.PTNInput data *.CTD *.AVG

*.CTD is CTD file *.REG

*.REG is generated by COMPS

*.AVG is generated by AVRCP

* is the station identifier

Common storage (binary file) KPTCM.DAT KPLCM.OAT

POTEN and PEPLT generate these

if they do not exist in the

directory

Documentation files (formatted) POTEN.DOC PEPLS.DOCPEPLS3.DOC

AVRGS.DOC

Command file used to set up POTEN.COM PEPLT.COM

assignments and start an

interactive job

Command file used to run POTEN and ENERGY.COM

PEPLT sequentially in batch mode,

supplying standard output.

Command file to create plots shown TABLE.COM

in Fig. 4 using TABLE subroutine.

Command file to compute dynamic DYNHT.COM

height station by station and

output in map format.

i3

S '

Page 16: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

13

2. Documentation of POTEN

In this section, the major subroutines in POTEN described above are

documented in detail. They are all structured around the multiple GO TO

statement of the form

GO TO (#1, #2, #3, .... n) BRANCH

with #1 through #n FORTRAN statement numbers, and the BRANCH # an index

such that BRANCH # = n transfers control to Statement #n. The BRANCH

is input by the user following an appropriate program prompt. The branch

numbers are keyed to various computations which may be accessed at the

user's option. The keys are listed later in this section, and short

* versions of them may be obtained on the terminal any time the program

prompts the user for branch number input, by typing 0/.Within each branch there may be options which are accessible by

varying parameters input by the user at the time the branch number is

input. These options are also listed in the branch keys.

In addition to input parameter options, there is an array called

ISSW with 16 elements found in both programs. Within the different

branches, different elements of ISSW may be tested for values of -1 or 0,

and options either accessed or skipped depending upon the value. In

general, ISSW elements determine whether a given type of output is

generated. (Historically, the ISSW array derives from the binary

switches available on the shipboard computer, the HP2100 series.) The

elements of ISSW may be altered by accessing the appropriate branch in

both POTEN and PEPLT as described below.As described earlier, POTEN is accessed as a short main program

which initializes parameters if requested by the user, or reads from a

binary file KPTCM.DAT the most recently stored parameters, if no

initialization is requested. The main program POTEN then transfers

control to the major subroutine PTENS which, as shown in the schematicFig. 1, controls the various branches available to the user. PTENS is

the only component of POTEN in which branches may be accessed. The two

remaining major subroutines are COMPS, in which the regressions are

performed, and AVRCP, in which the horizontal averaging is performed.

ri

Page 17: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

14

This subsection charts the branches available to the user in

detail, and describes briefly the working of COMPS and AVRCP. Short

versions of the branch documentation are found in the Appendix, and may

also be printed on the screen while the program is (interactively) on

line by typing 0/ whenever the program prompts for branch input.

2a. Main Program:

The main program queries the user 'Initialize conmon (YES or

NO)?'. A NO response causes the present elements of KPTCM.DAT, the

binary storage file, to be read into common. (If no file KPTCM.DAT

exists in the directory, the program will create a new file named

KPTCM.DAT, but if the response to the initialization query was NO, an

'end of file during read' error will result. Therefore, the proper

sequence of commands to create a new KPTCM.DAT file is to run POTEN,

respond YES to the initialization, thereby creating a new KPTCM.DAT, but

not attempting to read from it. Later in the program (in branch 3)

common may be stored to the newly created file, for use next time the

program is run.) A YES response initializes the data selection

parameters (subroutine DATA), and certain other parameters not related to

the regressions.

Following this query, control is transferred to PTENS, and the user

is asked: 'Initialize regression parameters (YES or NO)?'. A YES

response initializes the regression parameters. A NO response reads them

from KPTCM.DAT. (Again, with a newly created KPTCM.DAT file, the correct

.I response is YES.) Finally, PTENS asks for the resolution of the input

data, before going to branch mode. At this point the user may input up

to 7 variables, as listed in the program prompt. The current values of

the variables are printed on the screen along with the prompt list. The

variables are: KBR, the branch number; ISW and JSW, which may access

different options in branch KBR; KLIST, usually the list output logical

device number (reset to 6 each time the prompt is printed); KOUT and KTP,

the data output and input logical device numbers (note that the program

uses named files for data input and output via OPEN statements which use

4.

Page 18: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

15

KTP and KOUT as unit numbers ); KIN, the program input device for screen

or command file. (Changing the value of KIN to 6 part way through a COM

file transfers control to the screen, allowing interactive mode -- see

Appendix A for an example command file, POTEN.COM.)

2b. Branches (KBR)

0: Short documentation printed on screen. See Appendix B for a

listing of this documentation.

SUMMARY - POTEN:PTENS: KBR = 0

Function: List on terminal the short documentation for PTENS

ISW, JSW options: None

Output device: unit KTTX

Input device: None

ISSW options: None

1: Calls COMPS subroutine, which performs the following sequence:

a. Calls subroutine DATA, which opens the subindex directory

for the default file specifications of the input data. (Those

specifications may be changed by calling KBR = 13, which is

identical to branch 1 except for allowing file specifications to

be changed.) Then the header for the ISWth sequential station

in that subindex file is examined to see if it meets data

selection criteria. If so, a file name is written to file

corresponding to logical unit 12. Throughout this report that

file is called JSHP.PTN; an example is given in Table 3. The

temperature and salinity data are transferred to array DATAX,

using Millard subroutine GETDAT. Pressure is stored in the

zeroth element of DATAX, which is equivalenced to array

PRESS. PRESS is used throught COMPS and AVRCP. The total

number of scans (NTOT) is also noted. The above occurs in

subroutine DATA, after which control returns to COMPS.

b. COMPS then sets up the regression for the first interval

using parameters which may be changed using branch 3 and

continues the computation through all the intervals requested,

Page 19: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

16

TABLE 3

Example of a JSHP.PTN file generated by COMPS

Consec. Station I.D. Weight

Number

1 GY001002 1.0

2 GY001003 1.0

3 GY001004 1.0

Page 20: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

17

or until the end of the data (determined by NTOT) is reached.

For each interval potential temperature and steric anomaly

referred to pf (the level pressure) are calculated for each

data scan to be used in the regression. Potential temperature

is calculated according to Fofonoff (1977), using the polynomial

formula of Bryden (1973) for the adiabatic temperature

gradient. Steric anomaly 6 is calculated as:

6 = 105 x (a(p,e(p,TS,pf), 6) - a(p,0,35))

with a the specific volume calculated according to the SCOR

Working Group 51 new equation of state for seawater (Millero, et

al, 1980), for which an algorithm is given by Fofonoff (1981).

Within each interval an editing process occurs in which points

exceeding three standard deviations of the regression estimate

at a given steric anomaly are flagged. Temperature and saliity

are then regressed against pressure over the interval. Any

points in T or S which exceed three standard deviations are

replaced by the regression estimate. The regression of steric

anomaly is performed again and rechecked. The number of

standard deviations for both tests may be changed -- see

KBR = 3. The interpolated scans are printed out on unit KLIST

and data scans which are flagged but not interpolated are also

listed as such on KLIST if ISSW (3) is set to -1. (ISSW values

may be changed using branch 5.) Pressure p and potential

temperature e (referred to the level pressure pf) are

regressed against steric volume anomaly (also referred to

Pf) and the coefficients for both p and a are stored in

arrays CP and CT for each interval. Data output occurs if

ISSW (13) = -1, and is written into a file with the name *.REG,

where * identifies the station, a two character (alpha) ship

name, a 3 digit cruise number and a 3 digit station number. The

format of the ouput file is a header of 150 words equivalenced

to an 1*4 array followed by a variable number of data records

(each 46 words, also an 1*4 array), one record per level

- A

Page 21: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

18

TABLE 4

POTEN Data Output Variables

HEADER RECORD: 150 WORDS

VARIABLE

NAME DESCRIPTION

LTYPE Identifies record as header record (LTYPE = 1)

MHDR Number of elements in header

ICON Sequential number of station (in POTEN calculation)

ISHP Ship name (A2 format)KCAST Station number

IDAY Julian year day

IPR First pressure

LPR Last pressure

XLAT Latitude of station

XLONG Longitude of station

WGT Weight

XLTt Latitude of origin for distance computations in

kilometers (negative for south latitude)

XLGY Longitude of origin (negative for west)

LBBL(3) Short station label (3A4 formt)

LBL(13) Run identification label (13A4 format)NSC(60) Regression parameters see text

NPR(60) Regression parameters

NSECTION Number of sections in the water column

DATA RECORD: 46 WORDS

KTYPE Identifies record as data record (KTYPE 0)

MBUF Number of elements in data record

IREC Level number

N Polynomial orderNDP Number of data scans used in regression

KSW Not used

, i . . . . -- i j • . I

Page 22: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

i,

19

TABLE 4 (continued)

NAME DESCRIPTION

Li Not used

L2 Not used

PF Level pressure

TO,SO,DVO Temperature, salinity and steric anomaly from input

data, averaged about PF * POIFF (see branch 3

description and Table 5)

PI Pressure of the reference steric anomaly (DVF) in the

.1 unleveled or initial field

THF Local potential temperature (referred to PF) as

estimated by the regressions: ef(Pf)

DVI Steric anomaly corresponding to PF in the initial field

DVF Steric anomaly corresponding to PF in the leveled field

PM,THM,SM,DVM Average of pressure, potential temperature, salinity

and steric anomaly over the regression interval.

DH d6/dp based on the averaged regression coefficients

PE Potential energy anomaly } Recommended that

XPE Horizontally average PE these not be used,

but calculated in

PEPLT

CP(8) Pressure vs. steric anomaly coefficients

Zi Standard deviation of regression pressure estimate

(Fofonoff and Bryden, 1975)

CT(8) Potential temperature vs. steric anomaly regression

coefficients

Z2 Standard deviation of regression temperature estimate

F1,F2,F3 Steric volume minimum, maximum and average over

regression interval

XLTO: Latitude of origin: default is 40.0

XLGO: Longitude of origin: default is -70.0

Page 23: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

20

Pf. The output is in binary (unformatted) files. The variables

output are identified in Table 4. Some information at each level may

be output to unit KLIST if ISSW (12) = -1, for purposes of checking.

Header information is ouput to unit KLIST if ISSW (11) = -1. The

input data scans are output to unit KLIST if ISSW (5) = -1 and the

regression coefficients and residuals are output to unit KLIST if

ISSW (10) = -1. If ISSW (6) = -1 statistics of the coefficients are

printed on unit KLIST. The ratio of each coefficient to its standard

deviation (see Fofonoff and Bryden, 1975, Appendix) is computed. For

an infinite number of degrees of freedom, at 95% confidence that

ratio should equal or exceed 1.96. The statistic which is listed is

(ai the coefficients):

a.

std dev (ai)

When stations with subindex reference number (sequential number)

ISW through JSW have been tested for data selection criteria and

either been skipped or have gone through the regression

calculation, COMPS returns control to PTENS.

SUMMARY - POTEN:PTENS: KBR = 1

Function: calls COMPS subroutine

ISW, JSW Options: lSW to JSW are the station reference numbersOutput device: data goes automatically to *.REG file if

ISSW (13) = -1; other information output goes

a~q to unit KLIST, as requested by elements of ISSWISSW options: 3 = -1 Print out interpolated scans

(to unit KLIST) 5 = -1 Print out input data scans

6 = -1 Print out coefficient statistics

10 = -1 Print out regression coefficients for

each scan

11 = -1 Print out header information

12 = -1 Print out selected data following

regression

Page 24: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

21

13 = -1 Data output to *.REG

2: Initializes data selection parameters described in Table 5

SUMMARY - POTEN:PTENS: KBR = 2

Function: Initialize data selection parameters

ISW, JSW Options: None

Output device: None

ISSW Options: None

3: Changes or lists regression and data selection parameters

described in Table 5. The data selection parameters are

straightforward. For the regression parameters the water column

is divided into a maximum of nine sections, each of which may

have a number of levels whose regression parameters are the

same. The regression parameters consist of the total number of

sections; in each section, the interval between leveled surfaces,

the interval over which the regression is performed, the

polynomial order, and start and end pressures for the section.

All of these parameters are input using subroutine PARAM, which

branch 3 calls. The prompts are (hopefully) self-explanatory.

After parameters have been entered for all sections, PARAM

translates them into internal parameters which control the way

the program performs the regressions. These internal parameters

are stored in arrays NPR and NSC. Since the arrays NPR and NSC

are included in common stored to KPTCM.DAT, the user form

parameters need be entered only once, until a change is

required. The old parameters may be retrieved by responding 'NO'

to the initial query in PTENS 'Initialize regression

parameters?'. Stored common is written to KPTCM.DAT at the end

of branch 3, so any changes in regression parameters will

overwrite the most recent ones in KPTCM.DAT, provided branch 3 is

completed. It is not possible to change only a single regression

parameter; if a change is required, all the parameters must be

re-entered. (This is because the internal parameters NPR and NSC

have elements whose value depends upon parameters for more than

. ti-

Page 25: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

22

TABLE 5

POTEN Parameters: Branch KBR = 3

Parameter Definition Default if Initialized

ICON Consecutive number 1 for first station.

Increments with stationsprocessed

KSW Not used Ij A2 Number of standard deviations 3.

allowed for a regression point

in p(s) before flagging.

A3 Numbe- of standard deviations 3.

allowed for a regression point

in T(p) and S(p) before

interpolation

WGT Weight 1.

POIFF Interval (db) about Pf for 6.

averaging TO,SO,Pb

DELP Pressure series interval for 2.

input CTD data (db)

REGRESSION Parameters -- as described in program prompts

SData selection parameters: windows such that data inside all windows is

accessed; all other data skipped

IDAYl : Minimum Julian year day 0

IDAY2 : Maximum Julian year day 365

J00 : Additive constant to actual day 0XEMN : Minimum longitude -180.0

XEMX : Maximum longitude 180.0

XMN : Minimum longitude - 90.0XNMX : Maximum latitude 90.0

Page 26: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

23

one section. PARAM requires that parameters be input

sequentially.) It is not necessary to understand how NPR and NSC

work in order to run the program (that is the purpose of the

PARAM subroutine); however, modifications of the program may

require that the programmer know how these arrays function. A

brief description is therefore presented here. The pressure

Pf for each level is given by:

For IREC less than NPR(section #)4PF = NPR(section # + total number of sections) x

(IREC - NPR(section # + 2 x total number of sections))

NPR (section # + total number of sections) contains the

interval between pressure levels; NPR(section # + 2 x total

* number of sections) contains an index which allows the correct

Pf to be determined, while NPR(section # ) contains the level

number at which the section commences. Some care should be taken

to assure that the parameters input are consistent.

Specifically, the first level of a new section must have apressure pf such that pf is some integral multiple of the

pressure interval between leveled surfaces in that section. The

use of the total number of sections allows the program to treat

NPR as a variable length two-dimensional array, even though it is

in fact singly dimensioned. Subroutine PARAM adds an additional

*. 'dummy' section below those input by the user to assure that

COMPS does not continue below the desired depth. Thus, the total

-I number of sections (NSECTION) will always be one greater than the

number input by the user.

Array NSC contains the remainder of the parameters: start

pressure in NSC(section# ), polynomial order in NSC(NSECTION +

section #), number of data scans in the regression interval in

NSC(2*NSECTION + section #).SUMMARY - POTEN:PTENS: KBR = 3

Function: Change or list regression and data selection parameters

ISW, JSW Options: ISW = 0: short list only

4_ ! ! II I i '- - . . .

Page 27: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

24

ISW = 1: full list

JSW: no options

Input device: unit KIN

Output device: unit KLIST

ISSW Options: None

4: Call AVRCP - averaging subroutine. The pressure and potential

temperature coefficients from the regressions performed in COMPS

are averaged horizontally, level by level. The average pressure

polynomial at each pf is set equal to pf

(corresponding to a mass conservation constraint between the

ii initial and leveled fields) and the resultant polynomial is

inverted to obtain the reference steric anomaly (6f)

corresponding to that pf. (See Bray and Fofonoff, 1981 for

a more detailed discussion.)

The averaging is actually done in two 'passes' through the

data, but a single call to AVRCP with ISSW(7) = 0 will

automatically average and output new station data files based on

the leveled field. (Data ouput occurs if ISSW(13) = -1, as in

COMPS. The new files are called *.AVG with * as before the

station identifier.) Information about the averaged pressure

coefficients is output to unit KLIST if ISSW(12) = -1.

Information about the averaged steric field is output to unit

KLIST if ISSW(11) = -1.

The two averaging 'passes' may be accessed individually, and

separately from the data ouput by setting ISSW(7) = -1 and

entering KBR = 4, ISW = I for the first pass, KBR = 4, ISW = 2

for the second pass and KBR = 4, ISW - 3 to output the new

station data files. However, since the second pass must be

performed directly after the first, and the output directly after

the averaging it is recommended that the automatic access be used

(ISSW(7) = 0). If no output is desired, ISSW(13) should be set

to 0.

SUMMARY - POTEN:PTENS: KBR = 4

Function: Call AVRCP averaging subroutine

Page 28: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

25

ISW, JSW options: If ISSW(7) -1 ISW = 1: First averaging pass

ISW = 2: Second averaging pass

ISW = 3: Output of data to

*.AVG files if

ISSW(13) -1

If ISSW(7) = 0: ISW = 1: Averaging and output

performed

automatically.Input files: *.REG

Output files, data: '.AVG

Output files, lists: unit KLIST

ISSW Options: ISSW(7) = -1: individual access of averaging passes

ISSW(11) = -1: List of averaged steric field on

unit KLIST

ISSW(12) = -1: List of averaged pressure

coefficients on unit KLIST

ISSW(13) = -1: Leveled field based data output to*.AVG files

5: Not used

6: Print data label. This label is input by the user in branch 3,

and is carried in both the *.REG and *.AVG files as an identifier

of the group of stations, the version of the POTEN run, etc. Its

format is 13 A4 or a total of 52 characters. Branch 6 lists this

label to unit KLIST.

SUMMARY - POTEN:PTENS: KBR = 6

Function: Write data label

ISW, JSW options: None

Output device: unit KLIST

ISSW options: None

7: Not used

8: Write header record to unit KLIST: Station label, position,

origin, LTYPE, MHDR, ICON, ISHP, ICAST, JDAY, IPR, LPR. This is

also done automatically in subroutine DATA when COMPS accesses the

station, provided ISSW(11) - -1.

,r - -- .~ . - - - - - - - ___________________________

Page 29: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

26

SUMMARY - POTEN:PTENS: KBR = 8

Function: Write station header information

ISW, JSW options: None

Output device: unit KLIST

ISSW options: None

9: Write *.REG or *.AVG single data record to unit KLIST. Of

doubtful usefulness, this branch was part of the original program.

SUMMARY - POTEN:PTENS: KBR = 9

Function: Write single output data record to unit KLIST

ISW, JSW options: None

Output device: unit KLIST

* ISSW options: None

10: Not used

11: Set the values of the ISSW array. One call allows up to 16

inputs. Each input consists of element number followed by a comma

and the value to assign to that element. Whenever input is

complete, if less than 16, the branch may be terminated with a I.

SUMMARY - POTEN:PTENS: KBR = 11

Function: Set ISSW array

ISW, JSW options: None

Output device: unit KTTX

Input device: unit KIN

ISSW options: None

12: Exit program. Program queries 'Exit program . A YES responseresults in a FORTRAN stop statement execution. A NO response

returns the PTENS branch prompt.

SUMMARY - POTEN:PTENS: KBR = 12

Function: Exit program

Input device: unit KIN

If a value of KBR greater than 12 or less than 0 is entered, the short

documentaton is printed on the screen.

* *I II *F'I~~ I r" I- ' -

Page 30: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

27

3. PEPLT Documentation

Like POTEN, PEPLT is accessed through a short main program, which

"j initializes parameters as requested by the user, and then transfers

control to a major subroutine, PEPLS. From PEPLS, the user may call

subroutine TABLE, which plots and lists station by station, and

subroutine AVRGS which computes and displays horizontally averaged

quantities as a function of depth. Subroutine AVRGS has its own set of

internal branches, one of which returns program control to PEPLS.

Subroutine TABLE has no internal branches. As in POTEN, short

documentation can be displayed on the screen while the program is running1interactively, by typing f/ as a response to branch prompts in eitheri PEPLS or AVRGS.

' i3a. Main Program: PEPLT

The main program queries 'Load in previously stored common?'. A

YES response causes the elements of the binary array KPLCM.DAT to be read

into common, beginning with the common element KTTX. a 'NO' response

causes no action by the program. Control is then transferred to

subroutine PEPLS.

3b. Branches - PEPLT

1: Calls subroutine TABLE. TABLE plots and lists station by

station. It also outputs requested information in a format

appropriate as input to objective mapping programs. The plot

section of TABLE is designed to permit a number of stations to be

plotted on the same frame, with the origin of each station within

the larger frame. Examples are shown in Fig. 4. In Fig. 4a the

buoyancy frequency N is plotted as a function of geographical

position (relative to an origin at 37°N, 69.65°W), the

coordinates of the frame; and, for each station, as a function of

depth, where the station axes represent 0 to 3000 db vertically

and -3 to 3 cph horizontally. This is accomplished by scaling

the buoyancy frequency, and adding it to the X-coordinate (in

Page 31: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

28

LDE FS5 N,CPH-30 -

-40

-50 f~-60

~-70I

-80ft f t-90

-100 I-110 -100 -90 -80 -70 -60 -50 -40

KMI EAST OF ORIGIN

Figure 4: Example plots from TABLE.COM

4a. Buoyancy Frequency, N in cph. Inset axes represent *3 cph

(horizontal), 0 to 3000 db in pressure (vertical). The origin on the

inset axes (0,0) represents the station location.

Page 32: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

29

a

LOE FS5 VERTICAL DISPLACEMENTS. DB-30

-40

~-50-60

2.,

:. -90

-1001-110 -100 -90 -80 -70 -60 -50 -40

KH EAST F MIGIN

4b. Vertical displacement w in db. Inset axes represent *100 db(horizontal) and 0 to 3000 db (vertical).

Page 33: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

30

this example, kilometers east of the origin) and scaling the

pressure and subtracting from the Y-coordinate (here km north of

the origin). The program allows up to four variables to be

included in such a sum for X and Y. The length of the station

axes are determined by the variables X2DIM and Y2DIM, which are

input in user units (i.e. cph in Fig. 4a) for the variables being

plotted. In the example, Y2DIM is 3000 (db) and X2DIM is

3 (cph). One frame is created for each call to TABLE; it will

encompass ND station plots. The plot parameters may be

initialized by calling TABLE (KBR = 1) with ISW > 2. Control

then returns to PEPLS. Plot parameters may be changed by calling

TABLE with ISW = 1. Control again returns to PEPLS. Plotting

commences only when TABLE is called with ISW = 0. Figure 4b is

the same type of plot as 4a, with vertical displacements plotted

instead of N. Both of these plots were created using the

documented command file TABLE.COM found in Appendix A.

A number of variables relating to the leveled field, the inital

field, and the location, and time of each station may be examined

using PEPLT. A list of these variables is found in Table 6; they

are computed in function subroutine VRBL, coded by number. Thus

a call to VRBL (3) returns the latitude of the station being

examined (variable XLAT). Subroutine TABLE plots the following

for x and y:

x = AI*VRBL(NX1) + A2*VRBL(NX2) + A3*VRBL(NX3)

+ A4*C(IREC,I)

y = BI*VRBL(NYl) + 82*VRBL(NY2) + 83*VRBL(NY3)+ 84*C(IREC,2)

Here C(IREC,n) refers to an array which may be filled using AVRGS

subroutine (see branch 4). Al to A4, BI to B4, NXl to NX3, and

NYl to NY3 may be changed by accessing branch 3. The default

values (initialized by KBR = 1, ISW = 2) are:

S,.

Page 34: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

31

TABLE 6 -- PEPLT Variables(Nomenclature follows that of Bray and Fofonoff, 1981)

VARIABLE NAME or UNITS DESCRIPTION

NUMBER SYMBOL

-1 None Returns the number 1 (counts

number of observations at

4 each level).

- 0 None Returns

1 XPL km Zonal distance from origin

-t (XLTO,XLGO)

2 YPL km Meridional distance from

origin

3 XLAT degrees Signed decimal latitude

(south negative)4 XLONG degrees Signed decimal longitude

(west negative)

5 ICON None Consecutive station number in

POTEN computation

6 WGT None Averaging weight

7 JDAY days Julian year day

8 ISHP None Ship code

9 ICAST None Station number

10 N None Polynomial order

11 NDP None Number of data scans in

regression interval

12 PF db Level pressure

13 TO 0C T, S, 6 averaged over the

14 so ppt ) interval PF * POIFF

15 DVO 10- 5 cm3 .gm

16 PI db Pressure of reference steric

anomaly (af) in the

initial field

Page 35: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

32

TABLE 6 (Continued)

VARIABLE NAME or UNITS DESCRIPTION

NUMBER SYMBOL

17 THF 0C Local potential temperature

referred to PF. (See 65.)

18 OVl lO-5cm3.gm-1 Initial steric anomaly 6i

on PF19 DVF 5cm3 .gm-1 Reference steric anomaly (6f)

on PF

20 PM db ) Pressure, local e, salinity

21 THM 0 ( and steric anomaly referred to

22 SM ppt ) Pf averaged over

23 DVM 10-5 cm3gm -1 regression interval

24 *-5cm3"gm- db-1 d6/dp based on averaged[.; regression coefficients

25 x Potential energy anomaly

calculated by POTEN

26 APE APE calculated by POTEN

27 to 34 CP(1) to CP(8) (db)-i Regression coefficients for

pressure

35 Zi db Standard deviation of

pressure regression estimate

36 to 43 CT(1) to CP(8) (C) -i Regression coefficients for

local potential temperature

44 Z2 0C Standard deviation of local

potential temperature

regression estimate

46,47,48 F1,F2,F3 10-cm3.gm- Minimum, maximum and average

values of steric anomaly over

regression interval

Page 36: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

33

TABLE 6 (Continued)

VARIABLE NAME or UNITS DESCRIPTION

NUMBER SYMBOL

48 * db 'Boussinesq' displacements:

w* =-(6 - d

49 PI* db + PF

50 it db Displacement of initial field

from reference field PI-PF.

Positive implies downward.

51 46 10-5cm3.gm-1 6i - 6f

52 Vortex stretching db PIX

SAPE 1 'Boussinesq' APE with true

displacements1 a *2

54 gPFAD - PEAPE8 1

55 g Boussinesq APE with

Boussinesq displacements-g p .

56 EO (10-cm 3.gm-1)-db Inverse of local specific

volume gradient with pressure

57 1/EO (10- cm 3.gm-i1 )db-1 Local specific volume gradient

with pressure

58 N2 10-6 (rad •sec-1 )2 Squared buoyancy frequency

59 op *C db-1 Potential temperature gradientdof!TV

Page 37: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

34

TABLE 6 (Continued)

VARIABLE NAME or UNITS DESCRIPTION

NUMBER SYMBOL

60 Sp ppt db-1 Salinity gradientpdSf

dp

61 Sf ppt Salinity corresponding to

Of. Pf. 6f

62dSf ppt(C Gradient of salinity with

2f ppotential temperature

63 2 (db)2 Squared displacement of

initial field from reference

field

64 N cph Buoyancy frequency

65 ef C Potential temperature at

If referred to zero

pressure

66 lO3gm-cm-3 Sigma theta of pf,Sf' Of

67 cm3 *ge Specific volume anomaly in

reference field

68 r2 Vertical gradient ofcompressibility contribution

to GPE

69 Not used

70 rk 10-5cm 3- gm- 1 db2 dK (')a (see Bray and

Fofonoff, 1981)

71 Not used

mmoo

Page 38: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

35

TABLE 6 (Continued)

VARIABLE NAME or UNITS DESCRIPTION

NUMBER SYMBOL

72 ASf ppt Salinity anomaly from cubic

.spline fit to

Worthington-Metcalf and

Iselin e-s curves

AS(Pf,ef,Sf)

(Armi and Bray, 1981)

73 ASi ppt Same as 72 but using the

initial field

AS(Pi,e(TJ),S(0)

74 Of (C)2 Leveled field potential

temperature squared. (Used

in calculating horizontal

standard deviation using

AVRGS branch ISW = 21.)

75 RME (W0-4 J.kg-1)2 Random measurement error

(based on pressure error of

*5db magnitude, temperature

error of .0070C, salinity

4error of .005 ppt) for APE.

See Bray and Fofonoff, 1981,

Appendix, for details of

error calculations.SV(G *.f212)

76 Not used

77 RFE (10-4 J.kg-1)2 Same as 78 but

78 RFE* (10-4j.kg-1)2 Random finestructure error:(based on 3xZ1 as error in*): V(ap*w*212)

I A

Page 39: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

36

TABLE 6 (Continued)

VARIABLE NAME or UNITS DESCRIPTION

NUMBER SYMBOL

79 RME (104 J-kg-1) 2 Same as 75 but pressure error

only

80 RFEC (10-4 J-kg-I) 2 Random finestructure errors in

the vertical compressibility

term (must be integrated

using AVRGS branch ISW = 17)

V( rkw 212

81 RMEC (10-4 J.kg-1) 2 Random measurement error in

the vertical compressibility

term (pressure error only)

82,83 Not used

84 K 10 5 cm3 - gm -. db Compressibility (a)ap a

85 K S 10-5 cm3- gm-l-ppt-1 Derivative of specific volume

with respect to salinity;

temperature and pressure held

constant:

-i ) P,T

86 Kff Contribution to GPE from

horizontal gradients of

compressibility

8? APEB 0 J-kg 'Boussinesq' APE per unit

mass with true displacements

88-90 Not used

91 ( i - 105cm3 "gm-1

-- 92 (-e pW)'-1 (qC-1

93 Not used

4S

Page 40: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

37

TABLE 6 (Continued)

VARIABLE NAME or UNITS DESCRIPTION

NUMBER SYMBOL

94 ei2 Potential temperature

corresponding to pf in

initial field

squared

95 -(el- 9)Iep None

(if i is in column 4)

96 -(ef- ;f)/ep w None

(if ;f is in column 4)

97 e C Local potential temperature

at ai

98 Not used

,

Page 41: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

38

A1 = 1 B1 = 1 NX1 = 1 NY1 = 2

A2 = 2 B2 = -.003 NX2 = 64 NY2 = 12

A3 = 0 B3 = 0 NX3 = 0 NY3 = 0

A4 = 0 B4 = 0

These values will cause the buoyancy frequency in cph to be

plotted as a function of meridional position (y-axis), time

(x-axis) and pressure (station axis). X2DIM defaults to 3 (cph)

and Y2DIM to 3000 (db), resulting in station axes representing

*3 cph for the displacements and 0 to 3000 db for the pressure.

The default number of stations (variable ND) is 1 and may be

changed by calling KBR = 1, ISW = 1. The plot information is

stored in the file corresponding to unit 8. It must be read and

translated by a Metacode translator. PEPLT may be run on any

terminal, but the translators are only ,.ailable for graphics

terminals and the Calcomp plotter. See the last part of this

section for instructions on the access of the translators. The

origin co-ordinates may be changed in PEPLS branch 2.

Branch 1 with ISW = 0 may be used to change PMIN and PMAX,

thereby selecting a range in pressure oven which data will be

used (all other data is excluded), X2DIM and Y2DIM, described

above, JMIN, the level number corresponding to the pressure at

which the plot is to start (this allows the user to skip over

shallow points which may have anomalous values), and various plot

parameters. The plot parameters include PLABL, the overall plot

label; XMIN, XMAX, YMIN, YMAX, the axis limits; XLABL and YLABL

the x and y-axis labels, respectively.

In addition to plots, if ISSW(10) = -1 TABLE outputs to unit

KOUT the following list of variables in format (GF8.3):

PF, XPL, YPL, (VRBL(NV(K)),K = 1,6).

(See Table 6 for descriptions of these variables.)

If ISSW(12) = -1, a short list of variables is output to unit

KLIST: pressure (PF), and the variables x, y and z, z given by

z = Cl*VRBL(NZ1) + C2*VRBL(NZ2) + C3*VRBL(NZ3) + C4*C(IREC,3)

I-

Page 42: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

39

SUMMARY - PEPLT:PEPLS: KBR = 1

Function: Call subroutine TABLE - multiple station plots, map

format output, lists by station.

ISW, JSW options: ISW = 2 Initialize plot parameters

ISW = 1 Change plot, map

format and list

parameters

ISW = 0 Plot, list, map

format output

JSW No options

ISSW options: ISSW(5) = -1 No interior axes on plot

ISSW(6) = -1 No plot

ISSW(1O) = -1 List variables

ISSW(12) = -1 List p, x, y, z.

2: Change data selection variables. Calls subroutine to change time

and space windows and origin co-ordinates.

3: Change plot and list parameters. This branch prints a short

documentation on the screen each time it is called. Parameters

which may be changed and their descriptions are listed in

Table 7. This branch has internal branches 1 through 8, which

are prompted by '**: PARAMETERS: KBR3, ISW3, KX, MV, MW'. Only

KBR3 and ISW3 have any effect in this branch. KX is the total

number of parameter input branches (5). To return to PEPLS from

S branch 3 the user must enter KBR3 = 1, ISW3 = 0 followed by /.

v( This will cause the new parameter values to be written on unit

KLIST, and stored common to be written to KPLCM.DAT.

SUMMARY - PEPLT:PEPLS: KBR = 3

Function: Change or list plot and listing parameters

ISW, JSW options: None

Input device: KIN

Output device: KLIST

ISSW options: None

t5

Page 43: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

40

TABLE 7

PEPLT: PEPLS Branch 3 Parameters

VARIABLE DEFAULT DESCRIPTION

NXI 12

NX2 0

NX3 0

NYI 19 Variable codes for VRBL used

NY2 0 in AVRGS and TABLE computations

NY3 0

NZI 25

NZ2 0

NZ3 0

Al BI CI 1.)

A2-A6, 82-86, C2-C6 0 Scaling factors used in

AVRGS and TABLE computations

Dl to 06 1.

TMIN to YT None Not used

SMIN to ST None Not used

Page 44: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

41

4: Calls AVRGS subroutine. This subroutine calculates horizontal

averages, allows operations such as vertical integration and

column addition, multiplication, exponentiation and division.

There are 23 internal branches in AVRGS, accessed with different

values of ISW(O to 22). These internal branches are described

below, with a summary at the end of each. As an overview, AVRGS

reads the requested data from *.AVG files into a two-dimensional

array C(100,6). The rows (1 to < 100) correspond to the

pressure levels and the columns to variables requested by the

user and computed in function subroutine VRBL (see PEPLS branch

1 for a description of VRBL). As each successive station is

* read, the elements of C are added to, forming sums of all data

available at all levels. These sums must then be divided by the

total number of observations at each level, to obtain the

average values. For reasons of flexibility, the reading/summing

and division are performed in separate ISW branches within

* ,AVRGS. Once the array C is filled (one column of which must be

the number of observations) and averaged, then a number of

operations can be performed on the averages. The remaining ISW

branches of AVRGS are devoted to these operations.

AVRGS has its own prompt 'AVRGS:KBR,ISW,JSW,KLIST', and

control does not return to PEPLS unless KBR = 4 ISW = 12 is

accessed. Therefore, only four variables (or < 4 followed by a

/) need be input following the AVRGS prompt. In order to keep

track of the operations performed in AVRGS, if ISSW(2) = -1 the

four parameters are written to unit 4 each time an AVRGS branch

is accessed, along with other pertinent information. This ISSW

option will not be noted in the summaries.

Branches in AVRGS: (ISW)

ISW = 0: Prints short documentation on unit KTTX

ISW = 1: Reads station data into C array. Variables corresponding to

NV(JSW) to NV(KLIST) (maximum of six) are read into columns

Page 45: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

42

JSW to KLIST of array C for ND number of stations from file

JSHP.PTN (logical unit 12), starting with the first station in

that file. All data between PMIN and PMAX is accessed for each

station. The array C is stored to KPLCM.DAT before returning to

the AVRGS prompt. If ISSW(15) = -1, the weights (WT) from

JSHP.PTN file are used; otherwise a weight of 1. is used. Each

element of C is a sum of

C(IREC,I) = C(IREC,I) + D(I)*WT*(AV*VRBL(NV(I)))

+ (BV+CV*VRBL(NV(I))*VRBL(NX(I)))

The default parameters are set such that

C(IREC,I) = C(IREC,I) + WT*VRBL(NV(I))

Some of the parameters used by this branch may be changed in

branch 3 of AVRGS, and some in branch 3 of PEPLS.

SUMMARY - PEPLT:AVRGS: KBR = 4: ISW = 1Function: Read and store data to C array

JSW, KLIST options: JSW is first column, KLIST last column

Output device: Array is stored to KPLCM.DAT for emergency

retrieval. No other output.

ISSW options: None

ISW = 2: Zeros columns JSW to KLIST of array C

ISW = 3: Changes or lists parameters. Parameters involved are listed

in Table 8. JSW = I initializes the parameters (defaults

also in Table 9) before allowing changes; JSW = 0 retains

previous values. (The first access to this branch must

initialize.)

SUMMARY - PEPLT:AVRGS: KBR = 4: ISW = 3

Function: Change parameters

JSW, KLIST option: JSW - 1 initializes

JSW = 0 prints current values

Output device: KTTX

ISSW options: None

ISW = 4: Average table: divide columns JSW to KLIST by column 6,

which should have the number of observations at each level.

Page 46: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

43

TABLE 8

PEPLT: AVRGS Branch ISW = 3 Parameters

VARIABLE DEFAULT DESCRIPTION

(Initialized)

ND 1 Number of stations to be processed

NV(1) 51 Variables to compute for C array as

NV(2) 68 VRBL(NV(I)) in column I.

NV(3) 86 See Table 6 for VRBL codes.

NV(4) 87

NV(5) 63

NV(6) -1

JREF 50 Number of levels to be calculated

jMAX 55 Level number corresponding to reference

pressure for integrations over pressure

NX(1),I=l,6 0 Optional additive quantities in C array

element calculation (see text).

Al I.A2 0. X and Y scaling factors for plots

A3 0.

B1 1. Initialized when PEPLS is called by

B2 0. responding YES to 'Initialize common

NX1 12) Optional plot parameters (see text for

NX2 0 AVRGS branch ISW = 7).

NY1 191NY2 01 Initialized in PEPLS as above

Page 47: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

44

ISW = 5: Add column JSW vertically, starting from level 2 and going

to JMAX:

C(IREC,JSW) - C(IREC - 1,JSW)

ISW = 6: List C array to unit KLIST. Inlcudes data label,

parameters, level number and pressure, and C array.

ISW = 7: Plot one frame. Up to six curves allowed per frame. NCAR

plot package outputs to unit 8 a file which must be read and

translated into a plot by a Metacode translator. PEPLT may

be run on any terminal, but the plot files may only be

translated on graphics terminals and the Calcomp plotter.

Instructions for running the translators are found at the

*1 end of this section of the report. The plot branch asks for

the number of curves (default 1, maximum 6), the level

number for the first point (default 1), the plot label, the

minimum and maximum coordinates for x and y (unless the user

opts to have the NCAR plot package compute the scales, by

responding YES to the query 'Use default axis parameters?'),x and y axis labels, and the column number to be plotted.

The program actually plots:

x = Bl*C(J,JSW) + B2*C(J,NX2) + B3*PF

y = A1*PF + A2*C(J,NV1) + A3*C(J,NY2)

* The default values of the parameters plots

C(J,JSW) vs PF (pressure).

However, if for example the user wished to plot potential

temperature e vs salinity S, with e (VRBL(65)) in column

1 and S(VRBL(61)) in column 2, then the values of the above

parameters should be changed (using AVRGS branch 3)

Al = O. B1 = 1 NY1 = 1

A2 = 1. B2 = 0

A3 = 0. 83 = 0.

The y-axis runs backwards (maximum at the bottom to minimum

at the top) unless Al is equal to 0. An example is given in

ENERGY.COM -- see Appendix A.

-1

Page 48: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

45

Characters of the user's choice which mark the actual data

points may also be plotted if ISSW(5) - -1. Note should be

made that these are not centered characters, so that the

data point actually occurs wherever the plotter commences

drawing the character.

SUMMARY - PEPLT:AVRGS: KBR = 4, ISW = 7

Function: Plot one frame containing up to six curves.

JSW option: JSW is the column number to be plotted. It

may be changed while in the plotting branch.

Output device: Plot information goes to Metacode file, unit 8.

ISSW options: ISSW(5) - -1 plots character to mark actual

data points. Character is

requested while in plot branch.

ISW = 8: Calculates gravitational available potential energy per unit

mass (GPE) and per unit area (TGPE), from the horizontal

averaged steric volume DVI (VRBL(18)) in column 1 and for

the reference steric volume DVF (VRBL(19)) in column 2,

except for a constant of integration. GPE and TGPE relative

to some reference pressure are calculated by subtracting

from GPE and TGPE at each level the value at the level

corresponding to the desired reference pressure (denoted by

level number JREF) in AVRGS branch ISW = 10. GPE is stored

in column 1, TGPE in column 2. The units are 10-4

J.kg -1 and 10+4 J.m-2, respectively.

SUMMARY - PEPLT:AVRGS: KBR = 4, ISW = 8

Function: Calculate GPE and TGPE except for a constant of

integration

JSW options: None

Output device: None (GPE and TGPE replace DVI and DVF in

columns 1 and 2, respectively, of array C.)

ISSW options: None

ISW - 9: Integrate over pressure columns JSW to KLIST. This is an

alternate method for calculating GPE and subsequently TGPE,

I "____________

Page 49: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

- - ... . . . .... . . _ __.... .

46

with OVI - DVF (VRBL(51)) in column JSW. It may also be

used to compute the compressibility effects in the GPE

calculation (see equation 28 in Bray and Fofonoff, 1981).

The integration is performed starting with the first

element in the column, and continuing to the last; the

reference value must be subtracted in a separate operation,

using AVRGS branch ISW = 10.

SUMMARY - PEPLT:AVRGS: KBR = 4, ISW 9 9

Function: Integration over pressure (except for a constant) of

columns JSW to KLIST

JSW options: Columns JSW to KLIST are integrated

Output device: None

ISSW options: None

ISW = 10: Subtract value at reference pressure (level corresponding to

JREF) from all other elements in columns JSW to KLIST

Output device: None

iSSW option: None

ISW 11: Add up to four scaled columns, according to

J = IREC

C(J,JCI) = CR1*C(J,JC1) + CR2*C(J,JC2) + CR3*C(J,JC3)

+ CR4*C(JREF,JC4)

If JSW = 1, JCI, CR1 to JC4, CR4 are entered; no addition is

performed.

If JSW = 0, addition is performed using most recently input

parameters.

SUMMARY - PEPLT:AVRGS: KBR = 4, ISW = 11

Function: Add up to four scaled columns, row by row

JSW Option: 0: perform addition

1: input scaling and column parameters

Output device: None

ISSW option: None

ISW 12: Return to PEPLS

A4* _ _ __ _ _ _

Page 50: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

47

ISW = 13: Multiply up to three scaled columns, row by row according to

C(IREC,I) = CONI*C(REC,I)*{CON2*C(IREC,J)*[CON3*C(IREC,K)]}

If I = -1 no operation is performed.

If J = -1 then the expression in 0 is set to 1; if

K = -1, the expression in [ ] is set to one, allowing one,

two or three scaled columns to be multiplied together. The

parameters may be changed when the branch is accessed. The

default values are I,J,K = -1; CON1, CON2, CON3 = 1.

SUMMARY - PEPLT:AVRGS: KBR = 4, ISW = 13

Function: Multiply up to three columns, row by row

JSW options: None

Output device: None

ISSW options: None

ISW 14: Output in map format to unit KTO. Branch requests output

file name and level number (JREC) desired. Variables output

are:

IDSTN (station identifier: ship, station), XLAT, XLONG,

(VRBL(NV(K)), K = 1,3), (C(JREC,K),K 4,5)

in format (1H ,A5,2(F8.2),5F(8.3)).

SUMMARY - PEPLT:AVRGS: KBR = 4, ISW = 14

Function: Output in map formatJSW option: None

Output device: Unit KTO (may be changed in branch; default

is 60)

ISSW options: None

ISW = 15: Not used

ISW = 16: Take any single column to any power, row by row. Operations

are performed on the absolute value of all elements. If

JSW 1 1, exponent and column inputs are prompted. If

JSW = 0, exponentiation is performed. The call to JSW = 0

should immediately follow that to JSW - 1, as the variables

used for exponent and column number are not unique to this

branch.

Page 51: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

48

SUMMARY - PEPLT:AVRGS: KBR = 4, ISW = 16

Function: Exponentiation of a single column

JSW options: JSW = 0: Operation performed

JSW = 1: Exponent and column entered

Output device: None

ISSW options: None

ISW = 17: Integration of error terms: interval pressure squared asthe integration variable. This is intended for the

-calculation of measurement and finestructure errors in GPE

and TGPE; as such it may be used on columns containing

averaged values of VRBL (75 and 77 through 81) -- see

Table 6. This branch uses the same algorithm as AVRGS

branch ISW = 9, with AP2 instead of AP as the

integration variable. See AVRGS branch ISW = 9 for a

summary.

ISW = 18: Writes into column 5 the difference in pressure between each

pair of levels, beginning at the top.

ISW - 19: Exchange columns JSW and KLIST.

ISW = 20: Input a new single element of C. Branch prompts for column

and row of element to be changed.

ISW = 21: Compute the standard deviation and store in column I of any

quantity X for which X (the average value) is stored in

column 4 and V in column 3.

ISW 22: Compute the dynamic height for each station at any range of

levels referred to level JREF and output in map format.

Branch prompts for output device (default is 60), and level

numbers (JRECI, JREC2) for dynamic height calculation.

Reference level JREF may be changed in AVRGS branch

ISW = 3. To calculate dynamic height NV(1) must be 18,

NV(2) 19. Variables output are:

IOSTN (station identifier), XLAT, XLONG, Dynamic height

(in dynamic centimeters), (NV(K),K = 3,6).

Output occurs for ND stations, beginning with the first

station in JSHP.PTN (unit 12).

Own.

Page 52: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

49

SUMMARY - PEPLT:AVRGS: KBR 4, ISW = 22

Function: Compute dynamic height relative to JREF for any range

of pressure, for each of ND stations and output in map

format. Four optional variables are also output, for

the same range of pressure. An example command file,

DYNHT.COM is found in Appendix A.

ISW options: None

Output device: Unit KTO (default 60; may be changed by the

user when the branch is accessed).

ISSW options: None

PEPLT Branches (KBR), continued

5: Set values of elements in the ISSW array. Up to 16 inputs are

allowed, each consisting of the element number followed by the

element value (-1 or 0). Terminate before 16 by typing I.

6: Restart main program.

7: Exit program: a YES response to the branch query 'EXIT PROGRAM

results in the execution of a FORTRAN stop. A NO response

returns the PEPLS prompt.

Metacode Translators

The translators for the plot files (written to unit 8) created in

AVRGS (branch ISW = 7) and TABLE (PEPLS branch KBR = 1) are device

specific. That is, each graphics terminal has its own version. The

CALCOMP high speed plotter has two versions: one with default plotting

parameters, and one which allows the user to enlarge or stretch the

plots, alter their distribution on the plotter paper, etc. The IMLAC and

Tektronix terminals also have versions of the translator to allow plot

previewing.

For all translators:

If the plot file was written to any other file than that named

FOROO8.DAT (via an ASSIGN statement before running PEPLT) then you must

b

Page 53: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

50

assign that ouput file name to unit 8 before running the translators.

For example, if your plot file is named PLOT.PPT, you must make the

following assignment:

ASSIGN PLOT.PPT FORO08.

For the CALCOMP (both versions) you must also assign terminal

TTA4: to FOR061:

ASSIGN TTA4: FOR061

* ,Then

RUN MCTRNPLOT (for MetaCode TRaNslator PLOT)

plots with default parameters, and

RUN MCTRNPLT2

prompts the user for changes in the plotting parameters before executing

the plots. MCTRNPLT2 asks three questions: first, how many plots in the

y-direction (across plotter)? The default is 1, and is retained if a /

is entered. Second, what size shall the plots be? The default is 10 by

10 inches. The new dimensions are entered in inches, and need not be

equal for x and y. Again a / retains the default values. Finally, the

program asks for the distance between plots, in inches. The default is 2

inches in both x and y. All plots in the file assigned to unit 8 are

plotted, sequentially.

For the Tektronix (or the IMLAC in Tektronix mode):

RUN MCTRNTEK

starts the plot previewer. If there is more than one plot, the program

prompts for continuing to the next plot by asking 'Option ?' to which the

user should respond C for continue, until all plots in the file assigned

to unit 8 have been plotted.

For the IMLAC (recommended over the IMLAC in Tektronix mode, since

it is simpler, and uses more of the screen):

RUN MCTRNDYN1

starts the plot previewer. This program also prompts for continuation if

there is more than one plot.

This translator information is accurate as of December 1980. If

you encounter difficulties you should refer to the current VAX manual.

Page 54: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

51

4. Modification of POTEN to accept input CTD data in other than CTD78

disc format.

This section is intended as a guide to assist users who wish to use

POTEN on CTD data with formats other than that read by the standard

version. In this section the header information required by POTEN is

described in detail, and the procedure for reading data is explained.

The only subroutine which must be changed is DATA, providing that the

input data is an even series in pressure with no gaps.

DATA requires the following header information for each station:

Description Variable Name Format

Ship Name ISHP A2

Cruise ICRUIS A3

Station ISTAS 13

Decimal Latitude (south negative) XLAT F

Decimal Longitude (west negative) XLONG F

Day IDA 12

Month IMO 12

Year (last two digits) IYR 12

Time (24 hour clock) ISTME 14

Station Label LBBL(3) 3A4

Minimum Pressure PMIN or IPR F or I

Maximum Pressure LPR I

The CTDATA library subroutines not needed for formats different from the

disc version of CTD78 are:

PVER

CRUISE Header Information

STAT ION

DATIOX Data Retrieval

GETDAT

Also, the common file IDXREC.DIM should not be included in DATA --

see the statement INCLUDE 'IDXREC.DIM'. The variable LLREC is the total

number of stations in the subindex directory; all statements in DATA and

COMPS which refer to LLREC may be deleted. The data are stored in arrays

PRESS and DATAX.

- ..

Page 55: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

52

Pressure is stored in PRESS,( #), temperature in DATAX(1, #),

salinity in DATAX(2, #) with # the data scan number. Subroutine DATA

must fill DATAX and PRESS (all scans) when it is called for each

station. Finally, DATA must return to COMPS the total number of data

scans, JRMAX.

Stations are selected by the call to DATA in COMPS. The call is

CALL DATA (KST,I)

In COMPS, KST is the sequential number in the DO loop from ISW to

JSW in branch 1 (or 13). If the input data is on magnetic tape, the user

may wish to change the DO loop in COMPS to go from 1 to JSW: that is,

start at the beginning of the tape and read through ISW stations.

The section of DATA in which the ship and cruise specification may

be changed (NSW = 2) can be readily modified to accept similar

information (in branch 13) pertinent to the user's input data.

The header information should be read in following statement # 5,

replacing the statements between # 5 and # 54. The data should be read

in in statements which replace the calls to DATIDX and GETDAT.

Page 56: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

53

Acknowledgements

Nick Fofonoff was responsible for early versions of most of the programs

and subroutines documented here; his contribution to this work is gratefully

acknowledged. Jerry Needell, Dan Georgi and Marie-Noelle Houssais used these

programs, discovered errors, and suggested improvements. The manuscript was

improved by constructive criticism from Bac-Lien Hua, and was typed by

Mary Ann Lucas and Audrey Williams.

This work was supported by the Office of Naval Research under contracts

N00014-76-C-197, NRO83-400 and N00014-79-C-0071, NR083-004 and by NSF grant

OCE-77-19403.

i,1

-1

Page 57: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

54

References

Armi, L., and N. A. Bray, 1981. A standard analytic curve of potential

temperature vs salinity for the western North Atlantic. Deep-SeaRes., submitted.

Bray, N. A., and N. P. Fofonoff, 1981. Available potential energy for

MODE eddies. J. Phys. Oceanogr., 11(l), 30-47.Bryden, H. L., 1973. New polynomials for thermal expansion, adiabatic

temperature gradient and potential temperature of sea water.

Deep-Sea Res., 20, 401-408.

Fofonoff, N. P., 1977. Computation of potential temperature of seawater

for an arbitrary reference pressure. Deep-Sea Res., 24, 489-491.Fofonoff, 1981. Algorithms for oceanographic computations to appear as a

publication of SCOR Working Group 51.Fofonoff, N. P., and H. L. Bryden, 1975. Specific gravity and density of

seawater at atmospheric pressure. J. Mar. Res. (Suppl.), 33, 69-82.Millard, R. C., Blumer, A., and N. Galbraith, 1978. A digital tape

format for Woods Hole Institution CTD Data. W.H.O.I. Technical

Report 78-43.

Millero, F. J., Chen, C.-T., Bradshaw, A., and K. Schleicher, 1980. A new

high pressure equation of state for seawater. Deep-Sea Res., 27A,

255-264.

l

P~

xe-

Page 58: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

55

Appendix A

Example command files for different routine

calculations using POTEN and PEPLT.

In this appendix documented command files which perform variousroutine calculations are listed. In the order in which they appear they

are: ENERGY.COM, POTEN.COM, PEPLT.COM, TABLE.COM, and DYNHT.COM. Brief

descriptions of these files are also found in Table 2. The files

themselves contain detailed documentation. Example plots from ENERGY.COM

are also included: see Figures 5 to 12. Example plots from TABLE.COM

are found in Figure 4.

I:•

2-.

Ir

.1

Page 59: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

5 1 *~**4*4**4 'JEr~ycwq******56*

10 S!CDNSANn FILE TO COMPUTE APE FROM CTD78 FnRMAT DATA. CREATES15 )"IMWY)RTI1 ~INVTUUT *NNU FLFIT-. INNPUtU AS RNI AIU IN LAW14

* 26 $!TV 11SF THE VAX-11 PROGRAMS POTEN AND PEPIT.3'. %!4 JUlLY All NAN4 BRAY'-------------42z s!50 %SrT IDEFAULT OA:<1163I4-0LDf5 -

100 %ASS M14 - JSHPF.PTN -FOR012 !FILE TO OF CRFATED BY POTEN CnfWTAI'4!NC* w s STATION IDEPJTlFIERSe

?00 SA557O'J PRTNT.PTN FOR004 !FILE FOR LIWEPRTNTFRk OUTPUTFROp POTEN300 RU~Jfq1DqPBOTFN4.00 YES ?NITTALIZE COMP~ON1500 NlO DO NOT TNIITIALI,?F PFQRESSTON PARAMIETERS600 2.5 !PRESSURF INTERVAL FfOR INPUT DATA

* a fUU 1.IVF1 - M1 V1A19t-MR Y-'JK WtGRES'SuV

Bo 900 9997,.t !SET POIFF TO 2nR--INTERVAL OVER WPITCH T0,SI0VO AVFRAGED900 1 !OnD Nil? CHANGE nL'P--PRFSSU~fE TEtRLFORt INPUT DATA1000 %nO no NOT CHANGE RFGRFSSION PARAPIFTERST00 f ! LCiVF TYTWF WINDOV AlT DWWAUUT 3 "WV0Y -

1200 1 !LFCVE FAST-WEST SPACE WINDOW Al DEFAULT: -19 0,180 DOl)IluD I~ !L:'MVVF P4UgIP-5UTUI NFA', WINDUW AT DEVAULT1 J-90990 DEG'

* 1400 YES 0?4ANGF DATA LABEL"DOG LOPF TP5 TfST--TANJARI) VERSIO)NpJWD-2 JULY 811600 It/ !IFT IS5W ARRAY 'I LFVTTIT)T9O0 119-11' !LIST 'STArrIUR N iFT w5ATDWrTff TT nTST FWVT4.PN

* 1850 lit

-7,0 IlwI ! CREATF *s.G-eKr FT'lES-

2050 lit-7100 '5, ' on NUT LIST TInOVTD1JIL INPUT UATA --CARS '2150 1.11

* fauD IT),Ui 0 UI IJ ETT -,C~[J u F-1ITRYS YUW EALY1 LkVEL* 2500 1,fl9?36v4/usiNG; nFF CRUISE SPEC'S, REGRESS STA REF 9 15W TO 35W

27660 ll,?iIIZ0",4f !tIRA'JGE THE rIRUISE~ -SPF1 E -T'RE IS IN PREVIOUs CT14NAND76715 W !SIPDIRFCTORY VERSION

*-7690 I$1~f)If1l is"rp~ Cpu1s-F,9 PWTJECT wNMER-2900 11/ 'RESET IS5W ARRAY'

3100 4,1,0,'., !PRDCE!) TROUGH FNTIRIF AVERACING PW CESSe LISTS TO PRINT.PTN'3700- 121' !FX? PPIDGRA"?

* 3300 YES-1 4i" S-ASSIC4t P#INT4-PPT FfOR004 nItiTING FIEF FR~i P #T OUTnPUT3500 SASSIQ'J PLOTePPT FOR009 !NCAR PLOT FILE FOR PFPLT PLOTSsbpa KU9IYIIY-1 WELT3700 NO n0 NOT PFAn IN PRFYIOUSLY STORED COMMPON1800 YFS tWTTIALIZF flATl SR.$tCTION PAtRAVETEtS-3900 S/ tS'PT ISSW ARRAY-M" TPr4000 ? .0-1IF !LIST nP'E-RATIII?4 T 'P-F1O1RMFD 1# oP4050 51

'.200 49?,ilht !zERD C, ARRAY IN AVIGS, PROGRAI CONTROL NOW IN AVRGS.'.-M0 4 Tot11 !SET VARfTARt1E "ItI~tW M FTFRS -

4400 l0o0vvqvqqq50/ '(rHANGf 1000 TO I OF STATIONS IF ND < ALL4 cO I' !0'7 NOT CHANGE AV TFIROUCW N~itI4.600 1 '007 NOT CHANGE Al THROUCH 83-# F -7-f-!Ut-rI( LJIAUi N4K1 r,1VJU(1 PITZ4800 4,1gih !READ VARIA9LFS AS SELECTED INTO C SPRAY*4".90 49,49 t,5 '1110WT CnLUNN 1-5 BYiT iWIER lYE S--T 7TTONSI1--TU -WVfRtIf5000 4,6,1,4 !WRITE C APRRAY TO PRINTePPTT100 4 9,ti T 4 TTE(ItA1T CfltVRM V-1 VTW#Wt-I IRS # IM-------

Page 60: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

-5'M0 4,110 il-3 !SUPRTRACT fitfOM ALL LVIS THF VALUE AT LEVEL JltFF5325 4 , 6,1w4 !WRITF C ARRAY TO PRINT&PPT _______

5500 4969t1,44 !WRITE C ARRAY TO PRTNT.PPT5660 491141l/ !PFSFT At~flt?'VI CONSTANTS5700 I..2,?l*,3,1.,4v0s !REPLACE COMPRESIBILITY ERMS

5900 4 , vl. I__

6100 491f6,t7/fi200 4.,6,l,,4 !WRITF C ARRhY TO PRINT 4PPr6300 4o7f MCALL PLOT RRANCM64 00 4,1 !4 PLnTS IN THIS FRAMFv, TA#RTiNG0AT LEVEL ION EACH6500O YES INIPUT NEW PLOT LARFL ______________

66050 LnF 5 NW O-21hVR6700 tonl Dry No usF nFF-AULT AXIS PARAMETERS6-60-- -?nv?6090,100O !XfINX14AX,,Yf4N,YMA)X-

*6900 YES C14ANGF X-AYIS LA8REL700D- -APf fY/SFf1**?7100 YFS CHANGE Y-AXIS LASEl]

* ~y y11) 't,5uwtv III1

*17300 1 !P~fTT COL 17400 0 !* IS PLPT CHARACTER IOENT!FIEVONOT CFNTEROD!)7500 ? !PLrIT COL ?76UU7700 3 !PLnT COL 3Fa00 u7Q00 4 !PLIIT Cnt 4R-000 X8100 4,7/ !CALL P101' ARANC1H FlIP NEXT PLOT4200 Iv1/ !T- PLOT YN THIS FRA'4P; STARTWCIQAT-LFVEt I

* - 8300 No "I] NOT CHANGE PLOT LARELMo wuu -Tfull, USE I)FI-Jl1 AXIS VA'(MET1(R'

8500 0910040,3no00D YF5 OWPJCF X-AXIS LAREL

1700 RPS Dr'SPLAcF"'NTSt 08 -SrMOID N11 MYl WYIT rHANCE Y-AT L-AREL

"900 '5 'PLOT tilL 5

*9100 4 -v?v 1,,5 7FERO COLUMNqVS 1-5 OF C ARRAYq7O0 4,1,01Y !RESET SELECTV VAIA~l~f PIKWE~TEPSv M~VIPJG OYTtR' AS 1REF1RF9300 ,5Ov61 q65,964, 19/940 /95009600U i9700 4,1,1,5 !READ VARIABLES INTO COLUM14S 1-5;START AT TOP OF JSMPaPTN LTS9"D0 'i9s9tS ! 01'UFl COLUVRWS tZ- ST ?IUROJFR OV STATTYM'9900 4,6,1,l-4 !WRITE C ARRAY TO PRINTPPT10000 4,1?1 !RETURN COINTROL TO PFPLS-10100 5, !SET TSSW ARRAY

10300 '.,7/ ?CALL PLOT RPANCH FOR NEXT FRAME; SEE EARtIFR DFSCRIPYION4-TO400 1.1/f10500 NOS10600 NO10700 34.8936.q,90,300nzomooL yEp --

10900 SALINTTY, PPT11000 NO11100 2tI0 47

n 7(m 4p.

Page 61: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

11300 111/5811100 so1

1,1700 YE11800 POTENTtAL TFMPFRATURE9 IYEG C"90~0 Nn

12200 11

12200 NO1

12400 Nn<17500 095909300(112600 YEMtUD I UP7v

12800 NO

13000 497f

13200 NO13 -300 N("

13400 40 9 221)40v30001-1500 YE13h00 DELTA-F, IF-5 Clr*03/GR

14000 /

14?00 0.v1.t !Nnw GOiNG Tn PLOT SITHE-TA-) RATH-E-R -THA SIP), CHANGE AlA?

14400 497fll#JUU 191146~00 NO147U0 NiT

*twlq" Y-F115000 SALINITY, PPT

,.. LVIU Tr1.5?00 PnTFNYTIAL TEMPFPATURE, DEG C

3"00 215400 4,7/ !CALL PLOT RRA14CI FOR FINAL FRAME; DEEPTHETA-SM"O 1-91715600 NO

* 15800 34e93935.0392.694.8 --1"~00 NP16000 Nfl

16200 4,1?! ?RFTIJRN CONTROL TO PFPIS

16400 YES16,500 %PRYT!OFL PRrTNT. PTN*PWrWT*P-PT

IHI

Page 62: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

59

LDE FS5 TEST OF STRNDRD VERSION

200

800

1000

IM P57- .. (2500 (2500 112i aoot ~ ~ ~ ~ (. - fo . p* dpiL~

(APE: GPE less compressibility terms)

L 's are:

000 (Boussinesq APE with true displacements)

I's are:

2200 k

.400 (vertical pessibility tem) 1

2800 ~O' are:

p8 0

, w d p .

(horizontal coMpressibility term).

3000 -------?0 0 20 '0 80 80 100 1?0 1G 160 180 200

APE (CM/SEC)Sm.2

Figure 5: Example plot from ENERGY.COM: APt

Page 63: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

60

L E FS5 TEST OF STPNDRRD VERSION0 r--r -. ,---T- r t' v ' "-T----T" - .T -T ,-.---T -

200

400L.4

600

800 F10o00 -

1200 -3 -; 1400

1600

LL1 2800

2000 tx

2200 '

2400-

2600 -*,

2800

3000 i I ' __________0 10 20 30 40 50 60 70 80 90 100

RMS DISPLACEMENTS. 0B

Figure 6: Example plot from ENERGY.COM.

Rms vertical displacements, w, in db.

Page 64: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

61

LDE F35 TEST OF STANDARD VERSION01 F

200

400

s . 600

800

1000

1200

U; 1400

-. -. ~1600U.'

CL 1800

2000

2200

2400

2600

2800L

300 35.0 35.2 35.4 35.6 35.8 36.0 36.2 36.4 38.6 38.8

SALINITY, FF1

Figure 7: Example plot from ENERGY.COM

Averaged salinity in ppt along adiabatically leveled surfaces.

Page 65: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

62

WDE F55 TEST OF STRNDR VERSION

200

400

600

800

1000

1200

t. 1400

1600

CL 1800

2000

2200

2400

2600

2800

2 4 5 8 10 12 14 i6 18 20 22PITENTIAL TEIIIERATUiRE, DEG C

Figure 8: Example plot from ENERGY.COM

Potential temperature in *C averaged along adiabatically

leveled surfaces.

Page 66: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

63

LDE FSS TEST OF STRNDRRD VERSION

200

400

600

800

1000

1200

A. *1400

mho

1800

2000

2200

2400

2600

2800

0 .5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0Nl. CPjt

Figure 9: Example plot from ENERGY.COMBuoyancy frequency N in cph averaged along adiabaticallyleveled surfaces.

Page 67: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

64

LDE FS5 TEST OF STANOPRO VERSION0

200

400

140

1600

1800

1000

1200

2 400

1600

1800

200020s o 10 10 10 IO IO 2 2

OET-'I-5An3G

Fiue1: Eaml ltfomEEG.O

Reeec24ibaial00eed trcaoal nuiso1.5cm4m

Page 68: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

65

LDE F35 TEST OF STRNDRRD VERSION22

-. 1 20

18

Lu 6

uJ 2tLI

0

u61

4:4

12350 3. 54 356 3. 60 3.2 3. 66 3.

SFLIIT, P

Fiue1: Eaml ltfomEEG.OPoeta teprtr v aiiy optdasaeae

alnzdaaial eee ufcs

Page 69: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

66

LOE FS5 TEST OF STANDRD VERSION

4.80

4.6

4.4-Jj

4.2

34.0

2.8

2 .6

AAMR

Page 70: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

67s0 1'i! ***4* PorF.cfln*9******

too %!TASX IS TO SFT UP PAWAMFTFRS FOR AN INTFQACTIVE RUN4 Of PnTEN110 S!FrwAi INSTRUCTinN 14 THIS COM FILE CHANGFS KIN TO 69- THEWEBY120 S!PTUR1ININC CONTROL TO THE TERMINAL,130 1200 SASSTGN PQINTPTN FnRqO4

-1-6 SASSTGA JSHPFSS).PTWNPORti-? CHPGSKF5tO -CORRlECT STATION LISTSoo RuNfwnOFA POTEN_____________ _____ ___

700 Nfl DO NOT INITIALI?F *EGRSSION PARAME~TERS716 2.si !PRFSSUPF INTERVAL: r-R INPUTDAfb-TA-

1200 0999949.6/ !cflNTRIL NnW RFTURNS TO TERMINAL FOR INTERACTIVF SFSSt1P

Page 71: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

685 S!******* PEPLT.CIM *******

10 S?TASK IS TO SFT UP PXRAMFTFRS FOR AN INTERACTIVE RU" OfF PPT

30 S!RFTURNING CONTROL TO THE TERMINAL*4 -5 -I ! '- . -- - - - . - - - -

100 $ASSIGN JSHPFS.PTN F00012 !CHANGE JSHPF5 TO CORRECT STATION LIST-175 Ik-KSM PLIT PP'T -OWOrJRfR !PtOT.PPTTVff-4TIrU FILu150 SASSION PRINT.PPT FOR004 !PRINTPIPT IS LIlT FILEzoo WUNINT1M" FEPLT300 NO DO YfOT READ IN PREVIOUSLY STORED COMMON-500 'VFS tkiItALI7-F DATA 5FLIRCTtON PAA Tf600 49291-969996/ !COnTROL NOW RETURNS TO TERMIMIL FOR INYFRACTIVE SESSION

Page 72: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

69

100 %!YASW IS TO CRFATF rwn PLOTSCORRESPOND)ING TO FIGURES700y 1! -V-IV 5 IW RVYMT"~UW COVEN E!RTrT~300 S!FIGIJ'f- IS BUOYANCY FWEQTJFNCY N AS A FUNCTION OF DEPTH

%! $AWJD POSITION. TI4E SWCnINOT VERTICAL D!SPLACEWENT.Soo S!PnT" AQF CREATED USI'NG TARLE SURPEIUTINF OF PFPLT;-bO 0 i!THIF FIRST FIGUREF US'FS THE DEFAULT -PLOT -SPF FTCA-TIO"0.700 SASSTON PLOT.PPT FnReOO8

900 RUN/NPJOE PFPLT1-00 NOl DO NOT PEAf) IN PREVII)uSLY STYDRED COnqmoN1100 YFS TN'TTIALJ1F DATA SFLETTION PARAM4ETERS

--1700 tq?/- !TNTALT7E-P-LDTr A -AWFFTS-TN TARL1300 16/ !vNTFR NUMBER OF STATfONS IN PLOT _____ ____

1400 YES INPUT NEW PLOT LARFL1 S 00 LnF FSS: '4,CPH1600 NO DO NnT USE DEFAULT AXIS PARAMETFRS17D0 !1JSF THESE M~TN ANV) M4AY1800 YFS UHANGF Y-AXIS LASEL

2000 YFS C14ANGF Y-AXIS LARFL* I - 100 " NORTH OF ORIGIN

7?00 1,n/ tPLO)T21~00 191f !rHANGE PARAAFTFR5 T:VU--FV M.- PLOT2400 16,9,100,1000/ !100 IS DISPLACEMENT AXIS 14 DR'

?1500 YES CHANCE PLOT LABEL27600 LT)F F'515 VFPTTCAL 0ISPLACENENTSP 1)R7633 NO 00i NOT 11sEF DFAULr axis PARAMETERS7666 f !USE THESE M!-NMAW VALUES2700 NO 00 NOJT CH4ANCE X-AA'tS LABFL

2816 49l,0/ !CHANGF PLOT PARAIETERS--AVRCS

-7-564 0.5/f !RUSCALF ISPLACENENTS-2 Z880 95()/ !PIOT DTSPLACEMFNTS RATHER THAN N

2900 Itf1 f'PLnTV700 7f 'FXTT PROGRAM

a3100 YFS

Page 73: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

25 %1!TASKC IS TO CREATE rPCP C"MPATIBLF OUTPUT FRO* *,AVG " LES AT~it ~ ~ ii1 LtVLC Vi-a VAWIAOLti HUIFUT Aitt 5M10 IIJ-i'PXLATf37 %!XLOWG9DYN HT REF TO PF AT LEVEL 450qrTOSOPEF SPECIFIC YOt,7T!ME41 rJgyj DAYS FRWOP1 I- JAR441FCT1WAL-fl "T-FDW T-rTS46 S!IH qA5,1492Ff8o?)9lFRa3) ?6 MAY 91 WAN BRAY5'4 S'!UJ1R OYF ST1ATTOIRS IUTPUTt -DUTPJT-VKWWrI-tr AND REFEN-FCr PRFSStMEr) a SPFR nYWAVPIC HEIGHT MAY PF CHANGFD IN AVQGS BR-AdCH-3.71; S!UVwJ[rWU HERT-IT HlUITFT IE UTNSR[r GERTILMETER3;

t00 - ASSICN JSHPFS.,PTN 5OR'l2- *CNHANCt SWT PR~~f STATION Lisy200 REJNIW4TIOB PEPIT-~io M DJlO MT RFAD) IN INITTALTTFD COMMW--S00 YF INITIALIZE DATA SEL'FCTION PARAPFTERS

700 493911 !SFT DATA VARIABLES

1100* oup 4lrozlqibf !LEFATE FT-75 F~ w!R EACH LEVEL REOUIEF

1?50 YES INPUT NEW FILF NAME--IM- TFST.DAT

* 1400 15*11 !RANGE OF LEVELS FOR WHICH DM WILL BE OUTPUT

3500 7/ !EXIT PROGRAN?

3700 SORT/KFY(POSITT0N:?iSIZF:6) TEST.OAT TESTPv9KT 'SORTS BY PRESSUPE

Page 74: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

71

Appendix B.

Program Listings for POTEN

Page 75: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

72Fil50 PDTFi P1FNS: SHORT DIqCUMqENTtATON

100 KRR isw JSW KL IS T DESCRIPTION ___

150 - SHORT DOCUWNNTTION*200 1 -- COMPUTE REGRESSIONS POSW TSW

1106St0IJWNTAL SrTOMNS.400 2 --- INITTALT'ZF OITA SFLECTrON

*600 1 0 -- SET PSAAFTERSS SHORT irST.Tuo I - - 5ET PARMTER52 FULL L15T;gooL - STORPS COMMON IN FILE RPTC"

-W---4 1 - -C A-Vk-tV AVEAGIN' UROTNE_ 1000 5 ---- - NOT tSED

1100 7 - -NOT USED1Ouu - - L15T READER IRFORMATIO3V41500 9 LIST DATA REVCWtY.

2000 11 --- SET ISSW (SWITClI ARRAY,~7TO~I7 - -EXIT PRUGRAMOW

Page 76: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

731-- C C0"VPOEN.FOR FILE*. 01MENSIONgCOMMON AND EOUIVALENCE FOR POTFN4

96 C AVA~tABLF POTENTIAL PNERGY PROGRAMS. N,8RAY___

100 PARAMEITER KC"- 2035- 3(y AG YTE LB9PROVIFR-400 C

- C MW N S10 N466 C

SOONIO KHuGxl~uI,W5UvfI46Vr#VWTT7600 DIMENSION~ K-PTC!~IKCM)650 OT!4FNS ION PRESS433001

00 C716 c 1-.p# ( Cflnmm0N732 C _____

775 C REGTNNING OF STORED COMMON

825 CC O CAFGIQ4TN0 VF HEADEV

875 C ___

* -1000 COMMON WLATqXLOP40,WgTvXLTO*XLGO1100 COMM4ON 9*LS.LFgYSC~I~t(0~6Ct TON

_1125 CM-0- C RM TNG OF DATA- R1FMFXgUf---- --1175 C

*1300 CO"8OPK PFTOSODYV0

1500 COMF'fN PP9,THM,5'WMl1VV""m0 VrT1pfrlN DHqPEXWV

* ~1700 COMMON CP(8),ZICTIB)g4,F1,FZ,F3____________-fI r IL I

1724 C FNI nFl KAUF

*1750 COMMON DFLP,DP* VRO00 CUORMtt!N AI, A79AT3 VIV 9,W3

*1859 COMMO4N JMAX1962 C

-- 1874 C FNV IFl STORED CO8MOP

2000 rflp9~fN P(3300pTf30OO),S(330019OV133001 _____

? 200 COMMON R(~gt)6~lg(1C469RS?"D0 rvnlqvN ET(6)9JFxvf)2400 rn""nrN WT(60019JSHP1600)

- 2425 r"JqW DATRXM13IY-27)2450 CO"MVN JSTNJRRAXoq1,NZ

* -2500 C7531 C FoUYrvalf'CE --

21566 C--Thblo FQUTVALFXC F fKffl79,TTWFJlrWWUFqJWrPFJ2700 FOUTVALENCE fPD1l~qAl)qlVRPF)fMKTTW*KPYC~l

2400 C

Page 77: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

74100 C INEX RECORD FICLOS OECOPP0SED2 00 C USES LiftELLED COnMf1N 2 USE INCLUDE STATFENTf TO MEWGEF INTO PROGS.300 C ROM MAR 27 1990'.00 C ARRAY IOWRFC CONTAtRS TWE INDEX RECORD -

_406 C AlWAYS THEF- FIRS T qnECORDbi - ATA F-LE600 C IORTEC HAS THE SANE STRUCTURE IN TH~E SUPINOFX' FILE

800 COMqi4N/TM0X/ IGYRFICf2561

1000 C LPGVER IS AN ACSI' DESCRIPTIONOF LOADIWG PPOGRIkP VERSION110-0 INTFGER LPGVFRP(41,qLfrtREC _

_110' C AAV AND LftKFE Cf ASCIIA 6DAF I FL'CRA11.00 INTEGER LOATEM3ALTIE(2115A00 C DEVICE AND FISPEC PORM A COMPLETE FILE SPFCI'FIER1600 - NTEGFR FILSPEC1M),EVICE____

i~oo fRED ARRAY HAS TPIP SAN - TUTR SCTD? YX OWA1800 INTEGER IFHED(9O),ICwNT(35) __ _

1IAWo t O&IMR HAS THE _LOCA(T ONS dF THE 8E(Z!NNING WORDOF6__2000 C TNFIQ1ATION FIELDS (IV THE INDEX RECORD

* lu E;0 U 1UT7775 H1tAU-( Z-A5lKfVIRT'U DATA UESNURIPTUR5 I-TAPE WFIEf 'SPEC2200 INTEGER CNTRL(6).21630 C_ VARDIES -ARRAYS-CNANARVAE ARA8EDSRPOS - --

7400 C MI.W/NA.X VALUFS IVARDE'S CONTAINS MNEMNICIDPNTIFFRl$

Moo60 EOUIVALFNCE(KEYlDIDXRFC(M)1100 F0U1YA[ENEfUNTRlIIDUXRFCfJl2800 C LSY'RFC IS THE NEXT AVAILABLE RECORD IN SUBINIDEX FILE 1ST REC. ONLY

3000 - FOUIVALENCE(TFWEODI),IDXREC(13.I1

3200 FOUTVALENCE(KSCVIIlDXRECW10O5))

3400 EOUIVALENCE(MSCA#,ID)XRECI106h,(rSCANS,,IDXREC(112;)* 10rOIUMVALENCT (PMTfMOn O

* 3600 - F0UTVALfNCE(NTOTp!OXREC(l083)-rM "70~UTVAMMLFNCFPTXFCY4~-tFU9 R~lq

* 3800 EQUIVALENCE

4000 7,1 IFHED(7),9TYR) ol I'FHFDIS) 9IMO), T"PHE(9) TDAP* 4 TOU - loitIFHED l YTP'OY9 , THF Tvyrr wI- -

4200 441 IFMED(131 *ILR4Sf)tvf FHD141vdLNSM)q

4400 6of I FME0(191 ITED) I, (I FHE 0 20) TLTfM)

4600 8 V(I F 14D 2 3 ,ETW I)v,(IF HE 0( 10 f1 IqfI7a0 9; (TFHEO( 385, IrC-AMT~v

4800 Xv(IFHED(55JTCMNTl* '.qou Cws *0 ***i* o

5000 EQUIVALENCE

5200 ? 2 DT~3IXE19),LIE(3IXE~ql

5400 C R"AX IS THE LAST RECORD OF A DATA FILE5500 C' -luxuL -15 THE-ItFuIT -VT 1F_'TW 1ux F ILFOW T E T TU MR IiF5600 4,IRNAXIOXREC(201I iIDXLOCIDXRPC(?O8)1

580Csso******************e*********s**s- C WWLIFL1.U CURURFOR 'TVMDFT-' t DW W-- - - - -

6000 C**************.**.*.*e...~~...*...

Page 78: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

75* j ~I0~ C PO1'FN MAIN PRt'G ********I4***********

200 PRnGRAP POTEN_____

400 C5~W- - C PW(YJ;PAM TO C0PUTEr -R-#NC (WF~ FLA~fVI Tfv PF fa*b00 C CALCULATION OF AVA!LA8LE POTENTIAL ENERGY. REGRESS-TOM-7UU - -C--TT - ARE- 14ADIF~ -Tn VX UR-F-- ANWPITTETfML -TFRPPTFATUI ASmoo C FUNCTYONS OF SPFCYPFIC VOLU14e ANOMALY AT PFO. j'iou c

-~1000 C JUNEF 28 1976 N FOFTnOF.F

1?00 rNCLUDE 0CO'MPOTPK.FOR9

mo C1400 C OPIPW BINARY FILF FOP STORAGE OF CORMON

1600 OPEN(UNITul0,WNANE-'KPTCM.DAT,fACCE-SS*'TYIRfCT ,'TYP~mr'fL0*

1800 1 CONTINUE

7000 K(IN -5

?200 KLIST *4

71"KnUT.2400 KTP t--1-0 - 3ff WRITF(-KTTY9117001---------------------2600 1000 FWPRMAT(IH ,'PfYIEN: POTENTIAL ENERGY P"MJRAM' I

2900 GO Tn 5079 OU C3000 C CREATE NFW RFNARY F-tLF FFOR STORAGE OF COMMON TF NO OLD ONE EXISTS-

3200 1100 OPEN(UNIT-10,N4ANF.'KPTCM.oDAT',*ACCFSS*'TRECT' ,TYPFQNIEWo

3400 GO TO I

Page 79: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

76

* 200 'SURROUTINE PTENS'__300 C *******#*********************400 C

PO C RO G*RA 1 70 -COM WU TE RFt-~ WTCE StUR~fA~tfSWCW I lyv TOr -prFra*

600 C CALCULATION OF AVAILABLE POTENTIAL ENERGY. IRGRESSlOR_7W C 'FT'S -ARE MADETW ~sW WO WTLTPAUrA800 C FURVY!ONS OF SPECIFIC VnLUMF ANOMALY AT PF*

1000 -~C JUNP 28 1976 N FOFOtt)F'

1200 C "ODIFiFn TO ACCEPT CTD78 VAX DISC DATA AS INPUT 1SDIFC8 NBRAYO.

1400 IIIMFNSION Df5)vDYC(1jn1 1500 c1600 INCLUDE 9COMPOTF-q.FORG

1800 CHARACTFR*9 DOC __

.4 -- Tq o _C_----- - _ _

2000 KIN -5?Iva

-2160 WRITE(KTTX940)

72-O 4U FORMAT (IH 9 1 nrTTAtrzFo OWiYF_R W F~7280 TF(NOYES(KIrJKT1?X).NE.1GO TO 14

* 2400 C INITIALIZE DATA SELECTION PARAMETER'S

2520 CALL nATAIKTV,'-l) -.--

-- 715"GO- TO 3O7640 14 RFADh1091)KPTCR

--. 770'0- iff WRTWIX(TT,2D1 "2800 20 FORMATfIH 9IT!'IALIZF REGRESION PARAWIETERS EYES fiR N'II?v

3000 RFADfl0'1,FD-l9)KPTCP7700 5 WR TTE (KrTTT~z 211_- -

3100 25 FORPAT(IOWMAT IS THF RESOLUTW'N OF TME INPUT DATA,' IN OR?ft

3450 KL!ST - 631500 10 WRITIwTTl00R)iKRI5WJ'WKT5TRUUTKTI

3600 1005 FnRMAT(lH ,'PfKBRJ5WJ5~gW,'EL5TROUT,KTP4(NW'-,?T411WD- READ UwrN 9 )KWw0TSV;9JSu-,L 1V3T~vXww V 9W7W~

'~3900 IF(KBR.CT,121KRQull

0 4100 17 GO TO(100,ZOOw3004 0 0,500,60 0 u1 7 O 3 ,8 0 0 99 0 0 ,lOOO)9lIOOIZOO09lOD,

ItioJ~O

4200 C-m 3 C -~****~ ay Th'*W**# #*$*%**-

4400 15 K1YPE a0

4600 MRUF *46

4900 NPR(lI - 4vwNPtz21 u 1?- - -- -

S000 NPP(3) *17

5200 NPR(5) *50

5400 N4Pft() a100

5600 NPR(91 500 _ ____

Page 80: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

77*~~O (I IW0 N(1I *

5900 NPQU1 a 2EUu - -- __TT__ar

6100 NPRI14) a 136PR005 a 13

6300 NSCM1 a 0N'~f(2) - 400

6500 Nsr (3) a 100 ____

6700 Nsf(5) a 350006-00 NSC(6) a66900 NSf(7) - 57000 NSC(S) 47100 NSC(9) -3'tug7300 NSC(11) 201400 NSC117) 30

- - 7500 NSC(1U a 407600 NSC(14) 57700 P4sfltl)a 60 - _ _ _ _ _ _

7720 ISHP -= Y7730 C Ru IS -I?740 Jppf)J - 3

*7750 Go PS?800 30 DFLP-?.

8000 16 VR(J) a 0.08140 PnIFF - 6.0

- . 200 A2 1 .0

8400 LTYPF 1

8600 N v

Ploo Nrn' a I18800 a o

M925 0!] 17 J-1916

8975 17 fl]NTINUF

9100 C-*****s SEFCT nATA AND0 COMPUTF 41*e***eq*-97" 1013 CALL. c-ns-

9300 GO T!] 10w~~u C9500 C !AJTTrALYFF DATA SELECI'ON PAP*MFTERS #2 **~******

- q (60F C

9700 200 CALL DATA IKTP-,-Iqoo C I*9'**9v**9**SET PR~FS#9900 100 WR1TFIKLIST,30O)TtNKSWA2.A3,WGTPFJIFF1000 -- -

10100 W01TEMKLST,30M0)DLP10100 R1'A0(KTMl,*1t3EtP'10300 IF(YSWIlO,10,)10104-00 C10,500 C SUBRVUjTTNF Tn ACC~EPT RFGVFSSIO)N PARAMETERS IN4 ENGLISM AwnL'JOLI c I.u1Wvomr Y11 V'ltri 11R M19L-TER-

10700 C108073 31a CALL PARA1410900 WRITE(KLIST93011lIM~ C VfTM1T OUfT PnTEP4 FOWItT P1IFTA P'

Page 81: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

11100 -1?O F0*?.AY(OSECTlnN LFILLFVEL INDEX START I OFl f nFvf,11200 N IM 9'NU"!iFR P4UMRFR INTFRVAL PRESSURE TE9MS CYCtFS')11300 NSFaNsrcTTON

_11_400 n0 330 1alNSF11I-INSF

11600 IZ-1.2*NSE -WTTO woTF-(KAST9 115-1ri NOR a 9( I tJNP 40t1) tD12)9N$C1)C0 I 1,N9'stf(I

11800 335 FfRMAT113f,618:)19 33U UUNTINUF_

12000 C CHANIGIE nP LIST DATA SPLIECTION PIRARIFTERS1_2100 CALL nATA(KTPIO)12200 C-1-Y3-60 C rHAmcrE nR LIST DATA L!A-SI. A IDEN"T1F_ THE D'ATA 10fURcEF12400 C _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

12500 WRfT-E(KTTY,3015) (LBL.(1)1113)12600 IF INOYES(KIfNlt!TTX1.FQ.1 )THEN--

12700 QTF (l(L IST91.0101

12*00 EN XIN

13000 C1jipou U S1U~t CUPPON TU HINWRY FILE KPTCPM1 3200 C10250 TF(JSW.NE.?)T'IFN

-~13300 WRITF(10'1)KPTC:M

13400 GO Tn I n1 _ _ _ _ _ _ _ _ _ _ _ _ _ _ __ _ _ _ _ _ _ _ _ _ _ _ _ _ _

1VgJOO c*13600 1000 FORMATU H ,TN*X(SWvsnpPSDTvVGTvPI)IFF"9/*214i3F6.?Vf7.0)

~V~T00 40ns FORMAT(IMNCPNND%,1,03£ 13800 1006 FnPMAT11 9'PWFSSURE CONSTANTT 'S14)

1:3-900 1010 F0RPIATlHM9 ,'tSEV YL AAEL (27 CH14000 1015 FORMAMqH ,'I'qPUT NEW LAREL? OLD ZABEL I'S* 4?,,34

14200 C--3 " - C ******AECTGSVBR[UTP4NT **_*4*JW**14400 400 CALL AVRCP

*-4VU GO Tn In)14600 C *4********* 15 NOT PRESFNTLY USED ****e**14700 AOU GO TO 10

*14800 C mGR 5'I "GO C KTPEP 5* 15000 C JMAX 23

T 510 a C KOUT *I ----

* 1200 C 501 no0 SOS P-9911

*15400 c 505 cp(xWi - 0.0t155D0o C 150? WRTTFWTT,5OI1)KOUTNGRJIATt-WTI153600 CSOIO FnRMAT(IH 0 AVVF:KOUTNGRPJWtAXKINP' /4,44

1-51M C 1517 RF8OrWT14,.IKMUnr'4GV,-JWAr-rW7- -- --

15800 C DO0 530 Jw1,NGR109o C' nU 570 JR-193M~kY16000 C RVAD(K!NP,*IfPSTKPR,(DWK),K.I,5)r6T0cy C 1IPPIT) -- W16200 C no 52n ma9,l11- c C ?u cwRtig - Cvtlvw) # nt(i-Ri16400 C 530 CONTINUE

16600 C no 540 r-19j"AX'T67UU C 5411 twIIJI u CwhI9iIfFLrRlT(NGltJ

_16800 C 545 00 550 fu1,JMAXTW'FU, C WtfTrW0VT, eT,-9w T9 rr1,t~,-E)w91T

Page 82: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

-17000 C 550 CONTINUE 7

17100 C KnUT - _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 24__ _ __ _

L reuu C -R'~ N 11TOU.417300 C GO TO (501,507,? 5459IOJ!Sw

1740U C5000 FflPMATfT4,Tv5,P5F10O.4117500 C ***********LIST DATA LARFL #6 ******************

_y7_806 600 WO trE(KL IST 05 LLK,(1I17900 GO TO 10I a up UY AO 7 15FPWWA H 913r11fy18100lo C ******* 7 NOT PRESENTLY SD************~19200 C 703 mrnF a n18300 C 702 CALL RFAn(KnUTvKBUFM8UF%!TF1t8400o C TF(IF0r)720q,704v704 -

18500 C 704 m~nF - oMOO -r ~70.3~ v~,t~.Vt18700 C 710 On 715 "ul,MHORtT"00 C 715 IKHOG(M) - KXIJFIW)18900 C GO TO 8001W'UGO C -721 IFI"EOF)10,7Tro -'

19100 C 725 MFPF a 1L'feUU -' 1. iU 1 n19300 703 GO Tfl 101940D C 4***********LTST HEAV)FR ~CP 8**A**-***.*19500 800 WPITE(KLIST,8000)(L98L(KJKa1,3JvYLATXL0NGXLTOXLG0

1W5T~U W R I TE ( XL. 1ST, WYO05 YUT'! PF , MM4W-9-R1r '"~ ,l7tI T, _J"TYTF R ,LUR19~j00 CO TO 10

20200 8005 FORMAT(I, VTPE MDMR ICON SHIP CAST JD&Y IPR LPR',9,8!5)-70100 C ##**********LIST DA-TA -R!FrnR O9V I4**I*4T****

*20400 900 WPTfLS*00IFi~Tg~DnPiH*~D~lvZ_7030-0 0 3 IF T TS S w( a903 94-V11

20600 905. WPTTFIKL!5T99fl5) CP (KI K-1,PIIz 0 , pu WRITE(KI ST%,9OIn1(CTfKIK-1,7420800 GO TO 10-7099D 9000 FOfWPAT(IH tr7rF.F7,7zPF421000 9M05 FnRMAT(IH 93IICP ,6F11..)

* 2ttOO 91-0 FOPMAT(1H wiIICTfll)21?00 C ***$********"4AG TAPF FUNCTInNS 010 ***********MOO C100 Cr -- 'Ilkt rp Mr!f 5w,03swqI 1)112 1400 C KL!ST - 6215,00 1000 GO TO 1021600 CS ****** SET ISSW SWITCHFS III****71-700 1100 ~TETU0 rltr-sww K1~h21800 ]I50 FngAAT(2(IH ,,14I)'ENTER XISSW(X1I'1

22000 CV) TO 1n

22200 C ****** Y!T PROGRAM 412 ***********#**2't300 1200 WRTTf (TTKv ln22400 rF(NnYEs(K!NtKTTX),NF.1)GO TO 10 _____ ____

22600 1710 FtIPMAT(IH ,'FW!T PROGRAM?*)7700 C#9 PVTN: SH"RT 0' T1JRFTATTON --wR-Awt 722800 130(1 OPFNEUNI T-50,NAMqE.'POTINI~nC' TYPE.'0LT*,RAOILYI7900 nn0 1150 Na 1906 -

Z3000 PFAD450,1325.PNDu1312)I00C(1 ?4Il,1 ________

MOO0 1150 CfONTINJFZ-73300 III? CUflSF11JN1T's5*23400 1175 FnQMATE8AA8

moo~G 113y FnRPAT(IH 9817I -

~~~ INI

Page 83: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

2V00Go To 10 8

23700 FWD

Page 84: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

-no c cnmps SUPPROr POTFN 8200 C ******* ******.*.***~**.*****

5 U A VfUTTNEC'fWS---400 r *************************#***

c600 C Tfl CORPUTF RFGRVSSION CnFPFICIENT5 AT SPFCIFIED DEPTMS.

g00 C JUNEJ 28 1976~ N FOFO~fOFFP-WyTWF13R T07W FORMYAT I PT DATA fVAX DT'sic vERSION)1---l~ I F

_ 1000 C N.BRAY-- ilI0 C

1200 INCLUnF 'COPnPWJTs'FOR*

1400 C _ _ _ _ _ _ _ _ _

11500 c C OTPUT IS FOUES~T TWN OUTPUT TO JSH-FPTN FILE TW ~ -

1600 C NURR OF STATTORS"0C0 C

*1800 100 CONTINUE-21 0G C

*2200 C JPYTTALIZE AND ACCESS INDEX FILE ANID CRUIISE INFORMATION

.12400 CALL nATA(KTP,?)- 2?5-00 r

2600 C SF~tN COMPUTATInN FIR 15W TOTAL STATIONS

* 2800 tF(T5W.GT.LLREC)ISW-LLRfC____

3000 C--",G C RFEJO STATION HFADFR "ONl UNIT KTP -AND CI4ECR IF IT PFFTS3?00 C SFLFCTION CQ!TEQIA

* 3300 C REAM TFPFREATURF A4D SALINITY DATA INTn DTATA ARRAY.*3400 C

-. 4000 GO TO ?fl0TOO 106 rnNTINUF

420 RFUVN TO PTFNS-- 4400 C

4600 Ca4700 C rOPYPUTF PEGRESSION YFRSTrTh flF1DATA-*4800 c ir rsswti3)--i OUTPUT TO FILE **REG

4q00 C MTSrFLLANFOIJS INF1WARTT1I MY-RF RtUtSTF0 T18F PWRITEI)oo C TO FILE PINTePTN (IKLIST-4) RY SFTTINQ ISS55W AL U ES

5200 C* 5300 C '(TYPF DISTINJGUISHIES BETWEEN HEADER WD! nATA' RECOMDS6!

5400 C 0oflATA, I-HFADFR.SIM50 C '(F,.TKO ARE INT)ICF'S5600 C N TS POLYNn"IAL IRDER1)ruu L T)5TJF ATA V.Y-Ltt's D~t-W Wiii'7 Kt.-)3UIT~ IN PtIJUW~TU

* '800 C '(EQQ COuNTS THE N OF RFPLACEPSENTS R~ABE 4Y S"~R EDIT'1~oo C TIN EAr4 PE'JPESSIllW T'NTERVAL6000 C IPR ANn UP XEEP TRACK OF PRESSURE AS AN INDEX6100 C IRFC INDFXPS THF Lr"YL5N PF6700 Cslou - 7UU 1lITTRu6400 V(F 2

-"00N *NSC(NSFCTrTIN'.1)

4600 NnP *NSC(2*Vf5FCTTnNlN.1

6700 yNop * NUp

Page 85: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

826400

*7000 XERP a

7400 C- -7500 C COMIPU1F P FSSIIONS

-7600 C O

7666 C7632 no 7155 W-T~jTpw-W

*7714 P(8P4RPFSS(Pft7710 T(N)aPATA(Mol 1?746 S(M)sDATAX(M"?)7779 2155 CONTINUE7800 ?10 7)0 270 JatlJMAX

*7900 C SURR JPR CflMPUTFS CrYRRECT PRESSURE Pf GIVEN SECTION ANT)'IW 50 C TWYFRVAL INFORMATT711

8100 C8-70-0IP ftJPR(crREP SP4cT!0N -

s* 830 FfIPF0.NSCIKF))TfN

*10600 NnR - NSC(KF+2*NSECTION)* *- ro XNOP -*n

10733 KF u KF + IU7O66 1F-10900 INI) (lP-PRESS(l'?J/DELP + I

11000 "2~ lNtP~-

11040 M1I1 YW6 0 R?-4DP-

*11080 FNDIF11100 IIM2.(,f.J~wqA~IbU 11 OU

* -~13400 C If PSSW(51--l WRITE OlUT SCAN 0, SCALED PRESSIJRE, TEJIP,135UD C 5 ttTTV. -

*13600 C13710TF(TSSWf5JJI71'694 97

*13800 216 WPTTE(KLIST,2160) (XPIK),T(K)ISIK),K'&1,89Z)

14000 717 CONTINUE14"oU c14900 c PERfnRM REGRESSIONS OVER INTERVAL CORRESPON!IYTWG TO PF

15100 C F-TRST, FIND MEANS OF PS.

-- 15300 ?20 PF - IP

*15500 SM - 0.0IT600 THM - 0.014;700 DYP - 0.0

_ 15900 S0 - 0.01,6000 OVO - 0.0 -

*16100 Xm a 0.016700 ?31 130 730 me ml9,8?16300 p" Pp * P(m)

16500 P8 a P"fXN0P..........1,1600 5p8. pf XmmP16700 ?35 00 250 M u*81,8Z

Page 86: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

17000 RFFF(RF TO APFTHPS.)

17400 232 TK-THM * TIM)0 tnVf4 - Y)M + (ovrM

1______00 __ PT(MJ w - M

18000 C FIF CLUARE MIlNTL ND : MAX SPEIF C VOLUM VOLU"ANAWITHIN

IM400 36 F1 - 1PYXt81500 F? -*

* 1W'TO 7377 F1 - l)VX- 16800 ?38 IF(F2-DVY)?382*239,?39

* 15'UU 71,87 F( 7 ETVA*19000 739 CONTINUE

19-4-0 TF(AS(P(M)-PF)-POFFI?4092401,?5019500 C1.9 1~60 c AVVWACF T,SOv flVFt PE * PDF-F~19700 CV180 __W5 _7-__T07 T IM)-___19900 SO - SO + S(m)

-- MOOG OVe - nWo + Dv(l")20100 XN XN * 1.0700 ?SID CONTTNUF

*20300 THM *THMfXNOP

20500 DYF nVZ D60-0 Tn TnIXR

*20700 SO -SO/XN

20-800 D~f) - fVOITN220900 c

Z1000 IC 5URUT21100 C

21-200 503 CALL LSFT21100 C71400 C TIr YSSW(10)--l PQT11T OUT RF T0FTTTFWTNT' LFVFLZ1500 CeLb~uu 7Nn7----FTT5SSTqt) lf7,1,9721700 751 nn 2sio m",m?21100 nV! - fVAfP1,~Tfr),S(Fj)

Z1900 PTO - PTfm) -P2Z7U0 T0 a TT(m) Z-TH22100 7510 WPTITE (XL IST,751 1) My P(M)TH(MI '(MI i n_,V I OV (M)qP TD, TTz777uu7~? _ _

22300 7511 PIOMAT(IM vr4vF?.1,2F7*3,3F7*2v f7.3,KF6.3,F?.44o2F3%0)72400 WR ITF (VL I T , 515) ((CP fplwi-it,1pm22500 WRYTTFIKLIST9?z 5) (CT(8),?q-INIOVM

?M60 5 FflR9AT(lI4 6F1I.S)22700 C__ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

zzuuu 5 FT~I ~i~I t t~ THA 49-HFCKru IJ NY PW1TTT"~u22900 C A2 TINES THF STO OFY 71 (DEFAULT 13 3),p IN1Y EXCLUDIF, RE-FDITs71000 C21100 753 F (K F RR.,G T .3 1 E N21133 W'jTF(XLIST,253O1--

Page 87: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

84

-21166 25100 ~Fln*ATtI H 0'IWO I GRFAT-f tHN3--Et fI G IVE f'UP0I23177 Ct' TO ?536z 3155 IYNu If-

23194 IF IKFRR) 25369Z9'532 9253 252'Otl ?535- MaM1,kz -

23300 IF IA8S(PT(MJ-PMI-A2*71)2535,2534,2534_

21s00 C CALL EDITING SU8OUTINE________________________

Z3600 C-23700 2534 CALL FOIT(KERR)

.1750 IF (ERR 15,?n09220 -.

2377S ?537 TF(ISSWf3)Eo.~-)THENr)Vli DVI I Pf -,TETW f -P I R V-T (XV93TWYj;PFJ, 1 - 191.)

Z382S WRITEfKLISTvSl7O1PIPI),DVI238-10 2 £ 0F FO-Uu(PIL vF9*t~-f.(g~ FLMAGOE IM' clIJP7v SO I uT

* 23875 X INTERPOLATION OF 1'OR5T7W333-- -FT

23891 GO TO 220 ___

-Z 1900 - Z75 tUNTTNUF --

24000 2536 KERR - 0e16iuu L~24200 C TF 9UTPUT IS RFOUESTEO WRITE DATA BUFFER KffUF TO PILE **REG

24400 IFfISSW(13)12S5,260vZ60- -

* Z ~~755 --55 1IT~Tr-U!WU

24600 C

-Tt4Zvqm 260 U ISS'W12) ?Z"4267,976T

425000 765 WRIT(KLtST,2'65t)!*RECPFTO,'T0jDV0,DVIjSMTH14i?17?,NND-P --2'3T0D 765VY FulWWITTIR -9-1 F -o F-f 39NiWe39F e4-vT25200 26? CONTINUEZI)JUU Mc- 5MN *

25400 770 CONTINUE7 50D Z8-U FfS If18i9

25600 2853 CLOSE(UNIT&KOIITP

I' 25800 FWD

Page 88: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

85--too0 -C AVRCP SUPPROG POI'EI4*44£~I~*4******4**150 C * * * * * * * * * *i.* * * * * * * * * * * * ** * * . *

4 300 C

500 C SU9*OUTINF TO AVFRAGF SPECIFIC VOLURF ANT) CITFFCIENTS,

700 C JUNE 28 1976 N FT)F0POFF?.3u C MUUiY;iEu FUR VIXpr-U)( CT1J73 FURAJ VDEURD N; BR~AY

400 a NCLUDE 9COMPO0Tm.F:(0*1000 C

--100 C fOINENSION1200 C

14#00 nrflINsION APF(l00),SVI(jo03,EOD(l00J

1600 Ci-760 tCHI'RACTFU

*1800 CI1700 CmWAT"417FWARFr~ 019GNARF2000 CNARACTFR*l TVI#'YV2,YV32FI-00 C2700 C FQUrVALFNCF

- ~130D C24100 FQUIVALENCE tCRi!HDr,,pF_,VR)2.500U tU~VLN~-k Li9V 1111RUJ 1,IIRII,!I, 1'AJIIKILJrT,,)VYZ2600 FOUIVALENCF ICRI1,12),APF)qvI'qtN9CR( II?.,wVPMAXCR(1I,13))

* 2900 C READ IN STATION N*S TO RE AVEPAGED. ENCODE INTO CURRESvfONnINO7MOU C FYLIE RJafESO3100 r3100 IF tT 9. I I TITER3300 RFWINn 1235DO Dn 61 R-1,1003600 RFhftl1?hl),E~mu?)MFvNAE(K I, WT(I)-3700 610 FrlRAT(l4,A1ZF15.7)3900 61 CONTINUF

3932 JSTNwK-1

4000 ENnIF

41200 C AYPRAGING

4400 100 15W2 - 1W -2

4600 CW 4700 C SPAWIOI I-t'JTrA-L AIEWAGI4G-8ftWS WRF'4800 101 no 110 J01,100

* 5000 110 CRIJo1) a0.0

5200 C11010 C RA'tWC~ES ? AMID 3 RE1?11 W)4fP54100 Clglo II r-wrw,-______ __

5600 C170-0 C VIP APPROP I A'rF FtP, Vf- ?iV7%So 58011 20 K1J

V0 171 guvT

Page 89: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

6050FORMI-OUNF0RMArTED61fi100 0EAD(KnTKRHO6200 Nswas___

6400 C CY4ECK IF DATA SELECTION PARAMETERS ARE SAT13VIEDo IF NI)T,

6600 Cb-ruu CLL D51ATKU!,9'sW

* 6800 rffNSW.NFS)G0 TO 1200

7--000 LO.PP1000

* 7200 82-0.07306 R3-0.0

* 7400 C_____-716 -C VPF TSSWtf15 m-A WFrQT R AE ~~JIPPNFLTOHRIE7600 C THEY ARE SET To I., _______

7800 I FISSW (15) 1135091357, 1357* qu I5U WGI a WTIIT

8000 GO TO 1370 _____

AnTo V3 s WG1 1.08200 1170J TF(ISW2)IZO9l2O,138 ____

8400 C ARANCHFS I AND ?C074TINUE HERE FROM S'YT TEVT 013?09,oo cF4600 120 READ(XOJITvN04mI601fKUF

T7~~o~~ GO TO 140 - -- -- --

* 9000 C

9200 139 CONTINUE_____

* 9400 C OPEN NFW FILE NA4ED *.AVG CORRESPONDING TO INPUT #o.REGo FOR OUTPUT -

9600 C9900 G9NORTEill-FRAIFKK1I 11:8)

10000 OPFN(UNIT.11,[email protected]@UNFOR"ATTEDtI

10200 C WRITE HFADFR TO *.'AVt ______________

tD0 - -C -- _ _ _ _ _ _ _ __ _

10400 WRITF(1IilfHDCI U-5u U TUL IL er10600 C~tO70 C t 'WWTNHFS I AND 2-7 VYTWT11IUE HERE IWRUV YTATEflFV-T T1nZa7- .

10800 C090 -1-4U- TFR1TRCM1Uk 41ATL

11000 14? IP"X - IRECLZILO, 1,

11?00 C

11400 C-- Tl5 0--- -tT-tIRTTNUF-

11600 1475 DEL - SVA(TRECI - V14Li~at rIrritctu LML e'CVL'9C9.71ptep9Io

11600 MOM~l a CPRI1) * PM~ --TTVUW - m 1 I"~ ',------------__

* 12000 I50 CR(TRFCtJ) *CR#IWEC;Jl WGT#CPR(JI __

'210

Page 90: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

87I ?M10 -C flWANCH ?PlFTUR4S -rf7 READ N VT-0kA'AtCOVD flQO -#! f12300 C

12500 C-C RANCH I CC'NTINLIFl F-RM ST-ATFMFgr4A1I6

1?700 CtIauD 1515 r'NTINUF12900 158 SVA(IRFC) -9VA(IRFC) + WGT*ffVM ______

135000 - VRTN(TTT-CTV- YNThTfM. VUYTWI -13100 VWAX(IRFC) : VRAX(TREC) * WGT*FZ

I~O*O~ SVT(TRPC) - SYMP1#C)__ 3250 * 15PgXCASTvICV)N,0ELP)

-30 5IECT(TPFC) T( FC.WT -

13400 CL130 CJ)U B1. WC SU I ,tTTNS lU ~KtAV ft I AIA WEILUNU FWU19 Wo~

*13600 C137"- GO TO 1?0-13800 160 CLOSEIIJN!TaKOJT)

-1 ~ CLOSE(UNT*I IT -- .1..--

14#000 fFfPK.LT.JSTN)G1 TV) 120014 lLUU I FITTW2 6 s16 1 9 ?14200 tV430 C RRANCH I CII)NTINUFS rROM -PRVVTG J-S'TflEMN'T

11%400 C-4-500" 161 Tin 1605 Julq,1RYI~14600 V(4!N(Jl - V*l-t4IJ)/SWGT(J)

I IT F00- Y-AX13 - VrMAK~JWMGWJr* 14800 -SVIIJ) a SV1(JI/SWdCT(J)-- - - - - ----. .-

-lw~u 16DS VAIJ) a SVA!iJ)I5WGTr-Jl115000 rF(7SW?)180v180,009

15200 , RRA1CH 2 CONTINUES FROM STATFMFNT PRECFED!PEG 0161 ___

I15-300 C AVFWAGE REGRF5 CgrFPCINT5*154#00 C

IWD 110 T)FLR - 0.015600 PPR a 0.0

t500KF 7115800 N *NSC(NSFC1' VN.'1)1500v7 i fSC 2 U ir19 )e~ I I I4L1

16000 TF(tSSWf11).Ff2.-l)WPTTEKLIST,916-230)1mDo f7 161 Jel,rWm)C -- - - -

16200 IF IJPR IJ ,NPP ,4SPCTTOIN -NSC (XF? 116l2,1611,1612'I t630Gi~ 1411 N - 14sc(x I T I YINJ---------- -

16400 NDP -NSC(KF+2*NSECT ION)______ -- -~- -- -_ _ _ _ _______-16600 1612 DO 162 Ia1,N

1 1-mo 16? CPM(T) - CRtJP1TS1If~lT(J)-16800 PF - JPRIJjNPRNSFCTION)16h900 T I TS'SW I I) I I671-"-f74,pt62417000 1621 WRITFIKL15T916?3)PF,(CP1),llNI

17200 16?30 FflPAMATC1H ,'4WERAGFID REGRESSION COFFFTr1fNTSz',pl-

17400t? OOr 16?4 DVI - SVAIJ) -

17600 DYF - 0YVZ~0IPF,'DV1 P.C~~M'vMNJ.9VAtIT"gCSiI Tro - tt 5uJ - V17800 SVA(J) - nVF

I7WT)FtP1 - Pf- PWI17933 E0RIJ) a r)POVIO)VFofV!,CPMNVINIJ)oVMRX,(J1)t79,66 FOPIJ) a V./SlYRJ1

Page 91: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

8818000 82 - .5O968F-6*(PF*Oa- A*PPR#Ofa8)#FLPl18100 81 = Do SE-5*WOftA4DELP) *DELP I____

t 8300 16 APFM1 - 8?

iss150 -16o GO TO 1626TUW IO -AP-FIJ) -4APJ~Ij-48218700 VMAX(J) - VMA'XIJ-11 83

18900 PPR 0 FP-1900 - 163 CqNT!Nuf

_19100 C1MO C RRNC~SI ANMO 2 C0NflNu N~ R T1PW IZ61-t l OU&LI~tFR

19100 C IRPLIFO EPJ7 OF STAIO#.19400 C IF ISSW(12 =- PRTRT OUT AVERAGES19500 180 tF(TSSW(12))18?,400q400

19700 1832 FORMATI9 'IRTFC NST PF*,6Xw9"~ ~, ''VX,0FX

19900 SM'AXI)

20000UL VU Lnj IM9120100 KPR a JPR(1,N7 R',NSfCTION)

Z250 183 TF(ISW.EO.?JIWRITE(KLTST,1835J1,NrSTKPR,(fCR(TyKKmql)~~WT8W FORIWITUR 7fIF IY_

*20400 GO TO 400

20600 C PitANCH 3 CONTINUES "ERE PROP STATe"WT #11#6

20800 300 OYF - SY~f IRE-C)

21000 PT a POLY( DVPFVVMCPtNvFI,9F21 PPZ J. U IFIVIIjU1,3Q(*0IJ2

21200 301 PT - 0.0------------------------M Wo-----302-- TKI4a 4 ~0.IW-V~v~. TI21400 303 SF = I)VZRO(PF,1)Y~,PMPCPN6N0P.'FP ,IWPICAT!CY)

21600 DELP1 PF -PPW

~& 21800 3104 OELB -DELA ______

-7" 00 105 87 - R2 . O'W-#MF LA UELe,9otLPr- - -22000 83 - 83 + n. 10961F-6 #(PF*OEL A*PPR *DELg) *DELP IM UDT0 Dw -f ~ 1 _______--_-- -

2700 PPR w PF

ee',uu off too rUI1tLI

22400 PE 832s" XPIF - APEtIREC) -

22600 C22 ?00o~ t- Tf- OTPUT- WEm]ESTED WR I F ATA-1flFILE~v22800 C

23000 310 WRITE(II)KOUF-M O-a - Th F lflt, Oi3b -~

-- Z3?00 C__ _ _ _ _ _ _ _ _ _

23300 IC- IV P-AP FO#MR1T 1TWPU I- uuOES Ito I itT I L Ii 1Wtm -REOEST-T~put

23400 Cd-Ci vv I3w1i~-ihi23600 3170 FORMAT(I ,'Nlt.N ,N3,KTOT'YR*I1Th,1ITYV?,IV3*V't5,v3gXAl))23T700 X wiv I-_ -

23800 IY. 732.90 s. - ----- -- - - _ ----- -- --- - - - - -

Page 92: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

89. . .r....

24300 1i*

24500 N3 3- VT-iS 6

2'.700 NV? a 4Z4800NVI - a

24900 WRITE(KTTX,3110)NI ,NZN3,KTOvIYR, !T'q~t~r, IVZ.13OF~0 *ANIKINi *IN 1/,029N3K TO, IV* 9 IT

2510 RFAO(K1Nv3l75).tVI,tV2,!V1Z15zouWO11TfRTTX91V~fiVNVlNV2,NV3

2S300 RAD(KIN9*)NVlNV?,NV3_____________

25500 3176 FOR"ATI1H vNYINY?,NV30v1T5)

?S2700 JSw a 0

25900 C NI TO N3 ARE EFFECTTVELY ICNORED, LP'LESS ISSWIS)--l. SEE STATEFNT fi%.

a6100 320 IF(TREC-NI)321voAI0,3?12-6700 121 IFITREC-N2)327,*70,3?226300 122 IF(IREC-N31120,3?A,120

76TUW 17-4 "NTTWUF26500 C(Otnuu F- -t:V VXLU- F-RUM MAPI IUKTRA VAKIIHLEt

*26700 C-Iw 124% Vol a Vp(NvII26900 Vq? a VR(MY21

-7-7u"Vol a VR(NVI)27100 C_______

* ~~zTZuo C IF '5W1101-- WWITF MAP VARTAR[ES Tfl UNIT XL!ST INJT IN4 MAP Fl~Y4?*27300 C O.4PCX PURPOSES ONLYi.

Z 7500 325 IF(TS5W110I?3?6.3??,3?7TT600 I7n WRYTEIRL 5T,'3Y5O) !CfN RFC TMPp,!CST90bfPl ,TOVO1 oVR?, VRI327700 x 014,Pf£I'auu L

27900 C IF MAP FORMAT WITl RF0UFSTFO9 RFTURf# TO STATEMENT 11?0 Tfl READ NEFXT DATA25000 C RFCVR r.?8100 c78700 C R-" FORMAT WRITTEN TO UNIT KTO28300 C____

Z15400 17 TF (153 W114 1) 33 13 1 70,728500 330 IFYLE * 0

Z960DTPF a PF28700 XLC a XLONG25800 135 WRITE IWTn,330O)ILR11L (p) ,14mt,21,Is!4PICASTLFTLFTPF,'Z8900 y XLATSXLG, JYR ,JOAYITM, 1V1,VQI, VZVR9t13,VR3

29100 1150 Fnt"A~TIH 913,-X,2!?,J.X,?F5.0,2F7.3.?F8.3,F6.3,P7.2)79700 11007 FRA~A,1,~1T,72Vu2NI,1,2',!TF.)?9100 C?94" C I 511(1-I ALLOWS ITPFCT'AL FUNCTIONS~ TO RE CTPUF--3tmTvAtT1q~ VALIJFS29,500 r AT 14F LFVFL FROM ANOTHEP AFFORE OUiTPUTING IN MAP FORMAT*

Z9700 41 O TFI!SSW16I)455,.3?4,3?4?94100 4151 Vol 0 VYRVI.

?9900 VR? a VPINV?)30(700 VV3 * Y9(MV3?

Page 93: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

300 - WTO -120go - ---

30200 470 ?FITSSWf8))4759P324,32430300 4719 VRI - RINVI) VRY30400 VR? - VRfNV?). VR?

_30600 GO TO 325

30800 C BRANCNES I AND 2 CONTIPIJF FROM 183 OR 180 ______

31000 C IF ISSW(7)-0- CONY1?4UF T04ROUGH RRAKC" 3 AUTURKT!CAttY.

31200 400 TFIISSWE7))550;4106410 __

3T1D 4I TsWi * w + F-31400 IF(I5W-3110091009420

31600 C BRANCH 3 CONTINUES' HERE FRtnm STATERPHTPRECE~ID4G 1161 - -

31800 -C IF MAP OUTPUT RE0UESTE0 SET LFILE TO I TO !W1VCATE EVPTWMAP FCRKAT.

*i 32000 470 TF(155W114))4l22560,560JCLVU off LFILE

32200 GO TO 3353--2300D 550 CONTINUEF32400 1?00 CONTINUE AT01GO 6.

32475 !F(NSW.N~e5.ANr.ISWE0.2lGn TO T61032487 rF(NSW.NE.5.;AW4O.19W.EO.3IG0 TO 42032500 1960 RETURN --

'16

Page 94: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

91--. m0 C rIATJA SURR PqfTN ***** 0'ATA 00#0*0*0**

500 SUBWIJUIII UMIAKVT1vRS0)

700 C *#****4**#*********

900 C TO SELECT ANfl ACCESS CTn78 FORMAT OATA FROM VAX DFISC FORMATC XrCf5;SF'S VARTDUS WMItwD SUEBRUTT~WFfUN0-TW-COITA11Tl;

1100 C

1300 C JAW fs 1976 N FOFnNOFFrT7DI 0 NBA1-400 C WOMYYFTED FUR CT')76 FTIWIRAT I'NP1T5 T E .WB Y1500 C

115" NCLUDE 'CUOWW.FlW'1600 C

IF0 C 1"M -MittAtt3 U1iY~i'jW SIMXTEMMS _______

1800 C-1"00 ITNCLUDE IT0WREC*DT'2100 C

-270ow c rl4wICTFR2300 C

?500 CZ600 C FIROCR Am2700 c2900 tF(Nsw.Fo.5l GO TV] so2900 !FINSWEO.?) GO TO 30

3100 C'3Z00 C NSW LESS THAN ZF991 INTTIALIlZ'EMUY~tCTOn PAW'ANFTER5S3300 c3"D 1 CONJTINUE

* 3500 Jno -07bou DAY-- ().3700 DAYZ 3;T5.I3sou XF~qm -18.

3900 XF'qX *190.04000XNMN - -0

4,100 XNMY 90.0

44300 XLGO - 70.00"I 44013 JSTN - I

4500 RFTIJRN46003 C4700 C NSW*O: LIST OR CHAN~GE' SLECTION PAR'AMETER5S4800 ( - -- - -

* - 4900 ?0 rONTYNUF

15000 177 WRTFUWLIST17lI0AYvrDAYZTJ-"D15100 1714 FlR"ATlH ,5IfAY:F.3,X,HDAY?*,F8.3'X,4HJD0: , 14)

* 5300 174 WRTTF(KLIST,175)XNXFMYXNMMNXN"X

5'500o RFAO(KyNv*)XE!RN9XEPXqXNMqNvXNMX"100 WR TTF Mlt5T-Pl77IXLT0,XtG05700 17? Ff1PMATfIH aH(7fRrT: 92(XqF8.3))58900 RFANKI~N, OPXtTl~tXLGD59q00 RETURN

6100 C NSW a 7: RFA!) FROM FILF STATIONS.PTW4 INFORWAinN T(' IfVPNTrFY6200 C 5-TATiflNs6300 f:6v400 40 ClnST I WUV

Page 95: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

92645-0 IF (l(sa.EO.11) THIEN6500 __WRITEI(TTY9310) ________ ____ ____

6607 WRTTE(KTTX,320)

6650 1O0 FORMATIA)-Of_6662" -11B _FlflAT(lH,'_4, v-TR-S-UFDR-CTDWWy-VE-sI (tot

= 6674 320 FORM'AT(IH 91ENTER SHIP CODEvCRUISE *,PW"J of)

V'bab 13U F1JPATAZ-peIJ__I

_6700 C6800 C WILLARD HEADER RELATED)SBOUIE

* 7000 CALL PVfR(PROVFRl!i0o CALL GVUIIISVT5Pv7UUI5v1FUJ)7150 CALL STATl'ONIOP0,KTP) _

-72-00 CALL INDEWfIX)7300 LPRVC - IDWRECt-9)

7325~~ LLWFC - LWF-C----------------------7337 KVST - 0rg~uv o

7500 RfTURN.. I -- 6" C

7700 C NSW = i: READ STATION4 HFADER, CHECK AGAINST D"ATA SEL'FCTTIIN CRITFVT A,.C 7W00_ X WD "A TEWPFW VWA4WSAL-IN'ITY rTffO IJIMARRAY.

7900 C

8300 IF(KUNeGTeLLREC) GO TO 620-__ ______CALL RECTOXKOR)-

* 9200 XLAT-SLATI)

9116 IPif - PP'IN

9366 LPR - XN*PRStNT+PMTrN

9500 ENC0DFf4v539LB0L(2))IFHEDf4)

9700 51 FORMAT(1391-01'1 4 FflRMAT(141

9900 C--in D C COIRPUTF JULIAN Y'Fll IJAY- ---- ---

u 10100 C CHFtK AGAINST SELECTION PARAMETERS

10300 1 DAY-KDAY( IDAIlMo, TYR)-KDAY( 31,1Z TYR--1).

10400 TF(nAY-AYIj)620i6029602T-"0D0 6OZ TF(UAY-DA Y716",i60(,6Z010600 604 CONTINUE

--Karo C10800 C CHECK LAT AND LONG AGIANST SFLECTI*O1 PARAMETERS*Luvuu EL11000 IF IYLONG-XF8Nlfi?096069b6-m " how -

11200 608 lflXLAT-XNMN)620q610q610- T~0 61(Y rr L ArT- XMXI TT-h6-Mi 6 70 .~ .

11400 616 LTYPE a I

11600 DAY a DAY + 11M?-1 FO K-A T' a TSTAI -- _ _ _ -.-

11?50 JV"AX a NTnT _____ __

--i-tm c

Page 96: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

93

MiOD C IF TSSW(1)m-l WRITf OUT HFADER INFORMATtD)i ON~ Uwfl Kt.TSt12000 C

12200 6160 WRTTE(KLI5T,8OOO)ILBSULK)Klt3XLATJXLONG*XLT0.YLGO17"100 WR ITE M I ST,9OOLi:YPF*"14DQ 97SNP9 STASe'tCflW,0AY, IP012400 C

And3o c rp Ysswmi?1-l, wwrtp ChiT HFAOINGS' FOR nUTP117 WHtCjq I'S ~itoTrEt IN tnU"P5.12600 C __ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

12800 8010, FORMAT19OIREC PF TO so DWO Dym Sm T14"TZ"y 71 72 Nl NDP'I)

13000 8000 F(IRMAT(/91H v3A4,4f8.3)111100 8005 F)PP'AT(IN vp TYPtF 1MDHR SHIP ISYN CA5 r DAY IPP#%1q13150 * !2,,?,2,F.315

MOO0 C1140U C NrLLARD SUAPOUTIME TO FILL fl*TA ARWAY WITHq TFRP AND SALrwJTY131,00 C DATA FO~R ALL nBSERvATytINS.13'ffU C13608 WGT-1.L3616 1F( 15SW11.EQ.-ZJlTHEN1361? MM.13618 iTCRUTCRUIS136?0 JISTaTSTAS136212 CALL LZIJJCR)1364 CALL ILIISTI

11628 5? FQRMATA2,A3,3,.PFG#)13632 RTF1?.8fl?)".GNA"4EqWGT

k 13640 8020 FORMATf I4,A1?qf5.?13648 0PFN1UN1T.KOUT,NAF.GNAME,?YPV'wNFW',FflfRa'tUNFRMATT~flI13664 WQTTEfKnUTlKfrnG13650 FNOTF

* . 13690 CALL DATIOX(K"N)1170n CALL CFTDAT(KTPvOATAX3300v2)L3800 6~70 RETUJRN

14000 C NSW=S: CHEFCK ONLY LAT ANT) LONG OF HF&OFQ ILPEADY RFAD AGAINSTMOO IT- Y ~ ~ I 11N V A K A mt14200 C

* ~14100 80 fLOr-VN8,??t4400 it? TFtyLONr-YF"YI4q89,R514500 q9 rFIYLAT-YNPN185*,'818314600 53 rF(iLAT-XNMW1?q2M5

14800 RETURPN14QOO C15000 C NSWu4 TMPLIFS SELErTIOIN CRITERIA APOVE NOT NRET.15100 CISM0 (5 NSW-4

158#00 F NO

15407 REAL FUNCTION SLAT115410 C **** ********* ***15414 TNCLuDFl '10 ERC.iO15'-TwZ--T -flJrTTIU RT1Wnf TF1tW11-TUT1~vfr -VXAUVt I r il'if I-- 3 1DUTP r WTI115428 YLATuTLTsn11S435 ItATwvILTS5q1%438 XLATP-YLAT"I'000.

'SLATuxLATS~mt1T'49LAT)

Page 97: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

AD-AXI 892 80005 HOLE OCEANOGRAPHIrC INSTITUTION MA F/B /IVA X-l1 PROGRAMS FOR COMPUT NG AVAILABLE POTENT1AL ENERGY FROM C-ETCIU)AUG Al8 N A BRAY N00OVIA76-C-01 97

UNCLASSIFIED WHOI-81-70 NL

los on1mosoo

Page 98: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

941-5449- OF-TURN15456 ENTRY SING154.63 WLAT-ILNSO15470 YLATPUILMSM

--- 1-73 -* UATX-uKLAYP /60.- --.

I5477 _ SLNG.XLAT+STGN(XLAT'",XLATI __... ~ ~--

15491 END)175100 C. ' SUSRUT1Iff LLZIM

15503 'SUBROUTINE LF(th)

15506 - FGER !A(1),IV('l) __

*15515 lF(IAfl)*GE,10) GIO TO 10* 115,313~ui~r TU I

151521 RETURN __

* 15527 FNCODEI3,o,rwmi) tAmI___

*15533 2 FORMAT(IM3

15539 10 CONTINUE

155,51 RETURN

15557 FNCOPU(39491V(l1) 1*1) ____

T5-36&D 4 --0R-MAT2H00,W ------. -.-.--

15563 A (1) -IW (I I -.------

T-"S6 4FTN11584 END

Page 99: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

95

12000- C PflTF)S(JR.F0Rt FILT: su'ArOUTNFOR -0i WflN,P-P'LY P)TIEWO1AL ft4EGY12100 C PROGWAMS. VAX VFQR$!0R, NeRRAYs

12700 SURRUTINE SMIV( ANjPjo,"RIFAlL)t7I~0 C

12900 C---3u 0 C Tfl rWTFRT 'SYwWFTW~ IRATw' -FOWr TWTXvw~u AQ -Et'Fl 011AR WENIFU

= 13100 C IN A LINFAR ARRAY AIJ). ___

13ZOO C FR"~ SYMI!NV?,, TWq3 BY RUT!3HAU5FWTVTWUJ, MALTA!S.-..-13300 C

M-00-C APWW' 27 19-75 N, FUFMTNF F- -

13500 C IF5O A1,T)01WR)'DTTtN0DC

13700 C __________

t-18 00 Im1lt 113900 n0 10 IalN

141YW- 10( 'RR IT) -0

14100 C SFNRCH FnR PIVOT

14300 81TGAJ -0.0

14500 no ?0 Ju1,N1W46UDo JJ - JJ4-J+?

* . 14700 R a ABS(A(JJ)) -

14900 12 !'F(A-BIGAJ)20?0,ZO'4

15100 K -J

115300 ?0 CONTINUF

15500 1 S TFAIL a IL56OU WI WFT -----15700 C PREPAQATION 'IF FLTRT 1ATION

*15900 01K) *1.IA(KK)16*D0DOPK 1.0

- 16100 A(KK) n

16300 TF(KNII5919,1601 &400 16 GJ K - K - N16500 n0 10 J*1,KMI

- T6W00 1K - JK4N-J+116700 PUJ) aA(Jw)

* 16800 JTTW 1 JT1T8 9 7T9TU -_______________

16900 17 04j) -- A(JK)*Q(,K)I7OOD on Tn 3o17100 IR 0(Ji -a(jK)*olKJ1T770 T0 AfJlK) n .0 -

17300 19 KPI aK.1

17500 !F(KPI-N)?l,?l.4 I-17600 ?1- Do 40 JuK(PIN -

17700 KJ a WJ * 11790V TF1wRTJTI34v1?v9Th-17900 3? PUJ) *A(KJ)

18100 34 P(J) -- A(KJ)

18300 40 AlKJ) u 0.0* I W40 C FLT"TYCW PROPFR

Page 100: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

9618500 41 JI( - 0

* 18600 00 50 J-19N ____ _ _ _ _ _ _ _ _ _ _ _ _ _ __ _ _ _ _ _ _ _

15700 n 50WJ~18800 JK - JK * 1

SDTfoD5 A(Jt( u7-A$(l*~V)OK _

19000 100 CONTINUF __

--- MUD 1570 WETUWN -- __.-~-

19200 ENDzys-uu U NUISRUUTIi TU INPUT FPA LTtR5 VIU WtR- I INi FUTPW19400 c PlTENTIAL ENERGY PRIWA"4_

19600 C_

19700b -- SUJ9POUT!NE PA*N'lM- _

19800 C**4*******-***************O*19900 c20000 INCLUDE 'CO"PrTERFflR' __

20200 INTEGER PFDELrflPDfLTA ______

20400 C

* 20600 10 FORMAT(I0INPUT NPW VARAMETERS?glzoTo70 TF(NYSKNKTT-).4'1RT W-z0800 15 WRITE(KTTX920t ______

2-WO-0 0 FOP WiTCO0ENYFRI -T4TP- -WtfAfl-(F SECT IfN (GU0-00J fGVL-V Et wTVii-Z1000 X THE SAMiE PAQAMPTERSI')

21200 ?F(NSECT!ONGT,'19)THFN -.- ~-- --

Z I TO-*- W RT~f(KTTX, 22) ' 1. '- - -- - -21400 2? F0RMAT(0OMAX1T J8 ALLOWED_ IS 19w)

21600 FNDIF

21800 25 FORMAT(I0E4TER TH$E PRESSURE FOR THE FIRST LEVELt')

* 22000 14LEVP-1______

22200 NSE-PISECT~flN~l22300 0 1000 la1,NSECTION

22400 12-!.NSE _____

22600 WRITEKTTX9100ir______- z 70D- 10 FOG T"ATWO M ~T T 4 EVITFW THE- TWTERV"u-1R -"-g~~w22800 X LEVELED SURFACPS:Il

23000 WRTEKTTX,[2o)- ZulGI ?Dr F179MAT( tUETEW THF -rNTFRVA 577FT1 W W TW REESSu Ias

23200 RFAD(KIN,*)PDFLTA_____

23400 140 FnRMAT(I0ENTER THE FIRST PRESSORE IN ThE NEXT SECTIOV4T')Z5 s)uu KtAUli l iri,.j23600 NLFVL(lP2-INTTIALP)PFDEL1A

~-7mcl- W'PlTElTT-91- ---..--.--

23900 160 F0R"AT(I0ENTER THE NUMBER OF TeR"qS IN TW REGRIESS19"20ofs,?3%p70 -T * N- wPTES I-LTWEXU-FITTV MWJTRUP Nir ~124000 READIKIN,*JPI

2.9100 ~ SFRG.1a

24200 COO**** COMPUJTE NPR(T) ***254300 NRP~fTl.tFVfl[r#wLfV ------ --

*24400 C*000** COMiPUTF NPR(t2)___-7430-0 NWr-P0ll

Page 101: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

97* z---Z-4W0 C60**** CO'4PuTF NSCMT 4*'*-

24700 YTFU.FG,1)THF4

24900 IPREVo!NIT!ALP

25100 NSCU.1j)=!'PRFV*NLFVFL*PF9FLTA~75ZUO C"-*" -CUPPUTE nlpwTTT -n*---..-.-..-

25300 NPP(13.-NLFVP-wrP.F-V/PFOELTA)z T5o C- WWPFV--fR I T3 T25600 IPRFVmNSC(T.112157DO NLEVPaNPR(!)- - ---. .

25800 IPITIALP*IPREY--25"U0 C*0**. CfMPUTE NSCrr?I)

* 26000 PSC(12)sN

26700 NSC(13)-POFLT'A/0TELP26100 100y romytTNUF . -

26400 ITOTAL-JPP.FY------------------------.76W50 ~ JMAX'.NLFVP

26500 WR ITF (KTTX,9200 1 RSFCT I NvNLEYPifTOTAL*z6600 7-7ff1'TWTTwA TOTWIu3ECTT,vNCT5;,!6, 'NVELS;t TIF OFFPE ST

26700 X LrVFL TS A"41WP94)2-700 WPITEWKTX9220)-26900 ??0 F0qPMAT(toENTER MAXIMU P DEPTH Of TH F )ATI :9)

- MI QTU FA1)(IC1Nq*)ITRYAY -----

*27100 IwNSECTJOnm.

27300 "0*Z7400 NPPfI)=NLFVP,5

~27500 NPP 112) -( I TpMAX1.ouL FV-P-NP'.V)-2Th00 NpqI13)-NPRFY -

27700 N5r(I)u1PRFV

*27900 NSC(13)=PDFLTAP0ELPZ8000 NSFCT~flPwNSFCTTNw.V -

78100 QFT(JPN

?8300 c rr?EPF 5118R ***** PTST ***********R*******N. u1W BIJvWUUTTNE- FIFF I i 9 UN

* 28500 C79600 C28700 C Cn"PIJTES COEFFICtERTS FOR A LINEARTRWAPSFORMATION X*AX#R

420-600 C FOR POLYN4OMIAL OF -Olt-6R P4-i. I--NPUT AWRAY C. OU)TPUiT 0d.-28900 C__ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

1900U0 - CT '771175 N. F13OFPMrFT* - 29100 C

79700 VYT"FN~S!0N cfi),Jtru29300 Cz9q0 oI 75 1.019429500 1.

29700 NM! ~N -Z"00 1FINAqT7l?,!?5-29900 5 DO 10 J-19N~I300 'pj ft1 4j30100 R tFL()AT(IPJA1ll/FLflAT(J))*8*lt

30300 1? M 'FI I -I

30500 15 R - 1.0"Sa Tfl 213-- - .-

Page 102: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

9'8

30700 20 p a - -I~

30800 25 1)(1) - S*R _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

31000 END~-~1~100~ c .-

32300 C 9(N)l FCN ***** PTS8I*1 **1740U0 P'JCTD PI)-_ __ _-

37500 C *************

32700 TWTEGER*? IAN- 176-00? - "7177?

32900 ?F(N)19292

33100 RETURN33700 7 R a FLOAT(N)33300 RETUJRN

33s00 c

37000 SURRO(ITIN EO[T(JEzRRl3fluu L

*37200 C*~1 V7300 C FnIT TFMP AND SALMqllY !N K-EGASION t~ -

37400 C_______

37?500 C JAN 28 1975 N FOF004FF- _______

37600 C*37700 INCLUDE 'CUPTE4I.F0Wv* 37800 EQUIVALENCE (P)DIFFAll ___

379S0 IERR - 0 ___

37q73 OVP)AX - -. 12___38000 D0 10 P-M1,"?,59-10 tuvq~ a Pm38200 PIM) a 5(q3-8,00 10 THM~ - TIR)-. - - .-

* 38400 15 DYM 0.0______-91o- - 0.38600 THM -0.0

370 XNDP NOP

38800 T0 20 M-"19"2___

39200 PTIMP a PM39700 T~TIMY a TVq

*39400 20 CONTINUF

*360 P" a g PP!/XNnP

39800 CALL 1SFTI1,900 KFRR a 040000 00 60 M-MPIMZ ____

-40100 T(8I~W-~-37)p3~p-.--40200 30 cn~ - POLYISVIP),0VPCpvNO.0,6000.o, *Pm4010-0 KFQP a I40400 TF(ISSWI3113193?,1?

40451 St a ATAX(PRt,7il

4045 S3 ATAX(M,~tv-____Tflo T0(NAtF,7)-- 1_____I1f , o r

Page 103: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

99

* ~ 43 -TH? -THFTA(0Vf).D0AYAX(KqlS?9#p

40456 TH3 THETAgO(nV.1~iATAX(Iq.1,fu, 3,PFI ____

40455- - * UvAlp-,14150751140470 OV2 DVAfPT-*TI429S2)

40482 DVPl (DV1-OV7IfnFLPOYP2 (DV?-D%*I)/DFLP -

40500 WP!TEIKLIST,3l1Oo~nVIM),PIMpqCgWa,oFLTW9'oVP19TP2##Jbi 3 O vim =' U R40700 40 !F(ABS(TTIM)-TM-A3*lz)55,50o150

D~B00 OF CR - POVD( ,Rr 0.T* TH -40900 -- KERR - I 1---

-4-v-TF(ISSWI3))51,5j?,5? -----.-

4#1050 ST DELTA - CORRTH(M)

* 41052 5? * DATAXPm?)

41054 THI TMETA(OV!'q-1),DATAX(14l-1),S1,PPI

41056 THI -TiETA(nVqM.1),DATAX(M.li1,S3,PFI* gU5UVi *V4PqTi~j

41066 nV2 a DVAfPF-v.TlHZS?I-' 1UT4- OVI n VA(PF.TH,'ST)

41082 DYP1 - fDVI-DV?)/IDFLP ----

* YW (YiU !JVP2 - (DV?-DII)!FL?41100 WRITE(ICLIST,3100)D)V(M) ,THIM),;CORR,0FLTA.DVP1,DVP?qtlo(u )( 1 - VR

* 41100 55 IFIKFRR.FO.0.A~NI).IERR.EO.0)THEN-4TZ- JFRR--?- . . ..

41343 FNDIF4135ff TER -- TFRR + I

4 4 060 CONTINUE_ _ __ _ __ _ __ _ _ __ _ _ _ __ _ _

41600 70 on 75 "mmml"* 410W' stm) - P(M!)

41800 TIm) - THIM4)15 p t41 a DVIA) .

421)00 JEAR a JFPR + I

42200 3100 FnDPAT(F7,lF9.3,' REPLACED BY! 'vF9.73,' CHAI4GS I :',Fq.39'm 9 SP. V-nU. GRADI7T 1 A49VY-w T ' BEW

42300 END

442400 C

42600 U'9flUTINEF LSFT

4?700 C

42900 C LEAST SOVARFS REGRESSTON SUBROUTINEFOR POTEPI.*4""'O C43100 C PAR 6 1976 N FgFflNOFIF4 3 200 C*

43100 T04CLUDE @CONPOTFI.Fnpo4'T4" C

43500 1 NA - N*fN.1)f?41600 L a143700 no 10 IllNA ___

43ROOLu u ~JI I - 01.043900 00 12 1-19N44000 CP(U) in 0.0 ---- ..-

~' 44100 1? MVI) - 0.04?0,0 15 137 2n T-10N

Page 104: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

44100RPM 0.0100

44400 RPI1 - 0.0

*44500 ?0 NT RNUE44##o0 0 DO 8 !uPM1,m?C4 47 00 x - DV(!) - V.-----

44800 I00 100 JUIVM44900 TF(J-1)Q0,90,95

*~~~rl 4IOO 0 U) .

45200 95 R(J) -X'**qJJ91

45300 100 OnMTINUF45400 JK . -.-41550F Y PT(I) -PM4

45600 XT - TT(!) -TIP

45700 6nl ijlf,q450 OP(J) - P(j) B(JJ*X45900 RT IJ) -BT(j) .. A(J)44)WT46000 IF(L-1)1059105*#8

*461-00 105 D0 7 K-Jd! N-46200 2K - JI( + I

*46400 R cnNTINUE46v;00 TF(L-1)1?3v1?lvl446600 173 CALL S8INV(CONB,8A,8RIFAIL)--46700 17T4 D(I 700 Prl-46800 SP - 0.0

47000 J" a -N47lDO Do0 1745 Jwl,-N47?00 rF ( J-P) I 70, I740i 174247100 1741Y J" - JN + RJ Jj 4 +rI--47400 Gn TO 17",at~u l)gU 17? r a j- If I

*47600 1744 SP - SP + * II*PJ47700 1745 "ST - ST* 0JJTJ47800 CP(M) - CP(Mo * SP ___- - . --.-

47900 700 CT(10) - CT189.+ ST48000 C CO"1PUTF RFSIDUALS43100 1 7 5 R -O.

*48700 RT - 0.04W300 TIO 195 T-1-p'l,8? -

48400 Fp a 0.0451500 FT = 0.0 .-

4R600 X - OVI!) - VwW#5 100 n)u 15 Ju-3 1 p4

48FI00 NJ = N-J~l4-8900 FP a FP*X * tV(WJ349000 180 FT a FTOY + CT(WJI49100 SP - Pt!) - PP -

49200 PTIJ) w SP

849400 TTMI - ST

49600 183 RP a (SP-PM)4*z . Rp49TOO R T - ( r-T1) 00 + WT'49800 185 CONTINUE

S0000 !FfL-KSW)159159195soo 19'10 Wq N NOP - W50200 H * S0PT(RPIX)T0

Page 105: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

101rj ~0~~O F(TSSW(61 1306io35O,35050500 100 no 310 r1ii 9"_

*50700 8111 A85(CP(I'))/IIl*5OftT(AB(C~ttli)-))-- 3-m (T PMT AR IrTf)T7-Z70-5CT(R(C0(ti)-4)

50900 310 CONTINUE

51100 WR1TFlKL1STq3II0)4RVtK)q1(al) ____ __

* 51300 3100 FOOMATIF6,0914913,98.el51-VOD 3111Y FIRMAT Il13.FAl)515.00 FWD

Page 106: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

102

Appendix C.

Program Listings for PEPLT

Page 107: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

F-7

103100 PEPLT/PtPLS: SHORT DOCUMENTATION200 KHR Isw Jsw KLTST DESCRIPTION

300 1 0 - .CALL TABLE SU13WOUTINES LrST*

400 ~~~PLO -T,9 -fy- P-1)UT TV MAP FOR91AT450 PLOT IS:

--466 Y-A I*VR PL (NXI. I AZ*YR6L ( WO fRP (NX3)A4*t*t!C,1l482 V - Rl*VRBL (NY11.82*VRBL(NY21+B3*VR8L(PiYI).B4*CtTRECFI488 1 1 -- CHANOF PAPAP4EYFRS FOR PLDT

- 494 2 -- INITIALIZE PAW*AMETFRS FOR PLOT00 2 - - CAVEDTA$tffow0 VAIOUS600 3 --- CHANOE PLOT PXfRKMETERS

-- 700 4 - - CALUC-AYRGt -SuWRO*uflNE:F HORIZONTALgoo AVERAGES, FOR DETAILEID DOCUMENTA-900U h'UNq ALUY5 KV R0 AV~W tWItICIN5

-950 AVRGS RRANCH.S --- TSWTSM.ITCHI ARlAy

1100 6 --- _ RESTART MAIN PRIOGRAM- E XIT IPRUURA1

Page 108: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

~100 P~p7~~FP~~ BQNCH104T(YO WPLIOMS BQNCH3--PARA'KETtRS--$1$0PT n1CUMEI4T&TTON

300 J PQ 3 ISW3 DF SCR IPTr'nw ___________ ___

4000 -.-R- - U -T F AtA M T FItS noN KL-1S r- ST n RE -CO TOunY4Y(S~oo FILF KPLC'". RETURN TO PEPLS*6006 1 INPUT VARIAL SEECOR N Tn NZI700 2 ENTER Al TO A6

~1O 27ENTERt 41 10f) t1200 3 2 ENTER Cl TO C6 _______

130 E~- NTFR 11 TO D

Page 109: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

105100 PFOL/AVRGS: SHORT naCqj4EIITnfN200 KFQ ?SW JSW KLTST DESCRIPTION _____

750 4 0 - - SHn RT DOCUMENTATION--300 4 1 9 READ FPOM DATA FILFS VARIARLES IN COLUMNS4700 JSbi TO KLTtTS00 ? # ZERO COLUMNS JSW TO KLIST600 3 1 - NITIALTI AND INP1JT PARAMETERS700 0 - INPUT PARAMETERS--NO IN"ITIALIZATIflN

goo DIVIDE COLUMNS JSW TV KLIST BY CUMN 6900 5 3 - Ann' COLUMN JSW VERTICALLY FRO" THE TOP1000 6 - LU PRI'NT OUT DAlT-A ARRAY OIN UNITT KL ST

1100 7 U - CALL NCAR PLOT PACKAGE TO PLOT ONF F"RAME.-1200 DEFAULT I! COLUMN JSW AGAINST PREIFSSURE.1300 GENERAL PLOTS:1400 X-ML1*t (I, JSi)+82*C (I NX2') 83*PRt1500 YU41*PP*A2*CItNYII4A3*C( INY2)F606 0 MULTIPLE PLOTS ON ONE FRAME ALLOWF'I)1700 KBR 15w JSW KLIST1800 - COMPUTE DYNARIC HEIGHT AND POTENTIAL FNERCY:1900 ASSUMES DVI IN COLUMN I (NV(1)1MR) AND OYE

zuuuIN CLUMNI (R a19U

2100 9 9 INTFGPATE COLUMNS JSW TO KLIST AS A FUNCTION%-2200 OF PRESSURF2300 10 1 SUtTRACT RFFFEZNCE LEYFt VALUE _CfJRFE,3) FRT)M2 -40 CntU-MNS JSW TO K_?LI-STI2500 11 1 - INPUT JC1ICR1 TO JC4,rR42606 11 0 - p FR.R THE, OL'LUW1NG COLUMN 'AVDTTTON!2700 C1ijc1)-CR1*C(I,JC19.CR2*Clijcz).--800 CRI*C!IJC"i.CR4*C(JRFFJC4)-?900 1? - - RETURN TO PEPLS

13 - - INPUT COLUMIN * 'S AND CONSATST FRrR3100 THE FOLLOWING COLUMN M(JLTIPLICATYOINl

3300 CON3*C(IRfCK.). INPUT ORDERT IjpK,~COn3-4-00 CUWT2,vCrYN3T AWTNDFY 1YJ,)R K)_ OF YALUF -1

* 3500 PREVENTS THE 1INCLUSIOlii OF THE ISSOCIATFD167n1 AND -F nLLOWTW7tDLUUNW.3700 KSR ISW JSW KLIT ________________________

- - OUTPUT FIR'5T THREE COMNS IN 74AP FORMATI* 3900 ACCESS TO THIS BRANCIM OUERIES WHAT HORIZONTAL

"00u LEVEL _W n' DT11rW E_4100 19 5 NOT USED4200 16 1 qIpu'T X9J -

4300 4') - (IRECJ)mC(IC,)*' (SHOUYLD FOLLOW009#uu A~ilbst I9MMtVIMT [IV tXKtCU[IUN.

4500 17 - - ERROR SUMMATION: VERTICAL ' 'NTEGRATION WITH_W0 tDl'LTA P11002 1<-THIF ITWCWF"MENT4700 1 O - - INPUT DELTA P INTO CIIREC95)4R00o 19 - - EXYCHANCE TWO- C'UUNS Of C4qoo 20 - - CHANGF A SINGLE ELEMENT OF C

5000 - - COMPUTE STANUARD DEVTEATION OF X G'TYEN15100 X-RAR IN C(IREC941 ANO X*X-RAR IN CIIREC,31.

37uo ~~~~R ESUrLT 13 'S'TVWET N XT Et,9IJ I - -- -_-------*5300 22 1 1 CALCULATE nYNAMIC HEIGH4T AT A GIVEN LEVEL15400 PRJIT I E TOD 7WEIS-Ul- CTJWRES P1YNUTWG -TT JWEF5500o AND OUTPUT IN MAP Ff3RMATALONQ WITH VAR1A'BLES7UUU FWu'R LauLmf N 3 ANDU % X ITM PRESSURE.

5700 NYUII MUST BE *18 AN@ NV(21-19*

Page 110: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

106__C _tPTF.~FOR FILE: MWFNSIOW9UIO _WM FJ4D 0U1VLTIKE PON P""L

7 C DISPLAY PROGRA~e N*SRAY

32 PARA"ETEP JOIMelODj

77 CHARACTER*12 GWARP'*o( 10W It'V"IN ICTU6,'41 9VR( " -

200 IYJIMENS ION KHDGV1S01 ,K8IJF(46)

378 Cm79 __-cC01!~wtT~

404 Crompn~fN KIN--

475 C PFGTWNING OF STORED ctymmuN

600 compnfN NYlN4C?,zAY3,PYNYNY3,N71,.N-72--?.N3_-tORMON T S W J W~~WI q_ -M9Y-

1300 COPM~ThJ A1,A2*A3,'A4,ASA6

1500commnN rlqC?,C3,'C4vC59C6TWO1 CO'V140N nO1D2 9D3 04 ,59D M1700 rCWMN WY1,ZLT0"7L0',AYPXPL9YPL

ru1m"O WT

1900 cnmmn~N NV(6),NX(6),AVgBVCV

2100 rom'~ON C919CRZ,,CR39CR4CW1z rnMON JPAX*JREF -

2300 qlOMKIN NX 4 o W 4 vP14

?S00 COMMON JSHP( 6),,flAYI,0AY2,PM!IqMAXk Z 600 CVMMnNP XFMN*XEPIXtxmmRxNpx

2633 COMMON CIIOO,617666 - COMMON I5SWITTii -

2683 tfl~lON PLA8L(10);XLARL(10),YLAffL(I0)

'12800 (OM"DN LTYPFMRI0RICO3N,!SI1PCA$TXflAY,1IvLPR2900 CuPN XtlvJt0RG9,W~JlJUl09XtG

3000 COMMON LRBL(3),L81A13),NSC(603,W$PR(60J.N ECTI0N

3200 -CnM'"ON PFT0,SD0fV0 -

_3300 Irty" "lN ___-_ __ _3400 COMMnN P M 9T H M M 9TYVMi*)UU F,-UmmTlv UTWptXFwF3600 CnMN CP(8),fl4CTf8)qlZqF1~F2vpF3

-- 61-6 C -'F" TF STOREO C0OW -

3632 Cn"*nN XDAT(108,I7RYDAT(100,7)360- CmWVYNf 1ltrtpTJ -

- 4100 C42 0 I f I~

4.300 co~NCAAT~ GNUME(200)90CI10)_#4_011- C

4425 FOU!VALFNCE (A1,CSTI,(VRvPfl-'-44U- FOUTVALFNCT (KrLTYPFT,_KWUF,_PTVPF)

4475 EOUIVALFNCE (KTTXKPLCM)',10 C.

Page 111: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

107

100 C PFPLT PR0 ***G*~ SFPT 24l9T* *200 C ********

400 C *************************** **500 C600 C PROORAW TO PLOT POTEP4 VAOIABLES.700 -C JUJ14F 27 1976 N POIFONIVF -

800 C VAX VFRSTON __________________________

'Iou U1 WUV J'f) WeBRAY1000 INCLUDE 'CO"PEPLT FOR'v11560 C1200 C13-00 0PF(N

1400 *RFCCROTYPEin'F1XEPD0RECORDS!?EuWCMERRail100I1500 C1600 10 KIN 517"0- KYTX -6

1800 KLIST *6

KOUT 92000 KTP 11IZ £UU ~ I

2200 WRTTE(KTTX,1800)71300 IF NOYFS(KrNsKTTXIE-O.)TH4Wf-

* 2400 ?0 RFAt)(10*1vFRRsll0O)KPLCM2r,0-0 ELSF2508 C

516 -01?1-- 196

?5?4 DO 107 J - 1992532' 107 Y!ST(TvJJ - 0.0

2540 no 108 1-1,100* 754-6 170 108 J-1-96

2556 108 C(Tqj) - 0.0

* 2PP7? I'SW(J)-07580 l0V tUNTYNUF

* 2588 CFNDIF__

2600 CALL PFPIS ___

Z700 GUl TO 702800 1000 PORMATIIM ,'PtPLT2 LOAD IN PREVI'OUSLY STtIREO COW'?*)7900 1100 1FIJIT0,WuWLCWDT t 'fTETiY!'r'- ---

3000 *RFCORTYPE-'PrXED ,9RECORDStlP-KC~qERR-1100) _

T0D Gi Tr-TaI-----------____3200 FN0

Page 112: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

108--rt-~ C -PfPt SU13RUTTNF 96#..4.*6 SvpyT 24 97

200 SUROUTINE PEPLS'

400 C-"-D C 'PQOO*Am TOl PLOT POT'F4V'&k*ifAfftS*---600 C JUNE 27 1976 N FOFO!4IFT

* 7WC VA -IfWfTN"-NU WO -19wS00 INCLUDE *COP PFPtT*FfOR

--1000 -WRITEWKTX,46)

ITOD" -40 FO-WAT(1I , ALI I 17Ff-T~kFl VAOI-Aftf S-fECTIIO PA*A"4ETFVS-- 1150 f YFS OR NO)

TA W 1TFtNOYFS(KIN,RTYX).F.1GO-TW1061300 120 WR !TE(KTT~,1?0*Y)KARv ISW*JSW9KtlSTvXTP,9K0UTvKlV4

150 9 6 X 3 1 3 ,S1,I 3WT-49 11).4 l~O~ ~ (IST - 6

__ 1700 KnUT *8S-KTP I

1900 RFAO( KIN* IKRt, ISWJSW.KLTST.EvPK0UTil~rNzuuu I I- tKBR G T I KUw7-2100 rF (KFPR)12 0 99019130

110 GO TO~0,O&04050j0K~2300 c *********************************

-7hD -C TNTTYIL 7~ T-- F--- - -

2500 C ______

3400 XMAX - 100.07 !50~YIRTN - 0003600 YPAK - 5000.63 f0u- Al a 1.03900 t1 I 1.0

4000 01 1.

4107- n? io*4200 01 1.

- 3-G0 D4 a1.0

4400 05 *1.0

- 4600 NYI =12-4700NY? n

U4800 Y3 nNyl 19 -

5000 NY? 0

5?O0 NTI a 2* - 300 N7? ft 0*5400 N73 a 0

5600 'qW -

-5800 CALL nATA(-lIFOF)lIV90- GO TO 120 -- - - ~ - - - - - - .

6000 C******** RARCM 1--CALL TABLE SUSROUTMN *******w- 7O '0 CALL TABLE -- ---

6200 GO TO I?0

6400 V) CALL DATA(0,'IFrf,* -l Gn Tfl lO-n

6600 C 49******BANCH 3--CHANGE OR LIST COEFFICIENTS *****Vmo0 30 tOP'FP UNI *50 r3i tJS37 ~Mll~F*VElqvFUUL

Page 113: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

- 109-

6900 REAO(50,3325,E"IYm3340)(OOC(1T.-*l199)7000 WRTTE(KTTY,3330itD0C(13,I.1,g97100 -3350 rONTINUE __

'72-04)- -3 ?" FORICAT 9AR I - __ -_ ___ _____ --- _7300 3330 FnRMATflH 99AS)T400y 3340 CLOWE (UNITal0l7%00 300 WRITE(KTTX930001

___rfi~~~~ff_~ '309 ...TI '01FIIEE~ WR39Tw~'wq4*IV

7700 KX -4---- R _ Al PIN f ) XfT Ks p itM5W-

7900 TFfX8R3)30v35v31 ______

86070 31 TIS W3 -1) I 218100 32 WP!TE(KLIST,3200tNX1,NX2,NX3IlrrINY2,MY3,9NZ1."flz9wz3"zoo 3700 F!iRMAT11H 'XXXlYjYf(?,1,,948300 IFITSW3-1)34933'30______ ____

8033 REA(K-*)NX1X2,k*i-N3,N-y1,NYlgNY3,Nf14jNflN!38500 GO TO 300 ____

8700 34 WRITE(KI IST,340O)KSR3(CST(JCPKSR3,J'1,69)vauu 34ou f-UMAT I Z6 IRsVVU; I I0

8900 rF!1sW3)30938935____-46-6 35 R FAD(K-1N,*j (l(CST fC,BPRJ-if af I --9100 37 GO TO 300

*i K70 38 KP z ISR + 19300 IF(KARR-KX)34,o34v3509400 C9500 _350 WRITE(l109 1)KPtCR ______ ____

70- - O TO012 -1,10_____ _______

9800 C _ _ _ _ _ _ _ _ _ _ _ _ _ _

10000 400 CALL AVRGS10100 GOt 'it L)U

10200 C5 ****** SET 155W SWITCHES ***5-00 WRITE r50fuw1 16)gI W(K) K-l,.16, -__

* 10400 5"00 FflUMATMZ(1 .'V,1614,I)q' ENTEW KvISS~t~')_____

10600 GO TO 120100 C RETURN MAIN PRGAM 4*

10800 400 QETURN________-TU~00 __- 440004,000 EXT P WA11000 700 WRITE(KTTX,70001 _______________

TT~~U~ fFIWNOTF3lKTY-hTTXT.W.1JoIGo 10 110-__ __

11200 'STOP

11400 C** PFPLS: SHORT OOCURWVTAT!ON-8RANC" 0 *******

11600 no 850 N019200____

11800 WRITffKTTX,830)(DfC(I),I-1-99

12000 812 CL0SE(UN1T-5")

12200 830 FORMATIH 91)GO 'TO M7 ----- - -

12400 ttNO0

Page 114: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

110

?00 SUBROUTINE AVRtS

400 C~ F0~ RTR~T79NTAL- -AYER'Av COWRUEtT'TDP

600 C JUPP 27 1976 N FOFOPI7FFT0 a a cV T -"stY7M -- fIquI ;-w B4RATgoo OtWPNSION DfbJ'PotY- fIMEN51N TCHARM61

1000 nI"FwsION XY"(E,1_ l -- --- CtHARACTF'l* ~UNW-------

1100 TNCLUDE OCOPEPtT&FnRo

1300 fOUTVALENCE MDMI

1450 CHARACTER4S IDS14

-~1600 10 GOTO(10,200,)0.400,500,600,70080090,,lOOO,'1100'.z0,.*1300,0

1800 CL9013 u #U9UVf REA VATA TU E-TABLE vv 9..99 f2000 100 CONTINUF

730010 K1,T

-ThU Tfll 'Ft T-i! 7-4 WIM57V -

2500 GNAME (W 1I 1)'l

2625 GO TP 1013ThW 1017 MRNTINE

2675 -- N -

2700 1013 CONTINUE* isuu - vu llu N'10,NIF

?900 TFOF a 0

3100 lFOStFtPR183700- 102 CALL DATA(Is wuTIW

3401 105) VI t .0

3500 !F(!SSW(1511.111 515"0 11-0 WT- GT ----

3700 115 00O160 I-JSWqKLIST _

4000 CctREcqrJ-C(t*ECI) 0 DEI*NT~tAV*XT.(,RV*CV*XTI*

4200 160 CONTINUE- -CO0 GTV) 10

4350 1615 rF(TSW.EO. 22)GO TO 800GOTO 170

M (4 T* 4382 168 WPITE(KTTX,*IWPRROR READ!NGviNEI5

4600 WR!TE(lOII)KPL.CRim- I'M GO TO 1500 -- - -_

4800 C 8 2 lZFRI TABLE SET PARARF1IERS **-**

5000 00 210 Jm1,100

%200 IF(ISW*FQ*?.A~lL'FILE*EQ*0)G0 TO 170--- 5300--G10 TO 1"f0-

15400 C 0***~** 3 SEPF PARAMFTERS **********'**

Page 115: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

r-71

)6 0'0 '310 ___Nff 15700 NV(u) - 51

m4v(ZJ a 65900 NYI3) - 8E,

6100 NY(S) -63

-6700 NYI,) *-1 .. .

6100 T)0 312 !-1,6

6500 JCI - I.

6700 JC2 -68O0 - CR2 -1.006900 JC3 - 3

7100 JC4 - 4~~T7~~0 C44 - 1.0 ...------.- -. --.- -~ --.

7300 AV=1.-r - -~0~ IV*0 - . . - _ . .. . -- - - -

~, 7500 CV-0.,u JIMAX a U

*-7700 JPFF - 50

7S0" 12D IF (JS) 0,12323.----------. ...5

7900 125 WRITE(XTTX,32tVI0)ND1NV(K),Ku1,.6),JREP-i,-AX

8100 330 WRrTE(KTX.3300)AVBVCVp4yfy1,'iu6Iazoo READIX1N,*)ATVV, Ixur,,ra1,i6

_18300 1160 WRITT(KTTX,34O01A1vAZv A3S1S294~3__

ft8 0 0 WR!TE(KTTV,35001NW1,tNX2'NYIvNY PRI 00RTAD4XTWN. 4 IWXNyYNy?

* 8700 ?25 GO TO 1500

M900 1300 FflRMATf1H ,*AY,'UVCYNX(6)',vo3F6*1,613)-* qUOWD 3-4 0-0 FUR WIT (1 'P.UJ RIErs: V R1

9100 at8 82 83,9/,t:6Xp6F9*'3)W70U -- 15017 FnIZWATUH -]" -NTT- _XZWYTNY7 74TSW9300 C ******94 AVERAGL TABLE **********#*

9405 400 170 410 J019100*-9500 rF(C(Jq6))405.415?4Os5

-- qu- 405 PU 410 TmJS~vWCT T *---*--___ -_-.----

9700 - 10 ('qJ,!) - c(JIR/CfJ,6)_ __________

9"- 413 JOIT- J - T ______

9900 rF(155Wf21420,0500,1500O

10100 4?45 FOPIAT(I iN 4UT1,Z1)TO700 GO TO 11500 --- __-~-

10300 -C **#***** 5 A!"DC0U8P4_ JSM ****W-- 00 500 iO '510 J4?.I-WW-_________

10500 510 CIJOJSW) a CI.frl,'JSWl * MIMISV

10700 C 04*4** 6 LtST TESLF*************- I0R17 h00 WW !TrWTY7UttXWTS Kil i 110900 WT~TFKLIST,6n5iNltDJREFJWAX~qWVIK),ltm16)-1100uTrt3,5ivuVC7I~li1t -*-------- --11100 00 610 JslJMAE

0 Rg V 7o jq~fY7 "3T.I ION)

11300 WRITFIKLIST,6050) JKP, I~ JK)O.1,611-4017 61V tTJWTTWJE11500 CO TO 150011600 600(0 FOUPNA'TTTH 14- _____-----

~. R

Page 116: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

112

--- ITT" 6D5!J FnPAT(!i,'rT5_?X,6FIM0_4111800 6055 FORMAT(111 ,3!4,P618)

12000 C 0***** 7 PLOT TABLF ************

12200 JMI N- I___73OO -u- I t~a1?400 _WR!TFfKTTX,'700)115o00 RFAD('(TN%*HNUURVqJ!Pd17600 IFINCURV*GT*6)NCURV-6

12800 _IFfN0YFS(KIN9%TTX).FQ.1)THENRFAD(K Itto TA7t

13000 CA11 STR1IP(LARL).15100 1: 19 r -

13200 WR ITE(KTTXp7030))

13400 WR!TE(KTTXp7O40)IXP NYMAXYMINYMAY

13600 CALL AGSFTF(64X/MT 4.,XMlNj

13900 CALL ArSETFf6HY/MTN*VYMJN)_13000 CALL ACStTF((1j1Y/f4AX*9.,Y_114000 FNI)YF

-I "40C WR !TF (kT T X,7?)0))L ARi114200 IF f!OYFS(KTNKTTX3.FQ,1)THFN

14400 CALL STR!PMXARL1____r~5(yu NnIF

14600 WRITEIRTTX,7060)YLARL

14800 RFANfK!P,7020MYARL14VU'f___ ALL 5JR[p(TEXHJLJ

15000 FNrDIF-- 0SD C 'rET UP PL UT L A 3FL1w5200 C CALL AGSFTF(jlNLA5E~fNAME.,v1NT-~'"UU C CALL. ArFFU17RurRE7NUMBIWw- .w5)15400 C SET PARAMETERS FOR EF14XY PLOT

15600 CALL AGSETFI411YWQ.92.)~T7OU CALL AGET64r6NFRRW_71 _-_*15800 C_ READ DATA INTO PLOT ARRAYS115900 - !rn ?if) R-tPNcJRy-16000 WRITIEKTTXv70?O)JSW16100 RFAD(W1N90JVR'16200 IF f SSW( 5)*0 ;-4) TMFN-LbS31Y WRTTEUWT'r,7WM16400 REA0(KTN,7090)!CHARIKI

16600 7015 IJM-0

16800 1 jM- IJM.1i6900 P'R-FLOTT 3P~tJ1.WPRv14SttTIT10fl -

17000 XnAT(IJ~oW)u81*C(J*JSW) # 820CIJNX21 + 63*PR--11to0' YOAT(T?'2?l*lPl- A20I39VzfI3#TR

17200 710 fONTINUFI rsuO tl;- 1 X~~ 0 11r17400 CALL AGSETF(41Y/OR0FRo,1.)

17600 CALL AGSETF(8PIY/0RDER*.,.-- I r OO F'4OTF - - -----

Page 117: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

113

17000 CALL ANOTAT(XLARLiYLAaL,0,0,0,'0.F -

17900 CALL F7MXY(XOATYDAT,.Jn1MNCURV,1J8,PLARL)18000 CILI7UAGGfTP( 15HSECON DAR YIUSER 9 XY0N,*I18100 !F(0.GT.XYM(l J.APD,0.LTXY?4(2SPTMEN

*~~U~00 CALL LNC~0,Y7Y~4T18300 WNIF

18500 00 720 1m1,NCURV

18700 720 CON4TINUE~~00 ENDIF ~-

18900 CALL AGSETF(6HYf"T'N.9l.E3hJ-- tqdoo CALL AGSE-TF(6HVfMAX.91-006-1

19100 -- CALL AGSETF(6KVf"TN.q,E36119?O0CALL AGSFTF(6I4YfRAW.,1.F36)

-19300 CALL FRAMEf4 ik*a Go TO 1500

__19500 C FORRATS______1~70~ l~oo FOMATII ,'!'i-.4PUT 4 6F CURVE'S IRTfP~T~~SF)

19700 *AND INI)EY OF F!RST POINT:',

19900 707fa FORMATtI0A4)~2OOOO 7030 Fr)RMAT(IH ,t, F DEFAULT AX S AATES'20100 7040 FOPMAT(IH ,'CURRENT VALUES OF XM~XA~lM~Y"~of4I7320-2-6 7050s F0P8AT(IH ,'I4ANGE X-AftSA*BFL? OLD LAWE *w I TOO20300 7060 FOPMAT(IH ,1CHANGF V-AXIS L:ABFI? OLD tABEL 12tq,o-M *10A41Z0400 7070 Fn1PMAT(IH ,'INPUT CIJLUMN 0 (1 TO 6) Tn BE PLOTTFEOT~3120500 7080 FnQMATIIH ,1IPPUT !DENTIFYrNQCHAR ACTER 4)I26006 76l90 FnRMATIA1) _

- . 20700 C 8***** 8 CO0MPUTE DH AND PE*F ******* - --

* ~O8O MOO PpR-0 000_ __

20900 OFLA uCf19l)-CtI,)

21000 V- BELA

21100 I00 870 JuIVJMAX

f! 900o 805 PR - JPR(,10RimwermTON) -

2 1300 IFIP - PR-PPR __

_?T4_0 DnA - C(Jql)JCCJ4)_

2 1500o omy - o.5*(OFLA.DELRI*DELP21600 PFX - 0.509F68 .'1 (RDLA*PP *BITEL21700 IF(J-1)MI59810ot'S1-7-u Ala CII,!_) - -m

21900 -Cf1,2) a PEX______l71~~00 GO TO 817 -__

22100 915 CIJ,11 a C(J-1,1) + DHXzzzuL 13921 C11-1,21 + rk

22300 817 OFLO - DELA-7400 P120 PPR a PR -- -- - ~22500 I'FIYSW.FQ.22)TKfN

-725 z KLYST=7 - ---.-- ~. -.- .

227550 GO TO 1000770575 MND

7?600 rFfTSSWfn2 zs.500 91500270 Z7 F -- "7522800 GO TO 15007- VW0 - *~#*# W9W TNTEGWIT UVFR PWFS3~jR*WVWSe21000 900 DO 950 InJSWKLISTC.vtou' -P-- fte

23200 CPR * C(191)-Z30 ThOU D9 0 JbIIW-jAw --.-. ~-.-23400 910 PR a JPIJ9NPRi% SFCTIDNO ____

295 00TI~rE,7 T1l ____

Page 118: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

114

23700 GO TO 918

23900 Qlft TF(J-1)930,-92Oi930-- Z4-0 9ZV ( TrI~ a 'P"----24100 Gn To 94,0

--- 9-3- '-T CPP -= I

Z4300 CIJI) a c(JAI4w'I) + PEXz~o 'iFUU 9u PFF a P24500 950 t"N'T!NUE-Z4600 TF(TS-SWf2))q73jI5O(Y4,I5UO ---

24700 975 WR!TEf4,4?SX(5qjISWpJSW9XLrSTzg~uuo -GO'TO 1500

24900 C NIO**** 1 SURTRACT REFERENCF VALUE *****

* 25100 COFF - C(JQEF,tl737-00- ln 1040 JuI,JMAY

26,300 1010 C( ,!)1 a cpFf - C( JI Iz" 040 cr0NTINUF ------ -

* 25450 TF(TSW.FO.??) Gn TO 1425t,.)pu I1 15u-TTTNTTNUF? 5700 IFI!SSWI?))1075,1500qlsOO

2 -6"D C-****** #11 ATl) r!JLUWNS **T W*~~26100 1100 YF(JSW)Illll?0,1ll1

26300 REAO(K1N,*) JCl, CRIJC?,CR2,JC34CR3,JC44CR47-" (YDGo 'f 1500

26500 ills FOnQMAT(IH ,'*JC1,CRlJC?,CR?,SCI-,CR3,JOC4,CR4*,f,4e?4,EI?,41eZ61UD 11-2l DO 1125 J-19J41W_ _26S700 11?S 1(Jpjc1) - CQ1*C(JJCl,.CRZ*C(JCzl.CR3*C(JJC3)

26900 JFf!5SWfZ)JI15f)ql50091S00

27100 WR1TF (49 11151 Jrl CRI ,JC2qCR2%YC3,CQ3,.3t4,CR4-77U0 GO TO 15)0027300 C ****s***

27300 C **********113 'IJULT1PLY UP T03 COLU"HS ********7760-0 1100' 1--127700 J1-2710fo0 KU-1 --- ----

27900 C4INI-I

28100 C1143=1ZW70-0 WTE (XTTXql3fl i26300 1310 FOQMAT(IH ,!fRPLIT COLUMNJ NUMBSERS UP TI? 3 VALUES9 AND CORRESP0'4DII7W4OY0 X 1ULTIPUTCATIVE CGTOISTAwr'J -- -

28500 RFAO(XTN9*) l,JD,cVJN1,cnN?.,com3

?8700 TFI!.LF.0)cn TO 1500- 2'R00 A-CtTW'FC,1)VCTTWT28900 IFIJ.LF,0)Gn Tn 130290009 8.C t tWCJ)CII -.--.-----

29100 IFIX.LF,0IG) t") 1381

29100 GO TO 138579400 1180 tflNTlU

29500Rol."boo0 1"W! CVRTIRU'F -- ---- -.--.-..

Page 119: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

11579700 COal.29800 1399 C(!RECo1)=A*6*COzqqo0 1390 CUNTINUF30000 IFfISSW(Z))1395,1500v150

30200 WRITE (4913119 I.Jvl(,CON1.CONZCVYN310'50D ~ ~ ~ ~ ~ v ILvrr Z~'nr~~ - ~. b, ZX ;T-

- 30400 GO TO 1'500i.Uo YyyCyyy M!I1 t--UUVVUT -IN MA1V I-tR'Al ~~ Y

30600 1400 KTO - 6403W0D -JR'FC -1-------------------30800 WRITE(KTTX914.04)OUTNAMF

__TU75 -TFINYF ( ,RTMyTT ~ ---30850 PFAO(KTN,140?OUT;APIE T

30875 1402 FnRMAT(A12)

30900 READ(K1N,*IjRpCl,jRr.C2 ____

W"TEUWTTY,4011 UT14 AE---_-231050 OPEN(UNIT-KTOIWAWEODUTN4AM!TYPPmINEWW)

3108? KLIST-6- -n~goGO TO 100-31206 -142 - FqIREC.NE.JRECI)G0 TO 102 ___

* ~1TZT7 1475 _LFTUT 0- ___ _

31218 IOSTN(1:2)wGMAMLDqNST)(1!2I

31236 YF(TSW.NE.22) GO TO 1430TT7V "D 145I K FCmJR 1j,jVFCi ---31248 VRI a C(KREC9,,W*l.E-3___13T71" VR 7w-(X R FC l)31260 VR3-C(KREC,41

-31272 VRS-C(KPEC,6.

* 31284 WRTE(KT14Z1)ITDS-TNKP,XLAT,)XLOGVR14V2,VRg9yR4,VR5_370* 1415 CURT1NUF--_ __

37163 rF(NST.F0.OLPLtF-l32200 GO TO 149032300 1430 VRI a VROLINVI1))

32?400 YR3 -VR8LfMYI3ll4~~~~~~- 97W0 ,4 CDrJTTRUE -____ __ ____

32S52 KPmJPR(KRFC9MPRqNSFCTION)

3257? 10 ST?3:5-wGMAREfMSTjf6:e)32600F u WRT'Etrr014nKoir TR~YZw Xv5

* 32800 1421 F09INAT(1IH ,AS'6,2(F.2R,4([email protected]),F8.3j_39 -TFrVSUW.?7ULI~T.gI)-HFW - --Vf-_t

32912 KLTST-6izqzq tu I u tuU

* 32936 ENOTFTrl.0f.IttfF.IwrIIJ-nr----371 - -----

M--F32958 1422 FORMATI/l

--- 37979 Ct0MtMw~ri -

= 33000 rF MF ILF )200910?9 2003JLoo toot rTJ"M~r fYIoW 1UWU 11"~ tim E I)pu ratc

33150 1403 FIIRPIAT(IH 9'LFL NUMBERS AVE ',?131331n 1404~ FfWWIT(IPI ,T-lvUlT'PMOUirUv FILL- f4mt-t u W NU-- evRI7y

_31200 C ******** RAC" 0--SHORT DOCUREwTATrg *****43410 15-5v- t11 To- 1100 - - ______________ _

Page 120: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

116

34300 1500 WRITEKTTXvl5')5)K8PISWJSWKLIST

34SO00 KLYST - 6

31.700 ?F(XBP.EQO) Gfl TO ?300340rF(VRe Cr.,2K)Gn TO-1500-

34.900 GO TO 1nstrg 4 9#9e9e* 16 TAKE, UfIRFCij)9*x 9*.*...#35100 1600 rFtJSiW)l610916?09110

--- 3'700 '16111 -WWTFCXTTY16111-..- - -

35300 RFan(KIN,*1X,J_____--- Go To 1500 -_

* 35500 1620 DO 1630 !RECmlJF6AX

35700 1630 CONTINUE ...-. . -

3,30 -T-'- F(TSSWt2) P1650,' 9 1,1035900 1650 WRITE(4,4?5)KRR'vy5WJSWKL!5T____.. -

VR wTTF 4 .6 51 Y-74-___36100 16,51 FORMAT(1H qFJ.?.6,zXqrI

36300 1611 FORMAT(lH ,INPUT EXPONENT COLUMN*)3-J640D 1 - ********* R-Cf 7 S N FRROos ow~t P~ ***

36500 1700 GO TO 900(Y00 17155 IW'IH Zi,?

36700 C ************ I-DELP INTO CqUREC*5) **~******

36900 00 1810 J-19JMAX-37W -PR-JPR(JwPlR9;V3!'tTTU]W1 ------ .---

37100 D ELP-PP-PPR

37300 ctJ,5)-nELP1-7100 IFlo CONTINUE37500 tF(IsSWf?))l8?5q1s?),1l50017101 1975 WeRTE(4,475T)KRW, II, *JS'WWT7s-

* 37700 GO TO 1500

37900 1900 WRITE tgTTX91'960)

38100 RFAI)(KTN,*)19.J

38300 ~ CIREC a Cf!REC9TI)-3-94010 -c(!RECI1) - f Cj ..-

38500 CIIRECJ) * C4TREC35600 1920 CUNTINUE38700 IFI755W(Z))1925*I5001l500

38900 WRITE(4q,17551!,'J

39100 C CHANCE SINGLE FL'E'"FNT OF C -- 20

39300 2010 FOQPMAT(lH ,'INPUT COLU9"N, ROWe NEW VALOF'l3q",Rf A fWTNWtTtG -- I--------

39500 C(Jvll a XCHG19609 FI 1)??5'51,50-39700 ?OZS WRTTE C 49 4?5 1 KIR iSW9 JS~,KL IST34180 WWI rtf('pzeuvI.JjI.?1r39900 ?030 FOQMAT(lH v2(?.2)F1?.6)

40100 c ss*****scnPUTF STfl.DCV.(X) IN COL 1 FOR ~~AbdSIN COL 403*107170 ~ tft 7101 tT 1#??r??w2 0- I 1--- -it i2

Page 121: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

-4010 0 7110 WW TTV(14,4 25)KXl§II-T W 9 J5W,~um340400 21?0 00 ?130 TREC a tiJMAY

40600 CIIRFC91) 'Rvf*IRC3Z?/tY1

40800 GO TO 1500AU9"O -C *******9 -CtCJAF HWW tW AYfNihTITPW UN41000 ?200 GO TO 1400%IIzUU IW CYYYYY WRAFMMt (J-IjjJN U9C eTRY IUVNrAVYCU) YwwYYwww

41200 2300 OPENIUNI T-50 914A4Eft*VRGSo DOC I OYP~e 90lLfY,RFAD0NYI

4#1400 - -

41600 ?350 CONTINUE41700 ?3?5p FORMAT(9AS)41800 27130 FflRMAT(IH 99An)--_____ -

41900 C2Lf)S cins f TN IT-15-0)47000 Gfl TO 1500 _____

Page 122: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

-T0WT - C TJWLTF SUgpR~r PFPLT-**$** 11f7C ZT1977 **200 SURROUTINF TARLF

400 C"0D 1C TO CflWVUTF AND PLOT PTF VARTAnfY3.-600 C JIJNF 27 1976 N FnFr)W(F'r-

~70W s VTF50--wntTIV;8A -

8900 Cvfu uW~u rjpt~-W950 IJTMFNS!ON VAR(l09)

1100 C PPOO-17" Mrf TSW-1.16009,15,'-lO

*1300 10 NflSTN *0

t9#00 N Yl

a - Tha NY?uF,4-~1700 NYI-2

-moo NY?-I?1900 Al-I.tuuO ? ? ~ - ______

* 2100 'Al-1.-7-00 B-.02600 X?flJM-3.

7 720 X' IN--110.

?760 Vt-I077FJ0 ywAx--In2800 is WRITEfKTTX,155)Nl,PTN,P8AX.XDIW,Y?l'qMM0 l0I aI FaYRRAMHI ,!I7T' 5TATrIN7!WD1flg 34PMqAxrjeypqKy7DTw? 'v14,4F7.

* 3000 RFA[)(VJN,*)NOVoPJPfqi*AXX2DTqY201" __

3700 WQTTE(XTTY,70k00)

31#00 WRTTE(XTTY97I'l0)PLARL350o TF(ROYfS(K!NvKTTXJ.011hE3600 RFADEWTN97V)2C)PLARL

3800 FNnYF4100 WfRTTF(KTTX74O)XR17N#yWiX;YWTW-Py"AY4700 RFA1)KN9*)X4NYAXYINvY"AW#300r CALL4400 CALL AGSFTF(6X/AX,,YRAX)______4,o 5 - -CU-A*GS T F 6my 7TN. ,y ~N I4600 CALL ArSETF(64Y/MAKvYA X)

AI WRTF KT TY, rCT J XL. 1L4900 IF ('OYFS (KTNITTX) .FQ.1)THFN1"00" RFADtKTNv7n0 ))CAUA~

* 5100 CALL STRIPMKARL)

15300 WRTT'I'TTY97060'VLARL

5500 P FAD(KYN97020)YLARL-56" CALL STlP!P(ILI

5700 FNnIF

5900 RFTURN6 -A00C) -C qsq04r * PLO)T RC-LATFU -FffRRA'T6100 7000 FORMAT(IH ,!INPUT INDFX OF FIRST PUINT2*)-6201 T(T t F t7MATI11 , 'YAME-IM-OtT-LREE FtrtxTt-L-IM-Ts'j*i I W PT091

Page 123: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

6300 7020 FnRMAT(lOA4) 11

6500 7040 Fnfl4AT(lH #CIJWRENT VALUES OF XlNXRAX,'YfMNYPRAX-.',1,4F1LO.3I6600 70150 F"RWAT(IH ,'CY AMGE X-AXTS LAREU? OLD LAB'EL l3t',ol*H 911A416700 7060 FnRMAT(IH ,'CHANGF V-AXIS LAREL? OLD LABEL ISt~v/i4H 9O

~71O 600 cOWRTTRU -

7?00 C~T11O DO 130 1 J-4*,h

7400 n00 i80 i-i,100

P13800 I 00l 101 -l0,N --O

--- 77"RFAI291010FD106)MGAWETW,-W-T - -

8000 1010 FnRATI,AI2,F5.?)

8200 101 CONTINUESZ50 106 1F(ND.GTeK-I)U~K-I8300 PFWIND 12

-94"0 90 Dil 1715 JSTUI.ND*-8500 TEOF-O

W6D Ruu- OnlJf4Vr .-TKTpvwE-wp(5#PPFAtR 97YF-, 800 * UNFORMATTFDgEERRml75)

"SoU 91 LaLL ORM119,T~1tI

A 900 iF(UEOFEo.-)ffl TO III-"h00 X -A1-*VRLXiA?*VRLUNY1--TVL3).A-4W'r1RTr,11

9100 Y - 81*VR8L(NY1),fP?*VR8L(NY2I.B3*VRRL(NVf3J,8**CtffT~t,?I-- q"O ~ 7 - CI*VwBgLrTIJ.+T9V-BrZTitC-.VR5LIN"L,i.Ct 1WU-C0T

9300 )tPR-Al*VRBL(NXI)

9500 WT -1.0

9518 VAR(IRFC#2)-XPIL-- "737 VA-RUTET,93) -Y~t

* 9536 no 9S0 OR-196

955 950 fl3NTINUFq357-8 I F (TNsw f".ED; 1) Tf"

* 9581 WQ1TE(K0UT,14'?1)IVAR(IPECKJ,9ul,9)

9590o 1421 FflPMAT(9FM,3191595 142? FnRMAT(/)

* 9600 q40 TF(lSSW(I1)98n,98s,96s-q9700 990 WT - WGT - -

* 9800 98,5 C(TRFC,'4)-X'0C 1' RE C, SlY

10000 CIYREC,6)*7LUIUU 105 , TSS1211U1191

10200 110D WQITE(XLIST,*1PfxYFTr"OD 110 FTiA(TntiaW.,3V4

* 10400 113 Go To 95-103-00 111 CTIT1NUE -

10600 IFf ISSW(10).eFO-1.*A"DJST*EO.NDI10700 *WRITFlKIJUT,Il)z11100 lFUfSSW(6).FQ.- IPGO TO 175I7U T-4 O3u 17 1 R - ---

11500 on) 172 x-JMINqtwEc11600o IP !JTJw* I11700 XDAT(IJM,11 C* 94MLoe RYtlailipti9ll (Up.,.,,

11900 17? CONTINUE100rF ( JT. GT. I ITEW'- -~-

12100 CALL AGSETF(IIHOACI(GROUN e,*.)-F 770 WTF _

V& 4S

Page 124: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

120Z] 1100CAL -FSTPTI)MAT(I-11YDAT(l)12400 CALL APOTAT(XLABLVLABL90,O00.1o

4 12550 IF(!SSWIS).So.-')G TO 175

-12700 XPXR-? -FT'

1?900 CALL LlNE4CARIfXPRqYPR9XPRqYPR?) ____

ITDou CALL LlIN(;NAKCX7VlY,RqXU17WTP13100 175 CflNTINUF-. ~~T'T150 IF!Wf)0.lJTOI7

l3?00 CALL FRAMECALL -ACSTFAiMTN- -9~

13400 CALL AGSETF(6HY/MAX.,1.e36)

13600 CALL A0SETF(6HYIM1X.,l*E36?~~30W- CALL AIGS ETF tT11MCKITI1JN -9

13800 178 1 Ff (ISSW(10) aEQ o-l CLO5SF UN1TwX0hT)13900 - FTURN

14000 FND

-~ --

Page 125: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

121-too C DATA SUAP P-FPLT **** FT 15 19'7? 7 i

200 SU8POUTINE OATA('(SWYFOF

'.00 C-Sao C ~PRGAM TO RFAD AND' SFLFCTPOT"EDATX7I _-600 C JUNF 27 1976 N FflF a RiF7UDO C VIZ Y!F~fTf7N_-;NV 198.7 ,RRAY .

g00 INCLUDE 'CO"PFPTYFl

900 C_-Taffa C1100 MW 1

1300 1 CONTINUEl'0uu JBUF a '.61500 JHnR - 150

1700 P"TN - 0.0

1900 DAYI -0.

2000 UATE! W

* ?100 XF?4N - -190.0-270 18x 0.0 -------

2300 -XNMN - -90.0-__ __

)(N"I2500 ILTO -31.0

Z600 ?LCO 69.52700 !fLAG-07R-0 o RFTtUN2900 C

* 34.00 172 WRITE(KTTX*lJ3)f7AY19DAY2

* 3600 RFAfl(KIN9*)0AylsOAY2

3800 175 FORMAT(IH 9?HF- N LTM,'4F7.2)

'.000 WR!TF(KTTX*?7?LT,lLG0,JD0PP9NPMAX'.100 177 FO7RMATI 9H IInR TP: 9-f981v~OHDC0&ZI"PWWA 9?FT.1)4?00 RFAO(KTN,*)ZLTO, lLG0.JD0,PM1NP;FAx

* 1010 RETURN -.-

44'00 C______-4600r 700 TFiTFLA,EOl)M. 'TO 21Z -* ---. .

4700 RFAD(KTP9FNf)-?80)WMOG

4875 C5000 251 TFYA-AlRh,5 -.------- .-----.----- ---.

5100 ?52 lFtnAY2-XDAY1?R0,254,2'.__-- 26 ?q' lFIYLON-XRN)280?S692S6 ---- --.---...-. . . . .

15300 256 !F(XFPX-XLOG?R0?S892S81)~~ ~ ~ ~ 9~ )P 'VLT-~NZ~~3v

51500 760 rIXNRX-XL ATIZ8?09 262v26?,560 76? YPL - -l111~ lVWi. OW 7L Gol *(tUS't1LT rl Y?

15850 + JDO*FLOATIT'CON)57170 YP I . 1 * TVLT-ZLTOJ -I -_.. . . .

5400 DAY a YDAY.7890 29 FDKPFOMRO

5900 7615 1 F I !S SW f 3) ) 2 620, 2 63 2 63"100 7670 If f IWE r - I 176 30 92 675-92 610 - -.------ ---

6100 2675 WRITE(ROUT)Kh$OG_______ ____

MO1) 26"U IW!TE tUT1WU - -- - ------

Page 126: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

122

611)1) 161 C"TN!TUE- --

6700 ?70 IF(PF-PKTP4I?00*t??2*?7Z_____asoo PF26900 774 RFTURNMa 7O - ?U IIF- -- -~ 7" ir-s

7100 CLOSE(UNIT-Krv)17IF FL Ariifl

7300 RETURNr,~JU FNU

Page 127: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

123

- 5 C- PEPLT UBR ***** PFPLT1SU8 SEPT 15100 c VAx VERSION NOV 1960.' N.RRAY.150 WUW--vrrN POLYIV0I1VIFN*VMN*VIX)200 C *************************b***

-750 t300 C TO EVALUATE POLYNOMIAL 11F ORDER N-1 WITH COFFc CPE11,

400 C JAN 78 1976 N, FflFOV)FF

So0 DIMENISION CP(1I.

600 V -VO

700 1 V -VMN

g00 3 V aVMXTSD6 P OLY 0.0-

J900 y V vOv"q-_

*1000 4T N- .toVlo tU 0 LIL W rLJLY"w V v~IriisJ

1100 RETURN'FWD

* 1200 C DPDOI FCN ******************125 -rz' -oUNCTTO "3TV VO 9 witpC r N Yvwx;1300 C *************************

1400 C TO C(TMPUTE 0ERIVATIVF OF POLYNOMIAL

--- T450 C __

1500 C JAW 28 1976 N. Ff3F0NqFT

1600 nrMFNSION CPul)* 1p,0 C,

1700 V - VOI T75W- 1 V-VMl I?, 2___

* 1800 - 1 V -VMN--_ _

-- --- -7 rT7VW-Vi1194 q41900 3 V -VMX

11?0 4""1a N-I

2000 v -V OVM_7050 O PDV * .

4 2100 Ila 20 I *1,NM1 _____

-,-T"U - RMIi N -- I2200 20 !nPDV - !PDV*X *FL*0ATI NMI )*CPffNMI.)I

*Z3 Wt I UW

2300 PND2350 C 9NOr PCN ***~*9**SU#WW*2400 FUNCTION SNn(l,4P"tN,?MAXl

~Z5 '~......-----2500 ClzIj C 71-Sr AMUL [Ugh VAR13BLt3.2600 C

-- 6 "D a Z _

2700 TF(r7MIN)1092Do,207710 I RNI7 a ZNT~r --- _____

2800 RETURN

2900 30 SND a ZMAX7"30 4-1 WFTURX3000 END ________

"530 - JP jptWr 0**S* PT MR *Rwwwm

Page 128: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

124

3TUD ~ FUNCTION JPlR!W'FC9NPRKlS)3150 C ************.

3250 C GF"FRATES PRESSURE3 CORRESPONDING TI) IRFC.*F l C - - -

3350 C OCT 28 1975 M FnFCO0F

3450 D!'qFNSinN NPRm1 ____

31550 no 100 Jo1,Ns-3w"- ~ TF(!RfC*LT.lwPRUJ)TffEW--

3650 JPRmNPR(NS+J)*(TRE~c-NpRWz$Ns.I

3750 ENDIF

38,50 JPRuNPRI?*tIS)*fIRE-C-NPR(3*4Sb31Y00 RETURN

3950 END

4050 SUBROUTINE STRIPMA44Luu

4150 C-49D C ST~tYPS TRAILING RLAqKS AND PIUT-K71 T$f ff FOO CMAR-ACTiFRS4250 C TN ARRAY A FOR CnNFOR14ANCF WIT" NCAR PLOT PACKAGE LIVELS~~J0D C YQ*.WWAy 17NflVM0 -

4350 C440 -r urpvisiui At tp4450 C

4550 DO t00 J-1910

4650 IFfAMK-0)20091100,00 ____

*4750 ?00 MCHaK.1-400TFf4C'.T1O)vCHu0 -

4850 ANI-4)%

4950 FND

5050 C fl?PnV FN--SECOND DFRVATrVE OF POLYWOMIAL~tUU WFUNCT ION PfVV W, WYX -

5150 C **.****..*..******.***.*.5700- C5250 C__ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

5150 C

5450 CSoD V -VO5550 IF(V-VS!N)19?*Z-9800 1 V VMM1

5650 ? IFIVP'X-VI3,4,45 tY 3 v -V"~5750 4 N~1 - N- 2

5650 D?POV a0.0

'5950-- nu7 1W N-1 IN5950 1f-17a N I-

6050 ?o nZpDv a OPPDVOX-6010 weTRw

Page 129: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

125

6200 C SEAWATER PRV)PFRT!ES ************46230 c6300 C SCo 0***0

*-" 0 'FUNCTION4 SGO(Sl)6400 C **********6430 C- STuwl-G KNUDSEN -

6500 C FEB 15 1976 N, FOF@NOF'F6 1"1u rC6600 SGO - ((6.76786136E-6*S-4.82A9614E-4*S'0.6148Th57T)*OS6650 WK -0.0934.4586-n - _

6700 RETURN6750 FR6800 C SGT FCN *****

*6350 FUNCTTUN 5CTTgSvSG6900 C **********

S645(y -C-STC"-T WNUOS-EN-7000 C FES 15 1976 N FOFONOfF

7100 NC - SGOIS)

7200 *4.53168426)*r)/(T.67.?61.I((tl."667E-6*T-8.164E-7.*T

?300 X *l.O)*SG~~7W0 FTO-RN

*7450 C FOUATTON OF STATF ~FnR SFAWATER FSSO-7500 C ***************************

-"5v RFAL FUNCTION EqS80IfPI9TqS1--7600 C **********************76W0 C F061710 OF STATF FOR -SFAWIATFR WO8t7 TSIW

1.7700 C RFFFPFNCFSr 7-3 C ILLf-RU tY A[ 19fOOl firtr StMA wtS.qLfM'Y5-Wb

7R00 C JPOTS NINTH REPORT 1978iTENTH REPORT 1900-785 C- UNTYS:- _ -- - - -

7900 C PRFSSURF P BARS-7913 C NPUT ?RF5R))u' r -'jUrLlum,"---

8000 C TF4PERATURF T DIEG CELSIUS fIPTS-601R0s0 C SALINITY S NSU UIPSS-781)A100 C OFNSITY egin KGIP4*3-w1 50 C SPFC. VOL. F"O U W 7o----8200 C CHECK VALUE: FOS81) - 9o43556IE-4_B**3'KG FUR S' - 40 XWU

-- 73-0 C T 'w 40 TWCG Cl P - 10M- -BAR3. - _ -

6300 C0-31U L NWT7UtRV-r TICLT 1' 1YluI8400 c mr1!lyFtFr TO TAKE 03 TNPUT PRESSURE, AND OUTPufT IN C"**3PfGR 24NOV80

* ~~19450 C W4. WAIY - -- - - ---

8500 9FAL P1 ,PT9SRHOSQRRRR39fR4 -

15,50 REAL APCf,,lW8~(~t8600 C FOIV5650 FOUIVALFICE ~rlw ,(B~,3,CAi?6700 FOUIVALENCE (AW,A9RlvR0)vIKWqK0i~l87150 C t NWWT PRESSURE TO WRAR3IWD SOUIR WUar SUTzT~"800 P a P1*.!9"M R SOWTIARSI'5)--------------6900 C C0IRP4TE DENSITY PURF WATER AT ATM PRESSURE

9000 -. 9Z03)TS735E2T.996Z4-V050 C SEAWATER OfTMTT ATR PwRESS;-- -_ ____ __

9100 R2 - (f(i.3875E-9*T-8e2467E-?3*T.?.6436E'5)I*T-4.0899F-3)*T __

Y150 T.Ia44Y1F-1 -- __________ __

Page 130: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

- 126

9300 1 K

9350 C SPECIFIC VOLUME AT ATWOSPHERIC POESSURE-AUPHA - 1.E.3fWfff

9450 Fnsmn - AZPPIA

9550 C CO'NPUTF fnMPRES5!0PI TERMS________9600 no 1~S.Z16E-a I T'I~g3R~iT

9650 u 5?8E8T-.29E6RTS595-

9750 C9"0 T7 a .91075E-4-9850 r - (167E6T1O8E5*..88~

9950 N*3.?3990A1000A ID*SR # CION * W

PIT~ (-5.30Fm-*T#.643F-.;)*T7.94IFL-7101s0 Al ((-.t7)-5T1097-)*-.04~o**464

10300 KO - IIl1SQ * 41)*S + KW10350 C10400 Or P*P # A10F + 1(O10450 ALPHAD - ALPHA*(1.0 P/K)

10550 PFTtJQN10600~o rwi10650 C V350P FrN so*** OCT 7 1980 *4*

10f700 WFAL FU~1CTIrn4 VI OPfq)10750 C **************#.

lii~uu I. FURi.1 EJvII S 35NN - vru r,-ralv10850 C TF9P'rRATIIPF n f)Fr CFLSIUS (IPTS-68) AND PRESSLME IW DFCIPARSe10900 C FOUNTIrIN DERTVFn FR"1 EM9_010950 C CH1?CK VALUE: V35#OP - 9.33743IF-4 M**3/KG FOR' 7 1000 BARS.11000 C W 7TTE1 Tn ACCEPT TNPiJT- PRF"SUWTlW 08aw - 1I lUTIT 5P"VK lt W11050 C CP'**I/G" ?0 NOV R0. N PRAY,

* A ~~i LY~jU -- t*1 -- - - - - - - -_______

11150 ALPHA a Q.7?662'-4*(1.0-P/I?15SZ.27.I3159415.032E-"P*P)I11l700 A LPHA w l. E l*X L tA -

11250 V35OP - ALPHA130 "ETURN11150 END_____ ______

ii14uQ (; nf-FT FC fIR T7TR0 ..11450 REAL FUNCTIOR OF'PTfH(PlLAT?T11500 C11550 C nFPTW IN "ETFRS FROM PRESSURE IN DECIBAPS USING

-I "M0 C 'SAUllutRS ANn F0FV7NT1Frl' IRETNIUU11650 C DEEP-SEA RES.9 1976,2?3109-111.MOOUI C~ FORUtA Rtrivvru FOR FIJ)O

11750 C118e00 TEAL LAT - -

11850 C11900 P - p19.1-.11950 W - SINfLAT/5?o?9%78) _______

I e UU_- 5-m - _ _ _ -

l?050 C~R + .838(.5Z68-,.6-*I 10.09?f-soP1710 VPTH * ((1B-lp2r-T.1?z1E3-ir;~v.L i15 IZSOFlPT# - OEFPTPI/C W

WrFTURN - -

Page 131: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

127

* 12300 C 6TS FCN ***** ____ __

T2,0- -- -rIJI'fT1W Am T T -_______T_913_1

12400 C ************* 12450 C

12'500 C AnYAPATIf TE'!PER4TUWrF GOADIENTs RRYIDPN 1973,127550 C12600 nS -S - 35.0

I1z7650 T( 1 1-7759E1615 -lb135+IE56 OJ*DS.# IP -A# 9 bZ1E-*Tr12700

1?800 Y.(-'.2393F-R*T+I'.893?F-61*DS

12900 'ETURPN

12954 c !rVi rcN ***** PTSM ***127458 FUNCTION l)VA(P.*T,0'S)

12962 C

12970 C SPECIFIC VOLUME ANBRAtYf

12978 OVA - SVAN(P,-Tvl5,SPV)12W82 RFTUPN

* 12986 n

13000 C SVXN FCN *****

130,50 FUNrTIUN 5VlNIP9T,;59y)13100 C *************

S a5 C SPYC"TIC V1OLU"F ANDWAL'Y*1E5 -

13200 C FER r5 1976 N FCFOMQPVF*1375D v - Fnswo(PT,51

13300 SVAN - l.OE5*(V - V35OPIP))

11500 FNT)13"50 C T14F'TA FCN *******

13600 FUNCTION THFTAIPO-pT0vSP~l* ~ IT36-50 C e***A**** **W~

13700 C _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

13750 C TO cnPTF-EM7AU-POTFNT7AL TEMPFRATgRF AT PF13800 c FnURTH-ORDER RUNGE-'(UTTA INTEGRATIO9 USING STEPS Of 100 0811m50 C OR LF35S.IRALSTIJN-WiIrYu VI~h1P13900 C-"915 l C nlfT 1?2 lq75 N. 'FD-DT1FF--__ _ -

14000 C

14100 T TO14150 "i - PF - P14200 N a ARSIM)/10000.O + 1-.014250 H - H/FLnAT(N)14300 00 If) ImlN

I r#-150 W HlUfra.',5144.00 T T + #).5*XI(14450 0 - YK14500 P - P * 0.5*911-"5D0 Vt' H*ATGIPqTip-Tl14.600 T aT * 0*292899?2*IXK-0)

14700 YK HOATGtPTS11W7150 T *T * I .t071D6781t*XK-O1)

* 14800 a 3.414?13567'*XK - 4o121320344*0

Page 132: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

128

14400 YK - 1*ATG(PTp5I14950 T - T + (XK-?.tY*011600_________ ___

Lwioo~u- - Iu ~mT LINrut

15050 THETA - T-"-100 ffFTUON15150 FWD1'57"1 C T69 FCN *0****15750 FUN~CTION T&SIT)-

15350 C TO CnNVEPT T-49 TO T-68 TFRPERATURF SCALE

-115-0z C FFIJ 15 1Q76 N F(YFOROFF

T68 - T 4.4E-.6#T*4I00*0-T)

15650 C T48 FCN *****153700 FUNCTION T4M8I)15750 C **********.*I U C 'TO t"MINYET T7 -68 TUWT-Zk8 TF RIPFKWT UJFTSCALF15850 C FEB TS 1976 N FOFOIVFf

15950 T48 - T * 4.4FL6h*T*(100o0-T)1-600,0 RETURN16050 rEND16100- C' DVITT FCN 4*$**

16150 rUNCTIOP) DVDT(PvT,5?L1200 C~~

16250 c nFRIVATIVE OF SPFCrFYC VOL. WITH TEMPERATURF*1E5- 6300 C FfWf 70 1976 N FnFOIIFF16350 C

16400H - 0.2S16450 nVOT - f5.0E4/I)*EDSOO(PT.HS)-EOS8OtPT-HS)) __

165 0w a- WFUW16550 F NO1-66MD C flVD FC14 **b** - -

16650 FUNCTION DVO)S(P,TSl167D0 C *****4*******16750 c nrRYVATIVF 9F SPFCI'FIC VnL. WITH SALtNITY0*IESLfjuu f- 1-t-" oPU L Tq76 JF~f--'16850 C

-- 16900 M - 0.5

4 6950 Y)VDS - fi5OF4/")*IEOS80O(PTS.')-EOS8O1PTS-HI)170OU ItFTUQN17050 FN!)

17150 FUNCTION ovnP(prtst1727g0 C *4*********4*17250 C AOTARATIC DFRIVATIVF OF SPEC. VOL. WITH PRFSSURF*lF517100 C rF ?n) 1q76 N FO'FfNn'FF_17350 CMOOU ~ 10

17450 !3vnp *().OE4/H).*IPO580(PHpT,5I-FOS80(P-1#,TSII1""0 + ATC(PTv5)*#V"TfP,9T,5r - -- --

17550 0 FTUJPNi7uoD FMD17650 C flKOT FCN *~***IL r700 lWUjECT1UN Dl(TYT(FrPrT'17750 C **~**********l'"00 C AD-TOMATTC CP14PRFSSYTLITY TF"P Or'iVETIVF17850 C FF9 I' q76 N4 FOFORfF'179" C

Page 133: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

129* 17950 4 1.0

18000 nKnT - (0.5f1*fnVOPfPT.HS1 DVDPfP4T-MtS))

18150 c nxfO, FcN *49~~19?00 VUNCTTON fOKlS4PVT9S)

igl00 C An1ARATIC CONPRESSPIRMITY SALINITY OPRIVATIVE. _______

TU1W~FWW7~~T 1W TVunvTW1184.00 C184.50 u

18500 OKos (o.5/m)*tnvDPIPTS.H1 n VDP(P,?,'5-H))

19600 FNO _________

I1A700 17UNCTION SAL(P,Tqn)

18800 c cflPPUTF SALINITY GIVF'N PQESStJREvTEMPFRATURF AND SPECIFIClW850 C VOLUME! AN0MALY(10005*nELTA)-1@Q00 C FF9 16 1976 N FOFO9VFF

19000 K a n190s0 SAL - 35.0

* 19100 10 S - SAL19150 SAL - S (D5AP,,V)DYSPTTJ19700 K a *

--T9735W - IK-50) 70, 30, 1019300 ?O rF(ARS(SAL-S)-0.'O(O05)30,10,l0191350 10 RETURN194.00 FNr)194s0 f NOYES FUNCTION **** nFC- 3 1979 *T

* 19%00 FUNCTION NOYFS4KTP4,KTTX)1913,50

19600 C RETURNS I FOP YES -1 FOP NOIqfi5o NOYES - 0 *

* 19700 1 RFAntKIN,10)L8* 1r750 I'D IFnTVWRT(A2)

19800 C19"50 T~L9r~.0.2YF)%0VES.119900 rF(Lq.F0.2HN)IyFlY--l19950 Tr(NrIYMS309?091020000 c rRno@20050 ?(F VRTTF(KTTXYlO1. 170100 100 FOQ"AT('I YES 09 NIO? 1)ZUlI>U Of! T" 1

20?00 C?0250 10 PFTUPN20300 FN020350 C CYOSO FILF *****$* JULY 15 1977 f*~~*****20400 C THSAL FCN ******** JULY 6 1977 ****.*****7!7W5W- -- FUN(;T I UN T H L K91 Z0500 C ***********70550o CZ0600 C TAKWI; UP TO 25 CURI'C SPLINES TO GENIERATE A S'ALINITY FWOM273650 c PrTFNvTAL TFPPFEWATURF REFERRED Tn T1W'SUUWFCV.7.IWPUT DYATA20700 C CONSISTS OF LOWER SPt'I 4! ROUP4DARY FOLLOWFO 9Y FOUR C1E!16CTFTS*Z u ~u L w.'YtPPL~t4Vb ARt- P-IJM 1 ? t-11 Uf- ARRI R'V(7 BRAT 11V011 I?)70800 C ISELIN4 AND W0RTHtNGTP4 METCALF THETA-SAL DXA.*70850 C20900 nI8fNSION C(5925)20Q',10 C "AT1

Page 134: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

130

21130 04TA C/n.0O,34.73806130.0,0.0,0.O,)21050 00.78 3,079,544 -O-.34E-,_____

71150 *t.50934.95O79?,tZ7785,.529320E-01,-.l353?9,*I- ?S34.,183436-v-l28s8,- 15T-2,-Y991-1

21250 *2.0Oo34.9105R?7,'.802174E-o1,-.1460939. ?2RQM0.

21350 *,.;O,34.q38790,,.,7854',E-0199552526E-02z,-.'35q945E-01, ___

21450 *3.00.34 964'575-,..380q69E-01,-. 495364F-01 , '509274E-O019

21550 *3.40934.9744fl6,.?179O1E-D1,.I586E-01,;'79730E-O 2-PZT16UD W';03*744 760 '71650 *3.10914.985679,'i325895F-01,. 102958E-02,-.7*279688E-01,'

21750 *5.00, 35.01238,.'175223E-01,. 357759E-02,.114r377E-02,

21850 *rO0035.301749.;los473,.05172E' -l0,o76343E-039

21950 *I6.00,36.18748,..I073643,t.392926E-0?,p-.689792E-029

22050 *7l.00,36,90401i18,0.00.00.015*O00Z21-00 C27150 flATA XNDT5121

22250 750 y u.

22350 flY C(II,) -T

277V" TFfvOT)305,v3?0i37022450 l05 X - -fiT

Z7510 31U rNIT NUF227550 320 n

72650 1Ff TD)3?5,3?5q330*- -1Z77W '475 TD I

22750 0I- 0. 07250 '3"o -3THSAL *IC US, TD *D* C 1-4 I I u U.13 9 1) 1 )*Ot .T7,DTW--2 2fM0 RETURN

A22950 C7"000 C VOW FUJNCTrON: P'FIL1 T

423050 FUNCTION VRRL(NYW)

7315 C

13?00 U PRPUMJAM TU SFLECT VV1TEN4 VARIABLE5

23750 C MAR ?5 1976 N FnFOIVIFFa30 r VAX vERSTnN--I"IrAu OC-EAlq DATA -T19761-6 NOV-19V0 We 1

23350 JNCLUTW 9CO4PFPl:TeFOR9'-.714-00 -C23450 C

23550 10 YRRL - 1.073600 WTURN

23650 20 VVqt. w 0.0Z310m QtlURN--23750 30 GO TO (3l,37,o33,934,35,363?,3,394,4,'4lNVRZ315VU IrvtvR.eI.IJ TU 11Z23850 .31 VORL * XPL71900 WETURN-

723950 3? VRRL a YPL7"000 VFTUPRN

Page 135: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

1 3124050 33 YRAL - XLAT

* 24100 WIFTIRN ________

2150 __ 34 VORL - IL-ONG24200 RETURN-" TO1 35 VOWL!C-- - --k24300 - RETURN

24400 RETURNZ4450 37 VWBL - DAY

24500 RETURN-2-45VO 38i VRL - MH --24600 WFTURN

24700 WETUIRN145040 VWU - N

24800 W ETURN41 'VWBL- a NOV

24900 RETURN___ ____

25000 420 VR8L a VR(NVR-11)2-7070 wr Iulcm

25100 4~3 F0 - OPOV(DYFDY~,CPiNvF1,F2) __

25200 Fl -*Os05968*pflF'**?fE025 5 oD TvTFI-W1lwe25300 F3 --. 050968*F2*FZ/F0

25400 NVRX - NVR - 47

25500 if (NVRXoGT&11)GO TO 58

25600 RETURN2JO90 49 VR~iL V U P

25700 RETURN -

1STSW50-VMR - PDTF25800 RETURN--------------------- -..--

75W5W'M a1 Sft - T)VP* 215900 'RETURN

Al, ZWP50 52 VR8L - Pr*5INgXtT(p,57.296I51NgXLAT,57;Z'96326000 RETURNZW0,5u - ' TW _?FT26100 RTTURN

26700 RETURN2GOCU 17 WL 0

26300 RFTURN56- VWRL - EFO- __ _

26400 RETURN7W43V_ - T W9it I .ODf"

26,500 RFTURNz 11u59 NIW -

26600 VF EOsSO(PF,1fFsMFI 1.00Z6650 THP -26700 SHP a (1.IE/3 - OV0TIPFTHFSHF)*THP)10'FY$'(PF,TlF94p3F

'--6759- -- -' -to.qulvFi-owr -26800 BVl - 1f0.*GRfE8zoo7U t5 0 VRIL31

26900 Th"T a POLY(SF9DV"9CTiN9Fv1F2) *Th"q2-4050- SALT IF 4TR -- _______ ____

27000 IIV-7555252___________________

Page 136: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

132] ?71-0a F4. - -5O.96R*GK(*PfF**2

27150 585 NVR)( - NYP - 5?

27o- *79,O)Y-27350 IF(NVRX.GT.39)GO TO-20,

-774YIU iffaWet - F-27450 RETUJRN27500 9 vp P 6 TH-P-m-27550 RETURN-2 r)0.0 60 VVOL - SHP2 765 0 RETURN-Z7700 61 ORL - SHF27750 RETURN2 A 't VK5L -- S I'ff-mV27850 RE~TURN7 7900 63 VRAL - PnF*PflF279,50 RETURN2 8D0' 64 F5 - 0.57295R*0IRT(AASTflV1)7Y-

* 28050 VRL - SIGN(F5,%Vl)____*~ a8 I Du wFTUWW-----_____________

281,50 65 VRRL - THFTA(PFTHFq, HFv0.0V28200 OTO282,50 66 FS a THFTA(PF,Y4F',SHFv0.0121100 WIL - , T(E9,SWvS;)28350 RETURN? taIIjo P5-- -* r v_____ ___

2A450 RFTURN7915" 68 VRL a -. S$GW*P~l*PnF

?8550 WfETURN*~ 2f600 69 V'RSL a RVI * GR*PF*rI( - --- *

2 28650 RETURNtmouU fO VRMLftU28750 OFTIJPN

*ZIS8OO 71 V R9L - GOOPF*GK*28850 RETURN

2191900- 7? 7 a THETA(PF,'THFq IWv0)?A950 70-SH4F

290,50 73 7-THIFTAIPIToOS~Ol)Z9100 ro-so--29150 7?0 71-THSAL(1.7? -

2q200 VRRL-Z0-7129?50 RETURN

793'i0 VRRL- 7*!zq~oo QTTIJPN

29450 75 X - DVnP(PFTHPSHF)7zq,00- 'T - nVDTrwF,T 91JJF129,550 7 - nDS(PFTHPSIIF)

79650 VRP! - VRPA*FO*F 07q70Uo Of TV 77n~-29750 76 ? a nVDP(PFTHP,1,4F)7"G00 VVIII - 16.070#7-29"50 RETURNZ9900 77 rvNTTU29950 VRPI - 71OZ1-30000 770 Y a VRPY + ?*PYYW*PWF30050 VRBL - .S*VRPI*FO*E6*Y

4 ItTIOO WEIFTURN- ----

Page 137: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

133

301l50 78 vRpJ . 3.*1l*71PfmnP30200 GO Tn 77n ~________ __

3025079 VPPT a 16o10300 GO TO 77030150 90 VRI - 71*ZlINf)P304.00 An! i Y a S*VPPI*(VRPT + 2*PDFI-304.50 VRAL *GK**?*Y

30F.O0 -RETURN _______ ____ ____

TO T W ~wVwRPT6 -______

30600 CC TO 80030650 82 VRBL - -130700 RETURN30750 P3 VROL - -130800 RETURN

___ - VWU -31 P Fm ,TMFW, 14F10900 RETURN36950 95 VP8L - nvDS(PFwTKjFvSHFJ

J 31000 RETURN31050 A6 VQPI - fVDPlPFqTHF,SHFi*PDF

* 31100 RETURN3*7j mrrrsu31?00 RETURN

.1 31250 88 VQ8L - -131100 RETURN

* 31"o0 89 VWRL - -1314.00 RETURN314'50 9 r) VRHL--

* 31500 RETURN1,55 0 91 Y'ROL - (SF-F3)0*

t 31600 WFTtJRN31650 97 7 - -T14POPOF31700 VORL - 1/7I tfU 90 0 RETUN

* 31800 91 VRRL - lIEEO*O)n*s Q!5 FTUIRN31900 94 VR8L - THI*THI

*l-q wrFTUR N37000 95 THMMM - CIREC4)32050 V "I- -- *~T HI TH I fTHP#POFJ32100 RETURQN3710 " 6 T HWW 10 CITRFC,4)

* 32200 VROL - -(THF-Tlf~q)fTHP#P0FJ37715D 9 IT Up N__32300 97 VRSL - THY

314.00 9ft Fn i .0fFo17450 V .*6DPDRlFIVRLWITtSPFE1~3?S00 QFTUQN34400 ?noly FND344.50 c xnAY FCPJ ***** KOAY's JULY 6 1977 ***340500 FUNfTTON KDAY(TD,mflIYRI34.550 C *..*...*.....i.*..**

14600 C C0RVPWT CRFcnPTAN DATF TO JULTANWDXY34650 C USES LAST 4 nIGITS f)F JULIAN DAY* MO 24.4000(7 TO GET347030 r FULL JULTAN DAY.--34.750 C__ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

34.850 r34.900 lV - TYW -

34950 rF(?-IPO)10,Z0,?031-0010 TOO10 3

Page 138: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

-- -134

JY5~~ G TO 3031;100 ?a IMO * 9 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

3MO0 30 KDAV a (1461lY)/f4+(153*M*2)/S TO ID3025 - ITURN-

3S300 END -

* 3"M" C CTIOg )UMY T7.*I35400 SUBROUTINE KnATPIKD,1'DNIY) ___________

35500 C cflNVFWT JULIAN flAY TOl GREGORT.AE DAYF

35600 1(uKD.84

* 35700 Tfl4*K-1-1461*lV

-5 35 (F 0 -_3 I 's

35800

36100 ?Da5*031'3

36200 ? !F(Mlt?,01

36300 N1"3150 C ~ em 0U * SNR

36400 FUCTO VK(PTS

* 36300 cN

36'700 EUCTO -VE(.T,+SJO

S36R.50 Y

36600 C (l0 -ZT4lF1)S

36700F VO +V~(. VK*t VO

36200 C Vl 41(6O-7T.18-5*G,-.El*Wl?6-~

-~ - 37q00 C

i ? 15 -c

37400CT XNFQ *U4OLY-1?*T-6Pop3INDEPENDENT3VAR)T-e.B7F-?.-37450 WE-V Kctj VT

37100 C FP 176N-------------------------

37200 C DYERO FCN M*******.**********

* 37300 C f - 0. 0********9************

*37900 CO -P

379.00 OV aFQ fVMLYVN)M!ML fONDPENEK ARAB'37"U nu'0J-9O

T600 V - --- -DVFLYA-J1

In 3780 a POL P0

Page 139: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

1353100O MP - Op0VlvqnV'qvcP,'JV"I4VmY)

395yr fJ.FO.Nt)P/?)THEN __ ____ ___

38250 VO-V34300 FNnTc:38350 TFtflpj',so,50IR400 5 Pn - PO - P38450 IF(XN1J79799________

7 WPI) - P0-_____

381550XMO KNN* II3A O0 0 9 frF(hUSIPD)-PFM1090386S0 12 POF *ARS(Pn)18700 V'S V

3R750 1" oi Yr-npiijo

38850 YN uXN * 1.018900PPO Pr,

31950 50 rORTTNUF390-00 60 MFIN -1.0)669?0,65

39050 6S DviRr1 VR/YN

391S0 66 OVIRO - VS

f 39700 Gn1 Tn 9039?50 ?n -0yq1uu V - R39350 75 VP -

394.50 V -VP * -~npvvnmtp-vvNvx

391550 F(K-100)80,85,8%319600 80 IFIASS(Pn-P1-0.115185,97597539650 As tDVZqn a v

39750 95 CONTINUF19800 P 0- A I t( UV 7R 9-Vn 10UP0 139850 PPO-APS(PO-N9P*9FLP/Z1

39950 1000 FflRMAT(IM ,'FnR STATIOnN *9AZ,'213v0 ATvF8.0,' 0% LF-Vftv40000 7-YW SH9UtD ITNCREA3F REGRESSIOW INTFRVAE BY ,F.'OBJ

40050 flvifl - VMNNIDIIn T'FTt r- nvyR njI os I ru0l-i-40150 in5 rrINT!NUF40700 P OnARSr(V~-mUO t

* 40750 ?PP-A8S(P0-N9P*DELP/2)

* 40350 OVIRO -VMX40400 110 OFTURN40450 F#4Tn

Page 140: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

MANDATORY DISTRIBUTION LIST

FOR UNCLASSIFIED TECHNICAL REPORTS, REPRINTS, AND FINAL REPORTSPUBLISHED BY OCEANOGRAPHIC CONTRACTORS

OF THE OCEAN SCIENCE AND TECHNOLOGY DIVISIONOF THE OFFICE OF NAVAL RESEARCH

(REVISED NOVEMBER 1978)

1 Deputy Under Secretary of Defense(Research and Advanced Technology)Military Assistant for Environmental ScienceRoom 3D129Washington, D.C. 20301

Office of Naval Research800 North Quincy StreetArlington, VA 22217

3 ATTN: Code 4831 ATTN: Code 4602 ATTN: 102B

1 CDR Joe Spigai, (USN)ONR RepresentativeWoods Hole Oceanographic Inst.Woods Hole, MA 02543

Commanding OfficerNaval Research LaboratoryWashington, D.C. 20375

6 ATTN: Library, Code 2627

12 Defense Technical Information Center

Cameron StationAlexandria, VA 22314ATTN: DCA

Commander*" Naval Oceanographic Office

NSTL StationBay St. Louis, MS 39522

I ATTN: Code 81001 ATTN: Code 60001 ATTN: Code 3300

1 NODC/NOAACode D781Wisconsin Avenue, N.W.Washington, D.C. 20235

Mr. Michael H. KellyAdministrative Contracting OfficerDepartment of the NavyOffice of Naval ResearchEastern/Central Regional OfficeBuilding 114, Section D666 Summer StreetBoston, MA 02210

Page 141: ,1/ OCEANOGRAPHIC INSTITUTION ///I/I/// COMPUTING lll///l ...1. Oceanic available potential energy 2. Definitions of horizontal density surfaces 3. Hydrographic data 0, A\TR ACT (Continue

*1103 95

Z 22 - -s

I c 2

4

wrlL . ps

s~ HIM

4 -1 A

I ~~i!~'~

lb o