Skip to content
This repository has been archived by the owner on Sep 1, 2022. It is now read-only.

Opening datasets with insufficiently defined projected grids #907

Open
rschmunk opened this issue Aug 25, 2017 · 0 comments
Open

Opening datasets with insufficiently defined projected grids #907

rschmunk opened this issue Aug 25, 2017 · 0 comments

Comments

@rschmunk
Copy link
Contributor

rschmunk commented Aug 25, 2017

Twice within a week, I have heard from users of my Panoply application about netCDF datasets that cannot be opened. In a nutshell, the problem is that in both cases Panoply tries to acquire the dataset in enhanced mode, and that the datasets use projected lon-lat grids which are apparently considered insufficiently defined. In other words, the grid_mapping variable does not include one or more attributes that the netCDF-Java library requires be there, and so an exception is thrown when NJ tries to construct the coordinate system and the dataset is not acquired/opened.

In one case, the exception is "IllegalArgumentException: Mercator projection must have attribute standard_parallel or scale_factor_at_projection_origin", thrown at ucar.nc2.dataset.transform.Mercator, line 46.

In the second case, the exception is "IllegalArgumentException: Must specify semi_minor_axis", thrown at ucar.nc2.dataset.transform.Geostationary, line 111. (In this case, the dataset had an attribute named semi_minor, rather than semi_minor_axis.)

Since the exceptions block the datasets from even being opened, there is nothing I can do in my own code to trap for them. The question then is, is there a reasonable way to modify the NJ library code to allow the datasets to be opened? For example, rather than throw an exception, could NJ instead apply default values for missing projection attributes, possibly logging a warning that the gridding results might not be what the user expects?

Note that issue #611 somewhat addressed this problem but only for the case of the LambertCylindricalEqualArea projected grid.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant