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 Antonio: In 4.2 we tried to allow blanks in the group names. this caused too much trouble, so we replace them with "_", i guess starting in 4.3. So the correct name is Data_Fields not Data Fields We try to stay backwards compatible, but sometimes we cant, sorry for the breakage. The correct thing to do is to get a listing of variables in the file, to see what the valid variable names are. John > Hello, > > Since Java-NetCDFversion 4.3 there is a problem in finding variable > inside an HDF4 or HDF5 file. > > The follwing code works fine for JavaNetCDF 4.2 but variable=null for > JavaNetCDF version 4.3 and 4.5 > > String path = groupInFile + SUBDATASETS_GROUP_DELIMITER + > nameInGroup; // == "/HDFEOS/GRIDS/ColumnAmountNO2/Data > Fields/ColumnAmountNO2TropCloudScreened" > Variable findVariable = file.findVariable(path); // returns "null" > while in JavaNetCDF version 4.2 it is OK > > where "file" is "NetcdfFile" > > The HDF5 file used in this code can be found here: > https://www.dropbox.com/s/z6olxfoocx1ul8x/OMI-Aura_L3-OMNO2d_2004m1001_v003-2013m0109t110353.he5?dl=0 > > Sorry for posting on several mailing lists since I am not sure which > is most appropriate. > > With kind regards, > Antonio > > Ticket Details =================== Ticket ID: QVA-393299 Department: Support netCDF Java Priority: Normal Status: Closed