<div dir="ltr"><div>This can be done in many ways, e.g.:</div><div><br></div><div><b>method1</b>: (using function <b>dim_pad_extend: <a href="https://www.ncl.ucar.edu/Document/Functions/Shea_util/dim_pad_extend.shtml">https://www.ncl.ucar.edu/Document/Functions/Shea_util/dim_pad_extend.shtml</a></b>):</div><div><br></div><div> nlev_X1 = 25<br></div><div> nlev_X2 = 19<br></div><div> nlev_tot = nlev_X1+nlev_X2</div><div> nExt = nlev_X2</div><div><br></div><div> X1 := dim_pad_extend(X1,nExt,1,False) ; note the reassignment operator <b>":"; this would extend the dimension of X1 by nExt.</b><br></div><div><br></div><div> X1(:,nlev_X1:nlev_tot-1,:,:) = X2</div><div> <br></div><div><br></div><div><b>method 2:</b><br></div><div> Rearrange the dimensions (see <a href="https://www.ncl.ucar.edu/Document/Language/reorder.shtml">https://www.ncl.ucar.edu/Document/Language/reorder.shtml</a>) and use the function <b>array_append_record</b>.<br></div><div><br></div><div><br></div><div></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Apr 2, 2021 at 11:11 AM xxq via ncl-talk <<a href="mailto:ncl-talk@mailman.ucar.edu">ncl-talk@mailman.ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><h1 style="padding:5px;line-height:22pt"><font style="margin:0px;padding:0px;vertical-align:inherit" size="4">array_append_record</font></h1></div><div><font size="4">Dear ncl-talkers,</font></div><div><font size="4"><font style="margin:0px;padding:0px;vertical-align:inherit">I want to append </font><span style="color:rgb(51,51,51);font-family:verdana,sans-serif">two multi-dimensional arrays</span><font style="margin:0px;padding:0px;vertical-align:inherit">(ntime*nlev*nlat*nlon) : X1(480*25*50*360) and</font> X2(480*19*50*360) to Y(480*44*50*360), but I found that the function 'array_append_record(x1,x2,opt)' could only <span style="color:rgb(51,51,51);font-family:verdana,sans-serif">appends additional records [leftmost dimension] to a previously existing array. Is there any other functions available for my question?</span></font></div><div><span style="color:rgb(51,51,51);font-family:verdana,sans-serif;font-size:13.3333px"></span></div><div><font size="4"><br></font></div><div><font size="4">Best wishes,</font></div><div><font size="4">Fiona</font></div>_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="https://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">https://mailman.ucar.edu/mailman/listinfo/ncl-talk</a></blockquote></div>