How to insatll clim.pact inside R path in Ubuntu

Dear All,

To install clim.pact packages inside our R path follow the below steps.

Step 0 : Install R
********************
Download latest R source tar ball from http://cran.r-project.org/sources.html and extract it.

Then go inside to that directory and run the following three commands as root or sudo user.

$ ./configure
$ make
$ sudo make install

Step 1 : Install Dependencies
**********************************

We need "ncdf" & "akima" additional packages to be installed inside R.

To install ncdf correctly we need to install the following packages in our machine.

In Ubuntu follow the below step.

$ apt-get install libnetcdf-dev udunits-bin libudunits2-dev

Then type R command in terminal

$ R
> install.packages(‘akima’)

> install.packages(‘ncdf’)

Choose any one of the country to select mirror and download, install the corresponding packages inside R.

Step 2 : Install clim.pact package inside R

***************************************************

Download latest ‘clim.pact’ tar ball from http://cran.r-project.org/src/contrib/Archive/clim.pact/

Then go to the downloaded directory in terminal then issue the following command.

$ sudo R CMD INSTALL clim.pact_2.3-10.tar.gz

or

$ su
# R CMD INSTALL clim.pact_2.3-10.tar.gz

Thats it. We installed clim.pact package successfully inside our R path.

Note : In the file name specify the downloaded version clim.pack_version.tar.gz

Step 3 : Test
***************
Go to R shell command and load ‘clim.pact’ package as follows.

$ R
> library(clim.pact)
Loading required package: ncdf
Loading required package: akima

Enjoy !

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

Posted in Uncategorized | Tagged , , | 3 Comments

Steps to Access Github Repository Under IIT Proxy

Hai,

Follow the below steps in your linux machine to create git repository and push to your remote github account repository.

I am pulling/pushing the github commits under IIT Delhi proxy. If you have proxy, then change the proxy address and port no according to yours.

$ su root

step 0: Login as root and enable/set http_proxy and all.

# vim /root/.bashrc

export http_proxy=http://proxy62.iitd.ernet.in:3128/
export https_proxy=http://proxy62.iitd.ernet.in:3128/
export ftp_proxy=http://proxy62.iitd.ernet.in:3128/

add the above lines. Also go to Network proxy settings in your ubuntu and set the system proxy as above.

step 1 :

# git config –global http.proxy http://proxy62.iitd.ernet.in:3128

# git config –global https.proxy http://proxy62.iitd.ernet.in:3128

# cat ~/.gitconfig

Add your laptop ssh public key to your github account
step 2 : https://help.github.com/articles/generating-ssh-keys

step 3 : Create a repo in github account
https://help.github.com/articles/create-a-repo

step 4 : add files to your local repo then do commit

pull the changes you made in the README.md file of github account.

step 5 : # git pull origin master

push your changed which you made locally to the remote ‘origin’ [github acc] to ‘master’ branch.
step 6: # git push origin master

it will ask username of github and passwd. enter username [arulalant] itself, no need to enter as login email id.

Its works fine for me.
https://github.com/arulalant/

Now I can release all my development code as well as fun code. :-)

Posted in Uncategorized | Leave a comment

Conducted PythonMonth Workshop at Jamia Millia Islamia University, New Delhi

Hi All,

Volunteers from NCR region for PythonMonth conducted the third PythonMonth workshop at Jamia Millia Islamia University, New Delhi on 24.08.2013, it was received well.

A special thanks to Konark, Akif, Anshul, Aniket and all the other student volunteers who helped co-ordinate the whole workshop at the college.

A brief about the workshop :

Instructor : Arulalan.T (myself)
Volunteers for Hands-On session : Satyaakam Goswami, Akif Khan, Anshul, Saurabh Kumar + Lot of helping hands, thank you everybody.

Content of the workshop : http://www.slideshare.net/arulalan/python-anintropythonmonth2013-24875864, along with project showcase by Satyaakam and Aniket

There were about 50-60 students who were given hands-on session on python.

Google+ Album: https://plus.google.com/u/0/photos/115577985358125648809/albums/5915669559988489185

The overall feedback was collected, and reading the survey results seems that workshop has made a positive impact.

:-)

Posted in Uncategorized | Leave a comment

Conducted Python Workshop in IIC, DU, South Campus – Python Month 2013

Greetings to all.,

This August (2013) is the Python Month in India.
I already conducted python workshop in IIT Delhi, to the Centre for Atmospheric Science Students in July itself.

We volunteers from NCR region for PythonMonth conducted the first PythonMonth workshop at IIC(South Campus, Delhi) on 02.08.2013, it was received well.

A brief about the workshop :

Instructor : Mr. Arulalan.T ( Project Associate at Indian Institute of Technology) [myself]
Volunteers for Hands-On session :
Piyush Kumar
Mahesh Salaria
Satyakaam Goswami
Konark Modi

Content of the workshop : http://www.slideshare.net/arulalan/python-anintropythonmonth2013-24875864

There were about 50 students who were given hands-on session on python.

Flickr stream : http://www.flickr.com/photos/72425757@N07/sets/72157634903856268

The overall feedback was collected using survey monkey, and reading the survey results seems that workshop has made a positive impact.

I thank the python month teams those who initiated and organized the workshop.

Next python workshop is going to be held in Amity Unitversity, Noida on coming saturday 10.08.2013.

Thanks.

Posted in Uncategorized | Leave a comment

hdd quota control through webmin – GUI – Linux – Ubuntu

Dear All,

Here I documented about how to control/set the hard disk / home space quota to each users, groups through webmin gui.

You may get so many documents on how to do the same in command line itself.

Here we go !!!

1. Enable quota check on filesystem

First, you should specify which filesystem are allowed for quota check.

Modify the /etc/fstab, and add the keyword usrquota and grpquota to the corresponding filesystem that you would like to monitor.

The following example indicates that both user and group quota check is enabled on /home filesystem

# vim /etc/fstab
UUID=4ea80ca3-37b7-447e-831a-700a38627029 /home ext4 defaults,usrquota,grpquota 1 2 

or

 /dev/hda1 /home ext4 defaults,usrquota,grpquota 1 2

Reboot the server after the above change. While rebooting it will take some time (only one time) to enable usrquota, grpquota on the /home filesystem. So wait.

2. Initial quota check on Linux filesystem using quotacheck

Once you’ve enabled disk quota check on the filesystem, collect all quota information initially as shown below. For that you may need to install the following packages.

# apt-get install quota quotatool
# quotacheck -avug 
quotacheck: Scanning /dev/sda3 [/home] done 
quotacheck: Checked 5182 directories and 31566 files 
quotacheck: Old file not found. 
quotacheck: Old file not found.

In the above command:

  • a: Check all quota-enabled filesystem
  • v: Verbose mode
  • u: Check for user disk quota
  • g: Check for group disk quota

The above command will create a aquota file for user and group under the filesystem directory as shown below.

# ls /home/ 
aquota.user aquota.group
# quotaon -avug

3. Install webmin gui to control hdd quota for the users & groups

First install the dependencies as shown below

# apt-get install apt-show-versions

For Ubuntu 12.04 you can download the webmin deb file from the below link

http://sourceforge.net/projects/webadmin/files/webmin/1.620/webmin_1.620_all.deb/download

and install as follows

# dpkg -i webmin_1.620_all.deb

Once you installed you can access the webmin in your browser at either https://localhost:10000/ or it will give you hostname as like below.

https://arulalan:10000/

You can download other os distro binary and source files from the below link.

http://sourceforge.net/projects/webadmin/files/webmin/

4. Open webmin gui

now log into webmin & search ‘quota’ you should see a result called “Disk Quotas”

click on it and press enable quotas on /home

now u can create/set hdd quotas like soft, hart limits & grace time for each users, groups…

Soft limit : Actual size that you are allocating to the user/group
Grace time : Some grace period (seconds to days) you are allocating to allow the user to exceed the soft limit (upto grace period) but not hard limit.
Once they exceed the soft limit, then they have to revert back to less than their soft limit size within the allocated grace time period.
Hard limit : Hard limit that you are allocating to the user/group for the max size they can use at any most case. They can not exceed this limit at any time.

5. Notify the used home size & quota status report to the user when they login into the shell/terminal

Finally :-

add the below lines in the

# vim /etc/bash.bashrc

to show the users quota information with their limit & used space whenever they login to the shell/terminal.

echo "Your home directory quota information "
quota -us $USER
echo "Try to keep space < quota. You cant exceed the limit "

Have Fun !

Posted in Documentation, Linux, Ubuntu, Uncategorized, Web | Tagged , , , , , , , | Leave a comment

2012 in review

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

Here’s an excerpt:

4,329 films were submitted to the 2012 Cannes Film Festival. This blog had 18,000 views in 2012. If each view were a film, this blog would power 4 Film Festivals

Click here to see the complete report.

