Sunday, June 7, 2009

Electromagnetic spectrum (wave length)

Solar radiation : 0.2 micrometer to 5 micrometer
Terrestrial radiation : 5 to 100 micrometer

note : 1000 nm = 1 micrometer


less than 100 nm : Photo-ionisation band : photo-ionisation of N2, O2, O gives molecular ions and free electron.

100 to 200 nm : photo-dissociation band : Photo dissociation of oxygen gives atomic oxygen.

200 to 280 nm : Ultraviolet-C : Absorption by oxygen molecule

280 to 320 nm : Ultraviolet-B : Absorption by ozone molecule

320 to 400 nm : Ultra violet-A : weak ultra violet

400 to -- nm : violet

-- to 450 nm : indigo

450 to 520 nm : blue

520 to 590 nm : green

590 to -- nm : yellow

-- to 620 nm : orange

620 to 680 nm : red

680 to 1100 nm : near-infrared

Infrared


CIE division scheme of Infrared

The International Commission on Illumination (CIE) recommended the division of optical radiation into the following three bands:

  • IR-A: 700 nm–1400 nm
  • IR-B: 1400 nm–3000 nm
  • IR-C: 3000 nm–1 mm

A commonly used sub-division scheme is:

  • Near-infrared (NIR, IR-A DIN): 0.75-1.4 µm in wavelength, defined by the water absorption, and commonly used in fiber optic telecommunication because of low attenuation losses in the SiO2 glass (silica) medium. Image intensifiers are sensitive to this area of the spectrum. Examples include night vision devices such as night vision goggles.
  • Short-wavelength infrared (SWIR, IR-B DIN): 1.4-3 µm, water absorption increases significantly at 1,450 nm. The 1,530 to 1,560 nm range is the dominant spectral region for long-distance telecommunications.
  • Mid-wavelength infrared (MWIR, IR-C DIN) also called intermediate infrared (IIR): 3-8 µm. In guided missile technology the 3-5 µm portion of this band is the atmospheric window in which the homing heads of passive IR 'heat seeking' missiles are designed to work, homing on to the IR signature of the target aircraft, typically the jet engine exhaust plume.
  • Long-wavelength infrared (LWIR, IR-C DIN): 8–15 µm. This is the "thermal imaging" region, in which sensors can obtain a completely passive picture of the outside world based on thermal emissions only and requiring no external light or thermal source such as the sun, moon or infrared illuminator. Forward-looking infrared (FLIR) systems use this area of the spectrum. Sometimes also called the "far infrared."
  • Far infrared (FIR): 15-1,000 µm (see also far infrared laser).

NIR and SWIR is sometimes called "reflected infrared" while MWIR and LWIR is sometimes referred to as "thermal infrared." Due to the nature of the blackbody radiation curves, typical 'hot' objects, such as exhaust pipes, often appear brighter in the MW compared to the same object viewed in the LW.

Sensor response division scheme

Plot of atmospheric transmittance in part of the infrared region.

