Skip to content
/ SysE Public

A collection of libraries for environmental analysis

Notifications You must be signed in to change notification settings

sajinh/SysE

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

# 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"

About

A collection of libraries for environmental analysis

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published