Skip to content
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

Fix the cf_writer to accept single-valued time coordinate variable #508

Merged
merged 11 commits into from
Dec 14, 2018

Conversation

mraspaud
Copy link
Member

@mraspaud mraspaud commented Nov 20, 2018

This PR adds flexibility to the cf_writer. It fixes the time coordinate when it's a single value, and adds it as a dimension if possible.

  • Tests added
  • Tests passed
  • Passes git diff origin/master -- "*py" | flake8 --diff

@coveralls
Copy link

coveralls commented Nov 20, 2018

Coverage Status

Coverage increased (+0.5%) to 74.621% when pulling 5f9d083 on mraspaud:fix-cf-writer into 19e3f83 on pytroll:master.

@codecov
Copy link

codecov bot commented Nov 20, 2018

Codecov Report

❗ No coverage uploaded for pull request base (master@12298a9). Click here to learn what that means.
The diff coverage is 96.55%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #508   +/-   ##
=========================================
  Coverage          ?   76.51%           
=========================================
  Files             ?      136           
  Lines             ?    18904           
  Branches          ?        0           
=========================================
  Hits              ?    14464           
  Misses            ?     4440           
  Partials          ?        0
Impacted Files Coverage Δ
satpy/tests/writer_tests/test_cf.py 98.21% <100%> (ø)
satpy/writers/cf_writer.py 68.84% <91.66%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 12298a9...f39f7fe. Read the comment docs.

@mraspaud
Copy link
Member Author

This seems to be an issue in xarray >= 0.10.4 pydata/xarray#2563

@mraspaud mraspaud changed the title [WIP] Fix the cf_writer to accept single-valued time coordinate variable Fix the cf_writer to accept single-valued time coordinate variable Dec 14, 2018
@mraspaud mraspaud merged commit 2473f1b into pytroll:master Dec 14, 2018
@mraspaud mraspaud deleted the fix-cf-writer branch December 14, 2018 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants