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 again- I was able to use an NcML file to read in your netCDF file. NcML is a new facility that allows one to add in extra metadata to a netCDF file. You can find out more about NcML at: http://www.unidata.ucar.edu/packages/netcdf/ncml/ Basically, I created a file that specified the location of the netCDF file and added in a unit specification for the time dimension. I've attached the file to this message. To use it: 1) save it from this message to somewhere on your disk. 2) edit the NcML file and change the file location to wherever your netCDF file is located. 3) Start the IDV. 4) Use the Data->New Data Source... menu to bring up the Data Source Selector. 5) From the Files/URLs tab, change the Data Source Type from "Default" to "Netcdf grid files" (in the next release we'll specify that .ncml files will use this by default). 6) Use the file chooser to find the ncml file that you edited and click the Open button. This will load the data source into the IDV and will have the correct times listed. This is sort of a hack since the times are really HHMM rather than centihours, but since the minutes are all 00, it works. If you have any questions, please let us know. Don Murray NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publically 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.
<?xml version="1.0" encoding="UTF-8"?> <nc:netcdf xmlns:nc="http://www.ucar.edu/schemas/netcdf" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.ucar.edu/schemas/netcdf http://www.unidata.ucar.edu/schemas/netcdfDataset2.xsd" uri="file:///C:/tmp/temp_air_01082000.nc"> <nc:readMetadata> <nc:readVariable name="time"> <nc:attribute name="units" type="string" value="centihours since 2000-08-01 00:00:00.0"/> </nc:readVariable > </nc:readMetadata> </nc:netcdf>