[ncl-talk] myterious contours not from the input data

Mary Haley haley at ucar.edu
Wed Jun 24 13:31:37 MDT 2015


Hi Ning,

Alan's suggestion is a good one, but I would still like to look into why
the default contouring in NCL is not working as expected on this data set.

Can you provide the CSV files that go with this script?

If they are not too large, you can email them to me directly.

Otherwise, you can use our ftp:

http://www.ncl.ucar.edu/report_bug.shtml#HowToFTP

Thanks,

--Mary

On Sun, Jun 21, 2015 at 8:33 PM, Ning Li <ning.li at auckland.ac.nz> wrote:

>  Dear NCL users,
> I have encountered a problem relating to the plotting of contour lines.
> The data to be plotted is an 8 by 8 matrix that looks like this.
>
>   -0.084 -0.066 -0.04 0.021 0.031 -0.026 -0.065 -0.075  -0.028 0.005 0.053
> 0.177 0.224 0.136 0.028 -0.003  -0.009 0.038 0.111 0.266 0.327 0.333 0.221
> 0.101  -0.049 -0.024 0.08 0.184 0.275 0.352 0.29 0.152  -0.046 -0.029
> 0.022 0.082 0.164 0.195 0.147 0.127  0.002 0.007 -0.005 -0.017 -0.02 0.006
> 0.05 0.059  0.03 0.022 -0.034 -0.095 -0.105 -0.069 -0.033 -0.016  0.043
> 0.035 0.011 -0.022 -0.053 -0.063 -0.045 -0.03
> While the script is working fine with the 'cnFillOn' resource set to True,
> erroneous contour lines
> are present when 'cnFillOn' resource is set to False (please see the
> attached images).
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> * load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" load
> "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" diri =
> "/home/nli045/Desktop/sharedJ/Documents/data/" fili = systemfunc("ls " +
> diri + "x*csv") in = asciiread(fili(0),(/8,8/),"float")
> ; read the matrix from the directory wks = gsn_open_wks("png","test")
> colors = read_colormap_file("BlWhRe") res                              =
> True res at cnFillOn             = False                  ; CONTOURS WRONG!
> res at cnLinesOn          = True                  res at gsnAddCyclic     =
> False                 ; the plot is not global res at cnLevelSelectionMode
> = "ManualLevels"    ; manual contour levels res at cnMinLevelValF
>     = -0.1 res at cnMaxLevelValF              =  0.5
> res at cnLevelSpacingF             =  0.1 plot =
> gsn_csm_contour(wks,in,res)    *
>
> I used R to make the plot and there is no problem.
> I have also used a different dataset in NCL, the errorneous contours are
> also present (see the circled contours in 'datasetB.png').
>
> I am using version 6.2.0. The system is 86-64 GNU/Linux.
>
> I wonder if anyone experienced the same problem in the past and how should
> it be resolved?
>
> Any help would be great! Thank you very much!
>
>  Ning LI
>
> PhD candidate
> School of Environment
> The University of Auckland
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150624/4f8104e5/attachment.html 


More information about the ncl-talk mailing list