National Scientific Library at Tbilisi State University

Slides:



Advertisements
Similar presentations
Overview of programming in C C is a fast, efficient, flexible programming language Paradigm: C is procedural (like Fortran, Pascal), not object oriented.
Advertisements

Introducing JavaScript
The NCAR Command Language (NCL) and the NetCDF Data Format Research Tools Presentation Matthew Janiga 10/30/2012.
Introduction to Unix – CS 21 Lecture 11. Lecture Overview Shell Programming Variable Discussion Command line parameters Arithmetic Discussion Control.
Working with JavaScript. 2 Objectives Introducing JavaScript Inserting JavaScript into a Web Page File Writing Output to the Web Page Working with Variables.
CS-341 Dick Steflik Introduction. C++ General purpose programming language A superset of C (except for minor details) provides new flexible ways for defining.
Perl Lecture #1 Scripting Languages Fall Perl Practical Extraction and Report Language -created by Larry Wall -- mid – 1980’s –needed a quick language.
Guide To UNIX Using Linux Third Edition
JavaScript, Third Edition
Baburao Kamble (Ph.D) University of Nebraska-Lincoln Data Analysis Using R Week2: Data Structure, Types and Manipulation in R.
Shell Scripting Awk (part1) Awk Programming Language standard unix language that is geared for text processing and creating formatted reports but it.
The NCAR Command Language (NCL) Ethan Alpert Visualization and Enabling Technologies Section, SCD, NCAR.
Introduction to FORTRAN
WRF Post-Processing Wei Wang and Bill Skamarock NCAR/MMM Ethan Alpert (NCAR/SCD)
CIS Computer Programming Logic
Expressions creating information. topics  operators: precedence, associativity, parentheses, overloading  operands: side-effects, coercion  arithmetic,
General Computer Science for Engineers CISC 106 Lecture 02 Dr. John Cavazos Computer and Information Sciences 09/03/2010.
Computational Methods of Scientific Programming Lecturers Thomas A Herring, Room A, Chris Hill, Room ,
TUTORIAL 10: PROGRAMMING WITH JAVASCRIPT Session 2: What is JavaScript?
Scientific Computing Division A tutorial Introduction to Fortran Siddhartha Ghosh Consulting Services Group.
Slides based on lectures from the NCL workshop Also see the NCL homepage.
Shell Programming. Introducing UNIX Shells  Shell is also a programming language and provides various features like variables, branching, looping and.
1 System Administration Introduction to Scripting, Perl Session 3 – Sat 10 Nov 2007 References:  chapter 1, The Unix Programming Environment, Kernighan.
CSC 352– Unix Programming, Spring 2015 March 2015 Shell Programming (Highlights only)
The information contained in this document pertains to software products and services that are subject to the controls of the Export Administration Regulations.
Property of Jack Wilson, Cerritos College1 CIS Computer Programming Logic Programming Concepts Overview prepared by Jack Wilson Cerritos College.
Introduction to Perl Yupu Liang cbio at MSKCC
Geog Basic Skills in Scientific Programming Syllabus, Introduction, Fundamentals of IDL Syntax.
Perl: Lecture 1 The language. What Perl is Merger of Unix tools – Very popular under UNIX – shell, sed, awk Programming language – C syntax Scripting.
Chapter 10: BASH Shell Scripting Fun with fi. In this chapter … Control structures File descriptors Variables.
XP Tutorial 10New Perspectives on HTML and XHTML, Comprehensive 1 Working with JavaScript Creating a Programmable Web Page for North Pole Novelties Tutorial.
(A Very Short) Introduction to Shell Scripts CSCI N321 – System and Network Administration Copyright © 2000, 2003 by Scott Orr and the Trustees of Indiana.
©Colin Jamison 2004 Shell scripting in Linux Colin Jamison.
Eurasia Institute of Earth Sciences Istanbul Technical University NCL Introduction Deniz Bozkurt web.itu.edu.tr/bozkurtd ITU Eurasia Institute of Earth.
Shell Programming Features “Full” programming language “Full” programming language Conditional statements Conditional statements Arithmetic, String, File,
Post Processing Tools Sylvia Murphy National Center for Atmospheric Research.
SCD User Briefing NCL and PyNGL Visualization for the Geosciences Don Middleton with presentation material developed by Luca Cinquini, Mary Haley, Fred.
Postgraduate Computing Lectures PAW 1 PAW: Physicist Analysis Workstation What is PAW? –A tool to display and manipulate data. Learning PAW –See ref. in.
PERL By C. Shing ITEC Dept Radford University. Objectives Understand the history Understand constants and variables Understand operators Understand control.
Review A program is… a set of instructions that tell a computer what to do. Programs can also be called… software. Hardware refers to… the physical components.
1-2 What is the Matlab environment? How can you create vectors ? What does the colon : operator do? How does the use of the built-in linspace function.
Wei Wang and Bill Skamarock NCAR/MMM Ethan Alpert (NCAR/SCD)
PHP using MySQL Database for Web Development (part II)
Web Database Programming Using PHP
Definition of the Programming Language CPRL
CSC 352– Unix Programming, Spring 2016, Final Exam Guide
Ruby Getting started & Ruby.New Presented by Mario Tayah
Moving from HDF4 to HDF5/netCDF-4
CSC 352– Unix Programming, Fall 2012
Web Database Programming Using PHP
MatLab Programming By Kishan Kathiriya.
National Scientific Library at Tbilisi State University
PHP Introduction.
Control Structures: if Conditional
Use of Mathematics using Technology (Maltlab)
NetCDF and Scientific Data Standard
Control Structures: for & while Loops
PHP.
C++ Data Types Data Type
This is where R scripts will load
Web DB Programming: PHP
Practical work on NetCDF - CFPOINT
Tour of NCL Website Modified by R. Grotjahn
This is where R scripts will load
CSC 352– Unix Programming, Fall, 2011
NCL variable based on a netCDF variable model
The Selection Structure
Programming Languages and Paradigms
DATA TYPES AND OPERATIONS
Karan Thaker CS 265 Section 001
Presentation transcript:

