Re: problem using Mercator projection

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Wed, 24 Sep 2008 08:37:56 -0600

FYI:

Jimmy Correia [PNNL] helped me out and we found the problem.
It worked after I used the following:

res_at_tfDoNDCOverlay = False
res_at_mpLimitMode = "LatLon"
res_at_mpMinLatF = lat2d(jmin,imin)
res_at_mpMinLonF = lon2d(jmin,imin)
res_at_mpMaxLatF = lat2d(jmax,imax)
res_at_mpMaxLonF = lon2d(jmax,imax)

mydata_at_lat2d = lat2d
mydata_at_lon2d = lon2d
===========================
FYI2:

The attributes "lat2d", "lon2d" are *reserved
attribute names*. They are used by the graphical
routines to map the data onto georeferenced
backgrounds.

M Coniglio wrote:
> I am attempting to plot variables on a grid I created with nx=121
> equally-spaced longitude points and ny=91 equally spaced latitude points
> (a Mercator grid). I'm using the following in my script:
>
> res_at_mpProjection = "Mercator"
> res_at_mpLimitMode = "Corners"
>
> imin = 0
> imax = nx-1
> jmin = 0
> jmax = ny-1
>
> res_at_mpLeftCornerLatF = lat2d(jmin,imin)
> res_at_mpLeftCornerLonF = lon2d(jmin,imin)
> res_at_mpRightCornerLatF = lat2d(jmax,imax)
> res_at_mpRightCornerLonF = lon2d(jmax,imax)
>
> Through print statements, I verify that
>
> lat2d(jmin,imin) = 25.5
> lon2d(jmin,imin) = -109
> lat2d(jmax,imax) = 49.5
> lon2d(jmax,imax) = -68,
>
> which are the correct bounds of the grid I created. The first example
> attached (fulldomain.jpg) shows a plot of 2-m dewpoint that I'm
> attempting to plot on the entire grid. A careful inspection of the plot
> shows that the values are not plotted in their correct locations and
> seem to be displaced too far north (see the area near Lake
> Michigan....the local minimum in values should match the shape of the
> lake fairly closely). There seems to be no problem at the bottom of the
> domain and the problem seems to get worse with latitude. I tried to get
> a better look at the problem by zooming in on Lake Michigan by changing
> the following in the script:
>
> imin = 61
> imax = 68
> jmin = 59
> jmax = 66
>
> res_at_sfXCStartSubsetV = imin
> res_at_sfXCEndSubsetV = imax
> res_at_sfYCStartSubsetV = jmin
> res_at_sfYCEndSubsetV = jmax
>
> I was baffled too see that the plot seems to be correct when I changed
> the above and zoomed in on Lake Michigan (see lakemichigan.jpg). Is
> there something I'm doing wrong when I try to plot the whole domain or
> is there something strange with the way my version of NCL (4.3.1) plots
> Mercator grids?
>
> Any help would be greatly appreciated.
>
> Mike
>
>
> ------------------------------------------------------------------------
>
>
> ------------------------------------------------------------------------
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk_at_ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Sep 24 2008 - 08:37:56 MDT

This archive was generated by hypermail 2.2.0 : Mon Sep 29 2008 - 13:35:43 MDT