Skip to content

FATES output time mismatch with metadata #1939

@serbinsh

Description

@serbinsh

Describe the bug
Presently in the FATES pecan standard output we define the time variable as something like:

double time(time) ;
		time:units = "days since 1995-01-01 00:00:00" ;
		time:long_name = "time" ;
		time:calendar = "standard" ;

However the time variable data we use from FATES output actually counts up continuously from the start year, e.g. :

[sserbin@modex SA-median]$ ncdump -h case.clm2.h0.1995-01-01-00000.nc | grep time
	time = UNLIMITED ; // (8760 currently)
	float time(time) ;
		time:long_name = "time" ;
		time:units = "days since 1995-01-01 00:00:00" ;
		time:calendar = "noleap" ;
		time:bounds = "time_bounds" ;
	int mcdate(time) ;
	int mcsec(time) ;
	int mdcur(time) ;
	int mscur(time) ;
	int nstep(time) ;
		nstep:long_name = "time step" ;

[sserbin@modex SA-median]$ ncdump -h case.clm2.h0.1996-01-01-00000.nc | grep time
	time = UNLIMITED ; // (8760 currently)
	float time(time) ;
		time:long_name = "time" ;
		time:units = "days since 1995-01-01 00:00:00" ;
		time:calendar = "noleap" ;
		time:bounds = "time_bounds" ;
	int mcdate(time) ;
	int mcsec(time) ;
	int mdcur(time) ;
	int mscur(time) ;
	int nstep(time) ;
		nstep:long_name = "time step" ;

As such our PEcAn nc metadata does not match the FATES output. We either need to 1) replace the time since part and instead set it the same as FATES such that each successive year has "days since" of the start year OR 2) stop using nc.time <- ncin$dim$time$vals # days since "start_date" or modify such that each year correctly has days since that year

To Reproduce
Steps to reproduce the behavior:
Run PEcAn-FATES

Expected behavior
We should have consistency between the time variable definition and the time data

Screenshots
NA

Machine (please complete the following information):

  • Server [e.g. BU, NCSA, VM, etc.]
    modex but would apply to all

  • OS: [e.g.Linux]
    Linux but applies to all

  • Browser(if applicable) [e.g. chrome, safari]
    NA

  • Version [e.g. 22]
    develop

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions