Output to Netcdf signed bytes

From: Dave Allured <dave.allured_at_nyahnyahspammersnyahnyah>
Date: Sun, 31 May 2009 21:52:36 -0600

I have an array of signed integers in range -128 to +127. I would
like to output this to a Netcdf file as signed bytes in the same
range -128 to +127.

However the inttobyte function interprets bytes as unsigned in range
0 to +255. It seems that I need an extra step to add 256 to all
negative integers to map them to +128 to +255, before writing to Netcdf.

Is this the most straightforward way to output Netcdf signed bytes,
or am I missing something? Thank you for any advice.

Dave Allured
CU/CIRES Climate Diagnostics Center (CDC)
NOAA/ESRL/PSD, Climate Analysis Branch (CAB)

ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
Received on Sun May 31 2009 - 21:52:36 MDT

This archive was generated by hypermail 2.2.0 : Wed Jun 03 2009 - 12:52:48 MDT