[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

951214: Oddball netcdf file (final)



>From: address@hidden (Dave Duling)
>Organization: National Institute of Health
>Keywords: 199512132213.AA10849 netCDF byte swapped

Dave,

re: byte-swapped file available
>great !  I ftp'd the file and it indeed works.

Good, I'm glad there is no other problem.

>Please tell me how you "byte swapped the file" ...  

Well, I used a routine that I am sure is not available to you.  You
could, however, use the 'dd' application.  You will have to specify the
conv= keyword:

man dd
 ...
     conv=ascii     Convert EBCDIC to ASCII.
          ebcdic    Convert ASCII to EBCDIC.
          ibm       Slightly different map of ASCII to EBCDIC.
          block     Convert  variable  length  records  to  fixed
                    length.
          unblock   Convert  fixed  length  records  to  variable
                    length.
          lcase     Map alphabetics to lower case.
          ucase     Map alphabetics to upper case.
          swab      Swap every pair of bytes.

                    ^ looks like this should do it

>I guess I could compile the lib with the
>wrong endianess then netcdf utilities 

If you do this, you are asking for a _LOT_ of problems!

>I compile would work on this data,
>of which we have tons... ?  Or if byte swapping is pipe-able Ill just 
>use that .... ?

Try 'dd'.  Also send a note to the organization you got the data from
and inform them that they should NEVER byte swap a netCDF file.

>What very good support, thanks !

You are welcome.

Tom Yoksas