Re: Lambert Conformal Corners and Orientation

From: <valkhorn_at_nyahnyahspammersnyahnyah>
Date: Mon, 21 Apr 2008 17:56:51 -0400

 I do apologize but forgot to reply. The problem was this:

res_at_tfDoNDCOverlay = True

The value needed to be set to false.

I know my script looks a mess but I'm still learning!

-William

Hi William,?
?

I will try your script below and the data you provided a link to
and see if I can come up with what you are asking for.?
?

--Mary?
?

 

 

 

-----Original Message-----
From: Mary Haley <haley_at_ucar.edu>
To: Valkhorn_at_aol.com
Sent: Mon, 21 Apr 2008 3:46 pm
Subject: Re: Lambert Conformal Corners and Orientation

Hi William,?
?

I will try your script below and the data you provided a link to
and see if I can come up with what you are asking for.?
?

--Mary?
?

On Fri, 18 Apr 2008 Valkhorn_at_aol.com wrote:?
?

> So I'm finally figuring out how to use this software, and I must say it's?

> pretty amazing. I have a few questions though with the script below:?

>?

> ;*******************************************************?

> ; lcnative_2.ncl?

> ;*******************************************************?

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

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

> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"?

> begin?

> ;************************************************?

> ; open file and read in data?

> ;************************************************?

> stationfile="data.txt"?

> ;?

> ; -1 means read all rows into a one-dimensional variable,?

> ; ATTENTION, DO NOT READ STRINGS.?

> ;?

> dummy = asciiread(stationfile,-1,"float")?

> ncol = 3 ; number of columns is 3?

> npts = dimsizes(dummy)/ncol ; get number of points?

>?

> stationdata = onedtond(dummy,(/npts,ncol/)) ; npts x ncol?

>?

> vpt = stationdata(:,2) ; station data?

> lat = stationdata(:,0) ; latitude values?

> lon = stationdata(:,1) ; longitude values?

> ;************************************************?

> ; create plot?

> ;************************************************?

> wks_type = "pdf"?

> wks_type_at_wkOrientation = "portrait"?

> wks = gsn_open_wks(wks_type,"map") ; open a workstation?

> gsn_define_colormap(wks,"WhViBlGrYeOrReWh") ; choose colormap?

>?

> res = True ; plot mods desired?

> res_at_tiMainString = "High Temperature Sample"?

> ;************************************************?

>?

> res_at_mpLimitMode = "Corners" ; choose range of map?

> res_at_mpLeftCornerLatF = 20?

> res_at_mpLeftCornerLonF = -125?

> res_at_mpRightCornerLatF = 55?

> res_at_mpRightCornerLonF = -60?

>?

> ;************************************************?

>?

> res_at_mpProjection = "LambertConformal"?

> res_at_mpLambertParallel1F = 10?

> res_at_mpLambertParallel2F = 10?

> res_at_mpLambertMeridianF = -100?

>?

> res_at_sfXArray = lon?

> res_at_sfYArray = lat?

>?

> res_at_pmTickMarkDisplayMode = "Always"?

> res_at_mpFillOn = True ; turn off map fill?

> res_at_mpOutlineDrawOrder = "PostDraw" ; draw continental outline last?

> res_at_mpOutlineBoundarySets = "GeophysicalAndUSStates" ; state boundaries?

> res_at_mpAreaMaskingOn = True?

>?

> ;res_at_mpFillColors = (/0,9,28,25/)?

> ;res_at_mpMaskAreaSpecifiers = (/"Conterminous US"/)?

>?

> ;****************************************************************************?

> ; usually, when data is placed onto a map, it is TRANSFORMED to the specified?

> ; projection. Since this model is already on a native lambert conformal grid,?

> ; we want to turn OFF the tranformation.?

> ;****************************************************************************?

> res_at_tfDoNDCOverlay = True?

> ;****************************************************************************?

> res_at_cnFillOn = True ; color plot desired?

> res_at_cnLinesOn = False ; turn off contour lines?

> res_at_gsnSpreadColors = True ; use full range of colormap?

> res_at_gsnAddCyclic = False ; regional data?

> res_at_cnFillDrawOrder = "Draw"?

>?

> res_at_pmLabelBarWidthF = 0.9?

>?

> res_at_cnLevelSelectionMode = "ExplicitLevels"?

> res_at_cnLevels = (/-40,-30,-20,-10,0,10,20,30,40,50,60,70,80,90,100,110/)?

>?

> plot = gsn_csm_contour_map(wks,vpt,res)?

>?

> end?

>?

> (And do let me know if the script doesn't show up correctly)?

>?

> The script takes an ascii file that has three columns - Lat, Lon, and a?

> value that I'm plotting?

>?

> Here is the output and data file:?

> _http://68.63.208.24/maplamb.pdf_ (http://68.63.208.24/maplamb.pdf)?

> _http://68.63.208.24/data.txt_ (http://68.63.208.24/data.txt)?

>?

> Here are my questions:?

>?

> 1) The plots are mostly in the eastern US. Yet, it is plotting points all?

> the way to the left of the chart. How can I make it so that it actually plots?

> the lat/lon coordinates correctly on the right part of the map? Do I need to?

> code the points differently??

>?

> 2) It seems to want to guess for points that don't exist - is there any way?

> I can just leave white space where the points are not there??

>?

> 3) Can I color the water light blue and set the contour for over land only??

>?

> Thanks for your help!?

>?

> -William?

>?

>?

>?

> **************Need a new ride? Check out the largest site for U.S. used car?

> listings at AOL Autos.?

> (http://autos.aol.com/used?NCID=aolcmp00300000002851)?

>?

 
Received on Mon Apr 21 2008 - 15:56:51 MDT

This archive was generated by hypermail 2.2.0 : Tue Apr 22 2008 - 09:55:07 MDT