<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Hi,<BR> <BR>Unfortunately, It didn't work for my aim. In fact, I would like to have the average over the time but in every grid point (according to different lon and lat) separately. To show what kind of average I need is like a matrix as follows. each number is the averaged data during 10 years (t= 517 to t=643), based on Ncep data set. Can anyone help?<BR> <BR> <BR><table width="757" style="width: 565pt; border-collapse: collapse;" border="0" cellspacing="0" cellpadding="0"><font face="Times New Roman">
</font><colgroup><col width="63" style="width: 47pt; mso-width-source: userset; mso-width-alt: 2304;"><font face="Times New Roman">
</font><col width="64" style="width: 48pt;"><font face="Times New Roman">
</font><col width="63" style="width: 47pt; mso-width-source: userset; mso-width-alt: 2304;"><font face="Times New Roman">
</font><col width="63" style="width: 47pt; mso-width-source: userset; mso-width-alt: 2304;" span="9"><font face="Times New Roman">
</font><tbody><tr height="20" style="height: 15pt; mso-height-source: userset;"><font face="Times New Roman">
</font><td width="63" height="20" style="border: 0px black; width: 47pt; height: 15pt; background-color: transparent;"></td><font face="Times New Roman">
</font><td width="64" align="right" class="xl66" style="border: 0px black; width: 48pt; background-color: transparent;"><strong>99.375</strong></td><font face="Times New Roman">
</font><td width="63" align="right" class="xl66" style="border: 0px black; width: 47pt; background-color: transparent;"><strong>101.25</strong></td><font face="Times New Roman">
</font><td width="63" align="right" class="xl66" style="border: 0px black; width: 47pt; background-color: transparent;"><strong>103.125</strong></td><font face="Times New Roman">
</font><td width="63" align="right" class="xl66" style="border: 0px black; width: 47pt; background-color: transparent;"><strong>105</strong></td><font face="Times New Roman">
</font><td width="63" align="right" class="xl66" style="border: 0px black; width: 47pt; background-color: transparent;"><strong>106.875</strong></td><font face="Times New Roman">
</font><td width="63" align="right" class="xl66" style="border: 0px black; width: 47pt; background-color: transparent;"><strong>108.75</strong></td><font face="Times New Roman">
</font><td width="63" align="right" class="xl66" style="border: 0px black; width: 47pt; background-color: transparent;"><strong>110.625</strong></td><font face="Times New Roman">
</font><td width="63" align="right" class="xl66" style="border: 0px black; width: 47pt; background-color: transparent;"><strong>112.5</strong></td><font face="Times New Roman">
</font><td width="63" align="right" class="xl66" style="border: 0px black; width: 47pt; background-color: transparent;"><strong>114.375</strong></td><font face="Times New Roman">
</font><td width="63" align="right" class="xl66" style="border: 0px black; width: 47pt; background-color: transparent;"><strong>116.25</strong></td><font face="Times New Roman">
</font><td width="63" align="right" class="xl66" style="border: 0px black; width: 47pt; background-color: transparent;"><strong>118.125</strong></td><font face="Times New Roman">
</font></tr><font face="Times New Roman">
</font><tr height="20" style="height: 15pt;"><font face="Times New Roman">
</font><td height="20" align="right" class="xl66" style="border: 0px black; height: 15pt; background-color: transparent;"><strong>6.66</strong></td><font face="Times New Roman">
</font><td align="right" class="xl67" style="border: 0px black; background-color: transparent;">6.38E-05</td><font face="Times New Roman">
</font><td align="right" class="xl67" style="border: 0px black; background-color: transparent;">1.02E-04</td><font face="Times New Roman">
</font><td align="right" class="xl67" style="border: 0px black; background-color: transparent;">5.36E-05</td><font face="Times New Roman">
</font><td align="right" class="xl67" style="border: 0px black; background-color: transparent;">5.58E-05</td><font face="Times New Roman">
</font><td align="right" class="xl67" style="border: 0px black; background-color: transparent;">6.27E-05</td><font face="Times New Roman">
</font><td align="right" class="xl67" style="border: 0px black; background-color: transparent;">7.12E-05</td><font face="Times New Roman">
</font><td align="right" class="xl67" style="border: 0px black; background-color: transparent;">8.22E-05</td><font face="Times New Roman">
</font><td align="right" class="xl67" style="border: 0px black; background-color: transparent;">8.61E-05</td><font face="Times New Roman">
</font><td align="right" class="xl67" style="border: 0px black; background-color: transparent;">6.89E-05</td><font face="Times New Roman">
</font><td align="right" class="xl67" style="border: 0px black; background-color: transparent;">4.79E-05</td><font face="Times New Roman">
</font><td align="right" class="xl67" style="border: 0px black; background-color: transparent;">4.94E-05</td><font face="Times New Roman">
</font></tr><font face="Times New Roman">
</font><tr height="20" style="height: 15pt;"><font face="Times New Roman">
</font><td height="20" align="right" class="xl66" style="border: 0px black; height: 15pt; background-color: transparent;"><strong>4.76</strong></td><font face="Times New Roman">
</font><td align="right" class="xl67" style="border: 0px black; background-color: transparent;">5.74E-05</td><font face="Times New Roman">
</font><td align="right" class="xl67" style="border: 0px black; background-color: transparent;">1.11E-04</td><font face="Times New Roman">
</font><td align="right" class="xl67" style="border: 0px black; background-color: transparent;">1.03E-04</td><font face="Times New Roman">
</font><td align="right" class="xl67" style="border: 0px black; background-color: transparent;">6.50E-05</td><font face="Times New Roman">
</font><td align="right" class="xl67" style="border: 0px black; background-color: transparent;">6.75E-05</td><font face="Times New Roman">
</font><td align="right" class="xl67" style="border: 0px black; background-color: transparent;">7.09E-05</td><font face="Times New Roman">
</font><td align="right" class="xl67" style="border: 0px black; background-color: transparent;">8.32E-05</td><font face="Times New Roman">
</font><td align="right" class="xl67" style="border: 0px black; background-color: transparent;">7.41E-05</td><font face="Times New Roman">
</font><td align="right" class="xl67" style="border: 0px black; background-color: transparent;">3.92E-05</td><font face="Times New Roman">
</font><td align="right" class="xl67" style="border: 0px black; background-color: transparent;">1.06E-04</td><font face="Times New Roman">
</font><td align="right" class="xl67" style="border: 0px black; background-color: transparent;">1.07E-04</td><font face="Times New Roman">
</font></tr><font face="Times New Roman">
</font><tr height="20" style="height: 15pt;"><font face="Times New Roman">
</font><td height="20" align="right" class="xl66" style="border: 0px black; height: 15pt; background-color: transparent;"><strong>2.85</strong></td><font face="Times New Roman">
</font><td align="right" class="xl67" style="border: 0px black; background-color: transparent;">1.30E-04</td><font face="Times New Roman">
</font><td align="right" class="xl67" style="border: 0px black; background-color: transparent;">5.39E-05</td><font face="Times New Roman">
</font><td align="right" class="xl67" style="border: 0px black; background-color: transparent;">1.22E-04</td><font face="Times New Roman">
</font><td align="right" class="xl67" style="border: 0px black; background-color: transparent;">6.92E-05</td><font face="Times New Roman">
</font><td align="right" class="xl67" style="border: 0px black; background-color: transparent;">6.71E-05</td><font face="Times New Roman">
</font><td align="right" class="xl67" style="border: 0px black; background-color: transparent;">6.29E-05</td><font face="Times New Roman">
</font><td align="right" class="xl67" style="border: 0px black; background-color: transparent;">6.39E-05</td><font face="Times New Roman">
</font><td align="right" class="xl67" style="border: 0px black; background-color: transparent;">1.13E-04</td><font face="Times New Roman">
</font><td align="right" class="xl67" style="border: 0px black; background-color: transparent;">9.78E-05</td><font face="Times New Roman">
</font><td align="right" class="xl67" style="border: 0px black; background-color: transparent;">1.06E-04</td><font face="Times New Roman">
</font><td align="right" class="xl67" style="border: 0px black; background-color: transparent;">4.05E-05</td><font face="Times New Roman">
</font></tr><font face="Times New Roman">
</font><tr height="20" style="height: 15pt;"><font face="Times New Roman">
</font><td height="20" align="right" class="xl66" style="border: 0px black; height: 15pt; background-color: transparent;"><strong>0.95</strong></td><font face="Times New Roman">
</font><td align="right" class="xl67" style="border: 0px black; background-color: transparent;">1.30E-04</td><font face="Times New Roman">
</font><td align="right" class="xl67" style="border: 0px black; background-color: transparent;">1.31E-04</td><font face="Times New Roman">
</font><td align="right" class="xl67" style="border: 0px black; background-color: transparent;">1.36E-04</td><font face="Times New Roman">
</font><td align="right" class="xl67" style="border: 0px black; background-color: transparent;">6.95E-05</td><font face="Times New Roman">
</font><td align="right" class="xl67" style="border: 0px black; background-color: transparent;">6.53E-05</td><font face="Times New Roman">
</font><td align="right" class="xl67" style="border: 0px black; background-color: transparent;">5.40E-05</td><font face="Times New Roman">
</font><td align="right" class="xl67" style="border: 0px black; background-color: transparent;">1.23E-04</td><font face="Times New Roman">
</font><td align="right" class="xl67" style="border: 0px black; background-color: transparent;">1.07E-04</td><font face="Times New Roman">
</font><td align="right" class="xl67" style="border: 0px black; background-color: transparent;">9.03E-05</td><font face="Times New Roman">
</font><td align="right" class="xl67" style="border: 0px black; background-color: transparent;">1.12E-04</td><font face="Times New Roman">
</font><td align="right" class="xl67" style="border: 0px black; background-color: transparent;">1.19E-04</td><font face="Times New Roman">
</font></tr><font face="Times New Roman">
</font></tbody></table> <BR>I have 10*12=120 of tables like this for 10 years with 12 month. I would like to write a script that read the data from a file in each grid point in every month during 10 years and then calculate the average, and show the average in a text file.<BR> <BR>Regards, <BR>Thareh<br> <BR><div>> From: gradsusr-request@gradsusr.org<br>> Subject: gradsusr Digest, Vol 56, Issue 4<br>> To: gradsusr@gradsusr.org<br>> Date: Wed, 1 Oct 2014 22:45:15 -0400<br>> <br>> Send gradsusr mailing list submissions to<br>>         gradsusr@gradsusr.org<br>> <br>> To subscribe or unsubscribe via the World Wide Web, visit<br>>         http://gradsusr.org/mailman/listinfo/gradsusr<br>> or, via email, send a message with subject or body 'help' to<br>>         gradsusr-request@gradsusr.org<br>> <br>> You can reach the person managing the list at<br>>         gradsusr-owner@gradsusr.org<br>> <br>> When replying, please edit your Subject line so it is more specific<br>> than "Re: Contents of gradsusr digest..."<br>> <br>> <br>> Today's Topics:<br>> <br>> 1. Re: Average of a parameter (Andrew Friedman)<br>> 2. Re: Average of a parameter (Mingxuan Chen)<br>> 3. Re: Average of a parameter (Joao Nobre)<br>> 4. How to plot X-Y axis in log scale (Jian-Jian Wang)<br>> 5. Correlation (Jian-Jian Wang)<br>> 6. Correlation (Jian-Jian Wang)<br>> 7. Moist Potential Vorticity (PHILBERT LUHUNGA)<br>> <br>> <br>> ----------------------------------------------------------------------<br>> <br>> Message: 1<br>> Date: Wed, 1 Oct 2014 18:21:42 +0200<br>> From: Andrew Friedman <andfried@gmail.com><br>> Subject: Re: [gradsusr] Average of a parameter<br>> To: GrADS Users Forum <gradsusr@gradsusr.org><br>> Message-ID: <E643D2EE-87B0-4CE5-B290-7C9002C06F4F@gmail.com><br>> Content-Type: text/plain; charset=windows-1256<br>> <br>> Hi Thareh,<br>> As written, your script averages over space, not time.<br>> If you are trying to average over time, you should use an average of the form<br>> ?ave(prate,t=517,t=643)'<br>> Also, if you?re trying to calculate a spatial average, I suggest using ?aave?.<br>> Andrew<br>> <br>> On Oct 1, 2014, at 5:08 PM, T. haghroosta <haghroosta@hotmail.com> wrote:<br>> <br>> > Dear Andrew Friedman,<br>> > Thank you for your help.<br>> > In fact I would like to calculate average of sst during 10 years in special area for example lon=100 120 and lat= 0 7. Then I want to put the result in a text file.<br>> > I wrote this script:<br>> > <br>> > 'reinit'<br>> > 'sdfopen H:/prate.sfc.mon.mean.nc'<br>> > 'set t 517 643'<br>> > 'd ave(ave(prate,lon=100,lon=120),lat=0,lat=7)'<br>> > r1= subwrd(result,4)<br>> > say r1<br>> > 'close 1'<br>> > vars= r1<br>> > res=write('filename3.txt', vars ,append)<br>> > <br>> > but unfortunately I just got one number but I must see too many data. Is it possible to have average of SST during 10 years in special longitude and latitude. I mean I would like to have sst1 ( lon1&lat1), sst2 (lon2&lat2), ..... which averaged during 10 years.<br>> > <br>> > Regards,<br>> > <br>> > Thareh<br>> > <br>> > > Message: 2<br>> > > Date: Wed, 1 Oct 2014 11:10:44 +0200<br>> > > From: Andrew Friedman <andfried@gmail.com><br>> > > Subject: Re: [gradsusr] Average of a parameter<br>> > > To: GrADS Users Forum <gradsusr@gradsusr.org><br>> > > Message-ID: <85BC0AE9-7894-4048-9A70-9126D5993A61@gmail.com><br>> > > Content-Type: text/plain; charset=windows-1256<br>> > > <br>> > > Hi Thareh,<br>> > > Check out the ?ave? command: http://www.iges.org/grads/gadoc/gradfuncave.html<br>> > > Best, Andrew<br>> > > <br>> > > On Oct 1, 2014, at 9:16 AM, T. haghroosta <haghroosta@hotmail.com> wrote:<br>> > > <br>> > > > Dear All,<br>> > > > <br>> > > > Could anyone tell me how I can take the average of a parameter during 10 years? For example I would like to calculate 10-year average of SST in Grads.<br>> > > > <br>> > > > Best regards,<br>> > > > Thareh <br>> > > > _______________________________________________<br>> > > > gradsusr mailing list<br>> > > > gradsusr@gradsusr.org<br>> > > > http://gradsusr.org/mailman/listinfo/gradsusr<br>> > > <br>> > > <br>> > > <br>> > <br>> > _______________________________________________<br>> > gradsusr mailing list<br>> > gradsusr@gradsusr.org<br>> > http://gradsusr.org/mailman/listinfo/gradsusr<br>> <br>> <br>> <br>> <br>> ------------------------------<br>> <br>> Message: 2<br>> Date: Wed, 1 Oct 2014 12:07:45 -0600<br>> From: Mingxuan Chen <chen@atmos.colostate.edu><br>> Subject: Re: [gradsusr] Average of a parameter<br>> To: GrADS Users Forum <gradsusr@gradsusr.org><br>> Message-ID: <7F53D3A4-970D-4C0E-ACB0-4B1919866950@atmos.colostate.edu><br>> Content-Type: text/plain; charset=windows-1256<br>> <br>> See you at Parking lot.<br>> On Oct 1, 2014, at 10:21 AM, Andrew Friedman <andfried@gmail.com> wrote:<br>> <br>> > Hi Thareh,<br>> > As written, your script averages over space, not time.<br>> > If you are trying to average over time, you should use an average of the form<br>> > ?ave(prate,t=517,t=643)'<br>> > Also, if you?re trying to calculate a spatial average, I suggest using ?aave?.<br>> > Andrew<br>> > <br>> > On Oct 1, 2014, at 5:08 PM, T. haghroosta <haghroosta@hotmail.com> wrote:<br>> > <br>> >> Dear Andrew Friedman,<br>> >> Thank you for your help.<br>> >> In fact I would like to calculate average of sst during 10 years in special area for example lon=100 120 and lat= 0 7. Then I want to put the result in a text file.<br>> >> I wrote this script:<br>> >> <br>> >> 'reinit'<br>> >> 'sdfopen H:/prate.sfc.mon.mean.nc'<br>> >> 'set t 517 643'<br>> >> 'd ave(ave(prate,lon=100,lon=120),lat=0,lat=7)'<br>> >> r1= subwrd(result,4)<br>> >> say r1<br>> >> 'close 1'<br>> >> vars= r1<br>> >> res=write('filename3.txt', vars ,append)<br>> >> <br>> >> but unfortunately I just got one number but I must see too many data. Is it possible to have average of SST during 10 years in special longitude and latitude. I mean I would like to have sst1 ( lon1&lat1), sst2 (lon2&lat2), ..... which averaged during 10 years.<br>> >> <br>> >> Regards,<br>> >> <br>> >> Thareh<br>> >> <br>> >>> Message: 2<br>> >>> Date: Wed, 1 Oct 2014 11:10:44 +0200<br>> >>> From: Andrew Friedman <andfried@gmail.com><br>> >>> Subject: Re: [gradsusr] Average of a parameter<br>> >>> To: GrADS Users Forum <gradsusr@gradsusr.org><br>> >>> Message-ID: <85BC0AE9-7894-4048-9A70-9126D5993A61@gmail.com><br>> >>> Content-Type: text/plain; charset=windows-1256<br>> >>> <br>> >>> Hi Thareh,<br>> >>> Check out the ?ave? command: http://www.iges.org/grads/gadoc/gradfuncave.html<br>> >>> Best, Andrew<br>> >>> <br>> >>> On Oct 1, 2014, at 9:16 AM, T. haghroosta <haghroosta@hotmail.com> wrote:<br>> >>> <br>> >>>> Dear All,<br>> >>>> <br>> >>>> Could anyone tell me how I can take the average of a parameter during 10 years? For example I would like to calculate 10-year average of SST in Grads.<br>> >>>> <br>> >>>> Best regards,<br>> >>>> Thareh <br>> >>>> _______________________________________________<br>> >>>> gradsusr mailing list<br>> >>>> gradsusr@gradsusr.org<br>> >>>> http://gradsusr.org/mailman/listinfo/gradsusr<br>> >>> <br>> >>> <br>> >>> <br>> >> <br>> >> _______________________________________________<br>> >> gradsusr mailing list<br>> >> gradsusr@gradsusr.org<br>> >> http://gradsusr.org/mailman/listinfo/gradsusr<br>> > <br>> > <br>> > _______________________________________________<br>> > gradsusr mailing list<br>> > gradsusr@gradsusr.org<br>> > http://gradsusr.org/mailman/listinfo/gradsusr<br>> <br>> <br>> <br>> <br>> ------------------------------<br>> <br>> Message: 3<br>> Date: Wed, 1 Oct 2014 23:04:29 +0300<br>> From: Joao Nobre <j.pnobre@hotmail.com><br>> Subject: Re: [gradsusr] Average of a parameter<br>> To: GrADS Users Forum <gradsusr@gradsusr.org><br>> Message-ID: <SNT148-W402759BEBC5A3BEBD441158FB80@phx.gbl><br>> Content-Type: text/plain; charset="windows-1252"<br>> <br>> First, you should go to this site and next you can make a plot on GrADS, using the normal Scripts or Codes, if you prefer!Name of site http://www.esrl.noaa.gov/psd/cgi-bin/db_search/SearchMenus.pl<br>> <br>> > From: andfried@gmail.com<br>> > Date: Wed, 1 Oct 2014 11:10:44 +0200<br>> > To: gradsusr@gradsusr.org<br>> > Subject: Re: [gradsusr] Average of a parameter<br>> > <br>> > Hi Thareh,<br>> > Check out the ?ave? command: http://www.iges.org/grads/gadoc/gradfuncave.html<br>> > Best, Andrew<br>> > <br>> > On Oct 1, 2014, at 9:16 AM, T. haghroosta <haghroosta@hotmail.com> wrote:<br>> > <br>> > > Dear All,<br>> > > <br>> > > Could anyone tell me how I can take the average of a parameter during 10 years? For example I would like to calculate 10-year average of SST in Grads.<br>> > > <br>> > > Best regards,<br>> > > Thareh <br>> > > _______________________________________________<br>> > > gradsusr mailing list<br>> > > gradsusr@gradsusr.org<br>> > > http://gradsusr.org/mailman/listinfo/gradsusr<br>> > <br>> > <br>> > _______________________________________________<br>> > gradsusr mailing list<br>> > gradsusr@gradsusr.org<br>> > http://gradsusr.org/mailman/listinfo/gradsusr<br>>                                            <br>> -------------- next part --------------<br>> An HTML attachment was scrubbed...<br>> URL: http://gradsusr.org/pipermail/gradsusr/attachments/20141001/c000739a/attachment-0001.html <br>> <br>> ------------------------------<br>> <br>> Message: 4<br>> Date: Wed, 1 Oct 2014 21:28:19 +0000<br>> From: Jian-Jian Wang <jjwang@umd.edu><br>> Subject: [gradsusr] How to plot X-Y axis in log scale<br>> To: GrADS Users Forum <gradsusr@gradsusr.org><br>> Message-ID: <C270AC74-A859-4A1D-9653-F0114FD66246@umd.edu><br>> Content-Type: text/plain; charset="us-ascii"<br>> <br>> Hi,<br>> <br>> I would like to make a scatterplot in log scale. But seems Grads can only do 1-D at Z dimension?<br>> Any suggestions?<br>> <br>> Thanks!<br>> <br>> Jay<br>> <br>> <br>> ------------------------------<br>> <br>> Message: 5<br>> Date: Wed, 1 Oct 2014 21:32:21 +0000<br>> From: Jian-Jian Wang <jjwang@umd.edu><br>> Subject: [gradsusr] Correlation<br>> To: GrADS Users Forum <gradsusr@gradsusr.org><br>> Message-ID: <90F31DC7-BE47-4DF8-936C-70F475C8BBDA@umd.edu><br>> Content-Type: text/plain; charset="us-ascii"<br>> <br>> Hi,<br>> <br>> When make a scatter plot like:<br>> 'set gxout scatter'<br>> 'd var1 var2'<br>> <br>> It has no problem. Then when I use:<br>> <br>> d scorr(var1, var2, lon=-125, lon=-65, lat=20, lat=50)<br>> <br>> It doesn't show anything. what did I do wrong? <br>> Thanks.<br>> <br>> Jay<br>> <br>> <br>> <br>> ------------------------------<br>> <br>> Message: 6<br>> Date: Wed, 1 Oct 2014 21:46:05 +0000<br>> From: Jian-Jian Wang <jjwang@umd.edu><br>> Subject: [gradsusr] Correlation<br>> To: GrADS Users Forum <gradsusr@gradsusr.org><br>> Message-ID: <68443CE6-7209-4BF1-BC68-F972828F2030@umd.edu><br>> Content-Type: text/plain; charset="us-ascii"<br>> <br>> 'reinit'<br>> 'open npp_swath_test.ctl'<br>> 'open /user/parkin/validation/STAR/SWATH/NMQ/nmq_test.ctl'<br>> 'd scorr(nmq.2, atm.1, lon=-125, lon=-65, lat=20, lat=50)'<br>> <br>> When I run the script in Grads, it won't give me any number.<br>> But if I do it line by line like:<br>> <br>> open npp_swath_test.ctl<br>> open /user/parkin/validation/STAR/SWATH/NMQ/nmq_test.ctl<br>> d scorr(nmq.2, atm.1, lon=-125, lon=-65, lat=20, lat=50)<br>> <br>> it shows: <br>> Result value = 0.426107<br>> <br>> why didn't it show the Result value when running the script?<br>> Thank you in advance.<br>> <br>> Jay<br>> <br>> <br>> <br>> ------------------------------<br>> <br>> Message: 7<br>> Date: Thu, 2 Oct 2014 02:42:33 +0000 (UTC)<br>> From: PHILBERT LUHUNGA <philuhunga@yahoo.com><br>> Subject: [gradsusr] Moist Potential Vorticity<br>> To: "gradsusr@gradsusr.org" <gradsusr@gradsusr.org><br>> Message-ID:<br>>         <1916954210.38931.1412217753822.JavaMail.yahoo@jws10646.mail.bf1.yahoo.com><br>>         <br>> Content-Type: text/plain; charset="utf-8"<br>> <br>> Hi I am writing a script to compute moist potential vorticity using entropy temperature Theta_s, and virtual potential temperature Theta_v. Please help me to check the script if it is coded right. When I drive it, it gives me results but am not sure the way I have coded if it is right. could anyone cross check it?*our script to compute MPV700hPa.<br>> *###################Day1################################<br>> *'open $DATA_DIR/WRF_9KM_Nonhy_Topo${RunDay}.ctl'<br>> 'open 201112200000_arw_wrfout_d01.ctl'<br>> ?<br>> 'q file''q dims''pi=3.14159'<br>> 'dtr=pi/180'<br>> 'a=6.37122*pow(10,6)'<br>> 'omega=7.2921*pow(10,-5)'<br>> 'g=9.81'<br>> 'R=287'<br>> 'Cp=1004.5'<br>> 'L=2.453*pow(10,6)'<br>> *'L=2.453e6'<br>> 'Rv=461'<br>> * tk??? = Temp in Kelvin<br>> * mixr? = water vapour Mixing ratio<br>> * u???? = U-wind in m/s<br>> * v???? = V-wind in m/s<br>> * define ug=UGRDprs?? U-wind in m/s in pressure level<br>> * define vg=VGRDprs? V-wind in m/s in pressure level<br>> *'define ua=U-ug'<br>> *'define va=V-vg'*PV @700hPa<br>> 'set lev 800'<br>> 'define f=2*omega*sin(lat*dtr)'<br>> 'define p1=lev*100'<br>> 'define tk1=TMPprs'<br>> 'define u1=UGRDprs'<br>> 'define v1=VGRDprs'<br>> 'define rh1=rhprs'<br>> 'define thetap1=tk1*pow((100000/p1),0.286)'<br>> 'define es=6.1173*100*exp((L/Rv)*(1/273.16 - 1/tk1))'<br>> 'define ep1=rh1*es/100'<br>> 'WVmixr1=0.622*ep1/(p1)'<br>> 'define T=tk1'<br>> 'define VirT1=T*(1+0.61*WVmixr1)'<br>> 'thetav1=VirT1*pow((100000/p1),0.2857))'<br>> 'thetas1=thetap1*exp(5.87*WVmixr1)''set lev 600'<br>> 'define p2=lev*100'<br>> 'define tk2=TMPprs'<br>> 'define u2=UGRDprs'<br>> 'define v2=VGRDprs'<br>> 'define rh2=rhprs'<br>> 'define thetap2=tk2*pow((100000/p2),0.286)'<br>> 'define es=6.1173*100*exp((L/Rv)*(1/273.16 - 1/tk2))'<br>> 'define ep2=rh2*es/100'<br>> 'WVmixr2=0.622*ep2/(p2)'<br>> 'define T=tk2'<br>> 'define VirT2=T*(1+0.61*WVmixr2)'<br>> 'thetav2=VirT2*pow((100000/p2),0.2857))'<br>> 'thetas2=thetap2*exp(5.87*WVmixr2)'<br>> ********************PV at 700hPa level<br>> 'set lev 700'<br>> 'dp=p2-p1'<br>> 'dudp=(u2-u1)/dp'<br>> 'dvdp=(v2-v1)/dp'<br>> 'define p0=lev*100'<br>> 'define tk0=TMPprs'<br>> 'define u0=UGRDprs'<br>> 'define v0=VGRDprs'<br>> 'vort0=hcurl(u0,v0)'<br>> 'define Totvort=vort0+f''define alpha0=R*tk0/p0'<br>> 'define rh0=rhprs'<br>> 'theta0=tk0*pow((100000/p0),0.2857))'<br>> 'define es=6.1173*100*exp((L/Rv)*(1/273.16 - 1/tk0))'<br>> 'de<br>> fine ep0=rh0*es/100'<br>> 'WVmixr0=0.622*ep0/(p0)'<br>> 'define T=tk0'<br>> 'define VirT0=T*(1+0.61*WVmixr0)'<br>> 'thetav0=VirT0*pow((100000/p0),0.2857))'<br>> 'thetas0=theta0*exp(5.87*WVmixr0)'<br>> 'dy=cdiff(lat,y)*dtr*a'<br>> 'dx=cdiff(lon,x)*dtr*a*cos(lat*dtr)'<br>> 'define dthetas0dx=cdiff(thetas0,x)/dx'<br>> 'define dthetas0dy=cdiff(thetas0,y)/dy'<br>> 'define dthetas0dp=(thetas2-thetas1)/dp'<br>> 'define Totdthedtas=dthetas0dx+dthetas0dy+dthetas0dp''define dthetav0dx=cdiff(thetav0,x)/dx'<br>> 'define dthetav0dy=cdiff(thetav0,y)/dy'<br>> 'define dthetav0dp=(thetav2-thetav1)/dp'<br>> 'define Totdthedtav=dthetav0dx+dthetav0dy+dthetav0dp''term11= -g*Totvort*dthetav0dp*pow(10,6)'<br>> 'term22=-g*dudp*dthetav0dy*pow(10,6)'<br>> 'term33=g*dVdp*dthetav0dx*pow(10,6)'<br>> 'PV7002=term1+term2+term3''term1= -g*Totvort*dthetas0dp*pow(10,6)''term2=-g*dudp*dthetas0dy*pow(10,6)'<br>> 'term3=g*dVdp*dthetas0dx*pow(10,6)'<br>> 'PV700=term1+term2+term3'*'term1=Totvort*dthetas0dp*e6)'<br>> *'term2=dudp*dthetas0dy*e6'<br>> *'term3=-dVdp*dthetas0dx*e6'<br>> 'PV700=term1+term2+term3''set t 7'<br>> 'set gxout shaded'<br>> 'set mpdset hires'<br>> 'set display color white'<br>> 'set vpage 1.0 8.5 2.0 8.5'<br>> 'c'<br>> *'d mp'd<br>> 'd theta_s'<br>> *'exec colors'<br>> *'run colorset.gs'<br>> *'set ylint 12'<br>> *'set xlint 12'<br>> 'cbarhov2.gs'<br>> 'draw title 700hPa-Moist Potential Vorticity ''printim 700_mv.png'<br>> 'set grads off'<br>> *'quit'*'define MV=TotVort*ept(tmpprs,rhprs.prs)'<br>> ??AS EVER<br>> LUHUNGA<br>> <br>> --------------------<br>> Philbert Modest Luhunga<br>> University of Pretoria?<br>> Department of Geography,Geoinformatics and Meteorology<br>> Private Bag X20 Hatfield 0028 South Africa<br>> Tel +27 (0) 12 420 5164<br>> Fax +27 (0) 12 420 6385<br>> Mobile:+ 27826228060<br>> Email address: philuhunga@yahoo.com<br>> -------------- next part --------------<br>> An HTML attachment was scrubbed...<br>> URL: http://gradsusr.org/pipermail/gradsusr/attachments/20141002/51d6cc01/attachment.html <br>> <br>> ------------------------------<br>> <br>> _______________________________________________<br>> gradsusr mailing list<br>> gradsusr@gradsusr.org<br>> http://gradsusr.org/mailman/listinfo/gradsusr<br>> <br>> <br>> End of gradsusr Digest, Vol 56, Issue 4<br>> ***************************************<br></div>                                            </div></body>
</html>