+++++++++++++++++++  Last updated  :  2001/06/22 +++++++++++++++++++++++++
 
This directory contains data for various surface parameters.
 
Directory structure:
 
/pub
  |__ gcp
       |__ sfcflds
              |__ README
              |
              |__ nas9000.code (contains several snow depth-related programs
              |                used on our front-end machine, NAS9000)
              |__ cray.code (programs used on CRAY)
              |
              |__ oper
              |    |__ fixed
              |    |     |__ mskaf
              |    |     |__ albedo
              |    |     |__ vegtype
              |    |     |__ gfrac.###.Z (12 files, ###=jan, feb, ... dec)
              |    |     |__ gfmax.Z, gfmin.Z, maxmon.Z, minmon.Z
              |    |     |__ soiltype
              |    |     |__ rlength.grb
              |    |     |__ imsmask.ascii.Z
              |    |     |__ islope
              |    |     |__ annual fixed 1x1 deg maximum snow albedo
              |    |     |     (maxsnoalb.asc.Z)
              |    |     |__ USGS 30 second 24-category vegetation type
              |    |     |__ STATSGO/FAO (30 sec for CONUS/ 5 min elsewhere) 19-category soil texture
              |    |__ live
              |          |__ snowdepth, snowdepth.grb
              |          |__ imssnow.grb
              |__ past
              |    |__ fixed
              |    |     |__ Y87M##.FPA.Z (12 files, ##=01, 02, ... 12)
              |    |     |__ mask.190km
              |    |
              |    |__ live
              |          |__ snow.weekly
              |__ test
                   |__ fixed
                         |__ monthly 0.144 deg snow-free albedo
                         |     (albedo_mmm.asc.Z, mmm=jan, feb, ... dec.)
                         |__ new monthly 0.144 deg greenness fraction
                         |    (gfrac_mmm.asc.Z, mmm=jan, feb, ... dec.)
                         |__ USGS 30 second 24-category vegetation type
                         |__ STATSGO/FAO (30 sec for CONUS/ 5 min elsewhere) 19-category soil texture
1. snowdepth (in /pub/gcp/sfcflds/oper/live/snowdepth):
 
   USAF Northern hemisphere snow cover and sea ice analysis.  Updated 
   daily on CRAY4 via the Shared Processing Network (SPN) and NESDIS 
   CEMCSS.  We copy it to the NIC at 5pm daily.
 
   File size: 2056 records (4 x 514) of 1024 bytes each.
 
   File contents:  4 fields of 514 records each.
      Field 1:  Daily analysis of snow depth and sea-ice
      Field 2:  Daily snow age
      Field 3:  Monthly snow/ice climatology
      Field 4:  Manual Bogus flags
 
   GCIP is interested only in Field 1 (first 514 records).
 
   Field 1 grid specifications:
      Grid size          : 512 x 512
      Projection         : Polar stereographic true at 60 degrees latitude
      Resolution         : 1/8 bedient*
      Origin point (1,1) : Upper left corner point
      Pole Point         : (257,257)
      Reference longitude: 80 W
 
      * A polar stereographic grid (true at 60 N) with a grid increment 
        of 381 km at 60 N is said to have a resolution of "1 bedient".  
        "1/8 bedient" means the resolution is 47.625 km at 60 N.
 
   Field 1 Format:
      Record 1:  Header record:
         8 bytes of description (NHSNOW) in EBCDIC characters
         8 bytes of date, e.g., 8H 14 JA91
         4 bytes (a 32-bit word) of Julian Reference Hour 
 
      Record 2:  Exact copy of record 1
 
      Records 3-514:  512 I*2 fixed point integers.  Each record represents
         one row of 512 values in the 512 x 512 grid.
 
   Numerical values:
      a) Over land  : snow depth in tenths of inches ranging from 0 to around 
                      250 (i.e., 25.0 inches)
      b) Over water : either 0 (water) or 4090 (sea-ice flag).
 
   Example source code and JCL to read above file and pack-up into ON 84 
   format on NCEP grid type 88 can be found on NAS 9000:
 
      nmc.prod.pan1.source(sstsnov)  -  source code
      nmc.prod.network(wn00znmc)     -  see exec pgm=sstsnov for jcl
 
   Example job to read and plot the file:
 
      nws.wd23.bb.snow.sorc(afsnomap)
 
   The above NAS 9000 code and JCL can be found on 
      /pub/gcp/sfcflds/nas9000.code.
 
   This dataset is also available in GRIB format:
      /pub/gcp/sfcflds/oper/live/snodepth.grb
      The first field in the grib file is the sea ice data (0-no ice, 1-ice),
      the second field is the snow depth, in meters (by GRIB convention).
 
