Skip to content

Values for 1745/1746 #735

@rgieseke

Description

@rgieseke

There have been a few issues about this already (e.g. #354, #556, #177)

The documentation currently states:

An important note about time: The outputstream code currently writes the end date of the current timestep in the outputstream.csv file; e.g., when we’re running 1 January 1745 - 31 December 1745, what gets written is “1746”. This is not intuitive (most people think of “1746” denoting January 1-December 31) but numerically correct: the date is 1746.0, i.e. midnight on December 31 1745. A consequence is that carbon fluxes logged at this timepoint are effectively for the calendar year 1745 (1745-01-01 to 1745-12-31).

https://jgcri.github.io/hector/articles/outputstream.html?#output-stream-categories

As discussed in the linked issues, for NBP (formerly 'atm_land_flux') in simpleNbox it's not possible to retrieve a value for 1745 using RHector.

packageVersion("hector")

‘3.2.0core <- newcore('hector_ssp126.ini')

fetchvars(core, 1745:2100, vars = c(NBP()))

Error: sendmessage: msg:  	Interpolation requested but not allowed (?) date: 1745

func: 	get
file: 	tseries.hpp
ffile:	../inst/include/tseries.hpp

line: 	332

With

fetchvars(core, 1746:2100, vars = c(NBP()))

I get (as expected and documented):

fetchvars(core, 1746:2100, vars = c(NBP()))
               scenario year variable         value   units
1   Unnamed Hector core 1746      NBP -0.0802025172 Pg C/yr
2   Unnamed Hector core 1747      NBP -0.0762544017 Pg C/yr

However, in the command line outputstream I do get a value for 1745:

# Output from hector version 3.2.0 on Mon Feb 26 15:22:42 2024
year,run_name,spinup,component,variable,value,units
1745,ssp119,1,simpleNbox,NBP,0.0009932,Pg C/yr
1746,ssp119,0,simpleNbox,NBP,-0.0802,Pg C/yr
1747,ssp119,0,simpleNbox,NBP,-0.07625,Pg C/yr

For the Pyhector v3 update (openclimatedata/pyhector#63) I need to find a way to handle NBP not reporting for 1745, which in my current setup requests all years for all variables and errors with the same error as RHector above
.
I can surely work around this somehow, but was wondering why the command line version reports a value for 1745.
Also, is NBP the only value for which the start year (1745) is not being reported?

[Edited: I had 1746 in some places instead of 1745, sorry!]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions