[ncl-talk] coordinate problem

Adam Phillips asphilli at ucar.edu
Mon Sep 15 13:08:01 MDT 2014


Hi Xin,
I think you want to change these two lines:
footavg at south_north=lat1d
footavg at west_east=lon1d
to this:
footavg&south_north=lat1d
footavg&west_east=lon1d

The former coding assigns lat1d/lon1d as attribute arrays to footavg. (Not
what you want in this case.) The latter coding assigns coordinate variables
to the south_north and west_east dimensions of footavg.

Hope that helps. If not, please respond to the ncl-talk list.
Adam


On Mon, Sep 15, 2014 at 1:03 PM, Xin Xi <xin.xi30 at gmail.com> wrote:

> Hi, I am having a problem with assigning coordinate. Please tell me what I
> did wrong. Thanks!
>
> Part of the script:
>   lat1d = fspan(lat_ll,lat_ll+lat_res*(numpix_y-1),numpix_y)
>   lat1d!0     = "south_north"
>   lat1d at units = "degrees_north"
>   lon1d = fspan(lon_ll,lon_ll+lon_res*(numpix_x-1),numpix_x)
>   lon1d!0     = "west_east"
>   lon1d at units = "degrees_east"
>
>   footavg=dim_avg_n(foot,0) ; foot has dims of (ntime, numpix_x, numpix_y)
>   footavg!0="south_north"
>   footavg!1="west_east"
>   footavg at south_north=lat1d
>   footavg at west_east=lon1d
>
>   plot = gsn_csm_contour_map(wks,footavg,res)
>
>
> I GOT THIS 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'
> Segmentation fault: 11
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>


-- 
Adam Phillips
Associate Scientist,  Climate and Global Dynamics Division, NCAR
www.cgd.ucar.edu/staff/asphilli/   303-497-1726

<http://www.cgd.ucar.edu/staff/asphilli>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20140915/feb5e208/attachment.html 


More information about the ncl-talk mailing list