avcal - converts AVHRR sensor counts to calibrated data.

SYNOPSIS

avcal  [ parameter=value ... ]  [ inputfile ... ]

Parameters are luts_only, radiance_only, save_cal_vars, temp_units, vis_coefs, line_interval, solar_corr, full_report.

DESCRIPTION

avcal converts AVHRR sensor count values to values with engineering units. For channels 1 and 2 the units are percent albedo. For channels 3, 4, and 5 the units can be either percent albedo or brightness temperature. This process is often referred to as radiometrically calibrating the data. New calibration coefficients are computed for each 100 input lines.

The calibration algorithm is based on information contained in NOAA-NESS Publication #107, July 1979 (see NOTES). Briefly, the visible and near infrared data (channels 1 and 2) are converted from raw counts to percent albedo using a linear relationship determined prior to launch. The thermal infrared data (channels 3, 4, and 5) are converted from raw counts to radiances with a linear relationship that is based on the raw count value associated with cold space (roughly 3 degrees Kelvin) and the raw count value associated with the temperature of an onboard target (approximately 300 degrees Kelvin). A slight nonlinearity in channels 4 and 5 is corrected using a quadratic function of radiance. Lastly, the infrared radiances are converted to temperature using the inverse Planck function.

To calibrate visible channels, avcal uses the ASCII data file avcal.coef, the location of which is defined by the SATDATA environment variable. This is a time-dependent file, each record of which contains the calibration information on a per-satellite basis together with the date label, defining the starting date when this information became valid. See this file for more information.

The output report provides the intercept (intcpt) and slope (slope) for each channel's linear calibration equation. It also provides the space (space) and target (target) counts. Lastly, it provides the temperatures (average) of the four platinum resistance thermistors (prt), which are embedded in the onboard target.

The output data are stored as scaled 16 bit integers to reduce mass storage requirements. Subsequent processing functions convert these compressed values to their true values as needed.

One or more TeraScan datasets are required as inputs. There are no output TeraScan datasets; i.e. calibration is done in place with the results overwriting the input data.

PARAMETERS

luts_only

OPTIONAL. This hidden parameter determines whether avcal writes lookup table variables to the input dataset, rather than modifying the actual AVHRR data. If yes, avcal outputs lookup table variables corresponding to each AVHRR channel in the input dataset.

Both temperature and radiance lookup table variables are output for the AVHRR IR channels. Temperature units are defined by the temp_units parameter.

The following are the names and units of the lookup table variables:

avhrr_ch1_lut (percent albedo)
avhrr_ch2_lut (percent albedo)
avhrr_ch3a_lut (percent albedo)
avhrr_ch3_lut (temperature)
avhrr_ch4_lut (temperature)
avhrr_ch5_lut (temperature)
avhrr_ch3_rad (radiance)
avhrr_ch4_rad (radiance)
avhrr_ch5_rad (radiance)

Note that luts_only=yes does not allow for sensor recalibration. Only the results of the initial calibration are output as lookup table variables. The interval of this initial calibration can be set using the line_interval parameter.

Valid responses are yes and no. The default is no, which means do not output lookup table variables.

radiance_only

OPTIONAL. This parameter determines whether avcal converts raw AVHRR channel 3, 4, or 5 data to radiance or to temperature.

Valid responses are yes and no. The default is no, which means convert to temperature.

save_cal_vars

OPTIONAL. This parameter determines whether avcal creates additional calibration data variables in the given datasets. These variables are listed in NOTES. There are two classes of calibration variables: variables taken directly from the HRPT header, and variables computed during the calibration process.

temp_units

avcal converts the raw AVHRR data to brightness temperatures with units of degrees Celsius, Kelvin, or Fahrenheit. Degrees kelvin or celsius should be used if the data will be used to estimate sea surface temperature using nitpix because nitpix does not currently support input data with units of fahrenheit.

Valid responses are [celsius, kelvin, fahrenheit]. The default is celsius.

vis_coefs

OPTIONAL. avcal can overwrite gain and offset for visible channels with the user-supplied four real values of vis_coefs : slope (ch1), intercept (ch1), slope (ch2) and intercept (ch2).

Valid responses are any four real values. Accepting the default values (i.e. pressing RETURN instead of entering the actual values), no matter what they are, means that no overwriting will be done.

line_interval

OPTIONAL. Defines the number of HRPT frames, after which the calibration coefficients will be updated.

Valid response is an integer value between 10 and 10240. The default value is 100 if luts_only=no. If luts_only=yes, the default value is 10240.

solar_corr

OPTIONAL. Determines whether or not to perform the solar zenith angle correction.

Valid responses are [yes, no]. The default is no.

full_report

If full_report=no, only the calibration report for the first 100 lines is printed. If full_report=yes, a calibration report is printed for every 100 lines of input data.

Valid responses are [yes, no]. The default is no.

EXAMPLES

Calibrate and report the contents of the TeraScan dataset named big. Notice that units, bad_value and real_scaling values all change after calibration. See bigdataset for information on the original contents of big.

[1] % avcal big

temp_units     : char(10) ? [celsius]
full_report    : char( 3) ? [no]

line    1  ch    slope    intcpt    space   target  prt  average
            1   0.10634    -3.85     38.3            1    419.00
            2   0.10749    -3.88     39.6            2    427.00
            3  -0.00144     1.43    994.1    602.5   3    414.00
            4  -0.17249   167.04    988.0    334.2   4    423.00
            5  -0.19988   196.32    993.8    360.8

[2] % contents big

printout       : char( 3) ? [no]

Dimensions:
   1        1199  line
   2        1410  sample
   3         103

Global Attributes:
  history          byte
  channels         long                     1 2 3 4 5
  projection       long    std_projection   sensor_scan
  et_affine        double                   1 0 0 1 -67 -367
  satellite        byte                     noaa-9
  sensor           long    std_sensor       avhrr
  pass_date        long    std_date         88/09/13
  start_time       double  std_time         21:18:22.6
  time_adjust      double  std_time         00:00:00
  attitude         double  degrees          0 0 0
  sensor_tilt      double  degrees          0
  sensorient       double  degrees          0 45 0 55.3 -55.3
  scan_samples     long                     2048
  scan_rates       double                   6 40000 37.6991
  orb_elem_date    long    std_date         88/09/13
  orb_elements     double                   0.476962 0.828252 4e-05 0.001585
                                             0.0363905 0.669068 0.275306
  center_lat       double  std_latitude
  center_lon       double  std_longitude
  map_angle        double  degrees

Variable Attributes:
  bad_value        double
  real_scaling     double


Variables:

  hrpt_header      short
     1        1199  line
     2         103

  avhrr_ch1        short   albedo*100%
     1        1199  line
     2        1410  sample
    bad_value      :  -32768
    real_scaling   :  0 100

  avhrr_ch2        short   albedo*100%
     1        1199  line
     2        1410  sample
    bad_value      :  -32768
    real_scaling   :  0 100

  avhrr_ch3        short   temp_deg_c
     1        1199  line
     2        1410  sample
    bad_value      :  -32768
    real_scaling   :  0 100

  avhrr_ch4        short   temp_deg_c
     1        1199  line
     2        1410  sample
    bad_value      :  -32768
    real_scaling   :  0 100

  avhrr_ch5        short   temp_deg_c
     1        1199  line
     2        1410  sample
    bad_value      :  -32768
    real_scaling   :  0 100

SEE ALSO

avhrr, nitpix, avin, avfix, fixline, avfilt, nitpix.

NOTES

The calibration algorithm is based on information contained in Techniques for Data Extraction and Calibration of TIROS-N/NOAA Series Satellite Radiometers for Direct Readout Users by Levin Lauritson and Gary Nelson (NOAA-NESS Publication #107, July 1979).

The following variables are output as a result of save_cal_vars=yes.


Dimension         Size    Description
 line               ???    number of AVHRR scan lines
 prt_samples          3    number of PRT samples in HRPT header
 cal_samples         10    number of space and target samples per channel in HRPT header
 cal_cases          ???    number of AVHRR sensor re-calibrations
 prts                 4    number of onboard PRTs


HRPT Header Variables     Units                          Dimensions
 ch1_ramp_cal                                             line
 ch2_ramp_cal                                             line
 ch3_ramp_cal                                             line
 ch4_ramp_cal                                             line
 ch5_ramp_cal                                             line

 prt_array                 raw_counts                     line, prt_samples
 ch3_patch_temp                                           line

 ch3_target                raw_counts                     line, cal_samples
 ch4_target                raw_counts                     line, cal_samples
 ch5_target                raw_counts                     line, cal_samples

 ch1_space                 raw_counts                     line, cal_samples
 ch2_space                 raw_counts                     line, cal_samples
 ch3_space                 raw_counts                     line, cal_samples
 ch4_space                 raw_counts                     line, cal_samples
 ch5_space                 raw_counts                     line, cal_samples


Computed Variables        Units                          Dimensions
 cal_offset_line                                          cal_cases
 cal_num_lines                                            cal_cases
 cal_good_lines                                           cal_cases
 cal_good_3a_lines                                        cal_cases
 cal_good_3b_lines                                        cal_cases

 cal_chN_offset            percent_albedo                 cal_cases
 cal_chN_slope             percent_albedo/raw_counts      cal_cases

 cal_chN_offset2           percent_albedo                 cal_cases
 cal_chN_slope2            percent_albedo/raw_counts      cal_cases

 cal_chN_space_median      raw_counts                     cal_cases
 cal_chN_space_mean        raw_counts                     cal_cases
 cal_chN_space_stdev       raw_counts                     cal_cases
 cal_chN_space_nedn        percent_albedo                 cal_cases

 cal_chN_target_median     raw_counts                     cal_cases
 cal_chN_target_mean       raw_counts                     cal_cases
 cal_chN_target_stdev      raw_counts                     cal_cases
 cal_chN_target_nedt       temp_deg_k                     cal_cases

 cal_prtN_median           raw_counts                     cal_cases
 cal_prtN_mean             raw_counts                     cal_cases
 cal_prtN_stdev            raw_counts                     cal_cases

 cal_prt_median            raw_counts                     cal_cases, prts
 cal_prt_mean              raw_counts                     cal_cases, prts
 cal_prt_stdev             raw_counts                     cal_cases, prts

The space and target statistics are computed after throwing out obviously bad data. For any given scan line (or HRPT minor frame), if any of the calibration data is zero, then all of the calibration information from that line is discarded.

The median is really the median line average, e.g., to compute cal_ch1_space_median, first compute the average channel 1 space counts for each of a set of scan lines (HRPT minor frames), and then take the median.

cal_chN_space_nedn is noise equivalent delta radiance, the product of the standard deviation of space counts data and the radiance/counts gain ratio. cal_chN_target_nedt is noise equivalent delta temperature, the product of the standard deviation of target counts data and the temperature/counts gain ratio.

In a calibration interval containing a transition between NOAA KLM channels 3A and 3B, if there are fewer than 5 good lines containing channel 3A data, then cal_good_3a_lines is forced to zero, and no attempt is made to calibrate channel 3A in the interval. Similarly, if there are fewer than 5 good lines containing 3B data, then cal_good_3b_lines is forced to zero, and no attempt is made to calibrate channel 3B in the interval.


Last Update: $Date: 2002/05/07 23:50:35 $