[Thread Prev][Thread Next][Index]

Re: [ferret_users] Irregular Grid data Plot on ferret?



Hi all,
Well, there is the form of the polygon command where you can give it vertices and Ferret draws the shape. If you look up the POLYGON command in the Users Guide you'll see an example of a script that makes arrows at each location, with their length representing vector magnitude and color representing some other field. So lots can be done along those lines.

But none of this does what Dan is hoping for, filling/smoothing colors between the cells. Ferret does not have anything that works with finite-element style grids themselves.

Ansley

Glenn Carver wrote:
Hi Dan,

This may not be exactly what you are after but here is a short go script that I sometimes use to plot a variable from my model which has an icosahedral grid. For this grid the coords are specified using two 1D arrays, lon and lat, like you. The script uses the polygon command to draw circles at the locations. The downside is you end up with gaps between the cells. It's a 'quick look' approach if you like. Ideally what you need is a ferret command to follow the polygon shape defined by the lat/long coordinates but I don't think that's possible without some effort. I usually interpolate to a high resolution regular lat/long grid to do my analysis.

  Glenn


--
!  start
set mode verify
!
!       viewbbxy - plots lat/lon map of bucky variable on bucky grid
!
! Args: $1 - x range for go basemap e.g. x=180:360
!       $2 - y range for go basemap e.g. y=0:-40
!       $3 - polygon command arguments e.g. /lev=(-2,20,2)/title="pv"
!            note that /over/key is not needed as this script adds it.
!           $4 - variable to be plotted. e.g. sigma[k=1] (see note below)
!       $5 - (optional) scale factor. If absent, set to 0.8
\cancel mode verify
!
!  Note
! The polygon script works by using the 'k' axis to produce the polygons.
!  Therefore if you have a region set for the k axis it will interfere
! and polymark won't work. Likewise if you have a region set for the x axis
!  it will interfere with selecting all the gridpoints from the variable.
! It's best not to set a region, but if you do, then only set one for the
!  time axis.
!

! save current region
define region/default save

let/quiet scale = $5%0.8%

go basemap $1 $2
go polymark polygon/over/key$3 lon lat $4 circle scale


! restore settings
set region save
! end



At 3:27 am +0800 26/4/07, Yu, Hao-Cheng wrote:
Hi Steve

Thanks for your reply.
But my problem is not Lack of basemap.
My question is:
Is Ferret can do plot(shade, or vector) with an irregular gridded data(from finite element model) without Object Analysis. Such dataset won't have 2-D definition for variables, usually only 1-D definition.
Like

           I        J       K     L
Lat     1:10     :        :      :
Lon    1:10     :        :      :
Var    1:10     :        :      :

Variables location are defined as an irregular grid (Lat, Lon).
However, Ferret only do "shade" or "vector" plot for 2-D variables.

Any comments or suggestions?

Sincerely, dan

2007/4/26, Steve Guimond <<mailto:guimond@xxxxxxxxxxxxxxxxx>guimond@xxxxxxxxxxxxxxxxx>:

Hi,
  Try laying down a basemap first, then using the shade command.

go basemap x=...

=======================================================
Stephen R. Guimond
Graduate Research Assistant
Center for Ocean-Atmospheric Prediction Studies (COAPS)
=======================================================

On Thu, 26 Apr 2007, Yu, Hao-Cheng wrote:

 Dear ferreters,

I know Ferret can deal with grided data (for finite difference method) and
 it always works perfectly.
 However, after searching on the mail archives and UserGuide.
Irregular dataset(like finite element method) seems only can be plotted by
 Regriding process(like objective analysis).
 I try with "3-arguments shade (even vector)", and Ferret tells if the
 dataset is not define as 2D, this won't work.

 file/var=lon,lat,tmp test.dat
 shade tmp,lon,lat

test.dat contains 3 columns data which define each element node location and
 the property to plot (shade).
 Is it possible to "shade" or "vector" on irregular grid?

 Sincerely, Dan





--

~> ~> ~> ~> ~> ~> ~> ~> ~> ~> ~>
Ansley Manke, NOAA/PMEL   ansley.b.manke@xxxxxxxx
7600 Sand Point Way NE, Seattle WA
Phone 206-526-6246,  FAX 206-526-6744




[Thread Prev][Thread Next][Index]

Contact Us
Dept of Commerce / NOAA / OAR / PMEL / TMAP

Privacy Policy | Disclaimer | Accessibility Statement