-
Notifications
You must be signed in to change notification settings - Fork 179
NJ 5 fails to find coord system where NJ 4.6 does #1108
Comments
Hi @msdsoftware - it's hard to tell exactly what could be going on here. What class are you using to open the file? |
|
I wonder if this is creating a Any chance I could get a sample dataset? |
Thanks! I'll take a look and see what I can find out. |
@lesserwhirls, Did you have any luck with this? I just had another user report trouble with a coordinate system not being found, but the new case is a WRF dataset using conformal conic gridding. The only difference btw his "bad" file and a very similar "good" file is that the bad also includes a time dimension, albeit a dimension of length 1. |
Ping! @lesserwhirls, I'm debating whether to revert my code to use 4.6.12-snapshot, and would appreciate any update you might have on whether fixing this issue is in the works, and if so when it might reasonably happen. Thx. |
@msdsoftware - many apologies for the silence. I was out all last week and am still playing catch-up. Last I looked, I though I had a good idea of where things were going wrong, so my hope is that a fix could happen quickly. However, the WRF file issue seems to be different. Would it be possible to get a copy of that file, too? It will be quite difficult for me to get to it this week, but I could dedicate Saturday to it. If I was to give you a status update Saturday evening, would that be soon enough for for you to make the call in releasing using 4.6/5.0? |
@lesserwhirls, See These two WRF files are almost identical except that in gfdl_T2_1970-1999_07_avg.nc the quantity has the extra time dimension of length 1. |
@lesserwhirls, I figured you were on vacation given the lack of activity around the repo. I am about to go on leave myself, so I will be making a decision later today whether to continue with NJ 5 or go back to 4.6 when I post a Panoply bugfix release tomorrow. Other cases people have reported with coordinate systems not being recognized I have been able to code around, but this WRF case is the one I've been unable to do anything with. — EtA: I opted to stick 5.0 for this release. Hopefully, I won't receive (many) more reports of unrecognized/unreported coordinate systems. |
Ok, I think I understand what is happening here. It's not a case of ordering, but rather completeness. In 5.0, the
Both the check to The first case ( Thinking out loud here... Perhaps the idea was to allow the code implementing individual conventions to accept incomplete coordinate systems via extensions to the I can see this being a cleaner approach code-wise, while minimizing assumptions for the general case, but certainly does cause some issues (one of which cannot currently be worked around for things that used to work). Another option would be to break up the |
@lesserwhirls, I don't know if you've been waiting for a response from me on this, but I guess after a few weeks I probably ought to say something. Since a fair number of users could be generating their own data files and likely not being strict about following a convention (sometimes I have to tell Panoply users that there are conventions) — or else obtaining and trying to plot from such "carelessly" created datasets — the problem of a coordinate system being "incomplete" is going to be an ongoing problem. The idea of there being a configurable option in the enhancement settings seems more workable. I am currently using |
Just got another query from a user about this, @lesserwhirls, in connection to an HDF-EOS dataset. The variables in question are on an auxiliary loa-lat grid, but have an extra dimension for "channel". The vars are reported as having no coordinate system, apparently because there is no coordinate var for channel. |
Hi @msdsoftware - sorry for the delay. I think I have an enhancement that will allow for the use of incomplete coordinate systems. The code will look something like this: Set<NetcdfDataset.Enhance> defaultEnhanceMode = NetcdfDataset.getDefaultEnhanceMode();
EnumSet<NetcdfDataset.Enhance> enhanceMode = EnumSet.copyOf(defaultEnhanceMode);
enhanceMode.add(NetcdfDataset.Enhance.IncompleteCoordSystems);
DatasetUrl durl = DatasetUrl.findDatasetUrl (urlString);
NetcdfDataset ncd = NetcdfDataset.acquireDataset(durl, enhanceMode, null); After digging into this more, I have a feeling that our I'm currently running our full test suite on my changes, and depending on those results, I should have a fix committed within the next day. |
@lesserwhirls, FWIW, I've added some code to my classes to try a little harder looking for lon and lat coordinate vars in swath data when there is no coordinate system reported. It seems to handle this particular HDF-EOS case pretty well. I just need to do some testing against how other sample HDF-EOS files are handled. |
Just compiled from the latest snapshot. Commit #1154 seems to have solved the problem with the recent HDF-EOS example file. I'll have to dig up some of the prior cases and see how it does there. But if I understand you correctly, @lesserwhirls,, it doesn't work for the GRIB example? |
Good to hear, @msdsoftware! In terms of GRIB, which example? I'm not seeing a GRIB file here on this issue. I'll take a look once I have a file. Thanks for your help on shaking out these issues! |
Ooops, sorry. I meant the WRF file, @lesserwhirls . |
Ah, no worries! The WRF file is what I used to test this with, so that should be good to go. My comment about the WRF file is that our coordinate system builder code that handles WRF files is lacking and should be beefed up independently of the the |
Calling this closed until such time as I receive another bug report about datasets being treated differently by my NJ-using code. |
Re-opened this as I ran into a problem with an old WRF file using the Lambert conformal grid. Failure pattern is not quite the same as before, however, so I'm trying to make sense of what's happening before I add detail to this issue. |
A user just provided me a sample dataset in which the 5D variable of interest has 1D dimensions of lon, lat, time, level and tau. There are matching coordinate variables for lon, lat and time with appropriate units. Thus...
float clisccp(time=8, tau=7, plev7=7, lat=90, lon=144);
Using netCDF-Java 5.0 (beta2) to query VariableDS.getCoordinateSystems() on this variable, the response is a 0-length array.
However, if I use an old copy of my app based on NJ 4.6.12, a usable coordinate system is returned.
We wondered if this was the result of a change 5.0 branch to enforce dimension ordering following convention, but it seems that except for the additional inserted tau dimension, the ordering is fine.
The text was updated successfully, but these errors were encountered: