[ncl-talk] Problem with plotting station data in DMS-coordinates

MeteoBB info at meteo-bb.de
Thu Jan 24 09:54:26 MST 2019


Hello,

i have station data with lat/lon-coordinates in DMS (degree, minutes).
I suppose NCL/NCAR always want's decimal coordinates as input? That's 
why my plotted data points appears at a wrong position.

Example (this is my data looks like):
lat = 54.41 (54° 41')
lon = 13.26 (13° 26')

I think I have to transform the coordinates from DMS to decimal, to have:
lat = 54.68
lon = 13.43

Then the location will be placed correctly on map.

My question:
Just wondering - is there really no built-in procedure/function for the 
conversion from DMS to decimal coordinates? I found nothing about these 
stuff in the mailing lists or on the web.
Furthermore, I am irritated that the tick labels are DMS in my example 
program (see at the end), but he expects decimal coordinates.
If there is no built-in function, has anyone a funtion to convert DMS to 
decimal or a workaround?

Thanks a lot.

Regards,
Robert


begin

   wks  = gsn_open_wks ("png","test")
   res                        = True
   res at gsnMaximize            = True
   res at gsnFrame               = False
   res at mpGridAndLimbOn        = True
   res at pmTickMarkDisplayMode  = "Always"
   res at mpMinLatF              = 54
   res at mpMaxLatF              = 55
   res at mpMinLonF              = 13
   res at mpMaxLonF              = 14

   res at mpGridSpacingF         = 0.25
   res at mpGridLineThicknessF   = 2.0
   res at mpGridLineColor        = "Gray30"
   res at mpOutlineBoundarySets  = "AllBoundaries"
   res at mpDataBaseVersion      = "MediumRes"
   res at mpDataSetName          = "Earth..4"
   res at mpGridAndLimbOn        = True

   mkres                      = True
   mkres at gsMarkerIndex        = 16     ; Filled circle
   mkres at gsMarkerSizeF        = 0.008

   plot   = gsn_csm_map(wks,res)
   gsn_polymarker(wks,plot,13.26,54.41,mkres)
   frame(wks)

end


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190124/accdf25d/attachment.html>


More information about the ncl-talk mailing list