niwa / lfric_reader Goto Github PK
View Code? Open in Web Editor NEWPlugin for ParaView and VTK that reads output from the LFRic code in netCDF UGRID format
License: Other
Plugin for ParaView and VTK that reads output from the LFRic code in netCDF UGRID format
License: Other
The replace_ugrid_metadata.py
script fails to detect netCDF time variables named time
and misinterprets netCDF dimension names such as surface_tiles
as UGRID dimensions.
The following mesh handling issues were found with recent LFRic output:
The package does not currently build with the MS Visual C++ compiler on Windows, which is a prerequisite for including a conda-forge package for Windows.
The LFRic Reader package no longer builds with recent ParaView release v5.10.0 due to an issue in the CMake configuration, where versions numbers are not handled correctly.
Hi,
I built paraview from source on Mac OS X (latest from github) and I'm getting
(base) niwa-1019500~/lfric_reader/src/cxx/build$ cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local/paraview/
-- Looking for C++ include pthread.h
-- Looking for C++ include pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Found OpenGL: /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/OpenGL.framework found components: OpenGL
CMake Deprecation Warning at /usr/local/paraview/lib/cmake/paraview-5.8/paraview-use-file-deprecated.cmake:1 (message):
The PARAVIEW_USE_FILE
is no longer used starting with 5.7.
Call Stack (most recent call first):
CMakeLists.txt:18 (INCLUDE)
CMake Error at CMakeLists.txt:26 (ADD_PARAVIEW_PLUGIN):
Unknown CMake command "ADD_PARAVIEW_PLUGIN".
-- Configuring incomplete, errors occurred!
It should be possible to install the replace_ugrid_metadata
script using Python's setuptools, to make it more easily available to users.
UGRID metadata (in particular mesh connectivity and units) can be inconsistent in LFRic output files. Add a Python script to fix these issues as a post-processing step, until a permanent fix is available in LFRic IO.
Having built an image from Singularity-headless
the example script src/python/paraview_script.py
fails to find the shared object file for the plugin:
$ singularity exec paraview_headless.sif pvpython src/python/paraview_script.py
( 1.136s) [main thread ] vtkPVPluginLoader.cxx:519 ERR| vtkPVPluginLoader (0x55c22149af90): libnetCDFLFRicReader.so: cannot open shared object file: No such file or directory
Traceback (most recent call last):
File "src/python/paraview_script.py", line 7, in <module>
pvs.LoadPlugin(pluginPath+'libnetCDFLFRicReader.so', remote=False)
File "/usr/local/lib/python3.6/site-packages/paraview/simple.py", line 1880, in LoadPlugin
servermanager.LoadPlugin(filename, remote)
File "/usr/local/lib/python3.6/site-packages/paraview/servermanager.py", line 2381, in LoadPlugin
raise RuntimeError ("Problem loading plugin %s" % (filename))
RuntimeError: Problem loading plugin libnetCDFLFRicReader.so
Checking the image contents shows a different filename:
$ singularity shell paraview_headless.sif.root
Singularity> ls /usr/local/lib/netCDFLFRicReader/
libvtkNetCDFLFRicReader.so netCDFLFRicReader.so vtk
Modifying the example script to use the filename in the image fixes the problem:
pvs.LoadPlugin(pluginPath+'netCDFLFRicReader.so', remote=False)
Presumably the filename currently in the example script works on some systems when not built within a Singularity container? It would be nice to have the example script work in both circumstances. I'm not familiar with ParaView builds, configuration, etc. but one simple option would be to define an environment variable in the Singularity image that is picked up by the example script when present.
So in the Singularity definition files we could add:
%environment
... <existing variable definitions >
export PV_NC_PLUGIN_PATH=netCDFLFRicReader.so
And the start of the example script would become:
import os
import paraview.simple as pvs
# Load the LFRic reader plugin - it may be necessary to provide the full path to
# libnetCDFLFRicReader.so, depending on the installation. Set remote=True if you
# connect ParaView with a separate server.
pluginPath = os.environ.get('PV_NC_PLUGIN_PATH', 'libnetCDFLFRicReader.so')
pvs.LoadPlugin(pluginPath, remote=False)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.