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
- Edit your .bashrc file
- Add
export PATH=$PATH:/location/of/installto 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.
- 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.
- Requires the Iris and Geovista python libraries to be loaded up by your system.
- For installing Iris see https://scitools-iris.readthedocs.io/en/stable/installing.html
- For installing Geovista see https://geovista.readthedocs.io/en/stable/installation.html)
- If these are installed into a bash module you will need to run
module load xxxxxbefore running ngview (replace xxxxx with the module name that enables the Iris and Geovista python libraries)
- 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
ngfixwhich fixes the restart file and adds the correct face_node_connectivity.ngfixsits in the same directory asngview. - 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 xxxxxreplacing xxxxx with the name of the module that contains the Geovista python librarygeovista 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
- Iris = https://scitools-iris.readthedocs.io/en/stable/
- Geovista = https://geovista.readthedocs.io/en/stable/
- Pyvista = https://docs.pyvista.org/
- Geovista key bindings = https://geovista.readthedocs.io/en/latest/reference/bindings.html
- Pyvista key bindings = https://docs.pyvista.org/api/plotting/plotting.html#plotting
