[Paraview] Possible NetCDF conflict?

Andy Bauer andy.bauer at kitware.com
Thu May 26 14:02:19 EDT 2011


Hi Adriano,

I wrote the vtkNetCDFCAMReader and I'm using the C++ API to NetCDF in that
reader.  The NcVar::name() method is used in that code.  Instead of using
the standard netcdf c++ header file you can include vtk_netcdfcpp.h
instead.  A couple of finer points that may or may not affect you:

1) There may be some issue with including mpi.h and having the netcdf header
files rename some of the mpi constants.

2) The default netcdf error condition (e.g. trying to access a variable that
doesn't exist using get_var() ) is to call exit.   You can do something
like  "NcError ncError(NcError::verbose_nonfatal);" to turn this behavior
off while ncError is in scope.

Andy


On Thu, May 26, 2011 at 12:34 PM, Adriano Gagliardi <agagliardi at ara.co.uk>wrote:

>
> Dear All,
>
> I appear to be getting a conflict between a reader plugin I developed that
> handles the NetCDF format and the latest release of ParaView. The call that
> is giving me issues is the NcVar function call, name(), which returns a
> NcToken (const char *). The issue is that the call now returns a NULL
> pointer regardless of dataset, which is wrong.
>
> To be clear:
>
> (1) I have compiled my plugin with the same, static netcdf libraries
> consistently between both versions of ParaView.
> (2) The reader code has not changed between both versions of ParaView.
> (3) All variables exist in the NetCDF files and the data files themselves
> have not changed between both versions of ParaView.
> (4) By removing the NcVar var->name() call in the code and hard-coding a
> variable name that exists in the file (e.g. const char* = "pressure"), the
> reader works i.e. it detects the variable, loads it in and displays it
> correctly.
>
> Item 4 is what leads me to believe there is now some sort of conflict
> occuring between the old (PV3.6.2) and new (3.10.1) versions of ParaView. I
> know there is support for specific NetCDF files in ParaView already. If
> possible, I'd like to try and compile my plugin against the NetCDF
> libraries
> used for those readers. Can I do this? In the meantime, I'm going to try
> downloading and compiling against the latest NetCDF libraries to see if it
> resolves the issue.
>
> Thanks,
>
> Adriano
>
> ===================================
>
> Adriano Gagliardi MEng PhD
> Business Sector Leader
> Computational Aerodynamics
> Aircraft Research Association Ltd.
> Manton Lane
> Bedford
>
> Tel: 01234 32 4644
> E-mail: agagliardi at ara.co.uk
> Url: www.ara.co.uk
>
>
> **********************************************************************
> This email contains information that is private and confidential and is
> intended only for the addressee.
> If you are not the intended recipient please delete it and notify us
> immediately by e-mailing the sender.
> Note: All email sent to or from this address may be accessed by someone
> other than the recipient, for
> system management and security reasons.
> Aircraft Research Association Ltd.  Registered in England, Registration No
> 503668 Registered Office:
> Manton Lane, Bedford MK41 7PF England VAT No GB 196351245
>
> **********************************************************************
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the ParaView Wiki at:
> http://paraview.org/Wiki/ParaView
>
> Follow this link to subscribe/unsubscribe:
> http://www.paraview.org/mailman/listinfo/paraview
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20110526/a4a977d0/attachment.htm>


More information about the ParaView mailing list