[ncl-talk] Reading NETCDF files OK with NCVIEW but Not Working in NCL (Ruben Santos)
Elizabeth Burakowski
burakows at ucar.edu
Wed Jul 22 09:02:40 MDT 2015
Hi Ruben,
You may need to list the files first:
fils = systemfunc("ls PATHTOFILES/*radar.nc")
ra = addfiles(fils,"r")
To read off the variable, you would then need the following:
accum = ra[:]->ACCUM_Z_ZDR
See Example 1:
https://www.ncl.ucar.edu/Document/Functions/Built-in/addfiles.shtml
Liz.
> Message: 5
> Date: Tue, 21 Jul 2015 16:19:09 -0600
> From: Ruben Santos <jorge.ruben.santos at gmail.com>
> Subject: [ncl-talk] Reading NETCDF files OK with NCVIEW but Not
> Working in NCL
> To: ncl-talk at ucar.edu
> Message-ID:
> <CAK2+unCVN+FkF=3vbAExV_iou46hw=
> SU5bBF3zySzV-rGAeQXw at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Hello,
>
> I am having problems reading a netcdf file with addfile command, whereas
> the same file can be read with no inconvenient by using ncview commad.
>
>
> *The following ncl code:*
>
> ra=addfiles("*radar.nc <http://radar.nc>*","r")
>
> printVarSummary(ra)
>
> accum=ra->ACCUM_Z_ZDR
>
> *Produces the following error message:*
>
>
> Variable: ra
> Type: list <concat | fifo>
> Total items: 1
>
> fatal:(ra) not reference to a valid file
> fatal:["Execute.c":8575]:Execute: Error occurred at or near line 124 in
> file readgsmap.ncl
>
>
> I attach the file *radar.nc <http://radar.nc> *and the ncview_radar.png
> to
> show the variable list.
>
> Help is really appreciated!!!
>
> Thanks
>
> Ruben
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150721/ca2bda16/attachment.html
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: radar.nc
> Type: application/x-netcdf
> Size: 947818 bytes
> Desc: not available
> Url :
> http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150721/ca2bda16/attachment.nc
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: ncview_radar.png
> Type: image/png
> Size: 18883 bytes
> Desc: not available
> Url :
> http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150721/ca2bda16/attachment.png
>
> ------------------------------
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
> End of ncl-talk Digest, Vol 140, Issue 34
> *****************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150722/105e7b37/attachment.html
More information about the ncl-talk
mailing list