lats4d

Arlindo da Silva dasilva at ALUM.MIT.EDU
Wed Jan 30 11:30:19 EST 2008


On Jan 30, 2008 9:37 AM, Jennifer Adams <jma at cola.iges.org> wrote:

> We know that the loss of the LATS interface severely impacts many users.
> But our intention is to *replace* it with something better, not to eliminate
> the functionality completely. Consider this:
> set x; set y; set z; set t; set e
> set gxout fwrite
> set fwrite -nc file.nc
> d var
> disable fwrite
>

Actually, if the "fwrite -nc"  feature is implemented you could still use
lats4d for avoid having to write a script. It is important to understand
that while lats4d started as a wrapper around LATS, it has evolved beyond
LATS. For example, if you enter:

lats4d -i myfile.ctl -o example -format sequential

it would write the f77 binary file "example.bin". Other options are "stream"
for plain binary. The options "-be" and "-le" have also been added specify
if you want your binary file to be little_endian or big_endian.  And of
course, you can use all the subsetting, -func, etc to customize what gets
written. The sequential/stream formats were written around the current
"fwrite" feature, so any enhancement of fwrite could be easily incorporated.
One feature that is missing and that could be easily incorporated is for
lats4d to write a companion .ctl for the binary files it writes.

Recently I've be using lats4d as a generic iterator over a dataset. For
example,

lats4d -i myfile.ctl -format myscript.gs

will call my script for each time/level/variable, so you can use the lats4d
command line options for space/time/variable subsetting, and then run your
little script on each chunk. A variant of this is

lats4d -i myfile.ctl -format myscript.gsf

where "myscript.gsf" is treated as a script library, therefore having access
to the lats4d.gs namespace.

And finally, a new feature that people may not be aware of is

lats4d -i myfile.ctl -format stats

which prints an ASCII table with min/max/ave/etc for each
variable/level/time. This is a quick way to examine what is on a dataset.

I am attaching my latest lats4d.gs to save people the trouble of go looking
for it. It should be in the 1.9.0-rc1 build as well.

     Arlindo












--
Arlindo da Silva
dasilva at alum.mit.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20080130/00ed89ae/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lats4d.gs
Type: application/octet-stream
Size: 104029 bytes
Desc: not available
Url : http://gradsusr.org/pipermail/gradsusr/attachments/20080130/00ed89ae/attachment.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lats4d
Type: application/octet-stream
Size: 1809 bytes
Desc: not available
Url : http://gradsusr.org/pipermail/gradsusr/attachments/20080130/00ed89ae/attachment-0001.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: user.gs
Type: application/octet-stream
Size: 237 bytes
Desc: not available
Url : http://gradsusr.org/pipermail/gradsusr/attachments/20080130/00ed89ae/attachment-0002.obj 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: user.gsf
Type: application/x-font-type1
Size: 329 bytes
Desc: not available
Url : http://gradsusr.org/pipermail/gradsusr/attachments/20080130/00ed89ae/attachment.bin 


More information about the gradsusr mailing list