map of temperature trends

From: Mira Berdahl <mberdahl_at_nyahnyahspammersnyahnyah>
Date: Fri Jun 07 2013 - 10:00:45 MDT

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
Received on Fri Jun 7 10:01:00 2013

This archive was generated by hypermail 2.1.8 : Tue Jun 11 2013 - 12:03:58 MDT