[gradsusr] If else statement in grads
Jayakrishnan P.R
prjayakrishnan at gmail.com
Sat Sep 14 10:09:21 EDT 2013
Dear Sir,
Thanks. It worked. I also searched similar issues in grads
archives and found one solution with if else statement by Serge Claudio and
it worked well for me. But Still I could not include the second if
condition which is if(W>=6&W<=26);'define c=(0.6+0.07*W)/1000';. generally
this will be included in the else statement except only during certain
conditions such as cyclones. But Still any way to include this too in the
script..?. The following is the currently working script with the output
figure attached.
'reinit'
'sdfopen uwnd.2009.nc'
'sdfopen vwnd.2009.nc'
'set lev 1000'
'set lat -10 45'
'set lon 30 110'
'define W=mag(uwnd,vwnd.2)'
if (W>= 3&W<= 6)
'define cd=(0.29+3.1/W+7.7/W**2)/1000'
else
'define cd=(0.6+0.07*W)/1000'
endif
'define taux=1.3*cd*W*uwnd'
'define tauy=1.3*cd*W*vwnd.2'
'd cd'
'printim cdrag2.jpg white'
--
Sincerely
***********************************************
Jayakrishnan.P.R
Teaching Associate (Atmospheric Science)
Academy of Climate Change Education and Research
Kerala Agricultural University
Vellanikkara-680 656
and also
Research Fellow (Part Time)
Department of Atmospheric Sciences
CUSAT, Cochin-682 016
Kerala, India.
Mob: 09496026547
***********************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20130914/7cc2941d/attachment-0003.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cdrag2.jpg
Type: image/jpeg
Size: 106703 bytes
Desc: not available
Url : http://gradsusr.org/pipermail/gradsusr/attachments/20130914/7cc2941d/attachment-0003.jpg
More information about the gradsusr
mailing list