Some Ferret tips and pointers
Ferret
Ferret is a NetCDF vizualisation tool which can be used to postprocess and visualize PCM outputs.
This free software is from NOAA (National Oceanic and Atmospheric Administration) and the relevant webpage where you can learn how to install and use it is here: https://ferret.pmel.noaa.gov/Ferret/
[For Mac users] It is recommended to use/migrate-to PyFerret. However, There is a bug in the Mac OSX version as of 2023-June with respect to plotting. The bug is not subtle as the plotting does not work. See section below.
For first timers
Ferret is essentially a command line tool so the first thing you'll need to do is launch it from your terminal
ferret
(on some system, e.g. Ubuntu, the executable is called ferret_viz because another unrelated software also called ferret exists).
Once under Ferret you should see the Ferret prompt:
yes?
To load a datafile, for example diagfi.nc issue command:
yes? use diagfi.nc
Once the file has been loaded, you can query for its contents with the command show data ...
Various tips and pointers
...
How to make a 1D plot
...
How to make a 2D map
...
How to compute a zonal average
...
Installation tips
Mac OSX (PyFerret) and Graphics bug
Miniconda
conda is the preferred environment for the install. miniconda (a subset of conda) is a lighter-weight option which is a good choice. Installation instructions for both may be found [here.
PyFerret
Once one has a conda installation of some type, the instructions are straight-forward. The official installation documentation is [here.
Commands used on a Macbook Pro with the M2 ARM chipset (summer 2023)
- Install miniconda using script
bash Miniconda3-latest-MacOSX-arm64.sh #can "yes" to activate, but we will deactivate # do not automatically activate on startup conda config --set auto_activate_base false # initialize for tcsh (it will write code into one's .tcshrc file) /Users/mwolff/miniconda3/bin/conda init tcsh
It is recommended that one use virtual environments, and alias the environment activation for simplicity. The following section is to install pyferret in virtual environment called FERRET.
Note: the pyferret command from the official site did NOT work for me. It complained about not finding the needed packages. For reference, this command was
# line below did not work. it is here for reference conda create -n FERRET -c conda-forge pyferret ferret_datasets --yes
Instead, use the following instead:
conda create -n FERRET -c conda-forge/osx-64 pyferret ferret_datasets --yes
This can be actived using an alias for brevity. In (t)csh world, this would be
alias FERRET "conda activate FERRET"