[ncl-talk] using ind to subset a variable in addfiles

Adam Phillips asphilli at ucar.edu
Fri Mar 6 15:02:26 MST 2020


Hi Adam,
Just a guess, but what happens if you do this:
invarT = inptr[:]->PRECC
invar = invarT(indt,indcol)
I have a memory that every once in a while subsetting a read-in variable
from addfiles can be more time consuming than reading in the variable and
subsetting it afterwards.
Hope that helps!
Adam

On Fri, Mar 6, 2020 at 11:30 AM Adam Herrington via ncl-talk <
ncl-talk at ucar.edu> wrote:

> I am running into an issue where I am trying to subset a variable on an
> unstructured grid after calling addfiles:
>
>           inptr = addfiles(infiles,"r")
>
>           indcol = ind(lattmp.ge.lat_s .and. lattmp.le.lat_n .and. \
>                        lontmp.ge.lon_w .and. lontmp.le.lon_e)
>           indt = ind(ftime.ge.ftime(itime0) .and. ftime.le.ftime(itime1))
>
> and it just hangs in this next call:
>
>           invar = inptr[:]->PRECC(indt,indcol)
>
> I've checked to make sure that indt and indcol are not bogus. Can anyone
> think of why this is not taking?
>
> Adam Herrington
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk



-- 
Adam Phillips
Associate Scientist,  Climate and Global Dynamics Laboratory, NCAR
www.cgd.ucar.edu/staff/asphilli/   303-497-1726

<http://www.cgd.ucar.edu/staff/asphilli>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20200306/05927955/attachment.html>


More information about the ncl-talk mailing list