[gradsusr] If else statement in grads

Endalkachew Bekele - NOAA Affiliate endalkachew.bekele at noaa.gov
Sat Sep 14 08:43:33 EDT 2013


Hello,

Two of your define statements were not enclosed in quotes. See the edited
script below:

'reinit'
'sdfopen d:/Ekman_transport/uwnd.2009.nc'
'sdfopen d:/Ekman_transport/vwnd.2009.nc'
'set lev 1000'
'define W=mag(uwnd,vwnd.2)'
if(W>=3&W<=6);'define cd=(0.29+3.1/W+7.7/W**2)/1000';endif
if(W>=6&W<=26);'define cd=(0.6+0.07*W)';endif
'define taux=1.3*cd*W*uwnd'
'define tauy=1.3*cd*W*vwnd.2'
'd cd'
'printim D:/Ekman_transport/cdrag1.jpg white'

Best,
EB
~


On Sat, Sep 14, 2013 at 1:21 AM, Jayakrishnan P.R
<prjayakrishnan at gmail.com>wrote:

> I have tried the method as suggested by users. Still some errors. I
> herewith attach the gs file I used for the computation. Could anyone point
> out the errors.?
>
> 'reinit'
> 'sdfopen d:/Ekman_transport/uwnd.2009.nc'
> 'sdfopen d:/Ekman_transport/vwnd.2009.nc'
> 'set lev 1000'
> 'define W=mag(uwnd,vwnd.2)'
> if(W>=3&W<=6);
> define cd=(0.29+3.1/W+7.7/W**2)/1000;
> endif
> if(W>=6&W<=26);
> define cd=(0.6+0.07*W);
> endif
> 'define taux=1.3*cd*W*uwnd'
> 'define tauy=1.3*cd*W*vwnd.2'
> 'd cd'
> 'printim D:/Ekman_transport/cdrag1.jpg white'
>
> Thnaking You.
>
>
>
> --
> 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
>
> ***********************************************
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>
>


-- 
-----------------------------------------------------------------------------------
Endalkachew Bekele
NOAA Center for Weather and Climate Prediction / CPC International Desks
5830 University Research Court, Rm 3149
College Park, Maryland 20740
Tel: (301) 683-3459
e-mail: endalkachew.bekele at noaa.gov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20130914/b5a34975/attachment-0003.html 


More information about the gradsusr mailing list