Skip to content
This repository was archived by the owner on Sep 11, 2023. It is now read-only.

Conversation

@JanEbbing
Copy link
Contributor

Pull Request

Description

Before this, the NetCDF loading code used a small hack (read file as bytes, then pass bytes into xarray.open_dataset, then delete bytes variable) because it was faster. Now the library fixed this and we can use the cleaner code.

Fixes Issue #602 (I hope)

How Has This Been Tested?

  • I tried running the tests with py.test -s, and wanted to compare runtime of py.test -s --use_cloud_data before and after this change (possibly limited to tests that touch this area of the code, e.g. tests/data_sources/test_pv_data_source.py based on method names). Unfortunately I had 11 failed on master, possibly due to me not having set up external accounts (for data sources I presume?) correctly. Would love some feedback here how to proceed.

If your changes affect data processing, have you plotted any changes? i.e. have you done a quick sanity check?

  • [] Not yet - how can I plot the relevant data here?

Checklist:

  • My code follows OCF's coding style guidelines
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation (noop)
  • [-] I have added tests that prove my fix is effective or that my feature works
  • I have checked my code and corrected any misspellings

# Pull Request

## Description

Before this, the NetCDF loading code used a small hack (read file as bytes, then pass bytes into `xarray.open_dataset`, then delete bytes variable) because it was faster. Now the library fixed this and we can use the cleaner code.

Fixes Issue openclimatefix-archives#602  (I hope)

## How Has This Been Tested?

- Currently setting up the env on my machine to test locally.

_If your changes affect data processing, have you plotted any changes? i.e. have you done a quick sanity check?_

- [] Not yet

## Checklist:

- [x] My code follows [OCF's coding style guidelines](https://github.com/openclimatefix/nowcasting/blob/main/coding_style.md)
- [x] I have performed a self-review of my own code
- [x] I have made corresponding changes to the documentation (noop)
- [-] I have added tests that prove my fix is effective or that my feature works
- [x] I have checked my code and corrected any misspellings
@JanEbbing JanEbbing changed the title [WIP] Update NetCDF loading to use the cleaner code Update NetCDF loading to use the cleaner code Mar 24, 2022
@peterdudfield
Copy link
Contributor

Thanks for doing this @JanEbbing . Ill merge this in.

What were the errors you found when running tests from master?

@peterdudfield peterdudfield merged commit 0184ae9 into openclimatefix-archives:main Apr 4, 2022
@peterdudfield
Copy link
Contributor

Ill keep this open

@peterdudfield
Copy link
Contributor

hi @all-contributors, could you please add @JanEbbing for code

@peterdudfield
Copy link
Contributor

@all-contributors please add @JanEbbing for code

@allcontributors
Copy link
Contributor

@peterdudfield

I've put up a pull request to add @JanEbbing! 🎉

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants