[ncl-talk] read ncdf data from ascii
Barry Lynn
barry.h.lynn at gmail.com
Thu Feb 2 13:30:28 MST 2017
It usually means that the program cannot identify the file listed.
You should check that your path length is correct. Also, sometimes the file
needs an ".nc" at the end.
Barry
On Thu, Feb 2, 2017 at 6:46 PM, Izidine Pinto <izidinep at gmail.com> wrote:
> Dear NCL users
>
> I'm trying to read a bunch of netcdf files from a list using the script
> below. However I get the following error
>
> fatal:["FileSupport.c":4159]:(/home/user/Documents/yr/
> tasmax/tasmax_NCC-NorESM1-M_historical_19510101-20051231.nc) has no file
> extension, can't determine type of file to open
>
> It has worked before. Am I missing something obvious?
> And I'm using NCAR Command Language Version 6.3.0
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> *;***********************************************************************load
> "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"load
> "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"load
> "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"load
> "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"begin;************************************************;
> read in netCDF file;************************************************
> files = asciiread("/home/files_path.txt",-1,"string") print(files)
> f1 = addfiles(files,"r")end*
> The files_path.txt contains the path of the files such as
>
>
> */home/user/Documents/yr/tasmax/tasmax_NCC-NorESM1-M_historical_19510101-20051231.nc
> /home/user/Documents/yr/tasmax/tasmax_CNRM-CERFACS-CNRM-CM5_historical_19510101-20051231.nc
> <http://20051231.nc>*
>
> Thanks in advance
>
> Izidine Pinto
>
>
>
>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
--
Barry H. Lynn, Ph.D
Senior Lecturer,
The Institute of the Earth Science,
The Hebrew University of Jerusalem,
Givat Ram, Jerusalem 91904, Israel
Tel: 972 547 231 170
Fax: (972)-25662581
C.E.O, Weather It Is, LTD
Weather and Climate Focus
http://weather-it-is.com
Jerusalem, Israel
Local: 02 930 9525
Cell: 054 7 231 170
Int-IS: x972 2 930 9525
US 914 432 3108
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170202/2bc8686e/attachment.html
More information about the ncl-talk
mailing list