AreaToNetCDF - McIDAS area to NetCDF image data converter

Version: 1.7 Updated: 10 Oct 2011

Description

AreaToNetCDF converts image data in McIDAS area format to NetCDF format. There is at present a very loose definition of exactly what should go into a NetCDF format image file, but we are trying to refine that, and the current output has proven useful in both IDL and AWIPS data processing systems.

Requirements

To use AreaToNetCDF, you must have either the Java Runtime Environment or the Java Development Kit byte-code interpreter installed on your computer. Version 1.1 or newer is required. To determine the version number of an already installed interpreter, run:
java -version
or, for older Java:
jre -version
If you do not have either of these on your current workstation, you can find out how to install the jre here.

Installation

To install the converter, follow these instructions:
  1. Go to the directory you run Java jar files out of. For example, this may be /usr/local/java.
  2. Copy the file AreaToNetCDF.jar to this directory by getting the file from here (using Netscape, click with the right mouse button and select Save link as... in order to successfully get this file).

Usage

     java -cp /path/AreaToNetCDF.jar AreaToNetCDF src dst
Where path is the absolute path to the installed jar file, AreaToNetCDF.jar, and src and dst are the source and destination file names.

Please note in all these examples, you will probably run Java using the java command; however, in older versions of the runtime, you would use jre.

options:

     java -cp /usr/local/java/AreaToNetCDF.jar AreaToNetCDF src dst -AWIPS
will produce a NetCDF file compatible with AWIPS software.
     java -cp /usr/local/java/AreaToNetCDF.jar AreaToNetCDF -HELP
will provide details on usage, and list all available options. -? will also provide this.

     java -cp /usr/local/java/AreaToNetCDF.jar AreaToNetCDF src dst -AWIPS -Q
will convert the source AREA to a NetCDF file, in a compatible mode with AWIPS, but produce very little textual output.

     java -cp /usr/local/java/AreaToNetCDF.jar AreaToNetCDF src dst -AWIPS -GIFgif_filename
will convert the source GIF (or JPEG) to a NetCDF file, in a compatible mode with AWIPS using the navigation in the src AREA file.

Comments

converting real-time data:

Note also as an alternative to specifying a McIDAS area file as the source input, you can request data directly from an ADDE server using a URL format data request in the command. A URL is always of the general format:
protocol://host/file
In this case, the URL will have the more specific format:
adde://host/image?keyword_1=value_1&keyword_n=value_n
Where the number of keyword/value pairs can will vary as needed. There can be any valid combination of the following supported keywords: The following keywords are required, and version MUST be the last in the URL:
group, band, user, proj, version
An example URL might look like:
     adde://viper/image?group=gvar&band=1&user=abc&proj=nnnn&version=1
This says, "go to the ADDE image server on host viper, and get me the most recent (no position number specified) visible data (band 1) from group GVAR". Note that you must have a valid McIDAS logon and project number to do this. Note also that using the converter this way allows you to work directly with real-time data.

simplifying usage with a script or batch file:

To simplify general usage on a Unix system, you could make a one-line shell script to minimize repetitive typing. I have a one line executable file in my $HOME/bin directory called "aton" that looks like this:

     java -cp /usr/local/java/AreaToNetCDF.jar AreaToNetCDF $1 $2
aton stands for "Area TO Netcdf". With this file available, all I have to type to run the program is:
     aton src dst

a note on output file size:

Please note that your output file size could be quite large, up to a factor of 12 times the input file size. One reason for this is the addition of navigation information in the output file, which is a latitude and a longitude value at each data point. You can leave this metadata out of the output file by using the -NOLL option. Another possible cause of file expansion is the fact that default output data point values are floating point, which take up four bytes per value. Using the -AWIPS option will cause output data to be written as one byte values, which in some cases may reduce file size.


Last updated May 8, 2000
For more information, contact Tom Whittaker