2. snow.weekly (in /pub/gcp/sfcflds/past/live/snow.weekly):
   
   NESDIS/SAB weekly N.H. 190-km snowcover/sea-ice analysis.  Used prior
   to 3 Jun 1998.  Updated weekly on CRAY4 (between Monday afternoon and 
   Tuesday morning) and copied to NIC.  
 
   Grid specifications:
      Grid size          : 89 x 89
      Projection         : Polar stereographic true at 60 degrees latitude
      Resolution         : 1/2 bedient
      Origin point (1,1) : Upper left corner point
      Pole Point         : (45,45)
      Reference longitude: 80 W
   
   The first three lines of this ascii file is the header.  For example,
 
      NESDIS SNOW 9723 97/06/02-97/06/08** 9-JUN-97 19:20Z
      9723
      97/06/02-97/06/08    WEEKLY
 
   means that the data are for the 23rd week of 1997, between 2 and 8 Jun,
   created at 19:20Z 9 June.  
 
   Following the 3-line header are the rows in the 89x89 array that contain
   snow/ice.  Each line starts with a 'j' coordinate followed by pairs of
   'i' coordinates (between each 'i' pair are the points with snow/ice).
   For example, 
       80    48 50 54 55  0
   means that grid points (48,80), (49,80), (50,80), (54,80) and (55,80)
   are covered by snow/ice.  The '0' denotes the end of the line.
 
   The end of the file is indicated by three lines of '-1' followed by
   'ENDOF FILE'.
 
   /pub/gcp/sfcflds/cray.code/sno2get.f shows how to read in the weekly
   snow data (code copied from /cray3_nwprod/edas/sorc/grdeta.fd/sno2get.f)
 
3. mskaf (in /pub/gcp/sfcflds/oper/fixed/mskaf)
 
   A companion file for 'snowdepth', mskaf is the USAF land mask file.  It's
   in the same 512 x 512 grid as the snow depth data.
 
   Mask values:
      1 - Sea
      2 - Land
      4 - Coast
      9 - South of the Equator (undefined)
 
   This file is in ascii format.  You can read it in by
      read(unit,'(512i1)') ((mskaf(i,j),i=1,512),j=1,512) 
 
   Following the convention of snow depth data,  the origin (1,1) for mskaf
   is the upper left corner point.
   
4. mask.190km (in /pub/gcp/sfcflds/past/fixed/mask.190km)
 
   A companion file for 'snow.weekly', mask.190km is the land/sea mask
   on the 1/2 bedient North Hemisphere polar stereographic grid.  It's in
   the same 80x80 grid as the snow/ice data.
 
   Mask values:
      0 - Water
      1 - Land
 
   This file is in ascii format.  You can read it using
      read(unit,'(89i1)') ((mask(i,j),j=1,89),i=1,89)
 
5. Albedo (in /pub/gcp/sfcflds/oper/fixed/albedo)
 
   The file contains four sets of 1-deg albedo data, valid on 31 Jan,
   30 Apr, 31 Jul, and 31 Oct.  In the Eta model temporal interpolation 
   is applied in order to use these data.
 
   Array dimension is (361,180) (wrap-around longitude) and you can use
   the following to read:
 
              do 10 j = 1, 180
      10      read(10,20) (albedo(i,j),i=1,361)
      20      format(361(f6.2))
 
   Data are from latitudes  -89.5 to 89.5
   and for longitudes        -180 to 180
 
