<div dir="ltr"><div><div><div><div><div>Dear NCL,<br><br>I am writing a code to convert weekly data to monthly values and then convert it to calculate say JJA mean.<br><br></div>There are two errors that I encounter:-<br></div>1)calculate_monthly_values: there should be more than one element<br></div>2)This is unsupported code<br><br>;**********************************************************************************<br>load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl&quot;<br>load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl&quot;<br>load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl&quot;<br>;**********************************************************************************<br><br><br>;Reading in the data<br>a =addfile(&quot;~/Documents/Snow_cover_IMS/NCL_codes/sce_area_B.nc&quot;,&quot;r&quot;)<br>b=addfile(&quot;~/Documents/Snow_cover_IMS/<a href="http://nhsce_v01r01_19661004_20140602.nc">nhsce_v01r01_19661004_20140602.nc</a>&quot;,&quot;r&quot;)<br><br>sce=byte2flt(a-&gt;B)<br>lat=b-&gt;latitude<br>lon=b-&gt;longitude<br><br><br>sce@lat2d=lat<br>sce@lon2d=lon<br><br>;Now adding area with it<br><br>sce_we=sce(:,53:71,38:59);Specific indices for western Europe<br>xMonthAvg = calculate_monthly_values(sce_we, &quot;avg&quot;, 0, False)<br>xJJA = month_to_season (xMonthAvg, &quot;JJA&quot;)<br>print(xJJA)<br>;**************************************************************<br><br></div>I will be grateful is someone could shed some light on this.<br><br></div>Best Regards<br>Ipshita<br><div><div><div><div><br></div></div></div></div></div>