<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Please always reply to the list and not to people individually.<br>
<br>
Please make sure the arrays you are passing into <tt>array_append_record
</tt>are the correct dimensionality. Looking at your example again,
<tt>x1=a(0,:,:)</tt> will automatically remove the degenerate time
dimension, reducing the rank from 3 to 2, so when you try to use <tt>array_append_record</tt>
to combine with x2 (which is still rank 3), you get an error. You
could use <tt>conform </tt>to add the extra dimension back on to
x1, but a better way is still to give all the indexes you want at
once:<br>
<br>
<tt>inds = array_append_record( 0, ispan(2,29,1), 0 )</tt><tt><br>
</tt><tt>x = a(inds,:,:)</tt><br>
<br>
That way you keep all of the metadata.<br>
<br>
- Walter<br>
<br>
<div class="moz-cite-prefix">On 12-Jun-15 18:42, Taufik Samudra
wrote:<br>
</div>
<blockquote
cite="mid:CAF1C72KkNXSw0ADi_yNxdq1Y4VUA2BNvM3QGHs0vrc4xF64qvQ@mail.gmail.com"
type="cite">
<p dir="ltr">i had already try for function array_append_record,
but this function must be have same amount of each dimention..
Can explain how to modified this function while I had different
amount of time dimention? thanks..</p>
<div class="gmail_quote">On Jun 13, 2015 5:26 AM, "Walter
Kolczynski" <<a moz-do-not-send="true"
href="mailto:walter.kolczynski@noaa.gov">walter.kolczynski@noaa.gov</a>>
wrote:<br type="attribution">
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"> <tt>array_append_record</tt>
should do what you're looking for. For this specific
example, you could also just pass in an array of the indexes
you want instead of making the two intermediate arrays.<br>
<br>
- Walter<br>
<br>
<div>On 12-Jun-15 18:20, Taufik Samudra wrote:<br>
</div>
<blockquote type="cite">
<p dir="ltr">Hello,<br>
I have variable a(time=30,lat=80,lon=180)<br>
I want to get a new variabel like<br>
x1=a(0,:,:)<br>
x2 =a(2:29,:,:)<br>
how to combine x1 and x2 and get a new variabel?x1 and
x2 has difereent amount for dimentiobln time.. Is it
possible in NCL?<br>
this for my project about cross validation<br>
thanks.. </p>
<br>
<fieldset></fieldset>
<br>
<pre>_______________________________________________
ncl-talk mailing list
<a moz-do-not-send="true" href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>
List instructions, subscriber options, unsubscribe:
<a moz-do-not-send="true" href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a>
</pre>
</blockquote>
<br>
<pre cols="72">--
Walter Kolczynski, Jr.
Global Ensemble Team
NOAA/NWS/NCEP/EMC (via I.M. Systems Group)
(301) 683-3781</pre>
</div>
<br>
_______________________________________________<br>
ncl-talk mailing list<br>
<a moz-do-not-send="true" href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a moz-do-not-send="true"
href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk"
rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br>
</blockquote>
</div>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Walter Kolczynski, Jr.
Global Ensemble Team
NOAA/NWS/NCEP/EMC (via I.M. Systems Group)
(301) 683-3781</pre>
</body>
</html>