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 Joshua: Unidata Support wrote: > > ------- Forwarded Message > > >From: "Joshua A Moore" <address@hidden> > >Subject: C to Java > >Organization: ? > >Keywords: 200008011920.e71JK2T24655 netCDF C Java > > I have used the C version of netcdf and now I am using the java version. I > am trying to find methods in the java version that are similar to the > following C functions: > nc_inq_varid in netcdf.NetcdfFile: public Variable get(java.lang.String name) > nc_get_att_text in netcdf.Variable: public Attribute getAttribute(java.lang.String name) then in Attribute: public java.lang.String getStringValue() > nc_get_var1_int in netcdf.Variable: public int getInt(int[] index) > nc_get_vara_short in netcdf.Variable: public MultiArray copyout(int[] origin, int[] shape) then access with this MultiArray method: public int getShort(int[] index) > > Please let me know if there are any direct conversions > have fun, john caron