> slope2d = onedtond(temp@slope,(/dimsizes(data@lat),dimsizes(data@lon)/))
Quick guess but i think the above should be
slope2d = onedtond(temp@slope,(/dimsizes(data&lat),dimsizes(data&lon)/))
note the change of @ to &.
Alan.
##############################
Alan Brammer,
PhD Student,
Department of Atmospheric and Environmental Sciences,
University at Albany, State University of New York, Albany, NY, 12222
abrammer@albany.edu
##############################
On Jun 7, 2013, at 12:00 PM, Mira Berdahl <mberdahl@envsci.rutgers.edu> wrote:
> Hi Everyone,
>
> I am trying to generate a map of annual temperature trends from a file
> with Dimensions and sizes: [time | 1140] x [lat | 64] x [lon | 128].
>
> I cannot seem to retain the [lat] and [lon] attributes of the original
> data file in my calculated slope, and thus can't plot my map.
>
> I've copied my code here:
>
> in = addfile("tas_Amon_BNU-ESM_rcp45_r1i1p1_200601-210012.nc","r")
>
> data= in->tas
> temp = dtrend_msg(data&time,data(lat|:,lon|:,time|:),True,True)
> slope2d = onedtond(temp@slope,(/dimsizes(data@lat),dimsizes(data@lon)/))
>
> end
>
> I receive the following error message when I run this:
> fatal:Dimension (0) of (slope2d) is not named and therefore doesn't have
> an associated coordinate variable
>
> If I use
> slope2d = onedtond(temp@slope(/64,128/)
> instead, the script runs, but I cannot plot it on a map because lat and
> lon are not attributes.
>
> Does anyone see what I am doing wrong here?
>
> Thanks very much!
> MB
>
>
>
>
> _______________________________________________
> 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 Fri Jun 7 10:41:19 2013
This archive was generated by hypermail 2.1.8 : Tue Jun 11 2013 - 12:03:58 MDT