From mathews@bolero.gsfc.nasa.gov Fri May 12 22:52:59 1995 X-VM-Summary-Format: "%n %*%a %-17.17F %-3.3m %2d %4l/%-5c %I\"%s\"\n" X-VM-Labels: nil X-VM-VHeader: ("Resent-" "From:" "Sender:" "To:" "Apparently-To:" "Cc:" "Subject:" "Date:") nil X-VM-Bookmark: 1 Status: O X-VM-v5-Data: ([nil t nil nil nil nil nil nil nil] ["3761" "" "12" "May" "1995" "13:29:24" "GMT" "Jason Mathews" "mathews@bolero.gsfc.nasa.gov" nil "83" "Re: Help Number Format" "^From:" nil nil "5" nil nil (number " " mark "U Jason Mathews May 12 83/3761 " thread-indent "\"Re: Help Number Format\"\n") nil] nil) Path: solitaire.cv.nrao.edu!hearst.acc.Virginia.EDU!caen!uwm.edu!lll-winken.llnl.gov!ames!newsfeed.gsfc.nasa.gov!bolero.gsfc.nasa.gov!mathews Newsgroups: sci.data.formats Organization: NASA Goddard Space Flight Center -- Greenbelt, Maryland USA Lines: 83 Message-ID: <3ovnrk$ajd@post.gsfc.nasa.gov> References: <3ost2k$bmi@highway.LeidenUniv.nl> NNTP-Posting-Host: bolero.gsfc.nasa.gov Summary: public domain machine word encodings & conversion routines Keywords: CDF, IEEE, floating-point encodings From: mathews@bolero.gsfc.nasa.gov (Jason Mathews) Subject: Re: Help Number Format Date: 12 May 1995 13:29:24 GMT In article , Brian Gough wrote: >In article <3ost2k$bmi@highway.LeidenUniv.nl> steve@qv3donald.LeidenUniv.nl (Stephen C. Steel) writes: > > If you try to read data file written by non-Intel machines you may have > more problems as some store the bytes in a multibyte value in the > opposite order (eg. the Motorola processors used in Macintoshes and > many Unix workstations). > >I wish this were the only problem! I have been searching for a nice >unix utility for converting between different numeric formats (ieee & >non-ieee) as well as different endianness, but I haven't found >one. Does anyone know if such a thing exists? > >It would be a useful thing to have, especially if all the problems of >dealing with the more arcane formats could be solved once and for all. > >It would be nice not to have to write more bit-twiddling code every >time we get a dataset in an obscure binary format. >-- >Brian Gough > >Theoretical Physics, Fermilab, >PO Box 500, Batavia IL-60510. >tel: +1 708 840-3666 (fax 5435) >bjg@fnal.gov The NSSDC CDF scientific data format package does all the conversion internally between the supported platforms (Mac, PC, flavors of UNIX, VMS, OpenVMS, ...), which converts between the different machine architectures (big-endian vs. little-endian, IEEE vs. non-IEEE). All of the conversion routines are written in C and part of the library source code available via anonymous ftp at ncgl.gsfc.nasa.gov in /pub/cdf/dist/cdf25/. For example the routine FP34toFP2single will convert Floating-point/34 to floating-point/2, single-precision (i.e., VAX floating point to equivalent SGI format). These routines are located in the distribution package as cdf25-dist/src/lib/cdfed.c. The following table defines the four types of Floating-point encodings: 1..........Sun, SGi, IBM-RS, HP, NeXT, Macintosh 2..........DECstation, IBM-PC, DEC Alpha (OSF/1) 3..........VAX, DEC Alpha (OpenVMS - D_FLOAT) 4..........DEC Alpha (OpenVMS - G_FLOAT) Each of the four classes is labeled in the source as FP1, FP2, FP3, and FP4. Therefore, a conversion from types 3&4 to 2 would be defined as the routine FP34toFP2 and the reverse. A description of floating-point numbers from the CDF User's Guide is below: "Single-Precision Floating-Point Data Types. The single-precision floating-point encodings on the supported computers are either IEEE 754 floating-point or Digital's F_FLOAT floating-point. There are also two different byte orderings for the computers that use IEEE 754 (big- endian and little-endian). Double-Precision Floating-Point Data Types. The double-precision floating-point encodings on the supported computers are either IEEE 754 floating-point, Digital's D_FLOAT floating-point, or Digital's G_FLOAT floating-point. There are also two different byte orderings for the computers that use IEEE 754 (big-endian and little-endian)." The CDF User's Guide is available from anonymous ftp as a well as a hypertext version via the CDF Home page URL: http://nssdc.gsfc.nasa.gov/cdf/cdf_home.html Jason Mathews -- ------------------------------------------------------------------------------ Jason Mathews, Code 633.2 |National Space Science Data Center NASA/Goddard Space Flight Center|email: mathews@nssdc.gsfc.nasa.gov Greenbelt, MD 20771-0001 USA |http://coney.gsfc.nasa.gov/Mathews/jason.html --------------------------------+ -- ------------------------------------------------------------------------------ Jason Mathews, Code 633.2 |National Space Science Data Center NASA/Goddard Space Flight Center|email: mathews@nssdc.gsfc.nasa.gov Greenbelt, MD 20771-0001 USA |http://coney.gsfc.nasa.gov/Mathews/jason.html From sxu@ncsa.uiuc.edu Fri May 26 22:43:42 1995 Path: solitaire.cv.nrao.edu!hearst.acc.Virginia.EDU!caen!sol.ctr.columbia.edu!spool.mu.edu!howland.reston.ans.net!vixen.cso.uiuc.edu!sxu From: sxu@ncsa.uiuc.edu (Shiming Xu) Newsgroups: sci.data.formats Subject: HDF Newsletter #16 Date: 25 May 1995 15:34:40 GMT Organization: Nat'l Ctr for Supercomp App (NCSA) @ University of Illinois Lines: 214 Distribution: world Message-ID: <3q282g$e38@vixen.cso.uiuc.edu> NNTP-Posting-Host: xongmao.ncsa.uiuc.edu Originator: sxu@xongmao.ncsa.uiuc.edu HDF Newsletter #16 Apr. 1995 CONTENTS o Conflict user-definable tag ranges o HDF3.3r4 patch04 o Release binaries for UNIX machines o Correction on Mac version number o Update on HDF User's Guide o Status of HDF new releases o New contributions o Update on Collage and Mosaic o HDF home page and fill-out forms Conflict user-definable tag ranges ---------------------------------- We want to thank the users in the Space Radiation Lab of Caltec for bringing a serious problem to our attention. On page 1.2 of HDF Specifications and Developer's Guide, version 3.2 Sept. 1993 the following range of tags is defined: 32768 -- 64999 user-definable However, on page 4.1 of HDF Specifications (for HDF version 3.1) , March 1989 a different range is defined: Tags in the range 16,000-32,000 are user-definable. This means the user-definable tag range for HDF3.2 and later verions conflicts with the tag ranges specified previously. The new library (HDF3.2 or later versions) interprets tags in 16384 -- 32767 as HDF special elements, based on the new Specification. If users defined their own private tags within the range 16,000-32,000, new libraries (HDF3.2 or later versions) will interpret those tags as HDF special elements based on the new Specification, and unpredictable results may happen. We are sending this message to ask you: 1. to define private tags in the range 32768 -- 64999 if you need them 2. to contact us if you have defined your private tags in the range 16000 -- 32000 in your old hdf files. We will work with you to convert those tags into the new range. We apologize for any inconvenience this might cause you. HDF3.3r4 patch04 ---------------- Patch4 contains several bugs fixes and changes. The following bugs have been fixed: 1. After being called too many times with non-HDF files, Hishdf failed. 2. Fortran function sfiscvar() was missing on some platforms. 3. SDwritedata sometimes wrote out the incorrect number of bytes for odd dimension sizes if the first dimension was UNLIMITED. 4. The file name hdf/MAKE.IRIS4 was missleading. It has been renamed as hdf/MAKE.IRIX. 5. Minor fixes. The patch files are in ftp.ncsa.uiuc.edu:/HDF/HDF3.3r4/patches/ and the patched source code is in ftp.ncsa.uiuc.edu:/HDF/HDF3.3r4/patches/patchedsrc/ Release binaries for UNIX machines ---------------------------------- A bin/ subdirectory has been added in ftp.ncsa.uiuc.edu:/HDF/HDF3.3r4/ for executable code of HDF libraries and utilities on the following UNIX systems: SunOS_4.1.2, Solaris 2.3(SunOS_5.3), HPUX, AIX(no Fortran), OSF(no Fortran), C90, IRIX_5.3, IRIX_6.0.1_32 (32-bit mode), and IRIX_6.0.1(64-bit mode, hdf/ part only). Binaries for other platforms will be added later. Correction on Mac version number -------------------------------- The hdf3.3r4p2.*.hqx files in ftp.ncsa.uiuc.edu:/HDF/HDF3.3r4/hqx/ directory were stuffed with wrong directory names. After being unstuffed, they would create directory HDF3.3r5/ which should be HDF3.3r4. To correct the mistake, the hdf3.3r4p2.*.hqx files have been replaced by HDF3.3r4p2.*.hqx on the ftp server. Update on HDF User's Guide -------------------------- The drafts of chapters RIS8, RIS24, Palette, Vdata, Vgroup, and SD of HDF User's Guide are completed and are available on the NCSA ftp server. They are in /HDF/Documentation/HDF3.3/Users_Guide/HDF3.3_drafts/. Each chapter is stored in two formats: (1) postscript, and (2) mif (framemaker interchange format). More chapters will be added to that directory as soon as they are completed. We welcome your comments and suggestions. Status of HDF new releases -------------------------- HDF4.0: o The multi-file annotation interface is completed. o The multi-file raster interface is currently being implemented. o Data object compression with multiple compression algorithms is completed. o JPEG library has been separated from main HDF library source and has been upgraded to use the Independent JPEG Group V5b code. o Support for n-bit integer data within the SDS interface is completed. o Support for parallel I/O on the Thinking Machines' CM-5 is completed. o Limited support for reading CDF files is completed. We plan to have a beta release ready in June. (We have dropped our plan to add chunking support in HDF4.0. We now plan to add this in a later version.) HDF3.3: originally we planned to have a new release by the middle of April. However, since HDF4.0 is very close to the beta test, it seems there is no need for HDF3.3r5. We decided to not do a new release for HDF3.3 so that we can concentrate our efforts on HDF4.0. We will patch HDF3.3r4 as needed. New contributions ----------------- HDF3.3r4 on the Macintosh Power PC (C interfaces) James L. Anderson of Idaho National Engineering Laboratory contributed his port of HDF3.3r4 to Macintosh Power PC. His contribution is in /HDF/contrib/HDF3.3r4.PPC/. DataScope for PPC Tim Snider, Tim_Snider@Mindlink.bc.ca, ported the NCSA DataScope and HDF to the Macintosh Power PC. His contribution is in /HDF/contrib/DataScope.PPC/. Absoft Fortran version of HDF3.3r4 Robert A Managan of Lawrence-Livermore National Laboratory compiled HDF3.3r4 with Absoft's MacFortran successfully. He contributed to us the changes he made in Makefile files and HDF programs. The contribution is in /HDF/contrib/HDF3.3r4.Absoft/. Reformat Xinjian Lu, a visitor in CS department of UIUC added conversion functions to the NCSA Reformat and donated his new version to us. Reformat now can convert HDF raster images into GIF, TIFF, XWD and SunRaster formats. Currently this augmentation is only in the text version. The contribution is in /HDF/contrib/NCSA/Reformat/. Update on Collage and Mosaic ---------------------------- Collage HDF browser Features available in the next release of Collage: - After opening an HDF file, users will be able to view different data sets within the file as well as the attributes associated with each data set. - Users will be able to view attributes of data sets as they currently view the data sets themselves by clicking the toggle buttons. There will be enhancements to Collage's visualization and collaborative aspects as well. Mosaic HDF browser Bug fix: Number type mistakes in displaying integer attribute values, thanks to Frank Chen of GSFC, NASA. Features available in the next release of Mosaic: - for SDS, the browser will now display followed by in parentheses. - for 'old-style' SDS (DFSDxxxx SDS) the browser will now displaay "Data-set-" followed by