Kolrsong
Am I to understand from your post that the variable name is ' Width\(Horizontal\) '? If so it might that NCL is trying to interpret the back slashes and parentheses as an array definition (it's a pretty awkward variable name).
If so, maybe try using a string reference to get the variable:
> vnam = "Width\(Horizontal\) " ;store variable name as a string
> width = f->$vnam$ ;use string to reference the variable.
Will
From: kolrsong <kolrsong@gmail.com<mailto:kolrsong@gmail.com>>
Reply-To: kolrsong <kolrsong@gmail.com<mailto:kolrsong@gmail.com>>
Date: Thursday, 22 August 2013 12:10 PM
To: ncl-talk <ncl-talk@ucar.edu<mailto:ncl-talk@ucar.edu>>
Subject: read .nc file
hello,
for a .nc file, with ncdump to look into it, i got:
netcdf \9477CHE--01-WH {
dimensions:
Azimuth = 872 ;
Gate = 480 ;
variables:
float Azimuth(Azimuth) ;
Azimuth:Units = "Degrees" ;
float Beamwidth(Azimuth) ;
Beamwidth:Units = "Degrees" ;
float GateWidth(Azimuth) ;
GateWidth:Units = "Meters" ;
float Width\(Horizontal\)(Azimuth, Gate) ;
Width\(Horizontal\):Units = "m/s" ;
// global attributes:
:TypeName = "Width(Horizontal)" ;
:DataType = "RadialSet" ;
...
:Height = 120 ;
:Time = -1 ;
:FractionalTime = 0. ;
:attributes = "NyquistVelocity vcp radarName ColorMap" ;
:NyquistVelocity-unit = "MetersPerSecond" ;
:NyquistVelocity-value = "31.62" ;
:vcp-unit = "dimensionless" ;
:vcp-value = "xxxx" ;
:radarName-unit = "dimensionless" ;
:radarName-value = "9477CHE" ;
:ColorMap-unit = "dimensionless" ;
:ColorMap-value = "SpectrumWidth" ;
:Elevation = 1.5 ;
:ElevationUnits = "Degrees" ;
:MissingData = -99900. ;
:RangeFolded = -99901. ;
:RadarParameters = "PRF PulseWidth MaximumRange" ;
:PRF-unit = "Hertz" ;
:PRF-value = 1180 ;
:PulseWidth-unit = "MicroSeconds" ;
:PulseWidth-value = 0.4 ;
:MaximumRange-unit = "KiloMeters" ;
:MaximumRange-value = 120. ;
:ConversionPlugin = "Vol2NetCDF Conversion for EDGE 5.0" ;
data:
Width\(Horizontal\) =
-99900, -99900, -99900, -99900, -99900, -99900, -99900, -99900, -99900,
-99900, -99900, -99900, -99900, -99900, -99900, -99900, -99900, 6.572832,
6.3248, -99900, 5.952753, 4.340549, 7.688972, -99900, 6.820863, 6.820863,
...
how can i read for the varivable:
float Width\(Horizontal\)(Azimuth, Gate) ;
Width\(Horizontal\):Units = "m/s" ;
if it is
f->Width\(Horizontal\),
then the error is:
fatal:syntax error: line 47 in file radar_1.ncl before or near dsizes
dsizes
-------^
plz show me how to do, many thanks.
________________________________
kolrsong
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Aug 21 20:20:22 2013
This archive was generated by hypermail 2.1.8 : Fri Aug 30 2013 - 14:04:57 MDT