<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'>Dear Andrew,<BR> <BR>Thank you for your reply. Finally I could get the result and the script is as follows. I just changed r1= subwrd(result, 4) to r1= subwrd(result,1 4).<BR> <BR> <BR><div>'reinit'<br>'sdfopen H:/prate.sfc.mon.mean.nc'<br>'set lat 6.66'<br>'set lon 99.375'<br>'d ave(prate,t=517,t=636)'<br>r1= subwrd(result,1 4)<br>say r1<br>'close 1'</div><div> </div><div>Regards,<BR>Thareh<BR><br><br>> Message: 1<br>> Date: Sat, 4 Oct 2014 23:21:07 +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: <630FFD43-E9AF-487C-8833-3DDA857BB752@gmail.com><br>> Content-Type: text/plain; charset=windows-1256<br>> <br>> Hi Thareh,<br>> <br>> To clarify: What is the result of this line (cutting out the ?subwrd?? line) for different lat and lon values?<br>> > 'd ave(prate,t=517,t=636)?<br>> <br>> Does it give the correct answer then?<br>> <br>> I?m not very familiar with the ?subwrd? command, but perhaps that could be causing your issue.<br>> <br>> Andrew<br>> <br>> On Oct 4, 2014, at 7:37 PM, T. haghroosta <haghroosta@hotmail.com> wrote:<br>> <br>> > Dear Andrew,<br>> > Thanks for your help. Unfortunately I couldn't do that. <br>> > I wrote this script to find an average of 10-year sst data from ncep data in every special longitude and latitude.<br>> > <br>> > 'reinit'<br>> > 'sdfopen H:/prate.sfc.mon.mean.nc'<br>> > 'set lat 6.66'<br>> > 'set lon 99.375'<br>> > 'd ave(prate,t=517,t=636)'<br>> > r1= subwrd(result,4)<br>> > say r1<br>> > 'close 1'<br>> > <br>> > But when I change the lon and lat values I always get the same value "3," which is a wrong value.<br>> > <br>> > Could you help me to write a correct script. <br>> > regards,<br>> > Thareh<br>> > <br>> > <br>> > > From: gradsusr-request@gradsusr.org<br>> > > Subject: gradsusr Digest, Vol 56, Issue 6<br>> > > To: gradsusr@gradsusr.org<br>> > > Date: Thu, 2 Oct 2014 12:00:02 -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>> > > <br>> > > <br>> > > ----------------------------------------------------------------------<br>> > > <br>> > > Message: 1<br>> > > Date: Thu, 2 Oct 2014 17:53:50 +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: <DF6903BD-691F-4969-A2B9-EB71CAAC8608@gmail.com><br>> > > Content-Type: text/plain; charset=windows-1256<br>> > > <br>> > > Hi Thareh,<br>> > > <br>> > > Check out the documentation on ASCII data in GrADS to save the averages in a table as you?re looking for.<br>> > > http://www.iges.org/grads/gadoc/ascii.html<br>> > > <br>> > > A related option is to use the OpenGrADS recipe fprintf.gs:<br>> > > http://cookbooks.opengrads.org/index.php?title=Recipe-002:_Saving_GrADS_variable_data_to_a_text_file<br>> > > <br>> > > Andrew<br>> > > <br>> > > On Oct 2, 2014, at 4:58 PM, T. haghroosta <haghroosta@hotmail.com> wrote:<br>> > > <br>> > > > 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>> > > > 99.375        101.25        103.125        105        106.875        108.75        110.625        112.5        114.375        116.25        118.125<br>> > > > 6.66        6.38E-05        1.02E-04        5.36E-05        5.58E-05        6.27E-05        7.12E-05        8.22E-05        8.61E-05        6.89E-05        4.79E-05        4.94E-05<br>> > > > 4.76        5.74E-05        1.11E-04        1.03E-04        6.50E-05        6.75E-05        7.09E-05        8.32E-05        7.41E-05        3.92E-05        1.06E-04        1.07E-04<br>> > > > 2.85        1.30E-04        5.39E-05        1.22E-04        6.92E-05        6.71E-05        6.29E-05        6.39E-05        1.13E-04        9.78E-05        1.06E-04        4.05E-05<br>> > > > 0.95        1.30E-04        1.31E-04        1.36E-04        6.95E-05        6.53E-05        5.40E-05        1.23E-04        1.07E-04        9.03E-05        1.12E-04        1.19E-04<br>> > > > <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>> > > > > 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>> > > > _______________________________________________<br>> > > > gradsusr mailing list<br>> > > > gradsusr@gradsusr.org<br>> > > > http://gradsusr.org/mailman/listinfo/gradsusr<br>> > > <br>> > > <br>> > > <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 6<br>> > > ***************************************<br>> > _______________________________________________<br>> > gradsusr mailing list<br>> > gradsusr@gradsusr.org<br>> > http://gradsusr.org/mailman/listinfo/gradsusr<br>> <br>> <br>> <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 10<br>> ****************************************<br><BR></div>                                            </div></body>
</html>