Re: map projections

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Mon, 17 Dec 2007 14:12:02 -0700 (MST)

All,

We followed up with this offline, and it appears that the data being
plotted didn't have coordinate array information attached to it.

Basically, if you have 1D lat/lon coordinate arrays, or 2D lat/lon
arrays that give a lat/lon point for each data point on your 2D grid
(which are only recognized via using a gsn_csm routine *and* setting
the special "lat2d"/"lon2d" attributes), then you shouldn't be setting
tfDoNDCOverlay to True.

When you set tfDoNDCOverlay to True, you are telling NCL that your
data has already been transformed to a particular map projection,
and thus it falls on you to get the map projection exactly right.
Basically all that happens is the map is drawn, and then the
contour plot is drawn right on top of it, without any transformation.
If the map is wrong, then, your contour data will line up properly
with your map outlines.

--Mary

On Fri, 14 Dec 2007 jimmyc_at_iastate.edu wrote:

> All-
> I followed Dennis's advice but without luck.
> I got closer by specifying the additional arguements:
> mpLambertParallel1F = 30
> mpLambertParallel2F = 60
> mpLambertMeridianF = 260
>
> AND
> tfDoNDCOverlay = true
>
> but the data still doesnt match up with the map background. Now they both
> have the same orientation but there is an offset which has eluded me.
>
> Any ideas will be most welcome.
> jimmyc
>
>
>
> On Fri, 14 Dec 2007, Dennis Shea wrote:
>
>
>>
>> Remove:
>> tfDoNDCOverlay = True
>>
>> Also .... did you unpack the precip data?
>> It is of type short?
>>
>> prc = short2flt( f->precip )
>> printVarSummary(prc)
>>
>>
>>
>>
>> jimmyc_at_iastate.edu wrote:
>>> All-
>>> I am trying to plot the Unified precipitation dataset from CDC. It is a
>>> netcdf file but has no information on the map projection. The data is on a
>>> lat lon grid:
>>> netcdf precip.1993 {
>>> dimensions:
>>> lon = 321 ;
>>> lat = 161 ;
>>> time = UNLIMITED ; // (365 currently)
>>> variables:
>>> float lat(lat) ;
>>> lat:units = "degrees_north" ;
>>> lat:long_name = "Latitude" ;
>>> lat:actual_range = 20.f, 60.f ;
>>> float lon(lon) ;
>>> lon:units = "degrees_east" ;
>>> lon:long_name = "Longitude" ;
>>> lon:actual_range = 220.f, 300.f ;
>>> double time(time) ;
>>> time:units = "hours since 1700-1-1 00:00:0.0" ;
>>> time:long_name = "Time" ;
>>> time:actual_range = 2568384., 2577120. ;
>>> time:delta_t = "0000-00-01 00:00:00" ;
>>> time:avg_period = "0000-00-01 00:00:00" ;
>>> short precip(time, lat, lon) ;
>>> precip:long_name = "Daily Accumulated Precipitation" ;
>>>
>>>
>>> When I attempt to plot it using the
>>> mpProjection = "LambertConformal"
>>> mpLimitMode = "Corners"
>>> mpLeftCornerLatF = lat(0)
>>> mpLeftCornerLonF = lon(0)
>>> mpRightCornerLatF = lat(160)
>>> mpRightCornerLonF = lon(320)
>>>
>>> The image that is produced has the map background rotated 90 degrees but
>>> the displayed data is in the correct orientation.
>>>
>>> I do have this:
>>> tfDoNDCOverlay = True
>>>
>>> I have no idea if this is a Lambert grid but other projection types didnt
>>> seem to work either.
>>>
>>> Any ideas?
>>>
>>
>>
>>
>
> --
> James Correia, Jr. PhD.
> Email: jimmyc @ iastate.edu
> Email: jimmyc42 @ gmail.com
> Web: http://bruce.agron.iastate.edu/jimmyc/
> *********************************************
>
> "Wisdom. Strength. Courage. Generosity. Each of us are born with one of
> these. We must find the other three inside of us."
> from "Into the West"
> _______________________________________________
> 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 Mon Dec 17 2007 - 14:12:02 MST

This archive was generated by hypermail 2.2.0 : Mon Dec 31 2007 - 09:18:01 MST