LANDIS-II-Foundation / Extension-Biomass-Succession

Biomass-based succession extension for LANDIS-II
https://sites.google.com/site/landismodel/extensions/biomass-succession
Apache License 2.0
4 stars 9 forks source link

Log file does not match output from Biomass Output #3

Closed rmscheller closed 7 years ago

rmscheller commented 8 years ago

What steps will reproduce the problem?

  1. Year zero biomass is slightly different when looking at Biomass-succession-v3-log (Live B) vs. spp-biomass-log (sum species).
  2. After year zero, the biomass values are identical.
  3. Both log files are produced by Biomass Succession.

What is the expected output? What do you see instead? I would expect the values to be identical for all timesteps including zero.

What version of the product are you using? On what operating system? Biomass Succesion v-3.0, Landis-II 6.0.

Apr 1, 2012 #1 mduveneck A follow up to my earlier post: When running the same year zero dynamic inputs, I get different biomass values depending on what climate scenario I am running. Again, I would expect to see year zero biomass identical to other scenarios if year zero dynamic inputs are the same. Cheers, Matthew Duveneck

bmarron18 commented 7 years ago

Might this issue be the result of log file duplication? There are apparently two distinct log files for Biomass Succession with nearly identical names that are called by different .cs files: PlugIn.cs(20): public static readonly string summaryLogFile = "Biomass-succession-v3-log"; Outputs.cs(24): string logFileName = "Biomass-succession-v3-log.csv"; Are the data in these two log files calculated equivalently?

Although it appears that Outputs.cs(27) will generate a log file with the line, log = Landis.Data.CreateTextFile(logFileName); running Biomass Succession produces the output "Biomass-succession-v3-log" not "Biomass-succession-v3-log.csv"

The file, "Biomass-succession-v3-log" has no year zero output and is the file called by Metadata: MetadataHandler.cs(27): PlugIn.summaryLog = new MetadataTable(summaryLogFileName);

Perhaps "Biomass-succession-v3-log.csv" should be the correct output log file?

rmscheller commented 7 years ago

Bruce, It turns out that the file in Output.cs is derelict code. I commented it out, no problems. So that's not the problem. Is this even still a problem is the first question.

bmarron18 commented 7 years ago

Rob, Rebuilt everything after your changes and re-ran the example (scenario_s2e1.txt) with RandomNumber seed set to compare to pre-change outputs. All outputs for Biomass-succession-v3-log and spp-biomass-log.csv were identical to the pre-change run outputs (as they should be).

I don't think this is an issue. First, there is no zero-year biomass reported for Biomass-succession-v3-log so the direct comparison to zero-year spp-biomass-log.csv is currently not possible. Second, summing the biomass at each timestep (other than the zero-year) and comparing between output logs gives identical values (as expected). This certainly implies that the InitialBiomass is being correctly incorporated into both logs.

rmscheller commented 7 years ago

Excellent! Thank you!