ajwdewit / pcse

Repository for the Python Crop Simulation Environment
Other
191 stars 127 forks source link

CarbonBalanceError #52

Closed ncaspari closed 3 years ago

ncaspari commented 3 years ago

When running a simulation, we get the follwing error: CarbonBalanceError: Carbon un-balance in crop model at day 2007-04-13. This results when running a nutrient-limited crop growth model, LINTUL3. Do you know where the error might come from?

ajwdewit commented 3 years ago

I have never seen this error happening before. Can you provide me with the inputs, so I can reproduce it?

GraceJepkosgei12 commented 3 years ago

I have never seen this error happening before. Can you provide me with the inputs, so I can reproduce it?

We have looked at the crop file (lintul3_soybean.crop) and noted that the fraction of total dry matter to roots, leaves, stem, and storage organs as a function of DVS do not add up at some crop development stages like emergence. We think this could be the source of the error. However, the (soybean.crop) file that has similar values as lintul3_soybean.crop does not return an error when used in a water-limited production(WLP) model run. Question is if we did get the error source, why does it not affect the WLP model and how is the correct partitioning determined? soybean.zip

ajwdewit commented 3 years ago

Your zip file does not include the weather file so I cannot run the example. Can you upload it?

GraceJepkosgei12 commented 3 years ago

Sorry about that. Here is the weather file. Kk2 (1).xls

ajwdewit commented 3 years ago

I see what is happening: you probably took a partitioning table from WOFOST and applied it to LINTUL. However, WOFOST partitions first between root/shoot, then it partitions the shoot biomass between stems, leaves and storage organs. LINTUL instead partitions directly between roots/stems/leaves/storage_organs. So for LINTUL the four partitioning tables for roots, leaves, stems and storage organs must add up to unity. In your example, the partition table > unity so that is where the CarbonBalance error comes from.

The solution is to recompute your partitioning tables according to the scheme of LINTUL. I agree that this is a nuisance, but changing it is just too much work.

Allard

Wendelly commented 1 year ago

The solution is to recompute your partitioning tables according to the scheme of LINTUL. I agree that this is a nuisance, but changing it is just too much work.

I have a question regarding this:

I believe s and p come from a ParameterProvider, but I'm uncertain about how to set this up or rectify it. Can you provide guidance?

ok, where i find scheme LINTUL data weatherdataprovider ?

ajwdewit commented 11 months ago

Is this still relevant? Sorry I hadn't noticed your question.