From: Arlindo da S. <da...@al...> - 2009-10-15 14:49:12
|
All, With Mike's help I've been able to port the LATS interface as an extension to GrADS v2.0.a7.oga.2. I used the opportunity do make a few enhancements such as support for NetCDF-3, NetCDF-4/HDF-5 and HDF-4 all from the same single executable, and support for NetCDF-4 compression. The UI has simplified a bit, you no longer need to go through the "display" command. The following UDCs are provided: *User* Defined COMMAND Short Description Function@Library ---------- ----------------------------------- --------------------------* * set_lats Set LATS parameters c_lats_set@^liblats.gex query_lats Query LATS parameters c_lats_query@^liblats.gex lats_grid Define LATS grid c_lats_grid@^liblats.gex lats_data Write data to LATS file c_lats_data@^liblats.gex* * ---------- ----------------------------------- -------------------------- The lats4d.gs usage remains the same; it detects the version and use the appropriate LATS command. Some additional information: 1) I fixed a bug which has been driving me crazy for almost 10 years: now you can call it twice in a row without exiting grads. 2) I created an alias for the "convention" parameter called "format". These are equivalent ga-> set_lats convention grib ga-> set_lats format grib 3) From the same single executable added several format options ga-> set_lats format netcdf (same as coards which is now deprecated) ga-> set_lats format netcdf4 (this is actually hdf-5) ga-> set_lats format hdf4 4) Added a compression option with NetCDF ga-> set gzip 2 (the higher the number, the better the compression) ga-> set shave 12 (number of bits to shave from float mantissa) These usually go hand and hand. If you set shave it will automatically set gzip=2 if it has not been set already. I should be able to add this feature to HDF-4 output as well, but this require a patch I got from the HDF Group and I'd better leave the supplibs alone for now. 5) Made lats4d.gs aware of these new features. Try these: % lats4d.sh -i model -o junk -format netcdf -v % lats4d.sh -i model -o junk -format netcdf4 -v % lats4d.sh -i model -o junk -format hdf4 -v % lats4d.sh -i model -o junk2 -format netcdf -shave -v Compare the file sizes. Notice that the file extensions are now consistent with the file format. Mike is looking into adding GRIB-2 support so that we can close the circle: conversion from/to any GrADS supported format. I still have some work to do on documentation and create a comprehensive test suite (I might be able to borrow from my GrADS v1.x test suite.) If anybody out there would like to help test this, just check out from CVS: % gacvs co -P Grads % cd Grads % make binstall The lats4d.sh script is now included under opengrads/Contents and all should work out of the box. I am not sure if I'll release this as v2.0.a7.oga.3 or wait for 2.0.a8. Jennifer: Is 2.0.a8 coming out any time soon? Cheers! Arlindo -- Arlindo da Silva da...@al... |