Re: Problem with sf reso​urces​

From: David Brown <dbrown_at_nyahnyahspammersnyahnyah>
Date: Wed Feb 20 2013 - 14:23:12 MST

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


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:

ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
Received on Wed Feb 20 14:23:21 2013

This archive was generated by hypermail 2.1.8 : Thu Feb 21 2013 - 11:26:43 MST