Langley DAAC Version Number: LD_008_004_005_00_00_0_19990526 ERBE S-4 Readme The reads4.f program allows the user to read the data from Earth Radiation Budget Experiment S-4 data product files to an ASCII file for a given data month, year, and satellite coverage. Further information on the S-4 product can be found in : ERBE S-4 User's Guide, Regional, Zonal, and Global Gridded Averages, June 1985. NOTE: This document provides information for both the ERBE S-4 and S-4N products. If users have questions while using the ERBE S-4/S-4N sample read software, please contact the Langley DAAC Science, Users and Data Services office at: EOSDIS Langley DAAC Science, Users and Data Services Office NASA Langley Research Center Mail Code 157D 2 South Wright Street Hampton, Virginia 23681-2199 U.S.A. E-mail: support-asdc@earthdata.nasa.gov Phone: (757) 864-8656 FAX: (757) 864-8807 All files are in the Native / Binary format. Please note that all files are "zipped" and will expand to approximately 3 times their original size when "unzipped." Once the files are "unzipped," the user will notice in the current working area that a directory has been created. The directory will appear in the format of s4_yymm_s where yy represents the year, mm represents the month, and s represents the satellite code number. In this directory, 26 files will be listed. The instructions that follow will explain the file structure. By modifying the namelist, the user can select the type of instrument (scanner or nonscanner), the resolution (2.5, 5.0, or 10.0 degrees), the field of view (medium or wide), and the type of radiant flux values or statistics he wishes to read. ****************************************************************************** Namelist Values An explanation of the values in the namelist follows: Variable/definition Allowed Definition ------------------- values of values -------- ---------- inst (type instrument) 1,2 1=scanner 2=nonscanner ires (resolution) 1,2,3 1=2.5 2=5.0 3=10.0 imf (field-of-view) 1,2 1=medium 2=wide icovrg(type of average) 1,2,3 1=regional 2=zonal 3=global irecf (first region to read) 1-10368 irecl (last region to read) 1-10368 iray(1) (read dgma data values) 0,1 0=no, 1=yes iray(2) (read hgma data values) 0,1 0=no, 1=yes iray(3) (read daily data values) 0,1 0=no, 1=yes iray(4) (read hourly data values) 0,1 0=no, 1=yes idata(1) (read longwave(lw)values) 0,1 0=no, 1=yes idata(2) (read shortwave(sw)values) 0,1 0=no, 1=yes idata(3) (read net values) 0,1 0=no, 1=yes idata(4) (read solar incidence) 0,1 0=no, 1=yes idata(5) (read albedo values) 0,1 0=no, 1=yes idata(6) (read no. days of sw) 0,1 0=no, 1=yes idata(7) (read no. days of lw) 0,1 0=no, 1=yes idata(8) (read no. of hrs. of sw) 0,1 0=no, 1=yes idata(9) (read no. of hrs. of lw) 0,1 0=no, 1=yes This namelist is read from file s4namls; a sample of that file accompanies this program. ***************************************************************** S-4 File Information The S-4 contains 26 separate files. This program is designed to read the ERBE header, the scale factors, and one of the data files per run. Before using this program, the S-4 product is separated into 26 files with these names: File Name Data on file --------- ------------- file1 HEADER file2 SCANNER SCALE FACTORS file3 NONSCANNER SCALE FACTORS file4 NFOV INPUT DATA file5 NFOV 5.0 DEG. NESTED DATA file6 NFOV 10.0 DEG. NESTED DATA file7 NFOV 2.5 DEG. ZONAL DATA file8 NFOV 5.0 DEG. ZONAL DATA file9 NFOV 10.0 DEG. ZONAL DATA file10 NFOV GLOBAL DATA file11 MFOV-NF INPUT DATA file12 MFOV-NF 10.0 DEG. NESTED DATA file13 MFOV-NF 5.0 DEG. ZONAL DATA file14 MFOV-NF 10.0 DEG. ZONAL DATA file15 MFOV-NF GLOBAL DATA file16 WFOV-NF INPUT DATA file17 WFOV-NF 10.0 DEG. NESTED DATA file18 WFOV-NF 5.0 DEG. ZONAL DATA file19 WFOV-NF 10.0 DEG. ZONAL DATA file20 WFOV-NF GLOBAL DATA file21 MFOV-SF INPUT DATA file22 MFOV-SF 10.0 DEG. ZONAL DATA file23 MFOV-SF GLOBAL DATA file24 WFOV-SF INPUT DATA file25 WFOV-SF 10.0 DEG. ZONAL DATA file26 WFOV-SF GLOBAL DATA Files containing the S-4 data can be made by copying the tape sent by the Langley DAAC to files; if using a UNIX system, use the dd command. To use the dd command, the user must know the byte size of each file; the header record contains 30 bytes, each scanner data file and the scanner scale factor file contain 1290 bytes, and the nonscanner data files and nonscanner scale factor file contain 720 bytes each. ***************************************************************** Use of C Routines In reads4.f, FORTRAN "open" and "read" statements have been replaced with C routines "copen" and "cread" which are in the file io.c. The STUFF subroutine calls some C routines which are in the file gbytes.c. The information for the io.c and gbytes.c codes are included at the bottom of this document following the sample output. ***************************************************************** UNIX Example for Compiling Read Programs and C routines To compile C routines gbytes.c and io.c, use the command cc -c filename.c Example: cc -c gbytes.c Example: cc -c io.c To compile the FORTRAN read program, reads4.f, which calls the C routines, use the command f77 -o executable name sourcefilename.f libraries Example: f77 -o reads4.out reads4.f gbytes.o io.o -ldl ** Please note that the cc and f77 are the SUN C and FORTRAN compilation commands. These may be different on your machine. ***************************************************************** Execution of Read Program To execute the reads4.f program, make sure that the namelist (s4namls), gbytes.o, io.o, and reads4.out are in the same directory, and type reads4.out ***************************************************************** Sample Output ASCII output from this program is written to unit 9 A sample output file of scanner data in included below; namelist information and scale factors are also echoed to this output file. $specs inst= 1, ires= 1, imf= 3, icovrg= 1, irecf= 144, irecl= 145 , iray= 1 1 1 1, idata= 1 1 1 1 1 1 1 1 1 $end SCANNER SCALE FACTORS 1 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 1 1 1 1 1 10 10 1000 10 10 1000 10 10 1000 10 10 1000 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 NONSCANNER SCALE FACTORS 1 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 100 1 1 1 10 10 1000 10 10 1000 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 10 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1000 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 SCANNER FILE 1 RECORD NUMBER 144 FILE ID 1.00000 REGION NUMBER 145.000 SCANNER GEOGRAPHIC SCENE TYPE 3.00000 LW-MONTHLY(DAY) 165.400 SW-MONTHLY(DAY) 0. NET-MONTHLY(DAY) -165.400 TSOLRD-MONTHLY(DAY) 0. ALBEDO-MONTHLY(DAY) 32767.0 LW-MONTHLY(HOUR) 165.400 SW-MONTHLY(HOUR) 0. NET-MONTHLY(HR) -165.400 TSOLRH-MONTHLY(HR) 0. ALBEDO-MONTHLY(HOUR) 32767.0 LW-DAILY 158.100 154.300 150.900 154.400 156.000 157.500 162.500 161.100 166.800 161.500 150.700 176.000 168.800 170.400 167.800 162.300 163.600 173.700 181.300 182.600 182.500 183.400 170.500 164.600 163.900 160.600 162.700 163.000 32767.0 32767.0 32767.0 SW-DAILY 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 32767.0 32767.0 32767.0 SOLARD-DAILY 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. ALBEDO-DAILY 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 NDSW-DAILY 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 32767.0 32767.0 32767.0 NDLW-DAILY 11.0000 8.00000 11.0000 11.0000 8.00000 9.00000 9.00000 9.00000 8.00000 12.0000 6.00000 12.0000 10.00000 8.00000 12.0000 6.00000 10.00000 10.00000 10.00000 10.00000 10.00000 11.0000 10.00000 9.00000 10.00000 10.00000 9.00000 10.00000 32767.0 32767.0 32767.0 LW-MONTHLY HOURLY 167.800 167.800 167.800 167.800 167.700 167.700 167.200 165.900 164.800 164.100 163.700 163.000 161.700 160.700 161.300 162.500 163.300 163.900 164.500 165.800 167.000 167.500 168.200 168.100 SW-MONTHLY HOURLY 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. SOLARH-MONTHLY HOURLY 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. ALBEDO-MONTHLY HOURLY 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 NHSW-MONTHLY HOURLY 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. NHLW-MONTHLY HOURLY 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. LWCS-MONTHLY(DAY) 170.700 SWCS-MONTHLY(DAY) 0. NETCS-MONTHLY(DAY) -170.660 TSOLRDCS-MONTHLY(DAY) 0. ALBEDOCS-MONTHLY(DAY) 32767.0 LWCS-MONTHLY(HOUR) 172.200 SWCS-MONTHLY(HOUR) 0. NETCS-MONTHLY(HR) -172.200 TSOLRHCS-MONTHLY(HR) 0. ALBEDOCS-MONTHLY(HOUR) 32767.0 LWCS-DAILY 167.200 167.200 167.200 167.200 167.200 167.000 165.300 166.800 166.700 170.000 175.200 177.900 168.900 170.400 166.700 166.000 167.700 173.700 181.300 182.600 182.500 183.400 170.700 168.900 169.000 168.100 167.200 166.900 32767.0 32767.0 32767.0 SWCS-DAILY 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 32767.0 32767.0 32767.0 SOLARD-DAILY 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. ALBEDOCS-DAILY 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 NDSWCS-DAILY 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 32767.0 32767.0 32767.0 NDLWCS-DAILY 0. 0. 0. 0. 0. 1.00000 5.00000 0. 6.00000 5.00000 0. 11.0000 10.00000 8.00000 7.00000 0. 5.00000 10.00000 10.00000 10.00000 10.00000 11.0000 9.00000 2.00000 1.00000 0. 1.00000 0. 32767.0 32767.0 32767.0 LWCS-MONTHLY HOURLY 172.400 172.400 172.300 172.300 172.300 172.700 173.000 173.000 172.600 172.500 172.400 172.300 171.600 170.900 171.400 171.700 172.100 172.200 171.900 171.800 172.200 172.400 172.400 172.200 SWCS-MONTHLY HOURLY 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. SOLARHCS-MONTHLY HOURLY 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. ALBEDOCS-MONTHLY HOURLY 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 32767.0 NHSWCS-MONTHLY HOURLY 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. NHLWCS-MONTHLY HOURLY 0. 0. 0. 2.00000 4.00000 5.00000 5.00000 4.00000 5.00000 8.00000 7.00000 8.00000 6.00000 9.00000 7.00000 7.00000 8.00000 5.00000 8.00000 4.00000 8.00000 7.00000 4.00000 1.00000 REGION JUST READ IS PAST DESIRED RANGE OF REGIONS TO DUMP ON SCANNER FILE1 HAVE REACHED EOF ON SCANNER FILE 1 This Section gives a description of the subroutines included in the file called "io.c." **NOTE: The "i" in the first column stands for input which means that the user needs to pass the information into the subroutine. The "o" in the first column stands for output which means the subroutine will return information to the called program. **NOTE: I have also included what "type" is expected for each parameter. ******************************************************************************* * * * COPEN * * * ******************************************************************************* This routine opens the i/o file. call copen(name,length,unit) i name filename (character*#) name must be in single quotes if passing the name i length number of characters in the filename (integer) o unit unit number returned from system routine (integer) ******************************************************************************* * * * CCREAT * * * ******************************************************************************* This routine allows the user to create an output file. call ccreat(name,length,unit) i name filename (character*#) i length number of letters in the filename (integer) o unit unit number returned from system routine (integer) ******************************************************************************* * * * CCLOS * * * ******************************************************************************* This routine closes the i/o file. call cclos(unit,ioerr) i unit unit number used when file was opened (integer) o ioerr zero returned if no problems occurred while trying to close the file (integer) ******************************************************************************* * * * CREWND * * * ******************************************************************************* This routine rewinds the i/o file back to the beginning. call crewnd(unit,ioerr) i unit unit number used when file was opened (integer) o ioerr zero returned if no problems occurred while trying to close the file (integer) ******************************************************************************* * * * CWRIT * * * ******************************************************************************* This routine allows the user to write data in a specific number of bytes to a file. call cwrit(unit,nbuf,buf,ioerr) i unit unit number used when file was opened (integer) i nbuf = number of integers read * size of integer in bytes (8 bits equals 1 byte) (integer) i buf the array that has all of the bytes stored in packed form where 4 bytes equals one word (32 bits) (integer) o ioerr no problems have arisen if ioerr equals nbuf (integer) ******************************************************************************* * * * CREAD * * * ******************************************************************************* This routine allows the user to read a specific number of bytes from a file into a CHARACTER array. call cread(unit,nbuf,buf,ioerr) i unit unit number used when file was opened (integer) i nbuf = number of integers read * size of integer in bytes (8 bits equals 1 byte) (integer) o buf the array that has all of the bytes were stored in packed form where 4 bytes equals one word (32 bits) (character) o ioerr no problems have arisen if ioerr equals nbuf (integer) ******************************************************************************* * * * PCWRIT * * * ******************************************************************************* This routine allows the user to write just portions of the packed array to a file. call pcwrit(unit,nbuf,buf,spos,ioerr) i unit unit number used when file was opened (integer) i nbuf = number of integers read * size of integer in bytes(8 bits equals 1 byte) (integer) i spos allows user to skip a number of bytes and continue to write bytes to a file (integer) o ioerr no problems have arisen if ioerr equals nbuf (integer) ******************************************************************************* * * * CREADI * * * ******************************************************************************* This routine allows the user to read a specific number of bytes from a file into an INTEGER array. call creadi(unit,nbuf,buf,ioerr) i unit unit number used when file was opened (integer) i nbuf = number of integers read * size of integer in bytes (8 bits equals 1 byte) (integer) o buf the array that has all of the bytes were stored in packed form where 4 bytes equals one word (32 bits) (character) o ioerr no problems have arisen if ioerr equals nbuf (integer) ******************************************************************************* ******************************************************************************* ******************************************************************************* ******************************************************************************* This Section gives a description of the subroutines included in the file called "gbytes.c." ******************************************************************************* * * * GBYTES * * * ******************************************************************************* This routine allows the user to unpack any amount of bits and perform this operation a number of times. call gbytes (packed,unpacked,noff,nbits,nskip,iter) i packed array which contains the packed binary read. (integer) o unpacked array which contains the unpacked data in byte form. (integer) i noff The initial number of bits to skip, left to right, in packed order to locate the first byte to unpack. (integer) i nbits The number of bits in each byte to be unpacked. Maximum is machine word size. (integer) i nskip The number of bits to skip between each byte in packed in order to locate the next byte to be unpacked. (integer) i iter The number of bytes to be unpacked. ******************************************************************************* * * * SBYTES * * * ******************************************************************************* This routine allows the user to pack any amount of bits and perform this operation a number of times. call sbytes (packed,unpacked,noff,nbits,nskip,iter) o packed array which contains the packed binary read. (integer) i unpacked array which contains the unpacked data in byte form. (integer) i noff The initial number of bits to skip, left to right, in unpacked order to locate the first byte to pack. (integer) i nbits The number of bits in each byte to be packed. Maximum is machine word size. (integer) i nskip The number of bits to skip between each byte in the unpacked in order to locate the next byte to be packed. (integer) i iter The number of bytes to be packed. ******************************************************************************* * * * GBYTE * * * ******************************************************************************* The singular version of the gbytes routine which accesses only one byte in each call. call gbyte (packed,unpacked,noff,nbits) i packed array which contains the packed binary read. (integer) o unpacked array which contains the unpacked data in byte form. (integer) i noff The initial number of bits to skip, left to right, in packed order to locate the first byte to unpack. (integer) i nbits The number of bits in each byte to be unpacked. Maximum is machine word size. (integer) ******************************************************************************* * * * SBYTE * * * ******************************************************************************* The singular version of the sbytes routine which accesses only one byte in each call. call sbyte (packed,unpacked,noff,nbits) o packed array which contains the packed binary read. (integer) i unpacked array which contains the unpacked data in byte form. (integer) i noff The initial number of bits to skip, left to right, in unpacked order to locate the first byte to pack. (integer) i nbits The number of bits in each byte to be packed. Maximum is machine word size. (integer)