<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi Saran,<div class=""><br class=""></div><div class="">That’s for two reasons: </div><div class=""><br class=""></div><div class="">(1) You are only using the first time dimension of your data, but all latitude and all longitude dimensions, so by your own setting you're plotting latitude/longitude, not time/longitude:</div><div class=""><font face="Courier" class=""><br class=""></font></div><div class=""><font face="Courier" class="">u = f->cur_vort(0,:,:)</font> </div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">(2) You need to prepare the data in the correct way first, so that you can plot it. Your code below only does the plotting, but not the data manipulation so that you can actually plot what you need. Average the latitude dimension (y axis) for each longitudinal grid cell “column” and each time step, and then plot the data. </div><div class="">This might work (though, it might not. I didn’t test it. Please read through it and try to understand it. Don’t just plug it into your script. Also, there might be an easier way to do this):</div><div class=""><br class=""></div><div class=""><font face="Courier" class="">u = f->cur_vort(:,:,:) ; u contains all your (3-dimensional) curvature vorticity data</font></div><div class=""><font face="Courier" class=""><br class=""></font></div><div class=""><font face="Courier" class="">vort_timeseries = new((/dimsizes(time),dimsizes(lon)/),float) ; this is the 2-dimensional variable you use for the Hovmoeller diagram</font></div><div class=""><font face="Courier" class=""><br class=""></font></div><div class=""><font face="Courier" class="">do time_step = 0,dimsizes(time)</font></div><div class=""><br class=""></div><div class=""><font face="Courier" class=""> do lon_step = 0,dimsizes(lon)</font></div><div class=""><font face="Courier" class=""><br class=""></font></div><div class=""><font face="Courier" class=""> vort_timeseries(time_step,lon_step) = avg(u(time_step,:,lon_step)) </font><span style="font-family: Courier;" class=""> ; a loop to average the data by latitude for each time step and longitudinal step</span></div><div class=""><font face="Courier" class=""><br class=""></font></div><div class=""><font face="Courier" class=""> end do ; lon_step loop</font></div><div class=""><font face="Courier" class=""><br class=""></font></div><div class=""><font face="Courier" class="">end do ; time_step loop</font></div><div class=""><font face="Courier" class=""><br class=""></font></div><div class=""><font face="Courier" class=""><br class=""></font></div><div class=""><font face="Courier" class="">vort_timeseries</font> should be the data you need for your Hovmoeller diagram.</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Good luck,</div><div class="">Toni</div><div class=""><br class=""></div><div class=""><div class=""><div dir="auto" style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div dir="auto" style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div dir="auto" style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div dir="auto" style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div dir="auto" style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div dir="auto" style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div dir="auto" style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div style="font-family: Calibri; font-size: 14px; font-style: normal; font-variant-caps: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="background-color: rgb(255, 255, 255);" class=""><font class=""><font color="#333300" class=""><br class=""></font></font></span></div><div style="font-family: Calibri; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><font color="#333300" class=""><b style="background-color: rgb(255, 255, 255);" class="">Toni Klemm</b><b class=""><span style="background-color: rgb(255, 255, 255);" class="">, </span><span style="background-color: rgb(255, 255, 255);" class="">Ph.D.</span></b></font><div class=""><div class=""><span class="" style="background-color: rgb(255, 255, 255);"><font color="#333300" class="">Postdoctoral Research Associate</font></span></div><div class=""><span class="" style="background-color: rgb(255, 255, 255);"><font color="#333300" class="">Department of Ecosystem Science and Management</font></span></div><div class=""><span class="" style="background-color: rgb(255, 255, 255);"><font color="#333300" class="">College of Agriculture and Life Sciences</font></span></div><div class=""><span style="background-color: rgb(255, 255, 255);" class=""><font color="#333300" class="">Texas A&M University, College Station, TX</font></span></div><div class="" style="color: rgb(0, 0, 0);">Contributor to the <a href="https://www.eccforum.org/" class="">Early Career Climate Forum</a></div><div class="" style="color: rgb(0, 0, 0);"><span class="" style="color: rgb(51, 51, 153); background-color: rgb(255, 255, 255);"><a href="http://www.toni-klemm.de/" class="">www.toni-klemm.de</a> | </span><a href="https://twitter.com/ToniKlemm" class="">@toniklemm</a></div></div></div><div style="color: rgb(0, 0, 0); font-family: Calibri; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class=""></div><div style="color: rgb(0, 0, 0); font-family: Calibri; font-size: 14px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class=""></div></div></div></div></div></div></div><br class="Apple-interchange-newline"></div><br class="Apple-interchange-newline"><br class="Apple-interchange-newline">
</div>
<div><br class=""><blockquote type="cite" class=""><div class="">On Jan 29, 2019, at 5:16 AM, Saran Rajendran <<a href="mailto:happysaran.raj@gmail.com" class="">happysaran.raj@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Dear NCL users,<br class=""><br class=""> When I tried this script to plot hovmueller diagram<br class="">(time vs longitude) of curvature vorticity, the code runs. But instead<br class="">of time in y-axis, it shows latitude. I want time in the y-axis.<br class=""><br class=""><br class="">f = addfile("curv_vort_lat_lon_925hPa_20150101_20151231.nc","r")<br class=""><br class=""> u = f->cur_vort(0,:,:)<br class=""><br class=""> wks = gsn_open_wks("png","hovmueller_cv_2015")<br class=""><br class=""> res=True<br class=""><br class=""> res@cnFillOn = True ; turn on color fill<br class=""><br class=""> res@cnFillPalette = "BlWhRe"<br class=""><br class=""> res@gsnLeftString="cv"<br class=""><br class=""> plot = gsn_csm_hov(wks, u(:,{60:120}), res )<br class="">_______________________________________________<br class="">ncl-talk mailing list<br class=""><a href="mailto:ncl-talk@ucar.edu" class="">ncl-talk@ucar.edu</a><br class="">List instructions, subscriber options, unsubscribe:<br class="">http://mailman.ucar.edu/mailman/listinfo/ncl-talk<br class=""></div></div></blockquote></div><br class=""></div></body></html>