[Thread Prev][Thread Next][Index]

Re: [ferret_users] LIST/format=stream/single -- precision?




Hi Ryo,

The SINGLE qualifier in the LIST command documentation is a typo. It should read SINGLY which deals with multiple expressions in the list command and has nothing to do with precision.

One (not very good) solution would be to write the file to netcdf in single precision and use "ncks -b binary.dat -C -v SST tmp.nc -o dummy.nc"
but that creates 2 temporary files with the variable.


Russ

On 15/12/15 17:39, Ryo Furue wrote:
Hi Ferret users,

I was wondering how to get a stream binary in single-precision (r4)
floating-point numbers from LIST/format=stream.  The "single"
qualifier doesn't work:

   spawn rm tmp.bin
   set data coads_climatology
   list SST[i=1:4,j=15,l=1]
   list/clobber/single/file=tmp.bin/format=stream SST[j=15,l=1]
   spawn ls -l tmp.bin

Although only 180 values are saved, the binary file has 1440 bytes =
180 * 8 .  I've verified that the file is indeed written correctly in
double precision(*).

I'm using

   FERRET v6.94
   Darwin 14.1.0 - 02/26/15

on Mac 10.11.2 (El Capitan).

Regards,

Ryo
-------------
(*) The output from list SST[i=1:4, j=15,l=1] agreed with the first 4
numbers from "od -t f8 tmp.bin | head -2" on the bash command line.



[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement