Donald Denbo wrote:
OK. So how would I write a HDF file from nj22? Or netcdf-4? Is that
no, cant write yet. netcdf-4 format is not finalized (Mar?), but even then it
will be a while before we have that functionality (harder to write than read).
Not really interested in rewriting our logging to use log4j, especially
if it is more difficult than Logger.
jdk14 logging seems adequate for client apps.
Thanks for your help,
On Jan 30, 2007, at 3:49 PM, John Caron wrote:
Donald Denbo wrote:
I have an application for which Groups seem a natural solution.
I have created a small test program to create a file with two
groups then look at the contents as Groups. While the file
construction seems to go fine, reading back using groups doesn't
appear to work. All the attributes, dimensions, and variables
appear only in the root group. Attached is my test program and
output. What am I doing wrong?
You cant write netcdf files with Groups, that needs the netcdf-4 file
format, which is not ready. Is that what you're doing?
1) where did Variable.isCoordinateVariable() go? Could I
convince you to retain this method?
that got removed a while ago. equivilent is
Variable.getCoordinateDimension() != null
2) When creating a Variable I have to give it the NetCDF file
and Group, yet without explicitly adding the
variable to the group, it doesn't appear to exist in the nc
file. Looking at the code, it looks like the original declaration
is always overridden when adding to a group (which apparently you
The problem is that NetcdfFileWriteable doesnt handle groups, since
you cant actuallly write them. But the constructor is there because
we do create them from non-netcdf files, like HDF5.
3) When writing out the data for a group variable I have to use
the NetcdfWriteable.write() method, which doesn't accept any group
designation. To get this to work, I had to write to "groupName/
shortName". Shouldn't Group have a write method? Or better yet,
shouldn't Variable have the write method?
4) I didn't see any example of setting up log4j. I have been
using jdk 1.5 built-in logging.
yes, i need to add a bit on work with that, but log4j is complicated
and i probably will assume people are already using it. do you want
to switch to it?
Thanks for you time,
java -classpath "/Users/dwd/ResultService/NJTest/classes:/usr/ local/
log4j:WARN No appenders could be found for logger
log4j:WARN Please initialize the log4j system properly.
MaxWaveHeight/type = "first estimate maximum wave height"
TravelTime/type = "first estimate travel time"
Latitude = 10; // (has coord.var)
Longitude = 10; // (has coord.var)
float MaxWaveHeight/maxWH(Latitude=10, Longitude=10);
:units = "m";
float TravelTime/tt(Latitude=10, Longitude=10);
:units = "hours";