Re: check_for_y_lat_coord Error

From: Ibo Ze <ibo85_at_nyahnyahspammersnyahnyah>
Date: Wed Apr 28 2010 - 14:55:59 MDT

Hi Debasish, By adding the lines as suggested, following error appear: fatal:No coordinate variable exists for dimension (lat) in variable (c) fatal:(lat) is not coordinate variable in variable(c). fatal:No coordinate variable exists for dimension (lon) in variable (c) fatal:(lon) is not coordinate variable in variable(c). any thoughts how to handle this? Thanks, Ibo ________________________________ From: Debasish PaiMazumder <debasish_at_sca.uqam.ca> To: Ibo Ze <ibo85_at_ymail.com> Cc: Ncl Talk <ncl-talk_at_ucar.edu> Sent: Wed, April 28, 2010 3:25:54 PM Subject: Re: [ncl-talk] check_for_y_lat_coord Error Hello, Try to add the followings after calculation of correlation c!0="lat" c!1="lon" c&lat_at_units="degrees_north" c&lon_at_units="degrees_east" Thanks Debasish On 10-04-28, at 15:12, Ibo Ze wrote: Hi, > > >I want to calculate cross-correlation at 0 lag. Getting following error: > > >(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' > > >Script below addressed this issue as described in mini graphics manual but error still persists. Kindly help to rectify this. >Thanks. > > >Header of file1 is as follow: > > >netcdf 6104_pksec_06 { >dimensions: > time = 44 ; > lat = 120 ; > lon = 260 ; > > >variables: > float a(time, lat, lon) ; > a:_FillValue = -999.f ; > double lat(lat) ; > lat:long_name = "Latitude" ; > lat:units = "degrees_north" ; > double lon(lon) ; > lon:long_name = "Longitude" ; > lon:units = "degrees_east" ; > float time(time) ; > time:units = "months since 1961-01-01" ; > > >Header of file 2 is as follow: > > >netcdf 6104_pk_june_avg { >dimensions: > time = 44 ; > > >variables: > float a(time) ; > a:_FillValue = -999.f ; > double lat ; > lat:long_name = "Latitude" ; > lat:units = "degrees_north" ; > double lon ; > lon:long_name = "Longitude" ; > lon:units = "degrees_east" ; > float time(time) ; > time:units = "months since 1961-01-01" ; > > > > >and the script for calculation is as follows: > > >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" >load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl" > > >;********************************************** >; Reading Data and correlation function >;********************************************** > f1 = addfile("6104_pksec_06.nc","r") > f2 = addfile("6104_pk_june_avg.nc","r") > x1 = f1->a(lat|:,lon|:,time|:) > x2 = f2->a > x1!0="lat" > x1!1="lon" > x1&lat_at_units="degrees_north" > x1&lon_at_units="degrees_east" > c = escorc(x2,x1) > printVarSummary(c) > > >;********************************************** >; Invoke resources and set limits >;********************************************* > wks = gsn_open_wks ("x11","pksec_pk_06") ; open ps file > > > gsn_define_colormap(wks,"radar") > res = True > res_at_gsnDraw = False > res_at_cnFillOn = True > res_at_cnLinesOn = False > > >;******************************************************* >; create map resources with focus on domain >;******************************************************* > > > res_at_mpOutlineBoundarySets = "AllBoundaries" > res_at_mpDataBaseVersion = "MediumRes" > res_at_mpDataSetName = "Earth..3" > res_at_mpOutlineOn = True > res_at_mpFillOn = False > res_at_mpMaxLatF = 35 > res_at_mpMinLatF = 5 > res_at_mpMaxLonF = 125 > res_at_mpMinLonF = 60 > > > res_at_cnLevelSelectionMode = "ManualLevels" ; manually set cn levels > res_at_cnMinLevelValF = -1. ; min level > res_at_cnMaxLevelValF = 1. ; max level > res_at_cnLevelSpacingF = .22 ; contour level spacing > res_at_tiMainFontHeightF = 0.03 > res_at_gsnAddCyclic = False > plot = gsn_csm_contour_map_ce(wks,c,res) > > > >_______________________________________________ >ncl-talk mailing list >List instructions, subscriber options, unsubscribe: >http://mailman.ucar.edu/mailman/listinfo/ncl-talk Debasish PaiMazumder, PhD Postdoctoral Researcher Analysis and Simulation of Regional-Scale Climate Department of Earth and Atmospheric Sciences University of Québec at Montréal (UQÀM) 550, Sherbrooke west, 19th floor, west tower, Montréal, QC, Canada H3A 1B9 Tel: (514) 282-6464-343 (514) 937-0042 (R) email: debasish_at_sca.uqam.ca

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Apr 28 14:56:05 2010

This archive was generated by hypermail 2.1.8 : Thu Apr 29 2010 - 08:05:27 MDT