[gradsusr] plot vectors

ugo okoro uknac23 at yahoo.com
Tue May 16 07:36:10 EDT 2017


dear all, I want to plot a certain value for vectors. just like 'set black 0 2' in contours. I can find the appropriate line for vectors.thanks.
Ugo Okoro. 
 

    On Tuesday, May 16, 2017 12:04 AM, "gradsusr-request at gradsusr.org" <gradsusr-request at gradsusr.org> wrote:
 

 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. Plotting significant values (Ugo Okoro)
  2. Feedback on Pole Lat/Lon Labelling Script.
      (Muhammad Yunus Ahmad Mazuki)


----------------------------------------------------------------------

Message: 1
Date: Mon, 15 May 2017 13:55:38 +0800
From: Ugo Okoro <uknac23 at yahoo.com>
Subject: [gradsusr] Plotting significant values
To: <gradsusr at gradsusr.org>
Message-ID: <332244.99170.bm at smtp227.mail.bf1.yahoo.com>
Content-Type: text/plain; charset="utf-8"

Dear All,

How do I plot 95% significant values of wind in GrADS.
Thanks.
Ugo Okoro.

-----Original Message-----
From: "gradsusr-request at gradsusr.org" <gradsusr-request at gradsusr.org>
Sent: ?13/?05/?2017 12:02 AM
To: "gradsusr at gradsusr.org" <gradsusr at gradsusr.org>
Subject: gradsusr Digest, Vol 87, Issue 15

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. Re: Masking areas outside the shapefile
      (Barthlott, Christian (IMK))


----------------------------------------------------------------------

Message: 1
Date: Fri, 12 May 2017 13:07:45 +0200
From: "Barthlott, Christian (IMK)" <christian.barthlott at kit.edu>
Subject: Re: [gradsusr] Masking areas outside the shapefile
To: GrADS Users Forum <gradsusr at gradsusr.org>, Srivatsan
    Vijayaraghavan    <tmsvs at nus.edu.sg>
Message-ID: <6ce369aa-8c84-f0d6-f962-60b64e5ee0ac at kit.edu>
Content-Type: text/plain; charset="windows-1252"; format=flowed

...yes, it's possible:

http://gradsusr.org/pipermail/gradsusr/2013-April/034603.html

Cheers

Am 12.05.2017 um 12:59 schrieb Srivatsan Vijayaraghavan:
> Hi all,
> 
> I am trying to mask all the areas OUTSIDE the shape file. Possible to do 
> this in GrADS?
> 
> See attached sample fig.
> 
> Many Thanks
> 
> Sri
> 
> 
> ------------------------------------------------------------------------
> 
> Important: This email is confidential and may be privileged. If you are 
> not the intended recipient, please delete it and notify us immediately; 
> you should not copy or use it for any purpose, nor disclose its contents 
> to any other person. Thank you.
> 
> 
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
> 


------------------------------

_______________________________________________
gradsusr mailing list
gradsusr at gradsusr.org
http://gradsusr.org/mailman/listinfo/gradsusr


End of gradsusr Digest, Vol 87, Issue 15
****************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20170515/0af40467/attachment-0001.html 

------------------------------

Message: 2
Date: Mon, 15 May 2017 15:47:26 +0800
From: Muhammad Yunus Ahmad Mazuki <ukm.yunus at gmail.com>
Subject: [gradsusr] Feedback on Pole Lat/Lon Labelling Script.
To: GrADS Users Forum <gradsusr at gradsusr.org>
Message-ID:
    <CAKJBA6a0dBzfD2-u=+S5YiOC-j87t96ZSwwSA6Cz9b2Aboa-Jw at mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Hi, initially I found a script by Colleen at
http://gradsusr.org/pipermail/gradsusr/2014-September/037452.html . After a
little tweaks I come out with two scripts below. So I would like to ask for
feedback on how to improve the scripts. Currently its two different scripts
for the two different pole projections. I'm planning to merge the two
script together later on.
I also would like to figure out how to change the original degree East to
degree East into degree East to degree West.
With regards to the Latitude labelling, I want to add a spacer/margin
between the plot and the label (like what I did to the Longitude Labelling
part), but this is quite hard. I could add some margin like  'draw string
'xpos+0.1' 'ypos-0.1'  'istart polelab, but this method is not dependant of
the plotting angles. I just would like to add spaces before the numbers but
GrADS don't register the spaces before that.
I have also not added the case where the plot is 0 to 360 degree East.

I would like to thank you in advance for any feedback.

* * * * * * * * * * * * * * * * * * * * * * * * * *
* Draws grid lines at specified intervals for South Pole Projection
* call is
* polargrid lonmin lonmax lonincr latmin latmax latincr
function polargrid(args)
* parse arguments
lonmin = subwrd(args,1)
lonmax = subwrd(args,2)
lonincr = subwrd(args,3)
latmin = subwrd(args,4)
latmax = subwrd(args,5)
latincr = subwrd(args,6)
'q gxinfo'
temp1 =sublin(result,6)
poleproj=subwrd(temp1,3)
*Determining how to label deg north or degree south.
if (poleproj<3|poleproj>4)
 say 'This script is for plotting lat/lon label for pole projection only'
 return
else
if (poleproj=4)
polelab='`3.`0S'
else
polelab='`3.`0N'
endif
endif
*
midlat = (latmax+latmin)/2
quarterlat = (latmax+midlat)/2
'q dims'
xline = sublin(result,2)
yline = sublin(result,3)
lonstart = subwrd(xline,6)
lonend = subwrd(xline,8)
*midlon = (lonstart+lonend)/2
midlon = (lonmax+lonmin)/2
*For drawing the LATITUDE lablelling
*Currently the labelling is perpendicular to the plot side.
*I think the ratio for the added margin needs to be based on the angle.
*The latitude labelling is quite hard to make it parallel to plot without
cutting into the longitude labelling.
*You can also use while (istart <=latmax-1) to skip the last latitude
labelling for reasons of its out of plotting area (especially if you use
panels) and/or it overlap with LONGITUDE labelling.
istart=latmin
angle=midlon-lonmax
while (istart <=latmax)
  'q w2xy 'lonmax' ' istart
  xpos=subwrd(result,3)
  ypos=subwrd(result,6)
  'set string 1 l 1 'angle
  'set strsiz 0.12'
  'draw string 'xpos' 'ypos' 'istart-istart-istart polelab
  istart=istart+latincr
endwhile
*For drawing the LONGITUDE lablelling
*Can be improved to provide the East and West labelling.
istart=lonmin
angle=midlon-lonmin
while (istart <=lonmax)
  'q w2xy 'istart' ' latmax+((latmax-latmin)*0.03)
  xpos=subwrd(result,3)
  ypos=subwrd(result,6)
  'set strsiz 0.12'
  'set string 1 bc 1 'angle
  'draw string 'xpos' 'ypos' 'istart'`3.`0'
  angle=angle-lonincr
  istart=istart+lonincr
endwhile
return

* * * * * * * * * * * * * * * * * * * * * * * * * *
* Draws grid lines at specified intervals for North Pole Projection.
* call is
* polargrid lonmin lonmax lonincr latmin latmax latincr
function polargrid(args)
*{}//No effect, just to preserve highlighting under ATOM.
* parse arguments
lonmin = subwrd(args,1)
lonmax = subwrd(args,2)
lonincr = subwrd(args,3)
latmin = subwrd(args,4)
latmax = subwrd(args,5)
latincr = subwrd(args,6)
'q gxinfo'
temp1 =sublin(result,6)
poleproj=subwrd(temp1,3)
*Determining how to label deg north or degree south.
if (poleproj<3|poleproj>4)
 say 'This script is for plotting lat/lon label for pole projection only'
 return
else
if (poleproj=4)
polelab='`3.`0S'
else
polelab='`3.`0N'
endif
endif
*
midlat = (latmax+latmin)/2
quarterlat = (latmax+midlat)/2
'q dims'
xline = sublin(result,2)
yline = sublin(result,3)
lonstart = subwrd(xline,6)
lonend = subwrd(xline,8)
*midlon = (lonstart+lonend)/2
midlon = (lonmax+lonmin)/2
*For drawing the LATITUDE lablelling
*Currently the labelling is perpendicular to the plot side.
*I think the ratio for the added margin needs to be based on the angle.
*The latitude labelling is quite hard to make it parallel to plot without
cutting into the longitude labelling.
*You can also use while (istart <=latmax-1) to skip the last latitude
labelling for reasons of its out of plotting area (especially if you use
panels) and/or it overlap with LONGITUDE labelling.
istart=latmin
angle=midlon-lonmin
while (istart <=latmax)
  'q w2xy 'lonmax' ' istart
  xpos=subwrd(result,3)
  ypos=subwrd(result,6)
  'set string 1 l 1 'angle
  'set strsiz 0.12'
  'draw string 'xpos' 'ypos'  'istart polelab
  istart=istart+latincr
endwhile
*For drawing the LONGITUDE lablelling
*Can be improved to provide the East and West labelling.
istart=lonmin
angle=midlon-lonmax
while (istart <=lonmax)
  'q w2xy 'istart' ' latmin-((latmax-latmin)*0.03)
  xpos=subwrd(result,3)
  ypos=subwrd(result,6)
  'set strsiz 0.12'
  'set string 1 tc 1 'angle
  'draw string 'xpos' 'ypos' 'istart'`3.`0'
  angle=angle+lonincr
  istart=istart+lonincr
endwhile
return
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20170515/0e909431/attachment-0001.html 

------------------------------

_______________________________________________
gradsusr mailing list
gradsusr at gradsusr.org
http://gradsusr.org/mailman/listinfo/gradsusr


End of gradsusr Digest, Vol 87, Issue 16
****************************************


   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20170516/93155d88/attachment-0001.html 


More information about the gradsusr mailing list