Re: plotting Arctic wind data

Paul Wessel <[email protected]> Sat, 26 Jul 2014 20:28:52 -1000
Newsgroups gmane.comp.gis.gmt.user
Message-ID <[email protected]>
Hi Jonathan-

We have no option to set a specific distance, but would the -Idx/dy option work for you? You can specify a more infrequent dx selection than dy to achieve what you need, perhaps?

If you really want arrows every 1000 m or so you will need to create such x,y nodes via grdmath perhaps, then grd2xyz to convert those points to lon, lat, then two calls to grdtrack to resample your original data set at those coordinates and plot with psxy instead.  A bit complicated.

-p

On Jul 25, 2014, at 4:08 PM, Jonathan Wynn <[email protected]> wrote:

> Hello all,
> 
> I’m probably overlooking something quite simple, but with my intermediate experience with GMT am banging up against a wall, so am emailing the list for ‘lil help.
> 
> I am plotting wind vector data (downloaded from NOAA ESRL; netCDF format of u and v components); I use GMT’s grdvector easy for equally-spaced geographic grid:
> 
> grdvector uwnd_ave.nc?uwnd[0] vwnd_ave.nc?vwnd[0] -R/0/360/60/89 -JG-150/60/6.5i -Q0.2i+e+n0.02i -S0.025i -O -W0.5 -V >> wind.ps
> 
> This looks great for a low-latitude data set, but the problem is I’m interested in the Arctic where the geographic grid of vectors is too closely spaced in lon, and too widely spaced in lat.
> 
> I would like to resample the netCDF file with an equally spaced cartesian grid (i.e., spaced every 1000 km or so).  A great example of what this would look like, and Python code (marplotlib) to do it is at (scroll way down to “plotting wind vectors and wind barbs”):
> 
> http://matplotlib.org/basemap/users/examples.html
> 
> The python code is:
> 
> uproj,vproj,xx,yy = \
> m.transform_vector(ugrid,vgrid,newlons,latitudes,31,31,returnxy=True,masked=True)
> # now plot.
> Q = m.quiver(xx,yy,uproj,vproj,scale=700)
> Is there some simple equivalent in gmt I could use to do this?
> 
> Thanks in advance for any help from any GMT-python rock stars.
> 
> Jonathan Wynn
> NSF Instrumentation and Facilities Program
> University of South Florida
>  
> 
> 
> Mailing list for GMT discussions of all kinds. If you are not sure you have found a bug, discuss it here first. To formally report bugs or request features, please register and add New Issue on gmt.soest.hawaii.edu To unsubscribe, send the message "signoff gmt-help" to [email protected] Note: gmt-help will become obsolete on Sept 1, 2014 - please use forum on gmt.soest.hawaii.edu instead.
> Mailing list for GMT discussions of all kinds. If you are not sure you have found a bug, discuss it here first. To formally report bugs or request features, please register and add New Issue on gmt.soest.hawaii.edu To unsubscribe, send the message "signoff gmt-help" to [email protected] Note: gmt-help will become obsolete on Sept 1, 2014 - please use forum on gmt.soest.hawaii.edu instead.


Mailing list for GMT discussions of all kinds.  If you are not sure you have found a bug, discuss it here first.
To formally report bugs or request features, please register and add New Issue on gmt.soest.hawaii.edu
To unsubscribe, send the message "signoff gmt-help" to [email protected]
Note: gmt-help will become obsolete on Sept 1, 2014 - please use forum on gmt.soest.hawaii.edu instead.