Re: error with addfiles and ListSetType

From: Adam Phillips <asphilli_at_nyahnyahspammersnyahnyah>
Date: Wed Jan 26 2011 - 18:04:44 MST

Hi Erik,
I think you are forgetting to call addfiles before you call ListSetType.
f = addfiles(files,"r")
ListSetType (f, "join")

Take a look at the ListSetType page here:
http://www.ncl.ucar.edu/Document/Functions/Built-in/ListSetType.shtml
Adam

> Hi I keep getting an error at ncl 19> in the <snip> of code below.
> What would cause this error?
> Thank you in advance.
> -Erik
>
> DA:/discover/nobackup/eunoble/myWorkDir/OUTPUT/PROJ/27km_NCEP2/OUTPUT/Experiment_27km_01>
> ncl
> Copyright (C) 1995-2009 - All Rights Reserved
> University Corporation for Atmospheric Research
> NCAR Command Language Version 5.1.1
> The use of this software is governed by a License Agreement.
> See http://www.ncl.ucar.edu/ for more details.
> ncl 0> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
> ncl 1> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
> ncl 2> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
> ncl 3> load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRF_contributed.ncl"
> ncl 4> load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"
> ncl 5>
> ncl 6> ;***************************************************************
> ncl 7> ; Change these parts
> ncl 8> ;***************************************************************
> ncl 9> Files = "*_wind_diagnostics.nc" ;input files
> ncl 10> diro = "./" ;output directory
> ncl 11> NCFILE1 = "UV" ;output file
> ncl 12> ;***************************************************************
> ncl 13> ; Read in WRF Files
> ncl 14> ;***************************************************************
> ncl 15> files = systemfunc (" ls " + Files) ; file paths
> ncl 16> numFILES = dimsizes(files)
> ncl 17>
> ncl 18> ;========================
> ncl 19> ListSetType (files, "join") ; concatenate or
> "merge" (default)
> fatal:Number of elements of dimension (0) of argument (0) is (97) in
> function (ListSetType), expected (1) elements
> fatal:Execute: Error occurred at or near line 19
>
> ncl 20> print(files)
> Variable: files
> Type: string
> Total Size: 776 bytes
> 97 values
> Number of Dimensions: 1
> Dimensions and sizes: [97]
> Coordinates:
> (0) wrfout_d01_2006-09-02_00:00:00_wind_diagnostics.nc
>
> <snip>
>
> (80) wrfout_d01_2006-09-12_00:00:00_wind_diagnostics.nc
> (81) wrfout_d01_2006-09-12_03:00:00_wind_diagnostics.nc
> (82) wrfout_d01_2006-09-12_06:00:00_wind_diagnostics.nc
> (83) wrfout_d01_2006-09-12_09:00:00_wind_diagnostics.nc
> (84) wrfout_d01_2006-09-12_12:00:00_wind_diagnostics.nc
> (85) wrfout_d01_2006-09-12_15:00:00_wind_diagnostics.nc
> (86) wrfout_d01_2006-09-12_18:00:00_wind_diagnostics.nc
> (87) wrfout_d01_2006-09-12_21:00:00_wind_diagnostics.nc
> (88) wrfout_d01_2006-09-13_00:00:00_wind_diagnostics.nc
> (89) wrfout_d01_2006-09-13_03:00:00_wind_diagnostics.nc
> (90) wrfout_d01_2006-09-13_06:00:00_wind_diagnostics.nc
> (91) wrfout_d01_2006-09-13_09:00:00_wind_diagnostics.nc
> (92) wrfout_d01_2006-09-13_12:00:00_wind_diagnostics.nc
> (93) wrfout_d01_2006-09-13_15:00:00_wind_diagnostics.nc
> (94) wrfout_d01_2006-09-13_18:00:00_wind_diagnostics.nc
> (95) wrfout_d01_2006-09-13_21:00:00_wind_diagnostics.nc
> (96) wrfout_d01_2006-09-14_00:00:00_wind_diagnostics.nc
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Jan 26 18:04:48 2011

This archive was generated by hypermail 2.1.8 : Mon Jan 31 2011 - 10:38:24 MST