Skip to content

MetOffice/ngview

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NGVIEW: A Netcdf Geovista Viewer

This is a GUI for loading any netcdf, pp or fieldsfile that contains data on longitudes and latitudes; and plotting the data using ​Geovista.

Works with LFRic, NEMO, SI3, CICE, NAME, and other netcdf files. Works with global and regional data. Works with structured grids and unstructured grids (UGRID). Also works with UM fieldsfiles and pp files.

usage: ngview input_file.nc

Example initial window for when you first load ngview

How do I use it?

  • Edit your .bashrc file
  • Add export PATH=$PATH:/location/of/install to somewhere in this file. Replace /location/of/install with the directory where the ngview files are located
  • Open a new bash terminal
  • Change directory to where the netcdf file is you want to load
  • Run whatever command loads the Iris and Geovista python libraries. Depending on your organization this might look something like module load xxxxx, replacing xxxxx with the name of the module that contains the Iris and Geovista python library.
  • Run ngview netcdf_file.nc. Changing netcdf_file.nc to the name of the netcdf file you want to load.

What does it do?

  • Loads a netcdf file and lists all available variable names (left panel).
  • Once selected, a single variable can be extracted. Once extracted it will show the standard/long name in the top left, the z coordinates in the top right and the time coordinates in the bottom right.
  • Once the desired coordinates are selected the variable can be plotted. It will show the field in a Geovista 3D globe.
  • Rotate the globe by dragging the globe with the mouse (left click down). Zoom in and out with the mouse wheel. Rotate your field of vision by CTRL+mouse drag. A full list of scrolling options is available from the Geovista key-bindings page.
  • Close Geovista and select other variables and/or coordinates to plot more. Remember to extract before you plot each new variable.
  • Click on settings to change colour bar minimum and maximum values, colour map and lighting. If you change colour bar minimum and maximum values it will be remembered between plots so change back to auto to make it dynamically adjust.

Prerequisites

Current issues

  • It can be a bit slow to load large netcdf files. Please be patient. For large netcdf files users might want to extract the fields they want (using ncks) before using ngview.
  • For some users Geovista attempts to download and decompress files and then gets a segmentation fault. This is due to missing export MESA_GL_VERSION_OVERRIDE=3.3 in your .bashrc file.
  • LFRic restart files currently do not contain the correct face_node_connectivity to work using ngview. Users will get a memory error. The fix is to use ngfix which fixes the restart file and adds the correct face_node_connectivity. ngfix sits in the same directory as ngview.
  • On machines that do not have internet access then it will attempt to download some coastline files and fail to download them. The solution is to do the following:
    • Login to a machine that does have internet access.
    • module load xxxxx replacing xxxxx with the name of the module that contains the Geovista python library
    • geovista download --all --decompress
    • All the downloaded assets (including coastlines) appear in the directory ~/.cache/geovista (or whatever is returned from geovista -c). Copy the entire geovista directory to somewhere on the machine that doesn't have internet access.
    • Login to the machine that doesn't have internet access
    • export GEOVISTA_CACHEDIR=/full/path/to/geovista (changing the path to the geovista directory you just copied)
    • ngview input_file.nc

Links to dependent python libraries

About

A Netcdf Geovista viewer

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages