<div dir="ltr"><div>Take advantage of NCL' dimension reduction.</div><div><br></div><div>T3 = T1 + conform(T1, T2(:,:,0,0), (/0,1/))</div><div><br></div><div>==</div><div>For background:<br></div><div> printVarSummary(T2) ; rank 4<br></div><div><br></div><div>then</div><div> printVarSummary(T2(:,:,0,0)) ; rank 2<br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Nov 20, 2019 at 8:06 AM Sri.durgesh Nandini-Weiss via ncl-talk <<a href="mailto:ncl-talk@ucar.edu">ncl-talk@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">Hello everyone,<br>
<br>
i have a simple question on addition/sum between two 4 dimension <br>
variables e.g. temperature1 and temperature 2<br>
<br>
How can i correctly perform the addition of:<br>
<br>
T3=T1 [240,100,45,90] + T2 [240,100,1,1]<br>
<br>
I want to have my result output T3 in the format [240,100,45,90] so i <br>
cannot use dim_sum_n_Wrap or array_append_record.<br>
<br>
Can someone please suggest a way to add the first 2 dimensions?<br>
<br>
Thanx<br>
<br>
Sri<br>
<br>
<br>
<br>
-- <br>
Dr. Sri Nandini-Weiß<br>
Research Scientist<br>
<br>
Universität Hamburg<br>
Center for Earth System Research and Sustainability (CEN)<br>
Cluster of Excellence 'Climate, Climatic Change, and Society' (CLICCS)<br>
<br>
Bundesstrasse 53, 20146 Hamburg<br>
Tel: +49 (0) 40 42838 7472<br>
<br>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a></blockquote></div>