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.
Hi Ming, > We have a user who try to build WRF with PGI. He built netCDF with both > fortran and C. When building WRF, he get the following error: > > undefined reference to ncslen > > I am not sure what could be the possible reason for this error? It's a bug in the netCDF-Fortran file fortran/module_netcdf_nf_interfaces.F90, with a one-line fix that I just committed to GitHub: https://github.com/Unidata/netcdf-fortran/commit/17e0ec61f240a09d5d7909eddabf2255eff8a971 It was basically just a typo in declaring an old netCDF-Fortran version 2 function, which is named ncsfil rather than ncslen. I guess it hasn't been encountered before because not many users are still calling the old version 2 API, as the version 3 or 4 F77 or F90 APIs have been available for quite a while. Nevertheless, you can fix the problem by replacing one line in the file, as shown in the above URL, recompiling to get the module file, and reinstalling. Please let us know if you need help with that. --Russ Russ Rew UCAR Unidata Program address@hidden http://www.unidata.ucar.edu Ticket Details =================== Ticket ID: YQL-546826 Department: Support netCDF Priority: Normal Status: Closed