Re: problem

From: kalim ullah <kalimrid_at_nyahnyahspammersnyahnyah>
Date: Tue Jan 12 2010 - 19:10:40 MST

Dear Evelyn Grell,
Thank you so much for your useful guidance.
regards and happy new year,
kalim

--- On Tue, 1/12/10, Evelyn Grell <Evelyn.Grell@noaa.gov> wrote:

From: Evelyn Grell <Evelyn.Grell@noaa.gov>
Subject: Re: problem
To: "kalim ullah" <kalimrid@yahoo.com>
Date: Tuesday, January 12, 2010, 8:43 AM

The problem is that the metadata is not copied when you do a calculation
using 2 variables on the right side of the equation -- it can not know
which metadata to use.  So, a really simple solution is to do
T=t         ; just to define your array T with the same size and
metadata as t (ie lat, lon, units, etc)
T=(t+t1+t2)/3.
or after your eqn, to copy the metadata you can add the statement
copy_VarMeta(t,T)

kalim ullah wrote:
>
> Dear NCL user,
>
> I want to calculate three days average with the help of separate daily
> sst files. So, when I calculate it from one day file it works properly
> and when I calculate three days averages it indicates some errors
> given below. Anyone could you help me to solving this problem?
>
> Thanks
>
> Kalim
>

>
> **********************************
>
>    f = addfile("amsr-avhrr-v2.20030601.nc","r")
>
>    t  = short2flt(f->sst(0,0,:,:))
>
>    printVarSummary(t)
>
>    f1 = addfile("amsr-avhrr-v2.20030602.nc","r")
>
>    t1  = short2flt(f1->sst(0,0,:,:))
>
>    f2 = addfile("amsr-avhrr-v2.20030603.nc","r")
>
>    t2  = short2flt(f2->sst(0,0,:,:))
>
>    T = (/t+t1+t2/)/3
>
>    printVarSummary(T)
>
>  ;
>
>   plot = gsn_csm_contour_map_ce(wks,T(:,:), res)
>   end
>
> **********************************
>
> Variable: t
> Type: float
> Total Size: 4147200 bytes
>             1036800 values
> Number of Dimensions: 2
> Dimensions and sizes:   [lat | 720] x [lon | 1440]
> Coordinates:
>             lat: [-89.875..89.875]
>             lon: [0.125..359.875]
> Number Of Attributes: 7
>   zlev :         0
>   time :        9282
>   long_name :   Daily sea surface temperature
>   units :       degrees C
>   _FillValue :  -999
>   valid_min :   -300
>   valid_max :   4500
> **************************
>
> Variable: T
>
> Type: float
>
> Total Size: 4147200 bytes
>
>             1036800 values
>
> Number of Dimensions: 2
>
> Dimensions and sizes:   [720] x [1440]
>
> Coordinates:
>
> Number Of Attributes: 1
>
>   _FillValue :  -999
>
> (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'
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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 Tue Jan 12 19:10:45 2010

This archive was generated by hypermail 2.1.8 : Fri Jan 15 2010 - 13:51:45 MST