[gradsusr] Query Reg Extracting the data in Vertical Levels (Geeta Geeta)

Geeta Geeta geeta124 at hotmail.com
Tue Oct 26 05:13:55 EDT 2010


Hi Jeff, 
thank you. It is working for the dp= constant (50) in my case.

Can you tell me how to go about doing it if I have the pressure levels where dp is not constant. 
Thanks again
geeta



> From: gradsusr-request at gradsusr.org
> Subject: gradsusr Digest, Vol 8, Issue 42
> To: gradsusr at gradsusr.org
> Date: Mon, 25 Oct 2010 10:02:52 -0400
> 
> 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
> 
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of gradsusr digest..."
> 
> 
> Today's Topics:
> 
>    1. Query Reg Extracting the data in Vertical Levels (Geeta Geeta)
>    2. correlation at each grid poing (dhaval.prajapati at iccsir.org)
>    3. Re: Query Reg Extracting the data in Vertical Levels
>       (Jeffrey Duda)
>    4. Creating "Lines" Shapefiles (Stephen McMillan)
>    5. (no subject) (SRAVANI A)
>    6. Re: Max Value Coordinates (Charles Seman)
>    7. (no subject) (Javier G. Corripio)
> 
> 
> ----------------------------------------------------------------------
> 
> Message: 1
> Date: Mon, 25 Oct 2010 08:53:09 +0000
> From: Geeta Geeta <geeta124 at hotmail.com>
> Subject: [gradsusr] Query Reg Extracting the data in Vertical Levels
> To: grads grads <gradsusr at gradsusr.org>
> Message-ID: <BLU152-w18DEC934AD8300BC78E01D8A410 at phx.gbl>
> Content-Type: text/plain; charset="iso-8859-1"
> 
> 
> Dear All, 
> I am trying to extract the SPECIFIC HUMIDITY for all the levels in vertical (19 Levels from 1000 to 100hPa) from the Model. 
> So I am Using tvrh2q function of Grads. Following is the ctl file. 
> 
> 'open test.ctl'
> *'set lev 1000 100'
> 'set t 1'
>  * while (lev< 100)
> *zlev=1000
> 'set gxout fwrite'
> 'set fwrite test.dat'
>  zlev =1000
> 'define tvk=tk(lev='zlev')+0.61*QVAPOR(lev='zlev')*tk(lev='zlev')'
> 'd tvrh2q(tvk(lev='zlev'),rh(lev='zlev'))'
> ************
>  zlev =950
> 'define tvk=tk(lev='zlev')+0.61*QVAPOR(lev='zlev')*tk(lev='zlev')'
> 'd tvrh2q(tvk(lev='zlev'),rh(lev='zlev'))' 
> *'disable fwrite'
> *****************
>  zlev =900
> 'define tvk=tk(lev='zlev')+0.61*QVAPOR(lev='zlev')*tk(lev='zlev')'
> 'd tvrh2q(tvk(lev='zlev'),rh(lev='zlev'))' 
> 'disable fwrite'
> ***********************
> 
> * endwhile
> 
> I am Unable to Extract the data Using the While Statement in Grads, so I am defining the Zlev separately . 
> 
> Kindly Suggest. 
> geeta
> 
>  		 	   		  
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: http://gradsusr.org/pipermail/gradsusr/attachments/20101025/86067578/attachment-0001.html 
> 
> ------------------------------
> 
> Message: 2
> Date: Mon, 25 Oct 2010 10:00:47 +0000
> From: dhaval.prajapati at iccsir.org
> Subject: [gradsusr] correlation at each grid poing
> To: gradsusr at gradsusr.org
> Message-ID: <W58022227159441288000847 at webmail25>
> Content-Type: text/plain; charset="utf-8"
> 
> 
>  Hi,
> 
> I have IMD rainfall data for India ( 1 deg. by 1 deg. Resolution) for 1951 to 2007 in binary format . I have Global Climate Index for the same peiode in text format. Now I want to do correlation analysis at each grid point for rainfall and Climate index and want to plot it in grads.
> How to do it ?
> 
> Thanks in Advance,
> 
> DhavalP. Prajapati
> Indian Centre for Climate and Societal Impacts Research (ICCSIR)
> Ahmedabad Education Society compound,
> Opp. H.L. Commerce College,
> Navrangpura,
> Ahmedabad 380 009,
> Gujarat,
> India
> Contact No. : +91(079)40045462
> 
> 
> 
> 
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: http://gradsusr.org/pipermail/gradsusr/attachments/20101025/2132346d/attachment-0001.html 
> 
> ------------------------------
> 
> Message: 3
> Date: Mon, 25 Oct 2010 09:03:19 -0500
> From: Jeffrey Duda <jdduda at iastate.edu>
> Subject: Re: [gradsusr] Query Reg Extracting the data in Vertical
> 	Levels
> To: GrADS Users Forum <gradsusr at gradsusr.org>
> Message-ID:
> 	<AANLkTik3A7wrCTsc0HhZJT72xtdu4T+j+3FHfaDTCcFh at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
> 
> Geeta,
> The documentation on the tvrh2q function says that it will assume it is at
> the pressure level of the current dimension environment.  I don't see any
> "set lev" commands that are uncommented, so one of the reasons you are not
> getting the data is probably because your pressure level is not set
> correctly.  Nonetheless, I should think the while loop should work just
> fine, but you need to be careful how you set your limits.  If you want to go
> from low levels to upper levels, your while statement should look something
> like
> 
> i = 1 ; zlev = 1000
> while (zlev > 100)
> ...
> ...
> ...
> zlev = zlev - dp*i    (where dp is your pressure change between
> levels...hopefully it is constant.  If it isn't there's another way to do
> this)
> i = i + 1
> endwhile
> 
> Try that and see if it works.
> 
> Jeff Duda
> 
> On Mon, Oct 25, 2010 at 3:53 AM, Geeta Geeta <geeta124 at hotmail.com> wrote:
> 
> >  Dear All,
> > I am trying to extract the SPECIFIC HUMIDITY for all the levels in vertical
> > (19 Levels from 1000 to 100hPa) from the Model.
> > So I am Using tvrh2q function of Grads. Following is the ctl file.
> >
> > 'open test.ctl'
> > *'set lev 1000 100'
> > 'set t 1'
> >  * while (lev< 100)
> > *zlev=1000
> > 'set gxout fwrite'
> > 'set fwrite test.dat'
> >  zlev =1000
> > 'define tvk=tk(lev='zlev')+0.61*QVAPOR(lev='zlev')*tk(lev='zlev')'
> > 'd tvrh2q(tvk(lev='zlev'),rh(lev='zlev'))'
> > ************
> >  zlev =950
> > 'define tvk=tk(lev='zlev')+0.61*QVAPOR(lev='zlev')*tk(lev='zlev')'
> > 'd tvrh2q(tvk(lev='zlev'),rh(lev='zlev'))'
> > *'disable fwrite'
> > *****************
> >  zlev =900
> > 'define tvk=tk(lev='zlev')+0.61*QVAPOR(lev='zlev')*tk(lev='zlev')'
> > 'd tvrh2q(tvk(lev='zlev'),rh(lev='zlev'))'
> > 'disable fwrite'
> > ***********************
> >
> > * endwhile
> >
> > I am Unable to Extract the data Using the While Statement in Grads, so I am
> > defining the Zlev separately .
> >
> > Kindly Suggest.
> > geeta
> >
> >
> > _______________________________________________
> > gradsusr mailing list
> > gradsusr at gradsusr.org
> > http://gradsusr.org/mailman/listinfo/gradsusr
> >
> >
> 
> 
> -- 
> Jeff Duda
> Iowa State University
> Meteorology Graduate Student
> 3134 Agronomy Hall
> www.meteor.iastate.edu/~jdduda
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: http://gradsusr.org/pipermail/gradsusr/attachments/20101025/d800f45c/attachment-0001.html 
> 
> ------------------------------
> 
> Message: 4
> Date: Mon, 25 Oct 2010 11:04:04 -0400
> From: Stephen McMillan <smcmillan at planalytics.com>
> Subject: [gradsusr] Creating "Lines" Shapefiles
> To: GrADS Users Forum <gradsusr at gradsusr.org>
> Message-ID:
> 	<AANLkTinzsXXMzdhj3XaFmpEEtjeRiJ9-JLETbRYV_zQq at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
> 
> I think it's a great addition to have both the draw- and create-shapefiles
> capabilities in GrADS now, and have successfully done both from the latest
> release.
> 
> As I understand the online documentation, shapefiles can be created using
> only the "display" command, and that "the shape types currently supported
> are points and lines...."  with lines being contour lines.  Are there any
> plans to support shapefile creation using the "draw" command, such as for
> creating straight line segments or polygons, as it does for drawing
> shapefiles?
> 
> Perhaps the developers or another user knows of a way to write shapefiles
> derived from drawn (not displayed) map features.  The only way I can think
> of is to somehow incorporate the desired line/polygon features within a
> gridded file, perhaps similar to the way "lat" and "lon" are done, except
> crossing lat/lon lines.
> 
> I am using the OpenGrADS version 2.0.a9.oga.1 on a Windows XP.
> 
> Thanks
> Stephen McMillan
> 
> ***************************************************
> The information contained in this e-mail message 
> is intended only for the use of the recipient(s) 
> named above and may contain information that is 
> privileged, confidential, and/or proprietary. 
> If you are not the intended recipient, you may not
> review, copy or distribute this message. If you have
> received this communication in error, please notify 
> the sender immediately by e-mail, and delete the original message.
> ***************************************************
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: http://gradsusr.org/pipermail/gradsusr/attachments/20101025/847cf9c4/attachment-0001.html 
> 
> ------------------------------
> 
> Message: 5
> Date: Mon, 25 Oct 2010 21:30:10 +0530
> From: SRAVANI A <srisravani.a at gmail.com>
> Subject: [gradsusr] (no subject)
> To: gradsusr at gradsusr.org
> Message-ID:
> 	<AANLkTimzkFgLdkb=BZK_V+x197YzMXdF4tv_7YpD2mt2 at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
> 
> HI
>  grads user i had one problem i m using .nc wind files to find the psi and
> khi . now i want to partial diffrention wth respective to time so plese
> kindly help me
> 
> 
> -- 
> A.Sravani
> Research Scholar
> Department of Meteorology & Oceanography
> Andhra university
> Visakhapatnam
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: http://gradsusr.org/pipermail/gradsusr/attachments/20101025/3d6e3b8c/attachment-0001.html 
> 
> ------------------------------
> 
> Message: 6
> Date: Mon, 25 Oct 2010 12:43:51 -0400
> From: Charles Seman <Charles.Seman at noaa.gov>
> Subject: Re: [gradsusr] Max Value Coordinates
> To: GrADS Users Forum <gradsusr at gradsusr.org>
> Message-ID: <4CC5B3C7.9080106 at noaa.gov>
> Content-Type: text/plain; charset="windows-1252"
> 
> Andrew and Jeff and GrADS Users,
> 
> Kun-Hsuan Chou provided the reference code for this technique (which can 
> be found in the attached file hurricane_tracking.txt, taken from an 
> email exchange posted to the GrADS Listserv by Kun-Hsuan Chou and Arturo 
> Caracas Uribe in Oct, 2004).
> 
> Chuck
> 
> Jeffrey Duda wrote:
> > Andrew,
> > I had posted a request on this forum about this exact question in 
> > August.  I believe it was Charles Seaman who provided the answer.  The 
> > meat of the code is
> >
> > 'd maxloc(max('ans',x='x1',x='x2'),y='y1',y='y2')'
> >  yline = sublin(result,2)
> >  ymax = subwrd(yline,4)
> > 'd maxloc(max('ans',y='y1',y='y2'),x='x1',x='x2')'
> >  xline = sublin(result,2)
> >  xmax = subwrd(xline,4)
> >
> >
> > where "ans" refers to the field for which you want to find the 
> > max/min, and x1, x2 refer to x-grid values or longitude points and y1, 
> > y2 refer to y-grid values or latitude points.  xmax, ymax are the 
> > coordinates of the maximum value.  To find the minimum, just replace 
> > maxloc and max with minloc and min.
> >
> > Jeff Duda
> >
> > On Fri, Oct 22, 2010 at 7:43 PM, Andrew Revering <andy at f5data.com 
> > <mailto:andy at f5data.com>> wrote:
> >
> >     I'd like to have the coordinates of our 'max value'? I know about
> >     maxloc(), and tried various examples I found in forums,
> >     documentation and email conversations, but I can't seem to get it
> >     to perform as I expect.
> >
> >      
> >
> >     When it supposedly works, I just see some white lines on the
> >     bottom and right of my image (not where the max value is)? is
> >     there a way to actually get lat/lon coordinates of the max value?
> >
> >      
> >
> >     I should note that in my situation there will be the teeniest dot
> >     of plotted value, the rest of the grid is blank. I don't know if
> >     that matters in these functions.
> >
> >      
> >
> >     Andrew Revering
> >
> >     Convective Development, Inc.
> >
> >     http://www.convectivedevelopment.com/
> >
> >      
> >
> >      
> >
> >
> >     _______________________________________________
> >     gradsusr mailing list
> >     gradsusr at gradsusr.org <mailto:gradsusr at gradsusr.org>
> >     http://gradsusr.org/mailman/listinfo/gradsusr
> >
> >
> >
> >
> > -- 
> > Jeff Duda
> > Iowa State University
> > Meteorology Graduate Student
> > 3134 Agronomy Hall
> > www.meteor.iastate.edu/~jdduda <http://www.meteor.iastate.edu/%7Ejdduda>
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > gradsusr mailing list
> > gradsusr at gradsusr.org
> > http://gradsusr.org/mailman/listinfo/gradsusr
> >   
> 
> -- 
> 
> Please note that Charles.Seman at noaa.gov should be considered my NOAA
> email address, not cjs at gfdl.noaa.gov.
> 
> ********************************************************************
>  Charles Seman                                Charles.Seman at noaa.gov
>  U.S. Department of Commerce / NOAA / OAR
>  Geophysical Fluid Dynamics Laboratory         voice: (609) 452-6547
>  201 Forrestal Road                              fax: (609) 987-5063
>  Princeton, NJ  08540-6649            http://www.gfdl.noaa.gov/~cjs/
> ********************************************************************
> 
> "The contents of this message are mine personally and do not reflect any
> official or unofficial position of the United States Federal Government,
> the United States Department of Commerce, or NOAA."
> 
> -------------- next part --------------
> An embedded and charset-unspecified text was scrubbed...
> Name: hurricane_tracking.txt
> Url: http://gradsusr.org/pipermail/gradsusr/attachments/20101025/b5abbf46/attachment-0001.txt 
> 
> ------------------------------
> 
> Message: 7
> Date: Mon, 25 Oct 2010 20:06:58 +0200
> From: "Javier G. Corripio" <jgcorripio at mac.com>
> Subject: [gradsusr] (no subject)
> To: gradsusr at gradsusr.org
> Message-ID: <FA9D704E-063E-4948-94B7-CC2A550DB315 at mac.com>
> Content-Type: text/plain; charset="utf-8"
> 
> Dear Grads Users,
> 
> I wonder if there is a simple way to add labels to KML contour lines,  
> the output of:
> 
> set kml -ln fnameroot
> 
> Thanks a lot.
> 
> Javier
> 
> P.S.  Sorry if it has already been asked,  I couldn't find an list  
> search function, so I have downloaded the monthly text files and grep  
> all "kml"s but I couldn't find an answer
> 
> -- 
> **************************************
> Javier G. Corripio
> email: jgcorripio at mac.com
> url: http://www.meteoexploration.com
> 
> 
> ?
> 
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: http://gradsusr.org/pipermail/gradsusr/attachments/20101025/6678ffa7/attachment.html 
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: tmk.png
> Type: image/png
> Size: 3534 bytes
> Desc: not available
> Url : http://gradsusr.org/pipermail/gradsusr/attachments/20101025/6678ffa7/attachment.png 
> 
> ------------------------------
> 
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
> 
> 
> End of gradsusr Digest, Vol 8, Issue 42
> ***************************************
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20101026/b2a28e28/attachment-0003.html 


More information about the gradsusr mailing list