[gradsusr] How to open a .ctl file in a different path
Muhammad Yunus Ahmad Mazuki
ukm.yunus at gmail.com
Tue Dec 18 23:17:13 EST 2012
A control file (.ctl) is a file that tell GrADS how/where to read a data
file (flat binary, netcdf, grib, etc). In a control file the 'dset' is the
path of the data you want to read in the first place. Example, your control
file is on C:\grads\control.ctl . Your data file is E:\Project\data.dat.
You use 'dset E:\Project\data.dat'. Then in your GrADS terminal/window, you
type open 'C:\grads\control.ctl' . GrADS will refer to the control file on
where and how to read your data file.
On Wed, Dec 19, 2012 at 2:16 AM, Jeff Duda <jeffduda319 at gmail.com> wrote:
> What is the exact command you entered, and from what directory?
>
> Jeff
>
>
> On Tue, Dec 18, 2012 at 1:52 AM, T. haghroosta <haghroosta at hotmail.com>wrote:
>
>> I couldn't open it again. I tries but It send me an open error : can't
>> open description file
>>
>> my files path is :
>>
>> E:\WRF\first\test.ctl
>>
>> the test.dat file is also in that path. My grads can read data from own
>> path (C:\grads\data\). How can I write the path of my file in open
>> command?
>>
>> Tahereh
>>
>> > From: gradsusr-request at gradsusr.org
>> > Subject: gradsusr Digest, Vol 34, Issue 40
>> > To: gradsusr at gradsusr.org
>> > Date: Mon, 17 Dec 2012 13:13:24 -0500
>> >
>> > Send gradsusr mailing list submissions to
>> > gradsusr at gradsusr.org
>> >
>> > To subscribe or unsubscribe via the World Wide Web, visit
>> > http://gradsusr.org/mailman/listinfo/gradsusr
>> > or, via email, send a message with subject or body 'help' to
>> > gradsusr-request at gradsusr.org
>> >
>> > You can reach the person managing the list at
>> > gradsusr-owner at gradsusr.org
>> >
>> > W! hen replying, please edit your Subject line so it is more specific
>> > than "Re: Contents of gradsusr digest..."
>> >
>> >
>> > Today's Topics:
>> >
>> > 1. Re: How to open a .ctl file in a different path (Jeff Duda)
>> > 2. Re: looping program (Jeff Duda)
>> >
>> >
>> > ----------------------------------------------------------------------
>> >
>> > Message: 1
>> > Date: Mon, 17 Dec 2012 12:09:27 -0600
>> > From: Jeff Duda <jeffduda319 at gmail.com>
>> > Subject: Re: [gradsusr] How to open a .ctl file in a different path
>> > To: GrADS Users Forum <gradsusr at gradsusr.org>
>> > Message-ID:
>> > <CAAig09Bbh4ir8-Jz7W5iDcYxjgEGpwmiab-nsnkVY_tfm6DWSw at mail.gmail.com>
>> > Content-Type: text/plain; charset="iso-8859-1"
>> >
>> > The full path name of your file can be expressed as
>> >
>> > <Drive name>:\<directories containing file>/<file name>
>> >
>> > So ! in your case, you'd want to reference the control file as
>> > E:\w hatever\whatever\whatever\control_file.ctl.
>> >
>> > Make sure the dset entry in your control file is also changed
>> accordingly.
>> > If the incorrect pathname is specified there, you won't be able to open
>> the
>> > data.
>> >
>> > Jeff Duda
>> >
>> > On Mon, Dec 17, 2012 at 6:30 AM, T. haghroosta <haghroosta at hotmail.com
>> >wrote:
>> >
>> > > Dear All,
>> > >
>> > > I have a .ctl file on my drive E and my grads software is installed
>> on my
>> > > drive c (windows 7). Unfortunately I don't know how can I write "open"
>> > > command to address that file in drive E to open it! Could you please
>> learn
>> > > me?
>> > >
>> > > Regards,
>> > >
>> > > Tahereh
>> > >
>> > > _______________________________________________
>> > > gradsusr mailing list
>> > > gradsusr at gradsusr.org
>> > > http://gradsusr.org/mailman/listinfo/gradsusr
>> > >
>> > >
>> >!
>> >
>> > --
>> > Jeff Duda
>> > Graduate research assistant
>> > University of Oklahoma School of Meteorology
>> > Center for Analysis and Prediction of Storms
>> > -------------- next part --------------
>> > An HTML attachment was scrubbed...
>> > URL:
>> http://gradsusr.org/pipermail/gradsusr/attachments/20121217/8aa433c3/attachment-0001.html
>> >
>> > ------------------------------
>> >
>> > Message: 2
>> > Date: Mon, 17 Dec 2012 12:13:22 -0600
>> > From: Jeff Duda <jeffduda319 at gmail.com>
>> > Subject: Re: [gradsusr] looping program
>> > To: GrADS Users Forum <gradsusr at gradsusr.org>
>> > Message-ID:
>> > <CAAig09BS5=RxxN+830O6F=uo3-FpS7OgwV5=E=Jr5K2gqNFRwA at mail.gmail.com>
>> > Content-Type: text/plain; charset="iso-8859-1"
>> >
>> > Wendi,
>> > Remove LITTLE_ENDIAN from your options line. There's no such option.
>> >
>> > Try displaying ref or vel upon first opening the! file. If your file
>> names
>> > don't match the template strings yo u've set in the DSET line of your
>> > control file, then you will get the "Cannot contour grid" error. Other
>> > than that, your script looks okay. Just make sure you can display all
>> the
>> > base data first before trying to manipulate it.
>> >
>> > Jeff
>> >
>> > On Mon, Dec 17, 2012 at 5:13 AM, wendi harjupa <wendiharjupa at gmail.com
>> >wrote:
>> >
>> > > Dear Mr. Jeff
>> > >
>> > > I have tried the script that you sent but, still I could not do this
>> > > would you please help me more.
>> > >
>> > > Here some question
>> > > 1. Is my control file ok?
>> > > I want to use single control file
>> > > 2. base on my gs and control file below, I got error message
>> > > 'Cannot contour grid - all undefined values'
>> > > 'Cannot plot color bar: No shading information'
>> > > 'No hardcopy metafile open'
>> > > what the meaning of error message??
>> > ! >
>> > > below is control file (*try.ctl)* file
>> > >
>> > > DSET /misc/home/wendi/data1/radar/kototabang/XDR/data/*
>> > > %y4%m2%d2/%d2%h2.dat*
>> > > TITLE RADAR
>> > > OPTIONS TEMPLATE LITTLE_ENDIAN
>> > > UNDEF -1000
>> > > XDEF 321 LINEAR 99.688120996 0.004492369
>> > > YDEF 321 LINEAR -1.083708891 0.004522556
>> > > ZDEF 39 LINEAR 1.0 0.5
>> > > TDEF 300 LINEAR 13:00Z10apr2004 4mn
>> > > VARS 2
>> > > ref 39 99 Reflectivity(dBZ)
>> > > vel 39 99 Doppler Velocity(m/s)
>> > > ENDVARS
>> > >
>> > > this is my gs file (averaging for 2 days only)
>> > >
>> > > 'reinit'
>> > > 'open *try.ctl*'
>> > > 'set grads off'
>> > > 'set mproj latlon'
>> > > 'set mpdset hires'
>> > > 'set gxout shaded'
>> > > 'set lon 100 100.82'
>> > > 'set lat -0.7 0'
>> > > 'set z 5'
>> > &g! t; 'set parea 1 7.5 2.8 8.3'
>> > > 'set clevs 0 5 10 15 20 25 3 0 35 40 45 50 55 60'
>> > > 'set ccols 9 14 4 11 5 13 3 10 7 12 8 2 6'
>> > > 'set t 1 300'
>> > > 'R=pow(10, ref/10)'
>> > >
>> > >
>> 'R1=ave(R,time=13Z10apr2004,time=22Z10apr2004)+ave(R,time=13Z11apr2004,time=22Z11apr2004)'
>> > > 'R2=R1/2'
>> > > 'R3=log10 (R2)'
>> > > 'd 10*R3'
>> > > 'run /misc/home/wendi/grads-2.0.1/cbarn 0.7 0.7 7.4 5.5'
>> > > 'draw string 7.2 8.1 [dBz]'
>> > > 'draw xlab longitude'
>> > > 'draw ylab latitude'
>> > > 'set mproj latlon'
>> > > 'set mpdset hires'
>> > > 'set grid off'
>> > >
>> > > 'close 1'
>> > >
>> > > 'printim baru.gif white'
>> > > 'disable print'
>> > >
>> > > 'close 1'
>> > >
>> > > Thank you very much for your help
>> > > best regards,
>> > > wendi
>> > >
>> > >
>> > >
>> > >
>> > >
>> > > On Sun, Dec 16, 2012 at 7:03 PM, wendi harjupa <!
>> wendiharjupa at gmail.com>wrote:
>> > >
>> > >> Dear Mr. Jeff
>> > >>
>> > >> Thank you very much for your detail explanation
>> > >> I will try it.
>> > >>
>> > >> Best regards,
>> > >> wendi
>> > >>
>> > >>
>> > >> On Sat, Dec 15, 2012 at 2:24 AM, Jeff Duda <jeffduda319 at gmail.com>
>> wrote:
>> > >>
>> > >>> Wendi,
>> > >>> Assuming your radar data are available at the same time every day,
>> > >>> create an overall average and add daily averages to it. Then take
>> the
>> > >>> average of the averages at the end. If you have differing numbers
>> of radar
>> > >>> valid times each day, you should take a weighted average based on
>> the
>> > >>> number of data slices available each day.
>> > >>>
>> > >>> Do you plan to access each day's radar data using a separate control
>> > ! >>> file or using a single control file? This distinction ma kes a
>> difference
>> > >>> in how best to code your script. You could either do it one day at
>> a time,
>> > >>> or sum all days in one line. That is, you could do it like this:
>> > >>>
>> > >>> 'reinit'
>> > >>> 'sumaverage = 0'
>> > >>> dd = 1
>> > >>> while (dd <= 10)
>> > >>> 'open [DAY dd CONTROL FILE]'
>> > >>> 'set grads off'
>> > >>> 'set mproj latlon'
>> > >>> 'set mpdset hires'
>> > >>> 'set gxout shaded'
>> > >>> 'set lon 100 100.82'
>> > >>> 'set lat -0.7 0'
>> > >>> 'set z 3600'
>> > >>> 'set parea 1 7.5 2.8 8.3'
>> > >>> 'set clevs 0 5 10 15 20 25 30 35 40 45 50 55 60'
>> > >>> 'set ccols 9 14 4 11 5 13 3 10 7 12 8 2 6'
>> > >>> 'set t 1 3600'
>> > >>> 'R=pow(10, ref/10)'
>> > >>>
>> > >>> day = d! d + 9
>> > >>> 'R1=ave(R,time=13Z'dd'APR2004,time=22Z'dd'APR2004)'
>> > >>> 'sumaverage = sumaverage + R1'
>> > >>> dd = dd + 1
>> > >>> endwhile
>> > >>> 'average = sumaverage / 10'
>> > >>> ...color table options...
>> > >>> ...map options...
>> > >>> 'd average'
>> > >>> 'printim try.gif white'
>> > >>>
>> > >>> OR like this
>> > >>>
>> > >>> 'reinit'
>> > >>> 'open [ALL INCLUSIVE CONTROL FILE]'
>> > >>> 'set grads off'
>> > >>> 'set mproj latlon'
>> > >>> 'set mpdset hires'
>> > >>> 'set gxout shaded'
>> > >>> 'set lon 100 100.82'
>> > >>> 'set lat -0.7 0'
>> > >>> 'set z 3600'
>> > >>> 'set parea 1 7.5 2.8 8.3'
>> > >>> 'set clevs 0 5 10 15 20 25 30 35 40 45 50 55 60'
>> > >>> 'set c! cols 9 14 4 11 5 13 3 10 7 12 8 2 6'
>> > >>> 'set t 1 360 0'
>> > >>> 'R=pow(10, ref/10)'
>> > >>>
>> > >>>
>> 'R1=ave(R,time=13Z10APR2004,time=22Z10APR2004)+ave(R,time=13Z11APR2004,time=22Z11APR2004)+ave(R,time=13Z12APR2004,time=22Z12APR2004)+ave(R,time=13Z13APR2004,time=22Z13APR2004)+ave(R,time=13Z14APR2004,time=22Z14APR2004)+ave(R,time=13Z15APR2004,time=22Z15APR2004)+ave(R,time=13Z16APR2004,time=22Z16APR2004)+ave(R,time=13Z17APR2004,time=22Z17APR2004)+ave(R,time=13Z18APR2004,time=22Z18APR2004)+ave(R,time=13Z19APR2004,time=22Z19APR2004)'
>> > >>> ...color table options...
>> > >>> ...map options...
>> > >>> 'd R1/10'
>> > >>> 'printim try.gif white'
>> > >>>
>> > >>> Jeff
>> > >>>
>> > >>>
>> > >>> On Fri, Dec 14, 2012 at 12:20 AM, wendi harjupa <
>> wendiharjupa at gmail.com>wrote:
>> > >>>
>> > >>>> Dear Jeff
>> > >>>>
>> > >>>> Thank! you very much for your solution,
>> > >>>>
>> > >>>> I need to make average for 10 days, how to make loop for the next
>> day
>> > >>>> (same time/13-22)??
>> > >>>>
>> > >>>> Best regards,
>> > >>>> On Fri, Dec 14, 2012 at 1:06 PM, Jeff Duda <jeffduda319 at gmail.com
>> >wrote:
>> > >>>>
>> > >>>>> Change the line
>> > >>>>> 'R1=ave(R, t=1, t=3600)'
>> > >>>>>
>> > >>>>> to
>> > >>>>>
>> > >>>>> 'R1=ave(R,time=13Z10APR2004,time=22Z10APR2004)'
>> > >>>>>
>> > >>>>> Jeff Duda
>> > >>>>>
>> > >>>>> On Thu, Dec 13, 2012 at 8:42 PM, wendi harjupa <
>> > >>>>> wendiharjupa at gmail.com> wrote:
>> > >>>>>
>> > >>>>>> Dear Sir/Madam
>> > &g! t;>>>>>
>> > >>>>>> Please I need your help.
>> > >>>>>> I have one set data (10 days data)
>> > >>>>>>
>> > >>>>>> How to make looping to make reflectivity average for only 10
>> hours on
>> > >>>>>> every day (13hrs-22hrs only)??
>> > >>>>>>
>> > >>>>>> Below is my ctl and gs script
>> > >>>>>>
>> > >>>>>> try.ctl
>> > >>>>>>
>> > >>>>>> DSET
>> > >>>>>>
>> /misc/home/wendi/data1/radar/kototabang/XDR/data/%y4%m2%d2/%d2%h2.dat
>> > >>>>>> TITLE RADAR
>> > >>>>>> OPTIONS TEMPLATE LITTLE_ENDIAN
>> > >>>>>> UNDEF -1000
>> > >>>>>> XDEF 321 LINEAR 99.688120996 0.004492369
>> > >>>>>> YDEF 321 LINEAR -1.083708891 0.004522556
>> > >>>>>> ZDEF 39! LINEAR 1.0 0.5
>> > >>>>>> TDEF 3600 LINEAR 00:00Z10apr2004 4mn
>> > >>>>>> VARS 2
>> > >>>>>> ref 39 99 Reflectivity(dBZ)
>> > >>>>>> vel 39 99 Doppler Velocity(m/s)
>> > >>>>>> ENDVARS
>> > >>>>>>
>> > >>>>>>
>> > >>>>>> script.gs
>> > >>>>>>
>> > >>>>>> 'reinit'
>> > >>>>>> 'open try.ctl'
>> > >>>>>> 'set grads off'
>> > >>>>>> 'set mproj latlon'
>> > >>>>>> 'set mpdset hires'
>> > >>>>>> 'set gxout shaded'
>> > >>>>>> 'set lon 100 100.82'
>> > >>>>>> 'set lat -0.7 0'
>> > >>>>>> 'set z 3600'
>> > >>>>>> 'set parea 1 7.5 2.8 8.3'
>> > >>>>>> ! 'set clevs 0 5 10 15 20 25 30 35 40 45 50 55 60'
>> > >>>& gt;>> 'set ccols 9 14 4 11 5 13 3 10 7 12 8 2 6'
>> > >>>>>> 'set t 1 3600'
>> > >>>>>> 'R=pow(10, ref/10)'
>> > >>>>>>
>> > >>>>>> 'R1=ave(R, t=1, t=3600)'
>> > >>>>>> 'set t 1'
>> > >>>>>> 'R2=log10 (R1)'
>> > >>>>>> 'd 10*R2'
>> > >>>>>> 'run /misc/home/wendi/grads-2.0.1/cbarn 0.7 0.7 7.4 5.5'
>> > >>>>>> 'draw string 7.2 8.1 [dBz]'
>> > >>>>>> 'draw xlab longitude'
>> > >>>>>> 'draw ylab latitude'
>> > >>>>>> 'set mproj latlon'
>> > >>>>>> 'set mpdset hires'
>> > >>>>>> 'set grid off'
>> > >>>>>>
>> > >>>>>> 'close 1'
>> > >>>>>>
>> > >>>>>> 'printim try.gif white'
>> > >>>>>! > 'disable print'
>> > >>>>>>
>> > >>>>>> 'close 1'
>> > >>>>>>
>> > >>>>>> Thank you very much for your help
>> > >>>>>>
>> > >>>>>> Best regards,
>> > >>>>>> wendi
>> > >>>>>>
>> > >>>>>>
>> > >>>>>>
>> > >>>>>>
>> > >>>>>>
>> > >>>>>>
>> > >>>>>>
>> > >>>>>>
>> > >>>>>> --
>> > >>>>>> -------------
>> > >>>>>> Wendi Harjupa. ST
>> > >>>>>> Shimane University Graduate School of Engineering Sciences
>> > >>>>>> Department of Electronic Control Systems
>> > >>>>>> Remote Sensing Laboratory
>> > >>>>>> s119447
>> > ! >>>>>> Cellphone : +81-080-4268-6676
>> > >> ;>>>> email : wendi at rslab.riko.shimane-u.ac.jp
>> > >>>>>>
>> > >>>>>>
>> > >>>>>> _______________________________________________
>> > >>>>>> gradsusr mailing list
>> > >>>>>> gradsusr at gradsusr.org
>> > >>>>>> http://gradsusr.org/mailman/listinfo/gradsusr
>> > >>>>>>
>> > >>>>>>
>> > >>>>>
>> > >>>>>
>> > >>>>> --
>> > >>>>> Jeff Duda
>> > >>>>> Graduate research assistant
>> > >>>>> University of Oklahoma School of Meteorology
>> > >>>>> Center for Analysis and Prediction of Storms
>> > >>>>>
>> > >>>>>
>> > >>>>> _______________________________________________
>> > >>>>> gradsusr mailing list
>> > ! >>>>> gradsusr at gradsusr.org
>> > >>>>> http://gradsusr.org/mailman/listinfo/gradsusr
>> > >>>>>
>> > >>>>>
>> > >>>>
>> > >>>>
>> > >>>> --
>> > >>>> -------------
>> > >>>> Wendi Harjupa. ST
>> > >>>> Shimane University Graduate School of Engineering Sciences
>> > >>>> Department of Electronic Control Systems
>> > >>>> Remote Sensing Laboratory
>> > >>>> s119447
>> > >>>> Cellphone : +81-080-4268-6676
>> > >>>> email : wendi at rslab.riko.shimane-u.ac.jp
>> > >>>>
>> > >>>>
>> > >>>> _______________________________________________
>> > >>>> gradsusr mailing list
>> > >>>> gradsusr at gradsusr.org
>> > >>>> http://gradsusr.org/mailman/listinfo/gradsusr
>> > &! gt;>>>
>> > >>>>
>> > >>>
>> > >>>
>> > >>> --
>> > >>> Jeff Duda
>> > >>> Graduate research assistant
>> > >>> University of Oklahoma School of Meteorology
>> > >>> Center for Analysis and Prediction of Storms
>> > >>>
>> > >>>
>> > >>> _______________________________________________
>> > >>> gradsusr mailing list
>> > >>> gradsusr at gradsusr.org
>> > >>> http://gradsusr.org/mailman/listinfo/gradsusr
>> > >>>
>> > >>>
>> > >>
>> > >>
>> > >> --
>> > >> -------------
>> > >> Wendi Harjupa. ST
>> > >> Shimane University Graduate School of Engineering Sciences
>> > >> Department of Electronic Control Systems
>> > >> Remote Sensing Laboratory
>> > >> s119447
>> > >> Cellphone : +81-080-4268-6676
>> > >> email : wendi at rslab.riko.shimane-u.ac.jp
>> >! >>
>> > >>
>> > >
>> > >
>> > > --
>> > > -------------
>> > > Wendi Harjupa. ST
>> > > Shimane University Graduate School of Engineering Sciences
>> > > Department of Electronic Control Systems
>> > > Remote Sensing Laboratory
>> > > s119447
>> > > Cellphone : +81-080-4268-6676
>> > > email : wendi at rslab.riko.shimane-u.ac.jp
>> > >
>> > >
>> > > _______________________________________________
>> > > gradsusr mailing list
>> > > gradsusr at gradsusr.org
>> > > http://gradsusr.org/mailman/listinfo/gradsusr
>> > >
>> > >
>> >
>> >
>> > --
>> > Jeff Duda
>> > Graduate research assistant
>> > University of Oklahoma School of Meteorology
>> > Center for Analysis and Prediction of Storms
>> > -------------- next part --------------
>> > An HTML attachment was scrubbed...
>> > URL: http://gradsusr.org/pipermail/gradsusr/att!
>> achments/20121217/19251fc8/attachment.html
>> >
>> > --------- ---------------------
>> >
>> > _______________________________________________
>> > gradsusr mailing list
>> > gradsusr at gradsusr.org
>> > http://gradsusr.org/mailman/listinfo/gradsusr
>> >
>> >
>> > End of gradsusr Digest, Vol 34, Issue 40
>> > ****************************************
>>
>> _______________________________________________
>> gradsusr mailing list
>> gradsusr at gradsusr.org
>> http://gradsusr.org/mailman/listinfo/gradsusr
>>
>>
>
>
> --
> Jeff Duda
> Graduate research assistant
> University of Oklahoma School of Meteorology
> Center for Analysis and Prediction of Storms
>
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20121219/1a2ec129/attachment-0003.html
More information about the gradsusr
mailing list