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

[nctime] wrong time units in LPJG #502

Open
oloapinivad opened this issue Jun 21, 2019 · 7 comments
Open

[nctime] wrong time units in LPJG #502

oloapinivad opened this issue Jun 21, 2019 · 7 comments

Comments

@oloapinivad
Copy link

Hi all,

I had finally the chance to run nctime on EC-Earth3-Veg output. Unfortunately, I found that all the LPJG variables have a time axis which reads (this is similar to #466):

time:units = "days since 1850-01-01" ;

while IFS and NEMO has:

time:units = "days since 1850-01-01 00:00:00" ;

Of course it is not a big deal - it is just a formal error that can be corrected with nco - I am just wondering if this could be fixed in the future releases since some ESGF may run the nctime check before publishing so that this inconsistency may postpone the data publication.

For completeness, an example of the error from nctime is here below:

       Status: Error 005 -- Time units must be unchanged for the same dataset
fco2antt_Amon_EC-Earth3-Veg_historical_r4i1p1f1_gr_185101-185112.nc
        Units:
            IN FILE -- days since 1850-01-01
            REF     -- days since 1850-01-01 00:00:00
@zklaus
Copy link

zklaus commented Jun 24, 2019

I would consider the shorter form used by LPJG as the more correct one (see the discussion in #466), so if and when we address this, I would try to use that also for ifs and nemo.

@treerink
Copy link
Collaborator

As mentioned in #466 (comment) the time formatting is determined by cmor and looks in NEMO & IFS like:

time:units = "days since 1850-01-01 00:00:00"

It seems to me that we thus should change the time unit formatting of LPJG towards the one of NEMO & IFS.

Currently I guess this can be done at the lines 440 & 452 in lpjg2cmor.py

440                  refyear = int(ref_date_.year)

452                  timev.units = '{}s since {}-01-01'.format(tres, refyear)

Unfortunately I can't test it as I don't have LPJG output because #219 is still open.

@klauswyser
Copy link
Collaborator

A test dataset for LPJG is now available, see #219 (comment)

@zklaus
Copy link

zklaus commented Jun 26, 2019

As mentioned in #466 (comment) the time formatting is determined by cmor and looks in NEMO & IFS like:

Iirc it was not completely clear whether this was solely due to the erroneous hours based time provided by ece2cmor, or really a bug in CMOR.

Regardless, I would give this issue low priority.

@oloapinivad
Copy link
Author

Just to wrap up: the consensus is to keep the reference time of LPJG as it is, regardless of the nctime complain?
No problem for me.

@oloapinivad
Copy link
Author

I finally decided to fix LPJG files after the cmorisaztion with NCO.
ncatted -a units,time,m,c,"days since 1850-01-01 00:00:00" $file
with this correction nctime is no longer complaining.

@oloapinivad
Copy link
Author

I just want to add that this is - as previously discussed - not a fundamental issue. I have a few files downloaded from other CMIP6 models and that's what they read. Some of the has also a wrong reference time (i.e. not 1850-01-01).

BCC-CSM2-MR_historical
		time:units = "days since 2013-01-01" ;
BCC-ESM1_historical
		time:units = "days since 2010-01-01" ;
CanESM5_historical
		time:units = "days since 1850-01-01 0:0:0.0" ;
CNRM-CM6-1_historical
		time:units = "days since 1850-01-01 00:00:00" ;
CNRM-ESM2-1_historical
		time:units = "days since 1850-01-01 00:00:00" ;
EC-Earth3_historical
		time:units = "days since 1850-01-01 00:00:00" ;
IPSL-CM6A-LR_historical
		time:units = "days since 1850-01-01 00:00:00" ;
UKESM1-0-LL_historical
		time:units = "days since 1850-01-01" ;
MRI-ESM2-0_historical
		time:units = "days since 1850-01-01" ;
GISS-E2-1-G_historical
		time:units = "days since 1850-1-1" ;
GFDL-CM4_historical
		time:units = "days since 1850-01-01 00:00:00" ;

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

No branches or pull requests

4 participants