sdfwrite [was: Re: command in GrADS 2.0.a5.oga.5]

Farshid Daryabor fdaryabor at GOOGLEMAIL.COM
Wed Sep 23 00:35:53 EDT 2009


Hi Mike
Tanks so much for your replay but when I use 'ncks' I face to following
masage.
Could you please guide me.
ga-> open /home2/fdaryabor/Documents/V.ctl
Scanning description file:  /home2/fdaryabor/Documents/V.ctl
Data file /home2/fdaryabor/Documents/v.dat is open as file 2
ga-> q file 2
File 2 : evaporation mines prescription
  Descriptor: /home2/fdaryabor/Documents/V.ctl
  Binary: /home2/fdaryabor/Documents/v.dat
  Type = Gridded
  Xsize = 360  Ysize = 180  Zsize = 1  Tsize = 12  Esize = 1
  Number of Variables = 1
     v  0  1  v
ga-> set lon 0 360
LON set to 0 360
ga-> set lat 180 359
LAT set to 180 359
ga-> set lev 0 0
LEV set to 0 0
ga-> set t 1 12
Time values set: 1960:1:16:5 1960:12:16:5
ga-> define uwind=u
Define memory allocation size = 6238080 bytes
ga-> define vwind=v.2
Define memory allocation size = 6238080 bytes
ga-> set sdfwrite /home2/fdaryabor/Documents/temp.nc
SDFWrite file name = /home2/fdaryabor/Documents/temp.nc
SDFWrite will replace an existing file
ga-> sdfwrite uwind
Wrote variable uwind to /home2/fdaryabor/Documents/temp.nc
ga-> !cp /home2/fdaryabor/Documents/temp.nc/home2/fdaryabor/Documents/VAR.nc
ga-> sdfwrite vwind
Wrote variable vwind to /home2/fdaryabor/Documents/temp.nc
*ga-> ncks -A -h
/home2/fdaryabor/Documents/temp.nc/home2/fdaryabor/Documents/VAR.nc
Unknown command: ncks*




Best Regards for you
F.Daryabor
On Fri, Sep 18, 2009 at 10:57 PM, Mike Bosilovich <mike.bosilovich at gmail.com
> wrote:

> 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 <E-mail%3Ahc.nnamchi at lasg.iap.ac.cn>
> >>>
> >>>
> >>>
> >>> 好玩贺卡等�½ 发,邮箱贺卡全新�¸ 线!
> >>
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20090923/55698222/attachment.html 


More information about the gradsusr mailing list