Panoply is a viewer for NetCDF files. It's much more inviting to use then Ncview.
As of this writing, the Panoply 4.11.3 macOS download does not work correctly on my macOS 10.11 (El Capitan) system. The app launches but hangs when opening a file. I don't know much about debugging GUI macOS applications, but I know that Panoply is written in Java and Java works cross-platform, as long as you have a Java Runtime Environment installed. If you don't, the easiest way to install the JRE is from java.com.
So instead of using the macOS download, just use the Linux download, which simply contains a shell script to launch Panoply and the necessary Java jar
files.
However, we need to tweak the shell script a little:
$ cat PanoplyJ/panoply.sh
#!/bin/sh
#
SCRIPT=`readlink -f $0`
SCRIPTDIR=`dirname $SCRIPT`
java -Xms512m -Xmx1600m -jar $SCRIPTDIR/jars/Panoply.jar "$@"
-
readlink -f
is not POSIX so it does not work on macOS. If you have Hombrew installed, you can actuallybrew install coreutils
and simply replacereadlink
withgreadlink
:-SCRIPT=`readlink -f $0` +SCRIPT=`greadlink -f $0`
You could also simply remove this line completely and replace the second line to use
dirname $0
directly:-SCRIPT=`readlink -f $0` -SCRIPTDIR=`dirname $SCRIPT` +SCRIPTDIR=`dirname $0`
-
Java applications launched from the command line with the
java
launcher do not use the installed Java 8 JRE, they use the Java 6 SDK that used to be installed by Apple and is now a separate download for legacy applications. Since Panoply requires Java 8 or later, we need to point it to to the rightjava
executable:-java -Xms512m -Xmx1600m -jar $SCRIPTDIR/jars/Panoply.jar "$@" +/Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java -Xms512m -Xmx1600m -jar $SCRIPTDIR/jars/Panoply.jar "$@"
And that's it ! You can now put the shell script and the jars
folder somewhere in your PATH
, and open NetCDF files from the command line!
cp -r PanoplyJ/* ~/bin
chmod u+x ~/bin/panoply.sh
mv ~/bin/panoply.sh ~/bin/panoply
panoply /path/to/iceh_inst.1998-01-01-03600.nc