[Thread Prev][Thread Next][Index]

Re: Vector plots




	* * * Two good questions regarding staggered grids * * *


On Oct 20, 10:08pm, Donald S. Dunbar wrote:
> Subject: Vector plots
> The Ferret user's guide is not clear on one point concerning vector
> plots.  When the (U,V) components are on different grids (e.g., a
> staggered numerical model grid) what does Ferret do?

Hi Donald,

Good question. If you give the command

	yes? VECTOR u,v

where the variables U and V are actually on staggered grids what you will get
is a plot which is
  i) labelled correctly relative to the first variable ("u")
 ii) the i,j point on variable v will be associated with the i,j point of u
	despite the fact that U(i,j) is not physically co-located with V(i,j)
iii) you will get the warning message
	"X and Y components are offset"
     at the upper right on your plot

> With U (V) on the
> left (bottom) of a cell the command "vector u[k=1],v[k=1]" seems to
> generate the same plot as "vector u[g=s,i=1:M,j=1:N,k=1],
> v[g=s,i=1:M,j=1:N,k=1]" where s (the salinity) is located at the center
> of a cell.  Are the plots the same?

I expect that they are actually subtly different as the u and v points are
interpolated from neighboring points.

>Does Ferret regrid U and V
> automatically to locate them at the same point?

No. And it places that warning label on the plot to let you know.

>And another thing.  Why
> do I need to put the "i=1:M,j=1:N" in the brackets (M and N are the No.
> or cols and rows)?  If I omit them I get the message:
>
> **ERROR: inconsistent sizes of data regions: X and Y vector components
>
> even though the U and V grids are the same size.  Explicitly putting in
> the i and j ranges fixes the problem.

To see what is happening here use the STAT command. I believe STAT will show
you that the number of points in the U and V fields differ. This is a common
occurrence with staggered grids. It happens in two cases:

  i) If you request a region using "world coordinates" (e.g. X=130e:80w)
	instead of index values (e.g. I=50:100): In this case the differing
	number of points may occur because the same geographical limits
	actually contain different numbers of points.

 ii) If regridding by linear interpolation is used but the region is left
	unspecified: When regions are unspecified the regridded result will
	contain only those result points for which there were surrounding
	points on the source grid from which to interpolate. If the source
	grids differ between the two variables you are regridding, the
	ability to regrid at the edges of the grid may vary, too. Hence
	the sizes of the result may vary. If, on the other hand, you request
	an explicit range for a regridded result (as you did) then Ferret
	will supply exactly that size result. The edge points of the result,
	however, may be missing value flags.

I hope this helps.

	- steve

> --
> ------------------------------------------------------
> D.S. Dunbar (dsd@oar.com)  Ocean Applied Research Ltd.
> 1864 Duchess Ave.  West Vancouver BC  V7V 1R1  CANADA
> ------------------------------------------------------
>-- End of excerpt from Donald S. Dunbar




-- 

		|  NOAA/PMEL               |  ph. (206) 526-6080  
Steve Hankin	|  7600 Sand Point Way NE  |  FAX (206) 526-6744
		|  Seattle, WA 98115-0070  |  hankin@pmel.noaa.gov


[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / ERL / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement