LANDIS-II-Foundation / Extension-NECN-Succession

The Net Ecosystem Carbon and Nitrogen extension for the LANDIS-II model.
http://www.landis-ii.org/extensions/net-ecosystem-cn-succession
Apache License 2.0
1 stars 19 forks source link

Monthly climate data out of order #80

Open kmcquil opened 2 years ago

kmcquil commented 2 years ago

The monthly climate data is running out of order. Basically what I'm seeing is that the model is simulating the preceding winter after the summer in every year of a five year simulation. image (1)

mslucash commented 2 years ago

I ran DGS as a test and the climate inputs match the outputs in the calibrate and "normal" mode of LANDIS-II (july to june). I didn't test any of the other succession models, but they rely on the same climate library. ComparingInputsOutputsClimate

kmcquil commented 2 years ago

Right, the inputs match the outputs but they are out of order. For example, [Month=1, Year=1] is running after [Month=12, Year=1] which is noticeable because the biomass in [Month=1, Year=1] is higher than in [Month=12, Year=1]. Every preceding winter is running after the summer. I guess this isn't a big deal at the annual scale but when I've been trying to validate/calibrate at a monthly scale it caused some discrepancies.

kmcquil commented 2 years ago

Also, the 0 for precipitation in Month=1 Year = 1 was a typo on my part. I think I accidentally deleted the value that was supposed to be in that cell.

mslucash commented 2 years ago

I guess I don't understand the problem because LANDIS-II always runs from July to June. Anyway... if you think it's a climate problem that you think I need to solve, please post it as an issue in the Climate Library, otherwise I'll assume it's a NECN issue and let Rob handle it.

kmcquil commented 2 years ago

I brought this up to Rob and he told me to raise this an issue on github so he would remember to get around to it. Thanks!

flakesw commented 1 year ago

I just wanted to add a +1 for fixing this issue. It could be solved either in NECN or in the CL, but I think that solving it in the CL would be more elegant. Do all the succession extensions handle the climate stream the same way, by putting months 1-6 of year 1 after months 7-12 of year 1? If that's the case, I think addressing it in the Climate Library might be the best solution.

The other option is to restructure the climate input data before feeding it to the CL (i.e., take Jan-May weather from year 2 and change them to year 1), but that doesn't seem ideal.

mslucash commented 1 year ago

The data is always structured in year 1 months 1-12 in the climate library (e.g. for (int month = 0; month < 12; month++). It's NECN that asks for the climate data it needs each month, NECN that runs Julyy to June and outputs the montly climate in the July to June format, as I understand it. Are you sure it's an input issue? Seems like it could also be just an output issue. If you and Rob still think this is an issue I need to fix in the climate library, then let's set up a phone call to discuss so I can better understand the issue.

flakesw commented 1 year ago

That makes sense, if NECN is grabbing the data from the Climate Library and interpreting it, then it seems like an NECN-side issue. It's not just an output issue -- looking at console prints to the landis-log, Year 1 January weather does get used after Year 1 December weather.

@rmscheller maybe we can roll a fix into NECN v7?

Alternatively, I could put together some guidance for the user guide on fixing the climate input data so that it aligns with NECN water-years.

rmscheller commented 1 year ago

Yes, makes perfect sense to include in v7.

mslucash commented 1 year ago

I'm sorry, but I still don't understand why this is a problem. NECN runs from July to June as a model, not Jan to Dec. Therefore the climate is used from July to June and looks odd in the output, even though it's correct.

flakesw commented 1 year ago

My expectation was that the climate data should proceed in the order it's entered. So, if we have weather for Jan 2010 through Dec 2011, I would expect the weather to start in July 2010 and run to Dec 2010, and then proceed to Jan 2011. So the NECN water year would be July 2010 - June 2011, according to the climate input file. That is what Katie and I expected, at least.

Instead, the NECN water year runs from July 2010 - Dec 2010, and then Jan 2010 - June 2010. It's not an issue if you give LANDIS weather data in water-year format, but I think most folks have been taking the data directly from the GeoData Portal, GridMet, etc., without restructuring it to water years. It's a simple fix; the Jan-June months just have to be moved back by a year, but I don't remember coming across this procedure. So perhaps we coild just improve the communication in NECN trainings and the user guide, instead of changing code.

mslucash commented 1 year ago

Yeh NECN doesn't run that way. It runs annually where one year is July to Dec, then Jan to June- all in year 1. Then it goes to year 2. If you'd want to run it, as a water year, you'd need to fix the input data. There's no way to easily code that in the climate library, far as I know.

flakesw commented 1 year ago

Honestly it's only a problem for us weirdos who are trying to align monthly NECN outputs with other sources. I bet most users would never notice if their climate is off by six months, especially with NECN at a longer timestep.

From what you're saying, Melissa, this might not be a bug as far as NECN is concerned, instead of just user error that could be fixed with training.

mslucash commented 1 year ago

Yes, I agree. Just generally important to properly aligned observed data with model output.