Re: netCDF Java - NetCdf java "ncgen" method

Try giving it a full path specification, eg C:/data/

Anh Tran wrote:
Institution: Data Center
Package Version: Netcdf-java version 2.2.12
Operating System: Windows
Hardware Information: Window xp
Inquiry: Hi, I'm new to netcdf java. I would like to convert ncml file to NetCdf file. I used the following code: InputStream in = new FileInputStream ("Example.ncml"); NcMLReader.writeNcMLToFile(in,"");
It gives me the following errors when i executed the program:  (The system cannot find the path specified)
        at Method)
        at ucar.nc2.dataset.NetcdfDataset.openFile(
        at ucar.nc2.dataset.NetcdfDataset.openDataset(
        at ucar.nc2.ncml.NcMLReader.readNcML(
        at ucar.nc2.ncml.NcMLReader.readNcML(
        at ucar.nc2.ncml.NcMLReader.writeNcMLToFile(
        at dfo.Meds.argoNetcdf.Examplenc.main(
ERROR writting file
Can you help me?  Thanks you in advance.


<?xml version='1.0' encoding='UTF-8'?>
<netcdf xmlns=''
    location='' >

  <dimension name='lat' length='3' />
  <dimension name='lon' length='4' />
  <dimension name='time' length='2' isUnlimited='true' />

  <attribute name='title' value='Example Data' />

  <variable name='rh' type='int' shape='time lat lon' >
    <attribute name='long_name' value='relative humidity' />
    <attribute name='units' value='percent' />
  <variable name='T' type='double' shape='time lat lon' >
    <attribute name='long_name' value='surface temperature' />
  <variable name='lat' type='float' shape='lat' >
    <attribute name='units' value='degree_north' />
  <variable name='lon' type='float' shape='lon' >
    <attribute name='units' value='degree_east' />
  <variable name='time' type='int' shape='time' >
    <attribute name='units' value='hours' />

  • 2006 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdf-java archives: