-
Notifications
You must be signed in to change notification settings - Fork 1
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
Feature/netcdf #53
base: dev
Are you sure you want to change the base?
Feature/netcdf #53
Conversation
The code for resolve_read and write are in the link functions if you read the R link_read / write functions you can see the code was put into resolve read / write to avoid duplication with the read / write_ functions. |
Pasting these in here in case they're useful:
I guess they specify what |
@RyanJField @bobturneruk at the moment (after refactorin the code to expose resolve_read and resolve_write as in R) |
as far as this stands I am getting an error when executing as I ssaid I just exposed (i.e. refactored) two functions I would like a new set of eyes to have a look into this error as it is not related to the cli,
|
You need to use the file_type from the write block: pyDataPipeline/data_pipeline_api/link.py Line 26 in 6da168b
|
with commit 16b7a14 I started to implement writing data to netcdf as the example set out by Derek. |
Looks to be shaping up well. I'll have a go at getting it running on my machine and comment more. |
up to now there are a couple of wrapper functions to write 1d data as f(x) ,2d as f(x,y) and 3d data as f(x,y,z). Also there are wrapper functions to create groups and nested groups. Group creation is idempotent so creating a group that is already populated does not raise errors or deletes data. I still have to write wrappers to read data from netcdf. And then if you agree we can move to write read_array and write_array function as in the R implementation. |
@RyanJField @richardreeve @B0SKAMP @bobturneruk |
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
@B0SKAMP @richardreeve @RyanJField @bobturneruk let me know. |
I'm not sufficiently sure of the current requirements to say if this meeting them. This will need attention from @richardreeve, I think. I can look at the code. |
Great, thanks @bruvio - I'll have some time to look at this tomorrow. |
with last bunch of commits refactored more the code to prepare headers better, now also the |
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
I think we can start reviewing this. this is a copy paste of an email exchange: Currently all data is written in one go. Another interface can be provided to write in slices. What we need to agree on is the internal format of the netcdf file. The naming format is "grp1/grp2/..../grp/varname The root of the netcdf file should have a schema version attribute. I create a netcdf dimension with the "_dim" suffix when creating a dimension. Then a netcdf variable with the dimension name which references the "_dim" suffix. When an array is created I give the dimension names. From these a retrieve the netcdf "_dim" dimensions. A netcdf variable is created refering to the "_dim" dimensions Finally as discussed there is a possibility to pass custom attributes. @RyanJField @richardreeve @B0SKAMP Derek is not able to see this, he might be able to comment as well? |
@bobturneruk @RyanJField
I drafted the PR as you suggested.
I wonder if you can suggest how to move with this?
at the moment I am reading the R implementation and, for now, translate read_array/write_array to python.
I would like to hear your view on this as I do not want to reinvent the wheel. For example, as I am not familiar with R, is there already a Python implementation for the R functions resolve_read/resolve_write?