NCEPLIBS-w3emc 2.12.0
Loading...
Searching...
No Matches
w3fi65.f File Reference

NMC office note 29 report packer. More...

Go to the source code of this file.

Functions/Subroutines

subroutine w3fi65 (locrpt, cocbuf)
 Packs an array of upper-air reports into the format described by NMC office note 29, or packs an array of surface reports into the format described by NMC office note 124.
 

Detailed Description

NMC office note 29 report packer.

Author
L. Marx
Date
1990-01

Definition in file w3fi65.f.

Function/Subroutine Documentation

◆ w3fi65()

subroutine w3fi65 ( integer, dimension(*)  locrpt,
character*10, dimension(*)  cocbuf 
)

Packs an array of upper-air reports into the format described by NMC office note 29, or packs an array of surface reports into the format described by NMC office note 124.

Input integer, real or character type as specified in the category tables in the write-up for w3fi64() (the office note 29 report packer) are converted to character data. Missing character data are specified as strings of 9's except for that converted from input character type which are generally specified as blanks. This library is similar to w3ai03() except w3ai03() was written in assembler.

Program history log:

  • L. Marx 1990-01 Converted code from assembler to vs fortran.
  • Dennis Keyser 1991-08-23 Use same arguments as w3ai03() ; Streamlined code; Docblocked and commented.
  • Dennis Keyser 1992-06-29 Convert to cray cft77 fortran.
  • Dennis Keyser 1992-07-09 Checks the number of characters used by each variable prior to conversion from integer to character format; If this number is greater than the number of characters allocated for the variable the variable is packed as "missing" (i.e., stores as all 9's).
  • Dennis Keyser 1993-06-28 Initializes number of words in report to 42 in case "strange" report with no data in any category encountered (used to be zero, but such "strange" reports caused code to fail).
  • Dennis Keyser 1993-12-22 Corrected error which resulted in storage of 0's in place of actual data in a category when that category was the only one with data.
  • Dennis Keyser 1998-08-07 Fortran 90-compliant - split an if statement into 2-parts to prevent f90 floating point exception error that can now occur in some cases (did not occur in f77).
Parameters
[in]LOCRPTInteger array containing one unpacked report. LOCRPT must begin on a fullword boundary. Format is mixed, user must equivalence real and character arrays to this array (see w3fi64 write-up for content).
[out]COCBUFCHARACTER*10 Array containing a packed report in NMC office note 29/124 format.
Note
After first creating and writing out the office note 85 (first) date record, the user's fortran program begins a packing loop as follows.. Each iteration of the packing loop consists of a call first to w3fi65() to pack the report into COCBUF, then a call to w3fi66() with the current value of 'NFLAG' (set to zero for first call) to block the packed report into a record (see w3fi66() write- up). if 'NFLAG' is -1 upon returning from w3fi66(), the remaining portion of the record is not large enough to hold the current packed report. The user should write out the record, set 'NFLAG' to zero, call w3fi66() to write the packed report to the beginning of the next record, and repeat the packing loop. If 'NFLAG' is positive, a packed report has been blocked into the record and the user should continue the packing loop. When all reports have been packed and blocked, the user should write out this last record (which is not full but contains fill information supplied by w3fi66()). One final record containing the string 'endof file' (sic) followed by blank fill must be written out to signal the end of the data set.
1: The packed report will have the categories ordered as follows: 1, 2, 3, 4, 5, 6, 7, 51, 52, 8, 9.
2: The input unpacked report must be in the format spec- ified in the w3fi64() office note 29 report unpacker write-up.
3: The unused porion of cocbuf is not cleared.
Entry w3ai03() duplicates processing in w3fi65() since no assembly language code in cray w3lib.
Author
L. Marx
Date
1990-01

Definition at line 78 of file w3fi65.f.