I couldn’t post my thoughts & codes in the past 6 months. :(.

I learned many new subjects in M.Tech Atmospheric Sciences.

Let me post those stuff in following days.

Happy new year to all. :-)

Regards,

Arulalan.T

Posted in Arulalan | Leave a comment

2011 in review

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

Here’s an excerpt:

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

Click here to see the complete report.

Posted in Uncategorized | Leave a comment

About MetPy (ECMWF)

Dear Friends,

I have read about the MetPy from the ECMWF http://www.ecmwf.int/ .

MetPy = Meteorological Python

Few words about ECMWF :

They are using

  • Perl language to created web application to serve the auto generated plots for both intranet & internet (in the above link)
  • Python language to do diagnostics
  • Magics or MetView to do plot
  • Serving around 24,000 images per day

Few words about MetPy :

A high level library called MetPy is being

developed. It currently offers:

  • an abstract definition of meteorological data and fields,
  • GRIB decoding, coding and field computation,
  • Field sorting and indexing,
  • ODB access using its NetCDF file export facility,
  • core score computing (rmse, ancf, stddev, mean), on a weighed grid and limited areas,
  • access to Verify scores (backwards compatibility) ,
  • interface with Magics,
  • interface with PCMS,
  • everything available in open source.

Example Program of MetPy usage :

>>> from MetPy import *

>>> an = FieldSet( ‘an.grib’ )
>>> fc = FieldSet( ‘fc.grib’ )
>>> cl = FieldSet( ‘climatology.grib’ )
>>> bi = FieldSet( ‘biases.grib’ )

>>> scores = Scores( fc-cl+bi,
an-cl,
area = verify_config[ 'europe' ] )

>>> print scores.correlation( )

>>> print scores.rmse( )

Few Application of MetPy :

  • Currently a typical experiment diagnostics is being written on ocean data.
  • compare ocean observation profiles with experiment fields and generate statistics.

MetPy Utilities :

  • The Date class is a primordial building block as computations on dates are always needed particularly in diagnostics & verification.
  • Configuration tools are also important, once your library can read configuration files with sufficient flexibility, you can introduce parametrisation from the begin-ning of any new development.

MetPy Source Link :

https://github.com/pmarshwx/MetPy

Presentation Link :
It contains about ECMWF & little core about MetPy

http://www.ecmwf.int/newsevents/meetings/workshops/2003/9th_Meteorological_Operational_Systems/presentations/Gibert.pdf

http://synopticview.co.uk/WhitePapers/metpy/

Conclusion :

  • MetPy Meteo France also installed & running the MetPy.
  • MetPy module has Fields, FieldSet, Ensemble, FieldIndex, Diagnostics.

I couldnt understand few meteorological terms in the MetPy. So I couldnt realize the more power of it.

What I understood from the example is metpy can calculate Scores, correlation, rmse & etc.,

I will post the CDAT Vs MetPy in upcoming posts in my blog.

Thanks.

Arulalan.T

Posted in Uncategorized | Leave a comment

Installing Sphinx inside the UV-CDAT (alpha)

Dear All,

I have face a problem that I can not install sphinx inside uv-cdat (alpha) python path.

Also I can not use easy_install of uv-cdat python, since it has some zlib library missing.

I hope uv-cdat team will fix all these issues soon.

Mean while we should learn how to use sphinx for our uv-cdat python modules.

Once we installed the sphinx correctly inside our system python,
then do the following steps.

* we can not install sphinx successfully inside the uv-cdat due to zlib version problem of uv-cdat.

Here is short route to work out the sphinx for uv-cdat modules….

Below is uv-cdat installed path in my machine.

*******************************************************

sys.path.append(‘/opt/uv-cdat/bin/’)
sys.path.append(‘/opt/uv-cdat/lib/python2.7/site-packages’)

*******************************************************

Add the above two sys.path.append lines in the following three system executable python scripts.

$ sudo gedit /usr/local/bin/sphinx-quickstart

$ sudo gedit /usr/local/bin/sphinx-autogen

$ sudo gedit /usr/local/bin/sphinx-build

Thats it.

Here after from the normal system executables sphinx-quickstart, sphinx-autogen, sphinx-build we can generate the sphinx index.html
of our uv-cdat (diagnosis) py modules.

We have to understand that we didnt installed sphinx inside the uv-cdat python path.

We just added the uv-cdat packages path into the system python path, while the above three executables running.

Enjoy.

By,

Arulalan.T
Dated : 13.12.2011

Posted in Uncategorized | Leave a comment