<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>
Dear Ricardo,<BR> <BR>The script that you helped me to write, was run correctly. Now I would like to calculate the average of one parameter in two different files. I wrote this script, but it doesn't show me any outputs. Could you please tell me what is the problem?<BR> <BR>'reinit'<br>'open E:\test.ctl'<br>'set t 5'<br>'set lat 7'<br>'set lon 107'<br>'define r1= sst'<br>'close 1'<br>'sdfopen sst.nc'<br>'set t 5'<br>'set lat 7'<br>'set lon 107'<br>'define r2= sst'<br>'define aver= (r1+r2)/2'<br>'d aver'<br>Ar=subwrd(result,4)<br>say Ar<BR><br>Regards,<BR> <BR>T. <BR><div><div id="SkyDrivePlaceholder"></div><br>> <br>> <br>> Today's Topics:<br>> <br>> 1. Re: Average in two different time and locations (T. haghroosta)<br>> <br>> <br>> ----------------------------------------------------------------------<br>> <br>> Message: 1<br>> Date: Tue, 5 Feb 2013 16:52:21 +0000<br>> From: "T. haghroosta" <haghroosta@hotmail.com><br>> Subject: Re: [gradsusr] Average in two different time and locations<br>> To: <gradsusr@gradsusr.org><br>> Message-ID: <DUB121-W46FE8940A7C33FF388D9D9DD000@phx.gbl><br>> Content-Type: text/plain; charset="windows-1256"<br>> <br>> <br>> Dear Ricardo, Thank you very much it finally worked.Thank you all other helpers. Regards, T.<br>> <br>> > <br>> > Today's Topics:<br>> > <br>> > 1. Re: problems with the command regrid in my suse (Jeff Duda)<br>> > 2. script to several files (Estefan?a Jim?nez)<br>> > 3. Re: Plot wind vector and magnitude<br>> > (Endalkachew Bekele - NOAA Affiliate)<br>> > 4. Re: Average in two different time and locations (Ricardo Hallak)<br>> > <br>> > <br>> > ----------------------------------------------------------------------<br>> > <br>> > Message: 1<br>> > Date: Tue, 5 Feb 2013 09:56:00 -0600<br>> > From: Jeff Duda <jeffduda319@gmail.com><br>> > Subjec
t: Re: [gradsusr] problems with the command regrid in my suse<br>> > To: GrADS Users Forum <gradsusr@gradsusr.org><br>> > Message-ID:<br>> >         <CAAig09Bo-9SPKQaDTY17CmZ6oZDe946meEGcLAYnkSK8CapfFg@mail.gmail.com><br>> > Content-Type: text/plain; charset="iso-8859-1"<br>> > <br>> > If you're using Grads (not opengrads) then those functions defined outside<br>> > of Grads will not be available to you. You can use the lterp() function,<br>> > however. It should do the same thing as regrid().<br>> > <br>> > Jeff Duda<br>> > <br>> > On Tue, Feb 5, 2013 at 9:28 AM, decker guzman <deckerfis@gmail.com> wrote:<br>> > <br>> > > * *I want to regrid my data and I am using GrADS Version 2.0.1 (not opengrads in<br>> > > windows). I have tried<br>> > > "regrid(uwnd,2.5,2.5)"," regrid2(uwnd,2.5,2.5)" and "re(uwnd,2.5,2.5)" .<br>> > ><br>> > > However error messages were displayed and said 'regrid' not a variable<br>> > > or function name , 'regrid2' not a variable or function name and 're'<br>> > > not a variable or function name respectively..<br>> > > could someone help me please?<br>> > ><br>> > > Decker<br>> > ><br>> > ><br>> > > _______________________________________________<br>> > > gradsusr mailing list<br>> > > gradsusr@gradsusr.org<br>> > > http://gradsusr.org/mailman/listinfo/gradsusr<br>> > ><br>> > ><br>> > <br>> > <br>> > -- <br>> > Jeff Duda<br>> > Graduate research assistant<br>> > University of Oklahoma School of Meteorology<br>> > Center for Analysis and Prediction of Storms<br>> > -------------- next part --------------<br>> > An HTML attachment was scrubbed...<br>> > URL: http://gradsusr.org/pipermail/gradsusr/attachments/20130205/d8e0e633/attachment-0001.html <br>> > <br>> > --
----------------------------<br>> > <br>> > Message: 2<br>> > Date: Tue, 5 Feb 2013 10:07:59 -0600<br>> > From: Estefan?a Jim?nez <estefaniajimenez.r@gmail.com><br>> > Subject: [gradsusr] script to several files<br>> > To: GrADS Users Forum <gradsusr@gradsusr.org><br>> > Message-ID:<br>> >         <CAL2qOoLeAmwUdTDXuw6ydDakmqxyTT07kBnsGBzQNJNNLBCiOg@mail.gmail.com><br>> > Content-Type: text/plain; charset="iso-8859-1"<br>> > <br>> > Hi all! How can I do to do a script that plots and saves the same image for<br>> > several files? For example, I have 30 files that I need to get the rain in<br>> > an image and save it... I have the script for one file but how can I change<br>> > it to make it work for all the 30 files? So I don't have to run the script<br>> > 30 times...<br>> > <br>> > Thanks!<br>> > <br>> > -- <br>> > *Estefan?a Jim?nez R.*<br>> > -------------- next part --------------<br>> > An HTML attachment was scrubbed...<br>> > URL: http://gradsusr.org/pipermail/gradsusr/attachments/20130205/a1e0f309/attachment-0001.html <br>> > <br>> > ------------------------------<br>> > <br>> > Message: 3<br>> > Date: Tue, 5 Feb 2013 11:17:01 -0500<br>> > From: Endalkachew Bekele - NOAA Affiliate<br>> >         <endalkachew.bekele@noaa.gov><br>> > Subject: Re: [gradsusr] Plot wind vector and magnitude<br>> > To: beregassa@gmail.com, GrADS Users Forum <gradsusr@gradsusr.org><br>> > Message-ID:<br>> >         <CAN1MjmeSJYMdgLoS_VR4he3ZsjLj7ZL-W4+MziUyRC90e=4THg@mail.gmail.com><br>> > Content-Type: text/plain; charset="iso-8859-1"<br>> > <br>> > hi Bedasa,<br>> > <br>> > How are you doing?<br>> > <br>> > I hope all is well in Arba Minch.<br>> > <br>> > I saw your script, and I have attempted to edit it a little bit:<br>> > <br>> > reinit'<br>&
gt; > 'set display color white'<br>> > 'c'<br>> > 'set grid off'<br>> > 'set grads off'<br>> > 'sdfopen v850.nc'<br>> > 'sdfopen u850.nc'<br>> > 'set mpdset hires'<br>> > 'set lat -40 40'<br>> > 'set lon -180 180'<br>> > i=1<br>> > while(i<=3)<br>> > 'set t 'i<br>> > 'set gxout shaded'<br>> > 'd mag(v850.1,u850.2)'<br>> > 'set gxout vector'<br>> > 'd v850.1;u850.2'<br>> > pull pause<br>> > 'c'<br>> > i=i+1<br>> > end while<br>> > <br>> > This will pause you display until you hit the enter key. Then it will take<br>> > you the next time step. agin it will pause, and when you hit the enter key<br>> > it will take you to the last (third) time step.<br>> > <br>> > Let me know if you are nor able to run it.<br>> > <br>> > Blessings,<br>> > Endalkachew<br>> > <br>> > <br>> > <br>> > <br>> > <br>> > On Tue, Feb 5, 2013 at 8:59 AM, Bedassa Regassa <beregassa@gmail.com> wrote:<br>> > <br>> > ><br>> > ><br>> > > Hello, I try to write the following script to plot wind vector and<br>> > > magnitude. But, I can't see the wind magnitude. I like a comment on my<br>> > > script here is attached<br>> > > 'reinit'<br>> > > 'set display color white'<br>> > > 'c'<br>> > > 'set grid off'<br>> > > 'set grads off'<br>> > > 'sdfopen v850.nc'<br>> > > 'sdfopen u850.nc'<br>> > > 'set mpdset hires'<br>> > > 'set lat -40 40'<br>> > > 'set lon -180 180'<br>> > > 'set t 1 3'<br>> > > 'set gxout shaded'<br>> > > 'd mag(v850.1,u850.2)'<br>> > > 'set gxout vector'<br>> > > 'd v850.1;u850.2'<br>> > ><br>> > > Thank you.<br>> > ><br>> > > Sincerely,<br>> > ><br>> > > Bedassa<br>> > ><br>&g
t; > > _______________________________________________<br>> > > gradsusr mailing list<br>> > > gradsusr@gradsusr.org<br>> > > http://gradsusr.org/mailman/listinfo/gradsusr<br>> > ><br>> > ><br>> > <br>> > <br>> > -- <br>> > -----------------------------------------------------------------------------------<br>> > Endalkachew Bekele<br>> > NOAA Center for Weather and Climate Prediction / African Desk<br>> > 5830 University Research Court, Rm 3149<br>> > College Park, Maryland 20740<br>> > Tel: (301) 683-3459<br>> > e-mail: endalkachew.bekele@noaa.gov<br>> > -------------- next part --------------<br>> > An HTML attachment was scrubbed...<br>> > URL: http://gradsusr.org/pipermail/gradsusr/attachments/20130205/fd9fff5f/attachment-0001.html <br>> > <br>> > ------------------------------<br>> > <br>> > Message: 4<br>> > Date: Tue, 5 Feb 2013 13:25:51 -0300<br>> > From: "Ricardo Hallak" <hallak@model.iag.usp.br><br>> > Subject: Re: [gradsusr] Average in two different time and locations<br>> > To: GrADS Users Forum <gradsusr@gradsusr.org><br>> > Message-ID: <20130205155234.M10066@model.iag.usp.br><br>> > Content-Type: text/plain; charset="iso-8859-1"<br>> > <br>> > Hi,<br>> > <br>> > one suggestion is to add something like: <br>> > AT=subwrd(result,4)<br>> > after:<br>> > 'd aveT'<br>> > in your script below. This will capture the aveT information in a new script variable named AT.<br>> > Now you can handle AT. For example, you can display AT in the terminal screen adding:<br>> > say AT<br>> > <br>> > in your script.<br>> > <br>> > Or you can plot AT (a single value) on the map using, for example:<br>> > <br>> > 'draw string X Y 'AT<br>> > <br>> > NOTE: every quote and blank space in the lines above or below a
re essential. Let me put the entire script here:<br>> > <br>> > 'set t 1'<br>> > 'set lat 35'<br>> > 'set lon 90'<br>> > 'define T1= T'<br>> > 'set t 2'<br>> > 'set lat 20'<br>> > 'set lon 72'<br>> > 'define T2=T'<br>> > 'define aveT=(T1+T2)*0.5'<br>> > 'd aveT'<br>> > AT=subwrd(result,4)<br>> > say AT<br>> > <br>> > Again, you can "draw" the most recent value of AT on the map, if you want, converting world coordinates (lon,lat) to (x,y) coordinates. (x,y) are the distance of a (x,y) point from the (0,0), that is, the southwestern point of the display window (in inchs of the GrADS page). For example, assuming your data has 200 x 200 points, you can add these lines in your script:<br>> > <br>> > 'set x 1 200'<br>> > 'set y 1 200'<br>> > 'd T'<br>> > 'q w2xy 55 81'<br>> > xpoint=subwrd(result,3)<br>> > ypoint=subwrd(result,6)<br>> > 'draw string 'xpoint'? 'ypoint'? 'AT<br>> > <br>> > This will plot the AT value? at the the point (xpoint,ypoint) over a T field map, where 55 and 81 arethe averages of the longitude and latitude, respectively. Of course, you can chose whatever point you want in the 2D map.<br>> > <br>> > Greetings,<br>> > Ricardo<br>> > <br><br></div>                                            </div></body>
</html>