CPY Document

0 downloads 0 Views 1MB Size Report
Mar 13, 1995 - I gdatal argosi gargle. sh gargle argos. dat . $nextf arab vavr0721 \. )) Igdata/argos/vavr0721.log 2)t1 . send primar V AWR data to navy.
Woods Hole Oceanographic Institution

WHOI-95-06 eolJ J L~~ ',', LJ ~-f") t k~~ t\.~ Q\( \.

..

Technical Report

H' -!~ '...1 I "., . ~.. ~,~.

vvOO;,~ i ¡Q,e uCc;8f10Si a¡mlC

March 1995

¡ "",

"..(..1.'..' "-'inn li.)lj l.L ~~",)L

193

A Processing System for Argos Meteorological Data by Nancy R. Galbraith

~ .,.

..

Upper Ocean Processes Group Woods Hole Oceanographic Institution Woods Hole, Massachusetts 02543

UOP Technical Report 95-3

WHOI-95-06 UOP-95-03

A Processing System for Argos Meteorological Data

by

Nancy R. Galbraith

I ~DC)/¡'r")V b,g ",) ¡IJc\. \ l

Woods ¡¡ole Oceanographic

¡nScmWOI1 ",,' Woods Hole Oceanographic Institution Woods Hole, Massachusetts 02543

March 1995

Technical Report

Funding was provided by the Office of Naval Research through Grant No. NOOOI4-94-1-0161.

Reproduction in whole or in part is permitted for any purpose of the United States Government. This report should be cited as Woods Hole Oceanog. Inst. Tech. Rept., WHOI-95-06.

Approved for public release; distribution unlimited.

.l

-I" _ irir o =r :z3: 0 ::-o :E i-

ui

II

-0 /T

o o

.

Approved for Distribution:

-rÆ.~':, .l ~~-".t~ Philp L. Richardson, Chair

Department of Physical Oceanography

A Processing System for Argos Meteorological Data Nancy R. Galbraith Upper Ocean Processes Group Physical Oceanography Deparment Woods Hole Oceanographic Institution 13 March 1995

Abstract Upper Ocean Processes Group meteorological data is transmitted from surace buoys via Argos satellte and processed in an automatic mode on a UNIX workstation. Data is extracted from input fies based on instruent

type and experiment, processed as appropriate, and plotted, without user intervention. Whle the processing system normaly rus automaticaly, it is designed so that modules can also be ru directly from a termnal when necessary. The Argos processing system alows us to monitor the

meteorological data being collected in the field, and provides early inormation about problems with sensors, instruents, or buoys, when they occur. The automatic process alows more information to be viewed with

less effort, and increases the usefuess of the Argos data.

i

Contents .

Abstract

i

1 UNIX Implementation and Overview

1 2

1.1 Cron...................

2 Main Processing Script

3

3 Processing VA WR Data

4

3.3 VA WR Table Files .

5 5 6

4 Processing IMET Data

7

4.1 Shell Script Imet.sh .

8 9 9

3.1 Shell Script gargle.sh

3.2 Program Gargle

4.2 Program GargleJmet .

4.3 IMET Table Files . . . 5 Processing Engineering Variables

10

6 Processing Position Data

11

7 Data Transmission Scripts

12

8 Plotting Scripts

13 13 14

8.1 Plot Plus Time Series Plots

8.2 Matlab Position Plot 9 Appendices

15

Appendix i. Startup Shell Scripts Appendix II. VA WR Processing . Appendix III. IMET Processing . Appendix IV. Engineering PTT Processing. Appendix VI. Data Distribution Scripts ..

15 19 25 33 38 41

Appendix VII. Plotting Scripts and Sample Plots

43

Appendix V. Position Processing Scripts . .

11

Acknowledgements

54

II

1 UNIX Implementation and Overview Data tranmitted from surace buoys via Argos satellte for the Upper Ocean Processes (UOP) Group experiments are processed in an automatic mode on a Sun workstation, Griffon, using a series of shell scripts and C programs initiated by the UNIX cron utilty. Files of data from al of the UOP's active Argos transmitters are sent daily from Service Argos' computers in Landover, Maryland, using ftp. The UNIX cron utilty rus a

script every hour which checks for incoming data. When a new data fie is

found, processing scripts are activated. Each platform transmitter termnal, or PTT, in the field includes its own

identification number in the messages it sends to Service Argos. This number alows Servce Argos to route each message to the correct destination, grouping the messages it receives for retransmission to the PTT owner. Each PTT identification number is associated with an experiment number, which is used for routing and accounting puroses, and

so data for each experiment is bundled into a separate file. Curently, we in a file caled argos.dat, and data from our GLOBEC buoy in fie argos2.dat. receive data from our Arabian Sea buoy

Incoming data is processed by a suite of C programs and shell scripts. While these programs and scripts are normaly ru automaticaly by the UNIX scheduler, cron, they are designed so they can also be run directly from a termnal in cases where Argos transmissions are interrupted, an instruent must be reprocessed, or non-standard plots are desired.

The primar goal of the Argos processing. system is to monitor the meteorological data being collected in the field, as soon as it becomes available. The system also provides early information about problems with sensors, instruents, or buoys, when they occur. By automating the entire

process, we alow more information to be viewed with less effort, and increase the usefuess of the Argos data.

1

1.1 Cron The UNIX cron utilty is curently run by user nan on Griffon. Cron executes commands at specific times. The commands are entered into a table, caled the cron table, by program crontab. The cron table entry on Griffon can be edited by its owner by typing crontab -e. New cron table

entries can be started using crontab -e, or checked by typing crontab -1. The cron table entry for the Arabian Sea and GLOBEC Argos processing is:

1 * * * * /gdata/argos/argos.sh 1 8 * * 1-5 Ipuli/data/arab/argos/dopl. sh 1 8 * * 1-5 /puli/data/globec/argos/dopl.sh

The fist entry runs the script argos.sh at one minute past every hour,

every day. The second and third commands generate plots at 8 a.m. on weekdays only, using plotting scripts for two experiments in their processing directories. The crontab entries are basicaly names of shell script programs. To change the processing system, the scripts themselves can be edited, without having to alter the crontab entry. As experiments star and end, the appropriate

commands can be added to or deleted from the main processing scripts. The directory j gdataj argos on Griffon contains all the shared processing software and has subdirectories for each active experiment. These experiment subdirectories contain archives of Argos data and information about the instruentation. The processed data normally resides, along

with experiment-specific scripts, on another workstation, on a disk that is

mounted on Griffon using the Network File System (NFS).

IT data must be retransmitted from Service Argos for any reason, argos.sh will automaticaly process any new data every hour. As long as Service Argos does not send more than one fie within that time period, cron will cause argos.sh to copy and process al incoming data fies with the names 2

specified in the script. To process an incoming fie immediately, the script argos.sh can be invoked from the keyboard.

2 Main Processing Script The main processing is initiated by the shell script argos.sh, in Griffon's directory j gdataj argos. Incoming Argos data is wrtten to that directory in

fies named argos.dat and argos2.dat, which represent two different Argos

accounts. This script handles each input fie separately, first processing al data in argos.dat.n, then argos2.dat.n.

For each experiment, the script fist checks for the existence of the appropriate incoming data fie. IT the fie exists, it is moved to a fie named argos(2).dat.n, where n is a monotonicaly increasing number. Note that if the fie argos.dat.l does not exist, that fiename is used for the new fie. IT it does exist, the directory is checked by the shell script fidlast.sh to

determne the next sequence number for the output fiename, which is

numericaly one greater than the highest existing number. Therefore, removing the file argos.dat.l will cause erratic numbering, since the next fie processed will be caled argos.dat.l, but incoming data fies will never be overwtten by the automated processing system.

Once the fie archiving is done, the script processes data from the Vector-Averaging Wind Recorder (VAWR), then data from the Improved Meteorological (IMET) System, if it is being transmitted. IT IMET data is

not transmitted, there is normaly a tensiometer reporting, and its data is processed after the VA WR data. Position data, generated by the Argos system, is processed last. Processing each of these data sets requires a

separate pass through the incoming fie, looking for the appropriate Argos transmitter ids. Each of these tasks is handled by an independent shell script, which can be ru manualy if needed.

See Appendix I for text of the shell scripts argos.sh and fidlast.sh.

3

3 Processing VA WR Data The script argos.sh processes VAWR data using another shell script, gargle.sh, which in turn rus a C program to extract and scale the incoming Argos data. Shell script fgdatafargosfgargle.sh starts one of the gargle processing programs, which extract VA WR data from a specified

Argos input fie based on information in a calbration fie. The VA WR data fies produced by this system contai the vaables

yearday, wind east, wind north,- wind speed, wind direction, short wave radiation, relative humdity, barometric pressure, sea temperature, air temperature, long wave thermopile voltage, body temperature, dome

temperature, and long wave radiation. Air and sea temperatures are recorded in degrees centigrade, while body and dome are Kelvin temperatures. Wind vectors are recorded in meters per second, radiation values in watts per square meter, and thermopile voltage in microvolts.

Relative humdity is reported as a percentage, and barometric pressure is reported in millbars. A sample output fie is contained in Appendix II.

This system unformy uses the convention that yearday 1 begins at midnght on Januar 1. This is consistent with the UNIX date utilty, which is used to check for invald dates and to set date limits for plots. Occasionaly VA WR data will need to be reprocessed. This will usually occur when corrections need to be made to a table file. If a VAWR's interval counter resets, the date calculated by the software system wil be incorrect, and the data will need to be reprocessed after a table fie change has been made. To reprocess VAWR data in case of errors or resets, remove

any unwanted or incorrect data from the fie the processing

fgdatafargosfexperfvawrnn.arch, which is appended by

system. Then cd to f gdataf argos and type

gargle. sh garglenew argos. dat . nn exper vawrn )) /gdata/argos/vawr. log 2)&1

4

where nn is the number of the argos.dat fie to be reprocessed, exper is the experiment name and nn is the 4-digit VA WR number. The experiment

name must correspond to two data directories, one in jpuljdata and one in jgdatajargos. The fist, jpuljdatajexper, must have a subdirectory named

argos, and the second, jgdatajargosjexper, must contain a table fie for the VA WR to be processed.

Note that the working data fie in the processing subdirectory on Pul is overwrtten daily by the automated processing system, so any changes

made there will be lost. To permanently alter the working data fie, the

archive version of the fie, in the j gdataj argos directory, must be modified.

3.1 Shell Script gargle.sh

Arguents to gargle.sh are the gargle program name, the input data file to be processed, the experiment, and the VAWR name. Using these arguents, gargle.sh generates fienames and commands to process the

incoming data.

Gargle.sh cals program gargle or garglenew with the fienames of the input . Argos fie, the VAWR table fie and the output VAWR data fie. Then

gargle.sh sorts the new data and appends it to an archive fie in the experiment subdirectory on Griffon. The archive fie is then sorted by date

with the UNIX sort utilty, deleting duplicate entries. The sorted version of the fie is placed in the processing directory for the experiment on Puli, in a

fie names vawr.asc. See Appendix II for text of gargle.sh.

3.2 Program Gargle Program gargle extracts VA WR data from a specified Argos input file based on information in a calbration fie, also caled a table fie. The table fie

5

contains the key to varable positions within the incoming records, alowing

data to be extracted, and contains calbration vaues to be used in scalng the data. Program gargle wrtes data to a new fie, and will overwrte an "existing fie if one is specified as the output fie.

Gargle was adapted by Roger Goldsmith, of WHOI's Computer and The original version, caled gargoyle, was

Inormation Servces (CIS) group.

wrtten by Thomas Danorth to ru under the SCO Zenix operating system

on a 386 PC, and was designed to work with a commercial database. Program gargle, which rus under SunOS UNIX, uses portable ASCII data

fies. The specifics of program gargle are beyond the scope of this manual. There are at present two versions of the gargle program. Programs gargle

and garglenew are identical except for the handlng of long wave radiation. Both versions calculate long wave from independently scaled thermopile voltage and body and dome temperatures, but garglenew uses a new algorithm. Because the new type of calbration constants were not available for the Arabian Sea VAWR, we retained the original code for the duration of that experiment. The old version will be removed afer the first Arabian Sea mooring is recovered.

3.3 VAWR Table Files Program gargle uses table fies which have the same format as those used by the tape processing programs vawr_cdf and vawr_cal, but with several

extensions needed to decode the Argos record. The table fies control the processing of the incoming record and provide documentation of cabrations used. The use of table fies provides some flexibilty to the system, accommodating changes in the incoming record.

Gargle extracts the PTT numbers from the specified table fie, and uses those numbers to decide which records to extract from the incoming Argos fie. It also uses the position of a variable description in the table fie and

the length in bits specified to determne the position and length of the vaable within the Argos record. The calbration vaues are used by gargle 6

to scale the raw data vaues, using the same algorithms as those used by

the tape processing system. The minimum and maxmum values for each varable specified in the table fie prevent wild vaues from entering the data

stream. This windowing can mask problems with sensors, and must be used very carefuy, especially during instruent evaluation.

Comment lines in table fies are denoted with a two-part forward arrow,

consisting of a dash and a greater-than symboL. Varable identification lines begn with a number sign, an integer representing the variable position, a colon, and the short and long version of the name of the varable. A varable's short name is used to select the processing function to be used on the data in the field defied by the entry, and should not be modified. See Appendix II for a sample VAWR table fie.

4 Processing IMET Data The IMET system in the GLOBEC experiment transmits hourly averages to Argos. Script argos.sh processes the IMET data, as it does for the VAWR data, by invoking a secondar shell script which in turn cals a C

program. The shell script imet.sh cals program gargleJmet, which extracts data from the incoming fie using inormation from a table fie. The IMET system software has the capabilty to handle many variables, some of which have not been implemented in the IMET hardware at this time. The program which decodes the input fie produces an intermediate fie, which is modified by the awk script iIIet.awk before being archived and used. In the awk script, the vaable order is changed to more closely

resemble the order of vaables in VAWR fies. The fial output file has a format which is similar to the VA WR fies, but has several dummy varables, which are set to o.

The varables in the working or archive version of the IMET fies are real

yeaday, wind east, wind north, dumy, dumy, short wave radiation, 7

relative humdity, barometric pressure, air temperature, sea temperature,

dumy, dumy, dumy, long wave radiation, battery voltage, mooring tension, and precipitation. The unts for vaables which are reported by

both VA WR and IMET are described above. In addition, the IMET battery voltage is recorded in amps, the mooring tension in pounds, and the precipitation sensor measures cumulative precipitation in millmeters. A sample output fie is found in Appendix III.

To reprocess IMET data in case of errors, use a text editor to remove unwanted data from fie imet1.arch in the experiment subdirectory in /gdata/argos. This fie is appended by script imet.sh. After any unwanted or eqoneous data has been removed, cd to / gdata/ argos and type

imet . sh argos2. dat . no exper instruent where nn is the number of the argos2.dat fie to be reprocessed, exper is the experiment name, and instruent is the instruent name, normaly imetl

or imet2. The experiment name must correspond to two data directories, one in /puli/data and one in /gdata/argos. The fist, /puli/data/exper,

and the second,

must have a subdirectory named argos,

/gdata/argos/exper, must contain a table fie with the name of the instruent and the fiename extension .tbL. Note that changes to the

working data fie in the experiment directory on Pul will be overwitten by the automated processing. .

4.1 Shell Script Imet.sh

Arguents to imet.sh are the input fiename, the experiment/directory, and the instruent name. Shell script imet.sh invokes program gargleJmet with

the name of the Argos input fie, the table fie and the output file. The script rus the gargle output through an awk script to compute real

yeaday, reorder the variables and remove data with invald dates. The awk script also adjusts the time of the data records to the hal hour by adding 8

~

30 minutes to the reported time, and normalzes air temperatures if needed. The shell script then sorts the modified data, appends it to the archive file, sorts the archive fie and copies it to the experiment's processing subdirectory in fpulfdata.

See Appendix III for text of imet.sh and imet.awk.

4.2 Program Gargle..met Garglejmet extracts the PTT numbers from the specified table fie, and

retrieves records with matching PTT numbers from the Argos fie. The input records are decoded based on the length and position of each varable specified in the IMET table fie. Data is converted from ASCII hexadecimal to floating point and wrtten out in comma-separated ASCII strings. Output is to a new fie, and, if an existing fie is specified, it will be

overwtten. The vaiables output by program garglejmet in the present implementation

