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.
Dear ibnu Fathrio, > I would like to use readgeneral.f to read NOAA Optimum interpolation SST data > (the filename is sst.mnmean.nc) > > I already installed netcdf library and udunits 1.12.11 by using gcc and > gfortran as compiler and > I use Ubuntu 12~ as OS. > > this is my u-name output > Linux ubuntu 3.2.0-32-generic-pae #51-Ubuntu SMP Wed Sep 26 21:54:23 UTC 2012 > i686 i686 i386 GNU/Linux > > when trying to compile the readgeneral.f, I get this error messages as > following > ======================================================================================= > ibnu@ubuntu:~/latih$ sudo gfortran -c -I/home/ibnu/netcdf/include > -I/home/ibnu/udunits/include readgeneral.f > > Warning: /home/ibnu/udunits/include/udunits.inc:25: Illegal preprocessor > directive > Warning: /home/ibnu/udunits/include/udunits.inc:25: Illegal preprocessor > directive > Warning: /home/ibnu/udunits/include/udunits.inc:25: Illegal preprocessor > directive > Warning: /home/ibnu/udunits/include/udunits.inc:25: Illegal preprocessor > directive > /home/ibnu/udunits/include/udunits.inc:33.6: > Included at readgeneral.f:173: > > UD_POINTER utmake > 1 > Error: Unclassifiable statement at (1) ... The file "udunits.inc" is designed to be processed by the C preprocessor. Apparently, your gfortran(1) compiler isn't preprocessing the file "readgeneral.f". Try renaming the file "readgeneral.f" to "readgeneral.F" to see if that will get gfortran(1) to preprocess its input. > Could you help me to solve this problem? i attach my edited readgeneral.f on > this email. > Sorry, I am newbie in using fortran. > > Many thanks for your great help > > ibnu Fathrio > > Meteorological lab, Hirosaki University, Japan > LAPAN-Indoenesia Regards, Steve Emmerson Ticket Details =================== Ticket ID: NXQ-944702 Department: Support UDUNITS Priority: Normal Status: Closed