Re: Problem with sf reso​urces​

From: Nicole Stoffels <nicole.stoffels_at_nyahnyahspammersnyahnyah>
Date: Thu Feb 21 2013 - 12:37:24 MST

Hey Dave,

thank you, last but not least I also found that mistake. I guess that happens
when you just try to copy and paste from the homepage.

But thank you!

Best wishes
Nicole

> David Brown <dbrown@ucar.edu> hat am 21. Februar 2013 um 20:34 geschrieben:
>
>
> Hi Nicole,
> The reason you are not getting a plot and yet have no errors is that you have
> both gsnDraw and gsnFrame set to False. These resources are intended for
> situations where you have to add
> something such as annotations to the plot object after it is created in memory
> and then you subsequently call the draw and frame procedures yourself. Since
> you did not do that, the plot objects are only in memory and nothing is drawn
> when you exit. I have attached a slightly revised version of your script that
> does produce a plot.
> -dave
>
>
> On Feb 21, 2013, at 3:53 AM, Nicole Stoffels wrote:
>
> > Thank you Dave!
> >
> > I have tried out your advice. Unfortunately the problem still is, that I
> > don't get any plot at all. And I still have no idea why, because I don't
> > even get error messages while running ncl.
> >
> > I have attached my program and the input data, as already mentioned the pca
> > data is binary. It would help if I at least had an error message.
> >
> > I would really be happy to get some more help!
> > Thanks a lot!
> >
> > Nicole
> >
> >
> > > David Brown <dbrown@ucar.edu> hat am 20. Februar 2013 um 22:23
> > > geschrieben:
> > >
> > >
> > > The code you have listed does not set any map limits. If your data occurs
> > > over a small region but you are drawing a global map, your data region may
> > > just be too small to see.
> > > You do not need to worry about sfElementNodes or stFirstNodeIndex.
> > > You could first try using gsn_csm_contour (without the map) to see if you
> > > get any sort of a plot.
> > >
> > > To set the map limits use:
> > >
> > > res@mpLimitMode = "latlon"
> > > res@mpMinLatF = latS
> > > res@mpMinLonF = lonL
> > > res@mpMaxLatF = latN
> > > res@mpMaxLonF = lonR
> > >
> > > You may also need to set gsnAddCyclic = False
> > >
> > > -dave
> > >
> > > On Feb 20, 2013, at 2:09 PM, Nicole Stoffels wrote:
> > >
> > > > Dear NCL-Experts,
> > > >
> > > > I have three scalar datasets, latitude, longitude (ascii) and the actual
> > > > data (binary). They all have the same length ((0) len data: 1075 len
> > > > lon: 1075 len lat: 1075) and are ordered correctly, meaning that the
> > > > values at the first index are the latitude value and its corresponding
> > > > data value and data value.
> > > >
> > > > I now want to draw a contour plot. I found the scalar field resources
> > > > which perfectly fit to my problem. Unfortunately I could not draw a plot
> > > > yet. I do not even get any error messages.
> > > >
> > > > Here are the important parts of my code:
> > > >
> > > > latS = min(lat)
> > > > latN = max(lat)
> > > > lonL = min(lon)
> > > > lonR = max(lon)
> > > >
> > > > res@sfDataArray = data1
> > > > res@sfXArray = lon
> > > > res@sfYArray = lat
> > > >
> > > > plot = gsn_csm_contour_map(wks, data1, res)
> > > >
> > > > I guess I did not really get the connection between the three datasets.
> > > > In the examples on the homepage sfElementNodes and sfFirstNodeIndex are
> > > > used as well and seem to be of major importance. But I did not really
> > > > get the usage of those two.
> > > >
> > > > Does anybody have any idea where the bug in my code is or what is
> > > > missing?
> > > >
> > > > Thanks a lot!
> > > > Best wishes
> > > > Nicole Stoffels
> > > > _______________________________________________
> > > > ncl-talk mailing list
> > > > List instructions, subscriber options, unsubscribe:
> > > > http://mailman.ucar.edu/mailman/listinfo/ncl-talk
> > >
> > <latlon_data><principal_component.ncl><principal_component_data>_______________________________________________
> > ncl-talk mailing list
> > List instructions, subscriber options, unsubscribe:
> > http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Feb 21 12:37:39 2013

This archive was generated by hypermail 2.1.8 : Fri Feb 22 2013 - 17:42:16 MST