Re: setting time axis

From: Dave Allured <dave.allured_at_nyahnyahspammersnyahnyah>
Date: Tue, 16 Jan 2007 12:11:57 -0700

Marjolaine,

Yes it appears that your time coordinate variable is set up for
correct calendar time, so that was not the problem.

I tested gsn_csm_hov with my own data with an irregular axis. It
seemed to proportion the X axis correctly when the X axis was longitude.

Please note that you have reversed the subscripts in your
application of gsn_csm_hov. The documentation says "the rightmost
dimension should be longitude". I.e. the array subscripts should be
(time, lon), but you are using msla(lon, time). This might be the
cause of your problem. I do not know if the routine is really
flexible enough to handle arbitrary axes like that.

Otherwise, please try Mary Haley's suggestion.

--Dave A.
>> CU/CIRES Climate Diagnostics Center (CDC)
>> NOAA/ESRL/PSD, Climate Analysis Branch (CAB)

Marjolaine Rouault wrote:
> Hi,
>
> I have tried setting res_at_trXAxisType = "IrregularAxis" but it
> did not change anything.
>
> This is what I get with
> print (msla&time(yearind))
> ---------------------------
> Variable: time (coordinate subsection)
> Type: double
> Total Size: 1656 bytes
> 207 values
> Number of Dimensions: 1
> Dimensions and sizes: [time | 207]
> Coordinates:
> Number Of Attributes: 4
> missing_value : -999
> units : days since 1950-01-01 00:00:0.0
> long_name : reference time
> _FillValue : -999
> (0) 20457
> (1) 20460
> (2) 20464
> (3) 20467

<snip>

> (203) 20799
> (204) 20800
> (205) 20801
> (206) 20802
>
> ----- Original Message ----- From: "Dave Allured" <dave.allured_at_noaa.gov>
> To: <ncl-talk_at_ucar.edu>
> Sent: Tuesday, January 16, 2007 1:21 AM
> Subject: Re: setting time axis
>
>
>> Marjolaine,
>>
>> To get the desired time axis behavior, the variable "msla" must have
>> not only a dimension named "time", but also an associated time
>> coordinate variable that is proportional to real calendar time.
>>
>> I suspect that's what you are missing. What do you get with the
>> following diagnostic just in front of your plot statement?
>>
>> print (msla&time(yearind))
>> exit
>>
>> "Please reply to the list."
>>
>> --Dave A.
>> CU/CIRES Climate Diagnostics Center (CDC)
>> NOAA/ESRL/PSD, Climate Analysis Branch (CAB)
>>
>> Marjolaine Rouault wrote:
>>> Hi,
>>> I am plotting a variable using the following comand:
>>> plot = gsn_csm_hov(wks, msla(lon|:,time|yearind), res)
>>> yearind represents the indices of the variable msla falling within a
>>> specific year. My problem is that my time axis is not regular. As you
>>> will see in the plot, the space between the months changes according
>>> to the number of points. I would like the months on my time axis to
>>> be regularly spaced even if the number of points within a specific
>>> month is not constant.
>>> The output of the program gives the attached plot.
>>> Can anyone help? Thanks in advance.
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk_at_ucar.edu
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>>
>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk_at_ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Jan 16 2007 - 12:11:57 MST

This archive was generated by hypermail 2.2.0 : Tue Jan 16 2007 - 14:49:45 MST