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

can the "time" variable(s?) be called something other than "time"? #31

Open
aportagain opened this issue Apr 12, 2023 · 3 comments
Open

Comments

@aportagain
Copy link
Member

We've had some similar discussions in the past, how to identify time variables / dimensions / coordinates, following CF conventions, with or without access to udunits, and so on. Annick recently brought this up again (although more aimed at regrid), related discussion on Slack in #ops-development: https://metocean.slack.com/archives/C014SM7A5AN/p1680230791844669 .

@aportagain
Copy link
Member Author

Some code in this repo currently definitely does rely on the variable having the name "time", for example:

if var == 'time':
vals=[t.strftime('%Y-%m-%dT%H:%M:%SZ') for t in to_datetime(rawvals)]
res['variables'][varout]['data']=vals
else:
res['variables'][varout]['data']=rawvals.tolist()

@aportagain
Copy link
Member Author

Almost certainly the case in some of our other repos too (e.g., regrid-api / interpolation_library).

@aportagain
Copy link
Member Author

aportagain commented Apr 12, 2023

And at the moment, I'm pretty sure we're not requiring that name by convention (CF 1.10 definitely doesn't care: "This convention does not standardize any variable or dimension names.", and we don't mention it in our API conventions 1.1.1 either), so that combo is of course not ideal... :)

https://cfconventions.org/Data/cf-conventions/cf-conventions-1.10/cf-conventions.html#_naming_conventions
https://github.com/metocean/api-conventions/tree/60b0126c5d809a889a61985449e7fbcdae714768

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

No branches or pull requests

1 participant