Install UVCDAT 1.5.1 in Ubuntu 16.04

If we are extracting uvcdat-1.5.1 in Ubuntu 16.04 it may not work properly and throw below error.

ImportError: librtmp.so.0: cannot open shared object file: No such file or directory

By linking the following we can solve the issue

$ locate librtmp.so
/usr/lib/x86_64-linux-gnu/librtmp.so
/usr/lib/x86_64-linux-gnu/librtmp.so.1

$ sudo ln -s /usr/lib/x86_64-linux-gnu/librtmp.so /usr/lib/librtmp.so.0

Posted in Uncategorized | 1 Comment

2015 in review

The WordPress.com stats helper monkeys prepared a 2015 annual report for this blog.

Here’s an excerpt:

The concert hall at the Sydney Opera House holds 2,700 people. This blog was viewed about 12,000 times in 2015. If it were a concert at Sydney Opera House, it would take about 4 sold-out performances for that many people to see it.

Click here to see the complete report.

Posted in Uncategorized | Leave a comment

How to install ESMF and ESMFPy in Ubuntu using gfortran, gcc, python

Dear All,

Lets see the procedure on how to install ESMF and ESMFPy package using gcc, gfotran, Ubuntu and Python.

You can read more about ESMF https://www.earthsystemcog.org/projects/esmf/

I downloaded esmf_6_3_0rp1_src.tar.gz file from here.

I used Ubuntu 14.04 LTS 64-bit OS to install the ESMF and ESMFPy package.

Login as root, sudo may not work if your target installation path would be /usr/local.

After extracted the above said package then go to that directory.


# root@Ocean:/home/tuxcoder/esmf

Copy paste the following environmental variables in your terminal.

NOTE : you have to change the source directory as per your system path. i.e. ESMF_DIR.

Then you have to provide netcdf4 include path. If you didnt install netcdf4 already then you may read my previous post here.

export ESMF_DIR=/home/tuxcoder/esmf
export ESMF_INSTALL_PREFIX=/usr/local/esmf
export ESMF_OS=Linux
export ESMF_NETCDF="local"
export ESMF_COMM=mpiuni
export ESMF_F90COMPILER=gfortran
export ESMF_CXXCOMPILER=g++
export ESMF_TESTEXHAUSTIVE=on
export ESMF_TESTSHAREDOBJ=on
export ESMF_NETCDF_INCLUDE=/usr/local/netcdf4/include
export ESMF_NETCDF_LIBS="-lnetcdf -lnetcdff"
export ESMF_NETCDF_LIBPATH=/usr/local/netcdf4/lib
export ESMF_BOPT=O3

After exported all the above environmental variables, then you can do make all followed by make install.


# make all

# make install

# make installcheck

Now we installed ESMF package in our system.

Lets install ESMFPy in our system python by pointing ESMF package by following steps.

# cd /home/tuxcoder/esmf/src/addon/ESMPy/

# python setup.py build --ESMFMKFILE=/usr/local/esmf/lib/libO3/Linux.gfortran.64.mpiuni.default/<a href="http://esmf.mk">esmf.mk</a>

# python setup.py install

Thats it! We successfully installed ESMF and ESMFPy in our gcc, gforatran, Linux based system.

To use ESMFPy, issue the following command.

tuxcoder@Ocean:~$ python
Python 2.7.6 (default, Jun 22 2015, 17:58:13)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import ESMF
>>>

Regards,

Arulalan.T

Posted in Atmosphere, Climate, Ocean, Python, Uncategorized | Tagged , , , , | 1 Comment

Release : txt2ipa converter v0.2 with Kannada Support

Dear All,

Today I am happy to release version V0.2 aakaara of txt2ipa converter in python.

What is new ? :

In this version V0.2 aakaara txt2ipa converter supports for Kannada Unicode to International Phonetic Alphabet (IPA) along with Tamil Unicode ! 🙂

Read about previous release here

txt2ipa Repo : https://github.com/arulalant/txt2ipa