National Scientific Library at Tbilisi State University Tools and software for the manipulation and visualization of WRF-Chem output. NCAR Command Language - NCL George Mikuchadze

NCAR Command Language - NCL NCL is an interpreted programming language – Array based algebraic operators – Unique netCDF data model – Traditional programming language constructs – Wide variety of graphics capabilities: Maps, Contours, XY, Vectors, Streamlines, labelbars, text, tickmarks as well as line, marker and polygon primatives Output to X, NCGM, PostScript Scripts available to convert to image formats NCL is available on most UNIX platforms. NCL can run in batch or interactive mode.

Many useful functions and procedures. Capable data processing environment with many useful functions. Strong and easy to use file I/O capability Publication quality 2D graphics w/ detailed maps Free!

How to install NCL Go to: www.ncl.ucar.edu/Download to download NCL Download binaries – Precompiled versions exist for Win 64; Debian 6, 7; RHEL 5, 6; MacOS 10 Unzip tar file in the installation directory – tar xzf ncl_ncarg-6.2.1.Linux_RHEL5.10_x86_64_gcc412.tar.gz -C /opt/ncarg-6.2.1 Set NCARG_ROOT environment variable: – setenv NCARG_ROOT /opt/ncarg-6.2.1 Or export NCARG_ROOT=/opt/ncarg-6.2.1 – set path = ( /usr/local/bin $PATH) Or export PATH==/opt/ncarg-6.2.1/bin:$PATH

NCL Reference Documentation Main reference documentation – www.ncl.ucar.edu/Document – All syntax and statements defined – Links to all procedures and functions – Basic overview of graphics – Usage tips – Information on importing FORTRAN – Information on supported data formats

Data Types Numeric Types double 64bits +/- ( 2.22507e-308 ) to (8.98846e+307) float 32bits +/- ( 1.175494e-38 ) to (1.701411e+38) long 32bits +/- ( 2.147483e+09 ) (64bit on SGI) integer 32bits +/- ( 2.147483e+09 ) short 16bits +/- ( 32767 ) byte 8bits ( 0 ) - ( 255 ) Non-numeric Types string character graphic file logical

Variables Based on the netCDF data model – Values, dimensions – Optionally: attributes, coordinate info (meta-data) 4 types of variables – Regular variables (in memory) – File variables (reference files) – Graphic variables (reference plots) – Lists (containers for one or more of the above variable types)

Attributes Descriptive info about a variable or file – Any data type but “file” and “list” data types; 1D req. Assigned and referenced using “@” character – opts@cnLineColor = "Blue" – opts@gsnContourLineThicknessesScale = 3.0 – opts@cnFillPalette = "WhiteBlueGreenYellowRed"

Dimensions Dimensions may be “named” – Provides an alternative way to reference subscripts Assigned with “!” character – Example T!0=“time” T!1=“lat” T!2=“lon” – Allows for dimension reordering T(lon|:,lat|:,time|:) – Used to assign coordinate variables

Coordinate Variables Allow for more intuitive selection – 1D arrays; monotonically increasing or decreasing – Can only be assigned to a named dimension – Assigned using “&” character opts@cnFillColors = (/0,13,25,61,73.85,97,109,121,133,145,157,169/)

Reading data from files For netCDF, HDF, GRIB – Use addfiles function a = addfile("wrfout_d01_2016-10-17_00:00:00","r") for single file wrffiles = systemfunc("ls wrfout_d01*") inpFiles = addfiles(wrffiles,"r") for many files a = inpFiles[0] K=a->variable For text – asciiread

Algebraic Operations Array based algebra Standard operators: -, ^, *, /, %, + Unique operators: %, #, <, > Logical operators: .eq., .ne., .le., .gt., .ge., .lt., .and., .xor., .or., .not. Dimensionality of operands must either match or be scalar Missing values are filtered out by identifying missing value with _FillValue attribute

Statements if - Requires a single scalar logical value (i.e. True or False) – multi-dimensional logical values must be reduce to single True or False value any - returns True if any of the input values are true all - returns True if all of the input values are true (excluding missing values) do - Do statements very similar to F77 do var = startval, endval [, stride] . . . end do do while(expression)

Statements assignment (=) – If left-hand-side undefined right-hand-side assigned to left-hand-side symbol – All dimension names, coordinate variables, and attributes copied or overwritten to left-hand-side – UNLESS right-hand-side enclosed in (/ ... /) Example: a = b ; dimensions, attributes, and coordinate variables as well as value copied a = (/b/) ; only value of b is copied If left-hand-side is defined data types must match as well as dimensionality

Functions and procedures Parameters are “pass by reference” Support for definitions of NCL source based functions and procedures Example: function myfunc(x,y[*][*]:numeric) begin … end