ajwdewit / pcse

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

Applying fertilizer seems to have no impact on growth of a crop in Wofost80_NWLP_FD_beta #60

Closed Tessavankleef closed 2 years ago

Tessavankleef commented 2 years ago

Dear all,

I am trying to use PSCE to look at the effects of fertilizer on the growth of a crop in a specific crop rotation. To do this I used the [Notebook #7] (https://github.com/ajwdewit/pcse_notebooks/blob/master/07%20Running%20crop%20rotations.ipynb) and changed a few things:

Then, I added the fertilization to the agromanagement as follows:

agro_yaml_fert = """
AgroManagement:
- 2004-08-01:
    CropCalendar:
        crop_name: wheat
        variety_name: Winter_wheat_101
        crop_start_date: 2004-09-15
        crop_start_type: sowing
        crop_end_date:
        crop_end_type: maturity
        max_duration: 300
    TimedEvents: null
    StateEvents: 
    -   event_signal: apply_npk
        event_state: DVS
        zero_condition: rising
        name: DVS-based N/P/K application table
        comment: all fertilizer amounts in kg/ha
        events_table:
        - 0.3: {N_amount : 1, P_amount: 3, K_amount: 4}
        - 0.6: {N_amount: 11, P_amount: 13, K_amount: 14}
        - 1.12: {N_amount: 21, P_amount: 23, K_amount: 24}
- 2005-09-01:
    CropCalendar: null
    TimedEvents: null
    StateEvents: null
- 2006-03-01:
    CropCalendar:
        crop_name: sugarbeet
        variety_name: Sugarbeet_601
        crop_start_date: 2006-04-15
        crop_start_type: sowing
        crop_end_date:
        crop_end_type: maturity
        max_duration: 200
    TimedEvents:
    -   event_signal: apply_n
        name: Nitrogen application table
        comment: All nitrogen amounts in g N m-2
        events_table:
        - 2006-04-10: {amount: 10, recovery: 0.7}
        - 2006-05-05: {amount: 5, recovery: 0.7}
    StateEvents: null
"""

However, the outcome does not seem to change. Am I doing something wrong here or is the model simply not able yet to take fertilization into account? I have attached my notebook. Moreover, I have tried different values for the missing parameters, but that does not seem to solve the issue either.

Thanks in advance,

Tessa WOFOST 8.0 implementation and comparison.zip

ajwdewit commented 2 years ago

Dear Tessa,

I will have a look. I think there is a problem in your agromanagement description. Moreover, I must warn you that we are preparing an major overhaul of the way that nutrients are dealt with in WOFOST.

Allard

ajwdewit commented 2 years ago

Hi Tessa,

Can you send me an email on allard.dewit@wur.nl, I have some material that may be helpful but passing it through github is a bit inconvenient.

Allard

dsdhms2 commented 11 months ago

Hi Allard @ajwdewit,

I am also facing a similar issue. Could you also share the material with me?

I just sent you an email.

Regards, Dilpreet

dsdhms2 commented 11 months ago

Hi Allard @ajwdewit,

I am also facing a similar issue. Could you also share the material with me?

I just sent you an email.

Regards, Dilpreet

Hi @Tessavankleef,

I went through your Jupyter notebook. I found out that you forgot to update the name of 'agro' file while applying the fertilizer case.

It should be: agro = yaml.safe_load(agro_yaml_fert) instead of agro = yaml.safe_load(agro_yaml)