A third scheme divides up the band based on the response of various detectors:[7]

  • Near infrared: from 0.7 to 1.0 micrometers (from the approximate end of the response of the human eye to that of silicon).
  • Short-wave infrared: 1.0 to 3 micrometers (from the cut off of silicon to that of the MWIR atmospheric window. InGaAs covers to about 1.8 micrometers; the less sensitive lead salts cover this region.
  • Mid-wave infrared: 3 to 5 micrometers (defined by the atmospheric window and covered by Indium antimonide [InSb] and HgCdTe and partially by lead selenide [PbSe]).
  • Long-wave infrared: 8 to 12, or 7 to 14 micrometers: the atmospheric window (Covered by HgCdTe and microbolometers).
  • Very-long wave infrared (VLWIR): 12 to about 30 micrometers, covered by doped silicon.

Monday, June 1, 2009

Electromagnetic Spectrum

1. Radio wave

Long wavelength, low frequency, low energy

SubHertz
subHz 0 < 3 Hz
> 100,000 km
Natural and man-made electromagnetic waves millihertz, microhertz, nanohertz from earth, ionosphere, sun, planets, etc

Extremely low frequency ELF 1 3–30 Hz
100,000 km – 10,000 km Communication with submarines

Super low frequency SLF 2 30–300 Hz
10,000 km – 1000 km Communication with submarines

Ultra low frequency ULF 3 300–3000 Hz
1000 km – 100 km Communication within mines

Very low frequency VLF 4 3–30 kHz
100 km – 10 km Submarine communication, avalanche beacons, wireless heart rate monitors, geophysics

Low frequency LF 5 30–300 kHz
10 km – 1 km Navigation, time signals, AM longwave broadcasting, RFID

Medium frequency MF 6 300–3000 kHz
1 km – 100 m AM (Medium-wave) broadcasts

High frequency HF 7 3–30 MHz
100 m – 10 m Shortwave broadcasts, amateur radio and over-the-horizon aviation communications, RFID

Very high frequency VHF 8 30–300 MHz
10 m – 1 m FM, television broadcasts and line-of-sight ground-to-aircraft and aircraft-to-aircraft communications. Land Mobile and Maritime Mobile communications

Ultra high frequency UHF 9 300–3000 MHz
1 m – 100 mm television broadcasts, microwave ovens, mobile phones, wireless LAN, Bluetooth, GPS and Two-Way Radios such as Land Mobile, FRS and GMRS Radios

Super high frequency SHF 10 3–30 GHz
100 mm – 10 mm microwave devices, wireless LAN, most modern Radars

Extremely high frequency(EHF) 11 30–300 GHz
10 mm – 1 mm Radio astronomy, high-frequency microwave radio relay

Terahertz(THz) 300–30,000 GHz 1 mm – 90 um
Terahertz imaging - a potential replacement for x-rays in some medical applications, ultrafast molecular dynamics, Condensed-matter physics, Terahertz time-domain spectroscopy, terahertz computing/communications

Aircraft and shiping band
Amplitude modulation radio band
Short wave radio
Frequency modulation radio and television

2. Microwave
Microwaves are electromagnetic waves with wavelengths ranging from 1mm - 1m, or frequencies between 0.3 GHz and 300 GHz.

Television
Radar
Microwave ovan

3. Infrared

Saturday, May 30, 2009

Development of operational power regression models for long range monsoon rainfall forecasts

1. Eight parameter and ten parameter power-regression models (Rajeevan et al. 2004)

During the period of 1988–2002, IMD’s operational forecasts were based on the 16-parameter power regression and parametric models (Gowariker et al.
1989, 1991). The sixteen parameter model give out its forecast on May 25. A particular advantage of having two power-regression models is that the first forecast can be generated in April itself with the 8-parameter model. The 10-parameter model provides flexibility for fine-tuning the April forecast on the basis of developments in June, particularly the El Nino/La Nina tendency.

The 8-parameter and 10-parameter models were developed using data of 38 years (1958–95). Another seven years’ data (1996–2002) were used for independent verification of the models. As part of the development of new power regression models for monsoon rainfall forecasts, every parameter in the 16-parameter model was examined for statistical stability over time by calculating running 21-year window correlations. The analysis revealed that all six April–May parameters and four winter–spring parameters showed weakening correlations. This lead to the removal of ten parameters from the set. The extensive data analysis yielded four new more stable and physically related predictors, for use in the long-range forecast model. A new parameter set consisting of six old and four new parameters was thus formulated for the purpose of further model development.

In the following list the parameters 1, 2, 4, 6, 7 are 8 old parameter taken from 16 parameter model and retained in the new model. All the others are new parameters freshly identified and used in the new models. The first eight parameters in the list are used for eight parameter model while the ten parameter model take first ten parameters in the list. The three other parameters in the list are used in some models other than these two.

1. Arabian sea SST (January and February)
2. Eurasian snow cover (December)
3. Northwest Europe temperature
4. Nino3 SST anomaly (previous year July to September)
5. South Indian Ocean SST index (March)
6. East Asia pressure (February and March)
7. Northern hemisphere 50 hPa wind pattern (January and February)
8. Europe pressure gradient (January)
9. South Indian Ocean 850 hPa zonal wind (june)
10. Nino3.4 SST tendency (April to June and January to March)
11. South Indian Ocean SST index (March to May)
12. North Indian Ocean and North Pacific Ocean 850 hPa zonal wind diffrence (May)
13. North atlantic Ocean SST (December , January and February)

2. six parameter models (Rajeevan et al. 2006)

The statistical models (Rajeevan et al. 2006) for the long range forecast of Indian Summer monsoon rainfall is based on the following techniques

1 Ensemble multiple linear regression
2 Projection pursuit regression

The parameters used for first stage (April) forecast are

A1 North Atlantic SST anomaly (20N–30N, 100W–80W)December and January
A2 Equatorial SE Indian Ocean SST anomaly (20S–10S, 100E–120E) February and March
A3 East Asia surface pressure anomaly (35N–45N, 120E–130E) February and March
A4 Europe land surface air temperature anomaly Five stations January
A5 Northwest Europe surface pressure anomaly tendency(65N–75N, 20E–40E) DJF(0)-SON(–1)
A6 WWV anomaly (5S–5N, 120E–80W) February and March

The parameters used for second stage (June) forecast are

J1 North Atlantic SST anomaly(20N–30N, 100W–80W) December and January
J2 Equatorial SE Indian Ocean SST anomaly(20S–10S, 100E–120E) February and March
J3 East Asia surface pressure anomaly(35N–45N, 120E–130E) February and March
J4 Nino-3.4 SST anomaly tendency(5S–5N, 170W–120W) MAM(0) – DJF(0)
J5 North Atlantic surface pressure anomaly(35N–45N, 30W–10W) May
J6 North Central Pacific zonal wind anomaly at 850 hPa(5N–15N, 180E–150W) May


1. Rajeevan,M.;Pai†,D. S.; Dikshit, S. K.; Kelkar, R. R.; 2004
IMD’s new operational models for long-range forecast of southwest monsoon rainfall over India and their verification for 2003


2. Rajeevan, M.; Pai,D. S.; Anil Kumar,R.; Lal,B.; 2006 New statistical models for long-range forecasting of southwest monsoon rainfall over India

Friday, May 29, 2009

Be a responsible Indian


Hi  friends,

 

Well i found this intereting one Letter of Dr.ABDUL KALAM

 

EVERY INDIAN HAS TO READ THIS....

 

 


 

Why is the media here so negative?
Why are we in India so embarrassed to recognize our own strengths, our achievements?
We are such a great nation. We have so many amazing success stories but we refuse to acknowledge them. Why?
We are the first in milk production.
We are number one in Remote sensing satellites.
We are the second largest producer of wheat.
We are the second largest producer of rice.
Look at Dr. Sudarshan , he has transferred the tribal village into a self-sustaining, self-driving unit. There are millions of such achievements but our media is only obsessed in the bad news and failures and disasters.
I was in Tel Aviv once and I was reading the Israeli newspaper. It was the day after a lot of attacks and bombardments and deaths had taken place. The Hamas had struck. But the front page of the newspaper had the picture of a Jewish gentleman who in five years had transformed his desert into an orchid and a granary. It was this inspiring picture that everyone woke up to. The gory details of killings, bombardments, deaths, were inside in the newspaper, buried among other news.

In India we only read about death, sickness, terrorism, crime.. Why are we so NEGATIVE? Another question: Why are we, as a nation so obsessed with foreign things? We want foreign T.Vs, we want foreign shirts. We want foreign technology.

Why this obsession with everything imported. Do we not realize that self-respect comes with self-reliance? I was in Hyderabad giving this lecture, when a 14 year old girl asked me for my autograph. I asked her what her goal in life is. She replied: I want to live in a developed India . For her, you and I will have to build this developed India . You must proclaim. India is not an under-developed nation; it is a highly developed nation.
Do you have 10 minutes? Allow me to come back with a vengeance.

Got 10 minutes for your country? If yes, then read; otherwise, choice is yours.
YOU say that our government is inefficient.
YOU say that our laws are too old.
YOU say that the municipality does not pick up the garbage.
YOU say that the phones don't work, the railways are a joke. The airline is the worst in the world, mails never reach their destination.
YOU say that our country has been fed to the dogs and is the absolute pits.

YOU say, say and say. What do YOU do about it?

Take a person on his way to Singapore . Give him a name - 'YOURS'. Give him a face - 'YOURS'. YOU walk out of the airport and you are at your International best. In Singapore you don't throw cigarette butts on the roads or eat in the stores. YOU are as proud of their Underground links as they are. You pay $5 (approx. Rs. 60) to drive through Orchard Road (equivalent of Mahim Causeway or Pedder Road) between 5 PM and 8 PM. YOU come back to the parking lot to punch your parking ticket if you have over stayed in a restaurant or a shopping mall irrespective of your status identity… In Singapore you don't say anything, DO YOU? YOU wouldn't dare to eat in public during Ramadan, in Dubai . YOU would not dare to go out without your head covered in Jeddah.
YOU would not dare to buy an employee of the telephone exchange in London at 10 pounds (Rs.650) a month to, 'see to it that my STD and ISD calls are billed to someone else.'YOU would not dare to speed beyond 55 mph (88 km/h) in Washington and then tell the traffic cop, 'Jaanta hai main kaun hoon (Do you know who I am?). I am so and so's son. Take your two bucks and get lost.' YOU wouldn't chuck an empty coconut shell anywhere other than the garbage pail on the beaches in Australia and New Zealand .
Why don't YOU spit Paan on the streets of Tokyo ? Why don't YOU use examination jockeys or buy fake certificates in Boston ??? We are still talking of the same YOU. YOU who can respect and conform to a foreign system in other countries but cannot in your own. You who will throw papers and cigarettes on the road the moment you touch Indian ground. If you can be an involved and appreciative citizen in an alien country, why cannot you be the same here in India ?

Once in an interview, the famous Ex-municipal commissioner of Bombay , Mr. Tinaikar, had a point to make. 'Rich people's dogs are walked on the streets to leave their affluent droppings all over the place,' he said. 'And then the same people turn around to criticize and blame the authorities for inefficiency and dirty pavements. What do they expect the officers to do? Go down with a broom every time their dog feels the pressure in his bowels?
In America every dog owner has to clean up after his pet has done the job. Same in Japan .
Will the Indian citizen do that here?' He's right. We go to the polls to choose a government and after that forfeit all responsibility.
We sit back wanting to be pampered and expect the government to do everything for us whilst our contribution is totally negative. We expect the government to clean up but we are not going to stop chucking garbage all over the place nor are we going to stop to pick a up a stray piece of paper and throw it in the bin. We expect the railways to provide clean bathrooms but we are not going to learn the proper use of bathrooms.
We want Indian Airlines and Air India to provide the best of food and toiletries but we are not going to stop pilfering at the least opportunity.
This applies even to the staff who is known not to pass on the service to the public.

When it comes to burning social issues like those related to women, dowry, girl child! and others, we make loud drawing room protestations and continue to do the reverse at home. Our excuse? 'It's the whole system which has to change, how will it matter if I alone forego my sons' rights to a dowry.' So who's going to change the system?
What does a system consist of? Very conveniently for us it consists of our neighbours, other households, other cities, other communities and the government. But definitely not me and YOU. When it comes to us actually making a positive contribution to the system we lock ourselves along with our families into a safe cocoon and look into the distance at countries far away and wait for a Mr.Clean to come along & work miracles for us with a majestic sweep of his hand or we leave the country and run away.
Like lazy cowards hounded by our fears we run to America to bask in their glory and praise their system. When New York becomes insecure we run to England . When England experiences unemployment, we take the next flight out to the Gulf. When the Gulf is war struck, we demand to be rescued and brought home by the Indian government. Everybody is out to abuse and rape the country. Nobody thinks of feeding the system. Our conscience is mortgaged to money.

Dear Indians, The article is highly thought inductive, calls for a great deal of introspection and pricks one's conscience too…. I am echoing J. F. Kennedy's words to his fellow Americans to relate to Indians…..

'ASK WHAT WE CAN DO FOR INDIA AND DO WHAT HAS TO BE DONE TO MAKE INDIA WHAT AMERICA AND OTHER WESTERN COUNTRIES ARE TODAY'

Lets do what India needs from us.

Forward this mail to each Indian for a change instead of sending Jokes or junk mails.

Thank you,

Dr. Abdul Kalam


--
Gibies George
http://gibies.blogspot.com/

Tuesday, April 28, 2009

Tex

This section describes some of the major advantages that TeX systems enjoy.
Compared to word processors

Most people have used a word processor, so a comparison may be helpful.

With a word processors your text is placed while you type it, referred to as "what you see is what you get." In contrast, TeX is a formatter: it separates the steps of entering the material and placing it on the page.

To see the difference, consider how a typical user of each system might start a new section. In a word processor a typical user might start that section by hitting twice to get two lines of vertical space, typing "Section 1.2: New results", clicking to highlight that text, clicking to select a larger type size, clicking to select a new type style, and finally entering two more lines of vertical space. A typical user TeX user will type into a file the line "\section{New results}". That is, a word processing user is formatting the text as they enter it, while the TeX user describes the meaning of the text and later TeX will format it.

Beginners like word processing but when they graduate to complex jobs the appeal fades. Word processing a twenty page technical article is hard; for instance, keeping the vertical space between sections uniform is error-prone, and so is making sure that all of the bibliographic entries follow the required format. In particular, very few people have both the knowledge and the eye to correctly lay out equations — people often say their equations "just don't look right." That is, as a user becomes more experienced and knowledgable the TeX approach of having the typesetting done by the program becomes the better choice. (Some word processors offer as advanced features TeX-like facilities for organizing input text, although few users take advantage of them.)

Wednesday, April 1, 2009

Grads code for active-break cross anomaly

Prompt 'Enter the folder name: '
pull fld
'!mkdir ../'fld

'reinit'
prompt 'Enter the starting year:'
pull y1
prompt 'Enter the ending year:'
pull yn

newseas=y
while(newseas=y)
'clear'
prompt 'Enter the season : '
pull season

prompt ' enter the starting month as number: '
pull m1
n=m1
if(n=1)
mmm='jan'
endif
if(n=2)
mmm='feb'
endif
if(n=3)
mmm='mar'
endif
if(n=4)
mmm='apr'
endif
if(n=5)
mmm='may'
endif
if(n=6)
mmm='jun'
endif
if(n=7)
mmm='jul'
endif
if(n=8)
mmm='aug'
endif
if(n=9)
mmm='sep'
endif
if(n=10)
mmm='oct'
endif
if(n=11)
mmm='nov'
endif
if(n=12)
mmm='dec'
endif
mmm1=mmm
prompt 'Enter the starting day: '
pull d1
prompt ' enter the ending month as number: '
pull mn
n=mn
if(n=1)
mmm='jan'
endif
if(n=2)
mmm='feb'
endif
if(n=3)
mmm='mar'
endif
if(n=4)
mmm='apr'
endif
if(n=5)
mmm='may'
endif
if(n=6)
mmm='jun'
endif
if(n=7)
mmm='jul'
endif
if(n=8)
mmm='aug'
endif
if(n=9)
mmm='sep'
endif
if(n=10)
mmm='oct'
endif
if(n=11)
mmm='nov'
endif
if(n=12)
mmm='dec'
endif
mmmn=mmm
prompt 'Enter the ending day: '
pull dn

'open sst6098.ctl'
'set lat -25 25'
'set lon 50 180'
'set time 'dn''mmmn''yn''
'set sdfwrite clim.'key'.nc'
'define cp=0'
'define ct=0'
'define cu=0'
'close 1'

'open sst6098.ctl'
'set lat -25 25'
'set lon 50 180'
*'set mproj scaled'
'set time 'd1''mmm1''y1' 'dn''mmmn''yn''
'define t=ave(sst,time='d1''mmm1',time='dn''mmmn')'
'set time 'dn''mmmn''yn''
'define ct=ave(t,time='d1''mmm1''y1',time='dn''mmmn''yn')'
'undefine t'
'set grads off'
'set gxout shaded'
'set clevs 298.5 299 299.5 300 300.5 301 301.5 302 302.5 303 303.5 304'
'set ccols 9 14 4 11 5 13 3 10 7 12 8 2 6'
'd ct'
'cbarn'
'set gxout contour'
*'set ccolor 0'
'd ct'
'sdfwrite ct'
*'undefine ct'
'close 1'
'draw title sst climatology 'season''
'printim ../'fld'/climatology_'season'_'sst'.jpg white'

'clear'
'sdfopen slp.nc'
'set lat -25 25'
'set lon 50 180'
*'set mproj scaled'
'set time 'd1''mmm1''y1' 'dn''mmmn''yn''
'define p=ave(slp,time='d1''mmm1',time='dn''mmmn')'
'set time 'dn''mmmn''yn''
'define cp=ave(p,time='d1''mmm1''y1',time='dn''mmmn''yn')'
'undefine p'
'set grads off'
'set gxout shaded'
'd cp'
'cbarn'
'set gxout contour'
'set ccolor 0'
'd cp'
'sdfwrite cp'
*'undefine cp'
'close 1'
'draw title slp climatology 'season''
'printim ../'fld'/climatology_'season'_'slp'.jpg white'

'clear'
'open u850.ctl'
'set lat -25 25'
'set lon 50 180'
*'set mproj scaled'
'set time 'd1''mmm1''y1' 'dn''mmmn''yn''
'define uw=ave(u,time='d1''mmm1',time='dn''mmmn')'
'set time 'dn''mmmn''yn''
'define cu=ave(uw,time='d1''mmm1''y1',time='dn''mmmn''yn')'
'undefine uw'
'set grads off'
'set gxout shaded'
'd cu'
'cbarn'
'set gxout contour'
'd cu'
'cbarn'
'sdfwrite ct'
*'undefine cu'
'close 1'
'draw title u wind climatology 'season''
'printim ../'fld'/climatology_'season'_'uwind'.jpg white'






num=1

'sdfopen slp.nc'
'open sst6098.ctl'
'open u850.ctl'
'set time 31dec1960'
'set lat -25 25'
'set lon 50 180'
'define sp1=0'
'define st1=0'
'define su1=0'
'close 3'
'close 2'
'close 1'

prompt 'Enter the Key word (Active/Break) : '
pull key
prompt 'Enter the year:'
pull yyyy


while(yyyy>1950)
prompt ' enter the starting month as number: '
pull m1
n=m1
if(n=1)
mmm='jan'
endif
if(n=2)
mmm='feb'
endif
if(n=3)
mmm='mar'
endif
if(n=4)
mmm='apr'
endif
if(n=5)
mmm='may'
endif
if(n=6)
mmm='jun'
endif
if(n=7)
mmm='jul'
endif
if(n=8)
mmm='aug'
endif
if(n=9)
mmm='sep'
endif
if(n=10)
mmm='oct'
endif
if(n=11)
mmm='nov'
endif
if(n=12)
mmm='dec'
endif
mmm1=mmm
prompt 'Enter the starting day: '
pull d1
prompt ' enter the ending month as number: '
pull mn
n=mn
if(n=1)
mmm='jan'
endif
if(n=2)
mmm='feb'
endif
if(n=3)
mmm='mar'
endif
if(n=4)
mmm='apr'
endif
if(n=5)
mmm='may'
endif
if(n=6)
mmm='jun'
endif
if(n=7)
mmm='jul'
endif
if(n=8)
mmm='aug'
endif
if(n=9)
mmm='sep'
endif
if(n=10)
mmm='oct'
endif
if(n=11)
mmm='nov'
endif
if(n=12)
mmm='dec'
endif
mmmn=mmm
prompt 'Enter the ending day: '
pull dn


'clear'
'sdfopen slp.nc'
'set lat -25 25'
'set lon 50 180'
*'set mproj scaled'
'set time 'd1''mmm1'1960'
'define p=ave(slp,time='d1''mmm1''yyyy',time='dn''mmmn''yyyy')'
'set time 31dec1960'
'define sp1=sp1+p'
'undefine p'
'define csp=sp1/'num''
'set grads off'
'set gxout shaded'
'd csp'
'cbarn'
'set gxout contour'
'd csp'
'draw title slp climatology 'season'\'key''
'printim ../'fld'/climatology_'key'_'season'_'slp'.jpg white'
'clear'
'set gxout shaded'
'd csp-cp'
'cbarn'
'set gxout contour'
'd csp-cp'
'draw title slp Anomaly 'season'\'key''
'printim ../'fld'/Anomaly_'key'_'season'_'slp'.jpg white'
'undefine csp'
'close 1'

'clear'
if (yyyy<=1998)
'open sst6098.ctl'
'set lat -25 25'
'set lon 50 180'
*'set mproj scaled'
'set time 'd1''mmm1''1960''
'define t=ave(sst,time='d1''mmm1''yyyy',time='dn''mmmn''yyyy')'
'define st1=st1+t'
'undefine t'
'define cst=st1/'num''
'set grads off'
'set gxout shaded'
'd cst'
'cbarn'
'set gxout contour'
'd cst'
'draw title sst climatology 'season'\'key''
'printim ../'fld'/climatology_'key'_'season'_'sst'.jpg white'
'clear'
'set gxout shaded'
'd cst-ct'
'cbarn'
'set gxout contour'
'd cst-ct'
'draw title sst Anomaly 'season'\'key''
'printim ../'fld'/Anomaly_'key'_'season'_'sst'.jpg white'
'undefine cst'
'close 1'
endif

'clear'
'open u850.ctl'
'set lat -25 25'
'set lon 50 180'
*'set mproj scaled'
'set time 'd1''mmm1''1960''
'define uwnd=ave(u,time='d1''mmm1''yyyy',time='dn''mmmn''yyyy')'
'define su1=su1+uwnd'
'undefine uwnd'
'define csu=su1/'num''
'set grads off'
'set gxout shaded'
'd csu'
'cbarn'
'set gxout contour'
'd csu'
'draw title u wind climatology 'season'\'key''
'printim ../'fld'/climatology_'key'_'season'_'uwind'.jpg white'
'clear'
'set gxout shaded'
'd csu-cu'
'cbarn'
'set gxout contour'
'd csu-cu'
'draw title u wind Anomaly 'season'\'key''
'printim ../'fld'/Anomaly_'key'_'season'_'uwind'.jpg white'
'undefine csu'
'close 1'

prompt 'Enter the next year:'
pull yyyy

num=num+1
endwhile
'define csp1=sp1/('num'-1)'
'undefine sp1'
'define cst1=st1/('num'-1)'
'undefine st1'
'define csu1=su1/('num'-1)'
'undefine su1'

num=1

'sdfopen slp.nc'
'open sst6098.ctl'
'open u850.ctl'
'set time 31dec1960'
'set lat -25 25'
'set lon 50 180'
'define sp2=0'
'define st2=0'
'define su2=0'
'close 3'
'close 2'
'close 1'

prompt 'Enter the Key word (Active/Break) : '
pull key
prompt 'Enter the year:'
pull yyyy

while(yyyy>1950)
prompt ' enter the starting month as number: '
pull m1
n=m1
if(n=1)
mmm='jan'
endif
if(n=2)
mmm='feb'
endif
if(n=3)
mmm='mar'
endif
if(n=4)
mmm='apr'
endif
if(n=5)
mmm='may'
endif
if(n=6)
mmm='jun'
endif
if(n=7)
mmm='jul'
endif
if(n=8)
mmm='aug'
endif
if(n=9)
mmm='sep'
endif
if(n=10)
mmm='oct'
endif
if(n=11)
mmm='nov'
endif
if(n=12)
mmm='dec'
endif
mmm1=mmm
prompt 'Enter the starting day: '
pull d1
prompt ' enter the ending month as number: '
pull mn
n=mn
if(n=1)
mmm='jan'
endif
if(n=2)
mmm='feb'
endif
if(n=3)
mmm='mar'
endif
if(n=4)
mmm='apr'
endif
if(n=5)
mmm='may'
endif
if(n=6)
mmm='jun'
endif
if(n=7)
mmm='jul'
endif
if(n=8)
mmm='aug'
endif
if(n=9)
mmm='sep'
endif
if(n=10)
mmm='oct'
endif
if(n=11)
mmm='nov'
endif
if(n=12)
mmm='dec'
endif
mmmn=mmm
prompt 'Enter the ending day: '
pull dn


'clear'
'sdfopen slp.nc'
'set lat -25 25'
'set lon 50 180'
*'set mproj scaled'
'set time 'd1''mmm1'1960'
'define p=ave(slp,time='d1''mmm1''yyyy',time='dn''mmmn''yyyy')'
'set time 31dec1960'
'define sp2=sp2+p'
'undefine p'
'define csp=sp2/'num''
'set grads off'
'set gxout shaded'
'd csp'
'cbarn'
'set gxout contour'
'd csp'
'draw title slp climatology 'season'\'key''
'printim ../'fld'/climatology_'key'_'season'_'slp'.jpg white'
'clear'
'set gxout shaded'
'd csp-cp'
'cbarn'
'set gxout contour'
'd csp-cp'
'draw title slp Anomaly 'season'\'key''
'printim ../'fld'/Anomaly_'key'_'season'_'slp'.jpg white'
'undefine csp'
'close 1'

'clear'
if (yyyy<=1998)
'open sst6098.ctl'
'set lat -25 25'
'set lon 50 180'
*'set mproj scaled'
'set time 'd1''mmm1''1960''
'define t=ave(sst,time='d1''mmm1''yyyy',time='dn''mmmn''yyyy')'
'define st2=st2+t'
'undefine t'
'define cst=st2/'num''
'set grads off'
'set gxout shaded'
'd cst-ct'
'cbarn'
'set gxout contour'
'd cst'
'draw title sst climatology 'season'\'key''
'printim ../'fld'/climatology_'key'_'season'_'sst'.jpg white'
'clear'
'set gxout shaded'
'd cst-ct'
'cbarn'
'set gxout contour'
'd cst-ct'
'draw title sst Anomaly 'season'\'key''
'printim ../'fld'/Anomaly_'key'_'season'_'sst'.jpg white'
'undefine cst'
'close 1'
endif

'clear'
'open u850.ctl'
'set lat -25 25'
'set lon 50 180'
*'set mproj scaled'
'set time 'd1''mmm1''1960''
'define uwnd=ave(u,time='d1''mmm1''yyyy',time='dn''mmmn''yyyy')'
'define su2=su2+uwnd'
'undefine uwnd'
'define csu=su2/'num''
'set grads off'
'set gxout shaded'
'd csu'
'cbarn'
'set gxout contour'
'd csu'
'draw title u wind climatology 'season'\'key''
'printim ../'fld'/climatology_'key'_'season'_'uwind'.jpg white'
'clear'
'set gxout shaded'
'd csu-cu'
'cbarn'
'set gxout contour'
'd csu-cu'
'draw title u wind Anomaly 'season'\'key''
'printim ../'fld'/Anomaly_'key'_'season'_'uwind'.jpg white'
'undefine csu'
'close 1'

prompt 'Enter the next year:'
pull yyyy

num=num+1
endwhile
'define csp2=sp2/('num'-1)'
'undefine sp2'
'define cst2=st2/('num'-1)'
'undefine st2'
'define csu2=su2/('num'-1)'
'undefine su2'
'clear'
'set gxout shaded'
'set clevs -240 -200 -160 -120 -80 -40 0 40 80 120 160 200 240'
'set ccols 9 14 4 11 5 13 3 10 7 12 8 2 6'
'd csp1-csp2'
'cbarn'
'set gxout contour'
'd csp1-csp2'
'undefine csp1'
'undefine csp2'
'draw title 'season' slp climatology cross anomaly'
'printim ../'fld'/climatology_cross_anomaly_'season'_'slp'.jpg white'
'clear'
'set gxout shaded'
'set clevs -1.2 -1.0 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1.0 1.2'
'set ccols 9 14 4 11 5 13 3 10 7 12 8 2 6'
'd cst1-cst2'
'cbarn'
'set gxout contour'
'd cst1-cst2'
'draw title 'season' sst climatology cross anomaly'
'printim ../'fld'/climatology_cross_anomaly_'season'_'sst'.jpg white'
'undefine cst1'
'undefine cst2'
'clear'
'set gxout shaded'
'set clevs -12 -10 -8 -6 -4 -2 0 2 4 6 8 10 12'
'set ccols 9 14 4 11 5 13 3 10 7 12 8 2 6'
'd csu1-csu2'
'cbarn'
'set gxout contour'
'd csu1-csu2'
'draw title 'season' u wind climatology cross anomaly'
'printim ../'fld'/climatology_cross_anomaly_'season'_'uwind'.jpg white'
'undefine csu1'
'undefine csu2'
'clear'
prompt 'Do you have another season: '
pull newseas
endwhile

Friday, March 27, 2009

Climatology of Seasonal mean using Daily data in GrADS

Prompt 'Enter the folder name: '
pull fld
'!mkdir ../'fld
ans=y
while(ans=y)

prompt 'Enter the starting year:'
pull y1
prompt 'Enter the ending year:'
pull yn
'reinit'
prompt ' enter the starting month as number: '
pull m1
n=m1
if(n=1)
mmm='jan'
endif
if(n=2)
mmm='feb'
endif
if(n=3)
mmm='mar'
endif
if(n=4)
mmm='apr'
endif
if(n=5)
mmm='may'
endif
if(n=6)
mmm='jun'
endif
if(n=7)
mmm='jul'
endif
if(n=8)
mmm='aug'
endif
if(n=9)
mmm='sep'
endif
if(n=10)
mmm='oct'
endif
if(n=11)
mmm='nov'
endif
if(n=12)
mmm='dec'
endif
mmm1=mmm
prompt 'Enter the starting day: '
pull d1
prompt ' enter the ending month as number: '
pull mn
n=mn
if(n=1)
mmm='jan'
endif
if(n=2)
mmm='feb'
endif
if(n=3)
mmm='mar'
endif
if(n=4)
mmm='apr'
endif
if(n=5)
mmm='may'
endif
if(n=6)
mmm='jun'
endif
if(n=7)
mmm='jul'
endif
if(n=8)
mmm='aug'
endif
if(n=9)
mmm='sep'
endif
if(n=10)
mmm='oct'
endif
if(n=11)
mmm='nov'
endif
if(n=12)
mmm='dec'
endif
mmmn=mmm
prompt 'Enter the ending day: '
pull dn
prompt 'Enter the Key word (Active/Break) : '
pull key


'open sst6098.ctl'
'set lat -25 25'
'set lon 50 180'
*'set mproj scaled'
'set time 'd1''mmm1''y1' 'dn''mmmn''yn''
'define t=ave(sst,time='d1''mmm1',time='dn''mmmn')'
'set time 'dn''mmmn''yn''
'define ct=ave(t,time='d1''mmm1''y1',time='dn''mmmn''yn')'
'undefine t'
'set grads off'
'set gxout shaded'
'set clevs 298.5 299 299.5 300 300.5 301 301.5 302 302.5 303 303.5 304'
'set ccols 9 14 4 11 5 13 3 10 7 12 8 2 6'
'd ct'
'cbarn'
'set gxout contour'
*'set ccolor 0'
*'d ct'
'undefine ct'
'close 1'
'draw title sst climatology 'key''
'printim ../'fld'/'key'_'sst'.jpg white'

'clear'
'sdfopen slp.nc'
'set lat -25 25'
'set lon 50 180'
*'set mproj scaled'
'set time 'd1''mmm1''y1' 'dn''mmmn''yn''
'define p=ave(slp,time='d1''mmm1',time='dn''mmmn')'
'set time 'dn''mmmn''yn''
'define cp=ave(p,time='d1''mmm1''y1',time='dn''mmmn''yn')'
'undefine p'
'set grads off'
'set gxout shaded'
*'set clevs 1006.0 1007.0 1008.0 1009.0 1010.0 1011.0 1012.0 1013.0 1014.0 1015.0 1016.0'
*'set ccols 9 14 4 11 5 13 3 10 7 12 8 2'
'd cp'
'cbarn'
'set gxout contour'
'set ccolor 0'
'd cp'
'undefine cp'
'close 1'

'draw title slp climatology 'key''
'printim ../'fld'/'key'_'slp'.jpg white'

'clear'
'open u850.ctl'
'set lat -25 25'
'set lon 50 180'
*'set mproj scaled'
'set time 'd1''mmm1''y1' 'dn''mmmn''yn''
'define uw=ave(u,time='d1''mmm1',time='dn''mmmn')'
'set time 'dn''mmmn''yn''
'define cu=ave(uw,time='d1''mmm1''y1',time='dn''mmmn''yn')'
'undefine uw'
'set grads off'
'set gxout shaded'
'd cu'
'set gxout contour'
'd cu'
'cbarn'
'draw title u wind climatology 'key''
'printim ../'fld'/'key'_'uwind'.jpg white'
'undefine cu'
'close 1'

prompt 'Do you have another one: '
pull ans
endwhile