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.
> Institution: German Aerospace Center (DLR) > Package Version: 3.5 > Operating System: Suse Linux 9 > Hardware Information: ? > Inquiry: Hi, > > I am trying to use the function nc_get_varm_float but the compiler (gcc 3.2) > is always complaining about: > > passing arg 7 of `nc_get_varm_float' from incompatible pointer type > > I have tried this with the example on the manual page but still get the same > message. > > Any ideas on what is going wrong? > > Thanks for the help! > > Sina Lohmann > > > > Howdy Sina! As it says in the C manual, nc_get_varm_float is looking for a float *: int nc_get_varm_float (int ncid, int varid, const size_t start[], const size_t count[], const ptrdiff_t stride[], const ptrdiff_t imap[], float *fp); Here's how we did something similar in a 3D example which will be released as part of version 3.6.2: if ((retval = nc_get_vara_float(ncid, pres_varid, start, count, &pres_in[0][0][0]))) ERR(retval); Please let me know if you need more help. Thanks! Ed Hartnett Ticket Details =================== Ticket ID: TGA-744224 Department: Support netCDF Priority: High Status: Closed