<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 14pt; color: rgb(0, 0, 0);">
Of course! It works. I was setting it wrong, <span style="font-family: Calibri, Helvetica, sans-serif; background-color: rgb(255, 255, 255); display: inline !important">new_var = data(index(:,1)).</span><br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 14pt; color: rgb(0, 0, 0);">
<span style="font-family: Calibri, Helvetica, sans-serif; background-color: rgb(255, 255, 255); display: inline !important"><br>
</span></div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 14pt; color: rgb(0, 0, 0);">
<span style="font-family: Calibri, Helvetica, sans-serif; background-color: rgb(255, 255, 255); display: inline !important">Thanks a lot</span></div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>De:</b> Dennis Shea <shea@ucar.edu><br>
<b>Enviado:</b> quinta-feira, 1 de agosto de 2019 12:52<br>
<b>Para:</b> Vanúcia Schumacher <vanucia-schumacher@hotmail.com><br>
<b>Cc:</b> ncl-talk@ucar.edu <ncl-talk@ucar.edu><br>
<b>Assunto:</b> Re: [ncl-talk] ind_resolve</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div><br>
</div>
<div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:14pt; color:rgb(0,0,0)">
<span>Variable: index<br>
</span>
<div>Type: integer<br>
</div>
Dimensions and sizes: [25] x [1]<span></span><br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:14pt; color:rgb(0,0,0)">
---<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:14pt; color:rgb(0,0,0)">
new_var = data [48]</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:14pt; color:rgb(0,0,0)">
new_var = data(index) ---> How could it work?</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:14pt; color:rgb(0,0,0)">
---</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:14pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:14pt; color:rgb(0,0,0)">
Maybe <br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:14pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:14pt; color:rgb(0,0,0)">
new_var = data(index(:,0))</div>
</div>
</div>
<br>
<div class="x_gmail_quote">
<div dir="ltr" class="x_gmail_attr">On Thu, Aug 1, 2019 at 9:10 AM Vanúcia Schumacher via ncl-talk <<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a>> wrote:<br>
</div>
<blockquote class="x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
<div dir="ltr">
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:14pt; color:rgb(0,0,0)">
Hi users,</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:14pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:14pt; color:rgb(0,0,0)">
I am trying to implement a routine using ind_resolve, and would like to associate another variable by taking the values only in the ranks of these previously calculated indexes. Any ideas on how to do it?<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:14pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:14pt; color:rgb(0,0,0)">
... var [48]</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:14pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:14pt; color:rgb(0,0,0)">
index = ind_resolve(ind(.not.ismissing(var)),dsizes_a) ---> Works</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:14pt; color:rgb(0,0,0)">
ivalid := ind(.not.ismissing(var)) ; extract only the non-missing values.</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:14pt; color:rgb(0,0,0)">
<span>xvalid := var(ivalid) </span><br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:14pt; color:rgb(0,0,0)">
<span><br>
</span></div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:14pt; color:rgb(0,0,0)">
<span>Variable: index<br>
</span>
<div>Type: integer<br>
</div>
<div>Total Size: 100 bytes<br>
</div>
<div> 25 values<br>
</div>
<div>Number of Dimensions: 2<br>
</div>
<div>Dimensions and sizes: [25] x [1]<br>
</div>
<div>Coordinates: <br>
</div>
<div>Number Of Attributes: 1<br>
</div>
<div> _FillValue : -2147483647<br>
</div>
<span></span><br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:14pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:14pt; color:rgb(0,0,0)">
new_var = data [48]</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:14pt; color:rgb(0,0,0)">
new_var = data(index) ---> How could it work?</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:14pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:14pt; color:rgb(0,0,0)">
Thanks</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:14pt; color:rgb(0,0,0)">
<br>
</div>
</div>
_______________________________________________<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>
</div>
</body>
</html>