java -versionor, for older Java:
jre -versionIf you do not have either of these on your current workstation, you can find out how to install the jre here.
java -cp /path/AreaToNetCDF.jar AreaToNetCDF src dstWhere 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 -AWIPSwill produce a NetCDF file compatible with AWIPS software.
java -cp /usr/local/java/AreaToNetCDF.jar AreaToNetCDF -HELPwill provide details on usage, and list all available options. -? will also provide this.
java -cp /usr/local/java/AreaToNetCDF.jar AreaToNetCDF src dst -AWIPS -Qwill 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_filenamewill convert the source GIF (or JPEG) to a NetCDF file, in a compatible mode with AWIPS using the navigation in the src AREA file.
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/fileIn this case, the URL will have the more specific format:
adde://host/image?keyword_1=value_1&keyword_n=value_nWhere the number of keyword/value pairs can will vary as needed. There can be any valid combination of the following supported keywords:
group, band, user, proj, versionAn example URL might look like:
adde://viper/image?group=gvar&band=1&user=abc&proj=nnnn&version=1This 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 $2aton 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.