sdfwrite [was: Re: command in GrADS 2.0.a5.oga.5]
Mike Bosilovich
mike.bosilovich at GMAIL.COM
Fri Sep 18 10:57:55 EDT 2009
I just had a similar question, and asked Jennifer offline. So, what to
do is to build a call to ncks into your script, and it can append data
onto a file. In my case I loop over many variables, so the file in
sdfwrite is temp.nc, then I use ncks to append to the actual output
file I want. I tried to add som script below that may work for you.
On Thu, Sep 17, 2009 at 3:17 AM, Farshid Daryabor
<fdaryabor at googlemail.com> wrote:
> Hi all
> I could use 'sdfwrite', now I want to input 2 variables 'u' and 'v' in one
> netcdf file. I write a script for execute , after 'set sdfwrite
> /hom2/../VAR.nc' when I type 'sdfwrite' command which is 'sdfwrite uwind
> vwind.2' for writing 2 variables in netcdf file, it only gives me one of
> them not both. Please guide me.
>
>
> 'open /home2/fdaryabor/Documents/U.ctl'
> 'open /home2/fdaryabor/Documents/V.ctl'
> 'set lon 0 360'
> 'set lat 180 359'
> 'set lev 0 0'
> 'set t 1 last'
> 'set e 1 last'
> 'define uwind=u'
> 'define vwind=v.2'
> *'set sdfwrite /home2/fdaryabor/Documents/VAR.nc'
'set sdfwrite temp.nc'
> *'sdfwrite uwind vwind.2'
'sdfwrite uwind'
'!cp temp.nc /home2/fdaryabor/Documents/VAR.nc'
'sdfwrite vwind'
'ncks -A -h temp.nc /home2/fdaryabor/Documents/VAR.nc'
If there's any looping involved, then the !cp will over write, so only
do that on the first iteration of the loop to initialize the file, and
append all the rest. -A does the append, and -h prevents a history
line in the netcdf metadata. I was looping over many vars, and this
history was getting too big.
Hope this helps and have a great weekend!!
Mike
>
> Best Regards
> F.Daryabor
>
> On Wed, Sep 16, 2009 at 12:55 PM, Farshid Daryabor
> <fdaryabor at googlemail.com> wrote:
>>
>> Hi Eric Altshuler
>> Thanks so much for your guide. I try download grads 2.0.a3.
>> Best Regards
>> F.Daryabor
>>
>> On Tue, Sep 15, 2009 at 11:49 AM, Eric Altshuler <ela at cola.iges.org>
>> wrote:
>>>
>>> Hello Farshid,
>>>
>>> sdfwrite is not a script. It's a built-in command, and you need grads
>>> 2.0.a3 or higher to use it. You mentioned that you use the grads executable
>>> 'gradsc'. This means you are using an old version of grads. Beginning with
>>> grads 2.0, the 'gradsc' executable does not exist anymore. There are only
>>> two grads executables, 'grads' and 'gradsdap'. Get the latest version of
>>> grads; the sdfwrite command will be available.
>>>
>>> Best regards,
>>>
>>> Eric L. Altshuler
>>> Assistant Research Scientist
>>> Center for Ocean-Land-Atmosphere Studies
>>> 4041 Powder Mill Road, Suite 302
>>> Calverton, MD 20705-3106
>>> USA
>>>
>>> E-mail: ela at cola.iges.org
>>> Phone: (301) 902-1257
>>> Fax: (301) 595-9793
>>>
>>> ----- Original Message -----
>>> From: "Farshid Daryabor" <fdaryabor at GOOGLEMAIL.COM>
>>> To: GRADSUSR at LIST.CINECA.IT
>>> Sent: Tuesday, September 15, 2009 5:19:37 AM GMT -05:00 US/Canada Eastern
>>> Subject: Re: command in GrADS 2.0.a5.oga.5
>>>
>>> Hi
>>> I try for downloading 'sdfwrite' script from "
>>> http://www.iges.org/grads/gadoc/library.html " but can't find it, because
>>> when I open 'my_data.ctl' in './gradsc' I face to following massage:
>>>
>>> ga-> open /home/Arya/fDaryabor/Roms_tools/Run/binary2netcdf.ctl
>>> Scanning description file:
>>> /home/Arya/fDaryabor/Roms_tools/Run/binary2netcdf.ctl
>>> Data file /home/Arya/fDaryabor/Roms_tools/Run/emp.dat is open as file 1
>>> LON set to 0 360
>>> LAT set to 180 359
>>> LEV set to 0 0
>>> Time values set: 1960:1:16:5 1960:1:16:5
>>> ga-> set lon 98 120
>>> LON set to 98 120
>>> ga-> set lat -10 20
>>> LAT set to -10 20
>>> ga-> set t 05z16jan1960 1mo
>>> Time values set: 1960:5:16:5 1960:1:16:5
>>> ga-> set sdfwrite /home/Arya/Desktop/EMP.nc
>>> SET error: Invalid operand
>>> Operand = sdfwrite /home/arya/desktop/ emp.nc
>>> I think must download "sdfwrite" script, please you help me, and give me
>>> straight address for find it.
>>> Best Regards
>>> F.Daryabor
>>>
>>>
>>>
>>> On Tue, Sep 15, 2009 at 4:03 PM, çæ°¸ç« < rust123 at yahoo.cn > wrote:
>>>
>>>
>>>
>>>
>>>
>>> hello,everyone
>>> what are the shortcut keys of the copy and paste command in GrADS
>>> 2.0.a5.oga.5,thank you in advance.the shfit+insert could not be used in the
>>> windows xp.
>>>
>>>
>>>
>>>
>>> åä»¶äººï¼ hersala < hersala at GMAIL.COM >
>>> æ¶ä»¶äººï¼ GRADSUSR at LIST.CINECA.IT
>>> å·²åéï¼ 2009/9/15(å¨äº), �¸ å12:32:44
>>> 主é¢ï¼ Re: GS files in GrADS 2.0.a5.oga.5
>>>
>>> Hi Hyacinth:
>>> When I use my own scripts or from another person, I save them in the same
>>> folder from where the data is read by GrADS, that is win32 folder.
>>> I hope this help you.
>>> Bye,
>>> Hern�n
>>>
>>>
>>> 2009/9/13 Hyacinth Cyprain Nnamchi < hc.nnamchi at lasg.iap.ac.cn >
>>>
>>>
>>> Dear Colleagues,
>>>
>>> I am using GrADS 2.0.a5.oga.5 from the Opengrads download page (
>>> http://sourceforge.net/projects/opengrads/files/ ) on MS Windows.I notice
>>> that it does not recognise the in-built .gs files like cbar.gs , cbarn.gs
>>> etc, although I have confirmed that they are in the "scripts" file.
>>>
>>> Does anyone know what could be wrong, where should I place the .gs files?
>>>
>>>
>>> Thanks,
>>> hyacinth
>>>
>>>
>>>
>>>
>>> --
>>>
>>> Hyacinth C. Nnamchi
>>> TWAS-CAS Fellow
>>> State Key Laboratory of Numerical Modeling for
>>> Atmospheric Sciences and Geophysical Fluid Dynamics (LASG)
>>> Institute of Atmospheric Physics (IAP)
>>> Chinese Academy of Sciences (CAS)
>>> P.O.Box 9804, Beijing 100029, China
>>> Tel: +86-13488719702
>>> Fax: +86-10-82995172
>>> E-mail:hc.nnamchi at lasg.iap.ac.cn
>>>
>>>
>>>
>>> 好ç©è´ºå¡ç�½ åï¼é®ç®±è´ºå¡å
¨æ°ï¿½Â¸ 线ï¼
>>
>
>
More information about the gradsusr
mailing list