<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title></title><style type="text/css">.felamimail-body-blockquote {margin: 5px 10px 0 3px;padding-left: 10px;border-left: 2px solid #000088;} </style></head><body>Hello<br><br>I am trying to understand the plotting outcomes of using NCL functions like month_to_annual and dim_avg_n_Wrap.<br><br>If i just use the month_to_annual function in this script, then my plot looks like see attached named T2M_month_to_annual.pdf, otherwise if i use month_to_annual and then dim_avg_n_Wrap my plot looks like T2m_dim_avg_n_Wrap.pdf.<br><br>Could someone please explain the difference to me? <br>All i wish to do is look at the annual mean values of T2m. <br><br>Much appreciated<br><br>My script looks like this:<br><br>; ==============================================================<br>; Open the file: Read only the user specified period <br>; ==============================================================<br>f= addfile("T2M_NC.nc", "r") ;Model Control<br><br>TIME = f->time<br> YYYY = cd_calendar(TIME,-1)/100 ; entire file<br> iYYYY = ind(YYYY.ge.yrStrt .and. YYYY.le.yrLast)<br>T41 = f->TREFHT(iYYYY,:,:)<br>printVarSummary(T41) ; (time, lat,lon)<br>T4 = lonFlip(T41)<br>printVarSummary(T4) ; (time, lat,lon)<br>T4@_FillValue = -9.96921e+36 <br><br>T2M = month_to_annual(T4, 1) ; average over the 0th dim<br>printVarSummary(T2M) ; (time,lat,lon) <br><br>aveX = dim_avg_n_Wrap(T2M,0) <br>printVarSummary(aveX) ; (lat,lon)<br><br>varX = dim_variance_n_Wrap(T2M,0) ; compute variance the 0th dim<br>printVarSummary(varX) ; (lat,lon) <br>;==============================================================================<br><br>f2= addfile("T2M_C.nc", "r") ;Current Caspian<br><br>TIME2 = f2->time<br> YYYY2 = cd_calendar(TIME2,-1)/100 ; entire file<br> iYYYY2 = ind(YYYY2.ge.yrStrt .and. YYYY2.le.yrLast)<br>air22 = f2->TREFHT(iYYYY2,:,:)<br>air2 = lonFlip(air22)<br>printVarSummary(air2) ; (time, lat,lon)<br>air2@_FillValue = -9.96921e+36 <br><br>T2M_CC = month_to_annual(air2,1) ; average over the 0th dim<br>printVarSummary(T2M_CC) ; (time,lat,lon) <br><br>aveY = dim_avg_n_Wrap(T2M_CC,0) <br>printVarSummary(aveY) ; (lat,lon)<br><br>varY = dim_variance_n_Wrap(T2M_CC,0) ; compute variance<br>printVarSummary(varY) ; (lat,lon) <br>;====================================================================<br>;calculate the T2M difference <br>;==================================================================== <br>T2diff = new(dimsizes(T2M),typeof(T2M),T2M@_FillValue)<br>;printVarSummary(T2diff) <br>copy_VarMeta(T2M,T2diff)<br>;printVarSummary(T2diff) <br>T2diff=T2M_CC-T2M<br>; printVarSummary(T2diff) ; (lat,lon) <br><br></body></html>