Todo :

  • Add other Indian Languages for ipa converter
  • Any language to any language phonetic alphabet converter

Credits :

Thanks to Mr. Govardhan Balaji who gave me Kannada to ipa map !

Regards,
Arulalan.T

Posted in Contribution, Release, Software, Tamil | Tagged , , , , , | 1 Comment

Install NetCdf4 with Hdf5 In Ubuntu Linux

Hai All,

I installed Netcdf4 along with Hdf5 in ubuntu 14.04 LTS 64-bit.

You can follow the below steps to do the same.

szip

Download latest source of zlib from here http://www.zlib.net/ and install it
by

$ ./configure; make; sudo make install

Download szip from http://www.hdfgroup.org/ftp/lib-external/szip/2.1/src/szip-2.1.tar.gz

and extract it.

$ ./configure --prefix=/usr/local/szip
$ make; sudo make install

HDF5

We need to find the path of POSIX to enable threads in hdf configuration.

In the configure of hdf5,  –with-pthread option must point to the directory that contains the POSIX Threads library install ([DIR]/includes/pthread.h, [DIR]/lib/libpthread*)

So lets locate it as shown below.

$ locate pthread.h -> /usr/include/
$ locate libpthread.a -> /usr/lib/x86_64-linux-gnu/
$ locate libpthread.so -> /usr/lib/x86_64-linux-gnu/

Download hdf5 latest source from http://www.hdfgroup.org/HDF5/release/obtainsrc.html

I downloaded http://www.hdfgroup.org/ftp/HDF5/current/src/hdf5-1.8.13.tar.bz2

and extract it and then go inside

$ ./configure --prefix=/usr/local/hdf5 --enable-fortran --enable-cxx --with-szlib=/usr/local/szip --enable-threadsafe --with-pthread=/usr/include/,/usr/lib/x86_64-linux-gnu/ --enable-hl --enable-shared --enable-unsupported

Note 1: In above configuration removed –enable-parallel, since it gives error on “mpi.h” while doing make.

Note 2: More over ROMS forum suggest that parallel netCDF will not improve much scaleup on model speedup. so lets go with single mode as for now.

SUMMARY OF THE HDF5 CONFIGURATION
========================

General Information:
——————-
HDF5 Version: 1.8.13
Configured on: Mon Feb 2 10:55:19 IST 2015
Configured by: tuxcoder@Ocean
Configure mode: production
Host system: x86_64-unknown-linux-gnu
Uname information: Linux Ocean 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
Byte sex: little-endian
Libraries: static, shared
Installation point: /usr/local/hdf5

Compiling Options:
——————
Compilation Mode: production
C Compiler: /usr/bin/gcc
CFLAGS:
H5_CFLAGS: -std=c99 -pedantic -Wall -Wextra -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align -Wwrite-strings -Wconversion -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wnested-externs -Winline -Wfloat-equal -Wmissing-format-attribute -Wmissing-noreturn -Wpacked -Wdisabled-optimization -Wformat=2 -Wunreachable-code -Wendif-labels -Wdeclaration-after-statement -Wold-style-definition -Winvalid-pch -Wvariadic-macros -Winit-self -Wmissing-include-dirs -Wswitch-default -Wswitch-enum -Wunused-macros -Wunsafe-loop-optimizations -Wc++-compat -Wstrict-overflow -Wlogical-op -Wlarger-than=2048 -Wvla -Wsync-nand -Wframe-larger-than=16384 -Wpacked-bitfield-compat -Wstrict-overflow=5 -Wjump-misses-init -Wunsuffixed-float-constants -Wdouble-promotion -Wsuggest-attribute=const -Wtrampolines -Wstack-usage=8192 -Wvector-operation-performance -Wsuggest-attribute=pure -Wsuggest-attribute=noreturn -Wsuggest-attribute=format -O3 -fomit-frame-pointer -finline-functions
AM_CFLAGS:
CPPFLAGS:
H5_CPPFLAGS: -D_POSIX_C_SOURCE=199506L -DNDEBUG -UH5_DEBUG_API
AM_CPPFLAGS: -I/usr/include/ -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_BSD_SOURCE
Shared C Library: yes
Static C Library: yes
Statically Linked Executables: no
LDFLAGS:
H5_LDFLAGS:
AM_LDFLAGS: -L/usr/local/szip/lib -L/usr/lib/x86_64-linux-gnu/
Extra libraries: -lpthread -lz -ldl -lm
Archiver: ar
Ranlib: ranlib
Debugged Packages:
API Tracing: no

Languages:
———-
Fortran: yes
Fortran Compiler: /usr/bin/gfortran
Fortran 2003 Compiler: no
Fortran Flags:
H5 Fortran Flags:
AM Fortran Flags:
Shared Fortran Library: yes
Static Fortran Library: yes

C++: yes
C++ Compiler: /usr/bin/g++
C++ Flags:
H5 C++ Flags:
AM C++ Flags:
Shared C++ Library: yes
Static C++ Library: yes

Features:
———
Parallel HDF5: no
High Level library: yes
Threadsafety: yes
Default API Mapping: v18
With Deprecated Public Symbols: yes
I/O filters (external): deflate(zlib)
I/O filters (internal): shuffle,fletcher32,nbit,scaleoffset
MPE: no
Direct VFD: no
dmalloc: no
Clear file buffers before write: yes
Using memory checker: no
Function Stack Tracing: no
Strict File Format Checks: no
Optimization Instrumentation: no
Large File Support (LFS): yes

$ make
$ sudo make install

NetCdf4

Download latest netcdf from http://www.unidata.ucar.edu/downloads/netcdf/index.jsp

I downloaded netcdf-4.3.2 from here

extract it and go inside it.

$ CPPFLAGS="-I/usr/local/szip/include -I/usr/local/hdf5/include" 
LDFLAGS="-L/usr/local/szip/lib -L/usr/local/hdf5/lib" 
./configure --prefix=/usr/local/netcdf4 --enable-netcdf-4 --enable-shared
$ make
$ make check

================================================
Testsuite summary for netCDF 4.3.2
================================================
# TOTAL: 2
# PASS: 2
# SKIP: 0
# XFAIL: 0
# FAIL: 0
# XPASS: 0
# ERROR: 0
================================================

$ sudo make install

Thats’ it!

Posted in Uncategorized | 9 Comments

Install WRF model in Ubuntu Linux

Dear All,

Here I am going to explain the very simple steps to install The Weather Research & Forecasting Model (WRF) model in Ubuntu or any Linux Distributions.

$ sudo apt-get install m4 csh netcdf-bin hdf4-tools hdf5-tools zlib* jasper libpng-dev build-essential ncl-ncarg gcc gfortran libnetcdf-dev mpich

$ sudo updatedb

$ locate netcdf.inc
/usr/include/netcdf.inc

Here we got path where netcdf.inc file present and then we need export the path (till before include directory) to NETCDF environment variable in home .bashrc .

In some machines, it may be /usr/local/include/netcdf.inc, in which case export NETCDF directory path upto /usr/local/ .

Add the following lines in your home .bashrc

$ vim ~/.bashrc

# WRF SETTINGS
export NETCDF=/usr
export WRFIO_NCD_LARGE_FILE_SUPPORT=1

Save it !

$ source ~/.bashrc

Download latest WRF model sources from http://www2.mmm.ucar.edu/wrf/users/download/get_sources.html

I downloaded v3.6.1 WRF-ARW and WPS and extracted.

$ cd WRFV3

$ ./configure

Select option relevant to your system linux configuration (like i386 or x64_86), fortran type (like gfortran or ifort or pgfortran) and processors (like parallel or serial).

Select GNU GCC option if you want to use GNU GCC compiler!

and

select model support option (like 1 for basic which I chosed)

$ ./compile em_real

Read the README file of WRFV3 to know more options to compile model.

$ cd ..

$ cd WPS

$ ./configure

