[ncl-talk] plot gc_latlon

Alan Brammer abrammer at albany.edu
Tue May 31 12:10:15 MDT 2016


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
> <javascript:_e(%7B%7D,'cvml','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
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160531/4e95b50f/attachment.html 


More information about the ncl-talk mailing list