are: Integer day, hour, barometric pressure, air temperature, sea temperature, wind east, wind north, relative humdity, short wave radiation, long wave radiation, precipitation, battery voltage, and mooring tension. The order of these varables is modified by the shell script imet.sh, as described above.

4.3 IMET Table Files The IMET table fies are similar to the VA WR table fies used by program gargle. Because IMET sensors retur calbrated data in scientific unts, the IMET table fies do not contain calbration coeffcients for most varables. They do contain information needed to decode and scale the incoming data and to control the processing itself.

At present, each Argos IMET record contains two IMET data records. To 9

accommodate that double record in one pa,s by program gargle-Imet, the table fie essentialy contains two complete, identical descriptions of the

IMET record. See Appendix III for a sample of an IMET table fie.

5 Processing Engineering Variables For some experiments, a separate Argos tranmitter reports mooring

tension from an iIlclep~ndent tensiometer. Oth~r varables, of interest for

engineering purposes, may be included in the Argos record for these transmitters. For the Arabian Sea I experiment, varables transmitted are tension and battery voltage.

Shell script dotens.sh in directory jpuljdatajarabjargos processes the data from the engineering Argos transmitter. This script is normaly caled with the number of the argos.dat.n fie to be processed. If it is caled with no arguents, it will process the most recent argos.dat.n fie in directory

j gdataj argos.

Dotens.sh uses the awk script tens.awk to identify tensiometer records in the incoming Argos fie and to calculate year day. These fields are wrtten to fie tens.raw. Tension and battery voltage are ASCII hexadecimal fields,

and are converted to decimal values and scaled in program conv. Conv wrtes the working tension fie, tens.asc, which contains real yearday, year, month, day, hour, minute, second, tension, dumy, and battery voltage.

To reprocess tension data in case of errors, go to the processing directory for the experiment, usualy on Pull. If necessar, remove any incorrect data from the database by editing fie tens.raw, which is appended by this script, then type

dot

ens . sh nn

where nn is the number of the argos.dat fie you wish to reprocess. 10

See Appendix IV for the text of dotens.sh, tens.awk, and conv.c.

6 Processing Position Data Position data is processed by a separate script, and stored in a subdirectory under the usual processing directory for Argos data for each experiment.

The script that processes Arabian Sea I position data, for example, is doposit.sh, and is found in jpuljdatajarab in the argosjposit subdirectory.

Position data is generated by Service Argos and incorporated into the incoming VAWR and IMET records. Unlke meteorological data, position data seldom needs to be reprocessed, as it is not liable to contain timing errors and is not subject to calbration. However, it is often desirable to remove portions of the position record for an experiment, such as the stea.ng time before a mooring deployment.

This alows plotting with auto-ranging axs limits, at an expanded scale, so that movement of a mooring can be monitored easily. Argos position records contain a vaue indicating the qualty of the

caculated position, a number between one and three, with three as the highest qualty. In this processing scheme, al location records are used, but

the qualty word is retained for future use. Including al position values, the

Argos positions seem to be accurate to approximately one kilometer. To reprocess position data, use a text editor to remove unwanted values, if

necessary, from archive fies in jpulijdatajexperjargos. For GLOBEC, which generates position records for both' IMET and VA WR PTTs, these

fies are in jpuljdatajglobecjargosjposit and are named vlpos.arch.asc and ilpos.arch.asc. For the Arabian Sea deployment, which receives only

VA WR positions, the position fie is pripos.arch.asc. After removing any

incorrect data, cd to jpulijdatajexperjargosjposit and reprocess by typing doposi t . sh nn , 11

where nn is the number of the argos(2).dat fie you wish to rerun. If this arguent is omitted, doposit will process the most recent Argos fie for the experiment related to the curent working directory. Position data is extracted from the Argos fie by fiding records in the fie

with a line length of 13 words and piping those records to an awk script, posit.awk. That script calculates real yearday, normalzes longitude to 180 degrees, and wrtes out PTT number, year, month, day, hour, minute, second, yearday, lat, long and a qualty Hag. This data is wrtten to the temporary fie jun.dat. The shell script then checks this fie for the desired PTT numbers, and if any exist, appends the position record, stripped of the PTT number, to the appropriate archive fie. This fie is then sorted and the output written over the working version of the position fie. For the Arabian Sea experiment, that fie is /pul/data/arab/argos/posit/arab1.pos.

See Appendix V for the text of doposit.sh and posit.awk.

7 Data Transmission Scripts To automaticaly distribute data to hosts with anonymous ftp accounts, ftp is ru from the shell script ftp.sh, invoked by argos.sh. The script uses the

-n and -i Hags, which alow non-interactive use of ftp, redirecting input commands from the text of the script itself. For sites receiving data via ftp, we transmit the entire working version of the data every day, overwrting the data previously sent.

For hosts without anonymous ftp sites, we use the UNIX mail utilty to distribute the data. When using mail, we send only updates to the data.

Since we want to be sure to send a ful day's worth of data, we use the UNIX utilty tail to extract the last 100 records from the working version of the data fies. In the curnt implementation, we extract variables of

interest for our mail recipients, using an awk script, x.awk. We prepend a header record identifyng the data as ours, and a record containing the varable names, before invoking maiL. 12

See Appendix VI for the text of the scripts used to distribute Argos data. Note that the hosts names and IP addresses have been changed in the

scripts reproduced there, for securty puroses. These scripts can be run

manualy to retransmit data if necessary.

8 Plotting Scripts Plots of al incoming data are generated and printed automaticaly on weekday mornngs. The plotting scripts, which can be different for each experiment, are found with the processed data in the experiment subdirectories, curently on the workstation PUL. The program Plot Plus, wrtten by Donald Denbo of NOAA's Pacific Marne Environmental Laboratory, is used to create multi-panel plots of instruent data. Maps of mooring locations are created using Matlab, a commercial numerical software package.

Plots of Argos data are used to monitor both meteorology and so we display the varables of meteorological interest on a instruentation, separate plot from those of engineering interest. The scripts that create

these plots are described here, see Appendix VII for examples.

8.1 Plot Plus Time Series Plots 8.1.1 Scientific Variables Plot

The command fie argoss.ppc is used with program pplus to plot VAWR Argos meteorological data. The arguents are start day, end day, and input fiename. The automated processing system invokes this script with a 3-day

time span ending on the curent day provided by the UNIX date utilty. See Appendix VII.2 for the text of the script argoss.ppc and a sample output plot. 13

8.1.2 Engineering Variables Plot

The pplus command fie argose. ppc plots the varables that are of interest

primarly for engineering puroses. Some of these vaables are reported by the VA WR, some by the IMET or the tension recorder, depending on the Argos confguation for each experiment. The arguents are identical to the arguents for argoss.ppc, above. See Appendix VII.3 for the text of

argose.ppc and a sample output plot.

8.2 Matlab Position Plot Matlab script posit1.m is used to plot Argos positions. Because it is essential to see the most recent position value, we alow the plot to self-scale. This assures that any change in position will be very visible on the fial plot, not cropped because it is out-of-bounds.

For some experiments, a watch circle is overplotted on the positions. This indicates the calculated limits of the mooring line, and is based on the depth of the mooring. Care must be used when plotting watch circles, however, since the accuracy of the Argos position information is only about one kilometer. For deep-water moorings, like the Arabian Sea, this is sufcient for the large watch circle of over 3 km. For a shalow mooring like

GLOBEC, with its watch circle of about 40 meters, the Argos error exceeds the expected watch circle, so the watch circle is not plotted.

See Appendix VIlA for the text of the Matlab position script, and sample output plots.

14

"

9 Appendices Appendix i. Startup Shell Scripts Appendix 1.1. Shell Script argos.sh

.! /bin/ sh

.

. Cl(.)

argos .sh

. /gdata/argos/argos.sh

. I usage: sh argos. sh . . 931005 n.galbraith .

. Tests for presence of file before archiving and processing

(2) .dat.n where n is

. Incomin data is moved to argos

. a constantly incrementing number.

.

. also processes engineering data (tension) . uses findlast shell script in scripts subdirectory . normally invoked by cron. use crontab -1 to check.

.

. . . .

Be Careful Editing This!!!!! mior mod 940725 to send stdout of gargle.sh to logfile,not mail 940908 remove met 1 (the pc) from the loop 940930 redesign: all processing done here, plotting done last