6. Vegetation type (/pub/gcp/sfcflds/oper/fixed/vegtype):
  Array dimensions:  (360,180)
  temporal domain:  fixed annual field
  spatial resolution:  1-deg x 1-deg global
  lat:  -89.5 to  89.5
  lon: -179.5 to 179.5 (no wrap-around longitude)
  array element (1,1) corresponds to (lat,lon) of (-89.5,-179.5)
 
    (i,j) = (1,180)            (i,j) = (360,180)
    (-179.5, 89.5)             (179.5, 89.5) 
          _|_________________________|_
           |         (NORTH)                 |
           |                                       |
           | (WEST)            (EAST) |
           |                                       |
           |         (SOUTH)                 |
          _|_________________________|_
           |                         |
    (-179.5,-89.5)             (179.5,-89.5) 
    (i,j) = (1,1)              (i,j) = (360,1) 
 
The formulae used to convert I/J coordinates into lat/lon
coordinates are:
       lon = -180.5 + I for I=1,360
       lat =  -90.5 + J for J=1,180
 
To read:
      INTEGER NFIELD(360,180)
      READ(10,22) NFIELD
  22  FORMAT(40I2)*
* read in 9 groups of 40 (9x40=360) for one 1-deg latitude band
 
 ------------------------------------------------------------------
 |  Values:
 |     0:   Ocean/water flag
 |     1:   Broadleaf-evergreen trees  (tropical forest)
 |     2:   Broadleaf-deciduous tress
 |     3:   Broadleaf and needleleaf tress (mixed forest)
 |     4:   Needleleaf-evergreen trees
 |     5:   Needleleaf-deciduous tress (larch)
 |     6:   Broadleaf tress with groundcover (savanna)
 |     7:   Groundcover only (perennial)
 |     8:   Broadleaf shrubs with perennial groundcover
 |     9:   Broadleaf shrubs with bare soil
 |    10:   Dwarf trees and shrubs with groundcover (tundra)
 |    11:   Bare soil
 |    12:   Cultivations (The same parameters for the Type 7)
 |    13:   Glacial
 ------------------------------------------------------------------
   
   Reference: Dorman and Sellers, 1989; JAM
 
7. Monthly green vegetation fractions (/pub/gcp/sfcflds/oper/fixed/gfrac.###.Z,
   files are compressed)
 
   array dimension:  ifrac(2500,1250)
   resolution     :  0.144 deg
   lat:  -89.928 to 89.928
   lon:  -180 to 179.856
   Array element (1,1) correspond to (lat,lon) of (-89.928,-180).
 
   To read in the data:
         read(10,40) ((ifrac(i,j),i=1,2500),j=1,1250)
 40      format(2500i2)
 
   The twelve monthly green veg fraction fields are assumed to be valid 
   at the 15th of each month.  The values are in percentages, ranging 
   from 1 to 99 over land, and 0 over water.  
 
   Also in this directory is the annual maximum and minimum of green veg
   fraction (gfmax.Z, gfmin.Z), same format as the gfrac.###.Z; and the 
   months in which the max/min values occurred (maxmon.Z,minmon.Z, the 
   month values range from 1 to 12, and 99 for points over water), also
   the same format as gfrac.###.Z.
 
   Reference:
 
   Gutman, G. and A. Ignatov, 1997: Derivation of green vegetation fraction 
   from NOAA/AVHRR for use in numerical weather prediction models.  Manuscript
   available from Garik Gutman at ggutman@nesdis.noaa.gov.
 
