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

Calendar attribute for time variable #187

Closed
penguian opened this issue Aug 1, 2017 · 7 comments · Fixed by #195
Closed

Calendar attribute for time variable #187

penguian opened this issue Aug 1, 2017 · 7 comments · Fixed by #195
Assignees

Comments

@penguian
Copy link

penguian commented Aug 1, 2017

keyword_maygit owner:[email protected] type_code improvement | by cmt599


Could you please add the attribute 'calendar' to the time coordinate variable in the offline code? Typical values for this would be 'standard' and 'noleap', consistent with NetCDF Climate and Forecast metadata conventions http://www.cgd.ucar.edu/cms/eaton/netcdf/CF-20010629.htm#cal


Issue migrated from trac:159 at 2023-11-27 11:22:02 +1100

@penguian
Copy link
Author

@[email protected] changed owner from bep599 to pxb599

@penguian
Copy link
Author

@[email protected] commented


Since Peter already have implemented that in his branch, there is no need to reinvent the wheel.

@penguian
Copy link
Author

@[email protected] changed milestone from `` to 6. Report

@penguian
Copy link
Author

@[email protected] changed owner from pxb599 to jxs599

@penguian
Copy link
Author

@[email protected] commented


pxb599 - Peter Briggs - also pcb599 @ NCI - but there are no committed changes in his repo branch. Contacted Cathy for comment.

@penguian
Copy link
Author

penguian commented Feb 7, 2023

@[email protected] set keywords to maygit

@penguian
Copy link
Author

@[email protected] commented


I'm resurrecting this. I really don't understand why we only use the "standard" calendar for leap years. And we always put a "noleap" calendar for no-leap years. This is creating a mayhem when trying to read in a long-time series with the time axis being inconsistent between years.

I want to simplify this so:

  • if leap = .True., calendar="standard"
  • if leap = .False., calendar="noleap"

I still need to check if it is possible for all cases without side-effects. Will update when I know more.

@ccarouge ccarouge assigned ccarouge and unassigned JhanSrbinovsky Dec 8, 2023
@ccarouge ccarouge transferred this issue from CABLE-LSM/CABLE-Trac-archive Dec 8, 2023
ccarouge pushed a commit that referenced this issue Dec 20, 2023
JhanSrbinovsky pushed a commit that referenced this issue Dec 20, 2023
# CABLE

Thank you for submitting a pull request to the CABLE Project.

## Description

Removes the dependency of the calendar attribute on the fact we are
running a leap year or not. So output files from a same configuration
will have the same calendar attribute for all years.
Fixes #187 

## Testing
**Setup:** ran a global simulation with CRU JRA forcing (using gswp3
namelist settings) with both this branch and the main branch for 2
years: normal and leap year.

**Results:** `cdo diffn` indicates the variables in the cable_out.nc
files are identical. But the calendar attribute for `time` is different
in the non-leap year: `noleap` with the code from the main branch,
`standard` with the code from this branch.

## Type of change

Please delete options that are not relevant.

- [X] Bug fix

## Documentation

No changes to the documentation are required for this change.

Please add a reviewer when ready for review.


<!-- readthedocs-preview cable start -->
----
📚 Documentation preview 📚:
https://cable--195.org.readthedocs.build/en/195/

<!-- readthedocs-preview cable end -->

---------

Co-authored-by: ccc561 <ccc561@b483b3d9-cc7d-4f55-9e4c-b4562452379e>
Co-authored-by: C. Carouge <[email protected]>
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 a pull request may close this issue.

3 participants