Select option relevant to your system linux configuration (like i386 or x64_86), fortran type (like gfortran or ifort or pgfortran) and Grib type (like 1 or 2).

$ ./compile

Read the README files of WPS to compile further with plotting tools (like NCL).

Done !

PS: This compilation progress need atleast 2 GB RAM without swap, or maybe 512 MB RAM + SWAP 2 GB


Regards,
Arulalan.T
Project Associate
Centre for Atmospheric Sciences
Indian Institute of Technology Delhi

My Experiments In Gnu/Linux ! : https://tuxcoder.wordpress.com

Posted in Atmosphere, Climate, Software, Ubuntu | Tagged , , , , , , | 14 Comments

2014 in review

The WordPress.com stats helper monkeys prepared a 2014 annual report for this blog.

Here’s an excerpt:

The concert hall at the Sydney Opera House holds 2,700 people. This blog was viewed about 19,000 times in 2014. If it were a concert at Sydney Opera House, it would take about 7 sold-out performances for that many people to see it.

Click here to see the complete report.

Posted in Uncategorized | Leave a comment

sed command to replace string in all sub folders text files

This will replace all occurrences of "text1" into "text2" of all text files within all multiple sub level folders in current folder.

$ find ./ -type f | xargs sed -i ‘s/text1/text2/g’

f meant for text files

-i option for replace the strings in the txt files and overwrite it.

‘s/text1/text2/g’ in this option,
s -> string,

text1 -> old string
text2 -> new string
g -> global, this is essential if we need to replace all the occurrences in the same input file.

Posted in Uncategorized | 1 Comment

Hurricane Vs Cyclone Vs Typhoon

What is the difference between a hurricane, a cyclone, and a typhoon?

The only difference between a hurricane, a cyclone, and a typhoon is the location where the storm occurs.
The hurricanes, cyclones, and typhoons are all the same weather phenomenon. Scientists just call these storms different things depending on where they occur.

In the Atlantic and northern Pacific, the storms are called "hurricanes," after the Caribbean god of evil, named Hurrican.

In the northwestern Pacific, the same powerful storms are called "typhoons."

In the southeastern Indian Ocean and southwestern Pacific, they are called "severe tropical cyclones."

In the northern Indian Ocean, they’re called "severe cyclonic storms."

In the southwestern Indian Ocean, they’re just "tropical cyclones."

To be classified as a hurricane, typhoon, or cyclone, a storm must reach wind speeds of at least 74 miles per hour (119 kilometers per hour).

In the Atlantic, hurricane season officially runs June 1 to November 30. However, while 97 percent of tropical activity occurs during this time period, there is nothing magical in these dates, and hurricanes have occurred outside of these six months.

Sources :

http://oceanservice.noaa.gov/facts/cyclone.html

http://news.nationalgeographic.com/news/2013/09/130923-typhoon-hurricane-cyclone-primer-natural-disaster/

Posted in Uncategorized | 1 Comment

How to plot transparent lines / shades in xmgrace / UVCDAT / pygrace

Dear All,

Problem :

How to plot transparent lines or shaded region in xmgrace ?

For example, look at the below plot.

​

Solution :

I had to plot transparent lines in xmgrace wherever overlaps occurs.

In Grace / xmgrace there is no transparent setting.

https://github.com/pygrace/pygrace/issues/4 suggest 3 ways to achieve this.

I took the 2nd option such as “create three different regions“.
i.e.
1. Regions of Overlap between two data sets a & b
2. Only data set a excluding overlap
3. Only data set b excluding overlap

I written the function “getOverlap
Source :  https://gist.github.com/arulalant/b7a1cef170a2e25571f7

Now see the below plot and compare with the above one, you can see different color in the overlap regions.

Result Plot:
Same plot with overlap region with different color (chosen between red and black color)

​

Same getOverlap function useful to plot the shaded overlap region also.

To set custom RGB color in grace look my previous post here

 

Regards,
Arulalan.T

Posted in xmgrace | Tagged , , , , , , , | Leave a comment