if ( -f /gdata/argos/argos.dat J;

then if ( -f / gdata/ argos/ argos. dat . 1 J ;

then

lastf=' / gdata/ argos/ scripts/findlast . sh "/ gdata/ argos/ argos. dat i , , nextf=' expr $lastf + l'

date )) /gdata/argos/argos.log

echo II moving argos. dat argos. dat . $nextf II \ )) /gdata/argos/argos .log

15

mv I gdatal argos

I argos. dat \ Igdata/argos/argos .dat. $nextf

else nextf=1

log

date )) Igdata/argos/argos .

echo II moving argos. dat argos. dat . 1 II \ )) I gdatal argosl argos. log mv I gdatal argos

I argos. dat I gdatal argos

I argos. dat . 1

fi . process primary arabian sea I VAWR

I gdatal argosi gargle. sh gargle argos. dat . $nextf arab vavr0721 \ )) Igdata/argos/vavr0721.log 2)t1

. send primar V AWR data to navy Ipulil datal arabI argosl domail. sh 0721

. process tension Ipulil datal arabI argos

I dot

ens . sh $nextf

. process position

Ipulil datal arabI argos/posi tl doposi t . sh $nextf . process primar arabian sea II VAliR I gdatal argos

I gargle. sh garglenev argos. dat . $nextf arab2 \

vavr0720 )) Igdata/argos/vavr0720.log 2)t1 . process arabian sea II tension Ipulil datal arab21 argos

I dot

ens . sh $nextf

. process position

fi

Ipulil datal arab21 argos/posi tl doposi t . sh $nextf

. nov process the GLOBEC data in argos2. dat if ( -f Igdata/argos/argos2.dat J;

then if ( -f Igdata/argos/argos2.dat.1 J;

then 16

lastf= r Igdata/argos/scripts/findlast. sh (( Igdata/argos/argos2. dat' , r nextf= r expr $lastf + 1 r date )) Igdata/argos/argos.log

echo II movin argos2. dat argos2. dat. $nextfll \ )) Igdata/argos/argos .log mv I gdatal argos I gdatal argos

I argos I argos

2 . dat \ 2 . dat . $nextf

else nextf=1

log

date )) Igdata/argos/argos .

echo II moving argos2. dat argos2. dat . 111 \ )) Igdata/argos/argos .log mv I gdatal argos

fi

I argos2 . dat I gdatal argosl argos2 . dat . 1

. process GLOBEC primar VAWR from file argos2.dat.n Igdata/argos/gargle.sh garglenev argos2.dat.$nextf \ globec ,vavr0707 )) Igdata/argos/vavr0707.log 2)t1 . process GLOBEC primar 1MET - includes tension Igdata/argos/imet.sh argos2.dat.$nextf globec imet1 \ )) Igdata/argos/globecimet1.log 2)t1 . process GLOBEC secondar V AWR

I gdatal argosl gargle. sh, garglenev argos2. dat . $nextf \

globec vavr0380 )) Igdata/argos/vavr0380.log 2)t1

. process GLOBEC secondar 1MET

Igdata/argos/imet. sh argos2. dat. $nextf globec imet2 \ )) Igdata/argos/globecimet2.log 2)t1 . send GLOBEC data to recipients

Igdata/argos/globec/ftp.sh )) Igdata/argos/globec/ftp.log 2)tl . process position

fi

Ipulil datal globecl argos/posi tl doposi t . sh $nextf

17 .

Appendix 1.2. Shell Script Findlast.sh

This script works with groups of fies with threepart names,where the parts of the names are separated by periods, and the third part of the name is a version number. It will fid the fie with name matchng the two pars specified in arguent 1 with the highest version number on disk. Findlast is caled by argos.sh and doposit.sh, but it can also be invoked from the keyboard to determne the number of the most recent argos.dat or argos2.dat fie. It returs only the number of the fie, not the complete

fiename.

# ! /bin/ sh # find the files in the arguent and return the number of highest # version number.

# based on filenames file. ext. 1 file. ext. 2 .... file. ext. n # # modified 950124 to handle deleted data files by using the version # number instead of relying on creation date of file

# if ( $# -eq 0 J

then echo -1

fi

exit

ls $1* lawk 'BEGIN iFS="."lfprint $3)-' Isort +0 -n Itail -1

18

Appendix II. VA WR Processing

Appendix 11.1. Shell Script gargle.sh # ! /bin/ sh # gargle. sh: ru one of the gargle programs and process the output

# usage: gargle. sh program argosfilename experiment vawrname

# example: gargle.sh garglenew argos2.dat.1 globec vawr0707 # 941208 n. galbraith

# arguents:

# $1 program to ru

garglenew

must be in /gdata/argos/src

# $2 inputfile

argos2 . dat . 1 glo bec

must be in / gdata/ argos subdirectory / eperiment

# $3 experiment # $4 vawrnam

vawr0707

cd /gdata/argos src/$1 $2 $3/$4.tbl $3/$4.raw sort +0 -1 -u -n $3/$4.raw ) $3/$4.asc cat $3/$4.asc )) $3/$4.arch

# # # # #

table file in subdir named in $3 go to incoming data spot ru garglenew or gargle remove incoming dupes archive, remove duplicates and send to processing dir

sort +0 -1 -u -n $3/$4.arch ) /puli/data/$3/argos/$4.asc

Appendix 11.2. Gargle output This is a sample output fie containing VAWR data as written by program

gargle. The varables are:

yearday east north speed dir sw rh bp

seaT

airT TPV bodyT domeT lw

m/s m/s m/s deg w/m-2 1. mb

degC

degC mv DegK DegK w/m-2

52.229,-4.79,1.66, 52.250,-3.78,2.41, 52.260,-3.37,2.86, 52.281,-2.70,4.11,

5.07,25.8,-1,95.4,995.6, 4.48,37.5,-1,95.5,995.0, 4.42,29.6,-1,95.6,994.9, 4.92,13.3,-1,95.7,993.9,

19

5 . 552 , 6.74,41.1,279.8,279.8,352.8 5 . 559 , 6 .59 ,42 . 9 , 279 . 7 , 279 . 6 ,352.6

5 .558,

6.57,44.4,279.7,279.8,352.9

5 . 546 ,

6 . 68 ,48 .0,279.8,279.7 ,354.4

Appendix II.3. VA WR Table File

-) vawr_tabl :0721 : nan : Tue Jun 28 94

#0 :v721wr instruent identifier 01356 - PROGRA 06856 - PIT 06857 - PIT 06858 - PIT

#1 :EC east counts 16 - BITS_EC -10.0 - MIN_EC

30.0 - MA_EC -99.0 - MISS_EC

#2 :NC north counts 16 - BITS_NC -10.0 - MIN_NC

30 . 0 - MA_NC -99.0 - MISS_NC #3 :RC rotor counts 16 - BITS_RC -10.0 - MIN_RC

30 .0 - MA_RC -99.0 - MISS_RC

#4 :CO CO counts 8 - BITS_CO -10.0 - MIN_CO

30.0 - MA_CO -99.0 -.8 #5 :VA vane counts 8 -10.0 -

MISS_CO MAGVAR

BITS_VA KIN_VA

30.0 - MA_VA -99.0 - MISS_VA #6 :TM time

20

,

16 - BITS_1M 19920101 - MIN_1M

19941231 - MA_1M -99.0 - MISS_1M

450 - TSAM 450 - CWIS

94 - YE 10 - MONT 02 - DAY 06 - HOUR

30 - MINUE 00 - SECOND #7 : SW short wave radiation 20 - BITS_SW -10.0 - MIN_SW

1500 .0 - MA_SW -99.0 - MISS_SW 25418 - #_SW 10 . 52 - CAL_SW 4.0 _ Z_SW #8 :LW long wave radiation 20 - BITS_LW 100 .0 - MIN_LW

500 .0 - MA_LW -99.0 - MISS_LW 28463 - #_TP 2.04164 - LW_A 1.11 - LW_B O. - LW_C -1018.68 - TP_A 2.04164 - TP_B #9 :RH relative humidity 16 - BITS_RH 2.0 - MIN_RH

115.0 - MA_RH -99.0 - MISS_RH 034 - #_RH 21

5.0667°0.04571 -0.0012539 3.51563 210.32 -

