Unidata / netcdf-java

The Unidata netcdf-java library
https://docs.unidata.ucar.edu/netcdf-java/current/userguide/index.html
BSD 3-Clause "New" or "Revised" License
142 stars 69 forks source link

Fix unit conversion for projection #1279

Closed luca009 closed 8 months ago

luca009 commented 8 months ago

Description of Changes

Due to an issue with the codebase, the units of the x and y axes cannot be checked until the classes handling projection are already initialized. This results in the issue that the projection conversion always assumes that units are in km, when they might not be (see #1278). This PR is a fix for this issue, but it definitely needs to be replaced with a better approach some time later. As mentioned, this seems to be a rather deeply rooted issue with the way a NetcdfDataset gets initialized. Judging by some comments, this also isn't a new problem.

PR Checklist

CLAassistant commented 8 months ago

CLA assistant check
All committers have signed the CLA.

haileyajohnson commented 8 months ago

Hi @luca009 , thank you so much for your contribution! There are two things this pull request needs to be merged:

  1. You've changed the method signature of several public methods/constructors - we can't do that without changing the major version, but we can merge added overload methods
  2. To pass the code style check, run the gradle task spotlessApply
luca009 commented 8 months ago

Hi @luca009 , thank you so much for your contribution! There are two things this pull request needs to be merged:

1. You've changed the method signature of several public methods/constructors - we can't do that without changing the major version, but we can merge added overload methods

2. To pass the code style check, run the gradle task `spotlessApply`

Should all be fixed up now, thank you for the kind reminders. This is my first time contributing to another project :)