Re: [visad] help

The IDV (and, hence, McIDAS-V, since we use their code) uses their own
code to open the files and create VisAD-compatible objects for
"grids".   Don Murray was the author of that code.  I do not believe
his intent was ever to create anything like "Plain" that could create
a VisAD Data object out of the contents of just any netCDF-type file.

The "heart" of the code is at:
<https://github.com/Unidata/IDV/blob/master/src/ucar/unidata/data/grid/GeoGridAdapter.java>


tom

On Tue, Mar 25, 2014 at 9:28 AM, Curtis Rueden <ctrueden@xxxxxxxx> wrote:
> Hi Tom,
>
>> Unfortunately, this means that for files that use newer features in
>> these formats, the code no longer works.
>
> Out of curiosity: how do IDV and McIDAS V open NetCDF and HDF5 files? Would
> that code be illustrative and/or helpful for other devs in the community?
>
> Regards,
> Curtis
>
>
> On Tue, Mar 25, 2014 at 9:12 AM, Tom Whittaker <whittaker@xxxxxxxx> wrote:
>>
>> I believe the main issue here is that the code in the VisAD library
>> for HDF files has not been maintained by the original authors.  This
>> also is true of the netCDF adapter ("Plain").  Unfortunately, this
>> means that for files that use newer features in these formats, the
>> code no longer works.
>>
>> I do not have any solutions, other than as Ghansham suggests, using
>> the "official" releases of the respective libraries and then building
>> your own VisAD Data objects...
>>
>> tom
>>
>> On Fri, Mar 21, 2014 at 3:14 AM, Devanshi Prajapati
>> <prajapati.devanshi@xxxxxxxxx> wrote:
>> > Hi.......This is my program,
>> >
>> > package myapp;
>> >
>> > import java.rmi.RemoteException;
>> > import visad.DataImpl;
>> > import visad.VisADException;
>> > import visad.data.hdf5.HDF5Form;
>> > import ncsa.hdf.hdf5lib.*;
>> >
>> > public final class hfAdapter2
>> > {  String filePath;
>> >     public hfAdapter2() throws VisADException, RemoteException
>> >     {
>> >         filePath="F:\\Devanshi\\Input\\xyz.h5";
>> >         System.load("F:\\Devanshi\\Projects\\MyApp\\Lib\\jhdf.dll");
>> >         System.load("F:\\Devanshi\\Projects\\MyApp\\Lib\\jhdf5.dll");
>> >         HDF5Form h=new HDF5Form();
>> >         DataImpl ncData=h.open(filePath);
>> >     }
>> >     public static void main(String[] args)
>> >     throws RemoteException, VisADException, IOException
>> >     {      new hfAdapter2();
>> >     }
>> > }
>> > And the Error I got is,
>> >
>> > run:
>> > Exception in thread "main" java.lang.UnsatisfiedLinkError:
>> > ncsa.hdf.hdf5lib.H5.H5Fopen(Ljava/lang/String;II)I
>> > at ncsa.hdf.hdf5lib.H5.H5Fopen(Native Method)
>> > at visad.data.hdf5.hdf5objects.HDF5File.<init>(HDF5File.java:85)
>> > at visad.data.hdf5.HDF5FileAdapted.<init>(HDF5FileAdapted.java:70)
>> > at visad.data.hdf5.HDF5Form.open(HDF5Form.java:102)
>> > at myapp.hfAdapter2.<init>(hfAdapter2.java:46)
>> > at myapp.hfAdapter2.main(hfAdapter2.java:96)
>> > Java Result: 1
>> > BUILD SUCCESSFUL (total time: 0 seconds)
>> >
>> > --
>> > Devanshi U. Prajapati
>> >
>> >
>> > _______________________________________________
>> > visad mailing list
>> > visad@xxxxxxxxxxxxxxxx
>> > For list information, to unsubscribe, visit:
>> > http://www.unidata.ucar.edu/mailing_lists/
>>
>>
>>
>> --
>> Tom Whittaker
>> Researcher-Emeritus
>> University of Wisconsin-Madison
>> Madison, WI USA
>>
>> _______________________________________________
>> visad mailing list
>> visad@xxxxxxxxxxxxxxxx
>> For list information, to unsubscribe, visit:
>> http://www.unidata.ucar.edu/mailing_lists/
>
>



-- 
Tom Whittaker
Researcher-Emeritus
University of Wisconsin-Madison
Madison, WI USA