<div dir="ltr"><div class="gmail_default" style="font-family:trebuchet ms,sans-serif">Hi <br></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif"><br></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif">I am plotting a time series of vertical profiles of temperature using gsn_contour, and want to explicitly label the Y-axis with pressure levels (1000hPa up to 600hPa) but the Y-axis tickmarks and labels disappear on setting it to explicit mode. Could you please point out what am I doing wrong here?</div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif"><br></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif">Here's the script:</div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif"><i>load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRF_contributed.ncl"<br>load "$NCARG_ROOT/lib/ncarg/nclscripts/contrib/time_axis_labels.ncl"<br>;load "/data1/tabish/nclscripts/cd_inv_string.ncl"<br>load "$NCARG_ROOT/lib/ncarg/nclscripts/contrib/cd_string.ncl"<br>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"<br>load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"<br><br>begin<br><br>a = addfile("/ichec/work/ngear013c/ERA5_t_1000-600hPa_27-30Jun2011.nc","r")<br>;READ 4D TEMPERATURE DATA FROM NC FILE. IT IS IN SHORT DATAYPE WITH SCALE FACTOR AND OFFSET AS METADATA<br>t = a->t<br>printVarSummary(t)<br><br>;READING MACE HEAD GRID VERTICAL PROFILE FOR ALL TIMES AND CONVERTING TO FLOAT ALONG WITH SCALING AND OFFSET USING SHORT2FLT FUNCTION<br>mh =  short2flt(t(:,:,{53.3247},{360.0-9.9033})); mace head grid<br>ic =  short2flt(t(:,:,{65},{360.0-30.0})); icelandic bloom source grid<br>ib =  short2flt(t(:,:,{57},{360.0-26.0})); a grid in between the source and receptor<br><br>print("TIME SERIES OF VERTICAL TEMPERATURE PROFILES AT THE 3 GRIDS EXTRACTED SUCCESSFULLY!")<br> <br>printVarSummary(mh)<br>mh_reorder = mh(level|:,time|:)<br>ic_reorder = ic(level|:,time|:)<br>ib_reorder = ib(level|:,time|:)<br>mh_reverse = mh_reorder(::-1,:)         ; reverses 0th dimension i.e. vert levels<br>ic_reverse = ic_reorder(::-1,:)         ; reverses 0th dimension i.e. vert levels<br>ib_reverse = ib_reorder(::-1,:)         ; reverses 0th dimension i.e. vert levels<br><br>wks = gsn_open_wks("x11","temperature_vertprofile_timeseries")    ; open a workstation<br>gsn_define_colormap(wks,"BlAqGrYeOrReVi200")<br><br>  res = True<br>  res@vpHeightF            = 0.20       ; height<br>  res@gsnDraw             = False           ; don't draw<br>  res@gsnFrame            = False           ; don't advance frame<br><br>;MAKE EXPLICIT TICKMARKS FOR Y-AXIS TO SHOW PRESSURE LEVELS<br>  res@tmYLOn = True<br>  res@tmYLMode          = "Explicit"    ; Define own tick mark labels.<br>  res@tmYROn = False<br>  res@tmXTOn = False<br>  res@tmYLValues        = (/1000,975,950,925,900,875,850,825,800,775,750,700,650,600/)             ; location of explicit labels<br>  res@tmYLLabelsOn   = True<br>  res@tmYLLabels      = (/"1000","975","950","925","900","875","850","825","800","775","750","700","650","600"/)<br><br>;--------------------------------------------------<br>; The time_axis_label function adds additional<br>; resources to "res" to produce nicely-formatted<br>; time labels on X axis. This function only works<br>; if you have a time "units" recognized by the<br>; cd_calendar function.<br>;--------------------------------------------------<br>  restick           = True<br>  restick@ttmFormat = "%D/%N/%Y"<br>  restick@ttmMajorStride= 24<br>  restick@ttmMinorStride= 6<br><br>  timearr = ispan (0,95,1)<br>  timearr@units = "hours since 2011-06-27 00:00:00"<br>  time_axis_labels(timearr,res,restick)<br>  res@trXMaxF=max(timearr)<br><br>  res@tmXBLabelFontHeightF = 0.01<br> <br>  res@gsnSpreadColors          = True             ; use full range of colors<br>  res@cnFillOn                 = True             ; turns on color fill<br>  res@cnLevelSelectionMode     = "ManualLevels"   ; set levels manually<br>  res@cnMinLevelValF           = 260<br>  res@cnMaxLevelValF           = 280.<br>  res@cnLevelSpacingF          = 2<br>  res@cnLinesOn                = False<br>  res@cnLineLabelsOn           = False<br>  res@cnInfoLabelOn            = False<br><br>res@tiMainString             = ""<br>plot1    = gsn_contour(wks,mh_reverse,res)<br>res@tiMainString             = ""<br>plot2    = gsn_contour(wks,ic_reverse,res)<br>res@tiMainString             = ""<br>plot3    = gsn_contour(wks,ib_reverse,res)<br><br><br>;************************************************<br>; create panel<br>;************************************************<br>resP = True<br>resP@gsnPanelMainString = "Temperature profile evolution over 4 days"<br>resP@gsnPanelYWhiteSpacePercent = 0.0<br>resP@gsnPanelLabelBar    = True                ; add common colorbar<br>resP@lbLabelFontHeightF  = 0.007               ; make labels smaller<br><br>gsn_panel(wks,(/plot1,plot2,plot3/),(/3,1/),resP)             ; now draw as one plot<br><br>end</i></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif"><i><br></i></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif"><i><br></i></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif">Thanks a lot in advance!</div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif"><br></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif">Tabish</div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif"><br></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif"><br></div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div><span style="color:rgb(11,83,148)"><span style="font-family:verdana,sans-serif"></span><i><span style="font-family:verdana,sans-serif"><font size="1">Tabish U Ansari<br></font></span></i></span></div><span style="color:rgb(11,83,148)"><i><span style="font-family:verdana,sans-serif"><font size="1">Postdoctoral Researcher <br></font></span></i></span></div><div><span style="color:rgb(11,83,148)"><i><span style="font-family:verdana,sans-serif"><font size="1">Centre for Climate and Air Pollution Studies (C-CAPS)<br></font></span></i></span></div><div><span style="color:rgb(11,83,148)"><i><span style="font-family:verdana,sans-serif"><font size="1">School of Physics, NUI-Galway</font></span></i><font size="1"><span style="font-family:tahoma,sans-serif"><i><span style="font-family:verdana,sans-serif">, Ireland</span></i><br></span></font></span></div><div><span style="color:rgb(11,83,148)"><font size="1"><span style="font-family:tahoma,sans-serif"><i><span style="font-family:verdana,sans-serif">ResearchGate: <a href="https://www.researchgate.net/profile/Tabish_Ansari" target="_blank">https://www.researchgate.net/profile/Tabish_Ansari</a></span></i><br></span></font></span></div></div></div></div></div></div></div>