[ncl-talk] Issue with Latitude-Time Plot

Amit Kumar amitkumar.777 at hotmail.com
Mon Aug 27 06:02:20 MDT 2018


Dear All,


I'm trying to plot Latitude vs Time Plot. It is working fine when I've 30 time instances, but for greater then that (i.e. 115 time steps) the plot is sowing different values in x-axis (time).


I'm not able to workout why this is happening? I'm attaching the output and my ncl script.


==================================================================================================


  var   = a->OLR_DLY
  dims = dimsizes(var)
print(dims)
lat   =  a->lat
  lon   =  a->lon
  time  =  a->time

 lon100E  = ind(lon.eq.100.)                           ; subscript at 90E
 latS      = -20.
 latN      =  40.
 shov      = var(lon|lon100E:lon100E,{lat|latS:latN},time|:)
 dims      = dimsizes(shov)                   ; shov=3D array=(1,31,127)
 sdemo     = onedtond(ndtooned(shov), (/dims(1),dims(2)/) )
 sdemo!0   = "lat"
 sdemo!1   = "time"
 sdemo&lat = lat({lat|latS:latN})
 sdemo&time= time

 sdemo = smth9 (sdemo,0.5, 0.25, False)               ; 2D smoother

 gtPat = 17                                           ; stiple
 ltPat = 3                                            ; hatch
;*************************
; plotting parameters
;*************************
 wks   = gsn_open_wks ("png", "Monsoon_2017_lat_time_100_1" ) ; send graphics to PNG file
 res                  = True               ; plot mods desired
 res at gsnDraw          = False              ; don't draw yet
 res at gsnFrame         = False              ; don't advance frame yet

 res at tiMainString     = "Daily OLR variation at 100E" ; title

 res at vpXF             = 0.12               ; default is 0.2 change aspect
 res at vpYF             = 0.8                ; default is 0.8 ration
 res at vpHeightF        = 0.4                ; default is 0.6
 res at vpWidthF         = 0.8                ; default is 0.6

 res at cnLevelSelectionMode = "ManualLevels" ; manual levels
 res at cnMinLevelValF       = 150.            ; min level
 res at cnMaxLevelValF       =  330.            ; max level
 res at cnLevelSpacingF      =  10           ; contour spacing

 res at cnFillOn         = True                ; color on
 res at lbLabelStride    = 4                   ; every other label
 res at lbOrientation    = "Horizontal"          ; vertical label bar
 res at pmLabelBarOrthogonalPosF = -0.04       ; move label bar closer to axis
 res at cnLinesOn        = False               ; turn off contour lines
 res at cnFillPalette    = "GMT_wysiwyg"    ; set color map


 plot = gsn_csm_lat_time(wks, sdemo, res )
 ;opt  = True
 ;opt at gsnShadeFillType = "pattern"
 ;opt at gsnShadeLow      = ltPat
 ;opt at gsnShadeHigh     = gtPat
 ;plot = gsn_contour_shade(plot, -0.69, 0.25, opt)
 ;plot = ZeroLineContour (plot)
 draw (plot)                                ; draw the contour object
 frame (wks)                                ; advance frame
end
==================================================================================================
%%%%%%%%%%%%%%%%%%%
################################

dimensions:
    lon = 1400
    lat = 1400
    time        = 115 // unlimited

chunk dimensions:
    lon = 1400

variables:
    Variable: lon
    Type: double
    Total Size: 1400 values
                11200 bytes
    Number of Dimensions: 1
    Dimensions and sizes:       [ 1400 <lon> ]
    Coordinates:
                lon: [40..109.95]
        Number of Attributes:        4
            standard_name       :       longitude
            long_name   :       longitude
            units       :       degrees_east
            axis        :       X

    Variable: lat
    Type: double
    Total Size: 1400 values
                11200 bytes
    Number of Dimensions: 1
    Dimensions and sizes:       [ 1400 <lat> ]
    Coordinates:
                lat: [-20..49.95]
        Number of Attributes:        4
            standard_name       :       latitude
            long_name   :       latitude
            units       :       degrees_north
            axis        :       Y

    Variable: time
    Type: double
    Total Size: 115 values
                920 bytes
    Number of Dimensions: 1
    Dimensions and sizes:       [ 115 <time | unlimited> ]
    Chunking Info:      [ 524288 <time> ]
    Coordinates:
                time: [9159840..9334080]
        Number of Attributes:        4
            standard_name       :       time
            units       :       minutes since 2000-1-1 00:00:00
            calendar    :       standard
            axis        :       T

    Variable: OLR_DLY
    Type: float
    Total Size: 225400000 values
                901600000 bytes
    Number of Dimensions: 3
    Dimensions and sizes:       [ 115 <time | unlimited> x 1400 <lat> x 1400 <lon> ]
    Chunking Info:      [ 1 <time> x 1 <lat> x 1400 <lon> ]
    Coordinates:
                time: [9159840..9334080]
                lat: [-20..49.95]
                lon: [40..109.95]
        Number of Attributes:        5
            standard_name       :       Outgoing Longwave Radiation
            long_name   :       Out Longwave Radiation(Daily)
            units       :       W.m-2
            _FillValue  :       -999
            missing_value       :       -999


########################################

Thanks in advance.

Regards
Amit

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180827/4410c0c0/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Monsoon_2017_lat_time_100.png
Type: image/png
Size: 128351 bytes
Desc: Monsoon_2017_lat_time_100.png
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180827/4410c0c0/attachment.png>


More information about the ncl-talk mailing list