comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » cgPlotS problem with NaN values in data
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
cgPlotS problem with NaN values in data [message #88960] Tue, 08 July 2014 12:05 Go to previous message
morganlsilverman is currently offline  morganlsilverman
Messages: 46
Registered: February 2013
Member
Hello,

I'm plotting latitude/longitude data on a map background using cgPlotS and keep getting the error message: % Program caused arithmetic error: Floating illegal operand when it gets to a NaN value in the data. Because I'm plotting this in a resizable graphics window it also brings up the keep command or delete command box each time, eventually crashing my session. Is there a way to get around this without removing the NaN values from my data? I haven't converted the coordinates to metered space because when I did it plotted the lat/lon values in the wrong locations. I think because the data is taken from a model that was run on a map coordinate system maybe. Thanks.

-Morgan

Pro MOZAICPanel3

lonmin = -125
lonmax = -65
latmin = 25
latmax = 60
centerlon = (lonmax-lonmin)/2.0 + lonmin
centerlat = (latmax-latmin)/2.0 + latmin
limit = [latmin, lonmin, latmax, lonmax]
xrange = [lonmin, lonmax]
yrange = [latmin, latmax]
mapCoord = Obj_New('cgmap', 'Stereographic', Ellipsoid='WGS 84', Limit=limit, $
center_lat=centarlat, center_lon=centerlon)

; Set up 2-col by 3-row grid
p = cgLayout([2,3], Aspect=0.65, YGap=3.5, XGap=4, OXMargin=[3,3], OYMargin=[2.5,2.5])

; Draw plots
pos = p(*,5)
restore, './MOZAIC/Trajectories/MOZAIC_Washington_BackTrajectory.sav'
mapCoord->SetProperty, Position=pos, /Draw
cgMap_Grid, map=mapCoord, /box
cgMap_Continents, map=mapCoord, /continents, /countries, /usa
cgplots, lon2500(3,*), lat2500(3,*), map=mapCoord, color='green', thick=4
cgplots, lon3000(3,*), lat3000(3,*), map=mapCoord, color='cyan', thick=4
cgplots, lon3500(3,*), lat3500(3,*), map=mapCoord, color='magenta', thick=4

end
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: IDL in IPython notebooks
Next Topic: Projected Meter Space and mapCoord

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 11:36:51 PDT 2025

Total time taken to generate the page: 0.00373 seconds