7._past (/pub/gcp/sfcflds/past/fixed/Y87M##.FPA.Z)
   Between 12Z 31 Jan 96 and 00Z 18 Feb 97, an older set of monthly 
   vegetation fraction data of 1-deg resolution was used:
 
   array dimension fpar(360,180)
   lat: 89.5 to -89.5 (note: it's from north to south)
   lon: -179.5 to 179.5 (no wrap-around in longitude)
   To read in the data (and reverse the N-S order so the array would
   end up from south to north):
 
           do 10 j = 180, 1, -1
      10   read(10,20) (fpar(i,j),i=1,360)
      20   format(360f8.3)
 
8. Soil type (/pub/gcp/sfcflds/oper/fixed/soiltype):
 
   The following text was copied, nearly verbatim, from Section 2 of 
   the following:
 
   Staub, B. and C. Rosenzweig, 1987: Global digital datasets of soil 
   type, soil texture, surface slope, and other properties: documentation 
   of archived data tape.  NASA Technical Memorandum #100685.
 
   Also see the following for additional reference:
 
   Zobler, L., 1986:  A world soil file for global climate modeling.
   NASA Technical Memorandum #87802.
 
   This file consists of a (360,180) matrix of character*1 TEXTURE data based
   on the FAO Soil Map of the World, and compiled into digital form by Zobler.
   Each matrix element represents the near-surface texture (upper 30 cm) of 
   the dominant soil unit in a one-degree square cell of the earth's surface.
   This file was prepared from the SOILWRLD dataset, with the addition of the 
   land-ice cells of Antarctica.  This file conforms exactly in number, 
   location, and nominal classification (land, land-ice, water) to Matthews's
   vegetation dataset.
 
   A) File format and coding.
 
      lrecl: 360   blksize: 3600   recfm: fb
      array dimension: tex(360,180)
      lat: -89.5 to 89.5
      lon: -179.5 to 179.5
 
      These data are read with the following FORTRAN statements:
 
            character*1 tex(360,180)
 
            do 20 j = 1, 180
       20   read(unit,105) (tex(i,j),i=1,360)
      105   format(360a1)
 
      The TEXTURE codes in this dataset are shown in the following table:
 
            Texture Code               Texture Class
                '1'                      coarse
                '2'                      medium
                '3'                      fine
                '4'                      coarse-medium
                '5'                      coarse-fine
                '6'                      medium-fine
                '7'                      coarse-medium-fine
                '8'                      organic
                '9'                      land-ice
                ' '                      water
 
    B) Notes
 
    (1) The 'organic' texture class is applied to those soil units, 
        primarily Histosols, that have no texture symbol on the FAO 
        map, and that are organic soils (i.e., possessing an H or O
        master horizon).  This texture class is not an FAO specification.
 
    (2) For further information, see the original NASA Tech Memo (#100685),
        listed at the beginning of this section.
 
9. Surface roughness length, in meters 
        (/pub/gcp/sfcflds/oper/fixed/rlength.grb):
   Packed in GRIB format, on the AWIP212 grid.
 
10. NESDIS IMS snow/ice analysis (/pub/gcp/sfcflds/oper/live/imssnow.grb)
   The IMS snow/ice analysis on the 1/16th bedient North Hemisphere
   polar stereographic grid.  The first field in the above file is the
   sea ice field (0 - no sea ice, 1 - sea ice).  The second field is
   the percentage of snow cover (currently only has value of 0 or 100.
   100 - snow, 0 - no snow).
 
   This daily analysis replaced the weekly NESDIS snow/ice analysis
   on 3 Jun 1998.
 
   Reference: 
     Ramsay, B., 1998: The interactive multisensor snow and ice mapping 
     system.  Hydrol. Process., Volume 12, 1537-1546.
 
   http://www.ssd.noaa.gov/SSD/ML/realtime.html#SNOWSec
 
11. IMS land/sea mask (/pub/gcp/sfcflds/oper/fixed/imsmask.ascii.Z)
   The land/sea mask used for the IMS snow/ice analysis.  The 
   ascii mask file is compressed.  
 
   Mask values:   0 - water
                  1 - land
                  9 - south of equator
 
   To read in the mask:
 
         DO 10 J = 1, 1024
            READ(IUNIT,110) (MASK(I,J),I=1,1024)
     10  CONTINUE
    110  FORMAT(80I1)
 
12. Zobler slope type (/pub/gcp/sfcflds/oper/fixed/islope)
 
           SLOPE CLASS      PERCENT SLOPE
                1               0-8
                2               8-30
                3               > 30
                4               0-30
                5               0-8 & > 30
                6               8-30 & > 30
                7               0-8, 8-30, > 30
               13               GLACIAL ICE
                0               OCEAN/WATER
 
13 & 14. Monthly albedo and green vegetation fraction
 
(Green vegetation fraction is extended to complete global coverage,
an update of item 7, above.)
 
anonymous ftp server/directory/files:
 
  ftp.ncep.noaa.gov/pub/gcp/sfcflds/test/fixed/
    README_albedo_gfrac.txt (readme file, 6K)
 
  Monthly 0.144 deg albedo (compressed ascii data files)
    (/pub/gcp/sfcflds/test/fixed/albedo_###.asc.Z, ###=jan, feb,... dec)
 
  Monthly 0.144 deg green vegetation fraction (compressed ascii data files)
    (/pub/gcp/sfcflds/test/fixed/gfrac_###.asc.Z,  ###=jan, feb,... dec)
 
Array dimensions:  albedo(2500,1250), ifrac(2500,1250)
  resolution     :  0.144 deg
  lat:  -89.928 to 89.928
  lon:  -180 to 179.856
  array element (1,1) corresponds to (lat,lon) of (-89.928,-180.000)
 
  (i,j) = (1,1250)           (i,j) = (2500,1250) 
  (-180.000, 89.928)       (179.856, 89.928) 
          _|_________________________|_
           |         (NORTH)                 |
           |                                       |
           | (WEST)            (EAST) |
           |                                       |
           |         (SOUTH)                 |
          _|_________________________|_
           |                         |
  (-180.000,-89.928)         (179.856,-89.928) 
  (i,j) = (1,1)              (i,j) = (2500,1)
 
The formulae used to convert I/J coordinates into Lat/Lon
coordinates are:
       Lon = -180.000 + 0.144*(I-1)  for I=1,2500
       Lat =  -89.928 + 0.144*(J-1)  for J=1,1250
 
To read in the data for each month:
       DIMENSION albedo(2500,1250),ifrac(2500,1250)
       INTEGER albedo
       INTEGER ifrac
       READ(2,10) ((albedo(i,j),i=1,2500),j=1,1250)
       READ(3,10) ((ifrac(i,j),i=1,2500),j=1,1250)
 10    FORMAT(2500i2)
 
The twelve monthly albedo and green veg fraction fields are assumed
to be valid at the 15th of each month.  Values are in percentages.
   albedo values represent:
          0    : ocean/water flag (also ifrac=0)
          1-69 : surface albedo (percent)
          70   : glacial/perpetual snow (percent, with ifrac=1)
   ifrac (green veg fraction) values represent:
          0    : ocean/water (also albedo=0)
          1    : bare soil*
          2-99 : green vegetation coverage (percent)
     *ifrac=1 represents a bare soil FLAG, NOT a green vegetation fraction
 
REFERENCES
Albedo:
   Csiszar, I., and Gutman, G., 1999: Mapping global land surface albedo
   from NOAA AVHRR.  J. Geophys. Res., 104, 6215-6228.
   Ivan Csiszar:  icsiszar@nesdis.noaa.gov
Greenness:
   Gutman, G. and A. Ignatov, 1997:  The derivation of green vegetation
   fraction from NOAA/AVHRR data for use in numerical weather prediction
   models.  Int. J. Remote Sensing., 19, 1533-1543.  Manuscript
   available from Garik Gutman at ggutman@nesdis.noaa.gov.
 
15. Maximum snow albedo
 
This maximum snow albedo data set reflects the condition that for a deep
snowpack, the surface albedo can depend on vegetation type/coverage,
e.g. lower albedo for a conifer forest (more darker trees sticking
through the brighter snowpack), compared to higher albedo for a
grassland region where the vegetation could be completely covered by the
snowpack.  This can have important implications for the surface energy
budget, and dependent issues.  The original database was derived from
work described in Robinson and Kukla (1985).  We extended their database
to global coverage; the steps to do this are described in the readme
file.
 
anonymous ftp server/directory/files:
 
ftp.ncep.noaa.gov/pub/gcp/sfcflds/test/fixed/
  maxsnoalb.asc.Z (compressed ascii data file, 17K)
  README_maxsnowalb.txt (readme file, 8K)
  maxsnoalb.gif (globl image file, 29K)
 
Array dimensions: mxsnal(361,180) (wrap-around longitude)
  temporal domain:     fixed annual field
  spatial resolution:  1-deg x 1-deg global
  lat:  -89.5 to 89.5
  lon:  -180.0 to 180.0
  array element (1,1) corresponds to (lat,lon) of (-89.5,-180.0)
 
    (i,j) = (1,180)            (i,j) = (361,180) 
    (-180.0, 89.5)             (180.0, 89.5) 
          _|_________________________|_
           |         (NORTH)                 |
           |                                       |
           | (WEST)            (EAST) |
           |                                       |
           |         (SOUTH)                 |
          _|_________________________|_
           |                         |
    (-180.0,-89.5)             (180.0,-89.5) 
    (i,j) = (1,1)              (i,j) = (361,1) 
 
The formulae used to convert I/J coordinates into Lat/Lon
coordinates are:
       Lon = -181.0 + I for I=1,361
       Lat =  -90.5 + J for J=1,180
 
To read in the data for each month:
       DIMENSION mxsnal(361,180)
       INTEGER mxsnal
       READ(2,10) ((mxsnal(i,j),i=1,361),j=1,180)
 10    FORMAT(361(I2))
 
The maximum snow albedo represents a fixed annual field.  Values are in
percentages and represent:
     0 : ocean/water flag*
  1-99 : maximum snow albedo (percent)+
*land-sea mask identical with Matthews 4-season snowfree albedo database.
+max snow albedo values equal to or greater than Matthews snowfree albedo.
 
REFERENCE:  Robinson, D. A., and G. Kukla, 1985:  Maximum surface albedo of
seasonally snow-covered lands in the northern hemisphere.  J. Clim. Appl.
Meteorol., 24, 402-411.
 
16. USGS vegetation type
USGS 30-second global 24-category vegetation (land-use) data can be downloaded from
 http://www.rap.ucar.edu/projects/land/LSM/sfc_fields/USGS/veg30susgs.gz
 
       a) Data file: veg30susgs.gz (Unit: integer, ranging from 0 to 24. 0: missing point).  Use UNIX gunzip to uncompress the downloaded file.
       b) Resolution: 30-second
 
       c) Data start at latitude 90 and longitude -180. The file is in direct access format and each direct access record contains data in one latitude circle beginning at -180 degree longitude, and ending at +180 degree. The data are arranged to start at northernmost latitude (north pole) and end at south pole     
       d) Filling gaps: This data set is based on USGS 24-category landuse map Version 
          2 obtained from USGS/EROS center (http://edcdaac.usgs.gov/glcc/globe_int.html). 
          Gaps in the original data (particularly over Hawaiian islands)
          were filled with climatology estimates. For each 15-degree
          latitude circle starting from N 90 degree, the dominant landuse 
          categoty was selected as a climatology estimate.
       e) Program: read_usgs_veg.f
