[ncl-talk] Need help fixing the date format in a plot

Soumik Basu sbasu at alaska.edu
Mon Jun 24 14:41:12 MDT 2019


Hi,

Thank you for the reply. I already tried that example in time_labels but it
did not work. It gave me an execute error.
fatal:["Execute.c":8640]:Execute: Error occurred at or near line 51 in file
sat_hov_jf_x1.ncl
The variable I am plotting is zonal mean.

Variable: air_z
Type: float
Total Size: 53760 bytes
            13440 values
Number of Dimensions: 2
Dimensions and sizes: [time | 70] x [lon | 192]
Coordinates:
            time: [1919712..1921368]
            lon: [ 0..358.125]
Number Of Attributes: 16
  _FillValue : -9.96921e+36
  long_name : mean Daily Air temperature at 2 m
  units : degK
  precision : 2
  least_significant_digit : 1
  GRIB_id : 11
  GRIB_name : TMP
  var_desc : Air temperature
  dataset : NCEP Reanalysis Daily Averages
  level_desc : 2 m
  statistic : Mean
  parent_stat : Individual Obs
  valid_range : ( 150, 400 )
  actual_range : ( 204.925, 314.85 )
  missing_value : -9.96921e+36
  average_op_ncl : dim_avg_n over dimension(s): lat


These were my resources for plotting:

  wks  = gsn_open_wks ("x11", "sat_time_lon" )

  res                      = True               ; plot mods desired
  res at cnFillOn             = True               ; turn on color fill
  res at cnFillPalette        = "temp_diff_18lev"           ; set color map

  res at tiMainString         = ""   ; title

  res at cnLevelSelectionMode = "ManualLevels"     ; manual contour levels
  res at cnMinLevelValF       = -40.        ; min level
  res at cnMaxLevelValF       =  40.               ; max level
  res at cnLevelSpacingF      = 2.                 ; contour level spacing
  res at cnLinesOn            = False


  restick = True
  restick at ttmFormat = "%N/%D %H:%M:%S"
;  restick at ttmAxis = "YL"
;  restick at ttmMajorStride = 20
  time_axis_labels(data&date,res,restick)

  plot = gsn_csm_hov(wks, air_z(:,{160:290}), res)

Thanks,
Soumik


On Mon, Jun 24, 2019 at 1:13 PM Rick Brownrigg <brownrig at ucar.edu> wrote:

> There are several examples at:
>
> http://ncl.ucar.edu/Applications/time_labels.shtml
>
> Rick
>
> On Mon, Jun 24, 2019 at 12:03 PM Soumik Basu via ncl-talk <
> ncl-talk at ucar.edu> wrote:
>
>> Hi,
>>
>> I am plotting daily temperatures from 1st Jan 2019 to 11th March 2019
>> against longitudes. But I couldn't get the time in right format.
>> Can anybody please help me to get the dates along y-axis in the right
>> format?
>> I am using NCEP Reanalysis data and I am attaching the code and the plot.
>>
>> Thanks,
>> Soumik
>>
>> --
>> --
>> “We’ve all got both light and dark inside us. What matters is the part we
>> choose to act on. That’s who we really are.” – J.K. Rowling
>>
>>
>> **************************************************************************************************
>> Dr. Soumik Basu
>> Post Doctoral Research Faculty
>> International Arctic Research Center, UAF, Fairbanks, AK, USA
>> PhD in Atmospheric Sciences
>> M.Sc. in Atmospheric Sciences
>> Email: suvro05 at gmail.com
>> website: http://soumikbasu.weebly.com/
>>
>>
>> ***************************************************************************************************
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk at ucar.edu
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>

-- 
-- 
“We’ve all got both light and dark inside us. What matters is the part we
choose to act on. That’s who we really are.” – J.K. Rowling

**************************************************************************************************
Dr. Soumik Basu
Post Doctoral Research Faculty
International Arctic Research Center, UAF, Fairbanks, AK, USA
PhD in Atmospheric Sciences
M.Sc. in Atmospheric Sciences
Email: suvro05 at gmail.com
website: http://soumikbasu.weebly.com/

***************************************************************************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190624/64666f65/attachment.html>


More information about the ncl-talk mailing list