A_RH B_RH C_RH TI_RH P20

20. - P20F ACT

#10 :BP barometric pressure 16 - BITS_BP 800.0 - MIN_BP

1100.0 - MA_BP -99.0 - MISS_BP 43698 - # _BP

o . 0 - A_BP 0.0 92.68879 2.672706 -114.7084 0.031184 27.92331E-06 2.636716 27.85152 0.831612 20.34282 -4035.285 0.0 -14001.10

-

B_BP C1_BP C2_BP C3_BP D1_BP TO_BP TI_BP T1_BP T2_BP T3_BP Y1_BP Y1_BP Y2_BP

#11 : ST sea temperature 20 -10.0 40.0 -99.0 5005 9038.16 3998.49 -1.45

-

BITS_SEA MIN_SEA MAX_SEA MISS_SEA #_SEA R1_SEA R2_SEA F1_SEA

759. 14 - F2_SEA .109376436E-02 - TA_SEA

22

.262474576E-03 - TB_SEA . 146244 73E-06 - TC_SEA 3608.0 - RS_SEA -) number of multiplexed temperature -) sensors in the instruent

4.0 - K_TEM #12 :AT air temperature 20 - BITS_AIR -20.0 - MIN_AIR

40.0 - MA_AIR -99.0 - MISS_AIR 5804 - #_AIR 12699.00 - R1_AIR 4999 .70 - R2_AIR

-131.18 - F1_AIR 711 .50 - F2_AIR

.128804283E-02 .235519671E-03 .951705804E-07 4296.0

-

TA_AIR TB_AIR TC_AIR RS_AIR

#13 : BT body temperature 20 - BITS_B -10.0 - MIN_B

50 . 0 - MA_B -99.0 - MISS_B 284631 - #_LWB

23460 . 0 - Ri-B 10000.0 -65.50 712.40 .10125311E-02 .24220731E-03 .14217244E-06 4465.0

-

R2_B F1_B F2_B TA_B TB_B TC_B RS_B

#14 :DT dome temperature 20 - BITS_O -20.0 - MIN_O

23

50.0 - MA_d -99.0 - MISS_D 284632 - '_LWD 23460 .0 - R1_D

10000.0 - R2_D -66.56 - F1_D 711 .49 - F2_D

.10161020E-02 - TA_D .24160036E-03 - TB_D

. 14344824E-06 - TC_D 4450.0 - RS_D .15 : DU filler engineering byte 8 - BITS_DUM .16 : CS checksum 16 - BITS_CHECKSUM

-) 1* must be 1st non standard canst *1 30 - LST _BYT

-) 1* must be 2nd const,O-bin 1-asc *1 1 - ASCII

24

Appendix III. IMET Processing

Appendix IIL1. Shell Script Imet.sh

# ! /bin/ sh # imet. sh rus gargle_imet # # usage: # imet. sh argosfilename directory/experiment instruent

# where argosfilename is the raw incoming argos file

# experiment is the directory experiement i. e. globec # instruent_name is normally imet1 or imet2 # # 941208 n. galbraith

#

cd /gdata/argos # go to incoming data spot src/gargle_imet $1 $2/$3.tbl $2/$3.raw tr ',' , , ( $2/$3.raw I awk -f imet.awk Isort +0 -1 -u -n ) \

$2/$3. asc # remove incoming dupes

cat $2/$3.asc )) $2/$3.arch # archive

# remove dupes from whole set # and send to processing dir sort +0 -1 -u -n $2/$3.arch ) /puli/data/$2/argos/$3.asc

25

Appendix 111.2. Imet.awk BEGIN i

pday = "date +1.j ";

NU = 0; )-

i hour = $2 + . 5 ; jday = $1 + (hour / 24.);

if ($1 (= pday) i at = $4;

if (j day ( 91.) i

if (at ) 25.) i

at = at - 35.96 - 5.; ))-

printf ("1.9 .4f ,1.9. 4f, 1.9 .4f ,1.2d, 1.2d, 1.9. 4f , II ,jday, $6, $7 ,NUL ,NUL, $9) printf ("1.9 .4f, 1.9. 4f, 1.9. 4f ,1.9. 4f ,1.2d, 1.2d, 1.2d, II ,$8, $3 ,at, $5, NU ,NU

,NU) ;

printf(II1.9 .4f, 1.9 .4f, 1.9 .4f, 1.3d\n" ,$10 ,$12 ,$13,$2) )-

else print $1, j day, pday, tday )-

# process argos imet # input variables: , # day hr bp at st u v rh sw lw rn bv tens

# output variables: # realday u v null null sw rh bp at st null null null lw bv tens hour # this version 950104 checks for clock jumping ahead of today's date

# 950202 added 30 minutes to time to reflect center point of record # 950204 normalize very low temperatures # air temp max = 35.95 min = -5.

# sea temp max = 38.95 min = -2. # to normalize' 'wrapped" values, subract (max val + .01), add min value # i.e. at val = 33.5, actual val should be 33.5 - 35.95 - 5. = -7.4 # for this experiment, use max acceptible val for at = 25

26

"

Appendix III.3 Sample IMET File Variables labelled d are dummy variables.

bp airT seaT d d d lw bv tns pre

yearday u v d d sw rh

mb dege degc w/mA2 v Ibs mm

m/s m/s w/mA2 1.

53.1042, -5.00,5.30,0,0,0.0,91.0, 995.8,3.10, 5.46,0,0,0,321.0,13. ,3450.,0 53. 1458, -4.10,7.00,0,0,0.0,90.0, 996.0,2.95, 5.46,0,0, Q, 322.0,13. ,3350. ,9

53.1875, -3.30,8.20,0,0,0.0,91.0,

996 .2,2 . 55, 5.53,0,0,0,320. a , 13. ,3300 . ,9

53.2292, -2 . 50 ,7.80,0,0,0.0,90.0, 996.4,2.48, 5.56,0,0,0,317.0,13. ,3300. ,13

53.2708, -3.30 ,8. 00,0,0,0.0,88.0, 53.3125, -4. 50,7.90,0,0,0.0,87.0,

27

996.8,2.46, 5.63,0,0,0,313.0,13. ,3050. ,13 996.8,2.35, 5.60,0,0,0,313.0,13. ,3000.,0

Appendix IlIA. iMET Table File -) imet_ tabl : 01419 : roger : Thu Dec 08 95

#0 : i01419 instruent identifier 01419 - PROGRA 23657 - PIT 23658 - PIT 23659 - PIT

#1 : DA day of year 09 - BITS_DA 1.0 - MIN_DA

365 .0 - MA_DA -99.0 - MISS_DA

#2 : HR hour of day 05 0.0 23.0 -99.0

-

BITS_HR MIN_HR MAX_HR MISS_HR

#3 : BP barometric pressure 11 - BITS_BP 900.0 - MIN_BP

11 00 . 0 - MA_BP -99.0 - MISS_BP

#4 :AT air temperature 12 - BITS_AT -5.0 - MIN_AT

35.0 - MA_AT -99.0 - MISS_AT 0.01 - SCALE_AT 500.0 - BIAS_AT

#5 : WT sea temperature 12 -2.0 38.0 -99.0 0.01

-

BITS_WT MIN_WT MAX_WT MISS_WT SCALE_WT

28

"

200.0 - BIAS_WT

#6 :WU Wind U 10 - BITS_WU -51.5 - MIN_WU

51. 5 - MA_WU -99.0 - MISS_WU 0.1 - SCALE_WU 511. 0 - BIAS_WU

.

#7 :WV Wind V 10 - BITS_WV -51. 5 - MIN_WV

51. 5 - MA_WV -99.0 - MISS_WV 0.1 - SCALE_WV 511.0 - BIAS_WV

#8 :RH relative humidity 7 - BITS_RH o . 0 - MIN_RH

100 . 0 - MA_RH -99 .0 - MISS_RH

#9 :SW short wave radiation 11 - BITS_SW 0.0 - MIN_SW

1500 . 0 - MA_SW -99.0 - MISS_SW #10 : LW long wave radiation 10 - BITS_LW 0.0 - MIN_LW

750.0 - MA_LW -99.0 - MISS_LW

#11 :RN precipitation 7 - BITS_RN 0.0 - MIN_RN

127 . 0 - MA_RN -99.0 - MISS_RN

