APSIMInitiative / ApsimX

ApsimX is the next generation of APSIM
http://www.apsim.info
Other
135 stars 163 forks source link

N20 Simulation #6424

Closed terenzio266 closed 3 years ago

terenzio266 commented 3 years ago

Dear APSIM community

I'm trying to simulate the N20 emission from a corn rotation in southern europe. My goal is to compare the APSIM simulation with observed observation of N20 over a period of 4 years with different N fertilisation rate and manure use. I have attached my simulation here: while is running with no error message the values of N2Oatm are alway zero in all soil layer. Can you give me some advice to get N20atm emission ?

Best regards Terenzio ezyzip.zip

hol430 commented 3 years ago

Hi @terenzio266 - this is a bug, it will be fixed by #6438. I'll let you know when it's merged (hopefully sometime this week). When that happens, you'll be able to upgrade to the latest version and your N20atm should be nonzero.

terenzio266 commented 3 years ago

Thanks @hol430

Best wishes Terenzio

sno036 commented 3 years ago

Hi @terenzio266,

Thank you for this query about N2O emissions. It uncovered a couple of errors and omissions with the translation from the old version of APSIM to Next Gen. We think these are fixed now that #6438 has been merged but do let us know if you see anything that looks wrong.

The implementation is that from DayCent as interpreted by [https://doi.org/10.1016/j.agee.2009.12.014] and you will read some caveats in that publication. As we (mostly @hut104 and @hol353) were working on the code we noted that the routine could do with a bit of critical evaluation but this should get you going and at least will replicate the functionality from the 2010 publication.

To clarify the outputs:

If you want annual amounts then change the reporting frequency to the end of the year and sum of sum([Soil].Nutrient.N2Oatm) from 1-Jan to 31-Dec as AnnualN2O

Or I quite like a more frequent report like that below to give a cumulative that resets to zero at the start of each year sum of sum([Soil].Nutrient.N2Oatm) from 1-Jan to [Clock].Today as CumAnnualN2O

Good luck!

terenzio266 commented 3 years ago

Thanks @sno036

I did upgrade APSIM next gen today. Nevertheless I'm still getting zero values for N20ATM in all soil layer. Attached my simulation file.

Thanks

IT_BCi.zip

sno036 commented 3 years ago

image image

Hi @terenzio266 - using the current version I got rather a lot of N2O as in the figure attached. I used "Good.met" (in the examples folder) as the weather file because yours was not included in the zip. At an individual layer level there is not much from the top layer but there is active N2O generation from all layers (see the raw output attached as a screen grab).

Possibilities are that your weather is not conducive to denitrification (too dry, too cold), the denitrification parameters are not suitable for your location (but these are relative generic and it is not a comment we have heard from other European users), or you do not have the tip revision. The latter is easy to check - Help | About and it should have a date in the last 2 days.

@hol353 , @hol430 - I just had a look on the Upgrades page and the last date was 18-March. Doesn't seem right. Could this be the problem? @terenzio266 - are you getting upgrades or pulling down the source code?

hol430 commented 3 years ago

@hol353 , @hol430 - I just had a look on the Upgrades page and the last date was 18-March. Doesn't seem right. Could this be the problem?

I think you were looking at the apsim classic upgrades. The most recent next gen version is from a few days ago.

sno036 commented 3 years ago

@hol430 - opps - entirely possible!

sno036 commented 3 years ago

@hol430 - now that I am looking in the right place filtered for X) I can only see two versions for all of May so far. Lookign at the pull requests that have been merged there should be several. Neither of the two appear to be related N2O and that was merged as #6438 three days ago. Is the system working correctly?

hol430 commented 3 years ago

Yeah, the release build was broken for a while. I fixed it earlier this week but the N20 pull request broke things again. #6451 (merged a few minutes ago) should fix things once more.

terenzio266 commented 3 years ago

Hi @sno036 I'm getting upgrades . Please see below a screenshot of it @terenzio266 upgrades

sno036 commented 3 years ago

@terenzio266 - unfortunately that is not the full list of merged pull requests and does not include the one you need. @hol430 - I've just checked and it looks like the release bug is still lurking in the system. Are you able to look at this again?

hol430 commented 3 years ago

There haven't been any "resolves" pull requests merged recently so no new versions have come out. I manually kicked off a release build earlier this morning and there is now a version 6410 ("Why is N2O loss from nitrification (in Nutrient) set to zero?"). I've just installed this version and run the IT_BCi.apsimx file provided in an earlier comment and am now seeing non-zero N20 outputs. So hopefully it's problem solved.

sno036 commented 3 years ago

Many thanks @hol430!

@terenzio266 - can you try again. You should have version "2021.05.14.6410". Let us know how it goes.

terenzio266 commented 3 years ago

Dear @sno036 and @hol430 Thanks for the very nice support. The version "2021.05.14.6410". is working fine (N20 ATM is not zero anymore in my simulation). I will try to compare experimental observations of N20 with APSIM simulation in southern europe (mediterranean area). If might be of interest for the APSIM community I will share my results here Best Terenzio

sno036 commented 3 years ago

Great thanks @terenzio266. Yes this will be of interest so let us know how it goes! When we were looking into this we noted that there were a number of things that could be more sophisticated.