<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Thanks Dennis, I keep forgetting that (welcome) feature was added.<br>
<br>
- Walter<br>
<br>
<div class="moz-cite-prefix">On 2016-04-13 11:45, Dennis Shea wrote:<br>
</div>
<blockquote
cite="mid:CAOF1d_4cBsaqrw65S7ToevvQb_TJm4LbLKdAcqET7vcb3A33vw@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>
<div>
<div>
<div>WK ... thx for replying<br>
<br>
</div>
One minor alternative .... Rather than <br>
</div>
<br>
<tt> delete(intensity)</tt><tt><br>
</tt><tt> delete(duration)</tt><tt><br>
</tt><tt> delete(center_lon)</tt><tt><br>
</tt><tt> delete(center_lat)</tt><tt><br>
<br>
</tt></div>
<tt>You can delete multiple variables via<br>
<br>
</tt></div>
<tt> delete([/intensity, duration, center_lon, center_lat/])<br>
</tt>
<div>
<div><br>
</div>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Wed, Apr 13, 2016 at 9:40 AM, Walter
Kolczynski <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:walter.kolczynski@noaa.gov" target="_blank">walter.kolczynski@noaa.gov</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000"> Yongil,<br>
<br>
Unfortunately, NCL doesn't support custom structures. The
best way might be to create a list for the intensity with
duration and location as attributes. Something like this:<br>
<br>
<tt>intensityList = NewList("fifo")</tt><tt><br>
</tt><tt>do i=0, nEvents-1, 1</tt><tt><br>
</tt><tt> <read in data></tt><tt><br>
</tt><tt> intensity@duration = duration</tt><tt><br>
</tt><tt> intensity@center_lon = center_lon</tt><tt><br>
</tt><tt> intensity@center_lat = center_lat</tt><tt><br>
</tt><tt> ListPush( intensityList, echo(intensity) )</tt><tt><br>
</tt><tt> delete(intensity)</tt><tt><br>
</tt><tt> delete(duration)</tt><tt><br>
</tt><tt> delete(center_lon)</tt><tt><br>
</tt><tt> delete(center_lat)</tt><tt><br>
</tt><tt>end do</tt><br>
<br>
Where echo is a function I often use with lists that
returns an anonymous copy so the list retains the variable
if it is deleted:<br>
<br>
<tt>if isdefined("echo") then undef("echo") end if</tt><tt><br>
</tt><tt>function echo(variable)</tt><tt><br>
</tt><tt> local variable2</tt><tt><br>
</tt><tt> begin</tt><tt><br>
</tt><tt> variable2 = variable</tt><tt><br>
</tt><tt> return variable2</tt><tt><br>
</tt><tt> end ; echo</tt><br>
<br>
The downside to this method is that you can't have
metadata on the duration or locations. The other option is
to create a list for each variable, which breaks their
connection but allows you to keep the metadata.<br>
<br>
- Walter
<div>
<div class="h5"><br>
<br>
<div>On 2016-04-13 11:24, Sitan Heyl wrote:<br>
</div>
</div>
</div>
<blockquote type="cite">
<div>
<div class="h5">
<div dir="ltr">Hi, All
<div> I want to create an array of blocking
event, every event contains intensity, duration,
center_lon(duration), center_lat(duration).
because center_lon depends on the duration, so I
wonder if there is one method to create an
array, in which every member is a list to
include variable (intensity, duration) and
array(center_lon,center_lat). I think this is
similar to structure in C/C++ Language. Any help
is welcoming.</div>
<div><br>
</div>
<div>Best,</div>
<div>Yongli </div>
</div>
<br>
<fieldset></fieldset>
<br>
</div>
</div>
<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>
<br>
<table style="border-top:1px solid #aaabb6">
<tbody>
<tr>
<td style="width:55px;padding-top:13px"><a
moz-do-not-send="true"
href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient&utm_term=oa-2200-c"
target="_blank"><img moz-do-not-send="true"
src="https://ipmcdn.avast.com/images/2016/icons/icon-envelope-tick-round-orange-border-v1.png"></a></td>
<td
style="width:470px;padding-top:15px;color:#41424e;font-size:13px;font-family:Arial,Helvetica,sans-serif;line-height:18px">Virus-free.
<a moz-do-not-send="true"
href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient&utm_term=oa-2200-c"
style="color:#4453ea" target="_blank">www.avast.com</a>
</td>
</tr>
</tbody>
</table>
</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>
<br>
</div>
</blockquote>
<br>
<br />
<table style="border-top: 1px solid #aaabb6;">
        <tr>
<td style="width: 55px; padding-top: 13px;"><a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient&utm_term=oa-2200-c" target="_blank"><img src="https://ipmcdn.avast.com/images/2016/icons/icon-envelope-tick-round-orange-border-v1.png" /></a></td>
                <td style="width: 470px; padding-top: 15px; color: #41424e; font-size: 13px; font-family: Arial, Helvetica, sans-serif; line-height: 18px;">Virus-free. <a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient&utm_term=oa-2200-c" target="_blank" style="color: #4453ea;">www.avast.com</a>
                </td>
        </tr>
</table></body>
</html>