[ncl-talk] Misaligned correlation coefficient map

Ipshita Majhi ipmajhi at alaska.edu
Fri Feb 12 13:44:45 MST 2016


Dear NCL,

I would like to plot correlation coefficient, the snow cover extent by
itself plots well. When I try to plot correlation coefficient it is
misaligned, I am not sure why that is happening. I am attaching the plot
with this email
Any guidance will be helpful


;*********************************************************************************
a=addfile("~/Documents/NCL_files/Snow_cover_IMS/NCL_codes/sce_mon_mean.nc","r")
; open output netCDF file
b=addfile("~/Documents/NCL_files/Snow_cover_IMS/
nhsce_v01r01_19661004_20140602.nc","r")

;Extracting time and snow cover extent (sce) from respective data files


time_sce=a->time


sce=byte2flt(a->sce)

lat=b->latitude
lon=b->longitude

sce at lat2d=lat
sce at lon2d=lon

sce at _FillValue = 9.9621e+36

;==============================================
;Now lets correlate with JJAS
JJAS_1871_2012
=asciiread("~/Documents/NCL_files/SST/Monthly/jjas_1871_2012.txt",(/142,1/),"float")
;Extracting JJAS for 1967 to 2012

JJAS_1967_2012=JJAS_1871_2012(96:141,0)

;============================================
;Extracting monthly data for sce

Jan_sce = new((/46,88,88/),float)

Jan_sce at _FillValue = 9.9621e+36

;==========================================

do nyr=0,551,12

Jan_sce(nyr/12,:,:) =sce(nyr,:,:)

end do


Jan_reorder=Jan_sce(x|:,y|:,time|:)


corr_jan=escorc(Jan_reorder,JJAS_1967_2012)


corr_jan at lat2d=lat
corr_jan at lon2d=lon

copy_VarCoords_1(sce,corr_jan)

;************************************************
; create plot
;************************************************
  wks = gsn_open_wks("x11","Jan_sce_jjas_cor")               ;

;***********************************************
; create array of named colors. Note that you have
; to include the forground (white), and background (black)
; as the first two colors
;***********************************************

  res = True                                     ; plot mods desired

  res at tiMainString         = "January SCE and JJAS cor" ; plot title

  res at cnFillOn             = True               ; turns on the color
  res at mpFillOn             = False              ; turns off continent gray
  res at cnLinesOn            = False              ; turn off contour lines

  res at gsnPolar             = "NH"               ; specify the hemisphere
  res at mpMinLatF            = 20               ; specify min lat

  plot = gsn_csm_contour_map_polar(wks,corr_jan,res)
;=============================================
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160212/c800c915/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Jan_sce_jjas_cor.pdf
Type: application/pdf
Size: 97753 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160212/c800c915/attachment.pdf 


More information about the ncl-talk mailing list