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.
Steve, >Date: 31 Dec 1998 13:26:30 -0500 >From: "Steve Mauget" <address@hidden> >Organization: USDA/ARS >To: "Steve Emmerson" <address@hidden> >Subject: ncvgt subroutines >Keywords: 199812301538.IAA00805 In the above message, you wrote: > Steve : Ooops... here are all the ncvgt subroutines..Not being a C programmer, > I didn't recognize the associated code... Steve Mauget ... > static void > c_ncvgt( > int ncid, > int varid, > const size_t* start, > const size_t* count, > void* value, > int* rcode > ) > { > int status; > nc_type datatype; > > if ((status = nc_inq_vartype(ncid, varid, &datatype)) == 0) > { > switch (datatype) > { > case NC_CHAR: > status = (-56); > break; > case NC_BYTE: > > status = nc_get_vara_schar(ncid, varid, start, count, > (signed char*)value); > #line 1118 "fort-v2compat.c" > break; > case NC_SHORT: > > status = nc_get_vara_short(ncid, varid, start, count, > (short*)value); > > > > > break; > case NC_INT: > status = nc_get_vara_int(ncid, varid, start, count, > (int*)value); > break; > case NC_FLOAT: > > status = nc_get_vara_float(ncid, varid, start, count, > (float*)value); > > > break; > case NC_DOUBLE: > > > status = nc_get_vara_double(ncid, varid, start, count, > (double*)value); > break; > } > } > > if (status == 0) > *rcode = 0; > else > { > nc_advise("NCVGT", status, ""); > *rcode = ncerr; > } > } > extern void ncvgt_( int *fncid , int *fvarid , int * A3 , int * A4 , void * > A5 , int * A6 ) { size_t B3[100]; size_t > B4[100]; ; c_ncvgt( *fncid , (*fvarid-1) , f2c_coords(*fncid, > *fvarid-1, A3, B3) , f2c_counts(*fncid, *fvarid-1, A4, B4) , A5 , A6 > ); return ; } Well, the above all looks OK -- so I don't see where the problem lies. You said that you got the error message "Inconsistent data type for arg 5 in call to NCVGT". What, exactly, is emitting this message? The compiler? The netCDF library? Your program? -------- Steve Emmerson <http://www.unidata.ucar.edu>