<div dir="ltr">I have done the modification in this way. I verified it with original nc file and it is OK. Now what I am doing is that I am not depending grads for converting into binary. I am a little bit afraid. I am doing it with the help of CDO and xconv. It is much easy. Also using the utility subset.tcl it is possible. <br></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">Sincerely<br>***********************************************<br>Jayakrishnan.P.R<br><div>Project Scientist-C<br>National Centre for Medium Range Weather Forecasting<br>Earth System Science Organisation<br>Ministry of Earth Sciences<br>A-50, Sector 62, NOIDA -201 309, INDIA<br>Mob: 09496026547</div><div>Alternate Email: <a href="mailto:jkrishna@ncmrwf.gov.in" target="_blank">jkrishna@ncmrwf.gov.in</a><br><br>***********************************************</div></div></div></div></div></div></div></div>
<br><div class="gmail_quote">On Wed, Apr 22, 2015 at 6:04 PM, James T. Potemra <span dir="ltr"><<a href="mailto:jimp@hawaii.edu" target="_blank">jimp@hawaii.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Jayakrishnan,<br>
<br>
In addition to adding the appropriate depth levels to your descriptor<br>
file, I'm not sure your script is doing what you want. You are writing a<br>
single point each time. Instead, set the lat/lon range, then loop over<br>
time then depth:<br>
<span class=""><br>
'reinit'<br>
'sdfopen G:/Sample_MT/samp/<a href="http://uwnd.2006.nc" target="_blank">uwnd.2006.nc</a>'<br>
prompt 'key in filename'<br>
pull fname<br>
'set fwrite 'fname<br>
</span>'set y 1 73'<br>
'set x 1 144'<br>
<span class="">tm=1<br>
while(tm<=7)<br>
'set t 'tm<br>
prl=1<br>
while(prl<=8)<br>
'set t 'tm<br>
'set z 'prl<br>
'set gxout fwrite'<br>
'd uwnd'<br>
prl=prl+1<br>
endwhile<br>
tm=tm+1<br>
endwhile<br>
<br>
</span>'disable fwrite'<br>
<br>
<br>
Jim<br>
<div class="HOEnZb"><div class="h5"><br>
On 4/22/15 2:08 PM, M.Mahakur wrote:<br>
> Hi,<br>
><br>
> You have 8 pressure levels, but zero (0) here:<br>
><br>
> u 0 99 mean Daily qu [kg/s]<br>
><br>
> Also, please check your undefine value after fwrite. Is it -999 or grads default undefine?<br>
><br>
> Regards,<br>
><br>
><br>
> ----- Original Message -----<br>
> From: Jayakrishnan P.R <<a href="mailto:prjayakrishnan@gmail.com">prjayakrishnan@gmail.com</a>><br>
> To: GrADS Users Forum <<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a>><br>
> Sent: Wed, 22 Apr 2015 16:01:27 +0530 (IST)<br>
> Subject: Re: [gradsusr] Dimensions that Grads can operate<br>
><br>
> Thanks. Eventhough the script after modification is working, the output<br>
> file is having some endian problem or the output figure is erroneous. The<br>
> modified script and ctl file is as follows.<br>
><br>
> *********************************************************************<br>
><br>
> 'reinit'<br>
> 'sdfopen G:/Sample_MT/samp/<a href="http://uwnd.2006.nc" target="_blank">uwnd.2006.nc</a>'<br>
> prompt 'key in filename'<br>
> pull fname<br>
> 'set fwrite 'fname<br>
> yy=1<br>
> while(yy<=73)<br>
> xx=1<br>
> while(xx<=144)<br>
> 'set x 'xx<br>
> 'set y 'yy<br>
> tm=1<br>
> while(tm<=7)<br>
> 'set t 'tm<br>
> prl=1<br>
> while(prl<=8)<br>
> 'set t 'tm<br>
> 'set z 'prl<br>
> 'set gxout fwrite'<br>
> 'd uwnd'<br>
> prl=prl+1<br>
> endwhile<br>
> tm=tm+1<br>
> endwhile<br>
> xx=xx+1<br>
> endwhile<br>
> yy=yy+1<br>
> endwhile<br>
> 'disable fwrite'<br>
><br>
><br>
><br>
> dset ^U.grd<br>
> undef -999.000000<br>
> xdef 144 linear 0.0 2.5<br>
> ydef 73 linear -90.0 2.5<br>
> zdef 8 levels 1000 925 850 700 600 500 400 300<br>
> tdef 7 linear 00:00Z23jun2006 24hr<br>
> vars 1<br>
> u 0 99 mean Daily qu [kg/s]<br>
> endvars<br>
><br>
><br>
><br>
><br>
><br>
> Sincerely<br>
> ***********************************************<br>
> Jayakrishnan.P.R<br>
> Project Scientist-C<br>
> National Centre for Medium Range Weather Forecasting<br>
> Earth System Science Organisation<br>
> Ministry of Earth Sciences<br>
> A-50, Sector 62, NOIDA -201 309, INDIA<br>
> Mob: 09496026547<br>
> Alternate Email: <a href="mailto:jkrishna@ncmrwf.gov.in">jkrishna@ncmrwf.gov.in</a><br>
><br>
> ***********************************************<br>
><br>
> On Tue, Apr 21, 2015 at 7:49 PM, Madhu Latha <<a href="mailto:madhulatha11@gmail.com">madhulatha11@gmail.com</a>> wrote:<br>
><br>
>> hi<br>
>> it will work<br>
>> you have to keep x,y also in while loop<br>
>> for example<br>
>><br>
>> yy=117<br>
>> while(yy<=119)<br>
>> xx=164<br>
>> while(xx<=166)<br>
>> 'set x 'xx<br>
>> 'set y 'yy<br>
>> tm=1<br>
>><br>
>> while(tm<=76)<br>
>> 'set t 'tm<br>
>> prl=2<br>
>> while(prl<=20)<br>
>> 'set t 'tm<br>
>> 'set z 'prl<br>
>> 'd u'<br>
>> 'save here with file name'<br>
>> prl=prl+1<br>
>> endwhile<br>
>> tm=tm+1<br>
>> endwhile<br>
>> xx=xx+1<br>
>> endwhile<br>
>> yy=yy+1<br>
>><br>
>> you try this,it may work.<br>
>><br>
>> On Tue, Apr 21, 2015 at 5:45 PM, Jayakrishnan P.R <<br>
>> <a href="mailto:prjayakrishnan@gmail.com">prjayakrishnan@gmail.com</a>> wrote:<br>
>><br>
>>> Hello,<br>
>>> I am in need of converting NCEP wind data to gridded format<br>
>>> extracted over a latitude longitude domain. I wrote a script for this thing<br>
>>> like the following.<br>
>>><br>
>>> 'reinit'<br>
>>> 'sdfopen G:/Sample_MT/samp/<a href="http://uwnd.2006.nc" target="_blank">uwnd.2006.nc</a>'<br>
>>> 'set x 1 144'<br>
>>> 'set y 1 73'<br>
>>> prompt 'key in filename'<br>
>>> pull fname<br>
>>> 'set fwrite 'fname<br>
>>> tt=1<br>
>>> while (tt<=365)<br>
>>> 'set t 'tt<br>
>>> zz=1<br>
>>> while (zz<=17)<br>
>>> 'set z 'zz<br>
>>> 'set gxout fwrite'<br>
>>> 'd uwnd'<br>
>>> zz=zz+1<br>
>>> endwhile<br>
>>> tt=tt+1<br>
>>> endwhile<br>
>>><br>
>>><br>
>>> But eventhough the script is working, it extracts the data for a single<br>
>>> level only. Do grads operate if we give dimensions greater than 2?. I mean,<br>
>>> latitude is varying, longitude is varying, Time is varying, Level is<br>
>>> varying for output..?<br>
>>><br>
>>><br>
>>><br>
>>> Sincerely<br>
>>> ***********************************************<br>
>>> Jayakrishnan.P.R<br>
>>> Project Scientist-C<br>
>>> National Centre for Medium Range Weather Forecasting<br>
>>> Earth System Science Organisation<br>
>>> Ministry of Earth Sciences<br>
>>> A-50, Sector 62, NOIDA -201 309, INDIA<br>
>>> Mob: 09496026547<br>
>>> Alternate Email: <a href="mailto:jkrishna@ncmrwf.gov.in">jkrishna@ncmrwf.gov.in</a><br>
>>><br>
>>> ***********************************************<br>
>>><br>
>>> _______________________________________________<br>
>>> gradsusr mailing list<br>
>>> <a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
>>> <a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
>>><br>
>>><br>
>><br>
>> --<br>
>><br>
>><br>
>> *With RegardsMadhulatha Akkisetti*<br>
>><br>
>> *Project Scientist - C*<br>
>><br>
>><br>
>> *National Centre for Medium Range Weather Forecasting (NCMRWF) Ministry of<br>
>> Earth Sciences (MoES) *<br>
>><br>
>> *Noida, UP*<br>
>><br>
>> _______________________________________________<br>
>> gradsusr mailing list<br>
>> <a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
>> <a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
>><br>
>><br>
<br>
_______________________________________________<br>
gradsusr mailing list<br>
<a href="mailto:gradsusr@gradsusr.org">gradsusr@gradsusr.org</a><br>
<a href="http://gradsusr.org/mailman/listinfo/gradsusr" target="_blank">http://gradsusr.org/mailman/listinfo/gradsusr</a><br>
</div></div></blockquote></div><br></div>