-
Notifications
You must be signed in to change notification settings - Fork 25
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
Add time attributes to be cdo/xr-conform #449
Conversation
@jmaerz - it has been a while since I looked into this file. Will need some time to test and see what is going on. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jmaerz - looks good to me. Not sure why the date was defined as a global attribute in the first place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks for fixing this.
@@ -827,7 +827,7 @@ subroutine write_netcdf(iogrp) | |||
!--- Define global attributes | |||
call nccheck(NF90_PUT_ATT(ncid,NF90_GLOBAL,'title','Global inventory for marine bgc') ) | |||
call nccheck(NF90_PUT_ATT(ncid,NF90_GLOBAL,'history','Global inventory for marine bgc') ) | |||
call nccheck(NF90_PUT_ATT(ncid,NF90_GLOBAL,'date', timeunits) ) | |||
!call nccheck(NF90_PUT_ATT(ncid,NF90_GLOBAL,'date', timeunits) ) | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could be deleted instead of commented out?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
Hi @TomasTorsvik and @JorgSchwinger , when I was running some python-xarray routines to plot the netcdf-inventory written out by iHAMOCC, I realized that xarray had issues to interpret the time dimension correctly. Some attributes for the time dimension were missing, which I introduce with this PR. I hope it doesn't break any of your own post-processing pipelines - please check carefully and let me know.
@TomasTorsvik , since you have written this inventory part: please check carefully (also, whether the time is correctly set - I assumed that the previous global attribute
date
was linked to the time dimension).Only tested in single column mode. Limited idea, why the build fails here.