ebimodeling / ghgvc

Ecosystem Climate Regulation Services Calculator
http://www.ecosystemservicescalc.org
Other
48 stars 12 forks source link

fix most egregious errors in default values for for switchgrass and miscanthus #49

Closed teixeirak closed 10 years ago

teixeirak commented 10 years ago

For both switchgrass and miscanthus, the default value for annual CO2 exchange need to be multiplied by 100: -56.67 for switchgrass -84.17 for miscanthus

annual N2O flux should be 0.029 for miscanthus

As I mentioned in the email, there are other errors, but I don't have time to go through and check everything. These are the most aggregious errors related to the upcoming demo.

dlebauer commented 10 years ago
teixeirak commented 10 years ago

We should fix these 3 values before Evan's presentation.

Original default values are as in the message I just sent. They're also in a table in the attached pub. And I have them all in .csv files- let me know what format you need.

I'm referring to F_CO2 (first 2) and F_N2O.

teixeirak commented 10 years ago

There are other errors, but these are the ones that need to be fixed before Evan's presentation. We can work on the others later— unless its easier to just upload complete .csv files all at once. I got the impression (from Carl) that this wasn't that easy.

dlebauer commented 10 years ago

the values are probably in one of these files, but I can't find the numbers you give there. Presumably the numbers you give are the correct ones and the incorrect ones are < 100, e.g. F_CO2 = 0.5567?

The data are here:

[dlebauer@pecandev ghgvc]$ grep -l miscanthus public/data/*.json
public/data/default_ecosystems.json
public/data/final_ecosystems.json
public/data/name_indexed_ecosystems.json

But I think ultimately we should migrate these data to .csv or .xml, because those are easier to read (.json is good for web programming, but we can generate those on the fly if necessary; the default values should be in a common format). But that will take much more time, because it will require changes in the code. It would be good to do this at the same time as we refactor the use of netcdf files (gh-5).

dlebauer commented 10 years ago

if you can send the csv files that would be great. I am having a hard time finding the incorrect numbers

teixeirak commented 10 years ago

the values are probably in one of these files, but I can't find the numbers you give there. Presumably the numbers you give are the correct ones and the incorrect ones are < 100, e.g. F_CO2 = 0.5567?

Yes, that's correct.

dlebauer commented 10 years ago

@teixeirak I am having trouble tracking this down because I can not reproduce the error. When I run miscanthus and switchgrass, I get the following table:

LocationBiomeSCO2SCH4SN2OFCO2FCH4FN2OGHGVCO2GHGVCH4GHGVN2OswRFVlatentcrvGHGV
1miscanthus81.2NANA-11.12.5-4.670.22.5-4.6NANANA68.1
1switchgrass51.5NANA-24.82.5-24.426.72.5-24.4NANANA4.8

I can't find any of the values you mentioned for F_CO2 or F_N2O in the original bug report.

the default value for annual CO2 exchange need to be multiplied by 100: -56.67 for switchgrass -84.17 for miscanthus annual N2O flux should be 0.029 for miscanthus

To move forward, I need to know:

For example, presumably you found a value of 0.5567. Where did you see this? I can't find this in any input or output (including the log).

For reference, see the recently updated for clarity PEcAn wiki on submitting bug reports / feature requests),

teixeirak commented 10 years ago

The error is in the input (what you will see if you go into edit ecosystem), not the output.

Go to edit— ongoing exchange— CO2. You should see -.56 and -.84 for switchgrass and miscanthus, respectively.

K

dlebauer commented 10 years ago

I fixed these ... the values used in the calculator are in public/fina/default_ecosystems.json.

You can see my edits here: 3756a5683b5e9defc19b73b50a64052b7b9ea53c and you can change any other default values in the github web interface here: https://github.com/ebimodeling/ghgvc/blob/master/public/data/final_ecosystems.json

The proper protocol would be for you to create a fork in your own github user space, make changes, and submit a pull request (this avoids having a master branch that is broken). But for trivial things like changing the numbers when you are certain that you won't make a mistake (ie. by adding / removing random characters instead of just changing a number), you can edit directly, but please write an informative comment when you save your changes (makes it possible to find error introductions if all else fails)