-
Notifications
You must be signed in to change notification settings - Fork 303
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Read wavelength ranges from netcdf #1544
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1544 +/- ##
=======================================
Coverage 92.08% 92.09%
=======================================
Files 251 251
Lines 36674 36711 +37
=======================================
+ Hits 33771 33808 +37
Misses 2903 2903
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Thanks @mraspaud The first commit with json seemed to work both writing and reading back over opendap from thredds. The second one fails when reading back from thredds via opendap (https://thredds.met.no/thredds/dodsC/metusers/trygveas/platform_name-sensor-20200309121303-20200309122402.nc) But the wavelength seems ok.
Running in my debugger I see that |
Yes, the error comes from trollsift, a new release is needed. |
OK, I saw you talked with David about trollsift. |
DeepCode failed to analyze this pull requestSomething went wrong despite trying multiple times, sorry about that. |
So what is the end result ( |
Avhrr channel 1 for example:
|
Why is |
yes, all the strings are passed as is to xarray, so it's happening there. See this example: In [7]: ds = xr.Dataset(
...: {"foo": (("x", "y"), np.random.rand(4, 5))},
...: coords={
...: "x": [10, 20, 30, 40],
...: "y": pd.date_range("2000-01-01", periods=5),
...: "z": ("x", list("abcd")),
...: },
...: )
...:
...: ds['foo'].attrs['noutf'] = 'hej'
...: ds['foo'].attrs['utf'] = 'hej på dig'
...:
...: ds.to_netcdf("saved_on_disk.nc")
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks better than a block of JSON so there's that. 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGMT
I get a unit test failure running latest satpy master on my system:
According to git bisect, this PR is to blame:
Why do I see this locally when tests pass in Github CI? I've updated to latest pyresample and pyspectral. |
Updating trollsift resolved the failing test. |
This PR should fix the reading of wavelengths from satpy-created netcdf files.