#12 : BV battery voltage 8 - BITS_BV

29

-20.0 - MIN_BV

15 . 0 - MA_BV -99.0 - MISS_BV o . 1 - SCALE_BV

#13 : TN tension 8 - BITS_TN -20.0 - MIN_TN

12750 .0 - MA_TN -99.0 - MISS_TN 50 .0 - SCALE_TN

-) NOTE: the cycle repeats, identical values

#14 : 02 day of year 09 - BITS_OA 1.0 - MIN_OA

365 . 0 - MA_OA -99.0 #15 :H2, hour of 05 0.0 23.0 -99.0

- MISS_OA day - BITS_HR - MIN_HR - MAX_HR - MISS_HR

#16 : B2 barometric pressure 11 - BITS_BP 900.0 - MIN_BP

1100.0 - MA_BP -99.0 - MISS_BP

#17 : A2 air temperature 12 - BITS_AT -5.0 - MIN_AT

35.0 - MA_AT -99.0 - MISS_AT 0.01 - SCALE_AT 500.0 - BIAS_AT

#18 : W2 sea temperature 12 - BITS_WT -2.0 - MIN_WT

38.0 - MA_WT 30

-99.0 - MISS_WT 0.01 - SCALE_WT 200.0 - BIAS_WT

#19 : U2 Wind U 10 - BITS_WU -51.1 - MIN_WU

51.1 - MA_WU -99.0 - MISS_WU 0.1 - SCALE_WU 511.0 - BIAS_WU

#20 : V2 Wind V 10 - BITS_WV -51.1 - MIN_WV

51.1 - MA_WV -99.0 - MISS_WV 0.1 - SCALE_WV 511.0 - BIAS_WV #21 :R2 relative humidity 7 - BITS_RH 0.0 - MIN_RH

100 .0 - MA_RH -99.0 - MISS_RH

#22 : S2 short wave radiation 11 - BITS_SW 0.0 - MIN_SW

1500.0 - MA_SW -99.0 - MISS_SW #23 :L2 long wave radiation 10 - BITS_LW 0.0 - MIN_LW 750 . 0 - MAX_LW

-99.0 - MISS_LW

#24 :P2 precipitation 7 - BITS_RN

o . 0 - MIN_RN 127 . 0 - MA_RN -99.0 - MISS_RN 31

#25 :C2 battery voltage 8 - BITS_BV -20.0 - MIN_BV 15 . 0 - MAX_BV -99.0 - MISS_BV o . 1 - SCALE_BV

#26 : T2 tension 8 - BITS_TN -20.0 - MIN_TN

12750.0 - MA_TN -99.0 - MISS_TN

50 . 0 - SCALE_TN #27 : CS checksum 16 - BITS_CHECKSUM

-) 1* must be 1st non standard constant *1 30 - LST _BYT

-) 1* must be 2nd constant O-bin 1-asc *1 1 - ASCII

32

Appendix IV. Engineering PTT Processing

Appendix IV.l. Shell Script dotens.sh # ! /bin/ sh # process tension, and battery voltage for arabian sea # the engineering ptt is # 22527.

# Data characters are

# AA BB CC DO EE FF GG HH # where:

# BB = battery voltage

# CC = tension # # # # # # # #

Tension: T = (CCd/256) * 5.0 * 2067.9 - 423.0

where: AAd is the decimal equivalent of AA hex. Battery voltage: BV = (dBB/256) * 17.1

# sample input Argos records: # 01356 22527 3 32 H 1 1994-06-01 10:45:2441.533 289.356 0.0 401649554

# 1994-06-01 10 :49 ~10 4 E3 C6 18 99 # 00 00 00 FF # 01356 22527 5 32 0 2 1994-06-01 11: 09: 54 41.528 289.356 0.0 401649554

# 1994-06-01 11: 06: 08 2 E3 C6 18 99 # 00 00 00 FF

# 1994-06-01 11: 15: 33 3 E3 C5 18 99 # 00 00 00 FF #

# output file tens. asc: # Doy, Yy, Mo,Da,Hr,Mn, Sc, Tens, Dumy, Batt Volt # 155.959625, 1994, 6, 4, 23, 1, 52, 425.162109, 000, 13.158984

33

-

# to remove data from the database , edit file tens. raw, which is # appended by this script

# if an arguent is used, it is the number of the file to process # if called with no arguents, process most recent file if ( $# -eq 1 J

then

lastf=$l elif ( -f Igdata/argos/argos.dat.l J

then

else

fi

. lastf= r I gdatal argosl scripts/findlast . sh r r argos. dat . *' , r

lastf=l

if ( -f Ipuli/data/arab/argos/tens.raw J

then sIt

touch Ipulil datal arabI argo

ens . raw

fi # extract tens data from the Argos file and append

# to the raw tens file

tr ':\_J J J( Igdata/argos/argos.dat.$lastf I awk -f \

Ipulil datal arabI argos/tens . awk)) Ipulil datal arabI argos/tens . raw

raw I \ Ipuli/data/arab/argos/conv) Ipuli/data/arab/argos/tens. asc

