This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Pete, > I was hoping you could help me with a compilation error with an old Fortran > 77 that requires a call to udunits.dat. I realize that udunits v1 is > depreciated, but any help would be greatly appreciated. I would love to use > udunits v2, but the program I am using requires a call to "udunits.dat" in > order to compile, which I cannot find in udunits v2. Here is the command I > am using to compile the program: > > g77 read_nc2cmp.f -L/usr/local/netcdf-4.1.3/lib -lnetcdf -p > '/usr/local/udunits-1.11.7/etc/udunits.dat' -ludunits (where the -L flag > specifies the file path to the netcdf libraries and the -p to the > udunits.dat file) > > I get the following error: > > /usr/local/udunits-1.11.7/etc/udunits.dat: file not recognized: File format > not recognized > > Have you ever encountered this before? Any help would be much appreciated. The file "/usr/local/udunits-1.11.7/etc/udunits.dat is the units-database for the original UDUNITS (alias UDUNITS-1) package. There's no way that pathname should be handed to the g77(1) compiler. Also, according to <http://gcc.gnu.org/onlinedocs/gcc-3.4.6/g77/> g77(1) doesn't have a "-p" option. I think your g77(1) command is invalid. > Thank you, > -- > Pete Effertz > ISU Meteorology student > ISU chapter - AMS Regards, Steve Emmerson Ticket Details =================== Ticket ID: TMY-192575 Department: Support UDUNITS Priority: Normal Status: Closed