Lats4D

From OpenGrADS
Jump to: navigation, search

Lats4D (LATS for Dummies) is a minimum fuss gs script for writing NetCDF-3, NetCDF-4/HDF-5, HDF-4 or GRIB files from GrADS using the PCMDI LATS interface. This script can serve as a general purpose file conversion and subsetting utility. Any GrADS readable file (GrADS IEEE, GSFC Phoenix, GRIB, NetCDF or HDF-SDS) can be subset and converted to GRIB, NetCDF-3, NetCDF-4/HDF-5, HDF-4 or binary using a single command line. By using one of the regridding functions available to GrADS the output file can also be converted to a different horizontal grid resolution.

When invoked without arguments from within GrADS this script will create a COARDS compliant file named .grads.lats.nc, with all the contents of the default file (all variables, levels, times). The file name and several other attributes can be customized at the command line, see the OPTIONS section in the manual page.

Downloading and installtion[edit]

Lats4D is included in the OpenGrADS Bundle 2.0.a7.oga.3 and later, with no additional installation neccesary. For other versions of GrADS, please download it from sourceforge. The installation is simple: simply place lats4d.gs along with your other GrADS scripts (under /usr/local/lib/grads by default or on any directory pointed to by the environment variable GASCRP, or even in your local directory). The shell script lats4d.sh is a wrapper for using LATS4D from the shell command line and should be place anywhere in your path.

Using Lats4D with GrADS v1.x[edit]

Up to GrADS v1.9 NetCDF files were obtained by running this script under the executable gradsnc. HDF-SDS files could be produced with the gradshdf executable. Notice that the classic version of grads, gradsc, did not include support for LATS and therefore cannot be used with Lats4d.

Using Lats4D with GrADS v2.0[edit]

Starting with GrADS v2.0.a7.oga.3, NetCDF-3, NetCDF-4/HDF-5 and HDF-4 output is now fully supported using the new LATS extension for GrADS v2.0, all using a single GrADS executable. This extension also adds the possibility of writing compressed NetCDF-4/HDF-5 files.

Very Important. An OpenGrADS version of GrADS including the LATS extesnion is necessary for enabling this feature; the classic GrADS v2.0 distribution from COLA does not support LATS.

Documentation[edit]

A Lats4D manual page is built in the Lats4D script itself, just type at the OS command line

% lats4d.sh -h

or from the GrADS command line

 ga-> lats4d -h

A formatted version of this output can be found here:

http://opengrads.org/doc/scripts/lats4d 

However, the built-in version is always preferred because it covers the options in the version that you actually have.