sort +0 -n -u ( Ipuli/data/arab/argos/tens .

chod 777 Ipulil datal arabI argos/tens . raw chod 777 Ipulil datal arabI argos/tens . asc

34

Appendix IV.2. Awk Script tens.awk BEGIN -(star=O)-

$2 - 1225271 -(star=1)-

$1 - 113561 -( if ($2 ! - 1225271) -(star = 0)-)$2 ! - 1225271 -( if (star) -( if (NF == 11) -(

year = $1;

month = $2; day = $3; hour = $4;

minute = $5; second = $6; jhour = hour/24 + minute/24/60 + second/24/60/60; doy = day; if (month == 1)

-(doy = day)if (month == 2)

-(doy = 31 + day )if (month == 3)

-(doy = 59 + day )if (month == 4)

-(doy = 90 + day )if (month == 5)

-(doy = 120 + day )if (month == 6)

-(doy = 151 + day )if (month == 7)

-(doy = 181 + day )if (month == 8)

-(doy = 212 + day )if (moIith == 9)

-(doy = 243 + day )if (month == 10)

-(doy = 273 + day )if (month == 11)

35

idoy' = 304 + day lif (month == 12)

idoy = 334 + day ldoy = doy + jhour¡ printf (lI1.f 1.d 1.d 1.d 1.d 1.d 1.d 1.s 1.s y's\nll,

doy, $1,$2,$3, $4,$5, $6, $9 ,$10 ,$11) ll)-

36

Appendix IV.3. Program Conv.c This program is used by the shell script dotens.sh to decode the AS.CII hexadecimal vaues in the tensiometer PTT record.

#include (stdio .h) #include (string.h)

main 0 -(

int ii, inb,outb, stat; int yy ,mo ,da,hr ,mn, sc, tn, tt, bat;

float BV, T ,doy;

while(1) -(

stat=scan ( l11.f 1.d 1.d 1.d 1.d 1.d 1.d 1.% 1.% 1.%11,

tdoy ,tyy ,imo ,tda,thr ,lm,tsc,tbat ,&tn,ttt) ;

if(stat == EOF) e%i t (0) ;

T = (tn/256.) * 5.0 * 2067.9 - 423.0; if (T ( 0.5) T = 0;

BV = (bat/256.) * 17. 1 printf ( "1.f, 1.d, 1.d, 1.d, . 1.d, 1.d, 1.d, 1.f, 1.d, 1.f\n II , doy ,yy ,mo ,da,hr ,mn, sc, T, tt ,BV) ; ì

ì

37

Appendix V. Position Processing Scripts

Appendix V.l. doposit.sh #! Ibin/sh

# # process Argos position data for Arabian Sea experiment

# 94/03/02 N. Galbraith # usage:

# doposit. sh (with no arguents) # processes most recent file in Igdata/argos/argos.dat.n

# doposi t . sh nn # processes file Igdata/argos/argos.dat.nn

# argos. dat : # 01356 06856 33 32 D 1 1994-05-20 12: 06: 37 \

# 41.535 289.353 0.002 401650137 cd Ipulil datal arabI argos/posi t

# find the input file. If not specified on command line,

# process the newest argos .dat.n file if ( $# -eq 1 J

then

lastf=$1 elif ( -f Igdata/argos/argos. dat.1 J

then

lastf=' Igdata/argos/scripts/findlast ' 'argos.dat'"

else

fi

lastf=1

# extract position info from Argos file tr ':\-' , , ( Igdata/argos/argos.dat.$lastf 1\ awk 'NF ) 13 -(print $Oì' I awk -f posit.awk ) jun.dat

if ( ! -f pripos.arch.asc J

38

then touch pri pos . arch. asc

fi

np='awk '$1 == 6856' jun.dat Iwc -1' if ( $np -ge 1 J

then echo processing primar position reporter awk ' $1 == 6856 t print $2, $3, $4, $5, $6, $7, $8, $9, $10 J' \

jun.dat )) pripos.arch.asc cat pripos.arch.asc I sort -n +6 -u ) arab1.pos

fi np='awk '$1 == 6859' jun.dat Iwc -1' if ( $np -ge 1 J

then echo processing spare position reporter awk '$1 == 6859 t print $2, $3, $4, $5, $6, $7, $8, $9, $10 J' \ jun.dat )) secpos.arch.asc cat secpos . arch. asc I sort -n +6 -u ) arab2. pos

fi

39

"

Appendix V.2. posit.awk

i year = $7; if (y~ar ) 1900) iyear = year-1900 ì

month = $8; day = $9; hour = $10;

minute = $11; · second = $12 j

jhour = hour/24 + minute/24/60 + second/24/60/60 j

doy = day j if if if if if if if if

(month (month (month (month (month (month (month (month

== == == == == == == ==

2) 3) 4) 5) 6) 7) 8) 9)

idoy idoy idoy idoy idoy idoy idoy idoy

= = = = = = = =

31 + day ì 59 + day ì 90 + day ì 120 + day ì 151 + day ì 181 + day ì 212 + day ì 243 + day ì

if (month == 10) idoy = 273 + day ì if (month == 11) idoy = 304 + day ì if (month == 12) idoy = 334 + day ì

doy = doy + jhour; long = $14 j if (long ) 180)

ilong = $14 - 360 ì

printf ("1.d 1.2d 1.2d 1.2d 1.2d 1.2d 1.2d 1.7. 3f 1.8. 3f 1.8. 3f\n II , $2, year ,month, day, hour ,minute, second, doy ,$13, long) ìiì

40

Appendix Vi. Data Distribution Scripts Appendix VI.1. Ftp Shell Script # ! Ibinl sh # sends 4 files to anonymous ftp site # note: names and addresses have been changed for publication # ftp -n -i 128.128.99.99 (( EOF user anonymous my.ame~myhost .myorganization.mydomain

cd incomingl globec. burin

ascii put Ipulil datal globecl argos/vawr0707 . asc vawr0707. asc put Ipuli/data/globec/argos/vawr0380 .asc vawr0380. asc put Ipuli/data/globec/argos/imet1.asc imet1. asc put Ipuli/data/globec/argos/imet2. asc imet2. asc

bye EOF

41

VI.2. Mail Shell Script

#! /bin/sh # # # # # # #

usage domail.sh xx where xx is 4-dgit VAWR number

941114 nrg - for Arabian Sea! input: file vawrxx. asc output: file nxx. asc

cd /puli/data/arab/argos # write the header to output file echo " WHO! Arabian Sea Met Data - Robert A. Weller" ) n$1. asc

echo" day-time wspd wdir sr rh bp

sst at lr "\

)) n$1. asc

# write the last 100 points to the output file tail -100 vawr$1. asc I tr ',' , , I awk -f x. awk )) n$1. asc

# send the file somewhere here. Use rcp or mail mail -s "WHO! Arabian Sea Met Data" userUlcomp1.navy .mil ( n$1. asc

Appendix VI.3. x.awk This one-line script extracts data varables of interest to be transmitted to

remote sites.

-( printf ("1.10. 6f 1.5. 2f 1.7. 2f Y.4d Y.4.1f 1.6. 1f 1.5. 2f 1.5. 2f 1.5. 1f\n" ,

$1,$4,$5,$6,$7,$8,$9,$10,$14)1

42

Appendix VII. Plotting Scripts and Sample Plots

Appendix VII.I. Shell Script dopl.sh Shell script dopl.sh plots VA WR and mooring information.

#! /bin/sh # 940930 N. Galbraith # plot Argos data for arabian sea deployment 1

# VAWR science variables # VAWR engineering t other engineering variables

# position, using posit/positl.m # # set up to ru pplus

LD_LIBRAY_PATH=/usr/openwin/lib # environment export LD_LIBRAY_PATH cd /puli/data/arab/argos

# date limits

ed= f date "+Y.j II f

sd= f expr $ed - 3 f # housekeeping

if ( -f ppl.metaOOl J

then

fi

rm ppl. meta*

# do it # plot the science and engineering variables for primar VAWR /usr/local/bin/pplus argoss .ppc $sd $ed vawr0721. asc /usr/local/bin/pplus argose.ppc $sd $ed vawr0721.asc

chod 666 ppl.metaOOl chod 666 ppl.meta002 # plot the positions with Matlab script positl.m

# which creates plot file pposi t . ps

43

cd Ipuli/data/arab/argos/posit lusr/local/bin/matlab (positl.m

chod 666 pposit .ps # send the plotfiles to the printer cd Ipulil datal arabI argos

lusr/local/bin/m2ps -R ppl.metaOOl Ipr if ( -f ppl.meta002 J

then

fi

lusr/local/bin/m2ps -R ppl.meta002 I Ipr

cd Ipuli/data/arab/argos/posit

Ipr pposi t . ps

M

VI1.2. Pplus Plotting Scripts VII.2.i. Plot Scientific Variables: argoss.ppc

c pplus plotting script argoss.ppc

c c usage:

c pplus argos. ppc styrday enyrday file c note plot type hard wired to ° for file output

pltype,O axset, 0,1,1, °

rotate on window on

multplt 1,8

5.75

0.7,0.7,0.7,0.7,0.7,0.7,0.7,0.7 1.5

0.2,0.2,0.2,0.2,0.2,0.2,0.2,1.5 line 1" ° c set up the year day for the xaxis

xaxis 'pl', 'p2', .25 axlabp 0,-1

yaxis,-10,10,5, format free vars 1, 1 ,2

skp,2, 'p3'

rd

ylab east plot, yaxis, -10,10,5 format free

45

~

vars 1, 1 , , 2

skp, 2 , 'p3'

rd ylab north

- plot,

yaxis, 10,40,10 format free

.

vars 1, 1 , , , , , , , , 2

skp,2, 'p3'

rd ylab wt

plot, yaxis, 10 ,40,10

format free

vars 1, 1 , , , , , , , , ,2 skp , 2, 'p3'

rd

ylab at plot, yaxis, -50,1200,200

yfor (i4) format free

vars 1, 1 , , , , , 2

skp,2, 'p3'

rd ylab sw

plot, yaxis , 0 , 600,200

yfor (i3) format free

vars 1, 1 , , , , , , , , , , , , , 2 skp,2, Jp3J

rd 46

,

ylab lv plot, yaxis, 1000,1040,10,

yfor (i4) format free

vars 1, 1 , , , , , , , 2

skp , 2, 'p3'

rd

.

ylab , bp

plot, axlabp -1,-1 yaxis,O, 100 ,20

yfor (i3) format free

vars 1, 1 , , , , , , 2

skp,2, 'p3'

rd ylab , rh

plot, Arabian Sea Argos 'p3'

47

1o.ok

VII.2.2. Scientific Varables Plot .

~ 4~1~ ~ ~

1 _ 0.0 -

-~ - I

. 10.0 T

=t 10.0 t

o c 0.0 _ -10.0 30.0 ~

.~

~ 28.0

~ 26.0 . 24.0

30'0~ ~ 28.0

o 26.0 .

24.0 i 1 200 ~ ~ 800 UJ 400

o

~ 500J 300 ~

-

~

~

.ß 1 020

~

~

~

Î

o

o

r:

1040 ~

-'

1-

1000 -

I

~ 1~~ i.

i- 60 . 40

20.00

~ ~~. - .

~I ~-

20.50

I

I

21.50

21.00

22.00

22.50

Arabian Sea Argos vawr0721.asc 48

~ 23.00

VII.2.3. Plot Engineering Varables: argose.ppc c plot VAWR Argos engineering data for Arabian Sea

c usage: pplus argos. ppc styrday enyrday file pltype,O axset,O, 1, 1,0 multplt 1,7

5.75

0.7,0.7,0.7,0.7,0.7,0.7,0.7 1.5

0.2,0.2,0.2,0.2,0.2,0.2,1.5 line 1,,0

xaxis 'p1', 'p2', .25 window on

axlabp, 0,-1

yaxis, 0,10,1 format free

vars 1, 1 , , ,2

skp,2, 'p3'

rd ylab, spd

plot, yaxis,O ,360 ,90 vars 1, 1 , , , , 2 skp , 2 , , p3'

rd ylab , dir

plot, yaxis, -200 ,400,100

vars 1, 1 , , , , , , , , , , 2

skp,2, 'p3'

rd ylab , tpile 49

plot, yaxis ,275,340,5 vars 1, 1 , , , , , , , , , , , 2 skp,2, Jp3J

rd ylab , body

.

plot, yaxis, 275,340,5 vars 1, 1 , , , , , , , , , , , , 2 skp , 2 ,J p3 J

rd ylab , dome

plot, yaxis, vars 1, 1 , , , , , , , 2

skp,2, tens. asc rd ylab , Tens

plot, axlabp -1,-1

yaxis, vars 1, 1 , , , , , , , , ,2

skp,2, tens. asc rd ylab, Voltage plot, Arabian Sea Argos J p3 J

50

VII.

2.4. Engineering Varables Plot

20.0i:

~ ~~~ ~~I-: ~ 3~itl

"Ocna. 1 0.0

~

~ 18:: 1 I ~- I ~.- ~~ I .1-

~400.t~. §20~:~~~ ~ ~

I I

j ~¡~: I

i ~¡~: I

~ I

20.50

~

Nw

~I

r--i

I

I

I

I

I

21.00

21.50

22.00

22.50

2.3.00

Arabian Sea ARGOS vawr0721.asc 51

VII.3. Matlab Position Plotting Argos position values are plotted using Matlab noninteractively with script posit1.m. VII.3.1 Matlab Script

1. plot a position-only Argos file 1. 941006 n.galbraith - for Arabian Sea load arab1. pos -ascii

plot(arab1(: ,9) ,arab1(: ,8)) hold on

1. get label position minx = min(arab1(: ,9)); miny = min(arab1(: ,8)); max = max(arab1(: ,9)); maxy = max(arab1(: ,8));

axis ((minx-. 05 ,max+. 05 ,miny-. 05 ,max+. 05)) 1. get and anotate end date (xi,yi) =size(arab1); txt = sprintf ( , from: 1.7. 3f to 1.7. 3f' , arab

1 (1,7) , arab

1 (xi, 7) ) ;

text (minx, miny, txt); text (minx, miny-. 025, , star indicates last position received'); plot

(arab

1

(xi,9) ,arab1(xi,8), '*');

1. plot the watch circle and the anchor position

ay = 15.5; ax = 61.5; plot

(ax,ay, 'x')

rady = 1. 75 / 60; 1. 1.75 nm 1. 60 nm = 1degree radx = 1.75 / (cos(ay) * 60); xcirc = zeros

(360) ;

(360) ; ycirc = zeros

for ii=1: 360

xcirc(ii)=radx*(cos(ii) )+ax; ycirc(ii)

=rady*

(sin(ii) )+ay;

end

plot (xcirc, ycirc, , . ') title( 'ARBIAN SEA I Buoy Position');

print pposi t . ps

52

VII.3.1 Position Plot

ARABIAN SEA I Buoy Positions

15.56

15.54

15.52

15.5

15.48

15.46

from: 1.087 to 90.075

star indicates last position received

15.44

61.4 61.42 61.44 61.46 61.48 61.5 61.52 61.54 61.56 61.58

53

Acknowledgements The author wishes to thank members of the Upper Ocean Processes Group for discussions and feedback during the development of the software.

Discussions with N. Brink and A. Plueddemann during the preparation of this document are gratefully acknowledged.

54

DOCUMENT LIBRARY Distribution Listfor Technical Report Exchange- May /995

University of California, San Diego SIO Library 0175C 9500 Gilman Drive La Jolla, CA 92093-0175 Hancock Library of Biology & Oceanography

Alan Hancock Laboratory University of Southern Caliornia University Park

Los Angeles, CA 90089-0371 Gifts & Exchanges Library Bedford Institute of Oceanography P.O. Box 1006 Dartmouth, NS, B2Y 4A2, CANADA

Working Collection Texas A&M University Dept. of Oceanography College Station, TX 77843 Fisheries-Oceanography Library 151 Oceanography Teaching Bldg.

University of Washington

Seatte, WA 98195 Library R.S.M.A.S.

University of Miami 4600 Rickenbacker Causeway Miami, FL 33149

Commander

Maury Oceanographic Library Naval Oceanographic Office

International Ice Patrol

Building 1003 South

1082 Shennecossett Road

Groton, CT 06340-6095

1002 Balch Blvd. Stennis Space Center, MS, 39522-5001

NOAA/EDIS Miami Library Center

Library

4301 Rickenbacker Causeway Miami, FL 33149

Institute of Ocean Sciences P.O. Box 6000

Research Library U.S. Army Corps of Engineers Waterways Experiment Station 3909 Halls Ferry Road Vicksburg, MS 39180-6199

Sidney, B.c. V8L 4B2 CANADA

Institute of Geophysics

Wormley, Godalming

University of Hawaii Library Room 252 2525 Correa Road

Honolulu, HI 96822 Marine Resources Information Center

Building E38-320

Library

Institute of Oceanographic Sciences Deacon Laboratory Surrey GU8 5UB UNITED KINGDOM

The Librarian CSIRO Marine Laboratories G.P.O. Box 1538

Hobart, Tasmania

MIT

AUSTRALIA 7001

Cambridge, MA 02139

Library Proudman Oceanographic Laboratory

Library Lamont-Doherty Geological 0l?servatory Columbia University Palisades, NY z10964 Library Serials Department Oregon State University

Corvalls, OR 97331 Pell Marine Science Library University of Rhode Island Narragansett Bay Campus

Narragansett, RI 02882

Bidston Observatory Birkenhead Merseyside L43 7 RA

UNITED KINGDOM IFREMER Centre de Brest

Service Documentation - Publications BP 70 29280 PLOUZANE FRANCE

50272-101

PAGE WHOI-95-06

REPORT DOCUMENTATION 11. REPORT NO.

3. Recipient's Accession No.

2.

UOP-95-03

4. Title and Subtitle

5. Repor Date March 1995

A Processing System for Argos Meteorological Data

6.

7. Author(s) Nancy R. Galbraith

8. Performing Organization Rept No.

9. Performing Organization Name and Address

10. Projectfask/ork Unit No.

WHOI-95-06

Woods Hole Oceanographic Institution

11. Contract(C) or Grant(G) No.

Woods Hole, Massachusetts 02543

(C) NOO i 4-94-1-01 61 (G)

12. Sponsoring Organization Name and Address

13. Type of Report & Period Covere

Technical Report

Office of Naval Research 14.

15. Supplementary Notes

This report should be cited as: Woods Hole Oceanog. Inst. Tech. Rept., WHOI-95-06.

16. Abstrat (Umit: 200 words)

Upper Ocean Processes Group meteorological data is transmitted from surface buoys via Argos satellite and processed in an automatic mode on a UNiX workstation. Data is extracted from input files based on instrument type and experiment, processed as appropriate, and plotted, without user intervention. While the processing system normally runs automatically, it is designed so that modules can also be run directly from a terminal when necessary. The Argos processing system allows us to monitor the meteorological data being collected in the field, and provides early information about problems with

sensors, instruments, or buoys, when they occur. The automatic process allows more information to be viewed with less effort, and increases the usefulness of the Argos data.

17. Doument Analysis a. Descriptors automatic processing

time-series data UNX software b. IdentifierOpen-Ended Terms

c. COSATI Field/Group

18. Availabilty Statement

19. Seurity Clas (This Report)

Approved for public release; distribution unlimited. :Se ANSI-Z39.18)

UNCLASSIFIED 20. Seurity Class (Tis Page)

Se Instrctions on Revers

21. No. of Pages

60 22. Price

OPTIONAL FORM 272 (4-77 (Formerly NTIS-35) Department of Commerce