Thanks, John for the documents! I succeeded in creating an edited
NetCDF-3 from NcML via command line following your documents.
However, I failed to create NetCDF-4 from NcML. What I tried:
java -Xmx1g -classpath ./netcdfAll-4.3.jar
ucar.nc2.dataset.NetcdfDataset -in grid_1_3d_z.ncml -out
grid_1_3d_z.nc4 -netcdf4 -nj22Config ./n2jjConfig.xml
My n2jjConfig.xml file is simple:
<?xml version="1.0"?>
<nj22Config>
<Netcdf4Clibrary>
<libraryPath>C:\Program Files (x86)\netCDF 4.3.0-rc2\bin</libraryPath>
<libraryName>netcdf-7</libraryName>
</Netcdf4Clibrary>
</nj22Config>
I tried a different combination of <libraryName> value such as
netcdf-7, netcdf.dll but it did not work.
I also tried replacing '\' to '/ or /bin/' to /lib'' in the path.
I'm using the Windows netCDF-4.3RC2 64-bit from [1].
I also observed something interesting. The original NetCDF-3 file
converted from HDF-EOS2 that I tested was 33K but NetCDF-Java shrunk
it to 2.3K NetCDF-3 file when I edited one attribute NcML, What's the
magic? I couldn't believe my eyes so I checked the edited file using
both ToolsUI and NetCDF-C ncdump; they both could open it
successfully.
Regards,
[1] http://www.unidata.ucar.edu/netcdf/win_netcdf/netCDF4.3RC2-NC4-64.exe
--
HDF: Software that Powers Science
On Thu, Feb 28, 2013 at 8:58 AM, John Caron <caron@xxxxxxxxxxxxxxxx> wrote:
> On 2/28/2013 7:28 AM, H. Joe Lee wrote:
>>
>> Hi,
>>
>> I know I can create a NetCDF-3 from NcML file via ToolsUI GUI as
>> described in [1].
>>
>> Is there way to create a NetCDF-3 file from NcML vial command line
>> interface? I'm looking for something like:
>>
>> %java -jar ToolsUI.jar -exec Writer -i test.ncml -o test.nc3
>>
>> Also, can I write a NetCDF-4 classic file from NcML using ToolsUI? I
>> get a pop-up dialog box saying "NetCDF=4 C library is not loaded".
>> (BTW, I think the dialog box has typo '=' in 'NetCDF=4'.)
>>
>> [1] http://www.unidata.ucar.edu/software/netcdf/ncml/v2.2/Tutorial.html
>> --
>> HDF: Software that Powers Science
>>
>> _______________________________________________
>> netcdf-java mailing list
>> netcdf-java@xxxxxxxxxxxxxxxx
>> For list information or to unsubscribe, visit:
>> http://www.unidata.ucar.edu/mailing_lists/
>
>
>
> Hi Joe:
>
> see
>
> http://www.unidata.ucar.edu/software/netcdf-java/reference/manPages.html
>
> and
>
> http://www.unidata.ucar.edu/software/netcdf-java/reference/netcdf4Clibrary.html
>
> John
>
> _______________________________________________
> netcdf-java mailing list
> netcdf-java@xxxxxxxxxxxxxxxx
> For list information or to unsubscribe, visit:
> http://www.unidata.ucar.edu/mailing_lists/