About  |  News & Events  |  Products  |  Jobs  
HOME SCIENCE EDUCATION COLLABORATION SEARCH CIRES

Center for the Study of Earth from Space Center for the Study of Earth from Space
     CSES Home  |   Research  |   Education  |   Faculty  |   Facilities  |   Software  |   Links  |   Contact CSES

ATREM : ATmosphere REMoval Program

The ATREM software package is no longer supported and is not available to new users. However, the ATREM FAQ are still available for current users. The University of Colorado retains the copyright and all other rights to the software.

ATREM Frequently Asked Questions

What is ATREM?

The ATmosphere REMoval program (ATREM) is an operational code for retrieving "scaled surface reflectance" from spectral imaging data collected by the Airborne Visible/Infrared Imaging Spectrometer (AVIRIS) and the Hyperspectral Digital Imagery Collection Experiment (HYDICE). With the addition of the user input scale factor file in version 3.1, ATREM is now generally useful for many types of hyperspectral data.

In ATREM, the Malkmus narrow band model and a pressure scaling approximation are used in calculating atmospheric transmittance of seven gases (water vapor, ozone, oxygen, carbon monoxide, carbon dioxide, methane, and nitrous oxide). The atmospheric scattering is modeled using the 6S code. Since water vapor has high spatial and temporal variations, this gas is removed on a pixel by pixel basis. The amount of water vapor for each pixel is derived from AVIRIS data using the 0.94- and the 1.14- µm water vapor bands and a three channeling ratio technique. The derived water vapor values are then used for modeling water vapor absorption effects in the entire 0.4-2.5 µm region.

ATREM assumes that the surface is horizontal and has a Lambertian reflectance. The retrieved "scaled surface reflectance" can be converted to real surface reflectance if the surface topography is known.


The left plot is an AVIRIS radiance spectrum taken over a green grassy field at the University of Colorado, Boulder on 7/1/97 (courtesy of R. Clark at the USGS). The right plot is an ATREM-derived reflectance spectrum for the same field.

How do you run ATREM on a Unix workstation?

First, create an ATREM input file with parameters specific to your data. For your reference, there is an example of the input file included with the ATREM distribution file called sample.input. Then, at the Unix prompt type:

% atrem status_output_filename &

where atrem_input_file is the input file you just created, status_output_filename is status output from the ATREM program, and the "&" put the job in the background.


Is there a PC version?

Yes, the PC source and executable are contained in the tar file mentioned above.


How do you run the PC version?

The same way you run the Unix version (see question #3), but at the DOS prompt and no "&".


I ran ATREM and nothing happened. What's wrong?

Typically ATREM was not able to find or open the wavelength file, radiance file, or output files specified in the ATREM input file. Look at the ATREM output status file for these kinds of errors as well as any other out of range parameter errors.


Is there a "golden" test dataset?

Yes, with ATREM 3.1 a test dataset is included under the directory "sample.data". Everything is in that directory to run and validate ATREM results.


Will ATREM work for hyperspectral sensors other than AVIRIS and HYDICE such as CASI, HYMAP, PROBE1, DAIS, and GER?

Yes, starting with ATREM 3.1. In previous versions, you could only specify "AVIRIS" or "HYDICE" for sensor type on the first line of the ATREM input file. The sensor type indicated the scale factor that was applied to the calibrated radiance data. Now, this scale factor is customizable on a band-by-band basis by specifying a user created "scale factor" file that has the scale factor for each band of your sensor.

The other requirement to make ATREM work with your sensor is that ATREM requires at least one water vapor band to determine the amount of water vapor on a pixel-by-pixel basis. If the .94 or 1.14 µm bands are not in your data, then the .722 or .822 µm bands can be used. If none of these bands are available, then you can turn off water vapor removal by changing the "water vapor indicator" in the "gas selector" line of the ATREM input file to "0". ATREM will not attempt to make any water vapor correction, so there may be residual water vapor features, particularly in the wings of the broad water vapor bands at 1.4, 1.9, and 2.6 µm. You must still specify the water vapor band ratio parameters, but they will be ignored.


I ran ATREM, and my results look terrible. What's wrong?

There are many ways to go wrong with ATREM. The good news is that ATREM 3.1 contains more robust error checking. Here are some of the most common reasons that ATREM does not work:

  • The dimensions for the input radiance data are wrong. The first thing to check is the accuracy of the parameters on the "input data dimensions" line of the ATREM input file, in particular the "storage order".
  • The data are in the wrong byte order. ATREM expects the input radiance data to be in the native machine's byte order. In ATREM 3.1, ATREM can swap bytes on the fly by setting the last parameter on the "input data dimensions" line to "1". If you run ATREM, and your results are totally uninterpretable, then try changing this parameter and running ATREM again.
  • Your image processing system is not interpreting the byte order of the ATREM results correctly. Before ATREM 3.1, a key piece of information was missing from the PDS header of the reflectance file, and some image processing systems were assuming a byte order that is compatible with SUN. Now, most image processing software should interpret or "guess" the byte order correctly.
  • The wavelength file has the incorrect format or the wrong units. The format for the wavelength file is 3-column ASCII where column 1 is the band number, column 2 is the wavelength, and column 3 is the FWHM. Make sure that the wavelength's and FWHM values are in units of micrometers. It should look something like:
    1. .435 .00923
    2. .535 .00923
    3. .634 .00934
  • There are comments in the ATREM input file. There cannot be any comments after the parameter lines that include text such as the sensor type line, the wavelength file line, and the input radiance file line.

ATREM appeared to run okay, but I have very large positive and negative spikes around 1.4 and 1.8 µm. What's wrong?

These are the strongly absorbing atmospheric water vapor regions. Most, if not all of the light is absorbed by the atmosphere, so the sensor does not receive any signal from the surface. The spikes are caused by numeric instability when a number very close to "0" is divided by another very small number.


Why do bands 1-5 have negative reflectance values?

One problem is that ATREM overestimates the path radiance in these bands, thus, too much signal is subtracted from the radiance data. Another potential problem is that it is very difficult to calibrate sensors at these shorter wavelengths, so the calibration and resulting surface reflection retrieval error is higher here.


My water vapor image does not look very good. I can see all kinds of surface features. What's wrong?

The water vapor image should usually look like vaporous "clouds". If you see surface features, then ATREM had a difficult time removing the background surface reflectance signal. ATREM has a particularly difficult time removing the nonlinear reflectance signal typically found in water laden vegetation spectra. You can try to adjust the "band ratio parameters" in the ATREM input file as follows.



CHANNEL VEGETATION
Center            Width
(µm)            (#pts)
SNOW
Center            Width
(µm)            (#pts)
ROCK & SOIL
Center            Width
(µm)            (#pts)

0.94-µm Band
Window 1 0.865            3 0.865            3 0.865            3
Window 2 1.030            3 1.040            3 1.030            3
Absorption 0.935            3 0.945            3 0.940            3
1.14-µm Band
Window 1 1.050            3 1.065            3 1.050            3
Window 2 1.230            3 1.250            3 1.235            3
Absorption 1.130            3 1.140            3 1.1375            3



Will ATREM work for low-altitude AVIRIS data?

Yes, simply adjust the sensor altitude which is the second paramater in the ATREM input file.


How can I read the transmittance file?

The format for the transmittance file is in Appendix B of the ATREM UserM-^Rs Guide. To actually read these data into most image processing software, you will have to edit the file to get rid of the band ratio and water vapor amounts.


Can I compile ATREM with Fortran-90?

Yes, ATREM will compile with some versions of f90. However, some f90 compilers cannot handle the "D" in the first column of the source line. This "D" stands for debug and the lines containing it have debug code such as print statements. These lines can be safely deleted or commented out if needed.


How long does ATREM take to run?

Sun Solaris, 300 MHz - ~10 minutes
C, 300 MHz - ~5 minutes


Does the wavelength file delivered with the AVIRIS data work in ATREM?

Not quite. But the *.spc files delivered with 1997 and beyond have all of the right data, but not in the correct columns. It needs to be reformatted by using columns 5, 1, and 2 (in that order in the ATREM wavelength file), and dividing columns 1 and 2 by 1000 to convert from nanometers to micrometers.


What is a SIPS header?

SIPS is the Spectral Image Processing System, developed here at CSES around 1992. We no longer support SIPS since there are better commercial packages that handle hyperspectral data quite well. However, we have retained the SIPS header format in ATREM.


Are there any other atmospheric correction software packages that use radiative transfer modeling available for hyperspectral data?

There are a number of other packages out there, but none that are free and generally available to the public.


What atmospheric model/aerosol mode/visibility should I use since I wasn't there the day of the overflight?

There is no good answer to this question other than it is up to you to make a best guess or estimate of the atmospheric parameters during the overflight. For the atmospheric model, use the model that best describes your site (i.e. mid-latitude summer, tropical). The same goes for the aerosol model. The visibility can be roughly characterized as follows:

5 km - very hazy, you can hardly see any surface features
23 km - typical slightly hazy conditions found in humid regions
35 km - very good visibility in humid regions
50 km - typical visibility in arid regions
100 km - very good visibility in arid regions


ATREM References

Gao, B.-C., K.B. Heidebrecht, and A.F.H. Goetz, Derivation of Scaled Surface Reflectances from AVIRIS Data, Remote Sens. Environ., 44, 145-163, 1993.

Clark, R. N., G. Swayze, K. Heidebrecht, A.F.H. Goetz and R.O. Green, Comparison of Methods for Calibrating AVIRIS Data to Ground Reflectance, Proceedings of the Fourth Annual JPL Ariborne Geoscience Workshop, October 25-29, 1993, vol. I, 35-36, 1993.

Goetz, A.F.H., J.W. Boardman, B. Kindel and K.B. Heidebrecht, Atmospheric corrections: On deriving surface reflectance from hyperspectral imagers, Proceedings SPIE Annual Meeting, 3118, 14-22, 1997.

Goetz, A.F.H., K.B. Heidebrecht, and B. Kindel, The effect of atmospheric correction on AVIRIS data to obtain consistent multiyear foliage chemistry results, Presented at the IEEE IGARSS'97 Conference in Singapore, August 3-8, 1997.

Jacobsen, A., K. B. Heidebrecht, A. F. H. Goetz, Assessing the Quality of the Radiometric and Spectral Calibration of CASI Data and REtrieval of Surface Reflectance Factors, Submitted to PE&RS December, 1998.





Privacy
Statement
An internationally recognized leader in innovative environmental science and research,
CIRES is jointly sponsored by the University of Colorado at Boulder
and the Office of Oceanic and Atmospheric Research at NOAA.
About | Science | Education | Collaboration | Accomplishments | News/Events
Products | Jobs | Search  |  Contact Us             [ page last modified: 12/03/04 ]



NOAA
Disclaimer