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

added yaml2netcdf.py #11

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

added yaml2netcdf.py #11

wants to merge 1 commit into from

Conversation

d70-t
Copy link
Collaborator

@d70-t d70-t commented Aug 12, 2020

This should solve #5.

@d70-t d70-t requested review from RobertPincus and gdeboer2 August 12, 2020 12:11
@gdeboer2
Copy link
Collaborator

Saw the review request, but I'm not quite sure what to offer here, since I don't use YAML files or Python. I'd say that if the translation that this provides works for you it is probably ok and I'll look for the segment information in the NetCDF files.

@d70-t
Copy link
Collaborator Author

d70-t commented Aug 12, 2020

@gdeboer2 I don't plan to use the netCDF-files, but my Impression has been that you are interested in using these and I might be the one who should write the translation script. The question would be if the resulting files provide the information you need and are formatted in a sensible way.

@gdeboer2
Copy link
Collaborator

gdeboer2 commented Aug 12, 2020 via email

@d70-t
Copy link
Collaborator Author

d70-t commented Aug 12, 2020

Hmm, I could create one as an example, but the script needs to get a timeline from somewhere. In the current implementation, that works by passing another netCDF-file to the script such that the output data is created for exactly the required time steps. As the timeline depends on how each user wants to analyse the data, I'd argue that running the script is part of the deal and if that doesn't work, the tools is not very useful. My assumption has been that while many people will not program in python, it should at least be possible for everyone to run scripts.

For reference, this is the ncdump output for my test:

$ ncdump -h test.nc 
netcdf test {
dimensions:
	time = 33219 ;
	kind = 5 ;
	segment = 4 ;
variables:
	double time(time) ;
		time:_FillValue = NaN ;
		time:units = "seconds since 2020-01-19 09:34:25.000004352" ;
		time:calendar = "proleptic_gregorian" ;
	string kind(kind) ;
	string segment(segment) ;
	byte part_of_kind(time, kind) ;
		part_of_kind:dtype = "bool" ;
	byte part_of_segment(time, segment) ;
		part_of_segment:dtype = "bool" ;
}

@gdeboer2
Copy link
Collaborator

gdeboer2 commented Aug 12, 2020 via email

@RobertPincus
Copy link
Collaborator

RobertPincus commented Aug 12, 2020

@d70-t Perhaps the netCDF files could be generated using the script as part of each release? This would lower the barrier to people like @gdeboer2 who don't want to set up a Python environment.

@d70-t
Copy link
Collaborator Author

d70-t commented Aug 12, 2020

I can only speak for HALO, but there are at least 3 or 4 different files for navigation data with different resolutions. Then there are instrument specific timelines which are sometimes different as well and then there might be some coarsened / regridded timestepping as currently discussed in the Workshop. So yes, we could generate these netCDF files automatically as part of a release or by other means, but before that, we'll have to come up with a sensible way of defining a common timeline.

@gdeboer2
Copy link
Collaborator

gdeboer2 commented Aug 12, 2020 via email

@d70-t
Copy link
Collaborator Author

d70-t commented Aug 17, 2020

Maybe we could use the timeline data which is provided by get_navdata as a default. The resulting netcdf files could be zipped and attached to a release like with #9 or alternatively uploaded to Aeris automatically on release. Would that work for you?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants