Re: reading in binary data

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Thu Oct 27 2011 - 12:08:42 MDT

What is the size of the file in bytes?

%> ls -l file_name

Is it 1200*1200*2 or 1200*1200*4 ?

Or are there 'extra' bytes?

===
The defuult in fortran is to write 'sequentail' mode
which *silently* prepend and postpends extra bytes.

On 10/27/11 12:00 PM, Joe Grim wrote:
> Hi,
>
> I've been trying to read in some FORTRAN-formatted binary data using
> fbindirread, but have been unsuccessful thus far. The data is described
> by the following:
>
> type = continuous
> signed = yes
> projection = regular_ll
> dx = 0.00833333
> dy = 0.00833333
> known_x = 1.0
> known_y = 1.0
> known_lat = -89.99583
> known_lon = -179.99583
> wordsize = 2
> tile_x = 1200
> tile_y = 1200
> tile_z = 1
> tile_bdr=3
> units="meters MSL"
> description="Topography height"
>
> I understand most of this (e.g., the data is 1200x1200, each data point
> requires 2 bytes, the value can be positive or negative), but when I try
> to read in the data using fbindirread, I can't find a single way that works:
> e.g., HGT_M = fbindirread(geog_data_path+filename,0,-1,"short")
>
> If someone knows how this works, would you please help me out? I really
> appreciate it!
>
> Joe Grim
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Oct 27 12:08:48 2011

This archive was generated by hypermail 2.1.8 : Fri Oct 28 2011 - 10:52:03 MDT