[ncl-talk] plot gc_latlon
Mary Haley
haley at ucar.edu
Wed Jun 1 12:34:07 MDT 2016
Alan and Adam,
On the primitives examples page, there's mention of a special resource,
"mpGreatCircleLinesOn" that you can set to handle this.
https://www.ncl.ucar.edu/Applications/polyg.shtml#ex13
The "polyg_13.ncl" shows the more tedious way to do this, and the
"polyg_14.ncl" example mentions the "mpGreatCircleLinesOn" resource.
--Mary
On Tue, May 31, 2016 at 12:10 PM, Alan Brammer <abrammer at albany.edu> wrote:
> I'm not entirely sure I follow the desired result. It seems that you want
> a "straight" line rather than the great circle points calculated by
> gclatlon.
> If so could you not just create your own array of points using fspan for
> the lats and lons and pass them to the interpolation function.
>
> Example plots of what you are getting versus what you desire might help.
>
>
> On Sunday, May 29, 2016, Adam Herrington <adam.herrington at stonybrook.edu>
> wrote:
>
>> the following example cleared up some of my confusion:
>> https://www.ncl.ucar.edu/Applications/Scripts/polyg_14.ncl
>>
>> The two procedures are not identical. My only question now is, how to
>> compute a transect that mimicks:
>>
>> res at mpGreatCircleLinesOn = True
>>
>> ;---Create the map, but it won't be drawn yet.
>> plot1 = gsn_csm_map_ce(wks,res)
>>
>> ;---Resources for the polyline
>> pres = True ; polyline mods desired
>> pres at gsLineThicknessF = 2.0 ; line thickness
>> pres at gsLineColor = "blue" ; color of lines
>>
>> ;---Attach the polyline
>> dum1 = gsn_add_polyline(wks,plot1, (/lon1, lon2/) , (/lat1, lat2/) ,pres)
>>
>>
>>
>> On Sun, May 29, 2016 at 1:07 AM, Adam Herrington <
>> adam.herrington at stonybrook.edu> wrote:
>>
>>> In regards to the only transect example (
>>> https://www.ncl.ucar.edu/Applications/transect.shtml), is there any
>>> reason we should doubht that the transect computed from gc_latlon:
>>>
>>> dist = gc_latlon(leftlat,leftlon,rightlat,rightlon,npts,2)
>>>
>>> is accurately depicted by:
>>>
>>> map = gsn_csm_map_ce(wks,mres) ; create map
>>>
>>> gsn_polyline(wks,map,(/leftlon,rightlon/),(/leftlat,rightlat/),pres)
>>>
>>> ? I am not sure that gc_latlon and gsn_polyline (as portrayed on
>>> gsn_csm_map_ce, e.g. a global gridded dataset) use the same procedure to
>>> compute a transect, given identical input (rightlon, leftlon, etc...)
>>>
>>> If the two procedures are not consistent, does anyone know a way to
>>> (a) actually plot the transect from gc_latlon on a map (directly plot
>>> variable 'trans', in the example?), or
>>> (b) compute a transect the same way that gsn_polyline and gsn_csm_map_ce
>>> do.
>>>
>>> Thanks in advance!
>>>
>>> Adam
>>>
>>
>>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160601/84f258f1/attachment.html
More information about the ncl-talk
mailing list