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

get_timeinfo could be more robust #20

Open
dougiesquire opened this issue Apr 5, 2023 · 1 comment
Open

get_timeinfo could be more robust #20

dougiesquire opened this issue Apr 5, 2023 · 1 comment
Labels
help wanted Extra attention is needed

Comments

@dougiesquire
Copy link
Collaborator

dougiesquire commented Apr 5, 2023

The code for getting the frequency, start date and end date of the variables in a file was stolen and adapted very slightly from the cosima cookbook. It works okay, but it could probably be more robust.

As a example, there're data in some of the COSIMA experiments (e.g. some of the files for the wdet100 variable in 01deg_jra55v13_ryf9091) that comprise a single timestep and do not include time_bounds. These get flagged as fixed frequency fx even though they are actually 1mon. In this case, I think this is actually more of a data issue - I don't know of any way to get the frequency in this case without trying to parse it from the (non-standardised) filename (which I don't think we want to do).

@dougiesquire
Copy link
Collaborator Author

Note since #91, the filename is also parsed for frequency information. If the frequency determined from the filename and file contents differ, a warning is thrown and:

  • if the contents frequency is fx, the filename frequency is used
  • otherwise the contents frequency is used

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant