Class cwangles

java.lang.Object
noaa.coastwatch.tools.cwangles

public final class cwangles extends Object

The angles tool computes earth location and solar angles for an earth data file.

Name

cwangles - computes earth location and solar angles.

Synopsis

cwangles [OPTIONS] input

Options:

-f, --float
-d, --double
-h, --help
-l, --location
-s, --scale=FACTOR/OFFSET
-u, --units=TYPE
-v, --verbose
-z, --sunzenith
--version

Description

The angles tool computes earth location and solar angles for an earth data file. Angles may be computed as scaled integer or floating point values, and in radians, degrees, or cosine. The earth location values computed refer to the center of each pixel.

Parameters

Main parameters:

input
The input data file name.

Options:

-f, --float
Specifies that data should be stored as 32-bit floating point values with no scaling. The default is to store as 16-bit signed integers with a scaling factor of 0.01.
-d, --double
Specifies that data should be stored as 64-bit floating point values with no scaling. The default is to store as 16-bit signed integers with a scaling factor of 0.01.
-h, --help
Prints a brief help message.
-l, --location
Specifies that earth location latitude and longitude data should be computed.
-s, --scale=FACTOR/OFFSET
The data scale factor and offset. Data values are scaled to integers using the factor and offset under the equation:
     integer = value/factor + offset
   
The default factor is 0.01 and offset is 0. This option is ignored if --float or --double is used.
-v, --verbose
Turns verbose mode on. The current status of data computation is printed periodically. The default is to run quietly.
-u, --units=TYPE
The units type. Valid units are 'deg' for degrees, 'rad' for radians, or 'cos' for cosine of the angle. The default is to compute angles in degrees.
-z, --sunzenith
Specifies that solar zenith angle data should be computed.
--version
Prints the software version.

Exit status

0 on success, > 0 on failure. Possible causes of errors:

  • Invalid command line option
  • Invalid input file name
  • No angle computations specified

Examples

The following shows the computation of latitude and longitude data for a CoastWatch HDF product file:

 
   phollema$ cwangles --float --location Master.hdf

   [INFO] Reading input Master.hdf
   [INFO] Creating latitude variable
   [INFO] Creating longitude variable
   [INFO] Calculating angles
   [INFO] Computing row 0
   [INFO] Computing row 100
   [INFO] Computing row 200
   [INFO] Computing row 300
   [INFO] Computing row 400
   [INFO] Computing row 500
 

Another example below shows the computation of solar zenith angle, stored as the cosine and scaled to integer data by 0.0001:

 
   phollema$ cwangles -v --sunzenith --units cos --scale 0.0001/0 test_angles.hdf

   [INFO] Reading input test_angles.hdf
   [INFO] Creating sun_zenith variable
   [INFO] Calculating angles
   [INFO] Computing row 0
   [INFO] Computing row 100
   [INFO] Computing row 200
   [INFO] Computing row 300
   [INFO] Computing row 400
   [INFO] Computing row 500
   [INFO] Computing row 600
   [INFO] Computing row 700
   [INFO] Computing row 800
   [INFO] Computing row 900
   [INFO] Computing row 1000
   [INFO] Computing row 1100
   [INFO] Computing row 1200
 
Since:
3.1.2
Author:
Peter Hollemans
  • Method Details

    • main

      public static void main(String[] argv) throws IOException
      Performs the main function.
      Parameters:
      argv - the list of command line parameters.
      Throws:
      IOException