Plotting Package Installation
The ROMS/TOMS Plotting package is a collection of Fortran programs for visualizing ROMS model output. It can be used to create publication quality, vector graphics. The ncgm2www script is provided to facilitate raster images and animations.
|Plotting Package Menu|
|2. Contour Plots|
|3. Cross-section Plots|
|4. Internal Plotting Parameters|
|5. Plotting Options|
|6. Plotting Fields|
|7. Raster Scripts|
- NCAR Graphics (now part of NCL)
- GNU Make
- Fortran 77 Compiler
- ImageMagick (If you plan to make raster images or animations)
The ROMS/TOMS Plotting Package is distributed via an SVN repository. For more information about SVN and ROMS read the Subversion page. To 'checkout' the plotting package source code issue the subversion command:
svn checkout https://www.myroms.org/svn/src/plot MyDir
If your user name on your local machine is not the same as your ROMS user name you may need to add the --username option.
svn checkout --username joeroms https://www.myroms.org/svn/src/plot MyDir
You should check the user-defined options section of the makefile and edit the macro variables as needed. Below you will find a short description of each macro variable in each section.
If set, this option will set the proper debugging compiler flag. This option is mostly used by developers and will add a 'G' to the resulting executable names (ccntG, cntG, csecG, and secG) so they will not replace the standard executables.
If set, this option will activate 64-bit compilation. Use this flag if you downloaded or compiled NCAR Graphics in 64-bit mode.
FORT ?= g77
This macro must be set to the name of your compiler. This macro tells make what compiler file to include. To see what options are available look in the Compilers directory. The files are named <OS>-<compiler>.mk so the Linux-g77.mk file is for compiling on Linux using the g77 Fortran compiler (make will automatically detect your operating system). If your OS/compiler combination is not there you can create your own. The <OS> portion of the filename is derived from the result of the uname -s command and the <compiler> portion will be whatever you set FORT to.
If you downloaded a binary distribution of NCL you will need to use the same compiler that was used to make that NCL build. For Example, if you installed the 64-bit binary for x86_64 chips for Linux compiled with gcc 3.x you would want to use the gcc 3.x g77 compiler. If you built NCL from source you should use the same compiler and flags to build the ROMS Plotting Package.
NCAR_VERSION ?= NCARG441
You should only have to modify this option if you have a very old version of NCAR Graphics installed. For the Current 5.0.0 release of NCL leave this macro variable set to 'NCARG441'. This option changes the way calls to the NCARG libraries are made.
PLT_BINDIR ?= $(HOME)/bin
Set this option to the path where you want the plotting executables (ccnt, cnt, csec, and sec) to be installed.
Machine Dependent Include File
Next you should check the paths and options of the machine dependent include file you chose with the FORT macro variable in the makefile. In particular you should check that LD points to the correct ncargf90 and that NETCDF_INCDIR and NETCDF_LIBDIR are set correctly. It is important that your NetCDF libraries are compatible with your NCL install. The most common compatibility issue is the infamous second underscore problem. A simple google search will tell you more than you wish to know on this subject as will a search in the ROMS forum. The binary distributions of NCL 5.0.0 appear to have been built with the -fno-second-underscore compiler option set where applicable.
The last thing to check is FFLAGS. You may have to experiment with these to get the ROMS Plotting Package to compile. For example, if you installed the 64-bit binary for x86_64 chips for Linux compiled with gcc 3.x you would would want to add -fno-second_underscore to FFLAGS in the Linux-g77.mk file.
NOTE: If you are running ROMS it is likely that your NetCDF library is already built with single underscores at the end of symbol names.
Make sure you are in the src directory and issue the make command. If the process is successful you will have ccnt, cnt, csec, and sec executables in your PLT_BINDIR directory. Both cnt and sec are the contour only black and white versions of ccnt and csec respectively. If you need a grayscale plot use ccnt/csec with one of the provided "grey" palettes.