To save the disk space, all input data are in 1-character Strings.  The program provided below is used to read and to transfer these characters into integer.
!
! To compile on Alpha machine:
!    f90 -free -cpp -convert big_endian read_veg.F
! To complie on Linux:
!    pgf90 -Mfreeform -DRECLENBYPTE -byteswapio read_veg.F
!
program read_vegetation
 
! Open direct access file VEG-USGS.30s, and read it
!      Note 30 sec vegetation data starts at 
!           latitude 90. and longitude -180.
!
!    - the file is in direct access format
!    - each direct access record contains data in one latitude circle
!      beginning at -180 degree longitude, and end at +180 degree
!    - the data is arranged to start at northernmost latitude (north pole),
!      and end at south pole
 
 implicit none
 
! declare variables
 
 character (len=25) :: vegfile
 character (len=1 ), allocatable, dimension(:) :: veg_char
 
 integer :: iunit = 10
 integer :: rec_len_lat = 360*120
 integer :: rec_len_lon = 180*120 
 integer :: rec_len, length, irec, jrec, nrec, ierr
 integer :: begin_lat_rec, end_lat_rec, begin_lon_rec, end_lon_rec
 real    :: begin_lat, end_lat, begin_lon, end_lon
 integer, allocatable, dimension(:) :: veg_int
 
