Rank correlation

From: Guilherme Martins <jgmsantos_at_nyahnyahspammersnyahnyah>
Date: Tue Aug 06 2013 - 17:51:44 MDT

Hi all,

I'm trying to calculate the rank correlation, but appear a error like below:

*(0) check_for_y_lat_coord: Warning: Data either does not contain a valid
latitude coordinate array or doesn't contain one at all.
*
*(0) A valid latitude coordinate array should have a 'units' attribute
equal to one of the following values: *
*(0) 'degrees_north' 'degrees-north' 'degree_north' 'degrees north'
'degrees_N' 'Degrees_north' 'degree_N' 'degreeN' 'degreesN' 'deg north'*
*(0) check_for_lon_coord: Warning: Data either does not contain a valid
longitude coordinate array or doesn't contain one at all.*
*(0) A valid longitude coordinate array should have a 'units' attribute
equal to one of the following values: *
*(0) 'degrees_east' 'degrees-east' 'degree_east' 'degrees east'
'degrees_E' 'Degrees_east' 'degree_E' 'degreeE' 'degreesE' 'deg east'*

Then I put the:

*spc!0 = "lat"*
*spc!1 = "lon"*
*spc&lat@units = "degrees_north"*
*spc&lon@units = "degrees_east"*

And the error continue, now appear:

*fatal:No coordinate variable exists for dimension (lat) in variable (spc)*
*fatal:(lat) is not coordinate variable in variable(spc).*
*fatal:["Execute.c":8128]:Execute: Error occurred at or near line 26 in
file fig13.correlacao.ncl*

My 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

f1 = addfile("../modelo/mcga.prec.mensal.1986.2005.nc","r")
f2 = addfile("../obs/prec/gpcp.mensal.1986.2005.nc","r")

prp_mod = f1->prec ; nt,ny,nx --> dimensão 0,1,2
prp_obs = f2->precip ; nt,ny,nx --> dimensão 0,1,2

spc = spcorr_n(prp_mod,prp_obs,0) ; correlation at dimension time

spc!0 = "lat"
spc!1 = "lon"
spc&lat@units = "degrees_north"
spc&lon@units = "degrees_east"

printVarSummary(spc)

wks = gsn_open_wks("eps","corr")

res = True
res@cnFillOn = True
res@cnLinesOn = False
;res@mpMinLonF = -160.
;res@mpMaxLonF = 0.
;res@mpMinLatF = -60.
;res@mpMaxLatF = 20.

plot = gsn_csm_contour_map_ce(wks,spc,res)

end

Thanks,

Guilherme

-- 
*Guilherme Martins*
https://sites.google.com/site/jgmsantos/

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Aug 6 17:52:40 2013

This archive was generated by hypermail 2.1.8 : Wed Aug 07 2013 - 13:59:00 MDT