-
Notifications
You must be signed in to change notification settings - Fork 3
/
README
58 lines (40 loc) · 2.44 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# Using SysE
SySE is a collection of NCL libraries for the time being. I plan to eventually
make ruby bindings for the underlying C and fortran libraries, in the not too near unknown future :)
You need to install NCL. Download and install instructions are available at
http://www.ncl.ucar.edu/Download/install.shtml
## Define SysE in your environment
Open your .bashrc file and export SysE=$HOME/SysE
(here, it is assumed that you downloaded SysE directly under your home directory).
## Load the libraries from your ncl script
After this you may load the whole collection of libraries using the NCL load
command at the top of your scripts.
For instance,
load "$SysE/lib/ncl/helper_libs.ncl"
## Creating Fortran Shared Objects
Please run rake after this step from $SysE to recreate the fortran shared objects.
By default the rake file uses gfortran. You may change it to a compiler of your choice
by editing the variable FORTRAN_COMPILER at the top of the Rakefile. You may
also pass in compiler options through COMPILER_OPTS
## Command line utilities
To use some of the command line functions provided with this collection, please
add $SySE/bin to your $PATH variable
for example export PATH=$SysE/bin:$PATH
These utilities are
1. wrap_all.rb - a ruby alternative to the WRAPIT program supplied by NCL. This can
be used to compile Fortran sources for use with NCL. You can call it with
wrap_all.rb -f filename -c compiler --com_opts compiler_options
The last two arguments are optional, with gfortran as the default compiler
and -fPIC as the default compiler option.
2. ctl2ncl.rb - a ruby utility that generates the NCL needed to read a
binary file described using a Grads control (ctl) file.
ctl2ncl.rb -i CTLFILE -o NCLFILE -v vars -t time --plot
The first two options are required. The third and fourth option allows to select
variables and the time period of interest, respectively. The fourth option
lets you plot the data.
3. check_rogue_ncl_func.rb - Some time ago I made a mistake while writing NCL functions.
I had the bad habit of manipulating the arguments/parameters of the function. This
resulted in a few unpleasant surprises. I wrote this to catch these rogue functions.
Essentially it parses a given directory and checks if function parameters are modified
inside the function body. If that is true, it will write out a modified version of
the function in a separate file "org_filename_modified.ncl"