! get the file name from input
 
 call getarg(1,vegfile)
 print *, 'reading file ', vegfile
 
! area of data to be printed
! longitudes are bounded between -180 W to +180 E
 
 begin_lat = 50.
 begin_lon = -130.
 end_lat   = 30.
 end_lon   = -70.
 
! record length for the data
!    each record has 360x120 data points
 
 rec_len = rec_len_lat
 length  = rec_len/4
 
#ifdef RECLENBYTE                                
! modify for machines like Cray, Sun, HP, IBM and Linux
 length = length*4                      
#endif                                         
 
! open 30 sec vegetation data file: 
 
 open (iunit,file=vegfile,access='DIRECT',recl=length,status='OLD')
 
! begin_record and end_record may be calculated as follows:
!
 begin_lat_rec = nint(90.-begin_lat)*120 + 1
   end_lat_rec = nint(90.-  end_lat)*120 + 1
 begin_lon_rec = nint(begin_lon-(-180.))*120 + 1
   end_lon_rec = nint(end_lon  -(-180.))*120 + 1
 
 print *, 'begin_lat_rec and end_lat_rec = ', begin_lat_rec, end_lat_rec
 print *, 'begin_lon_rec and end_lon_rec = ', begin_lon_rec, end_lon_rec
 
! nrec: from north to south (max 21600)
! irec: from west to east   (max 43200)
 
 allocate (veg_char(rec_len))
 allocate (veg_int (rec_len))
 
!do nrec = begin_lat_rec, end_lat_rec
 do nrec = 1, rec_len_lon
 
    read (iunit, rec=nrec, iostat=ierr) veg_char
 
    if (ierr /= 0) then
       print *, 'read error on record nrec = ', nrec
       stop 'exit read error'
    endif
 
    veg_int = ichar (veg_char)
    if ( nrec >= begin_lat_rec .and. nrec <= end_lat_rec) then
    if (mod(nrec,120) == 0 ) print *, (veg_int(irec), irec=begin_lon_rec,end_lon_rec,120)
    end if
 
 end do
 
 deallocate (veg_char)
 deallocate (veg_int )
 
 stop
 end 
 
Source: http://www.rap.ucar.edu/projects/land/LSM/index.html
 
17. STATSGO/FAO soil type
 
Hybrid (30-second STATSGO for CONUS and 5-min FAO elsewhere) 16-category USDA global soil texture data can be downloaded from
http://www.rap.ucar.edu/projects/land/LSM/sfc_fields/STATSGO/topsoil30snew.gz
 
a) Data file: 
topsoil30snew.gz: 0-30 cm soil texture (Unit: integer, ranging from 0 to 16. 0: missing point).  Use UNIX gunzip to uncompress the downloaded file.
  b) Resolution: 30-second
c) Data start at latitude 90 and longitude -180. The file is in direct access format and each direct access record contains data in one latitude circle beginning at -180 degree longitude, and ending at +180 degree. The data are arranged to start at northernmost latitude (north pole) and end at south pole  
  d) The FAO 5-minute 16-category global soil texture maps are remapped into global 30- second regular lat-long grid. Within CONUS, the soil texture is then replaced by the 30-second STATSGO data from http://www.essc.psu.edu/soil_info/index.cgi?soil_data&index.html.
       The dominant soil texture from 0-30 cm from multi-layer STATSGO soil was selected to match the FAO soil depths and to produce the top soil texture.
  e) To save the disk space, all input data are in 1-character.
       The program used to read vegetation type in section 16 can be used to read soil data by       replacing “veg” with “soil” in the program.
 
           Source: http://www.rap.ucar.edu/projects/land/LSM/index.html
 
.end.