# Presentation: 271667

## Practice 1Software for Analysis and Visualization: GRADS 

- José L. Hernández, PhD
- Computer Science and Mathematics Division
- P.O. Box 2008, MS 6016
- Oak Ridge, TN, 37830
- USA

## Introduction

- “If you can’t picture it
- 		you can’t understand it”
- 					*Albert Einstein*
- In science we need to obtain data, manipulate it, plot it, extract the information behind it and communicate our findings. Today we have effective software to create brilliant plots and animations, to convince others, to make decisions, to create strategies to answer questions or solve problems.

## Geosciences:Pushing ahead software for Analysis and Visualization

- Geoscientists require to handle, explore, analyze,  and discover specific trends, anomalies and behaviors in a wide variety of data.
- Create new data using mathematical tools:
- 	- Interpolation
- 	- Transform in new coordinates (map proj.)
- 	- Extract subsets
- Visualize, animate and inspire technical papers, proposal, web sites, etc

## Content

- Geoscientific Software for Analysis and Visualization
- GrADS Overview
- Why we use GRADS
- GRADS Tutorial
- 		Objective of this practice
- Couple Challenges
- 	- Scripts
- 	- Output plots

## Geoscientific Software for Analysis and Visualization

- We focus on portable, state of the art, free, and well documented software for analysis and visualization in climate sciences dealing with large multidimensional datasets.
**FERRET    **http://ferret.pmel.noaa.gov/Ferret/
- 		designed for oceanography and meteorology
**Unidata Software:** U S National Centers for Meteorology and Forecasting
- 	http://my.unidata.ucar.edu/content/software/index.html
**	****GEMPAK** forecast and analysis products.
**	****McIDAS**: Satellite image processing of data.
**	****Unidata IDV**: A meteorologically oriented, that emphasizes interactive 3D visualization

**Notes:**
UNIDATA (supported by NSF, NCAR, UCAR ”University corporation fro atmos. Research” ) Multidisciplinary from its origins in 1983, the community hosts participants from atmospheric science, hydrology, oceanography, climatology, engineering, and environmental science among other disciplines; though its primary focus is meteorology. 

## GRADS: http://www.iges.org/grads/Grid Analysis and Display System

**Overview**
- GRADS is an interactive tool, tested in many platforms (PC, workstations “32bits” and high performance syst.) and operative systems (windows, linux, unix, DEC, SUN, etc)
- It is currently in use worldwide for analysis and display of Earth science data.
- It is freely available
- Handle gridded and station data in 4-Dim
- Command line, scripting or interactively
- Formats: binary, GRIB, NetCDF, HDF,
- Website, downloads, user distribution list

## GRADSWhy we use it?

- In addition to those pointed in the overview (my personal opinion) GRADS is very friendly program and relatively easy to use.
- For our purpose in this workshop we need to deal with model output data and station data to explore possible connections between processes and relationships among variables.
- Intercomparison of several variables, datasets, time series, is greatly facilitated.
- The GRADS user mail list allow to contact experienced geoscientists and programmers making easy the life when problems arise.

## GRADS Tutorial

- OBJECTIVE
-    This document presents a brief tutorial for Brian Doty's _[Grid Analysis and Display System (](http://grads.iges.org/grads)__[GrADS](http://grads.iges.org/grads)__[)](http://grads.iges.org/grads)_. The following sample session will give you a feeling for how to use the basic capabilities of GrADS.
- _[start](file:///GRADS_Tutorial.doc)_

## Couple Challenges

- Now you know what GrADS is, but we need experience.
- You need to make routines or scripts that incorporate several commands to display multiple variables, times, levels, or to carry out computations.
- I’ll show you one script, and you do the rest.
- Write a text using “gvi”. Type in your prompt
- 		$ gvi script1_lndsc.gs
- 	it will open a text editor under linux. If “gvi” doesn’t work use “vi” instead.

## Script

- Type “i” (insertion) and write command lines as you did in the tutorial.
- To correct use backspace.
- When typing is done hit “esc” key.
- To save hit  simultaneously “shift” and “:” then type “w”. To save and quit type “wq”.
- Next example how look a scrip and its actual output plot
- 			_[Script1_lndsc.doc](file:///Script1_lndsc.doc)_
- Now show me what you learnt in
- 			Script2_portrait.doc

## Grads output plot

- To end a sesion of grads type “quit”.
- An output called script1_lndsc.gx was generated when we run script1_lndsc.gs
- We can generate a postcript file doing:
-     gxeps –c –i script1_lndsc.gx –o script1_lndsc.ps
- That could be inserted in a document, presentation, etc

## The output plot