[ncl-talk] ind_resolve

Vanúcia Schumacher vanucia-schumacher at hotmail.com
Thu Aug 1 10:46:33 MDT 2019


Of course! It works. I was setting it wrong,  new_var = data(index(:,1)).

Thanks a lot
________________________________
De: Dennis Shea <shea at ucar.edu>
Enviado: quinta-feira, 1 de agosto de 2019 12:52
Para: Vanúcia Schumacher <vanucia-schumacher at hotmail.com>
Cc: ncl-talk at ucar.edu <ncl-talk at ucar.edu>
Assunto: Re: [ncl-talk] ind_resolve


Variable: index
Type: integer
Dimensions and sizes: [25] x [1]
---
new_var = data     [48]
new_var = data(index)  ---> How could it work?
---

Maybe

new_var = data(index(:,0))

On Thu, Aug 1, 2019 at 9:10 AM Vanúcia Schumacher via ncl-talk <ncl-talk at ucar.edu<mailto:ncl-talk at ucar.edu>> wrote:
Hi users,

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?

... var [48]

index  = ind_resolve(ind(.not.ismissing(var)),dsizes_a) ---> Works
ivalid  := ind(.not.ismissing(var))   ; extract only the non-missing values.
xvalid  := var(ivalid)

Variable: index
Type: integer
Total Size: 100 bytes
            25 values
Number of Dimensions: 2
Dimensions and sizes: [25] x [1]
Coordinates:
Number Of Attributes: 1
  _FillValue : -2147483647


new_var = data     [48]
new_var = data(index)  ---> How could it work?

Thanks

_______________________________________________
ncl-talk mailing list
ncl-talk at ucar.edu<mailto:ncl-talk at ucar.edu>
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190801/9a00f83b/attachment.html>


More information about the ncl-talk mailing list