[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Problem with GRIB files
- Subject: Problem with GRIB files
- Date: Fri, 6 May 2005 19:12:16 +0100
Hello,
I have a few questions concerning reading GRIB files using the netcdf2.2
library:
1. are there any problems when using the grib.jar library with jakarta tomcat
server ? Netcdf files can be correctly read and data extracted. Grib files can
be opened only but it is failing each time i wish to extract data (all data as
well as section of it).
2. Are there any easier ways to reading data for a particular variable using its
internal name instead of the variable name. Currently, I have to get list of
all variables and then for each variable get its attributes and thereafter
check the attribute name for GRIB_param_number.
e.g:
for (int i=0; i<myVarList.size(); i++)
{
Variable myVar = (Variable) myVarList.get(i);
List attList = myVar.getAttributes();
for (int j=0; j<attList.size(); j++)
{
Attribute att = (Attribute) attList.get(j);
if (att.getName().equals("GRIB_param_number"))
{
//get the correct variable
if (att.getNumericValue().intValue() == var)
{
.......
}
}
}
}
Thanks in advance,
Adit.