RE: [ncl-talk] error in reading a variable from netcdf file

From: Harun Rashid <H.Rashid_at_nyahnyahspammersnyahnyah>
Date: Fri, 9 Jun 2006 10:37:23 +1000

 Hi Si-Wan,

Yes, the dot is likely to be the problem. Enclose the variable in $""$,
i.e., try:

pm2 = a->$"PM2.5"$

It should work.

Cheers,
Harun

===================================================================
Dr. M. Harun Ar Rashid
Bureau of Meteorology Research Centre Email: h.rashid_at_bom.gov.au

PO Box 1289K Tel : +61 3
9669 4550
Melbourne, Victoria 3001 Fax : +61 3 9669
4660
Australia
http://www.bom.gov.au/bmrc
===================================================================
 

-----Original Message-----
From: ncl-talk-bounces_at_ucar.edu [mailto:ncl-talk-bounces_at_ucar.edu] On
Behalf Of Si-Wan Kim
Sent: Friday, 9 June 2006 06:44
To: ncl-talk_at_ucar.edu
Subject: error in reading a variable from netcdf file

Hello all,

I am trying to read a variable whose name is "PM2.5" from a netcdf file.
I can read any variables like o3, co, and no2 except PM2.5.

If I try to read "PM2.5", it gives me an error message. Syntax error
before or near .5.
Below is the part of ncl script.
a=
addfile("/wrk/d1/swkim/wrf2dat/pert/wrfn3d_d01_2004-"+sdate(imon-1)+"-"+
sdate(iday-1)+".nc","r")

pm2 = a->PM2.5

The dot in the variable may be the problem.
Is there anybody who experienced this problem? How can I read this?
I appreciate your help. Thanks.

Si-Wan
CIRES & NOAA/ESRL/CSD
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Jun 08 2006 - 18:37:23 MDT

This archive was generated by hypermail 2.2.0 : Mon Jun 12 2006 - 06:59:42 MDT