mpMinLonF and problem with longitude labels

From: Dave Allured <dave.allured_at_nyahnyahspammersnyahnyah>
Date: Mon, 29 Oct 2007 15:11:09 -0600

I am making a map that straddles 180 West, with longitudes set by
mpMinLonF and mpMaxLonF. I found that longitude labels in the
eastern hemisphere are incorrect if mpMinLonF is specified less than
-180.

Please see the attached demo script and plot. Note that on the
first plot, the two leftmost labels on the X axis are 240W and 210W,
when I think they should be 120E and 150E. I fixed this by changing
my longitude limits from (-240, 0) to (120, 360).

The documentation says that mpMinLonF and mpMaxLonF may range
anywhere from -540 to 540. May I request that this labeling
inconsistency be corrected in a future NCL release? Thank you.

--Dave A.
CU/CIRES Climate Diagnostics Center (CDC)
NOAA/ESRL/PSD, Climate Analysis Branch (CAB)
http://www.cdc.noaa.gov/

; 2007-oct-29 Test program for axis labelling problem.
; On the first plot, longitude labels
; west of -180 have the wrong hemisphere.

load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"

begin
  wks = gsn_open_wks ("x11", "out") ; open workstation
  plot = new (2, graphic) ; create array of plots
  
  res = True ; setup for first plot
  res_at_gsnDraw = False
  res_at_gsnFrame = False
  res_at_tmXBLabelFontHeightF = 0.014
  res_at_tmYLLabelFontHeightF = 0.014
  
  res_at_mpMinLatF = -40
  res_at_mpMaxLatF = 40
  res_at_mpMinLonF = -240 ; incorrect axis labels
  res_at_mpMaxLonF = 0
  res_at_mpCenterLonF = (res_at_mpMinLonF + res_at_mpMaxLonF) / 2

  res2 = res ; setup for second plot
  res2_at_mpMinLonF = 120 ; correct axis labels
  res2_at_mpMaxLonF = 360
  res2_at_mpCenterLonF = (res2_at_mpMinLonF + res2_at_mpMaxLonF) / 2

  plot(0) = gsn_csm_map_ce (wks, res)
  plot(1) = gsn_csm_map_ce (wks, res2)
  gsn_panel (wks, plot, (/2,1/), False) ; draw both plots
end

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

out.gif
Received on Mon Oct 29 2007 - 15:11:09 MDT

This archive was generated by hypermail 2.2.0 : Tue Dec 11 2007 - 14:19:21 MST