problem with XDF file in 1.9b4

Jennifer Adams jma at COLA.IGES.ORG
Sun Nov 27 13:10:38 EST 2005


Dan,
You need to use a 'dtype netcdf' descriptor with a PDEF statement in
order to display this data properly. Take a look at http://
grads.iges.org/grads/gadoc/SDFdescriptorfile.html . All the
parameters you need to build your PDEF entry appear to be included in
the attribute metadata.
Jennifer

On Nov 26, 2005, at 11:29 AM, Dan Leins wrote:

> List,
>
> I recently upgraded to 1.9b4 because I was having problems opening
> xdf files in 1.8sl11.  Every time I opened an XDF file that pointed
> to a netcdf file - I could display a variable only once, then it
> would core dump and die.  1.9b4 solved this problem, however a new
> problem exists.  I am attempting to plot wind speed/direction and
> wave heights over Lake Erie.  I'm successful in plotting wave
> height, however neither wind speed nor direction seem to want to
> plot.  The wind speed is simply the magnitude of the wind, the
> direction is obviously the direction - it's not broken down into u
> or v components - not a concern at this point.  It seems as if
> GrADS is having a hard time finding these variables in the netcdf
> file in the 1st place...this is the error I get...
>
> Couldn't find variable Wind_Mag_SFC (aliased to speed) in SDF file.
> Data Request Error:  Error for variable 'speed'
>   Error ocurred at column 1
> DISPLAY error:  Invalid expression
>   Expression = speed
>
> I've included my xdf file and the headers of my netcdf file
> below...unless I missed something - Wind_Mag_SFC is clearly defined
> in the netcdf file. I get the same error for direction - that it's
> not able to find Wind_Dir_SFC.
>
> The strange thing is that if I open this xdf file in 1.8sl11 - it
> works fine - except for the nasty core dump problem.  The file
> opens, I can plot 'speed' or 'direction' just fine.  Is there
> something that needs to be added to my xdf file now that I'm using
> 1.9b4?
>
>
> Any help would be appreciated!
>
>
> Thanks!
>
> Dan Leins
>
> ncdump -h
>
> netcdf marine_cle {
> dimensions:
>  DIM_48 = 48 ;
>  DIM_41 = 41 ;
>  DIM_76 = 76 ;
>  DIM_138 = 138 ;
>  DIM_104 = 104 ;
> variables:
>  float Wind_Mag_SFC(DIM_48, DIM_41, DIM_76) ;
>   Wind_Mag_SFC:validTimes = 1133006400, 1133010000, 1133010000,
> 1133013600, 1133013600, 1133017200, 1133017200, 1133020800,
> 1133020800, 1133024400, 1133024400, 1133028000, 1133028000,
> 1133031600, 1133031600, 1133035200, 1133035200, 1133038800,
> 1133038800, 1133042400, 1133042400, 1133046000, 1133046000,
> 1133049600, 1133049600, 1133053200, 1133053200, 1133056800,
> 1133056800, 1133060400, 1133060400, 1133064000, 1133064000,
> 1133067600, 1133067600, 1133071200, 1133071200, 1133074800,
> 1133074800, 1133078400, 1133078400, 1133082000, 1133082000,
> 1133085600, 1133085600, 1133089200, 1133089200, 1133092800,
> 1133092800, 1133096400, 1133096400, 1133100000, 1133100000,
> 1133103600, 1133103600, 1133107200, 1133107200, 1133110800,
> 1133110800, 1133114400, 1133114400, 1133118000, 1133118000,
> 1133121600, 1133121600, 1133125200, 1133125200, 1133128800,
> 1133128800, 1133132400, 1133132400, 1133136000, 1133136000,
> 1133139600, 1133139600, 1133143200, 1133143200, 1133146800,
> 1133146800, 1133150400, 1133150400, 1133154000, 1133154000,
> 1133157600, 1133157600, 1133161200, 1133161200, 1133164800,
> 1133164800, 1133168400, 1133168400, 1133172000, 1133172000,
> 1133175600, 1133175600, 1133179200 ;
>   Wind_Mag_SFC:descriptiveName = "Surface Wind Magnitude" ;
>   Wind_Mag_SFC:gridSize = 76, 41 ;
>   Wind_Mag_SFC:domainOrigin = 65.3125, 34.625 ;
>   Wind_Mag_SFC:domainExtent = 4.6875, 2.5 ;
>   Wind_Mag_SFC:minMaxAllowedValues = 0., 125. ;
>   Wind_Mag_SFC:gridType = "VECTOR" ;
>   Wind_Mag_SFC:databaseID = "CLE_GRID__Official_00000000_0000" ;
>   Wind_Mag_SFC:siteID = "CLE" ;
>   Wind_Mag_SFC:units = "kts" ;
>   Wind_Mag_SFC:level = "SFC" ;
>   Wind_Mag_SFC:timeConstraints = 0, 3600, 3600 ;
>   Wind_Mag_SFC:precision = 0 ;
>   Wind_Mag_SFC:rateDependent = 0 ;
>   Wind_Mag_SFC:latLonLL = -133.458999633789, 12.1899995803833 ;
>   Wind_Mag_SFC:latLonUR = -49.3849983215332, 57.2900009155273 ;
>   Wind_Mag_SFC:gridPointLL = 1, 1 ;
>   Wind_Mag_SFC:gridPointUR = 93, 65 ;
>   Wind_Mag_SFC:projectionType = "LAMBERT_CONFORMAL" ;
>   Wind_Mag_SFC:latLonOrigin = -95., 25. ;
>   Wind_Mag_SFC:stdParallelOne = 25. ;
>   Wind_Mag_SFC:stdParallelTwo = 25. ;
>   Wind_Mag_SFC:fillValue = -30000. ;
>  float Wind_Dir_SFC(DIM_48, DIM_41, DIM_76) ;
>   Wind_Dir_SFC:validTimes = 1133006400, 1133010000, 1133010000,
> 1133013600, 1133013600, 1133017200, 1133017200, 1133020800,
> 1133020800, 1133024400, 1133024400, 1133028000, 1133028000,
> 1133031600, 1133031600, 1133035200, 1133035200, 1133038800,
> 1133038800, 1133042400, 1133042400, 1133046000, 1133046000,
> 1133049600, 1133049600, 1133053200, 1133053200, 1133056800,
> 1133056800, 1133060400, 1133060400, 1133064000, 1133064000,
> 1133067600, 1133067600, 1133071200, 1133071200, 1133074800,
> 1133074800, 1133078400, 1133078400, 1133082000, 1133082000,
> 1133085600, 1133085600, 1133089200, 1133089200, 1133092800,
> 1133092800, 1133096400, 1133096400, 1133100000, 1133100000,
> 1133103600, 1133103600, 1133107200, 1133107200, 1133110800,
> 1133110800, 1133114400, 1133114400, 1133118000, 1133118000,
> 1133121600, 1133121600, 1133125200, 1133125200, 1133128800,
> 1133128800, 1133132400, 1133132400, 1133136000, 1133136000,
> 1133139600, 1133139600, 1133143200, 1133143200, 1133146800,
> 1133146800, 1133150400, 1133150400, 1133154000, 1133154000,
> 1133157600, 1133157600, 1133161200, 1133161200, 1133164800,
> 1133164800, 1133168400, 1133168400, 1133172000, 1133172000,
> 1133175600, 1133175600, 1133179200 ;
>   Wind_Dir_SFC:descriptiveName = "Surface Wind Direction" ;
>   Wind_Dir_SFC:gridSize = 76, 41 ;
>   Wind_Dir_SFC:domainOrigin = 65.3125, 34.625 ;
>   Wind_Dir_SFC:domainExtent = 4.6875, 2.5 ;
>   Wind_Dir_SFC:minMaxAllowedValues = 0., 360. ;
>   Wind_Dir_SFC:gridType = "VECTOR" ;
>   Wind_Dir_SFC:databaseID = "CLE_GRID__Official_00000000_0000" ;
>   Wind_Dir_SFC:siteID = "CLE" ;
>   Wind_Dir_SFC:units = "degrees" ;
>   Wind_Dir_SFC:level = "SFC" ;
>   Wind_Dir_SFC:timeConstraints = 0, 3600, 3600 ;
>   Wind_Dir_SFC:precision = 0 ;
>   Wind_Dir_SFC:rateDependent = 0 ;
>   Wind_Dir_SFC:latLonLL = -133.458999633789, 12.1899995803833 ;
>   Wind_Dir_SFC:latLonUR = -49.3849983215332, 57.2900009155273 ;
>   Wind_Dir_SFC:gridPointLL = 1, 1 ;
>   Wind_Dir_SFC:gridPointUR = 93, 65 ;
>   Wind_Dir_SFC:projectionType = "LAMBERT_CONFORMAL" ;
>   Wind_Dir_SFC:latLonOrigin = -95., 25. ;
>   Wind_Dir_SFC:stdParallelOne = 25. ;
>   Wind_Dir_SFC:stdParallelTwo = 25. ;
>   Wind_Dir_SFC:fillValue = -30000. ;
>  char Wind_SFC_GridHistory(DIM_48, DIM_138) ;
>  float WaveHeight_SFC(DIM_48, DIM_41, DIM_76) ;
>   WaveHeight_SFC:validTimes = 1133006400, 1133010000, 1133010000,
> 1133013600, 1133013600, 1133017200, 1133017200, 1133020800,
> 1133020800, 1133024400, 1133024400, 1133028000, 1133028000,
> 1133031600, 1133031600, 1133035200, 1133035200, 1133038800,
> 1133038800, 1133042400, 1133042400, 1133046000, 1133046000,
> 1133049600, 1133049600, 1133053200, 1133053200, 1133056800,
> 1133056800, 1133060400, 1133060400, 1133064000, 1133064000,
> 1133067600, 1133067600, 1133071200, 1133071200, 1133074800,
> 1133074800, 1133078400, 1133078400, 1133082000, 1133082000,
> 1133085600, 1133085600, 1133089200, 1133089200, 1133092800,
> 1133092800, 1133096400, 1133096400, 1133100000, 1133100000,
> 1133103600, 1133103600, 1133107200, 1133107200, 1133110800,
> 1133110800, 1133114400, 1133114400, 1133118000, 1133118000,
> 1133121600, 1133121600, 1133125200, 1133125200, 1133128800,
> 1133128800, 1133132400, 1133132400, 1133136000, 1133136000,
> 1133139600, 1133139600, 1133143200, 1133143200, 1133146800,
> 1133146800, 1133150400, 1133150400, 1133154000, 1133154000,
> 1133157600, 1133157600, 1133161200, 1133161200, 1133164800,
> 1133164800, 1133168400, 1133168400, 1133172000, 1133172000,
> 1133175600, 1133175600, 1133179200 ;
>   WaveHeight_SFC:descriptiveName = "Wave Height" ;
>   WaveHeight_SFC:gridSize = 76, 41 ;
>   WaveHeight_SFC:domainOrigin = 65.3125, 34.625 ;
>   WaveHeight_SFC:domainExtent = 4.6875, 2.5 ;
>   WaveHeight_SFC:minMaxAllowedValues = 0., 40. ;
>   WaveHeight_SFC:gridType = "SCALAR" ;
>   WaveHeight_SFC:databaseID = "CLE_GRID__Official_00000000_0000" ;
>   WaveHeight_SFC:siteID = "CLE" ;
>   WaveHeight_SFC:units = "ft" ;
>   WaveHeight_SFC:level = "SFC" ;
>   WaveHeight_SFC:timeConstraints = 0, 3600, 3600 ;
>   WaveHeight_SFC:precision = 1 ;
>   WaveHeight_SFC:rateDependent = 0 ;
>   WaveHeight_SFC:latLonLL = -133.458999633789 , 12.1899995803833 ;
>   WaveHeight_SFC:latLonUR = -49.3849983215332, 57.2900009155273 ;
>   WaveHeight_SFC:gridPointLL = 1, 1 ;
>   WaveHeight_SFC:gridPointUR = 93, 65 ;
>   WaveHeight_SFC:projectionType = "LAMBERT_CONFORMAL" ;
>   WaveHeight_SFC:latLonOrigin = -95., 25. ;
>   WaveHeight_SFC:stdParallelOne = 25. ;
>   WaveHeight_SFC:stdParallelTwo = 25. ;
>   WaveHeight_SFC:fillValue = -30000. ;
>  char WaveHeight_SFC_GridHistory(DIM_48, DIM_104) ;
>  short Topo(DIM_41, DIM_76) ;
>   Topo:descriptiveName = "Topography" ;
>   Topo:gridSize = 76, 41 ;
>   Topo:domainOrigin = 65.3125, 34.625 ;
>   Topo:domainExtent = 4.6875, 2.5 ;
>   Topo:units = "ft" ;
>   Topo:latLonLL = -133.458999633789, 12.1899995803833 ;
>   Topo:latLonUR = -49.3849983215332, 57.2900009155273 ;
>   Topo:gridPointLL = 1, 1 ;
>   Topo:gridPointUR = 93, 65 ;
>   Topo:projectionType = "LAMBERT_CONFORMAL" ;
>   Topo:latLonOrigin = -95., 25. ;
>   Topo:stdParallelOne = 25. ;
>   Topo:stdParallelTwo = 25. ;
>  float latitude(DIM_41, DIM_76) ;
>   latitude:descriptiveName = "latitude" ;
>   latitude:gridSize = 76, 41 ;
>   latitude:domainOrigin = 65.3125, 34.625 ;
>   latitude:domainExtent = 4.6875, 2.5 ;
>   latitude:units = "degrees" ;
>   latitude:latLonLL = -133.458999633789, 12.1899995803833 ;
>   latitude:latLonUR = - 49.3849983215332, 57.2900009155273 ;
>   latitude:gridPointLL = 1, 1 ;
>   latitude:gridPointUR = 93, 65 ;
>   latitude:projectionType = "LAMBERT_CONFORMAL" ;
>   latitude:latLonOrigin = -95., 25. ;
>   latitude:stdParallelOne = 25. ;
>   latitude:stdParallelTwo = 25. ;
>  float longitude(DIM_41, DIM_76) ;
>   longitude:descriptiveName = "longitude" ;
>   longitude:gridSize = 76, 41 ;
>   longitude:domainOrigin = 65.3125, 34.625 ;
>   longitude:domainExtent = 4.6875, 2.5 ;
>   longitude:units = "degrees" ;
>   longitude:latLonLL = -133.458999633789, 12.1899995803833 ;
>   longitude:latLonUR = -49.3849983215332, 57.2900009155273 ;
>   longitude:gridPointLL = 1, 1 ;
>   longitude:gridPointUR = 93, 65 ;
>   longitude:projectionType = "LAMBERT_CONFORMAL" ;
>   longitude:latLonOrigin = -95., 25. ;
>   longitude:stdParallelOne = 25. ;
>   longitude:stdParallelTwo = 25. ;
>
> // global attributes:
>   :creationTime = 1133019093 ;
>   :creationTimeString = "Sat Nov 26 15:31:33 2005" ;
>   :fileFormatVersion = "20010816" ;
>   :startProcTime = "20051126_1200" ;
>   :endProcTime = "20051128_1200" ;
> }
>
>
> This is my xdf file....
>
> DSET ^marine_cle.cdf
> TITLE Sample dataset
> UNDEF -30000.0
> XDEF DIM_76 76 LINEAR -83.76 0.06
> YDEF DIM_41 41 LINEAR 41.40  0.035
> TDEF DIM_48 48 LINEAR 12z26NOV2005 1hr
> VARS 3
> WaveHeight_SFC=>height 1 99 height
> Wind_Mag_SFC=>speed 1 99 speed
> Wind_Dir_SFC=>direction 1 99 direction
> ENDVARS
>
>



More information about the gradsusr mailing list