NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.
To learn about what's going on, see About the Archive Site.
Robert B. Schmunk wrote:
John, I was just rebuilding a netCDF app of mine to use the new netCDF 2.1 jar which apparently was posted to the Unidata website in the last few weeks. I ran into one problem which I wanted to ask about. I figured out a workaround in about 5 minutes, but as I don't see the information listed anywhere on the Unidata website, I just wanted to confirm with you that what I encountered reflects some sort of intentional change. (And make sure I'm not losing my marbles by not being able to find the info anymore. ;-) Previously I was using sliceMA to extract a lat-lon 2D array from a VariableStandardized which might have 2+ dimensions. Now I can't seem to find any reference to sliceMA in VariableStandardized or in any of the classes which it either extends or implements. It was easy enough to modify my code to instead use VariableStandardized.read, but I did find it confusing that sliceMA basically seems to have disappeared without any apparent trace. BTW: I also noted with interest the apparently new ucar.nc2.dataset.conv package. I don't know if this would be any use at the present time, but I thought I might mention that during January I wrote a couple of classes which parse relative-time and absolute-time units and generate readable date strings. The relative-time parser also understands climate model calendars such as noleap and all_leap but requires a new subclass of Calendar which I also had to write. Thanks, rbs -- Robert B. Schmunk, rschmunk@xxxxxxxxxxxxxNASA Goddard Institute for Space Studies, 2880 Broadway, New York, NY 10025
Hi Robert:Congatulations, you are the first (besides me) to use version 2.1! I just put it out on Friday, and I am still getting all of the pieces out and the documentation finished. Notice its an "alpha" release, so beware of bugs.
I have decided to use a different route for the sliceMA() functionality. The new way is to use specialized adapter classes in ucar.ma2:
public MultiArraySlice(MultiArray ma, int dim, int value);Create a new MultiArray as a "slice" of this MultiArray, which reduces the rank by one by fixing the value of one of the dimensions at the given value.
Besides slice, there is also a "section" adapter, and I will add others as needed. I think this will be a cleaner way to add new "views" of a Variable, better then adding new methods in the interface. Let me know what you think of that approach.
I should have deprecated sliceMA() instead of removing it. I just got into one of those "get rid of the junk" mentalities. I will at least document that more clearly.
I would be very interested in including your time parsing routines. The Convention parsing stuff in ucar.nc2.dataset.conv is pretty incomplete, and I am still adding new functionality; i hope it will stabilize in the next few weeks. I am interested in any feedback you have, also any netCDF files that you use a lot, to add to my test suite.
thanks!
netcdf-java
archives: