GCEL / CARDAMOM

The CARbon DAta MOdel FraMework. Computer software that retrieves terrestrial carbon (C) cycle variables by combining C cycle observations with a mass balance model.
GNU General Public License v3.0
2 stars 0 forks source link

Error raised in run_mcmc_results #18

Closed DTMilodowski closed 2 years ago

DTMilodowski commented 2 years ago

I am rerunning the mcmc results to generate stocks/fluxes info for a gridded run. Things seem to progress smoothly until it reaches line 750:

https://github.com/GCEL/CARDAMOM/blob/0248513df3a1e583dcd62b81c873791a223b2f54/R_functions/run_mcmc_results.r#L750

At this point an error is thrown: object 'site output' not found

Any suggestions why this might be causing a problem? It's the first time I've come across this particular problem, but also first time processing this grid. site_output is not explicitly declared in the run_mcmc_results function. Should it be?

Thanks!

DTMilodowski commented 2 years ago

Should add that site_output is referenced throughout the following section of code, so it must obviously be expecting it to exist.

DTMilodowski commented 2 years ago

site_output referred to in line 750 is presumably the same object created in the function defined previously in the code run_each_site. The individual pixel-level output files are being written to the output folder.

lsmallma commented 2 years ago

Correct, site_output is written by the other function in this file which deals with running the individual sites in a grid. The already written files should be be read back in L742 and L1083 for the aggregation into a gridded summary output.

Can you check that all the files in RESULTS_PROCESSED are current? If you are working on a project first ran sometime ago there may some incompatible files in there.

DTMilodowski commented 2 years ago

I did check the timestamps and the pixel-level Rdata files in RESULTS_PROCESSED were freshly created

DTMilodowski commented 2 years ago

Ah, the load(to_do[1]) line had disappeared in my source code! Not sure when or why that happened. It would explain why site_output wasn't available

DTMilodowski commented 2 years ago

All clear - the issue was with my local copy and with that line added back in, things are running smoothly