<br>Hi Mike<br>Tanks so much for your replay but when I use 'ncks' I face to following masage.<br>Could you please guide me.<br>ga-> open /home2/fdaryabor/Documents/V.ctl <br>Scanning description file: /home2/fdaryabor/Documents/V.ctl<br>
Data file /home2/fdaryabor/Documents/v.dat is open as file 2<br>ga-> q file 2<br>File 2 : evaporation mines prescription<br> Descriptor: /home2/fdaryabor/Documents/V.ctl<br> Binary: /home2/fdaryabor/Documents/v.dat<br>
Type = Gridded<br> Xsize = 360 Ysize = 180 Zsize = 1 Tsize = 12 Esize = 1<br> Number of Variables = 1<br> v 0 1 v<br>ga-> set lon 0 360<br>LON set to 0 360 <br>ga-> set lat 180 359<br>LAT set to 180 359 <br>
ga-> set lev 0 0<br>LEV set to 0 0 <br>ga-> set t 1 12<br>Time values set: 1960:1:16:5 1960:12:16:5 <br>ga-> define uwind=u<br>Define memory allocation size = 6238080 bytes<br>ga-> define vwind=v.2<br>Define memory allocation size = 6238080 bytes<br>
ga-> set sdfwrite /home2/fdaryabor/Documents/<a href="http://temp.nc">temp.nc</a><br>SDFWrite file name = /home2/fdaryabor/Documents/<a href="http://temp.nc">temp.nc</a><br>SDFWrite will replace an existing file<br>ga-> sdfwrite uwind<br>
Wrote variable uwind to /home2/fdaryabor/Documents/<a href="http://temp.nc">temp.nc</a><br>ga-> !cp /home2/fdaryabor/Documents/<a href="http://temp.nc">temp.nc</a> /home2/fdaryabor/Documents/VAR.nc<br>ga-> sdfwrite vwind<br>
Wrote variable vwind to /home2/fdaryabor/Documents/<a href="http://temp.nc">temp.nc</a><br><b>ga-> ncks -A -h /home2/fdaryabor/Documents/<a href="http://temp.nc">temp.nc</a> /home2/fdaryabor/Documents/VAR.nc <br>Unknown command: ncks</b><br>
<br><br><br><br>Best Regards for you<br>F.Daryabor<br><div class="gmail_quote">On Fri, Sep 18, 2009 at 10:57 PM, Mike Bosilovich <span dir="ltr"><<a href="mailto:mike.bosilovich@gmail.com">mike.bosilovich@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I just had a similar question, and asked Jennifer offline. So, what to<br>
do is to build a call to ncks into your script, and it can append data<br>
onto a file. In my case I loop over many variables, so the file in<br>
sdfwrite is <a href="http://temp.nc" target="_blank">temp.nc</a>, then I use ncks to append to the actual output<br>
file I want. I tried to add som script below that may work for you.<br>
<div class="im"><br>
On Thu, Sep 17, 2009 at 3:17 AM, Farshid Daryabor<br>
<<a href="mailto:fdaryabor@googlemail.com">fdaryabor@googlemail.com</a>> wrote:<br>
> Hi all<br>
</div>> I could use 'sdfwrite', now I want to input 2 variables 'u' and 'v' in one<br>
> netcdf file. I write a script for execute , after 'set sdfwrite<br>
<div class="im">> /hom2/../VAR.nc' when I type 'sdfwrite' command which is 'sdfwrite uwind<br>
</div>> vwind.2' for writing 2 variables in netcdf file, it only gives me one of<br>
<div class="im">> them not both. Please guide me.<br>
><br>
><br>
> 'open /home2/fdaryabor/Documents/U.ctl'<br>
> 'open /home2/fdaryabor/Documents/V.ctl'<br>
> 'set lon 0 360'<br>
> 'set lat 180 359'<br>
> 'set lev 0 0'<br>
> 'set t 1 last'<br>
> 'set e 1 last'<br>
> 'define uwind=u'<br>
> 'define vwind=v.2'<br>
> *'set sdfwrite /home2/fdaryabor/Documents/VAR.nc'<br>
<br>
</div>'set sdfwrite <a href="http://temp.nc" target="_blank">temp.nc</a>'<br>
<br>
> *'sdfwrite uwind vwind.2'<br>
<br>
'sdfwrite uwind'<br>
'!cp <a href="http://temp.nc" target="_blank">temp.nc</a> /home2/fdaryabor/Documents/VAR.nc'<br>
'sdfwrite vwind'<br>
'ncks -A -h <a href="http://temp.nc" target="_blank">temp.nc</a> /home2/fdaryabor/Documents/VAR.nc'<br>
<br>
<br>
If there's any looping involved, then the !cp will over write, so only<br>
do that on the first iteration of the loop to initialize the file, and<br>
append all the rest. -A does the append, and -h prevents a history<br>
line in the netcdf metadata. I was looping over many vars, and this<br>
history was getting too big.<br>
<br>
Hope this helps and have a great weekend!!<br>
<font color="#888888"><br>
Mike<br>
</font><div><div></div><div class="h5"><br>
><br>
> Best Regards<br>
> F.Daryabor<br>
><br>
> On Wed, Sep 16, 2009 at 12:55 PM, Farshid Daryabor<br>
> <<a href="mailto:fdaryabor@googlemail.com">fdaryabor@googlemail.com</a>> wrote:<br>
>><br>
>> Hi Eric Altshuler<br>
>> Thanks so much for your guide. I try download grads 2.0.a3.<br>
>> Best Regards<br>
>> F.Daryabor<br>
>><br>
>> On Tue, Sep 15, 2009 at 11:49 AM, Eric Altshuler <<a href="mailto:ela@cola.iges.org">ela@cola.iges.org</a>><br>
>> wrote:<br>
>>><br>
>>> Hello Farshid,<br>
>>><br>
>>> sdfwrite is not a script. It's a built-in command, and you need grads<br>
>>> 2.0.a3 or higher to use it. You mentioned that you use the grads executable<br>
>>> 'gradsc'. This means you are using an old version of grads. Beginning with<br>
>>> grads 2.0, the 'gradsc' executable does not exist anymore. There are only<br>
>>> two grads executables, 'grads' and 'gradsdap'. Get the latest version of<br>
>>> grads; the sdfwrite command will be available.<br>
>>><br>
>>> Best regards,<br>
>>><br>
>>> Eric L. Altshuler<br>
>>> Assistant Research Scientist<br>
>>> Center for Ocean-Land-Atmosphere Studies<br>
>>> 4041 Powder Mill Road, Suite 302<br>
>>> Calverton, MD 20705-3106<br>
>>> USA<br>
>>><br>
>>> E-mail: <a href="mailto:ela@cola.iges.org">ela@cola.iges.org</a><br>
>>> Phone: (301) 902-1257<br>
>>> Fax: (301) 595-9793<br>
>>><br>
>>> ----- Original Message -----<br>
>>> From: "Farshid Daryabor" <<a href="mailto:fdaryabor@GOOGLEMAIL.COM">fdaryabor@GOOGLEMAIL.COM</a>><br>
>>> To: <a href="mailto:GRADSUSR@LIST.CINECA.IT">GRADSUSR@LIST.CINECA.IT</a><br>
>>> Sent: Tuesday, September 15, 2009 5:19:37 AM GMT -05:00 US/Canada Eastern<br>
>>> Subject: Re: command in GrADS 2.0.a5.oga.5<br>
>>><br>
>>> Hi<br>
>>> I try for downloading 'sdfwrite' script from "<br>
>>> <a href="http://www.iges.org/grads/gadoc/library.html" target="_blank">http://www.iges.org/grads/gadoc/library.html</a> " but can't find it, because<br>
>>> when I open 'my_data.ctl' in './gradsc' I face to following massage:<br>
>>><br>
>>> ga-> open /home/Arya/fDaryabor/Roms_tools/Run/binary2netcdf.ctl<br>
>>> Scanning description file:<br>
>>> /home/Arya/fDaryabor/Roms_tools/Run/binary2netcdf.ctl<br>
>>> Data file /home/Arya/fDaryabor/Roms_tools/Run/emp.dat is open as file 1<br>
>>> LON set to 0 360<br>
>>> LAT set to 180 359<br>
>>> LEV set to 0 0<br>
>>> Time values set: 1960:1:16:5 1960:1:16:5<br>
>>> ga-> set lon 98 120<br>
>>> LON set to 98 120<br>
>>> ga-> set lat -10 20<br>
>>> LAT set to -10 20<br>
>>> ga-> set t 05z16jan1960 1mo<br>
>>> Time values set: 1960:5:16:5 1960:1:16:5<br>
>>> ga-> set sdfwrite /home/Arya/Desktop/EMP.nc<br>
>>> SET error: Invalid operand<br>
>>> Operand = sdfwrite /home/arya/desktop/ <a href="http://emp.nc" target="_blank">emp.nc</a><br>
>>> I think must download "sdfwrite" script, please you help me, and give me<br>
>>> straight address for find it.<br>
>>> Best Regards<br>
>>> F.Daryabor<br>
>>><br>
>>><br>
>>><br>
>>> On Tue, Sep 15, 2009 at 4:03 PM, 王永立 < <a href="mailto:rust123@yahoo.cn">rust123@yahoo.cn</a> > wrote:<br>
>>><br>
>>><br>
>>><br>
>>><br>
>>><br>
>>> hello,everyone<br>
>>> what are the shortcut keys of the copy and paste command in GrADS<br>
>>> 2.0.a5.oga.5,thank you in advance.the shfit+insert could not be used in the<br>
>>> windows xp.<br>
>>><br>
>>><br>
>>><br>
>>><br>
>>> 发件人: hersala < <a href="mailto:hersala@GMAIL.COM">hersala@GMAIL.COM</a> ><br>
>>> 收件人: <a href="mailto:GRADSUSR@LIST.CINECA.IT">GRADSUSR@LIST.CINECA.IT</a><br>
>>> 已发送: 2009/9/15(周二), �¸ 午12:32:44<br>
>>> 主题: Re: GS files in GrADS 2.0.a5.oga.5<br>
>>><br>
>>> Hi Hyacinth:<br>
>>> When I use my own scripts or from another person, I save them in the same<br>
>>> folder from where the data is read by GrADS, that is win32 folder.<br>
>>> I hope this help you.<br>
>>> Bye,<br>
>>> Hern�n<br>
>>><br>
>>><br>
>>> 2009/9/13 Hyacinth Cyprain Nnamchi < <a href="mailto:hc.nnamchi@lasg.iap.ac.cn">hc.nnamchi@lasg.iap.ac.cn</a> ><br>
>>><br>
>>><br>
>>> Dear Colleagues,<br>
>>><br>
>>> I am using GrADS 2.0.a5.oga.5 from the Opengrads download page (<br>
>>> <a href="http://sourceforge.net/projects/opengrads/files/" target="_blank">http://sourceforge.net/projects/opengrads/files/</a> ) on MS Windows.I notice<br>
>>> that it does not recognise the in-built .gs files like <a href="http://cbar.gs" target="_blank">cbar.gs</a> , <a href="http://cbarn.gs" target="_blank">cbarn.gs</a><br>
>>> etc, although I have confirmed that they are in the "scripts" file.<br>
>>><br>
>>> Does anyone know what could be wrong, where should I place the .gs files?<br>
>>><br>
>>><br>
>>> Thanks,<br>
>>> hyacinth<br>
>>><br>
>>><br>
>>><br>
>>><br>
>>> --<br>
>>><br>
>>> Hyacinth C. Nnamchi<br>
>>> TWAS-CAS Fellow<br>
>>> State Key Laboratory of Numerical Modeling for<br>
>>> Atmospheric Sciences and Geophysical Fluid Dynamics (LASG)<br>
>>> Institute of Atmospheric Physics (IAP)<br>
>>> Chinese Academy of Sciences (CAS)<br>
>>> P.O.Box 9804, Beijing 100029, China<br>
>>> Tel: +86-13488719702<br>
>>> Fax: +86-10-82995172<br>
>>> <a href="mailto:E-mail%3Ahc.nnamchi@lasg.iap.ac.cn">E-mail:hc.nnamchi@lasg.iap.ac.cn</a><br>
>>><br>
>>><br>
>>><br>
>>> 好玩贺卡等�½ 发,邮箱贺卡全新�¸ 线!<br>
>><br>
><br>
><br>
</div></div></blockquote></div><br>