HyperNews for Harvest Modeling Project
Proposed Data Communication Standard
-
Forum:
Discussion of Harvest Modeling Project
Date: Thu, 03 Dec 1998 00:43:26 GMT
From: Jim Norris
GPGLL,4806.78,N,12245.34,W
Data sentences are streamed from one device to another at periodic intervals. Each device can stream different sentences at different intervals. Receiving devices read each sentence, look at the ID, and then either discard or use the sentence.
Proposed Salmon Model Data Standard.
The basic idea is to stream standardized data sentences from a model to a text file. Then anyone can write a program using any type of software and hardware to read the data stream, extract the data of interest, and use that data as desired (e.g., further analysis or formatted report). The advantage of using standardized data sentences is that users can export any data in any order and at any interval. The disadvantage of this system is that there may be considerable duplication of information in each sentence, thus making for a large output file.
Sample Sentences.
The following sample sentences save data at the lowest possible level.
----- CABN sentence for cohort abundance -----
Field Data Sample
1 Sentence ID CABN
2 Year 1985
3 TimeStep 3 (or TimeStep abbreviation)
4 Region 4 (or region abbreviation)
5 CohortID URB1986WIUUU
6 StartAbn 378947.1438 (a double)
[Note: Each cohort will have a unique identifier code composed of the parent stock abbreviation, the brood year (using all four characters), and a string of single character codes representing each remaining cohort property in a fixed order (e.g., W = wild, I = immature, U = unmarked, U = untagged, etc.)]
----- NMRT sentence for natural mortality -----
Field Data Sample
1 Sentence ID NMRT
2 Year 1985
3 TimeStep 3 (or TimeStep abbreviation)
4 Region 4 (or region abbreviation)
5 CohortID URB1986WIUUU
6 Mortality 25.283949 (a double)
----- FMRT sentence for fishing mortality -----
Field Data Sample
1 Sentence ID FMRT
2 Year 1985
3 TimeStep 3 (or TimeStep abbreviation)
4 Region 4 (or region abbreviation)
5 Fishery 2 (or fishery abbreviation)
6 CohortID URB1986WIUUU
7 LegalCat 345.192837 (a double)
8 ShakerMort 43.1288393 (a double)
9 CNRMort 21.1093994 (a double)
----- CMIG sentence for cohort migration -----
Field Data Sample
1 Sentence ID CMIG
2 Year 1985
3 TimeStep 3 (or TimeStep abbreviation)
4 FromRegion 4 (or region abbreviation)
5 ToRegion 6 (or region abbreviation)
6 NumMigrants 25.49304958 (a double)
If space is a problem in the output file, we could create other sentences that aggregate data. For example:
----- SABN sentence for stock abundance in a region -----
Field Data Sample
1 Sentence ID SABN
2 Year 1985
3 TimeStep 3 (or TimeStep abbreviation)
4 Region 4 (or region abbreviation)
5 StockID URB
6 StartAbn 378947.1438 (a double)
------ CLHD sentence for cohort life history data -----
Field Data Sample
1 Sentence ID CLHD
2 Year 1985
3 TimeStep 3 (or TimeStep abbreviation)
4 Region 4 (or region abbreviation)
5 CohortID URB1986WIUUU
6 StartAbn 28394.1928 (a double)
7 NatMort 28.3941928 (a double)
8 TotCat 3564.19283 (a double)
9 TotShakers 32.9238287 (a double)
10 TotCNR 27.3984749 (a double)
11 TotOutMig 283.193993 (a double)
12 TotInMig 11.9384773 (a double)
13 EndAbn ????.????? (a double)
[Note: We could put all data (i.e., morts for each fishery) in a single record if we included a field for the number of fisheries harvesting the cohort in the given TS and Region. That would allow this type of sentence to have a variable number of data fields.]
Generating The Data File.
At the end of each process (e.g., MortalityPorcess, MigrationProcess) during a timestep an OutputGenerator object will have the opportunity to stream data to a data file. The type and frequency of data streaming to the data file is configed by the user at startup. To save space in the data file, null data (e.g., zero catches, zero natural morts, zero migrations) will not be streamed.
Using The Data File.
The data reading program will store data in tables, matrices, or some other structures. These structures will be created on startup, and all entries will be set to zero. Since only non-zero data are streamed to the data file, the reading program will just fill in the non-zero entries.
The advantage of using standardized data sentences is that users of the data file need only know the sentence formats in order to use the data. Any type of computer and language can be used to create a program to read each sentence and then determine what to do with it.
Home | Columbia R. DART | Status & Trends | Inseason Forecasts | Tools & Models | Research & Publications | Library | Site Map | Search
Please direct questions or comments to:
web@cbr.washington.edu
Columbia Basin Research,
School of Aquatic & Fishery Sciences,
University of Washington