problem using Mercator projection

From: M Coniglio <Michael.Coniglio_at_nyahnyahspammersnyahnyah>
Date: Mon, 22 Sep 2008 14:35:47 -0500

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

-- 
*************************
Dr. Michael Coniglio
National Severe Storms Laboratory
120 David L. Boren Blvd
Norman, OK 73072
(405) 325-6227
Michael.Coniglio_at_noaa.gov
*************************



_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk

fulldomain.jpg lakemichigan.jpg
Received on Mon Sep 22 2008 - 13:35:47 MDT

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