Hi Jin, thanks for your thorough description. I think the issue might be you are using a NetcdfDataset for finding the variables in the NetcdfFileWriter write method: target.write(targetDs.findVariable(varNameA), origin, arrayA); The NetcdfDataset does not hold an exact copy of the objects (dimensions, variables) in the file but it is a sort of shallow copy of those contents and adds some enhancements for managing coordinate systems. So, when you create the NetcdfDataset the information in the variables needed by the Input Output Service Provider (IOSP) for actually writing the variables is lost. I think you could try to write the variables in the same way you write the dimensions: target.write(target.findVariable(dimName), array); and use this: target.write(target.findVariable(varNameA), origin, arrayA); instead of: target.write(targetDs.findVariable(varNameA), origin, arrayA); Hope it helps, Marcos Hermida. Ticket Details =================== Ticket ID: SXF-400193 Department: Support netCDF Java Priority: Normal Status: Open
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.