Code Monkey home page Code Monkey logo

lfric_reader's People

Contributors

rhattersley avatar tinyendian avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

lfric_reader's Issues

replace_ugrid_metadata script improvements

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.

Mesh handling issues

The following mesh handling issues were found with recent LFRic output:

  • Mesh files (as produced by the mesh generator) are not accepted by the reader plugin as valid UGRID files
  • Periodicity of some global (cubed-sphere) meshes is not correctly resolved
  • Wrap-around cells in biperiodic planar meshes are invisible

MSVC compatibility for Windows builds

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.

Build failure with ParaView v5.10.0

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.

include(PARAVIEW_USE_FILE) fails with paraview 5.7

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!

Add Python script to fix UGRID metadata

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.

Inconsistent library filename?

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.