Langley DAAC Version Number: LD_008_004_029_00_00_0_19990526 ERBE S-4G HDF Scanner Read Program The programs rds4gscnhdf.c and rds4gscnhdf.f (C and Fortran Versions) allow the user to output data and associated metadata to an ASCII file for a given data month, year, and satellite coverage. The program allows you to select the type of average (regional, zonal, or global), and the resolution (2.5, 5.0, or 10.0 degrees). These selections will restrict the data to one of the four S-4G Scanner HDF data files. You can further subset the data selection by choosing a geographic region to dump. This can be done by selecting a range of regions based on the equal-angle grid or by selecting latitude and longitude ranges. A menu of available parameters allows for the selection of particular data measurements (e.g. Longwave, Shortwave, etc.). Further information on the S-4G product can be found in the ERBE S-4G User's Guide, Regional, Zonal, and Global Gridded Averages, February 1993. The program builds the name of the HDF data file as you make the above selections. The names of the files are as follows: s4g_sc2.5_yymm_s* S-4G 2.5 degree regional scanner data s4g_sc5.0_yymm_s* S-4G 5.0 degree nested regional scanner data s4g_sc10._yymm_s* S-4G 10.0 degree nested regional scanner data s4g_sc_zg_yymm_s* S-4G zonal and global scanner data * yymm - The year and month that the data were acquired by the satellite. (e.g. 8504) s - A code for the satellite or combination of satellites that the data were acquired from. Codes are from 1 to 7 as follows: 1 - NOAA-9 2 - ERBS 3 - NOAA-10 4 - NOAA-9/NOAA-10 5 - ERBS/NOAA-9 6 - ERBS/NOAA-10 7 - ERBS/NOAA-9/NOAA-10 The program also builds an output file: HDF_filename.rpt ************************************************************************** * * * NOTE TO THE USER (05-26-94) * * * * * * Please note that there is a parameter for the Latitude and Longitude * * values to be stored in each HDF file. Please disregard these values * * which are stored in these files. The reason is that when these * * values are multiplied by the type of resolution that you wish to dis- * * play, the longitude values are stored in a -180 to 180 degree format. * * The data is actually stored in a 0 to 360 degree format as stated in * * the ERBE S-4G User's Guide. The read program for this data set has * * been modified to print out the correct values when asking for data * * values in lat/lon selection. This modification does not and has not * * affected the presentation of the data when selecting band data and * * regional data. If you bring up the S-4G data set in an outside soft- * * ware package, please ignore the lat/lon values because they will not * * present the data correctly. * * * * * ************************************************************************** In order to run the read software, you will need to obtain the HDF libraries which are available in the public domain from the National Center for Supercomputing Applications (NCSA) via ftp (ftp.ncsa.uiuc.edu or 128.174.20.50). Further information on obtaining the HDF libraries can be found in the Langley DAAC Handbook, February 1993. Once the HDF libraries have been installed on your machine, the programs can be compiled as follows: ************************************************************************** UNIX Example for Compiling Read Programs C : cc -Dmachineid -I/"path to HDF include files" rds4gscnhdf.c /"path to HDF library" -o "executable name" Example : cc -DSUN -I/home/HDF/include rds4gscnhdf.c /home/HDF/lib/libdf.a -o reads4g_scanc FORTRAN : f77 rds4gscnhdf.f /"path to HDF library" -o "executable name" Example : f77 rds4gscnhdf.f /home/HDF/lib/libdf.a -o reads4g_scanf ** Please note the cc and f77 are the SUN C and FORTRAN compilation commands. These may be different on your machine. **************************************************************************** Included below is a sample run and output of the S-4G HDF scanner read program. The sample run does not show all possible parameters and only shows output from the 2.5 degree scanner file. Comments or questions should be directed to 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 **************************************************************************** SAMPLE RUN **************************************************************************** sorcerer 112: rds4gscnhdf ******************************************************************* * * * S-4G HDF SCANNER READ PROGRAM * * * * * * Version 2.1 July 01, 1994 * * * * NOTE TO THE USER!!!!! * * FOR YOUR INFORMATION AS HOW THE DATA HAS BEEN STORED IN THE * * S-4G HDF FILE, LATITUDE VALUES AND LONGITUDE VALUES HAVE * * BEEN ADDED TO THE INPUT FILE. PLEASE IGNORE THESE VALUES * * WHEN USING OTHER HDF PACKAGES BECAUSE THESE NUMBERS WILL NOT * * REPRESENT THE DATA CORRECTLY. THIS READ PROGRAM HAS BEEN * * MODIFIED TO HANDLE THESE VALUES. IF YOU HAVE ANY QUESTIONS, * * PLEASE FEEL FREE TO CONTACT THE LANGLEY DAAC. * * THE WAY THAT THE LATITUDE AND LONGITUDE VALUES ARE STORED IN * * THE DATA FILE WILL NOT HAVE ANY MEANING OR REPRESENT THE * * DATA CORRECTLY IN OUTSIDE SOFTWARE PACKAGES. * * THIS READ PROGRAM HAS BEEN CORRECTED WHEN A USER SELECTS 10 * * DEGREE DATA, THE USER WILL GET THIS DATA. ORIGINALLY, THE * * USER RECEIVED 10 DEGREE DATA AND AN EXTRA BAND OF DATA. * * THIS WAS BECAUSE IN THE COMPARISON STATEMENT FOR WHICH * * DEGREE SELECTION, AN ASSIGNMENT STATEMENT WAS SET INSTEAD. * * * ******************************************************************* Please enter Q to exit the program or any other character to continue. c Enter data date and satellite code of data to read separated by a space. (Enter H for help, Q to Quit):h ============================================================ Enter data date (yymm), Example: 8504 Enter satellite code - one of following: 1- NOAA-9 4- NOAA-9 and NOAA-10 2- ERBS 5- ERBS and NOAA-9 3- NOAA-10 6- ERBS and NOAA-10 7- All 3 satellites ============================================================ Enter data date and satellite code of data to read separated by a space. (Enter H for help, Q to Quit):8605 5 1) Regional 2) Zonal 3) Global Choose data type from above choices : 1 1) 2.5 degree 2) 5.0 degree 3) 10.0 degree Choose resolution from the above choices : 1 Input file is s4g_sc2.5_8605_5 Output file is s4g_sc2.5_8605_5.rpt Reading file id and description ... Enter whether you would like to further subset based on latitude and longitude (L), region number (R), or no subsetting (N) l Enter beginning and ending latitude (-90 to 90) 12.5 20 Enter beginning and ending longitude (0 to 360) 70 90 Item Number Label 1 TSOLRD MN(DAY) 2 NET MN(DAY) 3 NETCS MN(DAY) 4 TSOLRDCS MN(DAY) 5 NET MN(HOUR) 6 TSOLRH MN(HOUR) 7 NETCS MN(HOUR) 8 TSOLRHCS MN(HOUR) 9 SOLARD DAILY 40 SOLRH HOURLY 64 SOLARHCS HOURLY 88 LW MN(DAY) 89 SW MN(DAY) 90 ALBEDO MN(DAY) 91 LWCS MN(DAY) Please choose the numbers of the data items you wish to dump. Note that the item numbers skip on daily and hourly parameters to show the number of days or hours that you will receive. Enter -1 to continue to next list or 0 to quit 1 -1 Item Number Label 92 SWCS MN(DAY) 93 ALBEDOCS MN(DAY) 94 LW MN(HOUR) 95 SW MN(HOUR) 96 ALBEDO MN(HOUR) 97 LWCS MN(HOUR) 98 SWCS MN(HOUR) 99 ALBEDOCS MN(HOUR) 100 LW DAILY 131 SW DAILY 162 ALBEDO DAILY 193 LWCS DAILY 224 SWCS DAILY 255 ALBEDOCS DAILY 286 LW HOURLY Please choose the numbers of the data items you wish to dump. Note that the item numbers skip on daily and hourly parameters to show the number of days or hours that you will receive. Enter -1 to continue to next list or 0 to quit -1 Item Number Label 310 SW HOURLY 334 ALBEDO HOURLY 358 LWCS HOURLY 382 SWCS HOURLY 406 ALBEDOCS HOURLY 430 NDLW DAILY 461 NDSW DAILY 492 NDLWCS DAILY 523 NDSWCS DAILY 554 NHLW HOURLY 578 NHSW HOURLY 602 NHLWCS HOURLY 626 NHSWCS HOURLY 650 GEOTYPE Please choose the numbers of the data items you wish to dump. Note that the item numbers skip on daily and hourly parameters to show the number of days or hours that you will receive. Enter -1 to continue to next list or 0 to quit 650 0 Output file name is s4g_sc2.5_8605_5.rpt Getting data, Please wait ... sorcerer 113: ********************************************************************** SAMPLE OUTPUT ********************************************************************** File ID: ERBE S-4G 2.5 Degree Regional Scanner Data for 8605 ERBS and NOAA-9 File description is as follows: This is a portion of the ERBE Regional, Zonal, and Global Gridded Averages product. This product contains averages of radiant exitant and albedo measurements for scanner 2.5 regional data for monthly, daily, and hourly averages. The dimension scales are divided by a factor of 2.5 to accommodate HDF restrictions of same data type for data and scales. Missing data is represented by -32767 and unobserved data by the largest number for the word size. The scale factors are stored as annotation labels. The data date, satellite code, deadscanner flags and processing date are as follows: 8605 5 222 14-Mar-91 Dimensions are 72 by 144 Description : Latitude Units : Degrees Format : F6.1 Description : Longitude Units : Degrees Format : F6.1 Dimension number 1 scales: 90.0 87.5 85.0 82.5 80.0 77.5 75.0 72.5 70.0 67.5 65.0 62.5 60.0 57.5 55.0 52.5 50.0 47.5 45.0 42.5 40.0 37.5 35.0 32.5 30.0 27.5 25.0 22.5 20.0 17.5 15.0 12.5 10.0 7.5 5.0 2.5 0.0 -2.5 -5.0 -7.5 -10.0 -12.5 -15.0 -17.5 -20.0 -22.5 -25.0 -27.5 -30.0 -32.5 -35.0 -37.5 -40.0 -42.5 -45.0 -47.5 -50.0 -52.5 -55.0 -57.5 -60.0 -62.5 -65.0 -67.5 -70.0 -72.5 -75.0 -77.5 -80.0 -82.5 -85.0 -87.5 Dimension number 2 scales: 0.0 2.5 5.0 7.5 10.0 12.5 15.0 17.5 20.0 22.5 25.0 27.5 30.0 32.5 35.0 37.5 40.0 42.5 45.0 47.5 50.0 52.5 55.0 57.5 60.0 62.5 65.0 67.5 70.0 72.5 75.0 77.5 80.0 82.5 85.0 87.5 90.0 92.5 95.0 97.5 100.0 102.5 105.0 107.5 110.0 112.5 115.0 117.5 120.0 122.5 125.0 127.5 130.0 132.5 135.0 137.5 140.0 142.5 145.0 147.5 150.0 152.5 155.0 157.5 160.0 162.5 165.0 167.5 170.0 172.5 175.0 177.5 180.0 182.5 185.0 187.5 190.0 192.5 195.0 197.5 200.0 202.5 205.0 207.5 210.0 212.5 215.0 217.5 220.0 222.5 225.0 227.5 230.0 232.5 235.0 237.5 240.0 242.5 245.0 247.5 250.0 252.5 255.0 257.5 260.0 262.5 265.0 267.5 270.0 272.5 275.0 277.5 280.0 282.5 285.0 287.5 290.0 292.5 295.0 297.5 300.0 302.5 305.0 307.5 310.0 312.5 315.0 317.5 320.0 322.5 325.0 327.5 330.0 332.5 335.0 337.5 340.0 342.5 345.0 347.5 350.0 352.5 355.0 357.5 Data attributes are as follows: Label : TSOLRD MN(DAY) 2.5X2.5 NFOV Units : W-H/M**2 Format: F11.4 Data Max: 500000 Data Min: 0 Scale factor of 100 has been applied to the data Slice encompasses latitude 20.0 to 12.5 and longitude 70.0 to 90.0 Values are printed in sections representing all requested longitudes for a given latitude Please note that lat and lon numbers are for the top and left lat and lon of the cell. Therefore the last latitude will be 2.5 degrees less than what you specified. Data Values are for longitude 70.0 to 90.0 and latitude 20.0 336600.9688 336600.9688 336600.9688 336600.9688 336600.9688 336600.9688 336600.9688 336600.9688 336600.9688 Data Values are for longitude 70.0 to 90.0 and latitude 17.5 333446.8438 333446.8438 333446.8438 333446.8438 333446.8438 333446.8438 333446.8438 333446.8438 333446.8438 Data Values are for longitude 70.0 to 90.0 and latitude 15.0 329732.8438 329732.8438 329732.8438 329732.8438 329732.8438 329732.8438 329732.8438 329732.8438 329732.8438 Data Values are for longitude 70.0 to 90.0 and latitude 12.5 325463.4062 325463.4062 325463.4062 325463.4062 325463.4062 325463.4062 325463.4062 325463.4062 325463.4062 Data attributes are as follows: Label : GEOTYPE 2.5X2.5 NFOV Units : SCENE ID Format: F3.0 Data Max: 5 Data Min: 1 Scale factor of 1 has been applied to the data Slice encompasses latitude 20.0 to 12.5 and longitude 70.0 to 90.0 Values are printed in sections representing all requested longitudes for a given latitude Please note that lat and lon numbers are for the top and left lat and lon of the cell. Therefore the last latitude will be 2.5 degrees less than what you specified. Data Values are for longitude 70.0 to 90.0 and latitude 20.0 1.0000 2.0000 2.0000 2.0000 2.0000 2.0000 1.0000 1.0000 1.0000 Data Values are for longitude 70.0 to 90.0 and latitude 17.5 1.0000 5.0000 2.0000 2.0000 5.0000 1.0000 1.0000 1.0000 1.0000 Data Values are for longitude 70.0 to 90.0 and latitude 15.0 1.0000 1.0000 2.0000 2.0000 1.0000 1.0000 1.0000 1.0000 1.0000 Data Values are for longitude 70.0 to 90.0 and latitude 12.5 1.0000 1.0000 2.0000 2.0000 1.0000 1.0000 1.0000 1.0000 1.0000