Re: setting time axis

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Tue, 16 Jan 2007 11:50:45 -0700 (MST)

Hi Marjolaine,

I wanted to test your script before I made this suggestion. Using
"trXAxisType" was the right idea, but I think what you really want is:

   res_at_gsnXAxisIrregular2Linear = True

This causes some more complicated code to happen internally
that linearizes the X axis.

Let me know if this is not what you're looking for.

--Mary

On Tue, 16 Jan 2007, 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
> (4) 20471
> (5) 20474
> (6) 20478
> (7) 20481
> (8) 20485
> (9) 20488
> (10) 20492
> (11) 20495
> (12) 20499
> (13) 20502
> (14) 20506
> (15) 20509
> (16) 20513
> (17) 20516
> (18) 20520
> (19) 20523
> (20) 20527
> (21) 20530
> (22) 20534
> (23) 20537
> (24) 20541
> (25) 20544
> (26) 20548
> (27) 20551
> (28) 20555
> (29) 20558
> (30) 20562
> (31) 20565
> (32) 20569
> (33) 20572
> (34) 20579
> (35) 20583
> (36) 20586
> (37) 20590
> (38) 20593
> (39) 20600
> (40) 20604
> (41) 20607
> (42) 20611
> (43) 20614
> (44) 20618
> (45) 20621
> (46) 20625
> (47) 20628
> (48) 20632
> (49) 20635
> (50) 20639
> (51) 20640
> (52) 20641
> (53) 20642
> (54) 20643
> (55) 20644
> (56) 20645
> (57) 20646
> (58) 20647
> (59) 20648
> (60) 20649
> (61) 20650
> (62) 20651
> (63) 20652
> (64) 20653
> (65) 20654
> (66) 20655
> (67) 20656
> (68) 20657
> (69) 20658
> (70) 20659
> (71) 20660
> (72) 20661
> (73) 20662
> (74) 20663
> (75) 20664
> (76) 20665
> (77) 20666
> (78) 20667
> (79) 20668
> (80) 20669
> (81) 20670
> (82) 20671
> (83) 20672
> (84) 20673
> (85) 20674
> (86) 20675
> (87) 20676
> (88) 20677
> (89) 20678
> (90) 20679
> (91) 20680
> (92) 20681
> (93) 20682
> (94) 20684
> (95) 20685
> (96) 20686
> (97) 20687
> (98) 20688
> (99) 20689
> (100) 20691
> (101) 20692
> (102) 20693
> (103) 20694
> (104) 20695
> (105) 20696
> (106) 20697
> (107) 20698
> (108) 20699
> (109) 20701
> (110) 20702
> (111) 20703
> (112) 20704
> (113) 20705
> (114) 20706
> (115) 20707
> (116) 20708
> (117) 20709
> (118) 20710
> (119) 20711
> (120) 20712
> (121) 20713
> (122) 20714
> (123) 20715
> (124) 20716
> (125) 20717
> (126) 20718
> (127) 20719
> (128) 20720
> (129) 20721
> (130) 20722
> (131) 20723
> (132) 20724
> (133) 20725
> (134) 20726
> (135) 20727
> (136) 20728
> (137) 20729
> (138) 20730
> (139) 20731
> (140) 20732
> (141) 20733
> (142) 20734
> (143) 20735
> (144) 20736
> (145) 20737
> (146) 20738
> (147) 20741
> (148) 20742
> (149) 20743
> (150) 20744
> (151) 20745
> (152) 20746
> (153) 20747
> (154) 20748
> (155) 20749
> (156) 20750
> (157) 20751
> (158) 20752
> (159) 20754
> (160) 20755
> (161) 20756
> (162) 20757
> (163) 20758
> (164) 20759
> (165) 20760
> (166) 20761
> (167) 20762
> (168) 20763
> (169) 20764
> (170) 20765
> (171) 20766
> (172) 20767
> (173) 20768
> (174) 20769
> (175) 20770
> (176) 20771
> (177) 20772
> (178) 20773
> (179) 20774
> (180) 20775
> (181) 20776
> (182) 20777
> (183) 20778
> (184) 20779
> (185) 20780
> (186) 20782
> (187) 20783
> (188) 20784
> (189) 20785
> (190) 20786
> (191) 20787
> (192) 20788
> (193) 20789
> (194) 20790
> (195) 20791
> (196) 20792
> (197) 20793
> (198) 20794
> (199) 20795
> (200) 20796
> (201) 20797
> (202) 20798
> (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 - 11:50:45 MST

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