[ncl-talk] Y-axis 'Time' in date form

Mary Haley haley at ucar.edu
Thu Jun 28 16:34:04 MDT 2018


Soma,

Check out the time_axis_labels function. You can see some examples here:

http://www.ncl.ucar.edu/Applications/time_labels.shtml

You can also use the cd_calendar function to do your own conversion. Here
are some examples:

http://www.ncl.ucar.edu/Applications/time.shtml#ex2

--Mary


On Wed, Jun 27, 2018 at 11:43 AM, Soma Roy <somaroy892 at gmail.com> wrote:

> Hello,
>
> I am trying to plot Y axis as time (date) but it is coming in gregorian
> calendar format.
>
> PrintVarSummary of my input data is as follows;
>
> Variable: temp
> Type: short
> Total Size: 6494418 bytes
>             3247209 values
> Number of Dimensions: 3
> Dimensions and sizes:   [time | 249] x [latitude | 161] x [longitude | 81]
> Coordinates:
>             time: [969336..970080]
>             latitude: [ 0..40]
>             longitude: [65..85]
> Number Of Attributes: 6
>   scale_factor :        0.0008040587614255413
>   add_offset :  289.9817757049943
>   _FillValue :  -32767
>   missing_value :       -32767
>   units :       K
>   long_name :   2 metre temperature
>
> Variable: ts1
> Type: short
> Total Size: 1330182 bytes
>             665091 values
> Number of Dimensions: 3
> Dimensions and sizes:   [time | 51] x [latitude | 161] x [longitude | 81]
> Coordinates:
>             time: [969336..969636]
>             latitude: [ 0..40]
>             longitude: [65..85]
> Number Of Attributes: 6
>   scale_factor :        0.0008040587614255413
>   add_offset :  289.9817757049943
>   _FillValue :  -32767
>   missing_value :       -32767
>   units :       K
>   long_name :   2 metre temperature
>
> Variable: ts
> Type: float
> Total Size: 2660364 bytes
>             665091 values
> Number of Dimensions: 3
> Dimensions and sizes:   [time | 51] x [latitude | 161] x [longitude | 81]
> Coordinates:
>             time: [969336..969636]
>             latitude: [ 0..40]
>             longitude: [65..85]
> Number Of Attributes: 1
>   _FillValue :  -32767
>
> Variable: tim
> Type: integer
> Total Size: 996 bytes
>             249 values
> Number of Dimensions: 1
> Dimensions and sizes:   [time | 249]
> Coordinates:
>             time: [969336..970080]
> Number Of Attributes: 3
>   units :       hours since 1900-01-01 00:00:0.0
>   long_name :   time
>   *calendar :    gregorian*
>
> Output figure is attached below.
>
> Kindly inform me how to fix it.
>
> Thanks,
> Soma
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180628/34b89f4e/attachment.html>


More information about the ncl-talk mailing list