next up previous contents index
Next: 5.6.2 Snapshot Data Up: 5.6 Exchanging data Previous: 5.6 Exchanging data   Contents   Index


5.6.1 NEMO data files in general

Here is a neat trick to exchange NEMO data files between systems of different binary file format. On machine 1 the data is saved in (UNIX) compressed ASCII format:

    m1% tsf r.dat maxprec=t allline=t | compress > r.data.Z

The data can then be transported to machine 2 (in binary mode of course if data was compressed), and saved in the local binary structured file format:

    m2% zcat r.data.Z | rsf in=- out=r.dat

It turns out that for most data files the compressed ASCII file in full precision is about as large as the original binary file. The example above also shows that, by using pipes, machine 1 and 2 never need to store the full ASCII version of the file, which will in general be about 4 times as large as the binary file(s). Note again that a dash filename is interpreted as standard input/output in the NEMO environment (see also stropen(3NEMO)), but one should be warned here that some older versions of structured files could not be used in pipes.

For machines which support I/O redirection in the ftp program, an even more efficient solution is possible by redirecting the (compressed) data from the other machine into local binary structured format:

    m2% ftp m1
    ftp> binary
    ftp> get r.data.Z "| zcat | rsf - r.dat"

The compressed ASCII data never needs to be stored on the local disk directly. The data is uncompressed and passed to rsf through a pipe.


next up previous contents index
Next: 5.6.2 Snapshot Data Up: 5.6 Exchanging data Previous: 5.6 Exchanging data   Contents   Index
(c) Peter Teuben