Re: map of temperature trends

From: Mira Berdahl <mberdahl_at_nyahnyahspammersnyahnyah>
Date: Fri Jun 07 2013 - 11:07:53 MDT

Hi Alan,
Yes you're right, thanks for noticing that!
When I fix this though, I still get the following error when I try to plot
slope2d.

fatal:Dimension (0) of (slope2d) is not named and therefore doesn't have
an associated coordinate variable

The VarSummary for slope2d is:
Variable: slope2d
Type: float
Total Size: 32768 bytes
            8192 values
Number of Dimensions: 2
Dimensions and sizes: [64] x [128]
Coordinates:

So it doesn't seem to retain the lat lon dimensions and coordinates
associated with them.

Any thoughts?
Mira

>> 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 11:08:06 2013

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