Re: Error in ploting correlation

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Sat Jul 09 2011 - 18:00:40 MDT

Hi Rashed,

Just a further explanation on why you are seeing green land fill:
normally the land is supposed to be filled in with gray (a
gsn_csm_xxx_map default). You chose a color map that didn't have gray
in it, so NCL chose the next closest color in your color map, which
was light green in this case.

I'll add this to our FAQ, since it's a common problem that users run
into.

--Mary

On Jul 2, 2011, at 8:46 AM, Dennis Shea wrote:

> [1]
> res@mpFillOn = False
>
> Also, you have misspelled a resource. It should be
>
> res@lbLabelAutoStride = True
>
> [2]
> It is suggested that you place the .hluresfile at
> http://www.ncl.ucar.edu/Document/Graphics/hlures.shtml
> in your home directory.
>
> Good luck
>
>
> On 7/1/11 10:55 PM, Rashed Mahmood wrote:
>> Hi all
>> I am trying to display point correlation between precipitation and
>> sea
>> surface temperature.
>> NCL can draw the plot (attached here) but the problem is that it
>> assigns
>> some color to land regions (which I expect to be white) from the
>> colorbar . Can anyone explain whats happening?
>> Here is my simple code:
>>
>> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
>>
>> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
>>
>> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
>>
>> begin
>>
>> in1=addfile("/mnt/storage-space/disk1/lshl/khan/hunt/
>> prate.mon.mean.nc.nc <http://prate.mon.mean.nc.nc/>","r")
>>
>> in2=addfile("/mnt/storage-space/disk1/lshl/khan/hunt/
>> sst.mon.mean.nc.nc
>> <http://sst.mon.mean.nc.nc/>","r")
>>
>> p1=in1->prate(0:743,:,:)
>>
>> s1=short2flt(in2->sst(1128:1871,:,:))
>>
>>  
>>
>> JAS1=month_to_season(p1,"JJA")
>>
>> JAS2=month_to_season(s1,"MAM")
>>
>> y=JAS2(lat|:,lon|:,time|:)
>>
>> x1=wgt_areaave_Wrap(JAS1(:,35:45,35:49),1.0, 1.0, 0) ;1.0 means no
>> special weights for lat and lon.
>>
>> x=x1*86400
>>
>> copy_VarCoords(x1,x)
>>
>> c = escorc(y,x)
>>
>> temp=JAS2(0,:,:)
>>
>> copy_VarCoords(temp,c)
>>
>> printVarSummary(c)
>>
>> ;********************************************************************************
>>
>> wks = gsn_open_wks
>> ("pdf","/mnt/storage-space/disk1/lshl/khan/hunt/cor_example")
>>
>> gsn_define_colormap(wks,"precip_diff_12lev")
>>
>> res = True
>>
>> res@cnFillOn = True
>>
>> res@cnLinesOn = False
>>
>> res@gsnSpreadColors = True
>>
>> res@lbAutoLabelStride = True
>>
>> plot = gsn_csm_contour_map_ce(wks,c,res)
>>
>> end
>>
>> Regards
>> Rashed
>>
>>
>>
>> _______________________________________________
>> 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

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Sat Jul 9 18:00:46 2011

This archive was generated by hypermail 2.1.8 : Tue Jul 12 2011 - 15:03:53 MDT