Re: gsn_csm_lat_time

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Thu, 16 Nov 2006 08:28:22 -0700 (MST)

oops! ... see below

On Thu, 16 Nov 2006, Dennis Shea wrote:

> > When I try to plot lat_time diagram, getting an error like this
> >
> > ncl 88> plot = gsn_csm_lat_time(wks,MSE_p,cnres)
> > warning:IrTransInitialize: trXCoordPoints contains invalid coordinate array:
> > defaulting trXAxisType to LinearAxis
> >
> > Time coordinate in data is YYYYMMDDHH format, but change to linear after
> > plotting and gives wrong tick mark intervals. Does it means need to convert
> > time coordinate to linear values before using gsn_csm_lat_time.
> >
> > Thanks
> > Siji
> >
> > ncl 90> printVarSummary(MSE_p)
> >
> >
> > Variable: MSE_p
> > Type: float
> > Total Size: 56832 bytes
> > 14208 values
> > Number of Dimensions: 2
> > Dimensions and sizes: [latitude | 48] x [time | 296]
> > Coordinates:
> > latitude: [0.06712330132722855..24.63578033447266]
> > time: [1994050100..1994092512]
> > yyyymmddhh
> >---------------------------------------------------------------
>
> I speculate that you will need to change the time coordinate
> for plotting purposes via "yyyymmddhh_to_yyyyfrac"
> http://www.ncl.ucar.edu/Document/Functions/Contributed/yyyymmddhh_to_yyyyfrac.shtml
>
> time_new = yyyymmddhh_to_yyyyfrac(MSE_p&time, 0)
> MSE_p&time = time_new
> printVarSummary( MSE_p )
> _______________________________________________

oops! Since the original YYYYMMDDHH are likely of type integer,
      you will have to delete the contents of "time"
      and then put the new values of type float into
      the time coordinate.

    
      time_new = yyyymmddhh_to_yyyyfrac(MSE_p&time, 0)
      delete(MSE_p&time) ; delete the integer contents of time
      MSE_p&time = time_new ; replace with the new float contents
      printVarSummary( MSE_p )
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Nov 16 2006 - 08:28:22 MST

This archive was generated by hypermail 2.2.0 : Thu Nov 16 2006 - 13:32:39 MST